@@ -341,6 +341,7 @@ ieee80211_ibss_add_sta(struct ieee80211_sub_if_data *sdata,
341341 struct ieee80211_local * local = sdata -> local ;
342342 struct sta_info * sta ;
343343 struct ieee80211_chanctx_conf * chanctx_conf ;
344+ struct ieee80211_supported_band * sband ;
344345 int band ;
345346
346347 /*
@@ -380,8 +381,9 @@ ieee80211_ibss_add_sta(struct ieee80211_sub_if_data *sdata,
380381 sta -> last_rx = jiffies ;
381382
382383 /* make sure mandatory rates are always added */
384+ sband = local -> hw .wiphy -> bands [band ];
383385 sta -> sta .supp_rates [band ] = supp_rates |
384- ieee80211_mandatory_rates (local , band );
386+ ieee80211_mandatory_rates (sband );
385387
386388 return ieee80211_ibss_finish_sta (sta , auth );
387389}
@@ -492,7 +494,7 @@ static void ieee80211_rx_bss_info(struct ieee80211_sub_if_data *sdata,
492494 prev_rates = sta -> sta .supp_rates [band ];
493495 /* make sure mandatory rates are always added */
494496 sta -> sta .supp_rates [band ] = supp_rates |
495- ieee80211_mandatory_rates (local , band );
497+ ieee80211_mandatory_rates (sband );
496498
497499 if (sta -> sta .supp_rates [band ] != prev_rates ) {
498500 ibss_dbg (sdata ,
@@ -624,6 +626,7 @@ void ieee80211_ibss_rx_no_sta(struct ieee80211_sub_if_data *sdata,
624626 struct ieee80211_local * local = sdata -> local ;
625627 struct sta_info * sta ;
626628 struct ieee80211_chanctx_conf * chanctx_conf ;
629+ struct ieee80211_supported_band * sband ;
627630 int band ;
628631
629632 /*
@@ -658,8 +661,9 @@ void ieee80211_ibss_rx_no_sta(struct ieee80211_sub_if_data *sdata,
658661 sta -> last_rx = jiffies ;
659662
660663 /* make sure mandatory rates are always added */
664+ sband = local -> hw .wiphy -> bands [band ];
661665 sta -> sta .supp_rates [band ] = supp_rates |
662- ieee80211_mandatory_rates (local , band );
666+ ieee80211_mandatory_rates (sband );
663667
664668 spin_lock (& ifibss -> incomplete_lock );
665669 list_add (& sta -> list , & ifibss -> incomplete_stations );
0 commit comments