Skip to content

Commit 126d85f

Browse files
committed
Johannes Berg says: ==================== Another wireless update: - rtw89: - STA+P2P concurrency - support for USB devices RTL8851BU/RTL8852BU - ath9k: OF support - ath12k: - more EHT/Wi-Fi 7 features - encapsulation/decapsulation offload - iwlwifi: some FIPS interoperability - brcm80211: support SDIO 43751 device - rt2x00: better DT/OF support - cfg80211/mac80211: - improved S1G support - beacon monitor for MLO * tag 'wireless-next-2025-07-24' of https://git.kernel.org/pub/scm/linux/kernel/git/wireless/wireless-next: (199 commits) ssb: use new GPIO line value setter callbacks for the second GPIO chip wifi: Fix typos wifi: brcmsmac: Use str_true_false() helper wifi: brcmfmac: fix EXTSAE WPA3 connection failure due to AUTH TX failure wifi: brcm80211: Remove yet more unused functions wifi: brcm80211: Remove more unused functions wifi: brcm80211: Remove unused functions wifi: iwlwifi: Revert "wifi: iwlwifi: remove support of several iwl_ppag_table_cmd versions" wifi: iwlwifi: check validity of the FW API range wifi: iwlwifi: don't export symbols that we shouldn't wifi: iwlwifi: mld: use spec link id and not FW link id wifi: iwlwifi: mld: decode EOF bit for AMPDUs wifi: iwlwifi: Remove support for rx OMI bandwidth reduction wifi: iwlwifi: stop supporting iwl_omi_send_status_notif ver 1 wifi: iwlwifi: remove SC2F firmware support wifi: iwlwifi: mvm: Remove NAN support wifi: iwlwifi: mld: avoid outdated reorder buffer head_sn wifi: iwlwifi: mvm: avoid outdated reorder buffer head_sn wifi: iwlwifi: disable certain features for fips_enabled wifi: iwlwifi: mld: support channel survey collection for ACS scans ... ==================== Link: https://patch.msgid.link/20250724100349.21564-3-johannes@sipsolutions.net Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2 parents 8b5a19b + 55c172c commit 126d85f

File tree

238 files changed

+8372
-3054
lines changed

Some content is hidden

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

238 files changed

+8372
-3054
lines changed

Documentation/devicetree/bindings/net/wireless/qca,ath9k.yaml

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ maintainers:
1212
description: |
1313
This node provides properties for configuring the ath9k wireless device.
1414
The node is expected to be specified as a child node of the PCI controller
15-
to which the wireless chip is connected.
15+
or AHB bus to which the wireless chip is connected.
1616
1717
allOf:
1818
- $ref: ieee80211.yaml#
@@ -35,6 +35,12 @@ properties:
3535
- pci168c,0034 # AR9462
3636
- pci168c,0036 # AR9565
3737
- pci168c,0037 # AR1111 and AR9485
38+
- qca,ar9130-wifi
39+
- qca,ar9330-wifi
40+
- qca,ar9340-wifi
41+
- qca,qca9530-wifi
42+
- qca,qca9550-wifi
43+
- qca,qca9560-wifi
3844

3945
reg:
4046
maxItems: 1
@@ -88,3 +94,13 @@ examples:
8894
nvmem-cell-names = "mac-address", "calibration";
8995
};
9096
};
97+
- |
98+
ahb {
99+
#address-cells = <1>;
100+
#size-cells = <1>;
101+
wifi@180c0000 {
102+
compatible = "qca,ar9130-wifi";
103+
reg = <0x180c0000 0x230000>;
104+
interrupts = <2>;
105+
};
106+
};

Documentation/devicetree/bindings/net/wireless/qcom,ath11k-pci.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,12 @@ properties:
3535
string to uniquely identify variant of the calibration data for designs
3636
with colliding bus and device ids
3737
38+
firmware-name:
39+
maxItems: 1
40+
description:
41+
If present, a board or platform specific string used to lookup
42+
usecase-specific firmware files for the device.
43+
3844
vddrfacmn-supply:
3945
description: VDD_RFA_CMN supply regulator handle
4046

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2+
%YAML 1.2
3+
---
4+
$id: http://devicetree.org/schemas/net/wireless/ralink,rt2880.yaml#
5+
$schema: http://devicetree.org/meta-schemas/core.yaml#
6+
7+
title: Ralink RT2880 wireless device
8+
9+
maintainers:
10+
- Stanislaw Gruszka <stf_xl@wp.pl>
11+
12+
description: |
13+
This node provides properties for configuring RT2880 SOC wifi devices.
14+
The node is expected to be specified as a root node of the device.
15+
16+
allOf:
17+
- $ref: ieee80211.yaml#
18+
19+
properties:
20+
compatible:
21+
enum:
22+
- ralink,rt2880-wifi
23+
24+
reg:
25+
maxItems: 1
26+
27+
clocks:
28+
maxItems: 1
29+
30+
interrupts:
31+
maxItems: 1
32+
33+
required:
34+
- compatible
35+
- reg
36+
- clocks
37+
- interrupts
38+
39+
additionalProperties: false
40+
41+
examples:
42+
- |
43+
wifi@110180000 {
44+
compatible = "ralink,rt2880-wifi";
45+
reg = <0x10180000 0x40000>;
46+
clocks = <&sysc 16>;
47+
interrupt-parent = <&cpuintc>;
48+
interrupts = <6>;
49+
};

arch/mips/boot/dts/ralink/mt7620a.dtsi

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,4 +62,14 @@
6262
reg-shift = <2>;
6363
};
6464
};
65+
66+
wmac: wifi@10180000 {
67+
compatible = "ralink,rt2880-wifi";
68+
reg = <0x10180000 0x40000>;
69+
70+
clocks = <&sysc 16>;
71+
72+
interrupt-parent = <&cpuintc>;
73+
interrupts = <6>;
74+
};
6575
};

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

Lines changed: 44 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1565,7 +1565,7 @@ static int ath10k_core_create_board_name(struct ath10k *ar, char *name,
15651565
bool with_chip_id)
15661566
{
15671567
/* strlen(',variant=') + strlen(ar->id.bdf_ext) */
1568-
char variant[9 + ATH10K_SMBIOS_BDF_EXT_STR_LENGTH] = { 0 };
1568+
char variant[9 + ATH10K_SMBIOS_BDF_EXT_STR_LENGTH] = {};
15691569

15701570
if (with_variant && ar->id.bdf_ext[0] != '\0')
15711571
scnprintf(variant, sizeof(variant), ",variant=%s",
@@ -2493,12 +2493,50 @@ static int ath10k_init_hw_params(struct ath10k *ar)
24932493
return 0;
24942494
}
24952495

2496+
static bool ath10k_core_needs_recovery(struct ath10k *ar)
2497+
{
2498+
long time_left;
2499+
2500+
/* Sometimes the recovery will fail and then the next all recovery fail,
2501+
* so avoid infinite recovery.
2502+
*/
2503+
if (atomic_read(&ar->fail_cont_count) >= ATH10K_RECOVERY_MAX_FAIL_COUNT) {
2504+
ath10k_err(ar, "consecutive fail %d times, will shutdown driver!",
2505+
atomic_read(&ar->fail_cont_count));
2506+
ar->state = ATH10K_STATE_WEDGED;
2507+
return false;
2508+
}
2509+
2510+
ath10k_dbg(ar, ATH10K_DBG_BOOT, "total recovery count: %d", ++ar->recovery_count);
2511+
2512+
if (atomic_read(&ar->pending_recovery)) {
2513+
/* Sometimes it happened another recovery work before the previous one
2514+
* completed, then the second recovery work will destroy the previous
2515+
* one, thus below is to avoid that.
2516+
*/
2517+
time_left = wait_for_completion_timeout(&ar->driver_recovery,
2518+
ATH10K_RECOVERY_TIMEOUT_HZ);
2519+
if (time_left) {
2520+
ath10k_warn(ar, "previous recovery succeeded, skip this!\n");
2521+
return false;
2522+
}
2523+
2524+
/* Record the continuous recovery fail count when recovery failed. */
2525+
atomic_inc(&ar->fail_cont_count);
2526+
2527+
/* Avoid having multiple recoveries at the same time. */
2528+
return false;
2529+
}
2530+
2531+
atomic_inc(&ar->pending_recovery);
2532+
2533+
return true;
2534+
}
2535+
24962536
void ath10k_core_start_recovery(struct ath10k *ar)
24972537
{
2498-
if (test_and_set_bit(ATH10K_FLAG_RESTARTING, &ar->dev_flags)) {
2499-
ath10k_warn(ar, "already restarting\n");
2538+
if (!ath10k_core_needs_recovery(ar))
25002539
return;
2501-
}
25022540

25032541
queue_work(ar->workqueue, &ar->restart_work);
25042542
}
@@ -2534,6 +2572,8 @@ static void ath10k_core_restart(struct work_struct *work)
25342572
struct ath10k *ar = container_of(work, struct ath10k, restart_work);
25352573
int ret;
25362574

2575+
reinit_completion(&ar->driver_recovery);
2576+
25372577
set_bit(ATH10K_FLAG_CRASH_FLUSH, &ar->dev_flags);
25382578

25392579
/* Place a barrier to make sure the compiler doesn't reorder
@@ -2598,8 +2638,6 @@ static void ath10k_core_restart(struct work_struct *work)
25982638
if (ret)
25992639
ath10k_warn(ar, "failed to send firmware crash dump via devcoredump: %d",
26002640
ret);
2601-
2602-
complete(&ar->driver_recovery);
26032641
}
26042642

26052643
static void ath10k_core_set_coverage_class_work(struct work_struct *work)

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

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
* Copyright (c) 2011-2017 Qualcomm Atheros, Inc.
55
* Copyright (c) 2018-2019, The Linux Foundation. All rights reserved.
66
* Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved.
7+
* Copyright (c) Qualcomm Technologies, Inc. and/or its subsidiaries.
78
*/
89

910
#ifndef _CORE_H_
@@ -87,6 +88,8 @@
8788
IEEE80211_IFACE_SKIP_SDATA_NOT_IN_DRIVER)
8889
#define ATH10K_ITER_RESUME_FLAGS (IEEE80211_IFACE_ITER_RESUME_ALL |\
8990
IEEE80211_IFACE_SKIP_SDATA_NOT_IN_DRIVER)
91+
#define ATH10K_RECOVERY_TIMEOUT_HZ (5 * HZ)
92+
#define ATH10K_RECOVERY_MAX_FAIL_COUNT 4
9093

9194
struct ath10k;
9295

@@ -779,7 +782,7 @@ enum ath10k_fw_features {
779782
/* Firmware supports bypassing PLL setting on init. */
780783
ATH10K_FW_FEATURE_SUPPORTS_SKIP_CLOCK_INIT = 9,
781784

782-
/* Raw mode support. If supported, FW supports receiving and trasmitting
785+
/* Raw mode support. If supported, FW supports receiving and transmitting
783786
* frames in raw mode.
784787
*/
785788
ATH10K_FW_FEATURE_RAW_MODE_SUPPORT = 10,
@@ -865,9 +868,6 @@ enum ath10k_dev_flags {
865868
/* Per Station statistics service */
866869
ATH10K_FLAG_PEER_STATS,
867870

868-
/* Indicates that ath10k device is during recovery process and not complete */
869-
ATH10K_FLAG_RESTARTING,
870-
871871
/* protected by conf_mutex */
872872
ATH10K_FLAG_NAPI_ENABLED,
873873
};
@@ -1211,6 +1211,11 @@ struct ath10k {
12111211
struct work_struct bundle_tx_work;
12121212
struct work_struct tx_complete_work;
12131213

1214+
atomic_t pending_recovery;
1215+
unsigned int recovery_count;
1216+
/* continuous recovery fail count */
1217+
atomic_t fail_cont_count;
1218+
12141219
/* cycle count is reported twice for each visited channel during scan.
12151220
* access protected by data_lock
12161221
*/

drivers/net/wireless/ath/ath10k/debug.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -547,7 +547,7 @@ static ssize_t ath10k_write_simulate_fw_crash(struct file *file,
547547
size_t count, loff_t *ppos)
548548
{
549549
struct ath10k *ar = file->private_data;
550-
char buf[32] = {0};
550+
char buf[32] = {};
551551
ssize_t rc;
552552
int ret;
553553

@@ -983,7 +983,7 @@ static ssize_t ath10k_write_htt_max_amsdu_ampdu(struct file *file,
983983
{
984984
struct ath10k *ar = file->private_data;
985985
int res;
986-
char buf[64] = {0};
986+
char buf[64] = {};
987987
unsigned int amsdu, ampdu;
988988

989989
res = simple_write_to_buffer(buf, sizeof(buf) - 1, ppos,
@@ -1039,7 +1039,7 @@ static ssize_t ath10k_write_fw_dbglog(struct file *file,
10391039
{
10401040
struct ath10k *ar = file->private_data;
10411041
int ret;
1042-
char buf[96] = {0};
1042+
char buf[96] = {};
10431043
unsigned int log_level;
10441044
u64 mask;
10451045

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

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
* Copyright (c) 2014-2017 Qualcomm Atheros, Inc.
44
* Copyright (c) 2018, The Linux Foundation. All rights reserved.
55
* Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved.
6+
* Copyright (c) Qualcomm Technologies, Inc. and/or its subsidiaries.
67
*/
78

89
#include "core.h"
@@ -244,7 +245,7 @@ static ssize_t ath10k_dbg_sta_write_addba(struct file *file,
244245
struct ath10k *ar = arsta->arvif->ar;
245246
u32 tid, buf_size;
246247
int ret;
247-
char buf[64] = {0};
248+
char buf[64] = {};
248249

249250
ret = simple_write_to_buffer(buf, sizeof(buf) - 1, ppos,
250251
user_buf, count);
@@ -295,7 +296,7 @@ static ssize_t ath10k_dbg_sta_write_addba_resp(struct file *file,
295296
struct ath10k *ar = arsta->arvif->ar;
296297
u32 tid, status;
297298
int ret;
298-
char buf[64] = {0};
299+
char buf[64] = {};
299300

300301
ret = simple_write_to_buffer(buf, sizeof(buf) - 1, ppos,
301302
user_buf, count);
@@ -345,7 +346,7 @@ static ssize_t ath10k_dbg_sta_write_delba(struct file *file,
345346
struct ath10k *ar = arsta->arvif->ar;
346347
u32 tid, initiator, reason;
347348
int ret;
348-
char buf[64] = {0};
349+
char buf[64] = {};
349350

350351
ret = simple_write_to_buffer(buf, sizeof(buf) - 1, ppos,
351352
user_buf, count);

drivers/net/wireless/ath/ath10k/htt_rx.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1884,7 +1884,7 @@ static bool ath10k_htt_rx_h_frag_pn_check(struct ath10k *ar,
18841884
enum htt_rx_mpdu_encrypt_type enctype)
18851885
{
18861886
struct ath10k_peer *peer;
1887-
union htt_rx_pn_t *last_pn, new_pn = {0};
1887+
union htt_rx_pn_t *last_pn, new_pn = {};
18881888
struct ieee80211_hdr *hdr;
18891889
u8 tid, frag_number;
18901890
u32 seq;
@@ -2402,7 +2402,7 @@ static bool ath10k_htt_rx_pn_check_replay_hl(struct ath10k *ar,
24022402
bool last_pn_valid, pn_invalid = false;
24032403
enum htt_txrx_sec_cast_type sec_index;
24042404
enum htt_security_types sec_type;
2405-
union htt_rx_pn_t new_pn = {0};
2405+
union htt_rx_pn_t new_pn = {};
24062406
struct htt_hl_rx_desc *rx_desc;
24072407
union htt_rx_pn_t *last_pn;
24082408
u32 rx_desc_info, tid;
@@ -2465,7 +2465,7 @@ static bool ath10k_htt_rx_proc_rx_ind_hl(struct ath10k_htt *htt,
24652465
struct fw_rx_desc_hl *fw_desc;
24662466
enum htt_txrx_sec_cast_type sec_index;
24672467
enum htt_security_types sec_type;
2468-
union htt_rx_pn_t new_pn = {0};
2468+
union htt_rx_pn_t new_pn = {};
24692469
struct htt_hl_rx_desc *rx_desc;
24702470
struct ieee80211_hdr *hdr;
24712471
struct ieee80211_rx_status *rx_status;
@@ -2767,7 +2767,7 @@ static bool ath10k_htt_rx_proc_rx_frag_ind_hl(struct ath10k_htt *htt,
27672767
struct htt_rx_indication_hl *rx_hl;
27682768
enum htt_security_types sec_type;
27692769
u32 tid, frag, seq, rx_desc_info;
2770-
union htt_rx_pn_t new_pn = {0};
2770+
union htt_rx_pn_t new_pn = {};
27712771
struct htt_hl_rx_desc *rx_desc;
27722772
u16 peer_id, sc, hdr_space;
27732773
union htt_rx_pn_t *last_pn;

drivers/net/wireless/ath/ath10k/htt_tx.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -510,7 +510,7 @@ static int ath10k_htt_tx_clean_up_pending(int msdu_id, void *skb, void *ctx)
510510
{
511511
struct ath10k *ar = ctx;
512512
struct ath10k_htt *htt = &ar->htt;
513-
struct htt_tx_done tx_done = {0};
513+
struct htt_tx_done tx_done = {};
514514

515515
ath10k_dbg(ar, ATH10K_DBG_HTT, "force cleanup msdu_id %u\n", msdu_id);
516516

@@ -560,7 +560,7 @@ void ath10k_htt_op_ep_tx_credits(struct ath10k *ar)
560560
void ath10k_htt_htc_tx_complete(struct ath10k *ar, struct sk_buff *skb)
561561
{
562562
struct ath10k_htt *htt = &ar->htt;
563-
struct htt_tx_done tx_done = {0};
563+
struct htt_tx_done tx_done = {};
564564
struct htt_cmd_hdr *htt_hdr;
565565
struct htt_data_tx_desc *desc_hdr = NULL;
566566
u16 flags1 = 0;

0 commit comments

Comments
 (0)