blob: 33432ff48411c0bdae026d205d8927125becf486 [file] [log] [blame]
developer064da3c2023-06-13 15:57:26 +08001From 0d4c8fc47472e0acb7f823f483bc8b83c8a9f235 Mon Sep 17 00:00:00 2001
2From: MeiChia Chiu <meichia.chiu@mediatek.com>
3Date: Tue, 6 Jun 2023 16:57:10 +0800
4Subject: [PATCH 1015/1015] wifi: mt76: mt7996: add support for runtime set
5 in-band discovery
6
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
20index aefbdca6..59f22f6d 100644
21--- a/mt7996/mcu.c
22+++ b/mt7996/mcu.c
23@@ -2438,8 +2438,7 @@ int mt7996_mcu_beacon_inband_discov(struct mt7996_dev *dev,
24 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 &&
33@@ -2475,7 +2474,7 @@ int mt7996_mcu_beacon_inband_discov(struct mt7996_dev *dev,
34 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--
432.39.2
44