Revert "ath9k: use split rx buffers to get rid of order-1 skb allocations"
[linux-flexiantxendom0-natty.git] / drivers / net / wireless / ath / ath9k / ath9k.h
index b1c45b8..1a7fa6e 100644 (file)
@@ -86,27 +86,19 @@ struct ath_config {
 /**
  * enum buffer_type - Buffer type flags
  *
- * @BUF_HT: Send this buffer using HT capabilities
  * @BUF_AMPDU: This buffer is an ampdu, as part of an aggregate (during TX)
  * @BUF_AGGR: Indicates whether the buffer can be aggregated
  *     (used in aggregation scheduling)
- * @BUF_RETRY: Indicates whether the buffer is retried
  * @BUF_XRETRY: To denote excessive retries of the buffer
  */
 enum buffer_type {
-       BUF_HT                  = BIT(1),
        BUF_AMPDU               = BIT(2),
        BUF_AGGR                = BIT(3),
-       BUF_RETRY               = BIT(4),
        BUF_XRETRY              = BIT(5),
 };
 
-#define bf_frmlen              bf_state.bfs_frmlen
-#define bf_retries             bf_state.bfs_retries
-#define bf_isht(bf)            (bf->bf_state.bf_type & BUF_HT)
 #define bf_isampdu(bf)         (bf->bf_state.bf_type & BUF_AMPDU)
 #define bf_isaggr(bf)          (bf->bf_state.bf_type & BUF_AGGR)
-#define bf_isretried(bf)       (bf->bf_state.bf_type & BUF_RETRY)
 #define bf_isxretried(bf)      (bf->bf_state.bf_type & BUF_XRETRY)
 
 #define ATH_TXSTATUS_RING_SIZE 64
@@ -194,6 +186,7 @@ struct ath_txq {
        struct list_head axq_q;
        spinlock_t axq_lock;
        u32 axq_depth;
+       u32 axq_ampdu_depth;
        bool stopped;
        bool axq_tx_inprogress;
        struct list_head axq_acq;
@@ -211,11 +204,18 @@ struct ath_atx_ac {
        struct list_head tid_q;
 };
 
+struct ath_frame_info {
+       int framelen;
+       u32 keyix;
+       enum ath9k_key_type keytype;
+       u8 retries;
+       u16 seqno;
+};
+
 struct ath_buf_state {
-       int bfs_retries;
        u8 bf_type;
        u8 bfs_paprd;
-       u16 bfs_frmlen;
+       unsigned long bfs_paprd_timestamp;
        enum ath9k_internal_frame_type bfs_ftype;
 };
 
@@ -229,7 +229,6 @@ struct ath_buf {
        dma_addr_t bf_daddr;            /* physical addr of desc */
        dma_addr_t bf_buf_addr; /* physical addr of data buffer, for DMA */
        bool bf_stale;
-       bool bf_tx_aborted;
        u16 bf_flags;
        struct ath_buf_state bf_state;
        struct ath_wiphy *aphy;
@@ -266,6 +265,7 @@ struct ath_node {
 
 struct ath_tx_control {
        struct ath_txq *txq;
+       struct ath_node *an;
        int if_id;
        enum ath9k_internal_frame_type frame_type;
        u8 paprd;
@@ -312,7 +312,7 @@ void ath_rx_cleanup(struct ath_softc *sc);
 int ath_rx_tasklet(struct ath_softc *sc, int flush, bool hp);
 struct ath_txq *ath_txq_setup(struct ath_softc *sc, int qtype, int subtype);
 void ath_tx_cleanupq(struct ath_softc *sc, struct ath_txq *txq);
-void ath_drain_all_txq(struct ath_softc *sc, bool retry_tx);
+bool ath_drain_all_txq(struct ath_softc *sc, bool retry_tx);
 void ath_draintxq(struct ath_softc *sc,
                     struct ath_txq *txq, bool retry_tx);
 void ath_tx_node_init(struct ath_softc *sc, struct ath_node *an);
@@ -326,7 +326,6 @@ int ath_tx_start(struct ieee80211_hw *hw, struct sk_buff *skb,
                 struct ath_tx_control *txctl);
 void ath_tx_tasklet(struct ath_softc *sc);
 void ath_tx_edma_tasklet(struct ath_softc *sc);
-void ath_tx_cabq(struct ieee80211_hw *hw, struct sk_buff *skb);
 int 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);
@@ -547,6 +546,7 @@ struct ath_ant_comb {
 #define SC_OP_BT_PRIORITY_DETECTED   BIT(12)
 #define SC_OP_BT_SCAN               BIT(13)
 #define SC_OP_ANI_RUN               BIT(14)
+#define SC_OP_ENABLE_APM            BIT(15)
 
 /* Powersave flags */
 #define PS_WAIT_FOR_BEACON        BIT(0)
@@ -591,7 +591,6 @@ struct ath_softc {
        struct work_struct paprd_work;
        struct work_struct hw_check_work;
        struct completion paprd_complete;
-       bool paprd_pending;
 
        u32 intrstatus;
        u32 sc_flags; /* SC_OP_* */
@@ -660,17 +659,18 @@ static inline void ath_read_cachesize(struct ath_common *common, int *csz)
 }
 
 extern struct ieee80211_ops ath9k_ops;
-extern int modparam_nohwcrypt;
+extern int ath9k_modparam_nohwcrypt;
 extern int led_blink;
+extern bool is_ath9k_unloaded;
 
 irqreturn_t ath_isr(int irq, void *dev);
+void ath9k_init_crypto(struct ath_softc *sc);
 int ath9k_init_device(u16 devid, struct ath_softc *sc, u16 subsysid,
                    const struct ath_bus_ops *bus_ops);
 void ath9k_deinit_device(struct ath_softc *sc);
 void ath9k_set_hw_capab(struct ath_softc *sc, struct ieee80211_hw *hw);
 void ath9k_update_ichannel(struct ath_softc *sc, struct ieee80211_hw *hw,
                           struct ath9k_channel *ichan);
-void ath_update_chainmask(struct ath_softc *sc, int is_ht);
 int ath_set_channel(struct ath_softc *sc, struct ieee80211_hw *hw,
                    struct ath9k_channel *hchan);
 
@@ -697,6 +697,8 @@ static inline void ath_ahb_exit(void) {};
 void ath9k_ps_wakeup(struct ath_softc *sc);
 void ath9k_ps_restore(struct ath_softc *sc);
 
+u8 ath_txchainmask_reduction(struct ath_softc *sc, u8 chainmask, u32 rate);
+
 void ath9k_set_bssid_mask(struct ieee80211_hw *hw, struct ieee80211_vif *vif);
 int ath9k_wiphy_add(struct ath_softc *sc);
 int ath9k_wiphy_del(struct ath_wiphy *aphy);