Skip to content

Commit

Permalink
luci-mod-status: channel_analysis: detect 160 MHz capable AP
Browse files Browse the repository at this point in the history
Implement a workaround to detect an 160MHz capable AP. It was introduced
in the mac80211 in 2016 with 802.11ac Wave 2. APs capable of 160 MHz are
detected by the shift of central frequencies. More detailed description
in the link [1]. Every AP I have seen presents support for 160 MHz in this way.

[1] torvalds/linux@23665aa
Fixes: #6262
Signed-off-by: Aleksander Jan Bajkowski <[email protected]>
  • Loading branch information
abajk committed Nov 1, 2024
1 parent 23657ad commit 3c8ead2
Showing 1 changed file with 16 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -314,6 +314,22 @@ return view.extend({
if (res.vht_operation.channel_width == 80) {
chan_width = 8;
res.channel_width = "80 MHz";

/* If needed, adjust based on the newer interop workaround. */
if (res.vht_operation.center_freq_2) {
var diff = Math.abs(res.vht_operation.center_freq_2 -
res.vht_operation.center_freq_1);

if (diff == 8) {
chan_width = 16;
res.channel_width = "160 MHz";
center_channels.push(res.vht_operation.center_freq_2);
} else if (diff > 8) {
chan_width = 8;
res.channel_width = "80+80 MHz";
center_channels.push(res.vht_operation.center_freq_2);
}
}
} else if (res.vht_operation.channel_width == 8080) {
res.channel_width = "80+80 MHz";
chan_width = 8;
Expand Down

0 comments on commit 3c8ead2

Please sign in to comment.