blob: dc0b0c30dcfd5c615350e05cb9117c947b0aaf52 [file] [log] [blame]
developer7e2761e2023-10-12 08:11:13 +08001From a928c6df5edd9920b4293de6d1216461952aec27 Mon Sep 17 00:00:00 2001
developer064da3c2023-06-13 15:57:26 +08002From: MeiChia Chiu <meichia.chiu@mediatek.com>
3Date: Tue, 6 Jun 2023 16:57:10 +0800
developer7e2761e2023-10-12 08:11:13 +08004Subject: [PATCH 51/98] wifi: mt76: mt7996: add support for runtime set in-band
5 discovery
developer064da3c2023-06-13 15:57:26 +08006
7with this patch, AP can runtime set inband discovery via hostapd_cli
8
9Usage:
10Enable FILS: hostapd_cli -i [interface] inband_discovery 2 20
11Enable UBPR: hostapd_cli -i [interface] inband_discovery 1 20
12Disable inband discovery: hostapd_cli -i [interface] inband_discovery 0 0
13
14Signed-off-by: MeiChia Chiu <MeiChia.Chiu@mediatek.com>
15---
16 mt7996/mcu.c | 5 ++---
17 1 file changed, 2 insertions(+), 3 deletions(-)
18
19diff --git a/mt7996/mcu.c b/mt7996/mcu.c
developer7e2761e2023-10-12 08:11:13 +080020index c87cb1a..722c435 100644
developer064da3c2023-06-13 15:57:26 +080021--- a/mt7996/mcu.c
22+++ b/mt7996/mcu.c
developer7e2761e2023-10-12 08:11:13 +080023@@ -2484,8 +2484,7 @@ int mt7996_mcu_beacon_inband_discov(struct mt7996_dev *dev,
developer064da3c2023-06-13 15:57:26 +080024 if (IS_ERR(rskb))
25 return PTR_ERR(rskb);
26
27- if (changed & BSS_CHANGED_FILS_DISCOVERY &&
28- vif->bss_conf.fils_discovery.max_interval) {
29+ if (changed & BSS_CHANGED_FILS_DISCOVERY) {
30 interval = vif->bss_conf.fils_discovery.max_interval;
31 skb = ieee80211_get_fils_discovery_tmpl(hw, vif);
32 } else if (changed & BSS_CHANGED_UNSOL_BCAST_PROBE_RESP &&
developer7e2761e2023-10-12 08:11:13 +080033@@ -2521,7 +2520,7 @@ int mt7996_mcu_beacon_inband_discov(struct mt7996_dev *dev,
developer064da3c2023-06-13 15:57:26 +080034 discov->tx_type = !!(changed & BSS_CHANGED_FILS_DISCOVERY);
35 discov->tx_interval = interval;
36 discov->prob_rsp_len = cpu_to_le16(MT_TXD_SIZE + skb->len);
37- discov->enable = true;
38+ discov->enable = !!(interval);
39 discov->wcid = cpu_to_le16(MT7996_WTBL_RESERVED);
40
41 buf = (u8 *)tlv + sizeof(*discov);
42--
developer7e2761e2023-10-12 08:11:13 +0800432.18.0
developer064da3c2023-06-13 15:57:26 +080044