mirror of
https://github.com/openwrt/openwrt.git
synced 2025-01-28 15:14:11 +00:00
323e249ce8
This updates mac80211 to version 6.1.97-1. This code is based on Linux 6.1.97 and contains all fixes included in the upstream wireless subsystem from that kernel version. This includes many bugfixes and also some security fixes. The removed patches are already integrated in upstream Linux 6.1.97 or in backports. The following patches were integrated in upstream Linux: ath11k/0013-wifi-ath11k-synchronize-ath11k_mac_he_gi_to_nl80211_.patch ath11k/0035-wifi-ath11k-Use-platform_get_irq-to-get-the-interrup.patch ath11k/0036-wifi-ath11k-fix-SAC-bug-on-peer-addition-with-sta-ba.patch ath11k/0047-wifi-ath11k-fix-deinitialization-of-firmware-resourc.patch ath11k/0053-wifi-ath11k-fix-writing-to-unintended-memory-region.patch ath11k/0060-wifi-ath11k-Ignore-frags-from-uninitialized-peer-in-.patch ath11k/0065-wifi-ath11k-fix-tx-status-reporting-in-encap-offload.patch ath11k/0067-wifi-ath11k-Fix-SKB-corruption-in-REO-destination-ri.patch ath11k/0069-wifi-ath11k-fix-registration-of-6Ghz-only-phy-withou.patch ath11k/0080-wifi-ath11k-add-support-default-regdb-while-searchin.patch ath11k/0085-wifi-ath11k-fix-memory-leak-in-WMI-firmware-stats.patch ath11k/0086-wifi-ath11k-Add-missing-check-for-ioremap.patch ath11k/0096-wifi-ath11k-fix-boot-failure-with-one-MSI-vector.patch subsys/337-wifi-mac80211-fix-race-condition-on-enabling-fast-xm.patch The following patches were integrated in upstream backports: ath11k/901-wifi-ath11k-pci-fix-compilation-in-5.16-and-older.patch build/080-resv_start_op.patch build/110-backport_napi_build_skb.patch The following files are missing in backports, we do not have to remove them any more. Some were already missing before some were removed in this update: include/linux/cordic.h include/linux/crc8.h include/linux/eeprom_93cx6.h include/linux/wl12xx.h include/net/ieee80211.h backport-include/linux/bcm47xx_nvram.h include/linux/ath9k_platform.h include/net/bluetooth/ backports ships a dummy Mediatek wed header for older kernel versions. We backported the feature in our kernel, remove the dummy header: backport-include/linux/soc/mediatek/mtk_wed.h Remove header files for subsystems used form the mainline kernel: include/trace/events/qrtr.h include/net/rsi_91x.h backport-include/linux/platform_data/brcmnand.h Link: https://github.com/openwrt/openwrt/pull/15827 Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
162 lines
5.1 KiB
Diff
162 lines
5.1 KiB
Diff
From d45daa6d1a8da080f1b516c570a8428a7b9225e4 Mon Sep 17 00:00:00 2001
|
|
From: Karthikeyan Kathirvel <quic_kathirve@quicinc.com>
|
|
Date: Tue, 6 Dec 2022 00:51:25 +0530
|
|
Subject: [PATCH] wifi: ath11k: Fix scan request param frame size warning
|
|
|
|
Following warning was observed
|
|
|
|
drivers/net/wireless/ath/ath11k/mac.c:2351:1: warning: the frame
|
|
size of 1184 bytes is larger than 1024 bytes [-Wframe-larger-than=]
|
|
|
|
A local variable is declared with a size larger than 1024 bytes
|
|
this causing a compilation warning. Change the local variable to
|
|
heap memory to fix the warning.
|
|
|
|
Tested-on: IPQ8074 AHB WLAN.HK.2.7.0.1-01701-QCAHKSWPL_SILICONZ-1 v2
|
|
|
|
Signed-off-by: Karthikeyan Kathirvel <quic_kathirve@quicinc.com>
|
|
Signed-off-by: Kalle Valo <quic_kvalo@quicinc.com>
|
|
Link: https://lore.kernel.org/r/20221205192125.13533-1-quic_kathirve@quicinc.com
|
|
---
|
|
drivers/net/wireless/ath/ath11k/mac.c | 83 +++++++++++++++------------
|
|
1 file changed, 45 insertions(+), 38 deletions(-)
|
|
|
|
--- a/drivers/net/wireless/ath/ath11k/mac.c
|
|
+++ b/drivers/net/wireless/ath/ath11k/mac.c
|
|
@@ -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;
|
|
- struct scan_req_params arg;
|
|
+ struct scan_req_params *arg = NULL;
|
|
int ret = 0;
|
|
int i;
|
|
u32 scan_timeout;
|
|
@@ -3637,72 +3637,78 @@ static int ath11k_mac_op_hw_scan(struct
|
|
if (ret)
|
|
goto exit;
|
|
|
|
- memset(&arg, 0, sizeof(arg));
|
|
- ath11k_wmi_start_scan_init(ar, &arg);
|
|
- arg.vdev_id = arvif->vdev_id;
|
|
- arg.scan_id = ATH11K_SCAN_ID;
|
|
+ arg = kzalloc(sizeof(*arg), GFP_KERNEL);
|
|
+
|
|
+ if (!arg) {
|
|
+ ret = -ENOMEM;
|
|
+ goto exit;
|
|
+ }
|
|
+
|
|
+ ath11k_wmi_start_scan_init(ar, arg);
|
|
+ arg->vdev_id = arvif->vdev_id;
|
|
+ arg->scan_id = ATH11K_SCAN_ID;
|
|
|
|
if (req->ie_len) {
|
|
- arg.extraie.ptr = kmemdup(req->ie, req->ie_len, GFP_KERNEL);
|
|
- if (!arg.extraie.ptr) {
|
|
+ arg->extraie.ptr = kmemdup(req->ie, req->ie_len, GFP_KERNEL);
|
|
+ if (!arg->extraie.ptr) {
|
|
ret = -ENOMEM;
|
|
goto exit;
|
|
}
|
|
- arg.extraie.len = req->ie_len;
|
|
+ arg->extraie.len = req->ie_len;
|
|
}
|
|
|
|
if (req->n_ssids) {
|
|
- arg.num_ssids = req->n_ssids;
|
|
- for (i = 0; i < arg.num_ssids; i++) {
|
|
- arg.ssid[i].length = req->ssids[i].ssid_len;
|
|
- memcpy(&arg.ssid[i].ssid, req->ssids[i].ssid,
|
|
+ arg->num_ssids = req->n_ssids;
|
|
+ for (i = 0; i < arg->num_ssids; i++) {
|
|
+ arg->ssid[i].length = req->ssids[i].ssid_len;
|
|
+ memcpy(&arg->ssid[i].ssid, req->ssids[i].ssid,
|
|
req->ssids[i].ssid_len);
|
|
}
|
|
} else {
|
|
- arg.scan_flags |= WMI_SCAN_FLAG_PASSIVE;
|
|
+ arg->scan_flags |= WMI_SCAN_FLAG_PASSIVE;
|
|
}
|
|
|
|
if (req->n_channels) {
|
|
- arg.num_chan = req->n_channels;
|
|
- arg.chan_list = kcalloc(arg.num_chan, sizeof(*arg.chan_list),
|
|
- GFP_KERNEL);
|
|
+ arg->num_chan = req->n_channels;
|
|
+ arg->chan_list = kcalloc(arg->num_chan, sizeof(*arg->chan_list),
|
|
+ GFP_KERNEL);
|
|
|
|
- if (!arg.chan_list) {
|
|
+ if (!arg->chan_list) {
|
|
ret = -ENOMEM;
|
|
goto exit;
|
|
}
|
|
|
|
- for (i = 0; i < arg.num_chan; i++)
|
|
- arg.chan_list[i] = req->channels[i]->center_freq;
|
|
+ for (i = 0; i < arg->num_chan; i++)
|
|
+ arg->chan_list[i] = req->channels[i]->center_freq;
|
|
}
|
|
|
|
if (req->flags & NL80211_SCAN_FLAG_RANDOM_ADDR) {
|
|
- arg.scan_f_add_spoofed_mac_in_probe = 1;
|
|
- ether_addr_copy(arg.mac_addr.addr, req->mac_addr);
|
|
- ether_addr_copy(arg.mac_mask.addr, req->mac_addr_mask);
|
|
+ arg->scan_f_add_spoofed_mac_in_probe = 1;
|
|
+ ether_addr_copy(arg->mac_addr.addr, req->mac_addr);
|
|
+ ether_addr_copy(arg->mac_mask.addr, req->mac_addr_mask);
|
|
}
|
|
|
|
/* if duration is set, default dwell times will be overwritten */
|
|
if (req->duration) {
|
|
- arg.dwell_time_active = req->duration;
|
|
- arg.dwell_time_active_2g = req->duration;
|
|
- arg.dwell_time_active_6g = req->duration;
|
|
- arg.dwell_time_passive = req->duration;
|
|
- arg.dwell_time_passive_6g = req->duration;
|
|
- arg.burst_duration = req->duration;
|
|
+ arg->dwell_time_active = req->duration;
|
|
+ arg->dwell_time_active_2g = req->duration;
|
|
+ arg->dwell_time_active_6g = req->duration;
|
|
+ arg->dwell_time_passive = req->duration;
|
|
+ arg->dwell_time_passive_6g = req->duration;
|
|
+ arg->burst_duration = req->duration;
|
|
|
|
- scan_timeout = min_t(u32, arg.max_rest_time *
|
|
- (arg.num_chan - 1) + (req->duration +
|
|
+ scan_timeout = min_t(u32, arg->max_rest_time *
|
|
+ (arg->num_chan - 1) + (req->duration +
|
|
ATH11K_SCAN_CHANNEL_SWITCH_WMI_EVT_OVERHEAD) *
|
|
- arg.num_chan, arg.max_scan_time);
|
|
+ arg->num_chan, arg->max_scan_time);
|
|
} else {
|
|
- scan_timeout = arg.max_scan_time;
|
|
+ scan_timeout = arg->max_scan_time;
|
|
}
|
|
|
|
/* Add a margin to account for event/command processing */
|
|
scan_timeout += ATH11K_MAC_SCAN_CMD_EVT_OVERHEAD;
|
|
|
|
- ret = ath11k_start_scan(ar, &arg);
|
|
+ ret = ath11k_start_scan(ar, arg);
|
|
if (ret) {
|
|
ath11k_warn(ar->ab, "failed to start hw scan: %d\n", ret);
|
|
spin_lock_bh(&ar->data_lock);
|
|
@@ -3714,10 +3720,11 @@ static int ath11k_mac_op_hw_scan(struct
|
|
msecs_to_jiffies(scan_timeout));
|
|
|
|
exit:
|
|
- kfree(arg.chan_list);
|
|
-
|
|
- if (req->ie_len)
|
|
- kfree(arg.extraie.ptr);
|
|
+ if (arg) {
|
|
+ kfree(arg->chan_list);
|
|
+ kfree(arg->extraie.ptr);
|
|
+ kfree(arg);
|
|
+ }
|
|
|
|
mutex_unlock(&ar->conf_mutex);
|
|
|