]> git.baikalelectronics.ru Git - kernel.git/commitdiff
mt76: mt7615: fix hw_scan with ssid_type for specified SSID only
authorSean Wang <sean.wang@mediatek.com>
Fri, 22 May 2020 07:10:24 +0000 (09:10 +0200)
committerFelix Fietkau <nbd@nbd.name>
Thu, 28 May 2020 15:57:24 +0000 (17:57 +0200)
Fix hw_scan with ssid_type for specified SSID only

The definition for ssid_type in current firmware is that
ssid_type BIT(2) set actually for specified SSID + wildcard SSID.
ssid_type BIT(2) and ssid_type_ext BIT(0) both set actually for
specified SSID only;

Signed-off-by: Sean Wang <sean.wang@mediatek.com>
Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
drivers/net/wireless/mediatek/mt76/mt7615/mcu.c
drivers/net/wireless/mediatek/mt76/mt7615/mcu.h

index 14c2b5d7dbbd63862210219978a77d76519f0580..6e869b8c5e266ff247eb31fa58cf4ffa59a25047 100644 (file)
@@ -2898,6 +2898,7 @@ int mt7615_mcu_hw_scan(struct mt7615_phy *phy, struct ieee80211_vif *vif,
                n_ssids++;
        }
        req->ssid_type = n_ssids ? BIT(2) : BIT(0);
+       req->ssid_type_ext = n_ssids ? BIT(0) : 0;
        req->ssids_num = n_ssids;
 
        /* increase channel time for passive scan */
index fd40d99f5a23bf95126a69236ab92a1a51052fac..2314d0b23af15cd2a8420ae8062f214842b53ad3 100644 (file)
@@ -327,7 +327,8 @@ struct mt7615_hw_scan_req {
                       */
        u8 ssid_type; /* BIT(0) wildcard SSID
                       * BIT(1) P2P wildcard SSID
-                      * BIT(2) specified SSID
+                      * BIT(2) specified SSID + wildcard SSID
+                      * BIT(2) + ssid_type_ext BIT(0) specified SSID only
                       */
        u8 ssids_num;
        u8 probe_req_num; /* Number of probe request for each SSID */
@@ -362,7 +363,8 @@ struct mt7615_hw_scan_req {
        struct mt7615_mcu_scan_ssid ext_ssids[6];
        u8 bssid[ETH_ALEN];
        u8 random_mac[ETH_ALEN]; /* valid when BIT(1) in scan_func is set. */
-       u8 pad[64];
+       u8 pad[63];
+       u8 ssid_type_ext;
 } __packed;
 
 #define SCAN_DONE_EVENT_MAX_CHANNEL_NUM        64