linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* mac80211: UAPSD - EOSP bit seems to be not set when send qos null frame
@ 2011-11-03  7:36 Janusz Dziedzic
  2011-11-03  7:47 ` Johannes Berg
  0 siblings, 1 reply; 6+ messages in thread
From: Janusz Dziedzic @ 2011-11-03  7:36 UTC (permalink / raw)
  To: linux-wireless; +Cc: johannes

Hello,

I have a question connected with UAPSD implementation.
Seems, mac80211 always clear EOSP bit in ieee80211_set_qos_hdr() fuction.
Is that a problem in mac80211 or this should be handled in different place/way?

BR
Janusz

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: mac80211: UAPSD - EOSP bit seems to be not set when send qos null frame
  2011-11-03  7:36 mac80211: UAPSD - EOSP bit seems to be not set when send qos null frame Janusz Dziedzic
@ 2011-11-03  7:47 ` Johannes Berg
  2011-11-03  8:05   ` Janusz Dziedzic
  0 siblings, 1 reply; 6+ messages in thread
From: Johannes Berg @ 2011-11-03  7:47 UTC (permalink / raw)
  To: Janusz Dziedzic; +Cc: linux-wireless

On Thu, 2011-11-03 at 08:36 +0100, Janusz Dziedzic wrote:
> Hello,
> 
> I have a question connected with UAPSD implementation.
> Seems, mac80211 always clear EOSP bit in ieee80211_set_qos_hdr() fuction.
> Is that a problem in mac80211 or this should be handled in different place/way?

It should be set:

        if (qos) {
                nullfunc->qos_ctrl = cpu_to_le16(tid);

                if (reason == IEEE80211_FRAME_RELEASE_UAPSD)
                        nullfunc->qos_ctrl |=
                                cpu_to_le16(IEEE80211_QOS_CTL_EOSP);
        }

johannes


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: mac80211: UAPSD - EOSP bit seems to be not set when send qos null frame
  2011-11-03  7:47 ` Johannes Berg
@ 2011-11-03  8:05   ` Janusz Dziedzic
  2011-11-03  8:08     ` Johannes Berg
  0 siblings, 1 reply; 6+ messages in thread
From: Janusz Dziedzic @ 2011-11-03  8:05 UTC (permalink / raw)
  To: Johannes Berg; +Cc: linux-wireless

2011/11/3 Johannes Berg <johannes@sipsolutions.net>:
> On Thu, 2011-11-03 at 08:36 +0100, Janusz Dziedzic wrote:
>> Hello,
>>
>> I have a question connected with UAPSD implementation.
>> Seems, mac80211 always clear EOSP bit in ieee80211_set_qos_hdr() fuction.
>> Is that a problem in mac80211 or this should be handled in different place/way?
>
> It should be set:
>
>        if (qos) {
>                nullfunc->qos_ctrl = cpu_to_le16(tid);
>
>                if (reason == IEEE80211_FRAME_RELEASE_UAPSD)
>                        nullfunc->qos_ctrl |=
>                                cpu_to_le16(IEEE80211_QOS_CTL_EOSP);
>        }
>

Yes, I see this is set correctly before we call ieee80211_set_qos_hdr().
Next ieee80211_set_qos_hdr() fuction seems not care about EOSP bit and
we have this bit cleared before ieee80211_tx() call.


BR
Janusz

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: mac80211: UAPSD - EOSP bit seems to be not set when send qos null frame
  2011-11-03  8:05   ` Janusz Dziedzic
@ 2011-11-03  8:08     ` Johannes Berg
  2011-11-03  8:15       ` Johannes Berg
  0 siblings, 1 reply; 6+ messages in thread
From: Johannes Berg @ 2011-11-03  8:08 UTC (permalink / raw)
  To: Janusz Dziedzic; +Cc: linux-wireless

On Thu, 2011-11-03 at 09:05 +0100, Janusz Dziedzic wrote:
> 2011/11/3 Johannes Berg <johannes@sipsolutions.net>:
> > On Thu, 2011-11-03 at 08:36 +0100, Janusz Dziedzic wrote:
> >> Hello,
> >>
> >> I have a question connected with UAPSD implementation.
> >> Seems, mac80211 always clear EOSP bit in ieee80211_set_qos_hdr() fuction.
> >> Is that a problem in mac80211 or this should be handled in different place/way?
> >
> > It should be set:
> >
> >        if (qos) {
> >                nullfunc->qos_ctrl = cpu_to_le16(tid);
> >
> >                if (reason == IEEE80211_FRAME_RELEASE_UAPSD)
> >                        nullfunc->qos_ctrl |=
> >                                cpu_to_le16(IEEE80211_QOS_CTL_EOSP);
> >        }
> >
> 
> Yes, I see this is set correctly before we call ieee80211_set_qos_hdr().
> Next ieee80211_set_qos_hdr() fuction seems not care about EOSP bit and
> we have this bit cleared before ieee80211_tx() call.

Oh, WTH. Somebody had posted a patch that fixed that, I thought that
went in but in my testing this didn't show up since my device always
sets/clears it according to what I told it.

johannes


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: mac80211: UAPSD - EOSP bit seems to be not set when send qos null frame
  2011-11-03  8:08     ` Johannes Berg
@ 2011-11-03  8:15       ` Johannes Berg
  2011-11-03  8:49         ` Janusz Dziedzic
  0 siblings, 1 reply; 6+ messages in thread
From: Johannes Berg @ 2011-11-03  8:15 UTC (permalink / raw)
  To: Janusz Dziedzic; +Cc: linux-wireless

On Thu, 2011-11-03 at 09:08 +0100, Johannes Berg wrote:

> > Yes, I see this is set correctly before we call ieee80211_set_qos_hdr().
> > Next ieee80211_set_qos_hdr() fuction seems not care about EOSP bit and
> > we have this bit cleared before ieee80211_tx() call.
> 
> Oh, WTH. Somebody had posted a patch that fixed that, I thought that
> went in but in my testing this didn't show up since my device always
> sets/clears it according to what I told it.

Try this please.

johannes

--- wireless-testing.orig/net/mac80211/wme.c	2011-11-02 11:05:29.000000000 +0100
+++ wireless-testing/net/mac80211/wme.c	2011-11-03 09:14:30.000000000 +0100
@@ -143,10 +143,13 @@ void ieee80211_set_qos_hdr(struct ieee80
 	/* Fill in the QoS header if there is one. */
 	if (ieee80211_is_data_qos(hdr->frame_control)) {
 		u8 *p = ieee80211_get_qos_ctl(hdr);
-		u8 ack_policy = 0, tid;
+		u8 ack_policy, tid;
 
 		tid = skb->priority & IEEE80211_QOS_CTL_TAG1D_MASK;
 
+		/* preserve EOSP bit */
+		ack_policy = *p & IEEE80211_QOS_CTL_EOSP;
+
 		if (unlikely(sdata->local->wifi_wme_noack_test))
 			ack_policy |= IEEE80211_QOS_CTL_ACK_POLICY_NOACK;
 		/* qos header is 2 bytes */



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: mac80211: UAPSD - EOSP bit seems to be not set when send qos null frame
  2011-11-03  8:15       ` Johannes Berg
@ 2011-11-03  8:49         ` Janusz Dziedzic
  0 siblings, 0 replies; 6+ messages in thread
From: Janusz Dziedzic @ 2011-11-03  8:49 UTC (permalink / raw)
  To: Johannes Berg; +Cc: linux-wireless

2011/11/3 Johannes Berg <johannes@sipsolutions.net>:
> On Thu, 2011-11-03 at 09:08 +0100, Johannes Berg wrote:
>
>> > Yes, I see this is set correctly before we call ieee80211_set_qos_hdr().
>> > Next ieee80211_set_qos_hdr() fuction seems not care about EOSP bit and
>> > we have this bit cleared before ieee80211_tx() call.
>>
>> Oh, WTH. Somebody had posted a patch that fixed that, I thought that
>> went in but in my testing this didn't show up since my device always
>> sets/clears it according to what I told it.
>
> Try this please.
>
> johannes
>
> --- wireless-testing.orig/net/mac80211/wme.c    2011-11-02 11:05:29.000000000 +0100
> +++ wireless-testing/net/mac80211/wme.c 2011-11-03 09:14:30.000000000 +0100
> @@ -143,10 +143,13 @@ void ieee80211_set_qos_hdr(struct ieee80
>        /* Fill in the QoS header if there is one. */
>        if (ieee80211_is_data_qos(hdr->frame_control)) {
>                u8 *p = ieee80211_get_qos_ctl(hdr);
> -               u8 ack_policy = 0, tid;
> +               u8 ack_policy, tid;
>
>                tid = skb->priority & IEEE80211_QOS_CTL_TAG1D_MASK;
>
> +               /* preserve EOSP bit */
> +               ack_policy = *p & IEEE80211_QOS_CTL_EOSP;
> +
>                if (unlikely(sdata->local->wifi_wme_noack_test))
>                        ack_policy |= IEEE80211_QOS_CTL_ACK_POLICY_NOACK;
>                /* qos header is 2 bytes */
>
>
>

Verified. Now works correctly.
Thanks.

BR
Janusz

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2011-11-03  8:49 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-11-03  7:36 mac80211: UAPSD - EOSP bit seems to be not set when send qos null frame Janusz Dziedzic
2011-11-03  7:47 ` Johannes Berg
2011-11-03  8:05   ` Janusz Dziedzic
2011-11-03  8:08     ` Johannes Berg
2011-11-03  8:15       ` Johannes Berg
2011-11-03  8:49         ` Janusz Dziedzic

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).