Skip to content

Commit ac2291c

Browse files
committed
Merge tag 'wireless-drivers-next-for-davem-2017-04-21' of git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/wireless-drivers-next
Kalle Valo says: ==================== wireless-drivers-next patches for 4.12 Quite a lot of patches for rtlwifi and iwlwifi this time, but changes also for other active wireless drivers. Major changes: ath9k * add support for Dell Wireless 1601 PCI device * add debugfs file to manually override noise floor ath10k * bump up FW API to 6 for a new QCA6174 firmware branch wil6210 * support 8 kB RX buffers iwlwifi * work to support A000 devices continues * add support for FW API 30 * add Geographical and Dynamic Specific Absorption Rate (SAR) support * support a few new PCI device IDs rtlwifi * work on adding Bluetooth coexistance support, not finished yet ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
2 parents 970cf1d + a059783 commit ac2291c

Some content is hidden

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

123 files changed

+8770
-2181
lines changed

MAINTAINERS

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7887,7 +7887,7 @@ S: Maintained
78877887
F: drivers/net/ethernet/marvell/mvneta.*
78887888

78897889
MARVELL MWIFIEX WIRELESS DRIVER
7890-
M: Amitkumar Karwar <akarwar@marvell.com>
7890+
M: Amitkumar Karwar <amitkarwar@gmail.com>
78917891
M: Nishant Sarmukadam <nishants@marvell.com>
78927892
M: Ganapathi Bhat <gbhat@marvell.com>
78937893
M: Xinming Hu <huxm@marvell.com>

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -640,6 +640,7 @@ static int ath10k_ahb_hif_start(struct ath10k *ar)
640640
{
641641
ath10k_dbg(ar, ATH10K_DBG_BOOT, "boot ahb hif start\n");
642642

643+
napi_enable(&ar->napi);
643644
ath10k_ce_enable_interrupts(ar);
644645
ath10k_pci_enable_legacy_irq(ar);
645646

@@ -692,7 +693,6 @@ static int ath10k_ahb_hif_power_up(struct ath10k *ar)
692693
ath10k_err(ar, "could not wake up target CPU: %d\n", ret);
693694
goto err_ce_deinit;
694695
}
695-
napi_enable(&ar->napi);
696696

697697
return 0;
698698

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,8 @@ union bmi_resp {
176176
} rompatch_uninstall;
177177
struct {
178178
/* 0 = nothing executed
179-
* otherwise = NVRAM segment return value */
179+
* otherwise = NVRAM segment return value
180+
*/
180181
__le32 result;
181182
} nvram_process;
182183
u8 payload[BMI_MAX_CMDBUF_SIZE];

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

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -261,8 +261,7 @@ static inline void ath10k_ce_engine_int_status_clear(struct ath10k *ar,
261261
}
262262

263263
/*
264-
* Guts of ath10k_ce_send, used by both ath10k_ce_send and
265-
* ath10k_ce_sendlist_send.
264+
* Guts of ath10k_ce_send.
266265
* The caller takes responsibility for any needed locking.
267266
*/
268267
int ath10k_ce_send_nolock(struct ath10k_ce_pipe *ce_state,
@@ -1052,7 +1051,7 @@ int ath10k_ce_alloc_pipe(struct ath10k *ar, int ce_id,
10521051
*/
10531052
BUILD_BUG_ON(2 * TARGET_NUM_MSDU_DESC >
10541053
(CE_HTT_H2T_MSG_SRC_NENTRIES - 1));
1055-
BUILD_BUG_ON(2 * TARGET_10X_NUM_MSDU_DESC >
1054+
BUILD_BUG_ON(2 * TARGET_10_4_NUM_MSDU_DESC_PFC >
10561055
(CE_HTT_H2T_MSG_SRC_NENTRIES - 1));
10571056
BUILD_BUG_ON(2 * TARGET_TLV_NUM_MSDU_DESC >
10581057
(CE_HTT_H2T_MSG_SRC_NENTRIES - 1));

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

Lines changed: 25 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,7 @@ static const struct ath10k_hw_params ath10k_hw_params_list[] = {
7171
},
7272
.hw_ops = &qca988x_ops,
7373
.decap_align_bytes = 4,
74+
.spectral_bin_discard = 0,
7475
},
7576
{
7677
.id = QCA9887_HW_1_0_VERSION,
@@ -91,6 +92,7 @@ static const struct ath10k_hw_params ath10k_hw_params_list[] = {
9192
},
9293
.hw_ops = &qca988x_ops,
9394
.decap_align_bytes = 4,
95+
.spectral_bin_discard = 0,
9496
},
9597
{
9698
.id = QCA6174_HW_2_1_VERSION,
@@ -110,6 +112,7 @@ static const struct ath10k_hw_params ath10k_hw_params_list[] = {
110112
},
111113
.hw_ops = &qca988x_ops,
112114
.decap_align_bytes = 4,
115+
.spectral_bin_discard = 0,
113116
},
114117
{
115118
.id = QCA6174_HW_2_1_VERSION,
@@ -129,6 +132,7 @@ static const struct ath10k_hw_params ath10k_hw_params_list[] = {
129132
},
130133
.hw_ops = &qca988x_ops,
131134
.decap_align_bytes = 4,
135+
.spectral_bin_discard = 0,
132136
},
133137
{
134138
.id = QCA6174_HW_3_0_VERSION,
@@ -148,6 +152,7 @@ static const struct ath10k_hw_params ath10k_hw_params_list[] = {
148152
},
149153
.hw_ops = &qca988x_ops,
150154
.decap_align_bytes = 4,
155+
.spectral_bin_discard = 0,
151156
},
152157
{
153158
.id = QCA6174_HW_3_2_VERSION,
@@ -170,6 +175,7 @@ static const struct ath10k_hw_params ath10k_hw_params_list[] = {
170175
.hw_clk = qca6174_clk,
171176
.target_cpu_freq = 176000000,
172177
.decap_align_bytes = 4,
178+
.spectral_bin_discard = 0,
173179
},
174180
{
175181
.id = QCA99X0_HW_2_0_DEV_VERSION,
@@ -195,6 +201,7 @@ static const struct ath10k_hw_params ath10k_hw_params_list[] = {
195201
.sw_decrypt_mcast_mgmt = true,
196202
.hw_ops = &qca99x0_ops,
197203
.decap_align_bytes = 1,
204+
.spectral_bin_discard = 4,
198205
},
199206
{
200207
.id = QCA9984_HW_1_0_DEV_VERSION,
@@ -221,6 +228,7 @@ static const struct ath10k_hw_params ath10k_hw_params_list[] = {
221228
.sw_decrypt_mcast_mgmt = true,
222229
.hw_ops = &qca99x0_ops,
223230
.decap_align_bytes = 1,
231+
.spectral_bin_discard = 12,
224232
},
225233
{
226234
.id = QCA9888_HW_2_0_DEV_VERSION,
@@ -246,6 +254,7 @@ static const struct ath10k_hw_params ath10k_hw_params_list[] = {
246254
.sw_decrypt_mcast_mgmt = true,
247255
.hw_ops = &qca99x0_ops,
248256
.decap_align_bytes = 1,
257+
.spectral_bin_discard = 12,
249258
},
250259
{
251260
.id = QCA9377_HW_1_0_DEV_VERSION,
@@ -265,6 +274,7 @@ static const struct ath10k_hw_params ath10k_hw_params_list[] = {
265274
},
266275
.hw_ops = &qca988x_ops,
267276
.decap_align_bytes = 4,
277+
.spectral_bin_discard = 0,
268278
},
269279
{
270280
.id = QCA9377_HW_1_1_DEV_VERSION,
@@ -286,6 +296,7 @@ static const struct ath10k_hw_params ath10k_hw_params_list[] = {
286296
.hw_clk = qca6174_clk,
287297
.target_cpu_freq = 176000000,
288298
.decap_align_bytes = 4,
299+
.spectral_bin_discard = 0,
289300
},
290301
{
291302
.id = QCA4019_HW_1_0_DEV_VERSION,
@@ -312,6 +323,7 @@ static const struct ath10k_hw_params ath10k_hw_params_list[] = {
312323
.sw_decrypt_mcast_mgmt = true,
313324
.hw_ops = &qca99x0_ops,
314325
.decap_align_bytes = 1,
326+
.spectral_bin_discard = 4,
315327
},
316328
};
317329

@@ -1627,6 +1639,13 @@ static void ath10k_core_restart(struct work_struct *work)
16271639
wake_up(&ar->wmi.tx_credits_wq);
16281640
wake_up(&ar->peer_mapping_wq);
16291641

1642+
/* TODO: We can have one instance of cancelling coverage_class_work by
1643+
* moving it to ath10k_halt(), so that both stop() and restart() would
1644+
* call that but it takes conf_mutex() and if we call cancel_work_sync()
1645+
* with conf_mutex it will deadlock.
1646+
*/
1647+
cancel_work_sync(&ar->set_coverage_class_work);
1648+
16301649
mutex_lock(&ar->conf_mutex);
16311650

16321651
switch (ar->state) {
@@ -1638,7 +1657,8 @@ static void ath10k_core_restart(struct work_struct *work)
16381657
break;
16391658
case ATH10K_STATE_OFF:
16401659
/* this can happen if driver is being unloaded
1641-
* or if the crash happens during FW probing */
1660+
* or if the crash happens during FW probing
1661+
*/
16421662
ath10k_warn(ar, "cannot restart a device that hasn't been started\n");
16431663
break;
16441664
case ATH10K_STATE_RESTARTING:
@@ -2166,7 +2186,8 @@ EXPORT_SYMBOL(ath10k_core_stop);
21662186
/* mac80211 manages fw/hw initialization through start/stop hooks. However in
21672187
* order to know what hw capabilities should be advertised to mac80211 it is
21682188
* necessary to load the firmware (and tear it down immediately since start
2169-
* hook will try to init it again) before registering */
2189+
* hook will try to init it again) before registering
2190+
*/
21702191
static int ath10k_core_probe_fw(struct ath10k *ar)
21712192
{
21722193
struct bmi_target_info target_info;
@@ -2360,7 +2381,8 @@ void ath10k_core_unregister(struct ath10k *ar)
23602381

23612382
/* We must unregister from mac80211 before we stop HTC and HIF.
23622383
* Otherwise we will fail to submit commands to FW and mac80211 will be
2363-
* unhappy about callback failures. */
2384+
* unhappy about callback failures.
2385+
*/
23642386
ath10k_mac_unregister(ar);
23652387

23662388
ath10k_testmode_destroy(ar);

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

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -501,14 +501,16 @@ enum ath10k_state {
501501
* stopped in ath10k_core_restart() work holding conf_mutex. The state
502502
* RESTARTED means that the device is up and mac80211 has started hw
503503
* reconfiguration. Once mac80211 is done with the reconfiguration we
504-
* set the state to STATE_ON in reconfig_complete(). */
504+
* set the state to STATE_ON in reconfig_complete().
505+
*/
505506
ATH10K_STATE_RESTARTING,
506507
ATH10K_STATE_RESTARTED,
507508

508509
/* The device has crashed while restarting hw. This state is like ON
509510
* but commands are blocked in HTC and -ECOMM response is given. This
510511
* prevents completion timeouts and makes the driver more responsive to
511-
* userspace commands. This is also prevents recursive recovery. */
512+
* userspace commands. This is also prevents recursive recovery.
513+
*/
512514
ATH10K_STATE_WEDGED,
513515

514516
/* factory tests */
@@ -920,7 +922,8 @@ struct ath10k {
920922
struct work_struct restart_work;
921923

922924
/* cycle count is reported twice for each visited channel during scan.
923-
* access protected by data_lock */
925+
* access protected by data_lock
926+
*/
924927
u32 survey_last_rx_clear_count;
925928
u32 survey_last_cycle_count;
926929
struct survey_info survey[ATH10K_NUM_CHANS];

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

Lines changed: 45 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -1816,7 +1816,7 @@ static void ath10k_tpc_stats_fill(struct ath10k *ar,
18161816
tpc_stats->num_tx_chain,
18171817
tpc_stats->rate_max);
18181818

1819-
for (j = 0; j < tpc_stats->num_tx_chain ; j++) {
1819+
for (j = 0; j < WMI_TPC_FLAG; j++) {
18201820
switch (j) {
18211821
case WMI_TPC_TABLE_TYPE_CDD:
18221822
if (tpc_stats->flag[j] == ATH10K_TPC_TABLE_TYPE_FLAG) {
@@ -1982,7 +1982,8 @@ void ath10k_debug_stop(struct ath10k *ar)
19821982

19831983
/* Must not use _sync to avoid deadlock, we do that in
19841984
* ath10k_debug_destroy(). The check for htt_stats_mask is to avoid
1985-
* warning from del_timer(). */
1985+
* warning from del_timer().
1986+
*/
19861987
if (ar->debug.htt_stats_mask != 0)
19871988
cancel_delayed_work(&ar->debug.htt_stats_dwork);
19881989

@@ -2443,86 +2444,82 @@ int ath10k_debug_register(struct ath10k *ar)
24432444
init_completion(&ar->debug.tpc_complete);
24442445
init_completion(&ar->debug.fw_stats_complete);
24452446

2446-
debugfs_create_file("fw_stats", S_IRUSR, ar->debug.debugfs_phy, ar,
2447+
debugfs_create_file("fw_stats", 0400, ar->debug.debugfs_phy, ar,
24472448
&fops_fw_stats);
24482449

2449-
debugfs_create_file("fw_reset_stats", S_IRUSR, ar->debug.debugfs_phy,
2450-
ar, &fops_fw_reset_stats);
2450+
debugfs_create_file("fw_reset_stats", 0400, ar->debug.debugfs_phy, ar,
2451+
&fops_fw_reset_stats);
24512452

2452-
debugfs_create_file("wmi_services", S_IRUSR, ar->debug.debugfs_phy, ar,
2453+
debugfs_create_file("wmi_services", 0400, ar->debug.debugfs_phy, ar,
24532454
&fops_wmi_services);
24542455

2455-
debugfs_create_file("simulate_fw_crash", S_IRUSR | S_IWUSR,
2456-
ar->debug.debugfs_phy, ar, &fops_simulate_fw_crash);
2456+
debugfs_create_file("simulate_fw_crash", 0600, ar->debug.debugfs_phy, ar,
2457+
&fops_simulate_fw_crash);
24572458

2458-
debugfs_create_file("fw_crash_dump", S_IRUSR, ar->debug.debugfs_phy,
2459-
ar, &fops_fw_crash_dump);
2459+
debugfs_create_file("fw_crash_dump", 0400, ar->debug.debugfs_phy, ar,
2460+
&fops_fw_crash_dump);
24602461

2461-
debugfs_create_file("reg_addr", S_IRUSR | S_IWUSR,
2462-
ar->debug.debugfs_phy, ar, &fops_reg_addr);
2462+
debugfs_create_file("reg_addr", 0600, ar->debug.debugfs_phy, ar,
2463+
&fops_reg_addr);
24632464

2464-
debugfs_create_file("reg_value", S_IRUSR | S_IWUSR,
2465-
ar->debug.debugfs_phy, ar, &fops_reg_value);
2465+
debugfs_create_file("reg_value", 0600, ar->debug.debugfs_phy, ar,
2466+
&fops_reg_value);
24662467

2467-
debugfs_create_file("mem_value", S_IRUSR | S_IWUSR,
2468-
ar->debug.debugfs_phy, ar, &fops_mem_value);
2468+
debugfs_create_file("mem_value", 0600, ar->debug.debugfs_phy, ar,
2469+
&fops_mem_value);
24692470

2470-
debugfs_create_file("chip_id", S_IRUSR, ar->debug.debugfs_phy,
2471-
ar, &fops_chip_id);
2471+
debugfs_create_file("chip_id", 0400, ar->debug.debugfs_phy, ar,
2472+
&fops_chip_id);
24722473

2473-
debugfs_create_file("htt_stats_mask", S_IRUSR | S_IWUSR,
2474-
ar->debug.debugfs_phy, ar, &fops_htt_stats_mask);
2474+
debugfs_create_file("htt_stats_mask", 0600, ar->debug.debugfs_phy, ar,
2475+
&fops_htt_stats_mask);
24752476

2476-
debugfs_create_file("htt_max_amsdu_ampdu", S_IRUSR | S_IWUSR,
2477-
ar->debug.debugfs_phy, ar,
2477+
debugfs_create_file("htt_max_amsdu_ampdu", 0600, ar->debug.debugfs_phy, ar,
24782478
&fops_htt_max_amsdu_ampdu);
24792479

2480-
debugfs_create_file("fw_dbglog", S_IRUSR | S_IWUSR,
2481-
ar->debug.debugfs_phy, ar, &fops_fw_dbglog);
2480+
debugfs_create_file("fw_dbglog", 0600, ar->debug.debugfs_phy, ar,
2481+
&fops_fw_dbglog);
24822482

2483-
debugfs_create_file("cal_data", S_IRUSR, ar->debug.debugfs_phy,
2484-
ar, &fops_cal_data);
2483+
debugfs_create_file("cal_data", 0400, ar->debug.debugfs_phy, ar,
2484+
&fops_cal_data);
24852485

2486-
debugfs_create_file("ani_enable", S_IRUSR | S_IWUSR,
2487-
ar->debug.debugfs_phy, ar, &fops_ani_enable);
2486+
debugfs_create_file("ani_enable", 0600, ar->debug.debugfs_phy, ar,
2487+
&fops_ani_enable);
24882488

2489-
debugfs_create_file("nf_cal_period", S_IRUSR | S_IWUSR,
2490-
ar->debug.debugfs_phy, ar, &fops_nf_cal_period);
2489+
debugfs_create_file("nf_cal_period", 0600, ar->debug.debugfs_phy, ar,
2490+
&fops_nf_cal_period);
24912491

24922492
if (IS_ENABLED(CONFIG_ATH10K_DFS_CERTIFIED)) {
2493-
debugfs_create_file("dfs_simulate_radar", S_IWUSR,
2494-
ar->debug.debugfs_phy, ar,
2495-
&fops_simulate_radar);
2493+
debugfs_create_file("dfs_simulate_radar", 0200, ar->debug.debugfs_phy,
2494+
ar, &fops_simulate_radar);
24962495

2497-
debugfs_create_bool("dfs_block_radar_events", S_IWUSR,
2496+
debugfs_create_bool("dfs_block_radar_events", 0200,
24982497
ar->debug.debugfs_phy,
24992498
&ar->dfs_block_radar_events);
25002499

2501-
debugfs_create_file("dfs_stats", S_IRUSR,
2502-
ar->debug.debugfs_phy, ar,
2500+
debugfs_create_file("dfs_stats", 0400, ar->debug.debugfs_phy, ar,
25032501
&fops_dfs_stats);
25042502
}
25052503

2506-
debugfs_create_file("pktlog_filter", S_IRUGO | S_IWUSR,
2507-
ar->debug.debugfs_phy, ar, &fops_pktlog_filter);
2504+
debugfs_create_file("pktlog_filter", 0644, ar->debug.debugfs_phy, ar,
2505+
&fops_pktlog_filter);
25082506

2509-
debugfs_create_file("quiet_period", S_IRUGO | S_IWUSR,
2510-
ar->debug.debugfs_phy, ar, &fops_quiet_period);
2507+
debugfs_create_file("quiet_period", 0644, ar->debug.debugfs_phy, ar,
2508+
&fops_quiet_period);
25112509

2512-
debugfs_create_file("tpc_stats", S_IRUSR,
2513-
ar->debug.debugfs_phy, ar, &fops_tpc_stats);
2510+
debugfs_create_file("tpc_stats", 0400, ar->debug.debugfs_phy, ar,
2511+
&fops_tpc_stats);
25142512

25152513
if (test_bit(WMI_SERVICE_COEX_GPIO, ar->wmi.svc_map))
2516-
debugfs_create_file("btcoex", S_IRUGO | S_IWUSR,
2517-
ar->debug.debugfs_phy, ar, &fops_btcoex);
2514+
debugfs_create_file("btcoex", 0644, ar->debug.debugfs_phy, ar,
2515+
&fops_btcoex);
25182516

25192517
if (test_bit(WMI_SERVICE_PEER_STATS, ar->wmi.svc_map))
2520-
debugfs_create_file("peer_stats", S_IRUGO | S_IWUSR,
2521-
ar->debug.debugfs_phy, ar,
2518+
debugfs_create_file("peer_stats", 0644, ar->debug.debugfs_phy, ar,
25222519
&fops_peer_stats);
25232520

2524-
debugfs_create_file("fw_checksums", S_IRUSR,
2525-
ar->debug.debugfs_phy, ar, &fops_fw_checksums);
2521+
debugfs_create_file("fw_checksums", 0400, ar->debug.debugfs_phy, ar,
2522+
&fops_fw_checksums);
25262523

25272524
return 0;
25282525
}

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

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -372,11 +372,10 @@ static const struct file_operations fops_peer_debug_trigger = {
372372
void ath10k_sta_add_debugfs(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
373373
struct ieee80211_sta *sta, struct dentry *dir)
374374
{
375-
debugfs_create_file("aggr_mode", S_IRUGO | S_IWUSR, dir, sta,
376-
&fops_aggr_mode);
377-
debugfs_create_file("addba", S_IWUSR, dir, sta, &fops_addba);
378-
debugfs_create_file("addba_resp", S_IWUSR, dir, sta, &fops_addba_resp);
379-
debugfs_create_file("delba", S_IWUSR, dir, sta, &fops_delba);
375+
debugfs_create_file("aggr_mode", 0644, dir, sta, &fops_aggr_mode);
376+
debugfs_create_file("addba", 0200, dir, sta, &fops_addba);
377+
debugfs_create_file("addba_resp", 0200, dir, sta, &fops_addba_resp);
378+
debugfs_create_file("delba", 0200, dir, sta, &fops_delba);
380379
debugfs_create_file("peer_debug_trigger", 0600, dir, sta,
381380
&fops_peer_debug_trigger);
382381
}

0 commit comments

Comments
 (0)