core.h 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581
  1. /*
  2. * Copyright (c) 2010-2011 Atheros Communications Inc.
  3. *
  4. * Permission to use, copy, modify, and/or distribute this software for any
  5. * purpose with or without fee is hereby granted, provided that the above
  6. * copyright notice and this permission notice appear in all copies.
  7. *
  8. * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
  9. * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
  10. * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
  11. * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
  12. * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
  13. * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
  14. * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  15. */
  16. #ifndef CORE_H
  17. #define CORE_H
  18. #include <linux/etherdevice.h>
  19. #include <linux/rtnetlink.h>
  20. #include <linux/firmware.h>
  21. #include <linux/sched.h>
  22. #include <linux/circ_buf.h>
  23. #include <net/cfg80211.h>
  24. #include "htc.h"
  25. #include "wmi.h"
  26. #include "bmi.h"
  27. #include "target.h"
  28. #define MAX_ATH6KL 1
  29. #define ATH6KL_MAX_RX_BUFFERS 16
  30. #define ATH6KL_BUFFER_SIZE 1664
  31. #define ATH6KL_MAX_AMSDU_RX_BUFFERS 4
  32. #define ATH6KL_AMSDU_REFILL_THRESHOLD 3
  33. #define ATH6KL_AMSDU_BUFFER_SIZE (WMI_MAX_AMSDU_RX_DATA_FRAME_LENGTH + 128)
  34. #define MAX_MSDU_SUBFRAME_PAYLOAD_LEN 1508
  35. #define MIN_MSDU_SUBFRAME_PAYLOAD_LEN 46
  36. #define USER_SAVEDKEYS_STAT_INIT 0
  37. #define USER_SAVEDKEYS_STAT_RUN 1
  38. #define ATH6KL_TX_TIMEOUT 10
  39. #define ATH6KL_MAX_ENDPOINTS 4
  40. #define MAX_NODE_NUM 15
  41. /* Extra bytes for htc header alignment */
  42. #define ATH6KL_HTC_ALIGN_BYTES 3
  43. /* MAX_HI_COOKIE_NUM are reserved for high priority traffic */
  44. #define MAX_DEF_COOKIE_NUM 180
  45. #define MAX_HI_COOKIE_NUM 18 /* 10% of MAX_COOKIE_NUM */
  46. #define MAX_COOKIE_NUM (MAX_DEF_COOKIE_NUM + MAX_HI_COOKIE_NUM)
  47. #define MAX_DEFAULT_SEND_QUEUE_DEPTH (MAX_DEF_COOKIE_NUM / WMM_NUM_AC)
  48. #define DISCON_TIMER_INTVAL 10000 /* in msec */
  49. #define A_DEFAULT_LISTEN_INTERVAL 100
  50. #define A_MAX_WOW_LISTEN_INTERVAL 1000
  51. /* AR6003 1.0 definitions */
  52. #define AR6003_REV1_VERSION 0x300002ba
  53. /* AR6003 2.0 definitions */
  54. #define AR6003_REV2_VERSION 0x30000384
  55. #define AR6003_REV2_PATCH_DOWNLOAD_ADDRESS 0x57e910
  56. #define AR6003_REV2_OTP_FILE "ath6k/AR6003/hw2.0/otp.bin.z77"
  57. #define AR6003_REV2_FIRMWARE_FILE "ath6k/AR6003/hw2.0/athwlan.bin.z77"
  58. #define AR6003_REV2_TCMD_FIRMWARE_FILE "ath6k/AR6003/hw2.0/athtcmd_ram.bin"
  59. #define AR6003_REV2_PATCH_FILE "ath6k/AR6003/hw2.0/data.patch.bin"
  60. #define AR6003_REV2_BOARD_DATA_FILE "ath6k/AR6003/hw2.0/bdata.bin"
  61. #define AR6003_REV2_DEFAULT_BOARD_DATA_FILE "ath6k/AR6003/hw2.0/bdata.SD31.bin"
  62. /* AR6003 3.0 definitions */
  63. #define AR6003_REV3_VERSION 0x30000582
  64. #define AR6003_REV3_OTP_FILE "ath6k/AR6003/hw2.1.1/otp.bin"
  65. #define AR6003_REV3_FIRMWARE_FILE "ath6k/AR6003/hw2.1.1/athwlan.bin"
  66. #define AR6003_REV3_TCMD_FIRMWARE_FILE "ath6k/AR6003/hw2.1.1/athtcmd_ram.bin"
  67. #define AR6003_REV3_PATCH_FILE "ath6k/AR6003/hw2.1.1/data.patch.bin"
  68. #define AR6003_REV3_BOARD_DATA_FILE "ath6k/AR6003/hw2.1.1/bdata.bin"
  69. #define AR6003_REV3_DEFAULT_BOARD_DATA_FILE \
  70. "ath6k/AR6003/hw2.1.1/bdata.SD31.bin"
  71. /* AR6004 1.0 definitions */
  72. #define AR6004_REV1_VERSION 0x30000623
  73. #define AR6004_REV1_FIRMWARE_FILE "ath6k/AR6004/hw6.1/fw.ram.bin"
  74. #define AR6004_REV1_BOARD_DATA_FILE "ath6k/AR6004/hw6.1/bdata.bin"
  75. #define AR6004_REV1_DEFAULT_BOARD_DATA_FILE "ath6k/AR6004/hw6.1/bdata.DB132.bin"
  76. #define AR6004_REV1_EPPING_FIRMWARE_FILE "ath6k/AR6004/hw6.1/endpointping.bin"
  77. /* Per STA data, used in AP mode */
  78. #define STA_PS_AWAKE BIT(0)
  79. #define STA_PS_SLEEP BIT(1)
  80. #define STA_PS_POLLED BIT(2)
  81. /* HTC TX packet tagging definitions */
  82. #define ATH6KL_CONTROL_PKT_TAG HTC_TX_PACKET_TAG_USER_DEFINED
  83. #define ATH6KL_DATA_PKT_TAG (ATH6KL_CONTROL_PKT_TAG + 1)
  84. #define AR6003_CUST_DATA_SIZE 16
  85. #define AGGR_WIN_IDX(x, y) ((x) % (y))
  86. #define AGGR_INCR_IDX(x, y) AGGR_WIN_IDX(((x) + 1), (y))
  87. #define AGGR_DCRM_IDX(x, y) AGGR_WIN_IDX(((x) - 1), (y))
  88. #define ATH6KL_MAX_SEQ_NO 0xFFF
  89. #define ATH6KL_NEXT_SEQ_NO(x) (((x) + 1) & ATH6KL_MAX_SEQ_NO)
  90. #define NUM_OF_TIDS 8
  91. #define AGGR_SZ_DEFAULT 8
  92. #define AGGR_WIN_SZ_MIN 2
  93. #define AGGR_WIN_SZ_MAX 8
  94. #define TID_WINDOW_SZ(_x) ((_x) << 1)
  95. #define AGGR_NUM_OF_FREE_NETBUFS 16
  96. #define AGGR_RX_TIMEOUT 400 /* in ms */
  97. #define WMI_TIMEOUT (2 * HZ)
  98. #define MBOX_YIELD_LIMIT 99
  99. /* configuration lags */
  100. /*
  101. * ATH6KL_CONF_IGNORE_ERP_BARKER: Ignore the barker premable in
  102. * ERP IE of beacon to determine the short premable support when
  103. * sending (Re)Assoc req.
  104. * ATH6KL_CONF_IGNORE_PS_FAIL_EVT_IN_SCAN: Don't send the power
  105. * module state transition failure events which happen during
  106. * scan, to the host.
  107. */
  108. #define ATH6KL_CONF_IGNORE_ERP_BARKER BIT(0)
  109. #define ATH6KL_CONF_IGNORE_PS_FAIL_EVT_IN_SCAN BIT(1)
  110. #define ATH6KL_CONF_ENABLE_11N BIT(2)
  111. #define ATH6KL_CONF_ENABLE_TX_BURST BIT(3)
  112. enum wlan_low_pwr_state {
  113. WLAN_POWER_STATE_ON,
  114. WLAN_POWER_STATE_CUT_PWR,
  115. WLAN_POWER_STATE_DEEP_SLEEP,
  116. WLAN_POWER_STATE_WOW
  117. };
  118. enum sme_state {
  119. SME_DISCONNECTED,
  120. SME_CONNECTING,
  121. SME_CONNECTED
  122. };
  123. struct skb_hold_q {
  124. struct sk_buff *skb;
  125. bool is_amsdu;
  126. u16 seq_no;
  127. };
  128. struct rxtid {
  129. bool aggr;
  130. bool progress;
  131. bool timer_mon;
  132. u16 win_sz;
  133. u16 seq_next;
  134. u32 hold_q_sz;
  135. struct skb_hold_q *hold_q;
  136. struct sk_buff_head q;
  137. spinlock_t lock;
  138. };
  139. struct rxtid_stats {
  140. u32 num_into_aggr;
  141. u32 num_dups;
  142. u32 num_oow;
  143. u32 num_mpdu;
  144. u32 num_amsdu;
  145. u32 num_delivered;
  146. u32 num_timeouts;
  147. u32 num_hole;
  148. u32 num_bar;
  149. };
  150. struct aggr_info {
  151. u8 aggr_sz;
  152. u8 timer_scheduled;
  153. struct timer_list timer;
  154. struct net_device *dev;
  155. struct rxtid rx_tid[NUM_OF_TIDS];
  156. struct sk_buff_head free_q;
  157. struct rxtid_stats stat[NUM_OF_TIDS];
  158. };
  159. struct ath6kl_wep_key {
  160. u8 key_index;
  161. u8 key_len;
  162. u8 key[64];
  163. };
  164. #define ATH6KL_KEY_SEQ_LEN 8
  165. struct ath6kl_key {
  166. u8 key[WLAN_MAX_KEY_LEN];
  167. u8 key_len;
  168. u8 seq[ATH6KL_KEY_SEQ_LEN];
  169. u8 seq_len;
  170. u32 cipher;
  171. };
  172. struct ath6kl_node_mapping {
  173. u8 mac_addr[ETH_ALEN];
  174. u8 ep_id;
  175. u8 tx_pend;
  176. };
  177. struct ath6kl_cookie {
  178. struct sk_buff *skb;
  179. u32 map_no;
  180. struct htc_packet htc_pkt;
  181. struct ath6kl_cookie *arc_list_next;
  182. };
  183. struct ath6kl_sta {
  184. u16 sta_flags;
  185. u8 mac[ETH_ALEN];
  186. u8 aid;
  187. u8 keymgmt;
  188. u8 ucipher;
  189. u8 auth;
  190. u8 wpa_ie[ATH6KL_MAX_IE];
  191. struct sk_buff_head psq;
  192. spinlock_t psq_lock;
  193. };
  194. struct ath6kl_version {
  195. u32 target_ver;
  196. u32 wlan_ver;
  197. u32 abi_ver;
  198. };
  199. struct ath6kl_bmi {
  200. u32 cmd_credits;
  201. bool done_sent;
  202. u8 *cmd_buf;
  203. };
  204. struct target_stats {
  205. u64 tx_pkt;
  206. u64 tx_byte;
  207. u64 tx_ucast_pkt;
  208. u64 tx_ucast_byte;
  209. u64 tx_mcast_pkt;
  210. u64 tx_mcast_byte;
  211. u64 tx_bcast_pkt;
  212. u64 tx_bcast_byte;
  213. u64 tx_rts_success_cnt;
  214. u64 tx_pkt_per_ac[4];
  215. u64 tx_err;
  216. u64 tx_fail_cnt;
  217. u64 tx_retry_cnt;
  218. u64 tx_mult_retry_cnt;
  219. u64 tx_rts_fail_cnt;
  220. u64 rx_pkt;
  221. u64 rx_byte;
  222. u64 rx_ucast_pkt;
  223. u64 rx_ucast_byte;
  224. u64 rx_mcast_pkt;
  225. u64 rx_mcast_byte;
  226. u64 rx_bcast_pkt;
  227. u64 rx_bcast_byte;
  228. u64 rx_frgment_pkt;
  229. u64 rx_err;
  230. u64 rx_crc_err;
  231. u64 rx_key_cache_miss;
  232. u64 rx_decrypt_err;
  233. u64 rx_dupl_frame;
  234. u64 tkip_local_mic_fail;
  235. u64 tkip_cnter_measures_invoked;
  236. u64 tkip_replays;
  237. u64 tkip_fmt_err;
  238. u64 ccmp_fmt_err;
  239. u64 ccmp_replays;
  240. u64 pwr_save_fail_cnt;
  241. u64 cs_bmiss_cnt;
  242. u64 cs_low_rssi_cnt;
  243. u64 cs_connect_cnt;
  244. u64 cs_discon_cnt;
  245. s32 tx_ucast_rate;
  246. s32 rx_ucast_rate;
  247. u32 lq_val;
  248. u32 wow_pkt_dropped;
  249. u16 wow_evt_discarded;
  250. s16 noise_floor_calib;
  251. s16 cs_rssi;
  252. s16 cs_ave_beacon_rssi;
  253. u8 cs_ave_beacon_snr;
  254. u8 cs_last_roam_msec;
  255. u8 cs_snr;
  256. u8 wow_host_pkt_wakeups;
  257. u8 wow_host_evt_wakeups;
  258. u32 arp_received;
  259. u32 arp_matched;
  260. u32 arp_replied;
  261. };
  262. struct ath6kl_mbox_info {
  263. u32 htc_addr;
  264. u32 htc_ext_addr;
  265. u32 htc_ext_sz;
  266. u32 block_size;
  267. u32 gmbox_addr;
  268. u32 gmbox_sz;
  269. };
  270. /*
  271. * 802.11i defines an extended IV for use with non-WEP ciphers.
  272. * When the EXTIV bit is set in the key id byte an additional
  273. * 4 bytes immediately follow the IV for TKIP. For CCMP the
  274. * EXTIV bit is likewise set but the 8 bytes represent the
  275. * CCMP header rather than IV+extended-IV.
  276. */
  277. #define ATH6KL_KEYBUF_SIZE 16
  278. #define ATH6KL_MICBUF_SIZE (8+8) /* space for both tx and rx */
  279. #define ATH6KL_KEY_XMIT 0x01
  280. #define ATH6KL_KEY_RECV 0x02
  281. #define ATH6KL_KEY_DEFAULT 0x80 /* default xmit key */
  282. /* Initial group key for AP mode */
  283. struct ath6kl_req_key {
  284. bool valid;
  285. u8 key_index;
  286. int key_type;
  287. u8 key[WLAN_MAX_KEY_LEN];
  288. u8 key_len;
  289. };
  290. /* Flag info */
  291. #define WMI_ENABLED 0
  292. #define WMI_READY 1
  293. #define CONNECTED 2
  294. #define STATS_UPDATE_PEND 3
  295. #define CONNECT_PEND 4
  296. #define WMM_ENABLED 5
  297. #define NETQ_STOPPED 6
  298. #define WMI_CTRL_EP_FULL 7
  299. #define DTIM_EXPIRED 8
  300. #define DESTROY_IN_PROGRESS 9
  301. #define NETDEV_REGISTERED 10
  302. #define SKIP_SCAN 11
  303. #define WLAN_ENABLED 12
  304. #define TESTMODE 13
  305. struct ath6kl {
  306. struct device *dev;
  307. struct net_device *net_dev;
  308. struct ath6kl_bmi bmi;
  309. const struct ath6kl_hif_ops *hif_ops;
  310. struct wmi *wmi;
  311. int tx_pending[ENDPOINT_MAX];
  312. int total_tx_data_pend;
  313. struct htc_target *htc_target;
  314. void *hif_priv;
  315. spinlock_t lock;
  316. struct semaphore sem;
  317. int ssid_len;
  318. u8 ssid[IEEE80211_MAX_SSID_LEN];
  319. u8 next_mode;
  320. u8 nw_type;
  321. u8 dot11_auth_mode;
  322. u8 auth_mode;
  323. u8 prwise_crypto;
  324. u8 prwise_crypto_len;
  325. u8 grp_crypto;
  326. u8 grp_crypto_len;
  327. u8 def_txkey_index;
  328. struct ath6kl_wep_key wep_key_list[WMI_MAX_KEY_INDEX + 1];
  329. u8 bssid[ETH_ALEN];
  330. u8 req_bssid[ETH_ALEN];
  331. u16 ch_hint;
  332. u16 bss_ch;
  333. u16 listen_intvl_b;
  334. u16 listen_intvl_t;
  335. struct ath6kl_version version;
  336. u32 target_type;
  337. u8 tx_pwr;
  338. struct net_device_stats net_stats;
  339. struct target_stats target_stats;
  340. struct ath6kl_node_mapping node_map[MAX_NODE_NUM];
  341. u8 ibss_ps_enable;
  342. u8 node_num;
  343. u8 next_ep_id;
  344. struct ath6kl_cookie *cookie_list;
  345. u32 cookie_count;
  346. enum htc_endpoint_id ac2ep_map[WMM_NUM_AC];
  347. bool ac_stream_active[WMM_NUM_AC];
  348. u8 ac_stream_pri_map[WMM_NUM_AC];
  349. u8 hiac_stream_active_pri;
  350. u8 ep2ac_map[ENDPOINT_MAX];
  351. enum htc_endpoint_id ctrl_ep;
  352. struct htc_credit_state_info credit_state_info;
  353. u32 connect_ctrl_flags;
  354. u32 user_key_ctrl;
  355. u8 usr_bss_filter;
  356. struct ath6kl_sta sta_list[AP_MAX_NUM_STA];
  357. u8 sta_list_index;
  358. struct ath6kl_req_key ap_mode_bkey;
  359. struct sk_buff_head mcastpsq;
  360. spinlock_t mcastpsq_lock;
  361. u8 intra_bss;
  362. struct aggr_info *aggr_cntxt;
  363. struct wmi_ap_mode_stat ap_stats;
  364. u8 ap_country_code[3];
  365. struct list_head amsdu_rx_buffer_queue;
  366. struct timer_list disconnect_timer;
  367. u8 rx_meta_ver;
  368. struct wireless_dev *wdev;
  369. struct cfg80211_scan_request *scan_req;
  370. struct ath6kl_key keys[WMI_MAX_KEY_INDEX + 1];
  371. enum sme_state sme_state;
  372. enum wlan_low_pwr_state wlan_pwr_state;
  373. struct wmi_scan_params_cmd sc_params;
  374. #define AR_MCAST_FILTER_MAC_ADDR_SIZE 4
  375. u8 auto_auth_stage;
  376. struct {
  377. void *rx_report;
  378. size_t rx_report_len;
  379. } tm;
  380. u16 conf_flags;
  381. wait_queue_head_t event_wq;
  382. struct ath6kl_mbox_info mbox_info;
  383. struct ath6kl_cookie cookie_mem[MAX_COOKIE_NUM];
  384. int reconnect_flag;
  385. unsigned long flag;
  386. u8 *fw_board;
  387. size_t fw_board_len;
  388. u8 *fw_otp;
  389. size_t fw_otp_len;
  390. u8 *fw;
  391. size_t fw_len;
  392. u8 *fw_patch;
  393. size_t fw_patch_len;
  394. struct workqueue_struct *ath6kl_wq;
  395. struct ath6kl_node_table scan_table;
  396. struct dentry *debugfs_phy;
  397. u32 send_action_id;
  398. bool probe_req_report;
  399. u16 next_chan;
  400. #ifdef CONFIG_ATH6KL_DEBUG
  401. struct {
  402. struct circ_buf fwlog_buf;
  403. spinlock_t fwlog_lock;
  404. void *fwlog_tmp;
  405. u32 fwlog_mask;
  406. unsigned int dbgfs_diag_reg;
  407. } debug;
  408. #endif /* CONFIG_ATH6KL_DEBUG */
  409. };
  410. static inline void *ath6kl_priv(struct net_device *dev)
  411. {
  412. return wdev_priv(dev->ieee80211_ptr);
  413. }
  414. static inline void ath6kl_deposit_credit_to_ep(struct htc_credit_state_info
  415. *cred_info,
  416. struct htc_endpoint_credit_dist
  417. *ep_dist, int credits)
  418. {
  419. ep_dist->credits += credits;
  420. ep_dist->cred_assngd += credits;
  421. cred_info->cur_free_credits -= credits;
  422. }
  423. static inline u32 ath6kl_get_hi_item_addr(struct ath6kl *ar,
  424. u32 item_offset)
  425. {
  426. u32 addr = 0;
  427. if (ar->target_type == TARGET_TYPE_AR6003)
  428. addr = ATH6KL_AR6003_HI_START_ADDR + item_offset;
  429. else if (ar->target_type == TARGET_TYPE_AR6004)
  430. addr = ATH6KL_AR6004_HI_START_ADDR + item_offset;
  431. return addr;
  432. }
  433. void ath6kl_destroy(struct net_device *dev, unsigned int unregister);
  434. int ath6kl_configure_target(struct ath6kl *ar);
  435. void ath6kl_detect_error(unsigned long ptr);
  436. void disconnect_timer_handler(unsigned long ptr);
  437. void init_netdev(struct net_device *dev);
  438. void ath6kl_cookie_init(struct ath6kl *ar);
  439. void ath6kl_cookie_cleanup(struct ath6kl *ar);
  440. void ath6kl_rx(struct htc_target *target, struct htc_packet *packet);
  441. void ath6kl_tx_complete(void *context, struct list_head *packet_queue);
  442. enum htc_send_full_action ath6kl_tx_queue_full(struct htc_target *target,
  443. struct htc_packet *packet);
  444. void ath6kl_stop_txrx(struct ath6kl *ar);
  445. void ath6kl_cleanup_amsdu_rxbufs(struct ath6kl *ar);
  446. int ath6kl_diag_write(struct ath6kl *ar, u32 address, void *data, u32 length);
  447. int ath6kl_diag_read32(struct ath6kl *ar, u32 address, u32 *value);
  448. int ath6kl_diag_read(struct ath6kl *ar, u32 address, void *data, u32 length);
  449. int ath6kl_read_fwlogs(struct ath6kl *ar);
  450. void ath6kl_init_profile_info(struct ath6kl *ar);
  451. void ath6kl_tx_data_cleanup(struct ath6kl *ar);
  452. void ath6kl_stop_endpoint(struct net_device *dev, bool keep_profile,
  453. bool get_dbglogs);
  454. struct ath6kl_cookie *ath6kl_alloc_cookie(struct ath6kl *ar);
  455. void ath6kl_free_cookie(struct ath6kl *ar, struct ath6kl_cookie *cookie);
  456. int ath6kl_data_tx(struct sk_buff *skb, struct net_device *dev);
  457. struct aggr_info *aggr_init(struct net_device *dev);
  458. void ath6kl_rx_refill(struct htc_target *target,
  459. enum htc_endpoint_id endpoint);
  460. void ath6kl_refill_amsdu_rxbufs(struct ath6kl *ar, int count);
  461. struct htc_packet *ath6kl_alloc_amsdu_rxbuf(struct htc_target *target,
  462. enum htc_endpoint_id endpoint,
  463. int len);
  464. void aggr_module_destroy(struct aggr_info *aggr_info);
  465. void aggr_reset_state(struct aggr_info *aggr_info);
  466. struct ath6kl_sta *ath6kl_find_sta(struct ath6kl *ar, u8 * node_addr);
  467. struct ath6kl_sta *ath6kl_find_sta_by_aid(struct ath6kl *ar, u8 aid);
  468. void ath6kl_ready_event(void *devt, u8 * datap, u32 sw_ver, u32 abi_ver);
  469. int ath6kl_control_tx(void *devt, struct sk_buff *skb,
  470. enum htc_endpoint_id eid);
  471. void ath6kl_connect_event(struct ath6kl *ar, u16 channel,
  472. u8 *bssid, u16 listen_int,
  473. u16 beacon_int, enum network_type net_type,
  474. u8 beacon_ie_len, u8 assoc_req_len,
  475. u8 assoc_resp_len, u8 *assoc_info);
  476. void ath6kl_disconnect_event(struct ath6kl *ar, u8 reason,
  477. u8 *bssid, u8 assoc_resp_len,
  478. u8 *assoc_info, u16 prot_reason_status);
  479. void ath6kl_tkip_micerr_event(struct ath6kl *ar, u8 keyid, bool ismcast);
  480. void ath6kl_txpwr_rx_evt(void *devt, u8 tx_pwr);
  481. void ath6kl_scan_complete_evt(struct ath6kl *ar, int status);
  482. void ath6kl_tgt_stats_event(struct ath6kl *ar, u8 *ptr, u32 len);
  483. void ath6kl_indicate_tx_activity(void *devt, u8 traffic_class, bool active);
  484. enum htc_endpoint_id ath6kl_ac2_endpoint_id(void *devt, u8 ac);
  485. void ath6kl_pspoll_event(struct ath6kl *ar, u8 aid);
  486. void ath6kl_dtimexpiry_event(struct ath6kl *ar);
  487. void ath6kl_disconnect(struct ath6kl *ar);
  488. void ath6kl_deep_sleep_enable(struct ath6kl *ar);
  489. void aggr_recv_delba_req_evt(struct ath6kl *ar, u8 tid);
  490. void aggr_recv_addba_req_evt(struct ath6kl *ar, u8 tid, u16 seq_no,
  491. u8 win_sz);
  492. void ath6kl_wakeup_event(void *dev);
  493. void ath6kl_target_failure(struct ath6kl *ar);
  494. void ath6kl_cfg80211_scan_node(struct wiphy *wiphy, struct bss *ni);
  495. #endif /* CORE_H */