Skip to content

Commit a44acf9

Browse files
committed
Merge tag 'wireless-drivers-for-davem-2019-04-15' of git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/wireless-drivers
Kalle Valo says: ==================== wireless-drivers fixes for 5.1 Second set of fixes for 5.1. iwlwifi * add some new PCI IDs (plus a struct name change they depend on) * fix crypto with new devices, namely 22560 and above * fix for a potential deadlock in the TX path * a fix for offloaded rate-control * support new PCI HW IDs which use a new FW mt76 * fix lock initialisation and a possible deadlock * aggregation fixes rt2x00 * fix sequence numbering during retransmits ==================== Signed-off-by: David S. Miller <[email protected]>
2 parents 7324880 + 832bc25 commit a44acf9

File tree

23 files changed

+123
-215
lines changed

23 files changed

+123
-215
lines changed

drivers/net/wireless/intel/iwlwifi/cfg/22000.c

Lines changed: 22 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,7 @@
8282
#define IWL_22000_HR_A0_FW_PRE "iwlwifi-QuQnj-a0-hr-a0-"
8383
#define IWL_22000_SU_Z0_FW_PRE "iwlwifi-su-z0-"
8484
#define IWL_QU_B_JF_B_FW_PRE "iwlwifi-Qu-b0-jf-b0-"
85+
#define IWL_QUZ_A_HR_B_FW_PRE "iwlwifi-QuZ-a0-hr-b0-"
8586
#define IWL_QNJ_B_JF_B_FW_PRE "iwlwifi-QuQnj-b0-jf-b0-"
8687
#define IWL_CC_A_FW_PRE "iwlwifi-cc-a0-"
8788
#define IWL_22000_SO_A_JF_B_FW_PRE "iwlwifi-so-a0-jf-b0-"
@@ -105,8 +106,8 @@
105106
IWL_22000_HR_A0_FW_PRE __stringify(api) ".ucode"
106107
#define IWL_22000_SU_Z0_MODULE_FIRMWARE(api) \
107108
IWL_22000_SU_Z0_FW_PRE __stringify(api) ".ucode"
108-
#define IWL_QU_B_JF_B_MODULE_FIRMWARE(api) \
109-
IWL_QU_B_JF_B_FW_PRE __stringify(api) ".ucode"
109+
#define IWL_QUZ_A_HR_B_MODULE_FIRMWARE(api) \
110+
IWL_QUZ_A_HR_B_FW_PRE __stringify(api) ".ucode"
110111
#define IWL_QU_B_JF_B_MODULE_FIRMWARE(api) \
111112
IWL_QU_B_JF_B_FW_PRE __stringify(api) ".ucode"
112113
#define IWL_QNJ_B_JF_B_MODULE_FIRMWARE(api) \
@@ -235,8 +236,20 @@ const struct iwl_cfg iwl_ax101_cfg_qu_hr = {
235236
.max_tx_agg_size = IEEE80211_MAX_AMPDU_BUF_HT,
236237
};
237238

238-
const struct iwl_cfg iwl22260_2ax_cfg = {
239-
.name = "Intel(R) Wireless-AX 22260",
239+
const struct iwl_cfg iwl_ax101_cfg_quz_hr = {
240+
.name = "Intel(R) Wi-Fi 6 AX101",
241+
.fw_name_pre = IWL_QUZ_A_HR_B_FW_PRE,
242+
IWL_DEVICE_22500,
243+
/*
244+
* This device doesn't support receiving BlockAck with a large bitmap
245+
* so we need to restrict the size of transmitted aggregation to the
246+
* HT size; mac80211 would otherwise pick the HE max (256) by default.
247+
*/
248+
.max_tx_agg_size = IEEE80211_MAX_AMPDU_BUF_HT,
249+
};
250+
251+
const struct iwl_cfg iwl_ax200_cfg_cc = {
252+
.name = "Intel(R) Wi-Fi 6 AX200 160MHz",
240253
.fw_name_pre = IWL_CC_A_FW_PRE,
241254
IWL_DEVICE_22500,
242255
/*
@@ -249,7 +262,7 @@ const struct iwl_cfg iwl22260_2ax_cfg = {
249262
};
250263

251264
const struct iwl_cfg killer1650x_2ax_cfg = {
252-
.name = "Killer(R) Wireless-AX 1650x Wireless Network Adapter (200NGW)",
265+
.name = "Killer(R) Wi-Fi 6 AX1650x 160MHz Wireless Network Adapter (200NGW)",
253266
.fw_name_pre = IWL_CC_A_FW_PRE,
254267
IWL_DEVICE_22500,
255268
/*
@@ -262,7 +275,7 @@ const struct iwl_cfg killer1650x_2ax_cfg = {
262275
};
263276

264277
const struct iwl_cfg killer1650w_2ax_cfg = {
265-
.name = "Killer(R) Wireless-AX 1650w Wireless Network Adapter (200D2W)",
278+
.name = "Killer(R) Wi-Fi 6 AX1650w 160MHz Wireless Network Adapter (200D2W)",
266279
.fw_name_pre = IWL_CC_A_FW_PRE,
267280
IWL_DEVICE_22500,
268281
/*
@@ -328,7 +341,7 @@ const struct iwl_cfg killer1550s_2ac_cfg_qu_b0_jf_b0 = {
328341
};
329342

330343
const struct iwl_cfg killer1650s_2ax_cfg_qu_b0_hr_b0 = {
331-
.name = "Killer(R) Wireless-AX 1650i Wireless Network Adapter (22560NGW)",
344+
.name = "Killer(R) Wi-Fi 6 AX1650i 160MHz Wireless Network Adapter (201NGW)",
332345
.fw_name_pre = IWL_22000_QU_B_HR_B_FW_PRE,
333346
IWL_DEVICE_22500,
334347
/*
@@ -340,7 +353,7 @@ const struct iwl_cfg killer1650s_2ax_cfg_qu_b0_hr_b0 = {
340353
};
341354

342355
const struct iwl_cfg killer1650i_2ax_cfg_qu_b0_hr_b0 = {
343-
.name = "Killer(R) Wireless-AX 1650s Wireless Network Adapter (22560D2W)",
356+
.name = "Killer(R) Wi-Fi 6 AX1650s 160MHz Wireless Network Adapter (201D2W)",
344357
.fw_name_pre = IWL_22000_QU_B_HR_B_FW_PRE,
345358
IWL_DEVICE_22500,
346359
/*
@@ -444,6 +457,7 @@ MODULE_FIRMWARE(IWL_22000_HR_B_QNJ_MODULE_FIRMWARE(IWL_22000_UCODE_API_MAX));
444457
MODULE_FIRMWARE(IWL_22000_HR_A0_QNJ_MODULE_FIRMWARE(IWL_22000_UCODE_API_MAX));
445458
MODULE_FIRMWARE(IWL_22000_SU_Z0_MODULE_FIRMWARE(IWL_22000_UCODE_API_MAX));
446459
MODULE_FIRMWARE(IWL_QU_B_JF_B_MODULE_FIRMWARE(IWL_22000_UCODE_API_MAX));
460+
MODULE_FIRMWARE(IWL_QUZ_A_HR_B_MODULE_FIRMWARE(IWL_22000_UCODE_API_MAX));
447461
MODULE_FIRMWARE(IWL_QNJ_B_JF_B_MODULE_FIRMWARE(IWL_22000_UCODE_API_MAX));
448462
MODULE_FIRMWARE(IWL_CC_A_MODULE_FIRMWARE(IWL_22000_UCODE_API_MAX));
449463
MODULE_FIRMWARE(IWL_22000_SO_A_JF_B_MODULE_FIRMWARE(IWL_22000_UCODE_API_MAX));

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

Lines changed: 8 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1614,6 +1614,7 @@ iwl_dump_ini_mem(struct iwl_fw_runtime *fwrt,
16141614
if (!range) {
16151615
IWL_ERR(fwrt, "Failed to fill region header: id=%d, type=%d\n",
16161616
le32_to_cpu(reg->region_id), type);
1617+
memset(*data, 0, le32_to_cpu((*data)->len));
16171618
return;
16181619
}
16191620

@@ -1623,6 +1624,7 @@ iwl_dump_ini_mem(struct iwl_fw_runtime *fwrt,
16231624
if (range_size < 0) {
16241625
IWL_ERR(fwrt, "Failed to dump region: id=%d, type=%d\n",
16251626
le32_to_cpu(reg->region_id), type);
1627+
memset(*data, 0, le32_to_cpu((*data)->len));
16261628
return;
16271629
}
16281630
range = range + range_size;
@@ -1807,12 +1809,12 @@ _iwl_fw_error_ini_dump(struct iwl_fw_runtime *fwrt,
18071809

18081810
trigger = fwrt->dump.active_trigs[id].trig;
18091811

1810-
size = sizeof(*dump_file);
1811-
size += iwl_fw_ini_get_trigger_len(fwrt, trigger);
1812-
1812+
size = iwl_fw_ini_get_trigger_len(fwrt, trigger);
18131813
if (!size)
18141814
return NULL;
18151815

1816+
size += sizeof(*dump_file);
1817+
18161818
dump_file = vzalloc(size);
18171819
if (!dump_file)
18181820
return NULL;
@@ -1942,14 +1944,10 @@ int iwl_fw_dbg_error_collect(struct iwl_fw_runtime *fwrt,
19421944
iwl_dump_error_desc->len = 0;
19431945

19441946
ret = iwl_fw_dbg_collect_desc(fwrt, iwl_dump_error_desc, false, 0);
1945-
if (ret) {
1947+
if (ret)
19461948
kfree(iwl_dump_error_desc);
1947-
} else {
1948-
set_bit(STATUS_FW_WAIT_DUMP, &fwrt->trans->status);
1949-
1950-
/* trigger nmi to halt the fw */
1951-
iwl_force_nmi(fwrt->trans);
1952-
}
1949+
else
1950+
iwl_trans_sync_nmi(fwrt->trans);
19531951

19541952
return ret;
19551953
}
@@ -2489,22 +2487,6 @@ IWL_EXPORT_SYMBOL(iwl_fw_dbg_apply_point);
24892487

24902488
void iwl_fwrt_stop_device(struct iwl_fw_runtime *fwrt)
24912489
{
2492-
/* if the wait event timeout elapses instead of wake up then
2493-
* the driver did not receive NMI interrupt and can not assume the FW
2494-
* is halted
2495-
*/
2496-
int ret = wait_event_timeout(fwrt->trans->fw_halt_waitq,
2497-
!test_bit(STATUS_FW_WAIT_DUMP,
2498-
&fwrt->trans->status),
2499-
msecs_to_jiffies(2000));
2500-
if (!ret) {
2501-
/* failed to receive NMI interrupt, assuming the FW is stuck */
2502-
set_bit(STATUS_FW_ERROR, &fwrt->trans->status);
2503-
2504-
clear_bit(STATUS_FW_WAIT_DUMP, &fwrt->trans->status);
2505-
}
2506-
2507-
/* Assuming the op mode mutex is held at this point */
25082490
iwl_fw_dbg_collect_sync(fwrt);
25092491

25102492
iwl_trans_stop_device(fwrt->trans);

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

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,6 @@ void iwl_fw_runtime_init(struct iwl_fw_runtime *fwrt, struct iwl_trans *trans,
7676
fwrt->ops_ctx = ops_ctx;
7777
INIT_DELAYED_WORK(&fwrt->dump.wk, iwl_fw_error_dump_wk);
7878
iwl_fwrt_dbgfs_register(fwrt, dbgfs_dir);
79-
init_waitqueue_head(&fwrt->trans->fw_halt_waitq);
8079
}
8180
IWL_EXPORT_SYMBOL(iwl_fw_runtime_init);
8281

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -549,8 +549,9 @@ extern const struct iwl_cfg iwl22000_2ac_cfg_hr;
549549
extern const struct iwl_cfg iwl22000_2ac_cfg_hr_cdb;
550550
extern const struct iwl_cfg iwl22000_2ac_cfg_jf;
551551
extern const struct iwl_cfg iwl_ax101_cfg_qu_hr;
552+
extern const struct iwl_cfg iwl_ax101_cfg_quz_hr;
552553
extern const struct iwl_cfg iwl22000_2ax_cfg_hr;
553-
extern const struct iwl_cfg iwl22260_2ax_cfg;
554+
extern const struct iwl_cfg iwl_ax200_cfg_cc;
554555
extern const struct iwl_cfg killer1650s_2ax_cfg_qu_b0_hr_b0;
555556
extern const struct iwl_cfg killer1650i_2ax_cfg_qu_b0_hr_b0;
556557
extern const struct iwl_cfg killer1650x_2ax_cfg;

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -327,6 +327,7 @@ enum {
327327
#define CSR_HW_REV_TYPE_NONE (0x00001F0)
328328
#define CSR_HW_REV_TYPE_QNJ (0x0000360)
329329
#define CSR_HW_REV_TYPE_QNJ_B0 (0x0000364)
330+
#define CSR_HW_REV_TYPE_QUZ (0x0000354)
330331
#define CSR_HW_REV_TYPE_HR_CDB (0x0000340)
331332
#define CSR_HW_REV_TYPE_SO (0x0000370)
332333
#define CSR_HW_REV_TYPE_TY (0x0000420)

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

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -338,7 +338,6 @@ enum iwl_d3_status {
338338
* are sent
339339
* @STATUS_TRANS_IDLE: the trans is idle - general commands are not to be sent
340340
* @STATUS_TRANS_DEAD: trans is dead - avoid any read/write operation
341-
* @STATUS_FW_WAIT_DUMP: if set, wait until cleared before collecting dump
342341
*/
343342
enum iwl_trans_status {
344343
STATUS_SYNC_HCMD_ACTIVE,
@@ -351,7 +350,6 @@ enum iwl_trans_status {
351350
STATUS_TRANS_GOING_IDLE,
352351
STATUS_TRANS_IDLE,
353352
STATUS_TRANS_DEAD,
354-
STATUS_FW_WAIT_DUMP,
355353
};
356354

357355
static inline int
@@ -618,6 +616,7 @@ struct iwl_trans_ops {
618616
struct iwl_trans_dump_data *(*dump_data)(struct iwl_trans *trans,
619617
u32 dump_mask);
620618
void (*debugfs_cleanup)(struct iwl_trans *trans);
619+
void (*sync_nmi)(struct iwl_trans *trans);
621620
};
622621

623622
/**
@@ -831,7 +830,6 @@ struct iwl_trans {
831830
u32 lmac_error_event_table[2];
832831
u32 umac_error_event_table;
833832
unsigned int error_event_table_tlv_status;
834-
wait_queue_head_t fw_halt_waitq;
835833

836834
/* pointer to trans specific struct */
837835
/*Ensure that this pointer will always be aligned to sizeof pointer */
@@ -1239,10 +1237,12 @@ static inline void iwl_trans_fw_error(struct iwl_trans *trans)
12391237
/* prevent double restarts due to the same erroneous FW */
12401238
if (!test_and_set_bit(STATUS_FW_ERROR, &trans->status))
12411239
iwl_op_mode_nic_error(trans->op_mode);
1240+
}
12421241

1243-
if (test_and_clear_bit(STATUS_FW_WAIT_DUMP, &trans->status))
1244-
wake_up(&trans->fw_halt_waitq);
1245-
1242+
static inline void iwl_trans_sync_nmi(struct iwl_trans *trans)
1243+
{
1244+
if (trans->ops->sync_nmi)
1245+
trans->ops->sync_nmi(trans);
12461246
}
12471247

12481248
/*****************************************************

drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c

Lines changed: 22 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -2714,9 +2714,6 @@ static void iwl_mvm_stop_ap_ibss(struct ieee80211_hw *hw,
27142714

27152715
iwl_mvm_mac_ctxt_remove(mvm, vif);
27162716

2717-
kfree(mvmvif->ap_wep_key);
2718-
mvmvif->ap_wep_key = NULL;
2719-
27202717
mutex_unlock(&mvm->mutex);
27212718
}
27222719

@@ -3183,24 +3180,7 @@ static int iwl_mvm_mac_sta_state(struct ieee80211_hw *hw,
31833180
ret = iwl_mvm_update_sta(mvm, vif, sta);
31843181
} else if (old_state == IEEE80211_STA_ASSOC &&
31853182
new_state == IEEE80211_STA_AUTHORIZED) {
3186-
/* if wep is used, need to set the key for the station now */
3187-
if (vif->type == NL80211_IFTYPE_AP && mvmvif->ap_wep_key) {
3188-
mvm_sta->wep_key =
3189-
kmemdup(mvmvif->ap_wep_key,
3190-
sizeof(*mvmvif->ap_wep_key) +
3191-
mvmvif->ap_wep_key->keylen,
3192-
GFP_KERNEL);
3193-
if (!mvm_sta->wep_key) {
3194-
ret = -ENOMEM;
3195-
goto out_unlock;
3196-
}
3197-
3198-
ret = iwl_mvm_set_sta_key(mvm, vif, sta,
3199-
mvm_sta->wep_key,
3200-
STA_KEY_IDX_INVALID);
3201-
} else {
3202-
ret = 0;
3203-
}
3183+
ret = 0;
32043184

32053185
/* we don't support TDLS during DCM */
32063186
if (iwl_mvm_phy_ctx_count(mvm) > 1)
@@ -3242,17 +3222,6 @@ static int iwl_mvm_mac_sta_state(struct ieee80211_hw *hw,
32423222
NL80211_TDLS_DISABLE_LINK);
32433223
}
32443224

3245-
/* Remove STA key if this is an AP using WEP */
3246-
if (vif->type == NL80211_IFTYPE_AP && mvmvif->ap_wep_key) {
3247-
int rm_ret = iwl_mvm_remove_sta_key(mvm, vif, sta,
3248-
mvm_sta->wep_key);
3249-
3250-
if (!ret)
3251-
ret = rm_ret;
3252-
kfree(mvm_sta->wep_key);
3253-
mvm_sta->wep_key = NULL;
3254-
}
3255-
32563225
if (unlikely(ret &&
32573226
test_bit(IWL_MVM_STATUS_HW_RESTART_REQUESTED,
32583227
&mvm->status)))
@@ -3289,6 +3258,13 @@ static void iwl_mvm_sta_rc_update(struct ieee80211_hw *hw,
32893258
struct ieee80211_sta *sta, u32 changed)
32903259
{
32913260
struct iwl_mvm *mvm = IWL_MAC80211_GET_MVM(hw);
3261+
struct iwl_mvm_vif *mvmvif = iwl_mvm_vif_from_mac80211(vif);
3262+
3263+
if (changed & (IEEE80211_RC_BW_CHANGED |
3264+
IEEE80211_RC_SUPP_RATES_CHANGED |
3265+
IEEE80211_RC_NSS_CHANGED))
3266+
iwl_mvm_rs_rate_init(mvm, sta, mvmvif->phy_ctxt->channel->band,
3267+
true);
32923268

32933269
if (vif->type == NL80211_IFTYPE_STATION &&
32943270
changed & IEEE80211_RC_NSS_CHANGED)
@@ -3439,20 +3415,12 @@ static int iwl_mvm_mac_set_key(struct ieee80211_hw *hw,
34393415
break;
34403416
case WLAN_CIPHER_SUITE_WEP40:
34413417
case WLAN_CIPHER_SUITE_WEP104:
3442-
if (vif->type == NL80211_IFTYPE_AP) {
3443-
struct iwl_mvm_vif *mvmvif =
3444-
iwl_mvm_vif_from_mac80211(vif);
3445-
3446-
mvmvif->ap_wep_key = kmemdup(key,
3447-
sizeof(*key) + key->keylen,
3448-
GFP_KERNEL);
3449-
if (!mvmvif->ap_wep_key)
3450-
return -ENOMEM;
3451-
}
3452-
3453-
if (vif->type != NL80211_IFTYPE_STATION)
3454-
return 0;
3455-
break;
3418+
if (vif->type == NL80211_IFTYPE_STATION)
3419+
break;
3420+
if (iwl_mvm_has_new_tx_api(mvm))
3421+
return -EOPNOTSUPP;
3422+
/* support HW crypto on TX */
3423+
return 0;
34563424
default:
34573425
/* currently FW supports only one optional cipher scheme */
34583426
if (hw->n_cipher_schemes &&
@@ -3540,12 +3508,17 @@ static int iwl_mvm_mac_set_key(struct ieee80211_hw *hw,
35403508
ret = iwl_mvm_set_sta_key(mvm, vif, sta, key, key_offset);
35413509
if (ret) {
35423510
IWL_WARN(mvm, "set key failed\n");
3511+
key->hw_key_idx = STA_KEY_IDX_INVALID;
35433512
/*
35443513
* can't add key for RX, but we don't need it
3545-
* in the device for TX so still return 0
3514+
* in the device for TX so still return 0,
3515+
* unless we have new TX API where we cannot
3516+
* put key material into the TX_CMD
35463517
*/
3547-
key->hw_key_idx = STA_KEY_IDX_INVALID;
3548-
ret = 0;
3518+
if (iwl_mvm_has_new_tx_api(mvm))
3519+
ret = -EOPNOTSUPP;
3520+
else
3521+
ret = 0;
35493522
}
35503523

35513524
break;

drivers/net/wireless/intel/iwlwifi/mvm/mvm.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -498,7 +498,6 @@ struct iwl_mvm_vif {
498498
netdev_features_t features;
499499

500500
struct iwl_probe_resp_data __rcu *probe_resp_data;
501-
struct ieee80211_key_conf *ap_wep_key;
502501
};
503502

504503
static inline struct iwl_mvm_vif *

0 commit comments

Comments
 (0)