Skip to content

Commit 239712e

Browse files
Wey-Yi Guylinvjw
authored andcommitted
iwlwifi: don't read sku information from EEPROM for 4965
For all the new devices, the sku information should read from EEPROM but for legacy devices such as 4965, appearly the EEPROM does not contain the necessary information. so skip the read from EEPROM and go back to use software configuration. Reported-by: Helmut Schaa <helmut.schaa@googlemail.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com> Tested-by: Helmut Schaa <helmut.schaa@googlemail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
1 parent 765c2a9 commit 239712e

File tree

2 files changed

+8
-4
lines changed

2 files changed

+8
-4
lines changed

drivers/net/wireless/iwlwifi/iwl-4965.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2624,6 +2624,7 @@ struct iwl_cfg iwl4965_agn_cfg = {
26242624
.fw_name_pre = IWL4965_FW_PRE,
26252625
.ucode_api_max = IWL4965_UCODE_API_MAX,
26262626
.ucode_api_min = IWL4965_UCODE_API_MIN,
2627+
.sku = IWL_SKU_A|IWL_SKU_G|IWL_SKU_N,
26272628
.valid_tx_ant = ANT_AB,
26282629
.valid_rx_ant = ANT_ABC,
26292630
.eeprom_ver = EEPROM_4965_EEPROM_VERSION,

drivers/net/wireless/iwlwifi/iwl-agn-eeprom.c

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -152,11 +152,14 @@ int iwl_eeprom_check_sku(struct iwl_priv *priv)
152152

153153
eeprom_sku = iwl_eeprom_query16(priv, EEPROM_SKU_CAP);
154154

155-
priv->cfg->sku = ((eeprom_sku & EEPROM_SKU_CAP_BAND_SELECTION) >>
155+
if (!priv->cfg->sku) {
156+
/* not using sku overwrite */
157+
priv->cfg->sku =
158+
((eeprom_sku & EEPROM_SKU_CAP_BAND_SELECTION) >>
156159
EEPROM_SKU_CAP_BAND_POS);
157-
if (eeprom_sku & EEPROM_SKU_CAP_11N_ENABLE)
158-
priv->cfg->sku |= IWL_SKU_N;
159-
160+
if (eeprom_sku & EEPROM_SKU_CAP_11N_ENABLE)
161+
priv->cfg->sku |= IWL_SKU_N;
162+
}
160163
if (!priv->cfg->sku) {
161164
IWL_ERR(priv, "Invalid device sku\n");
162165
return -EINVAL;

0 commit comments

Comments
 (0)