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

Commit a2064b7a authored by Wey-Yi Guy's avatar Wey-Yi Guy Committed by Reinette Chatre
Browse files

iwlwifi: move _agn statistics related structure



agn and 3945 has different statistics_notif data structure; since 3945
has it statistics_notif data structure inside the _3945 portion of
iwl_priv, it make sense to move the agn statistics_notif into _agn portion.

Signed-off-by: default avatarWey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: default avatarReinette Chatre <reinette.chatre@intel.com>
parent 0af8bcae
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -1542,7 +1542,7 @@ static int iwl4965_hw_get_temperature(struct iwl_priv *priv)
	u32 R4;

	if (test_bit(STATUS_TEMPERATURE, &priv->status) &&
		(priv->statistics.flag & STATISTICS_REPLY_FLG_HT40_MODE_MSK)) {
		(priv->_agn.statistics.flag & STATISTICS_REPLY_FLG_HT40_MODE_MSK)) {
		IWL_DEBUG_TEMP(priv, "Running HT40 temperature calibration\n");
		R1 = (s32)le32_to_cpu(priv->card_alive_init.therm_r1[1]);
		R2 = (s32)le32_to_cpu(priv->card_alive_init.therm_r2[1]);
@@ -1567,7 +1567,7 @@ static int iwl4965_hw_get_temperature(struct iwl_priv *priv)
		vt = sign_extend(R4, 23);
	else
		vt = sign_extend(
			le32_to_cpu(priv->statistics.general.temperature), 23);
			le32_to_cpu(priv->_agn.statistics.general.temperature), 23);

	IWL_DEBUG_TEMP(priv, "Calib values R[1-3]: %d %d %d R4: %d\n", R1, R2, R3, vt);

+1 −1
Original line number Diff line number Diff line
@@ -260,7 +260,7 @@ static void iwl5150_temperature(struct iwl_priv *priv)
	u32 vt = 0;
	s32 offset =  iwl_temp_calib_to_offset(priv);

	vt = le32_to_cpu(priv->statistics.general.temperature);
	vt = le32_to_cpu(priv->_agn.statistics.general.temperature);
	vt = vt / IWL_5150_VOLTAGE_TO_TEMPERATURE_COEFF + offset;
	/* now vt hold the temperature in Kelvin */
	priv->temperature = KELVIN_TO_CELSIUS(vt);
+32 −32
Original line number Diff line number Diff line
@@ -58,22 +58,22 @@ ssize_t iwl_ucode_rx_stats_read(struct file *file, char __user *user_buf,
	 * the last statistics notification from uCode
	 * might not reflect the current uCode activity
	 */
	ofdm = &priv->statistics.rx.ofdm;
	cck = &priv->statistics.rx.cck;
	general = &priv->statistics.rx.general;
	ht = &priv->statistics.rx.ofdm_ht;
	accum_ofdm = &priv->accum_statistics.rx.ofdm;
	accum_cck = &priv->accum_statistics.rx.cck;
	accum_general = &priv->accum_statistics.rx.general;
	accum_ht = &priv->accum_statistics.rx.ofdm_ht;
	delta_ofdm = &priv->delta_statistics.rx.ofdm;
	delta_cck = &priv->delta_statistics.rx.cck;
	delta_general = &priv->delta_statistics.rx.general;
	delta_ht = &priv->delta_statistics.rx.ofdm_ht;
	max_ofdm = &priv->max_delta.rx.ofdm;
	max_cck = &priv->max_delta.rx.cck;
	max_general = &priv->max_delta.rx.general;
	max_ht = &priv->max_delta.rx.ofdm_ht;
	ofdm = &priv->_agn.statistics.rx.ofdm;
	cck = &priv->_agn.statistics.rx.cck;
	general = &priv->_agn.statistics.rx.general;
	ht = &priv->_agn.statistics.rx.ofdm_ht;
	accum_ofdm = &priv->_agn.accum_statistics.rx.ofdm;
	accum_cck = &priv->_agn.accum_statistics.rx.cck;
	accum_general = &priv->_agn.accum_statistics.rx.general;
	accum_ht = &priv->_agn.accum_statistics.rx.ofdm_ht;
	delta_ofdm = &priv->_agn.delta_statistics.rx.ofdm;
	delta_cck = &priv->_agn.delta_statistics.rx.cck;
	delta_general = &priv->_agn.delta_statistics.rx.general;
	delta_ht = &priv->_agn.delta_statistics.rx.ofdm_ht;
	max_ofdm = &priv->_agn.max_delta.rx.ofdm;
	max_cck = &priv->_agn.max_delta.rx.cck;
	max_general = &priv->_agn.max_delta.rx.general;
	max_ht = &priv->_agn.max_delta.rx.ofdm_ht;

	pos += iwl_dbgfs_statistics_flag(priv, buf, bufsz);
	pos += scnprintf(buf + pos, bufsz - pos, "%-32s     current"
@@ -539,10 +539,10 @@ ssize_t iwl_ucode_tx_stats_read(struct file *file,
	  * the last statistics notification from uCode
	  * might not reflect the current uCode activity
	  */
	tx = &priv->statistics.tx;
	accum_tx = &priv->accum_statistics.tx;
	delta_tx = &priv->delta_statistics.tx;
	max_tx = &priv->max_delta.tx;
	tx = &priv->_agn.statistics.tx;
	accum_tx = &priv->_agn.accum_statistics.tx;
	delta_tx = &priv->_agn.delta_statistics.tx;
	max_tx = &priv->_agn.max_delta.tx;
	pos += iwl_dbgfs_statistics_flag(priv, buf, bufsz);
	pos += scnprintf(buf + pos, bufsz - pos,  "%-32s     current"
			 "acumulative       delta         max\n",
@@ -756,18 +756,18 @@ ssize_t iwl_ucode_general_stats_read(struct file *file, char __user *user_buf,
	  * the last statistics notification from uCode
	  * might not reflect the current uCode activity
	  */
	general = &priv->statistics.general;
	dbg = &priv->statistics.general.dbg;
	div = &priv->statistics.general.div;
	accum_general = &priv->accum_statistics.general;
	delta_general = &priv->delta_statistics.general;
	max_general = &priv->max_delta.general;
	accum_dbg = &priv->accum_statistics.general.dbg;
	delta_dbg = &priv->delta_statistics.general.dbg;
	max_dbg = &priv->max_delta.general.dbg;
	accum_div = &priv->accum_statistics.general.div;
	delta_div = &priv->delta_statistics.general.div;
	max_div = &priv->max_delta.general.div;
	general = &priv->_agn.statistics.general;
	dbg = &priv->_agn.statistics.general.dbg;
	div = &priv->_agn.statistics.general.div;
	accum_general = &priv->_agn.accum_statistics.general;
	delta_general = &priv->_agn.delta_statistics.general;
	max_general = &priv->_agn.max_delta.general;
	accum_dbg = &priv->_agn.accum_statistics.general.dbg;
	delta_dbg = &priv->_agn.delta_statistics.general.dbg;
	max_dbg = &priv->_agn.max_delta.general.dbg;
	accum_div = &priv->_agn.accum_statistics.general.div;
	delta_div = &priv->_agn.delta_statistics.general.div;
	max_div = &priv->_agn.max_delta.general.div;
	pos += iwl_dbgfs_statistics_flag(priv, buf, bufsz);
	pos += scnprintf(buf + pos, bufsz - pos, "%-32s     current"
			 "acumulative       delta         max\n",
+2 −1
Original line number Diff line number Diff line
@@ -319,7 +319,8 @@ int iwlagn_send_tx_power(struct iwl_priv *priv)
void iwlagn_temperature(struct iwl_priv *priv)
{
	/* store temperature from statistics (in Celsius) */
	priv->temperature = le32_to_cpu(priv->statistics.general.temperature);
	priv->temperature =
		le32_to_cpu(priv->_agn.statistics.general.temperature);
	iwl_tt_handler(priv);
}

+7 −7
Original line number Diff line number Diff line
@@ -1449,13 +1449,13 @@ bool iwl_good_ack_health(struct iwl_priv *priv,

	actual_ack_cnt_delta =
		le32_to_cpu(pkt->u.stats.tx.actual_ack_cnt) -
		le32_to_cpu(priv->statistics.tx.actual_ack_cnt);
		le32_to_cpu(priv->_agn.statistics.tx.actual_ack_cnt);
	expected_ack_cnt_delta =
		le32_to_cpu(pkt->u.stats.tx.expected_ack_cnt) -
		le32_to_cpu(priv->statistics.tx.expected_ack_cnt);
		le32_to_cpu(priv->_agn.statistics.tx.expected_ack_cnt);
	ba_timeout_delta =
		le32_to_cpu(pkt->u.stats.tx.agg.ba_timeout) -
		le32_to_cpu(priv->statistics.tx.agg.ba_timeout);
		le32_to_cpu(priv->_agn.statistics.tx.agg.ba_timeout);
	if ((priv->_agn.agg_tids_count > 0) &&
	    (expected_ack_cnt_delta > 0) &&
	    (((actual_ack_cnt_delta * 100) / expected_ack_cnt_delta)
@@ -1467,10 +1467,10 @@ bool iwl_good_ack_health(struct iwl_priv *priv,

#ifdef CONFIG_IWLWIFI_DEBUG
		IWL_DEBUG_RADIO(priv, "rx_detected_cnt delta = %d\n",
				priv->delta_statistics.tx.rx_detected_cnt);
				priv->_agn.delta_statistics.tx.rx_detected_cnt);
		IWL_DEBUG_RADIO(priv,
				"ack_or_ba_timeout_collision delta = %d\n",
				priv->delta_statistics.tx.
				priv->_agn.delta_statistics.tx.
				ack_or_ba_timeout_collision);
#endif
		IWL_DEBUG_RADIO(priv, "agg ba_timeout delta = %d\n",
@@ -2685,9 +2685,9 @@ static void iwl_bg_run_time_calib_work(struct work_struct *work)
	}

	if (priv->start_calib) {
		iwl_chain_noise_calibration(priv, &priv->statistics);
		iwl_chain_noise_calibration(priv, &priv->_agn.statistics);

		iwl_sensitivity_calibration(priv, &priv->statistics);
		iwl_sensitivity_calibration(priv, &priv->_agn.statistics);
	}

	mutex_unlock(&priv->mutex);
Loading