2013-09-05 19:14:52

by Chun-Yeow Yeoh

[permalink] [raw]
Subject: [PATCH v2] mac80211: fix the setting of extended supported rate IE

The patch "mac80211: select and adjust bitrates according to
channel mode" causes regression and breaks the extended supported rate
IE setting. Since "i" is starting with 8, so this is not necessary
to introduce "skip" here.

Signed-off-by: Chun-Yeow Yeoh <[email protected]>
Signed-off-by: Colleen Twitty <[email protected]>
Reviewed-by: Jason Abele <[email protected]>
---
v2: remove skip (Jason)

net/mac80211/util.c | 3 ---
1 file changed, 3 deletions(-)

diff --git a/net/mac80211/util.c b/net/mac80211/util.c
index 3c8283b..4bb639f 100644
--- a/net/mac80211/util.c
+++ b/net/mac80211/util.c
@@ -2128,14 +2128,11 @@ int ieee80211_add_ext_srates_ie(struct ieee80211_sub_if_data *sdata,
pos = skb_put(skb, exrates + 2);
*pos++ = WLAN_EID_EXT_SUPP_RATES;
*pos++ = exrates;
- skip = 0;
for (i = 8; i < sband->n_bitrates; i++) {
u8 basic = 0;
if ((rate_flags & sband->bitrates[i].flags)
!= rate_flags)
continue;
- if (skip++ < 8)
- continue;
if (need_basic && basic_rates & BIT(i))
basic = 0x80;
rate = DIV_ROUND_UP(sband->bitrates[i].bitrate,
--
1.7.9.5



2013-09-08 06:20:46

by Thomas Pedersen

[permalink] [raw]
Subject: Re: [PATCH v2] mac80211: fix the setting of extended supported rate IE

On Thu, Sep 5, 2013 at 12:14 PM, Chun-Yeow Yeoh
<[email protected]> wrote:
> The patch "mac80211: select and adjust bitrates according to
> channel mode" causes regression and breaks the extended supported rate
> IE setting. Since "i" is starting with 8, so this is not necessary
> to introduce "skip" here.
>
> Signed-off-by: Chun-Yeow Yeoh <[email protected]>
> Signed-off-by: Colleen Twitty <[email protected]>
> Reviewed-by: Jason Abele <[email protected]>
> ---
> v2: remove skip (Jason)
>
> net/mac80211/util.c | 3 ---
> 1 file changed, 3 deletions(-)
>
> diff --git a/net/mac80211/util.c b/net/mac80211/util.c
> index 3c8283b..4bb639f 100644
> --- a/net/mac80211/util.c
> +++ b/net/mac80211/util.c
> @@ -2128,14 +2128,11 @@ int ieee80211_add_ext_srates_ie(struct ieee80211_sub_if_data *sdata,
> pos = skb_put(skb, exrates + 2);
> *pos++ = WLAN_EID_EXT_SUPP_RATES;
> *pos++ = exrates;
> - skip = 0;

You could also remove the declaration then?

--
Thomas