PKG_NAME:=mac80211
-PKG_VERSION:=6.1.24
-PKG_RELEASE:=4
-# PKG_SOURCE_URL:=@KERNEL/linux/kernel/projects/backports/stable/v5.15.58/
-PKG_SOURCE_URL:=http://mirror2.openwrt.org/sources/
-PKG_HASH:=5d39aca7e34c33cb9b3e366117b2e86841b7bdd37933679d6b1e61be6b150648
+PKG_VERSION:=6.1.97-1
+PKG_RELEASE:=1
+PKG_SOURCE_URL:=@KERNEL/linux/kernel/projects/backports/stable/v6.1.97/
+PKG_HASH:=8e9ae2d02f373252dd61f5c6a81c88eec67ca773464d9ef3d844752dc6775540
PKG_SOURCE:=backports-$(PKG_VERSION).tar.xz
PKG_BUILD_DIR:=$(KERNEL_BUILD_DIR)/backports-$(PKG_VERSION)
$(Build/Patch)
rm -rf \
$(PKG_BUILD_DIR)/include/linux/ssb \
- $(PKG_BUILD_DIR)/include/linux/bcma \
- $(PKG_BUILD_DIR)/include/net/bluetooth
+ $(PKG_BUILD_DIR)/include/linux/bcma
rm -f \
- $(PKG_BUILD_DIR)/include/linux/cordic.h \
- $(PKG_BUILD_DIR)/include/linux/crc8.h \
- $(PKG_BUILD_DIR)/include/linux/eeprom_93cx6.h \
- $(PKG_BUILD_DIR)/include/linux/wl12xx.h \
$(PKG_BUILD_DIR)/include/linux/mhi.h \
- $(PKG_BUILD_DIR)/include/net/ieee80211.h \
- $(PKG_BUILD_DIR)/backport-include/linux/bcm47xx_nvram.h
+ $(PKG_BUILD_DIR)/include/trace/events/qrtr.h \
+ $(PKG_BUILD_DIR)/include/net/rsi_91x.h \
+ $(PKG_BUILD_DIR)/backport-include/linux/platform_data/brcmnand.h \
+ $(PKG_BUILD_DIR)/backport-include/linux/soc/mediatek/mtk_wed.h
echo 'compat-wireless-$(PKG_VERSION)-$(PKG_RELEASE)-$(REVISION)' > $(PKG_BUILD_DIR)/compat_version
endef
ifeq ($(strip $(CONFIG_EXTERNAL_KERNEL_TREE)),"")
ifeq ($(strip $(CONFIG_KERNEL_GIT_CLONE_URI)),"")
define Build/Configure
- cmp $(PKG_BUILD_DIR)/include/linux/ath9k_platform.h $(LINUX_DIR)/include/linux/ath9k_platform.h
cmp $(PKG_BUILD_DIR)/include/linux/ath5k_platform.h $(LINUX_DIR)/include/linux/ath5k_platform.h
cmp $(PKG_BUILD_DIR)/include/linux/rt2x00_platform.h $(LINUX_DIR)/include/linux/rt2x00_platform.h
endef
CFLAGS_trace.o := -I$(src)
--- a/drivers/net/wireless/ath/ath.h
+++ b/drivers/net/wireless/ath/ath.h
-@@ -317,14 +317,7 @@ void _ath_dbg(struct ath_common *common,
+@@ -321,14 +321,7 @@ void _ath_dbg(struct ath_common *common,
#endif /* CPTCFG_ATH_DEBUG */
/** Returns string describing opmode, or NULL if unknown mode. */
help
--- a/local-symbols
+++ b/local-symbols
-@@ -102,6 +102,7 @@ ADM8211=
+@@ -94,6 +94,7 @@ ADM8211=
ATH_COMMON=
WLAN_VENDOR_ATH=
ATH_DEBUG=
--- a/net/wireless/reg.c
+++ b/net/wireless/reg.c
-@@ -3370,6 +3370,8 @@ void regulatory_hint_country_ie(struct w
+@@ -3373,6 +3373,8 @@ void regulatory_hint_country_ie(struct w
enum environment_cap env = ENVIRON_ANY;
struct regulatory_request *request = NULL, *lr;
/* IE len must be evenly divisible by 2 */
if (country_ie_len & 0x01)
return;
-@@ -3621,6 +3623,7 @@ static bool is_wiphy_all_set_reg_flag(en
+@@ -3624,6 +3626,7 @@ static bool is_wiphy_all_set_reg_flag(en
void regulatory_hint_disconnect(void)
{
--- a/drivers/net/wireless/ath/ath10k/Kconfig
+++ b/drivers/net/wireless/ath/ath10k/Kconfig
-@@ -86,6 +86,12 @@ config ATH10K_TRACING
+@@ -87,6 +87,12 @@ config ATH10K_TRACING
help
Select this to ath10k use tracing infrastructure.
void ath10k_thermal_event_temperature(struct ath10k *ar, int temperature);
--- a/local-symbols
+++ b/local-symbols
-@@ -161,6 +161,7 @@ ATH10K_SNOC=
+@@ -153,6 +153,7 @@ ATH10K_SNOC=
ATH10K_DEBUG=
ATH10K_DEBUGFS=
ATH10K_SPECTRAL=
--- a/drivers/net/wireless/ath/ath10k/core.c
+++ b/drivers/net/wireless/ath/ath10k/core.c
-@@ -3516,6 +3516,16 @@ int ath10k_core_register(struct ath10k *
+@@ -3510,6 +3510,16 @@ int ath10k_core_register(struct ath10k *
queue_work(ar->workqueue, &ar->register_work);
--- a/drivers/net/wireless/ath/ath10k/mac.c
+++ b/drivers/net/wireless/ath/ath10k/mac.c
-@@ -9909,6 +9909,21 @@ static int ath10k_mac_init_rd(struct ath
+@@ -9918,6 +9918,21 @@ static int ath10k_mac_init_rd(struct ath
return 0;
}
int ath10k_mac_register(struct ath10k *ar)
{
static const u32 cipher_suites[] = {
-@@ -10267,6 +10282,12 @@ int ath10k_mac_register(struct ath10k *a
+@@ -10276,6 +10291,12 @@ int ath10k_mac_register(struct ath10k *a
ar->hw->weight_multiplier = ATH10K_AIRTIME_WEIGHT_MULTIPLIER;
create mode 100644 drivers/net/wireless/ath/ath10k/leds.h
--- a/drivers/net/wireless/ath/ath10k/Kconfig
+++ b/drivers/net/wireless/ath/ath10k/Kconfig
-@@ -71,6 +71,16 @@ config ATH10K_DEBUGFS
+@@ -72,6 +72,16 @@ config ATH10K_DEBUGFS
If unsure, say Y to make it easier to debug problems.
ath10k_core-$(CONFIG_DEV_COREDUMP) += coredump.o
--- a/local-symbols
+++ b/local-symbols
-@@ -162,6 +162,7 @@ ATH10K_DEBUG=
+@@ -154,6 +154,7 @@ ATH10K_DEBUG=
ATH10K_DEBUGFS=
ATH10K_SPECTRAL=
ATH10K_THERMAL=
.patch_load_addr = QCA9888_HW_2_0_PATCH_LOAD_ADDR,
.uart_pin = 7,
.cc_wraparound_type = ATH10K_HW_CC_WRAP_SHIFTED_EACH,
-@@ -3231,6 +3237,10 @@ int ath10k_core_start(struct ath10k *ar,
+@@ -3225,6 +3231,10 @@ int ath10k_core_start(struct ath10k *ar,
goto err_hif_stop;
}
return 0;
err_hif_stop:
-@@ -3489,9 +3499,18 @@ static void ath10k_core_register_work(st
+@@ -3483,9 +3493,18 @@ static void ath10k_core_register_work(st
goto err_spectral_destroy;
}
err_spectral_destroy:
ath10k_spectral_destroy(ar);
err_debug_destroy:
-@@ -3537,6 +3556,8 @@ void ath10k_core_unregister(struct ath10
+@@ -3531,6 +3550,8 @@ void ath10k_core_unregister(struct ath10
if (!test_bit(ATH10K_FLAG_CORE_REGISTERED, &ar->dev_flags))
return;
#include "htt.h"
#include "htc.h"
-@@ -1253,6 +1254,13 @@ struct ath10k {
+@@ -1256,6 +1257,13 @@ struct ath10k {
} testmode;
struct {
u32 fw_crash_counter;
--- a/drivers/net/wireless/ath/ath10k/hw.h
+++ b/drivers/net/wireless/ath/ath10k/hw.h
-@@ -519,6 +519,7 @@ struct ath10k_hw_params {
+@@ -520,6 +520,7 @@ struct ath10k_hw_params {
const char *name;
u32 patch_load_addr;
int uart_pin;
{
--- a/drivers/net/wireless/ath/ath10k/wmi-tlv.c
+++ b/drivers/net/wireless/ath/ath10k/wmi-tlv.c
-@@ -4594,6 +4594,8 @@ static const struct wmi_ops wmi_tlv_ops
+@@ -4598,6 +4598,8 @@ static const struct wmi_ops wmi_tlv_ops
.gen_echo = ath10k_wmi_tlv_op_gen_echo,
.gen_vdev_spectral_conf = ath10k_wmi_tlv_op_gen_vdev_spectral_conf,
.gen_vdev_spectral_enable = ath10k_wmi_tlv_op_gen_vdev_spectral_enable,
static const struct wmi_peer_flags_map wmi_tlv_peer_flags_map = {
--- a/drivers/net/wireless/ath/ath10k/wmi.c
+++ b/drivers/net/wireless/ath/ath10k/wmi.c
-@@ -7472,6 +7472,49 @@ ath10k_wmi_op_gen_peer_set_param(struct
+@@ -7492,6 +7492,49 @@ ath10k_wmi_op_gen_peer_set_param(struct
return skb;
}
static struct sk_buff *
ath10k_wmi_op_gen_set_psmode(struct ath10k *ar, u32 vdev_id,
enum wmi_sta_ps_mode psmode)
-@@ -9160,6 +9203,9 @@ static const struct wmi_ops wmi_ops = {
+@@ -9180,6 +9223,9 @@ static const struct wmi_ops wmi_ops = {
.fw_stats_fill = ath10k_wmi_main_op_fw_stats_fill,
.get_vdev_subtype = ath10k_wmi_op_get_vdev_subtype,
.gen_echo = ath10k_wmi_op_gen_echo,
/* .gen_bcn_tmpl not implemented */
/* .gen_prb_tmpl not implemented */
/* .gen_p2p_go_bcn_ie not implemented */
-@@ -9230,6 +9276,8 @@ static const struct wmi_ops wmi_10_1_ops
+@@ -9250,6 +9296,8 @@ static const struct wmi_ops wmi_10_1_ops
.fw_stats_fill = ath10k_wmi_10x_op_fw_stats_fill,
.get_vdev_subtype = ath10k_wmi_op_get_vdev_subtype,
.gen_echo = ath10k_wmi_op_gen_echo,
/* .gen_bcn_tmpl not implemented */
/* .gen_prb_tmpl not implemented */
/* .gen_p2p_go_bcn_ie not implemented */
-@@ -9302,6 +9350,8 @@ static const struct wmi_ops wmi_10_2_ops
+@@ -9322,6 +9370,8 @@ static const struct wmi_ops wmi_10_2_ops
.gen_delba_send = ath10k_wmi_op_gen_delba_send,
.fw_stats_fill = ath10k_wmi_10x_op_fw_stats_fill,
.get_vdev_subtype = ath10k_wmi_op_get_vdev_subtype,
/* .gen_pdev_enable_adaptive_cca not implemented */
};
-@@ -9373,6 +9423,8 @@ static const struct wmi_ops wmi_10_2_4_o
+@@ -9393,6 +9443,8 @@ static const struct wmi_ops wmi_10_2_4_o
ath10k_wmi_op_gen_pdev_enable_adaptive_cca,
.get_vdev_subtype = ath10k_wmi_10_2_4_op_get_vdev_subtype,
.gen_bb_timing = ath10k_wmi_10_2_4_op_gen_bb_timing,
/* .gen_bcn_tmpl not implemented */
/* .gen_prb_tmpl not implemented */
/* .gen_p2p_go_bcn_ie not implemented */
-@@ -9454,6 +9506,8 @@ static const struct wmi_ops wmi_10_4_ops
+@@ -9474,6 +9526,8 @@ static const struct wmi_ops wmi_10_4_ops
.gen_pdev_bss_chan_info_req = ath10k_wmi_10_2_op_gen_pdev_bss_chan_info,
.gen_echo = ath10k_wmi_op_gen_echo,
.gen_pdev_get_tpc_config = ath10k_wmi_10_2_4_op_gen_pdev_get_tpc_config,
--- a/drivers/net/wireless/ath/ath10k/core.h
+++ b/drivers/net/wireless/ath/ath10k/core.h
-@@ -1309,6 +1309,10 @@ struct ath10k {
+@@ -1312,6 +1312,10 @@ struct ath10k {
s32 tx_power_2g_limit;
s32 tx_power_5g_limit;
if (ret)
--- a/drivers/net/wireless/ath/ath10k/mac.c
+++ b/drivers/net/wireless/ath/ath10k/mac.c
-@@ -10284,7 +10284,7 @@ int ath10k_mac_register(struct ath10k *a
+@@ -10293,7 +10293,7 @@ int ath10k_mac_register(struct ath10k *a
ar->hw->weight_multiplier = ATH10K_AIRTIME_WEIGHT_MULTIPLIER;
#ifdef CPTCFG_MAC80211_LEDS
#include <linux/property.h>
#include <linux/dmi.h>
#include <linux/ctype.h>
-@@ -3407,6 +3408,8 @@ static int ath10k_core_probe_fw(struct a
+@@ -3401,6 +3402,8 @@ static int ath10k_core_probe_fw(struct a
device_get_mac_address(ar->dev, ar->mac_addr);
--- a/drivers/net/wireless/ath/ath10k/mac.c
+++ b/drivers/net/wireless/ath/ath10k/mac.c
-@@ -10080,7 +10080,6 @@ int ath10k_mac_register(struct ath10k *a
+@@ -10089,7 +10089,6 @@ int ath10k_mac_register(struct ath10k *a
ieee80211_hw_set(ar->hw, CHANCTX_STA_CSA);
ieee80211_hw_set(ar->hw, QUEUE_CONTROL);
ieee80211_hw_set(ar->hw, SUPPORTS_TX_FRAG);
--- a/drivers/net/wireless/ath/ath11k/core.c
+++ b/drivers/net/wireless/ath/ath11k/core.c
-@@ -1641,7 +1641,7 @@ static void ath11k_update_11d(struct wor
+@@ -1668,7 +1668,7 @@ static void ath11k_update_11d(struct wor
}
}
{
struct ath11k *ar;
struct ath11k_pdev *pdev;
-@@ -1730,9 +1730,6 @@ static void ath11k_core_restart(struct w
+@@ -1757,9 +1757,6 @@ static void ath11k_core_restart(struct w
struct ath11k_base *ab = container_of(work, struct ath11k_base, restart_work);
int ret;
const char *filename);
--- a/drivers/net/wireless/ath/ath11k/qmi.c
+++ b/drivers/net/wireless/ath/ath11k/qmi.c
-@@ -3164,6 +3164,9 @@ static void ath11k_qmi_driver_event_work
+@@ -3169,6 +3169,9 @@ static void ath11k_qmi_driver_event_work
case ATH11K_QMI_EVENT_SERVER_EXIT:
set_bit(ATH11K_FLAG_CRASH_FLUSH, &ab->dev_flags);
set_bit(ATH11K_FLAG_RECOVERY, &ab->dev_flags);
--- a/drivers/net/wireless/ath/ath11k/mac.c
+++ b/drivers/net/wireless/ath/ath11k/mac.c
-@@ -6421,18 +6421,16 @@ static int ath11k_mac_op_add_interface(s
+@@ -6418,18 +6418,16 @@ static int ath11k_mac_op_add_interface(s
ath11k_dp_vdev_tx_attach(ar, arvif);
mutex_unlock(&ar->conf_mutex);
return 0;
-@@ -6457,7 +6455,6 @@ err_vdev_del:
+@@ -6454,7 +6452,6 @@ err_vdev_del:
spin_unlock_bh(&ar->data_lock);
err:
static const u32 ath11k_smps_map[] = {
[WLAN_HT_CAP_SM_PS_STATIC] = WMI_PEER_SMPS_STATIC,
-@@ -3612,6 +3615,7 @@ static int ath11k_mac_op_hw_scan(struct
+@@ -3609,6 +3612,7 @@ static int ath11k_mac_op_hw_scan(struct
struct scan_req_params arg;
int ret = 0;
int i;
mutex_lock(&ar->conf_mutex);
-@@ -3681,6 +3685,26 @@ static int ath11k_mac_op_hw_scan(struct
+@@ -3678,6 +3682,26 @@ static int ath11k_mac_op_hw_scan(struct
ether_addr_copy(arg.mac_mask.addr, req->mac_addr_mask);
}
ret = ath11k_start_scan(ar, &arg);
if (ret) {
ath11k_warn(ar->ab, "failed to start hw scan: %d\n", ret);
-@@ -3689,10 +3713,8 @@ static int ath11k_mac_op_hw_scan(struct
+@@ -3686,10 +3710,8 @@ static int ath11k_mac_op_hw_scan(struct
spin_unlock_bh(&ar->data_lock);
}
exit:
kfree(arg.chan_list);
-@@ -9060,6 +9082,9 @@ static int __ath11k_mac_register(struct
+@@ -9065,6 +9087,9 @@ static int __ath11k_mac_register(struct
NL80211_EXT_FEATURE_UNSOL_BCAST_PROBE_RESP);
}
--- a/drivers/net/wireless/ath/ath11k/mac.c
+++ b/drivers/net/wireless/ath/ath11k/mac.c
-@@ -6233,6 +6233,40 @@ void ath11k_mac_11d_scan_stop_all(struct
+@@ -6230,6 +6230,40 @@ void ath11k_mac_11d_scan_stop_all(struct
}
}
static int ath11k_mac_op_add_interface(struct ieee80211_hw *hw,
struct ieee80211_vif *vif)
{
-@@ -6468,10 +6502,7 @@ err_peer_del:
+@@ -6465,10 +6499,7 @@ err_peer_del:
}
err_vdev_del:
spin_lock_bh(&ar->data_lock);
list_del(&arvif->list);
spin_unlock_bh(&ar->data_lock);
-@@ -6499,7 +6530,6 @@ static void ath11k_mac_op_remove_interfa
+@@ -6496,7 +6527,6 @@ static void ath11k_mac_op_remove_interfa
struct ath11k *ar = hw->priv;
struct ath11k_vif *arvif = ath11k_vif_to_arvif(vif);
struct ath11k_base *ab = ar->ab;
int ret;
int i;
-@@ -6520,29 +6550,13 @@ static void ath11k_mac_op_remove_interfa
+@@ -6517,29 +6547,13 @@ static void ath11k_mac_op_remove_interfa
arvif->vdev_id, ret);
}
--- a/drivers/net/wireless/ath/ath11k/core.c
+++ b/drivers/net/wireless/ath/ath11k/core.c
-@@ -1677,6 +1677,10 @@ void ath11k_core_pre_reconfigure_recover
+@@ -1704,6 +1704,10 @@ void ath11k_core_pre_reconfigure_recover
ath11k_mac_tx_mgmt_pending_free, ar);
idr_destroy(&ar->txmgmt_idr);
wake_up(&ar->txmgmt_empty_waitq);
+++ /dev/null
-From dd1c2322694522f674c874f5fa02ac5ae39135dd Mon Sep 17 00:00:00 2001
-From: "Jiri Slaby (SUSE)" <jirislaby@kernel.org>
-Date: Mon, 31 Oct 2022 12:43:41 +0100
-Subject: [PATCH] wifi: ath11k: synchronize
- ath11k_mac_he_gi_to_nl80211_he_gi()'s return type
-
-ath11k_mac_he_gi_to_nl80211_he_gi() generates a valid warning with gcc-13:
- drivers/net/wireless/ath/ath11k/mac.c:321:20: error: conflicting types for 'ath11k_mac_he_gi_to_nl80211_he_gi' due to enum/integer mismatch; have 'enum nl80211_he_gi(u8)'
- drivers/net/wireless/ath/ath11k/mac.h:166:5: note: previous declaration of 'ath11k_mac_he_gi_to_nl80211_he_gi' with type 'u32(u8)'
-
-I.e. the type of the return value ath11k_mac_he_gi_to_nl80211_he_gi() in
-the declaration is u32, while the definition spells enum nl80211_he_gi.
-Synchronize them to the latter.
-
-Cc: Martin Liska <mliska@suse.cz>
-Cc: Kalle Valo <kvalo@kernel.org>
-Cc: "David S. Miller" <davem@davemloft.net>
-Cc: Eric Dumazet <edumazet@google.com>
-Cc: Jakub Kicinski <kuba@kernel.org>
-Cc: Paolo Abeni <pabeni@redhat.com>
-Cc: ath11k@lists.infradead.org
-Cc: linux-wireless@vger.kernel.org
-Cc: netdev@vger.kernel.org
-Signed-off-by: Jiri Slaby (SUSE) <jirislaby@kernel.org>
-Reviewed-by: Jeff Johnson <quic_jjohnson@quicinc.com>
-Signed-off-by: Kalle Valo <quic_kvalo@quicinc.com>
-Link: https://lore.kernel.org/r/20221031114341.10377-1-jirislaby@kernel.org
----
- drivers/net/wireless/ath/ath11k/mac.h | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
---- a/drivers/net/wireless/ath/ath11k/mac.h
-+++ b/drivers/net/wireless/ath/ath11k/mac.h
-@@ -163,7 +163,7 @@ void ath11k_mac_drain_tx(struct ath11k *
- void ath11k_mac_peer_cleanup_all(struct ath11k *ar);
- int ath11k_mac_tx_mgmt_pending_free(int buf_id, void *skb, void *ctx);
- u8 ath11k_mac_bw_to_mac80211_bw(u8 bw);
--u32 ath11k_mac_he_gi_to_nl80211_he_gi(u8 sgi);
-+enum nl80211_he_gi ath11k_mac_he_gi_to_nl80211_he_gi(u8 sgi);
- enum nl80211_he_ru_alloc ath11k_mac_phy_he_ru_to_nl80211_he_ru_alloc(u16 ru_phy);
- enum nl80211_he_ru_alloc ath11k_mac_he_ru_tones_to_nl80211_he_ru_alloc(u16 ru_tones);
- enum ath11k_supported_bw ath11k_mac_mac80211_bw_to_ath11k_bw(enum rate_info_bw bw);
struct ath11k_hw_ops {
--- a/drivers/net/wireless/ath/ath11k/mac.c
+++ b/drivers/net/wireless/ath/ath11k/mac.c
-@@ -8010,6 +8010,7 @@ ath11k_mac_op_reconfig_complete(struct i
+@@ -8007,6 +8007,7 @@ ath11k_mac_op_reconfig_complete(struct i
struct ath11k *ar = hw->priv;
struct ath11k_base *ab = ar->ab;
int recovery_count;
if (reconfig_type != IEEE80211_RECONFIG_TYPE_RESTART)
return;
-@@ -8045,6 +8046,12 @@ ath11k_mac_op_reconfig_complete(struct i
+@@ -8042,6 +8043,12 @@ ath11k_mac_op_reconfig_complete(struct i
ath11k_dbg(ab, ATH11K_DBG_BOOT, "reset success\n");
}
}
}
}
-@@ -1142,10 +1154,26 @@ static int ath11k_ahb_probe(struct platf
+@@ -1148,10 +1160,26 @@ static int ath11k_ahb_probe(struct platf
goto err_core_free;
}
ret = ath11k_ahb_setup_resources(ab);
if (ret)
goto err_core_free;
-@@ -1236,6 +1264,10 @@ static void ath11k_ahb_free_resources(st
+@@ -1242,6 +1270,10 @@ static void ath11k_ahb_free_resources(st
ath11k_ahb_release_smp2p_handle(ab);
ath11k_ahb_fw_resource_deinit(ab);
ath11k_ce_free_pipes(ab);
extern const struct ath11k_hw_hal_params ath11k_hw_hal_params_wcn6750;
--- a/drivers/net/wireless/ath/ath11k/pci.c
+++ b/drivers/net/wireless/ath/ath11k/pci.c
-@@ -543,6 +543,8 @@ static int ath11k_pci_claim(struct ath11
+@@ -547,6 +547,8 @@ static int ath11k_pci_claim(struct ath11
goto clear_master;
}
--- a/drivers/net/wireless/ath/ath11k/mac.c
+++ b/drivers/net/wireless/ath/ath11k/mac.c
-@@ -3612,7 +3612,7 @@ static int ath11k_mac_op_hw_scan(struct
+@@ -3609,7 +3609,7 @@ static int ath11k_mac_op_hw_scan(struct
struct ath11k *ar = hw->priv;
struct ath11k_vif *arvif = ath11k_vif_to_arvif(vif);
struct cfg80211_scan_request *req = &hw_req->req;
int ret = 0;
int i;
u32 scan_timeout;
-@@ -3640,72 +3640,78 @@ static int ath11k_mac_op_hw_scan(struct
+@@ -3637,72 +3637,78 @@ static int ath11k_mac_op_hw_scan(struct
if (ret)
goto exit;
if (ret) {
ath11k_warn(ar->ab, "failed to start hw scan: %d\n", ret);
spin_lock_bh(&ar->data_lock);
-@@ -3717,10 +3723,11 @@ static int ath11k_mac_op_hw_scan(struct
+@@ -3714,10 +3720,11 @@ static int ath11k_mac_op_hw_scan(struct
msecs_to_jiffies(scan_timeout));
exit:
struct ath11k_hw_ops {
--- a/drivers/net/wireless/ath/ath11k/mac.c
+++ b/drivers/net/wireless/ath/ath11k/mac.c
-@@ -3110,7 +3110,7 @@ static void ath11k_mac_op_bss_info_chang
+@@ -3107,7 +3107,7 @@ static void ath11k_mac_op_bss_info_chang
u16 bitrate;
int ret = 0;
u8 rateidx;
u32 ipv4_cnt;
mutex_lock(&ar->conf_mutex);
-@@ -3412,6 +3412,20 @@ static void ath11k_mac_op_bss_info_chang
+@@ -3409,6 +3409,20 @@ static void ath11k_mac_op_bss_info_chang
}
}
if (changed & BSS_CHANGED_FILS_DISCOVERY ||
changed & BSS_CHANGED_UNSOL_BCAST_PROBE_RESP)
ath11k_mac_fils_discovery(arvif, info);
-@@ -9113,6 +9127,10 @@ static int __ath11k_mac_register(struct
+@@ -9118,6 +9132,10 @@ static int __ath11k_mac_register(struct
wiphy_ext_feature_set(ar->hw->wiphy,
NL80211_EXT_FEATURE_SET_SCAN_DWELL);
--- a/drivers/net/wireless/ath/ath11k/ahb.c
+++ b/drivers/net/wireless/ath/ath11k/ahb.c
-@@ -1157,12 +1157,16 @@ static int ath11k_ahb_probe(struct platf
+@@ -1163,12 +1163,16 @@ static int ath11k_ahb_probe(struct platf
goto err_core_free;
}
if (ab->hw_params.ce_remap) {
const struct ce_remap *ce_remap = ab->hw_params.ce_remap;
/* ce register space is moved out of wcss unlike ipq8074 or ipq6018
-@@ -1177,10 +1181,6 @@ static int ath11k_ahb_probe(struct platf
+@@ -1183,10 +1187,6 @@ static int ath11k_ahb_probe(struct platf
}
}
--- a/drivers/net/wireless/ath/ath11k/ahb.c
+++ b/drivers/net/wireless/ath/ath11k/ahb.c
-@@ -1174,7 +1174,7 @@ static int ath11k_ahb_probe(struct platf
+@@ -1180,7 +1180,7 @@ static int ath11k_ahb_probe(struct platf
* to a new space for accessing them.
*/
ab->mem_ce = ioremap(ce_remap->base, ce_remap->size);
+++ /dev/null
-From f117276638b7600b981b3fe28550823cfbe1ef23 Mon Sep 17 00:00:00 2001
-From: Douglas Anderson <dianders@chromium.org>
-Date: Wed, 1 Feb 2023 08:54:42 -0800
-Subject: [PATCH] wifi: ath11k: Use platform_get_irq() to get the interrupt
-
-As of commit a1a2b7125e10 ("of/platform: Drop static setup of IRQ
-resource from DT core"), we need to use platform_get_irq() instead of
-platform_get_resource() to get our IRQs because
-platform_get_resource() simply won't get them anymore.
-
-This was already fixed in several other Atheros WiFi drivers,
-apparently in response to Zeal Robot reports. An example of another
-fix is commit 9503a1fc123d ("ath9k: Use platform_get_irq() to get the
-interrupt"). ath11k seems to have been missed in this effort, though.
-
-Without this change, WiFi wasn't coming up on my Qualcomm sc7280-based
-hardware. Specifically, "platform_get_resource(pdev, IORESOURCE_IRQ,
-i)" was failing even for i=0.
-
-Tested-on: WCN6750 hw1.0 AHB WLAN.MSL.1.0.1-00887-QCAMSLSWPLZ-1
-
-Fixes: a1a2b7125e10 ("of/platform: Drop static setup of IRQ resource from DT core")
-Fixes: 00402f49d26f ("ath11k: Add support for WCN6750 device")
-Signed-off-by: Douglas Anderson <dianders@chromium.org>
-Tested-by: Jun Yu <junyuu@chromium.org>
-Reviewed-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
-Signed-off-by: Kalle Valo <quic_kvalo@quicinc.com>
-Link: https://lore.kernel.org/r/20230201084131.v2.1.I69cf3d56c97098287fe3a70084ee515098390b70@changeid
----
- drivers/net/wireless/ath/ath11k/ahb.c | 8 ++++----
- 1 file changed, 4 insertions(+), 4 deletions(-)
-
---- a/drivers/net/wireless/ath/ath11k/ahb.c
-+++ b/drivers/net/wireless/ath/ath11k/ahb.c
-@@ -874,11 +874,11 @@ static int ath11k_ahb_setup_msi_resource
- ab->pci.msi.ep_base_data = int_prop + 32;
-
- for (i = 0; i < ab->pci.msi.config->total_vectors; i++) {
-- res = platform_get_resource(pdev, IORESOURCE_IRQ, i);
-- if (!res)
-- return -ENODEV;
-+ ret = platform_get_irq(pdev, i);
-+ if (ret < 0)
-+ return ret;
-
-- ab->pci.msi.irqs[i] = res->start;
-+ ab->pci.msi.irqs[i] = ret;
- }
-
- set_bit(ATH11K_FLAG_MULTI_MSI_VECTORS, &ab->dev_flags);
+++ /dev/null
-From 60b7d62ba8cdbd073997bff0f1cdae8d844002c0 Mon Sep 17 00:00:00 2001
-From: Christian Marangi <ansuelsmth@gmail.com>
-Date: Thu, 9 Feb 2023 23:26:22 +0100
-Subject: [PATCH] wifi: ath11k: fix SAC bug on peer addition with sta band
- migration
-
-Fix sleep in atomic context warning detected by Smatch static checker
-analyzer.
-
-Following the locking pattern for peer_rhash_add lock tbl_mtx_lock mutex
-always even if sta is not transitioning to another band.
-This is peer_add function and a more secure locking should not cause
-performance regression.
-
-Tested-on: IPQ8074 hw2.0 AHB WLAN.HK.2.5.0.1-01208-QCAHKSWPL_SILICONZ-1
-
-Fixes: d673cb6fe6c0 ("wifi: ath11k: fix peer addition/deletion error on sta band migration")
-Reported-by: Dan Carpenter <error27@gmail.com>
-Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
-Signed-off-by: Kalle Valo <quic_kvalo@quicinc.com>
-Link: https://lore.kernel.org/r/20230209222622.1751-1-ansuelsmth@gmail.com
----
- drivers/net/wireless/ath/ath11k/peer.c | 5 +++--
- 1 file changed, 3 insertions(+), 2 deletions(-)
-
---- a/drivers/net/wireless/ath/ath11k/peer.c
-+++ b/drivers/net/wireless/ath/ath11k/peer.c
-@@ -382,22 +382,23 @@ int ath11k_peer_create(struct ath11k *ar
- return -ENOBUFS;
- }
-
-+ mutex_lock(&ar->ab->tbl_mtx_lock);
- spin_lock_bh(&ar->ab->base_lock);
- peer = ath11k_peer_find_by_addr(ar->ab, param->peer_addr);
- if (peer) {
- if (peer->vdev_id == param->vdev_id) {
- spin_unlock_bh(&ar->ab->base_lock);
-+ mutex_unlock(&ar->ab->tbl_mtx_lock);
- return -EINVAL;
- }
-
- /* Assume sta is transitioning to another band.
- * Remove here the peer from rhash.
- */
-- mutex_lock(&ar->ab->tbl_mtx_lock);
- ath11k_peer_rhash_delete(ar->ab, peer);
-- mutex_unlock(&ar->ab->tbl_mtx_lock);
- }
- spin_unlock_bh(&ar->ab->base_lock);
-+ mutex_unlock(&ar->ab->tbl_mtx_lock);
-
- ret = ath11k_wmi_send_peer_create_cmd(ar, param);
- if (ret) {
--- a/drivers/net/wireless/ath/ath11k/pci.c
+++ b/drivers/net/wireless/ath/ath11k/pci.c
-@@ -998,7 +998,7 @@ static __maybe_unused int ath11k_pci_pm_
+@@ -1004,7 +1004,7 @@ static __maybe_unused int ath11k_pci_pm_
if (ret)
ath11k_warn(ab, "failed to resume core: %d\n", ret);
--- a/drivers/net/wireless/ath/ath11k/mac.c
+++ b/drivers/net/wireless/ath/ath11k/mac.c
-@@ -2699,6 +2699,117 @@ static int ath11k_setup_peer_smps(struct
+@@ -2696,6 +2696,117 @@ static int ath11k_setup_peer_smps(struct
ath11k_smps_map[smps]);
}
static void ath11k_bss_assoc(struct ieee80211_hw *hw,
struct ieee80211_vif *vif,
struct ieee80211_bss_conf *bss_conf)
-@@ -2709,6 +2820,7 @@ static void ath11k_bss_assoc(struct ieee
+@@ -2706,6 +2817,7 @@ static void ath11k_bss_assoc(struct ieee
struct ieee80211_sta *ap_sta;
struct ath11k_peer *peer;
bool is_auth = false;
int ret;
lockdep_assert_held(&ar->conf_mutex);
-@@ -2726,6 +2838,9 @@ static void ath11k_bss_assoc(struct ieee
+@@ -2723,6 +2835,9 @@ static void ath11k_bss_assoc(struct ieee
return;
}
ath11k_peer_assoc_prepare(ar, vif, ap_sta, &peer_arg, false);
rcu_read_unlock();
-@@ -2753,6 +2868,12 @@ static void ath11k_bss_assoc(struct ieee
+@@ -2750,6 +2865,12 @@ static void ath11k_bss_assoc(struct ieee
return;
}
WARN_ON(arvif->is_up);
arvif->aid = vif->cfg.aid;
-@@ -3202,6 +3323,8 @@ static void ath11k_mac_op_bss_info_chang
+@@ -3199,6 +3320,8 @@ static void ath11k_mac_op_bss_info_chang
ether_addr_copy(arvif->bssid, info->bssid);
if (changed & BSS_CHANGED_BEACON_ENABLED) {
ath11k_control_beaconing(arvif, info);
if (arvif->is_up && vif->bss_conf.he_support &&
-@@ -5392,6 +5515,10 @@ static int ath11k_mac_copy_he_cap(struct
+@@ -5389,6 +5512,10 @@ static int ath11k_mac_copy_he_cap(struct
he_cap_elem->mac_cap_info[1] &=
IEEE80211_HE_MAC_CAP1_TF_MAC_PAD_DUR_MASK;
he_cap_elem->phy_cap_info[5] &=
~IEEE80211_HE_PHY_CAP5_BEAMFORMEE_NUM_SND_DIM_UNDER_80MHZ_MASK;
-@@ -6026,69 +6153,6 @@ ath11k_mac_setup_vdev_create_params(stru
+@@ -6023,69 +6150,6 @@ ath11k_mac_setup_vdev_create_params(stru
}
}
static void ath11k_mac_op_update_vif_offload(struct ieee80211_hw *hw,
struct ieee80211_vif *vif)
{
-@@ -6757,7 +6821,6 @@ ath11k_mac_vdev_start_restart(struct ath
+@@ -6754,7 +6818,6 @@ ath11k_mac_vdev_start_restart(struct ath
struct ath11k_base *ab = ar->ab;
struct wmi_vdev_start_req_arg arg = {};
const struct cfg80211_chan_def *chandef = &ctx->def;
int ret = 0;
lockdep_assert_held(&ar->conf_mutex);
-@@ -6798,15 +6861,6 @@ ath11k_mac_vdev_start_restart(struct ath
+@@ -6795,15 +6858,6 @@ ath11k_mac_vdev_start_restart(struct ath
spin_lock_bh(&ab->base_lock);
arg.regdomain = ar->ab->dfs_region;
spin_unlock_bh(&ab->base_lock);
--- a/drivers/net/wireless/ath/ath11k/mac.c
+++ b/drivers/net/wireless/ath/ath11k/mac.c
-@@ -5483,6 +5483,27 @@ static __le16 ath11k_mac_setup_he_6ghz_c
+@@ -5480,6 +5480,27 @@ static __le16 ath11k_mac_setup_he_6ghz_c
return cpu_to_le16(bcap->he_6ghz_capa);
}
static int ath11k_mac_copy_he_cap(struct ath11k *ar,
struct ath11k_pdev_cap *cap,
struct ieee80211_sband_iftype_data *data,
-@@ -5544,18 +5565,7 @@ static int ath11k_mac_copy_he_cap(struct
+@@ -5541,18 +5562,7 @@ static int ath11k_mac_copy_he_cap(struct
break;
}
--- a/drivers/net/wireless/ath/ath11k/mac.c
+++ b/drivers/net/wireless/ath/ath11k/mac.c
-@@ -5488,20 +5488,36 @@ static void ath11k_mac_set_hemcsmap(stru
+@@ -5485,20 +5485,36 @@ static void ath11k_mac_set_hemcsmap(stru
struct ieee80211_sta_he_cap *he_cap,
int band)
{
static int ath11k_hw_mac_id_to_pdev_id_ipq8074(struct ath11k_hw_params *hw,
--- a/drivers/net/wireless/ath/ath11k/mac.c
+++ b/drivers/net/wireless/ath/ath11k/mac.c
-@@ -9174,6 +9174,11 @@ static int __ath11k_mac_register(struct
+@@ -9179,6 +9179,11 @@ static int __ath11k_mac_register(struct
goto err_free_if_combs;
}
kfree(reg_info);
}
return ret;
-@@ -8054,7 +8437,10 @@ static void ath11k_wmi_tlv_op_rx(struct
+@@ -8070,7 +8453,10 @@ static void ath11k_wmi_tlv_op_rx(struct
ath11k_service_ready_ext2_event(ab, skb);
break;
case WMI_REG_CHAN_LIST_CC_EVENTID:
+++ /dev/null
-From 5a78ac33e3cb8822da64dd1af196e83664b332b0 Mon Sep 17 00:00:00 2001
-From: Aditya Kumar Singh <quic_adisi@quicinc.com>
-Date: Thu, 9 Mar 2023 15:23:08 +0530
-Subject: [PATCH] wifi: ath11k: fix deinitialization of firmware resources
-
-Currently, in ath11k_ahb_fw_resources_init(), iommu domain
-mapping is done only for the chipsets having fixed firmware
-memory. Also, for such chipsets, mapping is done only if it
-does not have TrustZone support.
-
-During deinitialization, only if TrustZone support is not there,
-iommu is unmapped back. However, for non fixed firmware memory
-chipsets, TrustZone support is not there and this makes the
-condition check to true and it tries to unmap the memory which
-was not mapped during initialization.
-
-This leads to the following trace -
-
-[ 83.198790] Unable to handle kernel NULL pointer dereference at virtual address 0000000000000008
-[ 83.259537] Modules linked in: ath11k_ahb ath11k qmi_helpers
-.. snip ..
-[ 83.280286] pstate: 20000005 (nzCv daif -PAN -UAO -TCO -DIT -SSBS BTYPE=--)
-[ 83.287228] pc : __iommu_unmap+0x30/0x140
-[ 83.293907] lr : iommu_unmap+0x5c/0xa4
-[ 83.298072] sp : ffff80000b3abad0
-.. snip ..
-[ 83.369175] Call trace:
-[ 83.376282] __iommu_unmap+0x30/0x140
-[ 83.378541] iommu_unmap+0x5c/0xa4
-[ 83.382360] ath11k_ahb_fw_resource_deinit.part.12+0x2c/0xac [ath11k_ahb]
-[ 83.385666] ath11k_ahb_free_resources+0x140/0x17c [ath11k_ahb]
-[ 83.392521] ath11k_ahb_shutdown+0x34/0x40 [ath11k_ahb]
-[ 83.398248] platform_shutdown+0x20/0x2c
-[ 83.403455] device_shutdown+0x16c/0x1c4
-[ 83.407621] kernel_restart_prepare+0x34/0x3c
-[ 83.411529] kernel_restart+0x14/0x74
-[ 83.415781] __do_sys_reboot+0x1c4/0x22c
-[ 83.419427] __arm64_sys_reboot+0x1c/0x24
-[ 83.423420] invoke_syscall+0x44/0xfc
-[ 83.427326] el0_svc_common.constprop.3+0xac/0xe8
-[ 83.430974] do_el0_svc+0xa0/0xa8
-[ 83.435659] el0_svc+0x1c/0x44
-[ 83.438957] el0t_64_sync_handler+0x60/0x144
-[ 83.441910] el0t_64_sync+0x15c/0x160
-[ 83.446343] Code: aa0103f4 f9400001 f90027a1 d2800001 (f94006a0)
-[ 83.449903] ---[ end trace 0000000000000000 ]---
-
-This can be reproduced by probing an AHB chipset which is not
-having a fixed memory region. During reboot (or rmmod) trace
-can be seen.
-
-Fix this issue by adding a condition check on firmware fixed memory
-hw_param as done in the counter initialization function.
-
-Tested-on: IPQ8074 hw2.0 AHB WLAN.HK.2.7.0.1-01744-QCAHKSWPL_SILICONZ-1
-
-Fixes: f9eec4947add ("ath11k: Add support for targets without trustzone")
-Signed-off-by: Aditya Kumar Singh <quic_adisi@quicinc.com>
-Signed-off-by: Kalle Valo <quic_kvalo@quicinc.com>
-Link: https://lore.kernel.org/r/20230309095308.24937-1-quic_adisi@quicinc.com
----
- drivers/net/wireless/ath/ath11k/ahb.c | 6 ++++++
- 1 file changed, 6 insertions(+)
-
---- a/drivers/net/wireless/ath/ath11k/ahb.c
-+++ b/drivers/net/wireless/ath/ath11k/ahb.c
-@@ -1078,6 +1078,12 @@ static int ath11k_ahb_fw_resource_deinit
- struct iommu_domain *iommu;
- size_t unmapped_size;
-
-+ /* Chipsets not requiring MSA would have not initialized
-+ * MSA resources, return success in such cases.
-+ */
-+ if (!ab->hw_params.fixed_fw_mem)
-+ return 0;
-+
- if (ab_ahb->fw.use_tz)
- return 0;
-
return 0;
}
-@@ -3029,39 +3006,51 @@ static int ath11k_dp_rx_reap_mon_status_
+@@ -3038,39 +3015,51 @@ static int ath11k_dp_rx_reap_mon_status_
spin_lock_bh(&rx_ring->idr_lock);
skb = idr_find(&rx_ring->bufs_idr, buf_id);
--- a/drivers/net/wireless/ath/ath11k/mac.c
+++ b/drivers/net/wireless/ath/ath11k/mac.c
-@@ -3819,8 +3819,29 @@ static int ath11k_mac_op_hw_scan(struct
+@@ -3816,8 +3816,29 @@ static int ath11k_mac_op_hw_scan(struct
goto exit;
}
struct ath11k_hw_ops {
--- a/drivers/net/wireless/ath/ath11k/mac.c
+++ b/drivers/net/wireless/ath/ath11k/mac.c
-@@ -3538,7 +3538,7 @@ static void ath11k_mac_op_bss_info_chang
+@@ -3535,7 +3535,7 @@ static void ath11k_mac_op_bss_info_chang
if (changed & BSS_CHANGED_FTM_RESPONDER &&
arvif->ftm_responder != info->ftm_responder &&
(vif->type == NL80211_IFTYPE_AP ||
vif->type == NL80211_IFTYPE_MESH_POINT)) {
arvif->ftm_responder = info->ftm_responder;
-@@ -9234,7 +9234,7 @@ static int __ath11k_mac_register(struct
+@@ -9239,7 +9239,7 @@ static int __ath11k_mac_register(struct
wiphy_ext_feature_set(ar->hw->wiphy,
NL80211_EXT_FEATURE_SET_SCAN_DWELL);
+++ /dev/null
-From 756a7f90878f0866fd2fe167ef37e90b47326b96 Mon Sep 17 00:00:00 2001
-From: P Praneesh <quic_ppranees@quicinc.com>
-Date: Fri, 24 Mar 2023 16:57:01 +0200
-Subject: [PATCH] wifi: ath11k: fix writing to unintended memory region
-
-While initializing spectral, the magic value is getting written to the
-invalid memory address leading to random boot-up crash. This occurs
-due to the incorrect index increment in ath11k_dbring_fill_magic_value
-function. Fix it by replacing the existing logic with memset32 to ensure
-there is no invalid memory access.
-
-Tested-on: QCN9074 hw1.0 PCI WLAN.HK.2.4.0.1-01838-QCAHKSWPL_SILICONZ-1
-
-Fixes: d3d358efc553 ("ath11k: add spectral/CFR buffer validation support")
-Signed-off-by: P Praneesh <quic_ppranees@quicinc.com>
-Signed-off-by: Kalle Valo <quic_kvalo@quicinc.com>
-Link: https://lore.kernel.org/r/20230321052900.16895-1-quic_ppranees@quicinc.com
----
- drivers/net/wireless/ath/ath11k/dbring.c | 12 ++++++------
- 1 file changed, 6 insertions(+), 6 deletions(-)
-
---- a/drivers/net/wireless/ath/ath11k/dbring.c
-+++ b/drivers/net/wireless/ath/ath11k/dbring.c
-@@ -26,13 +26,13 @@ int ath11k_dbring_validate_buffer(struct
- static void ath11k_dbring_fill_magic_value(struct ath11k *ar,
- void *buffer, u32 size)
- {
-- u32 *temp;
-- int idx;
-+ /* memset32 function fills buffer payload with the ATH11K_DB_MAGIC_VALUE
-+ * and the variable size is expected to be the number of u32 values
-+ * to be stored, not the number of bytes.
-+ */
-+ size = size / sizeof(u32);
-
-- size = size >> 2;
--
-- for (idx = 0, temp = buffer; idx < size; idx++, temp++)
-- *temp++ = ATH11K_DB_MAGIC_VALUE;
-+ memset32(buffer, ATH11K_DB_MAGIC_VALUE, size);
- }
-
- static int ath11k_dbring_bufs_replenish(struct ath11k *ar,
--- a/drivers/net/wireless/ath/ath11k/mac.c
+++ b/drivers/net/wireless/ath/ath11k/mac.c
-@@ -3755,6 +3755,18 @@ static int ath11k_mac_op_hw_scan(struct
+@@ -3752,6 +3752,18 @@ static int ath11k_mac_op_hw_scan(struct
int i;
u32 scan_timeout;
--- a/drivers/net/wireless/ath/ath11k/pci.c
+++ b/drivers/net/wireless/ath/ath11k/pci.c
-@@ -540,7 +540,7 @@ static int ath11k_pci_claim(struct ath11
+@@ -544,7 +544,7 @@ static int ath11k_pci_claim(struct ath11
if (!ab->mem) {
ath11k_err(ab, "failed to map pci bar %d\n", ATH11K_PCI_BAR_NUM);
ret = -EIO;
}
ab->mem_ce = ab->mem;
-@@ -548,8 +548,6 @@ static int ath11k_pci_claim(struct ath11
+@@ -552,8 +552,6 @@ static int ath11k_pci_claim(struct ath11
ath11k_dbg(ab, ATH11K_DBG_BOOT, "boot pci_mem 0x%pK\n", ab->mem);
return 0;
release_region:
pci_release_region(pdev, ATH11K_PCI_BAR_NUM);
disable_device:
-@@ -565,7 +563,6 @@ static void ath11k_pci_free_region(struc
+@@ -569,7 +567,6 @@ static void ath11k_pci_free_region(struc
pci_iounmap(pci_dev, ab->mem);
ab->mem = NULL;
--- a/drivers/net/wireless/ath/ath11k/mac.c
+++ b/drivers/net/wireless/ath/ath11k/mac.c
-@@ -6685,6 +6685,11 @@ static void ath11k_mac_op_remove_interfa
+@@ -6682,6 +6682,11 @@ static void ath11k_mac_op_remove_interfa
ath11k_dbg(ab, ATH11K_DBG_MAC, "mac remove interface (vdev %d)\n",
arvif->vdev_id);
--- a/drivers/net/wireless/ath/ath11k/pci.c
+++ b/drivers/net/wireless/ath/ath11k/pci.c
-@@ -1036,7 +1036,8 @@ module_exit(ath11k_pci_exit);
+@@ -1042,7 +1042,8 @@ module_exit(ath11k_pci_exit);
MODULE_DESCRIPTION("Driver support for Qualcomm Technologies 802.11ax WLAN PCIe devices");
MODULE_LICENSE("Dual BSD/GPL");
--- a/drivers/net/wireless/ath/ath11k/dp_rx.c
+++ b/drivers/net/wireless/ath/ath11k/dp_rx.c
-@@ -3106,8 +3106,11 @@ int ath11k_peer_rx_frag_setup(struct ath
+@@ -3115,8 +3115,11 @@ int ath11k_peer_rx_frag_setup(struct ath
int i;
tfm = crypto_alloc_shash("michael_mic", 0, 0);
+++ /dev/null
-From a06bfb3c9f69f303692cdae87bc0899d2ae8b2a6 Mon Sep 17 00:00:00 2001
-From: Harshitha Prem <quic_hprem@quicinc.com>
-Date: Tue, 4 Apr 2023 00:11:54 +0530
-Subject: [PATCH] wifi: ath11k: Ignore frags from uninitialized peer in dp.
-
-When max virtual ap interfaces are configured in all the bands with
-ACS and hostapd restart is done every 60s, a crash is observed at
-random times.
-In this certain scenario, a fragmented packet is received for
-self peer, for which rx_tid and rx_frags are not initialized in
-datapath. While handling this fragment, crash is observed as the
-rx_frag list is uninitialised and when we walk in
-ath11k_dp_rx_h_sort_frags, skb null leads to exception.
-
-To address this, before processing received fragments we check
-dp_setup_done flag is set to ensure that peer has completed its
-dp peer setup for fragment queue, else ignore processing the
-fragments.
-
-Call trace:
- ath11k_dp_process_rx_err+0x550/0x1084 [ath11k]
- ath11k_dp_service_srng+0x70/0x370 [ath11k]
- 0xffffffc009693a04
- __napi_poll+0x30/0xa4
- net_rx_action+0x118/0x270
- __do_softirq+0x10c/0x244
- irq_exit+0x64/0xb4
- __handle_domain_irq+0x88/0xac
- gic_handle_irq+0x74/0xbc
- el1_irq+0xf0/0x1c0
- arch_cpu_idle+0x10/0x18
- do_idle+0x104/0x248
- cpu_startup_entry+0x20/0x64
- rest_init+0xd0/0xdc
- arch_call_rest_init+0xc/0x14
- start_kernel+0x480/0x4b8
- Code: f9400281 f94066a2 91405021 b94a0023 (f9406401)
-
-Tested-on: IPQ8074 hw2.0 AHB WLAN.HK.2.7.0.1-01744-QCAHKSWPL_SILICONZ-1
-
-Signed-off-by: Harshitha Prem <quic_hprem@quicinc.com>
-Signed-off-by: Nagarajan Maran <quic_nmaran@quicinc.com>
-Signed-off-by: Kalle Valo <quic_kvalo@quicinc.com>
-Link: https://lore.kernel.org/r/20230403184155.8670-2-quic_nmaran@quicinc.com
----
- drivers/net/wireless/ath/ath11k/dp.c | 4 +++-
- drivers/net/wireless/ath/ath11k/dp_rx.c | 8 ++++++++
- drivers/net/wireless/ath/ath11k/peer.h | 1 +
- 3 files changed, 12 insertions(+), 1 deletion(-)
-
---- a/drivers/net/wireless/ath/ath11k/dp.c
-+++ b/drivers/net/wireless/ath/ath11k/dp.c
-@@ -36,6 +36,7 @@ void ath11k_dp_peer_cleanup(struct ath11
- }
-
- ath11k_peer_rx_tid_cleanup(ar, peer);
-+ peer->dp_setup_done = false;
- crypto_free_shash(peer->tfm_mmic);
- spin_unlock_bh(&ab->base_lock);
- }
-@@ -72,7 +73,8 @@ int ath11k_dp_peer_setup(struct ath11k *
- ret = ath11k_peer_rx_frag_setup(ar, addr, vdev_id);
- if (ret) {
- ath11k_warn(ab, "failed to setup rx defrag context\n");
-- return ret;
-+ tid--;
-+ goto peer_clean;
- }
-
- /* TODO: Setup other peer specific resource used in data path */
---- a/drivers/net/wireless/ath/ath11k/dp_rx.c
-+++ b/drivers/net/wireless/ath/ath11k/dp_rx.c
-@@ -3130,6 +3130,7 @@ int ath11k_peer_rx_frag_setup(struct ath
- }
-
- peer->tfm_mmic = tfm;
-+ peer->dp_setup_done = true;
- spin_unlock_bh(&ab->base_lock);
-
- return 0;
-@@ -3575,6 +3576,13 @@ static int ath11k_dp_rx_frag_h_mpdu(stru
- ret = -ENOENT;
- goto out_unlock;
- }
-+ if (!peer->dp_setup_done) {
-+ ath11k_warn(ab, "The peer %pM [%d] has uninitialized datapath\n",
-+ peer->addr, peer_id);
-+ ret = -ENOENT;
-+ goto out_unlock;
-+ }
-+
- rx_tid = &peer->rx_tid[tid];
-
- if ((!skb_queue_empty(&rx_tid->rx_frags) && seqno != rx_tid->cur_sn) ||
---- a/drivers/net/wireless/ath/ath11k/peer.h
-+++ b/drivers/net/wireless/ath/ath11k/peer.h
-@@ -35,6 +35,7 @@ struct ath11k_peer {
- u16 sec_type;
- u16 sec_type_grp;
- bool is_authorized;
-+ bool dp_setup_done;
- };
-
- void ath11k_peer_unmap_event(struct ath11k_base *ab, u16 peer_id);
--- a/drivers/net/wireless/ath/ath11k/dp_rx.c
+++ b/drivers/net/wireless/ath/ath11k/dp_rx.c
-@@ -3598,7 +3598,7 @@ static int ath11k_dp_rx_frag_h_mpdu(stru
+@@ -3607,7 +3607,7 @@ static int ath11k_dp_rx_frag_h_mpdu(stru
goto out_unlock;
}
+++ /dev/null
-From 6257c702264c44d74c6b71f0c62a7665da2dc356 Mon Sep 17 00:00:00 2001
-From: Pradeep Kumar Chitrapu <quic_pradeepc@quicinc.com>
-Date: Mon, 17 Apr 2023 13:35:02 +0300
-Subject: [PATCH] wifi: ath11k: fix tx status reporting in encap offload mode
-
-ieee80211_tx_status() treats packets in 802.11 frame format and
-tries to extract sta address from packet header. When tx encap
-offload is enabled, this becomes invalid operation. Hence, switch
-to using ieee80211_tx_status_ext() after filling in station
-address for handling both 802.11 and 802.3 frames.
-
-Tested-on: QCN9074 hw1.0 PCI WLAN.HK.2.7.0.1-01744-QCAHKSWPL_SILICONZ-1
-
-Signed-off-by: Pradeep Kumar Chitrapu <quic_pradeepc@quicinc.com>
-Signed-off-by: Kalle Valo <quic_kvalo@quicinc.com>
-Link: https://lore.kernel.org/r/20230403195738.25367-2-quic_pradeepc@quicinc.com
----
- drivers/net/wireless/ath/ath11k/dp.h | 4 +++
- drivers/net/wireless/ath/ath11k/dp_tx.c | 33 ++++++++++++++++++++++++-
- drivers/net/wireless/ath/ath11k/dp_tx.h | 1 +
- 3 files changed, 37 insertions(+), 1 deletion(-)
-
---- a/drivers/net/wireless/ath/ath11k/dp.h
-+++ b/drivers/net/wireless/ath/ath11k/dp.h
-@@ -303,12 +303,16 @@ struct ath11k_dp {
-
- #define HTT_TX_WBM_COMP_STATUS_OFFSET 8
-
-+#define HTT_INVALID_PEER_ID 0xffff
-+
- /* HTT tx completion is overlaid in wbm_release_ring */
- #define HTT_TX_WBM_COMP_INFO0_STATUS GENMASK(12, 9)
- #define HTT_TX_WBM_COMP_INFO0_REINJECT_REASON GENMASK(16, 13)
- #define HTT_TX_WBM_COMP_INFO0_REINJECT_REASON GENMASK(16, 13)
-
- #define HTT_TX_WBM_COMP_INFO1_ACK_RSSI GENMASK(31, 24)
-+#define HTT_TX_WBM_COMP_INFO2_SW_PEER_ID GENMASK(15, 0)
-+#define HTT_TX_WBM_COMP_INFO2_VALID BIT(21)
-
- struct htt_tx_wbm_completion {
- u32 info0;
---- a/drivers/net/wireless/ath/ath11k/dp_tx.c
-+++ b/drivers/net/wireless/ath/ath11k/dp_tx.c
-@@ -316,10 +316,12 @@ ath11k_dp_tx_htt_tx_complete_buf(struct
- struct dp_tx_ring *tx_ring,
- struct ath11k_dp_htt_wbm_tx_status *ts)
- {
-+ struct ieee80211_tx_status status = { 0 };
- struct sk_buff *msdu;
- struct ieee80211_tx_info *info;
- struct ath11k_skb_cb *skb_cb;
- struct ath11k *ar;
-+ struct ath11k_peer *peer;
-
- spin_lock(&tx_ring->tx_idr_lock);
- msdu = idr_remove(&tx_ring->txbuf_idr, ts->msdu_id);
-@@ -341,6 +343,11 @@ ath11k_dp_tx_htt_tx_complete_buf(struct
-
- dma_unmap_single(ab->dev, skb_cb->paddr, msdu->len, DMA_TO_DEVICE);
-
-+ if (!skb_cb->vif) {
-+ dev_kfree_skb_any(msdu);
-+ return;
-+ }
-+
- memset(&info->status, 0, sizeof(info->status));
-
- if (ts->acked) {
-@@ -355,7 +362,23 @@ ath11k_dp_tx_htt_tx_complete_buf(struct
- }
- }
-
-- ieee80211_tx_status(ar->hw, msdu);
-+ spin_lock_bh(&ab->base_lock);
-+ peer = ath11k_peer_find_by_id(ab, ts->peer_id);
-+ if (!peer || !peer->sta) {
-+ ath11k_dbg(ab, ATH11K_DBG_DATA,
-+ "dp_tx: failed to find the peer with peer_id %d\n",
-+ ts->peer_id);
-+ spin_unlock_bh(&ab->base_lock);
-+ dev_kfree_skb_any(msdu);
-+ return;
-+ }
-+ spin_unlock_bh(&ab->base_lock);
-+
-+ status.sta = peer->sta;
-+ status.info = info;
-+ status.skb = msdu;
-+
-+ ieee80211_tx_status_ext(ar->hw, &status);
- }
-
- static void
-@@ -379,7 +402,15 @@ ath11k_dp_tx_process_htt_tx_complete(str
- ts.msdu_id = msdu_id;
- ts.ack_rssi = FIELD_GET(HTT_TX_WBM_COMP_INFO1_ACK_RSSI,
- status_desc->info1);
-+
-+ if (FIELD_GET(HTT_TX_WBM_COMP_INFO2_VALID, status_desc->info2))
-+ ts.peer_id = FIELD_GET(HTT_TX_WBM_COMP_INFO2_SW_PEER_ID,
-+ status_desc->info2);
-+ else
-+ ts.peer_id = HTT_INVALID_PEER_ID;
-+
- ath11k_dp_tx_htt_tx_complete_buf(ab, tx_ring, &ts);
-+
- break;
- case HAL_WBM_REL_HTT_TX_COMP_STATUS_REINJ:
- case HAL_WBM_REL_HTT_TX_COMP_STATUS_INSPECT:
---- a/drivers/net/wireless/ath/ath11k/dp_tx.h
-+++ b/drivers/net/wireless/ath/ath11k/dp_tx.h
-@@ -13,6 +13,7 @@ struct ath11k_dp_htt_wbm_tx_status {
- u32 msdu_id;
- bool acked;
- int ack_rssi;
-+ u16 peer_id;
- };
-
- void ath11k_dp_tx_update_txcompl(struct ath11k *ar, struct hal_tx_status *ts);
+++ /dev/null
-From f9fff67d2d7ca6fa8066132003a3deef654c55b1 Mon Sep 17 00:00:00 2001
-From: Nagarajan Maran <quic_nmaran@quicinc.com>
-Date: Mon, 17 Apr 2023 13:35:02 +0300
-Subject: [PATCH] wifi: ath11k: Fix SKB corruption in REO destination ring
-
-While running traffics for a long time, randomly an RX descriptor
-filled with value "0" from REO destination ring is received.
-This descriptor which is invalid causes the wrong SKB (SKB stored in
-the IDR lookup with buffer id "0") to be fetched which in turn
-causes SKB memory corruption issue and the same leads to crash
-after some time.
-
-Changed the start id for idr allocation to "1" and the buffer id "0"
-is reserved for error validation. Introduced Sanity check to validate
-the descriptor, before processing the SKB.
-
-Crash Signature :
-
-Unable to handle kernel paging request at virtual address 3f004900
-PC points to "b15_dma_inv_range+0x30/0x50"
-LR points to "dma_cache_maint_page+0x8c/0x128".
-The Backtrace obtained is as follows:
-[<8031716c>] (b15_dma_inv_range) from [<80313a4c>] (dma_cache_maint_page+0x8c/0x128)
-[<80313a4c>] (dma_cache_maint_page) from [<80313b90>] (__dma_page_dev_to_cpu+0x28/0xcc)
-[<80313b90>] (__dma_page_dev_to_cpu) from [<7fb5dd68>] (ath11k_dp_process_rx+0x1e8/0x4a4 [ath11k])
-[<7fb5dd68>] (ath11k_dp_process_rx [ath11k]) from [<7fb53c20>] (ath11k_dp_service_srng+0xb0/0x2ac [ath11k])
-[<7fb53c20>] (ath11k_dp_service_srng [ath11k]) from [<7f67bba4>] (ath11k_pci_ext_grp_napi_poll+0x1c/0x78 [ath11k_pci])
-[<7f67bba4>] (ath11k_pci_ext_grp_napi_poll [ath11k_pci]) from [<807d5cf4>] (__napi_poll+0x28/0xb8)
-[<807d5cf4>] (__napi_poll) from [<807d5f28>] (net_rx_action+0xf0/0x280)
-[<807d5f28>] (net_rx_action) from [<80302148>] (__do_softirq+0xd0/0x280)
-[<80302148>] (__do_softirq) from [<80320408>] (irq_exit+0x74/0xd4)
-[<80320408>] (irq_exit) from [<803638a4>] (__handle_domain_irq+0x90/0xb4)
-[<803638a4>] (__handle_domain_irq) from [<805bedec>] (gic_handle_irq+0x58/0x90)
-[<805bedec>] (gic_handle_irq) from [<80301a78>] (__irq_svc+0x58/0x8c)
-
-Tested-on: IPQ8074 hw2.0 AHB WLAN.HK.2.7.0.1-01744-QCAHKSWPL_SILICONZ-1
-
-Signed-off-by: Nagarajan Maran <quic_nmaran@quicinc.com>
-Signed-off-by: Kalle Valo <quic_kvalo@quicinc.com>
-Link: https://lore.kernel.org/r/20230403191533.28114-1-quic_nmaran@quicinc.com
----
- drivers/net/wireless/ath/ath11k/dp_rx.c | 9 ++++++---
- 1 file changed, 6 insertions(+), 3 deletions(-)
-
---- a/drivers/net/wireless/ath/ath11k/dp_rx.c
-+++ b/drivers/net/wireless/ath/ath11k/dp_rx.c
-@@ -389,10 +389,10 @@ int ath11k_dp_rxbufs_replenish(struct at
- goto fail_free_skb;
-
- spin_lock_bh(&rx_ring->idr_lock);
-- buf_id = idr_alloc(&rx_ring->bufs_idr, skb, 0,
-- rx_ring->bufs_max * 3, GFP_ATOMIC);
-+ buf_id = idr_alloc(&rx_ring->bufs_idr, skb, 1,
-+ (rx_ring->bufs_max * 3) + 1, GFP_ATOMIC);
- spin_unlock_bh(&rx_ring->idr_lock);
-- if (buf_id < 0)
-+ if (buf_id <= 0)
- goto fail_dma_unmap;
-
- desc = ath11k_hal_srng_src_get_next_entry(ab, srng);
-@@ -2665,6 +2665,9 @@ try_again:
- cookie);
- mac_id = FIELD_GET(DP_RXDMA_BUF_COOKIE_PDEV_ID, cookie);
-
-+ if (unlikely(buf_id == 0))
-+ continue;
-+
- ar = ab->pdevs[mac_id].ar;
- rx_ring = &ar->dp.rx_refill_buf_ring;
- spin_lock_bh(&rx_ring->idr_lock);
--- a/drivers/net/wireless/ath/ath11k/mac.c
+++ b/drivers/net/wireless/ath/ath11k/mac.c
-@@ -5585,10 +5585,6 @@ static int ath11k_mac_copy_he_cap(struct
+@@ -5582,10 +5582,6 @@ static int ath11k_mac_copy_he_cap(struct
he_cap_elem->mac_cap_info[1] &=
IEEE80211_HE_MAC_CAP1_TF_MAC_PAD_DUR_MASK;
+++ /dev/null
-From e2ceb1de2f83aafd8003f0b72dfd4b7441e97d14 Mon Sep 17 00:00:00 2001
-From: Maxime Bizon <mbizon@freebox.fr>
-Date: Fri, 21 Apr 2023 16:54:45 +0200
-Subject: [PATCH] wifi: ath11k: fix registration of 6Ghz-only phy without the
- full channel range
-
-Because of what seems to be a typo, a 6Ghz-only phy for which the BDF
-does not allow the 7115Mhz channel will fail to register:
-
- WARNING: CPU: 2 PID: 106 at net/wireless/core.c:907 wiphy_register+0x914/0x954
- Modules linked in: ath11k_pci sbsa_gwdt
- CPU: 2 PID: 106 Comm: kworker/u8:5 Not tainted 6.3.0-rc7-next-20230418-00549-g1e096a17625a-dirty #9
- Hardware name: Freebox V7R Board (DT)
- Workqueue: ath11k_qmi_driver_event ath11k_qmi_driver_event_work
- pstate: 60000005 (nZCv daif -PAN -UAO -TCO -DIT -SSBS BTYPE=--)
- pc : wiphy_register+0x914/0x954
- lr : ieee80211_register_hw+0x67c/0xc10
- sp : ffffff800b123aa0
- x29: ffffff800b123aa0 x28: 0000000000000000 x27: 0000000000000000
- x26: 0000000000000000 x25: 0000000000000006 x24: ffffffc008d51418
- x23: ffffffc008cb0838 x22: ffffff80176c2460 x21: 0000000000000168
- x20: ffffff80176c0000 x19: ffffff80176c03e0 x18: 0000000000000014
- x17: 00000000cbef338c x16: 00000000d2a26f21 x15: 00000000ad6bb85f
- x14: 0000000000000020 x13: 0000000000000020 x12: 00000000ffffffbd
- x11: 0000000000000208 x10: 00000000fffffdf7 x9 : ffffffc009394718
- x8 : ffffff80176c0528 x7 : 000000007fffffff x6 : 0000000000000006
- x5 : 0000000000000005 x4 : ffffff800b304284 x3 : ffffff800b304284
- x2 : ffffff800b304d98 x1 : 0000000000000000 x0 : 0000000000000000
- Call trace:
- wiphy_register+0x914/0x954
- ieee80211_register_hw+0x67c/0xc10
- ath11k_mac_register+0x7c4/0xe10
- ath11k_core_qmi_firmware_ready+0x1f4/0x570
- ath11k_qmi_driver_event_work+0x198/0x590
- process_one_work+0x1b8/0x328
- worker_thread+0x6c/0x414
- kthread+0x100/0x104
- ret_from_fork+0x10/0x20
- ---[ end trace 0000000000000000 ]---
- ath11k_pci 0002:01:00.0: ieee80211 registration failed: -22
- ath11k_pci 0002:01:00.0: failed register the radio with mac80211: -22
- ath11k_pci 0002:01:00.0: failed to create pdev core: -22
-
-Signed-off-by: Maxime Bizon <mbizon@freebox.fr>
-Signed-off-by: Kalle Valo <quic_kvalo@quicinc.com>
-Link: https://lore.kernel.org/r/20230421145445.2612280-1-mbizon@freebox.fr
----
- drivers/net/wireless/ath/ath11k/mac.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
---- a/drivers/net/wireless/ath/ath11k/mac.c
-+++ b/drivers/net/wireless/ath/ath11k/mac.c
-@@ -8892,7 +8892,7 @@ static int ath11k_mac_setup_channels_rat
- }
-
- if (supported_bands & WMI_HOST_WLAN_5G_CAP) {
-- if (reg_cap->high_5ghz_chan >= ATH11K_MAX_6G_FREQ) {
-+ if (reg_cap->high_5ghz_chan >= ATH11K_MIN_6G_FREQ) {
- channels = kmemdup(ath11k_6ghz_channels,
- sizeof(ath11k_6ghz_channels), GFP_KERNEL);
- if (!channels) {
{
int nss;
-@@ -1658,7 +1658,7 @@ static void ath11k_peer_assoc_h_rates(st
+@@ -1651,7 +1651,7 @@ static void ath11k_peer_assoc_h_rates(st
}
static bool
{
int nss;
-@@ -1670,7 +1670,7 @@ ath11k_peer_assoc_h_ht_masked(const u8 h
+@@ -1663,7 +1663,7 @@ ath11k_peer_assoc_h_ht_masked(const u8 h
}
static bool
{
int nss;
-@@ -2065,7 +2065,7 @@ static u16 ath11k_peer_assoc_h_he_limit(
+@@ -2058,7 +2058,7 @@ static u16 ath11k_peer_assoc_h_he_limit(
}
static bool
#define ATH11K_QUEUE_LEN 4096
--- a/drivers/net/wireless/ath/ath11k/mac.c
+++ b/drivers/net/wireless/ath/ath11k/mac.c
-@@ -9001,19 +9001,23 @@ static int ath11k_mac_setup_iface_combin
+@@ -9006,19 +9006,23 @@ static int ath11k_mac_setup_iface_combin
static const u8 ath11k_if_types_ext_capa[] = {
[0] = WLAN_EXT_CAPA1_EXT_CHANNEL_SWITCHING,
};
static const struct wiphy_iftype_ext_capab ath11k_iftypes_ext_capa[] = {
-@@ -9251,6 +9255,9 @@ static int __ath11k_mac_register(struct
+@@ -9256,6 +9260,9 @@ static int __ath11k_mac_register(struct
wiphy_ext_feature_set(ar->hw->wiphy,
NL80211_EXT_FEATURE_ENABLE_FTM_RESPONDER);
--- a/drivers/net/wireless/ath/ath11k/mac.c
+++ b/drivers/net/wireless/ath/ath11k/mac.c
-@@ -6181,17 +6181,62 @@ static void ath11k_mac_op_stop(struct ie
+@@ -6178,17 +6178,62 @@ static void ath11k_mac_op_stop(struct ie
atomic_set(&ar->num_pending_mgmt_tx, 0);
}
if (pdev->cap.supported_bands & WMI_HOST_WLAN_2G_CAP) {
params->chains[NL80211_BAND_2GHZ].tx = ar->num_tx_chains;
-@@ -6206,6 +6251,7 @@ ath11k_mac_setup_vdev_create_params(stru
+@@ -6203,6 +6248,7 @@ ath11k_mac_setup_vdev_create_params(stru
params->chains[NL80211_BAND_6GHZ].tx = ar->num_tx_chains;
params->chains[NL80211_BAND_6GHZ].rx = ar->num_rx_chains;
}
}
static void ath11k_mac_op_update_vif_offload(struct ieee80211_hw *hw,
-@@ -6500,7 +6546,12 @@ static int ath11k_mac_op_add_interface(s
+@@ -6497,7 +6543,12 @@ static int ath11k_mac_op_add_interface(s
for (i = 0; i < ARRAY_SIZE(vif->hw_queue); i++)
vif->hw_queue[i] = i % (ATH11K_HW_MAX_QUEUES - 1);
ret = ath11k_wmi_vdev_create(ar, vif->addr, &vdev_param);
if (ret) {
-@@ -6905,6 +6956,17 @@ ath11k_mac_vdev_start_restart(struct ath
+@@ -6902,6 +6953,17 @@ ath11k_mac_vdev_start_restart(struct ath
arg.pref_tx_streams = ar->num_tx_chains;
arg.pref_rx_streams = ar->num_rx_chains;
if (ret) {
ath11k_warn(ar->ab, "failed to put up monitor vdev %i: %d\n",
vdev_id, ret);
-@@ -1423,6 +1423,7 @@ static void ath11k_control_beaconing(str
+@@ -1416,6 +1416,7 @@ static void ath11k_control_beaconing(str
struct ieee80211_bss_conf *info)
{
struct ath11k *ar = arvif->ar;
int ret = 0;
lockdep_assert_held(&arvif->ar->conf_mutex);
-@@ -1451,8 +1452,14 @@ static void ath11k_control_beaconing(str
+@@ -1444,8 +1445,14 @@ static void ath11k_control_beaconing(str
ether_addr_copy(arvif->bssid, info->bssid);
if (ret) {
ath11k_warn(ar->ab, "failed to bring up vdev %d: %i\n",
arvif->vdev_id, ret);
-@@ -2879,7 +2886,8 @@ static void ath11k_bss_assoc(struct ieee
+@@ -2876,7 +2883,8 @@ static void ath11k_bss_assoc(struct ieee
arvif->aid = vif->cfg.aid;
ether_addr_copy(arvif->bssid, bss_conf->bssid);
if (ret) {
ath11k_warn(ar->ab, "failed to set vdev %d up: %d\n",
arvif->vdev_id, ret);
-@@ -7133,7 +7141,8 @@ ath11k_mac_update_vif_chan(struct ath11k
+@@ -7130,7 +7138,8 @@ ath11k_mac_update_vif_chan(struct ath11k
int n_vifs)
{
struct ath11k_base *ab = ar->ab;
int ret;
int i;
bool monitor_vif = false;
-@@ -7187,8 +7196,15 @@ ath11k_mac_update_vif_chan(struct ath11k
+@@ -7184,8 +7193,15 @@ ath11k_mac_update_vif_chan(struct ath11k
ath11k_warn(ab, "failed to update bcn tmpl during csa: %d\n",
ret);
if (ret) {
ath11k_warn(ab, "failed to bring vdev up %d: %d\n",
arvif->vdev_id, ret);
-@@ -7306,7 +7322,8 @@ static int ath11k_start_vdev_delay(struc
+@@ -7303,7 +7319,8 @@ static int ath11k_start_vdev_delay(struc
}
if (arvif->vdev_type == WMI_VDEV_TYPE_MONITOR) {
--- a/drivers/net/wireless/ath/ath11k/mac.c
+++ b/drivers/net/wireless/ath/ath11k/mac.c
-@@ -1351,28 +1351,14 @@ err_mon_del:
+@@ -1344,28 +1344,14 @@ err_mon_del:
return ret;
}
ies += sizeof(mgmt->u.beacon);
if (cfg80211_find_ie(WLAN_EID_RSN, ies, (skb_tail_pointer(bcn) - ies)))
-@@ -1386,7 +1372,28 @@ static int ath11k_mac_setup_bcn_tmpl(str
+@@ -1379,7 +1365,28 @@ static int ath11k_mac_setup_bcn_tmpl(str
arvif->wpaie_present = true;
else
arvif->wpaie_present = false;
--- a/drivers/net/wireless/ath/ath11k/mac.c
+++ b/drivers/net/wireless/ath/ath11k/mac.c
-@@ -1351,6 +1351,84 @@ err_mon_del:
+@@ -1344,6 +1344,84 @@ err_mon_del:
return ret;
}
static void ath11k_mac_set_vif_params(struct ath11k_vif *arvif,
struct sk_buff *bcn)
{
-@@ -1374,18 +1452,26 @@ static void ath11k_mac_set_vif_params(st
+@@ -1367,18 +1445,26 @@ static void ath11k_mac_set_vif_params(st
arvif->wpaie_present = false;
}
bcn = ieee80211_beacon_get_template(hw, vif, &offs, 0);
if (!bcn) {
-@@ -1393,9 +1479,12 @@ static int ath11k_mac_setup_bcn_tmpl(str
+@@ -1386,9 +1472,12 @@ static int ath11k_mac_setup_bcn_tmpl(str
return -EPERM;
}
kfree_skb(bcn);
if (ret)
-@@ -1405,6 +1494,23 @@ static int ath11k_mac_setup_bcn_tmpl(str
+@@ -1398,6 +1487,23 @@ static int ath11k_mac_setup_bcn_tmpl(str
return ret;
}
--- a/drivers/net/wireless/ath/ath11k/mac.c
+++ b/drivers/net/wireless/ath/ath11k/mac.c
-@@ -1452,6 +1452,60 @@ static void ath11k_mac_set_vif_params(st
+@@ -1445,6 +1445,60 @@ static void ath11k_mac_set_vif_params(st
arvif->wpaie_present = false;
}
static int ath11k_mac_setup_bcn_tmpl_mbssid(struct ath11k_vif *arvif)
{
struct ath11k *ar = arvif->ar;
-@@ -1484,7 +1538,7 @@ static int ath11k_mac_setup_bcn_tmpl_mbs
+@@ -1477,7 +1531,7 @@ static int ath11k_mac_setup_bcn_tmpl_mbs
else if (!ath11k_mac_set_nontx_vif_params(tx_arvif, arvif, bcn))
return -EINVAL;
kfree_skb(bcn);
if (ret)
-@@ -1508,6 +1562,9 @@ static int ath11k_mac_setup_bcn_tmpl(str
+@@ -1501,6 +1555,9 @@ static int ath11k_mac_setup_bcn_tmpl(str
arvif != (void *)vif->mbssid_tx_vif->drv_priv && arvif->is_up)
return 0;
*/
#include <net/mac80211.h>
-@@ -4338,6 +4338,20 @@ exit:
+@@ -4335,6 +4335,20 @@ exit:
}
static int
ath11k_mac_bitrate_mask_num_vht_rates(struct ath11k *ar,
enum nl80211_band band,
const struct cfg80211_bitrate_mask *mask)
-@@ -7791,20 +7805,6 @@ static void ath11k_mac_op_flush(struct i
+@@ -7788,20 +7802,6 @@ static void ath11k_mac_op_flush(struct i
ath11k_mac_flush_tx_complete(ar);
}
--- a/drivers/net/wireless/ath/ath11k/mac.c
+++ b/drivers/net/wireless/ath/ath11k/mac.c
-@@ -4480,6 +4480,54 @@ ath11k_mac_set_peer_he_fixed_rate(struct
+@@ -4477,6 +4477,54 @@ ath11k_mac_set_peer_he_fixed_rate(struct
return ret;
}
static int ath11k_station_assoc(struct ath11k *ar,
struct ieee80211_vif *vif,
struct ieee80211_sta *sta,
-@@ -4491,7 +4539,7 @@ static int ath11k_station_assoc(struct a
+@@ -4488,7 +4536,7 @@ static int ath11k_station_assoc(struct a
struct cfg80211_chan_def def;
enum nl80211_band band;
struct cfg80211_bitrate_mask *mask;
lockdep_assert_held(&ar->conf_mutex);
-@@ -4519,6 +4567,7 @@ static int ath11k_station_assoc(struct a
+@@ -4516,6 +4564,7 @@ static int ath11k_station_assoc(struct a
num_vht_rates = ath11k_mac_bitrate_mask_num_vht_rates(ar, band, mask);
num_he_rates = ath11k_mac_bitrate_mask_num_he_rates(ar, band, mask);
/* If single VHT/HE rate is configured (by set_bitrate_mask()),
* peer_assoc will disable VHT/HE. This is now enabled by a peer specific
-@@ -4535,6 +4584,11 @@ static int ath11k_station_assoc(struct a
+@@ -4532,6 +4581,11 @@ static int ath11k_station_assoc(struct a
band);
if (ret)
return ret;
}
/* Re-assoc is run only to update supported rates for given station. It
-@@ -4608,7 +4662,7 @@ static void ath11k_sta_rc_update_wk(stru
+@@ -4605,7 +4659,7 @@ static void ath11k_sta_rc_update_wk(stru
const u16 *vht_mcs_mask;
const u16 *he_mcs_mask;
u32 changed, bw, nss, smps, bw_prev;
const struct cfg80211_bitrate_mask *mask;
struct peer_assoc_params peer_arg;
enum wmi_phy_mode peer_phymode;
-@@ -4724,6 +4778,8 @@ static void ath11k_sta_rc_update_wk(stru
+@@ -4721,6 +4775,8 @@ static void ath11k_sta_rc_update_wk(stru
if (changed & IEEE80211_RC_SUPP_RATES_CHANGED) {
mask = &arvif->bitrate_mask;
num_vht_rates = ath11k_mac_bitrate_mask_num_vht_rates(ar, band,
mask);
num_he_rates = ath11k_mac_bitrate_mask_num_he_rates(ar, band,
-@@ -4746,6 +4802,9 @@ static void ath11k_sta_rc_update_wk(stru
+@@ -4743,6 +4799,9 @@ static void ath11k_sta_rc_update_wk(stru
} else if (sta->deflink.he_cap.has_he && num_he_rates == 1) {
ath11k_mac_set_peer_he_fixed_rate(arvif, sta, mask,
band);
+++ /dev/null
-From 88ca89202f8e8afb5225eb5244d79cd67c15d744 Mon Sep 17 00:00:00 2001
-From: Wen Gong <quic_wgong@quicinc.com>
-Date: Fri, 26 May 2023 12:41:06 +0300
-Subject: [PATCH] wifi: ath11k: add support default regdb while searching
- board-2.bin for WCN6855
-
-Sometimes board-2.bin does not have the regdb data which matched the
-parameters such as vendor, device, subsystem-vendor, subsystem-device
-and etc. Add default regdb data with 'bus=%s' into board-2.bin for
-WCN6855, then ath11k use 'bus=pci' to search regdb data in board-2.bin
-for WCN6855.
-
-kernel: [ 122.515808] ath11k_pci 0000:03:00.0: boot using board name 'bus=pci,vendor=17cb,device=1103,subsystem-vendor=17cb,subsystem-device=3374,qmi-chip-id=2,qmi-board-id=262'
-kernel: [ 122.517240] ath11k_pci 0000:03:00.0: boot firmware request ath11k/WCN6855/hw2.0/board-2.bin size 6179564
-kernel: [ 122.517280] ath11k_pci 0000:03:00.0: failed to fetch regdb data for bus=pci,vendor=17cb,device=1103,subsystem-vendor=17cb,subsystem-device=3374,qmi-chip-id=2,qmi-board-id=262 from ath11k/WCN6855/hw2.0/board-2.bin
-kernel: [ 122.517464] ath11k_pci 0000:03:00.0: boot using board name 'bus=pci'
-kernel: [ 122.518901] ath11k_pci 0000:03:00.0: boot firmware request ath11k/WCN6855/hw2.0/board-2.bin size 6179564
-kernel: [ 122.518915] ath11k_pci 0000:03:00.0: board name
-kernel: [ 122.518917] ath11k_pci 0000:03:00.0: 00000000: 62 75 73 3d 70 63 69 bus=pci
-kernel: [ 122.518918] ath11k_pci 0000:03:00.0: boot found match regdb data for name 'bus=pci'
-kernel: [ 122.518920] ath11k_pci 0000:03:00.0: boot found regdb data for 'bus=pci'
-kernel: [ 122.518921] ath11k_pci 0000:03:00.0: fetched regdb
-
-Tested-on: WCN6855 hw2.0 PCI WLAN.HSP.1.1-03125-QCAHSPSWPL_V1_V2_SILICONZ_LITE-3
-
-Signed-off-by: Wen Gong <quic_wgong@quicinc.com>
-Signed-off-by: Kalle Valo <quic_kvalo@quicinc.com>
-Link: https://lore.kernel.org/r/20230517133959.8224-1-quic_wgong@quicinc.com
----
- drivers/net/wireless/ath/ath11k/core.c | 53 +++++++++++++++++++-------
- 1 file changed, 40 insertions(+), 13 deletions(-)
-
---- a/drivers/net/wireless/ath/ath11k/core.c
-+++ b/drivers/net/wireless/ath/ath11k/core.c
-@@ -961,7 +961,8 @@ int ath11k_core_check_dt(struct ath11k_b
- }
-
- static int __ath11k_core_create_board_name(struct ath11k_base *ab, char *name,
-- size_t name_len, bool with_variant)
-+ size_t name_len, bool with_variant,
-+ bool bus_type_mode)
- {
- /* strlen(',variant=') + strlen(ab->qmi.target.bdf_ext) */
- char variant[9 + ATH11K_QMI_BDF_EXT_STR_LENGTH] = { 0 };
-@@ -972,15 +973,20 @@ static int __ath11k_core_create_board_na
-
- switch (ab->id.bdf_search) {
- case ATH11K_BDF_SEARCH_BUS_AND_BOARD:
-- scnprintf(name, name_len,
-- "bus=%s,vendor=%04x,device=%04x,subsystem-vendor=%04x,subsystem-device=%04x,qmi-chip-id=%d,qmi-board-id=%d%s",
-- ath11k_bus_str(ab->hif.bus),
-- ab->id.vendor, ab->id.device,
-- ab->id.subsystem_vendor,
-- ab->id.subsystem_device,
-- ab->qmi.target.chip_id,
-- ab->qmi.target.board_id,
-- variant);
-+ if (bus_type_mode)
-+ scnprintf(name, name_len,
-+ "bus=%s",
-+ ath11k_bus_str(ab->hif.bus));
-+ else
-+ scnprintf(name, name_len,
-+ "bus=%s,vendor=%04x,device=%04x,subsystem-vendor=%04x,subsystem-device=%04x,qmi-chip-id=%d,qmi-board-id=%d%s",
-+ ath11k_bus_str(ab->hif.bus),
-+ ab->id.vendor, ab->id.device,
-+ ab->id.subsystem_vendor,
-+ ab->id.subsystem_device,
-+ ab->qmi.target.chip_id,
-+ ab->qmi.target.board_id,
-+ variant);
- break;
- default:
- scnprintf(name, name_len,
-@@ -999,13 +1005,19 @@ static int __ath11k_core_create_board_na
- static int ath11k_core_create_board_name(struct ath11k_base *ab, char *name,
- size_t name_len)
- {
-- return __ath11k_core_create_board_name(ab, name, name_len, true);
-+ return __ath11k_core_create_board_name(ab, name, name_len, true, false);
- }
-
- static int ath11k_core_create_fallback_board_name(struct ath11k_base *ab, char *name,
- size_t name_len)
- {
-- return __ath11k_core_create_board_name(ab, name, name_len, false);
-+ return __ath11k_core_create_board_name(ab, name, name_len, false, false);
-+}
-+
-+static int ath11k_core_create_bus_type_board_name(struct ath11k_base *ab, char *name,
-+ size_t name_len)
-+{
-+ return __ath11k_core_create_board_name(ab, name, name_len, false, true);
- }
-
- const struct firmware *ath11k_core_firmware_request(struct ath11k_base *ab,
-@@ -1309,7 +1321,7 @@ success:
-
- int ath11k_core_fetch_regdb(struct ath11k_base *ab, struct ath11k_board_data *bd)
- {
-- char boardname[BOARD_NAME_SIZE];
-+ char boardname[BOARD_NAME_SIZE], default_boardname[BOARD_NAME_SIZE];
- int ret;
-
- ret = ath11k_core_create_board_name(ab, boardname, BOARD_NAME_SIZE);
-@@ -1323,6 +1335,21 @@ int ath11k_core_fetch_regdb(struct ath11
- ATH11K_BD_IE_REGDB,
- ATH11K_BD_IE_REGDB_NAME,
- ATH11K_BD_IE_REGDB_DATA);
-+ if (!ret)
-+ goto exit;
-+
-+ ret = ath11k_core_create_bus_type_board_name(ab, default_boardname,
-+ BOARD_NAME_SIZE);
-+ if (ret) {
-+ ath11k_dbg(ab, ATH11K_DBG_BOOT,
-+ "failed to create default board name for regdb: %d", ret);
-+ goto exit;
-+ }
-+
-+ ret = ath11k_core_fetch_board_data_api_n(ab, bd, default_boardname,
-+ ATH11K_BD_IE_REGDB,
-+ ATH11K_BD_IE_REGDB_NAME,
-+ ATH11K_BD_IE_REGDB_DATA);
- if (!ret)
- goto exit;
-
if (pdev && pdev->pdev_id == pdev_id)
return (pdev->ar ? pdev->ar : NULL);
-@@ -6271,6 +6274,11 @@ static int ath11k_mac_op_start(struct ie
+@@ -6268,6 +6271,11 @@ static int ath11k_mac_op_start(struct ie
struct ath11k_pdev *pdev = ar->pdev;
int ret;
ath11k_mac_drain_tx(ar);
mutex_lock(&ar->conf_mutex);
-@@ -6285,6 +6293,7 @@ static int ath11k_mac_op_start(struct ie
+@@ -6282,6 +6290,7 @@ static int ath11k_mac_op_start(struct ie
case ATH11K_STATE_RESTARTED:
case ATH11K_STATE_WEDGED:
case ATH11K_STATE_ON:
*/
#include <linux/module.h>
-@@ -745,6 +745,7 @@ static int ath11k_pci_probe(struct pci_d
+@@ -751,6 +751,7 @@ static int ath11k_pci_probe(struct pci_d
ab_pci->ab = ab;
ab_pci->pdev = pdev;
ab->hif.ops = &ath11k_pci_hif_ops;
{
const void **tb;
int ret;
-@@ -8628,6 +8628,9 @@ static void ath11k_wmi_tlv_op_rx(struct
+@@ -8644,6 +8644,9 @@ static void ath11k_wmi_tlv_op_rx(struct
case WMI_PDEV_CSA_SWITCH_COUNT_STATUS_EVENTID:
ath11k_wmi_pdev_csa_switch_count_status_event(ab, skb);
break;
*/
#include <linux/elf.h>
-@@ -2460,6 +2460,14 @@ static int ath11k_qmi_load_bdf_qmi(struc
+@@ -2465,6 +2465,14 @@ static int ath11k_qmi_load_bdf_qmi(struc
fw_entry = ath11k_core_firmware_request(ab, ATH11K_DEFAULT_CAL_FILE);
if (IS_ERR(fw_entry)) {
+++ /dev/null
-From 6aafa1c2d3e3fea2ebe84c018003f2a91722e607 Mon Sep 17 00:00:00 2001
-From: P Praneesh <quic_ppranees@quicinc.com>
-Date: Tue, 6 Jun 2023 14:41:28 +0530
-Subject: [PATCH] wifi: ath11k: fix memory leak in WMI firmware stats
-
-Memory allocated for firmware pdev, vdev and beacon statistics
-are not released during rmmod.
-
-Fix it by calling ath11k_fw_stats_free() function before hardware
-unregister.
-
-While at it, avoid calling ath11k_fw_stats_free() while processing
-the firmware stats received in the WMI event because the local list
-is getting spliced and reinitialised and hence there are no elements
-in the list after splicing.
-
-Tested-on: QCN9074 hw1.0 PCI WLAN.HK.2.7.0.1-01744-QCAHKSWPL_SILICONZ-1
-
-Signed-off-by: P Praneesh <quic_ppranees@quicinc.com>
-Signed-off-by: Aditya Kumar Singh <quic_adisi@quicinc.com>
-Signed-off-by: Kalle Valo <quic_kvalo@quicinc.com>
-Link: https://lore.kernel.org/r/20230606091128.14202-1-quic_adisi@quicinc.com
----
- drivers/net/wireless/ath/ath11k/mac.c | 1 +
- drivers/net/wireless/ath/ath11k/wmi.c | 5 +++++
- 2 files changed, 6 insertions(+)
-
---- a/drivers/net/wireless/ath/ath11k/mac.c
-+++ b/drivers/net/wireless/ath/ath11k/mac.c
-@@ -9792,6 +9792,7 @@ void ath11k_mac_destroy(struct ath11k_ba
- if (!ar)
- continue;
-
-+ ath11k_fw_stats_free(&ar->fw_stats);
- ieee80211_free_hw(ar->hw);
- pdev->ar = NULL;
- }
---- a/drivers/net/wireless/ath/ath11k/wmi.c
-+++ b/drivers/net/wireless/ath/ath11k/wmi.c
-@@ -8119,6 +8119,11 @@ complete:
- rcu_read_unlock();
- spin_unlock_bh(&ar->data_lock);
-
-+ /* Since the stats's pdev, vdev and beacon list are spliced and reinitialised
-+ * at this point, no need to free the individual list.
-+ */
-+ return;
-+
- free:
- ath11k_fw_stats_free(&stats);
- }
+++ /dev/null
-From 16e0077e14a73866e9b0f4a6bf4ad3d4a5cb0f2a Mon Sep 17 00:00:00 2001
-From: Jiasheng Jiang <jiasheng@iscas.ac.cn>
-Date: Tue, 13 Jun 2023 12:19:40 +0300
-Subject: [PATCH] wifi: ath11k: Add missing check for ioremap
-
-Add check for ioremap() and return the error if it fails in order to
-guarantee the success of ioremap(), same as in
-ath11k_qmi_load_file_target_mem().
-
-Fixes: 6ac04bdc5edb ("ath11k: Use reserved host DDR addresses from DT for PCI devices")
-Signed-off-by: Jiasheng Jiang <jiasheng@iscas.ac.cn>
-Signed-off-by: Kalle Valo <quic_kvalo@quicinc.com>
-Link: https://lore.kernel.org/r/20230608022858.27405-1-jiasheng@iscas.ac.cn
----
- drivers/net/wireless/ath/ath11k/qmi.c | 5 +++++
- 1 file changed, 5 insertions(+)
-
---- a/drivers/net/wireless/ath/ath11k/qmi.c
-+++ b/drivers/net/wireless/ath/ath11k/qmi.c
-@@ -2061,6 +2061,9 @@ static int ath11k_qmi_assign_target_mem_
- ab->qmi.target_mem[idx].iaddr =
- ioremap(ab->qmi.target_mem[idx].paddr,
- ab->qmi.target_mem[i].size);
-+ if (!ab->qmi.target_mem[idx].iaddr)
-+ return -EIO;
-+
- ab->qmi.target_mem[idx].size = ab->qmi.target_mem[i].size;
- host_ddr_sz = ab->qmi.target_mem[i].size;
- ab->qmi.target_mem[idx].type = ab->qmi.target_mem[i].type;
-@@ -2086,6 +2089,8 @@ static int ath11k_qmi_assign_target_mem_
- ab->qmi.target_mem[idx].iaddr =
- ioremap(ab->qmi.target_mem[idx].paddr,
- ab->qmi.target_mem[i].size);
-+ if (!ab->qmi.target_mem[idx].iaddr)
-+ return -EIO;
- } else {
- ab->qmi.target_mem[idx].paddr =
- ATH11K_QMI_CALDB_ADDRESS;
}
--- a/drivers/net/wireless/ath/ath11k/pcic.c
+++ b/drivers/net/wireless/ath/ath11k/pcic.c
-@@ -466,7 +466,6 @@ void ath11k_pcic_ext_irq_enable(struct a
+@@ -464,7 +464,6 @@ void ath11k_pcic_ext_irq_enable(struct a
struct ath11k_ext_irq_grp *irq_grp = &ab->ext_irq_grp[i];
if (!irq_grp->napi_enabled) {
#define ATH11K_PCI_BAR_NUM 0
#define ATH11K_PCI_DMA_MASK 32
-@@ -897,6 +898,7 @@ unsupported_wcn6855_soc:
+@@ -903,6 +904,7 @@ unsupported_wcn6855_soc:
ath11k_err(ab, "failed to init core: %d\n", ret);
- goto err_irq_affinity_cleanup;
+ goto err_free_irq;
}
+ ath11k_qmi_fwreset_from_cold_boot(ab);
return 0;
- err_irq_affinity_cleanup:
+ err_free_irq:
--- a/drivers/net/wireless/ath/ath11k/qmi.c
+++ b/drivers/net/wireless/ath/ath11k/qmi.c
@@ -9,6 +9,7 @@
+++ /dev/null
-From 39564b475ac5a589e6c22c43a08cbd283c295d2c Mon Sep 17 00:00:00 2001
-From: Baochen Qiang <quic_bqiang@quicinc.com>
-Date: Thu, 7 Sep 2023 09:56:06 +0800
-Subject: [PATCH] wifi: ath11k: fix boot failure with one MSI vector
-
-Commit 5b32b6dd96633 ("ath11k: Remove core PCI references from
-PCI common code") breaks with one MSI vector because it moves
-affinity setting after IRQ request, see below log:
-
-[ 1417.278835] ath11k_pci 0000:02:00.0: failed to receive control response completion, polling..
-[ 1418.302829] ath11k_pci 0000:02:00.0: Service connect timeout
-[ 1418.302833] ath11k_pci 0000:02:00.0: failed to connect to HTT: -110
-[ 1418.303669] ath11k_pci 0000:02:00.0: failed to start core: -110
-
-The detail is, if do affinity request after IRQ activated,
-which is done in request_irq(), kernel caches that request and
-returns success directly. Later when a subsequent MHI interrupt is
-fired, kernel will do the real affinity setting work, as a result,
-changs the MSI vector. However at that time host has configured
-old vector to hardware, so host never receives CE or DP interrupts.
-
-Fix it by setting affinity before registering MHI controller
-where host is, for the first time, doing IRQ request.
-
-Tested-on: WCN6855 hw2.0 PCI WLAN.HSP.1.1-03125-QCAHSPSWPL_V1_V2_SILICONZ_LITE-3
-Tested-on: WCN6855 hw2.1 PCI WLAN.HSP.1.1-03125-QCAHSPSWPL_V1_V2_SILICONZ_LITE-3.6510.23
-Tested-on: WCN6750 hw1.0 AHB WLAN.MSL.1.0.1-01160-QCAMSLSWPLZ-1
-
-Fixes: 5b32b6dd9663 ("ath11k: Remove core PCI references from PCI common code")
-Signed-off-by: Baochen Qiang <quic_bqiang@quicinc.com>
-Acked-by: Jeff Johnson <quic_jjohnson@quicinc.com>
-Signed-off-by: Kalle Valo <quic_kvalo@quicinc.com>
-Link: https://lore.kernel.org/r/20230907015606.16297-1-quic_bqiang@quicinc.com
----
- drivers/net/wireless/ath/ath11k/pci.c | 24 ++++++++++++------------
- 1 file changed, 12 insertions(+), 12 deletions(-)
-
---- a/drivers/net/wireless/ath/ath11k/pci.c
-+++ b/drivers/net/wireless/ath/ath11k/pci.c
-@@ -852,10 +852,16 @@ unsupported_wcn6855_soc:
- if (ret)
- goto err_pci_disable_msi;
-
-+ ret = ath11k_pci_set_irq_affinity_hint(ab_pci, cpumask_of(0));
-+ if (ret) {
-+ ath11k_err(ab, "failed to set irq affinity %d\n", ret);
-+ goto err_pci_disable_msi;
-+ }
-+
- ret = ath11k_mhi_register(ab_pci);
- if (ret) {
- ath11k_err(ab, "failed to register mhi: %d\n", ret);
-- goto err_pci_disable_msi;
-+ goto err_irq_affinity_cleanup;
- }
-
- ret = ath11k_hal_srng_init(ab);
-@@ -876,12 +882,6 @@ unsupported_wcn6855_soc:
- goto err_ce_free;
- }
-
-- ret = ath11k_pci_set_irq_affinity_hint(ab_pci, cpumask_of(0));
-- if (ret) {
-- ath11k_err(ab, "failed to set irq affinity %d\n", ret);
-- goto err_free_irq;
-- }
--
- /* kernel may allocate a dummy vector before request_irq and
- * then allocate a real vector when request_irq is called.
- * So get msi_data here again to avoid spurious interrupt
-@@ -890,20 +890,17 @@ unsupported_wcn6855_soc:
- ret = ath11k_pci_config_msi_data(ab_pci);
- if (ret) {
- ath11k_err(ab, "failed to config msi_data: %d\n", ret);
-- goto err_irq_affinity_cleanup;
-+ goto err_free_irq;
- }
-
- ret = ath11k_core_init(ab);
- if (ret) {
- ath11k_err(ab, "failed to init core: %d\n", ret);
-- goto err_irq_affinity_cleanup;
-+ goto err_free_irq;
- }
- ath11k_qmi_fwreset_from_cold_boot(ab);
- return 0;
-
--err_irq_affinity_cleanup:
-- ath11k_pci_set_irq_affinity_hint(ab_pci, NULL);
--
- err_free_irq:
- ath11k_pcic_free_irq(ab);
-
-@@ -916,6 +913,9 @@ err_hal_srng_deinit:
- err_mhi_unregister:
- ath11k_mhi_unregister(ab_pci);
-
-+err_irq_affinity_cleanup:
-+ ath11k_pci_set_irq_affinity_hint(ab_pci, NULL);
-+
- err_pci_disable_msi:
- ath11k_pci_free_msi(ab_pci);
-
int ath11k_thermal_set_throttling(struct ath11k *ar, u32 throttle_state);
--- a/local-symbols
+++ b/local-symbols
-@@ -174,6 +174,7 @@ ATH11K_DEBUG=
+@@ -166,6 +166,7 @@ ATH11K_DEBUG=
ATH11K_DEBUGFS=
ATH11K_TRACING=
ATH11K_SPECTRAL=
+++ /dev/null
-From 04178918e7f6b5f34dde81ec79ee8a1ccace3be3 Mon Sep 17 00:00:00 2001
-From: Robert Marko <robimarko@gmail.com>
-Date: Mon, 17 Oct 2022 11:45:03 +0200
-Subject: [PATCH] wifi: ath11k: pci: fix compilation in 5.16 and older
-
-Commit ("genirq/msi, treewide: Use a named struct for PCI/MSI attributes")
-changed the msi_desc structure a bit, however that is only available in
-kernels 5.17 and newer, so check for kernel version to allow compilation
-in 5.16 and older.
-
-Signed-off-by: Robert Marko <robimarko@gmail.com>
----
- drivers/net/wireless/ath/ath11k/pci.c | 4 ++++
- 1 file changed, 4 insertions(+)
-
---- a/drivers/net/wireless/ath/ath11k/pci.c
-+++ b/drivers/net/wireless/ath/ath11k/pci.c
-@@ -459,7 +459,11 @@ static int ath11k_pci_alloc_msi(struct a
- pci_read_config_dword(pci_dev, pci_dev->msi_cap + PCI_MSI_ADDRESS_LO,
- &ab->pci.msi.addr_lo);
-
-+#if (LINUX_VERSION_CODE > KERNEL_VERSION(5, 17, 0))
- if (msi_desc->pci.msi_attrib.is_64) {
-+#else
-+ if (msi_desc->msi_attrib.is_64) {
-+#endif
- pci_read_config_dword(pci_dev, pci_dev->msi_cap + PCI_MSI_ADDRESS_HI,
- &ab->pci.msi.addr_hi);
- } else {
debugfs_create_devm_seqfile(sc->dev, "interrupt", sc->debug.debugfs_phy,
--- a/drivers/net/wireless/ath/ath.h
+++ b/drivers/net/wireless/ath/ath.h
-@@ -149,6 +149,7 @@ struct ath_common {
+@@ -151,6 +151,7 @@ struct ath_common {
int debug_mask;
enum ath_device_state state;
unsigned long op_flags;
---- a/include/linux/ath9k_platform.h
-+++ b/include/linux/ath9k_platform.h
-@@ -46,6 +46,9 @@ struct ath9k_platform_data {
- int (*external_reset)(void);
-
- bool use_eeprom;
-+
-+ int num_leds;
-+ const struct gpio_led *leds;
- };
-
- #endif /* _LINUX_ATH9K_PLATFORM_H */
--- a/drivers/net/wireless/ath/ath9k/gpio.c
+++ b/drivers/net/wireless/ath/ath9k/gpio.c
@@ -15,6 +15,7 @@
REG_SET_BIT(ah, AR_BTCOEX_WL_LNADIV, AR_BTCOEX_WL_LNADIV_FORCE_ON);
--- a/drivers/net/wireless/ath/ath9k/main.c
+++ b/drivers/net/wireless/ath/ath9k/main.c
-@@ -538,6 +538,11 @@ irqreturn_t ath_isr(int irq, void *dev)
+@@ -537,6 +537,11 @@ irqreturn_t ath_isr(int irq, void *dev)
return IRQ_HANDLED;
}
if (pdata && pdata->leds && pdata->num_leds)
for (i = 0; i < pdata->num_leds; i++) {
---- a/include/linux/ath9k_platform.h
-+++ b/include/linux/ath9k_platform.h
-@@ -49,6 +49,10 @@ struct ath9k_platform_data {
-
- int num_leds;
- const struct gpio_led *leds;
-+
-+ unsigned num_btns;
-+ const struct gpio_keys_button *btns;
-+ unsigned btn_poll_interval;
- };
-
- #endif /* _LINUX_ATH9K_PLATFORM_H */
static void ath9k_flush(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
u32 queues, bool drop);
-@@ -659,6 +660,7 @@ void ath_reset_work(struct work_struct *
+@@ -658,6 +659,7 @@ void ath_reset_work(struct work_struct *
static int ath9k_start(struct ieee80211_hw *hw)
{
struct ath_softc *sc = hw->priv;
struct ath_hw *ah = sc->sc_ah;
struct ath_common *common = ath9k_hw_common(ah);
struct ieee80211_channel *curchan = sc->cur_chan->chandef.chan;
-@@ -737,6 +739,11 @@ static int ath9k_start(struct ieee80211_
+@@ -736,6 +738,11 @@ static int ath9k_start(struct ieee80211_
AR_GPIO_OUTPUT_MUX_AS_OUTPUT);
}
--- a/local-symbols
+++ b/local-symbols
-@@ -129,6 +129,7 @@ ATH9K_WOW=
+@@ -121,6 +121,7 @@ ATH9K_WOW=
ATH9K_RFKILL=
ATH9K_CHANNEL_CONTEXT=
ATH9K_PCOEM=
static int modparam_bad_frames_preempt;
module_param_named(bad_frames_preempt, modparam_bad_frames_preempt, int, 0444);
MODULE_PARM_DESC(bad_frames_preempt,
-@@ -2869,10 +2874,10 @@ static int b43_gpio_init(struct b43_wlde
+@@ -2870,10 +2875,10 @@ static int b43_gpio_init(struct b43_wlde
u32 mask, set;
b43_maskset32(dev, B43_MMIO_MACCTL, ~B43_MACCTL_GPOUTSMSK, 0);
antenna = b43_antenna_to_phyctl(antenna);
ctl = b43_shm_read16(dev, B43_SHM_SHARED, B43_SHM_SH_BEACPHYCTL);
/* We can't send beacons with short preamble. Would get PHY errors. */
-@@ -3284,8 +3284,8 @@ static int b43_chip_init(struct b43_wlde
+@@ -3285,8 +3285,8 @@ static int b43_chip_init(struct b43_wlde
/* Select the antennae */
if (phy->ops->set_rx_antenna)
if (phy->type == B43_PHYTYPE_B) {
value16 = b43_read16(dev, 0x005E);
-@@ -3986,7 +3986,6 @@ static int b43_op_config(struct ieee8021
+@@ -3988,7 +3988,6 @@ static int b43_op_config(struct ieee8021
struct b43_wldev *dev = wl->current_dev;
struct b43_phy *phy = &dev->phy;
struct ieee80211_conf *conf = &hw->conf;
int err = 0;
mutex_lock(&wl->mutex);
-@@ -4029,11 +4028,9 @@ static int b43_op_config(struct ieee8021
+@@ -4031,11 +4030,9 @@ static int b43_op_config(struct ieee8021
}
/* Antennas for RX and management frame TX. */
if (wl->radio_enabled != phy->radio_on) {
if (wl->radio_enabled) {
-@@ -5176,6 +5173,47 @@ static int b43_op_get_survey(struct ieee
+@@ -5178,6 +5175,47 @@ static int b43_op_get_survey(struct ieee
return 0;
}
static const struct ieee80211_ops b43_hw_ops = {
.tx = b43_op_tx,
.wake_tx_queue = ieee80211_handle_wake_tx_queue,
-@@ -5198,6 +5236,8 @@ static const struct ieee80211_ops b43_hw
+@@ -5200,6 +5238,8 @@ static const struct ieee80211_ops b43_hw
.sw_scan_complete = b43_op_sw_scan_complete_notifier,
.get_survey = b43_op_get_survey,
.rfkill_poll = b43_rfkill_poll,
};
/* Hard-reset the chip. Do not call this directly.
-@@ -5499,6 +5539,8 @@ static int b43_one_core_attach(struct b4
+@@ -5501,6 +5541,8 @@ static int b43_one_core_attach(struct b4
if (!wldev)
goto out;
wldev->use_pio = b43_modparam_pio;
wldev->dev = dev;
wldev->wl = wl;
-@@ -5590,6 +5632,9 @@ static struct b43_wl *b43_wireless_init(
+@@ -5592,6 +5634,9 @@ static struct b43_wl *b43_wireless_init(
wiphy_ext_feature_set(hw->wiphy, NL80211_EXT_FEATURE_CQM_RSSI_LIST);
--- a/drivers/net/wireless/broadcom/b43/main.c
+++ b/drivers/net/wireless/broadcom/b43/main.c
-@@ -2886,6 +2886,14 @@ static int b43_gpio_init(struct b43_wlde
+@@ -2887,6 +2887,14 @@ static int b43_gpio_init(struct b43_wlde
} else if (dev->dev->chip_id == 0x5354) {
/* Don't allow overtaking buttons GPIOs */
set &= 0x2; /* 0x2 is LED GPIO on BCM5354 */
@set -e ; test -f local-symbols || ( \
echo "/--------------" ;\
echo "| You shouldn't run make in the backports tree, but only in" ;\
-@@ -60,58 +62,62 @@ mrproper:
+@@ -60,57 +62,61 @@ mrproper:
echo "| (that isn't currently running.)" ;\
echo "\\--" ;\
false)
- done \
- ) > Kconfig.kernel ;\
- kver=$$($(MAKE) --no-print-directory -C $(KLIB_BUILD) M=$(BACKPORT_DIR) \
-- kernelversion | sed 's/^\(\([3-5]\|2\.6\)\.[0-9]\+\).*/\1/;t;d');\
+- kernelversion | sed 's/^\(\([3-6]\|2\.6\)\.[0-9]\+\).*/\1/;t;d');\
- test "$$kver" != "" || echo "Kernel version parse failed!" ;\
- test "$$kver" != "" ;\
-- kvers="$$(seq 14 39 | sed 's/^/2.6./')" ;\
-- kvers="$$kvers $$(seq 0 19 | sed 's/^/3./')" ;\
- kvers="$$kvers $$(seq 0 20 | sed 's/^/4./')" ;\
-- kvers="$$kvers $$(seq 0 99 | sed 's/^/5./')" ;\
+- kvers="$$kvers $$(seq 0 19 | sed 's/^/5./')" ;\
+- kvers="$$kvers $$(seq 0 20 | sed 's/^/6./')" ;\
- print=0 ;\
- for v in $$kvers ; do \
- if [ "$$print" = "1" ] ; then \
+
+Kconfig.versions: Kconfig.kernel
+ @kver=$$($(MAKE) --no-print-directory -C $(KLIB_BUILD) M=$(BACKPORT_DIR) \
-+ kernelversion | sed 's/^\(\([3-5]\|2\.6\)\.[0-9]\+\).*/\1/;t;d');\
++ kernelversion | sed 's/^\(\([3-6]\|2\.6\)\.[0-9]\+\).*/\1/;t;d');\
+ test "$$kver" != "" || echo "Kernel version parse failed!" ;\
+ test "$$kver" != "" ;\
-+ kvers="$$(seq 14 39 | sed 's/^/2.6./')" ;\
-+ kvers="$$kvers $$(seq 0 19 | sed 's/^/3./')" ;\
+ kvers="$$kvers $$(seq 0 20 | sed 's/^/4./')" ;\
-+ kvers="$$kvers $$(seq 0 99 | sed 's/^/5./')" ;\
++ kvers="$$kvers $$(seq 0 19 | sed 's/^/5./')" ;\
++ kvers="$$kvers $$(seq 0 20 | sed 's/^/6./')" ;\
+ print=0 ;\
+ for v in $$kvers ; do \
+ if [ "$$print" = "1" ] ; then \
--- a/local-symbols
+++ b/local-symbols
-@@ -470,43 +470,6 @@ USB_VL600=
+@@ -462,43 +462,6 @@ USB_VL600=
USB_NET_CH9200=
USB_NET_AQC111=
USB_RTL8153_ECM=
config B43_PHY_G
--- a/drivers/net/wireless/broadcom/b43/main.c
+++ b/drivers/net/wireless/broadcom/b43/main.c
-@@ -2853,7 +2853,7 @@ static struct ssb_device *b43_ssb_gpio_d
+@@ -2854,7 +2854,7 @@ static struct ssb_device *b43_ssb_gpio_d
{
struct ssb_bus *bus = dev->dev->sdev->bus;
return (bus->chipco.dev ? bus->chipco.dev : bus->pcicore.dev);
#else
return bus->chipco.dev;
-@@ -4871,7 +4871,7 @@ static int b43_wireless_core_init(struct
+@@ -4873,7 +4873,7 @@ static int b43_wireless_core_init(struct
}
if (sprom->boardflags_lo & B43_BFL_XTAL_NOSLOW)
hf |= B43_HF_DSCRQ; /* Disable slowclock requests from ucode. */
depends on CORDIC
--- a/Kconfig.local
+++ b/Kconfig.local
-@@ -1414,117 +1414,6 @@ config BACKPORTED_USB_NET_AQC111
+@@ -1390,117 +1390,6 @@ config BACKPORTED_USB_NET_AQC111
config BACKPORTED_USB_RTL8153_ECM
tristate
default USB_RTL8153_ECM
source "$BACKPORT_DIR/drivers/staging/Kconfig"
--- a/Makefile.kernel
+++ b/Makefile.kernel
-@@ -43,8 +43,6 @@ obj-$(CPTCFG_QRTR) += net/qrtr/
+@@ -42,8 +42,6 @@ obj-$(CPTCFG_QRTR) += net/qrtr/
obj-$(CPTCFG_QCOM_QMI_HELPERS) += drivers/soc/qcom/
obj-$(CPTCFG_MHI_BUS) += drivers/bus/mhi/
obj-$(CPTCFG_WLAN) += drivers/net/wireless/
+++ /dev/null
---- a/drivers/net/wireless/mac80211_hwsim.c
-+++ b/drivers/net/wireless/mac80211_hwsim.c
-@@ -5363,7 +5363,9 @@ static struct genl_family hwsim_genl_fam
- .module = THIS_MODULE,
- .small_ops = hwsim_ops,
- .n_small_ops = ARRAY_SIZE(hwsim_ops),
-+#if LINUX_VERSION_IS_GEQ(6,1,0)
- .resv_start_op = HWSIM_CMD_DEL_MAC_ADDR + 1,
-+#endif
- .mcgrps = hwsim_mcgrps,
- .n_mcgrps = ARRAY_SIZE(hwsim_mcgrps),
- };
---- a/net/wireless/nl80211.c
-+++ b/net/wireless/nl80211.c
-@@ -17233,7 +17233,9 @@ static struct genl_family nl80211_fam __
- .n_ops = ARRAY_SIZE(nl80211_ops),
- .small_ops = nl80211_small_ops,
- .n_small_ops = ARRAY_SIZE(nl80211_small_ops),
-+#if LINUX_VERSION_IS_GEQ(6,1,0)
- .resv_start_op = NL80211_CMD_REMOVE_LINK_STA + 1,
-+#endif
- .mcgrps = nl80211_mcgrps,
- .n_mcgrps = ARRAY_SIZE(nl80211_mcgrps),
- .parallel_ops = true,
source "$BACKPORT_DIR/drivers/net/usb/Kconfig"
--- a/Makefile.kernel
+++ b/Makefile.kernel
-@@ -39,9 +39,7 @@ obj-y += compat/
+@@ -38,9 +38,7 @@ obj-y += compat/
obj-$(CPTCFG_CFG80211) += net/wireless/
obj-$(CPTCFG_MAC80211) += net/mac80211/
--- a/local-symbols
+++ b/local-symbols
-@@ -65,14 +65,6 @@ MAC80211_MESH_PS_DEBUG=
+@@ -57,14 +57,6 @@ MAC80211_MESH_PS_DEBUG=
MAC80211_TDLS_DEBUG=
MAC80211_DEBUG_COUNTERS=
MAC80211_STA_HASH_MAX_SIZE=
+++ /dev/null
---- a/backport-include/linux/skbuff.h
-+++ b/backport-include/linux/skbuff.h
-@@ -144,4 +144,8 @@ static inline u64 skb_get_kcov_handle(st
- #define napi_build_skb build_skb
- #endif
-
-+#if LINUX_VERSION_IS_LESS(5,11,0)
-+#define napi_build_skb build_skb
-+#endif
-+
- #endif /* __BACKPORT_SKBUFF_H */
adapter->cmd_wait_q.status = -1;
--- a/drivers/net/wireless/marvell/mwifiex/uap_cmd.c
+++ b/drivers/net/wireless/marvell/mwifiex/uap_cmd.c
-@@ -794,7 +794,8 @@ int mwifiex_uap_prepare_cmd(struct mwifi
+@@ -802,7 +802,8 @@ int mwifiex_uap_prepare_cmd(struct mwifi
break;
default:
mwifiex_dbg(priv->adapter, ERROR,
--- a/local-symbols
+++ b/local-symbols
-@@ -347,6 +347,7 @@ RT2X00_LIB_FIRMWARE=
+@@ -339,6 +339,7 @@ RT2X00_LIB_FIRMWARE=
RT2X00_LIB_CRYPTO=
RT2X00_LIB_LEDS=
RT2X00_LIB_DEBUGFS=
DECLARE_KFIFO_PTR(txstatus_fifo, u32);
--- a/drivers/net/wireless/ralink/rt2x00/rt2x00dev.c
+++ b/drivers/net/wireless/ralink/rt2x00/rt2x00dev.c
-@@ -1419,6 +1419,10 @@ int rt2x00lib_probe_dev(struct rt2x00_de
+@@ -1423,6 +1423,10 @@ int rt2x00lib_probe_dev(struct rt2x00_de
INIT_DELAYED_WORK(&rt2x00dev->autowakeup_work, rt2x00lib_autowakeup);
INIT_WORK(&rt2x00dev->sleep_work, rt2x00lib_sleep);
/*
* Let the driver probe the device to detect the capabilities.
*/
-@@ -1559,6 +1563,11 @@ void rt2x00lib_remove_dev(struct rt2x00_
+@@ -1563,6 +1567,11 @@ void rt2x00lib_remove_dev(struct rt2x00_
* Free the driver data.
*/
kfree(rt2x00dev->drv_data);
#endif /* _RT2X00_PLATFORM_H */
--- a/drivers/net/wireless/ralink/rt2x00/rt2x00dev.c
+++ b/drivers/net/wireless/ralink/rt2x00/rt2x00dev.c
-@@ -1007,6 +1007,22 @@ static int rt2x00lib_probe_hw_modes(stru
+@@ -1008,6 +1008,22 @@ static int rt2x00lib_probe_hw_modes(stru
unsigned int num_rates;
unsigned int i;
--- a/drivers/net/wireless/ralink/rt2x00/rt2x00dev.c
+++ b/drivers/net/wireless/ralink/rt2x00/rt2x00dev.c
-@@ -989,6 +989,12 @@ static void rt2x00lib_rate(struct ieee80
+@@ -990,6 +990,12 @@ static void rt2x00lib_rate(struct ieee80
void rt2x00lib_set_mac_address(struct rt2x00_dev *rt2x00dev, u8 *eeprom_mac_addr)
{
--- a/drivers/net/wireless/ralink/rt2x00/rt2x00dev.c
+++ b/drivers/net/wireless/ralink/rt2x00/rt2x00dev.c
-@@ -1012,6 +1012,16 @@ static int rt2x00lib_probe_hw_modes(stru
+@@ -1013,6 +1013,16 @@ static int rt2x00lib_probe_hw_modes(stru
struct ieee80211_rate *rates;
unsigned int num_rates;
unsigned int i;
--- a/drivers/net/wireless/ralink/rt2x00/rt2x00dev.c
+++ b/drivers/net/wireless/ralink/rt2x00/rt2x00dev.c
-@@ -1358,7 +1358,7 @@ static inline void rt2x00lib_set_if_comb
+@@ -1362,7 +1362,7 @@ static inline void rt2x00lib_set_if_comb
*/
if_limit = &rt2x00dev->if_limits_ap;
if_limit->max = rt2x00dev->ops->max_ap_intf;
- }
}
- static void rt2800_config_alc_rt6352(struct rt2x00_dev *rt2x00dev,
-@@ -4457,89 +4449,63 @@ static void rt2800_config_channel(struct
+ static void rt2800_config_alc(struct rt2x00_dev *rt2x00dev,
+@@ -4438,89 +4430,63 @@ static void rt2800_config_channel(struct
usleep_range(1000, 1500);
}
}
bbp = rt2800_bbp_read(rt2x00dev, 4);
-@@ -5649,43 +5615,6 @@ void rt2800_vco_calibration(struct rt2x0
+@@ -5630,43 +5596,6 @@ void rt2800_vco_calibration(struct rt2x0
}
}
rt2800_register_write(rt2x00dev, TX_PIN_CFG, tx_pin);
}
EXPORT_SYMBOL_GPL(rt2800_vco_calibration);
-@@ -8650,7 +8579,7 @@ static void rt2800_r_calibration(struct
+@@ -8631,7 +8560,7 @@ static void rt2800_r_calibration(struct
rt2x00_warn(rt2x00dev, "Wait MAC Tx Status to MAX !!!\n");
maccfg = rt2800_register_read(rt2x00dev, MAC_SYS_CTRL);
rt2800_register_write(rt2x00dev, MAC_SYS_CTRL, maccfg);
if (unlikely(rt2800_wait_bbp_rf_ready(rt2x00dev, MAC_STATUS_CFG_BBP_RF_BUSY_RX)))
-@@ -10688,30 +10617,143 @@ static void rt2800_init_rfcsr_6352(struc
+@@ -10669,30 +10598,143 @@ static void rt2800_init_rfcsr_6352(struc
rt2800_rfcsr_write_dccal(rt2x00dev, 5, 0x00);
rt2800_rfcsr_write_dccal(rt2x00dev, 17, 0x7C);
}
}
}
-@@ -10804,6 +10846,10 @@ int rt2800_enable_radio(struct rt2x00_de
+@@ -10785,6 +10827,10 @@ int rt2800_enable_radio(struct rt2x00_de
rt2800_init_bbp(rt2x00dev);
rt2800_init_rfcsr(rt2x00dev);
--- a/net/mac80211/cfg.c
+++ b/net/mac80211/cfg.c
-@@ -1519,7 +1519,6 @@ static int ieee80211_stop_ap(struct wiph
+@@ -1523,7 +1523,6 @@ static int ieee80211_stop_ap(struct wiph
link_conf->bssid_indicator = 0;
__sta_info_flush(sdata, true);
--- a/net/mac80211/cfg.c
+++ b/net/mac80211/cfg.c
-@@ -2727,6 +2727,8 @@ static int ieee80211_scan(struct wiphy *
+@@ -2733,6 +2733,8 @@ static int ieee80211_scan(struct wiphy *
*/
fallthrough;
case NL80211_IFTYPE_AP:
--- a/net/mac80211/sta_info.c
+++ b/net/mac80211/sta_info.c
-@@ -554,6 +554,7 @@ __sta_info_alloc(struct ieee80211_sub_if
+@@ -557,6 +557,7 @@ __sta_info_alloc(struct ieee80211_sub_if
INIT_WORK(&sta->drv_deliver_wk, sta_deliver_ps_frames);
INIT_WORK(&sta->ampdu_mlme.work, ieee80211_ba_session_work);
mutex_init(&sta->ampdu_mlme.mtx);
--- a/net/mac80211/tx.c
+++ b/net/mac80211/tx.c
-@@ -3984,7 +3984,7 @@ struct ieee80211_txq *ieee80211_next_txq
+@@ -3992,7 +3992,7 @@ struct ieee80211_txq *ieee80211_next_txq
if (deficit < 0)
sta->airtime[txqi->txq.ac].deficit +=
if (deficit < 0 || !aql_check) {
list_move_tail(&txqi->schedule_order,
-@@ -4127,7 +4127,8 @@ bool ieee80211_txq_may_transmit(struct i
+@@ -4135,7 +4135,8 @@ bool ieee80211_txq_may_transmit(struct i
}
sta = container_of(iter->txq.sta, struct sta_info, sta);
if (ieee80211_sta_deficit(sta, ac) < 0)
list_move_tail(&iter->schedule_order, &local->active_txqs[ac]);
}
-@@ -4135,7 +4136,7 @@ bool ieee80211_txq_may_transmit(struct i
+@@ -4143,7 +4144,7 @@ bool ieee80211_txq_may_transmit(struct i
if (sta->airtime[ac].deficit >= 0)
goto out;
*
* Drivers can optionally delegate responsibility for scheduling queues to
* mac80211, to take advantage of airtime fairness accounting. In this case, to
-@@ -2248,8 +2249,8 @@ struct ieee80211_link_sta {
+@@ -2257,8 +2258,8 @@ struct ieee80211_link_sta {
* For non MLO STA it will point to the deflink data. For MLO STA
* ieee80211_sta_recalc_aggregates() must be called to update it.
* @support_p2p_ps: indicates whether the STA supports P2P PS mechanism or not.
* @deflink: This holds the default link STA information, for non MLO STA all link
* specific STA information is accessed through @deflink or through
* link[0] which points to address of @deflink. For MLO Link STA
-@@ -5687,7 +5688,7 @@ void ieee80211_key_replay(struct ieee802
+@@ -5700,7 +5701,7 @@ void ieee80211_key_replay(struct ieee802
* @hw: pointer as obtained from ieee80211_alloc_hw().
* @queue: queue number (counted from zero).
*
*/
void ieee80211_wake_queue(struct ieee80211_hw *hw, int queue);
-@@ -5696,7 +5697,7 @@ void ieee80211_wake_queue(struct ieee802
+@@ -5709,7 +5710,7 @@ void ieee80211_wake_queue(struct ieee802
* @hw: pointer as obtained from ieee80211_alloc_hw().
* @queue: queue number (counted from zero).
*
*/
void ieee80211_stop_queue(struct ieee80211_hw *hw, int queue);
-@@ -5705,7 +5706,7 @@ void ieee80211_stop_queue(struct ieee802
+@@ -5718,7 +5719,7 @@ void ieee80211_stop_queue(struct ieee802
* @hw: pointer as obtained from ieee80211_alloc_hw().
* @queue: queue number (counted from zero).
*
*
* Return: %true if the queue is stopped. %false otherwise.
*/
-@@ -5716,7 +5717,7 @@ int ieee80211_queue_stopped(struct ieee8
+@@ -5729,7 +5730,7 @@ int ieee80211_queue_stopped(struct ieee8
* ieee80211_stop_queues - stop all queues
* @hw: pointer as obtained from ieee80211_alloc_hw().
*
*/
void ieee80211_stop_queues(struct ieee80211_hw *hw);
-@@ -5724,7 +5725,7 @@ void ieee80211_stop_queues(struct ieee80
+@@ -5737,7 +5738,7 @@ void ieee80211_stop_queues(struct ieee80
* ieee80211_wake_queues - wake all queues
* @hw: pointer as obtained from ieee80211_alloc_hw().
*
*/
void ieee80211_wake_queues(struct ieee80211_hw *hw);
-@@ -6946,6 +6947,18 @@ static inline struct sk_buff *ieee80211_
+@@ -6960,6 +6961,18 @@ static inline struct sk_buff *ieee80211_
}
/**
.remove_interface = ar5523_remove_interface,
--- a/drivers/net/wireless/ath/ath11k/mac.c
+++ b/drivers/net/wireless/ath/ath11k/mac.c
-@@ -8587,6 +8587,7 @@ err_fallback:
+@@ -8592,6 +8592,7 @@ err_fallback:
static const struct ieee80211_ops ath11k_ops = {
.tx = ath11k_mac_op_tx,
.config = at76_config,
--- a/drivers/net/wireless/broadcom/b43/main.c
+++ b/drivers/net/wireless/broadcom/b43/main.c
-@@ -5171,6 +5171,7 @@ static int b43_op_get_survey(struct ieee
+@@ -5173,6 +5173,7 @@ static int b43_op_get_survey(struct ieee
static const struct ieee80211_ops b43_hw_ops = {
.tx = b43_op_tx,
.add_interface = rtl8187_add_interface,
--- a/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c
+++ b/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c
-@@ -6548,6 +6548,7 @@ static void rtl8xxxu_stop(struct ieee802
+@@ -6546,6 +6546,7 @@ static void rtl8xxxu_stop(struct ieee802
static const struct ieee80211_ops rtl8xxxu_ops = {
.tx = rtl8xxxu_tx,
.change_interface = rtl_op_change_interface,
--- a/drivers/net/wireless/realtek/rtw88/mac80211.c
+++ b/drivers/net/wireless/realtek/rtw88/mac80211.c
-@@ -896,6 +896,7 @@ static void rtw_ops_sta_rc_update(struct
+@@ -892,6 +892,7 @@ static void rtw_ops_sta_rc_update(struct
const struct ieee80211_ops rtw_ops = {
.tx = rtw_ops_tx,
.stop = rtw_ops_stop,
--- a/drivers/net/wireless/realtek/rtw89/mac80211.c
+++ b/drivers/net/wireless/realtek/rtw89/mac80211.c
-@@ -918,6 +918,7 @@ static int rtw89_ops_set_tid_config(stru
+@@ -916,6 +916,7 @@ static int rtw89_ops_set_tid_config(stru
const struct ieee80211_ops rtw89_ops = {
.tx = rtw89_ops_tx,
--- a/net/mac80211/cfg.c
+++ b/net/mac80211/cfg.c
-@@ -4346,9 +4346,6 @@ static int ieee80211_get_txq_stats(struc
+@@ -4357,9 +4357,6 @@ static int ieee80211_get_txq_stats(struc
struct ieee80211_sub_if_data *sdata;
int ret = 0;
NL80211_EXT_FEATURE_AQL))
--- a/net/mac80211/ieee80211_i.h
+++ b/net/mac80211/ieee80211_i.h
-@@ -2294,7 +2294,6 @@ void ieee80211_wake_queue_by_reason(stru
+@@ -2300,7 +2300,6 @@ void ieee80211_wake_queue_by_reason(stru
void ieee80211_stop_queue_by_reason(struct ieee80211_hw *hw, int queue,
enum queue_stop_reason reason,
bool refcounted);
ieee80211_roc_purge(local, sdata);
switch (sdata->vif.type) {
-@@ -813,13 +807,6 @@ static void ieee80211_uninit(struct net_
+@@ -813,25 +807,6 @@ static void ieee80211_uninit(struct net_
ieee80211_teardown_sdata(IEEE80211_DEV_TO_SUB_IF(dev));
}
+-#if LINUX_VERSION_IS_GEQ(5,2,0)
-static u16 ieee80211_netdev_select_queue(struct net_device *dev,
- struct sk_buff *skb,
- struct net_device *sb_dev)
+-#elif LINUX_VERSION_IS_GEQ(4,19,0)
+-static u16 ieee80211_netdev_select_queue(struct net_device *dev,
+- struct sk_buff *skb,
+- struct net_device *sb_dev,
+- select_queue_fallback_t fallback)
+-#else
+-static u16 ieee80211_netdev_select_queue(struct net_device *dev,
+- struct sk_buff *skb,
+- void *accel_priv,
+- select_queue_fallback_t fallback)
+-#endif
-{
- return ieee80211_select_queue(IEEE80211_DEV_TO_SUB_IF(dev), skb);
-}
static void
ieee80211_get_stats64(struct net_device *dev, struct rtnl_link_stats64 *stats)
{
-@@ -833,7 +820,6 @@ static const struct net_device_ops ieee8
+@@ -845,7 +820,6 @@ static const struct net_device_ops ieee8
.ndo_start_xmit = ieee80211_subif_start_xmit,
.ndo_set_rx_mode = ieee80211_set_multicast_list,
.ndo_set_mac_address = ieee80211_change_mac,
.ndo_get_stats64 = ieee80211_get_stats64,
};
-@@ -941,7 +927,6 @@ static const struct net_device_ops ieee8
+@@ -967,7 +941,6 @@ static const struct net_device_ops ieee8
.ndo_start_xmit = ieee80211_subif_start_xmit_8023,
.ndo_set_rx_mode = ieee80211_set_multicast_list,
.ndo_set_mac_address = ieee80211_change_mac,
- .ndo_select_queue = ieee80211_netdev_select_queue,
.ndo_get_stats64 = ieee80211_get_stats64,
+ #if LINUX_VERSION_IS_GEQ(5,13,0)
.ndo_fill_forward_path = ieee80211_netdev_fill_forward_path,
- };
-@@ -1443,35 +1428,6 @@ int ieee80211_do_open(struct wireless_de
+@@ -1471,35 +1444,6 @@ int ieee80211_do_open(struct wireless_de
ieee80211_recalc_ps(local);
set_bit(SDATA_STATE_RUNNING, &sdata->state);
return 0;
-@@ -1501,17 +1457,12 @@ static void ieee80211_if_setup(struct ne
+@@ -1529,17 +1473,12 @@ static void ieee80211_if_setup(struct ne
{
ether_setup(dev);
dev->priv_flags &= ~IFF_TX_SKB_SHARING;
static void ieee80211_iface_process_skb(struct ieee80211_local *local,
struct ieee80211_sub_if_data *sdata,
struct sk_buff *skb)
-@@ -2096,9 +2047,7 @@ int ieee80211_if_add(struct ieee80211_lo
+@@ -2124,9 +2063,7 @@ int ieee80211_if_add(struct ieee80211_lo
struct net_device *ndev = NULL;
struct ieee80211_sub_if_data *sdata = NULL;
struct txq_info *txqi;
ASSERT_RTNL();
-@@ -2121,30 +2070,18 @@ int ieee80211_if_add(struct ieee80211_lo
+@@ -2149,30 +2086,18 @@ int ieee80211_if_add(struct ieee80211_lo
sizeof(void *));
int txq_size = 0;
ndev->tstats = netdev_alloc_pcpu_stats(struct pcpu_sw_netstats);
--- a/net/mac80211/main.c
+++ b/net/mac80211/main.c
-@@ -630,7 +630,7 @@ struct ieee80211_hw *ieee80211_alloc_hw_
+@@ -627,7 +627,7 @@ struct ieee80211_hw *ieee80211_alloc_hw_
if (WARN_ON(!ops->tx || !ops->start || !ops->stop || !ops->config ||
!ops->add_interface || !ops->remove_interface ||
return NULL;
if (WARN_ON(ops->sta_state && (ops->sta_add || ops->sta_remove)))
-@@ -719,9 +719,7 @@ struct ieee80211_hw *ieee80211_alloc_hw_
+@@ -716,9 +716,7 @@ struct ieee80211_hw *ieee80211_alloc_hw_
if (!ops->set_key)
wiphy->flags |= WIPHY_FLAG_IBSS_RSN;
wiphy_ext_feature_set(wiphy, NL80211_EXT_FEATURE_RRM);
wiphy->bss_priv_size = sizeof(struct ieee80211_bss);
-@@ -834,10 +832,7 @@ struct ieee80211_hw *ieee80211_alloc_hw_
+@@ -831,10 +829,7 @@ struct ieee80211_hw *ieee80211_alloc_hw_
atomic_set(&local->agg_queue_stop[i], 0);
}
tasklet_setup(&local->tx_pending_tasklet, ieee80211_tx_pending);
skb_queue_head_init(&local->skb_queue);
--- a/net/mac80211/rx.c
+++ b/net/mac80211/rx.c
-@@ -1571,9 +1571,6 @@ static void sta_ps_start(struct sta_info
+@@ -1573,9 +1573,6 @@ static void sta_ps_start(struct sta_info
ieee80211_clear_fast_xmit(sta);
}
for (ac = 0; ac < IEEE80211_NUM_ACS; ac++) {
-@@ -425,8 +423,7 @@ void sta_info_free(struct ieee80211_loca
+@@ -428,8 +426,7 @@ void sta_info_free(struct ieee80211_loca
sta_dbg(sta->sdata, "Destroyed STA %pM\n", sta->sta.addr);
kfree(rcu_dereference_raw(sta->sta.rates));
#ifdef CPTCFG_MAC80211_MESH
kfree(sta->mesh);
-@@ -527,6 +524,8 @@ __sta_info_alloc(struct ieee80211_sub_if
+@@ -530,6 +527,8 @@ __sta_info_alloc(struct ieee80211_sub_if
struct ieee80211_local *local = sdata->local;
struct ieee80211_hw *hw = &local->hw;
struct sta_info *sta;
int i;
sta = kzalloc(sizeof(*sta) + hw->sta_data_size, gfp);
-@@ -597,21 +596,18 @@ __sta_info_alloc(struct ieee80211_sub_if
+@@ -600,21 +599,18 @@ __sta_info_alloc(struct ieee80211_sub_if
sta->last_connected = ktime_get_seconds();
}
if (sta_prepare_rate_control(local, sta, gfp))
-@@ -685,8 +681,7 @@ __sta_info_alloc(struct ieee80211_sub_if
+@@ -688,8 +684,7 @@ __sta_info_alloc(struct ieee80211_sub_if
return sta;
free_txq:
free:
sta_info_free_link(&sta->deflink);
#ifdef CPTCFG_MAC80211_MESH
-@@ -1960,9 +1955,6 @@ ieee80211_sta_ps_deliver_response(struct
+@@ -1965,9 +1960,6 @@ ieee80211_sta_ps_deliver_response(struct
* TIM recalculation.
*/
for (tid = 0; tid < ARRAY_SIZE(sta->sta.txq); tid++) {
if (!sta->sta.txq[tid] ||
!(driver_release_tids & BIT(tid)) ||
-@@ -2447,7 +2439,7 @@ static void sta_set_tidstats(struct sta_
+@@ -2452,7 +2444,7 @@ static void sta_set_tidstats(struct sta_
tidstats->tx_msdu_failed = sta->deflink.status_stats.msdu_failed[tid];
}
spin_lock_bh(&local->fq.lock);
rcu_read_lock();
-@@ -2775,9 +2767,6 @@ unsigned long ieee80211_sta_last_active(
+@@ -2780,9 +2772,6 @@ unsigned long ieee80211_sta_last_active(
static void sta_update_codel_params(struct sta_info *sta, u32 thr)
{
* Set the WLAN_TDLS_TEARDOWN flag to indicate a teardown in progress.
--- a/net/mac80211/tx.c
+++ b/net/mac80211/tx.c
-@@ -1600,9 +1600,6 @@ int ieee80211_txq_setup_flows(struct iee
+@@ -1606,9 +1606,6 @@ int ieee80211_txq_setup_flows(struct iee
bool supp_vht = false;
enum nl80211_band band;
ret = fq_init(fq, 4096);
if (ret)
return ret;
-@@ -1650,9 +1647,6 @@ void ieee80211_txq_teardown_flows(struct
+@@ -1656,9 +1653,6 @@ void ieee80211_txq_teardown_flows(struct
{
struct fq *fq = &local->fq;
kfree(local->cvars);
local->cvars = NULL;
-@@ -1669,8 +1663,7 @@ static bool ieee80211_queue_skb(struct i
+@@ -1675,8 +1669,7 @@ static bool ieee80211_queue_skb(struct i
struct ieee80211_vif *vif;
struct txq_info *txqi;
return false;
if (sdata->vif.type == NL80211_IFTYPE_AP_VLAN)
-@@ -4193,12 +4186,7 @@ void __ieee80211_subif_start_xmit(struct
+@@ -4201,12 +4194,7 @@ void __ieee80211_subif_start_xmit(struct
if (IS_ERR(sta))
sta = NULL;
ieee80211_aggr_check(sdata, sta, skb);
sk_pacing_shift_update(skb->sk, sdata->local->hw.tx_sk_pacing_shift);
-@@ -4509,11 +4497,7 @@ static void ieee80211_8023_xmit(struct i
+@@ -4517,11 +4505,7 @@ static void ieee80211_8023_xmit(struct i
struct tid_ampdu_tx *tid_tx;
u8 tid;
if (unlikely(test_bit(SCAN_SW_SCANNING, &local->scanning)) &&
test_bit(SDATA_STATE_OFFCHANNEL, &sdata->state))
-@@ -4767,9 +4751,6 @@ void ieee80211_tx_pending(struct tasklet
+@@ -4775,9 +4759,6 @@ void ieee80211_tx_pending(struct tasklet
if (!txok)
break;
}
}
spin_unlock_irqrestore(&local->queue_stop_reason_lock, flags);
-@@ -5962,10 +5943,9 @@ int ieee80211_tx_control_port(struct wip
+@@ -5970,10 +5951,9 @@ int ieee80211_tx_control_port(struct wip
}
if (!IS_ERR(sta)) {
--- a/drivers/net/wireless/realtek/rtw88/mac80211.c
+++ b/drivers/net/wireless/realtek/rtw88/mac80211.c
-@@ -896,7 +896,6 @@ static void rtw_ops_sta_rc_update(struct
+@@ -892,7 +892,6 @@ static void rtw_ops_sta_rc_update(struct
const struct ieee80211_ops rtw_ops = {
.tx = rtw_ops_tx,
.stop = rtw_ops_stop,
--- a/drivers/net/wireless/realtek/rtw89/mac80211.c
+++ b/drivers/net/wireless/realtek/rtw89/mac80211.c
-@@ -918,7 +918,6 @@ static int rtw89_ops_set_tid_config(stru
+@@ -916,7 +916,6 @@ static int rtw89_ops_set_tid_config(stru
const struct ieee80211_ops rtw89_ops = {
.tx = rtw89_ops_tx,
flow = fq_find_fattest_flow(fq);
--- a/include/net/mac80211.h
+++ b/include/net/mac80211.h
-@@ -1807,6 +1807,10 @@ struct ieee80211_vif_cfg {
+@@ -1816,6 +1816,10 @@ struct ieee80211_vif_cfg {
* @addr: address of this interface
* @p2p: indicates whether this AP or STA interface is a p2p
* interface, i.e. a GO or p2p-sta respectively
* @driver_flags: flags/capabilities the driver has for this interface,
* these need to be set (or cleared) when the interface is added
* or, if supported by the driver, the interface type is changed
-@@ -1846,6 +1850,7 @@ struct ieee80211_vif {
+@@ -1855,6 +1859,7 @@ struct ieee80211_vif {
struct ieee80211_txq *txq;
--- a/net/mac80211/iface.c
+++ b/net/mac80211/iface.c
-@@ -2181,6 +2181,7 @@ int ieee80211_if_add(struct ieee80211_lo
+@@ -2197,6 +2197,7 @@ int ieee80211_if_add(struct ieee80211_lo
ndev->priv_flags |= IFF_LIVE_ADDR_CHANGE;
ndev->hw_features |= ndev->features &
MAC80211_SUPPORTED_FEATURES_TX;
--- a/net/mac80211/tx.c
+++ b/net/mac80211/tx.c
-@@ -1356,7 +1356,11 @@ static struct txq_info *ieee80211_get_tx
+@@ -1362,7 +1362,11 @@ static struct txq_info *ieee80211_get_tx
static void ieee80211_set_skb_enqueue_time(struct sk_buff *skb)
{
}
static u32 codel_skb_len_func(const struct sk_buff *skb)
-@@ -3579,55 +3583,79 @@ ieee80211_xmit_fast_finish(struct ieee80
+@@ -3585,55 +3589,79 @@ ieee80211_xmit_fast_finish(struct ieee80
return TX_CONTINUE;
}
/* will not be crypto-handled beyond what we do here, so use false
* as the may-encrypt argument for the resize to not account for
-@@ -3636,10 +3664,8 @@ static bool ieee80211_xmit_fast(struct i
+@@ -3642,10 +3670,8 @@ static bool ieee80211_xmit_fast(struct i
if (unlikely(ieee80211_skb_resize(sdata, skb,
max_t(int, extra_head + hw_headroom -
skb_headroom(skb), 0),
memcpy(ð, skb->data, ETH_HLEN - 2);
hdr = skb_push(skb, extra_head);
-@@ -3653,7 +3679,7 @@ static bool ieee80211_xmit_fast(struct i
+@@ -3659,7 +3685,7 @@ static bool ieee80211_xmit_fast(struct i
info->control.vif = &sdata->vif;
info->flags = IEEE80211_TX_CTL_FIRST_FRAGMENT |
IEEE80211_TX_CTL_DONTFRAG |
info->control.flags = IEEE80211_TX_CTRL_FAST_XMIT |
u32_encode_bits(IEEE80211_LINK_UNSPECIFIED,
IEEE80211_TX_CTRL_MLO_LINK);
-@@ -3677,16 +3703,14 @@ static bool ieee80211_xmit_fast(struct i
+@@ -3683,16 +3709,14 @@ static bool ieee80211_xmit_fast(struct i
tx.key = fast_tx->key;
if (ieee80211_queue_skb(local, sdata, sta, skb))
if (sdata->vif.type == NL80211_IFTYPE_AP_VLAN)
sdata = container_of(sdata->bss,
-@@ -3694,6 +3718,56 @@ static bool ieee80211_xmit_fast(struct i
+@@ -3700,6 +3724,56 @@ static bool ieee80211_xmit_fast(struct i
__skb_queue_tail(&tx.skbs, skb);
ieee80211_tx_frags(local, &sdata->vif, sta, &tx.skbs, false);
return true;
}
-@@ -4201,31 +4275,14 @@ void __ieee80211_subif_start_xmit(struct
+@@ -4209,31 +4283,14 @@ void __ieee80211_subif_start_xmit(struct
goto out;
}
}
skb_list_walk_safe(skb, skb, next) {
-@@ -4443,9 +4500,11 @@ normal:
+@@ -4451,9 +4508,11 @@ normal:
return NETDEV_TX_OK;
}
{
struct ieee80211_local *local = sdata->local;
struct ieee80211_tx_control control = {};
-@@ -4454,14 +4513,6 @@ static bool ieee80211_tx_8023(struct iee
+@@ -4462,14 +4521,6 @@ static bool ieee80211_tx_8023(struct iee
unsigned long flags;
int q = info->hw_queue;
spin_lock_irqsave(&local->queue_stop_reason_lock, flags);
if (local->queue_stop_reasons[q] ||
-@@ -4488,6 +4539,26 @@ static bool ieee80211_tx_8023(struct iee
+@@ -4496,6 +4547,26 @@ static bool ieee80211_tx_8023(struct iee
return true;
}
static void ieee80211_8023_xmit(struct ieee80211_sub_if_data *sdata,
struct net_device *dev, struct sta_info *sta,
struct ieee80211_key *key, struct sk_buff *skb)
-@@ -4495,9 +4566,13 @@ static void ieee80211_8023_xmit(struct i
+@@ -4503,9 +4574,13 @@ static void ieee80211_8023_xmit(struct i
struct ieee80211_tx_info *info;
struct ieee80211_local *local = sdata->local;
struct tid_ampdu_tx *tid_tx;
if (unlikely(test_bit(SCAN_SW_SCANNING, &local->scanning)) &&
test_bit(SDATA_STATE_OFFCHANNEL, &sdata->state))
-@@ -4507,9 +4582,6 @@ static void ieee80211_8023_xmit(struct i
+@@ -4515,9 +4590,6 @@ static void ieee80211_8023_xmit(struct i
if (unlikely(!skb))
return;
ieee80211_aggr_check(sdata, sta, skb);
tid = skb->priority & IEEE80211_QOS_CTL_TAG1D_MASK;
-@@ -4523,22 +4595,20 @@ static void ieee80211_8023_xmit(struct i
+@@ -4531,22 +4603,20 @@ static void ieee80211_8023_xmit(struct i
return;
}
if (sdata->vif.type == NL80211_IFTYPE_AP_VLAN)
sdata = container_of(sdata->bss,
-@@ -4550,6 +4620,24 @@ static void ieee80211_8023_xmit(struct i
+@@ -4558,6 +4628,24 @@ static void ieee80211_8023_xmit(struct i
if (key)
info->control.hw_key = &key->conf;
ieee80211_tx_8023(sdata, skb, sta, false);
return;
-@@ -4591,6 +4679,7 @@ netdev_tx_t ieee80211_subif_start_xmit_8
+@@ -4599,6 +4687,7 @@ netdev_tx_t ieee80211_subif_start_xmit_8
key->conf.cipher == WLAN_CIPHER_SUITE_TKIP))
goto skip_offload;
--- a/net/mac80211/rx.c
+++ b/net/mac80211/rx.c
-@@ -2403,7 +2403,6 @@ static int ieee80211_802_1x_port_control
+@@ -2405,7 +2405,6 @@ static int ieee80211_802_1x_port_control
static int ieee80211_drop_unencrypted(struct ieee80211_rx_data *rx, __le16 fc)
{
struct sk_buff *skb = rx->skb;
struct ieee80211_rx_status *status = IEEE80211_SKB_RXCB(skb);
-@@ -2414,31 +2413,6 @@ static int ieee80211_drop_unencrypted(st
+@@ -2416,31 +2415,6 @@ static int ieee80211_drop_unencrypted(st
if (status->flag & RX_FLAG_DECRYPTED)
return 0;
/* Drop unencrypted frames if key is set. */
if (unlikely(!ieee80211_has_protected(fc) &&
!ieee80211_is_any_nullfunc(fc) &&
-@@ -2892,8 +2866,16 @@ ieee80211_rx_h_mesh_fwding(struct ieee80
+@@ -2898,8 +2872,16 @@ ieee80211_rx_h_mesh_fwding(struct ieee80
hdr = (struct ieee80211_hdr *) skb->data;
mesh_hdr = (struct ieee80211s_hdr *) (skb->data + hdrlen);
--- a/net/mac80211/ieee80211_i.h
+++ b/net/mac80211/ieee80211_i.h
-@@ -329,7 +329,6 @@ struct mesh_stats {
+@@ -333,7 +333,6 @@ struct mesh_stats {
__u32 fwded_frames; /* Mesh total forwarded frames */
__u32 dropped_frames_ttl; /* Not transmitted since mesh_ttl == 0*/
__u32 dropped_frames_no_route; /* Not transmitted, no route found */
#define PREQ_Q_F_START 0x1
--- a/net/mac80211/rx.c
+++ b/net/mac80211/rx.c
-@@ -2926,11 +2926,6 @@ ieee80211_rx_h_mesh_fwding(struct ieee80
+@@ -2932,11 +2932,6 @@ ieee80211_rx_h_mesh_fwding(struct ieee80
return RX_CONTINUE;
ac = ieee802_1d_to_ac[skb->priority];
struct rx_packet_hdr *rx_hdr;
--- a/include/net/cfg80211.h
+++ b/include/net/cfg80211.h
-@@ -6208,11 +6208,36 @@ static inline int ieee80211_data_to_8023
+@@ -6324,11 +6324,36 @@ static inline int ieee80211_data_to_8023
* @extra_headroom: The hardware extra headroom for SKBs in the @list.
* @check_da: DA to check in the inner ethernet header, or NULL
* @check_sa: SA to check in the inner ethernet header, or NULL
* cfg80211_classify8021d - determine the 802.1p/1d tag for a data frame
--- a/net/mac80211/rx.c
+++ b/net/mac80211/rx.c
-@@ -2720,6 +2720,174 @@ ieee80211_deliver_skb(struct ieee80211_r
+@@ -2726,6 +2726,174 @@ ieee80211_deliver_skb(struct ieee80211_r
}
}
static ieee80211_rx_result debug_noinline
__ieee80211_rx_h_amsdu(struct ieee80211_rx_data *rx, u8 data_offset)
{
-@@ -2728,8 +2896,10 @@ __ieee80211_rx_h_amsdu(struct ieee80211_
+@@ -2734,8 +2902,10 @@ __ieee80211_rx_h_amsdu(struct ieee80211_
struct ieee80211_hdr *hdr = (struct ieee80211_hdr *)skb->data;
__le16 fc = hdr->frame_control;
struct sk_buff_head frame_list;
if (unlikely(ieee80211_has_a4(hdr->frame_control))) {
check_da = NULL;
-@@ -2746,6 +2916,8 @@ __ieee80211_rx_h_amsdu(struct ieee80211_
+@@ -2752,6 +2922,8 @@ __ieee80211_rx_h_amsdu(struct ieee80211_
break;
case NL80211_IFTYPE_MESH_POINT:
check_sa = NULL;
break;
default:
break;
-@@ -2763,17 +2935,29 @@ __ieee80211_rx_h_amsdu(struct ieee80211_
+@@ -2769,17 +2941,29 @@ __ieee80211_rx_h_amsdu(struct ieee80211_
ieee80211_amsdu_to_8023s(skb, &frame_list, dev->dev_addr,
rx->sdata->vif.type,
rx->local->hw.extra_tx_headroom,
}
return RX_QUEUED;
-@@ -2806,6 +2990,8 @@ ieee80211_rx_h_amsdu(struct ieee80211_rx
+@@ -2812,6 +2996,8 @@ ieee80211_rx_h_amsdu(struct ieee80211_rx
if (!rx->sdata->u.mgd.use_4addr)
return RX_DROP_UNUSABLE;
break;
default:
return RX_DROP_UNUSABLE;
}
-@@ -2834,155 +3020,6 @@ ieee80211_rx_h_amsdu(struct ieee80211_rx
+@@ -2840,155 +3026,6 @@ ieee80211_rx_h_amsdu(struct ieee80211_rx
return __ieee80211_rx_h_amsdu(rx, 0);
}
static ieee80211_rx_result debug_noinline
ieee80211_rx_h_data(struct ieee80211_rx_data *rx)
{
-@@ -2991,6 +3028,7 @@ ieee80211_rx_h_data(struct ieee80211_rx_
+@@ -2997,6 +3034,7 @@ ieee80211_rx_h_data(struct ieee80211_rx_
struct net_device *dev = sdata->dev;
struct ieee80211_hdr *hdr = (struct ieee80211_hdr *)rx->skb->data;
__le16 fc = hdr->frame_control;
bool port_control;
int err;
-@@ -3017,6 +3055,10 @@ ieee80211_rx_h_data(struct ieee80211_rx_
+@@ -3023,6 +3061,10 @@ ieee80211_rx_h_data(struct ieee80211_rx_
if (unlikely(err))
return RX_DROP_UNUSABLE;
if (!ieee80211_frame_allowed(rx, fc))
return RX_DROP_MONITOR;
-@@ -3987,10 +4029,6 @@ static void ieee80211_rx_handlers(struct
+@@ -3997,10 +4039,6 @@ static void ieee80211_rx_handlers(struct
CALL_RXH(ieee80211_rx_h_defragment);
CALL_RXH(ieee80211_rx_h_michael_mic_verify);
/* must be after MMIC verify so header is counted in MPDU mic */
--- a/include/net/cfg80211.h
+++ b/include/net/cfg80211.h
-@@ -6194,6 +6194,19 @@ static inline int ieee80211_data_to_8023
+@@ -6310,6 +6310,19 @@ static inline int ieee80211_data_to_8023
}
/**
* Decode an IEEE 802.11 A-MSDU and convert it to a list of 802.3 frames.
--- a/net/mac80211/rx.c
+++ b/net/mac80211/rx.c
-@@ -2899,7 +2899,6 @@ __ieee80211_rx_h_amsdu(struct ieee80211_
+@@ -2905,7 +2905,6 @@ __ieee80211_rx_h_amsdu(struct ieee80211_
static ieee80211_rx_result res;
struct ethhdr ethhdr;
const u8 *check_da = ethhdr.h_dest, *check_sa = ethhdr.h_source;
if (unlikely(ieee80211_has_a4(hdr->frame_control))) {
check_da = NULL;
-@@ -2917,7 +2916,6 @@ __ieee80211_rx_h_amsdu(struct ieee80211_
+@@ -2923,7 +2922,6 @@ __ieee80211_rx_h_amsdu(struct ieee80211_
case NL80211_IFTYPE_MESH_POINT:
check_sa = NULL;
check_da = NULL;
break;
default:
break;
-@@ -2932,10 +2930,21 @@ __ieee80211_rx_h_amsdu(struct ieee80211_
+@@ -2938,10 +2936,21 @@ __ieee80211_rx_h_amsdu(struct ieee80211_
data_offset, true))
return RX_DROP_UNUSABLE;
rx->skb = __skb_dequeue(&frame_list);
--- a/net/mac80211/sta_info.c
+++ b/net/mac80211/sta_info.c
-@@ -591,6 +591,9 @@ __sta_info_alloc(struct ieee80211_sub_if
+@@ -594,6 +594,9 @@ __sta_info_alloc(struct ieee80211_sub_if
sta->sta_state = IEEE80211_STA_NONE;
--- a/net/mac80211/ieee80211_i.h
+++ b/net/mac80211/ieee80211_i.h
-@@ -696,7 +696,7 @@ struct ieee80211_if_mesh {
+@@ -700,7 +700,7 @@ struct ieee80211_if_mesh {
struct mesh_stats mshstats;
struct mesh_config mshcfg;
atomic_t estab_plinks;
/* Maximum number of broadcast/multicast frames to buffer when some of the
* associated stations are using power saving. */
-@@ -656,6 +657,19 @@ struct mesh_table {
+@@ -660,6 +661,19 @@ struct mesh_table {
atomic_t entries; /* Up to MAX_MESH_NEIGHBOURS */
};
struct ieee80211_if_mesh {
struct timer_list housekeeping_timer;
struct timer_list mesh_path_timer;
-@@ -734,6 +748,7 @@ struct ieee80211_if_mesh {
+@@ -738,6 +752,7 @@ struct ieee80211_if_mesh {
struct mesh_table mpp_paths; /* Store paths for MPP&MAP */
int mesh_paths_generation;
int mpp_paths_generation;
};
#ifdef CPTCFG_MAC80211_MESH
-@@ -2002,6 +2017,11 @@ int ieee80211_tx_control_port(struct wip
+@@ -2007,6 +2022,11 @@ int ieee80211_tx_control_port(struct wip
int link_id, u64 *cookie);
int ieee80211_probe_mesh_link(struct wiphy *wiphy, struct net_device *dev,
const u8 *buf, size_t len);
mesh_path_free_rcu(tbl, mpath);
}
-@@ -747,6 +1026,7 @@ void mesh_path_fix_nexthop(struct mesh_p
+@@ -760,6 +1039,7 @@ void mesh_path_fix_nexthop(struct mesh_p
mpath->exp_time = 0;
mpath->flags = MESH_PATH_FIXED | MESH_PATH_SN_VALID;
mesh_path_activate(mpath);
spin_unlock_bh(&mpath->state_lock);
ewma_mesh_fail_avg_init(&next_hop->mesh->fail_avg);
/* init it at a low value - 0 start is tricky */
-@@ -758,6 +1038,7 @@ void mesh_pathtbl_init(struct ieee80211_
+@@ -771,6 +1051,7 @@ void mesh_pathtbl_init(struct ieee80211_
{
mesh_table_init(&sdata->u.mesh.mesh_paths);
mesh_table_init(&sdata->u.mesh.mpp_paths);
}
static
-@@ -785,6 +1066,7 @@ void mesh_path_expire(struct ieee80211_s
+@@ -798,6 +1079,7 @@ void mesh_path_expire(struct ieee80211_s
void mesh_pathtbl_unregister(struct ieee80211_sub_if_data *sdata)
{
}
--- a/net/mac80211/rx.c
+++ b/net/mac80211/rx.c
-@@ -2791,6 +2791,7 @@ ieee80211_rx_mesh_data(struct ieee80211_
+@@ -2797,6 +2797,7 @@ ieee80211_rx_mesh_data(struct ieee80211_
if (mesh_hdr->flags & MESH_FLAGS_AE) {
struct mesh_path *mppath;
char *proxied_addr;
if (multicast)
proxied_addr = mesh_hdr->eaddr1;
-@@ -2806,11 +2807,18 @@ ieee80211_rx_mesh_data(struct ieee80211_
+@@ -2812,11 +2813,18 @@ ieee80211_rx_mesh_data(struct ieee80211_
mpp_path_add(sdata, proxied_addr, eth->h_source);
} else {
spin_lock_bh(&mppath->state_lock);
--- a/net/mac80211/tx.c
+++ b/net/mac80211/tx.c
-@@ -3022,6 +3022,9 @@ void ieee80211_check_fast_xmit(struct st
+@@ -3028,6 +3028,9 @@ void ieee80211_check_fast_xmit(struct st
if (!ieee80211_hw_check(&local->hw, SUPPORT_FAST_XMIT))
return;
/* Locking here protects both the pointer itself, and against concurrent
* invocations winning data access races to, e.g., the key pointer that
* is used.
-@@ -3403,6 +3406,9 @@ static bool ieee80211_amsdu_aggregate(st
+@@ -3409,6 +3412,9 @@ static bool ieee80211_amsdu_aggregate(st
if (sdata->vif.offload_flags & IEEE80211_OFFLOAD_ENCAP_ENABLED)
return false;
if (skb_is_gso(skb))
return false;
-@@ -3635,10 +3641,11 @@ free:
+@@ -3641,10 +3647,11 @@ free:
return NULL;
}
{
struct ieee80211_local *local = sdata->local;
struct ieee80211_hdr *hdr = (void *)fast_tx->hdr;
-@@ -3647,7 +3654,6 @@ static void __ieee80211_xmit_fast(struct
+@@ -3653,7 +3660,6 @@ static void __ieee80211_xmit_fast(struct
ieee80211_tx_result r;
int hw_headroom = sdata->local->hw.extra_tx_headroom;
int extra_head = fast_tx->hdr_len - (ETH_HLEN - 2);
skb = skb_share_check(skb, GFP_ATOMIC);
if (unlikely(!skb))
-@@ -3667,11 +3673,10 @@ static void __ieee80211_xmit_fast(struct
+@@ -3673,11 +3679,10 @@ static void __ieee80211_xmit_fast(struct
ENCRYPT_NO)))
goto free;
info = IEEE80211_SKB_CB(skb);
memset(info, 0, sizeof(*info));
-@@ -3690,7 +3695,8 @@ static void __ieee80211_xmit_fast(struct
+@@ -3696,7 +3701,8 @@ static void __ieee80211_xmit_fast(struct
#endif
if (hdr->frame_control & cpu_to_le16(IEEE80211_STYPE_QOS_DATA)) {
*ieee80211_get_qos_ctl(hdr) = tid;
}
-@@ -3733,6 +3739,7 @@ static bool ieee80211_xmit_fast(struct i
+@@ -3739,6 +3745,7 @@ static bool ieee80211_xmit_fast(struct i
struct ieee80211_hdr *hdr = (void *)fast_tx->hdr;
struct tid_ampdu_tx *tid_tx = NULL;
struct sk_buff *next;
u8 tid = IEEE80211_NUM_TIDS;
/* control port protocol needs a lot of special handling */
-@@ -3758,6 +3765,8 @@ static bool ieee80211_xmit_fast(struct i
+@@ -3764,6 +3771,8 @@ static bool ieee80211_xmit_fast(struct i
}
}
/* after this point (skb is modified) we cannot return false */
skb = ieee80211_tx_skb_fixup(skb, ieee80211_sdata_netdev_features(sdata));
if (!skb)
-@@ -3765,7 +3774,8 @@ static bool ieee80211_xmit_fast(struct i
+@@ -3771,7 +3780,8 @@ static bool ieee80211_xmit_fast(struct i
skb_list_walk_safe(skb, skb, next) {
skb_mark_not_on_list(skb);
}
return true;
-@@ -4252,8 +4262,15 @@ void __ieee80211_subif_start_xmit(struct
+@@ -4260,8 +4270,15 @@ void __ieee80211_subif_start_xmit(struct
return;
}
if (ieee80211_lookup_ra_sta(sdata, skb, &sta))
goto out_free;
-@@ -4263,8 +4280,6 @@ void __ieee80211_subif_start_xmit(struct
+@@ -4271,8 +4288,6 @@ void __ieee80211_subif_start_xmit(struct
skb_set_queue_mapping(skb, ieee80211_select_queue(sdata, sta, skb));
ieee80211_aggr_check(sdata, sta, skb);
--- a/net/mac80211/rx.c
+++ b/net/mac80211/rx.c
-@@ -2720,6 +2720,65 @@ ieee80211_deliver_skb(struct ieee80211_r
+@@ -2726,6 +2726,65 @@ ieee80211_deliver_skb(struct ieee80211_r
}
}
static ieee80211_rx_result
ieee80211_rx_mesh_data(struct ieee80211_sub_if_data *sdata, struct sta_info *sta,
struct sk_buff *skb)
-@@ -2824,6 +2883,10 @@ ieee80211_rx_mesh_data(struct ieee80211_
+@@ -2830,6 +2889,10 @@ ieee80211_rx_mesh_data(struct ieee80211_
skb_set_queue_mapping(skb, ieee802_1d_to_ac[skb->priority]);
ieee80211_fill_mesh_addresses(&hdr, &hdr.frame_control,
eth->h_dest, eth->h_source);
hdrlen = ieee80211_hdrlen(hdr.frame_control);
-@@ -2862,6 +2925,7 @@ ieee80211_rx_mesh_data(struct ieee80211_
+@@ -2868,6 +2931,7 @@ ieee80211_rx_mesh_data(struct ieee80211_
info->control.flags |= IEEE80211_TX_INTCFL_NEED_TXPROCESSING;
info->control.vif = &sdata->vif;
info->control.jiffies = jiffies;
if (multicast) {
IEEE80211_IFSTA_MESH_CTR_INC(ifmsh, fwded_mcast);
memcpy(fwd_hdr->addr2, sdata->vif.addr, ETH_ALEN);
-@@ -2883,7 +2947,6 @@ ieee80211_rx_mesh_data(struct ieee80211_
+@@ -2889,7 +2953,6 @@ ieee80211_rx_mesh_data(struct ieee80211_
}
IEEE80211_IFSTA_MESH_CTR_INC(ifmsh, fwded_frames);
rx_accept:
--- a/net/mac80211/ieee80211_i.h
+++ b/net/mac80211/ieee80211_i.h
-@@ -2022,6 +2022,8 @@ void __ieee80211_xmit_fast(struct ieee80
+@@ -2027,6 +2027,8 @@ void __ieee80211_xmit_fast(struct ieee80
struct ieee80211_fast_tx *fast_tx,
struct sk_buff *skb, bool ampdu,
const u8 *da, const u8 *sa);
void ieee80211_apply_htcap_overrides(struct ieee80211_sub_if_data *sdata,
--- a/net/mac80211/tx.c
+++ b/net/mac80211/tx.c
-@@ -1191,10 +1191,8 @@ static bool ieee80211_tx_prep_agg(struct
+@@ -1197,10 +1197,8 @@ static bool ieee80211_tx_prep_agg(struct
return queued;
}
--- a/net/mac80211/rx.c
+++ b/net/mac80211/rx.c
-@@ -2904,6 +2904,9 @@ ieee80211_rx_mesh_data(struct ieee80211_
+@@ -2910,6 +2910,9 @@ ieee80211_rx_mesh_data(struct ieee80211_
if (skb_cow_head(fwd_skb, hdrlen - sizeof(struct ethhdr)))
return RX_DROP_UNUSABLE;
}
fwd_hdr = skb_push(fwd_skb, hdrlen - sizeof(struct ethhdr));
-@@ -2918,7 +2921,7 @@ ieee80211_rx_mesh_data(struct ieee80211_
+@@ -2924,7 +2927,7 @@ ieee80211_rx_mesh_data(struct ieee80211_
hdrlen += ETH_ALEN;
else
fwd_skb->protocol = htons(fwd_skb->len - hdrlen);
--- a/net/mac80211/rx.c
+++ b/net/mac80211/rx.c
-@@ -2824,17 +2824,6 @@ ieee80211_rx_mesh_data(struct ieee80211_
+@@ -2830,17 +2830,6 @@ ieee80211_rx_mesh_data(struct ieee80211_
mesh_rmc_check(sdata, eth->h_source, mesh_hdr))
return RX_DROP_MONITOR;
/* forward packet */
if (sdata->crypto_tx_tailroom_needed_cnt)
tailroom = IEEE80211_ENCRYPT_TAILROOM;
-@@ -2881,6 +2870,17 @@ ieee80211_rx_mesh_data(struct ieee80211_
+@@ -2887,6 +2876,17 @@ ieee80211_rx_mesh_data(struct ieee80211_
rcu_read_unlock();
}
/**
--- a/net/mac80211/cfg.c
+++ b/net/mac80211/cfg.c
-@@ -1252,6 +1252,21 @@ static int ieee80211_start_ap(struct wip
+@@ -1255,6 +1255,21 @@ static int ieee80211_start_ap(struct wip
prev_beacon_int = link_conf->beacon_int;
link_conf->beacon_int = params->beacon_interval;
/**
--- a/net/mac80211/cfg.c
+++ b/net/mac80211/cfg.c
-@@ -1281,6 +1281,21 @@ static int ieee80211_start_ap(struct wip
+@@ -1284,6 +1284,21 @@ static int ieee80211_start_ap(struct wip
changed |= BSS_CHANGED_HE_BSS_COLOR;
}
--- a/include/net/mac80211.h
+++ b/include/net/mac80211.h
-@@ -5964,6 +5964,18 @@ void ieee80211_queue_delayed_work(struct
+@@ -5977,6 +5977,18 @@ void ieee80211_queue_delayed_work(struct
unsigned long delay);
/**
--- a/net/mac80211/rx.c
+++ b/net/mac80211/rx.c
-@@ -4564,6 +4564,12 @@ void ieee80211_check_fast_rx(struct sta_
+@@ -4580,6 +4580,12 @@ void ieee80211_check_fast_rx(struct sta_
}
break;
default:
goto clear;
}
-@@ -4772,6 +4778,7 @@ static bool ieee80211_invoke_fast_rx(str
+@@ -4788,6 +4794,7 @@ static bool ieee80211_invoke_fast_rx(str
struct sk_buff *skb = rx->skb;
struct ieee80211_hdr *hdr = (void *)skb->data;
struct ieee80211_rx_status *status = IEEE80211_SKB_RXCB(skb);
int orig_len = skb->len;
int hdrlen = ieee80211_hdrlen(hdr->frame_control);
int snap_offs = hdrlen;
-@@ -4833,7 +4840,8 @@ static bool ieee80211_invoke_fast_rx(str
+@@ -4849,7 +4856,8 @@ static bool ieee80211_invoke_fast_rx(str
snap_offs += IEEE80211_CCMP_HDR_LEN;
}
if (!pskb_may_pull(skb, snap_offs + sizeof(*payload)))
return false;
-@@ -4872,13 +4880,29 @@ static bool ieee80211_invoke_fast_rx(str
+@@ -4888,13 +4896,29 @@ static bool ieee80211_invoke_fast_rx(str
/* do the header conversion - first grab the addresses */
ether_addr_copy(addrs.da, skb->data + fast_rx->da_offs);
ether_addr_copy(addrs.sa, skb->data + fast_rx->sa_offs);
--- a/include/net/mac80211.h
+++ b/include/net/mac80211.h
-@@ -4192,6 +4192,10 @@ struct ieee80211_prep_tx_info {
+@@ -4201,6 +4201,10 @@ struct ieee80211_prep_tx_info {
* Note that a sta can also be inserted or removed with valid links,
* i.e. passed to @sta_add/@sta_state with sta->valid_links not zero.
* In fact, cannot change from having valid_links and not having them.
*/
struct ieee80211_ops {
void (*tx)(struct ieee80211_hw *hw,
-@@ -4547,6 +4551,11 @@ struct ieee80211_ops {
+@@ -4556,6 +4560,11 @@ struct ieee80211_ops {
struct ieee80211_vif *vif,
struct ieee80211_sta *sta,
u16 old_links, u16 new_links);
u16 old_links, u16 new_links,
--- a/net/mac80211/ieee80211_i.h
+++ b/net/mac80211/ieee80211_i.h
-@@ -1939,7 +1939,8 @@ void ieee80211_color_collision_detection
+@@ -1944,7 +1944,8 @@ void ieee80211_color_collision_detection
/* interface handling */
#define MAC80211_SUPPORTED_FEATURES_TX (NETIF_F_IP_CSUM | NETIF_F_IPV6_CSUM | \
NETIF_F_HW_CSUM | NETIF_F_SG | \
+ .ndo_setup_tc = ieee80211_netdev_setup_tc,
};
- static u16 ieee80211_monitor_select_queue(struct net_device *dev,
-@@ -929,6 +945,7 @@ static const struct net_device_ops ieee8
- .ndo_set_mac_address = ieee80211_change_mac,
- .ndo_get_stats64 = ieee80211_get_stats64,
+ #if LINUX_VERSION_IS_GEQ(5,2,0)
+@@ -945,6 +961,7 @@ static const struct net_device_ops ieee8
+ #if LINUX_VERSION_IS_GEQ(5,13,0)
.ndo_fill_forward_path = ieee80211_netdev_fill_forward_path,
+ #endif
+ .ndo_setup_tc = ieee80211_netdev_setup_tc,
};
--- a/net/mac80211/rx.c
+++ b/net/mac80211/rx.c
-@@ -2828,14 +2828,6 @@ ieee80211_rx_mesh_data(struct ieee80211_
+@@ -2834,14 +2834,6 @@ ieee80211_rx_mesh_data(struct ieee80211_
if (sdata->crypto_tx_tailroom_needed_cnt)
tailroom = IEEE80211_ENCRYPT_TAILROOM;
if (mesh_hdr->flags & MESH_FLAGS_AE) {
struct mesh_path *mppath;
char *proxied_addr;
-@@ -2874,6 +2866,14 @@ ieee80211_rx_mesh_data(struct ieee80211_
+@@ -2880,6 +2872,14 @@ ieee80211_rx_mesh_data(struct ieee80211_
if (ether_addr_equal(sdata->vif.addr, eth->h_dest))
goto rx_accept;
--- a/drivers/net/wireless/intel/iwlwifi/mvm/tx.c
+++ b/drivers/net/wireless/intel/iwlwifi/mvm/tx.c
-@@ -601,8 +601,9 @@ static void iwl_mvm_skb_prepare_status(s
+@@ -605,8 +605,9 @@ static void iwl_mvm_skb_prepare_status(s
static int iwl_mvm_get_ctrl_vif_queue(struct iwl_mvm *mvm,
struct ieee80211_tx_info *info,
struct iwl_mvm_vif *mvmvif =
iwl_mvm_vif_from_mac80211(info->control.vif);
__le16 fc = hdr->frame_control;
-@@ -621,7 +622,7 @@ static int iwl_mvm_get_ctrl_vif_queue(st
+@@ -625,7 +626,7 @@ static int iwl_mvm_get_ctrl_vif_queue(st
* reason 7 ("Class 3 frame received from nonassociated STA").
*/
if (ieee80211_is_mgmt(fc) &&
ieee80211_is_deauth(fc) || ieee80211_is_disassoc(fc)))
return mvm->probe_queue;
-@@ -740,7 +741,7 @@ int iwl_mvm_tx_skb_non_sta(struct iwl_mv
+@@ -744,7 +745,7 @@ int iwl_mvm_tx_skb_non_sta(struct iwl_mv
else
sta_id = mvmvif->mcast_sta.sta_id;
* ieee80211_is_first_frag - check if IEEE80211_SCTL_FRAG is not set
* @seq_ctrl: frame sequence control bytes in little-endian byteorder
*/
-@@ -4121,6 +4107,44 @@ static inline u8 *ieee80211_get_DA(struc
+@@ -4123,6 +4109,44 @@ static inline u8 *ieee80211_get_DA(struc
}
/**
info->flags |= IEEE80211_TX_CTL_NO_PS_BUFFER;
return TX_CONTINUE;
}
-@@ -1326,7 +1326,7 @@ static struct txq_info *ieee80211_get_tx
+@@ -1332,7 +1332,7 @@ static struct txq_info *ieee80211_get_tx
if (!(info->flags & IEEE80211_TX_CTL_HW_80211_ENCAP) &&
unlikely(!ieee80211_is_data_present(hdr->frame_control))) {
if ((!ieee80211_is_mgmt(hdr->frame_control) ||
--- a/net/mac80211/sta_info.c
+++ b/net/mac80211/sta_info.c
-@@ -1271,6 +1271,14 @@ static void __sta_info_destroy_part2(str
+@@ -1276,6 +1276,14 @@ static void __sta_info_destroy_part2(str
WARN_ON_ONCE(ret);
}
--- a/drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c
+++ b/drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c
-@@ -4854,9 +4854,6 @@ static void iwl_mvm_mac_flush(struct iee
+@@ -4844,9 +4844,6 @@ static void iwl_mvm_mac_flush(struct iee
return;
}
/* Make sure we're done with the deferred traffic before flushing */
flush_work(&mvm->add_stream_wk);
-@@ -4874,9 +4871,6 @@ static void iwl_mvm_mac_flush(struct iee
+@@ -4864,9 +4861,6 @@ static void iwl_mvm_mac_flush(struct iee
if (mvmsta->vif != vif)
continue;
--- a/include/net/mac80211.h
+++ b/include/net/mac80211.h
-@@ -3918,6 +3918,10 @@ struct ieee80211_prep_tx_info {
+@@ -3927,6 +3927,10 @@ struct ieee80211_prep_tx_info {
* Note that vif can be NULL.
* The callback can sleep.
*
* @channel_switch: Drivers that need (or want) to offload the channel
* switch operation for CSAs received from the AP may implement this
* callback. They must then call ieee80211_chswitch_done() to indicate
-@@ -4372,6 +4376,8 @@ struct ieee80211_ops {
+@@ -4381,6 +4385,8 @@ struct ieee80211_ops {
#endif
void (*flush)(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
u32 queues, bool drop);
struct ieee80211_channel_switch *ch_switch)
--- a/net/mac80211/sta_info.c
+++ b/net/mac80211/sta_info.c
-@@ -1276,8 +1276,12 @@ static void __sta_info_destroy_part2(str
+@@ -1281,8 +1281,12 @@ static void __sta_info_destroy_part2(str
* frames sitting on hardware queues might be sent out without
* any encryption at all.
*/
--- a/drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c
+++ b/drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c
-@@ -4890,6 +4890,31 @@ static void iwl_mvm_mac_flush(struct iee
+@@ -4880,6 +4880,31 @@ static void iwl_mvm_mac_flush(struct iee
iwl_trans_wait_tx_queues_empty(mvm->trans, msk);
}
static int iwl_mvm_mac_get_survey(struct ieee80211_hw *hw, int idx,
struct survey_info *survey)
{
-@@ -5417,6 +5442,7 @@ const struct ieee80211_ops iwl_mvm_hw_op
+@@ -5407,6 +5432,7 @@ const struct ieee80211_ops iwl_mvm_hw_op
.mgd_complete_tx = iwl_mvm_mac_mgd_complete_tx,
.mgd_protect_tdls_discover = iwl_mvm_mac_mgd_protect_tdls_discover,
.flush = iwl_mvm_mac_flush,
bool vht_mu_beamformer;
--- a/net/mac80211/cfg.c
+++ b/net/mac80211/cfg.c
-@@ -1252,7 +1252,15 @@ static int ieee80211_start_ap(struct wip
+@@ -1255,7 +1255,15 @@ static int ieee80211_start_ap(struct wip
prev_beacon_int = link_conf->beacon_int;
link_conf->beacon_int = params->beacon_interval;
link_conf->vht_su_beamformer =
params->vht_cap->vht_cap_info &
cpu_to_le32(IEEE80211_VHT_CAP_SU_BEAMFORMER_CAPABLE);
-@@ -1282,6 +1290,9 @@ static int ieee80211_start_ap(struct wip
+@@ -1285,6 +1293,9 @@ static int ieee80211_start_ap(struct wip
}
if (params->he_cap) {
--- a/include/net/mac80211.h
+++ b/include/net/mac80211.h
-@@ -5252,6 +5252,74 @@ ieee80211_beacon_get_template(struct iee
+@@ -5265,6 +5265,74 @@ ieee80211_beacon_get_template(struct iee
unsigned int link_id);
/**
* @vif: &struct ieee80211_vif pointer from the add_interface callback.
--- a/net/mac80211/cfg.c
+++ b/net/mac80211/cfg.c
-@@ -1122,11 +1122,11 @@ static int ieee80211_assign_beacon(struc
+@@ -1125,11 +1125,11 @@ static int ieee80211_assign_beacon(struc
if (params->mbssid_ies) {
mbssid = params->mbssid_ies;
size += struct_size(new->mbssid_ies, elem, mbssid->cnt);
}
new = kzalloc(size, GFP_KERNEL);
-@@ -3384,8 +3384,11 @@ cfg80211_beacon_dup(struct cfg80211_beac
+@@ -3394,8 +3394,11 @@ cfg80211_beacon_dup(struct cfg80211_beac
len = beacon->head_len + beacon->tail_len + beacon->beacon_ies_len +
beacon->proberesp_ies_len + beacon->assocresp_ies_len +
if (!new_beacon)
--- a/net/mac80211/ieee80211_i.h
+++ b/net/mac80211/ieee80211_i.h
-@@ -1182,13 +1182,17 @@ ieee80211_vif_get_shift(struct ieee80211
+@@ -1186,13 +1186,17 @@ ieee80211_vif_get_shift(struct ieee80211
}
static inline int
--- a/net/mac80211/tx.c
+++ b/net/mac80211/tx.c
-@@ -5205,13 +5205,20 @@ ieee80211_beacon_get_finish(struct ieee8
+@@ -5213,13 +5213,20 @@ ieee80211_beacon_get_finish(struct ieee8
}
static void
for (i = 0; i < beacon->mbssid_ies->cnt; i++)
skb_put_data(skb, beacon->mbssid_ies->elem[i].data,
beacon->mbssid_ies->elem[i].len);
-@@ -5224,7 +5231,8 @@ ieee80211_beacon_get_ap(struct ieee80211
+@@ -5232,7 +5239,8 @@ ieee80211_beacon_get_ap(struct ieee80211
struct ieee80211_mutable_offsets *offs,
bool is_template,
struct beacon_data *beacon,
{
struct ieee80211_local *local = hw_to_local(hw);
struct ieee80211_sub_if_data *sdata = vif_to_sdata(vif);
-@@ -5243,7 +5251,9 @@ ieee80211_beacon_get_ap(struct ieee80211
+@@ -5251,7 +5259,9 @@ ieee80211_beacon_get_ap(struct ieee80211
/* headroom, head length,
* tail length, maximum TIM length and multiple BSSID length
*/
skb = dev_alloc_skb(local->tx_headroom + beacon->head_len +
beacon->tail_len + 256 +
local->hw.extra_beacon_tailroom + mbssid_len);
-@@ -5261,7 +5271,7 @@ ieee80211_beacon_get_ap(struct ieee80211
+@@ -5269,7 +5279,7 @@ ieee80211_beacon_get_ap(struct ieee80211
offs->cntdwn_counter_offs[0] = beacon->cntdwn_counter_offsets[0];
if (mbssid_len) {
offs->mbssid_off = skb->len - mbssid_len;
}
-@@ -5280,12 +5290,51 @@ ieee80211_beacon_get_ap(struct ieee80211
+@@ -5288,12 +5298,51 @@ ieee80211_beacon_get_ap(struct ieee80211
return skb;
}
{
struct ieee80211_local *local = hw_to_local(hw);
struct beacon_data *beacon = NULL;
-@@ -5314,8 +5363,29 @@ __ieee80211_beacon_get(struct ieee80211_
+@@ -5322,8 +5371,29 @@ __ieee80211_beacon_get(struct ieee80211_
if (!beacon)
goto out;
} else if (sdata->vif.type == NL80211_IFTYPE_ADHOC) {
struct ieee80211_if_ibss *ifibss = &sdata->u.ibss;
struct ieee80211_hdr *hdr;
-@@ -5403,10 +5473,50 @@ ieee80211_beacon_get_template(struct iee
+@@ -5411,10 +5481,50 @@ ieee80211_beacon_get_template(struct iee
struct ieee80211_mutable_offsets *offs,
unsigned int link_id)
{
struct sk_buff *ieee80211_beacon_get_tim(struct ieee80211_hw *hw,
struct ieee80211_vif *vif,
u16 *tim_offset, u16 *tim_length,
-@@ -5414,7 +5524,9 @@ struct sk_buff *ieee80211_beacon_get_tim
+@@ -5422,7 +5532,9 @@ struct sk_buff *ieee80211_beacon_get_tim
{
struct ieee80211_mutable_offsets offs = {};
struct sk_buff *bcn = __ieee80211_beacon_get(hw, vif, &offs, false,
+++ /dev/null
-From: Felix Fietkau <nbd@nbd.name>
-Date: Wed, 3 Jan 2024 15:10:18 +0100
-Subject: [PATCH] wifi: mac80211: fix race condition on enabling fast-xmit
-
-fast-xmit must only be enabled after the sta has been uploaded to the driver,
-otherwise it could end up passing the not-yet-uploaded sta via drv_tx calls
-to the driver, leading to potential crashes because of uninitialized drv_priv
-data.
-Add a missing sta->uploaded check and re-check fast xmit after inserting a sta.
-
-Signed-off-by: Felix Fietkau <nbd@nbd.name>
----
-
---- a/net/mac80211/sta_info.c
-+++ b/net/mac80211/sta_info.c
-@@ -886,6 +886,7 @@ static int sta_info_insert_finish(struct
-
- if (ieee80211_vif_is_mesh(&sdata->vif))
- mesh_accept_plinks_update(sdata);
-+ ieee80211_check_fast_xmit(sta);
-
- return 0;
- out_remove:
---- a/net/mac80211/tx.c
-+++ b/net/mac80211/tx.c
-@@ -3041,7 +3041,7 @@ void ieee80211_check_fast_xmit(struct st
- sdata->vif.type == NL80211_IFTYPE_STATION)
- goto out;
-
-- if (!test_sta_flag(sta, WLAN_STA_AUTHORIZED))
-+ if (!test_sta_flag(sta, WLAN_STA_AUTHORIZED) || !sta->uploaded)
- goto out;
-
- if (test_sta_flag(sta, WLAN_STA_PS_STA) ||
{
--- a/net/wireless/core.h
+++ b/net/wireless/core.h
-@@ -477,6 +477,8 @@ void cfg80211_set_dfs_state(struct wiphy
+@@ -491,6 +491,8 @@ void cfg80211_set_dfs_state(struct wiphy
enum nl80211_dfs_state dfs_state);
void cfg80211_dfs_channels_update_work(struct work_struct *work);
cfg80211_chandef_dfs_cac_time(struct wiphy *wiphy,
--- a/net/wireless/mlme.c
+++ b/net/wireless/mlme.c
-@@ -891,6 +891,8 @@ void cfg80211_dfs_channels_update_work(s
+@@ -904,6 +904,8 @@ void cfg80211_dfs_channels_update_work(s
if (c->dfs_state == NL80211_DFS_UNAVAILABLE) {
time_dfs_update = IEEE80211_DFS_MIN_NOP_TIME_MS;
radar_event = NL80211_RADAR_NOP_FINISHED;
} else {
if (regulatory_pre_cac_allowed(wiphy) ||
cfg80211_any_wiphy_oper_chan(wiphy, c))
-@@ -898,11 +900,10 @@ void cfg80211_dfs_channels_update_work(s
+@@ -911,11 +913,10 @@ void cfg80211_dfs_channels_update_work(s
time_dfs_update = REG_PRE_CAC_EXPIRY_GRACE_MS;
radar_event = NL80211_RADAR_PRE_CAC_EXPIRED;
--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c
-@@ -6005,7 +6005,7 @@ done:
+@@ -6010,7 +6010,7 @@ done:
brcmf_dbg(CONN, "Report roaming result\n");
if (profile->use_fwsup == BRCMF_PROFILE_FWSUP_1X && profile->is_ft) {
--- a/include/net/cfg80211.h
+++ b/include/net/cfg80211.h
-@@ -7720,6 +7720,8 @@ void cfg80211_roamed(struct net_device *
+@@ -7836,6 +7836,8 @@ void cfg80211_roamed(struct net_device *
*
* @dev: network device
* @bssid: the BSSID of the AP
* @gfp: allocation flags
*
* This function should be called by a driver that supports 4 way handshake
-@@ -7730,7 +7732,7 @@ void cfg80211_roamed(struct net_device *
+@@ -7846,7 +7848,7 @@ void cfg80211_roamed(struct net_device *
* indicate the 802.11 association.
*/
void cfg80211_port_authorized(struct net_device *dev, const u8 *bssid,
--- a/net/wireless/core.h
+++ b/net/wireless/core.h
-@@ -271,6 +271,8 @@ struct cfg80211_event {
+@@ -277,6 +277,8 @@ struct cfg80211_event {
} ij;
struct {
u8 bssid[ETH_ALEN];
} pa;
};
};
-@@ -409,7 +411,8 @@ int cfg80211_disconnect(struct cfg80211_
+@@ -421,7 +423,8 @@ int cfg80211_disconnect(struct cfg80211_
bool wextev);
void __cfg80211_roamed(struct wireless_dev *wdev,
struct cfg80211_roam_info *info);
void cfg80211_autodisconnect_wk(struct work_struct *work);
--- a/net/wireless/nl80211.c
+++ b/net/wireless/nl80211.c
-@@ -17936,7 +17936,8 @@ void nl80211_send_roamed(struct cfg80211
+@@ -17993,7 +17993,8 @@ void nl80211_send_roamed(struct cfg80211
}
void nl80211_send_port_authorized(struct cfg80211_registered_device *rdev,
{
struct sk_buff *msg;
void *hdr;
-@@ -17956,6 +17957,11 @@ void nl80211_send_port_authorized(struct
+@@ -18013,6 +18014,11 @@ void nl80211_send_port_authorized(struct
nla_put(msg, NL80211_ATTR_MAC, ETH_ALEN, bssid))
goto nla_put_failure;
--- a/include/net/mac80211.h
+++ b/include/net/mac80211.h
-@@ -1468,6 +1468,7 @@ enum mac80211_rx_encoding {
+@@ -1477,6 +1477,7 @@ enum mac80211_rx_encoding {
RX_ENC_HT,
RX_ENC_VHT,
RX_ENC_HE,
};
/**
-@@ -1501,7 +1502,7 @@ enum mac80211_rx_encoding {
+@@ -1510,7 +1511,7 @@ enum mac80211_rx_encoding {
* @antenna: antenna used
* @rate_idx: index of data rate into band's supported rates or MCS index if
* HT or VHT is used (%RX_FLAG_HT/%RX_FLAG_VHT)
* @flag: %RX_FLAG_\*
* @encoding: &enum mac80211_rx_encoding
* @bw: &enum rate_info_bw
-@@ -1509,6 +1510,8 @@ enum mac80211_rx_encoding {
+@@ -1518,6 +1519,8 @@ enum mac80211_rx_encoding {
* @he_ru: HE RU, from &enum nl80211_he_ru_alloc
* @he_gi: HE GI, from &enum nl80211_he_gi
* @he_dcm: HE DCM value
* @rx_flags: internal RX flags for mac80211
* @ampdu_reference: A-MPDU reference number, must be a different value for
* each A-MPDU but the same for each subframe within one A-MPDU
-@@ -1530,8 +1533,18 @@ struct ieee80211_rx_status {
+@@ -1539,8 +1542,18 @@ struct ieee80211_rx_status {
u32 flag;
u16 freq: 13, freq_offset: 1;
u8 enc_flags;
u8 rx_flags;
--- a/net/mac80211/rx.c
+++ b/net/mac80211/rx.c
-@@ -5328,6 +5328,15 @@ void ieee80211_rx_list(struct ieee80211_
+@@ -5358,6 +5358,15 @@ void ieee80211_rx_list(struct ieee80211_
status->rate_idx, status->nss))
goto drop;
break;
*/
#include <linux/module.h>
-@@ -2385,6 +2385,13 @@ static void sta_stats_decode_rate(struct
+@@ -2389,6 +2389,13 @@ static void sta_stats_decode_rate(struct
rinfo->he_ru_alloc = STA_STATS_GET(HE_RU, rate);
rinfo->he_dcm = STA_STATS_GET(HE_DCM, rate);
break;
return STA_STATS_RATE_INVALID;
--- a/net/mac80211/util.c
+++ b/net/mac80211/util.c
-@@ -3900,6 +3900,19 @@ u64 ieee80211_calculate_rx_timestamp(str
+@@ -3898,6 +3898,19 @@ u64 ieee80211_calculate_rx_timestamp(str
/* Fill cfg80211 rate info */
switch (status->encoding) {
bool mu_mimo_owner;
--- a/net/mac80211/cfg.c
+++ b/net/mac80211/cfg.c
-@@ -4184,7 +4184,7 @@ static int ieee80211_set_ap_chanwidth(st
+@@ -4195,7 +4195,7 @@ static int ieee80211_set_ap_chanwidth(st
struct ieee80211_sub_if_data *sdata = IEEE80211_DEV_TO_SUB_IF(dev);
struct ieee80211_link_data *link;
int ret;
--- a/net/mac80211/chan.c
+++ b/net/mac80211/chan.c
-@@ -1916,7 +1916,7 @@ int ieee80211_link_use_reserved_context(
+@@ -1935,7 +1935,7 @@ int ieee80211_link_use_reserved_context(
int ieee80211_link_change_bandwidth(struct ieee80211_link_data *link,
const struct cfg80211_chan_def *chandef,
struct ieee80211_bss_conf *link_conf = link->conf;
--- a/net/mac80211/ieee80211_i.h
+++ b/net/mac80211/ieee80211_i.h
-@@ -2491,7 +2491,7 @@ int ieee80211_link_unreserve_chanctx(str
+@@ -2497,7 +2497,7 @@ int ieee80211_link_unreserve_chanctx(str
int __must_check
ieee80211_link_change_bandwidth(struct ieee80211_link_data *link,
const struct cfg80211_chan_def *chandef,
{
struct ieee80211_sub_if_data *sdata = link->sdata;
struct ieee80211_local *local = sdata->local;
-@@ -4111,6 +4246,7 @@ static bool ieee80211_assoc_config_link(
+@@ -4140,6 +4275,7 @@ static bool ieee80211_assoc_config_link(
link_sta);
bss_conf->eht_support = link_sta->pub->eht_cap.has_eht;
} else {
bss_conf->eht_support = false;
}
-@@ -5423,6 +5559,45 @@ static bool ieee80211_rx_our_beacon(cons
+@@ -5452,6 +5588,45 @@ static bool ieee80211_rx_our_beacon(cons
return ether_addr_equal(tx_bssid, bss->transmitted_bss->bssid);
}
static void ieee80211_rx_mgmt_beacon(struct ieee80211_link_data *link,
struct ieee80211_hdr *hdr, size_t len,
struct ieee80211_rx_status *rx_status)
-@@ -5439,7 +5614,7 @@ static void ieee80211_rx_mgmt_beacon(str
+@@ -5468,7 +5643,7 @@ static void ieee80211_rx_mgmt_beacon(str
struct ieee80211_channel *chan;
struct link_sta_info *link_sta;
struct sta_info *sta;
bool erp_valid;
u8 erp_value = 0;
u32 ncrc = 0;
-@@ -5731,6 +5906,21 @@ static void ieee80211_rx_mgmt_beacon(str
+@@ -5761,6 +5936,21 @@ static void ieee80211_rx_mgmt_beacon(str
elems->pwr_constr_elem,
elems->cisco_dtpc_elem);
ieee80211_link_info_change_notify(sdata, link, changed);
free:
kfree(elems);
-@@ -6832,9 +7022,12 @@ ieee80211_setup_assoc_link(struct ieee80
+@@ -6862,9 +7052,12 @@ ieee80211_setup_assoc_link(struct ieee80
ieee80211_apply_htcap_overrides(sdata, &sta_ht_cap);
}
const struct element *elem;
u8 dtim_count = 0;
-@@ -6863,6 +7056,31 @@ ieee80211_setup_assoc_link(struct ieee80
+@@ -6893,6 +7086,31 @@ ieee80211_setup_assoc_link(struct ieee80
link->conf->ema_ap = true;
else
link->conf->ema_ap = false;
--- a/include/net/cfg80211.h
+++ b/include/net/cfg80211.h
-@@ -8951,4 +8951,16 @@ static inline int cfg80211_color_change_
+@@ -9067,4 +9067,16 @@ static inline int cfg80211_color_change_
0, 0);
}
break;
link->u.mgd.conn_flags |=
ieee80211_chandef_downgrade(chandef);
-@@ -5584,8 +5523,8 @@ static bool ieee80211_config_puncturing(
+@@ -5613,8 +5552,8 @@ static bool ieee80211_config_puncturing(
extracted == link->conf->eht_puncturing)
return true;
link_info(link,
"Got an invalid disable subchannel bitmap from AP %pM: bitmap = 0x%x, bw = 0x%x. disconnect\n",
link->u.mgd.bssid,
-@@ -7072,8 +7011,8 @@ ieee80211_setup_assoc_link(struct ieee80
+@@ -7102,8 +7041,8 @@ ieee80211_setup_assoc_link(struct ieee80
u16 bitmap;
bitmap = get_unaligned_le16(disable_subchannel_bitmap);
--- a/include/net/cfg80211.h
+++ b/include/net/cfg80211.h
-@@ -1330,6 +1330,9 @@ struct cfg80211_unsol_bcast_probe_resp {
+@@ -1333,6 +1333,9 @@ struct cfg80211_unsol_bcast_probe_resp {
* @fils_discovery: FILS discovery transmission parameters
* @unsol_bcast_probe_resp: Unsolicited broadcast probe response parameters
* @mbssid_config: AP settings for multiple bssid
*/
struct cfg80211_ap_settings {
struct cfg80211_chan_def chandef;
-@@ -1364,6 +1367,7 @@ struct cfg80211_ap_settings {
+@@ -1367,6 +1370,7 @@ struct cfg80211_ap_settings {
struct cfg80211_fils_discovery fils_discovery;
struct cfg80211_unsol_bcast_probe_resp unsol_bcast_probe_resp;
struct cfg80211_mbssid_config mbssid_config;
};
/**
-@@ -1381,6 +1385,9 @@ struct cfg80211_ap_settings {
+@@ -1384,6 +1388,9 @@ struct cfg80211_ap_settings {
* @radar_required: whether radar detection is required on the new channel
* @block_tx: whether transmissions should be blocked while changing
* @count: number of beacons until switch
*/
struct cfg80211_csa_settings {
struct cfg80211_chan_def chandef;
-@@ -1393,6 +1400,7 @@ struct cfg80211_csa_settings {
+@@ -1396,6 +1403,7 @@ struct cfg80211_csa_settings {
bool radar_required;
bool block_tx;
u8 count;
NUM_NL80211_EXT_FEATURES,
--- a/net/wireless/nl80211.c
+++ b/net/wireless/nl80211.c
-@@ -799,6 +799,7 @@ static const struct nla_policy nl80211_p
+@@ -819,6 +819,7 @@ static const struct nla_policy nl80211_p
[NL80211_ATTR_MLD_ADDR] = NLA_POLICY_EXACT_LEN(ETH_ALEN),
[NL80211_ATTR_MLO_SUPPORT] = { .type = NLA_FLAG },
[NL80211_ATTR_MAX_NUM_AKM_SUITES] = { .type = NLA_REJECT },
};
/* policy for the key attributes */
-@@ -3167,6 +3168,21 @@ static bool nl80211_can_set_dev_channel(
+@@ -3187,6 +3188,21 @@ static bool nl80211_can_set_dev_channel(
wdev->iftype == NL80211_IFTYPE_P2P_GO;
}
int nl80211_parse_chandef(struct cfg80211_registered_device *rdev,
struct genl_info *info,
struct cfg80211_chan_def *chandef)
-@@ -5912,6 +5928,14 @@ static int nl80211_start_ap(struct sk_bu
+@@ -5938,6 +5954,14 @@ static int nl80211_start_ap(struct sk_bu
goto out;
}
if (!cfg80211_reg_can_beacon_relax(&rdev->wiphy, ¶ms->chandef,
wdev->iftype)) {
err = -EINVAL;
-@@ -10050,6 +10074,14 @@ skip_beacons:
+@@ -10076,6 +10100,14 @@ skip_beacons:
if (info->attrs[NL80211_ATTR_CH_SWITCH_BLOCK_TX])
params.block_tx = true;
--- a/include/net/cfg80211.h
+++ b/include/net/cfg80211.h
-@@ -8325,13 +8325,14 @@ bool cfg80211_reg_can_beacon_relax(struc
+@@ -8441,13 +8441,14 @@ bool cfg80211_reg_can_beacon_relax(struc
* @dev: the device which switched channels
* @chandef: the new channel definition
* @link_id: the link ID for MLO, must be 0 for non-MLO
/*
* cfg80211_ch_switch_started_notify - notify channel switch start
-@@ -8340,6 +8341,7 @@ void cfg80211_ch_switch_notify(struct ne
+@@ -8456,6 +8457,7 @@ void cfg80211_ch_switch_notify(struct ne
* @link_id: the link ID for MLO, must be 0 for non-MLO
* @count: the number of TBTTs until the channel switch happens
* @quiet: whether or not immediate quiet was requested by the AP
*
* Inform the userspace about the channel switch that has just
* started, so that it can take appropriate actions (eg. starting
-@@ -8348,7 +8350,7 @@ void cfg80211_ch_switch_notify(struct ne
+@@ -8464,7 +8466,7 @@ void cfg80211_ch_switch_notify(struct ne
void cfg80211_ch_switch_started_notify(struct net_device *dev,
struct cfg80211_chan_def *chandef,
unsigned int link_id, u8 count,
* ieee80211_operating_class_to_band - convert operating class to band
--- a/net/mac80211/cfg.c
+++ b/net/mac80211/cfg.c
-@@ -3600,7 +3600,8 @@ static int __ieee80211_csa_finalize(stru
+@@ -3610,7 +3610,8 @@ static int __ieee80211_csa_finalize(stru
if (err)
return err;
return 0;
}
-@@ -3872,7 +3873,7 @@ __ieee80211_channel_switch(struct wiphy
+@@ -3882,7 +3883,7 @@ __ieee80211_channel_switch(struct wiphy
cfg80211_ch_switch_started_notify(sdata->dev,
&sdata->deflink.csa_chandef, 0,
ieee80211_link_info_change_notify(sdata, &sdata->deflink,
--- a/net/mac80211/mlme.c
+++ b/net/mac80211/mlme.c
-@@ -1778,7 +1778,7 @@ static void ieee80211_chswitch_post_beac
+@@ -1784,7 +1784,7 @@ static void ieee80211_chswitch_post_beac
return;
}
}
void ieee80211_chswitch_done(struct ieee80211_vif *vif, bool success)
-@@ -1988,7 +1988,7 @@ ieee80211_sta_process_chanswitch(struct
+@@ -1994,7 +1994,7 @@ ieee80211_sta_process_chanswitch(struct
mutex_unlock(&local->mtx);
cfg80211_ch_switch_started_notify(sdata->dev, &csa_ie.chandef, 0,
/* use driver's channel switch callback */
--- a/net/wireless/nl80211.c
+++ b/net/wireless/nl80211.c
-@@ -18973,7 +18973,7 @@ static void nl80211_ch_switch_notify(str
+@@ -19054,7 +19054,7 @@ static void nl80211_ch_switch_notify(str
struct cfg80211_chan_def *chandef,
gfp_t gfp,
enum nl80211_commands notif,
{
struct wireless_dev *wdev = netdev->ieee80211_ptr;
struct sk_buff *msg;
-@@ -19007,6 +19007,9 @@ static void nl80211_ch_switch_notify(str
+@@ -19088,6 +19088,9 @@ static void nl80211_ch_switch_notify(str
goto nla_put_failure;
}
genlmsg_end(msg, hdr);
genlmsg_multicast_netns(&nl80211_fam, wiphy_net(&rdev->wiphy), msg, 0,
-@@ -19019,7 +19022,7 @@ static void nl80211_ch_switch_notify(str
+@@ -19100,7 +19103,7 @@ static void nl80211_ch_switch_notify(str
void cfg80211_ch_switch_notify(struct net_device *dev,
struct cfg80211_chan_def *chandef,
{
struct wireless_dev *wdev = dev->ieee80211_ptr;
struct wiphy *wiphy = wdev->wiphy;
-@@ -19028,7 +19031,7 @@ void cfg80211_ch_switch_notify(struct ne
+@@ -19109,7 +19112,7 @@ void cfg80211_ch_switch_notify(struct ne
ASSERT_WDEV_LOCK(wdev);
WARN_INVALID_LINK_ID(wdev, link_id);
switch (wdev->iftype) {
case NL80211_IFTYPE_STATION:
-@@ -19056,14 +19059,15 @@ void cfg80211_ch_switch_notify(struct ne
+@@ -19137,14 +19140,15 @@ void cfg80211_ch_switch_notify(struct ne
cfg80211_sched_dfs_chan_update(rdev);
nl80211_ch_switch_notify(rdev, dev, link_id, chandef, GFP_KERNEL,
{
struct wireless_dev *wdev = dev->ieee80211_ptr;
struct wiphy *wiphy = wdev->wiphy;
-@@ -19072,11 +19076,13 @@ void cfg80211_ch_switch_started_notify(s
+@@ -19153,11 +19157,13 @@ void cfg80211_ch_switch_started_notify(s
ASSERT_WDEV_LOCK(wdev);
WARN_INVALID_LINK_ID(wdev, link_id);
--- a/net/mac80211/cfg.c
+++ b/net/mac80211/cfg.c
-@@ -1220,7 +1220,7 @@ static int ieee80211_start_ap(struct wip
+@@ -1223,7 +1223,7 @@ static int ieee80211_start_ap(struct wip
struct ieee80211_local *local = sdata->local;
struct beacon_data *old;
struct ieee80211_sub_if_data *vlan;
BSS_CHANGED_BEACON_ENABLED |
BSS_CHANGED_BEACON |
BSS_CHANGED_P2P_PS |
-@@ -1307,6 +1307,11 @@ static int ieee80211_start_ap(struct wip
+@@ -1310,6 +1310,11 @@ static int ieee80211_start_ap(struct wip
IEEE80211_HE_PHY_CAP2_UL_MU_FULL_MU_MIMO;
}
if (sdata->vif.type == NL80211_IFTYPE_AP &&
params->mbssid_config.tx_wdev) {
err = ieee80211_set_ap_mbssid_options(sdata,
-@@ -3559,6 +3564,12 @@ static int __ieee80211_csa_finalize(stru
+@@ -3569,6 +3574,12 @@ static int __ieee80211_csa_finalize(stru
lockdep_assert_held(&local->mtx);
lockdep_assert_held(&local->chanctx_mtx);
/*
* using reservation isn't immediate as it may be deferred until later
* with multi-vif. once reservation is complete it will re-schedule the
-@@ -3601,7 +3612,7 @@ static int __ieee80211_csa_finalize(stru
+@@ -3611,7 +3622,7 @@ static int __ieee80211_csa_finalize(stru
return err;
cfg80211_ch_switch_notify(sdata->dev, &sdata->deflink.csa_chandef, 0,
return 0;
}
-@@ -3863,9 +3874,13 @@ __ieee80211_channel_switch(struct wiphy
+@@ -3873,9 +3884,13 @@ __ieee80211_channel_switch(struct wiphy
goto out;
}
if (sdata->deflink.csa_block_tx)
ieee80211_stop_vif_queues(local, sdata,
-@@ -3873,7 +3888,8 @@ __ieee80211_channel_switch(struct wiphy
+@@ -3883,7 +3898,8 @@ __ieee80211_channel_switch(struct wiphy
cfg80211_ch_switch_started_notify(sdata->dev,
&sdata->deflink.csa_chandef, 0,
/**
--- a/net/mac80211/cfg.c
+++ b/net/mac80211/cfg.c
-@@ -1310,6 +1310,22 @@ static int ieee80211_start_ap(struct wip
+@@ -1313,6 +1313,22 @@ static int ieee80211_start_ap(struct wip
if (params->eht_cap) {
link_conf->eht_puncturing = params->punct_bitmap;
changed |= BSS_CHANGED_EHT_PUNCTURING;
--- a/net/mac80211/mlme.c
+++ b/net/mac80211/mlme.c
-@@ -3233,7 +3233,7 @@ static void ieee80211_mgd_probe_ap(struc
+@@ -3239,7 +3239,7 @@ static void ieee80211_mgd_probe_ap(struc
struct ieee80211_if_managed *ifmgd = &sdata->u.mgd;
bool already = false;
--- a/include/net/mac80211.h
+++ b/include/net/mac80211.h
-@@ -1927,6 +1927,27 @@ struct ieee80211_vif {
+@@ -1936,6 +1936,27 @@ struct ieee80211_vif {
u8 drv_priv[] __aligned(sizeof(void *));
};
##__VA_ARGS__); \
--- a/net/mac80211/ieee80211_i.h
+++ b/net/mac80211/ieee80211_i.h
-@@ -1596,7 +1596,7 @@ ieee80211_get_sband(struct ieee80211_sub
+@@ -1600,7 +1600,7 @@ ieee80211_get_sband(struct ieee80211_sub
struct ieee80211_chanctx_conf *chanctx_conf;
enum nl80211_band band;
"destroying interface with valid links 0x%04x\n",
sdata->vif.valid_links);
-@@ -1818,7 +1818,7 @@ static int ieee80211_runtime_change_ifty
+@@ -1834,7 +1834,7 @@ static int ieee80211_runtime_change_ifty
return -EBUSY;
/* for now, don't support changing while links exist */
/* nothing to do */
--- a/net/mac80211/mlme.c
+++ b/net/mac80211/mlme.c
-@@ -1281,7 +1281,7 @@ static void ieee80211_assoc_add_ml_elem(
+@@ -1287,7 +1287,7 @@ static void ieee80211_assoc_add_ml_elem(
u8 *ml_elem_len;
void *capab_pos;
return;
ift_ext_capa = cfg80211_get_iftype_ext_capa(local->hw.wiphy,
-@@ -1455,7 +1455,7 @@ static int ieee80211_send_assoc(struct i
+@@ -1461,7 +1461,7 @@ static int ieee80211_send_assoc(struct i
capab |= WLAN_CAPABILITY_PRIVACY;
}
/* consider the multi-link element with STA profile */
size += sizeof(struct ieee80211_multi_link_elem);
/* max common info field in basic multi-link element */
-@@ -1786,7 +1786,7 @@ void ieee80211_chswitch_done(struct ieee
+@@ -1792,7 +1792,7 @@ void ieee80211_chswitch_done(struct ieee
struct ieee80211_sub_if_data *sdata = vif_to_sdata(vif);
struct ieee80211_if_managed *ifmgd = &sdata->u.mgd;
success = false;
trace_api_chswitch_done(sdata, success);
-@@ -2849,7 +2849,7 @@ static void ieee80211_set_associated(str
+@@ -2855,7 +2855,7 @@ static void ieee80211_set_associated(str
if (vif_cfg->arp_addr_cnt)
vif_changed |= BSS_CHANGED_ARP_FILTER;
for (link_id = 0;
link_id < IEEE80211_MLD_MAX_NUM_LINKS;
link_id++) {
-@@ -2880,7 +2880,7 @@ static void ieee80211_set_associated(str
+@@ -2886,7 +2886,7 @@ static void ieee80211_set_associated(str
mutex_unlock(&local->iflist_mtx);
/* leave this here to not change ordering in non-MLO cases */
ieee80211_recalc_smps(sdata, &sdata->deflink);
ieee80211_recalc_ps_vif(sdata);
-@@ -2976,7 +2976,7 @@ static void ieee80211_set_disassoc(struc
+@@ -2982,7 +2982,7 @@ static void ieee80211_set_disassoc(struc
sta_info_flush(sdata);
/* finally reset all BSS / config parameters */
changed |= ieee80211_reset_erp_info(sdata);
ieee80211_led_assoc(local, 0);
-@@ -3001,7 +3001,7 @@ static void ieee80211_set_disassoc(struc
+@@ -3007,7 +3007,7 @@ static void ieee80211_set_disassoc(struc
sizeof(sdata->vif.bss_conf.mu_group.membership));
memset(sdata->vif.bss_conf.mu_group.position, 0,
sizeof(sdata->vif.bss_conf.mu_group.position));
changed |= BSS_CHANGED_MU_GROUPS;
sdata->vif.bss_conf.mu_mimo_owner = false;
-@@ -3015,7 +3015,7 @@ static void ieee80211_set_disassoc(struc
+@@ -3021,7 +3021,7 @@ static void ieee80211_set_disassoc(struc
changed |= BSS_CHANGED_ARP_FILTER;
sdata->vif.bss_conf.qos = false;
changed |= BSS_CHANGED_QOS;
/* The BSSID (not really interesting) and HT changed */
changed |= BSS_CHANGED_BSSID | BSS_CHANGED_HT;
-@@ -3185,7 +3185,7 @@ static void ieee80211_mgd_probe_ap_send(
+@@ -3191,7 +3191,7 @@ static void ieee80211_mgd_probe_ap_send(
u8 unicast_limit = max(1, max_probe_tries - 3);
struct sta_info *sta;
return;
/*
-@@ -3233,7 +3233,7 @@ static void ieee80211_mgd_probe_ap(struc
+@@ -3239,7 +3239,7 @@ static void ieee80211_mgd_probe_ap(struc
struct ieee80211_if_managed *ifmgd = &sdata->u.mgd;
bool already = false;
return;
if (!ieee80211_sdata_running(sdata))
-@@ -3308,7 +3308,7 @@ struct sk_buff *ieee80211_ap_probereq_ge
+@@ -3314,7 +3314,7 @@ struct sk_buff *ieee80211_ap_probereq_ge
int ssid_len;
if (WARN_ON(sdata->vif.type != NL80211_IFTYPE_STATION ||
return NULL;
sdata_assert_lock(sdata);
-@@ -3373,7 +3373,8 @@ static void __ieee80211_disconnect(struc
+@@ -3379,7 +3379,8 @@ static void __ieee80211_disconnect(struc
}
/* in MLO assume we have a link where we can TX the frame */
if (!ifmgd->driver_disconnect) {
unsigned int link_id;
-@@ -3572,7 +3573,7 @@ static void ieee80211_destroy_assoc_data
+@@ -3578,7 +3579,7 @@ static void ieee80211_destroy_assoc_data
for (i = 0; i < ARRAY_SIZE(data.bss); i++)
data.bss[i] = assoc_data->link[i].bss;
data.ap_mld_addr = assoc_data->ap_addr;
cfg80211_assoc_failure(sdata->dev, &data);
-@@ -4950,7 +4951,7 @@ static bool ieee80211_assoc_success(stru
+@@ -4979,7 +4980,7 @@ static bool ieee80211_assoc_success(stru
if (WARN_ON(!sta))
goto out_err;
u16 valid_links = 0;
for (link_id = 0; link_id < IEEE80211_MLD_MAX_NUM_LINKS; link_id++) {
-@@ -4979,7 +4980,7 @@ static bool ieee80211_assoc_success(stru
+@@ -5008,7 +5009,7 @@ static bool ieee80211_assoc_success(stru
if (WARN_ON(!link))
goto out_err;
link_info(link,
"local address %pM, AP link address %pM\n",
link->conf->addr,
-@@ -5211,7 +5212,7 @@ static void ieee80211_rx_mgmt_assoc_resp
+@@ -5240,7 +5241,7 @@ static void ieee80211_rx_mgmt_assoc_resp
ifmgd->broken_ap = true;
}
if (!elems->multi_link) {
sdata_info(sdata,
"MLO association with %pM but no multi-link element in response!\n",
-@@ -5275,7 +5276,7 @@ static void ieee80211_rx_mgmt_assoc_resp
+@@ -5304,7 +5305,7 @@ static void ieee80211_rx_mgmt_assoc_resp
resp.uapsd_queues |= ieee80211_ac_to_qos_mask[ac];
}
ether_addr_copy(ap_mld_addr, sdata->vif.cfg.ap_addr);
resp.ap_mld_addr = ap_mld_addr;
}
-@@ -5600,7 +5601,7 @@ static void ieee80211_rx_mgmt_beacon(str
+@@ -5629,7 +5630,7 @@ static void ieee80211_rx_mgmt_beacon(str
rcu_read_unlock();
if (ifmgd->assoc_data && ifmgd->assoc_data->need_beacon &&
ieee80211_rx_our_beacon(bssid, ifmgd->assoc_data->link[0].bss)) {
parse_params.bss = ifmgd->assoc_data->link[0].bss;
elems = ieee802_11_parse_elems_full(&parse_params);
-@@ -6289,7 +6290,7 @@ static void ieee80211_sta_bcn_mon_timer(
+@@ -6319,7 +6320,7 @@ static void ieee80211_sta_bcn_mon_timer(
struct ieee80211_sub_if_data *sdata =
from_timer(sdata, t, u.mgd.bcn_mon_timer);
return;
if (sdata->vif.bss_conf.csa_active &&
-@@ -6313,7 +6314,7 @@ static void ieee80211_sta_conn_mon_timer
+@@ -6343,7 +6344,7 @@ static void ieee80211_sta_conn_mon_timer
struct sta_info *sta;
unsigned long timeout;
return;
if (sdata->vif.bss_conf.csa_active &&
-@@ -6868,7 +6869,7 @@ int ieee80211_mgd_auth(struct ieee80211_
+@@ -6898,7 +6899,7 @@ int ieee80211_mgd_auth(struct ieee80211_
return 0;
err_clear:
BSS_CHANGED_BSSID);
--- a/net/mac80211/rx.c
+++ b/net/mac80211/rx.c
-@@ -2524,7 +2524,7 @@ bool ieee80211_is_our_addr(struct ieee80
+@@ -2526,7 +2526,7 @@ bool ieee80211_is_our_addr(struct ieee80
if (ether_addr_equal(sdata->vif.addr, addr))
return true;
for (link_id = 0; link_id < ARRAY_SIZE(sdata->vif.link_conf); link_id++) {
--- a/net/mac80211/tx.c
+++ b/net/mac80211/tx.c
-@@ -860,7 +860,7 @@ ieee80211_tx_h_sequence(struct ieee80211
+@@ -866,7 +866,7 @@ ieee80211_tx_h_sequence(struct ieee80211
/* SNS11 from 802.11be 10.3.2.14 */
if (unlikely(is_multicast_ether_addr(hdr->addr1) &&
info->control.vif->type == NL80211_IFTYPE_AP)) {
if (info->control.flags & IEEE80211_TX_CTRL_MCAST_MLO_FIRST_TX)
tx->sdata->mld_mcast_seq += 0x10;
-@@ -2629,7 +2629,7 @@ static struct sk_buff *ieee80211_build_h
+@@ -2635,7 +2635,7 @@ static struct sk_buff *ieee80211_build_h
ethertype = (skb->data[12] << 8) | skb->data[13];
fc = cpu_to_le16(IEEE80211_FTYPE_DATA | IEEE80211_STYPE_DATA);
chanctx_conf =
rcu_dereference(sdata->vif.bss_conf.chanctx_conf);
-@@ -2646,7 +2646,7 @@ static struct sk_buff *ieee80211_build_h
+@@ -2652,7 +2652,7 @@ static struct sk_buff *ieee80211_build_h
authorized = test_sta_flag(sta, WLAN_STA_AUTHORIZED);
wme_sta = sta->sta.wme;
}
struct ieee80211_sub_if_data *ap_sdata;
/* override chanctx_conf from AP (we don't have one) */
-@@ -2664,7 +2664,7 @@ static struct sk_buff *ieee80211_build_h
+@@ -2670,7 +2670,7 @@ static struct sk_buff *ieee80211_build_h
/* DA BSSID SA */
memcpy(hdr.addr1, skb->data, ETH_ALEN);
struct ieee80211_link_data *link;
link_id = sta->deflink.link_id;
-@@ -2816,7 +2816,7 @@ static struct sk_buff *ieee80211_build_h
+@@ -2822,7 +2822,7 @@ static struct sk_buff *ieee80211_build_h
}
if (!chanctx_conf) {
ret = -ENOTCONN;
goto free;
}
-@@ -3058,7 +3058,7 @@ void ieee80211_check_fast_xmit(struct st
+@@ -3064,7 +3064,7 @@ void ieee80211_check_fast_xmit(struct st
!ieee80211_hw_check(&local->hw, SUPPORTS_TX_FRAG))
goto out;
rcu_read_lock();
chanctx_conf =
rcu_dereference(sdata->vif.bss_conf.chanctx_conf);
-@@ -3129,7 +3129,7 @@ void ieee80211_check_fast_xmit(struct st
+@@ -3135,7 +3135,7 @@ void ieee80211_check_fast_xmit(struct st
fc |= cpu_to_le16(IEEE80211_FCTL_FROMDS);
/* DA BSSID SA */
build.da_offs = offsetof(struct ieee80211_hdr, addr1);
memcpy(hdr->addr2, sdata->vif.addr, ETH_ALEN);
} else {
unsigned int link_id = sta->deflink.link_id;
-@@ -4499,7 +4499,7 @@ netdev_tx_t ieee80211_subif_start_xmit(s
+@@ -4507,7 +4507,7 @@ netdev_tx_t ieee80211_subif_start_xmit(s
__ieee80211_subif_start_xmit(skb, dev, 0,
IEEE80211_TX_CTRL_MLO_LINK_UNSPEC,
NULL);
sdata->vif.type == NL80211_IFTYPE_AP &&
!ieee80211_hw_check(&sdata->local->hw, MLO_MCAST_MULTI_LINK_TX)) {
ieee80211_mlo_multicast_tx(dev, skb);
-@@ -4777,7 +4777,7 @@ static bool ieee80211_tx_pending_skb(str
+@@ -4785,7 +4785,7 @@ static bool ieee80211_tx_pending_skb(str
if (info->control.flags & IEEE80211_TX_INTCFL_NEED_TXPROCESSING) {
/* update band only for non-MLD */
chanctx_conf =
rcu_dereference(sdata->vif.bss_conf.chanctx_conf);
if (unlikely(!chanctx_conf)) {
-@@ -6000,7 +6000,7 @@ void __ieee80211_tx_skb_tid_band(struct
+@@ -6008,7 +6008,7 @@ void __ieee80211_tx_skb_tid_band(struct
BUILD_BUG_ON(!FIELD_FIT(IEEE80211_TX_CTRL_MLO_LINK,
IEEE80211_LINK_UNSPECIFIED));
link = 0;
} else if (link_id >= 0) {
link = link_id;
-@@ -6046,7 +6046,7 @@ void ieee80211_tx_skb_tid(struct ieee802
+@@ -6054,7 +6054,7 @@ void ieee80211_tx_skb_tid(struct ieee802
enum nl80211_band band;
rcu_read_lock();
--- a/net/wireless/core.c
+++ b/net/wireless/core.c
-@@ -614,21 +614,6 @@ static int wiphy_verify_combinations(str
+@@ -658,21 +658,6 @@ static int wiphy_verify_combinations(str
c->limits[j].max > 1))
return -EINVAL;
--- a/include/net/cfg80211.h
+++ b/include/net/cfg80211.h
-@@ -4092,6 +4092,7 @@ struct mgmt_frame_regs {
+@@ -4095,6 +4095,7 @@ struct mgmt_frame_regs {
* (as advertised by the nl80211 feature flag.)
* @get_tx_power: store the current TX power into the dbm variable;
* return 0 if successful
*
* @rfkill_poll: polls the hw rfkill line, use cfg80211 reporting
* functions to adjust rfkill hw state
-@@ -4442,6 +4443,7 @@ struct cfg80211_ops {
+@@ -4445,6 +4446,7 @@ struct cfg80211_ops {
enum nl80211_tx_power_setting type, int mbm);
int (*get_tx_power)(struct wiphy *wiphy, struct wireless_dev *wdev,
int *dbm);
--- a/include/net/mac80211.h
+++ b/include/net/mac80211.h
-@@ -1705,6 +1705,7 @@ enum ieee80211_smps_mode {
+@@ -1714,6 +1714,7 @@ enum ieee80211_smps_mode {
*
* @power_level: requested transmit power (in dBm), backward compatibility
* value only that is set to the minimum of all interfaces
*
* @chandef: the channel definition to tune to
* @radar_enabled: whether radar detection is enabled
-@@ -1725,6 +1726,7 @@ enum ieee80211_smps_mode {
+@@ -1734,6 +1735,7 @@ enum ieee80211_smps_mode {
struct ieee80211_conf {
u32 flags;
int power_level, dynamic_ps_timeout;
__NL80211_ATTR_AFTER_LAST,
--- a/net/mac80211/cfg.c
+++ b/net/mac80211/cfg.c
-@@ -3067,6 +3067,19 @@ static int ieee80211_get_tx_power(struct
+@@ -3077,6 +3077,19 @@ static int ieee80211_get_tx_power(struct
return 0;
}
static void ieee80211_rfkill_poll(struct wiphy *wiphy)
{
struct ieee80211_local *local = wiphy_priv(wiphy);
-@@ -4989,6 +5002,7 @@ const struct cfg80211_ops mac80211_confi
+@@ -5007,6 +5020,7 @@ const struct cfg80211_ops mac80211_confi
.set_wiphy_params = ieee80211_set_wiphy_params,
.set_tx_power = ieee80211_set_tx_power,
.get_tx_power = ieee80211_get_tx_power,
CFG80211_TESTMODE_DUMP(ieee80211_testmode_dump)
--- a/net/mac80211/ieee80211_i.h
+++ b/net/mac80211/ieee80211_i.h
-@@ -1542,6 +1542,7 @@ struct ieee80211_local {
+@@ -1546,6 +1546,7 @@ struct ieee80211_local {
int dynamic_ps_forced_timeout;
int user_power_level; /* in dBm, for all interfaces */
if (local->hw.conf.power_level != power) {
changed |= IEEE80211_CONF_CHANGE_POWER;
local->hw.conf.power_level = power;
-@@ -762,6 +768,7 @@ struct ieee80211_hw *ieee80211_alloc_hw_
+@@ -759,6 +765,7 @@ struct ieee80211_hw *ieee80211_alloc_hw_
IEEE80211_RADIOTAP_MCS_HAVE_BW;
local->hw.radiotap_vht_details = IEEE80211_RADIOTAP_VHT_KNOWN_GI |
IEEE80211_RADIOTAP_VHT_KNOWN_BANDWIDTH;
local->hw.max_mtu = IEEE80211_MAX_DATA_LEN;
--- a/net/wireless/nl80211.c
+++ b/net/wireless/nl80211.c
-@@ -800,6 +800,7 @@ static const struct nla_policy nl80211_p
+@@ -820,6 +820,7 @@ static const struct nla_policy nl80211_p
[NL80211_ATTR_MLO_SUPPORT] = { .type = NLA_FLAG },
[NL80211_ATTR_MAX_NUM_AKM_SUITES] = { .type = NLA_REJECT },
[NL80211_ATTR_PUNCT_BITMAP] = NLA_POLICY_RANGE(NLA_U8, 0, 0xffff),
};
/* policy for the key attributes */
-@@ -3527,6 +3528,22 @@ static int nl80211_set_wiphy(struct sk_b
+@@ -3547,6 +3548,22 @@ static int nl80211_set_wiphy(struct sk_b
if (result)
goto out;
}
--- a/net/mac80211/sta_info.c
+++ b/net/mac80211/sta_info.c
-@@ -2364,6 +2364,13 @@ static void sta_stats_decode_rate(struct
+@@ -2368,6 +2368,13 @@ static void sta_stats_decode_rate(struct
sband = local->hw.wiphy->bands[band];