History

Merge tag 'mac80211-next-for-net-next-2020-12-11' of git://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211-next

Johannes Berg says: ==================== A new set of wireless changes: * validate key indices for key deletion * more preamble support in mac80211 * various 6 GHz scan fixes/improvements * a common SAR power limitations API * various small fixes & code improvements * tag 'mac80211-next-for-net-next-2020-12-11' of git://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211-next: (35 commits) mac80211: add ieee80211_set_sar_specs nl80211: add common API to configure SAR power limitations mac80211: fix a mistake check for rx_stats update mac80211: mlme: save ssid info to ieee80211_bss_conf while assoc mac80211: Update rate control on channel change mac80211: don't filter out beacons once we start CSA mac80211: Fix calculation of minimal channel width mac80211: ignore country element TX power on 6 GHz mac80211: use bitfield helpers for BA session action frames mac80211: support Rx timestamp calculation for all preamble types mac80211: don't set set TDLS STA bandwidth wider than possible mac80211: support driver-based disconnect with reconnect hint cfg80211: support immediate reconnect request hint mac80211: use struct assignment for he_obss_pd cfg80211: remove struct ieee80211_he_bss_color nl80211: validate key indexes for cfg80211_registered_device cfg80211: include block-tx flag in channel switch started event mac80211: disallow band-switch during CSA ieee80211: update reduced neighbor report TBTT info length cfg80211: Save the regulatory domain when setting custom regulatory ... ====================

Jakub Kicinski committed 5 years ago

Commit 00f77632 parents 46d5e62 c534e0933 files · +1041 −227Browse files

Showing the changes to include/uapi/linux (2 of 33 files). Show all

Unified · Split

2 files
  1. include/uapi/linux/nl80211.h +113 −1
  2. include/uapi/linux/rfkill.h +15 −1
include/uapi/linux/nl80211.h+113−1
@@ -1178,6 +1178,10 @@ · 1177 unmodified lines
11781178 * includes the contents of the frame. %NL80211_ATTR_ACK flag is included
11791179 * if the recipient acknowledged the frame.
11801180 *
1181+ * @NL80211_CMD_SET_SAR_SPECS: SAR power limitation configuration is
1182+ * passed using %NL80211_ATTR_SAR_SPEC. %NL80211_ATTR_WIPHY is used to
1183+ * specify the wiphy index to be applied to.
1184+ *
11811185 * @NL80211_CMD_MAX: highest used command number
11821186 * @__NL80211_CMD_AFTER_LAST: internal use
11831187 */
@@ -1408,6 +1412,8 @@ enum nl80211_commands { · 224 unmodified lines
14081412
14091413 NL80211_CMD_CONTROL_PORT_FRAME_TX_STATUS,
14101414
1415+ NL80211_CMD_SET_SAR_SPECS,
1416+
14111417 /* add new commands above here */
14121418
14131419 /* used to define NL80211_CMD_MAX below */
@@ -2079,7 +2085,8 @@ enum nl80211_commands { · 665 unmodified lines
20792085 * until the channel switch event.
20802086 * @NL80211_ATTR_CH_SWITCH_BLOCK_TX: flag attribute specifying that transmission
20812087 * must be blocked on the current channel (before the channel switch
2082− * operation).
2088+ * operation). Also included in the channel switch started event if quiet
2089+ * was requested by the AP.
20832090 * @NL80211_ATTR_CSA_IES: Nested set of attributes containing the IE information
20842091 * for the time while performing a channel switch.
20852092 * @NL80211_ATTR_CNTDWN_OFFS_BEACON: An array of offsets (u16) to the channel
@@ -2534,6 +2541,15 @@ enum nl80211_commands { · 448 unmodified lines
25342541 * This is a u8 attribute that encapsulates one of the values from
25352542 * &enum nl80211_sae_pwe_mechanism.
25362543 *
2544+ * @NL80211_ATTR_SAR_SPEC: SAR power limitation specification when
2545+ * used with %NL80211_CMD_SET_SAR_SPECS. The message contains fields
2546+ * of %nl80211_sar_attrs which specifies the sar type and related
2547+ * sar specs. Sar specs contains array of %nl80211_sar_specs_attrs.
2548+ *
2549+ * @NL80211_ATTR_RECONNECT_REQUESTED: flag attribute, used with deauth and
2550+ * disassoc events to indicate that an immediate reconnect to the AP
2551+ * is desired.
2552+ *
25372553 * @NUM_NL80211_ATTR: total number of nl80211_attrs available
25382554 * @NL80211_ATTR_MAX: highest attribute number currently defined
25392555 * @__NL80211_ATTR_AFTER_LAST: internal use
@@ -3025,6 +3041,10 @@ enum nl80211_attrs { · 485 unmodified lines
30253041
30263042 NL80211_ATTR_SAE_PWE,
30273043
3044+ NL80211_ATTR_RECONNECT_REQUESTED,
3045+
3046+ NL80211_ATTR_SAR_SPEC,
3047+
30283048 /* add attributes here, update the policy in nl80211.c */
30293049
30303050 __NL80211_ATTR_AFTER_LAST,
@@ -7156,4 +7176,96 @@ enum nl80211_sae_pwe_mechanism { · 4125 unmodified lines
71567176 NL80211_SAE_PWE_HASH_TO_ELEMENT,
71577177 NL80211_SAE_PWE_BOTH,
71587178 };
7179+
7180+/**
7181+ * enum nl80211_sar_type - type of SAR specs
7182+ *
7183+ * @NL80211_SAR_TYPE_POWER: power limitation specified in 0.25dBm unit
7184+ *
7185+ */
7186+enum nl80211_sar_type {
7187+ NL80211_SAR_TYPE_POWER,
7188+
7189+ /* add new type here */
7190+
7191+ /* Keep last */
7192+ NUM_NL80211_SAR_TYPE,
7193+};
7194+
7195+/**
7196+ * enum nl80211_sar_attrs - Attributes for SAR spec
7197+ *
7198+ * @NL80211_SAR_ATTR_TYPE: the SAR type as defined in &enum nl80211_sar_type.
7199+ *
7200+ * @NL80211_SAR_ATTR_SPECS: Nested array of SAR power
7201+ * limit specifications. Each specification contains a set
7202+ * of %nl80211_sar_specs_attrs.
7203+ *
7204+ * For SET operation, it contains array of %NL80211_SAR_ATTR_SPECS_POWER
7205+ * and %NL80211_SAR_ATTR_SPECS_RANGE_INDEX.
7206+ *
7207+ * For sar_capa dump, it contains array of
7208+ * %NL80211_SAR_ATTR_SPECS_START_FREQ
7209+ * and %NL80211_SAR_ATTR_SPECS_END_FREQ.
7210+ *
7211+ * @__NL80211_SAR_ATTR_LAST: Internal
7212+ * @NL80211_SAR_ATTR_MAX: highest sar attribute
7213+ *
7214+ * These attributes are used with %NL80211_CMD_SET_SAR_SPEC
7215+ */
7216+enum nl80211_sar_attrs {
7217+ __NL80211_SAR_ATTR_INVALID,
7218+
7219+ NL80211_SAR_ATTR_TYPE,
7220+ NL80211_SAR_ATTR_SPECS,
7221+
7222+ __NL80211_SAR_ATTR_LAST,
7223+ NL80211_SAR_ATTR_MAX = __NL80211_SAR_ATTR_LAST - 1,
7224+};
7225+
7226+/**
7227+ * enum nl80211_sar_specs_attrs - Attributes for SAR power limit specs
7228+ *
7229+ * @NL80211_SAR_ATTR_SPECS_POWER: Required (s32)value to specify the actual
7230+ * power limit value in units of 0.25 dBm if type is
7231+ * NL80211_SAR_TYPE_POWER. (i.e., a value of 44 represents 11 dBm).
7232+ * 0 means userspace doesn't have SAR limitation on this associated range.
7233+ *
7234+ * @NL80211_SAR_ATTR_SPECS_RANGE_INDEX: Required (u32) value to specify the
7235+ * index of exported freq range table and the associated power limitation
7236+ * is applied to this range.
7237+ *
7238+ * Userspace isn't required to set all the ranges advertised by WLAN driver,
7239+ * and userspace can skip some certain ranges. These skipped ranges don't
7240+ * have SAR limitations, and they are same as setting the
7241+ * %NL80211_SAR_ATTR_SPECS_POWER to any unreasonable high value because any
7242+ * value higher than regulatory allowed value just means SAR power
7243+ * limitation is removed, but it's required to set at least one range.
7244+ * It's not allowed to set duplicated range in one SET operation.
7245+ *
7246+ * Every SET operation overwrites previous SET operation.
7247+ *
7248+ * @NL80211_SAR_ATTR_SPECS_START_FREQ: Required (u32) value to specify the start
7249+ * frequency of this range edge when registering SAR capability to wiphy.
7250+ * It's not a channel center frequency. The unit is kHz.
7251+ *
7252+ * @NL80211_SAR_ATTR_SPECS_END_FREQ: Required (u32) value to specify the end
7253+ * frequency of this range edge when registering SAR capability to wiphy.
7254+ * It's not a channel center frequency. The unit is kHz.
7255+ *
7256+ * @__NL80211_SAR_ATTR_SPECS_LAST: Internal
7257+ * @NL80211_SAR_ATTR_SPECS_MAX: highest sar specs attribute
7258+ */
7259+enum nl80211_sar_specs_attrs {
7260+ __NL80211_SAR_ATTR_SPECS_INVALID,
7261+
7262+ NL80211_SAR_ATTR_SPECS_POWER,
7263+ NL80211_SAR_ATTR_SPECS_RANGE_INDEX,
7264+ NL80211_SAR_ATTR_SPECS_START_FREQ,
7265+ NL80211_SAR_ATTR_SPECS_END_FREQ,
7266+
7267+ __NL80211_SAR_ATTR_SPECS_LAST,
7268+ NL80211_SAR_ATTR_SPECS_MAX = __NL80211_SAR_ATTR_SPECS_LAST - 1,
7269+};
7270+
71597271 #endif /* __LINUX_NL80211_H */
include/uapi/linux/rfkill.h+15−1
@@ -69,6 +69,16 @@ enum rfkill_operation { · 68 unmodified lines
6969 RFKILL_OP_CHANGE_ALL,
7070 };
7171
72+/**
73+ * enum rfkill_hard_block_reasons - hard block reasons
74+ * @RFKILL_HARD_BLOCK_SIGNAL: the hardware rfkill signal is active
75+ * @RFKILL_HARD_BLOCK_NOT_OWNER: the NIC is not owned by the host
76+ */
77+enum rfkill_hard_block_reasons {
78+ RFKILL_HARD_BLOCK_SIGNAL = 1 << 0,
79+ RFKILL_HARD_BLOCK_NOT_OWNER = 1 << 1,
80+};
81+
7282 /**
7383 * struct rfkill_event - events for userspace on /dev/rfkill
7484 * @idx: index of dev rfkill
@@ -76,6 +86,8 @@ enum rfkill_operation { · 1 unmodified line
7686 * @op: operation code
7787 * @hard: hard state (0/1)
7888 * @soft: soft state (0/1)
89+ * @hard_block_reasons: valid if hard is set. One or several reasons from
90+ * &enum rfkill_hard_block_reasons.
7991 *
8092 * Structure used for userspace communication on /dev/rfkill,
8193 * used for events from the kernel and control to the kernel.
@@ -84,7 +96,9 @@ struct rfkill_event { · 2 unmodified lines
8496 __u32 idx;
8597 __u8 type;
8698 __u8 op;
87− __u8 soft, hard;
99+ __u8 soft;
100+ __u8 hard;
101+ __u8 hard_block_reasons;
88102 } __attribute__((packed));
89103
90104 /*