PKG_NAME:=mac80211
-PKG_VERSION:=5.10.16-1
+PKG_VERSION:=5.10.34-1
PKG_RELEASE:=1
-PKG_SOURCE_URL:=@KERNEL/linux/kernel/projects/backports/stable/v5.10.16/
-PKG_HASH:=12856db780c5023edc47e2d18486eb3346bb7c82f1f2fc48deb3b163142f7d2d
+PKG_SOURCE_URL:=@KERNEL/linux/kernel/projects/backports/stable/v5.10.34/
+PKG_HASH:=03c4ca6bf47d4e50b91b61bc2943a98c788439e56ce2b4080bc4c94141c2c15b
PKG_SOURCE:=backports-$(PKG_VERSION).tar.xz
PKG_BUILD_DIR:=$(KERNEL_BUILD_DIR)/backports-$(PKG_VERSION)
--- a/drivers/net/wireless/ath/ath9k/debug.c
+++ b/drivers/net/wireless/ath/ath9k/debug.c
-@@ -1361,6 +1361,53 @@ void ath9k_deinit_debug(struct ath_softc
+@@ -1364,6 +1364,53 @@ void ath9k_deinit_debug(struct ath_softc
ath9k_cmn_spectral_deinit_debug(&sc->spec_priv);
}
int ath9k_init_debug(struct ath_hw *ah)
{
struct ath_common *common = ath9k_hw_common(ah);
-@@ -1380,6 +1427,8 @@ int ath9k_init_debug(struct ath_hw *ah)
+@@ -1383,6 +1430,8 @@ int ath9k_init_debug(struct ath_hw *ah)
ath9k_tx99_init_debug(sc);
ath9k_cmn_spectral_init_debug(&sc->spec_priv, sc->debug.debugfs_phy);
--- a/drivers/net/wireless/ath/ath9k/debug.c
+++ b/drivers/net/wireless/ath/ath9k/debug.c
-@@ -1408,6 +1408,52 @@ static const struct file_operations fops
+@@ -1411,6 +1411,52 @@ static const struct file_operations fops
.owner = THIS_MODULE
};
int ath9k_init_debug(struct ath_hw *ah)
{
struct ath_common *common = ath9k_hw_common(ah);
-@@ -1429,6 +1475,8 @@ int ath9k_init_debug(struct ath_hw *ah)
+@@ -1432,6 +1478,8 @@ int ath9k_init_debug(struct ath_hw *ah)
debugfs_create_file("eeprom", S_IRUSR, sc->debug.debugfs_phy, sc,
&fops_eeprom);
--- a/drivers/net/wireless/ath/ath9k/ath9k.h
+++ b/drivers/net/wireless/ath/ath9k/ath9k.h
-@@ -843,6 +843,9 @@ static inline int ath9k_dump_btcoex(stru
+@@ -844,6 +844,9 @@ static inline int ath9k_dump_btcoex(stru
#ifdef CPTCFG_MAC80211_LEDS
void ath_init_leds(struct ath_softc *sc);
void ath_deinit_leds(struct ath_softc *sc);
#else
static inline void ath_init_leds(struct ath_softc *sc)
{
-@@ -979,6 +982,13 @@ void ath_ant_comb_scan(struct ath_softc
+@@ -980,6 +983,13 @@ void ath_ant_comb_scan(struct ath_softc
#define ATH9K_NUM_CHANCTX 2 /* supports 2 operating channels */
struct ath_softc {
struct ieee80211_hw *hw;
struct device *dev;
-@@ -1032,9 +1042,8 @@ struct ath_softc {
+@@ -1033,9 +1043,8 @@ struct ath_softc {
spinlock_t chan_lock;
#ifdef CPTCFG_MAC80211_LEDS
#endif
--- a/drivers/net/wireless/ath/ath9k/debug.c
+++ b/drivers/net/wireless/ath/ath9k/debug.c
-@@ -1453,6 +1453,61 @@ static const struct file_operations fops
+@@ -1456,6 +1456,61 @@ static const struct file_operations fops
.llseek = default_llseek,
};
int ath9k_init_debug(struct ath_hw *ah)
{
-@@ -1477,6 +1532,10 @@ int ath9k_init_debug(struct ath_hw *ah)
+@@ -1480,6 +1535,10 @@ int ath9k_init_debug(struct ath_hw *ah)
&fops_eeprom);
debugfs_create_file("chanbw", S_IRUSR | S_IWUSR, sc->debug.debugfs_phy,
sc, &fops_chanbw);
--- a/drivers/net/wireless/ath/ath9k/debug.c
+++ b/drivers/net/wireless/ath/ath9k/debug.c
-@@ -1509,6 +1509,50 @@ static const struct file_operations fops
+@@ -1512,6 +1512,50 @@ static const struct file_operations fops
#endif
int ath9k_init_debug(struct ath_hw *ah)
{
struct ath_common *common = ath9k_hw_common(ah);
-@@ -1536,6 +1580,8 @@ int ath9k_init_debug(struct ath_hw *ah)
+@@ -1539,6 +1583,8 @@ int ath9k_init_debug(struct ath_hw *ah)
debugfs_create_file("gpio_led", S_IWUSR,
sc->debug.debugfs_phy, sc, &fops_gpio_led);
#endif
#include "common.h"
#include "debug.h"
-@@ -989,6 +990,14 @@ struct ath_led {
+@@ -990,6 +991,14 @@ struct ath_led {
struct led_classdev cdev;
};
struct ath_softc {
struct ieee80211_hw *hw;
struct device *dev;
-@@ -1044,6 +1053,9 @@ struct ath_softc {
+@@ -1045,6 +1054,9 @@ struct ath_softc {
#ifdef CPTCFG_MAC80211_LEDS
const char *led_default_trigger;
struct list_head leds;
---
--- a/drivers/net/wireless/ath/ath9k/ath9k.h
+++ b/drivers/net/wireless/ath/ath9k/ath9k.h
-@@ -1055,6 +1055,7 @@ struct ath_softc {
+@@ -1056,6 +1056,7 @@ struct ath_softc {
struct list_head leds;
#ifdef CONFIG_GPIOLIB
struct ath9k_gpio_chip *gpiochip;
ATH9K_HTC_DEBUGFS=
--- a/drivers/net/wireless/ath/ath9k/Kconfig
+++ b/drivers/net/wireless/ath/ath9k/Kconfig
-@@ -60,6 +60,19 @@ config ATH9K_AHB
+@@ -58,6 +58,19 @@ config ATH9K_AHB
Say Y, if you have a SoC with a compatible built-in
wireless MAC. Say N if unsure.
#include "common.h"
#include "debug.h"
-@@ -1011,6 +1012,9 @@ struct ath_softc {
+@@ -1012,6 +1013,9 @@ struct ath_softc {
struct ath_hw *sc_ah;
void __iomem *mem;
int irq;
+++ /dev/null
-From: Felix Fietkau <nbd@nbd.name>
-Date: Sun, 14 Feb 2021 19:45:50 +0100
-Subject: [PATCH] ath9k: fix transmitting to stations in dynamic SMPS mode
-
-When transmitting to a receiver in dynamic SMPS mode, all transmissions that
-use multiple spatial streams need to be sent using CTS-to-self or RTS/CTS to
-give the receiver's extra chains some time to wake up.
-This fixes the tx rate getting stuck at <= MCS7 for some clients, especially
-Intel ones, which make aggressive use of SMPS.
-
-Cc: stable@vger.kernel.org
-Reported-by: Martin Kennedy <hurricos@gmail.com>
-Signed-off-by: Felix Fietkau <nbd@nbd.name>
----
-
---- a/drivers/net/wireless/ath/ath9k/ath9k.h
-+++ b/drivers/net/wireless/ath/ath9k/ath9k.h
-@@ -179,7 +179,8 @@ struct ath_frame_info {
- s8 txq;
- u8 keyix;
- u8 rtscts_rate;
-- u8 retries : 7;
-+ u8 retries : 6;
-+ u8 dyn_smps : 1;
- u8 baw_tracked : 1;
- u8 tx_power;
- enum ath9k_key_type keytype:2;
---- a/drivers/net/wireless/ath/ath9k/xmit.c
-+++ b/drivers/net/wireless/ath/ath9k/xmit.c
-@@ -1271,6 +1271,11 @@ static void ath_buf_set_rate(struct ath_
- is_40, is_sgi, is_sp);
- if (rix < 8 && (tx_info->flags & IEEE80211_TX_CTL_STBC))
- info->rates[i].RateFlags |= ATH9K_RATESERIES_STBC;
-+ if (rix >= 8 && fi->dyn_smps) {
-+ info->rates[i].RateFlags |=
-+ ATH9K_RATESERIES_RTS_CTS;
-+ info->flags |= ATH9K_TXDESC_CTSENA;
-+ }
-
- info->txpower[i] = ath_get_rate_txpower(sc, bf, rix,
- is_40, false);
-@@ -2114,6 +2119,7 @@ static void setup_frame_info(struct ieee
- fi->keyix = an->ps_key;
- else
- fi->keyix = ATH9K_TXKEYIX_INVALID;
-+ fi->dyn_smps = sta && sta->smps_mode == IEEE80211_SMPS_DYNAMIC;
- fi->keytype = keytype;
- fi->framelen = framelen;
- fi->tx_power = txpower;
--- a/drivers/net/wireless/ath/ath10k/mac.c
+++ b/drivers/net/wireless/ath/ath10k/mac.c
-@@ -9713,6 +9713,21 @@ static int ath10k_mac_init_rd(struct ath
+@@ -9708,6 +9708,21 @@ static int ath10k_mac_init_rd(struct ath
return 0;
}
int ath10k_mac_register(struct ath10k *ar)
{
static const u32 cipher_suites[] = {
-@@ -10062,6 +10077,12 @@ int ath10k_mac_register(struct ath10k *a
+@@ -10057,6 +10072,12 @@ int ath10k_mac_register(struct ath10k *a
ar->hw->weight_multiplier = ATH10K_AIRTIME_WEIGHT_MULTIPLIER;
{
--- a/drivers/net/wireless/ath/ath10k/wmi-tlv.c
+++ b/drivers/net/wireless/ath/ath10k/wmi-tlv.c
-@@ -4585,6 +4585,8 @@ static const struct wmi_ops wmi_tlv_ops
+@@ -4591,6 +4591,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,
if (ret)
--- a/drivers/net/wireless/ath/ath10k/mac.c
+++ b/drivers/net/wireless/ath/ath10k/mac.c
-@@ -10079,7 +10079,7 @@ int ath10k_mac_register(struct ath10k *a
+@@ -10074,7 +10074,7 @@ int ath10k_mac_register(struct ath10k *a
ar->hw->weight_multiplier = ATH10K_AIRTIME_WEIGHT_MULTIPLIER;
#ifdef CPTCFG_MAC80211_LEDS
ethtool.o \
--- a/net/mac80211/aead_api.c
+++ /dev/null
-@@ -1,112 +0,0 @@
+@@ -1,113 +0,0 @@
-// SPDX-License-Identifier: GPL-2.0-only
-/*
- * Copyright 2003-2004, Instant802 Networks, Inc.
- struct aead_request *aead_req;
- int reqsize = sizeof(*aead_req) + crypto_aead_reqsize(tfm);
- u8 *__aad;
+- int ret;
-
- aead_req = kzalloc(reqsize + aad_len, GFP_ATOMIC);
- if (!aead_req)
- aead_request_set_crypt(aead_req, sg, sg, data_len, b_0);
- aead_request_set_ad(aead_req, sg[0].length);
-
-- crypto_aead_encrypt(aead_req);
+- ret = crypto_aead_encrypt(aead_req);
- kfree_sensitive(aead_req);
-
-- return 0;
+- return ret;
-}
-
-int aead_decrypt(struct crypto_aead *tfm, u8 *b_0, u8 *aad, size_t aad_len,
static int ieee80211_ifa6_changed(struct notifier_block *nb,
unsigned long data, void *arg)
{
-@@ -1301,14 +1301,14 @@ int ieee80211_register_hw(struct ieee802
+@@ -1312,14 +1312,14 @@ int ieee80211_register_hw(struct ieee802
rtnl_unlock();
local->ifa6_notifier.notifier_call = ieee80211_ifa6_changed;
result = register_inet6addr_notifier(&local->ifa6_notifier);
if (result)
-@@ -1317,13 +1317,13 @@ int ieee80211_register_hw(struct ieee802
+@@ -1328,13 +1328,13 @@ int ieee80211_register_hw(struct ieee802
return 0;
fail_ifa:
#endif
wiphy_unregister(local->hw.wiphy);
-@@ -1351,10 +1351,10 @@ void ieee80211_unregister_hw(struct ieee
+@@ -1362,10 +1362,10 @@ void ieee80211_unregister_hw(struct ieee
tasklet_kill(&local->tx_pending_tasklet);
tasklet_kill(&local->tasklet);
--- a/net/mac80211/cfg.c
+++ b/net/mac80211/cfg.c
-@@ -2442,7 +2442,7 @@ static int ieee80211_scan(struct wiphy *
+@@ -2444,7 +2444,7 @@ static int ieee80211_scan(struct wiphy *
* the frames sent while scanning on other channel will be
* lost)
*/
else
cfg80211_rx_mlme_mgmt(sdata->dev, buf, len);
-@@ -4716,7 +4716,8 @@ void ieee80211_mgd_quiesce(struct ieee80
+@@ -4719,7 +4719,8 @@ void ieee80211_mgd_quiesce(struct ieee80
if (ifmgd->auth_data)
ieee80211_destroy_auth_data(sdata, false);
cfg80211_tx_mlme_mgmt(sdata->dev, frame_buf,
--- a/net/wireless/nl80211.c
+++ b/net/wireless/nl80211.c
-@@ -732,6 +732,7 @@ static const struct nla_policy nl80211_p
+@@ -736,6 +736,7 @@ static const struct nla_policy nl80211_p
NLA_POLICY_EXACT_LEN(IEEE80211_S1G_CAPABILITY_LEN),
[NL80211_ATTR_S1G_CAPABILITY_MASK] =
NLA_POLICY_EXACT_LEN(IEEE80211_S1G_CAPABILITY_LEN),
};
/* policy for the key attributes */
-@@ -15899,7 +15900,7 @@ static void nl80211_send_mlme_event(stru
+@@ -15903,7 +15904,7 @@ static void nl80211_send_mlme_event(stru
const u8 *buf, size_t len,
enum nl80211_commands cmd, gfp_t gfp,
int uapsd_queues, const u8 *req_ies,
{
struct sk_buff *msg;
void *hdr;
-@@ -15921,6 +15922,9 @@ static void nl80211_send_mlme_event(stru
+@@ -15925,6 +15926,9 @@ static void nl80211_send_mlme_event(stru
nla_put(msg, NL80211_ATTR_REQ_IE, req_ies_len, req_ies)))
goto nla_put_failure;
if (uapsd_queues >= 0) {
struct nlattr *nla_wmm =
nla_nest_start_noflag(msg, NL80211_ATTR_STA_WME);
-@@ -15949,7 +15953,8 @@ void nl80211_send_rx_auth(struct cfg8021
+@@ -15953,7 +15957,8 @@ void nl80211_send_rx_auth(struct cfg8021
size_t len, gfp_t gfp)
{
nl80211_send_mlme_event(rdev, netdev, buf, len,
}
void nl80211_send_rx_assoc(struct cfg80211_registered_device *rdev,
-@@ -15959,23 +15964,25 @@ void nl80211_send_rx_assoc(struct cfg802
+@@ -15963,23 +15968,25 @@ void nl80211_send_rx_assoc(struct cfg802
{
nl80211_send_mlme_event(rdev, netdev, buf, len,
NL80211_CMD_ASSOCIATE, gfp, uapsd_queues,
}
void cfg80211_rx_unprot_mlme_mgmt(struct net_device *dev, const u8 *buf,
-@@ -16006,7 +16013,7 @@ void cfg80211_rx_unprot_mlme_mgmt(struct
+@@ -16010,7 +16017,7 @@ void cfg80211_rx_unprot_mlme_mgmt(struct
trace_cfg80211_rx_unprot_mlme_mgmt(dev, buf, len);
nl80211_send_mlme_event(rdev, dev, buf, len, cmd, GFP_ATOMIC, -1,
}
static int ieee80211_auth(struct ieee80211_sub_if_data *sdata)
-@@ -5431,7 +5462,8 @@ int ieee80211_mgd_auth(struct ieee80211_
+@@ -5434,7 +5465,8 @@ int ieee80211_mgd_auth(struct ieee80211_
ieee80211_report_disconnect(sdata, frame_buf,
sizeof(frame_buf), true,
}
sdata_info(sdata, "authenticate with %pM\n", req->bss->bssid);
-@@ -5503,7 +5535,8 @@ int ieee80211_mgd_assoc(struct ieee80211
+@@ -5506,7 +5538,8 @@ int ieee80211_mgd_assoc(struct ieee80211
ieee80211_report_disconnect(sdata, frame_buf,
sizeof(frame_buf), true,
}
if (ifmgd->auth_data && !ifmgd->auth_data->done) {
-@@ -5802,7 +5835,7 @@ int ieee80211_mgd_deauth(struct ieee8021
+@@ -5805,7 +5838,7 @@ int ieee80211_mgd_deauth(struct ieee8021
ieee80211_destroy_auth_data(sdata, false);
ieee80211_report_disconnect(sdata, frame_buf,
sizeof(frame_buf), true,
return 0;
}
-@@ -5822,7 +5855,7 @@ int ieee80211_mgd_deauth(struct ieee8021
+@@ -5825,7 +5858,7 @@ int ieee80211_mgd_deauth(struct ieee8021
ieee80211_destroy_assoc_data(sdata, false, true);
ieee80211_report_disconnect(sdata, frame_buf,
sizeof(frame_buf), true,
return 0;
}
-@@ -5837,7 +5870,7 @@ int ieee80211_mgd_deauth(struct ieee8021
+@@ -5840,7 +5873,7 @@ int ieee80211_mgd_deauth(struct ieee8021
req->reason_code, tx, frame_buf);
ieee80211_report_disconnect(sdata, frame_buf,
sizeof(frame_buf), true,
return 0;
}
-@@ -5870,7 +5903,7 @@ int ieee80211_mgd_disassoc(struct ieee80
+@@ -5873,7 +5906,7 @@ int ieee80211_mgd_disassoc(struct ieee80
frame_buf);
ieee80211_report_disconnect(sdata, frame_buf, sizeof(frame_buf), true,
+++ /dev/null
-From: Johannes Berg <johannes.berg@intel.com>
-Date: Tue, 23 Mar 2021 21:05:01 +0100
-Subject: [PATCH] mac80211: fix TXQ AC confusion
-
-Normally, TXQs have
-
- txq->tid = tid;
- txq->ac = ieee80211_ac_from_tid(tid);
-
-However, the special management TXQ actually has
-
- txq->tid = IEEE80211_NUM_TIDS; // 16
- txq->ac = IEEE80211_AC_VO;
-
-This makes sense, but ieee80211_ac_from_tid(16) is the same
-as ieee80211_ac_from_tid(0) which is just IEEE80211_AC_BE.
-
-Now, normally this is fine. However, if the netdev queues
-were stopped, then the code in ieee80211_tx_dequeue() will
-propagate the stop from the interface (vif->txqs_stopped[])
-if the AC 2 (ieee80211_ac_from_tid(txq->tid)) is marked as
-stopped. On wake, however, __ieee80211_wake_txqs() will wake
-the TXQ if AC 0 (txq->ac) is woken up.
-
-If a driver stops all queues with ieee80211_stop_tx_queues()
-and then wakes them again with ieee80211_wake_tx_queues(),
-the ieee80211_wake_txqs() tasklet will run to resync queue
-and TXQ state. If all queues were woken, then what'll happen
-is that _ieee80211_wake_txqs() will run in order of HW queues
-0-3, typically (and certainly for iwlwifi) corresponding to
-ACs 0-3, so it'll call __ieee80211_wake_txqs() for each AC in
-order 0-3.
-
-When __ieee80211_wake_txqs() is called for AC 0 (VO) that'll
-wake up the management TXQ (remember its tid is 16), and the
-driver's wake_tx_queue() will be called. That tries to get a
-frame, which will immediately *stop* the TXQ again, because
-now we check against AC 2, and AC 2 hasn't yet been marked as
-woken up again in sdata->vif.txqs_stopped[] since we're only
-in the __ieee80211_wake_txqs() call for AC 0.
-
-Thus, the management TXQ will never be started again.
-
-Fix this by checking txq->ac directly instead of calculating
-the AC as ieee80211_ac_from_tid(txq->tid).
-
-Fixes: adf8ed01e4fd ("mac80211: add an optional TXQ for other PS-buffered frames")
-Signed-off-by: Johannes Berg <johannes.berg@intel.com>
----
-
---- a/net/mac80211/tx.c
-+++ b/net/mac80211/tx.c
-@@ -3589,7 +3589,7 @@ begin:
- test_bit(IEEE80211_TXQ_STOP_NETIF_TX, &txqi->flags))
- goto out;
-
-- if (vif->txqs_stopped[ieee80211_ac_from_tid(txq->tid)]) {
-+ if (vif->txqs_stopped[txq->ac]) {
- set_bit(IEEE80211_TXQ_STOP_NETIF_TX, &txqi->flags);
- goto out;
- }
+++ /dev/null
-From: Ben Greear <greearb@candelatech.com>
-Date: Tue, 30 Mar 2021 16:07:49 -0700
-Subject: [PATCH] mac80211: fix time-is-after bug in mlme
-
-The incorrect timeout check caused probing to happen when it did
-not need to happen. This in turn caused tx performance drop
-for around 5 seconds in ath10k-ct driver. Possibly that tx drop
-is due to a secondary issue, but fixing the probe to not happen
-when traffic is running fixes the symptom.
-
-Signed-off-by: Ben Greear <greearb@candelatech.com>
-Fixes: 9abf4e49830d ("mac80211: optimize station connection monitor")
-Acked-by: Felix Fietkau <nbd@nbd.name>
-Link: https://lore.kernel.org/r/20210330230749.14097-1-greearb@candelatech.com
-Signed-off-by: Johannes Berg <johannes.berg@intel.com>
----
-
---- a/net/mac80211/mlme.c
-+++ b/net/mac80211/mlme.c
-@@ -4691,7 +4691,10 @@ static void ieee80211_sta_conn_mon_timer
- timeout = sta->rx_stats.last_rx;
- timeout += IEEE80211_CONNECTION_IDLE_TIME;
-
-- if (time_is_before_jiffies(timeout)) {
-+ /* If timeout is after now, then update timer to fire at
-+ * the later date, but do not actually probe at this time.
-+ */
-+ if (time_is_after_jiffies(timeout)) {
- mod_timer(&ifmgd->conn_mon_timer, round_jiffies_up(timeout));
- return;
- }
__NL80211_ATTR_AFTER_LAST,
--- a/net/mac80211/cfg.c
+++ b/net/mac80211/cfg.c
-@@ -2707,6 +2707,19 @@ static int ieee80211_get_tx_power(struct
+@@ -2709,6 +2709,19 @@ static int ieee80211_get_tx_power(struct
return 0;
}
static int ieee80211_set_wds_peer(struct wiphy *wiphy, struct net_device *dev,
const u8 *addr)
{
-@@ -4137,6 +4150,7 @@ const struct cfg80211_ops mac80211_confi
+@@ -4139,6 +4152,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,
local->hw.max_mtu = IEEE80211_MAX_DATA_LEN;
--- a/net/wireless/nl80211.c
+++ b/net/wireless/nl80211.c
-@@ -733,6 +733,7 @@ static const struct nla_policy nl80211_p
+@@ -737,6 +737,7 @@ static const struct nla_policy nl80211_p
[NL80211_ATTR_S1G_CAPABILITY_MASK] =
NLA_POLICY_EXACT_LEN(IEEE80211_S1G_CAPABILITY_LEN),
[NL80211_ATTR_RECONNECT_REQUESTED] = { .type = NLA_REJECT },
};
/* policy for the key attributes */
-@@ -3241,6 +3242,20 @@ static int nl80211_set_wiphy(struct sk_b
+@@ -3245,6 +3246,20 @@ static int nl80211_set_wiphy(struct sk_b
if (result)
return result;
}