Commit 65de7e84 authored by Johannes Berg's avatar Johannes Berg Committed by Wey-Yi Guy
Browse files

iwlwifi: clean up module parameters



For now at least, all module parameters should be
with the core functionality, so move them there,
while at it rename to iwlwifi_mod_params. Also
rename iwl-shared.h to iwl-modparams.h to reflect
the real contents.

Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
Signed-off-by: default avatarWey-Yi Guy <wey-yi.w.guy@intel.com>
parent eb4887b6
Loading
Loading
Loading
Loading
+3 −13
Original line number Diff line number Diff line
@@ -37,6 +37,7 @@
#include "iwl-agn-hw.h"
#include "iwl-agn.h"
#include "iwl-trans.h"
#include "iwl-modparams.h"

int iwlagn_hw_valid_rtc_data_addr(u32 addr)
{
@@ -92,17 +93,6 @@ void iwlagn_temperature(struct iwl_priv *priv)
	iwl_tt_handler(priv);
}

struct iwl_mod_params iwlagn_mod_params = {
	.amsdu_size_8K = 1,
	.restart_fw = 1,
	.plcp_check = true,
	.bt_coex_active = true,
	.power_level = IWL_POWER_INDEX_1,
	.bt_ch_announce = true,
	.auto_agg = true,
	/* the rest are 0 by default */
};

int iwlagn_hwrate_to_mac80211_idx(u32 rate_n_flags, enum ieee80211_band band)
{
	int idx = 0;
@@ -343,7 +333,7 @@ void iwlagn_send_advance_bt_config(struct iwl_priv *priv)
	 * (might be in monitor mode), or the interface is in
	 * IBSS mode (no proper uCode support for coex then).
	 */
	if (!iwlagn_mod_params.bt_coex_active ||
	if (!iwlwifi_mod_params.bt_coex_active ||
	    priv->iw_mode == NL80211_IFTYPE_ADHOC) {
		basic.flags = IWLAGN_BT_FLAG_COEX_MODE_DISABLED;
	} else {
@@ -1152,7 +1142,7 @@ int iwlagn_suspend(struct iwl_priv *priv, struct cfg80211_wowlan *wowlan)
	if (ret)
		goto out;

	if (!iwlagn_mod_params.sw_crypto) {
	if (!iwlwifi_mod_params.sw_crypto) {
		/* mark all keys clear */
		priv->ucode_key_table = 0;
		ctx->key_mapping_keys = 0;
+2 −1
Original line number Diff line number Diff line
@@ -38,6 +38,7 @@
#include "iwl-dev.h"
#include "iwl-agn.h"
#include "iwl-op-mode.h"
#include "iwl-modparams.h"

#define RS_NAME "iwl-agn-rs"

@@ -419,7 +420,7 @@ static int rs_tl_turn_on_agg_for_tid(struct iwl_priv *priv,

	load = rs_tl_get_load(lq_data, tid);

	if ((iwlagn_mod_params.auto_agg) || (load > IWL_AGG_LOAD_THRESHOLD)) {
	if ((iwlwifi_mod_params.auto_agg) || (load > IWL_AGG_LOAD_THRESHOLD)) {
		IWL_DEBUG_HT(priv, "Starting Tx agg: STA: %pM tid: %d\n",
				sta->addr, tid);
		ret = ieee80211_start_tx_ba_session(sta, tid, 5000);
+3 −2
Original line number Diff line number Diff line
@@ -37,6 +37,7 @@
#include "iwl-io.h"
#include "iwl-agn-calib.h"
#include "iwl-agn.h"
#include "iwl-modparams.h"

#define IWL_CMD_ENTRY(x) [x] = #x

@@ -337,7 +338,7 @@ static void iwlagn_recover_from_statistics(struct iwl_priv *priv,
	if (msecs < 99)
		return;

	if (iwlagn_mod_params.plcp_check &&
	if (iwlwifi_mod_params.plcp_check &&
	    !iwlagn_good_plcp_health(priv, cur_ofdm, cur_ofdm_ht, msecs))
		iwl_force_rf_reset(priv, false);
}
@@ -747,7 +748,7 @@ static void iwlagn_pass_packet_to_mac80211(struct iwl_priv *priv,
	}

	/* In case of HW accelerated crypto and bad decryption, drop */
	if (!iwlagn_mod_params.sw_crypto &&
	if (!iwlwifi_mod_params.sw_crypto &&
	    iwlagn_set_decrypted_flag(priv, hdr, ampdu_status, stats))
		return;

+2 −1
Original line number Diff line number Diff line
@@ -29,6 +29,7 @@
#include "iwl-agn.h"
#include "iwl-agn-calib.h"
#include "iwl-trans.h"
#include "iwl-modparams.h"

/*
 * initialize rxon structure with default values from eeprom
@@ -1129,7 +1130,7 @@ int iwlagn_commit_rxon(struct iwl_priv *priv, struct iwl_rxon_context *ctx)
		return 0;
	}

	iwl_set_rxon_hwcrypto(priv, ctx, !iwlagn_mod_params.sw_crypto);
	iwl_set_rxon_hwcrypto(priv, ctx, !iwlwifi_mod_params.sw_crypto);

	IWL_DEBUG_INFO(priv,
		       "Going to commit RXON\n"
+1 −0
Original line number Diff line number Diff line
@@ -41,6 +41,7 @@
#include "iwl-commands.h"
#include "iwl-debug.h"
#include "iwl-agn-tt.h"
#include "iwl-modparams.h"

/* default Thermal Throttling transaction table
 * Current state   |         Throttling Down               |  Throttling Up
Loading