wifi: cfg80211: use structs for TBTT information access
[carl9170fw.git] / include / linux / ieee80211.h
index bb3b7b948a6bf150061881090417ea61a95c741e..95d219041ae7a24bd0ef66c04b369f70d7d9eda9 100644 (file)
@@ -4412,9 +4412,6 @@ static inline bool for_each_element_completed(const struct element *element,
 #define IEEE80211_AP_INFO_TBTT_HDR_COUNT                       0xF0
 #define IEEE80211_TBTT_INFO_TYPE_TBTT                          0
 #define IEEE80211_TBTT_INFO_TYPE_MLD                           1
-#define IEEE80211_TBTT_INFO_OFFSET_BSSID_BSS_PARAM             9
-#define IEEE80211_TBTT_INFO_OFFSET_BSSID_SSSID_BSS_PARAM       13
-#define IEEE80211_TBTT_INFO_OFFSET_BSSID_SSSID_BSS_PARAM_MLD_PARAM     16
 
 #define IEEE80211_RNR_TBTT_PARAMS_OCT_RECOMMENDED              0x01
 #define IEEE80211_RNR_TBTT_PARAMS_SAME_SSID                    0x02
@@ -4452,6 +4449,28 @@ struct ieee80211_rnr_mld_params {
 #define IEEE80211_RNR_MLD_PARAMS_UPDATES_INCLUDED              0x1000
 #define IEEE80211_RNR_MLD_PARAMS_DISABLED_LINK                 0x2000
 
+/* Format of the TBTT information element if it has 7, 8 or 9 bytes */
+struct ieee80211_tbtt_info_7_8_9 {
+       u8 tbtt_offset;
+       u8 bssid[6];
+
+       /* The following element is optional, structure may not grow */
+       u8 bss_params;
+       u8 psd_20;
+} __packed;
+
+/* Format of the TBTT information element if it has >= 11 bytes */
+struct ieee80211_tbtt_info_ge_11 {
+       u8 tbtt_offset;
+       u8 bssid[6];
+       __le32 short_ssid;
+
+       /* The following elements are optional, structure may grow */
+       u8 bss_params;
+       u8 psd_20;
+       struct ieee80211_rnr_mld_params mld_params;
+} __packed;
+
 /* multi-link device */
 #define IEEE80211_MLD_MAX_NUM_LINKS    15