Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
common.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2010-2011 Atheros Communications Inc.
3  * Copyright (c) 2011-2012 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 COMMON_H
19 #define COMMON_H
20 
21 #include <linux/netdevice.h>
22 
23 #define ATH6KL_MAX_IE 256
24 
25 extern __printf(2, 3)
26 int ath6kl_printk(const char *level, const char *fmt, ...);
27 
28 /*
29  * Reflects the version of binary interface exposed by ATH6KL target
30  * firmware. Needs to be incremented by 1 for any change in the firmware
31  * that requires upgrade of the driver on the host side for the change to
32  * work correctly
33  */
34 #define ATH6KL_ABI_VERSION 1
35 
36 #define SIGNAL_QUALITY_METRICS_NUM_MAX 2
37 
38 enum {
42 };
43 
44 /*
45  * Data Path
46  */
47 
48 #define WMI_MAX_TX_DATA_FRAME_LENGTH \
49  (1500 + sizeof(struct wmi_data_hdr) + \
50  sizeof(struct ethhdr) + \
51  sizeof(struct ath6kl_llc_snap_hdr))
52 
53 /* An AMSDU frame */ /* The MAX AMSDU length of AR6003 is 3839 */
54 #define WMI_MAX_AMSDU_RX_DATA_FRAME_LENGTH \
55  (3840 + sizeof(struct wmi_data_hdr) + \
56  sizeof(struct ethhdr) + \
57  sizeof(struct ath6kl_llc_snap_hdr))
58 
59 #define EPPING_ALIGNMENT_PAD \
60  (((sizeof(struct htc_frame_hdr) + 3) & (~0x3)) \
61  - sizeof(struct htc_frame_hdr))
62 
69 } __packed;
70 
72  NONE_CRYPT = 0x01,
73  WEP_CRYPT = 0x02,
74  TKIP_CRYPT = 0x04,
75  AES_CRYPT = 0x08,
76  WAPI_CRYPT = 0x10,
77 };
78 
80 struct ath6kl;
81 struct ath6kl_htcap;
84 
85 struct sk_buff *ath6kl_buf_alloc(int size);
86 #endif /* COMMON_H */