diff options
author | Christian Lamparter <chunkeey@googlemail.com> | 2012-02-25 15:36:36 -0500 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2012-02-29 13:08:51 -0500 |
commit | 9926a67557532acb6cddb1c1add02952175b5c72 (patch) | |
tree | 35330f84ef1fd0a3bed21ee8c27b951bc9779b9a | |
parent | 992d52529d7840236d3059b51c15d5eb9e81a869 (diff) |
carl9170: fix frame delivery if sta is in powersave mode
Nicolas Cavallari discovered that carl9170 has some
serious problems delivering data to sleeping stations.
It turns out that the driver was not honoring two
important flags (IEEE80211_TX_CTL_POLL_RESPONSE and
IEEE80211_TX_CTL_CLEAR_PS_FILT) which are set on
frames that should be sent although the receiving
station is still in powersave mode.
Cc: stable <stable@vger.kernel.org>
Reported-by: Nicolas Cavallari <Nicolas.Cavallari@lri.fr>
Signed-off-by: Christian Lamparter <chunkeey@googlemail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
-rw-r--r-- | drivers/net/wireless/ath/carl9170/tx.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/drivers/net/wireless/ath/carl9170/tx.c b/drivers/net/wireless/ath/carl9170/tx.c index 22a793121bd3..bbc813dee983 100644 --- a/drivers/net/wireless/ath/carl9170/tx.c +++ b/drivers/net/wireless/ath/carl9170/tx.c | |||
@@ -1234,6 +1234,7 @@ static bool carl9170_tx_ps_drop(struct ar9170 *ar, struct sk_buff *skb) | |||
1234 | { | 1234 | { |
1235 | struct ieee80211_sta *sta; | 1235 | struct ieee80211_sta *sta; |
1236 | struct carl9170_sta_info *sta_info; | 1236 | struct carl9170_sta_info *sta_info; |
1237 | struct ieee80211_tx_info *tx_info; | ||
1237 | 1238 | ||
1238 | rcu_read_lock(); | 1239 | rcu_read_lock(); |
1239 | sta = __carl9170_get_tx_sta(ar, skb); | 1240 | sta = __carl9170_get_tx_sta(ar, skb); |
@@ -1241,12 +1242,13 @@ static bool carl9170_tx_ps_drop(struct ar9170 *ar, struct sk_buff *skb) | |||
1241 | goto out_rcu; | 1242 | goto out_rcu; |
1242 | 1243 | ||
1243 | sta_info = (void *) sta->drv_priv; | 1244 | sta_info = (void *) sta->drv_priv; |
1244 | if (unlikely(sta_info->sleeping)) { | 1245 | tx_info = IEEE80211_SKB_CB(skb); |
1245 | struct ieee80211_tx_info *tx_info; | ||
1246 | 1246 | ||
1247 | if (unlikely(sta_info->sleeping) && | ||
1248 | !(tx_info->flags & (IEEE80211_TX_CTL_POLL_RESPONSE | | ||
1249 | IEEE80211_TX_CTL_CLEAR_PS_FILT))) { | ||
1247 | rcu_read_unlock(); | 1250 | rcu_read_unlock(); |
1248 | 1251 | ||
1249 | tx_info = IEEE80211_SKB_CB(skb); | ||
1250 | if (tx_info->flags & IEEE80211_TX_CTL_AMPDU) | 1252 | if (tx_info->flags & IEEE80211_TX_CTL_AMPDU) |
1251 | atomic_dec(&ar->tx_ampdu_upload); | 1253 | atomic_dec(&ar->tx_ampdu_upload); |
1252 | 1254 | ||