Commit 9814f6b3 authored by Steve Brown's avatar Steve Brown Committed by John W. Linville

ath9k: Remove redundant beacon_interval

The variable appears in both ath_softc and ath_beacon_config.
The struct ath_beacon_config is embedded in ath_softc. The redundant
variable was added by commit id 57c4d7b4.
Signed-off-by: default avatarSteve Brown <sbrown@cortland.com>
Reviewed-by: default avatarMohammed Shafi <shafi.ath9k@gmail.com>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent 59bdf3b0
...@@ -370,7 +370,7 @@ struct ath_vif { ...@@ -370,7 +370,7 @@ struct ath_vif {
#define IEEE80211_MS_TO_TU(x) (((x) * 1000) / 1024) #define IEEE80211_MS_TO_TU(x) (((x) * 1000) / 1024)
struct ath_beacon_config { struct ath_beacon_config {
u16 beacon_interval; int beacon_interval;
u16 listen_interval; u16 listen_interval;
u16 dtim_period; u16 dtim_period;
u16 bmiss_timeout; u16 bmiss_timeout;
...@@ -633,8 +633,6 @@ struct ath_softc { ...@@ -633,8 +633,6 @@ struct ath_softc {
struct ath9k_hw_cal_data caldata; struct ath9k_hw_cal_data caldata;
int last_rssi; int last_rssi;
int beacon_interval;
#ifdef CONFIG_ATH9K_DEBUGFS #ifdef CONFIG_ATH9K_DEBUGFS
struct ath9k_debug debug; struct ath9k_debug debug;
spinlock_t nodes_lock; spinlock_t nodes_lock;
......
...@@ -226,6 +226,7 @@ int ath_beacon_alloc(struct ath_softc *sc, struct ieee80211_vif *vif) ...@@ -226,6 +226,7 @@ int ath_beacon_alloc(struct ath_softc *sc, struct ieee80211_vif *vif)
struct ath_vif *avp; struct ath_vif *avp;
struct ath_buf *bf; struct ath_buf *bf;
struct sk_buff *skb; struct sk_buff *skb;
struct ath_beacon_config *cur_conf = &sc->cur_beacon_conf;
__le64 tstamp; __le64 tstamp;
avp = (void *)vif->drv_priv; avp = (void *)vif->drv_priv;
...@@ -282,7 +283,7 @@ int ath_beacon_alloc(struct ath_softc *sc, struct ieee80211_vif *vif) ...@@ -282,7 +283,7 @@ int ath_beacon_alloc(struct ath_softc *sc, struct ieee80211_vif *vif)
u64 tsfadjust; u64 tsfadjust;
int intval; int intval;
intval = sc->beacon_interval ? : ATH_DEFAULT_BINTVAL; intval = cur_conf->beacon_interval ? : ATH_DEFAULT_BINTVAL;
/* /*
* Calculate the TSF offset for this beacon slot, i.e., the * Calculate the TSF offset for this beacon slot, i.e., the
...@@ -346,6 +347,7 @@ void ath_beacon_return(struct ath_softc *sc, struct ath_vif *avp) ...@@ -346,6 +347,7 @@ void ath_beacon_return(struct ath_softc *sc, struct ath_vif *avp)
void ath_beacon_tasklet(unsigned long data) void ath_beacon_tasklet(unsigned long data)
{ {
struct ath_softc *sc = (struct ath_softc *)data; struct ath_softc *sc = (struct ath_softc *)data;
struct ath_beacon_config *cur_conf = &sc->cur_beacon_conf;
struct ath_hw *ah = sc->sc_ah; struct ath_hw *ah = sc->sc_ah;
struct ath_common *common = ath9k_hw_common(ah); struct ath_common *common = ath9k_hw_common(ah);
struct ath_buf *bf = NULL; struct ath_buf *bf = NULL;
...@@ -393,7 +395,7 @@ void ath_beacon_tasklet(unsigned long data) ...@@ -393,7 +395,7 @@ void ath_beacon_tasklet(unsigned long data)
* on the tsf to safeguard against missing an swba. * on the tsf to safeguard against missing an swba.
*/ */
intval = sc->beacon_interval ? : ATH_DEFAULT_BINTVAL; intval = cur_conf->beacon_interval ? : ATH_DEFAULT_BINTVAL;
tsf = ath9k_hw_gettsf64(ah); tsf = ath9k_hw_gettsf64(ah);
tsftu = TSF_TO_TU(tsf>>32, tsf); tsftu = TSF_TO_TU(tsf>>32, tsf);
......
...@@ -1891,6 +1891,7 @@ static void ath9k_bss_info_changed(struct ieee80211_hw *hw, ...@@ -1891,6 +1891,7 @@ static void ath9k_bss_info_changed(struct ieee80211_hw *hw,
u32 changed) u32 changed)
{ {
struct ath_softc *sc = hw->priv; struct ath_softc *sc = hw->priv;
struct ath_beacon_config *cur_conf = &sc->cur_beacon_conf;
struct ath_hw *ah = sc->sc_ah; struct ath_hw *ah = sc->sc_ah;
struct ath_common *common = ath9k_hw_common(ah); struct ath_common *common = ath9k_hw_common(ah);
struct ath_vif *avp = (void *)vif->drv_priv; struct ath_vif *avp = (void *)vif->drv_priv;
...@@ -1949,7 +1950,7 @@ static void ath9k_bss_info_changed(struct ieee80211_hw *hw, ...@@ -1949,7 +1950,7 @@ static void ath9k_bss_info_changed(struct ieee80211_hw *hw,
ath9k_hw_stoptxdma(sc->sc_ah, sc->beacon.beaconq); ath9k_hw_stoptxdma(sc->sc_ah, sc->beacon.beaconq);
if (changed & BSS_CHANGED_BEACON_INT) { if (changed & BSS_CHANGED_BEACON_INT) {
sc->beacon_interval = bss_conf->beacon_int; cur_conf->beacon_interval = bss_conf->beacon_int;
/* /*
* In case of AP mode, the HW TSF has to be reset * In case of AP mode, the HW TSF has to be reset
* when the beacon interval changes. * when the beacon interval changes.
......
...@@ -1055,6 +1055,7 @@ int ath_txq_update(struct ath_softc *sc, int qnum, ...@@ -1055,6 +1055,7 @@ int ath_txq_update(struct ath_softc *sc, int qnum,
int ath_cabq_update(struct ath_softc *sc) int ath_cabq_update(struct ath_softc *sc)
{ {
struct ath9k_tx_queue_info qi; struct ath9k_tx_queue_info qi;
struct ath_beacon_config *cur_conf = &sc->cur_beacon_conf;
int qnum = sc->beacon.cabq->axq_qnum; int qnum = sc->beacon.cabq->axq_qnum;
ath9k_hw_get_txq_props(sc->sc_ah, qnum, &qi); ath9k_hw_get_txq_props(sc->sc_ah, qnum, &qi);
...@@ -1066,7 +1067,7 @@ int ath_cabq_update(struct ath_softc *sc) ...@@ -1066,7 +1067,7 @@ int ath_cabq_update(struct ath_softc *sc)
else if (sc->config.cabqReadytime > ATH9K_READY_TIME_HI_BOUND) else if (sc->config.cabqReadytime > ATH9K_READY_TIME_HI_BOUND)
sc->config.cabqReadytime = ATH9K_READY_TIME_HI_BOUND; sc->config.cabqReadytime = ATH9K_READY_TIME_HI_BOUND;
qi.tqi_readyTime = (sc->beacon_interval * qi.tqi_readyTime = (cur_conf->beacon_interval *
sc->config.cabqReadytime) / 100; sc->config.cabqReadytime) / 100;
ath_txq_update(sc, qnum, &qi); ath_txq_update(sc, qnum, &qi);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment