ath9k: Remove remaining occurrences of CONFIG_SLOW_ANT_DIV
[linux-2.6-block.git] / drivers / net / wireless / ath9k / core.h
index a500d177053400472d192b585cf97b39f8342380..0e3c225c749e1b4414ddf8bd935f36cdb3a1172b 100644 (file)
@@ -88,16 +88,66 @@ enum ATH_DEBUG {
 
 #ifdef CONFIG_ATH9K_DEBUG
 
+/**
+ * struct ath_interrupt_stats - Contains statistics about interrupts
+ * @total: Total no. of interrupts generated so far
+ * @rxok: RX with no errors
+ * @rxeol: RX with no more RXDESC available
+ * @rxorn: RX FIFO overrun
+ * @txok: TX completed at the requested rate
+ * @txurn: TX FIFO underrun
+ * @mib: MIB regs reaching its threshold
+ * @rxphyerr: RX with phy errors
+ * @rx_keycache_miss: RX with key cache misses
+ * @swba: Software Beacon Alert
+ * @bmiss: Beacon Miss
+ * @bnr: Beacon Not Ready
+ * @cst: Carrier Sense TImeout
+ * @gtt: Global TX Timeout
+ * @tim: RX beacon TIM occurrence
+ * @cabend: RX End of CAB traffic
+ * @dtimsync: DTIM sync lossage
+ * @dtim: RX Beacon with DTIM
+ */
+struct ath_interrupt_stats {
+       u32 total;
+       u32 rxok;
+       u32 rxeol;
+       u32 rxorn;
+       u32 txok;
+       u32 txeol;
+       u32 txurn;
+       u32 mib;
+       u32 rxphyerr;
+       u32 rx_keycache_miss;
+       u32 swba;
+       u32 bmiss;
+       u32 bnr;
+       u32 cst;
+       u32 gtt;
+       u32 tim;
+       u32 cabend;
+       u32 dtimsync;
+       u32 dtim;
+};
+
+struct ath_stats {
+       struct ath_interrupt_stats istats;
+};
+
 struct ath9k_debug {
        int debug_mask;
        struct dentry *debugfs_root;
        struct dentry *debugfs_phy;
        struct dentry *debugfs_dma;
+       struct dentry *debugfs_interrupt;
+       struct ath_stats stats;
 };
 
 void DPRINTF(struct ath_softc *sc, int dbg_mask, const char *fmt, ...);
 int ath9k_init_debug(struct ath_softc *sc);
 void ath9k_exit_debug(struct ath_softc *sc);
+void ath_debug_stat_interrupt(struct ath_softc *sc, enum ath9k_int status);
 
 #else
 
@@ -115,6 +165,11 @@ static inline void ath9k_exit_debug(struct ath_softc *sc)
 {
 }
 
+static inline void ath_debug_stat_interrupt(struct ath_softc *sc,
+                                           enum ath9k_int status)
+{
+}
+
 #endif /* CONFIG_ATH9K_DEBUG */
 
 struct ath_config {
@@ -489,7 +544,7 @@ struct ath_vap {
  * number of beacon intervals, the game's up.
  */
 #define BSTUCK_THRESH                  (9 * ATH_BCBUF)
-#define        ATH_BCBUF                       4
+#define        ATH_BCBUF                       1
 #define ATH_DEFAULT_BINTVAL            100 /* TU */
 #define ATH_DEFAULT_BMISS_LIMIT        10
 #define IEEE80211_MS_TO_TU(x)           (((x) * 1000) / 1024)
@@ -646,7 +701,6 @@ struct ath_softc {
        u8 sc_tx_chainmask;
        u8 sc_rx_chainmask;
        enum ath9k_int sc_imask;
-       enum wireless_mode sc_curmode;
        enum PROT_MODE sc_protmode;
 
        u8 sc_nbcnvaps;
@@ -661,9 +715,6 @@ struct ath_softc {
        enum ath9k_ht_extprotspacing sc_ht_extprotspacing;
        enum ath9k_ht_macmode tx_chan_width;
 
-#ifdef CONFIG_SLOW_ANT_DIV
-       struct ath_antdiv sc_antdiv;
-#endif
        enum {
                OK,             /* no change needed */
                UPDATE,         /* update pending */
@@ -702,6 +753,7 @@ struct ath_softc {
        /* Rate */
        struct ieee80211_rate rates[IEEE80211_NUM_BANDS][ATH_RATE_MAX];
        struct ath_rate_table *hw_rate_table[ATH9K_MODE_MAX];
+       struct ath_rate_table *cur_rate_table;
        u8 sc_protrix;
 
        /* Channel, Band */