Skip to content

Mesh HT Mixed Mode Operation Implementation Notes

twpedersen edited this page Apr 21, 2012 · 34 revisions

Table of Contents

  1. Specification
  2. Files
  3. Code
  4. HT Protection
  5. Basic Rates
  6. Basic MCS Set
  7. Peering
  8. Testing
  9. Limitations

Where is it specified

Protection rules for HT mesh STA in a MBSS is specified in section 9.23.3.5 of IEEE 80211s standard. For our implementation, we've used IEEE Draft P802.11-REVmbTM/D12, November 2011.

Where is it implemented

Changes have be made to nl80211, cfg80211 and mac80211. net/mac80211/mesh_plink.c should be your starting point if you intend to review and/or extend this code.

The Code

Grab the patches from the rel-ht-prot integration branch in the open80211s repo.

Protection mode

Protection mode selection takes place inside mesh_set_ht_prot_mode(). This function iterates through all mesh peers in its sta_list and looks for any non-HT station. Currently, three protection modes are supported:

  1. non-HT mixed mode - this is the default protection mode when a mesh starts. This is selected when any mesh peers do not support HT.
  2. 20MHz-protection mode - this is selected when all stations in a 20/40 MHz MBSS are HT peers and at least one HT20 station is present.
  3. no-protection mode - this is selected when all peers in a HT MBSS have the same channel type.

Protection mode has to be determined at two check points,

  • When a new peer joins the mesh.
  • When a peer leaves the mesh.

Add CONFIG_MAC80211_VERBOSE_MPL_DEBUG=y to your kernel .config to see mesh peering debug messages. Then determine the current protection mode in operation via dmesg.

$ dmesg | grep -e protection -e nonHT
[  857.303489] mesh_plink 42:00:00:00:00:00: nonHT sta (42:00:00:00:04:00) is present
[  857.303496] mesh_plink 42:00:00:00:00:00: protection mode changed to 3
[  857.303796] mesh_plink 42:00:00:00:01:00: nonHT sta (42:00:00:00:04:00) is present
[  857.303804] mesh_plink 42:00:00:00:01:00: protection mode changed to 3
--->[  874.007964] mesh_plink 42:00:00:00:00:00: protection mode changed to 0 <--- nonHT station leaves mesh
[  874.012593] mesh_plink 42:00:00:00:01:00: protection mode changed to 0

Basic Rates

Section 13.2.3 of the IEEE 802.11s standard requires BSSBasicRateSet of mesh nodes to be identical so as to establish peerings. The utility function ieee80211_sta_get_rates is modified to get the basic rates. Mesh uses mandatory rates,ieee80211_mandatory_rates(), as default basic rates and advertises them in their Rate Information Elements.

Users may configure the basic rates via debugfs:

echo 11 > /sys/kernel/debug/ieee80211/phy0/netdev\:mesh0/basic_rates

Where "11" is a hexadecimal bitmap of desired basic rates.

###Snapshot of wireshark showing custom basic rates advertised in mesh rate IEs

Snapshot of wireshark showing basic rates advertised in mesh IEs

Basic MCS Set

In open80211s the default set is chosen as 0xff, the mandatory phy rate bitmask. To configure a custom BSSBasicMCSSet, use the debugfs interface:

echo deadbeef > /sys/kernel/debug/ieee80211/phy0/netdev\:mesh0/basic_mcs

Where "deadbeef" is a hexadecimal bitmap of desired basic MCS rates. The configured set is copied to vif.bss_conf.basic_mcs_set and advertised in the HT Operation IE.

NOTE: when configuring the MCS set, the user enters the set in big-endian notation. This is then converted to little-endian byte order before being stored in the kernel and transmitted.

Peering

BSSBasicRateSet must match between mesh nodes in order to establish a peer link. Now, with HT mixed mode protection enabled, peering is allowed between HT and non-HT stations. However, peering is disallowed if there is a HT40+/- mismatch.

Testing

###BSSBasicRate mismatch check

To be able to test if peer links are established only when the BSSBasicRateSet is matched, you could perform this simple test.

Three mesh nodes A, B and C, with same mesh profile are needed. Two stations (A and B) uses the same basic rates while the third station, C, is configured with a different basic rate than the others.

(on STA A)
echo 11 > /sys/kernel/debug/ieee80211/phy0/netdev\:mesh0/basic_rates
(on STA B)
echo 11 > /sys/kernel/debug/ieee80211/phy0/netdev\:mesh0/basic_rates
(on STA C)
echo 2 > /sys/kernel/debug/ieee80211/phy0/netdev\:mesh0/basic_rates

Expect to see a peer link is established between stations A and B while C is left out.

###Performance with HT protection

To measure the performance with HT protection implemented for mesh, you could perform the following simple test.

###Goal:

Better throughput fairness observed for non-HT peers over that of non-protected HT transmissions.

####Setup:

Three mesh nodes A,B and C are required. Configure mesh nodes such that A and B are HT enabled while C operates as a non-HT station. Now join the three mesh nodes to form a mesh network.

setup for the HT protection performance

####Description:

Measure the throughput rate between HT and non-HT peers when there is traffic flowing between HT peers. Compare the throughput measured with a similar experiment repeated without the HT protection patches.

####Results:

We observed fairness is given between HT and non-HT peer transmissions. See the graph below. Packet loss between HT transmissions is considerably reduced when HT protection is enabled. Packet loss (~20%) as upper bound is observed with no HT protection. After implementing HT protection, packet loss of 0.8% is measured as the upper bound.

HT protection performance plot

Limitations

  • Currently, only mesh peers are considered when determining the HT protection mode.
  • When configuring the BSSBasicRateSet or BSSBasicMCSSet through debugfs, unsupported rates cannot be masked out. This is due to the way the open80211s stack and channel selection interact. This limitation also currently prevents configuring the basic rate set when joining a mesh.
  • Configuring RateSets may only be done on a running mesh, otherwise RateSets will be initialized to default values on iw mesh join.
  • HT protection and basic rate checking is not implemented in the secure mesh counterpart, authsae. The remaining work is documented here
Clone this wiki locally