diff options
author | Emmanuel Grumbach <emmanuel.grumbach@intel.com> | 2011-12-07 03:32:36 -0500 |
---|---|---|
committer | Wey-Yi Guy <wey-yi.w.guy@intel.com> | 2011-12-16 10:23:39 -0500 |
commit | b5326db8bb058a32c22ed82a8e359a8fe6f0bf9b (patch) | |
tree | 6f93ef6ee357cd5ecf57c9e6a4e6e4a2facdf41f /drivers/net/wireless/iwlwifi/iwl-agn-tx.c | |
parent | fdf426a34afe7b1c17a6783f273062e3464cceaa (diff) |
iwlwifi: don't accept Tx packets when draining HW queues
If the agg SM is in IWL_EMPTYING_HW_QUEUE_ADDBA or in
IWL_EMPTYING_HW_QUEUE_DELBA, we are not supposed to get Tx packets
from mac80211. mac80211 is supposed to buffer these packets for us.
A few issues have been identified in this mechanism, not all of them
were fixed.
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Diffstat (limited to 'drivers/net/wireless/iwlwifi/iwl-agn-tx.c')
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-agn-tx.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn-tx.c b/drivers/net/wireless/iwlwifi/iwl-agn-tx.c index ae35c537b58c..c664c2726553 100644 --- a/drivers/net/wireless/iwlwifi/iwl-agn-tx.c +++ b/drivers/net/wireless/iwlwifi/iwl-agn-tx.c | |||
@@ -388,6 +388,14 @@ int iwlagn_tx_skb(struct iwl_priv *priv, struct sk_buff *skb) | |||
388 | goto drop_unlock_sta; | 388 | goto drop_unlock_sta; |
389 | } | 389 | } |
390 | 390 | ||
391 | /* We can receive packets from the stack in IWL_AGG_{ON,OFF} | ||
392 | * only. Check this here. | ||
393 | */ | ||
394 | if (WARN_ONCE(tid_data->agg.state != IWL_AGG_ON && | ||
395 | tid_data->agg.state != IWL_AGG_OFF, | ||
396 | "Tx while agg.state = %d", tid_data->agg.state)) | ||
397 | goto drop_unlock_sta; | ||
398 | |||
391 | seq_number = tid_data->seq_number; | 399 | seq_number = tid_data->seq_number; |
392 | seq_number &= IEEE80211_SCTL_SEQ; | 400 | seq_number &= IEEE80211_SCTL_SEQ; |
393 | hdr->seq_ctrl &= cpu_to_le16(IEEE80211_SCTL_FRAG); | 401 | hdr->seq_ctrl &= cpu_to_le16(IEEE80211_SCTL_FRAG); |