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

Commit 11b0ac2e authored by Benjamin Berg's avatar Benjamin Berg Committed by Kalle Valo
Browse files

ath9k: Remove some #defined constants to decrease verbosity



The removed ATH9K_SLOT_TIME_X constants simply map the value in microseconds
to the same integer. These constants were not used consistently, so fix the
inconsistency issue by replacing all occurances with the integer equivalent.

Signed-off-by: default avatarBenjamin Berg <benjamin.berg@open-mesh.com>
Signed-off-by: default avatarKalle Valo <kvalo@qca.qualcomm.com>
parent 7fde5122
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -50,7 +50,7 @@ static void ath9k_beaconq_config(struct ath_softc *sc)
		txq = sc->tx.txq_map[IEEE80211_AC_BE];
		ath9k_hw_get_txq_props(ah, txq->axq_qnum, &qi_be);
		qi.tqi_aifs = qi_be.tqi_aifs;
		if (ah->slottime == ATH9K_SLOT_TIME_20)
		if (ah->slottime == 20)
			qi.tqi_cwmin = 2*qi_be.tqi_cwmin;
		else
			qi.tqi_cwmin = 4*qi_be.tqi_cwmin;
+2 −2
Original line number Diff line number Diff line
@@ -280,7 +280,7 @@ EXPORT_SYMBOL(ath_dynack_sample_ack_ts);
void ath_dynack_node_init(struct ath_hw *ah, struct ath_node *an)
{
	/* ackto = slottime + sifs + air delay */
	u32 ackto = ATH9K_SLOT_TIME_9 + 16 + 64;
	u32 ackto = 9 + 16 + 64;
	struct ath_dynack *da = &ah->dynack;

	an->ackto = ackto;
@@ -315,7 +315,7 @@ EXPORT_SYMBOL(ath_dynack_node_deinit);
void ath_dynack_reset(struct ath_hw *ah)
{
	/* ackto = slottime + sifs + air delay */
	u32 ackto = ATH9K_SLOT_TIME_9 + 16 + 64;
	u32 ackto = 9 + 16 + 64;
	struct ath_dynack *da = &ah->dynack;

	da->lto = jiffies;
+1 −1
Original line number Diff line number Diff line
@@ -45,7 +45,7 @@ void ath9k_htc_beaconq_config(struct ath9k_htc_priv *priv)
		 * Long slot time  : 2x cwmin
		 * Short slot time : 4x cwmin
		 */
		if (ah->slottime == ATH9K_SLOT_TIME_20)
		if (ah->slottime == 20)
			qi.tqi_cwmin = 2*qi_be.tqi_cwmin;
		else
			qi.tqi_cwmin = 4*qi_be.tqi_cwmin;
+1 −1
Original line number Diff line number Diff line
@@ -678,7 +678,7 @@ static int ath9k_init_priv(struct ath9k_htc_priv *priv,

	for (i = 0; i < ATH9K_HTC_MAX_BCN_VIF; i++)
		priv->beacon.bslot[i] = NULL;
	priv->beacon.slottime = ATH9K_SLOT_TIME_9;
	priv->beacon.slottime = 9;

	ath9k_cmn_init_channels_rates(common);
	ath9k_cmn_init_crypto(ah);
+1 −1
Original line number Diff line number Diff line
@@ -454,7 +454,7 @@ static void ath9k_hw_init_defaults(struct ath_hw *ah)
	if (AR_SREV_9100(ah))
		ah->sta_id1_defaults |= AR_STA_ID1_AR9100_BA_FIX;

	ah->slottime = ATH9K_SLOT_TIME_9;
	ah->slottime = 9;
	ah->globaltxtimeout = (u32) -1;
	ah->power_mode = ATH9K_PM_UNDEFINED;
	ah->htc_reset_init = true;
Loading