Skip to content

Mesh Channel Switching

Chun-Yeow edited this page Mar 7, 2014 · 3 revisions

MBSS Channel Switching

Introduction

Mesh STAs usually has to operate in the same frequency or the same channel after initiating or joining the mesh network. MBSS channel switching is protocol defined by IEEE 802.11s to mitigate the interference. The sources of interference could be either from the radar signal or from the nearby devices operating in the same frequency. MBSS channel switching can be used to reassign mesh STA channels to ensure the MBSS connectivity.

Based on IEEE Std 802.11s-2011 section 11.9.7.2a, any mesh STAs is allowed to trigger the mesh channel switching attempt by informing all the mesh STAs in the network to switch to a new operating channel. The Mesh Channel Switch Announcement which consists of Mesh Channel Switch Parameters (MCSP) element together with Channel Switch Announcement (CSA) element, are generated in beacon, probe response and CSA action frame to inform other peer mesh STAs to switch to another new operating channel. The mesh STA that receives the Mesh CSA should forward the CSA to others as long as the TTL is not 0 and the received precedence value is greater than the current precedence value. Both fields can be found in MCSP element.

Implementation Notes

Our MBSS channel switch implementation are based the patches of IBSS CSA support submitted by Simon Wunderlich. Revisit on our patches are required once the IBSS CSA support are upstream later.

Kernel modification

Generation of CSA action frame are extended for supporting the mesh mode and involving the modification of {nl,cfg,mac}80211, especially the inclusion of MCSP element.

Majority of implementation is resided in mac80211 located in ./net/mac80211/mesh.c. The processing of CSA action frame is handled by mesh_rx_csa_frame. Meanwhile, the forwarding of CSA frame is handled by mesh_fwd_csa_frame. ieee80211_mesh_build_beacon is also extended to include the CSA element and MCSP element if needed. Mesh CSA completion is handled by ieee80211_mesh_finish_csa. Lastly, all the necessary CSA in tx and rx path are extended to support mesh. In case of missing CSA action frame from peer mesh STAs, the beacon and probe response frames are used for channel switching and this is handled by ieee80211_mesh_process_chnswitch.

Also, the mcsa_dbg is introduced in case you would like to trace and debug the mbss channel switching.

Driver Implementation

We have extended the support to ath9k_htc besides the support of ath9k announced by Simon Wunderlich.

Limitations

The limitations of our MBSS channel implementation are as follow:

  • Switching between different bands, such as 2.4GHz to 5GHz, are not allowed.
  • Switching from different channel widths are not allowed. This means that HT20 channel can only switch to another HT20 channel, or HT40+ to another HT40+ channel.
  • DFS or radar detection is not supported.

Testing

CSA is triggered using the NL80211_CMD_CHANNEL_SWITCH from userspace and can be triggered by any mesh STAs.

The triggering of mesh channel switch can be found at: https://github.com/cozybit/iw/commits/ft-mbss-channel-switch

iw mesh0 chswitch [HT20|HT40+|HT40-]

You can check with "iw mesh0 info" and observing the channel info before and after performing the channel switch.

Wireshark Decoding

To decode the mesh channel switch parameters element correctly, you need to have at least wireshark revision 51453.

Clone this wiki locally