ath6kl: rename vif init and cleanup functions
[cascardo/linux.git] / drivers / net / wireless / ath / ath6kl / core.h
index 6d8a484..bdeb254 100644 (file)
 #define ATH6KL_MAX_ENDPOINTS   4
 #define MAX_NODE_NUM           15
 
+#define ATH6KL_APSD_ALL_FRAME          0xFFFF
+#define ATH6KL_APSD_NUM_OF_AC          0x4
+#define ATH6KL_APSD_FRAME_MASK         0xF
+
 /* Extra bytes for htc header alignment */
 #define ATH6KL_HTC_ALIGN_BYTES 3
 
@@ -55,7 +59,7 @@
 #define MAX_DEFAULT_SEND_QUEUE_DEPTH      (MAX_DEF_COOKIE_NUM / WMM_NUM_AC)
 
 #define DISCON_TIMER_INTVAL               10000  /* in msec */
-#define A_DEFAULT_LISTEN_INTERVAL         100
+#define A_DEFAULT_LISTEN_INTERVAL         1      /* beacon intervals */
 #define A_MAX_WOW_LISTEN_INTERVAL         1000
 
 /* includes also the null byte */
@@ -70,10 +74,20 @@ enum ath6kl_fw_ie_type {
        ATH6KL_FW_IE_RESERVED_RAM_SIZE = 5,
        ATH6KL_FW_IE_CAPABILITIES = 6,
        ATH6KL_FW_IE_PATCH_ADDR = 7,
+       ATH6KL_FW_IE_BOARD_ADDR = 8,
+       ATH6KL_FW_IE_VIF_MAX = 9,
 };
 
 enum ath6kl_fw_capability {
        ATH6KL_FW_CAPABILITY_HOST_P2P = 0,
+       ATH6KL_FW_CAPABILITY_SCHED_SCAN = 1,
+
+       /*
+        * Firmware is capable of supporting P2P mgmt operations on a
+        * station interface. After group formation, the station
+        * interface will become a P2P client/GO interface as the case may be
+        */
+       ATH6KL_FW_CAPABILITY_STA_P2PDEV_DUPLEX,
 
        /* this needs to be last */
        ATH6KL_FW_CAPABILITY_MAX,
@@ -87,43 +101,59 @@ struct ath6kl_fw_ie {
        u8 data[0];
 };
 
+#define ATH6KL_FW_API2_FILE "fw-2.bin"
+#define ATH6KL_FW_API3_FILE "fw-3.bin"
+
 /* AR6003 1.0 definitions */
-#define AR6003_REV1_VERSION                 0x300002ba
+#define AR6003_HW_1_0_VERSION                 0x300002ba
 
 /* AR6003 2.0 definitions */
-#define AR6003_REV2_VERSION                 0x30000384
-#define AR6003_REV2_PATCH_DOWNLOAD_ADDRESS  0x57e910
-#define AR6003_REV2_OTP_FILE                "ath6k/AR6003/hw2.0/otp.bin.z77"
-#define AR6003_REV2_FIRMWARE_FILE           "ath6k/AR6003/hw2.0/athwlan.bin.z77"
-#define AR6003_REV2_TCMD_FIRMWARE_FILE      "ath6k/AR6003/hw2.0/athtcmd_ram.bin"
-#define AR6003_REV2_PATCH_FILE              "ath6k/AR6003/hw2.0/data.patch.bin"
-#define AR6003_REV2_FIRMWARE_2_FILE         "ath6k/AR6003/hw2.0/fw-2.bin"
-#define AR6003_REV2_BOARD_DATA_FILE         "ath6k/AR6003/hw2.0/bdata.bin"
-#define AR6003_REV2_DEFAULT_BOARD_DATA_FILE "ath6k/AR6003/hw2.0/bdata.SD31.bin"
+#define AR6003_HW_2_0_VERSION                 0x30000384
+#define AR6003_HW_2_0_PATCH_DOWNLOAD_ADDRESS  0x57e910
+#define AR6003_HW_2_0_FW_DIR                   "ath6k/AR6003/hw2.0"
+#define AR6003_HW_2_0_OTP_FILE                 "otp.bin.z77"
+#define AR6003_HW_2_0_FIRMWARE_FILE            "athwlan.bin.z77"
+#define AR6003_HW_2_0_TCMD_FIRMWARE_FILE       "athtcmd_ram.bin"
+#define AR6003_HW_2_0_PATCH_FILE               "data.patch.bin"
+#define AR6003_HW_2_0_BOARD_DATA_FILE "ath6k/AR6003/hw2.0/bdata.bin"
+#define AR6003_HW_2_0_DEFAULT_BOARD_DATA_FILE \
+                       "ath6k/AR6003/hw2.0/bdata.SD31.bin"
 
 /* AR6003 3.0 definitions */
-#define AR6003_REV3_VERSION                 0x30000582
-#define AR6003_REV3_OTP_FILE                "ath6k/AR6003/hw2.1.1/otp.bin"
-#define AR6003_REV3_FIRMWARE_FILE           "ath6k/AR6003/hw2.1.1/athwlan.bin"
-#define AR6003_REV3_TCMD_FIRMWARE_FILE    "ath6k/AR6003/hw2.1.1/athtcmd_ram.bin"
-#define AR6003_REV3_PATCH_FILE            "ath6k/AR6003/hw2.1.1/data.patch.bin"
-#define AR6003_REV3_FIRMWARE_2_FILE           "ath6k/AR6003/hw2.1.1/fw-2.bin"
-#define AR6003_REV3_BOARD_DATA_FILE       "ath6k/AR6003/hw2.1.1/bdata.bin"
-#define AR6003_REV3_DEFAULT_BOARD_DATA_FILE    \
-       "ath6k/AR6003/hw2.1.1/bdata.SD31.bin"
+#define AR6003_HW_2_1_1_VERSION                 0x30000582
+#define AR6003_HW_2_1_1_FW_DIR                 "ath6k/AR6003/hw2.1.1"
+#define AR6003_HW_2_1_1_OTP_FILE               "otp.bin"
+#define AR6003_HW_2_1_1_FIRMWARE_FILE          "athwlan.bin"
+#define AR6003_HW_2_1_1_TCMD_FIRMWARE_FILE     "athtcmd_ram.bin"
+#define AR6003_HW_2_1_1_UTF_FIRMWARE_FILE      "utf.bin"
+#define AR6003_HW_2_1_1_TESTSCRIPT_FILE        "nullTestFlow.bin"
+#define AR6003_HW_2_1_1_PATCH_FILE             "data.patch.bin"
+#define AR6003_HW_2_1_1_BOARD_DATA_FILE "ath6k/AR6003/hw2.1.1/bdata.bin"
+#define AR6003_HW_2_1_1_DEFAULT_BOARD_DATA_FILE        \
+                       "ath6k/AR6003/hw2.1.1/bdata.SD31.bin"
 
 /* AR6004 1.0 definitions */
-#define AR6004_REV1_VERSION                 0x30000623
-#define AR6004_REV1_FIRMWARE_FILE           "ath6k/AR6004/hw6.1/fw.ram.bin"
-#define AR6004_REV1_FIRMWARE_2_FILE         "ath6k/AR6004/hw6.1/fw-2.bin"
-#define AR6004_REV1_BOARD_DATA_FILE         "ath6k/AR6004/hw6.1/bdata.bin"
-#define AR6004_REV1_DEFAULT_BOARD_DATA_FILE "ath6k/AR6004/hw6.1/bdata.DB132.bin"
-#define AR6004_REV1_EPPING_FIRMWARE_FILE "ath6k/AR6004/hw6.1/endpointping.bin"
+#define AR6004_HW_1_0_VERSION                 0x30000623
+#define AR6004_HW_1_0_FW_DIR                   "ath6k/AR6004/hw1.0"
+#define AR6004_HW_1_0_FIRMWARE_FILE            "fw.ram.bin"
+#define AR6004_HW_1_0_BOARD_DATA_FILE         "ath6k/AR6004/hw1.0/bdata.bin"
+#define AR6004_HW_1_0_DEFAULT_BOARD_DATA_FILE \
+       "ath6k/AR6004/hw1.0/bdata.DB132.bin"
+
+/* AR6004 1.1 definitions */
+#define AR6004_HW_1_1_VERSION                 0x30000001
+#define AR6004_HW_1_1_FW_DIR                   "ath6k/AR6004/hw1.1"
+#define AR6004_HW_1_1_FIRMWARE_FILE            "fw.ram.bin"
+#define AR6004_HW_1_1_BOARD_DATA_FILE         "ath6k/AR6004/hw1.1/bdata.bin"
+#define AR6004_HW_1_1_DEFAULT_BOARD_DATA_FILE \
+       "ath6k/AR6004/hw1.1/bdata.DB132.bin"
 
 /* Per STA data, used in AP mode */
 #define STA_PS_AWAKE           BIT(0)
 #define        STA_PS_SLEEP            BIT(1)
 #define        STA_PS_POLLED           BIT(2)
+#define STA_PS_APSD_TRIGGER     BIT(3)
+#define STA_PS_APSD_EOSP        BIT(4)
 
 /* HTC TX packet tagging definitions */
 #define ATH6KL_CONTROL_PKT_TAG    HTC_TX_PACKET_TAG_USER_DEFINED
@@ -166,6 +196,7 @@ struct ath6kl_fw_ie {
 #define ATH6KL_CONF_IGNORE_PS_FAIL_EVT_IN_SCAN  BIT(1)
 #define ATH6KL_CONF_ENABLE_11N                 BIT(2)
 #define ATH6KL_CONF_ENABLE_TX_BURST            BIT(3)
+#define ATH6KL_CONF_SUSPEND_CUTPOWER           BIT(4)
 
 enum wlan_low_pwr_state {
        WLAN_POWER_STATE_ON,
@@ -259,6 +290,8 @@ struct ath6kl_sta {
        u8 wpa_ie[ATH6KL_MAX_IE];
        struct sk_buff_head psq;
        spinlock_t psq_lock;
+       u8 apsd_info;
+       struct sk_buff_head apsdq;
 };
 
 struct ath6kl_version {
@@ -271,6 +304,8 @@ struct ath6kl_bmi {
        u32 cmd_credits;
        bool done_sent;
        u8 *cmd_buf;
+       u32 max_data_size;
+       u32 max_cmd_size;
 };
 
 struct target_stats {
@@ -380,40 +415,49 @@ struct ath6kl_req_key {
        u8 key_len;
 };
 
-/* Flag info */
-#define WMI_ENABLED    0
-#define WMI_READY      1
-#define CONNECTED      2
-#define STATS_UPDATE_PEND 3
-#define CONNECT_PEND     4
-#define WMM_ENABLED      5
-#define NETQ_STOPPED     6
-#define WMI_CTRL_EP_FULL  7
-#define DTIM_EXPIRED     8
-#define DESTROY_IN_PROGRESS  9
-#define NETDEV_REGISTERED    10
-#define SKIP_SCAN           11
-#define WLAN_ENABLED        12
-#define TESTMODE            13
-#define CLEAR_BSSFILTER_ON_BEACON 14
-#define DTIM_PERIOD_AVAIL    15
+enum ath6kl_hif_type {
+       ATH6KL_HIF_TYPE_SDIO,
+       ATH6KL_HIF_TYPE_USB,
+};
 
-struct ath6kl {
-       struct device *dev;
-       struct net_device *net_dev;
-       struct ath6kl_bmi bmi;
-       const struct ath6kl_hif_ops *hif_ops;
-       struct wmi *wmi;
-       int tx_pending[ENDPOINT_MAX];
-       int total_tx_data_pend;
-       struct htc_target *htc_target;
-       void *hif_priv;
-       spinlock_t lock;
-       struct semaphore sem;
+/* Max number of filters that hw supports */
+#define ATH6K_MAX_MC_FILTERS_PER_LIST 7
+struct ath6kl_mc_filter {
+       struct list_head list;
+       char hw_addr[ATH6KL_MCAST_FILTER_MAC_ADDR_SIZE];
+};
+
+/*
+ * Driver's maximum limit, note that some firmwares support only one vif
+ * and the runtime (current) limit must be checked from ar->vif_max.
+ */
+#define ATH6KL_VIF_MAX 3
+
+/* vif flags info */
+enum ath6kl_vif_state {
+       CONNECTED,
+       CONNECT_PEND,
+       WMM_ENABLED,
+       NETQ_STOPPED,
+       DTIM_EXPIRED,
+       NETDEV_REGISTERED,
+       CLEAR_BSSFILTER_ON_BEACON,
+       DTIM_PERIOD_AVAIL,
+       WLAN_ENABLED,
+       STATS_UPDATE_PEND,
+};
+
+struct ath6kl_vif {
+       struct list_head list;
+       struct wireless_dev wdev;
+       struct net_device *ndev;
+       struct ath6kl *ar;
+       /* Lock to protect vif specific net_stats and flags */
+       spinlock_t if_lock;
+       u8 fw_vif_idx;
+       unsigned long flags;
        int ssid_len;
        u8 ssid[IEEE80211_MAX_SSID_LEN];
-       u8 next_mode;
-       u8 nw_type;
        u8 dot11_auth_mode;
        u8 auth_mode;
        u8 prwise_crypto;
@@ -421,21 +465,92 @@ struct ath6kl {
        u8 grp_crypto;
        u8 grp_crypto_len;
        u8 def_txkey_index;
-       struct ath6kl_wep_key wep_key_list[WMI_MAX_KEY_INDEX + 1];
+       u8 next_mode;
+       u8 nw_type;
        u8 bssid[ETH_ALEN];
        u8 req_bssid[ETH_ALEN];
        u16 ch_hint;
        u16 bss_ch;
+       struct ath6kl_wep_key wep_key_list[WMI_MAX_KEY_INDEX + 1];
+       struct ath6kl_key keys[WMI_MAX_KEY_INDEX + 1];
+       struct aggr_info *aggr_cntxt;
+
+       struct timer_list disconnect_timer;
+       struct timer_list sched_scan_timer;
+
+       struct cfg80211_scan_request *scan_req;
+       enum sme_state sme_state;
+       int reconnect_flag;
+       u32 last_roc_id;
+       u32 last_cancel_roc_id;
+       u32 send_action_id;
+       bool probe_req_report;
+       u16 next_chan;
+       u16 assoc_bss_beacon_int;
+       u8 assoc_bss_dtim_period;
+       struct net_device_stats net_stats;
+       struct target_stats target_stats;
+
+       struct list_head mc_filter;
+};
+
+#define WOW_LIST_ID            0
+#define WOW_HOST_REQ_DELAY     500 /* ms */
+
+#define ATH6KL_SCHED_SCAN_RESULT_DELAY 5000 /* ms */
+
+/* Flag info */
+enum ath6kl_dev_state {
+       WMI_ENABLED,
+       WMI_READY,
+       WMI_CTRL_EP_FULL,
+       TESTMODE,
+       DESTROY_IN_PROGRESS,
+       SKIP_SCAN,
+       ROAM_TBL_PEND,
+       FIRST_BOOT,
+};
+
+enum ath6kl_state {
+       ATH6KL_STATE_OFF,
+       ATH6KL_STATE_ON,
+       ATH6KL_STATE_DEEPSLEEP,
+       ATH6KL_STATE_CUTPOWER,
+       ATH6KL_STATE_WOW,
+       ATH6KL_STATE_SCHED_SCAN,
+};
+
+struct ath6kl {
+       struct device *dev;
+       struct wiphy *wiphy;
+
+       enum ath6kl_state state;
+
+       struct ath6kl_bmi bmi;
+       const struct ath6kl_hif_ops *hif_ops;
+       struct wmi *wmi;
+       int tx_pending[ENDPOINT_MAX];
+       int total_tx_data_pend;
+       struct htc_target *htc_target;
+       enum ath6kl_hif_type hif_type;
+       void *hif_priv;
+       struct list_head vif_list;
+       /* Lock to avoid race in vif_list entries among add/del/traverse */
+       spinlock_t list_lock;
+       u8 num_vif;
+       unsigned int vif_max;
+       u8 max_norm_iface;
+       u8 avail_idx_map;
+       spinlock_t lock;
+       struct semaphore sem;
        u16 listen_intvl_b;
-       u16 listen_intvl_t;
        u8 lrssi_roam_threshold;
        struct ath6kl_version version;
        u32 target_type;
        u8 tx_pwr;
-       struct net_device_stats net_stats;
-       struct target_stats target_stats;
        struct ath6kl_node_mapping node_map[MAX_NODE_NUM];
        u8 ibss_ps_enable;
+       bool ibss_if_active;
        u8 node_num;
        u8 next_ep_id;
        struct ath6kl_cookie *cookie_list;
@@ -446,7 +561,7 @@ struct ath6kl {
        u8 hiac_stream_active_pri;
        u8 ep2ac_map[ENDPOINT_MAX];
        enum htc_endpoint_id ctrl_ep;
-       struct htc_credit_state_info credit_state_info;
+       struct ath6kl_htc_credit_info credit_state_info;
        u32 connect_ctrl_flags;
        u32 user_key_ctrl;
        u8 usr_bss_filter;
@@ -456,30 +571,43 @@ struct ath6kl {
        struct sk_buff_head mcastpsq;
        spinlock_t mcastpsq_lock;
        u8 intra_bss;
-       struct aggr_info *aggr_cntxt;
        struct wmi_ap_mode_stat ap_stats;
        u8 ap_country_code[3];
        struct list_head amsdu_rx_buffer_queue;
-       struct timer_list disconnect_timer;
        u8 rx_meta_ver;
-       struct wireless_dev *wdev;
-       struct cfg80211_scan_request *scan_req;
-       struct ath6kl_key keys[WMI_MAX_KEY_INDEX + 1];
-       enum sme_state sme_state;
        enum wlan_low_pwr_state wlan_pwr_state;
-       struct wmi_scan_params_cmd sc_params;
+       u8 mac_addr[ETH_ALEN];
 #define AR_MCAST_FILTER_MAC_ADDR_SIZE  4
        struct {
                void *rx_report;
                size_t rx_report_len;
        } tm;
 
-       struct {
+       struct ath6kl_hw {
+               u32 id;
+               const char *name;
                u32 dataset_patch_addr;
                u32 app_load_addr;
                u32 app_start_override_addr;
                u32 board_ext_data_addr;
                u32 reserved_ram_size;
+               u32 board_addr;
+               u32 refclk_hz;
+               u32 uarttx_pin;
+               u32 testscript_addr;
+
+               struct ath6kl_hw_fw {
+                       const char *dir;
+                       const char *otp;
+                       const char *fw;
+                       const char *tcmd;
+                       const char *patch;
+                       const char *utf;
+                       const char *testscript;
+               } fw;
+
+               const char *fw_board;
+               const char *fw_default_board;
        } hw;
 
        u16 conf_flags;
@@ -487,7 +615,6 @@ struct ath6kl {
        struct ath6kl_mbox_info mbox_info;
 
        struct ath6kl_cookie cookie_mem[MAX_COOKIE_NUM];
-       int reconnect_flag;
        unsigned long flag;
 
        u8 *fw_board;
@@ -502,19 +629,17 @@ struct ath6kl {
        u8 *fw_patch;
        size_t fw_patch_len;
 
+       u8 *fw_testscript;
+       size_t fw_testscript_len;
+
+       unsigned int fw_api;
        unsigned long fw_capabilities[ATH6KL_CAPABILITY_LEN];
 
        struct workqueue_struct *ath6kl_wq;
 
        struct dentry *debugfs_phy;
 
-       u32 send_action_id;
-       bool probe_req_report;
-       u16 next_chan;
-
        bool p2p;
-       u16 assoc_bss_beacon_int;
-       u8 assoc_bss_dtim_period;
 
 #ifdef CONFIG_ATH6KL_DEBUG
        struct {
@@ -529,23 +654,19 @@ struct ath6kl {
                struct {
                        unsigned int invalid_rate;
                } war_stats;
+
+               u8 *roam_tbl;
+               unsigned int roam_tbl_len;
+
+               u8 keepalive;
+               u8 disc_timeout;
        } debug;
 #endif /* CONFIG_ATH6KL_DEBUG */
 };
 
-static inline void *ath6kl_priv(struct net_device *dev)
+static inline struct ath6kl *ath6kl_priv(struct net_device *dev)
 {
-       return wdev_priv(dev->ieee80211_ptr);
-}
-
-static inline void ath6kl_deposit_credit_to_ep(struct htc_credit_state_info
-                                              *cred_info,
-                                              struct htc_endpoint_credit_dist
-                                              *ep_dist, int credits)
-{
-       ep_dist->credits += credits;
-       ep_dist->cred_assngd += credits;
-       cred_info->cur_free_credits -= credits;
+       return ((struct ath6kl_vif *) netdev_priv(dev))->ar;
 }
 
 static inline u32 ath6kl_get_hi_item_addr(struct ath6kl *ar,
@@ -561,7 +682,6 @@ static inline u32 ath6kl_get_hi_item_addr(struct ath6kl *ar,
        return addr;
 }
 
-void ath6kl_destroy(struct net_device *dev, unsigned int unregister);
 int ath6kl_configure_target(struct ath6kl *ar);
 void ath6kl_detect_error(unsigned long ptr);
 void disconnect_timer_handler(unsigned long ptr);
@@ -579,10 +699,8 @@ int ath6kl_diag_write(struct ath6kl *ar, u32 address, void *data, u32 length);
 int ath6kl_diag_read32(struct ath6kl *ar, u32 address, u32 *value);
 int ath6kl_diag_read(struct ath6kl *ar, u32 address, void *data, u32 length);
 int ath6kl_read_fwlogs(struct ath6kl *ar);
-void ath6kl_init_profile_info(struct ath6kl *ar);
+void ath6kl_init_profile_info(struct ath6kl_vif *vif);
 void ath6kl_tx_data_cleanup(struct ath6kl *ar);
-void ath6kl_stop_endpoint(struct net_device *dev, bool keep_profile,
-                         bool get_dbglogs);
 
 struct ath6kl_cookie *ath6kl_alloc_cookie(struct ath6kl *ar);
 void ath6kl_free_cookie(struct ath6kl *ar, struct ath6kl_cookie *cookie);
@@ -598,40 +716,48 @@ struct htc_packet *ath6kl_alloc_amsdu_rxbuf(struct htc_target *target,
 void aggr_module_destroy(struct aggr_info *aggr_info);
 void aggr_reset_state(struct aggr_info *aggr_info);
 
-struct ath6kl_sta *ath6kl_find_sta(struct ath6kl *ar, u8 * node_addr);
+struct ath6kl_sta *ath6kl_find_sta(struct ath6kl_vif *vif, u8 * node_addr);
 struct ath6kl_sta *ath6kl_find_sta_by_aid(struct ath6kl *ar, u8 aid);
 
 void ath6kl_ready_event(void *devt, u8 * datap, u32 sw_ver, u32 abi_ver);
 int ath6kl_control_tx(void *devt, struct sk_buff *skb,
                      enum htc_endpoint_id eid);
-void ath6kl_connect_event(struct ath6kl *ar, u16 channel,
+void ath6kl_connect_event(struct ath6kl_vif *vif, u16 channel,
                          u8 *bssid, u16 listen_int,
                          u16 beacon_int, enum network_type net_type,
                          u8 beacon_ie_len, u8 assoc_req_len,
                          u8 assoc_resp_len, u8 *assoc_info);
-void ath6kl_connect_ap_mode_bss(struct ath6kl *ar, u16 channel);
-void ath6kl_connect_ap_mode_sta(struct ath6kl *ar, u16 aid, u8 *mac_addr,
+void ath6kl_connect_ap_mode_bss(struct ath6kl_vif *vif, u16 channel);
+void ath6kl_connect_ap_mode_sta(struct ath6kl_vif *vif, u16 aid, u8 *mac_addr,
                                u8 keymgmt, u8 ucipher, u8 auth,
-                               u8 assoc_req_len, u8 *assoc_info);
-void ath6kl_disconnect_event(struct ath6kl *ar, u8 reason,
+                               u8 assoc_req_len, u8 *assoc_info, u8 apsd_info);
+void ath6kl_disconnect_event(struct ath6kl_vif *vif, u8 reason,
                             u8 *bssid, u8 assoc_resp_len,
                             u8 *assoc_info, u16 prot_reason_status);
-void ath6kl_tkip_micerr_event(struct ath6kl *ar, u8 keyid, bool ismcast);
+void ath6kl_tkip_micerr_event(struct ath6kl_vif *vif, u8 keyid, bool ismcast);
 void ath6kl_txpwr_rx_evt(void *devt, u8 tx_pwr);
-void ath6kl_scan_complete_evt(struct ath6kl *ar, int status);
-void ath6kl_tgt_stats_event(struct ath6kl *ar, u8 *ptr, u32 len);
+void ath6kl_scan_complete_evt(struct ath6kl_vif *vif, int status);
+void ath6kl_tgt_stats_event(struct ath6kl_vif *vif, u8 *ptr, u32 len);
 void ath6kl_indicate_tx_activity(void *devt, u8 traffic_class, bool active);
 enum htc_endpoint_id ath6kl_ac2_endpoint_id(void *devt, u8 ac);
 
-void ath6kl_pspoll_event(struct ath6kl *ar, u8 aid);
+void ath6kl_pspoll_event(struct ath6kl_vif *vif, u8 aid);
 
-void ath6kl_dtimexpiry_event(struct ath6kl *ar);
-void ath6kl_disconnect(struct ath6kl *ar);
-void ath6kl_deep_sleep_enable(struct ath6kl *ar);
-void aggr_recv_delba_req_evt(struct ath6kl *ar, u8 tid);
-void aggr_recv_addba_req_evt(struct ath6kl *ar, u8 tid, u16 seq_no,
+void ath6kl_dtimexpiry_event(struct ath6kl_vif *vif);
+void ath6kl_disconnect(struct ath6kl_vif *vif);
+void aggr_recv_delba_req_evt(struct ath6kl_vif *vif, u8 tid);
+void aggr_recv_addba_req_evt(struct ath6kl_vif *vif, u8 tid, u16 seq_no,
                             u8 win_sz);
 void ath6kl_wakeup_event(void *dev);
-void ath6kl_target_failure(struct ath6kl *ar);
+
+void ath6kl_reset_device(struct ath6kl *ar, u32 target_type,
+                        bool wait_fot_compltn, bool cold_reset);
+void ath6kl_init_control_info(struct ath6kl_vif *vif);
+void ath6kl_core_free(struct ath6kl *ar);
+struct ath6kl_vif *ath6kl_vif_first(struct ath6kl *ar);
+void ath6kl_cleanup_vif(struct ath6kl_vif *vif, bool wmi_ready);
+int ath6kl_init_hw_start(struct ath6kl *ar);
+int ath6kl_init_hw_stop(struct ath6kl *ar);
+void ath6kl_check_wow_status(struct ath6kl *ar);
 
 #endif /* CORE_H */