ath9k: Nuke struct ath9k_node_stats
[pandora-kernel.git] / drivers / net / wireless / ath / ath9k / ath9k.h
index 751885a..7705da1 100644 (file)
@@ -25,6 +25,7 @@
 #include "hw.h"
 #include "rc.h"
 #include "debug.h"
+#include "../ath.h"
 
 struct ath_node;
 
@@ -190,12 +191,9 @@ void ath_descdma_cleanup(struct ath_softc *sc, struct ath_descdma *dd,
 #define ATH_AGGR_MIN_QDEPTH        2
 #define ATH_AMPDU_SUBFRAME_DEFAULT 32
 #define ATH_AMPDU_LIMIT_MAX        (64 * 1024 - 1)
-#define ATH_AMPDU_LIMIT_DEFAULT    ATH_AMPDU_LIMIT_MAX
 
 #define IEEE80211_SEQ_SEQ_SHIFT    4
 #define IEEE80211_SEQ_MAX          4096
-#define IEEE80211_MIN_AMPDU_BUF    0x8
-#define IEEE80211_HTCAP_MAXRXAMPDU_FACTOR 13
 #define IEEE80211_WEP_IVLEN        3
 #define IEEE80211_WEP_KIDLEN       1
 #define IEEE80211_WEP_CRCLEN       4
@@ -240,7 +238,6 @@ struct ath_txq {
        spinlock_t axq_lock;
        u32 axq_depth;
        u8 axq_aggr_depth;
-       u32 axq_totalqueued;
        bool stopped;
        bool axq_tx_inprogress;
        struct ath_buf *axq_linkbuf;
@@ -365,9 +362,9 @@ int ath_tx_start(struct ieee80211_hw *hw, struct sk_buff *skb,
 void ath_tx_tasklet(struct ath_softc *sc);
 void ath_tx_cabq(struct ieee80211_hw *hw, struct sk_buff *skb);
 bool ath_tx_aggr_check(struct ath_softc *sc, struct ath_node *an, u8 tidno);
-int ath_tx_aggr_start(struct ath_softc *sc, struct ieee80211_sta *sta,
-                     u16 tid, u16 *ssn);
-int ath_tx_aggr_stop(struct ath_softc *sc, struct ieee80211_sta *sta, u16 tid);
+void ath_tx_aggr_start(struct ath_softc *sc, struct ieee80211_sta *sta,
+                      u16 tid, u16 *ssn);
+void 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);
 
 /********/
@@ -457,7 +454,8 @@ struct ath_ani {
 /*   LED Control    */
 /********************/
 
-#define ATH_LED_PIN    1
+#define ATH_LED_PIN_DEF                1
+#define ATH_LED_PIN_9287               8
 #define ATH_LED_ON_DURATION_IDLE       350     /* in msecs */
 #define ATH_LED_OFF_DURATION_IDLE      250     /* in msecs */
 
@@ -536,6 +534,8 @@ struct ath_softc {
        struct ieee80211_hw *hw;
        struct device *dev;
 
+       struct ath_common common;
+
        spinlock_t wiphy_lock; /* spinlock to protect ath_wiphy data */
        struct ath_wiphy *pri_wiphy;
        struct ath_wiphy **sec_wiphy; /* secondary wiphys (virtual radios); may
@@ -568,7 +568,6 @@ struct ath_softc {
        u32 sc_flags; /* SC_OP_* */
        u16 curtxpow;
        u16 curaid;
-       u16 cachelsz;
        u8 nbcnvifs;
        u16 nvifs;
        u8 tx_chainmask;
@@ -576,6 +575,7 @@ struct ath_softc {
        u32 keymax;
        DECLARE_BITMAP(keymap, ATH_KEYMAX);
        u8 splitmic;
+       bool ps_enabled;
        unsigned long ps_usecount;
        enum ath9k_int imask;
        enum ath9k_ht_extprotspacing ht_extprotspacing;
@@ -603,7 +603,6 @@ struct ath_softc {
        int beacon_interval;
 
        struct ath_ani ani;
-       struct ath9k_node_stats nodestats;
 #ifdef CONFIG_ATH9K_DEBUG
        struct ath9k_debug debug;
 #endif
@@ -631,6 +630,16 @@ int ath_get_hal_qnum(u16 queue, struct ath_softc *sc);
 int ath_get_mac80211_qnum(u32 queue, struct ath_softc *sc);
 int ath_cabq_update(struct ath_softc *);
 
+static inline struct ath_common *ath9k_hw_common(struct ath_hw *ah)
+{
+       return &ah->ah_sc->common;
+}
+
+static inline struct ath_regulatory *ath9k_hw_regulatory(struct ath_hw *ah)
+{
+       return &(ath9k_hw_common(ah)->regulatory);
+}
+
 static inline void ath_read_cachesize(struct ath_softc *sc, int *csz)
 {
        sc->bus_ops->read_cachesize(sc, csz);
@@ -645,7 +654,7 @@ extern struct ieee80211_ops ath9k_ops;
 
 irqreturn_t ath_isr(int irq, void *dev);
 void ath_cleanup(struct ath_softc *sc);
-int ath_attach(u16 devid, struct ath_softc *sc);
+int ath_init_device(u16 devid, struct ath_softc *sc);
 void ath_detach(struct ath_softc *sc);
 const char *ath_mac_bb_name(u32 mac_bb_version);
 const char *ath_rf_name(u16 rf_version);