wlan-ap-Telecominfraproject/feeds/qca/hostapd/patches/e00-003-hostapd-chan-switch-6ghz.patch
John Crispin 008ca9618d
Some checks failed
Build OpenWrt/uCentral images / build (cig_wf186h) (push) Has been cancelled
Build OpenWrt/uCentral images / build (cig_wf186w) (push) Has been cancelled
Build OpenWrt/uCentral images / build (cig_wf188n) (push) Has been cancelled
Build OpenWrt/uCentral images / build (cig_wf189) (push) Has been cancelled
Build OpenWrt/uCentral images / build (cig_wf196) (push) Has been cancelled
Build OpenWrt/uCentral images / build (cybertan_eww631-a1) (push) Has been cancelled
Build OpenWrt/uCentral images / build (cybertan_eww631-b1) (push) Has been cancelled
Build OpenWrt/uCentral images / build (edgecore_eap101) (push) Has been cancelled
Build OpenWrt/uCentral images / build (edgecore_eap102) (push) Has been cancelled
Build OpenWrt/uCentral images / build (edgecore_eap104) (push) Has been cancelled
Build OpenWrt/uCentral images / build (edgecore_eap105) (push) Has been cancelled
Build OpenWrt/uCentral images / build (edgecore_eap111) (push) Has been cancelled
Build OpenWrt/uCentral images / build (edgecore_eap112) (push) Has been cancelled
Build OpenWrt/uCentral images / build (edgecore_oap101) (push) Has been cancelled
Build OpenWrt/uCentral images / build (edgecore_oap101-6e) (push) Has been cancelled
Build OpenWrt/uCentral images / build (edgecore_oap101e) (push) Has been cancelled
Build OpenWrt/uCentral images / build (edgecore_oap101e-6e) (push) Has been cancelled
Build OpenWrt/uCentral images / build (hfcl_ion4x) (push) Has been cancelled
Build OpenWrt/uCentral images / build (hfcl_ion4x_2) (push) Has been cancelled
Build OpenWrt/uCentral images / build (hfcl_ion4x_3) (push) Has been cancelled
Build OpenWrt/uCentral images / build (hfcl_ion4x_w) (push) Has been cancelled
Build OpenWrt/uCentral images / build (hfcl_ion4xe) (push) Has been cancelled
Build OpenWrt/uCentral images / build (hfcl_ion4xi) (push) Has been cancelled
Build OpenWrt/uCentral images / build (hfcl_ion4xi_w) (push) Has been cancelled
Build OpenWrt/uCentral images / build (indio_um-305ax) (push) Has been cancelled
Build OpenWrt/uCentral images / build (sercomm_ap72tip) (push) Has been cancelled
Build OpenWrt/uCentral images / build (sonicfi_rap630c-311g) (push) Has been cancelled
Build OpenWrt/uCentral images / build (sonicfi_rap630w-211g) (push) Has been cancelled
Build OpenWrt/uCentral images / build (sonicfi_rap630w-311g) (push) Has been cancelled
Build OpenWrt/uCentral images / build (udaya_a6-id2) (push) Has been cancelled
Build OpenWrt/uCentral images / build (udaya_a6-od2) (push) Has been cancelled
Build OpenWrt/uCentral images / build (wallys_dr5018) (push) Has been cancelled
Build OpenWrt/uCentral images / build (wallys_dr6018) (push) Has been cancelled
Build OpenWrt/uCentral images / build (wallys_dr6018-v4) (push) Has been cancelled
Build OpenWrt/uCentral images / build (yuncore_ax820) (push) Has been cancelled
Build OpenWrt/uCentral images / build (yuncore_ax840) (push) Has been cancelled
Build OpenWrt/uCentral images / build (yuncore_fap640) (push) Has been cancelled
Build OpenWrt/uCentral images / build (yuncore_fap650) (push) Has been cancelled
Build OpenWrt/uCentral images / build (yuncore_fap655) (push) Has been cancelled
Build OpenWrt/uCentral images / trigger-testing (push) Has been cancelled
Build OpenWrt/uCentral images / create-x64_vm-ami (push) Has been cancelled
ipq95xx: import ath12.4-cs kernel and drivers
Signed-off-by: John Crispin <john@phrozen.org>
2024-10-20 09:25:13 +02:00

68 lines
2.3 KiB
Diff

From 917653b0674dfacc976e20956e999fef13c6e6ba Mon Sep 17 00:00:00 2001
From: Muna Sinada <msinada@codeaurora.org>
Date: Wed, 29 Jul 2020 09:41:31 -0700
Subject: [PATCH] hostapd:remove 11A specific case to allow for 6 GHz
With 6 GHz utilizing 11A/HE, frequency to channel conversions needed
to accomedate for 6 GHz frequencies in hostapd_event_ch_switch. Removed
5 GHz specific conversions for the 11A case due to incorrect 6 GHz
frequencies being incorrectly being converted in
hostapd_event_ch_switch
Signed-off-by: Muna Sinada <msinada@codeaurora.org>
---
src/ap/drv_callbacks.c | 14 ++------------
1 file changed, 2 insertions(+), 12 deletions(-)
diff --git a/src/ap/drv_callbacks.c b/src/ap/drv_callbacks.c
index d4fb573..60f5926 100644
--- a/src/ap/drv_callbacks.c
+++ b/src/ap/drv_callbacks.c
@@ -874,7 +874,7 @@ void hostapd_event_ch_switch(struct hostapd_data *hapd, int freq, int ht,
{
#ifdef NEED_AP_MLME
int channel, chwidth, is_dfs0, is_dfs;
- u8 seg0_idx = 0, seg1_idx = 0;
+ u8 seg0_idx = 0, seg1_idx = 0, op_class;
size_t i;
hostapd_logger(hapd, NULL, HOSTAPD_MODULE_IEEE80211,
@@ -928,27 +928,8 @@ void hostapd_event_ch_switch(struct hostapd_data *hapd, int freq, int ht,
break;
}
- switch (hapd->iface->current_mode->mode) {
- case HOSTAPD_MODE_IEEE80211A:
- if (cf1 == 5935)
- seg0_idx = (cf1 - 5925) / 5;
- else if (cf1 > 5950)
- seg0_idx = (cf1 - 5950) / 5;
- else if (cf1 > 5000)
- seg0_idx = (cf1 - 5000) / 5;
-
- if (cf2 == 5935)
- seg1_idx = (cf2 - 5925) / 5;
- else if (cf2 > 5950)
- seg1_idx = (cf2 - 5950) / 5;
- else if (cf2 > 5000)
- seg1_idx = (cf2 - 5000) / 5;
- break;
- default:
- ieee80211_freq_to_chan(cf1, &seg0_idx);
- ieee80211_freq_to_chan(cf2, &seg1_idx);
- break;
- }
+ ieee80211_freq_to_channel_ext(cf1, offset, chwidth, &op_class, &seg0_idx);
+ ieee80211_freq_to_chan(cf2, &seg1_idx);
hapd->iconf->channel = channel;
hapd->iconf->ieee80211n = ht;
@@ -999,6 +980,7 @@ void hostapd_event_ch_switch(struct hostapd_data *hapd, int freq, int ht,
hostapd_set_oper_chwidth(hapd->iconf, chwidth);
hostapd_set_oper_centr_freq_seg0_idx(hapd->iconf, seg0_idx);
hostapd_set_oper_centr_freq_seg1_idx(hapd->iconf, seg1_idx);
+ hapd->iconf->op_class = op_class;
#ifdef CONFIG_IEEE80211BE
hapd->iconf->punct_bitmap = punct_bitmap;
#endif /* CONFIG_IEEE80211BE */