Skip to content

Commit ce01a56

Browse files
committed
Merge tag 'wireless-drivers-next-for-davem-2018-11-30' of git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/wireless-drivers-next
Kalle Valo says: ==================== wireless-drivers-next patches for 4.21 First set of patches for 4.21. Most notable here is support for Quantenna's QSR1000/QSR2000 chipsets and more flexible ways to provide nvram files for brcmfmac. Major changes: brcmfmac * add support for first trying to get a board specific nvram file * add support for getting nvram contents from EFI variables qtnfmac * use single PCIe driver for all platforms and rename Kconfig option CONFIG_QTNFMAC_PEARL_PCIE to CONFIG_QTNFMAC_PCIE * add support for QSR1000/QSR2000 (Topaz) family of chipsets ath10k * add support for WCN3990 firmware crash recovery * add firmware memory dump support for QCA4019 wil6210 * add firmware error recovery while in AP mode ath9k * remove experimental notice from dynack feature iwlwifi * PCI IDs for some new 9000-series cards * improve antenna usage on connection problems * new firmware debugging infrastructure * some more work on 802.11ax * improve support for multiple RF modules with 22000 devices cordic * move cordic macros and defines to a public header file * convert brcmsmac and b43 to fully use cordic library ==================== Signed-off-by: David S. Miller <[email protected]>
2 parents 37a0bc3 + b72c51a commit ce01a56

File tree

131 files changed

+4620
-1144
lines changed

Some content is hidden

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

131 files changed

+4620
-1144
lines changed

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

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -561,6 +561,7 @@ static const struct ath10k_hw_params ath10k_hw_params_list[] = {
561561
.hw_ops = &wcn3990_ops,
562562
.decap_align_bytes = 1,
563563
.num_peers = TARGET_HL_10_TLV_NUM_PEERS,
564+
.n_cipher_suites = 8,
564565
.ast_skid_limit = TARGET_HL_10_TLV_AST_SKID_LIMIT,
565566
.num_wds_entries = TARGET_HL_10_TLV_NUM_WDS_ENTRIES,
566567
.target_64bit = true,
@@ -594,6 +595,7 @@ static const char *const ath10k_core_fw_feature_str[] = {
594595
[ATH10K_FW_FEATURE_NO_PS] = "no-ps",
595596
[ATH10K_FW_FEATURE_MGMT_TX_BY_REF] = "mgmt-tx-by-reference",
596597
[ATH10K_FW_FEATURE_NON_BMI] = "non-bmi",
598+
[ATH10K_FW_FEATURE_SINGLE_CHAN_INFO_PER_CHANNEL] = "single-chan-info-per-channel",
597599
};
598600

599601
static unsigned int ath10k_core_get_fw_feature_str(char *buf,
@@ -2183,6 +2185,8 @@ static void ath10k_core_restart(struct work_struct *work)
21832185
if (ret)
21842186
ath10k_warn(ar, "failed to send firmware crash dump via devcoredump: %d",
21852187
ret);
2188+
2189+
complete(&ar->driver_recovery);
21862190
}
21872191

21882192
static void ath10k_core_set_coverage_class_work(struct work_struct *work)
@@ -3046,6 +3050,7 @@ struct ath10k *ath10k_core_create(size_t priv_size, struct device *dev,
30463050
init_completion(&ar->scan.completed);
30473051
init_completion(&ar->scan.on_channel);
30483052
init_completion(&ar->target_suspend);
3053+
init_completion(&ar->driver_recovery);
30493054
init_completion(&ar->wow.wakeup_completed);
30503055

30513056
init_completion(&ar->install_key_done);

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

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -474,6 +474,7 @@ struct ath10k_htt_data_stats {
474474
u64 bw[ATH10K_COUNTER_TYPE_MAX][ATH10K_BW_NUM];
475475
u64 nss[ATH10K_COUNTER_TYPE_MAX][ATH10K_NSS_NUM];
476476
u64 gi[ATH10K_COUNTER_TYPE_MAX][ATH10K_GI_NUM];
477+
u64 rate_table[ATH10K_COUNTER_TYPE_MAX][ATH10K_RATE_TABLE_NUM];
477478
};
478479

479480
struct ath10k_htt_tx_stats {
@@ -760,6 +761,9 @@ enum ath10k_fw_features {
760761
/* Firmware load is done externally, not by bmi */
761762
ATH10K_FW_FEATURE_NON_BMI = 19,
762763

764+
/* Firmware sends only one chan_info event per channel */
765+
ATH10K_FW_FEATURE_SINGLE_CHAN_INFO_PER_CHANNEL = 20,
766+
763767
/* keep last */
764768
ATH10K_FW_FEATURE_COUNT,
765769
};
@@ -960,6 +964,7 @@ struct ath10k {
960964
} hif;
961965

962966
struct completion target_suspend;
967+
struct completion driver_recovery;
963968

964969
const struct ath10k_hw_regs *regs;
965970
const struct ath10k_hw_ce_regs *hw_ce_regs;

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

Lines changed: 116 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -867,85 +867,198 @@ static const struct ath10k_mem_region qca9984_hw10_mem_regions[] = {
867867
},
868868
};
869869

870+
static const struct ath10k_mem_section ipq4019_soc_reg_range[] = {
871+
{0x080000, 0x080004},
872+
{0x080020, 0x080024},
873+
{0x080028, 0x080050},
874+
{0x0800d4, 0x0800ec},
875+
{0x08010c, 0x080118},
876+
{0x080284, 0x080290},
877+
{0x0802a8, 0x0802b8},
878+
{0x0802dc, 0x08030c},
879+
{0x082000, 0x083fff}
880+
};
881+
882+
static const struct ath10k_mem_region qca4019_hw10_mem_regions[] = {
883+
{
884+
.type = ATH10K_MEM_REGION_TYPE_DRAM,
885+
.start = 0x400000,
886+
.len = 0x68000,
887+
.name = "DRAM",
888+
.section_table = {
889+
.sections = NULL,
890+
.size = 0,
891+
},
892+
},
893+
{
894+
.type = ATH10K_MEM_REGION_TYPE_REG,
895+
.start = 0xC0000,
896+
.len = 0x40000,
897+
.name = "SRAM",
898+
.section_table = {
899+
.sections = NULL,
900+
.size = 0,
901+
},
902+
},
903+
{
904+
.type = ATH10K_MEM_REGION_TYPE_REG,
905+
.start = 0x98000,
906+
.len = 0x50000,
907+
.name = "IRAM",
908+
.section_table = {
909+
.sections = NULL,
910+
.size = 0,
911+
},
912+
},
913+
{
914+
.type = ATH10K_MEM_REGION_TYPE_IOREG,
915+
.start = 0x30000,
916+
.len = 0x7000,
917+
.name = "APB REG 1",
918+
.section_table = {
919+
.sections = NULL,
920+
.size = 0,
921+
},
922+
},
923+
{
924+
.type = ATH10K_MEM_REGION_TYPE_IOREG,
925+
.start = 0x3f000,
926+
.len = 0x3000,
927+
.name = "APB REG 2",
928+
.section_table = {
929+
.sections = NULL,
930+
.size = 0,
931+
},
932+
},
933+
{
934+
.type = ATH10K_MEM_REGION_TYPE_IOREG,
935+
.start = 0x43000,
936+
.len = 0x3000,
937+
.name = "WIFI REG",
938+
.section_table = {
939+
.sections = NULL,
940+
.size = 0,
941+
},
942+
},
943+
{
944+
.type = ATH10K_MEM_REGION_TYPE_IOREG,
945+
.start = 0x4A000,
946+
.len = 0x5000,
947+
.name = "CE REG",
948+
.section_table = {
949+
.sections = NULL,
950+
.size = 0,
951+
},
952+
},
953+
{
954+
.type = ATH10K_MEM_REGION_TYPE_REG,
955+
.start = 0x080000,
956+
.len = 0x083fff - 0x080000,
957+
.name = "REG_TOTAL",
958+
.section_table = {
959+
.sections = ipq4019_soc_reg_range,
960+
.size = ARRAY_SIZE(ipq4019_soc_reg_range),
961+
},
962+
},
963+
};
964+
870965
static const struct ath10k_hw_mem_layout hw_mem_layouts[] = {
871966
{
872967
.hw_id = QCA6174_HW_1_0_VERSION,
968+
.hw_rev = ATH10K_HW_QCA6174,
873969
.region_table = {
874970
.regions = qca6174_hw10_mem_regions,
875971
.size = ARRAY_SIZE(qca6174_hw10_mem_regions),
876972
},
877973
},
878974
{
879975
.hw_id = QCA6174_HW_1_1_VERSION,
976+
.hw_rev = ATH10K_HW_QCA6174,
880977
.region_table = {
881978
.regions = qca6174_hw10_mem_regions,
882979
.size = ARRAY_SIZE(qca6174_hw10_mem_regions),
883980
},
884981
},
885982
{
886983
.hw_id = QCA6174_HW_1_3_VERSION,
984+
.hw_rev = ATH10K_HW_QCA6174,
887985
.region_table = {
888986
.regions = qca6174_hw10_mem_regions,
889987
.size = ARRAY_SIZE(qca6174_hw10_mem_regions),
890988
},
891989
},
892990
{
893991
.hw_id = QCA6174_HW_2_1_VERSION,
992+
.hw_rev = ATH10K_HW_QCA6174,
894993
.region_table = {
895994
.regions = qca6174_hw21_mem_regions,
896995
.size = ARRAY_SIZE(qca6174_hw21_mem_regions),
897996
},
898997
},
899998
{
900999
.hw_id = QCA6174_HW_3_0_VERSION,
1000+
.hw_rev = ATH10K_HW_QCA6174,
9011001
.region_table = {
9021002
.regions = qca6174_hw30_mem_regions,
9031003
.size = ARRAY_SIZE(qca6174_hw30_mem_regions),
9041004
},
9051005
},
9061006
{
9071007
.hw_id = QCA6174_HW_3_2_VERSION,
1008+
.hw_rev = ATH10K_HW_QCA6174,
9081009
.region_table = {
9091010
.regions = qca6174_hw30_mem_regions,
9101011
.size = ARRAY_SIZE(qca6174_hw30_mem_regions),
9111012
},
9121013
},
9131014
{
9141015
.hw_id = QCA9377_HW_1_1_DEV_VERSION,
1016+
.hw_rev = ATH10K_HW_QCA9377,
9151017
.region_table = {
9161018
.regions = qca6174_hw30_mem_regions,
9171019
.size = ARRAY_SIZE(qca6174_hw30_mem_regions),
9181020
},
9191021
},
9201022
{
9211023
.hw_id = QCA988X_HW_2_0_VERSION,
1024+
.hw_rev = ATH10K_HW_QCA988X,
9221025
.region_table = {
9231026
.regions = qca988x_hw20_mem_regions,
9241027
.size = ARRAY_SIZE(qca988x_hw20_mem_regions),
9251028
},
9261029
},
9271030
{
9281031
.hw_id = QCA9984_HW_1_0_DEV_VERSION,
1032+
.hw_rev = ATH10K_HW_QCA9984,
9291033
.region_table = {
9301034
.regions = qca9984_hw10_mem_regions,
9311035
.size = ARRAY_SIZE(qca9984_hw10_mem_regions),
9321036
},
9331037
},
9341038
{
9351039
.hw_id = QCA9888_HW_2_0_DEV_VERSION,
1040+
.hw_rev = ATH10K_HW_QCA9888,
9361041
.region_table = {
9371042
.regions = qca9984_hw10_mem_regions,
9381043
.size = ARRAY_SIZE(qca9984_hw10_mem_regions),
9391044
},
9401045
},
9411046
{
9421047
.hw_id = QCA99X0_HW_2_0_DEV_VERSION,
1048+
.hw_rev = ATH10K_HW_QCA99X0,
9431049
.region_table = {
9441050
.regions = qca99x0_hw20_mem_regions,
9451051
.size = ARRAY_SIZE(qca99x0_hw20_mem_regions),
9461052
},
9471053
},
948-
1054+
{
1055+
.hw_id = QCA4019_HW_1_0_DEV_VERSION,
1056+
.hw_rev = ATH10K_HW_QCA4019,
1057+
.region_table = {
1058+
.regions = qca4019_hw10_mem_regions,
1059+
.size = ARRAY_SIZE(qca4019_hw10_mem_regions),
1060+
},
1061+
},
9491062
};
9501063

9511064
static u32 ath10k_coredump_get_ramdump_size(struct ath10k *ar)
@@ -987,7 +1100,8 @@ const struct ath10k_hw_mem_layout *ath10k_coredump_get_mem_layout(struct ath10k
9871100
return NULL;
9881101

9891102
for (i = 0; i < ARRAY_SIZE(hw_mem_layouts); i++) {
990-
if (ar->target_version == hw_mem_layouts[i].hw_id)
1103+
if (ar->target_version == hw_mem_layouts[i].hw_id &&
1104+
ar->hw_rev == hw_mem_layouts[i].hw_rev)
9911105
return &hw_mem_layouts[i];
9921106
}
9931107

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -165,6 +165,7 @@ struct ath10k_mem_region {
165165
*/
166166
struct ath10k_hw_mem_layout {
167167
u32 hw_id;
168+
u32 hw_rev;
168169

169170
struct {
170171
const struct ath10k_mem_region *regions;

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

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -665,7 +665,7 @@ static ssize_t ath10k_dbg_sta_dump_tx_stats(struct file *file,
665665
"retry", "ampdu"};
666666
const char *str[ATH10K_COUNTER_TYPE_MAX] = {"bytes", "packets"};
667667
int len = 0, i, j, k, retval = 0;
668-
const int size = 2 * 4096;
668+
const int size = 16 * 4096;
669669
char *buf;
670670

671671
buf = kzalloc(size, GFP_KERNEL);
@@ -719,6 +719,16 @@ static ssize_t ath10k_dbg_sta_dump_tx_stats(struct file *file,
719719
len += scnprintf(buf + len, size - len, "%llu ",
720720
stats->legacy[j][i]);
721721
len += scnprintf(buf + len, size - len, "\n");
722+
len += scnprintf(buf + len, size - len,
723+
" Rate table %s (1,2 ... Mbps)\n ",
724+
str[j]);
725+
for (i = 0; i < ATH10K_RATE_TABLE_NUM; i++) {
726+
len += scnprintf(buf + len, size - len, "%llu ",
727+
stats->rate_table[j][i]);
728+
if (!((i + 1) % 8))
729+
len +=
730+
scnprintf(buf + len, size - len, "\n ");
731+
}
722732
}
723733
}
724734

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

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2650,7 +2650,7 @@ ath10k_accumulate_per_peer_tx_stats(struct ath10k *ar,
26502650
{
26512651
struct rate_info *txrate = &arsta->txrate;
26522652
struct ath10k_htt_tx_stats *tx_stats;
2653-
int ht_idx, gi, mcs, bw, nss;
2653+
int idx, ht_idx, gi, mcs, bw, nss;
26542654

26552655
if (!arsta->tx_stats)
26562656
return;
@@ -2661,6 +2661,8 @@ ath10k_accumulate_per_peer_tx_stats(struct ath10k *ar,
26612661
mcs = txrate->mcs;
26622662
bw = txrate->bw;
26632663
nss = txrate->nss;
2664+
idx = mcs * 8 + 8 * 10 * nss;
2665+
idx += bw * 2 + gi;
26642666

26652667
#define STATS_OP_FMT(name) tx_stats->stats[ATH10K_STATS_TYPE_##name]
26662668

@@ -2709,12 +2711,16 @@ ath10k_accumulate_per_peer_tx_stats(struct ath10k *ar,
27092711
pstats->succ_bytes + pstats->retry_bytes;
27102712
STATS_OP_FMT(AMPDU).gi[0][gi] +=
27112713
pstats->succ_bytes + pstats->retry_bytes;
2714+
STATS_OP_FMT(AMPDU).rate_table[0][idx] +=
2715+
pstats->succ_bytes + pstats->retry_bytes;
27122716
STATS_OP_FMT(AMPDU).bw[1][bw] +=
27132717
pstats->succ_pkts + pstats->retry_pkts;
27142718
STATS_OP_FMT(AMPDU).nss[1][nss] +=
27152719
pstats->succ_pkts + pstats->retry_pkts;
27162720
STATS_OP_FMT(AMPDU).gi[1][gi] +=
27172721
pstats->succ_pkts + pstats->retry_pkts;
2722+
STATS_OP_FMT(AMPDU).rate_table[1][idx] +=
2723+
pstats->succ_pkts + pstats->retry_pkts;
27182724
} else {
27192725
tx_stats->ack_fails +=
27202726
ATH10K_HW_BA_FAIL(pstats->flags);
@@ -2743,6 +2749,15 @@ ath10k_accumulate_per_peer_tx_stats(struct ath10k *ar,
27432749
STATS_OP_FMT(RETRY).bw[1][bw] += pstats->retry_pkts;
27442750
STATS_OP_FMT(RETRY).nss[1][nss] += pstats->retry_pkts;
27452751
STATS_OP_FMT(RETRY).gi[1][gi] += pstats->retry_pkts;
2752+
2753+
if (txrate->flags >= RATE_INFO_FLAGS_MCS) {
2754+
STATS_OP_FMT(SUCC).rate_table[0][idx] += pstats->succ_bytes;
2755+
STATS_OP_FMT(SUCC).rate_table[1][idx] += pstats->succ_pkts;
2756+
STATS_OP_FMT(FAIL).rate_table[0][idx] += pstats->failed_bytes;
2757+
STATS_OP_FMT(FAIL).rate_table[1][idx] += pstats->failed_pkts;
2758+
STATS_OP_FMT(RETRY).rate_table[0][idx] += pstats->retry_bytes;
2759+
STATS_OP_FMT(RETRY).rate_table[1][idx] += pstats->retry_pkts;
2760+
}
27462761
}
27472762

27482763
static void

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

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6296,8 +6296,10 @@ static int ath10k_sta_state(struct ieee80211_hw *hw,
62966296
if (ath10k_debug_is_extd_tx_stats_enabled(ar)) {
62976297
arsta->tx_stats = kzalloc(sizeof(*arsta->tx_stats),
62986298
GFP_KERNEL);
6299-
if (!arsta->tx_stats)
6299+
if (!arsta->tx_stats) {
6300+
ret = -ENOMEM;
63006301
goto exit;
6302+
}
63016303
}
63026304

63036305
num_tdls_stations = ath10k_mac_tdls_vif_stations_count(hw, vif);
@@ -6385,8 +6387,10 @@ static int ath10k_sta_state(struct ieee80211_hw *hw,
63856387
"mac vdev %d peer delete %pM sta %pK (sta gone)\n",
63866388
arvif->vdev_id, sta->addr, sta);
63876389

6388-
if (ath10k_debug_is_extd_tx_stats_enabled(ar))
6390+
if (ath10k_debug_is_extd_tx_stats_enabled(ar)) {
63896391
kfree(arsta->tx_stats);
6392+
arsta->tx_stats = NULL;
6393+
}
63906394

63916395
if (sta->tdls) {
63926396
ret = ath10k_mac_tdls_peer_update(ar, arvif->vdev_id,
@@ -8313,15 +8317,14 @@ static u32 ath10k_mac_wrdd_get_mcc(struct ath10k *ar, union acpi_object *wrdd)
83138317

83148318
static int ath10k_mac_get_wrdd_regulatory(struct ath10k *ar, u16 *rd)
83158319
{
8316-
struct pci_dev __maybe_unused *pdev = to_pci_dev(ar->dev);
83178320
acpi_handle root_handle;
83188321
acpi_handle handle;
83198322
struct acpi_buffer wrdd = {ACPI_ALLOCATE_BUFFER, NULL};
83208323
acpi_status status;
83218324
u32 alpha2_code;
83228325
char alpha2[3];
83238326

8324-
root_handle = ACPI_HANDLE(&pdev->dev);
8327+
root_handle = ACPI_HANDLE(ar->dev);
83258328
if (!root_handle)
83268329
return -EOPNOTSUPP;
83278330

0 commit comments

Comments
 (0)