wlan-ap-Telecominfraproject/feeds/wifi-ax/hostapd/patches/e00-004-hostapd-Enable-160MHz-support-for-6G-in-11s-mesh.patch
John Crispin 528a778e38 open-converged-wireless: Import 21.02 based uCentral tree
Signed-off-by: John Crispin <john@phrozen.org>
2021-03-25 12:19:47 +01:00

58 lines
1.9 KiB
Diff

From 01845904f9a5cdbd60f6aabdcfc0a8b191d90785 Mon Sep 17 00:00:00 2001
From: P Praneesh <ppranees@codeaurora.org>
Date: Sun, 27 Sep 2020 00:21:21 +0530
Subject: [PATCH] hostapd: Enable 160MHz support for 6G in 11s mesh
Since 6G has no dfs channel, enable 6G 160MHz bandwidth
as a default configuration for 11s mesh.
example:
network={
ssid="6gmesh160"
key_mgmt=SAE
mode=5
frequency=6275
psk="1234567890"
}
Signed-off-by: P Praneesh <ppranees@codeaurora.org>
---
wpa_supplicant/wpa_supplicant.c | 15 ++++++++++++++-
1 file changed, 14 insertions(+), 1 deletion(-)
Index: hostapd-2020-07-02-58b384f4/wpa_supplicant/wpa_supplicant.c
===================================================================
--- hostapd-2020-07-02-58b384f4.orig/wpa_supplicant/wpa_supplicant.c
+++ hostapd-2020-07-02-58b384f4/wpa_supplicant/wpa_supplicant.c
@@ -2391,6 +2391,22 @@ static int drv_supports_vht(struct wpa_s
return mode->vht_capab != 0;
}
+static bool ibss_mesh_is_80mhz_avail(int channel, struct hostapd_hw_modes *mode)
+{
+ int i;
+
+ for (i = channel; i < channel + 16; i += 4) {
+ struct hostapd_channel_data *chan;
+
+ chan = hw_get_channel_chan(mode, i, NULL);
+ if (!chan)
+ return false;
+
+ if (chan->flag & (HOSTAPD_CHAN_DISABLED | HOSTAPD_CHAN_NO_IR))
+ return false;
+ }
+ return true;
+}
void ibss_mesh_setup_freq(struct wpa_supplicant *wpa_s,
const struct wpa_ssid *ssid,
@@ -2404,6 +2420,7 @@ void ibss_mesh_setup_freq(struct wpa_sup
unsigned int bw80[] = { 5180, 5260, 5500, 5580, 5660, 5745, 5955,
6035, 6115, 6195, 6275, 6355, 6435, 6515,
6595, 6675, 6755, 6835, 6915, 6995 };
+ unsigned int bw160[] = { 5955, 6115, 6275, 6435, 6595, 6755, 6915 };
struct hostapd_channel_data *pri_chan = NULL, *sec_chan = NULL;
u8 channel;
int i, chan_idx, ht40 = -1, res, obss_scan = !(ssid->noscan);