mirror of
https://github.com/Telecominfraproject/wlan-ap.git
synced 2025-12-19 18:31:33 +00:00
58 lines
1.9 KiB
Diff
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);
|