Skip to content

Commit 85d24ad

Browse files
committed
Merge tag 'wireless-2022-02-11' of git://git.kernel.org/pub/scm/linux/kernel/git/wireless/wireless
wireless fixes for v5.17 Second set of fixes for v5.17. This is the first pull request with both driver and stack patches. Most important here are a regression fix for brcmfmac USB devices and an iwlwifi fix for use after free when the firmware was missing. We have new maintainers for ath9k and wcn36xx as well as ath6kl is now orphaned. Also smaller fixes to iwlwifi and stack.
2 parents 525de9a + bea2662 commit 85d24ad

File tree

24 files changed

+116
-637
lines changed

24 files changed

+116
-637
lines changed

MAINTAINERS

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3133,11 +3133,9 @@ W: https://wireless.wiki.kernel.org/en/users/Drivers/ath5k
31333133
F: drivers/net/wireless/ath/ath5k/
31343134

31353135
ATHEROS ATH6KL WIRELESS DRIVER
3136-
M: Kalle Valo <[email protected]>
31373136
3138-
S: Supported
3137+
S: Orphan
31393138
W: https://wireless.wiki.kernel.org/en/users/Drivers/ath6kl
3140-
T: git git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/ath.git
31413139
F: drivers/net/wireless/ath/ath6kl/
31423140

31433141
ATI_REMOTE2 DRIVER
@@ -15896,18 +15894,20 @@ S: Supported
1589615894
W: https://wireless.wiki.kernel.org/en/users/Drivers/ath10k
1589715895
T: git git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/ath.git
1589815896
F: drivers/net/wireless/ath/ath10k/
15897+
F: Documentation/devicetree/bindings/net/wireless/qcom,ath10k.txt
1589915898

1590015899
QUALCOMM ATHEROS ATH11K WIRELESS DRIVER
1590115900
M: Kalle Valo <[email protected]>
1590215901
1590315902
S: Supported
1590415903
T: git git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/ath.git
1590515904
F: drivers/net/wireless/ath/ath11k/
15905+
F: Documentation/devicetree/bindings/net/wireless/qcom,ath11k.txt
1590615906

1590715907
QUALCOMM ATHEROS ATH9K WIRELESS DRIVER
15908-
15908+
M: Toke Høiland-Jørgensen <[email protected]>
1590915909
15910-
S: Supported
15910+
S: Maintained
1591115911
W: https://wireless.wiki.kernel.org/en/users/Drivers/ath9k
1591215912
F: Documentation/devicetree/bindings/net/wireless/qca,ath9k.yaml
1591315913
F: drivers/net/wireless/ath/ath9k/
@@ -16088,11 +16088,10 @@ F: Documentation/devicetree/bindings/media/*venus*
1608816088
F: drivers/media/platform/qcom/venus/
1608916089

1609016090
QUALCOMM WCN36XX WIRELESS DRIVER
16091-
M: Kalle Valo <kvalo@kernel.org>
16091+
M: Loic Poulain <loic.poulain@linaro.org>
1609216092
1609316093
S: Supported
1609416094
W: https://wireless.wiki.kernel.org/en/users/Drivers/wcn36xx
16095-
T: git git://github.com/KrasnikovEugene/wcn36xx.git
1609616095
F: drivers/net/wireless/ath/wcn36xx/
1609716096

1609816097
QUANTENNA QTNFMAC WIRELESS DRIVER

drivers/net/wireless/broadcom/brcm80211/brcmfmac/firmware.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -693,7 +693,7 @@ int brcmf_fw_get_firmwares(struct device *dev, struct brcmf_fw_request *req,
693693
{
694694
struct brcmf_fw_item *first = &req->items[0];
695695
struct brcmf_fw *fwctx;
696-
char *alt_path;
696+
char *alt_path = NULL;
697697
int ret;
698698

699699
brcmf_dbg(TRACE, "enter: dev=%s\n", dev_name(dev));
@@ -712,7 +712,9 @@ int brcmf_fw_get_firmwares(struct device *dev, struct brcmf_fw_request *req,
712712
fwctx->done = fw_cb;
713713

714714
/* First try alternative board-specific path if any */
715-
alt_path = brcm_alt_fw_path(first->path, fwctx->req->board_type);
715+
if (fwctx->req->board_type)
716+
alt_path = brcm_alt_fw_path(first->path,
717+
fwctx->req->board_type);
716718
if (alt_path) {
717719
ret = request_firmware_nowait(THIS_MODULE, true, alt_path,
718720
fwctx->dev, GFP_KERNEL, fwctx,

drivers/net/wireless/intel/iwlwifi/Kconfig

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -80,19 +80,6 @@ config IWLWIFI_OPMODE_MODULAR
8080
comment "WARNING: iwlwifi is useless without IWLDVM or IWLMVM"
8181
depends on IWLDVM=n && IWLMVM=n
8282

83-
config IWLWIFI_BCAST_FILTERING
84-
bool "Enable broadcast filtering"
85-
depends on IWLMVM
86-
help
87-
Say Y here to enable default bcast filtering configuration.
88-
89-
Enabling broadcast filtering will drop any incoming wireless
90-
broadcast frames, except some very specific predefined
91-
patterns (e.g. incoming arp requests).
92-
93-
If unsure, don't enable this option, as some programs might
94-
expect incoming broadcasts for their normal operations.
95-
9683
menu "Debugging Options"
9784

9885
config IWLWIFI_DEBUG

drivers/net/wireless/intel/iwlwifi/fw/acpi.c

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause
22
/*
33
* Copyright (C) 2017 Intel Deutschland GmbH
4-
* Copyright (C) 2019-2021 Intel Corporation
4+
* Copyright (C) 2019-2022 Intel Corporation
55
*/
66
#include <linux/uuid.h>
77
#include "iwl-drv.h"
@@ -888,10 +888,11 @@ bool iwl_sar_geo_support(struct iwl_fw_runtime *fwrt)
888888
* only one using version 36, so skip this version entirely.
889889
*/
890890
return IWL_UCODE_SERIAL(fwrt->fw->ucode_ver) >= 38 ||
891-
IWL_UCODE_SERIAL(fwrt->fw->ucode_ver) == 17 ||
892-
(IWL_UCODE_SERIAL(fwrt->fw->ucode_ver) == 29 &&
893-
((fwrt->trans->hw_rev & CSR_HW_REV_TYPE_MSK) ==
894-
CSR_HW_REV_TYPE_7265D));
891+
(IWL_UCODE_SERIAL(fwrt->fw->ucode_ver) == 17 &&
892+
fwrt->trans->hw_rev != CSR_HW_REV_TYPE_3160) ||
893+
(IWL_UCODE_SERIAL(fwrt->fw->ucode_ver) == 29 &&
894+
((fwrt->trans->hw_rev & CSR_HW_REV_TYPE_MSK) ==
895+
CSR_HW_REV_TYPE_7265D));
895896
}
896897
IWL_EXPORT_SYMBOL(iwl_sar_geo_support);
897898

drivers/net/wireless/intel/iwlwifi/fw/api/commands.h

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -501,11 +501,6 @@ enum iwl_legacy_cmds {
501501
*/
502502
DEBUG_LOG_MSG = 0xf7,
503503

504-
/**
505-
* @BCAST_FILTER_CMD: &struct iwl_bcast_filter_cmd
506-
*/
507-
BCAST_FILTER_CMD = 0xcf,
508-
509504
/**
510505
* @MCAST_FILTER_CMD: &struct iwl_mcast_filter_cmd
511506
*/

drivers/net/wireless/intel/iwlwifi/fw/api/filter.h

Lines changed: 0 additions & 88 deletions
Original file line numberDiff line numberDiff line change
@@ -36,92 +36,4 @@ struct iwl_mcast_filter_cmd {
3636
u8 addr_list[0];
3737
} __packed; /* MCAST_FILTERING_CMD_API_S_VER_1 */
3838

39-
#define MAX_BCAST_FILTERS 8
40-
#define MAX_BCAST_FILTER_ATTRS 2
41-
42-
/**
43-
* enum iwl_mvm_bcast_filter_attr_offset - written by fw for each Rx packet
44-
* @BCAST_FILTER_OFFSET_PAYLOAD_START: offset is from payload start.
45-
* @BCAST_FILTER_OFFSET_IP_END: offset is from ip header end (i.e.
46-
* start of ip payload).
47-
*/
48-
enum iwl_mvm_bcast_filter_attr_offset {
49-
BCAST_FILTER_OFFSET_PAYLOAD_START = 0,
50-
BCAST_FILTER_OFFSET_IP_END = 1,
51-
};
52-
53-
/**
54-
* struct iwl_fw_bcast_filter_attr - broadcast filter attribute
55-
* @offset_type: &enum iwl_mvm_bcast_filter_attr_offset.
56-
* @offset: starting offset of this pattern.
57-
* @reserved1: reserved
58-
* @val: value to match - big endian (MSB is the first
59-
* byte to match from offset pos).
60-
* @mask: mask to match (big endian).
61-
*/
62-
struct iwl_fw_bcast_filter_attr {
63-
u8 offset_type;
64-
u8 offset;
65-
__le16 reserved1;
66-
__be32 val;
67-
__be32 mask;
68-
} __packed; /* BCAST_FILTER_ATT_S_VER_1 */
69-
70-
/**
71-
* enum iwl_mvm_bcast_filter_frame_type - filter frame type
72-
* @BCAST_FILTER_FRAME_TYPE_ALL: consider all frames.
73-
* @BCAST_FILTER_FRAME_TYPE_IPV4: consider only ipv4 frames
74-
*/
75-
enum iwl_mvm_bcast_filter_frame_type {
76-
BCAST_FILTER_FRAME_TYPE_ALL = 0,
77-
BCAST_FILTER_FRAME_TYPE_IPV4 = 1,
78-
};
79-
80-
/**
81-
* struct iwl_fw_bcast_filter - broadcast filter
82-
* @discard: discard frame (1) or let it pass (0).
83-
* @frame_type: &enum iwl_mvm_bcast_filter_frame_type.
84-
* @reserved1: reserved
85-
* @num_attrs: number of valid attributes in this filter.
86-
* @attrs: attributes of this filter. a filter is considered matched
87-
* only when all its attributes are matched (i.e. AND relationship)
88-
*/
89-
struct iwl_fw_bcast_filter {
90-
u8 discard;
91-
u8 frame_type;
92-
u8 num_attrs;
93-
u8 reserved1;
94-
struct iwl_fw_bcast_filter_attr attrs[MAX_BCAST_FILTER_ATTRS];
95-
} __packed; /* BCAST_FILTER_S_VER_1 */
96-
97-
/**
98-
* struct iwl_fw_bcast_mac - per-mac broadcast filtering configuration.
99-
* @default_discard: default action for this mac (discard (1) / pass (0)).
100-
* @reserved1: reserved
101-
* @attached_filters: bitmap of relevant filters for this mac.
102-
*/
103-
struct iwl_fw_bcast_mac {
104-
u8 default_discard;
105-
u8 reserved1;
106-
__le16 attached_filters;
107-
} __packed; /* BCAST_MAC_CONTEXT_S_VER_1 */
108-
109-
/**
110-
* struct iwl_bcast_filter_cmd - broadcast filtering configuration
111-
* @disable: enable (0) / disable (1)
112-
* @max_bcast_filters: max number of filters (MAX_BCAST_FILTERS)
113-
* @max_macs: max number of macs (NUM_MAC_INDEX_DRIVER)
114-
* @reserved1: reserved
115-
* @filters: broadcast filters
116-
* @macs: broadcast filtering configuration per-mac
117-
*/
118-
struct iwl_bcast_filter_cmd {
119-
u8 disable;
120-
u8 max_bcast_filters;
121-
u8 max_macs;
122-
u8 reserved1;
123-
struct iwl_fw_bcast_filter filters[MAX_BCAST_FILTERS];
124-
struct iwl_fw_bcast_mac macs[NUM_MAC_INDEX_DRIVER];
125-
} __packed; /* BCAST_FILTERING_HCMD_API_S_VER_1 */
126-
12739
#endif /* __iwl_fw_api_filter_h__ */

drivers/net/wireless/intel/iwlwifi/fw/api/rs.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -752,7 +752,6 @@ struct iwl_lq_cmd {
752752

753753
u8 iwl_fw_rate_idx_to_plcp(int idx);
754754
u32 iwl_new_rate_from_v1(u32 rate_v1);
755-
u32 iwl_legacy_rate_to_fw_idx(u32 rate_n_flags);
756755
const struct iwl_rate_mcs_info *iwl_rate_mcs(int idx);
757756
const char *iwl_rs_pretty_ant(u8 ant);
758757
const char *iwl_rs_pretty_bw(int bw);

drivers/net/wireless/intel/iwlwifi/fw/file.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,6 @@ struct iwl_ucode_capa {
181181
* @IWL_UCODE_TLV_FLAGS_NEW_NSOFFL_LARGE: new NS offload (large version)
182182
* @IWL_UCODE_TLV_FLAGS_UAPSD_SUPPORT: General support for uAPSD
183183
* @IWL_UCODE_TLV_FLAGS_P2P_PS_UAPSD: P2P client supports uAPSD power save
184-
* @IWL_UCODE_TLV_FLAGS_BCAST_FILTERING: uCode supports broadcast filtering.
185184
* @IWL_UCODE_TLV_FLAGS_EBS_SUPPORT: this uCode image supports EBS.
186185
*/
187186
enum iwl_ucode_tlv_flag {
@@ -196,7 +195,6 @@ enum iwl_ucode_tlv_flag {
196195
IWL_UCODE_TLV_FLAGS_UAPSD_SUPPORT = BIT(24),
197196
IWL_UCODE_TLV_FLAGS_EBS_SUPPORT = BIT(25),
198197
IWL_UCODE_TLV_FLAGS_P2P_PS_UAPSD = BIT(26),
199-
IWL_UCODE_TLV_FLAGS_BCAST_FILTERING = BIT(29),
200198
};
201199

202200
typedef unsigned int __bitwise iwl_ucode_tlv_api_t;

drivers/net/wireless/intel/iwlwifi/fw/rs.c

Lines changed: 18 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,20 @@ const char *iwl_rs_pretty_bw(int bw)
9191
}
9292
IWL_EXPORT_SYMBOL(iwl_rs_pretty_bw);
9393

94+
static u32 iwl_legacy_rate_to_fw_idx(u32 rate_n_flags)
95+
{
96+
int rate = rate_n_flags & RATE_LEGACY_RATE_MSK_V1;
97+
int idx;
98+
bool ofdm = !(rate_n_flags & RATE_MCS_CCK_MSK_V1);
99+
int offset = ofdm ? IWL_FIRST_OFDM_RATE : 0;
100+
int last = ofdm ? IWL_RATE_COUNT_LEGACY : IWL_FIRST_OFDM_RATE;
101+
102+
for (idx = offset; idx < last; idx++)
103+
if (iwl_fw_rate_idx_to_plcp(idx) == rate)
104+
return idx - offset;
105+
return IWL_RATE_INVALID;
106+
}
107+
94108
u32 iwl_new_rate_from_v1(u32 rate_v1)
95109
{
96110
u32 rate_v2 = 0;
@@ -144,7 +158,10 @@ u32 iwl_new_rate_from_v1(u32 rate_v1)
144158
} else {
145159
u32 legacy_rate = iwl_legacy_rate_to_fw_idx(rate_v1);
146160

147-
WARN_ON(legacy_rate < 0);
161+
if (WARN_ON_ONCE(legacy_rate == IWL_RATE_INVALID))
162+
legacy_rate = (rate_v1 & RATE_MCS_CCK_MSK_V1) ?
163+
IWL_FIRST_CCK_RATE : IWL_FIRST_OFDM_RATE;
164+
148165
rate_v2 |= legacy_rate;
149166
if (!(rate_v1 & RATE_MCS_CCK_MSK_V1))
150167
rate_v2 |= RATE_MCS_LEGACY_OFDM_MSK;
@@ -172,20 +189,6 @@ u32 iwl_new_rate_from_v1(u32 rate_v1)
172189
}
173190
IWL_EXPORT_SYMBOL(iwl_new_rate_from_v1);
174191

175-
u32 iwl_legacy_rate_to_fw_idx(u32 rate_n_flags)
176-
{
177-
int rate = rate_n_flags & RATE_LEGACY_RATE_MSK_V1;
178-
int idx;
179-
bool ofdm = !(rate_n_flags & RATE_MCS_CCK_MSK_V1);
180-
int offset = ofdm ? IWL_FIRST_OFDM_RATE : 0;
181-
int last = ofdm ? IWL_RATE_COUNT_LEGACY : IWL_FIRST_OFDM_RATE;
182-
183-
for (idx = offset; idx < last; idx++)
184-
if (iwl_fw_rate_idx_to_plcp(idx) == rate)
185-
return idx - offset;
186-
return -1;
187-
}
188-
189192
int rs_pretty_print_rate(char *buf, int bufsz, const u32 rate)
190193
{
191194
char *type;

drivers/net/wireless/intel/iwlwifi/iwl-csr.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/* SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause */
22
/*
3-
* Copyright (C) 2005-2014, 2018-2021 Intel Corporation
3+
* Copyright (C) 2005-2014, 2018-2022 Intel Corporation
44
* Copyright (C) 2013-2014 Intel Mobile Communications GmbH
55
* Copyright (C) 2016 Intel Deutschland GmbH
66
*/
@@ -329,6 +329,7 @@ enum {
329329
#define CSR_HW_REV_TYPE_2x00 (0x0000100)
330330
#define CSR_HW_REV_TYPE_105 (0x0000110)
331331
#define CSR_HW_REV_TYPE_135 (0x0000120)
332+
#define CSR_HW_REV_TYPE_3160 (0x0000164)
332333
#define CSR_HW_REV_TYPE_7265D (0x0000210)
333334
#define CSR_HW_REV_TYPE_NONE (0x00001F0)
334335
#define CSR_HW_REV_TYPE_QNJ (0x0000360)

0 commit comments

Comments
 (0)