Merge tag 'wireless-2024-03-27' of git://git.kernel.org/pub/scm/linux/kernel/git...
authorJakub Kicinski <kuba@kernel.org>
Wed, 27 Mar 2024 22:39:17 +0000 (15:39 -0700)
committerJakub Kicinski <kuba@kernel.org>
Wed, 27 Mar 2024 22:39:18 +0000 (15:39 -0700)
Kalle Valo says:

====================
wireless fixes for v6.9-rc2

The first fixes for v6.9. Ping-Ke Shih now maintains a separate tree
for Realtek drivers, document that in the MAINTAINERS. Plenty of fixes
for both to stack and iwlwifi. Our kunit tests were working only on um
architecture but that's fixed now.

* tag 'wireless-2024-03-27' of git://git.kernel.org/pub/scm/linux/kernel/git/wireless/wireless: (21 commits)
  MAINTAINERS: wifi: mwifiex: add Francesco as reviewer
  kunit: fix wireless test dependencies
  wifi: iwlwifi: mvm: include link ID when releasing frames
  wifi: iwlwifi: mvm: handle debugfs names more carefully
  wifi: iwlwifi: mvm: guard against invalid STA ID on removal
  wifi: iwlwifi: read txq->read_ptr under lock
  wifi: iwlwifi: fw: don't always use FW dump trig
  wifi: iwlwifi: mvm: rfi: fix potential response leaks
  wifi: mac80211: correctly set active links upon TTLM
  wifi: iwlwifi: mvm: Configure the link mapping for non-MLD FW
  wifi: iwlwifi: mvm: consider having one active link
  wifi: iwlwifi: mvm: pick the version of SESSION_PROTECTION_NOTIF
  wifi: mac80211: fix prep_connection error path
  wifi: cfg80211: fix rdev_dump_mpp() arguments order
  wifi: iwlwifi: mvm: disable MLO for the time being
  wifi: cfg80211: add a flag to disable wireless extensions
  wifi: mac80211: fix ieee80211_bss_*_flags kernel-doc
  wifi: mac80211: check/clear fast rx for non-4addr sta VLAN changes
  wifi: mac80211: fix mlme_link_id_dbg()
  MAINTAINERS: wifi: add git tree for Realtek WiFi drivers
  ...
====================

Link: https://lore.kernel.org/r/20240327191346.1A1EAC433C7@smtp.kernel.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
21 files changed:
MAINTAINERS
drivers/net/wireless/intel/iwlwifi/fw/dbg.c
drivers/net/wireless/intel/iwlwifi/mvm/d3.c
drivers/net/wireless/intel/iwlwifi/mvm/debugfs-vif.c
drivers/net/wireless/intel/iwlwifi/mvm/link.c
drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c
drivers/net/wireless/intel/iwlwifi/mvm/mld-sta.c
drivers/net/wireless/intel/iwlwifi/mvm/mvm.h
drivers/net/wireless/intel/iwlwifi/mvm/rfi.c
drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c
drivers/net/wireless/intel/iwlwifi/mvm/time-event.c
drivers/net/wireless/intel/iwlwifi/queue/tx.c
drivers/net/wireless/realtek/rtw89/rtw8922a.c
include/net/cfg80211.h
net/mac80211/cfg.c
net/mac80211/debug.h
net/mac80211/ieee80211_i.h
net/mac80211/mlme.c
net/wireless/trace.h
net/wireless/wext-core.c
tools/testing/kunit/configs/all_tests.config

index 272dba71f6d9cde228a17c7e0627ff3f2446ec88..4baa772a176853c89343da51f5e2f160e8bc2756 100644 (file)
@@ -13133,6 +13133,7 @@ F:      drivers/net/ethernet/marvell/mvpp2/
 
 MARVELL MWIFIEX WIRELESS DRIVER
 M:     Brian Norris <briannorris@chromium.org>
+R:     Francesco Dolcini <francesco@dolcini.it>
 L:     linux-wireless@vger.kernel.org
 S:     Odd Fixes
 F:     drivers/net/wireless/marvell/mwifiex/
@@ -18642,18 +18643,21 @@ REALTEK WIRELESS DRIVER (rtlwifi family)
 M:     Ping-Ke Shih <pkshih@realtek.com>
 L:     linux-wireless@vger.kernel.org
 S:     Maintained
+T:     git https://github.com/pkshih/rtw.git
 F:     drivers/net/wireless/realtek/rtlwifi/
 
 REALTEK WIRELESS DRIVER (rtw88)
 M:     Ping-Ke Shih <pkshih@realtek.com>
 L:     linux-wireless@vger.kernel.org
 S:     Maintained
+T:     git https://github.com/pkshih/rtw.git
 F:     drivers/net/wireless/realtek/rtw88/
 
 REALTEK WIRELESS DRIVER (rtw89)
 M:     Ping-Ke Shih <pkshih@realtek.com>
 L:     linux-wireless@vger.kernel.org
 S:     Maintained
+T:     git https://github.com/pkshih/rtw.git
 F:     drivers/net/wireless/realtek/rtw89/
 
 REDPINE WIRELESS DRIVER
@@ -19197,12 +19201,14 @@ M:    Hin-Tak Leung <hintak.leung@gmail.com>
 M:     Larry Finger <Larry.Finger@lwfinger.net>
 L:     linux-wireless@vger.kernel.org
 S:     Maintained
+T:     git https://github.com/pkshih/rtw.git
 F:     drivers/net/wireless/realtek/rtl818x/rtl8187/
 
 RTL8XXXU WIRELESS DRIVER (rtl8xxxu)
 M:     Jes Sorensen <Jes.Sorensen@gmail.com>
 L:     linux-wireless@vger.kernel.org
 S:     Maintained
+T:     git https://github.com/pkshih/rtw.git
 F:     drivers/net/wireless/realtek/rtl8xxxu/
 
 RTRS TRANSPORT DRIVERS
index db6d7013df6654434774e9ec2bb4de33be50f4d2..c3bdf433d8f7b3aea81fd0ee919ad8f7fa8f692a 100644 (file)
@@ -3081,8 +3081,6 @@ static void iwl_fw_dbg_collect_sync(struct iwl_fw_runtime *fwrt, u8 wk_idx)
        struct iwl_fw_dbg_params params = {0};
        struct iwl_fwrt_dump_data *dump_data =
                &fwrt->dump.wks[wk_idx].dump_data;
-       u32 policy;
-       u32 time_point;
        if (!test_bit(wk_idx, &fwrt->dump.active_wks))
                return;
 
@@ -3113,13 +3111,16 @@ static void iwl_fw_dbg_collect_sync(struct iwl_fw_runtime *fwrt, u8 wk_idx)
 
        iwl_fw_dbg_stop_restart_recording(fwrt, &params, false);
 
-       policy = le32_to_cpu(dump_data->trig->apply_policy);
-       time_point = le32_to_cpu(dump_data->trig->time_point);
+       if (iwl_trans_dbg_ini_valid(fwrt->trans)) {
+               u32 policy = le32_to_cpu(dump_data->trig->apply_policy);
+               u32 time_point = le32_to_cpu(dump_data->trig->time_point);
 
-       if (policy & IWL_FW_INI_APPLY_POLICY_DUMP_COMPLETE_CMD) {
-               IWL_DEBUG_FW_INFO(fwrt, "WRT: sending dump complete\n");
-               iwl_send_dbg_dump_complete_cmd(fwrt, time_point, 0);
+               if (policy & IWL_FW_INI_APPLY_POLICY_DUMP_COMPLETE_CMD) {
+                       IWL_DEBUG_FW_INFO(fwrt, "WRT: sending dump complete\n");
+                       iwl_send_dbg_dump_complete_cmd(fwrt, time_point, 0);
+               }
        }
+
        if (fwrt->trans->dbg.last_tp_resetfw == IWL_FW_INI_RESET_FW_MODE_STOP_FW_ONLY)
                iwl_force_nmi(fwrt->trans);
 
index 553c6fffc7c66ddb182f00b75953fff86391c712..52518a47554e7087ded4782c24fd62340a17384a 100644 (file)
@@ -1260,15 +1260,15 @@ static int __iwl_mvm_suspend(struct ieee80211_hw *hw,
        if (IS_ERR_OR_NULL(vif))
                return 1;
 
-       if (ieee80211_vif_is_mld(vif) && vif->cfg.assoc) {
+       if (hweight16(vif->active_links) > 1) {
                /*
-                * Select the 'best' link. May need to revisit, it seems
-                * better to not optimize for throughput but rather range,
-                * reliability and power here - and select 2.4 GHz ...
+                * Select the 'best' link.
+                * May need to revisit, it seems better to not optimize
+                * for throughput but rather range, reliability and
+                * power here - and select 2.4 GHz ...
                 */
-               primary_link =
-                       iwl_mvm_mld_get_primary_link(mvm, vif,
-                                                    vif->active_links);
+               primary_link = iwl_mvm_mld_get_primary_link(mvm, vif,
+                                                           vif->active_links);
 
                if (WARN_ONCE(primary_link < 0, "no primary link in 0x%x\n",
                              vif->active_links))
@@ -1277,6 +1277,8 @@ static int __iwl_mvm_suspend(struct ieee80211_hw *hw,
                ret = ieee80211_set_active_links(vif, BIT(primary_link));
                if (ret)
                        return ret;
+       } else if (vif->active_links) {
+               primary_link = __ffs(vif->active_links);
        } else {
                primary_link = 0;
        }
index 51b01f7528beec1ec99c7a772bd372051e1463d1..7fe57ecd0682b8bcdebbb7c999f655903d498785 100644 (file)
@@ -748,7 +748,9 @@ void iwl_mvm_vif_dbgfs_add_link(struct iwl_mvm *mvm, struct ieee80211_vif *vif)
 {
        struct dentry *dbgfs_dir = vif->debugfs_dir;
        struct iwl_mvm_vif *mvmvif = iwl_mvm_vif_from_mac80211(vif);
-       char buf[100];
+       char buf[3 * 3 + 11 + (NL80211_WIPHY_NAME_MAXLEN + 1) +
+                (7 + IFNAMSIZ + 1) + 6 + 1];
+       char name[7 + IFNAMSIZ + 1];
 
        /* this will happen in monitor mode */
        if (!dbgfs_dir)
@@ -761,10 +763,11 @@ void iwl_mvm_vif_dbgfs_add_link(struct iwl_mvm *mvm, struct ieee80211_vif *vif)
         * find
         * netdev:wlan0 -> ../../../ieee80211/phy0/netdev:wlan0/iwlmvm/
         */
-       snprintf(buf, 100, "../../../%pd3/iwlmvm", dbgfs_dir);
+       snprintf(name, sizeof(name), "%pd", dbgfs_dir);
+       snprintf(buf, sizeof(buf), "../../../%pd3/iwlmvm", dbgfs_dir);
 
-       mvmvif->dbgfs_slink = debugfs_create_symlink(dbgfs_dir->d_name.name,
-                                                    mvm->debugfs_dir, buf);
+       mvmvif->dbgfs_slink =
+               debugfs_create_symlink(name, mvm->debugfs_dir, buf);
 }
 
 void iwl_mvm_vif_dbgfs_rm_link(struct iwl_mvm *mvm, struct ieee80211_vif *vif)
index f13f13e6b71af17f1b8ca3ac97a40ba3e236b838..9f69e04594e49cb59f3102071c905bd75b93f825 100644 (file)
@@ -46,6 +46,27 @@ static int iwl_mvm_link_cmd_send(struct iwl_mvm *mvm,
        return ret;
 }
 
+int iwl_mvm_set_link_mapping(struct iwl_mvm *mvm, struct ieee80211_vif *vif,
+                            struct ieee80211_bss_conf *link_conf)
+{
+       struct iwl_mvm_vif *mvmvif = iwl_mvm_vif_from_mac80211(vif);
+       struct iwl_mvm_vif_link_info *link_info =
+               mvmvif->link[link_conf->link_id];
+
+       if (link_info->fw_link_id == IWL_MVM_FW_LINK_ID_INVALID) {
+               link_info->fw_link_id = iwl_mvm_get_free_fw_link_id(mvm,
+                                                                   mvmvif);
+               if (link_info->fw_link_id >=
+                   ARRAY_SIZE(mvm->link_id_to_link_conf))
+                       return -EINVAL;
+
+               rcu_assign_pointer(mvm->link_id_to_link_conf[link_info->fw_link_id],
+                                  link_conf);
+       }
+
+       return 0;
+}
+
 int iwl_mvm_add_link(struct iwl_mvm *mvm, struct ieee80211_vif *vif,
                     struct ieee80211_bss_conf *link_conf)
 {
@@ -55,19 +76,14 @@ int iwl_mvm_add_link(struct iwl_mvm *mvm, struct ieee80211_vif *vif,
        struct iwl_link_config_cmd cmd = {};
        unsigned int cmd_id = WIDE_ID(MAC_CONF_GROUP, LINK_CONFIG_CMD);
        u8 cmd_ver = iwl_fw_lookup_cmd_ver(mvm->fw, cmd_id, 1);
+       int ret;
 
        if (WARN_ON_ONCE(!link_info))
                return -EINVAL;
 
-       if (link_info->fw_link_id == IWL_MVM_FW_LINK_ID_INVALID) {
-               link_info->fw_link_id = iwl_mvm_get_free_fw_link_id(mvm,
-                                                                   mvmvif);
-               if (link_info->fw_link_id >= ARRAY_SIZE(mvm->link_id_to_link_conf))
-                       return -EINVAL;
-
-               rcu_assign_pointer(mvm->link_id_to_link_conf[link_info->fw_link_id],
-                                  link_conf);
-       }
+       ret = iwl_mvm_set_link_mapping(mvm, vif, link_conf);
+       if (ret)
+               return ret;
 
        /* Update SF - Disable if needed. if this fails, SF might still be on
         * while many macs are bound, which is forbidden - so fail the binding.
@@ -248,6 +264,24 @@ send_cmd:
        return ret;
 }
 
+int iwl_mvm_unset_link_mapping(struct iwl_mvm *mvm, struct ieee80211_vif *vif,
+                              struct ieee80211_bss_conf *link_conf)
+{
+       struct iwl_mvm_vif *mvmvif = iwl_mvm_vif_from_mac80211(vif);
+       struct iwl_mvm_vif_link_info *link_info =
+               mvmvif->link[link_conf->link_id];
+
+       /* mac80211 thought we have the link, but it was never configured */
+       if (WARN_ON(!link_info ||
+                   link_info->fw_link_id >=
+                   ARRAY_SIZE(mvm->link_id_to_link_conf)))
+               return -EINVAL;
+
+       RCU_INIT_POINTER(mvm->link_id_to_link_conf[link_info->fw_link_id],
+                        NULL);
+       return 0;
+}
+
 int iwl_mvm_remove_link(struct iwl_mvm *mvm, struct ieee80211_vif *vif,
                        struct ieee80211_bss_conf *link_conf)
 {
@@ -257,13 +291,10 @@ int iwl_mvm_remove_link(struct iwl_mvm *mvm, struct ieee80211_vif *vif,
        struct iwl_link_config_cmd cmd = {};
        int ret;
 
-       /* mac80211 thought we have the link, but it was never configured */
-       if (WARN_ON(!link_info ||
-                   link_info->fw_link_id >= ARRAY_SIZE(mvm->link_id_to_link_conf)))
+       ret = iwl_mvm_unset_link_mapping(mvm, vif, link_conf);
+       if (ret)
                return 0;
 
-       RCU_INIT_POINTER(mvm->link_id_to_link_conf[link_info->fw_link_id],
-                        NULL);
        cmd.link_id = cpu_to_le32(link_info->fw_link_id);
        iwl_mvm_release_fw_link_id(mvm, link_info->fw_link_id);
        link_info->fw_link_id = IWL_MVM_FW_LINK_ID_INVALID;
index 1935630d3def0092a15b5e0ce755cef1149cdd9f..8f4b063d6243ed98b4ddb2e51b27803bb379d015 100644 (file)
@@ -360,7 +360,7 @@ int iwl_mvm_mac_setup_register(struct iwl_mvm *mvm)
        if (mvm->mld_api_is_used && mvm->nvm_data->sku_cap_11be_enable &&
            !iwlwifi_mod_params.disable_11ax &&
            !iwlwifi_mod_params.disable_11be)
-               hw->wiphy->flags |= WIPHY_FLAG_SUPPORTS_MLO;
+               hw->wiphy->flags |= WIPHY_FLAG_DISABLE_WEXT;
 
        /* With MLD FW API, it tracks timing by itself,
         * no need for any timing from the host
@@ -1577,8 +1577,14 @@ static int iwl_mvm_mac_add_interface(struct ieee80211_hw *hw,
        mvmvif->mvm = mvm;
 
        /* the first link always points to the default one */
+       mvmvif->deflink.fw_link_id = IWL_MVM_FW_LINK_ID_INVALID;
+       mvmvif->deflink.active = 0;
        mvmvif->link[0] = &mvmvif->deflink;
 
+       ret = iwl_mvm_set_link_mapping(mvm, vif, &vif->bss_conf);
+       if (ret)
+               goto out;
+
        /*
         * Not much to do here. The stack will not allow interface
         * types or combinations that we didn't advertise, so we
@@ -1783,6 +1789,7 @@ static void iwl_mvm_mac_remove_interface(struct ieee80211_hw *hw,
                mvm->p2p_device_vif = NULL;
        }
 
+       iwl_mvm_unset_link_mapping(mvm, vif, &vif->bss_conf);
        iwl_mvm_mac_ctxt_remove(mvm, vif);
 
        RCU_INIT_POINTER(mvm->vif_id_to_mac[mvmvif->id], NULL);
index 1628bf55458fcb0bf7d812970d619e815a89c950..23e64a757cfe86a06626a32430dc3919c983e91f 100644 (file)
@@ -855,10 +855,15 @@ int iwl_mvm_mld_rm_sta(struct iwl_mvm *mvm, struct ieee80211_vif *vif,
 
 int iwl_mvm_mld_rm_sta_id(struct iwl_mvm *mvm, u8 sta_id)
 {
-       int ret = iwl_mvm_mld_rm_sta_from_fw(mvm, sta_id);
+       int ret;
 
        lockdep_assert_held(&mvm->mutex);
 
+       if (WARN_ON(sta_id == IWL_MVM_INVALID_STA))
+               return 0;
+
+       ret = iwl_mvm_mld_rm_sta_from_fw(mvm, sta_id);
+
        RCU_INIT_POINTER(mvm->fw_id_to_mac_id[sta_id], NULL);
        RCU_INIT_POINTER(mvm->fw_id_to_link_sta[sta_id], NULL);
        return ret;
index 44571114fb154b39ab0e3be14aa41543241a980e..f0b24f00938bd52250a0153791040832ec203d32 100644 (file)
@@ -1916,11 +1916,15 @@ int iwl_mvm_binding_remove_vif(struct iwl_mvm *mvm, struct ieee80211_vif *vif);
 u32 iwl_mvm_get_lmac_id(struct iwl_mvm *mvm, enum nl80211_band band);
 
 /* Links */
+int iwl_mvm_set_link_mapping(struct iwl_mvm *mvm, struct ieee80211_vif *vif,
+                            struct ieee80211_bss_conf *link_conf);
 int iwl_mvm_add_link(struct iwl_mvm *mvm, struct ieee80211_vif *vif,
                     struct ieee80211_bss_conf *link_conf);
 int iwl_mvm_link_changed(struct iwl_mvm *mvm, struct ieee80211_vif *vif,
                         struct ieee80211_bss_conf *link_conf,
                         u32 changes, bool active);
+int iwl_mvm_unset_link_mapping(struct iwl_mvm *mvm, struct ieee80211_vif *vif,
+                              struct ieee80211_bss_conf *link_conf);
 int iwl_mvm_remove_link(struct iwl_mvm *mvm, struct ieee80211_vif *vif,
                        struct ieee80211_bss_conf *link_conf);
 int iwl_mvm_disable_link(struct iwl_mvm *mvm, struct ieee80211_vif *vif,
index 2ecd32bed752ff55734d5e9f78f36efc213cb107..045c862a8fc4fc66c0e5c6cfa8333ae4fb968f28 100644 (file)
@@ -132,14 +132,18 @@ struct iwl_rfi_freq_table_resp_cmd *iwl_rfi_get_freq_table(struct iwl_mvm *mvm)
        if (ret)
                return ERR_PTR(ret);
 
-       if (WARN_ON_ONCE(iwl_rx_packet_payload_len(cmd.resp_pkt) != resp_size))
+       if (WARN_ON_ONCE(iwl_rx_packet_payload_len(cmd.resp_pkt) !=
+                        resp_size)) {
+               iwl_free_resp(&cmd);
                return ERR_PTR(-EIO);
+       }
 
        resp = kmemdup(cmd.resp_pkt->data, resp_size, GFP_KERNEL);
+       iwl_free_resp(&cmd);
+
        if (!resp)
                return ERR_PTR(-ENOMEM);
 
-       iwl_free_resp(&cmd);
        return resp;
 }
 
index 1484eaedf45292d53b349000b274fd25e435c369..ce8d83c771a70d9c93e17a562bb8b4e1e5c7a120 100644 (file)
@@ -236,21 +236,13 @@ static void iwl_mvm_add_rtap_sniffer_config(struct iwl_mvm *mvm,
 static void iwl_mvm_pass_packet_to_mac80211(struct iwl_mvm *mvm,
                                            struct napi_struct *napi,
                                            struct sk_buff *skb, int queue,
-                                           struct ieee80211_sta *sta,
-                                           struct ieee80211_link_sta *link_sta)
+                                           struct ieee80211_sta *sta)
 {
        if (unlikely(iwl_mvm_check_pn(mvm, skb, queue, sta))) {
                kfree_skb(skb);
                return;
        }
 
-       if (sta && sta->valid_links && link_sta) {
-               struct ieee80211_rx_status *rx_status = IEEE80211_SKB_RXCB(skb);
-
-               rx_status->link_valid = 1;
-               rx_status->link_id = link_sta->link_id;
-       }
-
        ieee80211_rx_napi(mvm->hw, sta, skb, napi);
 }
 
@@ -588,7 +580,7 @@ static void iwl_mvm_release_frames(struct iwl_mvm *mvm,
                while ((skb = __skb_dequeue(skb_list))) {
                        iwl_mvm_pass_packet_to_mac80211(mvm, napi, skb,
                                                        reorder_buf->queue,
-                                                       sta, NULL /* FIXME */);
+                                                       sta);
                        reorder_buf->num_stored--;
                }
        }
@@ -2213,6 +2205,11 @@ void iwl_mvm_rx_mpdu_mq(struct iwl_mvm *mvm, struct napi_struct *napi,
                        if (IS_ERR(sta))
                                sta = NULL;
                        link_sta = rcu_dereference(mvm->fw_id_to_link_sta[id]);
+
+                       if (sta && sta->valid_links && link_sta) {
+                               rx_status->link_valid = 1;
+                               rx_status->link_id = link_sta->link_id;
+                       }
                }
        } else if (!is_multicast_ether_addr(hdr->addr2)) {
                /*
@@ -2356,8 +2353,7 @@ void iwl_mvm_rx_mpdu_mq(struct iwl_mvm *mvm, struct napi_struct *napi,
                    !(desc->amsdu_info & IWL_RX_MPDU_AMSDU_LAST_SUBFRAME))
                        rx_status->flag |= RX_FLAG_AMSDU_MORE;
 
-               iwl_mvm_pass_packet_to_mac80211(mvm, napi, skb, queue, sta,
-                                               link_sta);
+               iwl_mvm_pass_packet_to_mac80211(mvm, napi, skb, queue, sta);
        }
 out:
        rcu_read_unlock();
index a59d264a11c52f5174fe4475c6915bf5c49760d4..ad960faceb0d8f6b05160a547b056d45f47563f2 100644 (file)
@@ -879,9 +879,8 @@ void iwl_mvm_rx_session_protect_notif(struct iwl_mvm *mvm,
        struct iwl_rx_packet *pkt = rxb_addr(rxb);
        struct iwl_mvm_session_prot_notif *notif = (void *)pkt->data;
        unsigned int ver =
-               iwl_fw_lookup_cmd_ver(mvm->fw,
-                                     WIDE_ID(MAC_CONF_GROUP,
-                                             SESSION_PROTECTION_CMD), 2);
+               iwl_fw_lookup_notif_ver(mvm->fw, MAC_CONF_GROUP,
+                                       SESSION_PROTECTION_NOTIF, 2);
        int id = le32_to_cpu(notif->mac_link_id);
        struct ieee80211_vif *vif;
        struct iwl_mvm_vif *mvmvif;
index 33973a60d0bf4165e71573807d8791cede555a3d..6229c785c8457616834cac32fc19c59b31f5c24e 100644 (file)
@@ -1589,9 +1589,9 @@ void iwl_txq_reclaim(struct iwl_trans *trans, int txq_id, int ssn,
                return;
 
        tfd_num = iwl_txq_get_cmd_index(txq, ssn);
-       read_ptr = iwl_txq_get_cmd_index(txq, txq->read_ptr);
 
        spin_lock_bh(&txq->lock);
+       read_ptr = iwl_txq_get_cmd_index(txq, txq->read_ptr);
 
        if (!test_bit(txq_id, trans->txqs.queue_used)) {
                IWL_DEBUG_TX_QUEUES(trans, "Q %d inactive - ignoring idx %d\n",
index 367459bd1345742f00e600773e3613abf7e7066c..708132d5be2a6ad179a8361375e1c25f6e785919 100644 (file)
@@ -2233,7 +2233,7 @@ static void rtw8922a_btc_init_cfg(struct rtw89_dev *rtwdev)
                 * Shared-Ant && BTG-path:WL mask(0x55f), others:WL THRU(0x5ff)
                 */
                if (btc->ant_type == BTC_ANT_SHARED && btc->btg_pos == path)
-                       rtw8922a_set_trx_mask(rtwdev, path, BTC_BT_TX_GROUP, 0x5ff);
+                       rtw8922a_set_trx_mask(rtwdev, path, BTC_BT_TX_GROUP, 0x55f);
                else
                        rtw8922a_set_trx_mask(rtwdev, path, BTC_BT_TX_GROUP, 0x5ff);
 
index 2e2be4fd2bb6531dfd8965c8706a2cb33ff0e888..1e09329acc426873861d0bf5755dbba462a56b65 100644 (file)
@@ -4991,6 +4991,7 @@ struct cfg80211_ops {
  *     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.
+ * @WIPHY_FLAG_DISABLE_WEXT: disable wireless extensions for this device
  */
 enum wiphy_flags {
        WIPHY_FLAG_SUPPORTS_EXT_KEK_KCK         = BIT(0),
@@ -5002,6 +5003,7 @@ enum wiphy_flags {
        WIPHY_FLAG_4ADDR_STATION                = BIT(6),
        WIPHY_FLAG_CONTROL_PORT_PROTOCOL        = BIT(7),
        WIPHY_FLAG_IBSS_RSN                     = BIT(8),
+       WIPHY_FLAG_DISABLE_WEXT                 = BIT(9),
        WIPHY_FLAG_MESH_AUTH                    = BIT(10),
        WIPHY_FLAG_SUPPORTS_EXT_KCK_32          = BIT(11),
        WIPHY_FLAG_SUPPORTS_NSTR_NONPRIMARY     = BIT(12),
index f03452dc716d5d9588fe5c50a09888ae78c75402..f67c1d0218121dc98b67af7201686a0c0b2ad817 100644 (file)
@@ -2199,15 +2199,14 @@ static int ieee80211_change_station(struct wiphy *wiphy,
                }
 
                if (sta->sdata->vif.type == NL80211_IFTYPE_AP_VLAN &&
-                   sta->sdata->u.vlan.sta) {
-                       ieee80211_clear_fast_rx(sta);
+                   sta->sdata->u.vlan.sta)
                        RCU_INIT_POINTER(sta->sdata->u.vlan.sta, NULL);
-               }
 
                if (test_sta_flag(sta, WLAN_STA_AUTHORIZED))
                        ieee80211_vif_dec_num_mcast(sta->sdata);
 
                sta->sdata = vlansdata;
+               ieee80211_check_fast_rx(sta);
                ieee80211_check_fast_xmit(sta);
 
                if (test_sta_flag(sta, WLAN_STA_AUTHORIZED)) {
index 49da401c53408b0f517425109663f507e763775e..35a8ba25fa57fdb70f111c7d80ac13df7a2a8c9b 100644 (file)
@@ -158,7 +158,7 @@ do {                                                                        \
                        _sdata_dbg(print, sdata, "[link %d] " fmt,      \
                                   link_id, ##__VA_ARGS__);             \
                else                                                    \
-                       _sdata_dbg(1, sdata, fmt, ##__VA_ARGS__);       \
+                       _sdata_dbg(print, sdata, fmt, ##__VA_ARGS__);   \
        } while (0)
 #define link_dbg(link, fmt, ...)                                       \
        _link_id_dbg(1, (link)->sdata, (link)->link_id,                 \
index b6fead612b66b51df10c52e0dad6a3ed05aaabbf..bd507d6b65e3f6b67f6b6883d049f30b0c1ae67a 100644 (file)
@@ -131,7 +131,7 @@ struct ieee80211_bss {
 };
 
 /**
- * enum ieee80211_corrupt_data_flags - BSS data corruption flags
+ * enum ieee80211_bss_corrupt_data_flags - BSS data corruption flags
  * @IEEE80211_BSS_CORRUPT_BEACON: last beacon frame received was corrupted
  * @IEEE80211_BSS_CORRUPT_PROBE_RESP: last probe response received was corrupted
  *
@@ -144,7 +144,7 @@ enum ieee80211_bss_corrupt_data_flags {
 };
 
 /**
- * enum ieee80211_valid_data_flags - BSS valid data flags
+ * enum ieee80211_bss_valid_data_flags - BSS valid data flags
  * @IEEE80211_BSS_VALID_WMM: WMM/UAPSD data was gathered from non-corrupt IE
  * @IEEE80211_BSS_VALID_RATES: Supported rates were gathered from non-corrupt IE
  * @IEEE80211_BSS_VALID_ERP: ERP flag was gathered from non-corrupt IE
index 47a2cba8313f04c3d86c6ce424395a0aca2b7cc1..96b70006b7fc0b11b12f423fb74ec32a030d91af 100644 (file)
@@ -5874,6 +5874,15 @@ static int ieee80211_ttlm_set_links(struct ieee80211_sub_if_data *sdata,
        }
 
        if (sdata->vif.active_links != active_links) {
+               /* usable links are affected when active_links are changed,
+                * so notify the driver about the status change
+                */
+               changed |= BSS_CHANGED_MLD_VALID_LINKS;
+               active_links &= sdata->vif.active_links;
+               if (!active_links)
+                       active_links =
+                               BIT(__ffs(sdata->vif.valid_links &
+                                   ~dormant_links));
                ret = ieee80211_set_active_links(&sdata->vif, active_links);
                if (ret) {
                        sdata_info(sdata, "Failed to set TTLM active links\n");
@@ -5888,7 +5897,6 @@ static int ieee80211_ttlm_set_links(struct ieee80211_sub_if_data *sdata,
                goto out;
        }
 
-       changed |= BSS_CHANGED_MLD_VALID_LINKS;
        sdata->vif.suspended_links = suspended_links;
        if (sdata->vif.suspended_links)
                changed |= BSS_CHANGED_MLD_TTLM;
@@ -7652,7 +7660,7 @@ static int ieee80211_prep_connection(struct ieee80211_sub_if_data *sdata,
                        sdata_info(sdata,
                                   "failed to insert STA entry for the AP (error %d)\n",
                                   err);
-                       goto out_err;
+                       goto out_release_chan;
                }
        } else
                WARN_ON_ONCE(!ether_addr_equal(link->u.mgd.bssid, cbss->bssid));
@@ -7663,8 +7671,9 @@ static int ieee80211_prep_connection(struct ieee80211_sub_if_data *sdata,
 
        return 0;
 
+out_release_chan:
+       ieee80211_link_release_channel(link);
 out_err:
-       ieee80211_link_release_channel(&sdata->deflink);
        ieee80211_vif_set_links(sdata, 0, 0);
        return err;
 }
index e039e66ab37774bc45e77ef9eb0abe8bf6311ae5..cbbf347c6b2e099802b135266ca7fae59bd467f9 100644 (file)
@@ -1024,7 +1024,7 @@ TRACE_EVENT(rdev_get_mpp,
 TRACE_EVENT(rdev_dump_mpp,
        TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, int _idx,
                 u8 *dst, u8 *mpp),
-       TP_ARGS(wiphy, netdev, _idx, mpp, dst),
+       TP_ARGS(wiphy, netdev, _idx, dst, mpp),
        TP_STRUCT__entry(
                WIPHY_ENTRY
                NETDEV_ENTRY
index a161c64d1765e6cb2e2a4ae08e5534b22c8aa457..838ad6541a17d8acaa531aa62a8acceb39c959ad 100644 (file)
@@ -4,6 +4,7 @@
  * Authors :   Jean Tourrilhes - HPL - <jt@hpl.hp.com>
  * Copyright (c) 1997-2007 Jean Tourrilhes, All Rights Reserved.
  * Copyright   2009 Johannes Berg <johannes@sipsolutions.net>
+ * Copyright (C) 2024 Intel Corporation
  *
  * (As all part of the Linux kernel, this file is GPL)
  */
@@ -662,7 +663,8 @@ struct iw_statistics *get_wireless_stats(struct net_device *dev)
            dev->ieee80211_ptr->wiphy->wext &&
            dev->ieee80211_ptr->wiphy->wext->get_wireless_stats) {
                wireless_warn_cfg80211_wext();
-               if (dev->ieee80211_ptr->wiphy->flags & WIPHY_FLAG_SUPPORTS_MLO)
+               if (dev->ieee80211_ptr->wiphy->flags & (WIPHY_FLAG_SUPPORTS_MLO |
+                                                       WIPHY_FLAG_DISABLE_WEXT))
                        return NULL;
                return dev->ieee80211_ptr->wiphy->wext->get_wireless_stats(dev);
        }
@@ -704,7 +706,8 @@ static iw_handler get_handler(struct net_device *dev, unsigned int cmd)
 #ifdef CONFIG_CFG80211_WEXT
        if (dev->ieee80211_ptr && dev->ieee80211_ptr->wiphy) {
                wireless_warn_cfg80211_wext();
-               if (dev->ieee80211_ptr->wiphy->flags & WIPHY_FLAG_SUPPORTS_MLO)
+               if (dev->ieee80211_ptr->wiphy->flags & (WIPHY_FLAG_SUPPORTS_MLO |
+                                                       WIPHY_FLAG_DISABLE_WEXT))
                        return NULL;
                handlers = dev->ieee80211_ptr->wiphy->wext;
        }
index aa5ec149f96c16e1e4736264b735201f93b5a9f5..c5914f4e75e1be0613c7d9cfabd2b0fb0fddcaff 100644 (file)
@@ -28,6 +28,8 @@ CONFIG_MCTP_FLOWS=y
 CONFIG_INET=y
 CONFIG_MPTCP=y
 
+CONFIG_NETDEVICES=y
+CONFIG_WLAN=y
 CONFIG_CFG80211=y
 CONFIG_MAC80211=y
 CONFIG_WLAN_VENDOR_INTEL=y