aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net
diff options
context:
space:
mode:
authorJohannes Berg <johannes.berg@intel.com>2012-02-27 06:18:30 -0500
committerJohn W. Linville <linville@tuxdriver.com>2012-02-29 14:14:54 -0500
commit02f2f1a951f87644166926862ec32fb13511e2f3 (patch)
tree77d5ac88a112aeb9f18887277dabf311b7ec0e8a /drivers/net
parent5eb02e44adc92a71bae3ff60acb1eea5ada14e93 (diff)
mac80211: handle non-bufferable MMPDUs correctly
This renames the IEEE80211_TX_CTL_POLL_RESPONSE TX flag to IEEE80211_TX_CTL_NO_PS_BUFFER and also uses it for non-bufferable MMPDUs (all MMPDUs but deauth, disassoc and action frames.) Previously, mac80211 would let the MMPDU through but not set the flag so drivers supporting some hardware aids for avoiding the PS races would then reject the frame. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net')
-rw-r--r--drivers/net/wireless/iwlegacy/4965-mac.c2
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-agn-tx.c6
-rw-r--r--drivers/net/wireless/p54/txrx.c2
3 files changed, 7 insertions, 3 deletions
diff --git a/drivers/net/wireless/iwlegacy/4965-mac.c b/drivers/net/wireless/iwlegacy/4965-mac.c
index 2d01db0f08e0..2329033e23d7 100644
--- a/drivers/net/wireless/iwlegacy/4965-mac.c
+++ b/drivers/net/wireless/iwlegacy/4965-mac.c
@@ -1693,7 +1693,7 @@ il4965_tx_skb(struct il_priv *il, struct sk_buff *skb)
1693 sta_priv = (void *)sta->drv_priv; 1693 sta_priv = (void *)sta->drv_priv;
1694 1694
1695 if (sta_priv && sta_priv->asleep && 1695 if (sta_priv && sta_priv->asleep &&
1696 (info->flags & IEEE80211_TX_CTL_POLL_RESPONSE)) { 1696 (info->flags & IEEE80211_TX_CTL_NO_PS_BUFFER)) {
1697 /* 1697 /*
1698 * This sends an asynchronous command to the device, 1698 * This sends an asynchronous command to the device,
1699 * but we can rely on it being processed before the 1699 * but we can rely on it being processed before the
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn-tx.c b/drivers/net/wireless/iwlwifi/iwl-agn-tx.c
index da18a8fc9af7..5f78567f4180 100644
--- a/drivers/net/wireless/iwlwifi/iwl-agn-tx.c
+++ b/drivers/net/wireless/iwlwifi/iwl-agn-tx.c
@@ -322,7 +322,7 @@ int iwlagn_tx_skb(struct iwl_priv *priv, struct sk_buff *skb)
322 sta_priv = (void *)info->control.sta->drv_priv; 322 sta_priv = (void *)info->control.sta->drv_priv;
323 323
324 if (sta_priv && sta_priv->asleep && 324 if (sta_priv && sta_priv->asleep &&
325 (info->flags & IEEE80211_TX_CTL_POLL_RESPONSE)) { 325 (info->flags & IEEE80211_TX_CTL_NO_PS_BUFFER)) {
326 /* 326 /*
327 * This sends an asynchronous command to the device, 327 * This sends an asynchronous command to the device,
328 * but we can rely on it being processed before the 328 * but we can rely on it being processed before the
@@ -331,6 +331,10 @@ int iwlagn_tx_skb(struct iwl_priv *priv, struct sk_buff *skb)
331 * counter. 331 * counter.
332 * For now set the counter to just 1 since we do not 332 * For now set the counter to just 1 since we do not
333 * support uAPSD yet. 333 * support uAPSD yet.
334 *
335 * FIXME: If we get two non-bufferable frames one
336 * after the other, we might only send out one of
337 * them because this is racy.
334 */ 338 */
335 iwl_sta_modify_sleep_tx_count(priv, sta_id, 1); 339 iwl_sta_modify_sleep_tx_count(priv, sta_id, 1);
336 } 340 }
diff --git a/drivers/net/wireless/p54/txrx.c b/drivers/net/wireless/p54/txrx.c
index 42b97bc38477..a08a6f0e4dd1 100644
--- a/drivers/net/wireless/p54/txrx.c
+++ b/drivers/net/wireless/p54/txrx.c
@@ -690,7 +690,7 @@ static void p54_tx_80211_header(struct p54_common *priv, struct sk_buff *skb,
690 if (!(info->flags & IEEE80211_TX_CTL_ASSIGN_SEQ)) 690 if (!(info->flags & IEEE80211_TX_CTL_ASSIGN_SEQ))
691 *flags |= P54_HDR_FLAG_DATA_OUT_SEQNR; 691 *flags |= P54_HDR_FLAG_DATA_OUT_SEQNR;
692 692
693 if (info->flags & IEEE80211_TX_CTL_POLL_RESPONSE) 693 if (info->flags & IEEE80211_TX_CTL_NO_PS_BUFFER)
694 *flags |= P54_HDR_FLAG_DATA_OUT_NOCANCEL; 694 *flags |= P54_HDR_FLAG_DATA_OUT_NOCANCEL;
695 695
696 if (info->flags & IEEE80211_TX_CTL_CLEAR_PS_FILT) 696 if (info->flags & IEEE80211_TX_CTL_CLEAR_PS_FILT)