Skip to content

Commit

Permalink
mt76: mt7615: fix hw_scan with ssid_type for specified SSID only
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Sean Wang authored and Felix Fietkau committed May 28, 2020
1 parent 6f4bd85 commit eca0265
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
1 change: 1 addition & 0 deletions drivers/net/wireless/mediatek/mt76/mt7615/mcu.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
Expand Down
6 changes: 4 additions & 2 deletions drivers/net/wireless/mediatek/mt76/mt7615/mcu.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit eca0265

Please sign in to comment.