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

Commit 41bfce8e authored by John W. Linville's avatar John W. Linville
Browse files
parents 805a3b81 51892dbb
Loading
Loading
Loading
Loading
+10 −1
Original line number Diff line number Diff line
@@ -72,6 +72,11 @@ static int modparam_all_channels;
module_param_named(all_channels, modparam_all_channels, bool, S_IRUGO);
MODULE_PARM_DESC(all_channels, "Expose all channels the device can use.");

static int modparam_fastchanswitch;
module_param_named(fastchanswitch, modparam_fastchanswitch, bool, S_IRUGO);
MODULE_PARM_DESC(fastchanswitch, "Enable fast channel switching for AR2413/AR5413 radios.");


/* Module info */
MODULE_AUTHOR("Jiri Slaby");
MODULE_AUTHOR("Nick Kossifidis");
@@ -2686,6 +2691,7 @@ ath5k_reset(struct ath5k_softc *sc, struct ieee80211_channel *chan,
	struct ath5k_hw *ah = sc->ah;
	struct ath_common *common = ath5k_hw_common(ah);
	int ret, ani_mode;
	bool fast;

	ATH5K_DBG(sc, ATH5K_DEBUG_RESET, "resetting\n");

@@ -2705,7 +2711,10 @@ ath5k_reset(struct ath5k_softc *sc, struct ieee80211_channel *chan,
	ath5k_drain_tx_buffs(sc);
	if (chan)
		sc->curchan = chan;
	ret = ath5k_hw_reset(ah, sc->opmode, sc->curchan, chan != NULL,

	fast = ((chan != NULL) && modparam_fastchanswitch) ? 1 : 0;

	ret = ath5k_hw_reset(ah, sc->opmode, sc->curchan, fast,
								skip_pcu);
	if (ret) {
		ATH5K_ERR(sc, "can't reset hardware (%d)\n", ret);
+4 −1
Original line number Diff line number Diff line
@@ -1124,9 +1124,12 @@ int ath5k_hw_reset(struct ath5k_hw *ah, enum nl80211_iftype op_mode,
			/* Non fatal, can happen eg.
			 * on mode change */
			ret = 0;
		} else
		} else {
			ATH5K_DBG(ah->ah_sc, ATH5K_DEBUG_RESET,
				"fast chan change successful\n");
			return 0;
		}
	}

	/*
	 * Save some registers before a reset
+8 −2
Original line number Diff line number Diff line
@@ -4645,10 +4645,16 @@ static void ar9003_hw_set_power_per_rate_table(struct ath_hw *ah,
	case 1:
		break;
	case 2:
		if (scaledPower > REDUCE_SCALED_POWER_BY_TWO_CHAIN)
			scaledPower -= REDUCE_SCALED_POWER_BY_TWO_CHAIN;
		else
			scaledPower = 0;
		break;
	case 3:
		if (scaledPower > REDUCE_SCALED_POWER_BY_THREE_CHAIN)
			scaledPower -= REDUCE_SCALED_POWER_BY_THREE_CHAIN;
		else
			scaledPower = 0;
		break;
	}

+8 −2
Original line number Diff line number Diff line
@@ -524,10 +524,16 @@ static void ath9k_hw_set_ar9287_power_per_rate_table(struct ath_hw *ah,
	case 1:
		break;
	case 2:
		if (scaledPower > REDUCE_SCALED_POWER_BY_TWO_CHAIN)
			scaledPower -= REDUCE_SCALED_POWER_BY_TWO_CHAIN;
		else
			scaledPower = 0;
		break;
	case 3:
		if (scaledPower > REDUCE_SCALED_POWER_BY_THREE_CHAIN)
			scaledPower -= REDUCE_SCALED_POWER_BY_THREE_CHAIN;
		else
			scaledPower = 0;
		break;
	}
	scaledPower = max((u16)0, scaledPower);
+3 −2
Original line number Diff line number Diff line
@@ -1235,7 +1235,7 @@ static int iwl4965_commit_rxon(struct iwl_priv *priv, struct iwl_rxon_context *c

		memcpy(active_rxon, &ctx->staging, sizeof(*active_rxon));
		iwl_legacy_print_rx_config_cmd(priv, ctx);
		return 0;
		goto set_tx_power;
	}

	/* If we are currently associated and the new config requires
@@ -1315,6 +1315,7 @@ static int iwl4965_commit_rxon(struct iwl_priv *priv, struct iwl_rxon_context *c

	iwl4965_init_sensitivity(priv);

set_tx_power:
	/* If we issue a new RXON command which required a tune then we must
	 * send a new TXPOWER command or we won't be able to Tx any frames */
	ret = iwl_legacy_set_tx_power(priv, priv->tx_power_next, true);
@@ -1541,7 +1542,7 @@ static void iwl4965_temperature_calib(struct iwl_priv *priv)
	s32 temp;

	temp = iwl4965_hw_get_temperature(priv);
	if (temp < 0)
	if (IWL_TX_POWER_TEMPERATURE_OUT_OF_RANGE(temp))
		return;

	if (priv->temperature != temp) {
Loading