aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless
diff options
context:
space:
mode:
authorMatti Gottlieb <matti.gottlieb@intel.com>2015-03-30 09:50:07 -0400
committerEmmanuel Grumbach <emmanuel.grumbach@intel.com>2015-04-02 02:26:47 -0400
commit6ed13164450a916116cf7f0f38fe0da4679a45c9 (patch)
tree79c803b604082b064d066d8a7060c0300cb5d630 /drivers/net/wireless
parentb6e160ab15c203fe77d13a121081b1a9bce7cbfe (diff)
iwlwifi: mvm: Fix wrongfully flushing frames in the roc/off channel queue
Sending multiple action frames off channel, one after the other can create a race that will result in a timeout: 1. Start sending action frame off channel. 2. Once the frame is sent or the time event is over, the flow will eventually call ieee80211_start_next_roc to start the next roc frame & iwl_mvm_roc_finished schedules to schedule a work to flush the queue. 3. Start sending new roc frame and write it to the queue before the flush work has started. 4. The work is called and it flushes the new packet that was placed on the on the queue so the packet is lost. This causes the frame to be removed & not sent, that causes a timeout in userspace. Flush the work queue that flushes the roc/off channel queue before starting to send a new frame off channel, in order to avoid a race between the new frame that is transmitted off channel & the flushing of the queue. Signed-off-by: Matti Gottlieb <matti.gottlieb@intel.com> Reviewed-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Diffstat (limited to 'drivers/net/wireless')
-rw-r--r--drivers/net/wireless/iwlwifi/mvm/mac80211.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/net/wireless/iwlwifi/mvm/mac80211.c b/drivers/net/wireless/iwlwifi/mvm/mac80211.c
index 0dd999ceed36..0bd3373315ec 100644
--- a/drivers/net/wireless/iwlwifi/mvm/mac80211.c
+++ b/drivers/net/wireless/iwlwifi/mvm/mac80211.c
@@ -3080,6 +3080,8 @@ static int iwl_mvm_roc(struct ieee80211_hw *hw,
3080 IWL_DEBUG_MAC80211(mvm, "enter (%d, %d, %d)\n", channel->hw_value, 3080 IWL_DEBUG_MAC80211(mvm, "enter (%d, %d, %d)\n", channel->hw_value,
3081 duration, type); 3081 duration, type);
3082 3082
3083 flush_work(&mvm->roc_done_wk);
3084
3083 mutex_lock(&mvm->mutex); 3085 mutex_lock(&mvm->mutex);
3084 3086
3085 switch (vif->type) { 3087 switch (vif->type) {