mirror of
https://github.com/Telecominfraproject/wlan-ap.git
synced 2025-12-21 19:31:55 +00:00
85 lines
3.1 KiB
Diff
85 lines
3.1 KiB
Diff
From 34237060f4970c887152e705ea15353996309e21 Mon Sep 17 00:00:00 2001
|
|
From: Muna Sinada <quic_msinada@quicinc.com>
|
|
Date: Wed, 21 Jul 2021 10:29:16 -0700
|
|
Subject: [PATCH 20/23] eht: changes to channel switch exchange with driver
|
|
|
|
Add EHT mode to channel switch related settings exchanged between
|
|
the userspace and the driver.
|
|
|
|
Signed-off-by: Muna Sinada <quic_msinada@quicinc.com>
|
|
Signed-off-by: Aloka Dixit <quic_alokad@quicinc.com>
|
|
---
|
|
src/ap/drv_callbacks.c | 40 +++++++++++++++++++++++++++---------
|
|
src/drivers/driver_nl80211.c | 5 +++--
|
|
2 files changed, 33 insertions(+), 12 deletions(-)
|
|
|
|
--- a/src/ap/drv_callbacks.c
|
|
+++ b/src/ap/drv_callbacks.c
|
|
@@ -881,10 +881,11 @@ void hostapd_event_ch_switch(struct host
|
|
|
|
hostapd_logger(hapd, NULL, HOSTAPD_MODULE_IEEE80211,
|
|
HOSTAPD_LEVEL_INFO,
|
|
- "driver %s channel switch: freq=%d, ht=%d, vht_ch=0x%x, he_ch=0x%x, offset=%d, width=%d (%s), cf1=%d, cf2=%d",
|
|
+ "driver %s channel switch: freq=%d, ht=%d, vht_ch=0x%x, he_ch=0x%x, eht_ch=0x%x, offset=%d, width=%d (%s), cf1=%d, cf2=%d",
|
|
finished ? "had" : "starting",
|
|
freq, ht, hapd->iconf->ch_switch_vht_config,
|
|
- hapd->iconf->ch_switch_he_config, offset,
|
|
+ hapd->iconf->ch_switch_he_config,
|
|
+ hapd->iconf->ch_switch_eht_config, offset,
|
|
width, channel_width_to_string(width), cf1, cf2);
|
|
|
|
if (!hapd->iface->current_mode) {
|
|
@@ -929,22 +930,24 @@ void hostapd_event_ch_switch(struct host
|
|
hapd->iconf->ieee80211n = ht;
|
|
if (!ht) {
|
|
hapd->iconf->ieee80211ac = 0;
|
|
- if (!is_6ghz_freq(hapd->iface->freq))
|
|
+ if (!is_6ghz_freq(hapd->iface->freq)) {
|
|
hapd->iconf->ieee80211ax = 0;
|
|
+ hapd->iconf->ieee80211be = 0;
|
|
+ }
|
|
} else {
|
|
if (hapd->iconf->ch_switch_vht_config) {
|
|
/* CHAN_SWITCH VHT config */
|
|
if (hapd->iconf->ch_switch_vht_config &
|
|
- CH_SWITCH_VHT_ENABLED)
|
|
+ CH_SWITCH_VHT_ENABLED)
|
|
hapd->iconf->ieee80211ac = 1;
|
|
else if (hapd->iconf->ch_switch_vht_config &
|
|
- CH_SWITCH_VHT_DISABLED)
|
|
+ CH_SWITCH_VHT_DISABLED)
|
|
hapd->iconf->ieee80211ac = 0;
|
|
}
|
|
if (hapd->iconf->ch_switch_he_config) {
|
|
/* CHAN_SWITCH HE config */
|
|
if (hapd->iconf->ch_switch_he_config &
|
|
- CH_SWITCH_HE_ENABLED) {
|
|
+ CH_SWITCH_HE_ENABLED) {
|
|
hapd->iconf->ieee80211ax = 1;
|
|
if (!is_6ghz_freq(hapd->iface->freq))
|
|
hapd->iconf->ieee80211ac = 1;
|
|
@@ -953,9 +956,23 @@ void hostapd_event_ch_switch(struct host
|
|
CH_SWITCH_HE_DISABLED)
|
|
hapd->iconf->ieee80211ax = 0;
|
|
}
|
|
+ if (hapd->iconf->ch_switch_eht_config) {
|
|
+ /* CHAN_SWITCH EHT config */
|
|
+ if (hapd->iconf->ch_switch_eht_config &
|
|
+ CH_SWITCH_EHT_ENABLED) {
|
|
+ hapd->iconf->ieee80211be = 1;
|
|
+ hapd->iconf->ieee80211ax = 1;
|
|
+ if (!is_6ghz_freq(hapd->iface->freq))
|
|
+ hapd->iconf->ieee80211ac = 1;
|
|
+ } else if (hapd->iconf->ch_switch_eht_config &
|
|
+ CH_SWITCH_EHT_DISABLED)
|
|
+ hapd->iconf->ieee80211be = 0;
|
|
+ }
|
|
}
|
|
+
|
|
hapd->iconf->ch_switch_vht_config = 0;
|
|
hapd->iconf->ch_switch_he_config = 0;
|
|
+ hapd->iconf->ch_switch_eht_config = 0;
|
|
|
|
hapd->iconf->secondary_channel = offset;
|
|
hostapd_set_oper_chwidth(hapd->iconf, chwidth);
|