aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorSujith Manoharan <Sujith.Manoharan@atheros.com>2011-04-20 01:30:34 -0400
committerJohn W. Linville <linville@tuxdriver.com>2011-04-25 14:50:14 -0400
commit0ff2b5c05d4dd84222a8e163335c5b550e2ca195 (patch)
tree0838c388f191ff550e099101452ed3f4018a6e74 /drivers
parent3c35c84a70fc7d76cf7d975481fcb30468c68818 (diff)
ath9k: Fix warnings from -Wunused-but-set-variable
Signed-off-by: Sujith Manoharan <Sujith.Manoharan@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/wireless/ath/ath9k/ani.c6
-rw-r--r--drivers/net/wireless/ath/ath9k/ar9003_eeprom.c2
-rw-r--r--drivers/net/wireless/ath/ath9k/ar9003_phy.c6
-rw-r--r--drivers/net/wireless/ath/ath9k/eeprom_9287.c3
-rw-r--r--drivers/net/wireless/ath/ath9k/htc_drv_beacon.c6
-rw-r--r--drivers/net/wireless/ath/ath9k/htc_drv_gpio.c4
-rw-r--r--drivers/net/wireless/ath/ath9k/htc_drv_main.c11
-rw-r--r--drivers/net/wireless/ath/ath9k/htc_drv_txrx.c2
-rw-r--r--drivers/net/wireless/ath/ath9k/hw.c4
-rw-r--r--drivers/net/wireless/ath/ath9k/rc.c12
-rw-r--r--drivers/net/wireless/ath/ath9k/recv.c3
11 files changed, 25 insertions, 34 deletions
diff --git a/drivers/net/wireless/ath/ath9k/ani.c b/drivers/net/wireless/ath/ath9k/ani.c
index 2e31c775351f..5a1f4f511bc1 100644
--- a/drivers/net/wireless/ath/ath9k/ani.c
+++ b/drivers/net/wireless/ath/ath9k/ani.c
@@ -899,12 +899,6 @@ void ath9k_hw_ani_init(struct ath_hw *ah)
899 * check here default level should not modify INI setting. 899 * check here default level should not modify INI setting.
900 */ 900 */
901 if (use_new_ani(ah)) { 901 if (use_new_ani(ah)) {
902 const struct ani_ofdm_level_entry *entry_ofdm;
903 const struct ani_cck_level_entry *entry_cck;
904
905 entry_ofdm = &ofdm_level_table[ATH9K_ANI_OFDM_DEF_LEVEL];
906 entry_cck = &cck_level_table[ATH9K_ANI_CCK_DEF_LEVEL];
907
908 ah->aniperiod = ATH9K_ANI_PERIOD_NEW; 902 ah->aniperiod = ATH9K_ANI_PERIOD_NEW;
909 ah->config.ani_poll_interval = ATH9K_ANI_POLLINTERVAL_NEW; 903 ah->config.ani_poll_interval = ATH9K_ANI_POLLINTERVAL_NEW;
910 } else { 904 } else {
diff --git a/drivers/net/wireless/ath/ath9k/ar9003_eeprom.c b/drivers/net/wireless/ath/ath9k/ar9003_eeprom.c
index fd9b8c400f7e..97f970c5e4ec 100644
--- a/drivers/net/wireless/ath/ath9k/ar9003_eeprom.c
+++ b/drivers/net/wireless/ath/ath9k/ar9003_eeprom.c
@@ -3217,7 +3217,6 @@ static int ar9300_compress_decision(struct ath_hw *ah,
3217 u8 *word, int length, int mdata_size) 3217 u8 *word, int length, int mdata_size)
3218{ 3218{
3219 struct ath_common *common = ath9k_hw_common(ah); 3219 struct ath_common *common = ath9k_hw_common(ah);
3220 u8 *dptr;
3221 const struct ar9300_eeprom *eep = NULL; 3220 const struct ar9300_eeprom *eep = NULL;
3222 3221
3223 switch (code) { 3222 switch (code) {
@@ -3235,7 +3234,6 @@ static int ar9300_compress_decision(struct ath_hw *ah,
3235 break; 3234 break;
3236 case _CompressBlock: 3235 case _CompressBlock:
3237 if (reference == 0) { 3236 if (reference == 0) {
3238 dptr = mptr;
3239 } else { 3237 } else {
3240 eep = ar9003_eeprom_struct_find_by_id(reference); 3238 eep = ar9003_eeprom_struct_find_by_id(reference);
3241 if (eep == NULL) { 3239 if (eep == NULL) {
diff --git a/drivers/net/wireless/ath/ath9k/ar9003_phy.c b/drivers/net/wireless/ath/ath9k/ar9003_phy.c
index ea2f60c08f8b..c83be2dd5718 100644
--- a/drivers/net/wireless/ath/ath9k/ar9003_phy.c
+++ b/drivers/net/wireless/ath/ath9k/ar9003_phy.c
@@ -616,29 +616,25 @@ static int ar9003_hw_process_ini(struct ath_hw *ah,
616 struct ath_regulatory *regulatory = ath9k_hw_regulatory(ah); 616 struct ath_regulatory *regulatory = ath9k_hw_regulatory(ah);
617 unsigned int regWrites = 0, i; 617 unsigned int regWrites = 0, i;
618 struct ieee80211_channel *channel = chan->chan; 618 struct ieee80211_channel *channel = chan->chan;
619 u32 modesIndex, freqIndex; 619 u32 modesIndex;
620 620
621 switch (chan->chanmode) { 621 switch (chan->chanmode) {
622 case CHANNEL_A: 622 case CHANNEL_A:
623 case CHANNEL_A_HT20: 623 case CHANNEL_A_HT20:
624 modesIndex = 1; 624 modesIndex = 1;
625 freqIndex = 1;
626 break; 625 break;
627 case CHANNEL_A_HT40PLUS: 626 case CHANNEL_A_HT40PLUS:
628 case CHANNEL_A_HT40MINUS: 627 case CHANNEL_A_HT40MINUS:
629 modesIndex = 2; 628 modesIndex = 2;
630 freqIndex = 1;
631 break; 629 break;
632 case CHANNEL_G: 630 case CHANNEL_G:
633 case CHANNEL_G_HT20: 631 case CHANNEL_G_HT20:
634 case CHANNEL_B: 632 case CHANNEL_B:
635 modesIndex = 4; 633 modesIndex = 4;
636 freqIndex = 2;
637 break; 634 break;
638 case CHANNEL_G_HT40PLUS: 635 case CHANNEL_G_HT40PLUS:
639 case CHANNEL_G_HT40MINUS: 636 case CHANNEL_G_HT40MINUS:
640 modesIndex = 3; 637 modesIndex = 3;
641 freqIndex = 2;
642 break; 638 break;
643 639
644 default: 640 default:
diff --git a/drivers/net/wireless/ath/ath9k/eeprom_9287.c b/drivers/net/wireless/ath/ath9k/eeprom_9287.c
index 13579752a300..b87db4763098 100644
--- a/drivers/net/wireless/ath/ath9k/eeprom_9287.c
+++ b/drivers/net/wireless/ath/ath9k/eeprom_9287.c
@@ -319,10 +319,9 @@ static void ath9k_hw_set_ar9287_power_cal_table(struct ath_hw *ah,
319 u16 numXpdGain, xpdMask; 319 u16 numXpdGain, xpdMask;
320 u16 xpdGainValues[AR5416_NUM_PD_GAINS] = {0, 0, 0, 0}; 320 u16 xpdGainValues[AR5416_NUM_PD_GAINS] = {0, 0, 0, 0};
321 u32 reg32, regOffset, regChainOffset, regval; 321 u32 reg32, regOffset, regChainOffset, regval;
322 int16_t modalIdx, diff = 0; 322 int16_t diff = 0;
323 struct ar9287_eeprom *pEepData = &ah->eeprom.map9287; 323 struct ar9287_eeprom *pEepData = &ah->eeprom.map9287;
324 324
325 modalIdx = IS_CHAN_2GHZ(chan) ? 1 : 0;
326 xpdMask = pEepData->modalHeader.xpdGain; 325 xpdMask = pEepData->modalHeader.xpdGain;
327 326
328 if ((pEepData->baseEepHeader.version & AR9287_EEP_VER_MINOR_MASK) >= 327 if ((pEepData->baseEepHeader.version & AR9287_EEP_VER_MINOR_MASK) >=
diff --git a/drivers/net/wireless/ath/ath9k/htc_drv_beacon.c b/drivers/net/wireless/ath/ath9k/htc_drv_beacon.c
index a157107b3f3b..0ded2c66d5ff 100644
--- a/drivers/net/wireless/ath/ath9k/htc_drv_beacon.c
+++ b/drivers/net/wireless/ath/ath9k/htc_drv_beacon.c
@@ -74,7 +74,7 @@ static void ath9k_htc_beacon_config_sta(struct ath9k_htc_priv *priv,
74 __be32 htc_imask = 0; 74 __be32 htc_imask = 0;
75 u64 tsf; 75 u64 tsf;
76 int num_beacons, offset, dtim_dec_count, cfp_dec_count; 76 int num_beacons, offset, dtim_dec_count, cfp_dec_count;
77 int ret; 77 int ret __attribute__ ((unused));
78 u8 cmd_rsp; 78 u8 cmd_rsp;
79 79
80 memset(&bs, 0, sizeof(bs)); 80 memset(&bs, 0, sizeof(bs));
@@ -190,7 +190,7 @@ static void ath9k_htc_beacon_config_ap(struct ath9k_htc_priv *priv,
190 enum ath9k_int imask = 0; 190 enum ath9k_int imask = 0;
191 u32 nexttbtt, intval, tsftu; 191 u32 nexttbtt, intval, tsftu;
192 __be32 htc_imask = 0; 192 __be32 htc_imask = 0;
193 int ret; 193 int ret __attribute__ ((unused));
194 u8 cmd_rsp; 194 u8 cmd_rsp;
195 u64 tsf; 195 u64 tsf;
196 196
@@ -246,7 +246,7 @@ static void ath9k_htc_beacon_config_adhoc(struct ath9k_htc_priv *priv,
246 enum ath9k_int imask = 0; 246 enum ath9k_int imask = 0;
247 u32 nexttbtt, intval, tsftu; 247 u32 nexttbtt, intval, tsftu;
248 __be32 htc_imask = 0; 248 __be32 htc_imask = 0;
249 int ret; 249 int ret __attribute__ ((unused));
250 u8 cmd_rsp; 250 u8 cmd_rsp;
251 u64 tsf; 251 u64 tsf;
252 252
diff --git a/drivers/net/wireless/ath/ath9k/htc_drv_gpio.c b/drivers/net/wireless/ath/ath9k/htc_drv_gpio.c
index dc0b33d01210..138f8e1350d4 100644
--- a/drivers/net/wireless/ath/ath9k/htc_drv_gpio.c
+++ b/drivers/net/wireless/ath/ath9k/htc_drv_gpio.c
@@ -74,6 +74,10 @@ static void ath_btcoex_period_work(struct work_struct *work)
74 aggr = priv->op_flags & OP_BT_PRIORITY_DETECTED; 74 aggr = priv->op_flags & OP_BT_PRIORITY_DETECTED;
75 75
76 WMI_CMD_BUF(WMI_AGGR_LIMIT_CMD, &aggr); 76 WMI_CMD_BUF(WMI_AGGR_LIMIT_CMD, &aggr);
77 if (ret) {
78 ath_err(common, "Unable to set BTCOEX parameters\n");
79 return;
80 }
77 81
78 ath9k_cmn_btcoex_bt_stomp(common, is_btscan ? ATH_BTCOEX_STOMP_ALL : 82 ath9k_cmn_btcoex_bt_stomp(common, is_btscan ? ATH_BTCOEX_STOMP_ALL :
79 btcoex->bt_stomp_type); 83 btcoex->bt_stomp_type);
diff --git a/drivers/net/wireless/ath/ath9k/htc_drv_main.c b/drivers/net/wireless/ath/ath9k/htc_drv_main.c
index 4de38643cb53..7cff5547b8c0 100644
--- a/drivers/net/wireless/ath/ath9k/htc_drv_main.c
+++ b/drivers/net/wireless/ath/ath9k/htc_drv_main.c
@@ -332,6 +332,11 @@ static void __ath9k_htc_remove_monitor_interface(struct ath9k_htc_priv *priv)
332 memcpy(&hvif.myaddr, common->macaddr, ETH_ALEN); 332 memcpy(&hvif.myaddr, common->macaddr, ETH_ALEN);
333 hvif.index = priv->mon_vif_idx; 333 hvif.index = priv->mon_vif_idx;
334 WMI_CMD_BUF(WMI_VAP_REMOVE_CMDID, &hvif); 334 WMI_CMD_BUF(WMI_VAP_REMOVE_CMDID, &hvif);
335 if (ret) {
336 ath_err(common, "Unable to remove monitor interface at idx: %d\n",
337 priv->mon_vif_idx);
338 }
339
335 priv->nvifs--; 340 priv->nvifs--;
336 priv->vif_slot &= ~(1 << priv->mon_vif_idx); 341 priv->vif_slot &= ~(1 << priv->mon_vif_idx);
337} 342}
@@ -964,7 +969,7 @@ static void ath9k_htc_stop(struct ieee80211_hw *hw)
964 struct ath9k_htc_priv *priv = hw->priv; 969 struct ath9k_htc_priv *priv = hw->priv;
965 struct ath_hw *ah = priv->ah; 970 struct ath_hw *ah = priv->ah;
966 struct ath_common *common = ath9k_hw_common(ah); 971 struct ath_common *common = ath9k_hw_common(ah);
967 int ret = 0; 972 int ret __attribute__ ((unused));
968 u8 cmd_rsp; 973 u8 cmd_rsp;
969 974
970 mutex_lock(&priv->mutex); 975 mutex_lock(&priv->mutex);
@@ -1135,6 +1140,10 @@ static void ath9k_htc_remove_interface(struct ieee80211_hw *hw,
1135 memcpy(&hvif.myaddr, vif->addr, ETH_ALEN); 1140 memcpy(&hvif.myaddr, vif->addr, ETH_ALEN);
1136 hvif.index = avp->index; 1141 hvif.index = avp->index;
1137 WMI_CMD_BUF(WMI_VAP_REMOVE_CMDID, &hvif); 1142 WMI_CMD_BUF(WMI_VAP_REMOVE_CMDID, &hvif);
1143 if (ret) {
1144 ath_err(common, "Unable to remove interface at idx: %d\n",
1145 avp->index);
1146 }
1138 priv->nvifs--; 1147 priv->nvifs--;
1139 priv->vif_slot &= ~(1 << avp->index); 1148 priv->vif_slot &= ~(1 << avp->index);
1140 1149
diff --git a/drivers/net/wireless/ath/ath9k/htc_drv_txrx.c b/drivers/net/wireless/ath/ath9k/htc_drv_txrx.c
index 723a3a9c5cd9..a898dac22337 100644
--- a/drivers/net/wireless/ath/ath9k/htc_drv_txrx.c
+++ b/drivers/net/wireless/ath/ath9k/htc_drv_txrx.c
@@ -446,7 +446,6 @@ static void ath9k_htc_tx_process(struct ath9k_htc_priv *priv,
446 struct ieee80211_tx_info *tx_info; 446 struct ieee80211_tx_info *tx_info;
447 struct ieee80211_tx_rate *rate; 447 struct ieee80211_tx_rate *rate;
448 struct ieee80211_conf *cur_conf = &priv->hw->conf; 448 struct ieee80211_conf *cur_conf = &priv->hw->conf;
449 struct ieee80211_supported_band *sband;
450 bool txok; 449 bool txok;
451 int slot; 450 int slot;
452 451
@@ -461,7 +460,6 @@ static void ath9k_htc_tx_process(struct ath9k_htc_priv *priv,
461 tx_info = IEEE80211_SKB_CB(skb); 460 tx_info = IEEE80211_SKB_CB(skb);
462 vif = tx_info->control.vif; 461 vif = tx_info->control.vif;
463 rate = &tx_info->status.rates[0]; 462 rate = &tx_info->status.rates[0];
464 sband = priv->hw->wiphy->bands[cur_conf->channel->band];
465 463
466 memset(&tx_info->status, 0, sizeof(tx_info->status)); 464 memset(&tx_info->status, 0, sizeof(tx_info->status));
467 465
diff --git a/drivers/net/wireless/ath/ath9k/hw.c b/drivers/net/wireless/ath/ath9k/hw.c
index b7eb7930ae38..0fcfa5901a03 100644
--- a/drivers/net/wireless/ath/ath9k/hw.c
+++ b/drivers/net/wireless/ath/ath9k/hw.c
@@ -1866,7 +1866,7 @@ int ath9k_hw_fill_cap_info(struct ath_hw *ah)
1866 struct ath_common *common = ath9k_hw_common(ah); 1866 struct ath_common *common = ath9k_hw_common(ah);
1867 struct ath_btcoex_hw *btcoex_hw = &ah->btcoex_hw; 1867 struct ath_btcoex_hw *btcoex_hw = &ah->btcoex_hw;
1868 1868
1869 u16 capField = 0, eeval; 1869 u16 eeval;
1870 u8 ant_div_ctl1, tx_chainmask, rx_chainmask; 1870 u8 ant_div_ctl1, tx_chainmask, rx_chainmask;
1871 1871
1872 eeval = ah->eep_ops->get_eeprom(ah, EEP_REG_0); 1872 eeval = ah->eep_ops->get_eeprom(ah, EEP_REG_0);
@@ -1877,8 +1877,6 @@ int ath9k_hw_fill_cap_info(struct ath_hw *ah)
1877 eeval |= AR9285_RDEXT_DEFAULT; 1877 eeval |= AR9285_RDEXT_DEFAULT;
1878 regulatory->current_rd_ext = eeval; 1878 regulatory->current_rd_ext = eeval;
1879 1879
1880 capField = ah->eep_ops->get_eeprom(ah, EEP_OP_CAP);
1881
1882 if (ah->opmode != NL80211_IFTYPE_AP && 1880 if (ah->opmode != NL80211_IFTYPE_AP &&
1883 ah->hw_version.subvendorid == AR_SUBVENDOR_ID_NEW_A) { 1881 ah->hw_version.subvendorid == AR_SUBVENDOR_ID_NEW_A) {
1884 if (regulatory->current_rd == 0x64 || 1882 if (regulatory->current_rd == 0x64 ||
diff --git a/drivers/net/wireless/ath/ath9k/rc.c b/drivers/net/wireless/ath/ath9k/rc.c
index 2a40532126f3..b877d9639bdc 100644
--- a/drivers/net/wireless/ath/ath9k/rc.c
+++ b/drivers/net/wireless/ath/ath9k/rc.c
@@ -854,14 +854,13 @@ static void ath_get_rate(void *priv, struct ieee80211_sta *sta, void *priv_sta,
854 ath_rc_rate_set_rtscts(sc, rate_table, tx_info); 854 ath_rc_rate_set_rtscts(sc, rate_table, tx_info);
855} 855}
856 856
857static bool ath_rc_update_per(struct ath_softc *sc, 857static void ath_rc_update_per(struct ath_softc *sc,
858 const struct ath_rate_table *rate_table, 858 const struct ath_rate_table *rate_table,
859 struct ath_rate_priv *ath_rc_priv, 859 struct ath_rate_priv *ath_rc_priv,
860 struct ieee80211_tx_info *tx_info, 860 struct ieee80211_tx_info *tx_info,
861 int tx_rate, int xretries, int retries, 861 int tx_rate, int xretries, int retries,
862 u32 now_msec) 862 u32 now_msec)
863{ 863{
864 bool state_change = false;
865 int count, n_bad_frames; 864 int count, n_bad_frames;
866 u8 last_per; 865 u8 last_per;
867 static const u32 nretry_to_per_lookup[10] = { 866 static const u32 nretry_to_per_lookup[10] = {
@@ -992,8 +991,6 @@ static bool ath_rc_update_per(struct ath_softc *sc,
992 991
993 } 992 }
994 } 993 }
995
996 return state_change;
997} 994}
998 995
999static void ath_debug_stat_retries(struct ath_rate_priv *rc, int rix, 996static void ath_debug_stat_retries(struct ath_rate_priv *rc, int rix,
@@ -1017,7 +1014,6 @@ static void ath_rc_update_ht(struct ath_softc *sc,
1017 u32 now_msec = jiffies_to_msecs(jiffies); 1014 u32 now_msec = jiffies_to_msecs(jiffies);
1018 int rate; 1015 int rate;
1019 u8 last_per; 1016 u8 last_per;
1020 bool state_change = false;
1021 const struct ath_rate_table *rate_table = ath_rc_priv->rate_table; 1017 const struct ath_rate_table *rate_table = ath_rc_priv->rate_table;
1022 int size = ath_rc_priv->rate_table_size; 1018 int size = ath_rc_priv->rate_table_size;
1023 1019
@@ -1027,9 +1023,9 @@ static void ath_rc_update_ht(struct ath_softc *sc,
1027 last_per = ath_rc_priv->per[tx_rate]; 1023 last_per = ath_rc_priv->per[tx_rate];
1028 1024
1029 /* Update PER first */ 1025 /* Update PER first */
1030 state_change = ath_rc_update_per(sc, rate_table, ath_rc_priv, 1026 ath_rc_update_per(sc, rate_table, ath_rc_priv,
1031 tx_info, tx_rate, xretries, 1027 tx_info, tx_rate, xretries,
1032 retries, now_msec); 1028 retries, now_msec);
1033 1029
1034 /* 1030 /*
1035 * If this rate looks bad (high PER) then stop using it for 1031 * If this rate looks bad (high PER) then stop using it for
diff --git a/drivers/net/wireless/ath/ath9k/recv.c b/drivers/net/wireless/ath/ath9k/recv.c
index b81bfc4d66ef..abff2d5229ee 100644
--- a/drivers/net/wireless/ath/ath9k/recv.c
+++ b/drivers/net/wireless/ath/ath9k/recv.c
@@ -1339,7 +1339,7 @@ static void ath_ant_comb_scan(struct ath_softc *sc, struct ath_rx_status *rs)
1339 struct ath_hw_antcomb_conf div_ant_conf; 1339 struct ath_hw_antcomb_conf div_ant_conf;
1340 struct ath_ant_comb *antcomb = &sc->ant_comb; 1340 struct ath_ant_comb *antcomb = &sc->ant_comb;
1341 int alt_ratio = 0, alt_rssi_avg = 0, main_rssi_avg = 0, curr_alt_set; 1341 int alt_ratio = 0, alt_rssi_avg = 0, main_rssi_avg = 0, curr_alt_set;
1342 int curr_main_set, curr_bias; 1342 int curr_main_set;
1343 int main_rssi = rs->rs_rssi_ctl0; 1343 int main_rssi = rs->rs_rssi_ctl0;
1344 int alt_rssi = rs->rs_rssi_ctl1; 1344 int alt_rssi = rs->rs_rssi_ctl1;
1345 int rx_ant_conf, main_ant_conf; 1345 int rx_ant_conf, main_ant_conf;
@@ -1393,7 +1393,6 @@ static void ath_ant_comb_scan(struct ath_softc *sc, struct ath_rx_status *rs)
1393 ath9k_hw_antdiv_comb_conf_get(sc->sc_ah, &div_ant_conf); 1393 ath9k_hw_antdiv_comb_conf_get(sc->sc_ah, &div_ant_conf);
1394 curr_alt_set = div_ant_conf.alt_lna_conf; 1394 curr_alt_set = div_ant_conf.alt_lna_conf;
1395 curr_main_set = div_ant_conf.main_lna_conf; 1395 curr_main_set = div_ant_conf.main_lna_conf;
1396 curr_bias = div_ant_conf.fast_div_bias;
1397 1396
1398 antcomb->count++; 1397 antcomb->count++;
1399 1398