wifi: cfg80211: Retrieve PSD information from RNR AP information
authorIlan Peer <ilan.peer@intel.com>
Mon, 19 Jun 2023 13:26:52 +0000 (16:26 +0300)
committerChristian Lamparter <chunkeey@gmail.com>
Sat, 16 Sep 2023 21:57:00 +0000 (23:57 +0200)
Retrieve the Power Spectral Density (PSD) value from RNR AP
information entry and store it so it could be used by the drivers.

PSD value is explained in Section 9.4.2.170 of Draft
P802.11Revme_D2.0.

Signed-off-by: Ilan Peer <ilan.peer@intel.com>
Signed-off-by: Gregory Greenman <gregory.greenman@intel.com>
Link: https://lore.kernel.org/r/20230619161906.067ded2b8fc3.I9f407ab5800cbb07045a0537a513012960ced740@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
include/linux/ieee80211.h

index 8858f88c8e3c36c4289eff9ee83ade3917044114..b4674158a4b970ea59f8b2f2d476ce85f24d4f28 100644 (file)
@@ -4433,6 +4433,9 @@ static inline bool for_each_element_completed(const struct element *element,
 #define IEEE80211_RNR_TBTT_PARAMS_PROBE_ACTIVE                 0x20
 #define IEEE80211_RNR_TBTT_PARAMS_COLOC_AP                     0x40
 
 #define IEEE80211_RNR_TBTT_PARAMS_PROBE_ACTIVE                 0x20
 #define IEEE80211_RNR_TBTT_PARAMS_COLOC_AP                     0x40
 
+#define IEEE80211_RNR_TBTT_PARAMS_PSD_NO_LIMIT                 127
+#define IEEE80211_RNR_TBTT_PARAMS_PSD_RESERVED                 -128
+
 struct ieee80211_neighbor_ap_info {
        u8 tbtt_info_hdr;
        u8 tbtt_info_len;
 struct ieee80211_neighbor_ap_info {
        u8 tbtt_info_hdr;
        u8 tbtt_info_len;
@@ -4468,7 +4471,7 @@ struct ieee80211_tbtt_info_7_8_9 {
 
        /* The following element is optional, structure may not grow */
        u8 bss_params;
 
        /* The following element is optional, structure may not grow */
        u8 bss_params;
-       u8 psd_20;
+       s8 psd_20;
 } __packed;
 
 /* Format of the TBTT information element if it has >= 11 bytes */
 } __packed;
 
 /* Format of the TBTT information element if it has >= 11 bytes */
@@ -4479,7 +4482,7 @@ struct ieee80211_tbtt_info_ge_11 {
 
        /* The following elements are optional, structure may grow */
        u8 bss_params;
 
        /* The following elements are optional, structure may grow */
        u8 bss_params;
-       u8 psd_20;
+       s8 psd_20;
        struct ieee80211_rnr_mld_params mld_params;
 } __packed;
 
        struct ieee80211_rnr_mld_params mld_params;
 } __packed;