wifi: ieee80211: add more NAN definitions

These will be needed to implement NAN synchronization in mac80211_hwsim.

Signed-off-by: Benjamin Berg <benjamin.berg@intel.com>
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Link: https://patch.msgid.link/20260326121156.ebb52db4c1eb.Ie8142cf92fc8c97c744a7c8b0a94ce3da6ff75ec@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
This commit is contained in:
Benjamin Berg
2026-03-26 12:14:32 +02:00
committed by Johannes Berg
parent 7f0de94ef4
commit 8ea6b92fae
2 changed files with 38 additions and 0 deletions

View File

@@ -37,4 +37,41 @@
#define NAN_DEV_CAPA_NDPE_SUPPORTED 0x08
#define NAN_DEV_CAPA_S3_SUPPORTED 0x10
/* NAN attributes, as defined in Wi-Fi Aware (TM) specification 4.0 Table 42 */
#define NAN_ATTR_MASTER_INDICATION 0x00
#define NAN_ATTR_CLUSTER_INFO 0x01
struct ieee80211_nan_attr {
u8 attr;
__le16 length;
u8 data[];
} __packed;
struct ieee80211_nan_master_indication {
u8 master_pref;
u8 random_factor;
} __packed;
struct ieee80211_nan_anchor_master_info {
union {
__le64 master_rank;
struct {
u8 master_addr[ETH_ALEN];
u8 random_factor;
u8 master_pref;
} __packed;
} __packed;
u8 hop_count;
__le32 ambtt;
} __packed;
#define for_each_nan_attr(_attr, _data, _datalen) \
for (_attr = (const struct ieee80211_nan_attr *)(_data); \
(const u8 *)(_data) + (_datalen) - (const u8 *)_attr >= \
(int)sizeof(*_attr) && \
(const u8 *)(_data) + (_datalen) - (const u8 *)_attr >= \
(int)sizeof(*_attr) + le16_to_cpu(_attr->length); \
_attr = (const struct ieee80211_nan_attr *) \
(_attr->data + le16_to_cpu(_attr->length)))
#endif /* LINUX_IEEE80211_NAN_H */

View File

@@ -2240,6 +2240,7 @@ struct ieee80211_multiple_bssid_configuration {
#define WLAN_OUI_WFA 0x506f9a
#define WLAN_OUI_TYPE_WFA_P2P 9
#define WLAN_OUI_TYPE_WFA_NAN 0x13
#define WLAN_OUI_TYPE_WFA_DPP 0x1A
#define WLAN_OUI_MICROSOFT 0x0050f2
#define WLAN_OUI_TYPE_MICROSOFT_WPA 1