mac80211: fix off-by-one regression in ibss beacon generation
authorSimon Wunderlich <simon.wunderlich@s2003.tu-chemnitz.de>
Thu, 11 Jul 2013 18:29:49 +0000 (20:29 +0200)
committerJohannes Berg <johannes.berg@intel.com>
Tue, 16 Jul 2013 06:58:13 +0000 (09:58 +0300)
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>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
net/mac80211/ibss.c

index 83197c3ae5f1a9bb344251c58d6faf471f0ddf18..5e6836c3aa4c108a6e1c6fe2430a95d0ec5faba0 100644 (file)
@@ -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) {
This page took 0.035401 seconds and 5 git commands to generate.