Skip to content

Commit 23665aa

Browse files
jmalinenjmberg-intel
authored andcommitted
mac80211: Interoperability workaround for 80+80 and 160 MHz channels
Number of deployed 80 MHz capable VHT stations that do not support 80+80 and 160 MHz bandwidths seem to misbehave when trying to connect to an AP that advertises 80+80 or 160 MHz channel bandwidth in the VHT Operation element. To avoid such issues with deployed devices, modify the design based on recently accepted IEEE 802.11 standard changes (*). This allows poorly implemented VHT 80 MHz stations to connect with the AP in 80 MHz mode. 80+80 and 160 MHz capable stations need to support the new workaround mechanism to allow full bandwidth to be used. However, there are more or less no impacted station with 80+80/160 capability deployed. The rebased version of this patch is based on the updated version from Johannes Berg to take the HT/VHT chandef refactoring into account. (*) Changes in https://mentor.ieee.org/802.11/dcn/15/11-15-1530-04-000m-vht160-operation-signaling-through-non-zero-ccfs1.docx were accepted during the IEEE 802.11 January 2016 meeting. Signed-off-by: Jouni Malinen <[email protected]> Signed-off-by: Johannes Berg <[email protected]>
1 parent 06470f7 commit 23665aa

File tree

1 file changed

+29
-2
lines changed

1 file changed

+29
-2
lines changed

net/mac80211/util.c

Lines changed: 29 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2364,10 +2364,23 @@ u8 *ieee80211_ie_build_vht_oper(u8 *pos, struct ieee80211_sta_vht_cap *vht_cap,
23642364

23652365
switch (chandef->width) {
23662366
case NL80211_CHAN_WIDTH_160:
2367-
vht_oper->chan_width = IEEE80211_VHT_CHANWIDTH_160MHZ;
2367+
/*
2368+
* Convert 160 MHz channel width to new style as interop
2369+
* workaround.
2370+
*/
2371+
vht_oper->chan_width = IEEE80211_VHT_CHANWIDTH_80MHZ;
2372+
vht_oper->center_freq_seg2_idx = vht_oper->center_freq_seg1_idx;
2373+
if (chandef->chan->center_freq < chandef->center_freq1)
2374+
vht_oper->center_freq_seg1_idx -= 8;
2375+
else
2376+
vht_oper->center_freq_seg1_idx += 8;
23682377
break;
23692378
case NL80211_CHAN_WIDTH_80P80:
2370-
vht_oper->chan_width = IEEE80211_VHT_CHANWIDTH_80P80MHZ;
2379+
/*
2380+
* Convert 80+80 MHz channel width to new style as interop
2381+
* workaround.
2382+
*/
2383+
vht_oper->chan_width = IEEE80211_VHT_CHANWIDTH_80MHZ;
23712384
break;
23722385
case NL80211_CHAN_WIDTH_80:
23732386
vht_oper->chan_width = IEEE80211_VHT_CHANWIDTH_80MHZ;
@@ -2430,6 +2443,20 @@ bool ieee80211_chandef_vht_oper(const struct ieee80211_vht_operation *oper,
24302443
case IEEE80211_VHT_CHANWIDTH_80MHZ:
24312444
new.width = NL80211_CHAN_WIDTH_80;
24322445
new.center_freq1 = cf1;
2446+
/* If needed, adjust based on the newer interop workaround. */
2447+
if (oper->center_freq_seg2_idx) {
2448+
unsigned int diff;
2449+
2450+
diff = abs(oper->center_freq_seg2_idx -
2451+
oper->center_freq_seg1_idx);
2452+
if (diff == 8) {
2453+
new.width = NL80211_CHAN_WIDTH_160;
2454+
new.center_freq1 = cf2;
2455+
} else if (diff > 8) {
2456+
new.width = NL80211_CHAN_WIDTH_80P80;
2457+
new.center_freq2 = cf2;
2458+
}
2459+
}
24332460
break;
24342461
case IEEE80211_VHT_CHANWIDTH_160MHZ:
24352462
new.width = NL80211_CHAN_WIDTH_160;

0 commit comments

Comments
 (0)