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

Commit 0ff2b5c0 authored by Sujith Manoharan's avatar Sujith Manoharan Committed by John W. Linville
Browse files

ath9k: Fix warnings from -Wunused-but-set-variable

parent 3c35c84a
Loading
Loading
Loading
Loading
+0 −6
Original line number Original line Diff line number Diff line
@@ -899,12 +899,6 @@ void ath9k_hw_ani_init(struct ath_hw *ah)
	 * check here default level should not modify INI setting.
	 * check here default level should not modify INI setting.
	 */
	 */
	if (use_new_ani(ah)) {
	if (use_new_ani(ah)) {
		const struct ani_ofdm_level_entry *entry_ofdm;
		const struct ani_cck_level_entry *entry_cck;

		entry_ofdm = &ofdm_level_table[ATH9K_ANI_OFDM_DEF_LEVEL];
		entry_cck = &cck_level_table[ATH9K_ANI_CCK_DEF_LEVEL];

		ah->aniperiod = ATH9K_ANI_PERIOD_NEW;
		ah->aniperiod = ATH9K_ANI_PERIOD_NEW;
		ah->config.ani_poll_interval = ATH9K_ANI_POLLINTERVAL_NEW;
		ah->config.ani_poll_interval = ATH9K_ANI_POLLINTERVAL_NEW;
	} else {
	} else {
+0 −2
Original line number Original line Diff line number Diff line
@@ -3217,7 +3217,6 @@ static int ar9300_compress_decision(struct ath_hw *ah,
				    u8 *word, int length, int mdata_size)
				    u8 *word, int length, int mdata_size)
{
{
	struct ath_common *common = ath9k_hw_common(ah);
	struct ath_common *common = ath9k_hw_common(ah);
	u8 *dptr;
	const struct ar9300_eeprom *eep = NULL;
	const struct ar9300_eeprom *eep = NULL;


	switch (code) {
	switch (code) {
@@ -3235,7 +3234,6 @@ static int ar9300_compress_decision(struct ath_hw *ah,
		break;
		break;
	case _CompressBlock:
	case _CompressBlock:
		if (reference == 0) {
		if (reference == 0) {
			dptr = mptr;
		} else {
		} else {
			eep = ar9003_eeprom_struct_find_by_id(reference);
			eep = ar9003_eeprom_struct_find_by_id(reference);
			if (eep == NULL) {
			if (eep == NULL) {
+1 −5
Original line number Original line Diff line number Diff line
@@ -616,29 +616,25 @@ static int ar9003_hw_process_ini(struct ath_hw *ah,
	struct ath_regulatory *regulatory = ath9k_hw_regulatory(ah);
	struct ath_regulatory *regulatory = ath9k_hw_regulatory(ah);
	unsigned int regWrites = 0, i;
	unsigned int regWrites = 0, i;
	struct ieee80211_channel *channel = chan->chan;
	struct ieee80211_channel *channel = chan->chan;
	u32 modesIndex, freqIndex;
	u32 modesIndex;


	switch (chan->chanmode) {
	switch (chan->chanmode) {
	case CHANNEL_A:
	case CHANNEL_A:
	case CHANNEL_A_HT20:
	case CHANNEL_A_HT20:
		modesIndex = 1;
		modesIndex = 1;
		freqIndex = 1;
		break;
		break;
	case CHANNEL_A_HT40PLUS:
	case CHANNEL_A_HT40PLUS:
	case CHANNEL_A_HT40MINUS:
	case CHANNEL_A_HT40MINUS:
		modesIndex = 2;
		modesIndex = 2;
		freqIndex = 1;
		break;
		break;
	case CHANNEL_G:
	case CHANNEL_G:
	case CHANNEL_G_HT20:
	case CHANNEL_G_HT20:
	case CHANNEL_B:
	case CHANNEL_B:
		modesIndex = 4;
		modesIndex = 4;
		freqIndex = 2;
		break;
		break;
	case CHANNEL_G_HT40PLUS:
	case CHANNEL_G_HT40PLUS:
	case CHANNEL_G_HT40MINUS:
	case CHANNEL_G_HT40MINUS:
		modesIndex = 3;
		modesIndex = 3;
		freqIndex = 2;
		break;
		break;


	default:
	default:
+1 −2
Original line number Original line Diff line number Diff line
@@ -319,10 +319,9 @@ static void ath9k_hw_set_ar9287_power_cal_table(struct ath_hw *ah,
	u16 numXpdGain, xpdMask;
	u16 numXpdGain, xpdMask;
	u16 xpdGainValues[AR5416_NUM_PD_GAINS] = {0, 0, 0, 0};
	u16 xpdGainValues[AR5416_NUM_PD_GAINS] = {0, 0, 0, 0};
	u32 reg32, regOffset, regChainOffset, regval;
	u32 reg32, regOffset, regChainOffset, regval;
	int16_t modalIdx, diff = 0;
	int16_t diff = 0;
	struct ar9287_eeprom *pEepData = &ah->eeprom.map9287;
	struct ar9287_eeprom *pEepData = &ah->eeprom.map9287;


	modalIdx = IS_CHAN_2GHZ(chan) ? 1 : 0;
	xpdMask = pEepData->modalHeader.xpdGain;
	xpdMask = pEepData->modalHeader.xpdGain;


	if ((pEepData->baseEepHeader.version & AR9287_EEP_VER_MINOR_MASK) >=
	if ((pEepData->baseEepHeader.version & AR9287_EEP_VER_MINOR_MASK) >=
+3 −3
Original line number Original line Diff line number Diff line
@@ -74,7 +74,7 @@ static void ath9k_htc_beacon_config_sta(struct ath9k_htc_priv *priv,
	__be32 htc_imask = 0;
	__be32 htc_imask = 0;
	u64 tsf;
	u64 tsf;
	int num_beacons, offset, dtim_dec_count, cfp_dec_count;
	int num_beacons, offset, dtim_dec_count, cfp_dec_count;
	int ret;
	int ret __attribute__ ((unused));
	u8 cmd_rsp;
	u8 cmd_rsp;


	memset(&bs, 0, sizeof(bs));
	memset(&bs, 0, sizeof(bs));
@@ -190,7 +190,7 @@ static void ath9k_htc_beacon_config_ap(struct ath9k_htc_priv *priv,
	enum ath9k_int imask = 0;
	enum ath9k_int imask = 0;
	u32 nexttbtt, intval, tsftu;
	u32 nexttbtt, intval, tsftu;
	__be32 htc_imask = 0;
	__be32 htc_imask = 0;
	int ret;
	int ret __attribute__ ((unused));
	u8 cmd_rsp;
	u8 cmd_rsp;
	u64 tsf;
	u64 tsf;


@@ -246,7 +246,7 @@ static void ath9k_htc_beacon_config_adhoc(struct ath9k_htc_priv *priv,
	enum ath9k_int imask = 0;
	enum ath9k_int imask = 0;
	u32 nexttbtt, intval, tsftu;
	u32 nexttbtt, intval, tsftu;
	__be32 htc_imask = 0;
	__be32 htc_imask = 0;
	int ret;
	int ret __attribute__ ((unused));
	u8 cmd_rsp;
	u8 cmd_rsp;
	u64 tsf;
	u64 tsf;


Loading