ath9k: Enable dynamic power save in ath9k.
[pandora-kernel.git] / drivers / net / wireless / ath9k / ath9k.h
index 5b9bc54..0b305b8 100644 (file)
@@ -26,6 +26,7 @@
 #define AR9160_DEVID_PCI       0x0027
 #define AR9280_DEVID_PCI       0x0029
 #define AR9280_DEVID_PCIE      0x002a
+#define AR9285_DEVID_PCIE      0x002b
 
 #define AR5416_AR9100_DEVID    0x000b
 
@@ -197,6 +198,7 @@ enum ath9k_hw_caps {
        ATH9K_HW_CAP_AUTOSLEEP                  = BIT(19),
        ATH9K_HW_CAP_4KB_SPLITTRANS             = BIT(20),
        ATH9K_HW_CAP_WOW_MATCHPATTERN_EXACT     = BIT(21),
+       ATH9K_HW_CAP_BT_COEX                    = BIT(22)
 };
 
 enum ath9k_capability_type {
@@ -452,6 +454,7 @@ struct ath9k_11n_rate_series {
         CHANNEL_HT40MINUS)
 
 struct ath9k_channel {
+       struct ieee80211_channel *chan;
        u16 channel;
        u32 channelFlags;
        u8 privFlags;
@@ -647,13 +650,6 @@ enum ath9k_ant_setting {
        ATH9K_ANT_FIXED_B
 };
 
-enum ath9k_opmode {
-       ATH9K_M_STA = 1,
-       ATH9K_M_IBSS = 0,
-       ATH9K_M_HOSTAP = 6,
-       ATH9K_M_MONITOR = 8
-};
-
 #define ATH9K_SLOT_TIME_6 6
 #define ATH9K_SLOT_TIME_9 9
 #define ATH9K_SLOT_TIME_20 20
@@ -757,6 +753,7 @@ struct ath9k_node_stats {
 #define AR_GPIO_OUTPUT_MUX_AS_OUTPUT             0
 #define AR_GPIO_OUTPUT_MUX_AS_PCIE_ATTENTION_LED 1
 #define AR_GPIO_OUTPUT_MUX_AS_PCIE_POWER_LED     2
+#define AR_GPIO_OUTPUT_MUX_AS_TX_FRAME           3
 #define AR_GPIO_OUTPUT_MUX_AS_MAC_NETWORK_LED    5
 #define AR_GPIO_OUTPUT_MUX_AS_MAC_POWER_LED      6
 
@@ -780,7 +777,8 @@ struct ath_hal {
 
        void __iomem *ah_sh;
        struct ath_softc *ah_sc;
-       enum ath9k_opmode ah_opmode;
+
+       enum nl80211_iftype ah_opmode;
        struct ath9k_ops_config ah_config;
        struct ath9k_hw_capabilities ah_caps;
 
@@ -795,6 +793,8 @@ struct ath_hal {
        u16 ah_currentRD5G;
        u16 ah_currentRD2G;
        char ah_iso[4];
+       enum ath9k_power_mode ah_power_mode;
+       enum ath9k_power_mode ah_restore_mode;
 
        struct ath9k_channel ah_channels[150];
        struct ath9k_channel *ah_curchan;
@@ -805,10 +805,14 @@ struct ath_hal {
        u16 ah_rfsilent;
        u32 ah_rfkill_gpio;
        u32 ah_rfkill_polarity;
+       u32 ah_btactive_gpio;
+       u32 ah_wlanactive_gpio;
 
 #ifndef ATH_NF_PER_CHAN
        struct ath9k_nfcal_hist nfCalHist[NUM_NF_READINGS];
 #endif
+
+       bool sw_mgmt_crypto;
 };
 
 struct chan_centers {
@@ -848,11 +852,8 @@ void ath9k_hw_rfdetach(struct ath_hal *ah);
 
 /* HW Reset */
 
-bool ath9k_hw_reset(struct ath_hal *ah, struct ath9k_channel *chan,
-                   enum ath9k_ht_macmode macmode,
-                   u8 txchainmask, u8 rxchainmask,
-                   enum ath9k_ht_extprotspacing extprotspacing,
-                   bool bChannelChange, int *status);
+int ath9k_hw_reset(struct ath_hal *ah, struct ath9k_channel *chan,
+                   bool bChannelChange);
 
 /* Key Cache Management */
 
@@ -956,8 +957,7 @@ void ath9k_hw_ani_detach(struct ath_hal *ah);
 
 /* Calibration */
 
-void ath9k_hw_reset_calvalid(struct ath_hal *ah, struct ath9k_channel *chan,
-                            bool *isCalDone);
+bool ath9k_hw_reset_calvalid(struct ath_hal *ah);
 void ath9k_hw_start_nfcal(struct ath_hal *ah);
 void ath9k_hw_loadnf(struct ath_hal *ah, struct ath9k_channel *chan);
 int16_t ath9k_hw_getnf(struct ath_hal *ah,
@@ -1009,7 +1009,6 @@ enum ath9k_int ath9k_hw_set_interrupts(struct ath_hal *ah, enum ath9k_int ints);
 
 /* MAC (PCU/QCU) */
 
-void ath9k_hw_dmaRegDump(struct ath_hal *ah);
 u32 ath9k_hw_gettxbuf(struct ath_hal *ah, u32 q);
 bool ath9k_hw_puttxbuf(struct ath_hal *ah, u32 q, u32 txdp);
 bool ath9k_hw_txstart(struct ath_hal *ah, u32 q);
@@ -1059,5 +1058,6 @@ void ath9k_hw_rxena(struct ath_hal *ah);
 void ath9k_hw_startpcureceive(struct ath_hal *ah);
 void ath9k_hw_stoppcurecv(struct ath_hal *ah);
 bool ath9k_hw_stopdmarecv(struct ath_hal *ah);
+void ath9k_hw_btcoex_enable(struct ath_hal *ah);
 
 #endif