Skip to content

Commit b950057

Browse files
lucacoelhojmberg-intel
authored andcommitted
iwlwifi: pcie: handle switching killer Qu B0 NICs to C0
We need to use a different firmware for C0 versions of killer Qu NICs. Add structures for them and handle them in the if block that detects C0 revisions. Additionally, instead of having an inclusive check for QnJ devices, make the selection exclusive, so that switching to QnJ is the exception, not the default. This prevents us from having to add all the non-QnJ cards to an exclusion list. To do so, only go into the QnJ block if the device has an RF ID type HR and HW revision QnJ. Cc: [email protected] # 5.2 Signed-off-by: Luca Coelho <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Johannes Berg <[email protected]>
1 parent 189308d commit b950057

File tree

4 files changed

+31
-6
lines changed

4 files changed

+31
-6
lines changed

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

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -556,6 +556,30 @@ const struct iwl_cfg killer1650i_2ax_cfg_qu_b0_hr_b0 = {
556556
.max_tx_agg_size = IEEE80211_MAX_AMPDU_BUF_HT,
557557
};
558558

559+
const struct iwl_cfg killer1650s_2ax_cfg_qu_c0_hr_b0 = {
560+
.name = "Killer(R) Wi-Fi 6 AX1650i 160MHz Wireless Network Adapter (201NGW)",
561+
.fw_name_pre = IWL_QU_C_HR_B_FW_PRE,
562+
IWL_DEVICE_22500,
563+
/*
564+
* This device doesn't support receiving BlockAck with a large bitmap
565+
* so we need to restrict the size of transmitted aggregation to the
566+
* HT size; mac80211 would otherwise pick the HE max (256) by default.
567+
*/
568+
.max_tx_agg_size = IEEE80211_MAX_AMPDU_BUF_HT,
569+
};
570+
571+
const struct iwl_cfg killer1650i_2ax_cfg_qu_c0_hr_b0 = {
572+
.name = "Killer(R) Wi-Fi 6 AX1650s 160MHz Wireless Network Adapter (201D2W)",
573+
.fw_name_pre = IWL_QU_C_HR_B_FW_PRE,
574+
IWL_DEVICE_22500,
575+
/*
576+
* This device doesn't support receiving BlockAck with a large bitmap
577+
* so we need to restrict the size of transmitted aggregation to the
578+
* HT size; mac80211 would otherwise pick the HE max (256) by default.
579+
*/
580+
.max_tx_agg_size = IEEE80211_MAX_AMPDU_BUF_HT,
581+
};
582+
559583
const struct iwl_cfg iwl22000_2ax_cfg_jf = {
560584
.name = "Intel(R) Dual Band Wireless AX 22000",
561585
.fw_name_pre = IWL_QU_B_JF_B_FW_PRE,

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -577,6 +577,8 @@ extern const struct iwl_cfg iwl_ax1650i_cfg_quz_hr;
577577
extern const struct iwl_cfg iwl_ax1650s_cfg_quz_hr;
578578
extern const struct iwl_cfg killer1650s_2ax_cfg_qu_b0_hr_b0;
579579
extern const struct iwl_cfg killer1650i_2ax_cfg_qu_b0_hr_b0;
580+
extern const struct iwl_cfg killer1650s_2ax_cfg_qu_c0_hr_b0;
581+
extern const struct iwl_cfg killer1650i_2ax_cfg_qu_c0_hr_b0;
580582
extern const struct iwl_cfg killer1650x_2ax_cfg;
581583
extern const struct iwl_cfg killer1650w_2ax_cfg;
582584
extern const struct iwl_cfg iwl9461_2ac_cfg_qu_b0_jf_b0;

drivers/net/wireless/intel/iwlwifi/pcie/drv.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1062,6 +1062,10 @@ static int iwl_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
10621062
iwl_trans->cfg = &iwl9560_2ac_cfg_qu_c0_jf_b0;
10631063
else if (iwl_trans->cfg == &iwl9560_2ac_160_cfg_qu_b0_jf_b0)
10641064
iwl_trans->cfg = &iwl9560_2ac_160_cfg_qu_c0_jf_b0;
1065+
else if (iwl_trans->cfg == &killer1650s_2ax_cfg_qu_b0_hr_b0)
1066+
iwl_trans->cfg = &killer1650s_2ax_cfg_qu_c0_hr_b0;
1067+
else if (iwl_trans->cfg == &killer1650i_2ax_cfg_qu_b0_hr_b0)
1068+
iwl_trans->cfg = &killer1650i_2ax_cfg_qu_c0_hr_b0;
10651069
}
10661070

10671071
/* same thing for QuZ... */

drivers/net/wireless/intel/iwlwifi/pcie/trans.c

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3602,12 +3602,7 @@ struct iwl_trans *iwl_trans_pcie_alloc(struct pci_dev *pdev,
36023602
}
36033603
} else if (CSR_HW_RF_ID_TYPE_CHIP_ID(trans->hw_rf_id) ==
36043604
CSR_HW_RF_ID_TYPE_CHIP_ID(CSR_HW_RF_ID_TYPE_HR) &&
3605-
((trans->cfg != &iwl_ax200_cfg_cc &&
3606-
trans->cfg != &iwl_ax201_cfg_qu_hr &&
3607-
trans->cfg != &killer1650x_2ax_cfg &&
3608-
trans->cfg != &killer1650w_2ax_cfg &&
3609-
trans->cfg != &iwl_ax201_cfg_quz_hr) ||
3610-
trans->hw_rev == CSR_HW_REV_TYPE_QNJ_B0)) {
3605+
trans->hw_rev == CSR_HW_REV_TYPE_QNJ_B0) {
36113606
u32 hw_status;
36123607

36133608
hw_status = iwl_read_prph(trans, UMAG_GEN_HW_STATUS);

0 commit comments

Comments
 (0)