Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
mac.h
Go to the documentation of this file.
1 /******************************************************************************
2  *
3  * Copyright(c) 2009-2012 Realtek Corporation. All rights reserved.
4  *
5  * This program is free software; you can redistribute it and/or modify it
6  * under the terms of version 2 of the GNU General Public License as
7  * published by the Free Software Foundation.
8  *
9  * This program is distributed in the hope that it will be useful, but WITHOUT
10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11  * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
12  * more details.
13  *
14  * You should have received a copy of the GNU General Public License along with
15  * this program; if not, write to the Free Software Foundation, Inc.,
16  * 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA
17  *
18  * The full GNU General Public License is included in this distribution in the
19  * file called LICENSE.
20  *
21  * Contact Information:
22  * wlanfae <[email protected]>
23  * Realtek Corporation, No. 2, Innovation Road II, Hsinchu Science Park,
24  * Hsinchu 300, Taiwan.
25  *
26  * Larry Finger <[email protected]>
27  *
28  *****************************************************************************/
29 
30 #ifndef __RTL92C_MAC_H__
31 #define __RTL92C_MAC_H__
32 
33 #define LLT_LAST_ENTRY_OF_TX_PKT_BUFFER 255
34 #define DRIVER_EARLY_INT_TIME 0x05
35 #define BCN_DMA_ATIME_INT_TIME 0x02
36 
39 bool rtl92c_init_llt_table(struct ieee80211_hw *hw, u32 boundary);
41  u8 *p_macaddr, bool is_group, u8 enc_algo,
42  bool is_wepkey, bool clear_all);
45 void rtl92c_set_qos(struct ieee80211_hw *hw, int aci);
46 
47 
48 /*---------------------------------------------------------------
49  * Hardware init functions
50  *---------------------------------------------------------------*/
51 void rtl92c_set_mac_addr(struct ieee80211_hw *hw, const u8 *addr);
54 
59 
61  u16 queue,
62  u16 txop,
63  u8 ecwmax,
64  u8 ecwmin,
65  u8 aifs);
66 
67 void rtl92c_init_edca(struct ieee80211_hw *hw);
69 void rtl92c_init_beacon_max_error(struct ieee80211_hw *hw, bool infra_mode);
72 
74  enum version_8192c version);
75 
77 void rtl92c_set_min_space(struct ieee80211_hw *hw, bool is2T);
78 
79 /* For filter */
86 
87 
89 
90 struct rx_fwinfo_92c {
91  u8 gain_trsw[4];
92  u8 pwdb_all;
93  u8 cfosho[4];
94  u8 cfotail[4];
95  char rxevm[2];
96  char rxsnr[4];
97  u8 pdsnr[2];
98  u8 csi_current[2];
99  u8 csi_target[2];
100  u8 sigevm;
101  u8 max_ex_pwr;
102  u8 ex_intf_flag:1;
103  u8 sgi_en:1;
104  u8 rxsc:2;
105  u8 reserve:4;
106 } __packed;
107 
108 struct rx_desc_92c {
109  u32 length:14;
110  u32 crc32:1;
111  u32 icverror:1;
112  u32 drv_infosize:4;
113  u32 security:3;
114  u32 qos:1;
115  u32 shift:2;
116  u32 phystatus:1;
117  u32 swdec:1;
118  u32 lastseg:1;
119  u32 firstseg:1;
120  u32 eor:1;
121  u32 own:1;
122  u32 macid:5; /* word 1 */
123  u32 tid:4;
124  u32 hwrsvd:5;
125  u32 paggr:1;
126  u32 faggr:1;
127  u32 a1_fit:4;
128  u32 a2_fit:4;
129  u32 pam:1;
130  u32 pwr:1;
131  u32 moredata:1;
132  u32 morefrag:1;
133  u32 type:2;
134  u32 mc:1;
135  u32 bc:1;
136  u32 seq:12; /* word 2 */
137  u32 frag:4;
138  u32 nextpktlen:14;
139  u32 nextind:1;
140  u32 rsvd:1;
141  u32 rxmcs:6; /* word 3 */
142  u32 rxht:1;
143  u32 amsdu:1;
144  u32 splcp:1;
145  u32 bandwidth:1;
146  u32 htc:1;
147  u32 tcpchk_rpt:1;
148  u32 ipcchk_rpt:1;
149  u32 tcpchk_valid:1;
150  u32 hwpcerr:1;
151  u32 hwpcind:1;
152  u32 iv0:16;
153  u32 iv1; /* word 4 */
154  u32 tsfl; /* word 5 */
155  u32 bufferaddress; /* word 6 */
156  u32 bufferaddress64; /* word 7 */
157 } __packed;
158 
160  unsigned int
161  skb_queue);
163  struct sk_buff *skb,
164  struct rtl_stats *pstats,
165  struct rx_desc_92c *pdesc,
166  struct rx_fwinfo_92c *p_drvinfo);
167 
168 /*---------------------------------------------------------------
169  * Card disable functions
170  *---------------------------------------------------------------*/
171 
172 
173 
174 #endif