]> git.ipfire.org Git - thirdparty/iw.git/commitdiff
update nl80211.h
authorJohannes Berg <johannes.berg@intel.com>
Thu, 30 Jul 2020 11:33:23 +0000 (13:33 +0200)
committerJohannes Berg <johannes.berg@intel.com>
Thu, 30 Jul 2020 11:35:35 +0000 (13:35 +0200)
Change-Id: I1d8448ce41d0f65dcd557f09698405b541ce39fd
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
measurements.c
nl80211.h
util.c

index 385143f3e4ae049b88a7322a3d7faa68d8bfeec5..29056c1385cf5dc18dde32e58df63a0d937319ce 100644 (file)
@@ -166,6 +166,8 @@ static int parse_ftm_target(struct nl_msg *msg, char *str, int peer_index)
                case NL80211_CHAN_WIDTH_160:
                        preamble = NL80211_PREAMBLE_VHT;
                        break;
+               default:
+                       return HANDLER_RET_USAGE;
                }
 
                NLA_PUT_U32(msg, NL80211_PMSR_FTM_REQ_ATTR_PREAMBLE, preamble);
index c14666b75e575abf62a46a77f957624ebd30c945..a3ae2b060a55dcf229c161ebbb4c2f3197676585 100644 (file)
--- a/nl80211.h
+++ b/nl80211.h
  * @NL80211_CMD_SET_STATION: Set station attributes for station identified by
  *     %NL80211_ATTR_MAC on the interface identified by %NL80211_ATTR_IFINDEX.
  * @NL80211_CMD_NEW_STATION: Add a station with given attributes to the
- *     the interface identified by %NL80211_ATTR_IFINDEX.
+ *     interface identified by %NL80211_ATTR_IFINDEX.
  * @NL80211_CMD_DEL_STATION: Remove a station identified by %NL80211_ATTR_MAC
  *     or, if no MAC address given, all stations, on the interface identified
  *     by %NL80211_ATTR_IFINDEX. %NL80211_ATTR_MGMT_SUBTYPE and
  * @NL80211_CMD_DEL_MPATH: Delete a mesh path to the destination given by
  *     %NL80211_ATTR_MAC.
  * @NL80211_CMD_NEW_PATH: Add a mesh path with given attributes to the
- *     the interface identified by %NL80211_ATTR_IFINDEX.
+ *     interface identified by %NL80211_ATTR_IFINDEX.
  * @NL80211_CMD_DEL_PATH: Remove a mesh path identified by %NL80211_ATTR_MAC
  *     or, if no MAC address given, all mesh paths, on the interface identified
  *     by %NL80211_ATTR_IFINDEX.
  *     various triggers. These triggers can be configured through this
  *     command with the %NL80211_ATTR_WOWLAN_TRIGGERS attribute. For
  *     more background information, see
- *     http://wireless.kernel.org/en/users/Documentation/WoWLAN.
+ *     https://wireless.wiki.kernel.org/en/users/Documentation/WoWLAN.
  *     The @NL80211_CMD_SET_WOWLAN command can also be used as a notification
  *     from the driver reporting the wakeup reason. In this case, the
  *     @NL80211_ATTR_WOWLAN_TRIGGERS attribute will contain the reason
  * @NL80211_CMD_SET_COALESCE: Configure coalesce rules or clear existing rules.
  *
  * @NL80211_CMD_CHANNEL_SWITCH: Perform a channel switch by announcing the
- *     the new channel information (Channel Switch Announcement - CSA)
+ *     new channel information (Channel Switch Announcement - CSA)
  *     in the beacon for some time (as defined in the
  *     %NL80211_ATTR_CH_SWITCH_COUNT parameter) and then change to the
  *     new channel. Userspace provides the new channel information (using
  *     randomization may be enabled and configured by specifying the
  *     %NL80211_ATTR_MAC and %NL80211_ATTR_MAC_MASK attributes.
  *     If a timeout is requested, use the %NL80211_ATTR_TIMEOUT attribute.
- *     A u64 cookie for further %NL80211_ATTR_COOKIE use is is returned in
+ *     A u64 cookie for further %NL80211_ATTR_COOKIE use is returned in
  *     the netlink extended ack message.
  *
  *     To cancel a measurement, close the socket that requested it.
@@ -1511,7 +1511,7 @@ enum nl80211_commands {
  *     rates as defined by IEEE 802.11 7.3.2.2 but without the length
  *     restriction (at most %NL80211_MAX_SUPP_RATES).
  * @NL80211_ATTR_STA_VLAN: interface index of VLAN interface to move station
- *     to, or the AP interface the station was originally added to to.
+ *     to, or the AP interface the station was originally added to.
  * @NL80211_ATTR_STA_INFO: information about a station, part of station info
  *     given for %NL80211_CMD_GET_STATION, nested attribute containing
  *     info as possible, see &enum nl80211_sta_info.
@@ -2084,7 +2084,7 @@ enum nl80211_commands {
  * @NL80211_ATTR_STA_SUPPORTED_CHANNELS: array of supported channels.
  *
  * @NL80211_ATTR_STA_SUPPORTED_OPER_CLASSES: array of supported
- *      supported operating classes.
+ *      operating classes.
  *
  * @NL80211_ATTR_HANDLE_DFS: A flag indicating whether user space
  *     controls DFS operation in IBSS mode. If the flag is included in
@@ -2395,7 +2395,7 @@ enum nl80211_commands {
  *      nl80211_txq_stats)
  * @NL80211_ATTR_TXQ_LIMIT: Total packet limit for the TXQ queues for this phy.
  *      The smaller of this and the memory limit is enforced.
- * @NL80211_ATTR_TXQ_MEMORY_LIMIT: Total memory memory limit (in bytes) for the
+ * @NL80211_ATTR_TXQ_MEMORY_LIMIT: Total memory limit (in bytes) for the
  *      TXQ queues for this phy. The smaller of this and the packet limit is
  *      enforced.
  * @NL80211_ATTR_TXQ_QUANTUM: TXQ scheduler quantum (bytes). Number of bytes
@@ -2502,6 +2502,9 @@ enum nl80211_commands {
  *     first channel segment specified in %NL80211_ATTR_CENTER_FREQ1.
  * @NL80211_ATTR_SCAN_FREQ_KHZ: nested attribute with KHz frequencies
  *
+ * @NL80211_ATTR_HE_6GHZ_CAPABILITY: HE 6 GHz Band Capability element (from
+ *     association request when used with NL80211_CMD_NEW_STATION).
+ *
  * @NUM_NL80211_ATTR: total number of nl80211_attrs available
  * @NL80211_ATTR_MAX: highest attribute number currently defined
  * @__NL80211_ATTR_AFTER_LAST: internal use
@@ -2982,6 +2985,8 @@ enum nl80211_attrs {
        NL80211_ATTR_CENTER_FREQ1_OFFSET,
        NL80211_ATTR_SCAN_FREQ_KHZ,
 
+       NL80211_ATTR_HE_6GHZ_CAPABILITY,
+
        /* add attributes here, update the policy in nl80211.c */
 
        __NL80211_ATTR_AFTER_LAST,
@@ -3365,6 +3370,8 @@ enum nl80211_sta_bss_param {
  * @NL80211_STA_INFO_AIRTIME_LINK_METRIC: airtime link metric for mesh station
  * @NL80211_STA_INFO_ASSOC_AT_BOOTTIME: Timestamp (CLOCK_BOOTTIME, nanoseconds)
  *     of STA's association
+ * @NL80211_STA_INFO_CONNECTED_TO_AS: set to true if STA has a path to a
+ *     authentication server (u8, 0 or 1)
  * @__NL80211_STA_INFO_AFTER_LAST: internal
  * @NL80211_STA_INFO_MAX: highest possible station info attribute
  */
@@ -3412,6 +3419,7 @@ enum nl80211_sta_info {
        NL80211_STA_INFO_AIRTIME_WEIGHT,
        NL80211_STA_INFO_AIRTIME_LINK_METRIC,
        NL80211_STA_INFO_ASSOC_AT_BOOTTIME,
+       NL80211_STA_INFO_CONNECTED_TO_AS,
 
        /* keep last */
        __NL80211_STA_INFO_AFTER_LAST,
@@ -3560,6 +3568,8 @@ enum nl80211_mpath_info {
  *     defined in HE capabilities IE
  * @NL80211_BAND_IFTYPE_ATTR_MAX: highest band HE capability attribute currently
  *     defined
+ * @NL80211_BAND_IFTYPE_ATTR_HE_6GHZ_CAPA: HE 6GHz band capabilities (__le16),
+ *     given for all 6 GHz band channels
  * @__NL80211_BAND_IFTYPE_ATTR_AFTER_LAST: internal use
  */
 enum nl80211_band_iftype_attr {
@@ -3570,6 +3580,7 @@ enum nl80211_band_iftype_attr {
        NL80211_BAND_IFTYPE_ATTR_HE_CAP_PHY,
        NL80211_BAND_IFTYPE_ATTR_HE_CAP_MCS_SET,
        NL80211_BAND_IFTYPE_ATTR_HE_CAP_PPE,
+       NL80211_BAND_IFTYPE_ATTR_HE_6GHZ_CAPA,
 
        /* keep last */
        __NL80211_BAND_IFTYPE_ATTR_AFTER_LAST,
@@ -4228,6 +4239,16 @@ enum nl80211_mesh_power_mode {
  *     field.  If left unset then the mesh formation field will only
  *     advertise such if there is an active root mesh path.
  *
+ * @NL80211_MESHCONF_NOLEARN: Try to avoid multi-hop path discovery (e.g.
+ *      PREQ/PREP for HWMP) if the destination is a direct neighbor. Note that
+ *      this might not be the optimal decision as a multi-hop route might be
+ *      better. So if using this setting you will likely also want to disable
+ *      dot11MeshForwarding and use another mesh routing protocol on top.
+ *
+ * @NL80211_MESHCONF_CONNECTED_TO_AS: If set to true then this mesh STA
+ *     will advertise that it is connected to a authentication server
+ *     in the mesh formation field.
+ *
  * @__NL80211_MESHCONF_ATTR_AFTER_LAST: internal use
  */
 enum nl80211_meshconf_params {
@@ -4261,6 +4282,8 @@ enum nl80211_meshconf_params {
        NL80211_MESHCONF_AWAKE_WINDOW,
        NL80211_MESHCONF_PLINK_TIMEOUT,
        NL80211_MESHCONF_CONNECTED_TO_GATE,
+       NL80211_MESHCONF_NOLEARN,
+       NL80211_MESHCONF_CONNECTED_TO_AS,
 
        /* keep last */
        __NL80211_MESHCONF_ATTR_AFTER_LAST,
@@ -4429,6 +4452,11 @@ enum nl80211_key_mode {
  *     attribute must be provided as well
  * @NL80211_CHAN_WIDTH_5: 5 MHz OFDM channel
  * @NL80211_CHAN_WIDTH_10: 10 MHz OFDM channel
+ * @NL80211_CHAN_WIDTH_1: 1 MHz OFDM channel
+ * @NL80211_CHAN_WIDTH_2: 2 MHz OFDM channel
+ * @NL80211_CHAN_WIDTH_4: 4 MHz OFDM channel
+ * @NL80211_CHAN_WIDTH_8: 8 MHz OFDM channel
+ * @NL80211_CHAN_WIDTH_16: 16 MHz OFDM channel
  */
 enum nl80211_chan_width {
        NL80211_CHAN_WIDTH_20_NOHT,
@@ -4439,6 +4467,11 @@ enum nl80211_chan_width {
        NL80211_CHAN_WIDTH_160,
        NL80211_CHAN_WIDTH_5,
        NL80211_CHAN_WIDTH_10,
+       NL80211_CHAN_WIDTH_1,
+       NL80211_CHAN_WIDTH_2,
+       NL80211_CHAN_WIDTH_4,
+       NL80211_CHAN_WIDTH_8,
+       NL80211_CHAN_WIDTH_16,
 };
 
 /**
@@ -4449,11 +4482,15 @@ enum nl80211_chan_width {
  * @NL80211_BSS_CHAN_WIDTH_20: control channel is 20 MHz wide or compatible
  * @NL80211_BSS_CHAN_WIDTH_10: control channel is 10 MHz wide
  * @NL80211_BSS_CHAN_WIDTH_5: control channel is 5 MHz wide
+ * @NL80211_BSS_CHAN_WIDTH_1: control channel is 1 MHz wide
+ * @NL80211_BSS_CHAN_WIDTH_2: control channel is 2 MHz wide
  */
 enum nl80211_bss_scan_width {
        NL80211_BSS_CHAN_WIDTH_20,
        NL80211_BSS_CHAN_WIDTH_10,
        NL80211_BSS_CHAN_WIDTH_5,
+       NL80211_BSS_CHAN_WIDTH_1,
+       NL80211_BSS_CHAN_WIDTH_2,
 };
 
 /**
@@ -4732,6 +4769,7 @@ enum nl80211_txrate_gi {
  * @NL80211_BAND_5GHZ: around 5 GHz band (4.9 - 5.7 GHz)
  * @NL80211_BAND_60GHZ: around 60 GHz band (58.32 - 69.12 GHz)
  * @NL80211_BAND_6GHZ: around 6 GHz band (5.9 - 7.2 GHz)
+ * @NL80211_BAND_S1GHZ: around 900MHz, supported by S1G PHYs
  * @NUM_NL80211_BANDS: number of bands, avoid using this in userspace
  *     since newer kernel versions may support more bands
  */
@@ -4740,6 +4778,7 @@ enum nl80211_band {
        NL80211_BAND_5GHZ,
        NL80211_BAND_60GHZ,
        NL80211_BAND_6GHZ,
+       NL80211_BAND_S1GHZ,
 
        NUM_NL80211_BANDS,
 };
@@ -5388,6 +5427,8 @@ enum plink_actions {
 
 #define NL80211_KCK_LEN                        16
 #define NL80211_KEK_LEN                        16
+#define NL80211_KCK_EXT_LEN            24
+#define NL80211_KEK_EXT_LEN            32
 #define NL80211_REPLAY_CTR_LEN         8
 
 /**
@@ -5396,6 +5437,7 @@ enum plink_actions {
  * @NL80211_REKEY_DATA_KEK: key encryption key (binary)
  * @NL80211_REKEY_DATA_KCK: key confirmation key (binary)
  * @NL80211_REKEY_DATA_REPLAY_CTR: replay counter (binary)
+ * @NL80211_REKEY_DATA_AKM: AKM data (OUI, suite type)
  * @NUM_NL80211_REKEY_DATA: number of rekey attributes (internal)
  * @MAX_NL80211_REKEY_DATA: highest rekey attribute (internal)
  */
@@ -5404,6 +5446,7 @@ enum nl80211_rekey_data {
        NL80211_REKEY_DATA_KEK,
        NL80211_REKEY_DATA_KCK,
        NL80211_REKEY_DATA_REPLAY_CTR,
+       NL80211_REKEY_DATA_AKM,
 
        /* keep last */
        NUM_NL80211_REKEY_DATA,
@@ -5624,7 +5667,7 @@ enum nl80211_feature_flags {
  * enum nl80211_ext_feature_index - bit index of extended features.
  * @NL80211_EXT_FEATURE_VHT_IBSS: This driver supports IBSS with VHT datarates.
  * @NL80211_EXT_FEATURE_RRM: This driver supports RRM. When featured, user can
- *     can request to use RRM (see %NL80211_ATTR_USE_RRM) with
+ *     request to use RRM (see %NL80211_ATTR_USE_RRM) with
  *     %NL80211_CMD_ASSOCIATE and %NL80211_CMD_CONNECT requests, which will set
  *     the ASSOC_REQ_USE_RRM flag in the association request even if
  *     NL80211_FEATURE_QUIET is not advertized.
@@ -5761,6 +5804,9 @@ enum nl80211_feature_flags {
  * @NL80211_EXT_FEATURE_CONTROL_PORT_OVER_NL80211_TX_STATUS: The driver
  *     can report tx status for control port over nl80211 tx operations.
  *
+ * @NL80211_EXT_FEATURE_OPERATING_CHANNEL_VALIDATION: Driver supports Operating
+ *     Channel Validation (OCV) when using driver's SME for RSNA handshakes.
+ *
  * @NUM_NL80211_EXT_FEATURES: number of extended features.
  * @MAX_NL80211_EXT_FEATURES: highest extended feature index.
  */
@@ -5816,6 +5862,7 @@ enum nl80211_ext_feature_index {
        NL80211_EXT_FEATURE_BEACON_PROTECTION_CLIENT,
        NL80211_EXT_FEATURE_SCAN_FREQ_KHZ,
        NL80211_EXT_FEATURE_CONTROL_PORT_OVER_NL80211_TX_STATUS,
+       NL80211_EXT_FEATURE_OPERATING_CHANNEL_VALIDATION,
 
        /* add new features before the definition below */
        NUM_NL80211_EXT_FEATURES,
@@ -6033,7 +6080,7 @@ enum nl80211_dfs_state {
 };
 
 /**
- * enum enum nl80211_protocol_features - nl80211 protocol features
+ * enum nl80211_protocol_features - nl80211 protocol features
  * @NL80211_PROTOCOL_FEATURE_SPLIT_WIPHY_DUMP: nl80211 supports splitting
  *     wiphy dumps (if requested by the application with the attribute
  *     %NL80211_ATTR_SPLIT_WIPHY_DUMP. Also supported is filtering the
diff --git a/util.c b/util.c
index ac6a96dc2851a36ff6fd5c8fe03d42dc8532d03f..195fc0fb1c164945746ff1e8f6b5c25ae8854221 100644 (file)
--- a/util.c
+++ b/util.c
@@ -503,6 +503,13 @@ static int parse_freqs(struct chandef *chandef, int argc, char **argv,
        case NL80211_CHAN_WIDTH_160:
                need_cf1 = true;
                break;
+       case NL80211_CHAN_WIDTH_1:
+       case NL80211_CHAN_WIDTH_2:
+       case NL80211_CHAN_WIDTH_4:
+       case NL80211_CHAN_WIDTH_8:
+       case NL80211_CHAN_WIDTH_16:
+               /* can't happen yet */
+               break;
        }
 
        *parsed += 1;