mirror of
https://github.com/outbackdingo/mt76.git
synced 2026-10-24 05:16:57 +00:00
wifi: mt76: connac: add NAN connection type
Introduce a dedicated NAN connection type for connac firmware and use it for NAN interface device, BSS and station records. Add the common NAN MCU command and event IDs used by mt7925. Co-developed-by: Stella Liu <[email protected]> Signed-off-by: Stella Liu <[email protected]> Co-developed-by: Jeremy Yu <[email protected]> Signed-off-by: Jeremy Yu <[email protected]> Signed-off-by: Sean Wang <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Felix Fietkau <[email protected]>
This commit is contained in:
@@ -465,6 +465,10 @@ void mt76_connac_mcu_sta_basic_tlv(struct mt76_dev *dev, struct sk_buff *skb,
|
|||||||
basic->conn_type = cpu_to_le32(CONNECTION_IBSS_ADHOC);
|
basic->conn_type = cpu_to_le32(CONNECTION_IBSS_ADHOC);
|
||||||
basic->aid = cpu_to_le16(link_sta->sta->aid);
|
basic->aid = cpu_to_le16(link_sta->sta->aid);
|
||||||
break;
|
break;
|
||||||
|
case NL80211_IFTYPE_NAN:
|
||||||
|
case NL80211_IFTYPE_NAN_DATA:
|
||||||
|
basic->conn_type = cpu_to_le32(CONNECTION_NAN);
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
WARN_ON(1);
|
WARN_ON(1);
|
||||||
break;
|
break;
|
||||||
@@ -1260,6 +1264,11 @@ int mt76_connac_mcu_uni_add_dev(struct mt76_phy *phy,
|
|||||||
case NL80211_IFTYPE_ADHOC:
|
case NL80211_IFTYPE_ADHOC:
|
||||||
basic_req.basic.conn_type = cpu_to_le32(CONNECTION_IBSS_ADHOC);
|
basic_req.basic.conn_type = cpu_to_le32(CONNECTION_IBSS_ADHOC);
|
||||||
break;
|
break;
|
||||||
|
case NL80211_IFTYPE_NAN:
|
||||||
|
case NL80211_IFTYPE_NAN_DATA:
|
||||||
|
basic_req.basic.conn_type = cpu_to_le32(CONNECTION_NAN);
|
||||||
|
basic_req.basic.conn_state = !enable;
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
WARN_ON(1);
|
WARN_ON(1);
|
||||||
break;
|
break;
|
||||||
@@ -1670,6 +1679,11 @@ int mt76_connac_mcu_uni_add_bss(struct mt76_phy *phy,
|
|||||||
case NL80211_IFTYPE_ADHOC:
|
case NL80211_IFTYPE_ADHOC:
|
||||||
basic_req.basic.conn_type = cpu_to_le32(CONNECTION_IBSS_ADHOC);
|
basic_req.basic.conn_type = cpu_to_le32(CONNECTION_IBSS_ADHOC);
|
||||||
break;
|
break;
|
||||||
|
case NL80211_IFTYPE_NAN:
|
||||||
|
case NL80211_IFTYPE_NAN_DATA:
|
||||||
|
basic_req.basic.conn_type = cpu_to_le32(CONNECTION_NAN);
|
||||||
|
basic_req.basic.active = enable;
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
WARN_ON(1);
|
WARN_ON(1);
|
||||||
break;
|
break;
|
||||||
|
|||||||
@@ -902,6 +902,7 @@ enum {
|
|||||||
#define NETWORK_P2P BIT(17)
|
#define NETWORK_P2P BIT(17)
|
||||||
#define NETWORK_IBSS BIT(18)
|
#define NETWORK_IBSS BIT(18)
|
||||||
#define NETWORK_WDS BIT(21)
|
#define NETWORK_WDS BIT(21)
|
||||||
|
#define NETWORK_NAN BIT(22)
|
||||||
|
|
||||||
#define SCAN_FUNC_RANDOM_MAC BIT(0)
|
#define SCAN_FUNC_RANDOM_MAC BIT(0)
|
||||||
#define SCAN_FUNC_RNR_SCAN BIT(3)
|
#define SCAN_FUNC_RNR_SCAN BIT(3)
|
||||||
@@ -914,6 +915,7 @@ enum {
|
|||||||
#define CONNECTION_IBSS_ADHOC (STA_TYPE_ADHOC | NETWORK_IBSS)
|
#define CONNECTION_IBSS_ADHOC (STA_TYPE_ADHOC | NETWORK_IBSS)
|
||||||
#define CONNECTION_WDS (STA_TYPE_WDS | NETWORK_WDS)
|
#define CONNECTION_WDS (STA_TYPE_WDS | NETWORK_WDS)
|
||||||
#define CONNECTION_INFRA_BC (STA_TYPE_BC | NETWORK_INFRA)
|
#define CONNECTION_INFRA_BC (STA_TYPE_BC | NETWORK_INFRA)
|
||||||
|
#define CONNECTION_NAN (NETWORK_NAN)
|
||||||
|
|
||||||
#define CONN_STATE_DISCONNECT 0
|
#define CONN_STATE_DISCONNECT 0
|
||||||
#define CONN_STATE_CONNECT 1
|
#define CONN_STATE_CONNECT 1
|
||||||
@@ -1101,6 +1103,7 @@ enum {
|
|||||||
MCU_UNI_EVENT_THERMAL = 0x35,
|
MCU_UNI_EVENT_THERMAL = 0x35,
|
||||||
MCU_UNI_EVENT_RSSI_MONITOR = 0x41,
|
MCU_UNI_EVENT_RSSI_MONITOR = 0x41,
|
||||||
MCU_UNI_EVENT_NIC_CAPAB = 0x43,
|
MCU_UNI_EVENT_NIC_CAPAB = 0x43,
|
||||||
|
MCU_UNI_EVENT_NAN = 0x56,
|
||||||
MCU_UNI_EVENT_WED_RRO = 0x57,
|
MCU_UNI_EVENT_WED_RRO = 0x57,
|
||||||
MCU_UNI_EVENT_PER_STA_INFO = 0x6d,
|
MCU_UNI_EVENT_PER_STA_INFO = 0x6d,
|
||||||
MCU_UNI_EVENT_ALL_STA_INFO = 0x6e,
|
MCU_UNI_EVENT_ALL_STA_INFO = 0x6e,
|
||||||
@@ -1349,6 +1352,7 @@ enum {
|
|||||||
MCU_UNI_CMD_FIXED_RATE_TABLE = 0x40,
|
MCU_UNI_CMD_FIXED_RATE_TABLE = 0x40,
|
||||||
MCU_UNI_CMD_RSSI_MONITOR = 0x41,
|
MCU_UNI_CMD_RSSI_MONITOR = 0x41,
|
||||||
MCU_UNI_CMD_TESTMODE_CTRL = 0x46,
|
MCU_UNI_CMD_TESTMODE_CTRL = 0x46,
|
||||||
|
MCU_UNI_CMD_NAN = 0x56,
|
||||||
MCU_UNI_CMD_RRO = 0x57,
|
MCU_UNI_CMD_RRO = 0x57,
|
||||||
MCU_UNI_CMD_OFFCH_SCAN_CTRL = 0x58,
|
MCU_UNI_CMD_OFFCH_SCAN_CTRL = 0x58,
|
||||||
MCU_UNI_CMD_PER_STA_INFO = 0x6d,
|
MCU_UNI_CMD_PER_STA_INFO = 0x6d,
|
||||||
|
|||||||
Reference in New Issue
Block a user