2 * Copyright (c) 2010-2011 Atheros Communications Inc.
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.
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.
20 #include <linux/netdevice.h>
22 #define ATH6KL_MAX_IE 256
24 extern int ath6kl_printk(const char *level
, const char *fmt
, ...);
27 * Reflects the version of binary interface exposed by ATH6KL target
28 * firmware. Needs to be incremented by 1 for any change in the firmware
29 * that requires upgrade of the driver on the host side for the change to
32 #define ATH6KL_ABI_VERSION 1
34 #define SIGNAL_QUALITY_METRICS_NUM_MAX 2
37 SIGNAL_QUALITY_METRICS_SNR
= 0,
38 SIGNAL_QUALITY_METRICS_RSSI
,
39 SIGNAL_QUALITY_METRICS_ALL
,
46 #define WMI_MAX_TX_DATA_FRAME_LENGTH \
47 (1500 + sizeof(struct wmi_data_hdr) + \
48 sizeof(struct ethhdr) + \
49 sizeof(struct ath6kl_llc_snap_hdr))
51 /* An AMSDU frame */ /* The MAX AMSDU length of AR6003 is 3839 */
52 #define WMI_MAX_AMSDU_RX_DATA_FRAME_LENGTH \
53 (3840 + sizeof(struct wmi_data_hdr) + \
54 sizeof(struct ethhdr) + \
55 sizeof(struct ath6kl_llc_snap_hdr))
57 #define EPPING_ALIGNMENT_PAD \
58 (((sizeof(struct htc_frame_hdr) + 3) & (~0x3)) \
59 - sizeof(struct htc_frame_hdr))
61 struct ath6kl_llc_snap_hdr
{
77 struct htc_endpoint_credit_dist
;
79 enum htc_credit_dist_reason
;
80 struct ath6kl_htc_credit_info
;
82 struct ath6kl
*ath6kl_core_alloc(struct device
*sdev
);
83 int ath6kl_core_init(struct ath6kl
*ar
);
84 void ath6kl_core_cleanup(struct ath6kl
*ar
);
85 struct sk_buff
*ath6kl_buf_alloc(int size
);