diff options
author | Arik Nemtsov <arik@wizery.com> | 2014-11-09 18:50:18 +0200 |
---|---|---|
committer | Johannes Berg <johannes.berg@intel.com> | 2014-11-19 18:45:16 +0100 |
commit | 53837584438f8899e061ada4663ae1d09b49b96a (patch) | |
tree | c8792fcd2efa35f8e9e7bc7db0913990f5a50f02 /net/mac80211/util.c | |
parent | 1057d35ede5dbf7ed7842357564fb42c9b54ba50 (diff) | |
download | op-kernel-dev-53837584438f8899e061ada4663ae1d09b49b96a.zip op-kernel-dev-53837584438f8899e061ada4663ae1d09b49b96a.tar.gz |
mac80211: add parsing of TDLS specific IEs
These are used in TDLS channel switching code.
Signed-off-by: Arik Nemtsov <arikx.nemtsov@intel.com>
Signed-off-by: Arik Nemtsov <arik@wizery.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net/mac80211/util.c')
-rw-r--r-- | net/mac80211/util.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/net/mac80211/util.c b/net/mac80211/util.c index 3ca0c2e..9e5bfd6 100644 --- a/net/mac80211/util.c +++ b/net/mac80211/util.c @@ -832,6 +832,8 @@ u32 ieee802_11_parse_elems_crc(const u8 *start, size_t len, bool action, case WLAN_EID_WIDE_BW_CHANNEL_SWITCH: case WLAN_EID_CHAN_SWITCH_PARAM: case WLAN_EID_EXT_CAPABILITY: + case WLAN_EID_CHAN_SWITCH_TIMING: + case WLAN_EID_LINK_ID: /* * not listing WLAN_EID_CHANNEL_SWITCH_WRAPPER -- it seems possible * that if the content gets bigger it might be needed more than once @@ -851,6 +853,20 @@ u32 ieee802_11_parse_elems_crc(const u8 *start, size_t len, bool action, elem_parse_failed = false; switch (id) { + case WLAN_EID_LINK_ID: + if (elen + 2 != sizeof(struct ieee80211_tdls_lnkie)) { + elem_parse_failed = true; + break; + } + elems->lnk_id = (void *)(pos - 2); + break; + case WLAN_EID_CHAN_SWITCH_TIMING: + if (elen != sizeof(struct ieee80211_ch_switch_timing)) { + elem_parse_failed = true; + break; + } + elems->ch_sw_timing = (void *)pos; + break; case WLAN_EID_EXT_CAPABILITY: elems->ext_capab = pos; elems->ext_capab_len = elen; |