aboutsummaryrefslogtreecommitdiffstats
path: root/net/mac80211/ibss.c
diff options
context:
space:
mode:
authorBruno Randolf <br1@einfach.org>2010-03-03 04:45:42 -0500
committerJohn W. Linville <linville@tuxdriver.com>2010-03-16 15:05:47 -0400
commit09a08cff3d13315c948e6aee5cf912f8f1db54e7 (patch)
tree6551d06c1fd0680329a395861762a2ce511fd2d8 /net/mac80211/ibss.c
parent819386dfc67e770b4a0b59983f7948f8ddaa357e (diff)
mac80211: (really) fix rates setup on IBSS merge
when an IBSS merge happened, the supported rates for the newly added station were left empty, causing the rate control module to be initialized with only the basic rates. the section of the ibss code which deals with updating supported rates for an already existing station failed to inform the rate control module about the new rates. as both minstrel and pid don't have an update function i just use the init function. also remove unnecessary (unsigned long long) casts and edit debug message. Signed-off-by: Bruno Randolf <br1@einfach.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'net/mac80211/ibss.c')
-rw-r--r--net/mac80211/ibss.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/net/mac80211/ibss.c b/net/mac80211/ibss.c
index f3e942486749..01974c2510a8 100644
--- a/net/mac80211/ibss.c
+++ b/net/mac80211/ibss.c
@@ -264,17 +264,16 @@ static void ieee80211_rx_bss_info(struct ieee80211_sub_if_data *sdata,
264 sta->sta.supp_rates[band] = supp_rates | 264 sta->sta.supp_rates[band] = supp_rates |
265 ieee80211_mandatory_rates(local, band); 265 ieee80211_mandatory_rates(local, band);
266 266
267 if (sta->sta.supp_rates[band] != prev_rates) {
267#ifdef CONFIG_MAC80211_IBSS_DEBUG 268#ifdef CONFIG_MAC80211_IBSS_DEBUG
268 if (sta->sta.supp_rates[band] != prev_rates)
269 printk(KERN_DEBUG "%s: updated supp_rates set " 269 printk(KERN_DEBUG "%s: updated supp_rates set "
270 "for %pM based on beacon info (0x%llx | " 270 "for %pM based on beacon/probe_response "
271 "0x%llx -> 0x%llx)\n", 271 "(0x%x -> 0x%x)\n",
272 sdata->name, 272 sdata->name, sta->sta.addr,
273 sta->sta.addr, 273 prev_rates, sta->sta.supp_rates[band]);
274 (unsigned long long) prev_rates,
275 (unsigned long long) supp_rates,
276 (unsigned long long) sta->sta.supp_rates[band]);
277#endif 274#endif
275 rate_control_rate_init(sta);
276 }
278 rcu_read_unlock(); 277 rcu_read_unlock();
279 } else { 278 } else {
280 rcu_read_unlock(); 279 rcu_read_unlock();
@@ -370,6 +369,7 @@ static void ieee80211_rx_bss_info(struct ieee80211_sub_if_data *sdata,
370 sdata->name, mgmt->bssid); 369 sdata->name, mgmt->bssid);
371#endif 370#endif
372 ieee80211_sta_join_ibss(sdata, bss); 371 ieee80211_sta_join_ibss(sdata, bss);
372 supp_rates = ieee80211_sta_get_rates(local, elems, band);
373 ieee80211_ibss_add_sta(sdata, mgmt->bssid, mgmt->sa, 373 ieee80211_ibss_add_sta(sdata, mgmt->bssid, mgmt->sa,
374 supp_rates, GFP_KERNEL); 374 supp_rates, GFP_KERNEL);
375 } 375 }