aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVivek Natarajan <vivek.natraj@gmail.com>2009-02-05 09:35:15 -0500
committerJohn W. Linville <linville@tuxdriver.com>2009-02-13 13:44:38 -0500
commit97d97b80984d0207e5c125c1b7b9467aad365d8d (patch)
treeca63c74261cb07382c914023f9d913cbefa65b41
parentdec59d6faffb44e741d9c19ffdf368d69a968a54 (diff)
mac80211: Fix the wrong WARN_ON message appearing on enabling power save.
This issue happens only when we are associated with a 11n AP and power save is enabled. In the function 'ieee80211_master_start_xmit', ps_disable_work is queued where wake_queues is called. But before this work is executed, we check if the queues are stopped in _ieee80211_tx and return TX_AGAIN to ieee8011_tx which leads to the warning message. This patch fixes this erroneous case. Signed-off-by: Vivek Natarajan <vnatarajan@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
-rw-r--r--net/mac80211/tx.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/net/mac80211/tx.c b/net/mac80211/tx.c
index f1c726d94f47..bf73f6d561b7 100644
--- a/net/mac80211/tx.c
+++ b/net/mac80211/tx.c
@@ -35,6 +35,7 @@
35#define IEEE80211_TX_OK 0 35#define IEEE80211_TX_OK 0
36#define IEEE80211_TX_AGAIN 1 36#define IEEE80211_TX_AGAIN 1
37#define IEEE80211_TX_FRAG_AGAIN 2 37#define IEEE80211_TX_FRAG_AGAIN 2
38#define IEEE80211_TX_PENDING 3
38 39
39/* misc utils */ 40/* misc utils */
40 41
@@ -1085,7 +1086,7 @@ static int __ieee80211_tx(struct ieee80211_local *local, struct sk_buff *skb,
1085 1086
1086 if (skb) { 1087 if (skb) {
1087 if (netif_subqueue_stopped(local->mdev, skb)) 1088 if (netif_subqueue_stopped(local->mdev, skb))
1088 return IEEE80211_TX_AGAIN; 1089 return IEEE80211_TX_PENDING;
1089 1090
1090 ret = local->ops->tx(local_to_hw(local), skb); 1091 ret = local->ops->tx(local_to_hw(local), skb);
1091 if (ret) 1092 if (ret)
@@ -1211,8 +1212,9 @@ retry:
1211 * queues, there's no reason for a driver to reject 1212 * queues, there's no reason for a driver to reject
1212 * a frame there, warn and drop it. 1213 * a frame there, warn and drop it.
1213 */ 1214 */
1214 if (WARN_ON(info->flags & IEEE80211_TX_CTL_AMPDU)) 1215 if (ret != IEEE80211_TX_PENDING)
1215 goto drop; 1216 if (WARN_ON(info->flags & IEEE80211_TX_CTL_AMPDU))
1217 goto drop;
1216 1218
1217 store = &local->pending_packet[queue]; 1219 store = &local->pending_packet[queue];
1218 1220