From 0636b938214c90c3a7d145ad86b64a061bb10c50 Mon Sep 17 00:00:00 2001 From: Sara Sharon Date: Thu, 18 Feb 2016 14:21:12 +0200 Subject: iwlwifi: mvm: implement driver RX queues sync command mac80211 will call the driver whenever there is a race between RSS queues and control path that requires a processing of all pending frames in RSS queues. Implement that by utilizing the internal notification mechanism: queue a message to all queues. When the message is received on a queue it decrements the atomic counter. This guarantees that all pending frames in the RX queue were processed since the message is in order inside the queue. Signed-off-by: Sara Sharon Signed-off-by: Luca Coelho --- drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c') diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c b/drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c index 651604d18a32..b4d9c42d411a 100644 --- a/drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c +++ b/drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c @@ -406,6 +406,13 @@ void iwl_mvm_rx_queue_notif(struct iwl_mvm *mvm, struct iwl_rx_cmd_buffer *rxb, internal_notif = (void *)notif->payload; switch (internal_notif->type) { + case IWL_MVM_RXQ_SYNC: + if (mvm->queue_sync_cookie == internal_notif->cookie) + atomic_dec(&mvm->queue_sync_counter); + else + WARN_ONCE(1, + "Received expired RX queue sync message\n"); + break; case IWL_MVM_RXQ_NOTIF_DEL_BA: /* TODO */ break; -- cgit v1.2.3-70-g09d2