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,
59 H2C_IQ_CALIBRATION = 0x45,
61 H2C_RA_MASK_3SS = 0x46,/* for 8814A */
62 H2C_RA_PARA_ADJUST = 0x47,/* CONFIG_RA_DBG_CMD */
63 H2C_DYNAMIC_TX_PATH = 0x48,/* for 8814A */
65 H2C_FW_TRACE_EN = 0x49,
68 H2C_B_TYPE_TDMA = 0x60,
70 H2C_FORCE_BT_TXPWR = 0x62,
71 H2C_BT_IGNORE_WLANACT = 0x63,
72 H2C_DAC_SWING_VALUE = 0x64,
73 H2C_ANT_SEL_RSV = 0x65,
75 H2C_BT_MP_OPER = 0x67,
76 H2C_BT_CONTROL = 0x68,
77 H2C_BT_WIFI_CTRL = 0x69,
78 H2C_BT_FW_PATCH = 0x6A,
82 H2C_REMOTE_WAKE_CTRL = 0x81,
83 H2C_AOAC_GLOBAL_INFO = 0x82,
84 H2C_AOAC_RSVD_PAGE = 0x83,
85 H2C_AOAC_RSVD_PAGE2 = 0x84,
86 H2C_D0_SCAN_OFFLOAD_CTRL = 0x85,
87 H2C_D0_SCAN_OFFLOAD_INFO = 0x86,
88 H2C_CHNL_SWITCH_OFFLOAD = 0x87,
89 H2C_AOAC_RSVDPAGE3 = 0x88,
90 H2C_P2P_OFFLOAD_RSVD_PAGE = 0x8A,
91 H2C_P2P_OFFLOAD = 0x8B,
97 #define H2C_INACTIVE_PS_LEN 3
98 #define H2C_RSVDPAGE_LOC_LEN 5
99 #define H2C_MEDIA_STATUS_RPT_LEN 3
100 #define H2C_KEEP_ALIVE_CTRL_LEN 2
101 #define H2C_DISCON_DECISION_LEN 3
102 #define H2C_AP_OFFLOAD_LEN 3
103 #define H2C_AP_WOW_GPIO_CTRL_LEN 4
104 #define H2C_AP_PS_LEN 2
105 #define H2C_PWRMODE_LEN 7
106 #define H2C_PSTUNEPARAM_LEN 4
107 #define H2C_MACID_CFG_LEN 7
108 #define H2C_BTMP_OPER_LEN 4
109 #define H2C_WOWLAN_LEN 5
110 #define H2C_REMOTE_WAKE_CTRL_LEN 3
111 #define H2C_AOAC_GLOBAL_INFO_LEN 2
112 #define H2C_AOAC_RSVDPAGE_LOC_LEN 7
113 #define H2C_SCAN_OFFLOAD_CTRL_LEN 4
114 #define H2C_BT_FW_PATCH_LEN 6
115 #define H2C_RSSI_SETTING_LEN 4
116 #define H2C_AP_REQ_TXRPT_LEN 2
117 #define H2C_FORCE_BT_TXPWR_LEN 3
118 #define H2C_BCN_RSVDPAGE_LEN 5
119 #define H2C_PROBERSP_RSVDPAGE_LEN 5
120 #define H2C_P2PRSVDPAGE_LOC_LEN 5
121 #define H2C_P2P_OFFLOAD_LEN 3
123 #if defined(CONFIG_WOWLAN) || defined(CONFIG_AP_WOWLAN)
124 #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 )
125 #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])
126 #define cpIpAddr(des,src) ((des)[0]=(src)[0],(des)[1]=(src)[1],(des)[2]=(src)[2],(des)[3]=(src)[3])
132 #define GET_ARP_PKT_LLC_TYPE(__pHeader) ReadEF2Byte( ((u8*)(__pHeader)) + 6)
135 #define GET_ARP_PKT_OPERATION(__pHeader) ReadEF2Byte(((u8*)(__pHeader)) + 6)
136 #define GET_ARP_PKT_SENDER_MAC_ADDR(__pHeader, _val) cpMacAddr((u8*)(_val), ((u8*)(__pHeader))+8)
137 #define GET_ARP_PKT_SENDER_IP_ADDR(__pHeader, _val) cpIpAddr((u8*)(_val), ((u8*)(__pHeader))+14)
138 #define GET_ARP_PKT_TARGET_MAC_ADDR(__pHeader, _val) cpMacAddr((u8*)(_val), ((u8*)(__pHeader))+18)
139 #define GET_ARP_PKT_TARGET_IP_ADDR(__pHeader, _val) cpIpAddr((u8*)(_val), ((u8*)(__pHeader))+24)
141 #define SET_ARP_PKT_HW(__pHeader, __Value) WriteEF2Byte( ((u8*)(__pHeader)) + 0, __Value)
142 #define SET_ARP_PKT_PROTOCOL(__pHeader, __Value) WriteEF2Byte( ((u8*)(__pHeader)) + 2, __Value)
143 #define SET_ARP_PKT_HW_ADDR_LEN(__pHeader, __Value) WriteEF1Byte( ((u8*)(__pHeader)) + 4, __Value)
144 #define SET_ARP_PKT_PROTOCOL_ADDR_LEN(__pHeader, __Value) WriteEF1Byte( ((u8*)(__pHeader)) + 5, __Value)
145 #define SET_ARP_PKT_OPERATION(__pHeader, __Value) WriteEF2Byte( ((u8*)(__pHeader)) + 6, __Value)
146 #define SET_ARP_PKT_SENDER_MAC_ADDR(__pHeader, _val) cpMacAddr(((u8*)(__pHeader))+8, (u8*)(_val))
147 #define SET_ARP_PKT_SENDER_IP_ADDR(__pHeader, _val) cpIpAddr(((u8*)(__pHeader))+14, (u8*)(_val))
148 #define SET_ARP_PKT_TARGET_MAC_ADDR(__pHeader, _val) cpMacAddr(((u8*)(__pHeader))+18, (u8*)(_val))
149 #define SET_ARP_PKT_TARGET_IP_ADDR(__pHeader, _val) cpIpAddr(((u8*)(__pHeader))+24, (u8*)(_val))
151 #define FW_WOWLAN_FUN_EN BIT(0)
152 #define FW_WOWLAN_PATTERN_MATCH BIT(1)
153 #define FW_WOWLAN_MAGIC_PKT BIT(2)
154 #define FW_WOWLAN_UNICAST BIT(3)
155 #define FW_WOWLAN_ALL_PKT_DROP BIT(4)
156 #define FW_WOWLAN_GPIO_ACTIVE BIT(5)
157 #define FW_WOWLAN_REKEY_WAKEUP BIT(6)
158 #define FW_WOWLAN_DEAUTH_WAKEUP BIT(7)
160 #define FW_WOWLAN_GPIO_WAKEUP_EN BIT(0)
161 #define FW_FW_PARSE_MAGIC_PKT BIT(1)
163 #define FW_REMOTE_WAKE_CTRL_EN BIT(0)
164 #define FW_REALWOWLAN_EN BIT(5)
166 #define FW_WOWLAN_KEEP_ALIVE_EN BIT(0)
167 #define FW_ADOPT_USER BIT(1)
168 #define FW_WOWLAN_KEEP_ALIVE_PKT_TYPE BIT(2)
170 #define FW_REMOTE_WAKE_CTRL_EN BIT(0)
171 #define FW_ARP_EN BIT(1)
172 #define FW_REALWOWLAN_EN BIT(5)
173 #define FW_WOW_FW_UNICAST_EN BIT(7)
175 #endif //CONFIG_WOWLAN
177 //_RSVDPAGE_LOC_CMD_0x00
178 #define SET_H2CCMD_RSVDPAGE_LOC_PROBE_RSP(__pH2CCmd, __Value) SET_BITS_TO_LE_1BYTE_8BIT(__pH2CCmd, 0, 8, __Value)
179 #define SET_H2CCMD_RSVDPAGE_LOC_PSPOLL(__pH2CCmd, __Value) SET_BITS_TO_LE_1BYTE_8BIT((__pH2CCmd)+1, 0, 8, __Value)
180 #define SET_H2CCMD_RSVDPAGE_LOC_NULL_DATA(__pH2CCmd, __Value) SET_BITS_TO_LE_1BYTE_8BIT((__pH2CCmd)+2, 0, 8, __Value)
181 #define SET_H2CCMD_RSVDPAGE_LOC_QOS_NULL_DATA(__pH2CCmd, __Value) SET_BITS_TO_LE_1BYTE_8BIT((__pH2CCmd)+3, 0, 8, __Value)
182 #define SET_H2CCMD_RSVDPAGE_LOC_BT_QOS_NULL_DATA(__pH2CCmd, __Value)SET_BITS_TO_LE_1BYTE_8BIT((__pH2CCmd)+4, 0, 8, __Value)
184 //_MEDIA_STATUS_RPT_PARM_CMD_0x01
185 #define SET_H2CCMD_MSRRPT_PARM_OPMODE(__pH2CCmd, __Value) SET_BITS_TO_LE_1BYTE(__pH2CCmd, 0, 1, __Value)
186 #define SET_H2CCMD_MSRRPT_PARM_MACID_IND(__pH2CCmd, __Value) SET_BITS_TO_LE_1BYTE(__pH2CCmd, 1, 1, __Value)
187 #define SET_H2CCMD_MSRRPT_PARM_MACID(__pH2CCmd, __Value) SET_BITS_TO_LE_1BYTE_8BIT(__pH2CCmd+1, 0, 8, __Value)
188 #define SET_H2CCMD_MSRRPT_PARM_MACID_END(__pH2CCmd, __Value) SET_BITS_TO_LE_1BYTE_8BIT(__pH2CCmd+2, 0, 8, __Value)
190 //_KEEP_ALIVE_CMD_0x03
191 #define SET_H2CCMD_KEEPALIVE_PARM_ENABLE(__pH2CCmd, __Value) SET_BITS_TO_LE_1BYTE(__pH2CCmd, 0, 1, __Value)
192 #define SET_H2CCMD_KEEPALIVE_PARM_ADOPT(__pH2CCmd, __Value) SET_BITS_TO_LE_1BYTE(__pH2CCmd, 1, 1, __Value)
193 #define SET_H2CCMD_KEEPALIVE_PARM_PKT_TYPE(__pH2CCmd, __Value) SET_BITS_TO_LE_1BYTE(__pH2CCmd, 2, 1, __Value)
194 #define SET_H2CCMD_KEEPALIVE_PARM_CHECK_PERIOD(__pH2CCmd, __Value) SET_BITS_TO_LE_1BYTE_8BIT(__pH2CCmd+1, 0, 8, __Value)
196 //_DISCONNECT_DECISION_CMD_0x04
197 #define SET_H2CCMD_DISCONDECISION_PARM_ENABLE(__pH2CCmd, __Value) SET_BITS_TO_LE_1BYTE(__pH2CCmd, 0, 1, __Value)
198 #define SET_H2CCMD_DISCONDECISION_PARM_ADOPT(__pH2CCmd, __Value) SET_BITS_TO_LE_1BYTE(__pH2CCmd, 1, 1, __Value)
199 #define SET_H2CCMD_DISCONDECISION_PARM_CHECK_PERIOD(__pH2CCmd, __Value) SET_BITS_TO_LE_1BYTE_8BIT(__pH2CCmd+1, 0, 8, __Value)
200 #define SET_H2CCMD_DISCONDECISION_PARM_TRY_PKT_NUM(__pH2CCmd, __Value) SET_BITS_TO_LE_1BYTE_8BIT(__pH2CCmd+2, 0, 8, __Value)
203 #define SET_H2CCMD_AP_WOWLAN_EN(__pH2CCmd, __Value) SET_BITS_TO_LE_1BYTE_8BIT(__pH2CCmd, 0, 8, __Value)
205 #define SET_H2CCMD_AP_WOWLAN_RSVDPAGE_LOC_BCN(__pH2CCmd, __Value) SET_BITS_TO_LE_1BYTE_8BIT(__pH2CCmd, 0, 8, __Value)
206 //_Probersp_RsvdPage 0x0a
207 #define SET_H2CCMD_AP_WOWLAN_RSVDPAGE_LOC_ProbeRsp(__pH2CCmd, __Value) SET_BITS_TO_LE_1BYTE_8BIT(__pH2CCmd, 0, 8, __Value)
208 //_Probersp_RsvdPage 0x13
209 #define SET_H2CCMD_AP_WOW_GPIO_CTRL_INDEX(__pH2CCmd, __Value) SET_BITS_TO_LE_1BYTE(__pH2CCmd, 0, 4, __Value)
210 #define SET_H2CCMD_AP_WOW_GPIO_CTRL_C2H_EN(__pH2CCmd, __Value) SET_BITS_TO_LE_1BYTE(__pH2CCmd, 4, 1, __Value)
211 #define SET_H2CCMD_AP_WOW_GPIO_CTRL_PLUS(__pH2CCmd, __Value) SET_BITS_TO_LE_1BYTE(__pH2CCmd, 5, 1, __Value)
212 #define SET_H2CCMD_AP_WOW_GPIO_CTRL_HIGH_ACTIVE(__pH2CCmd, __Value) SET_BITS_TO_LE_1BYTE(__pH2CCmd, 6, 1, __Value)
213 #define SET_H2CCMD_AP_WOW_GPIO_CTRL_EN(__pH2CCmd, __Value) SET_BITS_TO_LE_1BYTE(__pH2CCmd, 7, 1, __Value)
214 #define SET_H2CCMD_AP_WOW_GPIO_CTRL_DURATION(__pH2CCmd, __Value) SET_BITS_TO_LE_1BYTE_8BIT((__pH2CCmd)+1, 0, 8, __Value)
215 #define SET_H2CCMD_AP_WOW_GPIO_CTRL_C2H_DURATION(__pH2CCmd, __Value)SET_BITS_TO_LE_1BYTE_8BIT((__pH2CCmd)+2, 0, 8, __Value)
217 #define SET_H2CCMD_AP_WOW_PS_EN(__pH2CCmd, __Value) SET_BITS_TO_LE_1BYTE(__pH2CCmd, 0, 1, __Value)
218 #define SET_H2CCMD_AP_WOW_PS_32K_EN(__pH2CCmd, __Value) SET_BITS_TO_LE_1BYTE(__pH2CCmd, 1, 1, __Value)
219 #define SET_H2CCMD_AP_WOW_PS_RF(__pH2CCmd, __Value) SET_BITS_TO_LE_1BYTE(__pH2CCmd, 2, 1, __Value)
220 #define SET_H2CCMD_AP_WOW_PS_DURATION(__pH2CCmd, __Value) SET_BITS_TO_LE_1BYTE_8BIT((__pH2CCmd)+1, 0, 8, __Value)
222 // _WoWLAN PARAM_CMD_0x80
223 #define SET_H2CCMD_WOWLAN_FUNC_ENABLE(__pH2CCmd, __Value) SET_BITS_TO_LE_1BYTE(__pH2CCmd, 0, 1, __Value)
224 #define SET_H2CCMD_WOWLAN_PATTERN_MATCH_ENABLE(__pH2CCmd, __Value) SET_BITS_TO_LE_1BYTE(__pH2CCmd, 1, 1, __Value)
225 #define SET_H2CCMD_WOWLAN_MAGIC_PKT_ENABLE(__pH2CCmd, __Value) SET_BITS_TO_LE_1BYTE(__pH2CCmd, 2, 1, __Value)
226 #define SET_H2CCMD_WOWLAN_UNICAST_PKT_ENABLE(__pH2CCmd, __Value) SET_BITS_TO_LE_1BYTE(__pH2CCmd, 3, 1, __Value)
227 #define SET_H2CCMD_WOWLAN_ALL_PKT_DROP(__pH2CCmd, __Value) SET_BITS_TO_LE_1BYTE(__pH2CCmd, 4, 1, __Value)
228 #define SET_H2CCMD_WOWLAN_GPIO_ACTIVE(__pH2CCmd, __Value) SET_BITS_TO_LE_1BYTE(__pH2CCmd, 5, 1, __Value)
229 #define SET_H2CCMD_WOWLAN_REKEY_WAKE_UP(__pH2CCmd, __Value) SET_BITS_TO_LE_1BYTE(__pH2CCmd, 6, 1, __Value)
230 #define SET_H2CCMD_WOWLAN_DISCONNECT_WAKE_UP(__pH2CCmd, __Value) SET_BITS_TO_LE_1BYTE(__pH2CCmd, 7, 1, __Value)
231 #define SET_H2CCMD_WOWLAN_GPIONUM(__pH2CCmd, __Value) SET_BITS_TO_LE_1BYTE((__pH2CCmd)+1, 0, 7, __Value)
232 #define SET_H2CCMD_WOWLAN_DATAPIN_WAKE_UP(__pH2CCmd, __Value) SET_BITS_TO_LE_1BYTE((__pH2CCmd)+1, 7, 1, __Value)
233 #define SET_H2CCMD_WOWLAN_GPIO_DURATION(__pH2CCmd, __Value) SET_BITS_TO_LE_1BYTE_8BIT((__pH2CCmd)+2, 0, 8, __Value)
234 #define SET_H2CCMD_WOWLAN_GPIO_PULSE_EN(__pH2CCmd, __Value) SET_BITS_TO_LE_1BYTE((__pH2CCmd)+3, 0, 1, __Value)
235 #define SET_H2CCMD_WOWLAN_GPIO_PULSE_COUNT(__pH2CCmd, __Value) SET_BITS_TO_LE_1BYTE_8BIT((__pH2CCmd)+3, 1, 7, __Value)
236 #define SET_H2CCMD_WOWLAN_LOWPR_RX(__pH2CCmd, __Value) SET_BITS_TO_LE_1BYTE_8BIT((__pH2CCmd)+4, 0, 1, __Value)
238 // _REMOTE_WAKEUP_CMD_0x81
239 #define SET_H2CCMD_REMOTE_WAKECTRL_ENABLE(__pH2CCmd, __Value) SET_BITS_TO_LE_1BYTE(__pH2CCmd, 0, 1, __Value)
240 #define SET_H2CCMD_REMOTE_WAKE_CTRL_ARP_OFFLOAD_EN(__pH2CCmd, __Value) SET_BITS_TO_LE_1BYTE(__pH2CCmd, 1, 1, __Value)
241 #define SET_H2CCMD_REMOTE_WAKE_CTRL_NDP_OFFLOAD_EN(__pH2CCmd, __Value) SET_BITS_TO_LE_1BYTE(__pH2CCmd, 2, 1, __Value)
242 #define SET_H2CCMD_REMOTE_WAKE_CTRL_GTK_OFFLOAD_EN(__pH2CCmd, __Value) SET_BITS_TO_LE_1BYTE(__pH2CCmd, 3, 1, __Value)
243 #define SET_H2CCMD_REMOTE_WAKE_CTRL_NLO_OFFLOAD_EN(__pH2CCmd, __Value) SET_BITS_TO_LE_1BYTE(__pH2CCmd, 4, 1, __Value)
244 #define SET_H2CCMD_REMOTE_WAKE_CTRL_FW_UNICAST_EN(__pH2CCmd, __Value) SET_BITS_TO_LE_1BYTE(__pH2CCmd, 7, 1, __Value)
245 #define SET_H2CCMD_REMOTE_WAKE_CTRL_P2P_OFFLAD_EN(__pH2CCmd, __Value) SET_BITS_TO_LE_1BYTE((__pH2CCmd)+1, 0, 1, __Value)
246 #define SET_H2CCMD_REMOTE_WAKE_CTRL_NBNS_FILTER_EN(__pH2CCmd, __Value) SET_BITS_TO_LE_1BYTE((__pH2CCmd)+1, 2, 1, __Value)
247 #define SET_H2CCMD_REMOTE_WAKE_CTRL_ARP_ACTION(__pH2CCmd, __Value) SET_BITS_TO_LE_1BYTE((__pH2CCmd)+2, 0, 1, __Value)
248 #define SET_H2CCMD_REMOTE_WAKE_CTRL_FW_PARSING_UNTIL_WAKEUP(__pH2CCmd, __Value) SET_BITS_TO_LE_1BYTE((__pH2CCmd)+2, 4, 1, __Value)
250 // AOAC_GLOBAL_INFO_0x82
251 #define SET_H2CCMD_AOAC_GLOBAL_INFO_PAIRWISE_ENC_ALG(__pH2CCmd, __Value) SET_BITS_TO_LE_1BYTE_8BIT(__pH2CCmd, 0, 8, __Value)
252 #define SET_H2CCMD_AOAC_GLOBAL_INFO_GROUP_ENC_ALG(__pH2CCmd, __Value) SET_BITS_TO_LE_1BYTE_8BIT((__pH2CCmd)+1, 0, 8, __Value)
254 // AOAC_RSVDPAGE_LOC_0x83
255 #define SET_H2CCMD_AOAC_RSVDPAGE_LOC_REMOTE_WAKE_CTRL_INFO(__pH2CCmd, __Value) SET_BITS_TO_LE_1BYTE_8BIT((__pH2CCmd), 0, 8, __Value)
256 #define SET_H2CCMD_AOAC_RSVDPAGE_LOC_ARP_RSP(__pH2CCmd, __Value) SET_BITS_TO_LE_1BYTE_8BIT((__pH2CCmd)+1, 0, 8, __Value)
257 #define SET_H2CCMD_AOAC_RSVDPAGE_LOC_NEIGHBOR_ADV(__pH2CCmd, __Value) SET_BITS_TO_LE_1BYTE_8BIT((__pH2CCmd)+2, 0, 8, __Value)
258 #define SET_H2CCMD_AOAC_RSVDPAGE_LOC_GTK_RSP(__pH2CCmd, __Value) SET_BITS_TO_LE_1BYTE_8BIT((__pH2CCmd)+3, 0, 8, __Value)
259 #define SET_H2CCMD_AOAC_RSVDPAGE_LOC_GTK_INFO(__pH2CCmd, __Value) SET_BITS_TO_LE_1BYTE_8BIT((__pH2CCmd)+4, 0, 8, __Value)
261 #define SET_H2CCMD_AOAC_RSVDPAGE_LOC_GTK_EXT_MEM(__pH2CCmd, __Value) SET_BITS_TO_LE_1BYTE_8BIT((__pH2CCmd)+5, 0, 8, __Value)
262 #endif //CONFIG_GTK_OL
263 #ifdef CONFIG_PNO_SUPPORT
264 #define SET_H2CCMD_AOAC_RSVDPAGE_LOC_NLO_INFO(__pH2CCmd, __Value) SET_BITS_TO_LE_1BYTE_8BIT((__pH2CCmd), 0, 8, __Value)
267 #ifdef CONFIG_PNO_SUPPORT
268 // D0_Scan_Offload_Info_0x86
269 #define SET_H2CCMD_AOAC_NLO_FUN_EN(__pH2CCmd, __Value) SET_BITS_TO_LE_1BYTE((__pH2CCmd), 3, 1, __Value)
270 #define SET_H2CCMD_AOAC_NLO_IPS_EN(__pH2CCmd, __Value) SET_BITS_TO_LE_1BYTE((__pH2CCmd), 4, 1, __Value)
271 #define SET_H2CCMD_AOAC_RSVDPAGE_LOC_PROBE_PACKET(__pH2CCmd, __Value) SET_BITS_TO_LE_1BYTE_8BIT((__pH2CCmd)+1, 0, 8, __Value)
272 #define SET_H2CCMD_AOAC_RSVDPAGE_LOC_SCAN_INFO(__pH2CCmd, __Value) SET_BITS_TO_LE_1BYTE_8BIT((__pH2CCmd)+2, 0, 8, __Value)
273 #define SET_H2CCMD_AOAC_RSVDPAGE_LOC_SSID_INFO(__pH2CCmd, __Value) SET_BITS_TO_LE_1BYTE_8BIT((__pH2CCmd)+3, 0, 8, __Value)
274 #endif //CONFIG_PNO_SUPPORT
276 #ifdef CONFIG_P2P_WOWLAN
278 #define SET_H2CCMD_RSVDPAGE_LOC_P2P_BCN(__pH2CCmd, __Value) SET_BITS_TO_LE_1BYTE_8BIT(__pH2CCmd, 0, 8, __Value)
279 #define SET_H2CCMD_RSVDPAGE_LOC_P2P_PROBE_RSP(__pH2CCmd, __Value) SET_BITS_TO_LE_1BYTE_8BIT((__pH2CCmd)+1, 0, 8, __Value)
280 #define SET_H2CCMD_RSVDPAGE_LOC_P2P_NEGO_RSP(__pH2CCmd, __Value) SET_BITS_TO_LE_1BYTE_8BIT((__pH2CCmd)+2, 0, 8, __Value)
281 #define SET_H2CCMD_RSVDPAGE_LOC_P2P_INVITE_RSP(__pH2CCmd, __Value) SET_BITS_TO_LE_1BYTE_8BIT((__pH2CCmd)+3, 0, 8, __Value)
282 #define SET_H2CCMD_RSVDPAGE_LOC_P2P_PD_RSP(__pH2CCmd, __Value) SET_BITS_TO_LE_1BYTE_8BIT((__pH2CCmd)+4, 0, 8, __Value)
283 #endif //CONFIG_P2P_WOWLAN
285 //---------------------------------------------------------------------------------------------------------//
286 //------------------------------------------- Structure --------------------------------------------------//
287 //---------------------------------------------------------------------------------------------------------//
288 typedef struct _RSVDPAGE_LOC {
295 u8 LocRemoteCtrlInfo;
304 #endif //CONFIG_GTK_OL
305 #ifdef CONFIG_PNO_SUPPORT
310 #endif //CONFIG_PNO_SUPPORT
311 #endif //CONFIG_WOWLAN
313 #ifdef CONFIG_P2P_WOWLAN
319 #endif //CONFIG_P2P_WOWLAN
320 } RSVDPAGE_LOC, *PRSVDPAGE_LOC;
323 void dump_TX_FIFO(PADAPTER padapter, u8 page_num, u16 page_size);
324 u8 rtw_hal_set_fw_media_status_cmd(_adapter* adapter, u8 mstatus, u8 macid);
325 #if defined(CONFIG_WOWLAN) || defined(CONFIG_AP_WOWLAN)
326 void rtw_get_current_ip_address(PADAPTER padapter, u8 *pcurrentip);
327 void rtw_get_sec_iv(PADAPTER padapter, u8*pcur_dot11txpn, u8 *StaAddr);
328 void rtw_set_sec_pn(_adapter *padapter);
330 //WOW command function
331 void rtw_hal_set_fw_wow_related_cmd(_adapter* padapter, u8 enable);
332 #ifdef CONFIG_P2P_WOWLAN
334 u8 rtw_hal_set_FwP2PRsvdPage_cmd(_adapter* adapter, PRSVDPAGE_LOC rsvdpageloc);
336 u8 rtw_hal_set_p2p_wowlan_offload_cmd(_adapter* adapter);
337 #endif //CONFIG_P2P_WOWLAN