aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/iwlwifi/iwl-agn-lib.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/wireless/iwlwifi/iwl-agn-lib.c')
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-agn-lib.c42
1 files changed, 15 insertions, 27 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn-lib.c b/drivers/net/wireless/iwlwifi/iwl-agn-lib.c
index 4e0c248a0050..e1c2bb802050 100644
--- a/drivers/net/wireless/iwlwifi/iwl-agn-lib.c
+++ b/drivers/net/wireless/iwlwifi/iwl-agn-lib.c
@@ -33,12 +33,11 @@
33#include <linux/sched.h> 33#include <linux/sched.h>
34 34
35#include "iwl-dev.h" 35#include "iwl-dev.h"
36#include "iwl-core.h"
37#include "iwl-io.h" 36#include "iwl-io.h"
38#include "iwl-agn-hw.h" 37#include "iwl-agn-hw.h"
39#include "iwl-agn.h" 38#include "iwl-agn.h"
40#include "iwl-trans.h" 39#include "iwl-trans.h"
41#include "iwl-shared.h" 40#include "iwl-modparams.h"
42 41
43int iwlagn_hw_valid_rtc_data_addr(u32 addr) 42int iwlagn_hw_valid_rtc_data_addr(u32 addr)
44{ 43{
@@ -94,17 +93,6 @@ void iwlagn_temperature(struct iwl_priv *priv)
94 iwl_tt_handler(priv); 93 iwl_tt_handler(priv);
95} 94}
96 95
97struct iwl_mod_params iwlagn_mod_params = {
98 .amsdu_size_8K = 1,
99 .restart_fw = 1,
100 .plcp_check = true,
101 .bt_coex_active = true,
102 .power_level = IWL_POWER_INDEX_1,
103 .bt_ch_announce = true,
104 .auto_agg = true,
105 /* the rest are 0 by default */
106};
107
108int iwlagn_hwrate_to_mac80211_idx(u32 rate_n_flags, enum ieee80211_band band) 96int iwlagn_hwrate_to_mac80211_idx(u32 rate_n_flags, enum ieee80211_band band)
109{ 97{
110 int idx = 0; 98 int idx = 0;
@@ -189,7 +177,7 @@ void iwlagn_dev_txfifo_flush(struct iwl_priv *priv, u16 flush_control)
189 goto done; 177 goto done;
190 } 178 }
191 IWL_DEBUG_INFO(priv, "wait transmit/flush all frames\n"); 179 IWL_DEBUG_INFO(priv, "wait transmit/flush all frames\n");
192 iwl_trans_wait_tx_queue_empty(trans(priv)); 180 iwl_trans_wait_tx_queue_empty(priv->trans);
193done: 181done:
194 ieee80211_wake_queues(priv->hw); 182 ieee80211_wake_queues(priv->hw);
195 mutex_unlock(&priv->mutex); 183 mutex_unlock(&priv->mutex);
@@ -312,21 +300,21 @@ void iwlagn_send_advance_bt_config(struct iwl_priv *priv)
312 BUILD_BUG_ON(sizeof(iwlagn_def_3w_lookup) != 300 BUILD_BUG_ON(sizeof(iwlagn_def_3w_lookup) !=
313 sizeof(basic.bt3_lookup_table)); 301 sizeof(basic.bt3_lookup_table));
314 302
315 if (cfg(priv)->bt_params) { 303 if (priv->cfg->bt_params) {
316 /* 304 /*
317 * newer generation of devices (2000 series and newer) 305 * newer generation of devices (2000 series and newer)
318 * use the version 2 of the bt command 306 * use the version 2 of the bt command
319 * we need to make sure sending the host command 307 * we need to make sure sending the host command
320 * with correct data structure to avoid uCode assert 308 * with correct data structure to avoid uCode assert
321 */ 309 */
322 if (cfg(priv)->bt_params->bt_session_2) { 310 if (priv->cfg->bt_params->bt_session_2) {
323 bt_cmd_v2.prio_boost = cpu_to_le32( 311 bt_cmd_v2.prio_boost = cpu_to_le32(
324 cfg(priv)->bt_params->bt_prio_boost); 312 priv->cfg->bt_params->bt_prio_boost);
325 bt_cmd_v2.tx_prio_boost = 0; 313 bt_cmd_v2.tx_prio_boost = 0;
326 bt_cmd_v2.rx_prio_boost = 0; 314 bt_cmd_v2.rx_prio_boost = 0;
327 } else { 315 } else {
328 bt_cmd_v1.prio_boost = 316 bt_cmd_v1.prio_boost =
329 cfg(priv)->bt_params->bt_prio_boost; 317 priv->cfg->bt_params->bt_prio_boost;
330 bt_cmd_v1.tx_prio_boost = 0; 318 bt_cmd_v1.tx_prio_boost = 0;
331 bt_cmd_v1.rx_prio_boost = 0; 319 bt_cmd_v1.rx_prio_boost = 0;
332 } 320 }
@@ -345,7 +333,7 @@ void iwlagn_send_advance_bt_config(struct iwl_priv *priv)
345 * (might be in monitor mode), or the interface is in 333 * (might be in monitor mode), or the interface is in
346 * IBSS mode (no proper uCode support for coex then). 334 * IBSS mode (no proper uCode support for coex then).
347 */ 335 */
348 if (!iwlagn_mod_params.bt_coex_active || 336 if (!iwlwifi_mod_params.bt_coex_active ||
349 priv->iw_mode == NL80211_IFTYPE_ADHOC) { 337 priv->iw_mode == NL80211_IFTYPE_ADHOC) {
350 basic.flags = IWLAGN_BT_FLAG_COEX_MODE_DISABLED; 338 basic.flags = IWLAGN_BT_FLAG_COEX_MODE_DISABLED;
351 } else { 339 } else {
@@ -374,7 +362,7 @@ void iwlagn_send_advance_bt_config(struct iwl_priv *priv)
374 priv->bt_full_concurrent ? 362 priv->bt_full_concurrent ?
375 "full concurrency" : "3-wire"); 363 "full concurrency" : "3-wire");
376 364
377 if (cfg(priv)->bt_params->bt_session_2) { 365 if (priv->cfg->bt_params->bt_session_2) {
378 memcpy(&bt_cmd_v2.basic, &basic, 366 memcpy(&bt_cmd_v2.basic, &basic,
379 sizeof(basic)); 367 sizeof(basic));
380 ret = iwl_dvm_send_cmd_pdu(priv, REPLY_BT_CONFIG, 368 ret = iwl_dvm_send_cmd_pdu(priv, REPLY_BT_CONFIG,
@@ -740,8 +728,8 @@ static bool is_single_rx_stream(struct iwl_priv *priv)
740 */ 728 */
741static int iwl_get_active_rx_chain_count(struct iwl_priv *priv) 729static int iwl_get_active_rx_chain_count(struct iwl_priv *priv)
742{ 730{
743 if (cfg(priv)->bt_params && 731 if (priv->cfg->bt_params &&
744 cfg(priv)->bt_params->advanced_bt_coexist && 732 priv->cfg->bt_params->advanced_bt_coexist &&
745 (priv->bt_full_concurrent || 733 (priv->bt_full_concurrent ||
746 priv->bt_traffic_load >= IWL_BT_COEX_TRAFFIC_LOAD_HIGH)) { 734 priv->bt_traffic_load >= IWL_BT_COEX_TRAFFIC_LOAD_HIGH)) {
747 /* 735 /*
@@ -812,8 +800,8 @@ void iwlagn_set_rxon_chain(struct iwl_priv *priv, struct iwl_rxon_context *ctx)
812 else 800 else
813 active_chains = priv->hw_params.valid_rx_ant; 801 active_chains = priv->hw_params.valid_rx_ant;
814 802
815 if (cfg(priv)->bt_params && 803 if (priv->cfg->bt_params &&
816 cfg(priv)->bt_params->advanced_bt_coexist && 804 priv->cfg->bt_params->advanced_bt_coexist &&
817 (priv->bt_full_concurrent || 805 (priv->bt_full_concurrent ||
818 priv->bt_traffic_load >= IWL_BT_COEX_TRAFFIC_LOAD_HIGH)) { 806 priv->bt_traffic_load >= IWL_BT_COEX_TRAFFIC_LOAD_HIGH)) {
819 /* 807 /*
@@ -1132,7 +1120,7 @@ int iwlagn_suspend(struct iwl_priv *priv, struct cfg80211_wowlan *wowlan)
1132 memcpy(&rxon, &ctx->active, sizeof(rxon)); 1120 memcpy(&rxon, &ctx->active, sizeof(rxon));
1133 1121
1134 priv->ucode_loaded = false; 1122 priv->ucode_loaded = false;
1135 iwl_trans_stop_device(trans(priv)); 1123 iwl_trans_stop_device(priv->trans);
1136 1124
1137 priv->wowlan = true; 1125 priv->wowlan = true;
1138 1126
@@ -1154,7 +1142,7 @@ int iwlagn_suspend(struct iwl_priv *priv, struct cfg80211_wowlan *wowlan)
1154 if (ret) 1142 if (ret)
1155 goto out; 1143 goto out;
1156 1144
1157 if (!iwlagn_mod_params.sw_crypto) { 1145 if (!iwlwifi_mod_params.sw_crypto) {
1158 /* mark all keys clear */ 1146 /* mark all keys clear */
1159 priv->ucode_key_table = 0; 1147 priv->ucode_key_table = 0;
1160 ctx->key_mapping_keys = 0; 1148 ctx->key_mapping_keys = 0;
@@ -1260,7 +1248,7 @@ int iwl_dvm_send_cmd(struct iwl_priv *priv, struct iwl_host_cmd *cmd)
1260 return -EIO; 1248 return -EIO;
1261 } 1249 }
1262 1250
1263 return iwl_trans_send_cmd(trans(priv), cmd); 1251 return iwl_trans_send_cmd(priv->trans, cmd);
1264} 1252}
1265 1253
1266int iwl_dvm_send_cmd_pdu(struct iwl_priv *priv, u8 id, 1254int iwl_dvm_send_cmd_pdu(struct iwl_priv *priv, u8 id,