ieee80211: Support parsing TPC report element in action frames
authorAndrei Otcheretianski <andrei.otcheretianski@intel.com>
Wed, 30 Jul 2014 11:36:18 +0000 (14:36 +0300)
committerChristian Lamparter <chunkeey@googlemail.com>
Thu, 1 Jan 2015 13:51:56 +0000 (14:51 +0100)
TPC report element is contained in spectrum management's tpc report
action frames and in radio measurement's link measurement report
action frames. Add a function which checks whether an action frame
contains this element. This may be needed by the drivers in order
to set the correct tx power value in these frames.

Signed-off-by: Andrei Otcheretianski <andrei.otcheretianski@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Christian Lamparter <chunkeey@googlemail.com>
include/linux/ieee80211.h

index 2d72caecc308d48684315673f67960500402b523..7eb1db17a019202745b6aaef62e77983511f442d 100644 (file)
@@ -842,6 +842,16 @@ enum ieee80211_vht_opmode_bits {
 
 #define WLAN_SA_QUERY_TR_ID_LEN 2
 
+/**
+ * struct ieee80211_tpc_report_ie
+ *
+ * This structure refers to "TPC Report element"
+ */
+struct ieee80211_tpc_report_ie {
+       u8 tx_power;
+       u8 link_margin;
+} __packed;
+
 struct ieee80211_mgmt {
        __le16 frame_control;
        __le16 duration;
@@ -977,6 +987,13 @@ struct ieee80211_mgmt {
                                        u8 action_code;
                                        u8 operating_mode;
                                } __packed vht_opmode_notif;
+                               struct {
+                                       u8 action_code;
+                                       u8 dialog_token;
+                                       u8 tpc_elem_id;
+                                       u8 tpc_elem_length;
+                                       struct ieee80211_tpc_report_ie tpc;
+                               } __packed tpc_report;
                        } u;
                } __packed action;
        } u;
@@ -1885,6 +1902,7 @@ enum ieee80211_category {
        WLAN_CATEGORY_DLS = 2,
        WLAN_CATEGORY_BACK = 3,
        WLAN_CATEGORY_PUBLIC = 4,
+       WLAN_CATEGORY_RADIO_MEASUREMENT = 5,
        WLAN_CATEGORY_HT = 7,
        WLAN_CATEGORY_SA_QUERY = 8,
        WLAN_CATEGORY_PROTECTED_DUAL_OF_ACTION = 9,