aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/mwifiex/uap_cmd.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/wireless/mwifiex/uap_cmd.c')
-rw-r--r--drivers/net/wireless/mwifiex/uap_cmd.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/drivers/net/wireless/mwifiex/uap_cmd.c b/drivers/net/wireless/mwifiex/uap_cmd.c
index d95a2d558fcf..8dd72240f162 100644
--- a/drivers/net/wireless/mwifiex/uap_cmd.c
+++ b/drivers/net/wireless/mwifiex/uap_cmd.c
@@ -188,10 +188,19 @@ mwifiex_set_uap_rates(struct mwifiex_uap_bss_param *bss_cfg,
188 int var_offset = offsetof(struct ieee80211_mgmt, u.beacon.variable); 188 int var_offset = offsetof(struct ieee80211_mgmt, u.beacon.variable);
189 const u8 *var_pos = params->beacon.head + var_offset; 189 const u8 *var_pos = params->beacon.head + var_offset;
190 int len = params->beacon.head_len - var_offset; 190 int len = params->beacon.head_len - var_offset;
191 u8 rate_len = 0;
191 192
192 rate_ie = (void *)cfg80211_find_ie(WLAN_EID_SUPP_RATES, var_pos, len); 193 rate_ie = (void *)cfg80211_find_ie(WLAN_EID_SUPP_RATES, var_pos, len);
193 if (rate_ie) 194 if (rate_ie) {
194 memcpy(bss_cfg->rates, rate_ie + 1, rate_ie->len); 195 memcpy(bss_cfg->rates, rate_ie + 1, rate_ie->len);
196 rate_len = rate_ie->len;
197 }
198
199 rate_ie = (void *)cfg80211_find_ie(WLAN_EID_EXT_SUPP_RATES,
200 params->beacon.tail,
201 params->beacon.tail_len);
202 if (rate_ie)
203 memcpy(bss_cfg->rates + rate_len, rate_ie + 1, rate_ie->len);
195 204
196 return; 205 return;
197} 206}