Files
wlan-ap/feeds/qca-wifi-7/hostapd/patches/q02-036-ru_puncturing-send-bitmap-to-kernel.patch
John Crispin 68cf54d9f7 qca-wifi-7: update to ath12.5.5
Signed-off-by: John Crispin <john@phrozen.org>
2025-02-27 12:45:52 +01:00

49 lines
1.9 KiB
Diff

From 0abd3e6f6353d6cc2fec8a3d6bab6c895db5c678 Mon Sep 17 00:00:00 2001
From: Muna Sinada <quic_msinada@quicinc.com>
Date: Wed, 2 Mar 2022 15:47:45 -0800
Subject: [PATCH 6/6] ru_puncturing: send bitmap to kernel
Send the user configured bitmap to the kernel.
Signed-off-by: Muna Sinada <quic_msinada@quicinc.com>
Signed-off-by: Aloka Dixit <quic_alokad@quicinc.com>
---
src/drivers/driver_nl80211.c | 13 +++++++++++--
1 file changed, 11 insertions(+), 2 deletions(-)
diff --git a/src/drivers/driver_nl80211.c b/src/drivers/driver_nl80211.c
index afbae6b..27bd4ab 100644
--- a/src/drivers/driver_nl80211.c
+++ b/src/drivers/driver_nl80211.c
@@ -4957,6 +4957,16 @@ static int nl80211_put_freq_params(struct nl_msg *msg,
nla_put_u32(msg, NL80211_ATTR_CENTER_FREQ2,
freq->center_freq2)))
return -ENOBUFS;
+
+ if (freq->ru_punct_bitmap) {
+ if (freq->ru_punct_ofdma &&
+ nla_put_flag(msg, NL80211_ATTR_RU_PUNCT_SUPP_HE))
+ return -ENOBUFS;
+ if (nla_put_u16(msg, NL80211_ATTR_RU_PUNCT_BITMAP,
+ freq->ru_punct_bitmap))
+ return -ENOBUFS;
+ }
+
} else if (freq->ht_enabled || (freq->he_enabled && is_24ghz)) {
enum nl80211_channel_type ct;
@@ -5452,10 +5462,11 @@ static int nl80211_set_channel(struct i802_bss *bss,
int ret;
wpa_printf(MSG_DEBUG,
- "nl80211: Set freq %d (ht_enabled=%d, vht_enabled=%d, he_enabled=%d, eht_enabled=%d, bandwidth=%d MHz, cf1=%d MHz, cf2=%d MHz)",
+ "nl80211: Set freq %d (ht_enabled=%d, vht_enabled=%d, he_enabled=%d, eht_enabled=%d, bandwidth=%d MHz, cf1=%d MHz, cf2=%d MHz, puncturing bitmap=0x%04x)",
freq->freq, freq->ht_enabled, freq->vht_enabled,
freq->he_enabled, freq->eht_enabled, freq->bandwidth,
- freq->center_freq1, freq->center_freq2);
+ freq->center_freq1, freq->center_freq2,
+ freq->ru_punct_bitmap);
msg = nl80211_bss_msg(bss, 0, set_chan ? NL80211_CMD_SET_CHANNEL :
NL80211_CMD_SET_WIPHY);