aboutsummaryrefslogtreecommitdiffstats
path: root/net/mac80211/cfg.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/mac80211/cfg.c')
-rw-r--r--net/mac80211/cfg.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/net/mac80211/cfg.c b/net/mac80211/cfg.c
index 91f56a48e2b4..442a4d7b1808 100644
--- a/net/mac80211/cfg.c
+++ b/net/mac80211/cfg.c
@@ -1046,6 +1046,24 @@ static int ieee80211_change_bss(struct wiphy *wiphy,
1046 changed |= BSS_CHANGED_ERP_SLOT; 1046 changed |= BSS_CHANGED_ERP_SLOT;
1047 } 1047 }
1048 1048
1049 if (params->basic_rates) {
1050 int i, j;
1051 u32 rates = 0;
1052 struct ieee80211_local *local = wiphy_priv(wiphy);
1053 struct ieee80211_supported_band *sband =
1054 wiphy->bands[local->oper_channel->band];
1055
1056 for (i = 0; i < params->basic_rates_len; i++) {
1057 int rate = (params->basic_rates[i] & 0x7f) * 5;
1058 for (j = 0; j < sband->n_bitrates; j++) {
1059 if (sband->bitrates[j].bitrate == rate)
1060 rates |= BIT(j);
1061 }
1062 }
1063 sdata->vif.bss_conf.basic_rates = rates;
1064 changed |= BSS_CHANGED_BASIC_RATES;
1065 }
1066
1049 ieee80211_bss_info_change_notify(sdata, changed); 1067 ieee80211_bss_info_change_notify(sdata, changed);
1050 1068
1051 return 0; 1069 return 0;