Kalle Valo | 5e3dd15 | 2013-06-12 20:52:10 +0300 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (c) 2005-2011 Atheros Communications Inc. |
| 3 | * Copyright (c) 2011-2013 Qualcomm Atheros, Inc. |
| 4 | * |
| 5 | * Permission to use, copy, modify, and/or distribute this software for any |
| 6 | * purpose with or without fee is hereby granted, provided that the above |
| 7 | * copyright notice and this permission notice appear in all copies. |
| 8 | * |
| 9 | * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES |
| 10 | * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF |
| 11 | * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR |
| 12 | * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES |
| 13 | * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN |
| 14 | * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF |
| 15 | * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. |
| 16 | */ |
| 17 | |
| 18 | #ifndef _CORE_H_ |
| 19 | #define _CORE_H_ |
| 20 | |
| 21 | #include <linux/completion.h> |
| 22 | #include <linux/if_ether.h> |
| 23 | #include <linux/types.h> |
| 24 | #include <linux/pci.h> |
Ben Greear | 384914b | 2014-08-25 08:37:32 +0300 | [diff] [blame] | 25 | #include <linux/uuid.h> |
| 26 | #include <linux/time.h> |
Kalle Valo | 5e3dd15 | 2013-06-12 20:52:10 +0300 | [diff] [blame] | 27 | |
Michal Kazior | edb8236 | 2013-07-05 16:15:14 +0300 | [diff] [blame] | 28 | #include "htt.h" |
Kalle Valo | 5e3dd15 | 2013-06-12 20:52:10 +0300 | [diff] [blame] | 29 | #include "htc.h" |
| 30 | #include "hw.h" |
| 31 | #include "targaddrs.h" |
| 32 | #include "wmi.h" |
| 33 | #include "../ath.h" |
| 34 | #include "../regd.h" |
Janusz Dziedzic | 9702c68 | 2013-11-20 09:59:41 +0200 | [diff] [blame] | 35 | #include "../dfs_pattern_detector.h" |
Simon Wunderlich | 855aed1 | 2014-08-02 09:12:54 +0300 | [diff] [blame] | 36 | #include "spectral.h" |
Rajkumar Manoharan | fe6f36d | 2014-12-17 12:22:07 +0200 | [diff] [blame] | 37 | #include "thermal.h" |
Kalle Valo | 5e3dd15 | 2013-06-12 20:52:10 +0300 | [diff] [blame] | 38 | |
| 39 | #define MS(_v, _f) (((_v) & _f##_MASK) >> _f##_LSB) |
| 40 | #define SM(_v, _f) (((_v) << _f##_LSB) & _f##_MASK) |
| 41 | #define WO(_f) ((_f##_OFFSET) >> 2) |
| 42 | |
| 43 | #define ATH10K_SCAN_ID 0 |
| 44 | #define WMI_READY_TIMEOUT (5 * HZ) |
| 45 | #define ATH10K_FLUSH_TIMEOUT_HZ (5*HZ) |
Michal Kazior | 2e1dea4 | 2013-07-31 10:32:40 +0200 | [diff] [blame] | 46 | #define ATH10K_NUM_CHANS 38 |
Kalle Valo | 5e3dd15 | 2013-06-12 20:52:10 +0300 | [diff] [blame] | 47 | |
| 48 | /* Antenna noise floor */ |
| 49 | #define ATH10K_DEFAULT_NOISE_FLOOR -95 |
| 50 | |
Bartosz Markowski | 7109861 | 2013-11-14 09:01:15 +0100 | [diff] [blame] | 51 | #define ATH10K_MAX_NUM_MGMT_PENDING 128 |
Bartosz Markowski | 5e00d31 | 2013-09-26 17:47:12 +0200 | [diff] [blame] | 52 | |
Kalle Valo | 5a13e76 | 2014-01-20 11:01:46 +0200 | [diff] [blame] | 53 | /* number of failed packets */ |
| 54 | #define ATH10K_KICKOUT_THRESHOLD 50 |
| 55 | |
| 56 | /* |
| 57 | * Use insanely high numbers to make sure that the firmware implementation |
| 58 | * won't start, we have the same functionality already in hostapd. Unit |
| 59 | * is seconds. |
| 60 | */ |
| 61 | #define ATH10K_KEEPALIVE_MIN_IDLE 3747 |
| 62 | #define ATH10K_KEEPALIVE_MAX_IDLE 3895 |
| 63 | #define ATH10K_KEEPALIVE_MAX_UNRESPONSIVE 3900 |
| 64 | |
Kalle Valo | 5e3dd15 | 2013-06-12 20:52:10 +0300 | [diff] [blame] | 65 | struct ath10k; |
| 66 | |
Kalle Valo | e07db35 | 2014-10-13 09:40:47 +0300 | [diff] [blame] | 67 | enum ath10k_bus { |
| 68 | ATH10K_BUS_PCI, |
| 69 | }; |
| 70 | |
| 71 | static inline const char *ath10k_bus_str(enum ath10k_bus bus) |
| 72 | { |
| 73 | switch (bus) { |
| 74 | case ATH10K_BUS_PCI: |
| 75 | return "pci"; |
| 76 | } |
| 77 | |
| 78 | return "unknown"; |
| 79 | } |
| 80 | |
Kalle Valo | 5e3dd15 | 2013-06-12 20:52:10 +0300 | [diff] [blame] | 81 | struct ath10k_skb_cb { |
| 82 | dma_addr_t paddr; |
Michal Kazior | d84a512 | 2014-11-27 11:09:37 +0100 | [diff] [blame] | 83 | u8 eid; |
Bartosz Markowski | 5e00d31 | 2013-09-26 17:47:12 +0200 | [diff] [blame] | 84 | u8 vdev_id; |
Kalle Valo | 5e3dd15 | 2013-06-12 20:52:10 +0300 | [diff] [blame] | 85 | |
| 86 | struct { |
Kalle Valo | 5e3dd15 | 2013-06-12 20:52:10 +0300 | [diff] [blame] | 87 | u8 tid; |
Michal Kazior | 8d6d362 | 2014-11-24 14:58:31 +0100 | [diff] [blame] | 88 | u16 freq; |
Kalle Valo | 5e3dd15 | 2013-06-12 20:52:10 +0300 | [diff] [blame] | 89 | bool is_offchan; |
Michal Kazior | a16942e | 2014-02-27 18:50:04 +0200 | [diff] [blame] | 90 | struct ath10k_htt_txbuf *txbuf; |
| 91 | u32 txbuf_paddr; |
Kalle Valo | 5e3dd15 | 2013-06-12 20:52:10 +0300 | [diff] [blame] | 92 | } __packed htt; |
Michal Kazior | 748afc4 | 2014-01-23 12:48:21 +0100 | [diff] [blame] | 93 | |
| 94 | struct { |
| 95 | bool dtim_zero; |
| 96 | bool deliver_cab; |
| 97 | } bcn; |
Kalle Valo | 5e3dd15 | 2013-06-12 20:52:10 +0300 | [diff] [blame] | 98 | } __packed; |
| 99 | |
Michal Kazior | 8582bf3 | 2015-01-24 12:14:47 +0200 | [diff] [blame] | 100 | struct ath10k_skb_rxcb { |
| 101 | dma_addr_t paddr; |
Michal Kazior | c545070 | 2015-01-24 12:14:48 +0200 | [diff] [blame] | 102 | struct hlist_node hlist; |
Michal Kazior | 8582bf3 | 2015-01-24 12:14:47 +0200 | [diff] [blame] | 103 | }; |
| 104 | |
Kalle Valo | 5e3dd15 | 2013-06-12 20:52:10 +0300 | [diff] [blame] | 105 | static inline struct ath10k_skb_cb *ATH10K_SKB_CB(struct sk_buff *skb) |
| 106 | { |
| 107 | BUILD_BUG_ON(sizeof(struct ath10k_skb_cb) > |
| 108 | IEEE80211_TX_INFO_DRIVER_DATA_SIZE); |
| 109 | return (struct ath10k_skb_cb *)&IEEE80211_SKB_CB(skb)->driver_data; |
| 110 | } |
| 111 | |
Michal Kazior | 8582bf3 | 2015-01-24 12:14:47 +0200 | [diff] [blame] | 112 | static inline struct ath10k_skb_rxcb *ATH10K_SKB_RXCB(struct sk_buff *skb) |
| 113 | { |
| 114 | BUILD_BUG_ON(sizeof(struct ath10k_skb_rxcb) > sizeof(skb->cb)); |
| 115 | return (struct ath10k_skb_rxcb *)skb->cb; |
| 116 | } |
| 117 | |
Michal Kazior | c545070 | 2015-01-24 12:14:48 +0200 | [diff] [blame] | 118 | #define ATH10K_RXCB_SKB(rxcb) \ |
| 119 | container_of((void *)rxcb, struct sk_buff, cb) |
| 120 | |
Kalle Valo | 5e3dd15 | 2013-06-12 20:52:10 +0300 | [diff] [blame] | 121 | static inline u32 host_interest_item_address(u32 item_offset) |
| 122 | { |
| 123 | return QCA988X_HOST_INTEREST_ADDRESS + item_offset; |
| 124 | } |
| 125 | |
| 126 | struct ath10k_bmi { |
| 127 | bool done_sent; |
| 128 | }; |
| 129 | |
Bartosz Markowski | b3effe6 | 2013-09-26 17:47:11 +0200 | [diff] [blame] | 130 | struct ath10k_mem_chunk { |
| 131 | void *vaddr; |
| 132 | dma_addr_t paddr; |
| 133 | u32 len; |
| 134 | u32 req_id; |
| 135 | }; |
| 136 | |
Kalle Valo | 5e3dd15 | 2013-06-12 20:52:10 +0300 | [diff] [blame] | 137 | struct ath10k_wmi { |
Kalle Valo | 202e86e | 2014-12-03 10:10:08 +0200 | [diff] [blame] | 138 | enum ath10k_fw_wmi_op_version op_version; |
Kalle Valo | 5e3dd15 | 2013-06-12 20:52:10 +0300 | [diff] [blame] | 139 | enum ath10k_htc_ep_id eid; |
| 140 | struct completion service_ready; |
| 141 | struct completion unified_ready; |
Michal Kazior | be8b394 | 2013-09-13 14:16:54 +0200 | [diff] [blame] | 142 | wait_queue_head_t tx_credits_wq; |
Michal Kazior | acfe7ec | 2014-11-27 10:11:17 +0100 | [diff] [blame] | 143 | DECLARE_BITMAP(svc_map, WMI_SERVICE_MAX); |
Bartosz Markowski | ce42870 | 2013-09-26 17:47:05 +0200 | [diff] [blame] | 144 | struct wmi_cmd_map *cmd; |
Bartosz Markowski | 6d1506e | 2013-09-26 17:47:15 +0200 | [diff] [blame] | 145 | struct wmi_vdev_param_map *vdev_param; |
Bartosz Markowski | 226a339 | 2013-09-26 17:47:16 +0200 | [diff] [blame] | 146 | struct wmi_pdev_param_map *pdev_param; |
Michal Kazior | d7579d1 | 2014-12-03 10:10:54 +0200 | [diff] [blame] | 147 | const struct wmi_ops *ops; |
Bartosz Markowski | b3effe6 | 2013-09-26 17:47:11 +0200 | [diff] [blame] | 148 | |
| 149 | u32 num_mem_chunks; |
Michal Kazior | 5c01aa3d | 2014-09-18 15:21:24 +0200 | [diff] [blame] | 150 | struct ath10k_mem_chunk mem_chunks[WMI_MAX_MEM_REQS]; |
Kalle Valo | 5e3dd15 | 2013-06-12 20:52:10 +0300 | [diff] [blame] | 151 | }; |
| 152 | |
Michal Kazior | 60ef401 | 2014-09-25 12:33:48 +0200 | [diff] [blame] | 153 | struct ath10k_fw_stats_peer { |
Michal Kazior | 5326849 | 2014-09-25 12:33:50 +0200 | [diff] [blame] | 154 | struct list_head list; |
| 155 | |
Kalle Valo | 5e3dd15 | 2013-06-12 20:52:10 +0300 | [diff] [blame] | 156 | u8 peer_macaddr[ETH_ALEN]; |
| 157 | u32 peer_rssi; |
| 158 | u32 peer_tx_rate; |
Ben Greear | 23c3aae | 2014-03-28 14:35:15 +0200 | [diff] [blame] | 159 | u32 peer_rx_rate; /* 10x only */ |
Kalle Valo | 5e3dd15 | 2013-06-12 20:52:10 +0300 | [diff] [blame] | 160 | }; |
| 161 | |
Michal Kazior | 5326849 | 2014-09-25 12:33:50 +0200 | [diff] [blame] | 162 | struct ath10k_fw_stats_pdev { |
| 163 | struct list_head list; |
| 164 | |
Kalle Valo | 5e3dd15 | 2013-06-12 20:52:10 +0300 | [diff] [blame] | 165 | /* PDEV stats */ |
| 166 | s32 ch_noise_floor; |
| 167 | u32 tx_frame_count; |
| 168 | u32 rx_frame_count; |
| 169 | u32 rx_clear_count; |
| 170 | u32 cycle_count; |
| 171 | u32 phy_err_count; |
| 172 | u32 chan_tx_power; |
Chun-Yeow Yeoh | 52e346d | 2014-03-28 14:35:16 +0200 | [diff] [blame] | 173 | u32 ack_rx_bad; |
| 174 | u32 rts_bad; |
| 175 | u32 rts_good; |
| 176 | u32 fcs_bad; |
| 177 | u32 no_beacons; |
| 178 | u32 mib_int_count; |
Kalle Valo | 5e3dd15 | 2013-06-12 20:52:10 +0300 | [diff] [blame] | 179 | |
| 180 | /* PDEV TX stats */ |
| 181 | s32 comp_queued; |
| 182 | s32 comp_delivered; |
| 183 | s32 msdu_enqued; |
| 184 | s32 mpdu_enqued; |
| 185 | s32 wmm_drop; |
| 186 | s32 local_enqued; |
| 187 | s32 local_freed; |
| 188 | s32 hw_queued; |
| 189 | s32 hw_reaped; |
| 190 | s32 underrun; |
| 191 | s32 tx_abort; |
| 192 | s32 mpdus_requed; |
| 193 | u32 tx_ko; |
| 194 | u32 data_rc; |
| 195 | u32 self_triggers; |
| 196 | u32 sw_retry_failure; |
| 197 | u32 illgl_rate_phy_err; |
| 198 | u32 pdev_cont_xretry; |
| 199 | u32 pdev_tx_timeout; |
| 200 | u32 pdev_resets; |
| 201 | u32 phy_underrun; |
| 202 | u32 txop_ovf; |
| 203 | |
| 204 | /* PDEV RX stats */ |
| 205 | s32 mid_ppdu_route_change; |
| 206 | s32 status_rcvd; |
| 207 | s32 r0_frags; |
| 208 | s32 r1_frags; |
| 209 | s32 r2_frags; |
| 210 | s32 r3_frags; |
| 211 | s32 htt_msdus; |
| 212 | s32 htt_mpdus; |
| 213 | s32 loc_msdus; |
| 214 | s32 loc_mpdus; |
| 215 | s32 oversize_amsdu; |
| 216 | s32 phy_errs; |
| 217 | s32 phy_err_drop; |
| 218 | s32 mpdu_errs; |
Michal Kazior | 5326849 | 2014-09-25 12:33:50 +0200 | [diff] [blame] | 219 | }; |
Kalle Valo | 5e3dd15 | 2013-06-12 20:52:10 +0300 | [diff] [blame] | 220 | |
Michal Kazior | 5326849 | 2014-09-25 12:33:50 +0200 | [diff] [blame] | 221 | struct ath10k_fw_stats { |
| 222 | struct list_head pdevs; |
| 223 | struct list_head peers; |
Kalle Valo | 5e3dd15 | 2013-06-12 20:52:10 +0300 | [diff] [blame] | 224 | }; |
| 225 | |
Janusz Dziedzic | 9702c68 | 2013-11-20 09:59:41 +0200 | [diff] [blame] | 226 | struct ath10k_dfs_stats { |
| 227 | u32 phy_errors; |
| 228 | u32 pulses_total; |
| 229 | u32 pulses_detected; |
| 230 | u32 pulses_discarded; |
| 231 | u32 radar_detected; |
| 232 | }; |
| 233 | |
Kalle Valo | 5e3dd15 | 2013-06-12 20:52:10 +0300 | [diff] [blame] | 234 | #define ATH10K_MAX_NUM_PEER_IDS (1 << 11) /* htt rx_desc limit */ |
| 235 | |
| 236 | struct ath10k_peer { |
| 237 | struct list_head list; |
| 238 | int vdev_id; |
| 239 | u8 addr[ETH_ALEN]; |
| 240 | DECLARE_BITMAP(peer_ids, ATH10K_MAX_NUM_PEER_IDS); |
Sujith Manoharan | ae16713 | 2014-11-25 11:46:59 +0530 | [diff] [blame] | 241 | |
| 242 | /* protected by ar->data_lock */ |
Kalle Valo | 5e3dd15 | 2013-06-12 20:52:10 +0300 | [diff] [blame] | 243 | struct ieee80211_key_conf *keys[WMI_MAX_KEY_INDEX + 1]; |
| 244 | }; |
| 245 | |
Michal Kazior | 9797feb | 2014-02-14 14:49:48 +0100 | [diff] [blame] | 246 | struct ath10k_sta { |
| 247 | struct ath10k_vif *arvif; |
| 248 | |
| 249 | /* the following are protected by ar->data_lock */ |
| 250 | u32 changed; /* IEEE80211_RC_* */ |
| 251 | u32 bw; |
| 252 | u32 nss; |
| 253 | u32 smps; |
| 254 | |
| 255 | struct work_struct update_wk; |
Rajkumar Manoharan | f504598 | 2015-01-12 14:07:27 +0200 | [diff] [blame] | 256 | |
| 257 | #ifdef CONFIG_MAC80211_DEBUGFS |
| 258 | /* protected by conf_mutex */ |
| 259 | bool aggr_mode; |
| 260 | #endif |
Michal Kazior | 9797feb | 2014-02-14 14:49:48 +0100 | [diff] [blame] | 261 | }; |
| 262 | |
Kalle Valo | 5e3dd15 | 2013-06-12 20:52:10 +0300 | [diff] [blame] | 263 | #define ATH10K_VDEV_SETUP_TIMEOUT_HZ (5*HZ) |
| 264 | |
| 265 | struct ath10k_vif { |
Michal Kazior | 0579119 | 2013-10-16 15:44:45 +0300 | [diff] [blame] | 266 | struct list_head list; |
| 267 | |
Kalle Valo | 5e3dd15 | 2013-06-12 20:52:10 +0300 | [diff] [blame] | 268 | u32 vdev_id; |
| 269 | enum wmi_vdev_type vdev_type; |
| 270 | enum wmi_vdev_subtype vdev_subtype; |
| 271 | u32 beacon_interval; |
| 272 | u32 dtim_period; |
Michal Kazior | ed54388 | 2013-09-13 14:16:56 +0200 | [diff] [blame] | 273 | struct sk_buff *beacon; |
Michal Kazior | 748afc4 | 2014-01-23 12:48:21 +0100 | [diff] [blame] | 274 | /* protected by data_lock */ |
| 275 | bool beacon_sent; |
Michal Kazior | 64badcb | 2014-09-18 11:18:02 +0300 | [diff] [blame] | 276 | void *beacon_buf; |
| 277 | dma_addr_t beacon_paddr; |
Kalle Valo | 5e3dd15 | 2013-06-12 20:52:10 +0300 | [diff] [blame] | 278 | |
| 279 | struct ath10k *ar; |
| 280 | struct ieee80211_vif *vif; |
| 281 | |
Michal Kazior | c930f74 | 2014-01-23 11:38:25 +0100 | [diff] [blame] | 282 | bool is_started; |
| 283 | bool is_up; |
Simon Wunderlich | 855aed1 | 2014-08-02 09:12:54 +0300 | [diff] [blame] | 284 | bool spectral_enabled; |
Michal Kazior | c930f74 | 2014-01-23 11:38:25 +0100 | [diff] [blame] | 285 | u32 aid; |
| 286 | u8 bssid[ETH_ALEN]; |
| 287 | |
Michal Kazior | cc4827b | 2013-10-16 15:44:45 +0300 | [diff] [blame] | 288 | struct work_struct wep_key_work; |
Kalle Valo | 5e3dd15 | 2013-06-12 20:52:10 +0300 | [diff] [blame] | 289 | struct ieee80211_key_conf *wep_keys[WMI_MAX_KEY_INDEX + 1]; |
Michal Kazior | cc4827b | 2013-10-16 15:44:45 +0300 | [diff] [blame] | 290 | u8 def_wep_key_idx; |
| 291 | u8 def_wep_key_newidx; |
Kalle Valo | 5e3dd15 | 2013-06-12 20:52:10 +0300 | [diff] [blame] | 292 | |
| 293 | u16 tx_seq_no; |
| 294 | |
| 295 | union { |
| 296 | struct { |
Kalle Valo | 5e3dd15 | 2013-06-12 20:52:10 +0300 | [diff] [blame] | 297 | u32 uapsd; |
| 298 | } sta; |
| 299 | struct { |
| 300 | /* 127 stations; wmi limit */ |
| 301 | u8 tim_bitmap[16]; |
| 302 | u8 tim_len; |
| 303 | u32 ssid_len; |
| 304 | u8 ssid[IEEE80211_MAX_SSID_LEN]; |
| 305 | bool hidden_ssid; |
| 306 | /* P2P_IE with NoA attribute for P2P_GO case */ |
| 307 | u32 noa_len; |
| 308 | u8 *noa_data; |
| 309 | } ap; |
Kalle Valo | 5e3dd15 | 2013-06-12 20:52:10 +0300 | [diff] [blame] | 310 | } u; |
Janusz Dziedzic | 51ab1a0 | 2014-01-08 09:08:33 +0100 | [diff] [blame] | 311 | |
| 312 | u8 fixed_rate; |
| 313 | u8 fixed_nss; |
Janusz Dziedzic | 9f81f72 | 2014-01-17 20:04:14 +0100 | [diff] [blame] | 314 | u8 force_sgi; |
Marek Kwaczynski | e81bd10 | 2014-03-11 12:58:00 +0200 | [diff] [blame] | 315 | bool use_cts_prot; |
| 316 | int num_legacy_stations; |
Michal Kazior | 7d9d558 | 2014-10-21 10:40:15 +0300 | [diff] [blame] | 317 | int txpower; |
Kalle Valo | 5e3dd15 | 2013-06-12 20:52:10 +0300 | [diff] [blame] | 318 | }; |
| 319 | |
| 320 | struct ath10k_vif_iter { |
| 321 | u32 vdev_id; |
| 322 | struct ath10k_vif *arvif; |
| 323 | }; |
| 324 | |
Ben Greear | 384914b | 2014-08-25 08:37:32 +0300 | [diff] [blame] | 325 | /* used for crash-dump storage, protected by data-lock */ |
| 326 | struct ath10k_fw_crash_data { |
| 327 | bool crashed_since_read; |
| 328 | |
| 329 | uuid_le uuid; |
| 330 | struct timespec timestamp; |
| 331 | __le32 registers[REG_DUMP_COUNT_QCA988X]; |
| 332 | }; |
| 333 | |
Kalle Valo | 5e3dd15 | 2013-06-12 20:52:10 +0300 | [diff] [blame] | 334 | struct ath10k_debug { |
| 335 | struct dentry *debugfs_phy; |
| 336 | |
Michal Kazior | 60ef401 | 2014-09-25 12:33:48 +0200 | [diff] [blame] | 337 | struct ath10k_fw_stats fw_stats; |
| 338 | struct completion fw_stats_complete; |
Michal Kazior | 5326849 | 2014-09-25 12:33:50 +0200 | [diff] [blame] | 339 | bool fw_stats_done; |
Kalle Valo | 5e3dd15 | 2013-06-12 20:52:10 +0300 | [diff] [blame] | 340 | |
Kalle Valo | a3d135e | 2013-09-03 11:44:10 +0300 | [diff] [blame] | 341 | unsigned long htt_stats_mask; |
| 342 | struct delayed_work htt_stats_dwork; |
Janusz Dziedzic | 9702c68 | 2013-11-20 09:59:41 +0200 | [diff] [blame] | 343 | struct ath10k_dfs_stats dfs_stats; |
| 344 | struct ath_dfs_pool_stats dfs_pool_stats; |
Kalle Valo | f118a3e | 2014-01-03 12:59:31 +0200 | [diff] [blame] | 345 | |
Rajkumar Manoharan | 9017445 | 2014-10-03 08:02:33 +0300 | [diff] [blame] | 346 | /* protected by conf_mutex */ |
Kalle Valo | f118a3e | 2014-01-03 12:59:31 +0200 | [diff] [blame] | 347 | u32 fw_dbglog_mask; |
Rajkumar Manoharan | 9017445 | 2014-10-03 08:02:33 +0300 | [diff] [blame] | 348 | u32 pktlog_filter; |
Yanbo Li | 077a380 | 2014-11-25 12:24:33 +0200 | [diff] [blame] | 349 | u32 reg_addr; |
Peter Oh | a7bd3e9 | 2014-12-02 13:07:14 +0200 | [diff] [blame] | 350 | u32 nf_cal_period; |
Janusz Dziedzic | d385623 | 2014-06-02 21:19:46 +0300 | [diff] [blame] | 351 | |
| 352 | u8 htt_max_amsdu; |
| 353 | u8 htt_max_ampdu; |
Ben Greear | 384914b | 2014-08-25 08:37:32 +0300 | [diff] [blame] | 354 | |
| 355 | struct ath10k_fw_crash_data *fw_crash_data; |
Kalle Valo | 5e3dd15 | 2013-06-12 20:52:10 +0300 | [diff] [blame] | 356 | }; |
| 357 | |
Michal Kazior | f7843d7 | 2013-07-16 09:38:52 +0200 | [diff] [blame] | 358 | enum ath10k_state { |
| 359 | ATH10K_STATE_OFF = 0, |
| 360 | ATH10K_STATE_ON, |
Michal Kazior | affd321 | 2013-07-16 09:54:35 +0200 | [diff] [blame] | 361 | |
| 362 | /* When doing firmware recovery the device is first powered down. |
| 363 | * mac80211 is supposed to call in to start() hook later on. It is |
| 364 | * however possible that driver unloading and firmware crash overlap. |
| 365 | * mac80211 can wait on conf_mutex in stop() while the device is |
| 366 | * stopped in ath10k_core_restart() work holding conf_mutex. The state |
| 367 | * RESTARTED means that the device is up and mac80211 has started hw |
| 368 | * reconfiguration. Once mac80211 is done with the reconfiguration we |
Eliad Peller | cf2c92d | 2014-11-04 11:43:54 +0200 | [diff] [blame] | 369 | * set the state to STATE_ON in reconfig_complete(). */ |
Michal Kazior | affd321 | 2013-07-16 09:54:35 +0200 | [diff] [blame] | 370 | ATH10K_STATE_RESTARTING, |
| 371 | ATH10K_STATE_RESTARTED, |
| 372 | |
| 373 | /* The device has crashed while restarting hw. This state is like ON |
| 374 | * but commands are blocked in HTC and -ECOMM response is given. This |
| 375 | * prevents completion timeouts and makes the driver more responsive to |
| 376 | * userspace commands. This is also prevents recursive recovery. */ |
| 377 | ATH10K_STATE_WEDGED, |
Kalle Valo | 43d2a30 | 2014-09-10 18:23:30 +0300 | [diff] [blame] | 378 | |
| 379 | /* factory tests */ |
| 380 | ATH10K_STATE_UTF, |
| 381 | }; |
| 382 | |
| 383 | enum ath10k_firmware_mode { |
| 384 | /* the default mode, standard 802.11 functionality */ |
| 385 | ATH10K_FIRMWARE_MODE_NORMAL, |
| 386 | |
| 387 | /* factory tests etc */ |
| 388 | ATH10K_FIRMWARE_MODE_UTF, |
Michal Kazior | f7843d7 | 2013-07-16 09:38:52 +0200 | [diff] [blame] | 389 | }; |
| 390 | |
Michal Kazior | 0d9b043 | 2013-08-09 10:13:33 +0200 | [diff] [blame] | 391 | enum ath10k_fw_features { |
| 392 | /* wmi_mgmt_rx_hdr contains extra RSSI information */ |
| 393 | ATH10K_FW_FEATURE_EXT_WMI_MGMT_RX = 0, |
| 394 | |
Kalle Valo | 202e86e | 2014-12-03 10:10:08 +0200 | [diff] [blame] | 395 | /* Firmware from 10X branch. Deprecated, don't use in new code. */ |
Bartosz Markowski | ce42870 | 2013-09-26 17:47:05 +0200 | [diff] [blame] | 396 | ATH10K_FW_FEATURE_WMI_10X = 1, |
| 397 | |
Bartosz Markowski | 5e00d31 | 2013-09-26 17:47:12 +0200 | [diff] [blame] | 398 | /* firmware support tx frame management over WMI, otherwise it's HTT */ |
| 399 | ATH10K_FW_FEATURE_HAS_WMI_MGMT_TX = 2, |
| 400 | |
Bartosz Markowski | d354181 | 2013-12-10 16:20:40 +0100 | [diff] [blame] | 401 | /* Firmware does not support P2P */ |
| 402 | ATH10K_FW_FEATURE_NO_P2P = 3, |
| 403 | |
Kalle Valo | 202e86e | 2014-12-03 10:10:08 +0200 | [diff] [blame] | 404 | /* Firmware 10.2 feature bit. The ATH10K_FW_FEATURE_WMI_10X feature |
| 405 | * bit is required to be set as well. Deprecated, don't use in new |
| 406 | * code. |
Michal Kazior | 24c88f7 | 2014-07-25 13:32:17 +0200 | [diff] [blame] | 407 | */ |
| 408 | ATH10K_FW_FEATURE_WMI_10_2 = 4, |
| 409 | |
Michal Kazior | 0d9b043 | 2013-08-09 10:13:33 +0200 | [diff] [blame] | 410 | /* keep last */ |
| 411 | ATH10K_FW_FEATURE_COUNT, |
| 412 | }; |
| 413 | |
Marek Puzyniak | e8a50f8 | 2013-11-20 09:59:47 +0200 | [diff] [blame] | 414 | enum ath10k_dev_flags { |
| 415 | /* Indicates that ath10k device is during CAC phase of DFS */ |
| 416 | ATH10K_CAC_RUNNING, |
Michal Kazior | 6782cb6 | 2014-05-23 12:28:47 +0200 | [diff] [blame] | 417 | ATH10K_FLAG_CORE_REGISTERED, |
Michal Kazior | 7962b0d | 2014-10-28 10:34:38 +0100 | [diff] [blame] | 418 | |
| 419 | /* Device has crashed and needs to restart. This indicates any pending |
| 420 | * waiters should immediately cancel instead of waiting for a time out. |
| 421 | */ |
| 422 | ATH10K_FLAG_CRASH_FLUSH, |
Marek Puzyniak | e8a50f8 | 2013-11-20 09:59:47 +0200 | [diff] [blame] | 423 | }; |
| 424 | |
Kalle Valo | a58227e | 2014-10-13 09:40:59 +0300 | [diff] [blame] | 425 | enum ath10k_cal_mode { |
| 426 | ATH10K_CAL_MODE_FILE, |
| 427 | ATH10K_CAL_MODE_OTP, |
Toshi Kikuchi | 5aabff0 | 2014-12-02 10:55:54 +0200 | [diff] [blame] | 428 | ATH10K_CAL_MODE_DT, |
Kalle Valo | a58227e | 2014-10-13 09:40:59 +0300 | [diff] [blame] | 429 | }; |
| 430 | |
| 431 | static inline const char *ath10k_cal_mode_str(enum ath10k_cal_mode mode) |
| 432 | { |
| 433 | switch (mode) { |
| 434 | case ATH10K_CAL_MODE_FILE: |
| 435 | return "file"; |
| 436 | case ATH10K_CAL_MODE_OTP: |
| 437 | return "otp"; |
Toshi Kikuchi | 5aabff0 | 2014-12-02 10:55:54 +0200 | [diff] [blame] | 438 | case ATH10K_CAL_MODE_DT: |
| 439 | return "dt"; |
Kalle Valo | a58227e | 2014-10-13 09:40:59 +0300 | [diff] [blame] | 440 | } |
| 441 | |
| 442 | return "unknown"; |
| 443 | } |
| 444 | |
Michal Kazior | 5c81c7f | 2014-08-05 14:54:44 +0200 | [diff] [blame] | 445 | enum ath10k_scan_state { |
| 446 | ATH10K_SCAN_IDLE, |
| 447 | ATH10K_SCAN_STARTING, |
| 448 | ATH10K_SCAN_RUNNING, |
| 449 | ATH10K_SCAN_ABORTING, |
| 450 | }; |
| 451 | |
| 452 | static inline const char *ath10k_scan_state_str(enum ath10k_scan_state state) |
| 453 | { |
| 454 | switch (state) { |
| 455 | case ATH10K_SCAN_IDLE: |
| 456 | return "idle"; |
| 457 | case ATH10K_SCAN_STARTING: |
| 458 | return "starting"; |
| 459 | case ATH10K_SCAN_RUNNING: |
| 460 | return "running"; |
| 461 | case ATH10K_SCAN_ABORTING: |
| 462 | return "aborting"; |
| 463 | } |
| 464 | |
| 465 | return "unknown"; |
| 466 | } |
| 467 | |
Kalle Valo | 5e3dd15 | 2013-06-12 20:52:10 +0300 | [diff] [blame] | 468 | struct ath10k { |
| 469 | struct ath_common ath_common; |
| 470 | struct ieee80211_hw *hw; |
| 471 | struct device *dev; |
| 472 | u8 mac_addr[ETH_ALEN]; |
| 473 | |
Kalle Valo | e01ae68 | 2013-09-01 11:22:14 +0300 | [diff] [blame] | 474 | u32 chip_id; |
Kalle Valo | 5e3dd15 | 2013-06-12 20:52:10 +0300 | [diff] [blame] | 475 | u32 target_version; |
| 476 | u8 fw_version_major; |
| 477 | u32 fw_version_minor; |
| 478 | u16 fw_version_release; |
| 479 | u16 fw_version_build; |
| 480 | u32 phy_capability; |
| 481 | u32 hw_min_tx_power; |
| 482 | u32 hw_max_tx_power; |
| 483 | u32 ht_cap_info; |
| 484 | u32 vht_cap_info; |
Michal Kazior | 8865bee4 | 2013-07-24 12:36:46 +0200 | [diff] [blame] | 485 | u32 num_rf_chains; |
Kalle Valo | 5e3dd15 | 2013-06-12 20:52:10 +0300 | [diff] [blame] | 486 | |
Michal Kazior | 0d9b043 | 2013-08-09 10:13:33 +0200 | [diff] [blame] | 487 | DECLARE_BITMAP(fw_features, ATH10K_FW_FEATURE_COUNT); |
| 488 | |
Kalle Valo | 5e3dd15 | 2013-06-12 20:52:10 +0300 | [diff] [blame] | 489 | struct targetdef *targetdef; |
| 490 | struct hostdef *hostdef; |
| 491 | |
| 492 | bool p2p; |
| 493 | |
| 494 | struct { |
Kalle Valo | e07db35 | 2014-10-13 09:40:47 +0300 | [diff] [blame] | 495 | enum ath10k_bus bus; |
Kalle Valo | 5e3dd15 | 2013-06-12 20:52:10 +0300 | [diff] [blame] | 496 | const struct ath10k_hif_ops *ops; |
| 497 | } hif; |
| 498 | |
Marek Puzyniak | 9042e17 | 2014-02-10 17:14:23 +0100 | [diff] [blame] | 499 | struct completion target_suspend; |
Kalle Valo | 5e3dd15 | 2013-06-12 20:52:10 +0300 | [diff] [blame] | 500 | |
| 501 | struct ath10k_bmi bmi; |
Michal Kazior | edb8236 | 2013-07-05 16:15:14 +0300 | [diff] [blame] | 502 | struct ath10k_wmi wmi; |
Michal Kazior | cd003fa | 2013-07-05 16:15:13 +0300 | [diff] [blame] | 503 | struct ath10k_htc htc; |
Michal Kazior | edb8236 | 2013-07-05 16:15:14 +0300 | [diff] [blame] | 504 | struct ath10k_htt htt; |
Kalle Valo | 5e3dd15 | 2013-06-12 20:52:10 +0300 | [diff] [blame] | 505 | |
| 506 | struct ath10k_hw_params { |
| 507 | u32 id; |
| 508 | const char *name; |
| 509 | u32 patch_load_addr; |
Michal Kazior | 3a8200b | 2014-12-02 10:55:55 +0200 | [diff] [blame] | 510 | int uart_pin; |
Kalle Valo | 5e3dd15 | 2013-06-12 20:52:10 +0300 | [diff] [blame] | 511 | |
| 512 | struct ath10k_hw_params_fw { |
| 513 | const char *dir; |
| 514 | const char *fw; |
| 515 | const char *otp; |
| 516 | const char *board; |
Michal Kazior | 9764a2a | 2014-12-02 10:55:54 +0200 | [diff] [blame] | 517 | size_t board_size; |
| 518 | size_t board_ext_size; |
Kalle Valo | 5e3dd15 | 2013-06-12 20:52:10 +0300 | [diff] [blame] | 519 | } fw; |
| 520 | } hw_params; |
| 521 | |
Kalle Valo | 3652791 | 2013-09-27 19:54:55 +0300 | [diff] [blame] | 522 | const struct firmware *board; |
Kalle Valo | 958df3a | 2013-09-27 19:55:01 +0300 | [diff] [blame] | 523 | const void *board_data; |
| 524 | size_t board_len; |
| 525 | |
Michal Kazior | 2938505 | 2013-07-16 09:38:58 +0200 | [diff] [blame] | 526 | const struct firmware *otp; |
Kalle Valo | 958df3a | 2013-09-27 19:55:01 +0300 | [diff] [blame] | 527 | const void *otp_data; |
| 528 | size_t otp_len; |
| 529 | |
Michal Kazior | 2938505 | 2013-07-16 09:38:58 +0200 | [diff] [blame] | 530 | const struct firmware *firmware; |
Kalle Valo | 958df3a | 2013-09-27 19:55:01 +0300 | [diff] [blame] | 531 | const void *firmware_data; |
| 532 | size_t firmware_len; |
Michal Kazior | 2938505 | 2013-07-16 09:38:58 +0200 | [diff] [blame] | 533 | |
Kalle Valo | a58227e | 2014-10-13 09:40:59 +0300 | [diff] [blame] | 534 | const struct firmware *cal_file; |
| 535 | |
Kalle Valo | 1a22243 | 2013-09-27 19:55:07 +0300 | [diff] [blame] | 536 | int fw_api; |
Kalle Valo | a58227e | 2014-10-13 09:40:59 +0300 | [diff] [blame] | 537 | enum ath10k_cal_mode cal_mode; |
Kalle Valo | 1a22243 | 2013-09-27 19:55:07 +0300 | [diff] [blame] | 538 | |
Kalle Valo | 5e3dd15 | 2013-06-12 20:52:10 +0300 | [diff] [blame] | 539 | struct { |
| 540 | struct completion started; |
| 541 | struct completion completed; |
| 542 | struct completion on_channel; |
Michal Kazior | 5c81c7f | 2014-08-05 14:54:44 +0200 | [diff] [blame] | 543 | struct delayed_work timeout; |
| 544 | enum ath10k_scan_state state; |
Kalle Valo | 5e3dd15 | 2013-06-12 20:52:10 +0300 | [diff] [blame] | 545 | bool is_roc; |
Kalle Valo | 5e3dd15 | 2013-06-12 20:52:10 +0300 | [diff] [blame] | 546 | int vdev_id; |
| 547 | int roc_freq; |
| 548 | } scan; |
| 549 | |
| 550 | struct { |
| 551 | struct ieee80211_supported_band sbands[IEEE80211_NUM_BANDS]; |
| 552 | } mac; |
| 553 | |
| 554 | /* should never be NULL; needed for regular htt rx */ |
| 555 | struct ieee80211_channel *rx_channel; |
| 556 | |
| 557 | /* valid during scan; needed for mgmt rx during scan */ |
| 558 | struct ieee80211_channel *scan_channel; |
| 559 | |
Michal Kazior | c930f74 | 2014-01-23 11:38:25 +0100 | [diff] [blame] | 560 | /* current operating channel definition */ |
| 561 | struct cfg80211_chan_def chandef; |
| 562 | |
Ben Greear | 16c1117 | 2014-09-23 14:17:16 -0700 | [diff] [blame] | 563 | unsigned long long free_vdev_map; |
Michal Kazior | 1bbc097 | 2014-04-08 09:45:47 +0300 | [diff] [blame] | 564 | bool monitor; |
Kalle Valo | 5e3dd15 | 2013-06-12 20:52:10 +0300 | [diff] [blame] | 565 | int monitor_vdev_id; |
Michal Kazior | 1bbc097 | 2014-04-08 09:45:47 +0300 | [diff] [blame] | 566 | bool monitor_started; |
Kalle Valo | 5e3dd15 | 2013-06-12 20:52:10 +0300 | [diff] [blame] | 567 | unsigned int filter_flags; |
Marek Puzyniak | e8a50f8 | 2013-11-20 09:59:47 +0200 | [diff] [blame] | 568 | unsigned long dev_flags; |
Marek Puzyniak | 7d9b40b | 2013-11-20 10:00:28 +0200 | [diff] [blame] | 569 | u32 dfs_block_radar_events; |
Kalle Valo | 5e3dd15 | 2013-06-12 20:52:10 +0300 | [diff] [blame] | 570 | |
Michal Kazior | d650097 | 2014-04-08 09:56:09 +0300 | [diff] [blame] | 571 | /* protected by conf_mutex */ |
| 572 | bool radar_enabled; |
| 573 | int num_started_vdevs; |
| 574 | |
Ben Greear | 46acf7b | 2014-05-16 17:15:38 +0300 | [diff] [blame] | 575 | /* Protected by conf-mutex */ |
| 576 | u8 supp_tx_chainmask; |
| 577 | u8 supp_rx_chainmask; |
| 578 | u8 cfg_tx_chainmask; |
| 579 | u8 cfg_rx_chainmask; |
| 580 | |
Kalle Valo | 5e3dd15 | 2013-06-12 20:52:10 +0300 | [diff] [blame] | 581 | struct wmi_pdev_set_wmm_params_arg wmm_params; |
| 582 | struct completion install_key_done; |
| 583 | |
| 584 | struct completion vdev_setup_done; |
| 585 | |
| 586 | struct workqueue_struct *workqueue; |
| 587 | |
| 588 | /* prevents concurrent FW reconfiguration */ |
| 589 | struct mutex conf_mutex; |
| 590 | |
| 591 | /* protects shared structure data */ |
| 592 | spinlock_t data_lock; |
| 593 | |
Michal Kazior | 0579119 | 2013-10-16 15:44:45 +0300 | [diff] [blame] | 594 | struct list_head arvifs; |
Kalle Valo | 5e3dd15 | 2013-06-12 20:52:10 +0300 | [diff] [blame] | 595 | struct list_head peers; |
| 596 | wait_queue_head_t peer_mapping_wq; |
| 597 | |
Michal Kazior | 292a753 | 2014-11-25 15:16:04 +0100 | [diff] [blame] | 598 | /* protected by conf_mutex */ |
Bartosz Markowski | 0e759f3 | 2014-01-02 14:38:33 +0100 | [diff] [blame] | 599 | int num_peers; |
Michal Kazior | cfd1061 | 2014-11-25 15:16:05 +0100 | [diff] [blame] | 600 | int num_stations; |
| 601 | |
| 602 | int max_num_peers; |
| 603 | int max_num_stations; |
Kalle Valo | 30c7816 | 2014-12-17 12:20:45 +0200 | [diff] [blame] | 604 | int max_num_vdevs; |
Bartosz Markowski | 0e759f3 | 2014-01-02 14:38:33 +0100 | [diff] [blame] | 605 | |
Kalle Valo | 5e3dd15 | 2013-06-12 20:52:10 +0300 | [diff] [blame] | 606 | struct work_struct offchan_tx_work; |
| 607 | struct sk_buff_head offchan_tx_queue; |
| 608 | struct completion offchan_tx_completed; |
| 609 | struct sk_buff *offchan_tx_skb; |
| 610 | |
Bartosz Markowski | 5e00d31 | 2013-09-26 17:47:12 +0200 | [diff] [blame] | 611 | struct work_struct wmi_mgmt_tx_work; |
| 612 | struct sk_buff_head wmi_mgmt_tx_queue; |
| 613 | |
Michal Kazior | f7843d7 | 2013-07-16 09:38:52 +0200 | [diff] [blame] | 614 | enum ath10k_state state; |
| 615 | |
Michal Kazior | 6782cb6 | 2014-05-23 12:28:47 +0200 | [diff] [blame] | 616 | struct work_struct register_work; |
Michal Kazior | affd321 | 2013-07-16 09:54:35 +0200 | [diff] [blame] | 617 | struct work_struct restart_work; |
| 618 | |
Michal Kazior | 2e1dea4 | 2013-07-31 10:32:40 +0200 | [diff] [blame] | 619 | /* cycle count is reported twice for each visited channel during scan. |
| 620 | * access protected by data_lock */ |
| 621 | u32 survey_last_rx_clear_count; |
| 622 | u32 survey_last_cycle_count; |
| 623 | struct survey_info survey[ATH10K_NUM_CHANS]; |
| 624 | |
Janusz Dziedzic | 9702c68 | 2013-11-20 09:59:41 +0200 | [diff] [blame] | 625 | struct dfs_pattern_detector *dfs_detector; |
| 626 | |
Kalle Valo | 5e3dd15 | 2013-06-12 20:52:10 +0300 | [diff] [blame] | 627 | #ifdef CONFIG_ATH10K_DEBUGFS |
| 628 | struct ath10k_debug debug; |
| 629 | #endif |
Simon Wunderlich | 855aed1 | 2014-08-02 09:12:54 +0300 | [diff] [blame] | 630 | |
| 631 | struct { |
| 632 | /* relay(fs) channel for spectral scan */ |
| 633 | struct rchan *rfs_chan_spec_scan; |
| 634 | |
| 635 | /* spectral_mode and spec_config are protected by conf_mutex */ |
| 636 | enum ath10k_spectral_mode mode; |
| 637 | struct ath10k_spec_scan config; |
| 638 | } spectral; |
Michal Kazior | e7b5419 | 2014-08-07 11:03:27 +0200 | [diff] [blame] | 639 | |
Kalle Valo | 43d2a30 | 2014-09-10 18:23:30 +0300 | [diff] [blame] | 640 | struct { |
| 641 | /* protected by conf_mutex */ |
| 642 | const struct firmware *utf; |
| 643 | DECLARE_BITMAP(orig_fw_features, ATH10K_FW_FEATURE_COUNT); |
Michal Kazior | d7579d1 | 2014-12-03 10:10:54 +0200 | [diff] [blame] | 644 | enum ath10k_fw_wmi_op_version orig_wmi_op_version; |
Kalle Valo | 43d2a30 | 2014-09-10 18:23:30 +0300 | [diff] [blame] | 645 | |
| 646 | /* protected by data_lock */ |
| 647 | bool utf_monitor; |
| 648 | } testmode; |
| 649 | |
Ben Greear | f51dbe7 | 2014-09-29 14:41:46 +0300 | [diff] [blame] | 650 | struct { |
| 651 | /* protected by data_lock */ |
| 652 | u32 fw_crash_counter; |
| 653 | u32 fw_warm_reset_counter; |
| 654 | u32 fw_cold_reset_counter; |
| 655 | } stats; |
| 656 | |
Rajkumar Manoharan | fe6f36d | 2014-12-17 12:22:07 +0200 | [diff] [blame] | 657 | struct ath10k_thermal thermal; |
| 658 | |
Michal Kazior | e7b5419 | 2014-08-07 11:03:27 +0200 | [diff] [blame] | 659 | /* must be last */ |
| 660 | u8 drv_priv[0] __aligned(sizeof(void *)); |
Kalle Valo | 5e3dd15 | 2013-06-12 20:52:10 +0300 | [diff] [blame] | 661 | }; |
| 662 | |
Michal Kazior | e7b5419 | 2014-08-07 11:03:27 +0200 | [diff] [blame] | 663 | struct ath10k *ath10k_core_create(size_t priv_size, struct device *dev, |
Kalle Valo | e07db35 | 2014-10-13 09:40:47 +0300 | [diff] [blame] | 664 | enum ath10k_bus bus, |
Kalle Valo | 5e3dd15 | 2013-06-12 20:52:10 +0300 | [diff] [blame] | 665 | const struct ath10k_hif_ops *hif_ops); |
| 666 | void ath10k_core_destroy(struct ath10k *ar); |
| 667 | |
Kalle Valo | 43d2a30 | 2014-09-10 18:23:30 +0300 | [diff] [blame] | 668 | int ath10k_core_start(struct ath10k *ar, enum ath10k_firmware_mode mode); |
Marek Puzyniak | 00f5482 | 2014-02-10 17:14:24 +0100 | [diff] [blame] | 669 | int ath10k_wait_for_suspend(struct ath10k *ar, u32 suspend_opt); |
Michal Kazior | dd30a36 | 2013-07-16 09:38:51 +0200 | [diff] [blame] | 670 | void ath10k_core_stop(struct ath10k *ar); |
Kalle Valo | e01ae68 | 2013-09-01 11:22:14 +0300 | [diff] [blame] | 671 | int ath10k_core_register(struct ath10k *ar, u32 chip_id); |
Kalle Valo | 5e3dd15 | 2013-06-12 20:52:10 +0300 | [diff] [blame] | 672 | void ath10k_core_unregister(struct ath10k *ar); |
| 673 | |
Kalle Valo | 5e3dd15 | 2013-06-12 20:52:10 +0300 | [diff] [blame] | 674 | #endif /* _CORE_H_ */ |