Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 2152268f authored by Emmanuel Grumbach's avatar Emmanuel Grumbach Committed by Wey-Yi Guy
Browse files

iwlwifi: op_mode holds its pointer to the config



Instead of using the shared area that we be killed.

Signed-off-by: default avatarEmmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: default avatarWey-Yi Guy <wey-yi.w.guy@intel.com>
parent 68e8dfda
Loading
Loading
Loading
Loading
+4 −4
Original line number Diff line number Diff line
@@ -521,7 +521,7 @@ static int iwl_enhance_sensitivity_write(struct iwl_priv *priv)

	iwl_prepare_legacy_sensitivity_tbl(priv, data, &cmd.enhance_table[0]);

	if (cfg(priv)->base_params->hd_v2) {
	if (priv->cfg->base_params->hd_v2) {
		cmd.enhance_table[HD_INA_NON_SQUARE_DET_OFDM_INDEX] =
			HD_INA_NON_SQUARE_DET_OFDM_DATA_V2;
		cmd.enhance_table[HD_INA_NON_SQUARE_DET_CCK_INDEX] =
@@ -895,7 +895,7 @@ static void iwlagn_gain_computation(struct iwl_priv *priv,
			continue;
		}

		delta_g = (cfg(priv)->base_params->chain_noise_scale *
		delta_g = (priv->cfg->base_params->chain_noise_scale *
			((s32)average_noise[default_chain] -
			(s32)average_noise[i])) / 1500;

@@ -1051,8 +1051,8 @@ void iwl_chain_noise_calibration(struct iwl_priv *priv)
		return;

	/* Analyze signal for disconnected antenna */
	if (cfg(priv)->bt_params &&
	    cfg(priv)->bt_params->advanced_bt_coexist) {
	if (priv->cfg->bt_params &&
	    priv->cfg->bt_params->advanced_bt_coexist) {
		/* Disable disconnected antenna algorithm for advanced
		   bt coex, assuming valid antennas are connected */
		data->active_chains = priv->hw_params.valid_rx_ant;
+4 −4
Original line number Diff line number Diff line
@@ -175,7 +175,7 @@ static void iwl1000_hw_set_hw_params(struct iwl_priv *priv)

	priv->hw_params.tx_chains_num =
		num_of_ant(priv->hw_params.valid_tx_ant);
	if (cfg(priv)->rx_with_siso_diversity)
	if (priv->cfg->rx_with_siso_diversity)
		priv->hw_params.rx_chains_num = 1;
	else
		priv->hw_params.rx_chains_num =
@@ -256,7 +256,7 @@ static void iwl2000_hw_set_hw_params(struct iwl_priv *priv)

	priv->hw_params.tx_chains_num =
		num_of_ant(priv->hw_params.valid_tx_ant);
	if (cfg(priv)->rx_with_siso_diversity)
	if (priv->cfg->rx_with_siso_diversity)
		priv->hw_params.rx_chains_num = 1;
	else
		priv->hw_params.rx_chains_num =
@@ -573,7 +573,7 @@ static void iwl6000_nic_config(struct iwl_priv *priv)
{
	iwl_rf_config(priv);

	switch (cfg(priv)->device_family) {
	switch (priv->cfg->device_family) {
	case IWL_DEVICE_FAMILY_6005:
	case IWL_DEVICE_FAMILY_6030:
	case IWL_DEVICE_FAMILY_6000:
@@ -633,7 +633,7 @@ static void iwl6000_hw_set_hw_params(struct iwl_priv *priv)

	priv->hw_params.tx_chains_num =
		num_of_ant(priv->hw_params.valid_tx_ant);
	if (cfg(priv)->rx_with_siso_diversity)
	if (priv->cfg->rx_with_siso_diversity)
		priv->hw_params.rx_chains_num = 1;
	else
		priv->hw_params.rx_chains_num =
+9 −9
Original line number Diff line number Diff line
@@ -312,21 +312,21 @@ void iwlagn_send_advance_bt_config(struct iwl_priv *priv)
	BUILD_BUG_ON(sizeof(iwlagn_def_3w_lookup) !=
			sizeof(basic.bt3_lookup_table));

	if (cfg(priv)->bt_params) {
	if (priv->cfg->bt_params) {
		/*
		 * newer generation of devices (2000 series and newer)
		 * use the version 2 of the bt command
		 * we need to make sure sending the host command
		 * with correct data structure to avoid uCode assert
		 */
		if (cfg(priv)->bt_params->bt_session_2) {
		if (priv->cfg->bt_params->bt_session_2) {
			bt_cmd_v2.prio_boost = cpu_to_le32(
				cfg(priv)->bt_params->bt_prio_boost);
				priv->cfg->bt_params->bt_prio_boost);
			bt_cmd_v2.tx_prio_boost = 0;
			bt_cmd_v2.rx_prio_boost = 0;
		} else {
			bt_cmd_v1.prio_boost =
				cfg(priv)->bt_params->bt_prio_boost;
				priv->cfg->bt_params->bt_prio_boost;
			bt_cmd_v1.tx_prio_boost = 0;
			bt_cmd_v1.rx_prio_boost = 0;
		}
@@ -374,7 +374,7 @@ void iwlagn_send_advance_bt_config(struct iwl_priv *priv)
		       priv->bt_full_concurrent ?
		       "full concurrency" : "3-wire");

	if (cfg(priv)->bt_params->bt_session_2) {
	if (priv->cfg->bt_params->bt_session_2) {
		memcpy(&bt_cmd_v2.basic, &basic,
			sizeof(basic));
		ret = iwl_dvm_send_cmd_pdu(priv, REPLY_BT_CONFIG,
@@ -740,8 +740,8 @@ static bool is_single_rx_stream(struct iwl_priv *priv)
 */
static int iwl_get_active_rx_chain_count(struct iwl_priv *priv)
{
	if (cfg(priv)->bt_params &&
	    cfg(priv)->bt_params->advanced_bt_coexist &&
	if (priv->cfg->bt_params &&
	    priv->cfg->bt_params->advanced_bt_coexist &&
	    (priv->bt_full_concurrent ||
	     priv->bt_traffic_load >= IWL_BT_COEX_TRAFFIC_LOAD_HIGH)) {
		/*
@@ -812,8 +812,8 @@ void iwlagn_set_rxon_chain(struct iwl_priv *priv, struct iwl_rxon_context *ctx)
	else
		active_chains = priv->hw_params.valid_rx_ant;

	if (cfg(priv)->bt_params &&
	    cfg(priv)->bt_params->advanced_bt_coexist &&
	if (priv->cfg->bt_params &&
	    priv->cfg->bt_params->advanced_bt_coexist &&
	    (priv->bt_full_concurrent ||
	     priv->bt_traffic_load >= IWL_BT_COEX_TRAFFIC_LOAD_HIGH)) {
		/*
+4 −4
Original line number Diff line number Diff line
@@ -1085,7 +1085,7 @@ static void rs_tx_status(void *priv_r, struct ieee80211_supported_band *sband,
	    (priv->tm_fixed_rate != lq_sta->dbg_fixed_rate))
		rs_program_fix_rate(priv, lq_sta);
#endif
	if (cfg(priv)->bt_params && cfg(priv)->bt_params->advanced_bt_coexist)
	if (priv->cfg->bt_params && priv->cfg->bt_params->advanced_bt_coexist)
		rs_bt_update_lq(priv, ctx, lq_sta);
}

@@ -3063,11 +3063,11 @@ static void rs_fill_link_cmd(struct iwl_priv *priv,
	 * overwrite if needed, pass aggregation time limit
	 * to uCode in uSec
	 */
	if (priv && cfg(priv)->bt_params &&
	    cfg(priv)->bt_params->agg_time_limit &&
	if (priv && priv->cfg->bt_params &&
	    priv->cfg->bt_params->agg_time_limit &&
	    priv->bt_traffic_load >= IWL_BT_COEX_TRAFFIC_LOAD_HIGH)
		lq_cmd->agg_params.agg_time_limit =
			cpu_to_le16(cfg(priv)->bt_params->agg_time_limit);
			cpu_to_le16(priv->cfg->bt_params->agg_time_limit);
}

static void *rs_alloc(struct ieee80211_hw *hw, struct dentry *debugfsdir)
+1 −1
Original line number Diff line number Diff line
@@ -1105,7 +1105,7 @@ void iwl_setup_rx_handlers(struct iwl_priv *priv)
	iwl_notification_wait_init(&priv->notif_wait);

	/* Set up BT Rx handlers */
	if (cfg(priv)->bt_params)
	if (priv->cfg->bt_params)
		iwlagn_bt_rx_handler_setup(priv);
}

Loading