aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/iwlwifi/dvm/main.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/wireless/iwlwifi/dvm/main.c')
-rw-r--r--drivers/net/wireless/iwlwifi/dvm/main.c29
1 files changed, 9 insertions, 20 deletions
diff --git a/drivers/net/wireless/iwlwifi/dvm/main.c b/drivers/net/wireless/iwlwifi/dvm/main.c
index 408132cf83c1..e3a07c916812 100644
--- a/drivers/net/wireless/iwlwifi/dvm/main.c
+++ b/drivers/net/wireless/iwlwifi/dvm/main.c
@@ -511,7 +511,7 @@ static void iwl_bg_tx_flush(struct work_struct *work)
511 return; 511 return;
512 512
513 IWL_DEBUG_INFO(priv, "device request: flush all tx frames\n"); 513 IWL_DEBUG_INFO(priv, "device request: flush all tx frames\n");
514 iwlagn_dev_txfifo_flush(priv, IWL_DROP_ALL); 514 iwlagn_dev_txfifo_flush(priv);
515} 515}
516 516
517/* 517/*
@@ -1191,10 +1191,6 @@ static void iwl_option_config(struct iwl_priv *priv)
1191 1191
1192static int iwl_eeprom_init_hw_params(struct iwl_priv *priv) 1192static int iwl_eeprom_init_hw_params(struct iwl_priv *priv)
1193{ 1193{
1194 u16 radio_cfg;
1195
1196 priv->eeprom_data->sku = priv->eeprom_data->sku;
1197
1198 if (priv->eeprom_data->sku & EEPROM_SKU_CAP_11N_ENABLE && 1194 if (priv->eeprom_data->sku & EEPROM_SKU_CAP_11N_ENABLE &&
1199 !priv->cfg->ht_params) { 1195 !priv->cfg->ht_params) {
1200 IWL_ERR(priv, "Invalid 11n configuration\n"); 1196 IWL_ERR(priv, "Invalid 11n configuration\n");
@@ -1206,9 +1202,7 @@ static int iwl_eeprom_init_hw_params(struct iwl_priv *priv)
1206 return -EINVAL; 1202 return -EINVAL;
1207 } 1203 }
1208 1204
1209 IWL_INFO(priv, "Device SKU: 0x%X\n", priv->eeprom_data->sku); 1205 IWL_DEBUG_INFO(priv, "Device SKU: 0x%X\n", priv->eeprom_data->sku);
1210
1211 radio_cfg = priv->eeprom_data->radio_cfg;
1212 1206
1213 priv->hw_params.tx_chains_num = 1207 priv->hw_params.tx_chains_num =
1214 num_of_ant(priv->eeprom_data->valid_tx_ant); 1208 num_of_ant(priv->eeprom_data->valid_tx_ant);
@@ -1218,9 +1212,9 @@ static int iwl_eeprom_init_hw_params(struct iwl_priv *priv)
1218 priv->hw_params.rx_chains_num = 1212 priv->hw_params.rx_chains_num =
1219 num_of_ant(priv->eeprom_data->valid_rx_ant); 1213 num_of_ant(priv->eeprom_data->valid_rx_ant);
1220 1214
1221 IWL_INFO(priv, "Valid Tx ant: 0x%X, Valid Rx ant: 0x%X\n", 1215 IWL_DEBUG_INFO(priv, "Valid Tx ant: 0x%X, Valid Rx ant: 0x%X\n",
1222 priv->eeprom_data->valid_tx_ant, 1216 priv->eeprom_data->valid_tx_ant,
1223 priv->eeprom_data->valid_rx_ant); 1217 priv->eeprom_data->valid_rx_ant);
1224 1218
1225 return 0; 1219 return 0;
1226} 1220}
@@ -1235,7 +1229,7 @@ static struct iwl_op_mode *iwl_op_mode_dvm_start(struct iwl_trans *trans,
1235 struct iwl_op_mode *op_mode; 1229 struct iwl_op_mode *op_mode;
1236 u16 num_mac; 1230 u16 num_mac;
1237 u32 ucode_flags; 1231 u32 ucode_flags;
1238 struct iwl_trans_config trans_cfg; 1232 struct iwl_trans_config trans_cfg = {};
1239 static const u8 no_reclaim_cmds[] = { 1233 static const u8 no_reclaim_cmds[] = {
1240 REPLY_RX_PHY_CMD, 1234 REPLY_RX_PHY_CMD,
1241 REPLY_RX_MPDU_CMD, 1235 REPLY_RX_MPDU_CMD,
@@ -1334,6 +1328,9 @@ static struct iwl_op_mode *iwl_op_mode_dvm_start(struct iwl_trans *trans,
1334 /* Configure transport layer */ 1328 /* Configure transport layer */
1335 iwl_trans_configure(priv->trans, &trans_cfg); 1329 iwl_trans_configure(priv->trans, &trans_cfg);
1336 1330
1331 trans->rx_mpdu_cmd = REPLY_RX_MPDU_CMD;
1332 trans->rx_mpdu_cmd_hdr_size = sizeof(struct iwl_rx_mpdu_res_start);
1333
1337 /* At this point both hw and priv are allocated. */ 1334 /* At this point both hw and priv are allocated. */
1338 1335
1339 SET_IEEE80211_DEV(priv->hw, priv->trans->dev); 1336 SET_IEEE80211_DEV(priv->hw, priv->trans->dev);
@@ -1508,10 +1505,6 @@ static void iwl_op_mode_dvm_stop(struct iwl_op_mode *op_mode)
1508 1505
1509 iwl_tt_exit(priv); 1506 iwl_tt_exit(priv);
1510 1507
1511 /*This will stop the queues, move the device to low power state */
1512 priv->ucode_loaded = false;
1513 iwl_trans_stop_device(priv->trans);
1514
1515 kfree(priv->eeprom_blob); 1508 kfree(priv->eeprom_blob);
1516 iwl_free_eeprom_data(priv->eeprom_data); 1509 iwl_free_eeprom_data(priv->eeprom_data);
1517 1510
@@ -1927,8 +1920,6 @@ static void iwlagn_fw_error(struct iwl_priv *priv, bool ondemand)
1927 * commands by clearing the ready bit */ 1920 * commands by clearing the ready bit */
1928 clear_bit(STATUS_READY, &priv->status); 1921 clear_bit(STATUS_READY, &priv->status);
1929 1922
1930 wake_up(&priv->trans->wait_command_queue);
1931
1932 if (!ondemand) { 1923 if (!ondemand) {
1933 /* 1924 /*
1934 * If firmware keep reloading, then it indicate something 1925 * If firmware keep reloading, then it indicate something
@@ -2152,8 +2143,6 @@ static int __init iwl_init(void)
2152{ 2143{
2153 2144
2154 int ret; 2145 int ret;
2155 pr_info(DRV_DESCRIPTION ", " DRV_VERSION "\n");
2156 pr_info(DRV_COPYRIGHT "\n");
2157 2146
2158 ret = iwlagn_rate_control_register(); 2147 ret = iwlagn_rate_control_register();
2159 if (ret) { 2148 if (ret) {