mac80211: Update to version 5.15.148-1

This update mac80211 to version 5.15.148-1. This includes multiple
bugfixes. Some of these bugfixes are fixing security relevant bugs.

The following patch was integrated into upstream Linux:
package/kernel/mac80211/patches/subsys/352-wifi-mac80211-fix-invalid-drv_sta_pre_rcu_remove-cal.patch

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
This commit is contained in:
Hauke Mehrtens 2024-01-28 00:24:42 +01:00
parent 228cf39d92
commit 2c67fff961
41 changed files with 142 additions and 167 deletions

View File

@ -10,10 +10,10 @@ include $(INCLUDE_DIR)/kernel.mk
PKG_NAME:=mac80211 PKG_NAME:=mac80211
PKG_VERSION:=5.15.92-1 PKG_VERSION:=5.15.148-1
PKG_RELEASE:=1 PKG_RELEASE:=1
PKG_SOURCE_URL:=@KERNEL/linux/kernel/projects/backports/stable/v5.15.92/ PKG_SOURCE_URL:=@KERNEL/linux/kernel/projects/backports/stable/v5.15.148
PKG_HASH:=d518e3614a0a8b635e7b7febf2a3ee1645a95d953fd353920ceee22f159f26f1 PKG_HASH:=3ec31964844cbb8f7c7af4da8ae765446572934a334926102ed2f3baebb87c06
PKG_SOURCE:=backports-$(PKG_VERSION).tar.xz PKG_SOURCE:=backports-$(PKG_VERSION).tar.xz
PKG_BUILD_DIR:=$(KERNEL_BUILD_DIR)/backports-$(PKG_VERSION) PKG_BUILD_DIR:=$(KERNEL_BUILD_DIR)/backports-$(PKG_VERSION)

View File

@ -14,7 +14,7 @@
CFLAGS_trace.o := -I$(src) CFLAGS_trace.o := -I$(src)
--- a/drivers/net/wireless/ath/ath.h --- a/drivers/net/wireless/ath/ath.h
+++ b/drivers/net/wireless/ath/ath.h +++ b/drivers/net/wireless/ath/ath.h
@@ -317,14 +317,7 @@ void _ath_dbg(struct ath_common *common, @@ -319,14 +319,7 @@ void _ath_dbg(struct ath_common *common,
#endif /* CPTCFG_ATH_DEBUG */ #endif /* CPTCFG_ATH_DEBUG */
/** Returns string describing opmode, or NULL if unknown mode. */ /** Returns string describing opmode, or NULL if unknown mode. */

View File

@ -1,6 +1,6 @@
--- a/net/wireless/reg.c --- a/net/wireless/reg.c
+++ b/net/wireless/reg.c +++ b/net/wireless/reg.c
@@ -3315,6 +3315,8 @@ void regulatory_hint_country_ie(struct w @@ -3313,6 +3313,8 @@ void regulatory_hint_country_ie(struct w
enum environment_cap env = ENVIRON_ANY; enum environment_cap env = ENVIRON_ANY;
struct regulatory_request *request = NULL, *lr; struct regulatory_request *request = NULL, *lr;
@ -9,7 +9,7 @@
/* IE len must be evenly divisible by 2 */ /* IE len must be evenly divisible by 2 */
if (country_ie_len & 0x01) if (country_ie_len & 0x01)
return; return;
@@ -3566,6 +3568,7 @@ static bool is_wiphy_all_set_reg_flag(en @@ -3564,6 +3566,7 @@ static bool is_wiphy_all_set_reg_flag(en
void regulatory_hint_disconnect(void) void regulatory_hint_disconnect(void)
{ {

View File

@ -64,7 +64,7 @@
debugfs_create_devm_seqfile(sc->dev, "interrupt", sc->debug.debugfs_phy, debugfs_create_devm_seqfile(sc->dev, "interrupt", sc->debug.debugfs_phy,
--- a/drivers/net/wireless/ath/ath.h --- a/drivers/net/wireless/ath/ath.h
+++ b/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; int debug_mask;
enum ath_device_state state; enum ath_device_state state;
unsigned long op_flags; unsigned long op_flags;

View File

@ -10,7 +10,7 @@ Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c --- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c +++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c
@@ -715,8 +715,36 @@ static struct wireless_dev *brcmf_cfg802 @@ -718,8 +718,36 @@ static struct wireless_dev *brcmf_cfg802
struct brcmf_cfg80211_info *cfg = wiphy_to_cfg(wiphy); struct brcmf_cfg80211_info *cfg = wiphy_to_cfg(wiphy);
struct brcmf_pub *drvr = cfg->pub; struct brcmf_pub *drvr = cfg->pub;
struct wireless_dev *wdev; struct wireless_dev *wdev;

View File

@ -14,7 +14,7 @@ Signed-off-by: Phil Elwell <phil@raspberrypi.org>
--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c --- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c +++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c
@@ -2974,6 +2974,10 @@ brcmf_cfg80211_set_power_mgmt(struct wip @@ -2978,6 +2978,10 @@ brcmf_cfg80211_set_power_mgmt(struct wip
* preference in cfg struct to apply this to * preference in cfg struct to apply this to
* FW later while initializing the dongle * FW later while initializing the dongle
*/ */

View File

@ -1,6 +1,6 @@
--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c --- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c +++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c
@@ -2921,6 +2921,63 @@ done: @@ -2925,6 +2925,63 @@ done:
} }
static int static int
@ -64,7 +64,7 @@
brcmf_cfg80211_dump_station(struct wiphy *wiphy, struct net_device *ndev, brcmf_cfg80211_dump_station(struct wiphy *wiphy, struct net_device *ndev,
int idx, u8 *mac, struct station_info *sinfo) int idx, u8 *mac, struct station_info *sinfo)
{ {
@@ -3021,6 +3078,7 @@ static s32 brcmf_inform_single_bss(struc @@ -3025,6 +3082,7 @@ static s32 brcmf_inform_single_bss(struc
struct brcmu_chan ch; struct brcmu_chan ch;
u16 channel; u16 channel;
u32 freq; u32 freq;
@ -72,7 +72,7 @@
u16 notify_capability; u16 notify_capability;
u16 notify_interval; u16 notify_interval;
u8 *notify_ie; u8 *notify_ie;
@@ -3045,6 +3103,17 @@ static s32 brcmf_inform_single_bss(struc @@ -3049,6 +3107,17 @@ static s32 brcmf_inform_single_bss(struc
band = NL80211_BAND_5GHZ; band = NL80211_BAND_5GHZ;
freq = ieee80211_channel_to_frequency(channel, band); freq = ieee80211_channel_to_frequency(channel, band);
@ -90,7 +90,7 @@
bss_data.chan = ieee80211_get_channel(wiphy, freq); bss_data.chan = ieee80211_get_channel(wiphy, freq);
bss_data.scan_width = NL80211_BSS_CHAN_WIDTH_20; bss_data.scan_width = NL80211_BSS_CHAN_WIDTH_20;
bss_data.boottime_ns = ktime_to_ns(ktime_get_boottime()); bss_data.boottime_ns = ktime_to_ns(ktime_get_boottime());
@@ -5573,6 +5642,7 @@ static struct cfg80211_ops brcmf_cfg8021 @@ -5577,6 +5646,7 @@ static struct cfg80211_ops brcmf_cfg8021
.leave_ibss = brcmf_cfg80211_leave_ibss, .leave_ibss = brcmf_cfg80211_leave_ibss,
.get_station = brcmf_cfg80211_get_station, .get_station = brcmf_cfg80211_get_station,
.dump_station = brcmf_cfg80211_dump_station, .dump_station = brcmf_cfg80211_dump_station,
@ -100,7 +100,7 @@
.add_key = brcmf_cfg80211_add_key, .add_key = brcmf_cfg80211_add_key,
--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/core.c --- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/core.c
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/core.c +++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/core.c
@@ -1362,6 +1362,8 @@ int brcmf_attach(struct device *dev) @@ -1363,6 +1363,8 @@ int brcmf_attach(struct device *dev)
/* Link to bus module */ /* Link to bus module */
drvr->hdrlen = 0; drvr->hdrlen = 0;
@ -109,7 +109,7 @@
/* Attach and link in the protocol */ /* Attach and link in the protocol */
ret = brcmf_proto_attach(drvr); ret = brcmf_proto_attach(drvr);
@@ -1444,6 +1446,12 @@ void brcmf_detach(struct device *dev) @@ -1445,6 +1447,12 @@ void brcmf_detach(struct device *dev)
if (drvr == NULL) if (drvr == NULL)
return; return;

View File

@ -1,6 +1,6 @@
--- a/drivers/net/wireless/intel/ipw2x00/ipw2200.c --- a/drivers/net/wireless/intel/ipw2x00/ipw2200.c
+++ b/drivers/net/wireless/intel/ipw2x00/ipw2200.c +++ b/drivers/net/wireless/intel/ipw2x00/ipw2200.c
@@ -11470,6 +11470,15 @@ static const struct attribute_group ipw_ @@ -11475,6 +11475,15 @@ static const struct attribute_group ipw_
.attrs = ipw_sysfs_entries, .attrs = ipw_sysfs_entries,
}; };
@ -16,7 +16,7 @@
#ifdef CPTCFG_IPW2200_PROMISCUOUS #ifdef CPTCFG_IPW2200_PROMISCUOUS
static int ipw_prom_open(struct net_device *dev) static int ipw_prom_open(struct net_device *dev)
{ {
@@ -11518,15 +11527,6 @@ static netdev_tx_t ipw_prom_hard_start_x @@ -11523,15 +11532,6 @@ static netdev_tx_t ipw_prom_hard_start_x
return NETDEV_TX_OK; return NETDEV_TX_OK;
} }

View File

@ -11,7 +11,7 @@
err_wiphy_new: err_wiphy_new:
--- a/drivers/net/wireless/marvell/libertas/main.c --- a/drivers/net/wireless/marvell/libertas/main.c
+++ b/drivers/net/wireless/marvell/libertas/main.c +++ b/drivers/net/wireless/marvell/libertas/main.c
@@ -935,6 +935,7 @@ struct lbs_private *lbs_add_card(void *c @@ -936,6 +936,7 @@ struct lbs_private *lbs_add_card(void *c
goto err_adapter; goto err_adapter;
} }

View File

@ -42,8 +42,8 @@ Acked-by: Stanislaw Gruszka <stf_xl@wp.pl>
--- a/drivers/net/wireless/ralink/rt2x00/rt2x00dev.c --- a/drivers/net/wireless/ralink/rt2x00/rt2x00dev.c
+++ b/drivers/net/wireless/ralink/rt2x00/rt2x00dev.c +++ b/drivers/net/wireless/ralink/rt2x00/rt2x00dev.c
@@ -1093,6 +1093,19 @@ static void rt2x00lib_remove_hw(struct r @@ -1094,6 +1094,19 @@ static void rt2x00lib_remove_hw(struct r
kfree(rt2x00dev->spec.channels_info); kfree(rt2x00dev->chan_survey);
} }
+static const struct ieee80211_tpt_blink rt2x00_tpt_blink[] = { +static const struct ieee80211_tpt_blink rt2x00_tpt_blink[] = {
@ -62,7 +62,7 @@ Acked-by: Stanislaw Gruszka <stf_xl@wp.pl>
static int rt2x00lib_probe_hw(struct rt2x00_dev *rt2x00dev) static int rt2x00lib_probe_hw(struct rt2x00_dev *rt2x00dev)
{ {
struct hw_mode_spec *spec = &rt2x00dev->spec; struct hw_mode_spec *spec = &rt2x00dev->spec;
@@ -1174,6 +1187,11 @@ static int rt2x00lib_probe_hw(struct rt2 @@ -1175,6 +1188,11 @@ static int rt2x00lib_probe_hw(struct rt2
#undef RT2X00_TASKLET_INIT #undef RT2X00_TASKLET_INIT

View File

@ -127,7 +127,7 @@
DECLARE_KFIFO_PTR(txstatus_fifo, u32); DECLARE_KFIFO_PTR(txstatus_fifo, u32);
--- a/drivers/net/wireless/ralink/rt2x00/rt2x00dev.c --- a/drivers/net/wireless/ralink/rt2x00/rt2x00dev.c
+++ b/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 @@ -1420,6 +1420,10 @@ int rt2x00lib_probe_dev(struct rt2x00_de
INIT_DELAYED_WORK(&rt2x00dev->autowakeup_work, rt2x00lib_autowakeup); INIT_DELAYED_WORK(&rt2x00dev->autowakeup_work, rt2x00lib_autowakeup);
INIT_WORK(&rt2x00dev->sleep_work, rt2x00lib_sleep); INIT_WORK(&rt2x00dev->sleep_work, rt2x00lib_sleep);
@ -138,7 +138,7 @@
/* /*
* Let the driver probe the device to detect the capabilities. * Let the driver probe the device to detect the capabilities.
*/ */
@@ -1559,6 +1563,11 @@ void rt2x00lib_remove_dev(struct rt2x00_ @@ -1560,6 +1564,11 @@ void rt2x00lib_remove_dev(struct rt2x00_
* Free the driver data. * Free the driver data.
*/ */
kfree(rt2x00dev->drv_data); kfree(rt2x00dev->drv_data);

View File

@ -1,6 +1,6 @@
--- a/drivers/net/wireless/ralink/rt2x00/rt2x00dev.c --- a/drivers/net/wireless/ralink/rt2x00/rt2x00dev.c
+++ b/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 @@ -1359,7 +1359,7 @@ static inline void rt2x00lib_set_if_comb
*/ */
if_limit = &rt2x00dev->if_limits_ap; if_limit = &rt2x00dev->if_limits_ap;
if_limit->max = rt2x00dev->ops->max_ap_intf; if_limit->max = rt2x00dev->ops->max_ap_intf;

View File

@ -13,7 +13,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
--- a/net/mac80211/tx.c --- a/net/mac80211/tx.c
+++ b/net/mac80211/tx.c +++ b/net/mac80211/tx.c
@@ -3820,7 +3820,7 @@ struct ieee80211_txq *ieee80211_next_txq @@ -3821,7 +3821,7 @@ struct ieee80211_txq *ieee80211_next_txq
{ {
struct ieee80211_local *local = hw_to_local(hw); struct ieee80211_local *local = hw_to_local(hw);
struct airtime_sched_info *air_sched; struct airtime_sched_info *air_sched;
@ -22,7 +22,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
struct ieee80211_txq *ret = NULL; struct ieee80211_txq *ret = NULL;
struct airtime_info *air_info; struct airtime_info *air_info;
struct txq_info *txqi = NULL; struct txq_info *txqi = NULL;
@@ -3947,7 +3947,7 @@ void ieee80211_update_airtime_weight(str @@ -3948,7 +3948,7 @@ void ieee80211_update_airtime_weight(str
u64 weight_sum = 0; u64 weight_sum = 0;
if (unlikely(!now)) if (unlikely(!now))
@ -31,7 +31,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
lockdep_assert_held(&air_sched->lock); lockdep_assert_held(&air_sched->lock);
@@ -3973,7 +3973,7 @@ void ieee80211_schedule_txq(struct ieee8 @@ -3974,7 +3974,7 @@ void ieee80211_schedule_txq(struct ieee8
struct ieee80211_local *local = hw_to_local(hw); struct ieee80211_local *local = hw_to_local(hw);
struct txq_info *txqi = to_txq_info(txq); struct txq_info *txqi = to_txq_info(txq);
struct airtime_sched_info *air_sched; struct airtime_sched_info *air_sched;
@ -40,7 +40,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
struct airtime_info *air_info; struct airtime_info *air_info;
u8 ac = txq->ac; u8 ac = txq->ac;
bool was_active; bool was_active;
@@ -4031,7 +4031,7 @@ static void __ieee80211_unschedule_txq(s @@ -4032,7 +4032,7 @@ static void __ieee80211_unschedule_txq(s
if (!purge) if (!purge)
airtime_set_active(air_sched, air_info, airtime_set_active(air_sched, air_info,
@ -49,7 +49,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
rb_erase_cached(&txqi->schedule_order, rb_erase_cached(&txqi->schedule_order,
&air_sched->active_txqs); &air_sched->active_txqs);
@@ -4119,7 +4119,7 @@ bool ieee80211_txq_may_transmit(struct i @@ -4120,7 +4120,7 @@ bool ieee80211_txq_may_transmit(struct i
if (RB_EMPTY_NODE(&txqi->schedule_order)) if (RB_EMPTY_NODE(&txqi->schedule_order))
goto out; goto out;

View File

@ -14,7 +14,7 @@ Signed-off-by: Johannes Berg <johannes.berg@intel.com>
--- a/net/mac80211/tx.c --- a/net/mac80211/tx.c
+++ b/net/mac80211/tx.c +++ b/net/mac80211/tx.c
@@ -4987,6 +4987,115 @@ static int ieee80211_beacon_protect(stru @@ -4988,6 +4988,115 @@ static int ieee80211_beacon_protect(stru
return 0; return 0;
} }
@ -130,7 +130,7 @@ Signed-off-by: Johannes Berg <johannes.berg@intel.com>
static struct sk_buff * static struct sk_buff *
__ieee80211_beacon_get(struct ieee80211_hw *hw, __ieee80211_beacon_get(struct ieee80211_hw *hw,
struct ieee80211_vif *vif, struct ieee80211_vif *vif,
@@ -4996,12 +5105,8 @@ __ieee80211_beacon_get(struct ieee80211_ @@ -4997,12 +5106,8 @@ __ieee80211_beacon_get(struct ieee80211_
struct ieee80211_local *local = hw_to_local(hw); struct ieee80211_local *local = hw_to_local(hw);
struct beacon_data *beacon = NULL; struct beacon_data *beacon = NULL;
struct sk_buff *skb = NULL; struct sk_buff *skb = NULL;
@ -143,7 +143,7 @@ Signed-off-by: Johannes Berg <johannes.berg@intel.com>
rcu_read_lock(); rcu_read_lock();
@@ -5018,48 +5123,11 @@ __ieee80211_beacon_get(struct ieee80211_ @@ -5019,48 +5124,11 @@ __ieee80211_beacon_get(struct ieee80211_
struct ieee80211_if_ap *ap = &sdata->u.ap; struct ieee80211_if_ap *ap = &sdata->u.ap;
beacon = rcu_dereference(ap->beacon); beacon = rcu_dereference(ap->beacon);
@ -196,7 +196,7 @@ Signed-off-by: Johannes Berg <johannes.berg@intel.com>
} else if (sdata->vif.type == NL80211_IFTYPE_ADHOC) { } else if (sdata->vif.type == NL80211_IFTYPE_ADHOC) {
struct ieee80211_if_ibss *ifibss = &sdata->u.ibss; struct ieee80211_if_ibss *ifibss = &sdata->u.ibss;
struct ieee80211_hdr *hdr; struct ieee80211_hdr *hdr;
@@ -5085,6 +5153,9 @@ __ieee80211_beacon_get(struct ieee80211_ @@ -5086,6 +5154,9 @@ __ieee80211_beacon_get(struct ieee80211_
hdr = (struct ieee80211_hdr *) skb->data; hdr = (struct ieee80211_hdr *) skb->data;
hdr->frame_control = cpu_to_le16(IEEE80211_FTYPE_MGMT | hdr->frame_control = cpu_to_le16(IEEE80211_FTYPE_MGMT |
IEEE80211_STYPE_BEACON); IEEE80211_STYPE_BEACON);
@ -206,7 +206,7 @@ Signed-off-by: Johannes Berg <johannes.berg@intel.com>
} else if (ieee80211_vif_is_mesh(&sdata->vif)) { } else if (ieee80211_vif_is_mesh(&sdata->vif)) {
struct ieee80211_if_mesh *ifmsh = &sdata->u.mesh; struct ieee80211_if_mesh *ifmsh = &sdata->u.mesh;
@@ -5124,51 +5195,13 @@ __ieee80211_beacon_get(struct ieee80211_ @@ -5125,51 +5196,13 @@ __ieee80211_beacon_get(struct ieee80211_
} }
skb_put_data(skb, beacon->tail, beacon->tail_len); skb_put_data(skb, beacon->tail, beacon->tail_len);

View File

@ -22,7 +22,7 @@ Signed-off-by: Johannes Berg <johannes.berg@intel.com>
--- a/include/net/cfg80211.h --- a/include/net/cfg80211.h
+++ b/include/net/cfg80211.h +++ b/include/net/cfg80211.h
@@ -1046,6 +1046,36 @@ struct cfg80211_crypto_settings { @@ -1049,6 +1049,36 @@ struct cfg80211_crypto_settings {
}; };
/** /**
@ -59,7 +59,7 @@ Signed-off-by: Johannes Berg <johannes.berg@intel.com>
* struct cfg80211_beacon_data - beacon data * struct cfg80211_beacon_data - beacon data
* @head: head portion of beacon (before TIM IE) * @head: head portion of beacon (before TIM IE)
* or %NULL if not changed * or %NULL if not changed
@@ -1063,6 +1093,7 @@ struct cfg80211_crypto_settings { @@ -1066,6 +1096,7 @@ struct cfg80211_crypto_settings {
* @assocresp_ies_len: length of assocresp_ies in octets * @assocresp_ies_len: length of assocresp_ies in octets
* @probe_resp_len: length of probe response template (@probe_resp) * @probe_resp_len: length of probe response template (@probe_resp)
* @probe_resp: probe response template (AP mode only) * @probe_resp: probe response template (AP mode only)
@ -67,7 +67,7 @@ Signed-off-by: Johannes Berg <johannes.berg@intel.com>
* @ftm_responder: enable FTM responder functionality; -1 for no change * @ftm_responder: enable FTM responder functionality; -1 for no change
* (which also implies no change in LCI/civic location data) * (which also implies no change in LCI/civic location data)
* @lci: Measurement Report element content, starting with Measurement Token * @lci: Measurement Report element content, starting with Measurement Token
@@ -1080,6 +1111,7 @@ struct cfg80211_beacon_data { @@ -1083,6 +1114,7 @@ struct cfg80211_beacon_data {
const u8 *probe_resp; const u8 *probe_resp;
const u8 *lci; const u8 *lci;
const u8 *civicloc; const u8 *civicloc;
@ -75,7 +75,7 @@ Signed-off-by: Johannes Berg <johannes.berg@intel.com>
s8 ftm_responder; s8 ftm_responder;
size_t head_len, tail_len; size_t head_len, tail_len;
@@ -1194,6 +1226,7 @@ enum cfg80211_ap_settings_flags { @@ -1197,6 +1229,7 @@ enum cfg80211_ap_settings_flags {
* @he_oper: HE operation IE (or %NULL if HE isn't enabled) * @he_oper: HE operation IE (or %NULL if HE isn't enabled)
* @fils_discovery: FILS discovery transmission parameters * @fils_discovery: FILS discovery transmission parameters
* @unsol_bcast_probe_resp: Unsolicited broadcast probe response parameters * @unsol_bcast_probe_resp: Unsolicited broadcast probe response parameters
@ -83,7 +83,7 @@ Signed-off-by: Johannes Berg <johannes.berg@intel.com>
*/ */
struct cfg80211_ap_settings { struct cfg80211_ap_settings {
struct cfg80211_chan_def chandef; struct cfg80211_chan_def chandef;
@@ -1226,6 +1259,7 @@ struct cfg80211_ap_settings { @@ -1229,6 +1262,7 @@ struct cfg80211_ap_settings {
struct cfg80211_he_bss_color he_bss_color; struct cfg80211_he_bss_color he_bss_color;
struct cfg80211_fils_discovery fils_discovery; struct cfg80211_fils_discovery fils_discovery;
struct cfg80211_unsol_bcast_probe_resp unsol_bcast_probe_resp; struct cfg80211_unsol_bcast_probe_resp unsol_bcast_probe_resp;
@ -91,7 +91,7 @@ Signed-off-by: Johannes Berg <johannes.berg@intel.com>
}; };
/** /**
@@ -4986,6 +5020,13 @@ struct wiphy_iftype_akm_suites { @@ -4989,6 +5023,13 @@ struct wiphy_iftype_akm_suites {
* %NL80211_TID_CONFIG_ATTR_RETRY_LONG attributes * %NL80211_TID_CONFIG_ATTR_RETRY_LONG attributes
* @sar_capa: SAR control capabilities * @sar_capa: SAR control capabilities
* @rfkill: a pointer to the rfkill structure * @rfkill: a pointer to the rfkill structure
@ -105,7 +105,7 @@ Signed-off-by: Johannes Berg <johannes.berg@intel.com>
*/ */
struct wiphy { struct wiphy {
struct mutex mtx; struct mutex mtx;
@@ -5133,6 +5174,9 @@ struct wiphy { @@ -5136,6 +5177,9 @@ struct wiphy {
struct rfkill *rfkill; struct rfkill *rfkill;
@ -221,7 +221,7 @@ Signed-off-by: Johannes Berg <johannes.berg@intel.com>
#endif /* __LINUX_NL80211_H */ #endif /* __LINUX_NL80211_H */
--- a/net/wireless/nl80211.c --- a/net/wireless/nl80211.c
+++ b/net/wireless/nl80211.c +++ b/net/wireless/nl80211.c
@@ -442,6 +442,16 @@ sar_policy[NL80211_SAR_ATTR_MAX + 1] = { @@ -443,6 +443,16 @@ sar_policy[NL80211_SAR_ATTR_MAX + 1] = {
[NL80211_SAR_ATTR_SPECS] = NLA_POLICY_NESTED_ARRAY(sar_specs_policy), [NL80211_SAR_ATTR_SPECS] = NLA_POLICY_NESTED_ARRAY(sar_specs_policy),
}; };
@ -238,7 +238,7 @@ Signed-off-by: Johannes Berg <johannes.berg@intel.com>
static const struct nla_policy nl80211_policy[NUM_NL80211_ATTR] = { static const struct nla_policy nl80211_policy[NUM_NL80211_ATTR] = {
[0] = { .strict_start_type = NL80211_ATTR_HE_OBSS_PD }, [0] = { .strict_start_type = NL80211_ATTR_HE_OBSS_PD },
[NL80211_ATTR_WIPHY] = { .type = NLA_U32 }, [NL80211_ATTR_WIPHY] = { .type = NLA_U32 },
@@ -788,6 +798,9 @@ static const struct nla_policy nl80211_p @@ -789,6 +799,9 @@ static const struct nla_policy nl80211_p
[NL80211_ATTR_COLOR_CHANGE_COUNT] = { .type = NLA_U8 }, [NL80211_ATTR_COLOR_CHANGE_COUNT] = { .type = NLA_U8 },
[NL80211_ATTR_COLOR_CHANGE_COLOR] = { .type = NLA_U8 }, [NL80211_ATTR_COLOR_CHANGE_COLOR] = { .type = NLA_U8 },
[NL80211_ATTR_COLOR_CHANGE_ELEMS] = NLA_POLICY_NESTED(nl80211_policy), [NL80211_ATTR_COLOR_CHANGE_ELEMS] = NLA_POLICY_NESTED(nl80211_policy),
@ -248,7 +248,7 @@ Signed-off-by: Johannes Berg <johannes.berg@intel.com>
}; };
/* policy for the key attributes */ /* policy for the key attributes */
@@ -2236,6 +2249,35 @@ fail: @@ -2237,6 +2250,35 @@ fail:
return -ENOBUFS; return -ENOBUFS;
} }
@ -284,7 +284,7 @@ Signed-off-by: Johannes Berg <johannes.berg@intel.com>
struct nl80211_dump_wiphy_state { struct nl80211_dump_wiphy_state {
s64 filter_wiphy; s64 filter_wiphy;
long start; long start;
@@ -2821,6 +2863,9 @@ static int nl80211_send_wiphy(struct cfg @@ -2822,6 +2864,9 @@ static int nl80211_send_wiphy(struct cfg
if (nl80211_put_sar_specs(rdev, msg)) if (nl80211_put_sar_specs(rdev, msg))
goto nla_put_failure; goto nla_put_failure;
@ -294,7 +294,7 @@ Signed-off-by: Johannes Berg <johannes.berg@intel.com>
/* done */ /* done */
state->split_start = 0; state->split_start = 0;
break; break;
@@ -5020,6 +5065,96 @@ static int validate_beacon_tx_rate(struc @@ -5021,6 +5066,96 @@ static int validate_beacon_tx_rate(struc
return 0; return 0;
} }
@ -391,7 +391,7 @@ Signed-off-by: Johannes Berg <johannes.berg@intel.com>
static int nl80211_parse_beacon(struct cfg80211_registered_device *rdev, static int nl80211_parse_beacon(struct cfg80211_registered_device *rdev,
struct nlattr *attrs[], struct nlattr *attrs[],
struct cfg80211_beacon_data *bcn) struct cfg80211_beacon_data *bcn)
@@ -5100,6 +5235,17 @@ static int nl80211_parse_beacon(struct c @@ -5101,6 +5236,17 @@ static int nl80211_parse_beacon(struct c
bcn->ftm_responder = -1; bcn->ftm_responder = -1;
} }
@ -409,7 +409,7 @@ Signed-off-by: Johannes Berg <johannes.berg@intel.com>
return 0; return 0;
} }
@@ -5556,6 +5702,17 @@ static int nl80211_start_ap(struct sk_bu @@ -5557,6 +5703,17 @@ static int nl80211_start_ap(struct sk_bu
goto out; goto out;
} }
@ -427,7 +427,7 @@ Signed-off-by: Johannes Berg <johannes.berg@intel.com>
nl80211_calculate_ap_params(&params); nl80211_calculate_ap_params(&params);
if (info->attrs[NL80211_ATTR_EXTERNAL_AUTH_SUPPORT]) if (info->attrs[NL80211_ATTR_EXTERNAL_AUTH_SUPPORT])
@@ -5577,6 +5734,11 @@ static int nl80211_start_ap(struct sk_bu @@ -5578,6 +5735,11 @@ static int nl80211_start_ap(struct sk_bu
out: out:
kfree(params.acl); kfree(params.acl);
@ -439,7 +439,7 @@ Signed-off-by: Johannes Berg <johannes.berg@intel.com>
return err; return err;
} }
@@ -5601,12 +5763,14 @@ static int nl80211_set_beacon(struct sk_ @@ -5602,12 +5764,14 @@ static int nl80211_set_beacon(struct sk_
err = nl80211_parse_beacon(rdev, info->attrs, &params); err = nl80211_parse_beacon(rdev, info->attrs, &params);
if (err) if (err)
@ -455,7 +455,7 @@ Signed-off-by: Johannes Berg <johannes.berg@intel.com>
return err; return err;
} }
@@ -9283,12 +9447,14 @@ static int nl80211_channel_switch(struct @@ -9284,12 +9448,14 @@ static int nl80211_channel_switch(struct
err = nl80211_parse_beacon(rdev, info->attrs, &params.beacon_after); err = nl80211_parse_beacon(rdev, info->attrs, &params.beacon_after);
if (err) if (err)
@ -473,7 +473,7 @@ Signed-off-by: Johannes Berg <johannes.berg@intel.com>
err = nla_parse_nested_deprecated(csa_attrs, NL80211_ATTR_MAX, err = nla_parse_nested_deprecated(csa_attrs, NL80211_ATTR_MAX,
info->attrs[NL80211_ATTR_CSA_IES], info->attrs[NL80211_ATTR_CSA_IES],
@@ -9407,6 +9573,8 @@ skip_beacons: @@ -9408,6 +9574,8 @@ skip_beacons:
wdev_unlock(wdev); wdev_unlock(wdev);
free: free:
@ -482,7 +482,7 @@ Signed-off-by: Johannes Berg <johannes.berg@intel.com>
kfree(csa_attrs); kfree(csa_attrs);
return err; return err;
} }
@@ -14959,6 +15127,8 @@ static int nl80211_color_change(struct s @@ -14960,6 +15128,8 @@ static int nl80211_color_change(struct s
wdev_unlock(wdev); wdev_unlock(wdev);
out: out:

View File

@ -28,7 +28,7 @@ Signed-off-by: Johannes Berg <johannes.berg@intel.com>
--- a/include/net/cfg80211.h --- a/include/net/cfg80211.h
+++ b/include/net/cfg80211.h +++ b/include/net/cfg80211.h
@@ -4057,6 +4057,15 @@ struct mgmt_frame_regs { @@ -4060,6 +4060,15 @@ struct mgmt_frame_regs {
* @set_sar_specs: Update the SAR (TX power) settings. * @set_sar_specs: Update the SAR (TX power) settings.
* *
* @color_change: Initiate a color change. * @color_change: Initiate a color change.
@ -44,7 +44,7 @@ Signed-off-by: Johannes Berg <johannes.berg@intel.com>
*/ */
struct cfg80211_ops { struct cfg80211_ops {
int (*suspend)(struct wiphy *wiphy, struct cfg80211_wowlan *wow); int (*suspend)(struct wiphy *wiphy, struct cfg80211_wowlan *wow);
@@ -4387,6 +4396,8 @@ struct cfg80211_ops { @@ -4390,6 +4399,8 @@ struct cfg80211_ops {
int (*color_change)(struct wiphy *wiphy, int (*color_change)(struct wiphy *wiphy,
struct net_device *dev, struct net_device *dev,
struct cfg80211_color_change_settings *params); struct cfg80211_color_change_settings *params);
@ -53,7 +53,7 @@ Signed-off-by: Johannes Berg <johannes.berg@intel.com>
}; };
/* /*
@@ -7608,6 +7619,20 @@ void cfg80211_cac_event(struct net_devic @@ -7611,6 +7622,20 @@ void cfg80211_cac_event(struct net_devic
const struct cfg80211_chan_def *chandef, const struct cfg80211_chan_def *chandef,
enum nl80211_radar_event event, gfp_t gfp); enum nl80211_radar_event event, gfp_t gfp);
@ -119,7 +119,7 @@ Signed-off-by: Johannes Berg <johannes.berg@intel.com>
NUM_NL80211_EXT_FEATURES, NUM_NL80211_EXT_FEATURES,
--- a/net/wireless/core.c --- a/net/wireless/core.c
+++ b/net/wireless/core.c +++ b/net/wireless/core.c
@@ -543,6 +543,7 @@ use_default_name: @@ -545,6 +545,7 @@ use_default_name:
INIT_WORK(&rdev->rfkill_block, cfg80211_rfkill_block_work); INIT_WORK(&rdev->rfkill_block, cfg80211_rfkill_block_work);
INIT_WORK(&rdev->conn_work, cfg80211_conn_work); INIT_WORK(&rdev->conn_work, cfg80211_conn_work);
INIT_WORK(&rdev->event_work, cfg80211_event_work); INIT_WORK(&rdev->event_work, cfg80211_event_work);
@ -127,7 +127,7 @@ Signed-off-by: Johannes Berg <johannes.berg@intel.com>
init_waitqueue_head(&rdev->dev_wait); init_waitqueue_head(&rdev->dev_wait);
@@ -1205,6 +1206,8 @@ void __cfg80211_leave(struct cfg80211_re @@ -1207,6 +1208,8 @@ void __cfg80211_leave(struct cfg80211_re
cfg80211_pmsr_wdev_down(wdev); cfg80211_pmsr_wdev_down(wdev);
@ -286,7 +286,7 @@ Signed-off-by: Johannes Berg <johannes.berg@intel.com>
+} +}
--- a/net/wireless/nl80211.c --- a/net/wireless/nl80211.c
+++ b/net/wireless/nl80211.c +++ b/net/wireless/nl80211.c
@@ -801,6 +801,7 @@ static const struct nla_policy nl80211_p @@ -802,6 +802,7 @@ static const struct nla_policy nl80211_p
[NL80211_ATTR_MBSSID_CONFIG] = [NL80211_ATTR_MBSSID_CONFIG] =
NLA_POLICY_NESTED(nl80211_mbssid_config_policy), NLA_POLICY_NESTED(nl80211_mbssid_config_policy),
[NL80211_ATTR_MBSSID_ELEMS] = { .type = NLA_NESTED }, [NL80211_ATTR_MBSSID_ELEMS] = { .type = NLA_NESTED },
@ -294,7 +294,7 @@ Signed-off-by: Johannes Berg <johannes.berg@intel.com>
}; };
/* policy for the key attributes */ /* policy for the key attributes */
@@ -9287,12 +9288,6 @@ static int nl80211_start_radar_detection @@ -9288,12 +9289,6 @@ static int nl80211_start_radar_detection
if (err) if (err)
return err; return err;
@ -307,7 +307,7 @@ Signed-off-by: Johannes Berg <johannes.berg@intel.com>
err = cfg80211_chandef_dfs_required(wiphy, &chandef, wdev->iftype); err = cfg80211_chandef_dfs_required(wiphy, &chandef, wdev->iftype);
if (err < 0) if (err < 0)
return err; return err;
@@ -9303,6 +9298,16 @@ static int nl80211_start_radar_detection @@ -9304,6 +9299,16 @@ static int nl80211_start_radar_detection
if (!cfg80211_chandef_dfs_usable(wiphy, &chandef)) if (!cfg80211_chandef_dfs_usable(wiphy, &chandef))
return -EINVAL; return -EINVAL;

View File

@ -17,7 +17,7 @@ Signed-off-by: Johannes Berg <johannes.berg@intel.com>
--- a/include/net/cfg80211.h --- a/include/net/cfg80211.h
+++ b/include/net/cfg80211.h +++ b/include/net/cfg80211.h
@@ -7620,19 +7620,13 @@ void cfg80211_cac_event(struct net_devic @@ -7623,19 +7623,13 @@ void cfg80211_cac_event(struct net_devic
enum nl80211_radar_event event, gfp_t gfp); enum nl80211_radar_event event, gfp_t gfp);
/** /**
@ -43,7 +43,7 @@ Signed-off-by: Johannes Berg <johannes.berg@intel.com>
* cfg80211_gtk_rekey_notify - notify userspace about driver rekeying * cfg80211_gtk_rekey_notify - notify userspace about driver rekeying
--- a/net/wireless/core.c --- a/net/wireless/core.c
+++ b/net/wireless/core.c +++ b/net/wireless/core.c
@@ -543,7 +543,9 @@ use_default_name: @@ -545,7 +545,9 @@ use_default_name:
INIT_WORK(&rdev->rfkill_block, cfg80211_rfkill_block_work); INIT_WORK(&rdev->rfkill_block, cfg80211_rfkill_block_work);
INIT_WORK(&rdev->conn_work, cfg80211_conn_work); INIT_WORK(&rdev->conn_work, cfg80211_conn_work);
INIT_WORK(&rdev->event_work, cfg80211_event_work); INIT_WORK(&rdev->event_work, cfg80211_event_work);
@ -54,7 +54,7 @@ Signed-off-by: Johannes Berg <johannes.berg@intel.com>
init_waitqueue_head(&rdev->dev_wait); init_waitqueue_head(&rdev->dev_wait);
@@ -1053,11 +1055,13 @@ void wiphy_unregister(struct wiphy *wiph @@ -1055,11 +1057,13 @@ void wiphy_unregister(struct wiphy *wiph
cancel_work_sync(&rdev->conn_work); cancel_work_sync(&rdev->conn_work);
flush_work(&rdev->event_work); flush_work(&rdev->event_work);
cancel_delayed_work_sync(&rdev->dfs_update_channels_wk); cancel_delayed_work_sync(&rdev->dfs_update_channels_wk);

View File

@ -20,7 +20,7 @@ Signed-off-by: Johannes Berg <johannes.berg@intel.com>
--- a/include/net/cfg80211.h --- a/include/net/cfg80211.h
+++ b/include/net/cfg80211.h +++ b/include/net/cfg80211.h
@@ -7580,15 +7580,33 @@ void cfg80211_cqm_txe_notify(struct net_ @@ -7583,15 +7583,33 @@ void cfg80211_cqm_txe_notify(struct net_
void cfg80211_cqm_beacon_loss_notify(struct net_device *dev, gfp_t gfp); void cfg80211_cqm_beacon_loss_notify(struct net_device *dev, gfp_t gfp);
/** /**

View File

@ -118,7 +118,7 @@ Signed-off-by: Johannes Berg <johannes.berg@intel.com>
NL80211_RADAR_CAC_ABORTED); NL80211_RADAR_CAC_ABORTED);
--- a/net/wireless/nl80211.c --- a/net/wireless/nl80211.c
+++ b/net/wireless/nl80211.c +++ b/net/wireless/nl80211.c
@@ -9278,42 +9278,60 @@ static int nl80211_start_radar_detection @@ -9279,42 +9279,60 @@ static int nl80211_start_radar_detection
struct cfg80211_chan_def chandef; struct cfg80211_chan_def chandef;
enum nl80211_dfs_regions dfs_region; enum nl80211_dfs_regions dfs_region;
unsigned int cac_time_ms; unsigned int cac_time_ms;
@ -198,7 +198,7 @@ Signed-off-by: Johannes Berg <johannes.berg@intel.com>
cac_time_ms = cfg80211_chandef_dfs_cac_time(&rdev->wiphy, &chandef); cac_time_ms = cfg80211_chandef_dfs_cac_time(&rdev->wiphy, &chandef);
if (WARN_ON(!cac_time_ms)) if (WARN_ON(!cac_time_ms))
@@ -9326,6 +9344,9 @@ static int nl80211_start_radar_detection @@ -9327,6 +9345,9 @@ static int nl80211_start_radar_detection
wdev->cac_start_time = jiffies; wdev->cac_start_time = jiffies;
wdev->cac_time_ms = cac_time_ms; wdev->cac_time_ms = cac_time_ms;
} }
@ -208,7 +208,7 @@ Signed-off-by: Johannes Berg <johannes.berg@intel.com>
return err; return err;
} }
@@ -15961,7 +15982,8 @@ static const struct genl_small_ops nl802 @@ -15962,7 +15983,8 @@ static const struct genl_small_ops nl802
.validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP, .validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
.doit = nl80211_start_radar_detection, .doit = nl80211_start_radar_detection,
.flags = GENL_UNS_ADMIN_PERM, .flags = GENL_UNS_ADMIN_PERM,

View File

@ -40,7 +40,7 @@ Signed-off-by: Johannes Berg <johannes.berg@intel.com>
struct ieee80211_vif *vif, struct ieee80211_vif *vif,
--- a/net/mac80211/cfg.c --- a/net/mac80211/cfg.c
+++ b/net/mac80211/cfg.c +++ b/net/mac80211/cfg.c
@@ -4341,6 +4341,18 @@ out: @@ -4345,6 +4345,18 @@ out:
return err; return err;
} }
@ -59,7 +59,7 @@ Signed-off-by: Johannes Berg <johannes.berg@intel.com>
const struct cfg80211_ops mac80211_config_ops = { const struct cfg80211_ops mac80211_config_ops = {
.add_virtual_intf = ieee80211_add_iface, .add_virtual_intf = ieee80211_add_iface,
.del_virtual_intf = ieee80211_del_iface, .del_virtual_intf = ieee80211_del_iface,
@@ -4445,4 +4457,5 @@ const struct cfg80211_ops mac80211_confi @@ -4449,4 +4461,5 @@ const struct cfg80211_ops mac80211_confi
.reset_tid_config = ieee80211_reset_tid_config, .reset_tid_config = ieee80211_reset_tid_config,
.set_sar_specs = ieee80211_set_sar_specs, .set_sar_specs = ieee80211_set_sar_specs,
.color_change = ieee80211_color_change, .color_change = ieee80211_color_change,

View File

@ -21,7 +21,7 @@ Signed-off-by: Johannes Berg <johannes.berg@intel.com>
--- a/include/net/cfg80211.h --- a/include/net/cfg80211.h
+++ b/include/net/cfg80211.h +++ b/include/net/cfg80211.h
@@ -4058,14 +4058,14 @@ struct mgmt_frame_regs { @@ -4061,14 +4061,14 @@ struct mgmt_frame_regs {
* *
* @color_change: Initiate a color change. * @color_change: Initiate a color change.
* *
@ -39,7 +39,7 @@ Signed-off-by: Johannes Berg <johannes.berg@intel.com>
*/ */
struct cfg80211_ops { struct cfg80211_ops {
int (*suspend)(struct wiphy *wiphy, struct cfg80211_wowlan *wow); int (*suspend)(struct wiphy *wiphy, struct cfg80211_wowlan *wow);
@@ -4396,8 +4396,8 @@ struct cfg80211_ops { @@ -4399,8 +4399,8 @@ struct cfg80211_ops {
int (*color_change)(struct wiphy *wiphy, int (*color_change)(struct wiphy *wiphy,
struct net_device *dev, struct net_device *dev,
struct cfg80211_color_change_settings *params); struct cfg80211_color_change_settings *params);
@ -50,7 +50,7 @@ Signed-off-by: Johannes Berg <johannes.berg@intel.com>
}; };
/* /*
@@ -7601,9 +7601,9 @@ cfg80211_radar_event(struct wiphy *wiphy @@ -7604,9 +7604,9 @@ cfg80211_radar_event(struct wiphy *wiphy
} }
static inline void static inline void
@ -63,7 +63,7 @@ Signed-off-by: Johannes Berg <johannes.berg@intel.com>
{ {
__cfg80211_radar_event(wiphy, chandef, true, gfp); __cfg80211_radar_event(wiphy, chandef, true, gfp);
} }
@@ -7638,13 +7638,13 @@ void cfg80211_cac_event(struct net_devic @@ -7641,13 +7641,13 @@ void cfg80211_cac_event(struct net_devic
enum nl80211_radar_event event, gfp_t gfp); enum nl80211_radar_event event, gfp_t gfp);
/** /**
@ -156,7 +156,7 @@ Signed-off-by: Johannes Berg <johannes.berg@intel.com>
NUM_NL80211_EXT_FEATURES, NUM_NL80211_EXT_FEATURES,
--- a/net/mac80211/cfg.c --- a/net/mac80211/cfg.c
+++ b/net/mac80211/cfg.c +++ b/net/mac80211/cfg.c
@@ -4342,15 +4342,15 @@ out: @@ -4346,15 +4346,15 @@ out:
} }
static int static int
@ -176,7 +176,7 @@ Signed-off-by: Johannes Berg <johannes.berg@intel.com>
} }
const struct cfg80211_ops mac80211_config_ops = { const struct cfg80211_ops mac80211_config_ops = {
@@ -4457,5 +4457,5 @@ const struct cfg80211_ops mac80211_confi @@ -4461,5 +4461,5 @@ const struct cfg80211_ops mac80211_confi
.reset_tid_config = ieee80211_reset_tid_config, .reset_tid_config = ieee80211_reset_tid_config,
.set_sar_specs = ieee80211_set_sar_specs, .set_sar_specs = ieee80211_set_sar_specs,
.color_change = ieee80211_color_change, .color_change = ieee80211_color_change,
@ -204,7 +204,7 @@ Signed-off-by: Johannes Berg <johannes.berg@intel.com>
bool cfg80211_any_wiphy_oper_chan(struct wiphy *wiphy, bool cfg80211_any_wiphy_oper_chan(struct wiphy *wiphy,
--- a/net/wireless/core.c --- a/net/wireless/core.c
+++ b/net/wireless/core.c +++ b/net/wireless/core.c
@@ -543,9 +543,10 @@ use_default_name: @@ -545,9 +545,10 @@ use_default_name:
INIT_WORK(&rdev->rfkill_block, cfg80211_rfkill_block_work); INIT_WORK(&rdev->rfkill_block, cfg80211_rfkill_block_work);
INIT_WORK(&rdev->conn_work, cfg80211_conn_work); INIT_WORK(&rdev->conn_work, cfg80211_conn_work);
INIT_WORK(&rdev->event_work, cfg80211_event_work); INIT_WORK(&rdev->event_work, cfg80211_event_work);
@ -218,7 +218,7 @@ Signed-off-by: Johannes Berg <johannes.berg@intel.com>
init_waitqueue_head(&rdev->dev_wait); init_waitqueue_head(&rdev->dev_wait);
@@ -1055,13 +1056,13 @@ void wiphy_unregister(struct wiphy *wiph @@ -1057,13 +1058,13 @@ void wiphy_unregister(struct wiphy *wiph
cancel_work_sync(&rdev->conn_work); cancel_work_sync(&rdev->conn_work);
flush_work(&rdev->event_work); flush_work(&rdev->event_work);
cancel_delayed_work_sync(&rdev->dfs_update_channels_wk); cancel_delayed_work_sync(&rdev->dfs_update_channels_wk);
@ -234,7 +234,7 @@ Signed-off-by: Johannes Berg <johannes.berg@intel.com>
#ifdef CONFIG_PM #ifdef CONFIG_PM
if (rdev->wiphy.wowlan_config && rdev->ops->set_wakeup) if (rdev->wiphy.wowlan_config && rdev->ops->set_wakeup)
@@ -1210,7 +1211,7 @@ void __cfg80211_leave(struct cfg80211_re @@ -1212,7 +1213,7 @@ void __cfg80211_leave(struct cfg80211_re
cfg80211_pmsr_wdev_down(wdev); cfg80211_pmsr_wdev_down(wdev);
@ -472,7 +472,7 @@ Signed-off-by: Johannes Berg <johannes.berg@intel.com>
} }
--- a/net/wireless/nl80211.c --- a/net/wireless/nl80211.c
+++ b/net/wireless/nl80211.c +++ b/net/wireless/nl80211.c
@@ -801,7 +801,7 @@ static const struct nla_policy nl80211_p @@ -802,7 +802,7 @@ static const struct nla_policy nl80211_p
[NL80211_ATTR_MBSSID_CONFIG] = [NL80211_ATTR_MBSSID_CONFIG] =
NLA_POLICY_NESTED(nl80211_mbssid_config_policy), NLA_POLICY_NESTED(nl80211_mbssid_config_policy),
[NL80211_ATTR_MBSSID_ELEMS] = { .type = NLA_NESTED }, [NL80211_ATTR_MBSSID_ELEMS] = { .type = NLA_NESTED },
@ -481,7 +481,7 @@ Signed-off-by: Johannes Berg <johannes.berg@intel.com>
}; };
/* policy for the key attributes */ /* policy for the key attributes */
@@ -9306,9 +9306,9 @@ static int nl80211_start_radar_detection @@ -9307,9 +9307,9 @@ static int nl80211_start_radar_detection
goto unlock; goto unlock;
} }

View File

@ -120,7 +120,7 @@ Signed-off-by: Johannes Berg <johannes.berg@intel.com>
/* turn off carrier for this interface and dependent VLANs */ /* turn off carrier for this interface and dependent VLANs */
list_for_each_entry(vlan, &sdata->u.ap.vlans, u.vlan.list) list_for_each_entry(vlan, &sdata->u.ap.vlans, u.vlan.list)
@@ -3126,12 +3166,24 @@ cfg80211_beacon_dup(struct cfg80211_beac @@ -3130,12 +3170,24 @@ cfg80211_beacon_dup(struct cfg80211_beac
len = beacon->head_len + beacon->tail_len + beacon->beacon_ies_len + len = beacon->head_len + beacon->tail_len + beacon->beacon_ies_len +
beacon->proberesp_ies_len + beacon->assocresp_ies_len + beacon->proberesp_ies_len + beacon->assocresp_ies_len +
@ -146,7 +146,7 @@ Signed-off-by: Johannes Berg <johannes.berg@intel.com>
pos = (u8 *)(new_beacon + 1); pos = (u8 *)(new_beacon + 1);
if (beacon->head_len) { if (beacon->head_len) {
new_beacon->head_len = beacon->head_len; new_beacon->head_len = beacon->head_len;
@@ -3169,6 +3221,10 @@ cfg80211_beacon_dup(struct cfg80211_beac @@ -3173,6 +3225,10 @@ cfg80211_beacon_dup(struct cfg80211_beac
memcpy(pos, beacon->probe_resp, beacon->probe_resp_len); memcpy(pos, beacon->probe_resp, beacon->probe_resp_len);
pos += beacon->probe_resp_len; pos += beacon->probe_resp_len;
} }
@ -157,7 +157,7 @@ Signed-off-by: Johannes Berg <johannes.berg@intel.com>
/* might copy -1, meaning no changes requested */ /* might copy -1, meaning no changes requested */
new_beacon->ftm_responder = beacon->ftm_responder; new_beacon->ftm_responder = beacon->ftm_responder;
@@ -3206,8 +3262,11 @@ static int ieee80211_set_after_csa_beaco @@ -3210,8 +3266,11 @@ static int ieee80211_set_after_csa_beaco
case NL80211_IFTYPE_AP: case NL80211_IFTYPE_AP:
err = ieee80211_assign_beacon(sdata, sdata->u.ap.next_beacon, err = ieee80211_assign_beacon(sdata, sdata->u.ap.next_beacon,
NULL, NULL); NULL, NULL);
@ -171,7 +171,7 @@ Signed-off-by: Johannes Berg <johannes.berg@intel.com>
if (err < 0) if (err < 0)
return err; return err;
@@ -3362,8 +3421,12 @@ static int ieee80211_set_csa_beacon(stru @@ -3366,8 +3425,12 @@ static int ieee80211_set_csa_beacon(stru
if ((params->n_counter_offsets_beacon > if ((params->n_counter_offsets_beacon >
IEEE80211_MAX_CNTDWN_COUNTERS_NUM) || IEEE80211_MAX_CNTDWN_COUNTERS_NUM) ||
(params->n_counter_offsets_presp > (params->n_counter_offsets_presp >
@ -185,7 +185,7 @@ Signed-off-by: Johannes Berg <johannes.berg@intel.com>
csa.counter_offsets_beacon = params->counter_offsets_beacon; csa.counter_offsets_beacon = params->counter_offsets_beacon;
csa.counter_offsets_presp = params->counter_offsets_presp; csa.counter_offsets_presp = params->counter_offsets_presp;
@@ -3373,7 +3436,9 @@ static int ieee80211_set_csa_beacon(stru @@ -3377,7 +3440,9 @@ static int ieee80211_set_csa_beacon(stru
err = ieee80211_assign_beacon(sdata, &params->beacon_csa, &csa, NULL); err = ieee80211_assign_beacon(sdata, &params->beacon_csa, &csa, NULL);
if (err < 0) { if (err < 0) {
@ -195,7 +195,7 @@ Signed-off-by: Johannes Berg <johannes.berg@intel.com>
return err; return err;
} }
*changed |= err; *changed |= err;
@@ -3460,8 +3525,11 @@ static int ieee80211_set_csa_beacon(stru @@ -3464,8 +3529,11 @@ static int ieee80211_set_csa_beacon(stru
static void ieee80211_color_change_abort(struct ieee80211_sub_if_data *sdata) static void ieee80211_color_change_abort(struct ieee80211_sub_if_data *sdata)
{ {
sdata->vif.color_change_active = false; sdata->vif.color_change_active = false;
@ -209,7 +209,7 @@ Signed-off-by: Johannes Berg <johannes.berg@intel.com>
cfg80211_color_change_aborted_notify(sdata->dev); cfg80211_color_change_aborted_notify(sdata->dev);
} }
@@ -4199,8 +4267,11 @@ ieee80211_set_after_color_change_beacon( @@ -4203,8 +4271,11 @@ ieee80211_set_after_color_change_beacon(
ret = ieee80211_assign_beacon(sdata, sdata->u.ap.next_beacon, ret = ieee80211_assign_beacon(sdata, sdata->u.ap.next_beacon,
NULL, NULL); NULL, NULL);
@ -223,7 +223,7 @@ Signed-off-by: Johannes Berg <johannes.berg@intel.com>
if (ret < 0) if (ret < 0)
return ret; return ret;
@@ -4243,7 +4314,11 @@ ieee80211_set_color_change_beacon(struct @@ -4247,7 +4318,11 @@ ieee80211_set_color_change_beacon(struct
err = ieee80211_assign_beacon(sdata, &params->beacon_color_change, err = ieee80211_assign_beacon(sdata, &params->beacon_color_change,
NULL, &color_change); NULL, &color_change);
if (err < 0) { if (err < 0) {
@ -269,7 +269,7 @@ Signed-off-by: Johannes Berg <johannes.berg@intel.com>
IEEE80211_TX_STATUS_MSG = 2, IEEE80211_TX_STATUS_MSG = 2,
--- a/net/mac80211/tx.c --- a/net/mac80211/tx.c
+++ b/net/mac80211/tx.c +++ b/net/mac80211/tx.c
@@ -5041,6 +5041,19 @@ ieee80211_beacon_get_finish(struct ieee8 @@ -5042,6 +5042,19 @@ ieee80211_beacon_get_finish(struct ieee8
IEEE80211_TX_CTL_FIRST_FRAGMENT; IEEE80211_TX_CTL_FIRST_FRAGMENT;
} }
@ -289,7 +289,7 @@ Signed-off-by: Johannes Berg <johannes.berg@intel.com>
static struct sk_buff * static struct sk_buff *
ieee80211_beacon_get_ap(struct ieee80211_hw *hw, ieee80211_beacon_get_ap(struct ieee80211_hw *hw,
struct ieee80211_vif *vif, struct ieee80211_vif *vif,
@@ -5054,6 +5067,7 @@ ieee80211_beacon_get_ap(struct ieee80211 @@ -5055,6 +5068,7 @@ ieee80211_beacon_get_ap(struct ieee80211
struct ieee80211_if_ap *ap = &sdata->u.ap; struct ieee80211_if_ap *ap = &sdata->u.ap;
struct sk_buff *skb = NULL; struct sk_buff *skb = NULL;
u16 csa_off_base = 0; u16 csa_off_base = 0;
@ -297,7 +297,7 @@ Signed-off-by: Johannes Berg <johannes.berg@intel.com>
if (beacon->cntdwn_counter_offsets[0]) { if (beacon->cntdwn_counter_offsets[0]) {
if (!is_template) if (!is_template)
@@ -5063,11 +5077,12 @@ ieee80211_beacon_get_ap(struct ieee80211 @@ -5064,11 +5078,12 @@ ieee80211_beacon_get_ap(struct ieee80211
} }
/* headroom, head length, /* headroom, head length,
@ -312,7 +312,7 @@ Signed-off-by: Johannes Berg <johannes.berg@intel.com>
if (!skb) if (!skb)
return NULL; return NULL;
@@ -5081,6 +5096,11 @@ ieee80211_beacon_get_ap(struct ieee80211 @@ -5082,6 +5097,11 @@ ieee80211_beacon_get_ap(struct ieee80211
offs->tim_length = skb->len - beacon->head_len; offs->tim_length = skb->len - beacon->head_len;
offs->cntdwn_counter_offs[0] = beacon->cntdwn_counter_offsets[0]; offs->cntdwn_counter_offs[0] = beacon->cntdwn_counter_offsets[0];

View File

@ -16,7 +16,7 @@ Signed-off-by: Johannes Berg <johannes.berg@intel.com>
--- a/net/mac80211/cfg.c --- a/net/mac80211/cfg.c
+++ b/net/mac80211/cfg.c +++ b/net/mac80211/cfg.c
@@ -3247,9 +3247,31 @@ cfg80211_beacon_dup(struct cfg80211_beac @@ -3251,9 +3251,31 @@ cfg80211_beacon_dup(struct cfg80211_beac
void ieee80211_csa_finish(struct ieee80211_vif *vif) void ieee80211_csa_finish(struct ieee80211_vif *vif)
{ {
struct ieee80211_sub_if_data *sdata = vif_to_sdata(vif); struct ieee80211_sub_if_data *sdata = vif_to_sdata(vif);

View File

@ -627,7 +627,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
} }
for (i = 0; i < IEEE80211_NUM_TIDS; i++) for (i = 0; i < IEEE80211_NUM_TIDS; i++)
@@ -1889,59 +1893,24 @@ void ieee80211_sta_set_buffered(struct i @@ -1890,59 +1894,24 @@ void ieee80211_sta_set_buffered(struct i
} }
EXPORT_SYMBOL(ieee80211_sta_set_buffered); EXPORT_SYMBOL(ieee80211_sta_set_buffered);
@ -699,7 +699,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
} }
EXPORT_SYMBOL(ieee80211_sta_register_airtime); EXPORT_SYMBOL(ieee80211_sta_register_airtime);
@@ -2385,7 +2354,7 @@ void sta_set_sinfo(struct sta_info *sta, @@ -2386,7 +2355,7 @@ void sta_set_sinfo(struct sta_info *sta,
} }
if (!(sinfo->filled & BIT_ULL(NL80211_STA_INFO_AIRTIME_WEIGHT))) { if (!(sinfo->filled & BIT_ULL(NL80211_STA_INFO_AIRTIME_WEIGHT))) {
@ -791,7 +791,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
#include <net/net_namespace.h> #include <net/net_namespace.h>
#include <net/ieee80211_radiotap.h> #include <net/ieee80211_radiotap.h>
#include <net/cfg80211.h> #include <net/cfg80211.h>
@@ -1480,7 +1479,7 @@ void ieee80211_txq_init(struct ieee80211 @@ -1481,7 +1480,7 @@ void ieee80211_txq_init(struct ieee80211
codel_vars_init(&txqi->def_cvars); codel_vars_init(&txqi->def_cvars);
codel_stats_init(&txqi->cstats); codel_stats_init(&txqi->cstats);
__skb_queue_head_init(&txqi->frags); __skb_queue_head_init(&txqi->frags);
@ -800,7 +800,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
txqi->txq.vif = &sdata->vif; txqi->txq.vif = &sdata->vif;
@@ -1524,7 +1523,9 @@ void ieee80211_txq_purge(struct ieee8021 @@ -1525,7 +1524,9 @@ void ieee80211_txq_purge(struct ieee8021
ieee80211_purge_tx_queue(&local->hw, &txqi->frags); ieee80211_purge_tx_queue(&local->hw, &txqi->frags);
spin_unlock_bh(&fq->lock); spin_unlock_bh(&fq->lock);
@ -811,7 +811,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
} }
void ieee80211_txq_set_params(struct ieee80211_local *local) void ieee80211_txq_set_params(struct ieee80211_local *local)
@@ -3819,259 +3820,102 @@ EXPORT_SYMBOL(ieee80211_tx_dequeue); @@ -3820,259 +3821,102 @@ EXPORT_SYMBOL(ieee80211_tx_dequeue);
struct ieee80211_txq *ieee80211_next_txq(struct ieee80211_hw *hw, u8 ac) struct ieee80211_txq *ieee80211_next_txq(struct ieee80211_hw *hw, u8 ac)
{ {
struct ieee80211_local *local = hw_to_local(hw); struct ieee80211_local *local = hw_to_local(hw);
@ -1133,7 +1133,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
struct ieee80211_local *local = hw_to_local(hw); struct ieee80211_local *local = hw_to_local(hw);
if (!wiphy_ext_feature_isset(local->hw.wiphy, NL80211_EXT_FEATURE_AQL)) if (!wiphy_ext_feature_isset(local->hw.wiphy, NL80211_EXT_FEATURE_AQL))
@@ -4086,12 +3930,15 @@ bool ieee80211_txq_airtime_check(struct @@ -4087,12 +3931,15 @@ bool ieee80211_txq_airtime_check(struct
if (unlikely(txq->tid == IEEE80211_NUM_TIDS)) if (unlikely(txq->tid == IEEE80211_NUM_TIDS))
return true; return true;
@ -1151,7 +1151,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
return true; return true;
return false; return false;
@@ -4101,59 +3948,60 @@ EXPORT_SYMBOL(ieee80211_txq_airtime_chec @@ -4102,59 +3949,60 @@ EXPORT_SYMBOL(ieee80211_txq_airtime_chec
bool ieee80211_txq_may_transmit(struct ieee80211_hw *hw, bool ieee80211_txq_may_transmit(struct ieee80211_hw *hw,
struct ieee80211_txq *txq) struct ieee80211_txq *txq)
{ {

View File

@ -41,7 +41,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
u32 aql_limit_high; u32 aql_limit_high;
--- a/net/mac80211/tx.c --- a/net/mac80211/tx.c
+++ b/net/mac80211/tx.c +++ b/net/mac80211/tx.c
@@ -3847,7 +3847,7 @@ struct ieee80211_txq *ieee80211_next_txq @@ -3848,7 +3848,7 @@ struct ieee80211_txq *ieee80211_next_txq
struct sta_info *sta = container_of(txqi->txq.sta, struct sta_info *sta = container_of(txqi->txq.sta,
struct sta_info, sta); struct sta_info, sta);
bool aql_check = ieee80211_txq_airtime_check(hw, &txqi->txq); bool aql_check = ieee80211_txq_airtime_check(hw, &txqi->txq);

View File

@ -14,7 +14,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
--- a/net/mac80211/tx.c --- a/net/mac80211/tx.c
+++ b/net/mac80211/tx.c +++ b/net/mac80211/tx.c
@@ -3817,6 +3817,13 @@ out: @@ -3818,6 +3818,13 @@ out:
} }
EXPORT_SYMBOL(ieee80211_tx_dequeue); EXPORT_SYMBOL(ieee80211_tx_dequeue);
@ -28,7 +28,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
struct ieee80211_txq *ieee80211_next_txq(struct ieee80211_hw *hw, u8 ac) struct ieee80211_txq *ieee80211_next_txq(struct ieee80211_hw *hw, u8 ac)
{ {
struct ieee80211_local *local = hw_to_local(hw); struct ieee80211_local *local = hw_to_local(hw);
@@ -3847,7 +3854,7 @@ struct ieee80211_txq *ieee80211_next_txq @@ -3848,7 +3855,7 @@ struct ieee80211_txq *ieee80211_next_txq
struct sta_info *sta = container_of(txqi->txq.sta, struct sta_info *sta = container_of(txqi->txq.sta,
struct sta_info, sta); struct sta_info, sta);
bool aql_check = ieee80211_txq_airtime_check(hw, &txqi->txq); bool aql_check = ieee80211_txq_airtime_check(hw, &txqi->txq);
@ -37,7 +37,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
if (aql_check) if (aql_check)
found_eligible_txq = true; found_eligible_txq = true;
@@ -3972,7 +3979,7 @@ bool ieee80211_txq_may_transmit(struct i @@ -3973,7 +3980,7 @@ bool ieee80211_txq_may_transmit(struct i
continue; continue;
} }
sta = container_of(iter->txq.sta, struct sta_info, sta); sta = container_of(iter->txq.sta, struct sta_info, sta);

View File

@ -37,7 +37,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
u32 aql_limit_low; u32 aql_limit_low;
--- a/net/mac80211/tx.c --- a/net/mac80211/tx.c
+++ b/net/mac80211/tx.c +++ b/net/mac80211/tx.c
@@ -3824,6 +3824,36 @@ static inline s32 ieee80211_sta_deficit( @@ -3825,6 +3825,36 @@ static inline s32 ieee80211_sta_deficit(
return air_info->deficit - atomic_read(&air_info->aql_tx_pending); return air_info->deficit - atomic_read(&air_info->aql_tx_pending);
} }
@ -74,7 +74,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
struct ieee80211_txq *ieee80211_next_txq(struct ieee80211_hw *hw, u8 ac) struct ieee80211_txq *ieee80211_next_txq(struct ieee80211_hw *hw, u8 ac)
{ {
struct ieee80211_local *local = hw_to_local(hw); struct ieee80211_local *local = hw_to_local(hw);
@@ -3870,7 +3900,6 @@ struct ieee80211_txq *ieee80211_next_txq @@ -3871,7 +3901,6 @@ struct ieee80211_txq *ieee80211_next_txq
} }
} }
@ -82,7 +82,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
if (txqi->schedule_round == local->schedule_round[ac]) if (txqi->schedule_round == local->schedule_round[ac])
goto out; goto out;
@@ -3890,12 +3919,13 @@ void __ieee80211_schedule_txq(struct iee @@ -3891,12 +3920,13 @@ void __ieee80211_schedule_txq(struct iee
{ {
struct ieee80211_local *local = hw_to_local(hw); struct ieee80211_local *local = hw_to_local(hw);
struct txq_info *txqi = to_txq_info(txq); struct txq_info *txqi = to_txq_info(txq);
@ -98,7 +98,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
/* If airtime accounting is active, always enqueue STAs at the /* If airtime accounting is active, always enqueue STAs at the
* head of the list to ensure that they only get moved to the * head of the list to ensure that they only get moved to the
* back by the airtime DRR scheduler once they have a negative * back by the airtime DRR scheduler once they have a negative
@@ -3903,7 +3933,7 @@ void __ieee80211_schedule_txq(struct iee @@ -3904,7 +3934,7 @@ void __ieee80211_schedule_txq(struct iee
* get immediately moved to the back of the list on the next * get immediately moved to the back of the list on the next
* call to ieee80211_next_txq(). * call to ieee80211_next_txq().
*/ */
@ -107,7 +107,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
wiphy_ext_feature_isset(local->hw.wiphy, wiphy_ext_feature_isset(local->hw.wiphy,
NL80211_EXT_FEATURE_AIRTIME_FAIRNESS)) NL80211_EXT_FEATURE_AIRTIME_FAIRNESS))
list_add(&txqi->schedule_order, list_add(&txqi->schedule_order,
@@ -3911,6 +3941,8 @@ void __ieee80211_schedule_txq(struct iee @@ -3912,6 +3942,8 @@ void __ieee80211_schedule_txq(struct iee
else else
list_add_tail(&txqi->schedule_order, list_add_tail(&txqi->schedule_order,
&local->active_txqs[txq->ac]); &local->active_txqs[txq->ac]);

View File

@ -35,7 +35,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
local->airtime_flags = AIRTIME_USE_TX | AIRTIME_USE_RX; local->airtime_flags = AIRTIME_USE_TX | AIRTIME_USE_RX;
--- a/net/mac80211/sta_info.c --- a/net/mac80211/sta_info.c
+++ b/net/mac80211/sta_info.c +++ b/net/mac80211/sta_info.c
@@ -1929,6 +1929,7 @@ void ieee80211_sta_update_pending_airtim @@ -1930,6 +1930,7 @@ void ieee80211_sta_update_pending_airtim
&sta->airtime[ac].aql_tx_pending); &sta->airtime[ac].aql_tx_pending);
atomic_add(tx_airtime, &local->aql_total_pending_airtime); atomic_add(tx_airtime, &local->aql_total_pending_airtime);
@ -43,7 +43,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
return; return;
} }
@@ -1940,14 +1941,17 @@ void ieee80211_sta_update_pending_airtim @@ -1941,14 +1942,17 @@ void ieee80211_sta_update_pending_airtim
tx_pending, 0); tx_pending, 0);
} }
@ -66,7 +66,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
int sta_info_move_state(struct sta_info *sta, int sta_info_move_state(struct sta_info *sta,
--- a/net/mac80211/tx.c --- a/net/mac80211/tx.c
+++ b/net/mac80211/tx.c +++ b/net/mac80211/tx.c
@@ -3863,6 +3863,9 @@ struct ieee80211_txq *ieee80211_next_txq @@ -3864,6 +3864,9 @@ struct ieee80211_txq *ieee80211_next_txq
spin_lock_bh(&local->active_txq_lock[ac]); spin_lock_bh(&local->active_txq_lock[ac]);
@ -76,7 +76,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
begin: begin:
txqi = list_first_entry_or_null(&local->active_txqs[ac], txqi = list_first_entry_or_null(&local->active_txqs[ac],
struct txq_info, struct txq_info,
@@ -3984,6 +3987,25 @@ bool ieee80211_txq_airtime_check(struct @@ -3985,6 +3988,25 @@ bool ieee80211_txq_airtime_check(struct
} }
EXPORT_SYMBOL(ieee80211_txq_airtime_check); EXPORT_SYMBOL(ieee80211_txq_airtime_check);
@ -102,7 +102,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
bool ieee80211_txq_may_transmit(struct ieee80211_hw *hw, bool ieee80211_txq_may_transmit(struct ieee80211_hw *hw,
struct ieee80211_txq *txq) struct ieee80211_txq *txq)
{ {
@@ -4000,6 +4022,9 @@ bool ieee80211_txq_may_transmit(struct i @@ -4001,6 +4023,9 @@ bool ieee80211_txq_may_transmit(struct i
if (list_empty(&txqi->schedule_order)) if (list_empty(&txqi->schedule_order))
goto out; goto out;
@ -112,7 +112,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
list_for_each_entry_safe(iter, tmp, &local->active_txqs[ac], list_for_each_entry_safe(iter, tmp, &local->active_txqs[ac],
schedule_order) { schedule_order) {
if (iter == txqi) if (iter == txqi)
@@ -4039,7 +4064,15 @@ void ieee80211_txq_schedule_start(struct @@ -4040,7 +4065,15 @@ void ieee80211_txq_schedule_start(struct
struct ieee80211_local *local = hw_to_local(hw); struct ieee80211_local *local = hw_to_local(hw);
spin_lock_bh(&local->active_txq_lock[ac]); spin_lock_bh(&local->active_txq_lock[ac]);

View File

@ -13,7 +13,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
--- a/net/mac80211/sta_info.c --- a/net/mac80211/sta_info.c
+++ b/net/mac80211/sta_info.c +++ b/net/mac80211/sta_info.c
@@ -1900,6 +1900,7 @@ void ieee80211_sta_register_airtime(stru @@ -1901,6 +1901,7 @@ void ieee80211_sta_register_airtime(stru
struct ieee80211_local *local = sta->sdata->local; struct ieee80211_local *local = sta->sdata->local;
u8 ac = ieee80211_ac_from_tid(tid); u8 ac = ieee80211_ac_from_tid(tid);
u32 airtime = 0; u32 airtime = 0;
@ -21,7 +21,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
if (sta->local->airtime_flags & AIRTIME_USE_TX) if (sta->local->airtime_flags & AIRTIME_USE_TX)
airtime += tx_airtime; airtime += tx_airtime;
@@ -1909,7 +1910,11 @@ void ieee80211_sta_register_airtime(stru @@ -1910,7 +1911,11 @@ void ieee80211_sta_register_airtime(stru
spin_lock_bh(&local->active_txq_lock[ac]); spin_lock_bh(&local->active_txq_lock[ac]);
sta->airtime[ac].tx_airtime += tx_airtime; sta->airtime[ac].tx_airtime += tx_airtime;
sta->airtime[ac].rx_airtime += rx_airtime; sta->airtime[ac].rx_airtime += rx_airtime;

View File

@ -23,7 +23,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
--- a/net/mac80211/tx.c --- a/net/mac80211/tx.c
+++ b/net/mac80211/tx.c +++ b/net/mac80211/tx.c
@@ -3894,7 +3894,7 @@ struct ieee80211_txq *ieee80211_next_txq @@ -3895,7 +3895,7 @@ struct ieee80211_txq *ieee80211_next_txq
if (deficit < 0) if (deficit < 0)
sta->airtime[txqi->txq.ac].deficit += sta->airtime[txqi->txq.ac].deficit +=
@ -32,7 +32,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
if (deficit < 0 || !aql_check) { if (deficit < 0 || !aql_check) {
list_move_tail(&txqi->schedule_order, list_move_tail(&txqi->schedule_order,
@@ -4037,7 +4037,8 @@ bool ieee80211_txq_may_transmit(struct i @@ -4038,7 +4038,8 @@ bool ieee80211_txq_may_transmit(struct i
} }
sta = container_of(iter->txq.sta, struct sta_info, sta); sta = container_of(iter->txq.sta, struct sta_info, sta);
if (ieee80211_sta_deficit(sta, ac) < 0) if (ieee80211_sta_deficit(sta, ac) < 0)
@ -42,7 +42,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
list_move_tail(&iter->schedule_order, &local->active_txqs[ac]); list_move_tail(&iter->schedule_order, &local->active_txqs[ac]);
} }
@@ -4045,7 +4046,7 @@ bool ieee80211_txq_may_transmit(struct i @@ -4046,7 +4047,7 @@ bool ieee80211_txq_may_transmit(struct i
if (sta->airtime[ac].deficit >= 0) if (sta->airtime[ac].deficit >= 0)
goto out; goto out;

View File

@ -19,7 +19,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
--- a/net/mac80211/tx.c --- a/net/mac80211/tx.c
+++ b/net/mac80211/tx.c +++ b/net/mac80211/tx.c
@@ -3792,7 +3792,7 @@ begin: @@ -3793,7 +3793,7 @@ begin:
encap_out: encap_out:
IEEE80211_SKB_CB(skb)->control.vif = vif; IEEE80211_SKB_CB(skb)->control.vif = vif;

View File

@ -13,7 +13,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
--- a/net/mac80211/rx.c --- a/net/mac80211/rx.c
+++ b/net/mac80211/rx.c +++ b/net/mac80211/rx.c
@@ -4267,6 +4267,7 @@ void ieee80211_check_fast_rx(struct sta_ @@ -4271,6 +4271,7 @@ void ieee80211_check_fast_rx(struct sta_
.vif_type = sdata->vif.type, .vif_type = sdata->vif.type,
.control_port_protocol = sdata->control_port_protocol, .control_port_protocol = sdata->control_port_protocol,
}, *old, *new = NULL; }, *old, *new = NULL;
@ -21,7 +21,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
bool set_offload = false; bool set_offload = false;
bool assign = false; bool assign = false;
bool offload; bool offload;
@@ -4382,10 +4383,10 @@ void ieee80211_check_fast_rx(struct sta_ @@ -4386,10 +4387,10 @@ void ieee80211_check_fast_rx(struct sta_
if (assign) if (assign)
new = kmemdup(&fastrx, sizeof(fastrx), GFP_KERNEL); new = kmemdup(&fastrx, sizeof(fastrx), GFP_KERNEL);

View File

@ -14,7 +14,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
--- a/net/mac80211/rx.c --- a/net/mac80211/rx.c
+++ b/net/mac80211/rx.c +++ b/net/mac80211/rx.c
@@ -4603,7 +4603,7 @@ static bool ieee80211_invoke_fast_rx(str @@ -4607,7 +4607,7 @@ static bool ieee80211_invoke_fast_rx(str
if (!(status->rx_flags & IEEE80211_RX_AMSDU)) { if (!(status->rx_flags & IEEE80211_RX_AMSDU)) {
if (!pskb_may_pull(skb, snap_offs + sizeof(*payload))) if (!pskb_may_pull(skb, snap_offs + sizeof(*payload)))

View File

@ -15,7 +15,7 @@ Reviewed-by: Peer, Ilan <ilan.peer@intel.com>
--- a/drivers/net/wireless/intel/iwlwifi/mvm/tx.c --- a/drivers/net/wireless/intel/iwlwifi/mvm/tx.c
+++ b/drivers/net/wireless/intel/iwlwifi/mvm/tx.c +++ b/drivers/net/wireless/intel/iwlwifi/mvm/tx.c
@@ -551,8 +551,9 @@ static void iwl_mvm_skb_prepare_status(s @@ -555,8 +555,9 @@ static void iwl_mvm_skb_prepare_status(s
static int iwl_mvm_get_ctrl_vif_queue(struct iwl_mvm *mvm, static int iwl_mvm_get_ctrl_vif_queue(struct iwl_mvm *mvm,
struct ieee80211_tx_info *info, struct ieee80211_tx_info *info,
@ -26,7 +26,7 @@ Reviewed-by: Peer, Ilan <ilan.peer@intel.com>
struct iwl_mvm_vif *mvmvif = struct iwl_mvm_vif *mvmvif =
iwl_mvm_vif_from_mac80211(info->control.vif); iwl_mvm_vif_from_mac80211(info->control.vif);
__le16 fc = hdr->frame_control; __le16 fc = hdr->frame_control;
@@ -571,7 +572,7 @@ static int iwl_mvm_get_ctrl_vif_queue(st @@ -575,7 +576,7 @@ static int iwl_mvm_get_ctrl_vif_queue(st
* reason 7 ("Class 3 frame received from nonassociated STA"). * reason 7 ("Class 3 frame received from nonassociated STA").
*/ */
if (ieee80211_is_mgmt(fc) && if (ieee80211_is_mgmt(fc) &&
@ -35,7 +35,7 @@ Reviewed-by: Peer, Ilan <ilan.peer@intel.com>
ieee80211_is_deauth(fc) || ieee80211_is_disassoc(fc))) ieee80211_is_deauth(fc) || ieee80211_is_disassoc(fc)))
return mvm->probe_queue; return mvm->probe_queue;
@@ -689,7 +690,7 @@ int iwl_mvm_tx_skb_non_sta(struct iwl_mv @@ -693,7 +694,7 @@ int iwl_mvm_tx_skb_non_sta(struct iwl_mv
else else
sta_id = mvmvif->mcast_sta.sta_id; sta_id = mvmvif->mcast_sta.sta_id;
@ -123,7 +123,7 @@ Reviewed-by: Peer, Ilan <ilan.peer@intel.com>
info->flags |= IEEE80211_TX_CTL_NO_PS_BUFFER; info->flags |= IEEE80211_TX_CTL_NO_PS_BUFFER;
return TX_CONTINUE; return TX_CONTINUE;
} }
@@ -1282,7 +1282,7 @@ static struct txq_info *ieee80211_get_tx @@ -1283,7 +1283,7 @@ static struct txq_info *ieee80211_get_tx
if (!(info->flags & IEEE80211_TX_CTL_HW_80211_ENCAP) && if (!(info->flags & IEEE80211_TX_CTL_HW_80211_ENCAP) &&
unlikely(!ieee80211_is_data_present(hdr->frame_control))) { unlikely(!ieee80211_is_data_present(hdr->frame_control))) {
if ((!ieee80211_is_mgmt(hdr->frame_control) || if ((!ieee80211_is_mgmt(hdr->frame_control) ||

View File

@ -19,7 +19,7 @@ Reviewed-by: Greenman, Gregory <gregory.greenman@intel.com>
--- a/net/mac80211/sta_info.c --- a/net/mac80211/sta_info.c
+++ b/net/mac80211/sta_info.c +++ b/net/mac80211/sta_info.c
@@ -1070,6 +1070,14 @@ static void __sta_info_destroy_part2(str @@ -1071,6 +1071,14 @@ static void __sta_info_destroy_part2(str
WARN_ON_ONCE(ret); WARN_ON_ONCE(ret);
} }

View File

@ -12,7 +12,7 @@ Reviewed-by: Greenman, Gregory <gregory.greenman@intel.com>
--- a/drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c --- a/drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c
+++ b/drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c +++ b/drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c
@@ -4817,9 +4817,6 @@ static void iwl_mvm_mac_flush(struct iee @@ -4820,9 +4820,6 @@ static void iwl_mvm_mac_flush(struct iee
return; return;
} }
@ -22,7 +22,7 @@ Reviewed-by: Greenman, Gregory <gregory.greenman@intel.com>
/* Make sure we're done with the deferred traffic before flushing */ /* Make sure we're done with the deferred traffic before flushing */
flush_work(&mvm->add_stream_wk); flush_work(&mvm->add_stream_wk);
@@ -4837,9 +4834,6 @@ static void iwl_mvm_mac_flush(struct iee @@ -4840,9 +4837,6 @@ static void iwl_mvm_mac_flush(struct iee
if (mvmsta->vif != vif) if (mvmsta->vif != vif)
continue; continue;

View File

@ -58,7 +58,7 @@ Reviewed-by: Greenman, Gregory <gregory.greenman@intel.com>
struct ieee80211_channel_switch *ch_switch) struct ieee80211_channel_switch *ch_switch)
--- a/net/mac80211/sta_info.c --- a/net/mac80211/sta_info.c
+++ b/net/mac80211/sta_info.c +++ b/net/mac80211/sta_info.c
@@ -1075,8 +1075,12 @@ static void __sta_info_destroy_part2(str @@ -1076,8 +1076,12 @@ static void __sta_info_destroy_part2(str
* frames sitting on hardware queues might be sent out without * frames sitting on hardware queues might be sent out without
* any encryption at all. * any encryption at all.
*/ */

View File

@ -11,7 +11,7 @@ Reviewed-by: Greenman, Gregory <gregory.greenman@intel.com>
--- a/drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c --- a/drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c
+++ b/drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c +++ b/drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c
@@ -4853,6 +4853,31 @@ static void iwl_mvm_mac_flush(struct iee @@ -4856,6 +4856,31 @@ static void iwl_mvm_mac_flush(struct iee
iwl_trans_wait_tx_queues_empty(mvm->trans, msk); iwl_trans_wait_tx_queues_empty(mvm->trans, msk);
} }
@ -43,7 +43,7 @@ Reviewed-by: Greenman, Gregory <gregory.greenman@intel.com>
static int iwl_mvm_mac_get_survey(struct ieee80211_hw *hw, int idx, static int iwl_mvm_mac_get_survey(struct ieee80211_hw *hw, int idx,
struct survey_info *survey) struct survey_info *survey)
{ {
@@ -5366,6 +5391,7 @@ const struct ieee80211_ops iwl_mvm_hw_op @@ -5369,6 +5394,7 @@ const struct ieee80211_ops iwl_mvm_hw_op
.mgd_prepare_tx = iwl_mvm_mac_mgd_prepare_tx, .mgd_prepare_tx = iwl_mvm_mac_mgd_prepare_tx,
.mgd_protect_tdls_discover = iwl_mvm_mac_mgd_protect_tdls_discover, .mgd_protect_tdls_discover = iwl_mvm_mac_mgd_protect_tdls_discover,
.flush = iwl_mvm_mac_flush, .flush = iwl_mvm_mac_flush,

View File

@ -1,25 +0,0 @@
From: Felix Fietkau <nbd@nbd.name>
Date: Fri, 24 Mar 2023 13:04:17 +0100
Subject: [PATCH] wifi: mac80211: fix invalid drv_sta_pre_rcu_remove calls for
non-uploaded sta
Avoid potential data corruption issues caused by uninitialized driver
private data structures.
Reported-by: Brian Coverstone <brian@mainsequence.net>
Fixes: 6a9d1b91f34d ("mac80211: add pre-RCU-sync sta removal driver operation")
Signed-off-by: Felix Fietkau <nbd@nbd.name>
---
--- a/net/mac80211/sta_info.c
+++ b/net/mac80211/sta_info.c
@@ -1041,7 +1041,8 @@ static int __must_check __sta_info_destr
list_del_rcu(&sta->list);
sta->removed = true;
- drv_sta_pre_rcu_remove(local, sta->sdata, sta);
+ if (sta->uploaded)
+ drv_sta_pre_rcu_remove(local, sta->sdata, sta);
if (sdata->vif.type == NL80211_IFTYPE_AP_VLAN &&
rcu_access_pointer(sdata->u.vlan.sta) == sta)

View File

@ -5,7 +5,7 @@ and we should ignore this.
--- a/net/wireless/core.c --- a/net/wireless/core.c
+++ b/net/wireless/core.c +++ b/net/wireless/core.c
@@ -625,21 +625,6 @@ static int wiphy_verify_combinations(str @@ -627,21 +627,6 @@ static int wiphy_verify_combinations(str
c->limits[j].max > 1)) c->limits[j].max > 1))
return -EINVAL; return -EINVAL;

View File

@ -1,6 +1,6 @@
--- a/include/net/cfg80211.h --- a/include/net/cfg80211.h
+++ b/include/net/cfg80211.h +++ b/include/net/cfg80211.h
@@ -3869,6 +3869,7 @@ struct mgmt_frame_regs { @@ -3872,6 +3872,7 @@ struct mgmt_frame_regs {
* (as advertised by the nl80211 feature flag.) * (as advertised by the nl80211 feature flag.)
* @get_tx_power: store the current TX power into the dbm variable; * @get_tx_power: store the current TX power into the dbm variable;
* return 0 if successful * return 0 if successful
@ -8,7 +8,7 @@
* *
* @rfkill_poll: polls the hw rfkill line, use cfg80211 reporting * @rfkill_poll: polls the hw rfkill line, use cfg80211 reporting
* functions to adjust rfkill hw state * functions to adjust rfkill hw state
@@ -4202,6 +4203,7 @@ struct cfg80211_ops { @@ -4205,6 +4206,7 @@ struct cfg80211_ops {
enum nl80211_tx_power_setting type, int mbm); enum nl80211_tx_power_setting type, int mbm);
int (*get_tx_power)(struct wiphy *wiphy, struct wireless_dev *wdev, int (*get_tx_power)(struct wiphy *wiphy, struct wireless_dev *wdev,
int *dbm); int *dbm);
@ -57,7 +57,7 @@
__NL80211_ATTR_AFTER_LAST, __NL80211_ATTR_AFTER_LAST,
--- a/net/mac80211/cfg.c --- a/net/mac80211/cfg.c
+++ b/net/mac80211/cfg.c +++ b/net/mac80211/cfg.c
@@ -2812,6 +2812,19 @@ static int ieee80211_get_tx_power(struct @@ -2816,6 +2816,19 @@ static int ieee80211_get_tx_power(struct
return 0; return 0;
} }
@ -77,7 +77,7 @@
static void ieee80211_rfkill_poll(struct wiphy *wiphy) static void ieee80211_rfkill_poll(struct wiphy *wiphy)
{ {
struct ieee80211_local *local = wiphy_priv(wiphy); struct ieee80211_local *local = wiphy_priv(wiphy);
@@ -4513,6 +4526,7 @@ const struct cfg80211_ops mac80211_confi @@ -4517,6 +4530,7 @@ const struct cfg80211_ops mac80211_confi
.set_wiphy_params = ieee80211_set_wiphy_params, .set_wiphy_params = ieee80211_set_wiphy_params,
.set_tx_power = ieee80211_set_tx_power, .set_tx_power = ieee80211_set_tx_power,
.get_tx_power = ieee80211_get_tx_power, .get_tx_power = ieee80211_get_tx_power,
@ -129,7 +129,7 @@
local->hw.max_mtu = IEEE80211_MAX_DATA_LEN; local->hw.max_mtu = IEEE80211_MAX_DATA_LEN;
--- a/net/wireless/nl80211.c --- a/net/wireless/nl80211.c
+++ b/net/wireless/nl80211.c +++ b/net/wireless/nl80211.c
@@ -802,6 +802,7 @@ static const struct nla_policy nl80211_p @@ -803,6 +803,7 @@ static const struct nla_policy nl80211_p
NLA_POLICY_NESTED(nl80211_mbssid_config_policy), NLA_POLICY_NESTED(nl80211_mbssid_config_policy),
[NL80211_ATTR_MBSSID_ELEMS] = { .type = NLA_NESTED }, [NL80211_ATTR_MBSSID_ELEMS] = { .type = NLA_NESTED },
[NL80211_ATTR_RADAR_BACKGROUND] = { .type = NLA_FLAG }, [NL80211_ATTR_RADAR_BACKGROUND] = { .type = NLA_FLAG },
@ -137,7 +137,7 @@
}; };
/* policy for the key attributes */ /* policy for the key attributes */
@@ -3391,6 +3392,22 @@ static int nl80211_set_wiphy(struct sk_b @@ -3392,6 +3393,22 @@ static int nl80211_set_wiphy(struct sk_b
if (result) if (result)
goto out; goto out;
} }