refresh patches
This commit is contained in:
parent
1bd4b80529
commit
9be1decbb4
@ -0,0 +1,36 @@
|
||||
--- a/drivers/net/wireless/ath/ath11k/dp_tx.c
|
||||
+++ b/drivers/net/wireless/ath/ath11k/dp_tx.c
|
||||
@@ -275,6 +275,7 @@ tcl_ring_sel:
|
||||
|
||||
ti.data_len = skb->len - ti.pkt_offset;
|
||||
skb_cb->pkt_offset = ti.pkt_offset;
|
||||
+ skb_cb->paddr = ti.paddr;
|
||||
skb_cb->vif = arvif->vif;
|
||||
skb_cb->ar = ar;
|
||||
|
||||
@@ -283,11 +284,9 @@ tcl_ring_sel:
|
||||
atomic_inc(&ab->soc_stats.tx_err.misc_fail);
|
||||
ath11k_warn(ab, "failed to DMA map data Tx buffer\n");
|
||||
ret = -ENOMEM;
|
||||
- goto fail_remove_idr;
|
||||
+ goto fail_pull_skb;
|
||||
}
|
||||
|
||||
- skb_cb->paddr = ti.paddr;
|
||||
-
|
||||
if (ring_id == DP_TCL_NUM_RING_MAX)
|
||||
hal_ring_id = dp->tcl_cmd_ring.ring_id;
|
||||
else
|
||||
@@ -343,10 +342,11 @@ tcl_ring_sel:
|
||||
fail_unmap_dma:
|
||||
dma_unmap_single(ab->dev, ti.paddr, ti.data_len, DMA_TO_DEVICE);
|
||||
|
||||
-fail_remove_idr:
|
||||
+fail_pull_skb:
|
||||
if (ti.pkt_offset)
|
||||
skb_pull(skb, ti.pkt_offset);
|
||||
|
||||
+fail_remove_idr:
|
||||
spin_lock_bh(&tx_ring->tx_idr_lock);
|
||||
tx_ring->idr_pool[idr].id = -1;
|
||||
clear_bit(idr, tx_ring->idrs);
|
@ -1,68 +0,0 @@
|
||||
From 0ff455d1d446e34ae6c2596d4d8491f66fc61913 Mon Sep 17 00:00:00 2001
|
||||
From: Manish Dharanenthiran <quic_mdharane@quicinc.com>
|
||||
Date: Sat, 2 Dec 2023 03:38:31 +0530
|
||||
Subject: [PATCH] wifi: mac80211: Fix memory corruption during mesh beacon
|
||||
update
|
||||
|
||||
During mesh beacon update, u64 flag is used to check for
|
||||
bit set/unset for validation purpose. But, in
|
||||
'ieee80211_mbss_info_change_notify' API, unsigned long flag
|
||||
is modified using sizeof(u64). This leads to following issue:
|
||||
|
||||
> 'mbss_changed' flag in 'ieee80211_if_mesh' is declared as
|
||||
unsigned_long which creates an architecture dependency
|
||||
(32bit vs 64bit) while modifying it with u64 flag which
|
||||
leads to memory corruption.
|
||||
|
||||
Fix above mentioned issue by replacing unsigned long with u64
|
||||
for changed flag.
|
||||
|
||||
Signed-off-by: Manish Dharanenthiran <quic_mdharane@quicinc.com>
|
||||
---
|
||||
net/mac80211/ieee80211_i.h | 2 +-
|
||||
net/mac80211/mesh.c | 2 +-
|
||||
2 files changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
--- a/net/mac80211/ieee80211_i.h
|
||||
+++ b/net/mac80211/ieee80211_i.h
|
||||
@@ -731,7 +731,7 @@ struct ieee80211_if_mesh {
|
||||
struct timer_list mesh_path_root_timer;
|
||||
|
||||
unsigned long wrkq_flags;
|
||||
- unsigned long mbss_changed[64 / BITS_PER_LONG];
|
||||
+ unsigned long mbss_changed;
|
||||
|
||||
bool userspace_handles_dfs;
|
||||
|
||||
--- a/net/mac80211/mesh.c
|
||||
+++ b/net/mac80211/mesh.c
|
||||
@@ -1168,7 +1168,7 @@ void ieee80211_mbss_info_change_notify(s
|
||||
|
||||
/* if we race with running work, worst case this work becomes a noop */
|
||||
for_each_set_bit(bit, &bits, sizeof(changed) * BITS_PER_BYTE)
|
||||
- set_bit(bit, ifmsh->mbss_changed);
|
||||
+ set_bit(bit, &ifmsh->mbss_changed);
|
||||
set_bit(MESH_WORK_MBSS_CHANGED, &ifmsh->wrkq_flags);
|
||||
wiphy_work_queue(sdata->local->hw.wiphy, &sdata->work);
|
||||
}
|
||||
@@ -1250,7 +1250,7 @@ void ieee80211_stop_mesh(struct ieee8021
|
||||
|
||||
/* clear any mesh work (for next join) we may have accrued */
|
||||
ifmsh->wrkq_flags = 0;
|
||||
- memset(ifmsh->mbss_changed, 0, sizeof(ifmsh->mbss_changed));
|
||||
+ ifmsh->mbss_changed = 0;
|
||||
|
||||
local->fif_other_bss--;
|
||||
atomic_dec(&local->iff_allmultis);
|
||||
@@ -1719,9 +1719,9 @@ static void mesh_bss_info_changed(struct
|
||||
u32 bit;
|
||||
u64 changed = 0;
|
||||
|
||||
- for_each_set_bit(bit, ifmsh->mbss_changed,
|
||||
+ for_each_set_bit(bit, &ifmsh->mbss_changed,
|
||||
sizeof(changed) * BITS_PER_BYTE) {
|
||||
- clear_bit(bit, ifmsh->mbss_changed);
|
||||
+ clear_bit(bit, &ifmsh->mbss_changed);
|
||||
changed |= BIT(bit);
|
||||
}
|
||||
|
@ -0,0 +1,21 @@
|
||||
--- a/net/mac80211/tx.c
|
||||
+++ b/net/mac80211/tx.c
|
||||
@@ -6323,13 +6323,17 @@ void ieee80211_tx_skb_tid(struct ieee802
|
||||
{
|
||||
struct ieee80211_chanctx_conf *chanctx_conf;
|
||||
enum nl80211_band band;
|
||||
+ struct ieee80211_local *local = sdata->local;
|
||||
|
||||
rcu_read_lock();
|
||||
if (!ieee80211_vif_is_mld(&sdata->vif)) {
|
||||
WARN_ON(link_id >= 0);
|
||||
chanctx_conf =
|
||||
rcu_dereference(sdata->vif.bss_conf.chanctx_conf);
|
||||
- if (WARN_ON(!chanctx_conf)) {
|
||||
+ if (!chanctx_conf) {
|
||||
+ if (!ieee80211_hw_check(&local->hw, SUPPORTS_NSS_OFFLOAD)) {
|
||||
+ WARN_ON(1);
|
||||
+ }
|
||||
rcu_read_unlock();
|
||||
kfree_skb(skb);
|
||||
return;
|
@ -0,0 +1,112 @@
|
||||
reverted:
|
||||
--- a/src/drivers/driver_nl80211.c
|
||||
+++ b/src/drivers/driver_nl80211.c
|
||||
@@ -4068,33 +4068,6 @@ static enum nl80211_auth_type get_nl_aut
|
||||
}
|
||||
|
||||
|
||||
-static int
|
||||
-nl80211_put_bss_membership_selectors(struct wpa_driver_nl80211_data *drv,
|
||||
- struct nl_msg *msg)
|
||||
-{
|
||||
- u8 selectors[ARRAY_SIZE(drv->extra_bss_membership_selectors) + 1];
|
||||
- size_t selectors_len;
|
||||
-
|
||||
- if (!nl80211_attr_supported(drv, NL80211_ATTR_SUPPORTED_SELECTORS))
|
||||
- return 0;
|
||||
-
|
||||
- for (selectors_len = 0;
|
||||
- drv->extra_bss_membership_selectors[selectors_len];
|
||||
- selectors_len++) {
|
||||
- selectors[selectors_len] =
|
||||
- drv->extra_bss_membership_selectors[selectors_len];
|
||||
- }
|
||||
-
|
||||
-#ifdef CONFIG_SAE
|
||||
- /* Always add the SAE H2E selector as it is handled by wpa_supplicant */
|
||||
- selectors[selectors_len++] = BSS_MEMBERSHIP_SELECTOR_SAE_H2E_ONLY;
|
||||
-#endif /* CONFIG_SAE */
|
||||
-
|
||||
- return nla_put(msg, NL80211_ATTR_SUPPORTED_SELECTORS,
|
||||
- selectors_len, selectors);
|
||||
-}
|
||||
-
|
||||
-
|
||||
static int wpa_driver_nl80211_authenticate(
|
||||
struct i802_bss *bss, struct wpa_driver_auth_params *params)
|
||||
{
|
||||
@@ -4196,10 +4169,6 @@ retry:
|
||||
goto fail;
|
||||
}
|
||||
|
||||
- ret = nl80211_put_bss_membership_selectors(drv, msg);
|
||||
- if (ret)
|
||||
- goto fail;
|
||||
-
|
||||
if (params->mld && params->ap_mld_addr) {
|
||||
wpa_printf(MSG_DEBUG, " * MLD: link_id=%u, MLD addr=" MACSTR,
|
||||
params->mld_link_id, MAC2STR(params->ap_mld_addr));
|
||||
@@ -7537,10 +7506,6 @@ static int wpa_driver_nl80211_associate(
|
||||
if (ret)
|
||||
goto fail;
|
||||
|
||||
- ret = nl80211_put_bss_membership_selectors(drv, msg);
|
||||
- if (ret)
|
||||
- goto fail;
|
||||
-
|
||||
if (params->mgmt_frame_protection == MGMT_FRAME_PROTECTION_REQUIRED &&
|
||||
nla_put_u32(msg, NL80211_ATTR_USE_MFP, NL80211_MFP_REQUIRED))
|
||||
goto fail;
|
||||
@@ -10162,7 +10127,6 @@ static int nl80211_set_param(void *priv,
|
||||
{
|
||||
struct i802_bss *bss = priv;
|
||||
struct wpa_driver_nl80211_data *drv = bss->drv;
|
||||
- const char *pos;
|
||||
|
||||
if (param == NULL)
|
||||
return 0;
|
||||
@@ -10236,33 +10200,6 @@ static int nl80211_set_param(void *priv,
|
||||
if (os_strstr(param, "rsn_override_in_driver=1"))
|
||||
drv->capa.flags2 |= WPA_DRIVER_FLAGS2_RSN_OVERRIDE_STA;
|
||||
|
||||
- pos = os_strstr(param, "extra_bss_membership_selectors=");
|
||||
- if (pos) {
|
||||
- int i = 0;
|
||||
-
|
||||
- pos += 31;
|
||||
-
|
||||
- while (*pos) {
|
||||
- char *end;
|
||||
- int sel;
|
||||
-
|
||||
- sel = strtol(pos, &end, 10);
|
||||
- if (pos == end)
|
||||
- return -EINVAL;
|
||||
-
|
||||
- if (sel > 127 || sel < 0)
|
||||
- return -EINVAL;
|
||||
- if (i ==
|
||||
- ARRAY_SIZE(drv->extra_bss_membership_selectors))
|
||||
- return -EINVAL;
|
||||
- drv->extra_bss_membership_selectors[i++] = sel;
|
||||
-
|
||||
- pos = end;
|
||||
- if (*pos == ',')
|
||||
- pos++;
|
||||
- }
|
||||
- }
|
||||
-
|
||||
return 0;
|
||||
}
|
||||
|
||||
--- a/src/drivers/driver_nl80211.h
|
||||
+++ b/src/drivers/driver_nl80211.h
|
||||
@@ -202,8 +202,6 @@ struct wpa_driver_nl80211_data {
|
||||
unsigned int qca_ap_allowed_freqs:1;
|
||||
unsigned int connect_ext_vendor_cmd_avail:1;
|
||||
|
||||
- u8 extra_bss_membership_selectors[8];
|
||||
-
|
||||
u32 ignore_next_local_disconnect;
|
||||
u32 ignore_next_local_deauth;
|
||||
|
@ -15,7 +15,7 @@ DEFAULT_PACKAGES += \
|
||||
autocore automount cpufreq e2fsprogs f2fsck mkf2fs losetup luci uboot-envtools wpad-openssl \
|
||||
kmod-dsa kmod-dsa-qca8k kmod-fs-ext4 kmod-fs-f2fs kmod-gpio-button-hotplug kmod-leds-gpio \
|
||||
kmod-ath11k kmod-ath11k-ahb kmod-ath11k-pci kmod-phy-aquantia kmod-phy-marvell kmod-phy-qca83xx \
|
||||
kmod-usb3 kmod-usb-dwc3 kmod-usb-dwc3-qcom kmod-qca-nss-dp \
|
||||
kmod-usb2 kmod-usb3 kmod-usb-dwc2 kmod-usb-dwc3 kmod-usb-dwc3-qcom kmod-qca-nss-dp \
|
||||
kmod-qca-nss-crypto kmod-qca-nss-ecm kmod-qca-nss-drv \
|
||||
kmod-qca-nss-drv-bridge-mgr \
|
||||
kmod-qca-nss-drv-eogremgr \
|
||||
|
Loading…
x
Reference in New Issue
Block a user