ath9k: support multiple beacon intervals
RFC 2/2 ath9k: support multiple beacon intervals
This patch maintains a beacon interval for each beacon. The SWBA interrupts are based on the shortest interval. If an interface with a relatively short beacon is deleted, there is no attempt to change the SWBA rate. It's probably an uncommon operation and doesn't seem to carry much overhead.
---
drivers/net/wireless/ath/ath9k/ath9k.h +3 -0
@@ -56,6 +56,7 @@ struct ath_node; } while (0)#define A_MAX (a, b) ((a) > (b) ? (a) : (b)) +#define A_MIN (a, b) ((a) < (b) ? (a) : (b))#define ATH9K_PM_QOS_DEFAULT_VALUE 55
@@ -350,6 +351,8 @@ struct ath_vif {__le64 tsf_adjust;/* TSF adjustment for staggered beacons */ enum nl80211_iftype av_opmode;struct ath_buf *av_bcbuf; +u32 intval;/* beacon interval */ +int intval_remaining;/* time to next beacon */ u8 bssid[ETH_ALEN ];/* current BSSID from config_interface */ };
drivers/net/wireless/ath/ath9k/beacon.c +37 -7
99 lines not on this page · raw message
drivers/net/wireless/ath/ath9k/init.c +1 -0
@@ -586,6 +586,7 @@ static int ath9k_init_softc(u16 devid, stasklet_init (&sc->intr_tq, ath9k_tasklet, (unsigned long )sc);tasklet_init (&sc->bcon_tasklet, ath_beacon_tasklet, (unsigned long )sc); +printk ("%s:%d:%s sc:%p\n" , __FILE__, __LINE__, __FUNCTION__, sc);/* * Cache line size is used to size and align various
drivers/net/wireless/ath/ath9k/main.c +0 -2
@@ -1922,7 +1922,6 @@ static void ath9k_bss_info_changed(struc u32 changed) {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_common *common =ath9k_hw_common (ah);struct ath_vif *avp = (void *)vif->drv_priv;
@@ -1981,7 +1980,6 @@ static void ath9k_bss_info_changed(strucath9k_hw_stoptxdma (sc->sc_ah, sc->beacon.beaconq);if (changed &BSS_CHANGED_BEACON_INT ) { - cur_conf->beacon_interval = bss_conf->beacon_int;/* * In case of AP mode, the HW TSF has to be reset * when the beacon interval changes.
drivers/net/wireless/ath/ath9k/hw.c +1 -1
@@ -1664,7 +1664,6 @@ void ath9k_hw_beaconinit(struct ath_hw *switch (ah->opmode) {case NL80211_IFTYPE_ADHOC : -case NL80211_IFTYPE_MESH_POINT :REG_SET_BIT (ah,AR_TXCFG ,AR_TXCFG_ADHOC_BEACON_ATIM_TX_POLICY ); REG_WRITE(ah, AR_NEXT_NDP_TIMER,
@@ -1673,6 +1672,7 @@ void ath9k_hw_beaconinit(struct ath_hw * atim_window : 1))); flags |=AR_NDP_TIMER_EN ;case NL80211_IFTYPE_AP : +case NL80211_IFTYPE_MESH_POINT :REG_WRITE (ah,AR_NEXT_TBTT_TIMER ,TU_TO_USEC (next_beacon)); REG_WRITE(ah, AR_NEXT_DMA_BEACON_ALERT, TU_TO_USEC(next_beacon -