Linux wireless drivers development
 help / color / mirror / Atom feed
From: Johannes Berg <johannes@sipsolutions.net>
To: Janusz Dziedzic <janusz.dziedzic@gmail.com>
Cc: linux-wireless@vger.kernel.org
Subject: Re: mac80211: UAPSD - seems MORE_DATA bit is not set in all cases
Date: Fri, 04 Nov 2011 15:57:29 +0100	[thread overview]
Message-ID: <1320418649.3969.93.camel@jlt3.sipsolutions.net> (raw)
In-Reply-To: <CAFED-jmnK5qKG6pMUHC__8CnoJwaBoihV_U5p-JoyAH6VW1rNw@mail.gmail.com> (sfid-20111104_155008_011111_90F925A7)

On Fri, 2011-11-04 at 15:49 +0100, Janusz Dziedzic wrote:
> Hello,
> 
> Seems we don't set MORE_DATA bit correctly in
> ieee80211_sta_ps_deliver_response() fuction.
> In case we have more than one frame in struct sk_buff_head frames we
> don't set MORE_DATA bit.
> 
> Proposed fix:
> diff --git a/net/mac80211/sta_info.c b/net/mac80211/sta_info.c
> index ce962d2..8eaa746 100644
> --- a/net/mac80211/sta_info.c
> +++ b/net/mac80211/sta_info.c
> @@ -1354,12 +1354,12 @@ ieee80211_sta_ps_deliver_response(struct sta_info *sta,
>                          * Use MoreData flag to indicate whether there are
>                          * more buffered frames for this STA
>                          */
> -                       if (!more_data)
> -                               hdr->frame_control &=
> -                                       cpu_to_le16(~IEEE80211_FCTL_MOREDATA);
> -                       else
> +                       if (more_data || !skb_queue_empty(&frames))
>                                 hdr->frame_control |=
>                                         cpu_to_le16(IEEE80211_FCTL_MOREDATA);
> +                       else
> +                               hdr->frame_control &=
> +                                       cpu_to_le16(~IEEE80211_FCTL_MOREDATA);
> 
>                         if (ieee80211_is_data_qos(hdr->frame_control) ||
>                             ieee80211_is_qos_nullfunc(hdr->frame_control))
> 

Yeah that seems reasonable. Please submit a proper patch :-)

johannes


      reply	other threads:[~2011-11-04 14:57 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-11-04 14:49 mac80211: UAPSD - seems MORE_DATA bit is not set in all cases Janusz Dziedzic
2011-11-04 14:57 ` Johannes Berg [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1320418649.3969.93.camel@jlt3.sipsolutions.net \
    --to=johannes@sipsolutions.net \
    --cc=janusz.dziedzic@gmail.com \
    --cc=linux-wireless@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox