Skip to content

Commit b8fa3bf

Browse files
committed
Merge tag 'wireless-drivers-next-for-davem-2017-12-18' of git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/wireless-drivers-next
The drivers/net/wireless/intel/iwlwifi/pcie/drv.c conflict was resolved using a diff provided by Kalle in his pull request. Kalle Valo says: ==================== wireless-drivers-next patches for 4.16 A bigger pull request this time, the most visible change being the new driver mt76. But there's also Kconfig refactoring in ath9k and ath10k, work beginning in iwlwifi to have rate scaling in firmware/hardware, wcn3990 support getting closer in ath10k and lots of smaller changes. mt76 * a new driver for MT76x2e, a 2x2 PCIe 802.11ac chipset by MediaTek ath10k * enable multiqueue support for all hw using mac80211 wake_tx_queue op * new Kconfig option ATH10K_SPECTRAL to save RAM * show tx stats on QCA9880 * new qcom,ath10k-calibration-variant DT entry * WMI layer support for wcn3990 ath9k * new Kconfig option ATH9K_COMMON_SPECTRAL to save RAM wcn36xx * hardware scan offload support wil6210 * run-time PM support when interface is down iwlwifi * initial work for rate-scaling offload * Support for new FW API version 36 * Rename the temporary hw name A000 to 22000 ssb * make SSB a menuconfig to ease disabling it all mwl8k * enable non-DFS 5G channels 149-165 ==================== Signed-off-by: David S. Miller <[email protected]>
2 parents 918341e + 1dde35d commit b8fa3bf

File tree

159 files changed

+12701
-2098
lines changed

Some content is hidden

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

159 files changed

+12701
-2098
lines changed
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
* MediaTek mt76xx devices
2+
3+
This node provides properties for configuring the MediaTek mt76xx wireless
4+
device. The node is expected to be specified as a child node of the PCI
5+
controller to which the wireless chip is connected.
6+
7+
Optional properties:
8+
9+
- mac-address: See ethernet.txt in the parent directory
10+
- local-mac-address: See ethernet.txt in the parent directory
11+
- ieee80211-freq-limit: See ieee80211.txt
12+
- mediatek,mtd-eeprom: Specify a MTD partition + offset containing EEPROM data
13+
14+
Optional nodes:
15+
- led: Properties for a connected LED
16+
Optional properties:
17+
- led-sources: See Documentation/devicetree/bindings/leds/common.txt
18+
19+
&pcie {
20+
pcie0 {
21+
wifi@0,0 {
22+
compatible = "mediatek,mt76";
23+
reg = <0x0000 0 0 0 0>;
24+
ieee80211-freq-limit = <5000000 6000000>;
25+
mediatek,mtd-eeprom = <&factory 0x8000>;
26+
27+
led {
28+
led-sources = <2>;
29+
};
30+
};
31+
};
32+
};

Documentation/devicetree/bindings/net/wireless/qcom,ath10k.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,9 @@ Optional properties:
4141
- qcom,msi_addr: MSI interrupt address.
4242
- qcom,msi_base: Base value to add before writing MSI data into
4343
MSI address register.
44+
- qcom,ath10k-calibration-variant: string to search for in the board-2.bin
45+
variant list with the same bus and device
46+
specific ids
4447
- qcom,ath10k-calibration-data : calibration data + board specific data
4548
as an array, the length can vary between
4649
hw versions.

drivers/bcma/driver_pcie2.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,8 @@ static void bcma_core_pcie2_hw_ltr_war(struct bcma_drv_pcie2 *pcie2)
8383
bcma_core_pcie2_set_ltr_vals(pcie2);
8484

8585
/* TODO:
86-
si_core_wrapperreg(pcie2, 3, 0x60, 0x8080, 0); */
86+
*si_core_wrapperreg(pcie2, 3, 0x60, 0x8080, 0);
87+
*/
8788

8889
/* enable the LTR */
8990
devstsctr2 |= PCIE2_CAP_DEVSTSCTRL2_LTRENAB;

drivers/net/wireless/ath/ath10k/Kconfig

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,12 +47,19 @@ config ATH10K_DEBUG
4747
config ATH10K_DEBUGFS
4848
bool "Atheros ath10k debugfs support"
4949
depends on ATH10K && DEBUG_FS
50-
select RELAY
5150
---help---
5251
Enabled debugfs support
5352

5453
If unsure, say Y to make it easier to debug problems.
5554

55+
config ATH10K_SPECTRAL
56+
bool "Atheros ath10k spectral scan support"
57+
depends on ATH10K_DEBUGFS
58+
select RELAY
59+
default n
60+
---help---
61+
Say Y to enable access to the FFT/spectral data via debugfs.
62+
5663
config ATH10K_TRACING
5764
bool "Atheros ath10k tracing support"
5865
depends on ATH10K

drivers/net/wireless/ath/ath10k/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ ath10k_core-y += mac.o \
1515
p2p.o \
1616
swap.o
1717

18-
ath10k_core-$(CONFIG_ATH10K_DEBUGFS) += spectral.o
18+
ath10k_core-$(CONFIG_ATH10K_SPECTRAL) += spectral.o
1919
ath10k_core-$(CONFIG_NL80211_TESTMODE) += testmode.o
2020
ath10k_core-$(CONFIG_ATH10K_TRACING) += trace.o
2121
ath10k_core-$(CONFIG_THERMAL) += thermal.o

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

Lines changed: 88 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,9 @@ static const struct ath10k_hw_params ath10k_hw_params_list[] = {
7575
.vht160_mcs_rx_highest = 0,
7676
.vht160_mcs_tx_highest = 0,
7777
.n_cipher_suites = 8,
78+
.num_peers = TARGET_TLV_NUM_PEERS,
79+
.ast_skid_limit = 0x10,
80+
.num_wds_entries = 0x20,
7881
},
7982
{
8083
.id = QCA9887_HW_1_0_VERSION,
@@ -99,6 +102,9 @@ static const struct ath10k_hw_params ath10k_hw_params_list[] = {
99102
.vht160_mcs_rx_highest = 0,
100103
.vht160_mcs_tx_highest = 0,
101104
.n_cipher_suites = 8,
105+
.num_peers = TARGET_TLV_NUM_PEERS,
106+
.ast_skid_limit = 0x10,
107+
.num_wds_entries = 0x20,
102108
},
103109
{
104110
.id = QCA6174_HW_2_1_VERSION,
@@ -122,6 +128,9 @@ static const struct ath10k_hw_params ath10k_hw_params_list[] = {
122128
.vht160_mcs_rx_highest = 0,
123129
.vht160_mcs_tx_highest = 0,
124130
.n_cipher_suites = 8,
131+
.num_peers = TARGET_TLV_NUM_PEERS,
132+
.ast_skid_limit = 0x10,
133+
.num_wds_entries = 0x20,
125134
},
126135
{
127136
.id = QCA6174_HW_2_1_VERSION,
@@ -145,6 +154,9 @@ static const struct ath10k_hw_params ath10k_hw_params_list[] = {
145154
.vht160_mcs_rx_highest = 0,
146155
.vht160_mcs_tx_highest = 0,
147156
.n_cipher_suites = 8,
157+
.num_peers = TARGET_TLV_NUM_PEERS,
158+
.ast_skid_limit = 0x10,
159+
.num_wds_entries = 0x20,
148160
},
149161
{
150162
.id = QCA6174_HW_3_0_VERSION,
@@ -168,6 +180,9 @@ static const struct ath10k_hw_params ath10k_hw_params_list[] = {
168180
.vht160_mcs_rx_highest = 0,
169181
.vht160_mcs_tx_highest = 0,
170182
.n_cipher_suites = 8,
183+
.num_peers = TARGET_TLV_NUM_PEERS,
184+
.ast_skid_limit = 0x10,
185+
.num_wds_entries = 0x20,
171186
},
172187
{
173188
.id = QCA6174_HW_3_2_VERSION,
@@ -194,6 +209,9 @@ static const struct ath10k_hw_params ath10k_hw_params_list[] = {
194209
.vht160_mcs_rx_highest = 0,
195210
.vht160_mcs_tx_highest = 0,
196211
.n_cipher_suites = 8,
212+
.num_peers = TARGET_TLV_NUM_PEERS,
213+
.ast_skid_limit = 0x10,
214+
.num_wds_entries = 0x20,
197215
},
198216
{
199217
.id = QCA99X0_HW_2_0_DEV_VERSION,
@@ -223,6 +241,9 @@ static const struct ath10k_hw_params ath10k_hw_params_list[] = {
223241
.vht160_mcs_rx_highest = 0,
224242
.vht160_mcs_tx_highest = 0,
225243
.n_cipher_suites = 11,
244+
.num_peers = TARGET_TLV_NUM_PEERS,
245+
.ast_skid_limit = 0x10,
246+
.num_wds_entries = 0x20,
226247
},
227248
{
228249
.id = QCA9984_HW_1_0_DEV_VERSION,
@@ -257,6 +278,9 @@ static const struct ath10k_hw_params ath10k_hw_params_list[] = {
257278
.vht160_mcs_rx_highest = 1560,
258279
.vht160_mcs_tx_highest = 1560,
259280
.n_cipher_suites = 11,
281+
.num_peers = TARGET_TLV_NUM_PEERS,
282+
.ast_skid_limit = 0x10,
283+
.num_wds_entries = 0x20,
260284
},
261285
{
262286
.id = QCA9888_HW_2_0_DEV_VERSION,
@@ -290,6 +314,9 @@ static const struct ath10k_hw_params ath10k_hw_params_list[] = {
290314
.vht160_mcs_rx_highest = 780,
291315
.vht160_mcs_tx_highest = 780,
292316
.n_cipher_suites = 11,
317+
.num_peers = TARGET_TLV_NUM_PEERS,
318+
.ast_skid_limit = 0x10,
319+
.num_wds_entries = 0x20,
293320
},
294321
{
295322
.id = QCA9377_HW_1_0_DEV_VERSION,
@@ -313,6 +340,9 @@ static const struct ath10k_hw_params ath10k_hw_params_list[] = {
313340
.vht160_mcs_rx_highest = 0,
314341
.vht160_mcs_tx_highest = 0,
315342
.n_cipher_suites = 8,
343+
.num_peers = TARGET_TLV_NUM_PEERS,
344+
.ast_skid_limit = 0x10,
345+
.num_wds_entries = 0x20,
316346
},
317347
{
318348
.id = QCA9377_HW_1_1_DEV_VERSION,
@@ -338,6 +368,9 @@ static const struct ath10k_hw_params ath10k_hw_params_list[] = {
338368
.vht160_mcs_rx_highest = 0,
339369
.vht160_mcs_tx_highest = 0,
340370
.n_cipher_suites = 8,
371+
.num_peers = TARGET_TLV_NUM_PEERS,
372+
.ast_skid_limit = 0x10,
373+
.num_wds_entries = 0x20,
341374
},
342375
{
343376
.id = QCA4019_HW_1_0_DEV_VERSION,
@@ -368,6 +401,27 @@ static const struct ath10k_hw_params ath10k_hw_params_list[] = {
368401
.vht160_mcs_rx_highest = 0,
369402
.vht160_mcs_tx_highest = 0,
370403
.n_cipher_suites = 11,
404+
.num_peers = TARGET_TLV_NUM_PEERS,
405+
.ast_skid_limit = 0x10,
406+
.num_wds_entries = 0x20,
407+
},
408+
{
409+
.id = WCN3990_HW_1_0_DEV_VERSION,
410+
.dev_id = 0,
411+
.name = "wcn3990 hw1.0",
412+
.continuous_frag_desc = true,
413+
.tx_chain_mask = 0x7,
414+
.rx_chain_mask = 0x7,
415+
.max_spatial_stream = 4,
416+
.fw = {
417+
.dir = WCN3990_HW_1_0_FW_DIR,
418+
},
419+
.sw_decrypt_mcast_mgmt = true,
420+
.hw_ops = &wcn3990_ops,
421+
.decap_align_bytes = 1,
422+
.num_peers = TARGET_HL_10_TLV_NUM_PEERS,
423+
.ast_skid_limit = TARGET_HL_10_TLV_AST_SKID_LIMIT,
424+
.num_wds_entries = TARGET_HL_10_TLV_NUM_WDS_ENTRIES,
371425
},
372426
};
373427

@@ -390,6 +444,7 @@ static const char *const ath10k_core_fw_feature_str[] = {
390444
[ATH10K_FW_FEATURE_SKIP_NULL_FUNC_WAR] = "skip-null-func-war",
391445
[ATH10K_FW_FEATURE_ALLOWS_MESH_BCAST] = "allows-mesh-bcast",
392446
[ATH10K_FW_FEATURE_NO_PS] = "no-ps",
447+
[ATH10K_FW_FEATURE_MGMT_TX_BY_REF] = "mgmt-tx-by-reference",
393448
};
394449

395450
static unsigned int ath10k_core_get_fw_feature_str(char *buf,
@@ -860,6 +915,28 @@ static int ath10k_core_check_smbios(struct ath10k *ar)
860915
return 0;
861916
}
862917

918+
static int ath10k_core_check_dt(struct ath10k *ar)
919+
{
920+
struct device_node *node;
921+
const char *variant = NULL;
922+
923+
node = ar->dev->of_node;
924+
if (!node)
925+
return -ENOENT;
926+
927+
of_property_read_string(node, "qcom,ath10k-calibration-variant",
928+
&variant);
929+
if (!variant)
930+
return -ENODATA;
931+
932+
if (strscpy(ar->id.bdf_ext, variant, sizeof(ar->id.bdf_ext)) < 0)
933+
ath10k_dbg(ar, ATH10K_DBG_BOOT,
934+
"bdf variant string is longer than the buffer can accommodate (variant: %s)\n",
935+
variant);
936+
937+
return 0;
938+
}
939+
863940
static int ath10k_download_and_run_otp(struct ath10k *ar)
864941
{
865942
u32 result, address = ar->hw_params.patch_load_addr;
@@ -1231,19 +1308,19 @@ static int ath10k_core_create_board_name(struct ath10k *ar, char *name,
12311308
/* strlen(',variant=') + strlen(ar->id.bdf_ext) */
12321309
char variant[9 + ATH10K_SMBIOS_BDF_EXT_STR_LENGTH] = { 0 };
12331310

1311+
if (ar->id.bdf_ext[0] != '\0')
1312+
scnprintf(variant, sizeof(variant), ",variant=%s",
1313+
ar->id.bdf_ext);
1314+
12341315
if (ar->id.bmi_ids_valid) {
12351316
scnprintf(name, name_len,
1236-
"bus=%s,bmi-chip-id=%d,bmi-board-id=%d",
1317+
"bus=%s,bmi-chip-id=%d,bmi-board-id=%d%s",
12371318
ath10k_bus_str(ar->hif.bus),
12381319
ar->id.bmi_chip_id,
1239-
ar->id.bmi_board_id);
1320+
ar->id.bmi_board_id, variant);
12401321
goto out;
12411322
}
12421323

1243-
if (ar->id.bdf_ext[0] != '\0')
1244-
scnprintf(variant, sizeof(variant), ",variant=%s",
1245-
ar->id.bdf_ext);
1246-
12471324
scnprintf(name, name_len,
12481325
"bus=%s,vendor=%04x,device=%04x,subsystem-vendor=%04x,subsystem-device=%04x%s",
12491326
ath10k_bus_str(ar->hif.bus),
@@ -2343,7 +2420,11 @@ static int ath10k_core_probe_fw(struct ath10k *ar)
23432420

23442421
ret = ath10k_core_check_smbios(ar);
23452422
if (ret)
2346-
ath10k_dbg(ar, ATH10K_DBG_BOOT, "bdf variant name not set.\n");
2423+
ath10k_dbg(ar, ATH10K_DBG_BOOT, "SMBIOS bdf variant name not set.\n");
2424+
2425+
ret = ath10k_core_check_dt(ar);
2426+
if (ret)
2427+
ath10k_dbg(ar, ATH10K_DBG_BOOT, "DT bdf variant name not set.\n");
23472428

23482429
ret = ath10k_core_fetch_board_file(ar);
23492430
if (ret) {

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

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,6 @@
6767

6868
/* NAPI poll budget */
6969
#define ATH10K_NAPI_BUDGET 64
70-
#define ATH10K_NAPI_QUOTA_LIMIT 60
7170

7271
/* SMBIOS type containing Board Data File Name Extension */
7372
#define ATH10K_SMBIOS_BDF_EXT_TYPE 0xF8
@@ -364,11 +363,11 @@ struct ath10k_sta {
364363
struct rate_info txrate;
365364

366365
struct work_struct update_wk;
366+
u64 rx_duration;
367367

368368
#ifdef CONFIG_MAC80211_DEBUGFS
369369
/* protected by conf_mutex */
370370
bool aggr_mode;
371-
u64 rx_duration;
372371
#endif
373372
};
374373

@@ -463,7 +462,7 @@ struct ath10k_fw_crash_data {
463462
bool crashed_since_read;
464463

465464
guid_t guid;
466-
struct timespec timestamp;
465+
struct timespec64 timestamp;
467466
__le32 registers[REG_DUMP_COUNT_QCA988X];
468467
struct ath10k_ce_crash_data ce_crash_data[CE_COUNT_MAX];
469468
};
@@ -488,7 +487,6 @@ struct ath10k_debug {
488487
/* protected by conf_mutex */
489488
u64 fw_dbglog_mask;
490489
u32 fw_dbglog_level;
491-
u32 pktlog_filter;
492490
u32 reg_addr;
493491
u32 nf_cal_period;
494492
void *cal_data;
@@ -615,6 +613,9 @@ enum ath10k_fw_features {
615613
/* Firmware does not support power save in station mode. */
616614
ATH10K_FW_FEATURE_NO_PS = 17,
617615

616+
/* Firmware allows management tx by reference instead of by value. */
617+
ATH10K_FW_FEATURE_MGMT_TX_BY_REF = 18,
618+
618619
/* keep last */
619620
ATH10K_FW_FEATURE_COUNT,
620621
};
@@ -963,6 +964,7 @@ struct ath10k {
963964
} spectral;
964965
#endif
965966

967+
u32 pktlog_filter;
966968
struct {
967969
/* protected by conf_mutex */
968970
struct ath10k_fw_components utf_mode_fw;

0 commit comments

Comments
 (0)