All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] mac80211: fix off-by-one regression in ibss beacon generation
@ 2013-07-11 18:29 Simon Wunderlich
  2013-07-12 11:59 ` Johannes Berg
  0 siblings, 1 reply; 2+ messages in thread
From: Simon Wunderlich @ 2013-07-11 18:29 UTC (permalink / raw)
  To: Johannes Berg; +Cc: linux-wireless, Simon Wunderlich

There is an off-by-one error in the beacon generation for the ibss mode,
falsely a rate the extended supported rates which was already added to
supported rates, messing up the beacon. This was introduced by commit
"mac80211: select and adjust bitrates according to channel mode".

Signed-off-by: Simon Wunderlich <siwu@hrz.tu-chemnitz.de>
---
I obviously missed that, sorry. :( This was not visible in 5/10 MHz as
CCK rates are missing in this mode. You might want to squash this one
...
---
 net/mac80211/ibss.c |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/net/mac80211/ibss.c b/net/mac80211/ibss.c
index 83197c3..5e6836c 100644
--- a/net/mac80211/ibss.c
+++ b/net/mac80211/ibss.c
@@ -168,8 +168,10 @@ static void __ieee80211_sta_join_ibss(struct ieee80211_sub_if_data *sdata,
 		if (basic_rates & BIT(ri))
 			basic = 0x80;
 		*pos++ = basic | (u8) rate;
-		if (++rates_added == 8)
+		if (++rates_added == 8) {
+			ri++; /* continue at next rate for EXT_SUPP_RATES */
 			break;
+		}
 	}
 
 	if (sband->band == IEEE80211_BAND_2GHZ) {
-- 
1.7.10.4


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

* Re: [PATCH] mac80211: fix off-by-one regression in ibss beacon generation
  2013-07-11 18:29 [PATCH] mac80211: fix off-by-one regression in ibss beacon generation Simon Wunderlich
@ 2013-07-12 11:59 ` Johannes Berg
  0 siblings, 0 replies; 2+ messages in thread
From: Johannes Berg @ 2013-07-12 11:59 UTC (permalink / raw)
  To: Simon Wunderlich; +Cc: linux-wireless, Simon Wunderlich

On Thu, 2013-07-11 at 20:29 +0200, Simon Wunderlich wrote:
> There is an off-by-one error in the beacon generation for the ibss mode,
> falsely a rate the extended supported rates which was already added to
> supported rates, messing up the beacon. This was introduced by commit
> "mac80211: select and adjust bitrates according to channel mode".

Applied.

johannes


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

end of thread, other threads:[~2013-07-12 11:59 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-07-11 18:29 [PATCH] mac80211: fix off-by-one regression in ibss beacon generation Simon Wunderlich
2013-07-12 11:59 ` Johannes Berg

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.