* [PATCH] mac80211: Fix the wrong WARN_ON message appearing on enabling power save.
@ 2009-02-05 14:35 Vivek Natarajan
0 siblings, 0 replies; 5+ messages in thread
From: Vivek Natarajan @ 2009-02-05 14:35 UTC (permalink / raw)
To: linville; +Cc: linux-wireless
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>
---
net/mac80211/tx.c | 8 +++++---
1 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/net/mac80211/tx.c b/net/mac80211/tx.c
index f1c726d..bf73f6d 100644
--- a/net/mac80211/tx.c
+++ b/net/mac80211/tx.c
@@ -35,6 +35,7 @@
#define IEEE80211_TX_OK 0
#define IEEE80211_TX_AGAIN 1
#define IEEE80211_TX_FRAG_AGAIN 2
+#define IEEE80211_TX_PENDING 3
/* misc utils */
@@ -1085,7 +1086,7 @@ static int __ieee80211_tx(struct ieee80211_local *local, struct sk_buff *skb,
if (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);
if (ret)
@@ -1211,8 +1212,9 @@ retry:
* queues, there's no reason for a driver to reject
* a frame there, warn and drop it.
*/
- if (WARN_ON(info->flags & IEEE80211_TX_CTL_AMPDU))
- goto drop;
+ if (ret != IEEE80211_TX_PENDING)
+ if (WARN_ON(info->flags & IEEE80211_TX_CTL_AMPDU))
+ goto drop;
store = &local->pending_packet[queue];
--
1.6.0.1
^ permalink raw reply related [flat|nested] 5+ messages in thread* [PATCH] mac80211: Fix the wrong WARN_ON message appearing on enabling power save.
@ 2009-02-05 11:06 Vivek Natarajan
2009-02-05 12:07 ` Johannes Berg
0 siblings, 1 reply; 5+ messages in thread
From: Vivek Natarajan @ 2009-02-05 11:06 UTC (permalink / raw)
To: linville; +Cc: linux-wireless
The warning message intended to be hit on driver's rejection of a Tx frame
is also hit while the netif_subqueue is stopped. This patch fixes this error
case.
Signed-off-by: Vivek Natarajan <vnatarajan@atheros.com>
---
net/mac80211/tx.c | 8 +++++---
1 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/net/mac80211/tx.c b/net/mac80211/tx.c
index f1c726d..bf73f6d 100644
--- a/net/mac80211/tx.c
+++ b/net/mac80211/tx.c
@@ -35,6 +35,7 @@
#define IEEE80211_TX_OK 0
#define IEEE80211_TX_AGAIN 1
#define IEEE80211_TX_FRAG_AGAIN 2
+#define IEEE80211_TX_PENDING 3
/* misc utils */
@@ -1085,7 +1086,7 @@ static int __ieee80211_tx(struct ieee80211_local *local, struct sk_buff *skb,
if (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);
if (ret)
@@ -1211,8 +1212,9 @@ retry:
* queues, there's no reason for a driver to reject
* a frame there, warn and drop it.
*/
- if (WARN_ON(info->flags & IEEE80211_TX_CTL_AMPDU))
- goto drop;
+ if (ret != IEEE80211_TX_PENDING)
+ if (WARN_ON(info->flags & IEEE80211_TX_CTL_AMPDU))
+ goto drop;
store = &local->pending_packet[queue];
--
1.6.0.1
^ permalink raw reply related [flat|nested] 5+ messages in thread* Re: [PATCH] mac80211: Fix the wrong WARN_ON message appearing on enabling power save.
2009-02-05 11:06 Vivek Natarajan
@ 2009-02-05 12:07 ` Johannes Berg
2009-02-05 12:26 ` Vivek Natarajan
0 siblings, 1 reply; 5+ messages in thread
From: Johannes Berg @ 2009-02-05 12:07 UTC (permalink / raw)
To: Vivek Natarajan; +Cc: linville, linux-wireless
[-- Attachment #1: Type: text/plain, Size: 1509 bytes --]
On Thu, 2009-02-05 at 16:36 +0530, Vivek Natarajan wrote:
> The warning message intended to be hit on driver's rejection of a Tx frame
> is also hit while the netif_subqueue is stopped. This patch fixes this error
> case.
This seems a little odd. Why would we be in that code if the queue is
stopped?
> Signed-off-by: Vivek Natarajan <vnatarajan@atheros.com>
> ---
> net/mac80211/tx.c | 8 +++++---
> 1 files changed, 5 insertions(+), 3 deletions(-)
>
> diff --git a/net/mac80211/tx.c b/net/mac80211/tx.c
> index f1c726d..bf73f6d 100644
> --- a/net/mac80211/tx.c
> +++ b/net/mac80211/tx.c
> @@ -35,6 +35,7 @@
> #define IEEE80211_TX_OK 0
> #define IEEE80211_TX_AGAIN 1
> #define IEEE80211_TX_FRAG_AGAIN 2
> +#define IEEE80211_TX_PENDING 3
>
> /* misc utils */
>
> @@ -1085,7 +1086,7 @@ static int __ieee80211_tx(struct ieee80211_local *local, struct sk_buff *skb,
>
> if (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);
> if (ret)
> @@ -1211,8 +1212,9 @@ retry:
> * queues, there's no reason for a driver to reject
> * a frame there, warn and drop it.
> */
> - if (WARN_ON(info->flags & IEEE80211_TX_CTL_AMPDU))
> - goto drop;
> + if (ret != IEEE80211_TX_PENDING)
> + if (WARN_ON(info->flags & IEEE80211_TX_CTL_AMPDU))
> + goto drop;
>
> store = &local->pending_packet[queue];
>
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread* Re: [PATCH] mac80211: Fix the wrong WARN_ON message appearing on enabling power save.
2009-02-05 12:07 ` Johannes Berg
@ 2009-02-05 12:26 ` Vivek Natarajan
2009-02-05 13:35 ` Johannes Berg
0 siblings, 1 reply; 5+ messages in thread
From: Vivek Natarajan @ 2009-02-05 12:26 UTC (permalink / raw)
To: Johannes Berg; +Cc: linville, linux-wireless
On Thu, Feb 5, 2009 at 5:37 PM, Johannes Berg <johannes@sipsolutions.net> wrote:
> On Thu, 2009-02-05 at 16:36 +0530, Vivek Natarajan wrote:
>> The warning message intended to be hit on driver's rejection of a Tx frame
>> is also hit while the netif_subqueue is stopped. This patch fixes this error
>> case.
>
> This seems a little odd. Why would we be in that code if the queue is
> stopped?
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 returned
TX_AGAIN to ieee8011_tx which led to the warning message.
Vivek.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] mac80211: Fix the wrong WARN_ON message appearing on enabling power save.
2009-02-05 12:26 ` Vivek Natarajan
@ 2009-02-05 13:35 ` Johannes Berg
0 siblings, 0 replies; 5+ messages in thread
From: Johannes Berg @ 2009-02-05 13:35 UTC (permalink / raw)
To: Vivek Natarajan; +Cc: linville, linux-wireless
[-- Attachment #1: Type: text/plain, Size: 951 bytes --]
On Thu, 2009-02-05 at 17:56 +0530, Vivek Natarajan wrote:
> On Thu, Feb 5, 2009 at 5:37 PM, Johannes Berg <johannes@sipsolutions.net> wrote:
> > On Thu, 2009-02-05 at 16:36 +0530, Vivek Natarajan wrote:
> >> The warning message intended to be hit on driver's rejection of a Tx frame
> >> is also hit while the netif_subqueue is stopped. This patch fixes this error
> >> case.
> >
> > This seems a little odd. Why would we be in that code if the queue is
> > stopped?
>
> 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 returned
> TX_AGAIN to ieee8011_tx which led to the warning message.
Ah, ok, thanks for the explanation. Might make sense to put that into
the commit message.
johannes
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2009-02-05 14:46 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-02-05 14:35 [PATCH] mac80211: Fix the wrong WARN_ON message appearing on enabling power save Vivek Natarajan
-- strict thread matches above, loose matches on Subject: below --
2009-02-05 11:06 Vivek Natarajan
2009-02-05 12:07 ` Johannes Berg
2009-02-05 12:26 ` Vivek Natarajan
2009-02-05 13:35 ` Johannes Berg
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox