1 /******************************************************************************
3 * Copyright(c) 2007 - 2012 Realtek Corporation. All rights reserved.
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.
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
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
19 ******************************************************************************/
20 #ifndef __COMMON_H2C_H__
21 #define __COMMON_H2C_H__
23 //---------------------------------------------------------------------------------------------------------//
24 //---------------------------------- H2C CMD DEFINITION ------------------------------------------------//
25 //---------------------------------------------------------------------------------------------------------//
26 // 88e, 8723b, 8812, 8821, 92e use the same FW code base
30 H2C_MEDIA_STATUS_RPT = 0x01,
31 H2C_SCAN_ENABLE = 0x02,
32 H2C_KEEP_ALIVE = 0x03,
33 H2C_DISCON_DECISION = 0x04,
34 H2C_PSD_OFFLOAD = 0x05,
35 H2C_AP_OFFLOAD = 0x08,
36 H2C_BCN_RSVDPAGE = 0x09,
37 H2C_PROBERSP_RSVDPAGE = 0x0A,
38 H2C_FCS_RSVDPAGE = 0x10,
40 H2C_AP_WOW_GPIO_CTRL = 0x13,
43 H2C_SET_PWR_MODE = 0x20,
44 H2C_PS_TUNING_PARA = 0x21,
45 H2C_PS_TUNING_PARA2 = 0x22,
46 H2C_P2P_LPS_PARAM = 0x23,
47 H2C_P2P_PS_OFFLOAD = 0x24,
48 H2C_PS_SCAN_ENABLE = 0x25,
50 H2C_INACTIVE_PS_ = 0x27, //Inactive_PS
51 H2C_FWLPS_IN_IPS_ = 0x28,
53 //Dynamic Mechanism Class: 010
56 H2C_RSSI_SETTING = 0x42,
57 H2C_AP_REQ_TXRPT = 0x43,
58 H2C_INIT_RATE_COLLECT = 0x44,
61 H2C_B_TYPE_TDMA = 0x60,
63 H2C_FORCE_BT_TXPWR = 0x62,
64 H2C_BT_IGNORE_WLANACT = 0x63,
65 H2C_DAC_SWING_VALUE = 0x64,
66 H2C_ANT_SEL_RSV = 0x65,
68 H2C_BT_MP_OPER = 0x67,
69 H2C_BT_CONTROL = 0x68,
70 H2C_BT_WIFI_CTRL = 0x69,
71 H2C_BT_FW_PATCH = 0x6A,
75 H2C_REMOTE_WAKE_CTRL = 0x81,
76 H2C_AOAC_GLOBAL_INFO = 0x82,
77 H2C_AOAC_RSVD_PAGE = 0x83,
78 H2C_AOAC_RSVD_PAGE2 = 0x84,
79 H2C_D0_SCAN_OFFLOAD_CTRL = 0x85,
80 H2C_D0_SCAN_OFFLOAD_INFO = 0x86,
81 H2C_CHNL_SWITCH_OFFLOAD = 0x87,
82 H2C_AOAC_RSVDPAGE3 = 0x88,
83 H2C_P2P_OFFLOAD_RSVD_PAGE = 0x8A,
84 H2C_P2P_OFFLOAD = 0x8B,
90 #define H2C_INACTIVE_PS_LEN 3
91 #define H2C_RSVDPAGE_LOC_LEN 5
92 #define H2C_MEDIA_STATUS_RPT_LEN 3
93 #define H2C_KEEP_ALIVE_CTRL_LEN 2
94 #define H2C_DISCON_DECISION_LEN 3
95 #define H2C_AP_OFFLOAD_LEN 3
96 #define H2C_AP_WOW_GPIO_CTRL_LEN 4
97 #define H2C_AP_PS_LEN 2
98 #define H2C_PWRMODE_LEN 7
99 #define H2C_PSTUNEPARAM_LEN 4
100 #define H2C_MACID_CFG_LEN 7
101 #define H2C_BTMP_OPER_LEN 4
102 #define H2C_WOWLAN_LEN 5
103 #define H2C_REMOTE_WAKE_CTRL_LEN 3
104 #define H2C_AOAC_GLOBAL_INFO_LEN 2
105 #define H2C_AOAC_RSVDPAGE_LOC_LEN 7
106 #define H2C_SCAN_OFFLOAD_CTRL_LEN 4
107 #define H2C_BT_FW_PATCH_LEN 6
108 #define H2C_RSSI_SETTING_LEN 4
109 #define H2C_AP_REQ_TXRPT_LEN 2
110 #define H2C_FORCE_BT_TXPWR_LEN 3
111 #define H2C_BCN_RSVDPAGE_LEN 5
112 #define H2C_PROBERSP_RSVDPAGE_LEN 5
113 #define H2C_P2PRSVDPAGE_LOC_LEN 5
114 #define H2C_P2P_OFFLOAD_LEN 3
117 #define eqMacAddr(a,b) ( ((a)[0]==(b)[0] && (a)[1]==(b)[1] && (a)[2]==(b)[2] && (a)[3]==(b)[3] && (a)[4]==(b)[4] && (a)[5]==(b)[5]) ? 1:0 )
118 #define cpMacAddr(des,src) ((des)[0]=(src)[0],(des)[1]=(src)[1],(des)[2]=(src)[2],(des)[3]=(src)[3],(des)[4]=(src)[4],(des)[5]=(src)[5])
119 #define cpIpAddr(des,src) ((des)[0]=(src)[0],(des)[1]=(src)[1],(des)[2]=(src)[2],(des)[3]=(src)[3])
125 #define GET_ARP_PKT_LLC_TYPE(__pHeader) ReadEF2Byte( ((u8*)(__pHeader)) + 6)
128 #define GET_ARP_PKT_OPERATION(__pHeader) ReadEF2Byte(((u8*)(__pHeader)) + 6)
129 #define GET_ARP_PKT_SENDER_MAC_ADDR(__pHeader, _val) cpMacAddr((u8*)(_val), ((u8*)(__pHeader))+8)
130 #define GET_ARP_PKT_SENDER_IP_ADDR(__pHeader, _val) cpIpAddr((u8*)(_val), ((u8*)(__pHeader))+14)
131 #define GET_ARP_PKT_TARGET_MAC_ADDR(__pHeader, _val) cpMacAddr((u8*)(_val), ((u8*)(__pHeader))+18)
132 #define GET_ARP_PKT_TARGET_IP_ADDR(__pHeader, _val) cpIpAddr((u8*)(_val), ((u8*)(__pHeader))+24)
134 #define SET_ARP_PKT_HW(__pHeader, __Value) WriteEF2Byte( ((u8*)(__pHeader)) + 0, __Value)
135 #define SET_ARP_PKT_PROTOCOL(__pHeader, __Value) WriteEF2Byte( ((u8*)(__pHeader)) + 2, __Value)
136 #define SET_ARP_PKT_HW_ADDR_LEN(__pHeader, __Value) WriteEF1Byte( ((u8*)(__pHeader)) + 4, __Value)
137 #define SET_ARP_PKT_PROTOCOL_ADDR_LEN(__pHeader, __Value) WriteEF1Byte( ((u8*)(__pHeader)) + 5, __Value)
138 #define SET_ARP_PKT_OPERATION(__pHeader, __Value) WriteEF2Byte( ((u8*)(__pHeader)) + 6, __Value)
139 #define SET_ARP_PKT_SENDER_MAC_ADDR(__pHeader, _val) cpMacAddr(((u8*)(__pHeader))+8, (u8*)(_val))
140 #define SET_ARP_PKT_SENDER_IP_ADDR(__pHeader, _val) cpIpAddr(((u8*)(__pHeader))+14, (u8*)(_val))
141 #define SET_ARP_PKT_TARGET_MAC_ADDR(__pHeader, _val) cpMacAddr(((u8*)(__pHeader))+18, (u8*)(_val))
142 #define SET_ARP_PKT_TARGET_IP_ADDR(__pHeader, _val) cpIpAddr(((u8*)(__pHeader))+24, (u8*)(_val))
144 #define FW_WOWLAN_FUN_EN BIT(0)
145 #define FW_WOWLAN_PATTERN_MATCH BIT(1)
146 #define FW_WOWLAN_MAGIC_PKT BIT(2)
147 #define FW_WOWLAN_UNICAST BIT(3)
148 #define FW_WOWLAN_ALL_PKT_DROP BIT(4)
149 #define FW_WOWLAN_GPIO_ACTIVE BIT(5)
150 #define FW_WOWLAN_REKEY_WAKEUP BIT(6)
151 #define FW_WOWLAN_DEAUTH_WAKEUP BIT(7)
153 #define FW_WOWLAN_GPIO_WAKEUP_EN BIT(0)
154 #define FW_FW_PARSE_MAGIC_PKT BIT(1)
156 #define FW_REMOTE_WAKE_CTRL_EN BIT(0)
157 #define FW_REALWOWLAN_EN BIT(5)
159 #define FW_WOWLAN_KEEP_ALIVE_EN BIT(0)
160 #define FW_ADOPT_USER BIT(1)
161 #define FW_WOWLAN_KEEP_ALIVE_PKT_TYPE BIT(2)
163 #define FW_REMOTE_WAKE_CTRL_EN BIT(0)
164 #define FW_ARP_EN BIT(1)
165 #define FW_REALWOWLAN_EN BIT(5)
166 #define FW_WOW_FW_UNICAST_EN BIT(7)
168 #endif //CONFIG_WOWLAN
170 //_RSVDPAGE_LOC_CMD_0x00
171 #define SET_H2CCMD_RSVDPAGE_LOC_PROBE_RSP(__pH2CCmd, __Value) SET_BITS_TO_LE_1BYTE_8BIT(__pH2CCmd, 0, 8, __Value)
172 #define SET_H2CCMD_RSVDPAGE_LOC_PSPOLL(__pH2CCmd, __Value) SET_BITS_TO_LE_1BYTE_8BIT((__pH2CCmd)+1, 0, 8, __Value)
173 #define SET_H2CCMD_RSVDPAGE_LOC_NULL_DATA(__pH2CCmd, __Value) SET_BITS_TO_LE_1BYTE_8BIT((__pH2CCmd)+2, 0, 8, __Value)
174 #define SET_H2CCMD_RSVDPAGE_LOC_QOS_NULL_DATA(__pH2CCmd, __Value) SET_BITS_TO_LE_1BYTE_8BIT((__pH2CCmd)+3, 0, 8, __Value)
175 #define SET_H2CCMD_RSVDPAGE_LOC_BT_QOS_NULL_DATA(__pH2CCmd, __Value)SET_BITS_TO_LE_1BYTE_8BIT((__pH2CCmd)+4, 0, 8, __Value)
177 //_MEDIA_STATUS_RPT_PARM_CMD_0x01
178 #define SET_H2CCMD_MSRRPT_PARM_OPMODE(__pH2CCmd, __Value) SET_BITS_TO_LE_1BYTE(__pH2CCmd, 0, 1, __Value)
179 #define SET_H2CCMD_MSRRPT_PARM_MACID_IND(__pH2CCmd, __Value) SET_BITS_TO_LE_1BYTE(__pH2CCmd, 1, 1, __Value)
180 #define SET_H2CCMD_MSRRPT_PARM_MACID(__pH2CCmd, __Value) SET_BITS_TO_LE_1BYTE_8BIT(__pH2CCmd+1, 0, 8, __Value)
181 #define SET_H2CCMD_MSRRPT_PARM_MACID_END(__pH2CCmd, __Value) SET_BITS_TO_LE_1BYTE_8BIT(__pH2CCmd+2, 0, 8, __Value)
183 //_KEEP_ALIVE_CMD_0x03
184 #define SET_H2CCMD_KEEPALIVE_PARM_ENABLE(__pH2CCmd, __Value) SET_BITS_TO_LE_1BYTE(__pH2CCmd, 0, 1, __Value)
185 #define SET_H2CCMD_KEEPALIVE_PARM_ADOPT(__pH2CCmd, __Value) SET_BITS_TO_LE_1BYTE(__pH2CCmd, 1, 1, __Value)
186 #define SET_H2CCMD_KEEPALIVE_PARM_PKT_TYPE(__pH2CCmd, __Value) SET_BITS_TO_LE_1BYTE(__pH2CCmd, 2, 1, __Value)
187 #define SET_H2CCMD_KEEPALIVE_PARM_CHECK_PERIOD(__pH2CCmd, __Value) SET_BITS_TO_LE_1BYTE_8BIT(__pH2CCmd+1, 0, 8, __Value)
189 //_DISCONNECT_DECISION_CMD_0x04
190 #define SET_H2CCMD_DISCONDECISION_PARM_ENABLE(__pH2CCmd, __Value) SET_BITS_TO_LE_1BYTE(__pH2CCmd, 0, 1, __Value)
191 #define SET_H2CCMD_DISCONDECISION_PARM_ADOPT(__pH2CCmd, __Value) SET_BITS_TO_LE_1BYTE(__pH2CCmd, 1, 1, __Value)
192 #define SET_H2CCMD_DISCONDECISION_PARM_CHECK_PERIOD(__pH2CCmd, __Value) SET_BITS_TO_LE_1BYTE_8BIT(__pH2CCmd+1, 0, 8, __Value)
193 #define SET_H2CCMD_DISCONDECISION_PARM_TRY_PKT_NUM(__pH2CCmd, __Value) SET_BITS_TO_LE_1BYTE_8BIT(__pH2CCmd+2, 0, 8, __Value)
196 #define SET_H2CCMD_AP_WOWLAN_EN(__pH2CCmd, __Value) SET_BITS_TO_LE_1BYTE_8BIT(__pH2CCmd, 0, 8, __Value)
198 #define SET_H2CCMD_AP_WOWLAN_RSVDPAGE_LOC_BCN(__pH2CCmd, __Value) SET_BITS_TO_LE_1BYTE_8BIT(__pH2CCmd, 0, 8, __Value)
199 //_Probersp_RsvdPage 0x0a
200 #define SET_H2CCMD_AP_WOWLAN_RSVDPAGE_LOC_ProbeRsp(__pH2CCmd, __Value) SET_BITS_TO_LE_1BYTE_8BIT(__pH2CCmd, 0, 8, __Value)
201 //_Probersp_RsvdPage 0x13
202 #define SET_H2CCMD_AP_WOW_GPIO_CTRL_INDEX(__pH2CCmd, __Value) SET_BITS_TO_LE_1BYTE(__pH2CCmd, 0, 4, __Value)
203 #define SET_H2CCMD_AP_WOW_GPIO_CTRL_C2H_EN(__pH2CCmd, __Value) SET_BITS_TO_LE_1BYTE(__pH2CCmd, 4, 1, __Value)
204 #define SET_H2CCMD_AP_WOW_GPIO_CTRL_PLUS(__pH2CCmd, __Value) SET_BITS_TO_LE_1BYTE(__pH2CCmd, 5, 1, __Value)
205 #define SET_H2CCMD_AP_WOW_GPIO_CTRL_HIGH_ACTIVE(__pH2CCmd, __Value) SET_BITS_TO_LE_1BYTE(__pH2CCmd, 6, 1, __Value)
206 #define SET_H2CCMD_AP_WOW_GPIO_CTRL_EN(__pH2CCmd, __Value) SET_BITS_TO_LE_1BYTE(__pH2CCmd, 7, 1, __Value)
207 #define SET_H2CCMD_AP_WOW_GPIO_CTRL_DURATION(__pH2CCmd, __Value) SET_BITS_TO_LE_1BYTE_8BIT((__pH2CCmd)+1, 0, 8, __Value)
208 #define SET_H2CCMD_AP_WOW_GPIO_CTRL_C2H_DURATION(__pH2CCmd, __Value)SET_BITS_TO_LE_1BYTE_8BIT((__pH2CCmd)+2, 0, 8, __Value)
210 #define SET_H2CCMD_AP_WOW_PS_EN(__pH2CCmd, __Value) SET_BITS_TO_LE_1BYTE(__pH2CCmd, 0, 1, __Value)
211 #define SET_H2CCMD_AP_WOW_PS_32K_EN(__pH2CCmd, __Value) SET_BITS_TO_LE_1BYTE(__pH2CCmd, 1, 1, __Value)
212 #define SET_H2CCMD_AP_WOW_PS_RF(__pH2CCmd, __Value) SET_BITS_TO_LE_1BYTE(__pH2CCmd, 2, 1, __Value)
213 #define SET_H2CCMD_AP_WOW_PS_DURATION(__pH2CCmd, __Value) SET_BITS_TO_LE_1BYTE_8BIT((__pH2CCmd)+1, 0, 8, __Value)
215 // _WoWLAN PARAM_CMD_0x80
216 #define SET_H2CCMD_WOWLAN_FUNC_ENABLE(__pH2CCmd, __Value) SET_BITS_TO_LE_1BYTE(__pH2CCmd, 0, 1, __Value)
217 #define SET_H2CCMD_WOWLAN_PATTERN_MATCH_ENABLE(__pH2CCmd, __Value) SET_BITS_TO_LE_1BYTE(__pH2CCmd, 1, 1, __Value)
218 #define SET_H2CCMD_WOWLAN_MAGIC_PKT_ENABLE(__pH2CCmd, __Value) SET_BITS_TO_LE_1BYTE(__pH2CCmd, 2, 1, __Value)
219 #define SET_H2CCMD_WOWLAN_UNICAST_PKT_ENABLE(__pH2CCmd, __Value) SET_BITS_TO_LE_1BYTE(__pH2CCmd, 3, 1, __Value)
220 #define SET_H2CCMD_WOWLAN_ALL_PKT_DROP(__pH2CCmd, __Value) SET_BITS_TO_LE_1BYTE(__pH2CCmd, 4, 1, __Value)
221 #define SET_H2CCMD_WOWLAN_GPIO_ACTIVE(__pH2CCmd, __Value) SET_BITS_TO_LE_1BYTE(__pH2CCmd, 5, 1, __Value)
222 #define SET_H2CCMD_WOWLAN_REKEY_WAKE_UP(__pH2CCmd, __Value) SET_BITS_TO_LE_1BYTE(__pH2CCmd, 6, 1, __Value)
223 #define SET_H2CCMD_WOWLAN_DISCONNECT_WAKE_UP(__pH2CCmd, __Value) SET_BITS_TO_LE_1BYTE(__pH2CCmd, 7, 1, __Value)
224 #define SET_H2CCMD_WOWLAN_GPIONUM(__pH2CCmd, __Value) SET_BITS_TO_LE_1BYTE((__pH2CCmd)+1, 0, 7, __Value)
225 #define SET_H2CCMD_WOWLAN_DATAPIN_WAKE_UP(__pH2CCmd, __Value) SET_BITS_TO_LE_1BYTE((__pH2CCmd)+1, 7, 1, __Value)
226 #define SET_H2CCMD_WOWLAN_GPIO_DURATION(__pH2CCmd, __Value) SET_BITS_TO_LE_1BYTE_8BIT((__pH2CCmd)+2, 0, 8, __Value)
227 #define SET_H2CCMD_WOWLAN_GPIO_PULSE_EN(__pH2CCmd, __Value) SET_BITS_TO_LE_1BYTE((__pH2CCmd)+3, 0, 1, __Value)
228 #define SET_H2CCMD_WOWLAN_GPIO_PULSE_COUNT(__pH2CCmd, __Value) SET_BITS_TO_LE_1BYTE((__pH2CCmd)+3, 1, 7, __Value)
229 #define SET_H2CCMD_WOWLAN_LOWPR_RX(__pH2CCmd, __Value) SET_BITS_TO_LE_1BYTE((__pH2CCmd)+4, 0, 1, __Value)
231 // _REMOTE_WAKEUP_CMD_0x81
232 #define SET_H2CCMD_REMOTE_WAKECTRL_ENABLE(__pH2CCmd, __Value) SET_BITS_TO_LE_1BYTE(__pH2CCmd, 0, 1, __Value)
233 #define SET_H2CCMD_REMOTE_WAKE_CTRL_ARP_OFFLOAD_EN(__pH2CCmd, __Value) SET_BITS_TO_LE_1BYTE(__pH2CCmd, 1, 1, __Value)
234 #define SET_H2CCMD_REMOTE_WAKE_CTRL_NDP_OFFLOAD_EN(__pH2CCmd, __Value) SET_BITS_TO_LE_1BYTE(__pH2CCmd, 2, 1, __Value)
235 #define SET_H2CCMD_REMOTE_WAKE_CTRL_GTK_OFFLOAD_EN(__pH2CCmd, __Value) SET_BITS_TO_LE_1BYTE(__pH2CCmd, 3, 1, __Value)
236 #define SET_H2CCMD_REMOTE_WAKE_CTRL_NLO_OFFLOAD_EN(__pH2CCmd, __Value) SET_BITS_TO_LE_1BYTE(__pH2CCmd, 4, 1, __Value)
237 #define SET_H2CCMD_REMOTE_WAKE_CTRL_FW_UNICAST_EN(__pH2CCmd, __Value) SET_BITS_TO_LE_1BYTE(__pH2CCmd, 7, 1, __Value)
238 #define SET_H2CCMD_REMOTE_WAKE_CTRL_P2P_OFFLAD_EN(__pH2CCmd, __Value) SET_BITS_TO_LE_1BYTE((__pH2CCmd)+1, 0, 1, __Value)
239 #define SET_H2CCMD_REMOTE_WAKE_CTRL_ARP_ACTION(__pH2CCmd, __Value) SET_BITS_TO_LE_1BYTE((__pH2CCmd)+2, 0, 1, __Value)
241 // AOAC_GLOBAL_INFO_0x82
242 #define SET_H2CCMD_AOAC_GLOBAL_INFO_PAIRWISE_ENC_ALG(__pH2CCmd, __Value) SET_BITS_TO_LE_1BYTE_8BIT(__pH2CCmd, 0, 8, __Value)
243 #define SET_H2CCMD_AOAC_GLOBAL_INFO_GROUP_ENC_ALG(__pH2CCmd, __Value) SET_BITS_TO_LE_1BYTE_8BIT((__pH2CCmd)+1, 0, 8, __Value)
245 // AOAC_RSVDPAGE_LOC_0x83
246 #define SET_H2CCMD_AOAC_RSVDPAGE_LOC_REMOTE_WAKE_CTRL_INFO(__pH2CCmd, __Value) SET_BITS_TO_LE_1BYTE_8BIT((__pH2CCmd), 0, 8, __Value)
247 #define SET_H2CCMD_AOAC_RSVDPAGE_LOC_ARP_RSP(__pH2CCmd, __Value) SET_BITS_TO_LE_1BYTE_8BIT((__pH2CCmd)+1, 0, 8, __Value)
248 #define SET_H2CCMD_AOAC_RSVDPAGE_LOC_NEIGHBOR_ADV(__pH2CCmd, __Value) SET_BITS_TO_LE_1BYTE_8BIT((__pH2CCmd)+2, 0, 8, __Value)
249 #define SET_H2CCMD_AOAC_RSVDPAGE_LOC_GTK_RSP(__pH2CCmd, __Value) SET_BITS_TO_LE_1BYTE_8BIT((__pH2CCmd)+3, 0, 8, __Value)
250 #define SET_H2CCMD_AOAC_RSVDPAGE_LOC_GTK_INFO(__pH2CCmd, __Value) SET_BITS_TO_LE_1BYTE_8BIT((__pH2CCmd)+4, 0, 8, __Value)
252 #define SET_H2CCMD_AOAC_RSVDPAGE_LOC_GTK_EXT_MEM(__pH2CCmd, __Value) SET_BITS_TO_LE_1BYTE_8BIT((__pH2CCmd)+5, 0, 8, __Value)
253 #endif //CONFIG_GTK_OL
254 #ifdef CONFIG_PNO_SUPPORT
255 #define SET_H2CCMD_AOAC_RSVDPAGE_LOC_NLO_INFO(__pH2CCmd, __Value) SET_BITS_TO_LE_1BYTE_8BIT((__pH2CCmd), 0, 8, __Value)
258 #ifdef CONFIG_PNO_SUPPORT
259 // D0_Scan_Offload_Info_0x86
260 #define SET_H2CCMD_AOAC_NLO_FUN_EN(__pH2CCmd, __Value) SET_BITS_TO_LE_1BYTE((__pH2CCmd), 3, 1, __Value)
261 #define SET_H2CCMD_AOAC_RSVDPAGE_LOC_PROBE_PACKET(__pH2CCmd, __Value) SET_BITS_TO_LE_1BYTE_8BIT((__pH2CCmd)+1, 0, 8, __Value)
262 #define SET_H2CCMD_AOAC_RSVDPAGE_LOC_SCAN_INFO(__pH2CCmd, __Value) SET_BITS_TO_LE_1BYTE_8BIT((__pH2CCmd)+2, 0, 8, __Value)
263 #define SET_H2CCMD_AOAC_RSVDPAGE_LOC_SSID_INFO(__pH2CCmd, __Value) SET_BITS_TO_LE_1BYTE_8BIT((__pH2CCmd)+3, 0, 8, __Value)
264 #endif //CONFIG_PNO_SUPPORT
266 #ifdef CONFIG_P2P_WOWLAN
268 #define SET_H2CCMD_RSVDPAGE_LOC_P2P_BCN(__pH2CCmd, __Value) SET_BITS_TO_LE_1BYTE_8BIT(__pH2CCmd, 0, 8, __Value)
269 #define SET_H2CCMD_RSVDPAGE_LOC_P2P_PROBE_RSP(__pH2CCmd, __Value) SET_BITS_TO_LE_1BYTE_8BIT((__pH2CCmd)+1, 0, 8, __Value)
270 #define SET_H2CCMD_RSVDPAGE_LOC_P2P_NEGO_RSP(__pH2CCmd, __Value) SET_BITS_TO_LE_1BYTE_8BIT((__pH2CCmd)+2, 0, 8, __Value)
271 #define SET_H2CCMD_RSVDPAGE_LOC_P2P_INVITE_RSP(__pH2CCmd, __Value) SET_BITS_TO_LE_1BYTE_8BIT((__pH2CCmd)+3, 0, 8, __Value)
272 #define SET_H2CCMD_RSVDPAGE_LOC_P2P_PD_RSP(__pH2CCmd, __Value) SET_BITS_TO_LE_1BYTE_8BIT((__pH2CCmd)+4, 0, 8, __Value)
273 #endif //CONFIG_P2P_WOWLAN
275 //---------------------------------------------------------------------------------------------------------//
276 //------------------------------------------- Structure --------------------------------------------------//
277 //---------------------------------------------------------------------------------------------------------//
278 typedef struct _RSVDPAGE_LOC {
285 u8 LocRemoteCtrlInfo;
294 #endif //CONFIG_GTK_OL
295 #ifdef CONFIG_PNO_SUPPORT
300 #endif //CONFIG_PNO_SUPPORT
301 #endif //CONFIG_WOWLAN
303 #ifdef CONFIG_P2P_WOWLAN
309 #endif //CONFIG_P2P_WOWLAN
310 } RSVDPAGE_LOC, *PRSVDPAGE_LOC;
313 void dump_TX_FIFO(PADAPTER padapter, u8 page_num, u16 page_size);
314 u8 rtw_check_invalid_mac_address (u8 *mac_addr);
315 u8 rtw_hal_set_fw_media_status_cmd(_adapter* adapter, u8 mstatus, u8 macid);
316 #if defined(CONFIG_WOWLAN) || defined(CONFIG_AP_WOWLAN)
317 void rtw_get_current_ip_address(PADAPTER padapter, u8 *pcurrentip);
318 void rtw_get_sec_iv(PADAPTER padapter, u8*pcur_dot11txpn, u8 *StaAddr);
319 void rtw_set_sec_pn(_adapter *padapter);
321 void rtw_hal_fill_fake_txdesc(_adapter* padapter, u8* pDesc, u32 BufferLen,
322 u8 IsPsPoll, u8 IsBTQosNull, u8 bDataFrame);
324 //WOW command function
325 u8 rtw_hal_set_wowlan_ctrl_cmd(_adapter *adapter, u8 enable);
326 void rtw_hal_set_fw_wow_related_cmd(_adapter* padapter, u8 enable);
327 #ifdef CONFIG_P2P_WOWLAN
329 u8 rtw_hal_set_FwP2PRsvdPage_cmd(_adapter* adapter, PRSVDPAGE_LOC rsvdpageloc);
331 u8 rtw_hal_set_p2p_wowlan_offload_cmd(_adapter* adapter);
332 #endif //CONFIG_P2P_WOWLAN