aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorJohannes Berg <johannes.berg@intel.com>2013-03-27 09:27:01 -0400
committerJohannes Berg <johannes.berg@intel.com>2013-04-08 03:16:56 -0400
commita6dfba841c4d38312115dc6b08d86cc496af7e88 (patch)
tree6cd9c71239dcd47e949fee0bddae1287ab9da488 /net
parentc5d54fbf0ebdfa9e2a6264781548ab81e0eed688 (diff)
mac80211: remove unused IE pointers from parser
There's no need to parse IEs that aren't used so just remove them. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net')
-rw-r--r--net/mac80211/ieee80211_i.h9
-rw-r--r--net/mac80211/util.c19
2 files changed, 0 insertions, 28 deletions
diff --git a/net/mac80211/ieee80211_i.h b/net/mac80211/ieee80211_i.h
index f9782f0f4348..bb4bfe43bf40 100644
--- a/net/mac80211/ieee80211_i.h
+++ b/net/mac80211/ieee80211_i.h
@@ -1157,11 +1157,8 @@ struct ieee802_11_elems {
1157 /* pointers to IEs */ 1157 /* pointers to IEs */
1158 const u8 *ssid; 1158 const u8 *ssid;
1159 const u8 *supp_rates; 1159 const u8 *supp_rates;
1160 const u8 *fh_params;
1161 const u8 *ds_params; 1160 const u8 *ds_params;
1162 const u8 *cf_params;
1163 const struct ieee80211_tim_ie *tim; 1161 const struct ieee80211_tim_ie *tim;
1164 const u8 *ibss_params;
1165 const u8 *challenge; 1162 const u8 *challenge;
1166 const u8 *rsn; 1163 const u8 *rsn;
1167 const u8 *erp_info; 1164 const u8 *erp_info;
@@ -1183,18 +1180,14 @@ struct ieee802_11_elems {
1183 const struct ieee80211_channel_sw_ie *ch_switch_ie; 1180 const struct ieee80211_channel_sw_ie *ch_switch_ie;
1184 const u8 *country_elem; 1181 const u8 *country_elem;
1185 const u8 *pwr_constr_elem; 1182 const u8 *pwr_constr_elem;
1186 const u8 *quiet_elem; /* first quite element */
1187 const u8 *timeout_int; 1183 const u8 *timeout_int;
1188 const u8 *opmode_notif; 1184 const u8 *opmode_notif;
1189 1185
1190 /* length of them, respectively */ 1186 /* length of them, respectively */
1191 u8 ssid_len; 1187 u8 ssid_len;
1192 u8 supp_rates_len; 1188 u8 supp_rates_len;
1193 u8 fh_params_len;
1194 u8 ds_params_len; 1189 u8 ds_params_len;
1195 u8 cf_params_len;
1196 u8 tim_len; 1190 u8 tim_len;
1197 u8 ibss_params_len;
1198 u8 challenge_len; 1191 u8 challenge_len;
1199 u8 rsn_len; 1192 u8 rsn_len;
1200 u8 erp_info_len; 1193 u8 erp_info_len;
@@ -1207,8 +1200,6 @@ struct ieee802_11_elems {
1207 u8 prep_len; 1200 u8 prep_len;
1208 u8 perr_len; 1201 u8 perr_len;
1209 u8 country_elem_len; 1202 u8 country_elem_len;
1210 u8 quiet_elem_len;
1211 u8 num_of_quiet_elem; /* can be more the one */
1212 u8 timeout_int_len; 1203 u8 timeout_int_len;
1213 1204
1214 /* whether a parse error occurred while retrieving these elements */ 1205 /* whether a parse error occurred while retrieving these elements */
diff --git a/net/mac80211/util.c b/net/mac80211/util.c
index 1734cd21c7ce..2708b270e944 100644
--- a/net/mac80211/util.c
+++ b/net/mac80211/util.c
@@ -738,18 +738,10 @@ u32 ieee802_11_parse_elems_crc(u8 *start, size_t len,
738 elems->supp_rates = pos; 738 elems->supp_rates = pos;
739 elems->supp_rates_len = elen; 739 elems->supp_rates_len = elen;
740 break; 740 break;
741 case WLAN_EID_FH_PARAMS:
742 elems->fh_params = pos;
743 elems->fh_params_len = elen;
744 break;
745 case WLAN_EID_DS_PARAMS: 741 case WLAN_EID_DS_PARAMS:
746 elems->ds_params = pos; 742 elems->ds_params = pos;
747 elems->ds_params_len = elen; 743 elems->ds_params_len = elen;
748 break; 744 break;
749 case WLAN_EID_CF_PARAMS:
750 elems->cf_params = pos;
751 elems->cf_params_len = elen;
752 break;
753 case WLAN_EID_TIM: 745 case WLAN_EID_TIM:
754 if (elen >= sizeof(struct ieee80211_tim_ie)) { 746 if (elen >= sizeof(struct ieee80211_tim_ie)) {
755 elems->tim = (void *)pos; 747 elems->tim = (void *)pos;
@@ -757,10 +749,6 @@ u32 ieee802_11_parse_elems_crc(u8 *start, size_t len,
757 } else 749 } else
758 elem_parse_failed = true; 750 elem_parse_failed = true;
759 break; 751 break;
760 case WLAN_EID_IBSS_PARAMS:
761 elems->ibss_params = pos;
762 elems->ibss_params_len = elen;
763 break;
764 case WLAN_EID_CHALLENGE: 752 case WLAN_EID_CHALLENGE:
765 elems->challenge = pos; 753 elems->challenge = pos;
766 elems->challenge_len = elen; 754 elems->challenge_len = elen;
@@ -870,13 +858,6 @@ u32 ieee802_11_parse_elems_crc(u8 *start, size_t len,
870 } 858 }
871 elems->ch_switch_ie = (void *)pos; 859 elems->ch_switch_ie = (void *)pos;
872 break; 860 break;
873 case WLAN_EID_QUIET:
874 if (!elems->quiet_elem) {
875 elems->quiet_elem = pos;
876 elems->quiet_elem_len = elen;
877 }
878 elems->num_of_quiet_elem++;
879 break;
880 case WLAN_EID_COUNTRY: 861 case WLAN_EID_COUNTRY:
881 elems->country_elem = pos; 862 elems->country_elem = pos;
882 elems->country_elem_len = elen; 863 elems->country_elem_len = elen;