| From a928c6df5edd9920b4293de6d1216461952aec27 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 51/98] 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 c87cb1a..722c435 100644 |
| --- a/mt7996/mcu.c |
| +++ b/mt7996/mcu.c |
| @@ -2484,8 +2484,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 && |
| @@ -2521,7 +2520,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 |
| |