diff options
author | Chun-Yeow Yeoh <yeohchunyeow@cozybit.com> | 2013-10-14 22:08:27 -0400 |
---|---|---|
committer | Johannes Berg <johannes.berg@intel.com> | 2013-10-28 10:05:28 -0400 |
commit | 8f2535b92d685c68db4bc699dd78462a646f6ef9 (patch) | |
tree | e64579c3dfc09f81fbf47f2a76d316721a4da2e3 /net/mac80211/util.c | |
parent | c0f17eb9b2d4d322c099a0700437209149224583 (diff) |
mac80211: process the CSA frame for mesh accordingly
Process the CSA frame according to the procedures define in IEEE Std
802.11-2012 section 10.9.8.4.3 as follow:
* The mesh channel switch parameters element (MCSP) must be availabe.
* If the MCSP's TTL is 1, drop the frame but still process the CSA.
* If the MCSP's precedence value is less than or equal to the current
precedence value, drop the frame and do not process the CSA.
* The CSA frame is forwarded after TTL is decremented by 1 and the
initiator field is set to 0. Transmit restrict field and others
are maintained as is.
* No beacon or probe response frame are handled here.
Also, introduce the debug message used for mesh CSA purpose.
Signed-off-by: Chun-Yeow Yeoh <yeohchunyeow@cozybit.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net/mac80211/util.c')
-rw-r--r-- | net/mac80211/util.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/net/mac80211/util.c b/net/mac80211/util.c index 65ebe0c5e835..523783cedf6e 100644 --- a/net/mac80211/util.c +++ b/net/mac80211/util.c | |||
@@ -740,6 +740,7 @@ u32 ieee802_11_parse_elems_crc(const u8 *start, size_t len, bool action, | |||
740 | case WLAN_EID_TIMEOUT_INTERVAL: | 740 | case WLAN_EID_TIMEOUT_INTERVAL: |
741 | case WLAN_EID_SECONDARY_CHANNEL_OFFSET: | 741 | case WLAN_EID_SECONDARY_CHANNEL_OFFSET: |
742 | case WLAN_EID_WIDE_BW_CHANNEL_SWITCH: | 742 | case WLAN_EID_WIDE_BW_CHANNEL_SWITCH: |
743 | case WLAN_EID_CHAN_SWITCH_PARAM: | ||
743 | /* | 744 | /* |
744 | * not listing WLAN_EID_CHANNEL_SWITCH_WRAPPER -- it seems possible | 745 | * not listing WLAN_EID_CHANNEL_SWITCH_WRAPPER -- it seems possible |
745 | * that if the content gets bigger it might be needed more than once | 746 | * that if the content gets bigger it might be needed more than once |
@@ -905,6 +906,14 @@ u32 ieee802_11_parse_elems_crc(const u8 *start, size_t len, bool action, | |||
905 | } | 906 | } |
906 | elems->sec_chan_offs = (void *)pos; | 907 | elems->sec_chan_offs = (void *)pos; |
907 | break; | 908 | break; |
909 | case WLAN_EID_CHAN_SWITCH_PARAM: | ||
910 | if (elen != | ||
911 | sizeof(*elems->mesh_chansw_params_ie)) { | ||
912 | elem_parse_failed = true; | ||
913 | break; | ||
914 | } | ||
915 | elems->mesh_chansw_params_ie = (void *)pos; | ||
916 | break; | ||
908 | case WLAN_EID_WIDE_BW_CHANNEL_SWITCH: | 917 | case WLAN_EID_WIDE_BW_CHANNEL_SWITCH: |
909 | if (!action || | 918 | if (!action || |
910 | elen != sizeof(*elems->wide_bw_chansw_ie)) { | 919 | elen != sizeof(*elems->wide_bw_chansw_ie)) { |