aboutsummaryrefslogtreecommitdiffstats
path: root/net/mac80211
diff options
context:
space:
mode:
Diffstat (limited to 'net/mac80211')
-rw-r--r--net/mac80211/ieee80211_i.h1
-rw-r--r--net/mac80211/mlme.c2
-rw-r--r--net/mac80211/scan.c5
-rw-r--r--net/mac80211/util.c6
4 files changed, 7 insertions, 7 deletions
diff --git a/net/mac80211/ieee80211_i.h b/net/mac80211/ieee80211_i.h
index eccd1d805ecc..6ad019d32623 100644
--- a/net/mac80211/ieee80211_i.h
+++ b/net/mac80211/ieee80211_i.h
@@ -1189,7 +1189,6 @@ struct ieee802_11_elems {
1189 u8 tim_len; 1189 u8 tim_len;
1190 u8 challenge_len; 1190 u8 challenge_len;
1191 u8 rsn_len; 1191 u8 rsn_len;
1192 u8 erp_info_len;
1193 u8 ext_supp_rates_len; 1192 u8 ext_supp_rates_len;
1194 u8 wmm_info_len; 1193 u8 wmm_info_len;
1195 u8 wmm_param_len; 1194 u8 wmm_param_len;
diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c
index f76c58fb3bdc..157d951df7a4 100644
--- a/net/mac80211/mlme.c
+++ b/net/mac80211/mlme.c
@@ -3038,7 +3038,7 @@ ieee80211_rx_mgmt_beacon(struct ieee80211_sub_if_data *sdata,
3038 changed |= BSS_CHANGED_DTIM_PERIOD; 3038 changed |= BSS_CHANGED_DTIM_PERIOD;
3039 } 3039 }
3040 3040
3041 if (elems.erp_info && elems.erp_info_len >= 1) { 3041 if (elems.erp_info) {
3042 erp_valid = true; 3042 erp_valid = true;
3043 erp_value = elems.erp_info[0]; 3043 erp_value = elems.erp_info[0];
3044 } else { 3044 } else {
diff --git a/net/mac80211/scan.c b/net/mac80211/scan.c
index 581764f92e13..33fbf1045690 100644
--- a/net/mac80211/scan.c
+++ b/net/mac80211/scan.c
@@ -98,9 +98,8 @@ ieee80211_bss_info_update(struct ieee80211_local *local,
98 } 98 }
99 99
100 /* save the ERP value so that it is available at association time */ 100 /* save the ERP value so that it is available at association time */
101 if (elems->erp_info && elems->erp_info_len >= 1 && 101 if (elems->erp_info && (!elems->parse_error ||
102 (!elems->parse_error || 102 !(bss->valid_data & IEEE80211_BSS_VALID_ERP))) {
103 !(bss->valid_data & IEEE80211_BSS_VALID_ERP))) {
104 bss->erp_value = elems->erp_info[0]; 103 bss->erp_value = elems->erp_info[0];
105 bss->has_erp_value = true; 104 bss->has_erp_value = true;
106 if (!elems->parse_error) 105 if (!elems->parse_error)
diff --git a/net/mac80211/util.c b/net/mac80211/util.c
index 0f7d1c20f8ac..4839dec5c9ac 100644
--- a/net/mac80211/util.c
+++ b/net/mac80211/util.c
@@ -780,8 +780,10 @@ u32 ieee802_11_parse_elems_crc(u8 *start, size_t len,
780 elems->rsn_len = elen; 780 elems->rsn_len = elen;
781 break; 781 break;
782 case WLAN_EID_ERP_INFO: 782 case WLAN_EID_ERP_INFO:
783 elems->erp_info = pos; 783 if (elen >= 1)
784 elems->erp_info_len = elen; 784 elems->erp_info = pos;
785 else
786 elem_parse_failed = true;
785 break; 787 break;
786 case WLAN_EID_EXT_SUPP_RATES: 788 case WLAN_EID_EXT_SUPP_RATES:
787 elems->ext_supp_rates = pos; 789 elems->ext_supp_rates = pos;