Skip to content

Commit edd6815

Browse files
committed
Merge tag 'wireless-next-2023-10-26' of git://git.kernel.org/pub/scm/linux/kernel/git/wireless/wireless-next
Kalle Valo says: ==================== wireless-next patches for v6.7 The third, and most likely the last, features pull request for v6.7. Fixes all over and only few small new features. Major changes: iwlwifi - more Multi-Link Operation (MLO) work ath12k - QCN9274: mesh support ath11k - firmware-2.bin container file format support * tag 'wireless-next-2023-10-26' of git://git.kernel.org/pub/scm/linux/kernel/git/wireless/wireless-next: (155 commits) wifi: ray_cs: Remove unnecessary (void*) conversions Revert "wifi: ath11k: call ath11k_mac_fils_discovery() without condition" wifi: ath12k: Introduce and use ath12k_sta_to_arsta() wifi: ath12k: fix htt mlo-offset event locking wifi: ath12k: fix dfs-radar and temperature event locking wifi: ath11k: fix gtk offload status event locking wifi: ath11k: fix htt pktlog locking wifi: ath11k: fix dfs radar event locking wifi: ath11k: fix temperature event locking wifi: ath12k: rename the sc naming convention to ab wifi: ath12k: rename the wmi_sc naming convention to wmi_ab wifi: ath11k: add firmware-2.bin support wifi: ath11k: qmi: refactor ath11k_qmi_m3_load() wifi: rtw89: cleanup firmware elements parsing wifi: rt2x00: rework MT7620 PA/LNA RF calibration wifi: rt2x00: rework MT7620 channel config function wifi: rt2x00: improve MT7620 register initialization MAINTAINERS: wifi: rt2x00: drop Helmut Schaa wifi: wlcore: main: replace deprecated strncpy with strscpy wifi: wlcore: boot: replace deprecated strncpy with strscpy ... ==================== Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Jakub Kicinski <[email protected]>
2 parents c6f9b71 + 1002f81 commit edd6815

File tree

193 files changed

+3560
-1726
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

193 files changed

+3560
-1726
lines changed

Documentation/driver-api/80211/mac80211.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ functions/definitions
120120
ieee80211_rx
121121
ieee80211_rx_ni
122122
ieee80211_rx_irqsafe
123-
ieee80211_tx_status
123+
ieee80211_tx_status_skb
124124
ieee80211_tx_status_ni
125125
ieee80211_tx_status_irqsafe
126126
ieee80211_rts_get

MAINTAINERS

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17943,7 +17943,6 @@ F: arch/mips/boot/dts/ralink/mt7621*
1794317943

1794417944
RALINK RT2X00 WIRELESS LAN DRIVER
1794517945
M: Stanislaw Gruszka <[email protected]>
17946-
M: Helmut Schaa <[email protected]>
1794717946
1794817947
S: Maintained
1794917948
F: drivers/net/wireless/ralink/rt2x00/

drivers/net/wireless/ath/ath11k/Makefile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,8 @@ ath11k-y += core.o \
1717
peer.o \
1818
dbring.o \
1919
hw.o \
20-
pcic.o
20+
pcic.o \
21+
fw.o
2122

2223
ath11k-$(CONFIG_ATH11K_DEBUGFS) += debugfs.o debugfs_htt_stats.o debugfs_sta.o
2324
ath11k-$(CONFIG_NL80211_TESTMODE) += testmode.o

drivers/net/wireless/ath/ath11k/ahb.c

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66

77
#include <linux/module.h>
88
#include <linux/platform_device.h>
9+
#include <linux/property.h>
910
#include <linux/of_device.h>
1011
#include <linux/of.h>
1112
#include <linux/dma-mapping.h>
@@ -1084,19 +1085,12 @@ static int ath11k_ahb_fw_resource_deinit(struct ath11k_base *ab)
10841085
static int ath11k_ahb_probe(struct platform_device *pdev)
10851086
{
10861087
struct ath11k_base *ab;
1087-
const struct of_device_id *of_id;
10881088
const struct ath11k_hif_ops *hif_ops;
10891089
const struct ath11k_pci_ops *pci_ops;
10901090
enum ath11k_hw_rev hw_rev;
10911091
int ret;
10921092

1093-
of_id = of_match_device(ath11k_ahb_of_match, &pdev->dev);
1094-
if (!of_id) {
1095-
dev_err(&pdev->dev, "failed to find matching device tree id\n");
1096-
return -EINVAL;
1097-
}
1098-
1099-
hw_rev = (uintptr_t)of_id->data;
1093+
hw_rev = (uintptr_t)device_get_match_data(&pdev->dev);
11001094

11011095
switch (hw_rev) {
11021096
case ATH11K_HW_IPQ8074:

drivers/net/wireless/ath/ath11k/core.c

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
#include "debug.h"
1717
#include "hif.h"
1818
#include "wow.h"
19+
#include "fw.h"
1920

2021
unsigned int ath11k_debug_mask;
2122
EXPORT_SYMBOL(ath11k_debug_mask);
@@ -1317,6 +1318,7 @@ int ath11k_core_fetch_bdf(struct ath11k_base *ab, struct ath11k_board_data *bd)
13171318
{
13181319
char *boardname = NULL, *fallback_boardname = NULL, *chip_id_boardname = NULL;
13191320
char *filename, filepath[100];
1321+
int bd_api;
13201322
int ret = 0;
13211323

13221324
filename = ATH11K_BOARD_API2_FILE;
@@ -1332,7 +1334,7 @@ int ath11k_core_fetch_bdf(struct ath11k_base *ab, struct ath11k_board_data *bd)
13321334
goto exit;
13331335
}
13341336

1335-
ab->bd_api = 2;
1337+
bd_api = 2;
13361338
ret = ath11k_core_fetch_board_data_api_n(ab, bd, boardname,
13371339
ATH11K_BD_IE_BOARD,
13381340
ATH11K_BD_IE_BOARD_NAME,
@@ -1381,7 +1383,7 @@ int ath11k_core_fetch_bdf(struct ath11k_base *ab, struct ath11k_board_data *bd)
13811383
if (!ret)
13821384
goto exit;
13831385

1384-
ab->bd_api = 1;
1386+
bd_api = 1;
13851387
ret = ath11k_core_fetch_board_data_api_1(ab, bd, ATH11K_DEFAULT_BOARD_FILE);
13861388
if (ret) {
13871389
ath11k_core_create_firmware_path(ab, filename,
@@ -1405,7 +1407,7 @@ int ath11k_core_fetch_bdf(struct ath11k_base *ab, struct ath11k_board_data *bd)
14051407
kfree(chip_id_boardname);
14061408

14071409
if (!ret)
1408-
ath11k_dbg(ab, ATH11K_DBG_BOOT, "using board api %d\n", ab->bd_api);
1410+
ath11k_dbg(ab, ATH11K_DBG_BOOT, "using board api %d\n", bd_api);
14091411

14101412
return ret;
14111413
}
@@ -2071,6 +2073,12 @@ int ath11k_core_pre_init(struct ath11k_base *ab)
20712073
return ret;
20722074
}
20732075

2076+
ret = ath11k_fw_pre_init(ab);
2077+
if (ret) {
2078+
ath11k_err(ab, "failed to pre init firmware: %d", ret);
2079+
return ret;
2080+
}
2081+
20742082
return 0;
20752083
}
20762084
EXPORT_SYMBOL(ath11k_core_pre_init);
@@ -2101,6 +2109,7 @@ void ath11k_core_deinit(struct ath11k_base *ab)
21012109
ath11k_hif_power_down(ab);
21022110
ath11k_mac_destroy(ab);
21032111
ath11k_core_soc_destroy(ab);
2112+
ath11k_fw_destroy(ab);
21042113
}
21052114
EXPORT_SYMBOL(ath11k_core_deinit);
21062115

drivers/net/wireless/ath/ath11k/core.h

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@
1515
#include <linux/ctype.h>
1616
#include <linux/rhashtable.h>
1717
#include <linux/average.h>
18+
#include <linux/firmware.h>
19+
1820
#include "qmi.h"
1921
#include "htc.h"
2022
#include "wmi.h"
@@ -29,6 +31,7 @@
2931
#include "dbring.h"
3032
#include "spectral.h"
3133
#include "wow.h"
34+
#include "fw.h"
3235

3336
#define SM(_v, _f) (((_v) << _f##_LSB) & _f##_MASK)
3437

@@ -906,7 +909,6 @@ struct ath11k_base {
906909
struct ath11k_targ_cap target_caps;
907910
u32 ext_service_bitmap[WMI_SERVICE_EXT_BM_SIZE];
908911
bool pdevs_macaddr_valid;
909-
int bd_api;
910912

911913
struct ath11k_hw_params hw_params;
912914

@@ -982,6 +984,18 @@ struct ath11k_base {
982984
const struct ath11k_pci_ops *ops;
983985
} pci;
984986

987+
struct {
988+
u32 api_version;
989+
990+
const struct firmware *fw;
991+
const u8 *amss_data;
992+
size_t amss_len;
993+
const u8 *m3_data;
994+
size_t m3_len;
995+
996+
DECLARE_BITMAP(fw_features, ATH11K_FW_FEATURE_COUNT);
997+
} fw;
998+
985999
#ifdef CONFIG_NL80211_TESTMODE
9861000
struct {
9871001
u32 data_pos;
@@ -1223,6 +1237,11 @@ static inline struct ath11k_vif *ath11k_vif_to_arvif(struct ieee80211_vif *vif)
12231237
return (struct ath11k_vif *)vif->drv_priv;
12241238
}
12251239

1240+
static inline struct ath11k_sta *ath11k_sta_to_arsta(struct ieee80211_sta *sta)
1241+
{
1242+
return (struct ath11k_sta *)sta->drv_priv;
1243+
}
1244+
12261245
static inline struct ath11k *ath11k_ab_to_ar(struct ath11k_base *ab,
12271246
int mac_id)
12281247
{

drivers/net/wireless/ath/ath11k/debugfs.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1459,7 +1459,7 @@ static void ath11k_reset_peer_ps_duration(void *data,
14591459
struct ieee80211_sta *sta)
14601460
{
14611461
struct ath11k *ar = data;
1462-
struct ath11k_sta *arsta = (struct ath11k_sta *)sta->drv_priv;
1462+
struct ath11k_sta *arsta = ath11k_sta_to_arsta(sta);
14631463

14641464
spin_lock_bh(&ar->data_lock);
14651465
arsta->ps_total_duration = 0;
@@ -1510,7 +1510,7 @@ static void ath11k_peer_ps_state_disable(void *data,
15101510
struct ieee80211_sta *sta)
15111511
{
15121512
struct ath11k *ar = data;
1513-
struct ath11k_sta *arsta = (struct ath11k_sta *)sta->drv_priv;
1513+
struct ath11k_sta *arsta = ath11k_sta_to_arsta(sta);
15141514

15151515
spin_lock_bh(&ar->data_lock);
15161516
arsta->peer_ps_state = WMI_PEER_PS_STATE_DISABLED;
@@ -1591,10 +1591,10 @@ static const struct file_operations fops_ps_state_enable = {
15911591
int ath11k_debugfs_register(struct ath11k *ar)
15921592
{
15931593
struct ath11k_base *ab = ar->ab;
1594-
char pdev_name[5];
1594+
char pdev_name[10];
15951595
char buf[100] = {0};
15961596

1597-
snprintf(pdev_name, sizeof(pdev_name), "%s%d", "mac", ar->pdev_idx);
1597+
snprintf(pdev_name, sizeof(pdev_name), "%s%u", "mac", ar->pdev_idx);
15981598

15991599
ar->debug.debugfs_pdev = debugfs_create_dir(pdev_name, ab->debugfs_soc);
16001600
if (IS_ERR(ar->debug.debugfs_pdev))

drivers/net/wireless/ath/ath11k/debugfs_sta.c

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ static ssize_t ath11k_dbg_sta_dump_tx_stats(struct file *file,
136136
size_t count, loff_t *ppos)
137137
{
138138
struct ieee80211_sta *sta = file->private_data;
139-
struct ath11k_sta *arsta = (struct ath11k_sta *)sta->drv_priv;
139+
struct ath11k_sta *arsta = ath11k_sta_to_arsta(sta);
140140
struct ath11k *ar = arsta->arvif->ar;
141141
struct ath11k_htt_data_stats *stats;
142142
static const char *str_name[ATH11K_STATS_TYPE_MAX] = {"succ", "fail",
@@ -243,7 +243,7 @@ static ssize_t ath11k_dbg_sta_dump_rx_stats(struct file *file,
243243
size_t count, loff_t *ppos)
244244
{
245245
struct ieee80211_sta *sta = file->private_data;
246-
struct ath11k_sta *arsta = (struct ath11k_sta *)sta->drv_priv;
246+
struct ath11k_sta *arsta = ath11k_sta_to_arsta(sta);
247247
struct ath11k *ar = arsta->arvif->ar;
248248
struct ath11k_rx_peer_stats *rx_stats = arsta->rx_stats;
249249
int len = 0, i, retval = 0;
@@ -340,7 +340,7 @@ static int
340340
ath11k_dbg_sta_open_htt_peer_stats(struct inode *inode, struct file *file)
341341
{
342342
struct ieee80211_sta *sta = inode->i_private;
343-
struct ath11k_sta *arsta = (struct ath11k_sta *)sta->drv_priv;
343+
struct ath11k_sta *arsta = ath11k_sta_to_arsta(sta);
344344
struct ath11k *ar = arsta->arvif->ar;
345345
struct debug_htt_stats_req *stats_req;
346346
int type = ar->debug.htt_stats.type;
@@ -376,7 +376,7 @@ static int
376376
ath11k_dbg_sta_release_htt_peer_stats(struct inode *inode, struct file *file)
377377
{
378378
struct ieee80211_sta *sta = inode->i_private;
379-
struct ath11k_sta *arsta = (struct ath11k_sta *)sta->drv_priv;
379+
struct ath11k_sta *arsta = ath11k_sta_to_arsta(sta);
380380
struct ath11k *ar = arsta->arvif->ar;
381381

382382
mutex_lock(&ar->conf_mutex);
@@ -413,7 +413,7 @@ static ssize_t ath11k_dbg_sta_write_peer_pktlog(struct file *file,
413413
size_t count, loff_t *ppos)
414414
{
415415
struct ieee80211_sta *sta = file->private_data;
416-
struct ath11k_sta *arsta = (struct ath11k_sta *)sta->drv_priv;
416+
struct ath11k_sta *arsta = ath11k_sta_to_arsta(sta);
417417
struct ath11k *ar = arsta->arvif->ar;
418418
int ret, enable;
419419

@@ -453,7 +453,7 @@ static ssize_t ath11k_dbg_sta_read_peer_pktlog(struct file *file,
453453
size_t count, loff_t *ppos)
454454
{
455455
struct ieee80211_sta *sta = file->private_data;
456-
struct ath11k_sta *arsta = (struct ath11k_sta *)sta->drv_priv;
456+
struct ath11k_sta *arsta = ath11k_sta_to_arsta(sta);
457457
struct ath11k *ar = arsta->arvif->ar;
458458
char buf[32] = {0};
459459
int len;
@@ -480,7 +480,7 @@ static ssize_t ath11k_dbg_sta_write_delba(struct file *file,
480480
size_t count, loff_t *ppos)
481481
{
482482
struct ieee80211_sta *sta = file->private_data;
483-
struct ath11k_sta *arsta = (struct ath11k_sta *)sta->drv_priv;
483+
struct ath11k_sta *arsta = ath11k_sta_to_arsta(sta);
484484
struct ath11k *ar = arsta->arvif->ar;
485485
u32 tid, initiator, reason;
486486
int ret;
@@ -531,7 +531,7 @@ static ssize_t ath11k_dbg_sta_write_addba_resp(struct file *file,
531531
size_t count, loff_t *ppos)
532532
{
533533
struct ieee80211_sta *sta = file->private_data;
534-
struct ath11k_sta *arsta = (struct ath11k_sta *)sta->drv_priv;
534+
struct ath11k_sta *arsta = ath11k_sta_to_arsta(sta);
535535
struct ath11k *ar = arsta->arvif->ar;
536536
u32 tid, status;
537537
int ret;
@@ -581,7 +581,7 @@ static ssize_t ath11k_dbg_sta_write_addba(struct file *file,
581581
size_t count, loff_t *ppos)
582582
{
583583
struct ieee80211_sta *sta = file->private_data;
584-
struct ath11k_sta *arsta = (struct ath11k_sta *)sta->drv_priv;
584+
struct ath11k_sta *arsta = ath11k_sta_to_arsta(sta);
585585
struct ath11k *ar = arsta->arvif->ar;
586586
u32 tid, buf_size;
587587
int ret;
@@ -632,7 +632,7 @@ static ssize_t ath11k_dbg_sta_read_aggr_mode(struct file *file,
632632
size_t count, loff_t *ppos)
633633
{
634634
struct ieee80211_sta *sta = file->private_data;
635-
struct ath11k_sta *arsta = (struct ath11k_sta *)sta->drv_priv;
635+
struct ath11k_sta *arsta = ath11k_sta_to_arsta(sta);
636636
struct ath11k *ar = arsta->arvif->ar;
637637
char buf[64];
638638
int len = 0;
@@ -652,7 +652,7 @@ static ssize_t ath11k_dbg_sta_write_aggr_mode(struct file *file,
652652
size_t count, loff_t *ppos)
653653
{
654654
struct ieee80211_sta *sta = file->private_data;
655-
struct ath11k_sta *arsta = (struct ath11k_sta *)sta->drv_priv;
655+
struct ath11k_sta *arsta = ath11k_sta_to_arsta(sta);
656656
struct ath11k *ar = arsta->arvif->ar;
657657
u32 aggr_mode;
658658
int ret;
@@ -697,7 +697,7 @@ ath11k_write_htt_peer_stats_reset(struct file *file,
697697
size_t count, loff_t *ppos)
698698
{
699699
struct ieee80211_sta *sta = file->private_data;
700-
struct ath11k_sta *arsta = (struct ath11k_sta *)sta->drv_priv;
700+
struct ath11k_sta *arsta = ath11k_sta_to_arsta(sta);
701701
struct ath11k *ar = arsta->arvif->ar;
702702
struct htt_ext_stats_cfg_params cfg_params = { 0 };
703703
int ret;
@@ -756,7 +756,7 @@ static ssize_t ath11k_dbg_sta_read_peer_ps_state(struct file *file,
756756
size_t count, loff_t *ppos)
757757
{
758758
struct ieee80211_sta *sta = file->private_data;
759-
struct ath11k_sta *arsta = (struct ath11k_sta *)sta->drv_priv;
759+
struct ath11k_sta *arsta = ath11k_sta_to_arsta(sta);
760760
struct ath11k *ar = arsta->arvif->ar;
761761
char buf[20];
762762
int len;
@@ -783,7 +783,7 @@ static ssize_t ath11k_dbg_sta_read_current_ps_duration(struct file *file,
783783
loff_t *ppos)
784784
{
785785
struct ieee80211_sta *sta = file->private_data;
786-
struct ath11k_sta *arsta = (struct ath11k_sta *)sta->drv_priv;
786+
struct ath11k_sta *arsta = ath11k_sta_to_arsta(sta);
787787
struct ath11k *ar = arsta->arvif->ar;
788788
u64 time_since_station_in_power_save;
789789
char buf[20];
@@ -817,7 +817,7 @@ static ssize_t ath11k_dbg_sta_read_total_ps_duration(struct file *file,
817817
size_t count, loff_t *ppos)
818818
{
819819
struct ieee80211_sta *sta = file->private_data;
820-
struct ath11k_sta *arsta = (struct ath11k_sta *)sta->drv_priv;
820+
struct ath11k_sta *arsta = ath11k_sta_to_arsta(sta);
821821
struct ath11k *ar = arsta->arvif->ar;
822822
char buf[20];
823823
u64 power_save_duration;

drivers/net/wireless/ath/ath11k/dp_rx.c

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1099,7 +1099,7 @@ int ath11k_dp_rx_ampdu_start(struct ath11k *ar,
10991099
struct ieee80211_ampdu_params *params)
11001100
{
11011101
struct ath11k_base *ab = ar->ab;
1102-
struct ath11k_sta *arsta = (void *)params->sta->drv_priv;
1102+
struct ath11k_sta *arsta = ath11k_sta_to_arsta(params->sta);
11031103
int vdev_id = arsta->arvif->vdev_id;
11041104
int ret;
11051105

@@ -1117,7 +1117,7 @@ int ath11k_dp_rx_ampdu_stop(struct ath11k *ar,
11171117
{
11181118
struct ath11k_base *ab = ar->ab;
11191119
struct ath11k_peer *peer;
1120-
struct ath11k_sta *arsta = (void *)params->sta->drv_priv;
1120+
struct ath11k_sta *arsta = ath11k_sta_to_arsta(params->sta);
11211121
int vdev_id = arsta->arvif->vdev_id;
11221122
dma_addr_t paddr;
11231123
bool active;
@@ -1456,7 +1456,7 @@ ath11k_update_per_peer_tx_stats(struct ath11k *ar,
14561456
}
14571457

14581458
sta = peer->sta;
1459-
arsta = (struct ath11k_sta *)sta->drv_priv;
1459+
arsta = ath11k_sta_to_arsta(sta);
14601460

14611461
memset(&arsta->txrate, 0, sizeof(arsta->txrate));
14621462

@@ -1618,14 +1618,20 @@ static void ath11k_htt_pktlog(struct ath11k_base *ab, struct sk_buff *skb)
16181618
u8 pdev_id;
16191619

16201620
pdev_id = FIELD_GET(HTT_T2H_PPDU_STATS_INFO_PDEV_ID, data->hdr);
1621+
1622+
rcu_read_lock();
1623+
16211624
ar = ath11k_mac_get_ar_by_pdev_id(ab, pdev_id);
16221625
if (!ar) {
16231626
ath11k_warn(ab, "invalid pdev id %d on htt pktlog\n", pdev_id);
1624-
return;
1627+
goto out;
16251628
}
16261629

16271630
trace_ath11k_htt_pktlog(ar, data->payload, hdr->size,
16281631
ar->ab->pktlog_defs_checksum);
1632+
1633+
out:
1634+
rcu_read_unlock();
16291635
}
16301636

16311637
static void ath11k_htt_backpressure_event_handler(struct ath11k_base *ab,
@@ -5242,7 +5248,7 @@ int ath11k_dp_rx_process_mon_status(struct ath11k_base *ab, int mac_id,
52425248
goto next_skb;
52435249
}
52445250

5245-
arsta = (struct ath11k_sta *)peer->sta->drv_priv;
5251+
arsta = ath11k_sta_to_arsta(peer->sta);
52465252
ath11k_dp_rx_update_peer_stats(arsta, ppdu_info);
52475253

52485254
if (ath11k_debugfs_is_pktlog_peer_valid(ar, peer->addr))

0 commit comments

Comments
 (0)