mirror of
https://github.com/outbackdingo/mt76.git
synced 2026-10-24 13:26:48 +00:00
mt76: mt7921: rely on mt76_connac_mcu module for sched_scan and hw_scan
Rely on mt76_connac_mcu module for sched_scan and hw_scan and remove duplicated code Signed-off-by: Lorenzo Bianconi <[email protected]> Signed-off-by: Felix Fietkau <[email protected]>
This commit is contained in:
committed by
Felix Fietkau
parent
2beb9c9530
commit
59e682497d
-116
@@ -386,122 +386,6 @@ struct mt7921_mcu_reg_event {
|
||||
__le32 val;
|
||||
} __packed;
|
||||
|
||||
struct mt7921_mcu_scan_ssid {
|
||||
__le32 ssid_len;
|
||||
u8 ssid[IEEE80211_MAX_SSID_LEN];
|
||||
} __packed;
|
||||
|
||||
struct mt7921_mcu_scan_channel {
|
||||
u8 band; /* 1: 2.4GHz
|
||||
* 2: 5.0GHz
|
||||
* Others: Reserved
|
||||
*/
|
||||
u8 channel_num;
|
||||
} __packed;
|
||||
|
||||
struct mt7921_mcu_scan_match {
|
||||
__le32 rssi_th;
|
||||
u8 ssid[IEEE80211_MAX_SSID_LEN];
|
||||
u8 ssid_len;
|
||||
u8 rsv[3];
|
||||
} __packed;
|
||||
|
||||
struct mt7921_hw_scan_req {
|
||||
u8 seq_num;
|
||||
u8 bss_idx;
|
||||
u8 scan_type; /* 0: PASSIVE SCAN
|
||||
* 1: ACTIVE SCAN
|
||||
*/
|
||||
u8 ssid_type; /* BIT(0) wildcard SSID
|
||||
* BIT(1) P2P wildcard 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 */
|
||||
u8 scan_func; /* BIT(0) Enable random MAC scan
|
||||
* BIT(1) Disable DBDC scan type 1~3.
|
||||
* BIT(2) Use DBDC scan type 3 (dedicated one RF to scan).
|
||||
*/
|
||||
u8 version; /* 0: Not support fields after ies.
|
||||
* 1: Support fields after ies.
|
||||
*/
|
||||
struct mt7921_mcu_scan_ssid ssids[4];
|
||||
__le16 probe_delay_time;
|
||||
__le16 channel_dwell_time; /* channel Dwell interval */
|
||||
__le16 timeout_value;
|
||||
u8 channel_type; /* 0: Full channels
|
||||
* 1: Only 2.4GHz channels
|
||||
* 2: Only 5GHz channels
|
||||
* 3: P2P social channel only (channel #1, #6 and #11)
|
||||
* 4: Specified channels
|
||||
* Others: Reserved
|
||||
*/
|
||||
u8 channels_num; /* valid when channel_type is 4 */
|
||||
/* valid when channels_num is set */
|
||||
struct mt7921_mcu_scan_channel channels[32];
|
||||
__le16 ies_len;
|
||||
u8 ies[MT7921_SCAN_IE_LEN];
|
||||
/* following fields are valid if version > 0 */
|
||||
u8 ext_channels_num;
|
||||
u8 ext_ssids_num;
|
||||
__le16 channel_min_dwell_time;
|
||||
struct mt7921_mcu_scan_channel ext_channels[32];
|
||||
struct mt7921_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[63];
|
||||
u8 ssid_type_ext;
|
||||
} __packed;
|
||||
|
||||
#define SCAN_DONE_EVENT_MAX_CHANNEL_NUM 64
|
||||
struct mt7921_hw_scan_done {
|
||||
u8 seq_num;
|
||||
u8 sparse_channel_num;
|
||||
struct mt7921_mcu_scan_channel sparse_channel;
|
||||
u8 complete_channel_num;
|
||||
u8 current_state;
|
||||
u8 version;
|
||||
u8 pad;
|
||||
__le32 beacon_scan_num;
|
||||
u8 pno_enabled;
|
||||
u8 pad2[3];
|
||||
u8 sparse_channel_valid_num;
|
||||
u8 pad3[3];
|
||||
u8 channel_num[SCAN_DONE_EVENT_MAX_CHANNEL_NUM];
|
||||
/* idle format for channel_idle_time
|
||||
* 0: first bytes: idle time(ms) 2nd byte: dwell time(ms)
|
||||
* 1: first bytes: idle time(8ms) 2nd byte: dwell time(8ms)
|
||||
* 2: dwell time (16us)
|
||||
*/
|
||||
__le16 channel_idle_time[SCAN_DONE_EVENT_MAX_CHANNEL_NUM];
|
||||
/* beacon and probe response count */
|
||||
u8 beacon_probe_num[SCAN_DONE_EVENT_MAX_CHANNEL_NUM];
|
||||
u8 mdrdy_count[SCAN_DONE_EVENT_MAX_CHANNEL_NUM];
|
||||
__le32 beacon_2g_num;
|
||||
__le32 beacon_5g_num;
|
||||
} __packed;
|
||||
|
||||
struct mt7921_sched_scan_req {
|
||||
u8 version;
|
||||
u8 seq_num;
|
||||
u8 stop_on_match;
|
||||
u8 ssids_num;
|
||||
u8 match_num;
|
||||
u8 pad;
|
||||
__le16 ie_len;
|
||||
struct mt7921_mcu_scan_ssid ssids[MT7921_MAX_SCHED_SCAN_SSID];
|
||||
struct mt7921_mcu_scan_match match[MT7921_MAX_SCAN_MATCH];
|
||||
u8 channel_type;
|
||||
u8 channels_num;
|
||||
u8 intervals_num;
|
||||
u8 scan_func;
|
||||
struct mt7921_mcu_scan_channel channels[64];
|
||||
__le16 intervals[MT7921_MAX_SCHED_SCAN_INTERVAL];
|
||||
u8 bss_idx;
|
||||
u8 pad2[64];
|
||||
} __packed;
|
||||
|
||||
struct mt7921_mcu_tx_config {
|
||||
u8 peer_addr[ETH_ALEN];
|
||||
u8 sw;
|
||||
|
||||
Reference in New Issue
Block a user