]> git.karo-electronics.de Git - mv-sheeva.git/blobdiff - drivers/net/wireless/ath9k/ath9k.h
ath9k: Remove TIM from the interrupt mask
[mv-sheeva.git] / drivers / net / wireless / ath9k / ath9k.h
index b64be8e9a69029ba067b241de1a771f8a2060803..0ef89bb73f316ad551a9b3fd6a460b2fd4783fc0 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2008 Atheros Communications Inc.
+ * Copyright (c) 2008-2009 Atheros Communications Inc.
  *
  * Permission to use, copy, modify, and/or distribute this software for any
  * purpose with or without fee is hereby granted, provided that the above
@@ -53,11 +53,7 @@ struct ath_node;
 
 #define A_MAX(a, b) ((a) > (b) ? (a) : (b))
 
-#define ASSERT(exp) do {                       \
-               if (unlikely(!(exp))) {         \
-                       BUG();                  \
-               }                               \
-       } while (0)
+#define ASSERT(exp) BUG_ON(!(exp))
 
 #define TSF_TO_TU(_h,_l) \
        ((((u32)(_h)) << 22) | (((u32)(_l)) >> 10))
@@ -70,7 +66,6 @@ struct ath_config {
        u32 ath_aggr_prot;
        u16 txpowlimit;
        u8 cabqReadytime;
-       u8 swBeaconProcess;
 };
 
 /*************************/
@@ -78,13 +73,17 @@ struct ath_config {
 /*************************/
 
 #define ATH_TXBUF_RESET(_bf) do {                              \
-               (_bf)->bf_status = 0;                           \
+               (_bf)->bf_stale = false;                        \
                (_bf)->bf_lastbf = NULL;                        \
                (_bf)->bf_next = NULL;                          \
                memset(&((_bf)->bf_state), 0,                   \
                       sizeof(struct ath_buf_state));           \
        } while (0)
 
+#define ATH_RXBUF_RESET(_bf) do {              \
+               (_bf)->bf_stale = false;        \
+       } while (0)
+
 /**
  * enum buffer_type - Buffer type flags
  *
@@ -110,7 +109,7 @@ struct ath_buf_state {
        int bfs_seqno;
        int bfs_tidno;
        int bfs_retries;
-       u32 bf_type;
+       u8 bf_type;
        u32 bfs_keyix;
        enum ath9k_key_type bfs_keytype;
 };
@@ -134,26 +133,21 @@ struct ath_buf {
        struct ath_buf *bf_lastbf;      /* last buf of this unit (a frame or
                                           an aggregate) */
        struct ath_buf *bf_next;        /* next subframe in the aggregate */
-       void *bf_mpdu;                  /* enclosing frame structure */
+       struct sk_buff *bf_mpdu;        /* enclosing frame structure */
        struct ath_desc *bf_desc;       /* virtual addr of desc */
        dma_addr_t bf_daddr;            /* physical addr of desc */
        dma_addr_t bf_buf_addr;         /* physical addr of data buffer */
-       u32 bf_status;
+       bool bf_stale;
        u16 bf_flags;
        struct ath_buf_state bf_state;
        dma_addr_t bf_dmacontext;
 };
 
-#define ATH_RXBUF_RESET(_bf)    ((_bf)->bf_status = 0)
-#define ATH_BUFSTATUS_STALE     0x00000002
-
 struct ath_descdma {
-       const char *dd_name;
        struct ath_desc *dd_desc;
        dma_addr_t dd_desc_paddr;
        u32 dd_desc_len;
        struct ath_buf *dd_bufptr;
-       dma_addr_t dd_dmacontext;
 };
 
 int ath_descdma_setup(struct ath_softc *sc, struct ath_descdma *dd,
@@ -295,33 +289,9 @@ struct ath_tx_control {
        enum ath9k_internal_frame_type frame_type;
 };
 
-struct ath_xmit_status {
-       int retries;
-       int flags;
 #define ATH_TX_ERROR        0x01
 #define ATH_TX_XRETRY       0x02
 #define ATH_TX_BAR          0x04
-};
-
-/* All RSSI values are noise floor adjusted */
-struct ath_tx_stat {
-       int rssi;
-       int rssictl[ATH_MAX_ANTENNA];
-       int rssiextn[ATH_MAX_ANTENNA];
-       int rateieee;
-       int rateKbps;
-       int ratecode;
-       int flags;
-       u32 airtime;    /* time on air per final tx rate */
-};
-
-struct aggr_rifs_param {
-       int param_max_frames;
-       int param_max_len;
-       int param_rl;
-       int param_al;
-       struct ath_rc_series *param_rcs;
-};
 
 struct ath_node {
        struct ath_softc *an_sc;
@@ -390,6 +360,7 @@ void ath_tx_aggr_resume(struct ath_softc *sc, struct ieee80211_sta *sta, u16 tid
 
 struct ath_vif {
        int av_bslot;
+       __le64 tsf_adjust; /* TSF adjustment for staggered beacons */
        enum nl80211_iftype av_opmode;
        struct ath_buf *av_bcbuf;
        struct ath_tx_control av_btxctl;
@@ -406,7 +377,7 @@ struct ath_vif {
  * number of beacon intervals, the game's up.
  */
 #define BSTUCK_THRESH                  (9 * ATH_BCBUF)
-#define        ATH_BCBUF                       1
+#define        ATH_BCBUF                       4
 #define ATH_DEFAULT_BINTVAL            100 /* TU */
 #define ATH_DEFAULT_BMISS_LIMIT        10
 #define IEEE80211_MS_TO_TU(x)           (((x) * 1000) / 1024)
@@ -532,19 +503,18 @@ struct ath_rfkill {
 #define SC_OP_BEACONS           BIT(1)
 #define SC_OP_RXAGGR            BIT(2)
 #define SC_OP_TXAGGR            BIT(3)
-#define SC_OP_CHAINMASK_UPDATE  BIT(4)
-#define SC_OP_FULL_RESET        BIT(5)
-#define SC_OP_PREAMBLE_SHORT    BIT(6)
-#define SC_OP_PROTECT_ENABLE    BIT(7)
-#define SC_OP_RXFLUSH           BIT(8)
-#define SC_OP_LED_ASSOCIATED    BIT(9)
-#define SC_OP_RFKILL_REGISTERED BIT(10)
-#define SC_OP_RFKILL_SW_BLOCKED BIT(11)
-#define SC_OP_RFKILL_HW_BLOCKED BIT(12)
-#define SC_OP_WAIT_FOR_BEACON   BIT(13)
-#define SC_OP_LED_ON            BIT(14)
-#define SC_OP_SCANNING          BIT(15)
-#define SC_OP_TSF_RESET         BIT(16)
+#define SC_OP_FULL_RESET        BIT(4)
+#define SC_OP_PREAMBLE_SHORT    BIT(5)
+#define SC_OP_PROTECT_ENABLE    BIT(6)
+#define SC_OP_RXFLUSH           BIT(7)
+#define SC_OP_LED_ASSOCIATED    BIT(8)
+#define SC_OP_RFKILL_REGISTERED BIT(9)
+#define SC_OP_RFKILL_SW_BLOCKED BIT(10)
+#define SC_OP_RFKILL_HW_BLOCKED BIT(11)
+#define SC_OP_WAIT_FOR_BEACON   BIT(12)
+#define SC_OP_LED_ON            BIT(13)
+#define SC_OP_SCANNING          BIT(14)
+#define SC_OP_TSF_RESET         BIT(15)
 
 struct ath_bus_ops {
        void            (*read_cachesize)(struct ath_softc *sc, int *csz);