diff mbox

mac80211: IBSS, clear fast_sta when update rates

Message ID 1431338007.1964.16.camel@sipsolutions.net (mailing list archive)
State Not Applicable
Delegated to: Johannes Berg
Headers show

Commit Message

Johannes Berg May 11, 2015, 9:53 a.m. UTC
On Mon, 2015-05-11 at 11:52 +0200, Johannes Berg wrote:
> On Mon, 2015-05-11 at 11:39 +0200, Janusz Dziedzic wrote:
> > This is required to handle sta.wme correctly
> > after update rates (eg. when using HT/VHT) when
> > driver using IEEE80211_HW_SUPPORT_FAST_XMIT.
> 
> Wouldn't you want to check, so it can be re-assigned?

i.e. something like



johannes

--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Comments

Janusz.Dziedzic@tieto.com May 11, 2015, 11:52 a.m. UTC | #1
On 11 May 2015 at 11:53, Johannes Berg <johannes@sipsolutions.net> wrote:
> On Mon, 2015-05-11 at 11:52 +0200, Johannes Berg wrote:
>> On Mon, 2015-05-11 at 11:39 +0200, Janusz Dziedzic wrote:
>> > This is required to handle sta.wme correctly
>> > after update rates (eg. when using HT/VHT) when
>> > driver using IEEE80211_HW_SUPPORT_FAST_XMIT.
>>
>> Wouldn't you want to check, so it can be re-assigned?
>
> i.e. something like
>
> diff --git a/net/mac80211/ibss.c b/net/mac80211/ibss.c
> index bfef1b215050..7e62183525aa 100644
> --- a/net/mac80211/ibss.c
> +++ b/net/mac80211/ibss.c
> @@ -1031,8 +1031,11 @@ static void ieee80211_update_sta_info(struct ieee80211_sub_if_data *sdata,
>                 }
>         }
>
> -       if (sta && elems->wmm_info && local->hw.queues >= IEEE80211_NUM_ACS)
> +       if (sta && !sta->sta.wme && elems->wmm_info &&
> +           local->hw.queues >= IEEE80211_NUM_ACS) {
>                 sta->sta.wme = true;
> +               ieee80211_check_fast_xmit(sta);
> +       }
>
>         if (sta && elems->ht_operation && elems->ht_cap_elem &&
>             sdata->u.ibss.chandef.width != NL80211_CHAN_WIDTH_20_NOHT &&
>
Your version also works fine.
Should I send new patch or you already have this in your tree?

BR
Janusz
--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Johannes Berg May 11, 2015, 12:01 p.m. UTC | #2
On Mon, 2015-05-11 at 13:52 +0200, Janusz Dziedzic wrote:
> On 11 May 2015 at 11:53, Johannes Berg <johannes@sipsolutions.net> wrote:
> > On Mon, 2015-05-11 at 11:52 +0200, Johannes Berg wrote:
> >> On Mon, 2015-05-11 at 11:39 +0200, Janusz Dziedzic wrote:
> >> > This is required to handle sta.wme correctly
> >> > after update rates (eg. when using HT/VHT) when
> >> > driver using IEEE80211_HW_SUPPORT_FAST_XMIT.
> >>
> >> Wouldn't you want to check, so it can be re-assigned?
> >
> > i.e. something like
> >
> > diff --git a/net/mac80211/ibss.c b/net/mac80211/ibss.c
> > index bfef1b215050..7e62183525aa 100644
> > --- a/net/mac80211/ibss.c
> > +++ b/net/mac80211/ibss.c
> > @@ -1031,8 +1031,11 @@ static void ieee80211_update_sta_info(struct ieee80211_sub_if_data *sdata,
> >                 }
> >         }
> >
> > -       if (sta && elems->wmm_info && local->hw.queues >= IEEE80211_NUM_ACS)
> > +       if (sta && !sta->sta.wme && elems->wmm_info &&
> > +           local->hw.queues >= IEEE80211_NUM_ACS) {
> >                 sta->sta.wme = true;
> > +               ieee80211_check_fast_xmit(sta);
> > +       }
> >
> >         if (sta && elems->ht_operation && elems->ht_cap_elem &&
> >             sdata->u.ibss.chandef.width != NL80211_CHAN_WIDTH_20_NOHT &&
> >
> Your version also works fine.
> Should I send new patch or you already have this in your tree?

I didn't put it in, but can do that.

johannes

--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Janusz.Dziedzic@tieto.com May 12, 2015, 4:56 a.m. UTC | #3
On 11 May 2015 at 14:01, Johannes Berg <johannes@sipsolutions.net> wrote:
> On Mon, 2015-05-11 at 13:52 +0200, Janusz Dziedzic wrote:
>> On 11 May 2015 at 11:53, Johannes Berg <johannes@sipsolutions.net> wrote:
>> > On Mon, 2015-05-11 at 11:52 +0200, Johannes Berg wrote:
>> >> On Mon, 2015-05-11 at 11:39 +0200, Janusz Dziedzic wrote:
>> >> > This is required to handle sta.wme correctly
>> >> > after update rates (eg. when using HT/VHT) when
>> >> > driver using IEEE80211_HW_SUPPORT_FAST_XMIT.
>> >>
>> >> Wouldn't you want to check, so it can be re-assigned?
>> >
>> > i.e. something like
>> >
>> > diff --git a/net/mac80211/ibss.c b/net/mac80211/ibss.c
>> > index bfef1b215050..7e62183525aa 100644
>> > --- a/net/mac80211/ibss.c
>> > +++ b/net/mac80211/ibss.c
>> > @@ -1031,8 +1031,11 @@ static void ieee80211_update_sta_info(struct ieee80211_sub_if_data *sdata,
>> >                 }
>> >         }
>> >
>> > -       if (sta && elems->wmm_info && local->hw.queues >= IEEE80211_NUM_ACS)
>> > +       if (sta && !sta->sta.wme && elems->wmm_info &&
>> > +           local->hw.queues >= IEEE80211_NUM_ACS) {
>> >                 sta->sta.wme = true;
>> > +               ieee80211_check_fast_xmit(sta);
>> > +       }
>> >
>> >         if (sta && elems->ht_operation && elems->ht_cap_elem &&
>> >             sdata->u.ibss.chandef.width != NL80211_CHAN_WIDTH_20_NOHT &&
>> >
>> Your version also works fine.
>> Should I send new patch or you already have this in your tree?
>
> I didn't put it in, but can do that.
>
Yes, please do that.

BR
Janusz
--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/net/mac80211/ibss.c b/net/mac80211/ibss.c
index bfef1b215050..7e62183525aa 100644
--- a/net/mac80211/ibss.c
+++ b/net/mac80211/ibss.c
@@ -1031,8 +1031,11 @@  static void ieee80211_update_sta_info(struct ieee80211_sub_if_data *sdata,
 		}
 	}
 
-	if (sta && elems->wmm_info && local->hw.queues >= IEEE80211_NUM_ACS)
+	if (sta && !sta->sta.wme && elems->wmm_info &&
+	    local->hw.queues >= IEEE80211_NUM_ACS) {
 		sta->sta.wme = true;
+		ieee80211_check_fast_xmit(sta);
+	}
 
 	if (sta && elems->ht_operation && elems->ht_cap_elem &&
 	    sdata->u.ibss.chandef.width != NL80211_CHAN_WIDTH_20_NOHT &&