diff options
Diffstat (limited to 'net/mac80211/cfg.c')
-rw-r--r-- | net/mac80211/cfg.c | 45 |
1 files changed, 22 insertions, 23 deletions
diff --git a/net/mac80211/cfg.c b/net/mac80211/cfg.c index c8d969be440b..f453bb7c564b 100644 --- a/net/mac80211/cfg.c +++ b/net/mac80211/cfg.c | |||
@@ -1180,45 +1180,45 @@ static int set_mgmt_extra_ie_sta(struct ieee80211_sub_if_data *sdata, | |||
1180 | u8 subtype, u8 *ies, size_t ies_len) | 1180 | u8 subtype, u8 *ies, size_t ies_len) |
1181 | { | 1181 | { |
1182 | struct ieee80211_local *local = sdata->local; | 1182 | struct ieee80211_local *local = sdata->local; |
1183 | struct ieee80211_if_sta *ifsta = &sdata->u.sta; | 1183 | struct ieee80211_if_managed *ifmgd = &sdata->u.mgd; |
1184 | 1184 | ||
1185 | switch (subtype) { | 1185 | switch (subtype) { |
1186 | case IEEE80211_STYPE_PROBE_REQ >> 4: | 1186 | case IEEE80211_STYPE_PROBE_REQ >> 4: |
1187 | if (local->ops->hw_scan) | 1187 | if (local->ops->hw_scan) |
1188 | break; | 1188 | break; |
1189 | kfree(ifsta->ie_probereq); | 1189 | kfree(ifmgd->ie_probereq); |
1190 | ifsta->ie_probereq = ies; | 1190 | ifmgd->ie_probereq = ies; |
1191 | ifsta->ie_probereq_len = ies_len; | 1191 | ifmgd->ie_probereq_len = ies_len; |
1192 | return 0; | 1192 | return 0; |
1193 | case IEEE80211_STYPE_PROBE_RESP >> 4: | 1193 | case IEEE80211_STYPE_PROBE_RESP >> 4: |
1194 | kfree(ifsta->ie_proberesp); | 1194 | kfree(ifmgd->ie_proberesp); |
1195 | ifsta->ie_proberesp = ies; | 1195 | ifmgd->ie_proberesp = ies; |
1196 | ifsta->ie_proberesp_len = ies_len; | 1196 | ifmgd->ie_proberesp_len = ies_len; |
1197 | return 0; | 1197 | return 0; |
1198 | case IEEE80211_STYPE_AUTH >> 4: | 1198 | case IEEE80211_STYPE_AUTH >> 4: |
1199 | kfree(ifsta->ie_auth); | 1199 | kfree(ifmgd->ie_auth); |
1200 | ifsta->ie_auth = ies; | 1200 | ifmgd->ie_auth = ies; |
1201 | ifsta->ie_auth_len = ies_len; | 1201 | ifmgd->ie_auth_len = ies_len; |
1202 | return 0; | 1202 | return 0; |
1203 | case IEEE80211_STYPE_ASSOC_REQ >> 4: | 1203 | case IEEE80211_STYPE_ASSOC_REQ >> 4: |
1204 | kfree(ifsta->ie_assocreq); | 1204 | kfree(ifmgd->ie_assocreq); |
1205 | ifsta->ie_assocreq = ies; | 1205 | ifmgd->ie_assocreq = ies; |
1206 | ifsta->ie_assocreq_len = ies_len; | 1206 | ifmgd->ie_assocreq_len = ies_len; |
1207 | return 0; | 1207 | return 0; |
1208 | case IEEE80211_STYPE_REASSOC_REQ >> 4: | 1208 | case IEEE80211_STYPE_REASSOC_REQ >> 4: |
1209 | kfree(ifsta->ie_reassocreq); | 1209 | kfree(ifmgd->ie_reassocreq); |
1210 | ifsta->ie_reassocreq = ies; | 1210 | ifmgd->ie_reassocreq = ies; |
1211 | ifsta->ie_reassocreq_len = ies_len; | 1211 | ifmgd->ie_reassocreq_len = ies_len; |
1212 | return 0; | 1212 | return 0; |
1213 | case IEEE80211_STYPE_DEAUTH >> 4: | 1213 | case IEEE80211_STYPE_DEAUTH >> 4: |
1214 | kfree(ifsta->ie_deauth); | 1214 | kfree(ifmgd->ie_deauth); |
1215 | ifsta->ie_deauth = ies; | 1215 | ifmgd->ie_deauth = ies; |
1216 | ifsta->ie_deauth_len = ies_len; | 1216 | ifmgd->ie_deauth_len = ies_len; |
1217 | return 0; | 1217 | return 0; |
1218 | case IEEE80211_STYPE_DISASSOC >> 4: | 1218 | case IEEE80211_STYPE_DISASSOC >> 4: |
1219 | kfree(ifsta->ie_disassoc); | 1219 | kfree(ifmgd->ie_disassoc); |
1220 | ifsta->ie_disassoc = ies; | 1220 | ifmgd->ie_disassoc = ies; |
1221 | ifsta->ie_disassoc_len = ies_len; | 1221 | ifmgd->ie_disassoc_len = ies_len; |
1222 | return 0; | 1222 | return 0; |
1223 | } | 1223 | } |
1224 | 1224 | ||
@@ -1248,7 +1248,6 @@ static int ieee80211_set_mgmt_extra_ie(struct wiphy *wiphy, | |||
1248 | 1248 | ||
1249 | switch (sdata->vif.type) { | 1249 | switch (sdata->vif.type) { |
1250 | case NL80211_IFTYPE_STATION: | 1250 | case NL80211_IFTYPE_STATION: |
1251 | case NL80211_IFTYPE_ADHOC: | ||
1252 | ret = set_mgmt_extra_ie_sta(sdata, params->subtype, | 1251 | ret = set_mgmt_extra_ie_sta(sdata, params->subtype, |
1253 | ies, ies_len); | 1252 | ies, ies_len); |
1254 | break; | 1253 | break; |