Commit 17d7904d authored by Sujith's avatar Sujith Committed by John W. Linville

ath9k: Remove all the sc_ prefixes

This patch removes the useless sc_ prefixes for all variables.
Also, refer to interfaces as VIFs and not as VAPs anymore.
Signed-off-by: default avatarSujith <Sujith.Manoharan@atheros.com>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent ee6e8d1c
...@@ -104,13 +104,13 @@ enum buffer_type { ...@@ -104,13 +104,13 @@ enum buffer_type {
}; };
struct ath_buf_state { struct ath_buf_state {
int bfs_nframes; /* # frames in aggregate */ int bfs_nframes;
u16 bfs_al; /* length of aggregate */ u16 bfs_al;
u16 bfs_frmlen; /* length of frame */ u16 bfs_frmlen;
int bfs_seqno; /* sequence number */ int bfs_seqno;
int bfs_tidno; /* tid of this frame */ int bfs_tidno;
int bfs_retries; /* current retries */ int bfs_retries;
u32 bf_type; /* BUF_* (enum buffer_type) */ u32 bf_type;
u32 bfs_keyix; u32 bfs_keyix;
enum ath9k_key_type bfs_keytype; enum ath9k_key_type bfs_keytype;
}; };
...@@ -129,10 +129,6 @@ struct ath_buf_state { ...@@ -129,10 +129,6 @@ struct ath_buf_state {
#define bf_isretried(bf) (bf->bf_state.bf_type & BUF_RETRY) #define bf_isretried(bf) (bf->bf_state.bf_type & BUF_RETRY)
#define bf_isxretried(bf) (bf->bf_state.bf_type & BUF_XRETRY) #define bf_isxretried(bf) (bf->bf_state.bf_type & BUF_XRETRY)
/*
* Abstraction of a contiguous buffer to transmit/receive. There is only
* a single hw descriptor encapsulated here.
*/
struct ath_buf { struct ath_buf {
struct list_head list; struct list_head list;
struct ath_buf *bf_lastbf; /* last buf of this unit (a frame or struct ath_buf *bf_lastbf; /* last buf of this unit (a frame or
...@@ -143,22 +139,20 @@ struct ath_buf { ...@@ -143,22 +139,20 @@ struct ath_buf {
dma_addr_t bf_daddr; /* physical addr of desc */ dma_addr_t bf_daddr; /* physical addr of desc */
dma_addr_t bf_buf_addr; /* physical addr of data buffer */ dma_addr_t bf_buf_addr; /* physical addr of data buffer */
u32 bf_status; u32 bf_status;
u16 bf_flags; /* tx descriptor flags */ u16 bf_flags;
struct ath_buf_state bf_state; /* buffer state */ struct ath_buf_state bf_state;
dma_addr_t bf_dmacontext; dma_addr_t bf_dmacontext;
}; };
#define ATH_RXBUF_RESET(_bf) ((_bf)->bf_status = 0) #define ATH_RXBUF_RESET(_bf) ((_bf)->bf_status = 0)
#define ATH_BUFSTATUS_STALE 0x00000002 #define ATH_BUFSTATUS_STALE 0x00000002
/* DMA state for tx/rx descriptors */
struct ath_descdma { struct ath_descdma {
const char *dd_name; const char *dd_name;
struct ath_desc *dd_desc; /* descriptors */ struct ath_desc *dd_desc;
dma_addr_t dd_desc_paddr; /* physical addr of dd_desc */ dma_addr_t dd_desc_paddr;
u32 dd_desc_len; /* size of dd_desc */ u32 dd_desc_len;
struct ath_buf *dd_bufptr; /* associated buffers */ struct ath_buf *dd_bufptr;
dma_addr_t dd_dmacontext; dma_addr_t dd_dmacontext;
}; };
...@@ -246,15 +240,15 @@ enum ATH_AGGR_STATUS { ...@@ -246,15 +240,15 @@ enum ATH_AGGR_STATUS {
}; };
struct ath_txq { struct ath_txq {
u32 axq_qnum; /* hardware q number */ u32 axq_qnum;
u32 *axq_link; /* link ptr in last TX desc */ u32 *axq_link;
struct list_head axq_q; /* transmit queue */ struct list_head axq_q;
spinlock_t axq_lock; spinlock_t axq_lock;
u32 axq_depth; /* queue depth */ u32 axq_depth;
u8 axq_aggr_depth; /* aggregates queued */ u8 axq_aggr_depth;
u32 axq_totalqueued; /* total ever queued */ u32 axq_totalqueued;
bool stopped; /* Is mac80211 queue stopped ? */ bool stopped;
struct ath_buf *axq_linkbuf; /* virtual addr of last buffer*/ struct ath_buf *axq_linkbuf;
/* first desc of the last descriptor that contains CTS */ /* first desc of the last descriptor that contains CTS */
struct ath_desc *axq_lastdsWithCTS; struct ath_desc *axq_lastdsWithCTS;
...@@ -270,45 +264,39 @@ struct ath_txq { ...@@ -270,45 +264,39 @@ struct ath_txq {
#define AGGR_ADDBA_COMPLETE BIT(2) #define AGGR_ADDBA_COMPLETE BIT(2)
#define AGGR_ADDBA_PROGRESS BIT(3) #define AGGR_ADDBA_PROGRESS BIT(3)
/* per TID aggregate tx state for a destination */
struct ath_atx_tid { struct ath_atx_tid {
struct list_head list; /* round-robin tid entry */ struct list_head list;
struct list_head buf_q; /* pending buffers */ struct list_head buf_q;
struct ath_node *an; struct ath_node *an;
struct ath_atx_ac *ac; struct ath_atx_ac *ac;
struct ath_buf *tx_buf[ATH_TID_MAX_BUFS]; /* active tx frames */ struct ath_buf *tx_buf[ATH_TID_MAX_BUFS];
u16 seq_start; u16 seq_start;
u16 seq_next; u16 seq_next;
u16 baw_size; u16 baw_size;
int tidno; int tidno;
int baw_head; /* first un-acked tx buffer */ int baw_head; /* first un-acked tx buffer */
int baw_tail; /* next unused tx buffer slot */ int baw_tail; /* next unused tx buffer slot */
int sched; int sched;
int paused; int paused;
u8 state; u8 state;
int addba_exchangeattempts; int addba_exchangeattempts;
}; };
/* per access-category aggregate tx state for a destination */
struct ath_atx_ac { struct ath_atx_ac {
int sched; /* dest-ac is scheduled */ int sched;
int qnum; /* H/W queue number associated int qnum;
with this AC */ struct list_head list;
struct list_head list; /* round-robin txq entry */ struct list_head tid_q;
struct list_head tid_q; /* queue of TIDs with buffers */
}; };
/* per-frame tx control block */
struct ath_tx_control { struct ath_tx_control {
struct ath_txq *txq; struct ath_txq *txq;
int if_id; int if_id;
}; };
/* per frame tx status block */
struct ath_xmit_status { struct ath_xmit_status {
int retries; /* number of retries to successufully int retries;
transmit this frame */ int flags;
int flags; /* status of transmit */
#define ATH_TX_ERROR 0x01 #define ATH_TX_ERROR 0x01
#define ATH_TX_XRETRY 0x02 #define ATH_TX_XRETRY 0x02
#define ATH_TX_BAR 0x04 #define ATH_TX_BAR 0x04
...@@ -396,21 +384,21 @@ int ath_tx_aggr_stop(struct ath_softc *sc, struct ieee80211_sta *sta, u16 tid); ...@@ -396,21 +384,21 @@ int ath_tx_aggr_stop(struct ath_softc *sc, struct ieee80211_sta *sta, u16 tid);
void ath_tx_aggr_resume(struct ath_softc *sc, struct ieee80211_sta *sta, u16 tid); void ath_tx_aggr_resume(struct ath_softc *sc, struct ieee80211_sta *sta, u16 tid);
/********/ /********/
/* VAPs */ /* VIFs */
/********/ /********/
/* /*
* Define the scheme that we select MAC address for multiple * Define the scheme that we select MAC address for multiple
* BSS on the same radio. The very first VAP will just use the MAC * BSS on the same radio. The very first VIF will just use the MAC
* address from the EEPROM. For the next 3 VAPs, we set the * address from the EEPROM. For the next 3 VIFs, we set the
* U/L bit (bit 1) in MAC address, and use the next two bits as the * U/L bit (bit 1) in MAC address, and use the next two bits as the
* index of the VAP. * index of the VIF.
*/ */
#define ATH_SET_VAP_BSSID_MASK(bssid_mask) \ #define ATH_SET_VIF_BSSID_MASK(bssid_mask) \
((bssid_mask)[0] &= ~(((ATH_BCBUF-1)<<2)|0x02)) ((bssid_mask)[0] &= ~(((ATH_BCBUF-1)<<2)|0x02))
struct ath_vap { struct ath_vif {
int av_bslot; int av_bslot;
enum nl80211_iftype av_opmode; enum nl80211_iftype av_opmode;
struct ath_buf *av_bcbuf; struct ath_buf *av_bcbuf;
...@@ -469,7 +457,7 @@ void ath9k_beacon_tasklet(unsigned long data); ...@@ -469,7 +457,7 @@ void ath9k_beacon_tasklet(unsigned long data);
void ath_beacon_config(struct ath_softc *sc, int if_id); void ath_beacon_config(struct ath_softc *sc, int if_id);
int ath_beaconq_setup(struct ath_hal *ah); int ath_beaconq_setup(struct ath_hal *ah);
int ath_beacon_alloc(struct ath_softc *sc, int if_id); int ath_beacon_alloc(struct ath_softc *sc, int if_id);
void ath_beacon_return(struct ath_softc *sc, struct ath_vap *avp); void ath_beacon_return(struct ath_softc *sc, struct ath_vif *avp);
void ath_beacon_sync(struct ath_softc *sc, int if_id); void ath_beacon_sync(struct ath_softc *sc, int if_id);
/*******/ /*******/
...@@ -485,12 +473,12 @@ void ath_beacon_sync(struct ath_softc *sc, int if_id); ...@@ -485,12 +473,12 @@ void ath_beacon_sync(struct ath_softc *sc, int if_id);
#define ATH_RESTART_CALINTERVAL 1200000 /* 20 minutes between calibrations */ #define ATH_RESTART_CALINTERVAL 1200000 /* 20 minutes between calibrations */
struct ath_ani { struct ath_ani {
bool sc_caldone; bool caldone;
int16_t sc_noise_floor; int16_t noise_floor;
unsigned int sc_longcal_timer; unsigned int longcal_timer;
unsigned int sc_shortcal_timer; unsigned int shortcal_timer;
unsigned int sc_resetcal_timer; unsigned int resetcal_timer;
unsigned int sc_checkani_timer; unsigned int checkani_timer;
struct timer_list timer; struct timer_list timer;
}; };
...@@ -591,31 +579,31 @@ struct ath_softc { ...@@ -591,31 +579,31 @@ struct ath_softc {
spinlock_t sc_resetlock; spinlock_t sc_resetlock;
struct mutex mutex; struct mutex mutex;
u8 sc_curbssid[ETH_ALEN]; u8 curbssid[ETH_ALEN];
u8 sc_myaddr[ETH_ALEN]; u8 macaddr[ETH_ALEN];
u8 sc_bssidmask[ETH_ALEN]; u8 bssidmask[ETH_ALEN];
u32 sc_intrstatus; u32 intrstatus;
u32 sc_flags; /* SC_OP_* */ u32 sc_flags; /* SC_OP_* */
u16 sc_curtxpow; u16 curtxpow;
u16 sc_curaid; u16 curaid;
u16 sc_cachelsz; u16 cachelsz;
u8 sc_nbcnvaps; u8 nbcnvifs;
u16 sc_nvaps; u16 nvifs;
u8 sc_tx_chainmask; u8 tx_chainmask;
u8 sc_rx_chainmask; u8 rx_chainmask;
u32 sc_keymax; u32 keymax;
DECLARE_BITMAP(sc_keymap, ATH_KEYMAX); DECLARE_BITMAP(keymap, ATH_KEYMAX);
u8 sc_splitmic; u8 splitmic;
atomic_t ps_usecount; atomic_t ps_usecount;
enum ath9k_int sc_imask; enum ath9k_int imask;
enum ath9k_ht_extprotspacing sc_ht_extprotspacing; enum ath9k_ht_extprotspacing ht_extprotspacing;
enum ath9k_ht_macmode tx_chan_width; enum ath9k_ht_macmode tx_chan_width;
struct ath_config sc_config; struct ath_config config;
struct ath_rx rx; struct ath_rx rx;
struct ath_tx tx; struct ath_tx tx;
struct ath_beacon beacon; struct ath_beacon beacon;
struct ieee80211_vif *sc_vaps[ATH_BCBUF]; struct ieee80211_vif *vifs[ATH_BCBUF];
struct ieee80211_rate rates[IEEE80211_NUM_BANDS][ATH_RATE_MAX]; struct ieee80211_rate rates[IEEE80211_NUM_BANDS][ATH_RATE_MAX];
struct ath_rate_table *hw_rate_table[ATH9K_MODE_MAX]; struct ath_rate_table *hw_rate_table[ATH9K_MODE_MAX];
struct ath_rate_table *cur_rate_table; struct ath_rate_table *cur_rate_table;
...@@ -632,10 +620,10 @@ struct ath_softc { ...@@ -632,10 +620,10 @@ struct ath_softc {
int led_off_cnt; int led_off_cnt;
struct ath_rfkill rf_kill; struct ath_rfkill rf_kill;
struct ath_ani sc_ani; struct ath_ani ani;
struct ath9k_node_stats sc_halstats; struct ath9k_node_stats nodestats;
#ifdef CONFIG_ATH9K_DEBUG #ifdef CONFIG_ATH9K_DEBUG
struct ath9k_debug sc_debug; struct ath9k_debug debug;
#endif #endif
struct ath_bus_ops *bus_ops; struct ath_bus_ops *bus_ops;
}; };
......
...@@ -63,7 +63,7 @@ static void ath_bstuck_process(struct ath_softc *sc) ...@@ -63,7 +63,7 @@ static void ath_bstuck_process(struct ath_softc *sc)
* Beacons are always sent out at the lowest rate, and are not retried. * Beacons are always sent out at the lowest rate, and are not retried.
*/ */
static void ath_beacon_setup(struct ath_softc *sc, static void ath_beacon_setup(struct ath_softc *sc,
struct ath_vap *avp, struct ath_buf *bf) struct ath_vif *avp, struct ath_buf *bf)
{ {
struct sk_buff *skb = (struct sk_buff *)bf->bf_mpdu; struct sk_buff *skb = (struct sk_buff *)bf->bf_mpdu;
struct ath_hal *ah = sc->sc_ah; struct ath_hal *ah = sc->sc_ah;
...@@ -96,7 +96,7 @@ static void ath_beacon_setup(struct ath_softc *sc, ...@@ -96,7 +96,7 @@ static void ath_beacon_setup(struct ath_softc *sc,
* SWBA's * SWBA's
* XXX assumes two antenna * XXX assumes two antenna
*/ */
antenna = ((sc->beacon.ast_be_xmit / sc->sc_nbcnvaps) & 1 ? 2 : 1); antenna = ((sc->beacon.ast_be_xmit / sc->nbcnvifs) & 1 ? 2 : 1);
} }
ds->ds_data = bf->bf_buf_addr; ds->ds_data = bf->bf_buf_addr;
...@@ -132,24 +132,24 @@ static void ath_beacon_setup(struct ath_softc *sc, ...@@ -132,24 +132,24 @@ static void ath_beacon_setup(struct ath_softc *sc,
memset(series, 0, sizeof(struct ath9k_11n_rate_series) * 4); memset(series, 0, sizeof(struct ath9k_11n_rate_series) * 4);
series[0].Tries = 1; series[0].Tries = 1;
series[0].Rate = rate; series[0].Rate = rate;
series[0].ChSel = sc->sc_tx_chainmask; series[0].ChSel = sc->tx_chainmask;
series[0].RateFlags = (ctsrate) ? ATH9K_RATESERIES_RTS_CTS : 0; series[0].RateFlags = (ctsrate) ? ATH9K_RATESERIES_RTS_CTS : 0;
ath9k_hw_set11n_ratescenario(ah, ds, ds, 0, ath9k_hw_set11n_ratescenario(ah, ds, ds, 0,
ctsrate, ctsduration, series, 4, 0); ctsrate, ctsduration, series, 4, 0);
} }
/* Generate beacon frame and queue cab data for a vap */ /* Generate beacon frame and queue cab data for a VIF */
static struct ath_buf *ath_beacon_generate(struct ath_softc *sc, int if_id) static struct ath_buf *ath_beacon_generate(struct ath_softc *sc, int if_id)
{ {
struct ath_buf *bf; struct ath_buf *bf;
struct ath_vap *avp; struct ath_vif *avp;
struct sk_buff *skb; struct sk_buff *skb;
struct ath_txq *cabq; struct ath_txq *cabq;
struct ieee80211_vif *vif; struct ieee80211_vif *vif;
struct ieee80211_tx_info *info; struct ieee80211_tx_info *info;
int cabq_depth; int cabq_depth;
vif = sc->sc_vaps[if_id]; vif = sc->vifs[if_id];
ASSERT(vif); ASSERT(vif);
avp = (void *)vif->drv_priv; avp = (void *)vif->drv_priv;
...@@ -204,10 +204,10 @@ static struct ath_buf *ath_beacon_generate(struct ath_softc *sc, int if_id) ...@@ -204,10 +204,10 @@ static struct ath_buf *ath_beacon_generate(struct ath_softc *sc, int if_id)
/* /*
* if the CABQ traffic from previous DTIM is pending and the current * if the CABQ traffic from previous DTIM is pending and the current
* beacon is also a DTIM. * beacon is also a DTIM.
* 1) if there is only one vap let the cab traffic continue. * 1) if there is only one vif let the cab traffic continue.
* 2) if there are more than one vap and we are using staggered * 2) if there are more than one vif and we are using staggered
* beacons, then drain the cabq by dropping all the frames in * beacons, then drain the cabq by dropping all the frames in
* the cabq so that the current vaps cab traffic can be scheduled. * the cabq so that the current vifs cab traffic can be scheduled.
*/ */
spin_lock_bh(&cabq->axq_lock); spin_lock_bh(&cabq->axq_lock);
cabq_depth = cabq->axq_depth; cabq_depth = cabq->axq_depth;
...@@ -219,7 +219,7 @@ static struct ath_buf *ath_beacon_generate(struct ath_softc *sc, int if_id) ...@@ -219,7 +219,7 @@ static struct ath_buf *ath_beacon_generate(struct ath_softc *sc, int if_id)
* the lock again which is a common function and that * the lock again which is a common function and that
* acquires txq lock inside. * acquires txq lock inside.
*/ */
if (sc->sc_nvaps > 1) { if (sc->nvifs > 1) {
ath_draintxq(sc, cabq, false); ath_draintxq(sc, cabq, false);
DPRINTF(sc, ATH_DBG_BEACON, DPRINTF(sc, ATH_DBG_BEACON,
"flush previous cabq traffic\n"); "flush previous cabq traffic\n");
...@@ -250,10 +250,10 @@ static void ath_beacon_start_adhoc(struct ath_softc *sc, int if_id) ...@@ -250,10 +250,10 @@ static void ath_beacon_start_adhoc(struct ath_softc *sc, int if_id)
struct ieee80211_vif *vif; struct ieee80211_vif *vif;
struct ath_hal *ah = sc->sc_ah; struct ath_hal *ah = sc->sc_ah;
struct ath_buf *bf; struct ath_buf *bf;
struct ath_vap *avp; struct ath_vif *avp;
struct sk_buff *skb; struct sk_buff *skb;
vif = sc->sc_vaps[if_id]; vif = sc->vifs[if_id];
ASSERT(vif); ASSERT(vif);
avp = (void *)vif->drv_priv; avp = (void *)vif->drv_priv;
...@@ -291,13 +291,13 @@ int ath_beaconq_setup(struct ath_hal *ah) ...@@ -291,13 +291,13 @@ int ath_beaconq_setup(struct ath_hal *ah)
int ath_beacon_alloc(struct ath_softc *sc, int if_id) int ath_beacon_alloc(struct ath_softc *sc, int if_id)
{ {
struct ieee80211_vif *vif; struct ieee80211_vif *vif;
struct ath_vap *avp; struct ath_vif *avp;
struct ieee80211_hdr *hdr; struct ieee80211_hdr *hdr;
struct ath_buf *bf; struct ath_buf *bf;
struct sk_buff *skb; struct sk_buff *skb;
__le64 tstamp; __le64 tstamp;
vif = sc->sc_vaps[if_id]; vif = sc->vifs[if_id];
ASSERT(vif); ASSERT(vif);
avp = (void *)vif->drv_priv; avp = (void *)vif->drv_priv;
...@@ -314,7 +314,7 @@ int ath_beacon_alloc(struct ath_softc *sc, int if_id) ...@@ -314,7 +314,7 @@ int ath_beacon_alloc(struct ath_softc *sc, int if_id)
!(sc->sc_ah->ah_caps.hw_caps & ATH9K_HW_CAP_VEOL)) { !(sc->sc_ah->ah_caps.hw_caps & ATH9K_HW_CAP_VEOL)) {
int slot; int slot;
/* /*
* Assign the vap to a beacon xmit slot. As * Assign the vif to a beacon xmit slot. As
* above, this cannot fail to find one. * above, this cannot fail to find one.
*/ */
avp->av_bslot = 0; avp->av_bslot = 0;
...@@ -335,7 +335,7 @@ int ath_beacon_alloc(struct ath_softc *sc, int if_id) ...@@ -335,7 +335,7 @@ int ath_beacon_alloc(struct ath_softc *sc, int if_id)
} }
BUG_ON(sc->beacon.bslot[avp->av_bslot] != ATH_IF_ID_ANY); BUG_ON(sc->beacon.bslot[avp->av_bslot] != ATH_IF_ID_ANY);
sc->beacon.bslot[avp->av_bslot] = if_id; sc->beacon.bslot[avp->av_bslot] = if_id;
sc->sc_nbcnvaps++; sc->nbcnvifs++;
} }
} }
...@@ -384,8 +384,8 @@ int ath_beacon_alloc(struct ath_softc *sc, int if_id) ...@@ -384,8 +384,8 @@ int ath_beacon_alloc(struct ath_softc *sc, int if_id)
* timestamp then convert to TSF units and handle * timestamp then convert to TSF units and handle
* byte swapping before writing it in the frame. * byte swapping before writing it in the frame.
* The hardware will then add this each time a beacon * The hardware will then add this each time a beacon
* frame is sent. Note that we align vap's 1..N * frame is sent. Note that we align vif's 1..N
* and leave vap 0 untouched. This means vap 0 * and leave vif 0 untouched. This means vap 0
* has a timestamp in one beacon interval while the * has a timestamp in one beacon interval while the
* others get a timestamp aligned to the next interval. * others get a timestamp aligned to the next interval.
*/ */
...@@ -416,14 +416,14 @@ int ath_beacon_alloc(struct ath_softc *sc, int if_id) ...@@ -416,14 +416,14 @@ int ath_beacon_alloc(struct ath_softc *sc, int if_id)
return 0; return 0;
} }
void ath_beacon_return(struct ath_softc *sc, struct ath_vap *avp) void ath_beacon_return(struct ath_softc *sc, struct ath_vif *avp)
{ {
if (avp->av_bcbuf != NULL) { if (avp->av_bcbuf != NULL) {
struct ath_buf *bf; struct ath_buf *bf;
if (avp->av_bslot != -1) { if (avp->av_bslot != -1) {
sc->beacon.bslot[avp->av_bslot] = ATH_IF_ID_ANY; sc->beacon.bslot[avp->av_bslot] = ATH_IF_ID_ANY;
sc->sc_nbcnvaps--; sc->nbcnvifs--;
} }
bf = avp->av_bcbuf; bf = avp->av_bcbuf;
...@@ -597,7 +597,7 @@ void ath9k_beacon_tasklet(unsigned long data) ...@@ -597,7 +597,7 @@ void ath9k_beacon_tasklet(unsigned long data)
ath9k_hw_puttxbuf(ah, sc->beacon.beaconq, bfaddr); ath9k_hw_puttxbuf(ah, sc->beacon.beaconq, bfaddr);
ath9k_hw_txstart(ah, sc->beacon.beaconq); ath9k_hw_txstart(ah, sc->beacon.beaconq);
sc->beacon.ast_be_xmit += bc; /* XXX per-vap? */ sc->beacon.ast_be_xmit += bc; /* XXX per-vif? */
} }
} }
...@@ -621,12 +621,12 @@ void ath_beacon_config(struct ath_softc *sc, int if_id) ...@@ -621,12 +621,12 @@ void ath_beacon_config(struct ath_softc *sc, int if_id)
struct ieee80211_vif *vif; struct ieee80211_vif *vif;
struct ath_hal *ah = sc->sc_ah; struct ath_hal *ah = sc->sc_ah;
struct ath_beacon_config conf; struct ath_beacon_config conf;
struct ath_vap *avp; struct ath_vif *avp;
enum nl80211_iftype opmode; enum nl80211_iftype opmode;
u32 nexttbtt, intval; u32 nexttbtt, intval;
if (if_id != ATH_IF_ID_ANY) { if (if_id != ATH_IF_ID_ANY) {
vif = sc->sc_vaps[if_id]; vif = sc->vifs[if_id];
ASSERT(vif); ASSERT(vif);
avp = (void *)vif->drv_priv; avp = (void *)vif->drv_priv;
opmode = avp->av_opmode; opmode = avp->av_opmode;
...@@ -781,8 +781,8 @@ void ath_beacon_config(struct ath_softc *sc, int if_id) ...@@ -781,8 +781,8 @@ void ath_beacon_config(struct ath_softc *sc, int if_id)
ath9k_hw_set_interrupts(ah, 0); ath9k_hw_set_interrupts(ah, 0);
ath9k_hw_set_sta_beacon_timers(ah, &bs); ath9k_hw_set_sta_beacon_timers(ah, &bs);
sc->sc_imask |= ATH9K_INT_BMISS; sc->imask |= ATH9K_INT_BMISS;
ath9k_hw_set_interrupts(ah, sc->sc_imask); ath9k_hw_set_interrupts(ah, sc->imask);
} else { } else {
u64 tsf; u64 tsf;
u32 tsftu; u32 tsftu;
...@@ -819,7 +819,7 @@ void ath_beacon_config(struct ath_softc *sc, int if_id) ...@@ -819,7 +819,7 @@ void ath_beacon_config(struct ath_softc *sc, int if_id)
*/ */
intval |= ATH9K_BEACON_ENA; intval |= ATH9K_BEACON_ENA;
if (!(ah->ah_caps.hw_caps & ATH9K_HW_CAP_VEOL)) if (!(ah->ah_caps.hw_caps & ATH9K_HW_CAP_VEOL))
sc->sc_imask |= ATH9K_INT_SWBA; sc->imask |= ATH9K_INT_SWBA;
ath_beaconq_config(sc); ath_beaconq_config(sc);
} else if (sc->sc_ah->ah_opmode == NL80211_IFTYPE_AP) { } else if (sc->sc_ah->ah_opmode == NL80211_IFTYPE_AP) {
/* /*
...@@ -827,12 +827,12 @@ void ath_beacon_config(struct ath_softc *sc, int if_id) ...@@ -827,12 +827,12 @@ void ath_beacon_config(struct ath_softc *sc, int if_id)
* SWBA interrupts to prepare beacon frames. * SWBA interrupts to prepare beacon frames.
*/ */
intval |= ATH9K_BEACON_ENA; intval |= ATH9K_BEACON_ENA;
sc->sc_imask |= ATH9K_INT_SWBA; /* beacon prepare */ sc->imask |= ATH9K_INT_SWBA; /* beacon prepare */
ath_beaconq_config(sc); ath_beaconq_config(sc);
} }
ath9k_hw_beaconinit(ah, nexttbtt, intval); ath9k_hw_beaconinit(ah, nexttbtt, intval);
sc->beacon.bmisscnt = 0; sc->beacon.bmisscnt = 0;
ath9k_hw_set_interrupts(ah, sc->sc_imask); ath9k_hw_set_interrupts(ah, sc->imask);
/* /*
* When using a self-linked beacon descriptor in * When using a self-linked beacon descriptor in
* ibss mode load it once here. * ibss mode load it once here.
......
...@@ -24,7 +24,7 @@ void DPRINTF(struct ath_softc *sc, int dbg_mask, const char *fmt, ...) ...@@ -24,7 +24,7 @@ void DPRINTF(struct ath_softc *sc, int dbg_mask, const char *fmt, ...)
if (!sc) if (!sc)
return; return;
if (sc->sc_debug.debug_mask & dbg_mask) { if (sc->debug.debug_mask & dbg_mask) {
va_list args; va_list args;
va_start(args, fmt); va_start(args, fmt);
...@@ -130,41 +130,41 @@ static const struct file_operations fops_dma = { ...@@ -130,41 +130,41 @@ static const struct file_operations fops_dma = {
void ath_debug_stat_interrupt(struct ath_softc *sc, enum ath9k_int status) void ath_debug_stat_interrupt(struct ath_softc *sc, enum ath9k_int status)
{ {
if (status) if (status)
sc->sc_debug.stats.istats.total++; sc->debug.stats.istats.total++;
if (status & ATH9K_INT_RX) if (status & ATH9K_INT_RX)
sc->sc_debug.stats.istats.rxok++; sc->debug.stats.istats.rxok++;
if (status & ATH9K_INT_RXEOL) if (status & ATH9K_INT_RXEOL)
sc->sc_debug.stats.istats.rxeol++; sc->debug.stats.istats.rxeol++;
if (status & ATH9K_INT_RXORN) if (status & ATH9K_INT_RXORN)
sc->sc_debug.stats.istats.rxorn++; sc->debug.stats.istats.rxorn++;
if (status & ATH9K_INT_TX) if (status & ATH9K_INT_TX)
sc->sc_debug.stats.istats.txok++; sc->debug.stats.istats.txok++;
if (status & ATH9K_INT_TXURN) if (status & ATH9K_INT_TXURN)
sc->sc_debug.stats.istats.txurn++; sc->debug.stats.istats.txurn++;
if (status & ATH9K_INT_MIB) if (status & ATH9K_INT_MIB)
sc->sc_debug.stats.istats.mib++; sc->debug.stats.istats.mib++;
if (status & ATH9K_INT_RXPHY) if (status & ATH9K_INT_RXPHY)
sc->sc_debug.stats.istats.rxphyerr++; sc->debug.stats.istats.rxphyerr++;
if (status & ATH9K_INT_RXKCM) if (status & ATH9K_INT_RXKCM)
sc->sc_debug.stats.istats.rx_keycache_miss++; sc->debug.stats.istats.rx_keycache_miss++;
if (status & ATH9K_INT_SWBA) if (status & ATH9K_INT_SWBA)
sc->sc_debug.stats.istats.swba++; sc->debug.stats.istats.swba++;
if (status & ATH9K_INT_BMISS) if (status & ATH9K_INT_BMISS)
sc->sc_debug.stats.istats.bmiss++; sc->debug.stats.istats.bmiss++;
if (status & ATH9K_INT_BNR) if (status & ATH9K_INT_BNR)
sc->sc_debug.stats.istats.bnr++; sc->debug.stats.istats.bnr++;
if (status & ATH9K_INT_CST) if (status & ATH9K_INT_CST)
sc->sc_debug.stats.istats.cst++; sc->debug.stats.istats.cst++;
if (status & ATH9K_INT_GTT) if (status & ATH9K_INT_GTT)
sc->sc_debug.stats.istats.gtt++; sc->debug.stats.istats.gtt++;
if (status & ATH9K_INT_TIM) if (status & ATH9K_INT_TIM)
sc->sc_debug.stats.istats.tim++; sc->debug.stats.istats.tim++;
if (status & ATH9K_INT_CABEND) if (status & ATH9K_INT_CABEND)
sc->sc_debug.stats.istats.cabend++; sc->debug.stats.istats.cabend++;
if (status & ATH9K_INT_DTIMSYNC) if (status & ATH9K_INT_DTIMSYNC)
sc->sc_debug.stats.istats.dtimsync++; sc->debug.stats.istats.dtimsync++;
if (status & ATH9K_INT_DTIM) if (status & ATH9K_INT_DTIM)
sc->sc_debug.stats.istats.dtim++; sc->debug.stats.istats.dtim++;
} }
static ssize_t read_file_interrupt(struct file *file, char __user *user_buf, static ssize_t read_file_interrupt(struct file *file, char __user *user_buf,
...@@ -175,41 +175,41 @@ static ssize_t read_file_interrupt(struct file *file, char __user *user_buf, ...@@ -175,41 +175,41 @@ static ssize_t read_file_interrupt(struct file *file, char __user *user_buf,
unsigned int len = 0; unsigned int len = 0;
len += snprintf(buf + len, sizeof(buf) - len, len += snprintf(buf + len, sizeof(buf) - len,
"%8s: %10u\n", "RX", sc->sc_debug.stats.istats.rxok); "%8s: %10u\n", "RX", sc->debug.stats.istats.rxok);
len += snprintf(buf + len, sizeof(buf) - len, len += snprintf(buf + len, sizeof(buf) - len,
"%8s: %10u\n", "RXEOL", sc->sc_debug.stats.istats.rxeol); "%8s: %10u\n", "RXEOL", sc->debug.stats.istats.rxeol);
len += snprintf(buf + len, sizeof(buf) - len, len += snprintf(buf + len, sizeof(buf) - len,
"%8s: %10u\n", "RXORN", sc->sc_debug.stats.istats.rxorn); "%8s: %10u\n", "RXORN", sc->debug.stats.istats.rxorn);
len += snprintf(buf + len, sizeof(buf) - len, len += snprintf(buf + len, sizeof(buf) - len,
"%8s: %10u\n", "TX", sc->sc_debug.stats.istats.txok); "%8s: %10u\n", "TX", sc->debug.stats.istats.txok);
len += snprintf(buf + len, sizeof(buf) - len, len += snprintf(buf + len, sizeof(buf) - len,
"%8s: %10u\n", "TXURN", sc->sc_debug.stats.istats.txurn); "%8s: %10u\n", "TXURN", sc->debug.stats.istats.txurn);
len += snprintf(buf + len, sizeof(buf) - len, len += snprintf(buf + len, sizeof(buf) - len,
"%8s: %10u\n", "MIB", sc->sc_debug.stats.istats.mib); "%8s: %10u\n", "MIB", sc->debug.stats.istats.mib);
len += snprintf(buf + len, sizeof(buf) - len, len += snprintf(buf + len, sizeof(buf) - len,
"%8s: %10u\n", "RXPHY", sc->sc_debug.stats.istats.rxphyerr); "%8s: %10u\n", "RXPHY", sc->debug.stats.istats.rxphyerr);
len += snprintf(buf + len, sizeof(buf) - len, len += snprintf(buf + len, sizeof(buf) - len,
"%8s: %10u\n", "RXKCM", sc->sc_debug.stats.istats.rx_keycache_miss); "%8s: %10u\n", "RXKCM", sc->debug.stats.istats.rx_keycache_miss);
len += snprintf(buf + len, sizeof(buf) - len, len += snprintf(buf + len, sizeof(buf) - len,
"%8s: %10u\n", "SWBA", sc->sc_debug.stats.istats.swba); "%8s: %10u\n", "SWBA", sc->debug.stats.istats.swba);
len += snprintf(buf + len, sizeof(buf) - len, len += snprintf(buf + len, sizeof(buf) - len,
"%8s: %10u\n", "BMISS", sc->sc_debug.stats.istats.bmiss); "%8s: %10u\n", "BMISS", sc->debug.stats.istats.bmiss);
len += snprintf(buf + len, sizeof(buf) - len, len += snprintf(buf + len, sizeof(buf) - len,
"%8s: %10u\n", "BNR", sc->sc_debug.stats.istats.bnr); "%8s: %10u\n", "BNR", sc->debug.stats.istats.bnr);
len += snprintf(buf + len, sizeof(buf) - len, len += snprintf(buf + len, sizeof(buf) - len,
"%8s: %10u\n", "CST", sc->sc_debug.stats.istats.cst); "%8s: %10u\n", "CST", sc->debug.stats.istats.cst);
len += snprintf(buf + len, sizeof(buf) - len, len += snprintf(buf + len, sizeof(buf) - len,
"%8s: %10u\n", "GTT", sc->sc_debug.stats.istats.gtt); "%8s: %10u\n", "GTT", sc->debug.stats.istats.gtt);
len += snprintf(buf + len, sizeof(buf) - len, len += snprintf(buf + len, sizeof(buf) - len,
"%8s: %10u\n", "TIM", sc->sc_debug.stats.istats.tim); "%8s: %10u\n", "TIM", sc->debug.stats.istats.tim);
len += snprintf(buf + len, sizeof(buf) - len, len += snprintf(buf + len, sizeof(buf) - len,
"%8s: %10u\n", "CABEND", sc->sc_debug.stats.istats.cabend); "%8s: %10u\n", "CABEND", sc->debug.stats.istats.cabend);
len += snprintf(buf + len, sizeof(buf) - len, len += snprintf(buf + len, sizeof(buf) - len,
"%8s: %10u\n", "DTIMSYNC", sc->sc_debug.stats.istats.dtimsync); "%8s: %10u\n", "DTIMSYNC", sc->debug.stats.istats.dtimsync);
len += snprintf(buf + len, sizeof(buf) - len, len += snprintf(buf + len, sizeof(buf) - len,
"%8s: %10u\n", "DTIM", sc->sc_debug.stats.istats.dtim); "%8s: %10u\n", "DTIM", sc->debug.stats.istats.dtim);
len += snprintf(buf + len, sizeof(buf) - len, len += snprintf(buf + len, sizeof(buf) - len,
"%8s: %10u\n", "TOTAL", sc->sc_debug.stats.istats.total); "%8s: %10u\n", "TOTAL", sc->debug.stats.istats.total);
return simple_read_from_buffer(user_buf, count, ppos, buf, len); return simple_read_from_buffer(user_buf, count, ppos, buf, len);
} }
...@@ -231,7 +231,7 @@ static void ath_debug_stat_11n_rc(struct ath_softc *sc, struct sk_buff *skb) ...@@ -231,7 +231,7 @@ static void ath_debug_stat_11n_rc(struct ath_softc *sc, struct sk_buff *skb)
final_ts_idx = tx_info_priv->tx.ts_rateindex; final_ts_idx = tx_info_priv->tx.ts_rateindex;
idx = sc->cur_rate_table->info[rates[final_ts_idx].idx].dot11rate; idx = sc->cur_rate_table->info[rates[final_ts_idx].idx].dot11rate;
sc->sc_debug.stats.n_rcstats[idx].success++; sc->debug.stats.n_rcstats[idx].success++;
} }
static void ath_debug_stat_legacy_rc(struct ath_softc *sc, struct sk_buff *skb) static void ath_debug_stat_legacy_rc(struct ath_softc *sc, struct sk_buff *skb)
...@@ -245,7 +245,7 @@ static void ath_debug_stat_legacy_rc(struct ath_softc *sc, struct sk_buff *skb) ...@@ -245,7 +245,7 @@ static void ath_debug_stat_legacy_rc(struct ath_softc *sc, struct sk_buff *skb)
final_ts_idx = tx_info_priv->tx.ts_rateindex; final_ts_idx = tx_info_priv->tx.ts_rateindex;
idx = rates[final_ts_idx].idx; idx = rates[final_ts_idx].idx;
sc->sc_debug.stats.legacy_rcstats[idx].success++; sc->debug.stats.legacy_rcstats[idx].success++;
} }
void ath_debug_stat_rc(struct ath_softc *sc, struct sk_buff *skb) void ath_debug_stat_rc(struct ath_softc *sc, struct sk_buff *skb)
...@@ -263,8 +263,8 @@ void ath_debug_stat_retries(struct ath_softc *sc, int rix, ...@@ -263,8 +263,8 @@ void ath_debug_stat_retries(struct ath_softc *sc, int rix,
if (conf_is_ht(&sc->hw->conf)) { if (conf_is_ht(&sc->hw->conf)) {
int idx = sc->cur_rate_table->info[rix].dot11rate; int idx = sc->cur_rate_table->info[rix].dot11rate;
sc->sc_debug.stats.n_rcstats[idx].xretries += xretries; sc->debug.stats.n_rcstats[idx].xretries += xretries;
sc->sc_debug.stats.n_rcstats[idx].retries += retries; sc->debug.stats.n_rcstats[idx].retries += retries;
} }
} }
...@@ -283,9 +283,9 @@ static ssize_t ath_read_file_stat_11n_rc(struct file *file, ...@@ -283,9 +283,9 @@ static ssize_t ath_read_file_stat_11n_rc(struct file *file,
for (i = 0; i <= 15; i++) { for (i = 0; i <= 15; i++) {
len += snprintf(buf + len, sizeof(buf) - len, len += snprintf(buf + len, sizeof(buf) - len,
"%5s%3d: %8u %8u %8u\n", "MCS", i, "%5s%3d: %8u %8u %8u\n", "MCS", i,
sc->sc_debug.stats.n_rcstats[i].success, sc->debug.stats.n_rcstats[i].success,
sc->sc_debug.stats.n_rcstats[i].retries, sc->debug.stats.n_rcstats[i].retries,
sc->sc_debug.stats.n_rcstats[i].xretries); sc->debug.stats.n_rcstats[i].xretries);
} }
return simple_read_from_buffer(user_buf, count, ppos, buf, len); return simple_read_from_buffer(user_buf, count, ppos, buf, len);
...@@ -305,7 +305,7 @@ static ssize_t ath_read_file_stat_legacy_rc(struct file *file, ...@@ -305,7 +305,7 @@ static ssize_t ath_read_file_stat_legacy_rc(struct file *file,
for (i = 0; i < sc->cur_rate_table->rate_cnt; i++) { for (i = 0; i < sc->cur_rate_table->rate_cnt; i++) {
len += snprintf(buf + len, sizeof(buf) - len, "%5u: %12u\n", len += snprintf(buf + len, sizeof(buf) - len, "%5u: %12u\n",
sc->cur_rate_table->info[i].ratekbps / 1000, sc->cur_rate_table->info[i].ratekbps / 1000,
sc->sc_debug.stats.legacy_rcstats[i].success); sc->debug.stats.legacy_rcstats[i].success);
} }
return simple_read_from_buffer(user_buf, count, ppos, buf, len); return simple_read_from_buffer(user_buf, count, ppos, buf, len);
...@@ -330,34 +330,34 @@ static const struct file_operations fops_rcstat = { ...@@ -330,34 +330,34 @@ static const struct file_operations fops_rcstat = {
int ath9k_init_debug(struct ath_softc *sc) int ath9k_init_debug(struct ath_softc *sc)
{ {
sc->sc_debug.debug_mask = ath9k_debug; sc->debug.debug_mask = ath9k_debug;
sc->sc_debug.debugfs_root = debugfs_create_dir(KBUILD_MODNAME, NULL); sc->debug.debugfs_root = debugfs_create_dir(KBUILD_MODNAME, NULL);
if (!sc->sc_debug.debugfs_root) if (!sc->debug.debugfs_root)
goto err; goto err;
sc->sc_debug.debugfs_phy = debugfs_create_dir(wiphy_name(sc->hw->wiphy), sc->debug.debugfs_phy = debugfs_create_dir(wiphy_name(sc->hw->wiphy),
sc->sc_debug.debugfs_root); sc->debug.debugfs_root);
if (!sc->sc_debug.debugfs_phy) if (!sc->debug.debugfs_phy)
goto err; goto err;
sc->sc_debug.debugfs_dma = debugfs_create_file("dma", S_IRUGO, sc->debug.debugfs_dma = debugfs_create_file("dma", S_IRUGO,
sc->sc_debug.debugfs_phy, sc, &fops_dma); sc->debug.debugfs_phy, sc, &fops_dma);
if (!sc->sc_debug.debugfs_dma) if (!sc->debug.debugfs_dma)
goto err; goto err;
sc->sc_debug.debugfs_interrupt = debugfs_create_file("interrupt", sc->debug.debugfs_interrupt = debugfs_create_file("interrupt",
S_IRUGO, S_IRUGO,
sc->sc_debug.debugfs_phy, sc->debug.debugfs_phy,
sc, &fops_interrupt); sc, &fops_interrupt);
if (!sc->sc_debug.debugfs_interrupt) if (!sc->debug.debugfs_interrupt)
goto err; goto err;
sc->sc_debug.debugfs_rcstat = debugfs_create_file("rcstat", sc->debug.debugfs_rcstat = debugfs_create_file("rcstat",
S_IRUGO, S_IRUGO,
sc->sc_debug.debugfs_phy, sc->debug.debugfs_phy,
sc, &fops_rcstat); sc, &fops_rcstat);
if (!sc->sc_debug.debugfs_rcstat) if (!sc->debug.debugfs_rcstat)
goto err; goto err;
return 0; return 0;
...@@ -368,9 +368,9 @@ int ath9k_init_debug(struct ath_softc *sc) ...@@ -368,9 +368,9 @@ int ath9k_init_debug(struct ath_softc *sc)
void ath9k_exit_debug(struct ath_softc *sc) void ath9k_exit_debug(struct ath_softc *sc)
{ {
debugfs_remove(sc->sc_debug.debugfs_rcstat); debugfs_remove(sc->debug.debugfs_rcstat);
debugfs_remove(sc->sc_debug.debugfs_interrupt); debugfs_remove(sc->debug.debugfs_interrupt);
debugfs_remove(sc->sc_debug.debugfs_dma); debugfs_remove(sc->debug.debugfs_dma);
debugfs_remove(sc->sc_debug.debugfs_phy); debugfs_remove(sc->debug.debugfs_phy);
debugfs_remove(sc->sc_debug.debugfs_root); debugfs_remove(sc->debug.debugfs_root);
} }
...@@ -2158,9 +2158,9 @@ int ath9k_hw_reset(struct ath_hal *ah, struct ath9k_channel *chan, ...@@ -2158,9 +2158,9 @@ int ath9k_hw_reset(struct ath_hal *ah, struct ath9k_channel *chan,
u32 macStaId1; u32 macStaId1;
int i, rx_chainmask, r; int i, rx_chainmask, r;
ahp->ah_extprotspacing = sc->sc_ht_extprotspacing; ahp->ah_extprotspacing = sc->ht_extprotspacing;
ahp->ah_txchainmask = sc->sc_tx_chainmask; ahp->ah_txchainmask = sc->tx_chainmask;
ahp->ah_rxchainmask = sc->sc_rx_chainmask; ahp->ah_rxchainmask = sc->rx_chainmask;
if (AR_SREV_9285(ah)) { if (AR_SREV_9285(ah)) {
ahp->ah_txchainmask &= 0x1; ahp->ah_txchainmask &= 0x1;
......
This diff is collapsed.
...@@ -97,11 +97,11 @@ static struct sk_buff *ath_rxbuf_alloc(struct ath_softc *sc, u32 len) ...@@ -97,11 +97,11 @@ static struct sk_buff *ath_rxbuf_alloc(struct ath_softc *sc, u32 len)
* Unfortunately this means we may get 8 KB here from the * Unfortunately this means we may get 8 KB here from the
* kernel... and that is actually what is observed on some * kernel... and that is actually what is observed on some
* systems :( */ * systems :( */
skb = dev_alloc_skb(len + sc->sc_cachelsz - 1); skb = dev_alloc_skb(len + sc->cachelsz - 1);
if (skb != NULL) { if (skb != NULL) {
off = ((unsigned long) skb->data) % sc->sc_cachelsz; off = ((unsigned long) skb->data) % sc->cachelsz;
if (off != 0) if (off != 0)
skb_reserve(skb, sc->sc_cachelsz - off); skb_reserve(skb, sc->cachelsz - off);
} else { } else {
DPRINTF(sc, ATH_DBG_FATAL, DPRINTF(sc, ATH_DBG_FATAL,
"skbuff alloc of size %u failed\n", len); "skbuff alloc of size %u failed\n", len);
...@@ -210,7 +210,7 @@ static int ath_rx_prepare(struct sk_buff *skb, struct ath_desc *ds, ...@@ -210,7 +210,7 @@ static int ath_rx_prepare(struct sk_buff *skb, struct ath_desc *ds,
rx_status->mactime = ath_extend_tsf(sc, ds->ds_rxstat.rs_tstamp); rx_status->mactime = ath_extend_tsf(sc, ds->ds_rxstat.rs_tstamp);
rx_status->band = sc->hw->conf.channel->band; rx_status->band = sc->hw->conf.channel->band;
rx_status->freq = sc->hw->conf.channel->center_freq; rx_status->freq = sc->hw->conf.channel->center_freq;
rx_status->noise = sc->sc_ani.sc_noise_floor; rx_status->noise = sc->ani.noise_floor;
rx_status->signal = rx_status->noise + ds->ds_rxstat.rs_rssi; rx_status->signal = rx_status->noise + ds->ds_rxstat.rs_rssi;
rx_status->antenna = ds->ds_rxstat.rs_antenna; rx_status->antenna = ds->ds_rxstat.rs_antenna;
...@@ -242,13 +242,13 @@ static void ath_opmode_init(struct ath_softc *sc) ...@@ -242,13 +242,13 @@ static void ath_opmode_init(struct ath_softc *sc)
/* configure bssid mask */ /* configure bssid mask */
if (ah->ah_caps.hw_caps & ATH9K_HW_CAP_BSSIDMASK) if (ah->ah_caps.hw_caps & ATH9K_HW_CAP_BSSIDMASK)
ath9k_hw_setbssidmask(ah, sc->sc_bssidmask); ath9k_hw_setbssidmask(ah, sc->bssidmask);
/* configure operational mode */ /* configure operational mode */
ath9k_hw_setopmode(ah); ath9k_hw_setopmode(ah);
/* Handle any link-level address change. */ /* Handle any link-level address change. */
ath9k_hw_setmac(ah, sc->sc_myaddr); ath9k_hw_setmac(ah, sc->macaddr);
/* calculate and install multicast filter */ /* calculate and install multicast filter */
mfilt[0] = mfilt[1] = ~0; mfilt[0] = mfilt[1] = ~0;
...@@ -267,11 +267,11 @@ int ath_rx_init(struct ath_softc *sc, int nbufs) ...@@ -267,11 +267,11 @@ int ath_rx_init(struct ath_softc *sc, int nbufs)
spin_lock_init(&sc->rx.rxbuflock); spin_lock_init(&sc->rx.rxbuflock);
sc->rx.bufsize = roundup(IEEE80211_MAX_MPDU_LEN, sc->rx.bufsize = roundup(IEEE80211_MAX_MPDU_LEN,
min(sc->sc_cachelsz, min(sc->cachelsz,
(u16)64)); (u16)64));
DPRINTF(sc, ATH_DBG_CONFIG, "cachelsz %u rxbufsize %u\n", DPRINTF(sc, ATH_DBG_CONFIG, "cachelsz %u rxbufsize %u\n",
sc->sc_cachelsz, sc->rx.bufsize); sc->cachelsz, sc->rx.bufsize);
/* Initialize rx descriptors */ /* Initialize rx descriptors */
...@@ -593,7 +593,7 @@ int ath_rx_tasklet(struct ath_softc *sc, int flush) ...@@ -593,7 +593,7 @@ int ath_rx_tasklet(struct ath_softc *sc, int flush)
&& !decrypt_error && skb->len >= hdrlen + 4) { && !decrypt_error && skb->len >= hdrlen + 4) {
keyix = skb->data[hdrlen + 3] >> 6; keyix = skb->data[hdrlen + 3] >> 6;
if (test_bit(keyix, sc->sc_keymap)) if (test_bit(keyix, sc->keymap))
rx_status.flag |= RX_FLAG_DECRYPTED; rx_status.flag |= RX_FLAG_DECRYPTED;
} }
if (ah->sw_mgmt_crypto && if (ah->sw_mgmt_crypto &&
......
...@@ -970,14 +970,14 @@ int ath_cabq_update(struct ath_softc *sc) ...@@ -970,14 +970,14 @@ int ath_cabq_update(struct ath_softc *sc)
/* /*
* Ensure the readytime % is within the bounds. * Ensure the readytime % is within the bounds.
*/ */
if (sc->sc_config.cabqReadytime < ATH9K_READY_TIME_LO_BOUND) if (sc->config.cabqReadytime < ATH9K_READY_TIME_LO_BOUND)
sc->sc_config.cabqReadytime = ATH9K_READY_TIME_LO_BOUND; sc->config.cabqReadytime = ATH9K_READY_TIME_LO_BOUND;
else if (sc->sc_config.cabqReadytime > ATH9K_READY_TIME_HI_BOUND) else if (sc->config.cabqReadytime > ATH9K_READY_TIME_HI_BOUND)
sc->sc_config.cabqReadytime = ATH9K_READY_TIME_HI_BOUND; sc->config.cabqReadytime = ATH9K_READY_TIME_HI_BOUND;
ath_get_beaconconfig(sc, ATH_IF_ID_ANY, &conf); ath_get_beaconconfig(sc, ATH_IF_ID_ANY, &conf);
qi.tqi_readyTime = qi.tqi_readyTime =
(conf.beacon_interval * sc->sc_config.cabqReadytime) / 100; (conf.beacon_interval * sc->config.cabqReadytime) / 100;
ath_txq_update(sc, qnum, &qi); ath_txq_update(sc, qnum, &qi);
return 0; return 0;
...@@ -1471,7 +1471,7 @@ static void ath_buf_set_rate(struct ath_softc *sc, struct ath_buf *bf) ...@@ -1471,7 +1471,7 @@ static void ath_buf_set_rate(struct ath_softc *sc, struct ath_buf *bf)
flags = ATH9K_TXDESC_RTSENA; flags = ATH9K_TXDESC_RTSENA;
/* FIXME: Handle aggregation protection */ /* FIXME: Handle aggregation protection */
if (sc->sc_config.ath_aggr_prot && if (sc->config.ath_aggr_prot &&
(!bf_isaggr(bf) || (bf_isaggr(bf) && bf->bf_al < 8192))) { (!bf_isaggr(bf) || (bf_isaggr(bf) && bf->bf_al < 8192))) {
flags = ATH9K_TXDESC_RTSENA; flags = ATH9K_TXDESC_RTSENA;
} }
...@@ -1486,7 +1486,7 @@ static void ath_buf_set_rate(struct ath_softc *sc, struct ath_buf *bf) ...@@ -1486,7 +1486,7 @@ static void ath_buf_set_rate(struct ath_softc *sc, struct ath_buf *bf)
rix = rates[i].idx; rix = rates[i].idx;
series[i].Tries = rates[i].count; series[i].Tries = rates[i].count;
series[i].ChSel = sc->sc_tx_chainmask; series[i].ChSel = sc->tx_chainmask;
if (rates[i].flags & IEEE80211_TX_RC_USE_SHORT_PREAMBLE) if (rates[i].flags & IEEE80211_TX_RC_USE_SHORT_PREAMBLE)
series[i].Rate = rt->info[rix].ratecode | series[i].Rate = rt->info[rix].ratecode |
...@@ -1513,7 +1513,7 @@ static void ath_buf_set_rate(struct ath_softc *sc, struct ath_buf *bf) ...@@ -1513,7 +1513,7 @@ static void ath_buf_set_rate(struct ath_softc *sc, struct ath_buf *bf)
!is_pspoll, ctsrate, !is_pspoll, ctsrate,
0, series, 4, flags); 0, series, 4, flags);
if (sc->sc_config.ath_aggr_prot && flags) if (sc->config.ath_aggr_prot && flags)
ath9k_hw_set11n_burstduration(sc->sc_ah, bf->bf_desc, 8192); ath9k_hw_set11n_burstduration(sc->sc_ah, bf->bf_desc, 8192);
} }
......
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