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

Commit b9ad70da authored by Johannes Berg's avatar Johannes Berg Committed by John W. Linville
Browse files

iwlwifi: put use_rts_for_aggregation into hw_params



The hardware config ht_params shouldn't be modified,
so copy the use_rts_for_aggregation parameter into
hw_params and use/modify it there.

Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
Signed-off-by: default avatarWey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent e7a09438
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -436,8 +436,7 @@ int iwlagn_commit_rxon(struct iwl_priv *priv, struct iwl_rxon_context *ctx)
	 * force CTS-to-self frames protection if RTS-CTS is not preferred
	 * one aggregation protection method
	 */
	if (!(cfg(priv)->ht_params &&
	      cfg(priv)->ht_params->use_rts_for_aggregation))
	if (!hw_params(priv).use_rts_for_aggregation)
		ctx->staging.flags |= RXON_FLG_SELF_CTS_EN;

	if ((ctx->vif && ctx->vif->bss_conf.use_short_slot) ||
+1 −2
Original line number Diff line number Diff line
@@ -594,8 +594,7 @@ int iwlagn_tx_agg_oper(struct iwl_priv *priv, struct ieee80211_vif *vif,
	sta_priv->max_agg_bufsize =
		min(sta_priv->max_agg_bufsize, buf_size);

	if (cfg(priv)->ht_params &&
	    cfg(priv)->ht_params->use_rts_for_aggregation) {
	if (hw_params(priv).use_rts_for_aggregation) {
		/*
		 * switch to RTS/CTS if it is the prefer protection
		 * method for HT traffic
+4 −0
Original line number Diff line number Diff line
@@ -1119,6 +1119,10 @@ static void iwl_uninit_drv(struct iwl_priv *priv)

static void iwl_set_hw_params(struct iwl_priv *priv)
{
	if (cfg(priv)->ht_params)
		hw_params(priv).use_rts_for_aggregation =
			cfg(priv)->ht_params->use_rts_for_aggregation;

	if (iwlagn_mod_params.amsdu_size_8K)
		hw_params(priv).rx_page_order =
			get_order(IWL_RX_BUF_SIZE_8K);
+3 −3
Original line number Diff line number Diff line
@@ -2431,7 +2431,7 @@ static ssize_t iwl_dbgfs_protection_mode_read(struct file *file,
	if (cfg(priv)->ht_params)
		pos += scnprintf(buf + pos, bufsz - pos,
			 "use %s for aggregation\n",
			 (cfg(priv)->ht_params->use_rts_for_aggregation) ?
			 (hw_params(priv).use_rts_for_aggregation) ?
				"rts/cts" : "cts-to-self");
	else
		pos += scnprintf(buf + pos, bufsz - pos, "N/A");
@@ -2458,9 +2458,9 @@ static ssize_t iwl_dbgfs_protection_mode_write(struct file *file,
	if (sscanf(buf, "%d", &rts) != 1)
		return -EINVAL;
	if (rts)
		cfg(priv)->ht_params->use_rts_for_aggregation = true;
		hw_params(priv).use_rts_for_aggregation = true;
	else
		cfg(priv)->ht_params->use_rts_for_aggregation = false;
		hw_params(priv).use_rts_for_aggregation = false;
	return count;
}

+2 −2
Original line number Diff line number Diff line
@@ -660,8 +660,8 @@ static int iwlagn_mac_ampdu_action(struct ieee80211_hw *hw,
			IWL_DEBUG_HT(priv, "priv->agg_tids_count = %u\n",
				     priv->agg_tids_count);
		}
		if (!priv->agg_tids_count && cfg(priv)->ht_params &&
		    cfg(priv)->ht_params->use_rts_for_aggregation) {
		if (!priv->agg_tids_count &&
		    hw_params(priv).use_rts_for_aggregation) {
			/*
			 * switch off RTS/CTS if it was previously enabled
			 */
Loading