Skip to content

Commit

Permalink
wifi: iwlwifi: also unify Sc device configurations
Browse files Browse the repository at this point in the history
Again, they're all the same except for the radio and
steps, so use the new logic to unify them.

Signed-off-by: Johannes Berg <[email protected]>
Signed-off-by: Gregory Greenman <[email protected]>
Link: https://lore.kernel.org/r/20230621130443.3bc1191f883f.If1e6f73a164b0794ac65372b72673ce8ddf9e571@changeid
Signed-off-by: Johannes Berg <[email protected]>
  • Loading branch information
jmberg-intel committed Jun 21, 2023
1 parent 3fd3128 commit bfed356
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 91 deletions.
52 changes: 2 additions & 50 deletions drivers/net/wireless/intel/iwlwifi/cfg/sc.c
Original file line number Diff line number Diff line change
Expand Up @@ -149,56 +149,8 @@ const struct iwl_cfg_trans_params iwl_sc_trans_cfg = {

const char iwl_sc_name[] = "Intel(R) TBD Sc device";

const struct iwl_cfg iwl_cfg_sc_a0_fm_b0 = {
.fw_name_pre = IWL_SC_A_FM_B_FW_PRE,
.uhb_supported = true,
IWL_DEVICE_SC,
.features = IWL_TX_CSUM_NETIF_FLAGS_BZ | NETIF_F_RXCSUM,
.num_rbds = IWL_NUM_RBDS_SC_HE,
};

const struct iwl_cfg iwl_cfg_sc_a0_fm_c0 = {
.fw_name_pre = IWL_SC_A_FM_C_FW_PRE,
.uhb_supported = true,
IWL_DEVICE_SC,
.features = IWL_TX_CSUM_NETIF_FLAGS_BZ | NETIF_F_RXCSUM,
.num_rbds = IWL_NUM_RBDS_SC_HE,
};

const struct iwl_cfg iwl_cfg_sc_a0_hr_a0 = {
.fw_name_pre = IWL_SC_A_HR_A_FW_PRE,
.uhb_supported = true,
IWL_DEVICE_SC,
.features = IWL_TX_CSUM_NETIF_FLAGS_BZ | NETIF_F_RXCSUM,
.num_rbds = IWL_NUM_RBDS_SC_HE,
};

const struct iwl_cfg iwl_cfg_sc_a0_hr_b0 = {
.fw_name_pre = IWL_SC_A_HR_B_FW_PRE,
.uhb_supported = true,
IWL_DEVICE_SC,
.features = IWL_TX_CSUM_NETIF_FLAGS_BZ | NETIF_F_RXCSUM,
.num_rbds = IWL_NUM_RBDS_SC_HE,
};

const struct iwl_cfg iwl_cfg_sc_a0_gf_a0 = {
.fw_name_pre = IWL_SC_A_GF_A_FW_PRE,
.uhb_supported = true,
IWL_DEVICE_SC,
.features = IWL_TX_CSUM_NETIF_FLAGS_BZ | NETIF_F_RXCSUM,
.num_rbds = IWL_NUM_RBDS_SC_HE,
};

const struct iwl_cfg iwl_cfg_sc_a0_gf4_a0 = {
.fw_name_pre = IWL_SC_A_GF4_A_FW_PRE,
.uhb_supported = true,
IWL_DEVICE_SC,
.features = IWL_TX_CSUM_NETIF_FLAGS_BZ | NETIF_F_RXCSUM,
.num_rbds = IWL_NUM_RBDS_SC_HE,
};

const struct iwl_cfg iwl_cfg_sc_a0_wh_a0 = {
.fw_name_pre = IWL_SC_A_WH_A_FW_PRE,
const struct iwl_cfg iwl_cfg_sc = {
.fw_name_mac = "sc",
.uhb_supported = true,
IWL_DEVICE_SC,
.features = IWL_TX_CSUM_NETIF_FLAGS_BZ | NETIF_F_RXCSUM,
Expand Down
8 changes: 1 addition & 7 deletions drivers/net/wireless/intel/iwlwifi/iwl-config.h
Original file line number Diff line number Diff line change
Expand Up @@ -651,13 +651,7 @@ extern const struct iwl_cfg iwl_cfg_bz;
extern const struct iwl_cfg iwl_cfg_gl_a0_fm_a0;
extern const struct iwl_cfg iwl_cfg_gl;

extern const struct iwl_cfg iwl_cfg_sc_a0_fm_b0;
extern const struct iwl_cfg iwl_cfg_sc_a0_fm_c0;
extern const struct iwl_cfg iwl_cfg_sc_a0_hr_a0;
extern const struct iwl_cfg iwl_cfg_sc_a0_hr_b0;
extern const struct iwl_cfg iwl_cfg_sc_a0_gf_a0;
extern const struct iwl_cfg iwl_cfg_sc_a0_gf4_a0;
extern const struct iwl_cfg iwl_cfg_sc_a0_wh_a0;
extern const struct iwl_cfg iwl_cfg_sc;
#endif /* CONFIG_IWLMVM */

#endif /* __IWL_CONFIG_H__ */
38 changes: 4 additions & 34 deletions drivers/net/wireless/intel/iwlwifi/pcie/drv.c
Original file line number Diff line number Diff line change
Expand Up @@ -1142,40 +1142,10 @@ static const struct iwl_dev_info iwl_dev_info_table[] = {

/* Sc */
_IWL_DEV_INFO(IWL_CFG_ANY, IWL_CFG_ANY,
IWL_CFG_MAC_TYPE_SC, SILICON_A_STEP,
IWL_CFG_RF_TYPE_FM, IWL_CFG_ANY, SILICON_B_STEP,
IWL_CFG_ANY, IWL_CFG_ANY, IWL_CFG_NO_CDB,
iwl_cfg_sc_a0_fm_b0, iwl_sc_name),
_IWL_DEV_INFO(IWL_CFG_ANY, IWL_CFG_ANY,
IWL_CFG_MAC_TYPE_SC, SILICON_A_STEP,
IWL_CFG_RF_TYPE_FM, IWL_CFG_ANY, SILICON_C_STEP,
IWL_CFG_ANY, IWL_CFG_ANY, IWL_CFG_NO_CDB,
iwl_cfg_sc_a0_fm_c0, iwl_sc_name),
_IWL_DEV_INFO(IWL_CFG_ANY, IWL_CFG_ANY,
IWL_CFG_MAC_TYPE_SC, SILICON_A_STEP,
IWL_CFG_RF_TYPE_HR1, IWL_CFG_ANY, IWL_CFG_ANY,
IWL_CFG_ANY, IWL_CFG_ANY, IWL_CFG_NO_CDB,
iwl_cfg_sc_a0_hr_a0, iwl_sc_name),
_IWL_DEV_INFO(IWL_CFG_ANY, IWL_CFG_ANY,
IWL_CFG_MAC_TYPE_SC, SILICON_A_STEP,
IWL_CFG_RF_TYPE_HR2, IWL_CFG_ANY, IWL_CFG_ANY,
IWL_CFG_ANY, IWL_CFG_ANY, IWL_CFG_NO_CDB,
iwl_cfg_sc_a0_hr_b0, iwl_sc_name),
_IWL_DEV_INFO(IWL_CFG_ANY, IWL_CFG_ANY,
IWL_CFG_MAC_TYPE_SC, SILICON_A_STEP,
IWL_CFG_RF_TYPE_GF, IWL_CFG_ANY, IWL_CFG_ANY,
IWL_CFG_ANY, IWL_CFG_ANY, IWL_CFG_NO_CDB,
iwl_cfg_sc_a0_gf_a0, iwl_sc_name),
_IWL_DEV_INFO(IWL_CFG_ANY, IWL_CFG_ANY,
IWL_CFG_MAC_TYPE_SC, SILICON_A_STEP,
IWL_CFG_RF_TYPE_GF, IWL_CFG_ANY, IWL_CFG_ANY,
IWL_CFG_ANY, IWL_CFG_ANY, IWL_CFG_CDB,
iwl_cfg_sc_a0_gf4_a0, iwl_sc_name),
_IWL_DEV_INFO(IWL_CFG_ANY, IWL_CFG_ANY,
IWL_CFG_MAC_TYPE_SC, SILICON_A_STEP,
IWL_CFG_RF_TYPE_WH, IWL_CFG_ANY, IWL_CFG_ANY,
IWL_CFG_ANY, IWL_CFG_ANY, IWL_CFG_NO_CDB,
iwl_cfg_sc_a0_wh_a0, iwl_sc_name),
IWL_CFG_MAC_TYPE_SC, IWL_CFG_ANY,
IWL_CFG_ANY, IWL_CFG_ANY, IWL_CFG_ANY,
IWL_CFG_ANY, IWL_CFG_ANY, IWL_CFG_ANY,
iwl_cfg_sc, iwl_sc_name),
#endif /* CONFIG_IWLMVM */
};

Expand Down

0 comments on commit bfed356

Please sign in to comment.