developer | 064da3c | 2023-06-13 15:57:26 +0800 | [diff] [blame] | 1 | From 0d4c8fc47472e0acb7f823f483bc8b83c8a9f235 Mon Sep 17 00:00:00 2001 |
| 2 | From: MeiChia Chiu <meichia.chiu@mediatek.com> |
| 3 | Date: Tue, 6 Jun 2023 16:57:10 +0800 |
| 4 | Subject: [PATCH 1015/1015] wifi: mt76: mt7996: add support for runtime set |
| 5 | in-band discovery |
| 6 | |
| 7 | with this patch, AP can runtime set inband discovery via hostapd_cli |
| 8 | |
| 9 | Usage: |
| 10 | Enable FILS: hostapd_cli -i [interface] inband_discovery 2 20 |
| 11 | Enable UBPR: hostapd_cli -i [interface] inband_discovery 1 20 |
| 12 | Disable inband discovery: hostapd_cli -i [interface] inband_discovery 0 0 |
| 13 | |
| 14 | Signed-off-by: MeiChia Chiu <MeiChia.Chiu@mediatek.com> |
| 15 | --- |
| 16 | mt7996/mcu.c | 5 ++--- |
| 17 | 1 file changed, 2 insertions(+), 3 deletions(-) |
| 18 | |
| 19 | diff --git a/mt7996/mcu.c b/mt7996/mcu.c |
| 20 | index 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 | -- |
| 43 | 2.39.2 |
| 44 | |