Commit 97d97b80 authored by Vivek Natarajan's avatar Vivek Natarajan Committed by John W. Linville

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: default avatarVivek Natarajan <vnatarajan@atheros.com>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent dec59d6f
...@@ -35,6 +35,7 @@ ...@@ -35,6 +35,7 @@
#define IEEE80211_TX_OK 0 #define IEEE80211_TX_OK 0
#define IEEE80211_TX_AGAIN 1 #define IEEE80211_TX_AGAIN 1
#define IEEE80211_TX_FRAG_AGAIN 2 #define IEEE80211_TX_FRAG_AGAIN 2
#define IEEE80211_TX_PENDING 3
/* misc utils */ /* misc utils */
...@@ -1085,7 +1086,7 @@ static int __ieee80211_tx(struct ieee80211_local *local, struct sk_buff *skb, ...@@ -1085,7 +1086,7 @@ static int __ieee80211_tx(struct ieee80211_local *local, struct sk_buff *skb,
if (skb) { if (skb) {
if (netif_subqueue_stopped(local->mdev, skb)) if (netif_subqueue_stopped(local->mdev, skb))
return IEEE80211_TX_AGAIN; return IEEE80211_TX_PENDING;
ret = local->ops->tx(local_to_hw(local), skb); ret = local->ops->tx(local_to_hw(local), skb);
if (ret) if (ret)
...@@ -1211,8 +1212,9 @@ static int ieee80211_tx(struct net_device *dev, struct sk_buff *skb) ...@@ -1211,8 +1212,9 @@ static int ieee80211_tx(struct net_device *dev, struct sk_buff *skb)
* queues, there's no reason for a driver to reject * queues, there's no reason for a driver to reject
* a frame there, warn and drop it. * a frame there, warn and drop it.
*/ */
if (WARN_ON(info->flags & IEEE80211_TX_CTL_AMPDU)) if (ret != IEEE80211_TX_PENDING)
goto drop; if (WARN_ON(info->flags & IEEE80211_TX_CTL_AMPDU))
goto drop;
store = &local->pending_packet[queue]; store = &local->pending_packet[queue];
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment