blob: ecc86a861d24d61bcf502742621c4a8b35317840 [file] [log] [blame]
From 0e74220e04acc1fb9c10d469e3b287d61a9ae4d6 Mon Sep 17 00:00:00 2001
From: MeiChia Chiu <meichia.chiu@mediatek.com>
Date: Tue, 6 Jun 2023 16:57:10 +0800
Subject: [PATCH 1018/1044] mtk: wifi: mt76: mt7996: add support for runtime
set in-band discovery
with this patch, AP can runtime set inband discovery via hostapd_cli
Usage:
Enable FILS: hostapd_cli -i [interface] inband_discovery 2 20
Enable UBPR: hostapd_cli -i [interface] inband_discovery 1 20
Disable inband discovery: hostapd_cli -i [interface] inband_discovery 0 0
Signed-off-by: MeiChia Chiu <MeiChia.Chiu@mediatek.com>
---
mt7996/mcu.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/mt7996/mcu.c b/mt7996/mcu.c
index e74f7b00..60b1b62c 100644
--- a/mt7996/mcu.c
+++ b/mt7996/mcu.c
@@ -2602,8 +2602,7 @@ int mt7996_mcu_beacon_inband_discov(struct mt7996_dev *dev,
if (IS_ERR(rskb))
return PTR_ERR(rskb);
- if (changed & BSS_CHANGED_FILS_DISCOVERY &&
- vif->bss_conf.fils_discovery.max_interval) {
+ if (changed & BSS_CHANGED_FILS_DISCOVERY) {
interval = vif->bss_conf.fils_discovery.max_interval;
skb = ieee80211_get_fils_discovery_tmpl(hw, vif);
} else if (changed & BSS_CHANGED_UNSOL_BCAST_PROBE_RESP &&
@@ -2638,7 +2637,7 @@ int mt7996_mcu_beacon_inband_discov(struct mt7996_dev *dev,
discov->tx_type = !!(changed & BSS_CHANGED_FILS_DISCOVERY);
discov->tx_interval = interval;
discov->prob_rsp_len = cpu_to_le16(MT_TXD_SIZE + skb->len);
- discov->enable = true;
+ discov->enable = !!(interval);
discov->wcid = cpu_to_le16(MT7996_WTBL_RESERVED);
buf = (u8 *)tlv + sizeof(*discov);
--
2.18.0