mac80211: remove unused IE pointers from parser
authorJohannes Berg <johannes.berg@intel.com>
Wed, 27 Mar 2013 13:27:01 +0000 (14:27 +0100)
committerJohannes Berg <johannes.berg@intel.com>
Mon, 8 Apr 2013 07:16:56 +0000 (09:16 +0200)
There's no need to parse IEs that aren't used
so just remove them.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
net/mac80211/ieee80211_i.h
net/mac80211/util.c

index f9782f0f43483db954147225a190dfb79d526b52..bb4bfe43bf403ee7472487a075cbf27fe66aad23 100644 (file)
@@ -1157,11 +1157,8 @@ struct ieee802_11_elems {
        /* pointers to IEs */
        const u8 *ssid;
        const u8 *supp_rates;
-       const u8 *fh_params;
        const u8 *ds_params;
-       const u8 *cf_params;
        const struct ieee80211_tim_ie *tim;
-       const u8 *ibss_params;
        const u8 *challenge;
        const u8 *rsn;
        const u8 *erp_info;
@@ -1183,18 +1180,14 @@ struct ieee802_11_elems {
        const struct ieee80211_channel_sw_ie *ch_switch_ie;
        const u8 *country_elem;
        const u8 *pwr_constr_elem;
-       const u8 *quiet_elem;   /* first quite element */
        const u8 *timeout_int;
        const u8 *opmode_notif;
 
        /* length of them, respectively */
        u8 ssid_len;
        u8 supp_rates_len;
-       u8 fh_params_len;
        u8 ds_params_len;
-       u8 cf_params_len;
        u8 tim_len;
-       u8 ibss_params_len;
        u8 challenge_len;
        u8 rsn_len;
        u8 erp_info_len;
@@ -1207,8 +1200,6 @@ struct ieee802_11_elems {
        u8 prep_len;
        u8 perr_len;
        u8 country_elem_len;
-       u8 quiet_elem_len;
-       u8 num_of_quiet_elem;   /* can be more the one */
        u8 timeout_int_len;
 
        /* whether a parse error occurred while retrieving these elements */
index 1734cd21c7ce17290a3dc6280fa6a9a73f1c2c59..2708b270e944e5027b9e7614dd44f5c4c967f20e 100644 (file)
@@ -738,18 +738,10 @@ u32 ieee802_11_parse_elems_crc(u8 *start, size_t len,
                        elems->supp_rates = pos;
                        elems->supp_rates_len = elen;
                        break;
-               case WLAN_EID_FH_PARAMS:
-                       elems->fh_params = pos;
-                       elems->fh_params_len = elen;
-                       break;
                case WLAN_EID_DS_PARAMS:
                        elems->ds_params = pos;
                        elems->ds_params_len = elen;
                        break;
-               case WLAN_EID_CF_PARAMS:
-                       elems->cf_params = pos;
-                       elems->cf_params_len = elen;
-                       break;
                case WLAN_EID_TIM:
                        if (elen >= sizeof(struct ieee80211_tim_ie)) {
                                elems->tim = (void *)pos;
@@ -757,10 +749,6 @@ u32 ieee802_11_parse_elems_crc(u8 *start, size_t len,
                        } else
                                elem_parse_failed = true;
                        break;
-               case WLAN_EID_IBSS_PARAMS:
-                       elems->ibss_params = pos;
-                       elems->ibss_params_len = elen;
-                       break;
                case WLAN_EID_CHALLENGE:
                        elems->challenge = pos;
                        elems->challenge_len = elen;
@@ -870,13 +858,6 @@ u32 ieee802_11_parse_elems_crc(u8 *start, size_t len,
                        }
                        elems->ch_switch_ie = (void *)pos;
                        break;
-               case WLAN_EID_QUIET:
-                       if (!elems->quiet_elem) {
-                               elems->quiet_elem = pos;
-                               elems->quiet_elem_len = elen;
-                       }
-                       elems->num_of_quiet_elem++;
-                       break;
                case WLAN_EID_COUNTRY:
                        elems->country_elem = pos;
                        elems->country_elem_len = elen;