]> Git Repo - J-linux.git/commitdiff
Merge tag 'wireless-next-2023-12-18' of git://git.kernel.org/pub/scm/linux/kernel...
authorJakub Kicinski <[email protected]>
Tue, 19 Dec 2023 00:17:33 +0000 (16:17 -0800)
committerJakub Kicinski <[email protected]>
Tue, 19 Dec 2023 00:17:34 +0000 (16:17 -0800)
Kalle Valo says:

====================
wireless-next patches for v6.8

The second features pull request for v6.8. A bigger one this time with
changes both to stack and drivers. We have a new Wifi band RFI (WBRF)
mitigation feature for which we pulled an immutable branch shared with
other subsystems. And, as always, other new features and bug fixes all
over.

Major changes:

cfg80211/mac80211
 * AMD ACPI based Wifi band RFI (WBRF) mitigation feature
 * Basic Service Set (BSS) usage reporting
 * TID to link mapping support
 * mac80211 hardware flag to disallow puncturing

iwlwifi
 * new debugfs file fw_dbg_clear

mt76
 * NVMEM EEPROM improvements
 * mt7996 Extremely High Throughpu (EHT) improvements
 * mt7996 Wireless Ethernet Dispatcher (WED) support
 * mt7996 36-bit DMA support

ath12k
 * support one MSI vector
 * WCN7850: support AP mode

* tag 'wireless-next-2023-12-18' of git://git.kernel.org/pub/scm/linux/kernel/git/wireless/wireless-next: (207 commits)
  wifi: mt76: mt7996: Use DECLARE_FLEX_ARRAY() and fix -Warray-bounds warnings
  wifi: ath11k: workaround too long expansion sparse warnings
  Revert "wifi: ath12k: use ATH12K_PCI_IRQ_DP_OFFSET for DP IRQ"
  wifi: rt2x00: remove useless code in rt2x00queue_create_tx_descriptor()
  wifi: rtw89: only reset BB/RF for existing WiFi 6 chips while starting up
  wifi: rtw89: add DBCC H2C to notify firmware the status
  wifi: rtw89: mac: add suffix _ax to MAC functions
  wifi: rtw89: mac: add flags to check if CMAC and DMAC are enabled
  wifi: rtw89: 8922a: add power on/off functions
  wifi: rtw89: add XTAL SI for WiFi 7 chips
  wifi: rtw89: phy: print out RFK log with formatted string
  wifi: rtw89: parse and print out RFK log from C2H events
  wifi: rtw89: add C2H event handlers of RFK log and report
  wifi: rtw89: load RFK log format string from firmware file
  wifi: rtw89: fw: add version field to BB MCU firmware element
  wifi: rtw89: fw: load TX power track tables from fw_element
  wifi: mwifiex: configure BSSID consistently when starting AP
  wifi: mwifiex: add extra delay for firmware ready
  wifi: mac80211: sta_info.c: fix sentence grammar
  wifi: mac80211: rx.c: fix sentence grammar
  ...
====================

Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Jakub Kicinski <[email protected]>
1  2 
drivers/net/wireless/intel/iwlwifi/mvm/mld-sta.c
drivers/net/wireless/mediatek/mt76/mt7921/mcu.c
drivers/net/wireless/mediatek/mt76/mt7925/main.c
include/net/cfg80211.h
net/mac80211/driver-ops.h
net/wireless/core.h
net/wireless/nl80211.c

index 6af606e5da657ed5d860f7cf67726424480ce595,d7a0ce2bb0f7b919f663e31ec8eaec7b90f81eb8..1628bf55458fcb0bf7d812970d619e815a89c950
@@@ -707,10 -707,8 +707,10 @@@ int iwl_mvm_mld_add_sta(struct iwl_mvm 
                        rcu_dereference_protected(mvm_sta->link[link_id],
                                                  lockdep_is_held(&mvm->mutex));
  
 -              if (WARN_ON(!link_conf || !mvm_link_sta))
 +              if (WARN_ON(!link_conf || !mvm_link_sta)) {
 +                      ret = -EINVAL;
                        goto err;
 +              }
  
                ret = iwl_mvm_mld_cfg_sta(mvm, sta, vif, link_sta, link_conf,
                                          mvm_link_sta);
@@@ -874,6 -872,9 +874,9 @@@ void iwl_mvm_mld_sta_modify_disable_tx(
        cmd.sta_id = cpu_to_le32(mvmsta->deflink.sta_id);
        cmd.disable = cpu_to_le32(disable);
  
+       if (WARN_ON(iwl_mvm_has_no_host_disable_tx(mvm)))
+               return;
        ret = iwl_mvm_send_cmd_pdu(mvm,
                                   WIDE_ID(MAC_CONF_GROUP, STA_DISABLE_TX_CMD),
                                   CMD_ASYNC, sizeof(cmd), &cmd);
index 2cc2d2788f831257980e08cc475cdec0f6b3b4c6,5fcee178b69871c373db5931cba31a4ccdcfa0b1..f5582477c7e4c7464df34a88a77cea78c161084f
@@@ -160,7 -160,7 +160,7 @@@ static voi
  mt7921_mcu_scan_event(struct mt792x_dev *dev, struct sk_buff *skb)
  {
        struct mt76_phy *mphy = &dev->mt76.phy;
-       struct mt792x_phy *phy = (struct mt792x_phy *)mphy->priv;
+       struct mt792x_phy *phy = mphy->priv;
  
        spin_lock_bh(&dev->mt76.lock);
        __skb_queue_tail(&phy->scan_event_list, skb);
@@@ -375,7 -375,6 +375,7 @@@ static int mt7921_load_clc(struct mt792
        int ret, i, len, offset = 0;
        u8 *clc_base = NULL, hw_encap = 0;
  
 +      dev->phy.clc_chan_conf = 0xff;
        if (mt7921_disable_clc ||
            mt76_is_usb(&dev->mt76))
                return 0;
@@@ -1261,15 -1260,19 +1261,19 @@@ int __mt7921_mcu_set_clc(struct mt792x_
                u8 alpha2[2];
                u8 type[2];
                u8 env_6g;
-               u8 rsvd[63];
+               u8 mtcl_conf;
+               u8 rsvd[62];
        } __packed req = {
+               .ver = 1,
                .idx = idx,
                .env = env_cap,
                .env_6g = dev->phy.power_type,
                .acpi_conf = mt792x_acpi_get_flags(&dev->phy),
+               .mtcl_conf = mt792x_acpi_get_mtcl_conf(&dev->phy, alpha2),
        };
        int ret, valid_cnt = 0;
-       u8 i, *pos;
+       u16 buf_len = 0;
+       u8 *pos;
  
        if (!clc)
                return 0;
        if (mt76_find_power_limits_node(&dev->mt76))
                req.cap |= CLC_CAP_DTS_EN;
  
+       buf_len = le16_to_cpu(clc->len) - sizeof(*clc);
        pos = clc->data;
-       for (i = 0; i < clc->nr_country; i++) {
+       while (buf_len > 16) {
                struct mt7921_clc_rule *rule = (struct mt7921_clc_rule *)pos;
                u16 len = le16_to_cpu(rule->len);
+               u16 offset = len + sizeof(*rule);
  
-               pos += len + sizeof(*rule);
+               pos += offset;
+               buf_len -= offset;
                if (rule->alpha2[0] != alpha2[0] ||
                    rule->alpha2[1] != alpha2[1])
                        continue;
index aa918b9b0469f8444ce2fb1f68a5d79b71c53ede,a080df58120f62941dbb9ba7fef4b36f78abe956..8f1075da4903908b5f149e12530d21f6735be07f
@@@ -14,7 -14,7 +14,7 @@@
  static void
  mt7925_init_he_caps(struct mt792x_phy *phy, enum nl80211_band band,
                    struct ieee80211_sband_iftype_data *data,
 -                      enum nl80211_iftype iftype)
 +                  enum nl80211_iftype iftype)
  {
        struct ieee80211_sta_he_cap *he_cap = &data->he_cap;
        struct ieee80211_he_cap_elem *he_cap_elem = &he_cap->he_cap_elem;
@@@ -53,7 -53,7 +53,7 @@@
                IEEE80211_HE_PHY_CAP2_UL_MU_FULL_MU_MIMO |
                IEEE80211_HE_PHY_CAP2_UL_MU_PARTIAL_MU_MIMO;
  
 -      switch (i) {
 +      switch (iftype) {
        case NL80211_IFTYPE_AP:
                he_cap_elem->mac_cap_info[2] |=
                        IEEE80211_HE_MAC_CAP2_BSR;
  
  static void
  mt7925_init_eht_caps(struct mt792x_phy *phy, enum nl80211_band band,
-                    struct ieee80211_sband_iftype_data *data,
-                    enum nl80211_iftype iftype)
+                    struct ieee80211_sband_iftype_data *data)
  {
        struct ieee80211_sta_eht_cap *eht_cap = &data->eht_cap;
        struct ieee80211_eht_cap_elem_fixed *eht_cap_elem = &eht_cap->eht_cap_elem;
@@@ -256,7 -255,7 +255,7 @@@ __mt7925_set_stream_he_eht_caps(struct 
  
                data[n].types_mask = BIT(i);
                mt7925_init_he_caps(phy, band, &data[n], i);
-               mt7925_init_eht_caps(phy, band, &data[n], i);
+               mt7925_init_eht_caps(phy, band, &data[n]);
  
                n++;
        }
diff --combined include/net/cfg80211.h
index 1b3345129a95499f569ca9ac74724226367c38dc,602960dafe0f0650fbcefff2b66938b2f0c9f3fc..ac1fb326dcdae635343a7a7fd445abf9f6494b49
@@@ -52,7 -52,7 +52,7 @@@
   * such wiphy can have zero, one, or many virtual interfaces associated with
   * it, which need to be identified as such by pointing the network interface's
   * @ieee80211_ptr pointer to a &struct wireless_dev which further describes
-  * the wireless part of the interface, normally this struct is embedded in the
+  * the wireless part of the interface. Normally this struct is embedded in the
   * network interface's private data area. Drivers can optionally allow creating
   * or destroying virtual interfaces on the fly, but without at least one or the
   * ability to create some the wireless device isn't useful.
@@@ -976,6 -976,15 +976,15 @@@ const struct cfg80211_chan_def 
  cfg80211_chandef_compatible(const struct cfg80211_chan_def *chandef1,
                            const struct cfg80211_chan_def *chandef2);
  
+ /**
+  * nl80211_chan_width_to_mhz - get the channel width in MHz
+  * @chan_width: the channel width from &enum nl80211_chan_width
+  *
+  * Return: channel width in MHz if the chan_width from &enum nl80211_chan_width
+  * is valid. -1 otherwise.
+  */
+ int nl80211_chan_width_to_mhz(enum nl80211_chan_width chan_width);
  /**
   * cfg80211_chandef_valid - check if a channel definition is valid
   * @chandef: the channel definition to check
@@@ -1664,6 -1673,21 +1673,21 @@@ struct link_station_del_parameters 
        u32 link_id;
  };
  
+ /**
+  * struct cfg80211_ttlm_params: TID to link mapping parameters
+  *
+  * Used for setting a TID to link mapping.
+  *
+  * @dlink: Downlink TID to link mapping, as defined in section 9.4.2.314
+  *     (TID-To-Link Mapping element) in Draft P802.11be_D4.0.
+  * @ulink: Uplink TID to link mapping, as defined in section 9.4.2.314
+  *     (TID-To-Link Mapping element) in Draft P802.11be_D4.0.
+  */
+ struct cfg80211_ttlm_params {
+       u16 dlink[8];
+       u16 ulink[8];
+ };
  /**
   * struct station_parameters - station parameters
   *
@@@ -2560,7 -2584,7 +2584,7 @@@ struct cfg80211_scan_info 
   * @short_ssid: short ssid to scan for
   * @bssid: bssid to scan for
   * @channel_idx: idx of the channel in the channel array in the scan request
-  *     which the above info relvant to
+  *     which the above info is relevant to
   * @unsolicited_probe: the AP transmits unsolicited probe response every 20 TU
   * @short_ssid_valid: @short_ssid is valid and can be used
   * @psc_no_listen: when set, and the channel is a PSC channel, no need to wait
@@@ -2819,6 -2843,13 +2843,13 @@@ enum cfg80211_signal_type 
   *    the BSS that requested the scan in which the beacon/probe was received.
   * @chains: bitmask for filled values in @chain_signal.
   * @chain_signal: per-chain signal strength of last received BSS in dBm.
+  * @restrict_use: restrict usage, if not set, assume @use_for is
+  *    %NL80211_BSS_USE_FOR_NORMAL.
+  * @use_for: bitmap of possible usage for this BSS, see
+  *    &enum nl80211_bss_use_for
+  * @cannot_use_reasons: the reasons (bitmap) for not being able to connect,
+  *    if @restrict_use is set and @use_for is zero (empty); may be 0 for
+  *    unspecified reasons; see &enum nl80211_bss_cannot_use_reasons
   * @drv_data: Data to be passed through to @inform_bss
   */
  struct cfg80211_inform_bss {
        u8 chains;
        s8 chain_signal[IEEE80211_MAX_CHAINS];
  
+       u8 restrict_use:1, use_for:7;
+       u8 cannot_use_reasons;
        void *drv_data;
  };
  
@@@ -2881,6 -2915,11 +2915,11 @@@ struct cfg80211_bss_ies 
   * @chain_signal: per-chain signal strength of last received BSS in dBm.
   * @bssid_index: index in the multiple BSS set
   * @max_bssid_indicator: max number of members in the BSS set
+  * @use_for: bitmap of possible usage for this BSS, see
+  *    &enum nl80211_bss_use_for
+  * @cannot_use_reasons: the reasons (bitmap) for not being able to connect,
+  *    if @restrict_use is set and @use_for is zero (empty); may be 0 for
+  *    unspecified reasons; see &enum nl80211_bss_cannot_use_reasons
   * @priv: private area for driver use, has at least wiphy->bss_priv_size bytes
   */
  struct cfg80211_bss {
        u8 bssid_index;
        u8 max_bssid_indicator;
  
+       u8 use_for;
+       u8 cannot_use_reasons;
        u8 priv[] __aligned(sizeof(void *));
  };
  
@@@ -4496,6 -4538,7 +4538,7 @@@ struct mgmt_frame_regs 
   * @del_link_station: Remove a link of a station.
   *
   * @set_hw_timestamp: Enable/disable HW timestamping of TM/FTM frames.
+  * @set_ttlm: set the TID to link mapping.
   */
  struct cfg80211_ops {
        int     (*suspend)(struct wiphy *wiphy, struct cfg80211_wowlan *wow);
                                    struct link_station_del_parameters *params);
        int     (*set_hw_timestamp)(struct wiphy *wiphy, struct net_device *dev,
                                    struct cfg80211_set_hw_timestamp *hwts);
+       int     (*set_ttlm)(struct wiphy *wiphy, struct net_device *dev,
+                           struct cfg80211_ttlm_params *params);
  };
  
  /*
   *    NL80211_REGDOM_SET_BY_DRIVER.
   * @WIPHY_FLAG_CHANNEL_CHANGE_ON_BEACON: reg_call_notifier() is called if driver
   *    set this flag to update channels on beacon hints.
+  * @WIPHY_FLAG_SUPPORTS_NSTR_NONPRIMARY: support connection to non-primary link
+  *    of an NSTR mobile AP MLD.
   */
  enum wiphy_flags {
        WIPHY_FLAG_SUPPORTS_EXT_KEK_KCK         = BIT(0),
        WIPHY_FLAG_IBSS_RSN                     = BIT(8),
        WIPHY_FLAG_MESH_AUTH                    = BIT(10),
        WIPHY_FLAG_SUPPORTS_EXT_KCK_32          = BIT(11),
-       /* use hole at 12 */
+       WIPHY_FLAG_SUPPORTS_NSTR_NONPRIMARY     = BIT(12),
        WIPHY_FLAG_SUPPORTS_FW_ROAM             = BIT(13),
        WIPHY_FLAG_AP_UAPSD                     = BIT(14),
        WIPHY_FLAG_SUPPORTS_TDLS                = BIT(15),
@@@ -7164,6 -7211,25 +7211,25 @@@ cfg80211_inform_bss(struct wiphy *wiphy
                                        gfp);
  }
  
+ /**
+  * __cfg80211_get_bss - get a BSS reference
+  * @wiphy: the wiphy this BSS struct belongs to
+  * @channel: the channel to search on (or %NULL)
+  * @bssid: the desired BSSID (or %NULL)
+  * @ssid: the desired SSID (or %NULL)
+  * @ssid_len: length of the SSID (or 0)
+  * @bss_type: type of BSS, see &enum ieee80211_bss_type
+  * @privacy: privacy filter, see &enum ieee80211_privacy
+  * @use_for: indicates which use is intended
+  */
+ struct cfg80211_bss *__cfg80211_get_bss(struct wiphy *wiphy,
+                                       struct ieee80211_channel *channel,
+                                       const u8 *bssid,
+                                       const u8 *ssid, size_t ssid_len,
+                                       enum ieee80211_bss_type bss_type,
+                                       enum ieee80211_privacy privacy,
+                                       u32 use_for);
  /**
   * cfg80211_get_bss - get a BSS reference
   * @wiphy: the wiphy this BSS struct belongs to
   * @ssid_len: length of the SSID (or 0)
   * @bss_type: type of BSS, see &enum ieee80211_bss_type
   * @privacy: privacy filter, see &enum ieee80211_privacy
+  *
+  * This version implies regular usage, %NL80211_BSS_USE_FOR_NORMAL.
   */
- struct cfg80211_bss *cfg80211_get_bss(struct wiphy *wiphy,
-                                     struct ieee80211_channel *channel,
-                                     const u8 *bssid,
-                                     const u8 *ssid, size_t ssid_len,
-                                     enum ieee80211_bss_type bss_type,
-                                     enum ieee80211_privacy privacy);
+ static inline struct cfg80211_bss *
+ cfg80211_get_bss(struct wiphy *wiphy, struct ieee80211_channel *channel,
+                const u8 *bssid, const u8 *ssid, size_t ssid_len,
+                enum ieee80211_bss_type bss_type,
+                enum ieee80211_privacy privacy)
+ {
+       return __cfg80211_get_bss(wiphy, channel, bssid, ssid, ssid_len,
+                                 bss_type, privacy,
+                                 NL80211_BSS_USE_FOR_NORMAL);
+ }
  static inline struct cfg80211_bss *
  cfg80211_get_ibss(struct wiphy *wiphy,
                  struct ieee80211_channel *channel,
@@@ -7312,7 -7385,7 +7385,7 @@@ struct cfg80211_rx_assoc_resp_data 
   * This function may sleep. The caller must hold the corresponding wdev's mutex.
   */
  void cfg80211_rx_assoc_resp(struct net_device *dev,
-                           struct cfg80211_rx_assoc_resp_data *data);
+                           const struct cfg80211_rx_assoc_resp_data *data);
  
  /**
   * struct cfg80211_assoc_failure - association failure data
@@@ -7431,7 -7504,7 +7504,7 @@@ void cfg80211_notify_new_peer_candidate
   * RFkill integration in cfg80211 is almost invisible to drivers,
   * as cfg80211 automatically registers an rfkill instance for each
   * wireless device it knows about. Soft kill is also translated
-  * into disconnecting and turning all interfaces off, drivers are
+  * into disconnecting and turning all interfaces off. Drivers are
   * expected to turn off the device when all interfaces are down.
   *
   * However, devices may have a hard RFkill line, in which case they
@@@ -7479,7 -7552,7 +7552,7 @@@ static inline void wiphy_rfkill_stop_po
   * the configuration mechanism.
   *
   * A driver supporting vendor commands must register them as an array
-  * in struct wiphy, with handlers for each one, each command has an
+  * in struct wiphy, with handlers for each one. Each command has an
   * OUI and sub command ID to identify it.
   *
   * Note that this feature should not be (ab)used to implement protocol
@@@ -7643,7 -7716,7 +7716,7 @@@ static inline void cfg80211_vendor_even
   * interact with driver-specific tools to aid, for instance,
   * factory programming.
   *
-  * This chapter describes how drivers interact with it, for more
+  * This chapter describes how drivers interact with it. For more
   * information see the nl80211 book's chapter on it.
   */
  
@@@ -9302,50 -9375,4 +9375,50 @@@ bool cfg80211_valid_disable_subchannel_
   */
  void cfg80211_links_removed(struct net_device *dev, u16 link_mask);
  
 +#ifdef CONFIG_CFG80211_DEBUGFS
 +/**
 + * wiphy_locked_debugfs_read - do a locked read in debugfs
 + * @wiphy: the wiphy to use
 + * @file: the file being read
 + * @buf: the buffer to fill and then read from
 + * @bufsize: size of the buffer
 + * @userbuf: the user buffer to copy to
 + * @count: read count
 + * @ppos: read position
 + * @handler: the read handler to call (under wiphy lock)
 + * @data: additional data to pass to the read handler
 + */
 +ssize_t wiphy_locked_debugfs_read(struct wiphy *wiphy, struct file *file,
 +                                char *buf, size_t bufsize,
 +                                char __user *userbuf, size_t count,
 +                                loff_t *ppos,
 +                                ssize_t (*handler)(struct wiphy *wiphy,
 +                                                   struct file *file,
 +                                                   char *buf,
 +                                                   size_t bufsize,
 +                                                   void *data),
 +                                void *data);
 +
 +/**
 + * wiphy_locked_debugfs_write - do a locked write in debugfs
 + * @wiphy: the wiphy to use
 + * @file: the file being written to
 + * @buf: the buffer to copy the user data to
 + * @bufsize: size of the buffer
 + * @userbuf: the user buffer to copy from
 + * @count: read count
 + * @handler: the write handler to call (under wiphy lock)
 + * @data: additional data to pass to the write handler
 + */
 +ssize_t wiphy_locked_debugfs_write(struct wiphy *wiphy, struct file *file,
 +                                 char *buf, size_t bufsize,
 +                                 const char __user *userbuf, size_t count,
 +                                 ssize_t (*handler)(struct wiphy *wiphy,
 +                                                    struct file *file,
 +                                                    char *buf,
 +                                                    size_t count,
 +                                                    void *data),
 +                                 void *data);
 +#endif
 +
  #endif /* __NET_CFG80211_H */
index f690c385a345a60d81d994336fea44aa7e1792ef,fecf92f06da7faec6f8f63784c217b1dc33127d5..e9219f9278750d75db4211f8dfba24315cc6ac56
@@@ -23,7 -23,7 +23,7 @@@
  static inline struct ieee80211_sub_if_data *
  get_bss_sdata(struct ieee80211_sub_if_data *sdata)
  {
 -      if (sdata->vif.type == NL80211_IFTYPE_AP_VLAN)
 +      if (sdata && sdata->vif.type == NL80211_IFTYPE_AP_VLAN)
                sdata = container_of(sdata->bss, struct ieee80211_sub_if_data,
                                     u.ap);
  
@@@ -695,14 -695,11 +695,14 @@@ static inline void drv_flush(struct iee
                             struct ieee80211_sub_if_data *sdata,
                             u32 queues, bool drop)
  {
 -      struct ieee80211_vif *vif = sdata ? &sdata->vif : NULL;
 +      struct ieee80211_vif *vif;
  
        might_sleep();
        lockdep_assert_wiphy(local->hw.wiphy);
  
 +      sdata = get_bss_sdata(sdata);
 +      vif = sdata ? &sdata->vif : NULL;
 +
        if (sdata && !check_sdata_in_driver(sdata))
                return;
  
@@@ -719,8 -716,6 +719,8 @@@ static inline void drv_flush_sta(struc
        might_sleep();
        lockdep_assert_wiphy(local->hw.wiphy);
  
 +      sdata = get_bss_sdata(sdata);
 +
        if (sdata && !check_sdata_in_driver(sdata))
                return;
  
@@@ -805,7 -800,7 +805,7 @@@ drv_cancel_remain_on_channel(struct iee
  static inline int drv_set_ringparam(struct ieee80211_local *local,
                                    u32 tx, u32 rx)
  {
-       int ret = -ENOTSUPP;
+       int ret = -EOPNOTSUPP;
  
        might_sleep();
        lockdep_assert_wiphy(local->hw.wiphy);
diff --combined net/wireless/core.h
index cb61d33d4f1ebc4c42f21e568d51e15d5bca0797,87c5889b15e3f540968c9ba480ee7e579489d1cb..1963958263d263f48926caea099855b1f6c51bf9
@@@ -293,7 -293,6 +293,7 @@@ struct cfg80211_cqm_config 
        u32 rssi_hyst;
        s32 last_rssi_event_value;
        enum nl80211_cqm_rssi_threshold_event last_rssi_event_type;
 +      bool use_range_api;
        int n_rssi_thresholds;
        s32 rssi_thresholds[] __counted_by(n_rssi_thresholds);
  };
@@@ -458,6 -457,9 +458,9 @@@ int cfg80211_scan(struct cfg80211_regis
  
  extern struct work_struct cfg80211_disconnect_work;
  
+ #define NL80211_BSS_USE_FOR_ALL       (NL80211_BSS_USE_FOR_NORMAL | \
+                                NL80211_BSS_USE_FOR_MLD_LINK)
  void cfg80211_set_dfs_state(struct wiphy *wiphy,
                            const struct cfg80211_chan_def *chandef,
                            enum nl80211_dfs_state dfs_state);
diff --combined net/wireless/nl80211.c
index d0f499227c29f56e81659ea94a238bfaf17c747d,7ea1cb632952219296cde8dc04017d02565886ba..8b45fb420f4c0abff772209dc5cbd1d5a24de192
@@@ -818,6 -818,9 +818,9 @@@ static const struct nla_policy nl80211_
        [NL80211_ATTR_HW_TIMESTAMP_ENABLED] = { .type = NLA_FLAG },
        [NL80211_ATTR_EMA_RNR_ELEMS] = { .type = NLA_NESTED },
        [NL80211_ATTR_MLO_LINK_DISABLED] = { .type = NLA_FLAG },
+       [NL80211_ATTR_BSS_DUMP_INCLUDE_USE_DATA] = { .type = NLA_FLAG },
+       [NL80211_ATTR_MLO_TTLM_DLINK] = NLA_POLICY_EXACT_LEN(sizeof(u16) * 8),
+       [NL80211_ATTR_MLO_TTLM_ULINK] = NLA_POLICY_EXACT_LEN(sizeof(u16) * 8),
  };
  
  /* policy for the key attributes */
@@@ -3822,8 -3825,6 +3825,8 @@@ static int nl80211_send_iface(struct sk
        struct net_device *dev = wdev->netdev;
        void *hdr;
  
 +      lockdep_assert_wiphy(&rdev->wiphy);
 +
        WARN_ON(cmd != NL80211_CMD_NEW_INTERFACE &&
                cmd != NL80211_CMD_DEL_INTERFACE &&
                cmd != NL80211_CMD_SET_INTERFACE);
@@@ -3991,7 -3992,6 +3994,7 @@@ static int nl80211_dump_interface(struc
  
                if_idx = 0;
  
 +              wiphy_lock(&rdev->wiphy);
                list_for_each_entry(wdev, &rdev->wiphy.wdev_list, list) {
                        if (if_idx < if_start) {
                                if_idx++;
                                               cb->nlh->nlmsg_seq, NLM_F_MULTI,
                                               rdev, wdev,
                                               NL80211_CMD_NEW_INTERFACE) < 0) {
 +                              wiphy_unlock(&rdev->wiphy);
                                goto out;
                        }
                        if_idx++;
                }
 +              wiphy_unlock(&rdev->wiphy);
  
                wp_idx++;
        }
@@@ -4855,7 -4853,7 +4858,7 @@@ static struct cfg80211_acl_data *parse_
                return ERR_PTR(n_entries);
  
        if (n_entries > wiphy->max_acl_mac_addrs)
-               return ERR_PTR(-ENOTSUPP);
+               return ERR_PTR(-EOPNOTSUPP);
  
        acl = kzalloc(struct_size(acl, mac_addrs, n_entries), GFP_KERNEL);
        if (!acl)
@@@ -10410,6 -10408,15 +10413,15 @@@ static int nl80211_send_bss(struct sk_b
                break;
        }
  
+       if (nla_put_u32(msg, NL80211_BSS_USE_FOR, res->use_for))
+               goto nla_put_failure;
+       if (res->cannot_use_reasons &&
+           nla_put_u64_64bit(msg, NL80211_BSS_CANNOT_USE_REASONS,
+                             res->cannot_use_reasons,
+                             NL80211_BSS_PAD))
+               goto nla_put_failure;
        nla_nest_end(msg, bss);
  
        genlmsg_end(msg, hdr);
@@@ -10427,15 -10434,27 +10439,27 @@@ static int nl80211_dump_scan(struct sk_
        struct cfg80211_registered_device *rdev;
        struct cfg80211_internal_bss *scan;
        struct wireless_dev *wdev;
+       struct nlattr **attrbuf;
        int start = cb->args[2], idx = 0;
+       bool dump_include_use_data;
        int err;
  
-       err = nl80211_prepare_wdev_dump(cb, &rdev, &wdev, NULL);
-       if (err)
+       attrbuf = kcalloc(NUM_NL80211_ATTR, sizeof(*attrbuf), GFP_KERNEL);
+       if (!attrbuf)
+               return -ENOMEM;
+       err = nl80211_prepare_wdev_dump(cb, &rdev, &wdev, attrbuf);
+       if (err) {
+               kfree(attrbuf);
                return err;
+       }
        /* nl80211_prepare_wdev_dump acquired it in the successful case */
        __acquire(&rdev->wiphy.mtx);
  
+       dump_include_use_data =
+               attrbuf[NL80211_ATTR_BSS_DUMP_INCLUDE_USE_DATA];
+       kfree(attrbuf);
        spin_lock_bh(&rdev->bss_lock);
  
        /*
        list_for_each_entry(scan, &rdev->bss_list, list) {
                if (++idx <= start)
                        continue;
+               if (!dump_include_use_data &&
+                   !(scan->pub.use_for & NL80211_BSS_USE_FOR_NORMAL))
+                       continue;
                if (nl80211_send_bss(skb, cb,
                                cb->nlh->nlmsg_seq, NLM_F_MULTI,
                                rdev, wdev, scan) < 0) {
@@@ -10903,12 -10925,13 +10930,13 @@@ static int nl80211_crypto_settings(stru
  
  static struct cfg80211_bss *nl80211_assoc_bss(struct cfg80211_registered_device *rdev,
                                              const u8 *ssid, int ssid_len,
-                                             struct nlattr **attrs)
+                                             struct nlattr **attrs,
+                                             int assoc_link_id, int link_id)
  {
        struct ieee80211_channel *chan;
        struct cfg80211_bss *bss;
        const u8 *bssid;
-       u32 freq;
+       u32 freq, use_for = 0;
  
        if (!attrs[NL80211_ATTR_MAC] || !attrs[NL80211_ATTR_WIPHY_FREQ])
                return ERR_PTR(-EINVAL);
        if (!chan)
                return ERR_PTR(-EINVAL);
  
-       bss = cfg80211_get_bss(&rdev->wiphy, chan, bssid,
-                              ssid, ssid_len,
-                              IEEE80211_BSS_TYPE_ESS,
-                              IEEE80211_PRIVACY_ANY);
+       if (assoc_link_id >= 0)
+               use_for = NL80211_BSS_USE_FOR_MLD_LINK;
+       if (assoc_link_id == link_id)
+               use_for |= NL80211_BSS_USE_FOR_NORMAL;
+       bss = __cfg80211_get_bss(&rdev->wiphy, chan, bssid,
+                                ssid, ssid_len,
+                                IEEE80211_BSS_TYPE_ESS,
+                                IEEE80211_PRIVACY_ANY,
+                                use_for);
        if (!bss)
                return ERR_PTR(-ENOENT);
  
@@@ -11105,7 -11134,8 +11139,8 @@@ static int nl80211_associate(struct sk_
                                goto free;
                        }
                        req.links[link_id].bss =
-                               nl80211_assoc_bss(rdev, ssid, ssid_len, attrs);
+                               nl80211_assoc_bss(rdev, ssid, ssid_len, attrs,
+                                                 req.link_id, link_id);
                        if (IS_ERR(req.links[link_id].bss)) {
                                err = PTR_ERR(req.links[link_id].bss);
                                req.links[link_id].bss = NULL;
                if (req.link_id >= 0)
                        return -EINVAL;
  
-               req.bss = nl80211_assoc_bss(rdev, ssid, ssid_len, info->attrs);
+               req.bss = nl80211_assoc_bss(rdev, ssid, ssid_len, info->attrs,
+                                           -1, -1);
                if (IS_ERR(req.bss))
                        return PTR_ERR(req.bss);
                ap_addr = req.bss->bssid;
@@@ -12179,16 -12210,18 +12215,18 @@@ static int nl80211_wiphy_netns(struct s
        return err;
  }
  
- static int nl80211_setdel_pmksa(struct sk_buff *skb, struct genl_info *info)
+ static int nl80211_set_pmksa(struct sk_buff *skb, struct genl_info *info)
  {
        struct cfg80211_registered_device *rdev = info->user_ptr[0];
-       int (*rdev_ops)(struct wiphy *wiphy, struct net_device *dev,
-                       struct cfg80211_pmksa *pmksa) = NULL;
        struct net_device *dev = info->user_ptr[1];
        struct cfg80211_pmksa pmksa;
+       bool ap_pmksa_caching_support = false;
  
        memset(&pmksa, 0, sizeof(struct cfg80211_pmksa));
  
+       ap_pmksa_caching_support = wiphy_ext_feature_isset(&rdev->wiphy,
+               NL80211_EXT_FEATURE_AP_PMKSA_CACHING);
        if (!info->attrs[NL80211_ATTR_PMKID])
                return -EINVAL;
  
        if (info->attrs[NL80211_ATTR_MAC]) {
                pmksa.bssid = nla_data(info->attrs[NL80211_ATTR_MAC]);
        } else if (info->attrs[NL80211_ATTR_SSID] &&
-                  info->attrs[NL80211_ATTR_FILS_CACHE_ID] &&
-                  (info->genlhdr->cmd == NL80211_CMD_DEL_PMKSA ||
-                   info->attrs[NL80211_ATTR_PMK])) {
+                  info->attrs[NL80211_ATTR_FILS_CACHE_ID] &&
+                  info->attrs[NL80211_ATTR_PMK]) {
                pmksa.ssid = nla_data(info->attrs[NL80211_ATTR_SSID]);
                pmksa.ssid_len = nla_len(info->attrs[NL80211_ATTR_SSID]);
-               pmksa.cache_id =
-                       nla_data(info->attrs[NL80211_ATTR_FILS_CACHE_ID]);
+               pmksa.cache_id = nla_data(info->attrs[NL80211_ATTR_FILS_CACHE_ID]);
        } else {
                return -EINVAL;
        }
        if (info->attrs[NL80211_ATTR_PMK]) {
                pmksa.pmk = nla_data(info->attrs[NL80211_ATTR_PMK]);
                pmksa.pmk_len = nla_len(info->attrs[NL80211_ATTR_PMK]);
  
        if (info->attrs[NL80211_ATTR_PMK_REAUTH_THRESHOLD])
                pmksa.pmk_reauth_threshold =
-                       nla_get_u8(
-                               info->attrs[NL80211_ATTR_PMK_REAUTH_THRESHOLD]);
+                       nla_get_u8(info->attrs[NL80211_ATTR_PMK_REAUTH_THRESHOLD]);
  
        if (dev->ieee80211_ptr->iftype != NL80211_IFTYPE_STATION &&
            dev->ieee80211_ptr->iftype != NL80211_IFTYPE_P2P_CLIENT &&
-           !(dev->ieee80211_ptr->iftype == NL80211_IFTYPE_AP &&
-             wiphy_ext_feature_isset(&rdev->wiphy,
-                                     NL80211_EXT_FEATURE_AP_PMKSA_CACHING)))
+           !((dev->ieee80211_ptr->iftype == NL80211_IFTYPE_AP ||
+              dev->ieee80211_ptr->iftype == NL80211_IFTYPE_P2P_GO) &&
+              ap_pmksa_caching_support))
                return -EOPNOTSUPP;
  
-       switch (info->genlhdr->cmd) {
-       case NL80211_CMD_SET_PMKSA:
-               rdev_ops = rdev->ops->set_pmksa;
-               break;
-       case NL80211_CMD_DEL_PMKSA:
-               rdev_ops = rdev->ops->del_pmksa;
-               break;
-       default:
-               WARN_ON(1);
-               break;
+       if (!rdev->ops->set_pmksa)
+               return -EOPNOTSUPP;
+       return rdev_set_pmksa(rdev, dev, &pmksa);
+ }
+ static int nl80211_del_pmksa(struct sk_buff *skb, struct genl_info *info)
+ {
+       struct cfg80211_registered_device *rdev = info->user_ptr[0];
+       struct net_device *dev = info->user_ptr[1];
+       struct cfg80211_pmksa pmksa;
+       bool sae_offload_support = false;
+       bool owe_offload_support = false;
+       bool ap_pmksa_caching_support = false;
+       memset(&pmksa, 0, sizeof(struct cfg80211_pmksa));
+       sae_offload_support = wiphy_ext_feature_isset(&rdev->wiphy,
+               NL80211_EXT_FEATURE_SAE_OFFLOAD);
+       owe_offload_support = wiphy_ext_feature_isset(&rdev->wiphy,
+               NL80211_EXT_FEATURE_OWE_OFFLOAD);
+       ap_pmksa_caching_support = wiphy_ext_feature_isset(&rdev->wiphy,
+               NL80211_EXT_FEATURE_AP_PMKSA_CACHING);
+       if (info->attrs[NL80211_ATTR_PMKID])
+               pmksa.pmkid = nla_data(info->attrs[NL80211_ATTR_PMKID]);
+       if (info->attrs[NL80211_ATTR_MAC]) {
+               pmksa.bssid = nla_data(info->attrs[NL80211_ATTR_MAC]);
+       } else if (info->attrs[NL80211_ATTR_SSID]) {
+               /* SSID based pmksa flush suppported only for FILS,
+                * OWE/SAE OFFLOAD cases
+                */
+               if (info->attrs[NL80211_ATTR_FILS_CACHE_ID] &&
+                   info->attrs[NL80211_ATTR_PMK]) {
+                       pmksa.cache_id = nla_data(info->attrs[NL80211_ATTR_FILS_CACHE_ID]);
+               } else if (!sae_offload_support && !owe_offload_support) {
+                       return -EINVAL;
+               }
+               pmksa.ssid = nla_data(info->attrs[NL80211_ATTR_SSID]);
+               pmksa.ssid_len = nla_len(info->attrs[NL80211_ATTR_SSID]);
+       } else {
+               return -EINVAL;
        }
  
-       if (!rdev_ops)
+       if (dev->ieee80211_ptr->iftype != NL80211_IFTYPE_STATION &&
+           dev->ieee80211_ptr->iftype != NL80211_IFTYPE_P2P_CLIENT &&
+           !((dev->ieee80211_ptr->iftype == NL80211_IFTYPE_AP ||
+              dev->ieee80211_ptr->iftype == NL80211_IFTYPE_P2P_GO) &&
+              ap_pmksa_caching_support))
+               return -EOPNOTSUPP;
+       if (!rdev->ops->del_pmksa)
                return -EOPNOTSUPP;
  
-       return rdev_ops(&rdev->wiphy, dev, &pmksa);
+       return rdev_del_pmksa(rdev, dev, &pmksa);
  }
  
  static int nl80211_flush_pmksa(struct sk_buff *skb, struct genl_info *info)
@@@ -12793,6 -12864,10 +12869,6 @@@ static int cfg80211_cqm_rssi_update(str
        int i, n, low_index;
        int err;
  
 -      /* RSSI reporting disabled? */
 -      if (!cqm_config)
 -              return rdev_set_cqm_rssi_range_config(rdev, dev, 0, 0);
 -
        /*
         * Obtain current RSSI value if possible, if not and no RSSI threshold
         * event has been received yet, we should receive an event after a
@@@ -12867,25 -12942,23 +12943,25 @@@ static int nl80211_set_cqm_rssi(struct 
            wdev->iftype != NL80211_IFTYPE_P2P_CLIENT)
                return -EOPNOTSUPP;
  
 -      if (n_thresholds <= 1 && rdev->ops->set_cqm_rssi_config) {
 -              if (n_thresholds == 0 || thresholds[0] == 0) /* Disabling */
 -                      return rdev_set_cqm_rssi_config(rdev, dev, 0, 0);
 -
 -              return rdev_set_cqm_rssi_config(rdev, dev,
 -                                              thresholds[0], hysteresis);
 -      }
 -
 -      if (!wiphy_ext_feature_isset(&rdev->wiphy,
 -                                   NL80211_EXT_FEATURE_CQM_RSSI_LIST))
 -              return -EOPNOTSUPP;
 -
        if (n_thresholds == 1 && thresholds[0] == 0) /* Disabling */
                n_thresholds = 0;
  
        old = wiphy_dereference(wdev->wiphy, wdev->cqm_config);
  
 +      /* if already disabled just succeed */
 +      if (!n_thresholds && !old)
 +              return 0;
 +
 +      if (n_thresholds > 1) {
 +              if (!wiphy_ext_feature_isset(&rdev->wiphy,
 +                                           NL80211_EXT_FEATURE_CQM_RSSI_LIST) ||
 +                  !rdev->ops->set_cqm_rssi_range_config)
 +                      return -EOPNOTSUPP;
 +      } else {
 +              if (!rdev->ops->set_cqm_rssi_config)
 +                      return -EOPNOTSUPP;
 +      }
 +
        if (n_thresholds) {
                cqm_config = kzalloc(struct_size(cqm_config, rssi_thresholds,
                                                 n_thresholds),
                memcpy(cqm_config->rssi_thresholds, thresholds,
                       flex_array_size(cqm_config, rssi_thresholds,
                                       n_thresholds));
 +              cqm_config->use_range_api = n_thresholds > 1 ||
 +                                          !rdev->ops->set_cqm_rssi_config;
  
                rcu_assign_pointer(wdev->cqm_config, cqm_config);
 +
 +              if (cqm_config->use_range_api)
 +                      err = cfg80211_cqm_rssi_update(rdev, dev, cqm_config);
 +              else
 +                      err = rdev_set_cqm_rssi_config(rdev, dev,
 +                                                     thresholds[0],
 +                                                     hysteresis);
        } else {
                RCU_INIT_POINTER(wdev->cqm_config, NULL);
 +              /* if enabled as range also disable via range */
 +              if (old->use_range_api)
 +                      err = rdev_set_cqm_rssi_range_config(rdev, dev, 0, 0);
 +              else
 +                      err = rdev_set_cqm_rssi_config(rdev, dev, 0, 0);
        }
  
 -      err = cfg80211_cqm_rssi_update(rdev, dev, cqm_config);
        if (err) {
                rcu_assign_pointer(wdev->cqm_config, old);
                kfree_rcu(cqm_config, rcu_head);
@@@ -15847,7 -15907,7 +15923,7 @@@ static int parse_tid_conf(struct cfg802
  
        if (tid_conf->mask & ~mask) {
                NL_SET_ERR_MSG(extack, "unsupported TID configuration");
-               return -ENOTSUPP;
+               return -EOPNOTSUPP;
        }
  
        return 0;
@@@ -16240,6 -16300,35 +16316,35 @@@ static int nl80211_set_hw_timestamp(str
        return rdev_set_hw_timestamp(rdev, dev, &hwts);
  }
  
+ static int
+ nl80211_set_ttlm(struct sk_buff *skb, struct genl_info *info)
+ {
+       struct cfg80211_ttlm_params params = {};
+       struct cfg80211_registered_device *rdev = info->user_ptr[0];
+       struct net_device *dev = info->user_ptr[1];
+       struct wireless_dev *wdev = dev->ieee80211_ptr;
+       if (wdev->iftype != NL80211_IFTYPE_STATION &&
+           wdev->iftype != NL80211_IFTYPE_P2P_CLIENT)
+               return -EOPNOTSUPP;
+       if (!wdev->connected)
+               return -ENOLINK;
+       if (!info->attrs[NL80211_ATTR_MLO_TTLM_DLINK] ||
+           !info->attrs[NL80211_ATTR_MLO_TTLM_ULINK])
+               return -EINVAL;
+       nla_memcpy(params.dlink,
+                  info->attrs[NL80211_ATTR_MLO_TTLM_DLINK],
+                  sizeof(params.dlink));
+       nla_memcpy(params.ulink,
+                  info->attrs[NL80211_ATTR_MLO_TTLM_ULINK],
+                  sizeof(params.ulink));
+       return rdev_set_ttlm(rdev, dev, &params);
+ }
  #define NL80211_FLAG_NEED_WIPHY               0x01
  #define NL80211_FLAG_NEED_NETDEV      0x02
  #define NL80211_FLAG_NEED_RTNL                0x04
@@@ -16928,7 -17017,7 +17033,7 @@@ static const struct genl_small_ops nl80
        {
                .cmd = NL80211_CMD_SET_PMKSA,
                .validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
-               .doit = nl80211_setdel_pmksa,
+               .doit = nl80211_set_pmksa,
                .flags = GENL_UNS_ADMIN_PERM,
                .internal_flags = IFLAGS(NL80211_FLAG_NEED_NETDEV_UP |
                                         NL80211_FLAG_CLEAR_SKB),
        {
                .cmd = NL80211_CMD_DEL_PMKSA,
                .validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
-               .doit = nl80211_setdel_pmksa,
+               .doit = nl80211_del_pmksa,
                .flags = GENL_UNS_ADMIN_PERM,
                .internal_flags = IFLAGS(NL80211_FLAG_NEED_NETDEV_UP),
        },
                .flags = GENL_UNS_ADMIN_PERM,
                .internal_flags = IFLAGS(NL80211_FLAG_NEED_NETDEV_UP),
        },
+       {
+               .cmd = NL80211_CMD_SET_TID_TO_LINK_MAPPING,
+               .doit = nl80211_set_ttlm,
+               .flags = GENL_UNS_ADMIN_PERM,
+               .internal_flags = IFLAGS(NL80211_FLAG_NEED_NETDEV_UP),
+       },
  };
  
  static struct genl_family nl80211_fam __ro_after_init = {
@@@ -17752,21 -17847,29 +17863,29 @@@ nla_put_failure
        nlmsg_free(msg);
  }
  
+ struct nl80211_mlme_event {
+       enum nl80211_commands cmd;
+       const u8 *buf;
+       size_t buf_len;
+       int uapsd_queues;
+       const u8 *req_ies;
+       size_t req_ies_len;
+       bool reconnect;
+ };
  static void nl80211_send_mlme_event(struct cfg80211_registered_device *rdev,
                                    struct net_device *netdev,
-                                   const u8 *buf, size_t len,
-                                   enum nl80211_commands cmd, gfp_t gfp,
-                                   int uapsd_queues, const u8 *req_ies,
-                                   size_t req_ies_len, bool reconnect)
+                                   const struct nl80211_mlme_event *event,
+                                   gfp_t gfp)
  {
        struct sk_buff *msg;
        void *hdr;
  
-       msg = nlmsg_new(100 + len + req_ies_len, gfp);
+       msg = nlmsg_new(100 + event->buf_len + event->req_ies_len, gfp);
        if (!msg)
                return;
  
-       hdr = nl80211hdr_put(msg, 0, 0, 0, cmd);
+       hdr = nl80211hdr_put(msg, 0, 0, 0, event->cmd);
        if (!hdr) {
                nlmsg_free(msg);
                return;
  
        if (nla_put_u32(msg, NL80211_ATTR_WIPHY, rdev->wiphy_idx) ||
            nla_put_u32(msg, NL80211_ATTR_IFINDEX, netdev->ifindex) ||
-           nla_put(msg, NL80211_ATTR_FRAME, len, buf) ||
-           (req_ies &&
-            nla_put(msg, NL80211_ATTR_REQ_IE, req_ies_len, req_ies)))
+           nla_put(msg, NL80211_ATTR_FRAME, event->buf_len, event->buf) ||
+           (event->req_ies &&
+            nla_put(msg, NL80211_ATTR_REQ_IE, event->req_ies_len,
+                    event->req_ies)))
                goto nla_put_failure;
  
-       if (reconnect && nla_put_flag(msg, NL80211_ATTR_RECONNECT_REQUESTED))
+       if (event->reconnect &&
+           nla_put_flag(msg, NL80211_ATTR_RECONNECT_REQUESTED))
                goto nla_put_failure;
  
-       if (uapsd_queues >= 0) {
+       if (event->uapsd_queues >= 0) {
                struct nlattr *nla_wmm =
                        nla_nest_start_noflag(msg, NL80211_ATTR_STA_WME);
                if (!nla_wmm)
                        goto nla_put_failure;
  
                if (nla_put_u8(msg, NL80211_STA_WME_UAPSD_QUEUES,
-                              uapsd_queues))
+                              event->uapsd_queues))
                        goto nla_put_failure;
  
                nla_nest_end(msg, nla_wmm);
@@@ -17809,37 -17914,60 +17930,60 @@@ void nl80211_send_rx_auth(struct cfg802
                          struct net_device *netdev, const u8 *buf,
                          size_t len, gfp_t gfp)
  {
-       nl80211_send_mlme_event(rdev, netdev, buf, len,
-                               NL80211_CMD_AUTHENTICATE, gfp, -1, NULL, 0,
-                               false);
+       struct nl80211_mlme_event event = {
+               .cmd = NL80211_CMD_AUTHENTICATE,
+               .buf = buf,
+               .buf_len = len,
+               .uapsd_queues = -1,
+       };
+       nl80211_send_mlme_event(rdev, netdev, &event, gfp);
  }
  
  void nl80211_send_rx_assoc(struct cfg80211_registered_device *rdev,
                           struct net_device *netdev,
-                          struct cfg80211_rx_assoc_resp_data *data)
+                          const struct cfg80211_rx_assoc_resp_data *data)
  {
-       nl80211_send_mlme_event(rdev, netdev, data->buf, data->len,
-                               NL80211_CMD_ASSOCIATE, GFP_KERNEL,
-                               data->uapsd_queues,
-                               data->req_ies, data->req_ies_len, false);
+       struct nl80211_mlme_event event = {
+               .cmd = NL80211_CMD_ASSOCIATE,
+               .buf = data->buf,
+               .buf_len = data->len,
+               .uapsd_queues = data->uapsd_queues,
+               .req_ies = data->req_ies,
+               .req_ies_len = data->req_ies_len,
+       };
+       nl80211_send_mlme_event(rdev, netdev, &event, GFP_KERNEL);
  }
  
  void nl80211_send_deauth(struct cfg80211_registered_device *rdev,
                         struct net_device *netdev, const u8 *buf,
                         size_t len, bool reconnect, gfp_t gfp)
  {
-       nl80211_send_mlme_event(rdev, netdev, buf, len,
-                               NL80211_CMD_DEAUTHENTICATE, gfp, -1, NULL, 0,
-                               reconnect);
+       struct nl80211_mlme_event event = {
+               .cmd = NL80211_CMD_DEAUTHENTICATE,
+               .buf = buf,
+               .buf_len = len,
+               .reconnect = reconnect,
+               .uapsd_queues = -1,
+       };
+       nl80211_send_mlme_event(rdev, netdev, &event, gfp);
  }
  
  void nl80211_send_disassoc(struct cfg80211_registered_device *rdev,
                           struct net_device *netdev, const u8 *buf,
                           size_t len, bool reconnect, gfp_t gfp)
  {
-       nl80211_send_mlme_event(rdev, netdev, buf, len,
-                               NL80211_CMD_DISASSOCIATE, gfp, -1, NULL, 0,
-                               reconnect);
+       struct nl80211_mlme_event event = {
+               .cmd = NL80211_CMD_DISASSOCIATE,
+               .buf = buf,
+               .buf_len = len,
+               .reconnect = reconnect,
+               .uapsd_queues = -1,
+       };
+       nl80211_send_mlme_event(rdev, netdev, &event, gfp);
  }
  
  void cfg80211_rx_unprot_mlme_mgmt(struct net_device *dev, const u8 *buf,
        struct wiphy *wiphy = wdev->wiphy;
        struct cfg80211_registered_device *rdev = wiphy_to_rdev(wiphy);
        const struct ieee80211_mgmt *mgmt = (void *)buf;
-       u32 cmd;
+       struct nl80211_mlme_event event = {
+               .buf = buf,
+               .buf_len = len,
+               .uapsd_queues = -1,
+       };
  
        if (WARN_ON(len < 2))
                return;
  
        if (ieee80211_is_deauth(mgmt->frame_control)) {
-               cmd = NL80211_CMD_UNPROT_DEAUTHENTICATE;
+               event.cmd = NL80211_CMD_UNPROT_DEAUTHENTICATE;
        } else if (ieee80211_is_disassoc(mgmt->frame_control)) {
-               cmd = NL80211_CMD_UNPROT_DISASSOCIATE;
+               event.cmd = NL80211_CMD_UNPROT_DISASSOCIATE;
        } else if (ieee80211_is_beacon(mgmt->frame_control)) {
                if (wdev->unprot_beacon_reported &&
                    elapsed_jiffies_msecs(wdev->unprot_beacon_reported) < 10000)
                        return;
-               cmd = NL80211_CMD_UNPROT_BEACON;
+               event.cmd = NL80211_CMD_UNPROT_BEACON;
                wdev->unprot_beacon_reported = jiffies;
        } else {
                return;
        }
  
        trace_cfg80211_rx_unprot_mlme_mgmt(dev, buf, len);
-       nl80211_send_mlme_event(rdev, dev, buf, len, cmd, GFP_ATOMIC, -1,
-                               NULL, 0, false);
+       nl80211_send_mlme_event(rdev, dev, &event, GFP_ATOMIC);
  }
  EXPORT_SYMBOL(cfg80211_rx_unprot_mlme_mgmt);
  
@@@ -19026,11 -19157,10 +19173,11 @@@ void cfg80211_cqm_rssi_notify_work(stru
        s32 rssi_level;
  
        cqm_config = wiphy_dereference(wdev->wiphy, wdev->cqm_config);
 -      if (!wdev->cqm_config)
 +      if (!cqm_config)
                return;
  
 -      cfg80211_cqm_rssi_update(rdev, wdev->netdev, cqm_config);
 +      if (cqm_config->use_range_api)
 +              cfg80211_cqm_rssi_update(rdev, wdev->netdev, cqm_config);
  
        rssi_level = cqm_config->last_rssi_event_value;
        rssi_event = cqm_config->last_rssi_event_type;
This page took 0.120783 seconds and 4 git commands to generate.