1 /******************************************************************************
3 * Copyright(c) 2009-2010 Realtek Corporation.
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
18 * The full GNU General Public License is included in this distribution in the
19 * file called LICENSE.
21 * Contact Information:
22 * wlanfae <wlanfae@realtek.com>
23 * Realtek Corporation, No. 2, Innovation Road II, Hsinchu Science Park,
24 * Hsinchu 300, Taiwan.
26 * Larry Finger <Larry.Finger@lwfinger.net>
28 *****************************************************************************/
38 static void _rtl8821ae_enable_fw_download(struct ieee80211_hw *hw, bool enable)
40 struct rtl_priv *rtlpriv = rtl_priv(hw);
44 rtl_write_byte(rtlpriv, REG_MCUFWDL, 0x05);
46 tmp = rtl_read_byte(rtlpriv, REG_MCUFWDL + 2);
47 rtl_write_byte(rtlpriv, REG_MCUFWDL + 2, tmp & 0xf7);
49 tmp = rtl_read_byte(rtlpriv, REG_MCUFWDL);
50 //printk("0x80=%02x.\n",tmp);
52 tmp = rtl_read_byte(rtlpriv, REG_MCUFWDL);
53 rtl_write_byte(rtlpriv, REG_MCUFWDL, tmp & 0xfe);
54 tmp = rtl_read_byte(rtlpriv, REG_MCUFWDL);
55 //printk("0x80=%02x.\n",tmp);
60 static void _rtl8821ae_fw_block_write(struct ieee80211_hw *hw,
61 const u8 *buffer, u32 size)
63 struct rtl_priv *rtlpriv = rtl_priv(hw);
64 u32 blockSize = sizeof(u32);
65 u8 *bufferPtr = (u8 *) buffer;
66 u32 *pu4BytePtr = (u32 *) buffer;
67 u32 i, offset, blockCount, remainSize;
69 blockCount = size / blockSize;
70 remainSize = size % blockSize;
72 for (i = 0; i < blockCount; i++) {
73 offset = i * blockSize;
74 rtl_write_dword(rtlpriv, (FW_8821AE_START_ADDRESS + offset),
79 offset = blockCount * blockSize;
81 for (i = 0; i < remainSize; i++) {
82 rtl_write_byte(rtlpriv, (FW_8821AE_START_ADDRESS +
83 offset + i), *(bufferPtr + i));
88 static void _rtl8821ae_fw_page_write(struct ieee80211_hw *hw,
89 u32 page, const u8 *buffer, u32 size)
91 struct rtl_priv *rtlpriv = rtl_priv(hw);
93 u8 u8page = (u8) (page & 0x07);
95 value8 = (rtl_read_byte(rtlpriv, REG_MCUFWDL + 2) & 0xF8) | u8page;
97 rtl_write_byte(rtlpriv, (REG_MCUFWDL + 2), value8);
98 _rtl8821ae_fw_block_write(hw, buffer, size);
101 static void _rtl8821ae_fill_dummy(u8 *pfwbuf, u32 *pfwlen)
104 u8 remain = (u8) (fwlen % 4);
106 remain = (remain == 0) ? 0 : (4 - remain);
117 static void _rtl8821ae_write_fw(struct ieee80211_hw *hw,
118 enum version_8821ae version,
119 u8 *buffer, u32 size)
121 struct rtl_priv *rtlpriv = rtl_priv(hw);
122 u8 *bufferPtr = (u8 *) buffer;
123 u32 pageNums, remainSize;
126 RT_TRACE(COMP_FW, DBG_LOUD, ("FW size is %d bytes,\n", size));
128 _rtl8821ae_fill_dummy(bufferPtr, &size);
130 pageNums = size / FW_8821AE_PAGE_SIZE;
131 remainSize = size % FW_8821AE_PAGE_SIZE;
134 RT_TRACE(COMP_ERR, DBG_EMERG,
135 ("Page numbers should not greater then 8\n"));
138 for (page = 0; page < pageNums; page++) {
139 offset = page * FW_8821AE_PAGE_SIZE;
140 _rtl8821ae_fw_page_write(hw, page, (bufferPtr + offset),
141 FW_8821AE_PAGE_SIZE);
145 offset = pageNums * FW_8821AE_PAGE_SIZE;
147 _rtl8821ae_fw_page_write(hw, page, (bufferPtr + offset),
153 static int _rtl8821ae_fw_free_to_go(struct ieee80211_hw *hw)
155 struct rtl_priv *rtlpriv = rtl_priv(hw);
161 value32 = rtl_read_dword(rtlpriv, REG_MCUFWDL);
162 } while ((counter++ < FW_8821AE_POLLING_TIMEOUT_COUNT) &&
163 (!(value32 & FWDL_CHKSUM_RPT)));
165 if (counter >= FW_8821AE_POLLING_TIMEOUT_COUNT) {
166 RT_TRACE(COMP_ERR, DBG_LOUD,
167 ("chksum report faill ! REG_MCUFWDL:0x%08x .\n",
172 RT_TRACE(COMP_FW, DBG_EMERG,
173 ("Checksum report OK ! REG_MCUFWDL:0x%08x .\n", value32));
175 value32 = rtl_read_dword(rtlpriv, REG_MCUFWDL);
176 value32 |= MCUFWDL_RDY;
177 value32 &= ~WINTINI_RDY;
178 rtl_write_dword(rtlpriv, REG_MCUFWDL, value32);
180 rtl8821ae_firmware_selfreset(hw);
184 value32 = rtl_read_dword(rtlpriv, REG_MCUFWDL);
185 if (value32 & WINTINI_RDY) {
186 RT_TRACE(COMP_FW, DBG_LOUD,
187 ("Polling FW ready success!! REG_MCUFWDL:0x%08x .\n",
193 udelay(FW_8821AE_POLLING_DELAY);
195 } while (counter++ < FW_8821AE_POLLING_TIMEOUT_COUNT);
197 RT_TRACE(COMP_ERR, DBG_EMERG,
198 ("Polling FW ready fail!! REG_MCUFWDL:0x%08x .\n", value32));
204 int rtl8821ae_download_fw(struct ieee80211_hw *hw,
205 bool buse_wake_on_wlan_fw
208 struct rtl_priv *rtlpriv = rtl_priv(hw);
209 struct rtl_hal *rtlhal = rtl_hal(rtl_priv(hw));
210 struct rtl8821a_firmware_header *pfwheader;
214 enum version_8821ae version = rtlhal->version;
216 if(!rtlhal->pfirmware)
219 pfwheader = (struct rtl8821a_firmware_header *)rtlhal->pfirmware;
220 pfwdata = (u8 *) rtlhal->pfirmware;
221 fwsize = rtlhal->fwsize;
222 RT_TRACE(COMP_FW, DBG_DMESG,
223 ("normal Firmware SIZE %d \n",fwsize));
225 if (IS_FW_HEADER_EXIST_8812(pfwheader) || IS_FW_HEADER_EXIST_8821(pfwheader)) {
226 RT_TRACE(COMP_FW, DBG_DMESG,
227 ("Firmware Version(%d), Signature(%#x),Size(%d)\n",
228 pfwheader->version, pfwheader->signature,
229 (int)sizeof(struct rtl8821a_firmware_header)));
231 pfwdata = pfwdata + sizeof(struct rtl8821a_firmware_header);
232 fwsize = fwsize - sizeof(struct rtl8821a_firmware_header);
235 if(rtl_read_byte(rtlpriv, REG_MCUFWDL) & BIT(7)){
236 rtl_write_byte(rtlpriv, REG_MCUFWDL, 0x00);
237 rtl8821ae_firmware_selfreset(hw);
239 _rtl8821ae_enable_fw_download(hw, true);
240 _rtl8821ae_write_fw(hw, version, pfwdata, fwsize);
241 _rtl8821ae_enable_fw_download(hw, false);
243 err = _rtl8821ae_fw_free_to_go(hw);
245 RT_TRACE(COMP_ERR, DBG_EMERG,
246 ("Firmware is not ready to run!\n"));
248 RT_TRACE(COMP_FW, DBG_LOUD,
249 ("Firmware is ready to run!\n"));
255 static bool _rtl8821ae_check_fw_read_last_h2c(struct ieee80211_hw *hw, u8 boxnum)
257 struct rtl_priv *rtlpriv = rtl_priv(hw);
261 val_hmetfr = rtl_read_byte(rtlpriv, REG_HMETFR);
262 if (((val_hmetfr >> boxnum) & BIT(0)) == 0)
267 static void _rtl8821ae_fill_h2c_command(struct ieee80211_hw *hw,
268 u8 element_id, u32 cmd_len, u8 *p_cmdbuffer)
270 struct rtl_priv *rtlpriv = rtl_priv(hw);
271 struct rtl_hal *rtlhal = rtl_hal(rtl_priv(hw));
273 u16 box_reg = 0, box_extreg = 0;
275 bool isfw_read = false;
277 bool bwrite_sucess = false;
278 u8 wait_h2c_limmit = 100;
279 /*u8 wait_writeh2c_limmit = 100;*/
280 u8 boxcontent[4], boxextcontent[4];
281 u32 h2c_waitcounter = 0;
282 unsigned long flag =0;
285 RT_TRACE(COMP_CMD, DBG_LOUD, ("come in\n"));
288 spin_lock_irqsave(&rtlpriv->locks.h2c_lock, flag);
289 if (rtlhal->b_h2c_setinprogress) {
290 RT_TRACE(COMP_CMD, DBG_LOUD,
291 ("H2C set in progress! Wait to set.."
292 "element_id(%d).\n", element_id));
294 while (rtlhal->b_h2c_setinprogress) {
295 spin_unlock_irqrestore(&rtlpriv->locks.h2c_lock,
298 RT_TRACE(COMP_CMD, DBG_LOUD,
299 ("Wait 100 us (%d times)...\n",
303 if (h2c_waitcounter > 1000)
305 spin_lock_irqsave(&rtlpriv->locks.h2c_lock,
308 spin_unlock_irqrestore(&rtlpriv->locks.h2c_lock, flag);
310 rtlhal->b_h2c_setinprogress = true;
311 spin_unlock_irqrestore(&rtlpriv->locks.h2c_lock, flag);
316 while (!bwrite_sucess) {
317 /*cosa remove this because never reach this.*/
319 wait_writeh2c_limmit--;
320 if (wait_writeh2c_limmit == 0) {
321 RT_TRACE(COMP_ERR, DBG_EMERG,
322 ("Write H2C fail because no trigger "
328 boxnum = rtlhal->last_hmeboxnum;
331 box_reg = REG_HMEBOX_0;
332 box_extreg = REG_HMEBOX_EXT_0;
335 box_reg = REG_HMEBOX_1;
336 box_extreg = REG_HMEBOX_EXT_1;
339 box_reg = REG_HMEBOX_2;
340 box_extreg = REG_HMEBOX_EXT_2;
343 box_reg = REG_HMEBOX_3;
344 box_extreg = REG_HMEBOX_EXT_3;
347 RT_TRACE(COMP_ERR, DBG_EMERG,
348 ("switch case not process \n"));
353 u1b_tmp = rtl_read_byte(rtlpriv, REG_CR);
358 if( rtl_read_byte(rtlpriv, REG_TXDMA_STATUS) == 0xEA ||
359 rtl_read_byte(rtlpriv, REG_TXPKT_EMPTY) == 0xEA)
360 rtl_write_byte(rtlpriv, REG_SYS_CFG1 + 3, 0xFF);
363 if (isfw_read == true) {
364 wait_h2c_limmit = 100;
365 isfw_read = _rtl8821ae_check_fw_read_last_h2c(hw, boxnum);
367 /*wait until Fw read*/
369 if (wait_h2c_limmit == 0) {
370 RT_TRACE(COMP_CMD, DBG_LOUD,
371 ("Wating too long for FW read "
372 "clear HMEBox(%d)!\n", boxnum));
378 isfw_read = _rtl8821ae_check_fw_read_last_h2c(hw, boxnum);
379 u1b_tmp = rtl_read_byte(rtlpriv, 0x130);
380 RT_TRACE(COMP_CMD, DBG_LOUD,
381 ("Wating for FW read clear HMEBox(%d)!!! "
382 "0x130 = %2x\n", boxnum, u1b_tmp));
387 RT_TRACE(COMP_CMD, DBG_LOUD,
388 ("Write H2C register BOX[%d] fail!!!!! "
389 "Fw do not read. \n", boxnum));
393 memset(boxcontent, 0, sizeof(boxcontent));
394 memset(boxextcontent, 0, sizeof(boxextcontent));
395 boxcontent[0] = element_id;
396 RT_TRACE(COMP_CMD, DBG_LOUD,
397 ("Write element_id box_reg(%4x) = %2x \n",
398 box_reg, element_id));
404 /*boxcontent[0] &= ~(BIT(7));*/
405 memcpy((u8 *) (boxcontent) + 1,
406 p_cmdbuffer + buf_index, cmd_len);
408 for (idx = 0; idx < 4; idx++) {
409 rtl_write_byte(rtlpriv, box_reg + idx,
417 /*boxcontent[0] |= (BIT(7));*/
418 memcpy((u8 *) (boxextcontent),
419 p_cmdbuffer + buf_index+3, cmd_len-3);
420 memcpy((u8 *) (boxcontent) + 1,
421 p_cmdbuffer + buf_index, 3);
423 for (idx = 0; idx < 4; idx++) {
424 rtl_write_byte(rtlpriv, box_extreg + idx,
428 for (idx = 0; idx < 4; idx++) {
429 rtl_write_byte(rtlpriv, box_reg + idx,
434 RT_TRACE(COMP_ERR, DBG_EMERG,
435 ("switch case not process \n"));
439 bwrite_sucess = true;
441 rtlhal->last_hmeboxnum = boxnum + 1;
442 if (rtlhal->last_hmeboxnum == 4)
443 rtlhal->last_hmeboxnum = 0;
445 RT_TRACE(COMP_CMD, DBG_LOUD,
446 ("pHalData->last_hmeboxnum = %d\n",
447 rtlhal->last_hmeboxnum));
450 spin_lock_irqsave(&rtlpriv->locks.h2c_lock, flag);
451 rtlhal->b_h2c_setinprogress = false;
452 spin_unlock_irqrestore(&rtlpriv->locks.h2c_lock, flag);
454 RT_TRACE(COMP_CMD, DBG_LOUD, ("go out\n"));
457 void rtl8821ae_fill_h2c_cmd(struct ieee80211_hw *hw,
458 u8 element_id, u32 cmd_len, u8 *p_cmdbuffer)
460 struct rtl_hal *rtlhal = rtl_hal(rtl_priv(hw));
463 if (rtlhal->bfw_ready == false) {
464 RT_ASSERT(false, ("return H2C cmd because of Fw "
465 "download fail!!!\n"));
469 memset(tmp_cmdbuf, 0, 8);
470 memcpy(tmp_cmdbuf, p_cmdbuffer, cmd_len);
471 _rtl8821ae_fill_h2c_command(hw, element_id, cmd_len, (u8 *) & tmp_cmdbuf);
476 void rtl8821ae_firmware_selfreset(struct ieee80211_hw *hw)
479 struct rtl_priv *rtlpriv = rtl_priv(hw);
480 struct rtl_hal *rtlhal = rtl_hal(rtl_priv(hw));
482 if(rtlhal->hw_type == HARDWARE_TYPE_RTL8812AE)
484 u1b_tmp = rtl_read_byte(rtlpriv, REG_RSV_CTRL+1);
485 rtl_write_byte(rtlpriv, REG_RSV_CTRL+1, (u1b_tmp & (~BIT(3))));
487 u1b_tmp = rtl_read_byte(rtlpriv, REG_RSV_CTRL+1);
488 rtl_write_byte(rtlpriv, REG_RSV_CTRL+1, (u1b_tmp & (~BIT(0))));
491 u1b_tmp = rtl_read_byte(rtlpriv, REG_SYS_FUNC_EN+1);
492 rtl_write_byte(rtlpriv, REG_SYS_FUNC_EN+1, (u1b_tmp & (~BIT(2))));
495 if(rtlhal->hw_type == HARDWARE_TYPE_RTL8812AE)
497 u1b_tmp = rtl_read_byte(rtlpriv, REG_RSV_CTRL+1);
498 rtl_write_byte(rtlpriv, REG_RSV_CTRL+1, (u1b_tmp | BIT(3)));
500 u1b_tmp = rtl_read_byte(rtlpriv, REG_RSV_CTRL+1);
501 rtl_write_byte(rtlpriv, REG_RSV_CTRL+1, (u1b_tmp | BIT(0)));
504 u1b_tmp = rtl_read_byte(rtlpriv, REG_SYS_FUNC_EN+1);
505 rtl_write_byte(rtlpriv, REG_SYS_FUNC_EN+1, (u1b_tmp | BIT(2)));
507 RT_TRACE(COMP_INIT, DBG_LOUD, (" _8051Reset8812ae(): 8051 reset success .\n"));
511 void rtl8821ae_set_fw_pwrmode_cmd(struct ieee80211_hw *hw, u8 mode)
513 struct rtl_priv *rtlpriv = rtl_priv(hw);
514 u8 u1_h2c_set_pwrmode[H2C_8821AE_PWEMODE_LENGTH] = { 0 };
515 struct rtl_ps_ctl *ppsc = rtl_psc(rtl_priv(hw));
516 u8 rlbm,power_state = 0;
517 RT_TRACE(COMP_POWER, DBG_LOUD, ("FW LPS mode = %d\n", mode));
519 SET_H2CCMD_PWRMODE_PARM_MODE(u1_h2c_set_pwrmode, ((mode) ? 1 : 0));
520 rlbm = 0;/*YJ,temp,120316. FW now not support RLBM=2.*/
521 SET_H2CCMD_PWRMODE_PARM_RLBM(u1_h2c_set_pwrmode, rlbm);
522 SET_H2CCMD_PWRMODE_PARM_SMART_PS(u1_h2c_set_pwrmode, (rtlpriv->mac80211.p2p) ? ppsc->smart_ps : 1);
523 SET_H2CCMD_PWRMODE_PARM_AWAKE_INTERVAL(u1_h2c_set_pwrmode, ppsc->reg_max_lps_awakeintvl);
524 SET_H2CCMD_PWRMODE_PARM_ALL_QUEUE_UAPSD(u1_h2c_set_pwrmode, 0);
525 if(mode == FW_PS_ACTIVE_MODE)
527 power_state |= FW_PWR_STATE_ACTIVE;
531 power_state |= FW_PWR_STATE_RF_OFF;
533 SET_H2CCMD_PWRMODE_PARM_PWR_STATE(u1_h2c_set_pwrmode, power_state);
535 RT_PRINT_DATA(rtlpriv, COMP_CMD, DBG_DMESG,
536 "rtl92c_set_fw_pwrmode(): u1_h2c_set_pwrmode \n",
537 u1_h2c_set_pwrmode, H2C_8821AE_PWEMODE_LENGTH);
538 rtl8821ae_fill_h2c_cmd(hw, H2C_8821AE_SETPWRMODE, H2C_8821AE_PWEMODE_LENGTH, u1_h2c_set_pwrmode);
542 void rtl8821ae_set_fw_joinbss_report_cmd(struct ieee80211_hw *hw, u8 mstatus)
544 u8 u1_joinbssrpt_parm[1] = { 0 };
546 SET_H2CCMD_JOINBSSRPT_PARM_OPMODE(u1_joinbssrpt_parm, mstatus);
548 rtl8821ae_fill_h2c_cmd(hw, H2C_8821AE_JOINBSSRPT, 1, u1_joinbssrpt_parm);
551 void rtl8821ae_set_fw_ap_off_load_cmd(struct ieee80211_hw *hw, u8 ap_offload_enable)
553 struct rtl_mac *mac = rtl_mac(rtl_priv(hw));
554 u8 u1_apoffload_parm[H2C_8821AE_AP_OFFLOAD_LENGTH] = { 0 };
556 SET_H2CCMD_AP_OFFLOAD_ON(u1_apoffload_parm, ap_offload_enable);
557 SET_H2CCMD_AP_OFFLOAD_HIDDEN(u1_apoffload_parm, mac->bhiddenssid);
558 SET_H2CCMD_AP_OFFLOAD_DENYANY(u1_apoffload_parm, 0);
560 rtl8821ae_fill_h2c_cmd(hw, H2C_8821AE_AP_OFFLOAD, H2C_8821AE_AP_OFFLOAD_LENGTH, u1_apoffload_parm);
564 static bool _rtl8821ae_cmd_send_packet(struct ieee80211_hw *hw,
567 struct rtl_priv *rtlpriv = rtl_priv(hw);
568 struct rtl_pci *rtlpci = rtl_pcidev(rtl_pcipriv(hw));
569 struct rtl8192_tx_ring *ring;
570 struct rtl_tx_desc *pdesc;
573 struct sk_buff *pskb = NULL;
575 ring = &rtlpci->tx_ring[BEACON_QUEUE];
577 pskb = __skb_dequeue(&ring->queue);
581 spin_lock_irqsave(&rtlpriv->locks.irq_th_lock, flags);
583 pdesc = &ring->desc[0];
584 own = (u8) rtlpriv->cfg->ops->get_desc((u8 *) pdesc, true, HW_DESC_OWN);
586 rtlpriv->cfg->ops->fill_tx_cmddesc(hw, (u8 *) pdesc, 1, 1, skb);
588 __skb_queue_tail(&ring->queue, skb);
590 spin_unlock_irqrestore(&rtlpriv->locks.irq_th_lock, flags);
592 rtlpriv->cfg->ops->tx_polling(hw, BEACON_QUEUE);
597 #define BEACON_PG 0 /* ->1 */
600 #define PROBERSP_PG 4 /* ->5 */
602 #define BEACON_PG_8812 0
603 #define PSPOLL_PG_8812 1
604 #define NULL_PG_8812 2
605 #define PROBERSP_PG_8812 3
607 #define BEACON_PG_8821 0
608 #define PSPOLL_PG_8821 1
609 #define NULL_PG_8821 2
610 #define PROBERSP_PG_8821 3
612 #define TOTAL_RESERVED_PKT_LEN_8812 2048
613 #define TOTAL_RESERVED_PKT_LEN_8821 1024
616 static u8 reserved_page_packet_8821[TOTAL_RESERVED_PKT_LEN_8821] = {
618 0x80, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff,
619 0xff, 0xff, 0x00, 0xe0, 0x4c, 0x02, 0xe2, 0x64,
620 0x40, 0x16, 0x9f, 0x23, 0xd4, 0x46, 0x20, 0x00,
621 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
622 0x64, 0x00, 0x20, 0x04, 0x00, 0x06, 0x64, 0x6c,
623 0x69, 0x6e, 0x6b, 0x31, 0x01, 0x08, 0x82, 0x84,
624 0x8b, 0x96, 0x0c, 0x18, 0x30, 0x48, 0x03, 0x01,
625 0x0b, 0x06, 0x02, 0x00, 0x00, 0x2a, 0x01, 0x8b,
626 0x32, 0x04, 0x12, 0x24, 0x60, 0x6c, 0x00, 0x00,
627 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
628 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
629 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
630 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
631 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
632 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
633 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
634 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
635 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
636 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
637 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
638 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
639 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
640 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
641 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
642 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
643 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
644 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
645 0x10, 0x00, 0x28, 0x8c, 0x00, 0x12, 0x00, 0x00,
646 0x00, 0x00, 0x00, 0x00, 0x00, 0x81, 0x00, 0x00,
647 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
648 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
649 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
651 0xa4, 0x10, 0x01, 0xc0, 0x40, 0x16, 0x9f, 0x23,
652 0xd4, 0x46, 0x00, 0xe0, 0x4c, 0x02, 0xe2, 0x64,
653 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
654 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
655 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
656 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
657 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
658 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
659 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
660 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
661 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
662 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
663 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
664 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
665 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
666 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
667 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
668 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
669 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
670 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
671 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
672 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
673 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
674 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
675 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
676 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
677 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
678 0x18, 0x00, 0x28, 0x8c, 0x00, 0x12, 0x00, 0x00,
679 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00,
680 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
681 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
682 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
684 0x48, 0x01, 0x00, 0x00, 0x40, 0x16, 0x9f, 0x23,
685 0xd4, 0x46, 0x00, 0xe0, 0x4c, 0x02, 0xe2, 0x64,
686 0x40, 0x16, 0x9f, 0x23, 0xd4, 0x46, 0x00, 0x00,
687 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
688 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
689 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
690 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
691 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
692 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
693 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
694 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
695 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
696 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
697 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
698 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
699 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
700 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
701 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
702 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
703 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
704 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
705 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
706 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
707 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
708 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
709 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
710 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
711 0x1a, 0x00, 0x28, 0x8c, 0x00, 0x12, 0x00, 0x00,
712 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00,
713 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
714 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
715 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
717 0xc8, 0x01, 0x00, 0x00, 0x40, 0x16, 0x9f, 0x23,
718 0xd4, 0x46, 0x00, 0xe0, 0x4c, 0x02, 0xe2, 0x64,
719 0x40, 0x16, 0x9f, 0x23, 0xd4, 0x46, 0x00, 0x00,
720 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
721 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
722 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
723 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
724 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
725 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
726 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
727 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
728 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
729 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
730 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
731 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
732 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
733 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
734 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
735 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
736 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
737 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
738 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
739 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
740 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
741 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
742 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
743 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
744 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
745 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
746 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
747 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
748 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
752 static u8 reserved_page_packet_8812[TOTAL_RESERVED_PKT_LEN_8812] = {
753 0x80, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF,
754 0xFF, 0xFF, 0x00, 0xE0, 0x4C, 0x02, 0x53, 0xE5,
755 0xE0, 0x46, 0x9A, 0x57, 0x71, 0x30, 0x20, 0x00,
756 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
757 0x64, 0x00, 0x30, 0x04, 0x00, 0x0C, 0x4E, 0x45,
758 0x54, 0x47, 0x45, 0x41, 0x52, 0x5F, 0x31, 0x35,
759 0x30, 0x4E, 0x01, 0x08, 0x82, 0x84, 0x8B, 0x96,
760 0x0C, 0x12, 0x18, 0x24, 0x03, 0x01, 0x03, 0x06,
761 0x02, 0x00, 0x00, 0x2A, 0x01, 0x8A, 0x32, 0x04,
762 0x30, 0x48, 0x60, 0x6C, 0xDD, 0x18, 0x00, 0x50,
763 0xF2, 0x01, 0x01, 0x00, 0x00, 0x50, 0xF2, 0x02,
764 0x01, 0x00, 0x00, 0x50, 0xF2, 0x02, 0x01, 0x00,
765 0x00, 0x50, 0xF2, 0x02, 0x00, 0x00, 0x00, 0x00,
766 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
767 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
768 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
769 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
770 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
771 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
772 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
773 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
774 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
775 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
776 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
777 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
778 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
779 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
780 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
781 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
782 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
783 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
784 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
785 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
786 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
787 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
788 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
789 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
790 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
791 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
792 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
793 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
794 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
795 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
796 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
797 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
798 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
799 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
800 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
801 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
802 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
803 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
804 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
805 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
806 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
807 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
808 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
809 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
810 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
811 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
812 0x10, 0x00, 0x28, 0x8C, 0x00, 0x12, 0x00, 0x00,
813 0x00, 0x00, 0x00, 0x00, 0x00, 0x81, 0x00, 0x00,
814 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
815 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
816 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
818 0xA4, 0x10, 0x02, 0xC0, 0xE0, 0x46, 0x9A, 0x57,
819 0x71, 0x30, 0x00, 0xE0, 0x4C, 0x02, 0x53, 0xE5,
820 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
821 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
822 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
823 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
824 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
825 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
826 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
827 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
828 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
829 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
830 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
831 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
832 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
833 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
834 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
835 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
836 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
837 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
838 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
839 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
840 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
841 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
842 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
843 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
844 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
845 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
846 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
847 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
848 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
849 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
850 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
851 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
852 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
853 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
854 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
855 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
856 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
857 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
858 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
859 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
860 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
861 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
862 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
863 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
864 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
865 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
866 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
867 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
868 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
869 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
870 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
871 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
872 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
873 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
874 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
875 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
876 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
877 0x18, 0x00, 0x28, 0x8C, 0x00, 0x12, 0x00, 0x00,
878 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00,
879 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
880 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
881 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
883 0x48, 0x01, 0x00, 0x00, 0xE0, 0x46, 0x9A, 0x57,
884 0x71, 0x30, 0x00, 0xE0, 0x4C, 0x02, 0x53, 0xE5,
885 0xE0, 0x46, 0x9A, 0x57, 0x71, 0x30, 0x00, 0x00,
886 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
887 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
888 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
889 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
890 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
891 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
892 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
893 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
894 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
895 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
896 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
897 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
898 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
899 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
900 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
901 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
902 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
903 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
904 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
905 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
906 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
907 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
908 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
909 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
910 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
911 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
912 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
913 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
914 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
915 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
916 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
917 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
918 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
919 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
920 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
921 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
922 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
923 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
924 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
925 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
926 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
927 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
928 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
929 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
930 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
931 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
932 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
933 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
934 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
935 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
936 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
937 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
938 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
939 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
940 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
941 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
942 0x1A, 0x00, 0x28, 0x8C, 0x00, 0x12, 0x00, 0x00,
943 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00,
944 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
945 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
946 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
948 0xC8, 0x01, 0x00, 0x00, 0xE0, 0x46, 0x9A, 0x57,
949 0x71, 0x30, 0x00, 0xE0, 0x4C, 0x02, 0x53, 0xE5,
950 0xE0, 0x46, 0x9A, 0x57, 0x71, 0x30, 0x00, 0x00,
951 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
952 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
953 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
954 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
955 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
956 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
957 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
958 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
959 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
960 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
961 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
962 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
963 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
964 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
965 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
966 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
967 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
968 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
969 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
970 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
971 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
972 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
973 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
974 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
975 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
976 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
977 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
978 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
979 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
980 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
981 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
982 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
983 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
984 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
985 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
986 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
987 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
988 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
989 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
990 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
991 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
992 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
993 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
994 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
995 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
996 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
997 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
998 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
999 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1000 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1001 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1002 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1003 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1004 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1005 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1006 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1007 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1008 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1009 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1010 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1011 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1014 void rtl8812ae_set_fw_rsvdpagepkt(struct ieee80211_hw *hw, bool b_dl_finished)
1016 struct rtl_priv *rtlpriv = rtl_priv(hw);
1017 struct rtl_mac *mac = rtl_mac(rtl_priv(hw));
1018 struct sk_buff *skb = NULL;
1022 u8 u1RsvdPageLoc[5] = { 0 };
1023 bool b_dlok = false;
1029 /*---------------------------------------------------------
1031 ---------------------------------------------------------*/
1032 beacon = &reserved_page_packet_8812[BEACON_PG_8812 * 512];
1033 SET_80211_HDR_ADDRESS2(beacon, mac->mac_addr);
1034 SET_80211_HDR_ADDRESS3(beacon, mac->bssid);
1036 /*-------------------------------------------------------
1038 --------------------------------------------------------*/
1039 p_pspoll = &reserved_page_packet_8812[PSPOLL_PG_8812 * 512];
1040 SET_80211_PS_POLL_AID(p_pspoll, (mac->assoc_id | 0xc000));
1041 SET_80211_PS_POLL_BSSID(p_pspoll, mac->bssid);
1042 SET_80211_PS_POLL_TA(p_pspoll, mac->mac_addr);
1044 SET_H2CCMD_RSVDPAGE_LOC_PSPOLL(u1RsvdPageLoc, PSPOLL_PG_8812);
1046 /*--------------------------------------------------------
1048 ---------------------------------------------------------*/
1049 nullfunc = &reserved_page_packet_8812[NULL_PG_8812* 512];
1050 SET_80211_HDR_ADDRESS1(nullfunc, mac->bssid);
1051 SET_80211_HDR_ADDRESS2(nullfunc, mac->mac_addr);
1052 SET_80211_HDR_ADDRESS3(nullfunc, mac->bssid);
1054 SET_H2CCMD_RSVDPAGE_LOC_NULL_DATA(u1RsvdPageLoc, NULL_PG_8812);
1056 /*---------------------------------------------------------
1058 ----------------------------------------------------------*/
1059 p_probersp = &reserved_page_packet_8812[PROBERSP_PG_8812 * 512];
1060 SET_80211_HDR_ADDRESS1(p_probersp, mac->bssid);
1061 SET_80211_HDR_ADDRESS2(p_probersp, mac->mac_addr);
1062 SET_80211_HDR_ADDRESS3(p_probersp, mac->bssid);
1064 SET_H2CCMD_RSVDPAGE_LOC_PROBE_RSP(u1RsvdPageLoc, PROBERSP_PG_8812);
1066 totalpacketlen = TOTAL_RESERVED_PKT_LEN_8812;
1068 RT_PRINT_DATA(rtlpriv, COMP_CMD, DBG_LOUD,
1069 "rtl8821ae_set_fw_rsvdpagepkt(): HW_VAR_SET_TX_CMD: ALL \n",
1070 &reserved_page_packet_8812[0], totalpacketlen);
1071 RT_PRINT_DATA(rtlpriv, COMP_CMD, DBG_DMESG,
1072 "rtl8821ae_set_fw_rsvdpagepkt(): HW_VAR_SET_TX_CMD: ALL \n",
1076 skb = dev_alloc_skb(totalpacketlen);
1077 memcpy((u8 *) skb_put(skb, totalpacketlen),
1078 &reserved_page_packet_8812, totalpacketlen);
1080 rtstatus = _rtl8821ae_cmd_send_packet(hw, skb);
1086 RT_TRACE(COMP_POWER, DBG_LOUD,
1087 ("Set RSVD page location to Fw.\n"));
1088 RT_PRINT_DATA(rtlpriv, COMP_CMD, DBG_DMESG,
1091 rtl8821ae_fill_h2c_cmd(hw, H2C_8821AE_RSVDPAGE,
1092 sizeof(u1RsvdPageLoc), u1RsvdPageLoc);
1094 RT_TRACE(COMP_ERR, DBG_WARNING,
1095 ("Set RSVD page location to Fw FAIL!!!!!!.\n"));
1098 void rtl8821ae_set_fw_rsvdpagepkt(struct ieee80211_hw *hw, bool b_dl_finished)
1100 struct rtl_priv *rtlpriv = rtl_priv(hw);
1101 struct rtl_mac *mac = rtl_mac(rtl_priv(hw));
1102 struct sk_buff *skb = NULL;
1106 u8 u1RsvdPageLoc[5] = { 0 };
1107 bool b_dlok = false;
1113 /*---------------------------------------------------------
1115 ---------------------------------------------------------*/
1116 beacon = &reserved_page_packet_8821[BEACON_PG_8821 * 256];
1117 SET_80211_HDR_ADDRESS2(beacon, mac->mac_addr);
1118 SET_80211_HDR_ADDRESS3(beacon, mac->bssid);
1120 /*-------------------------------------------------------
1122 --------------------------------------------------------*/
1123 p_pspoll = &reserved_page_packet_8821[PSPOLL_PG_8821 * 256];
1124 SET_80211_PS_POLL_AID(p_pspoll, (mac->assoc_id | 0xc000));
1125 SET_80211_PS_POLL_BSSID(p_pspoll, mac->bssid);
1126 SET_80211_PS_POLL_TA(p_pspoll, mac->mac_addr);
1128 SET_H2CCMD_RSVDPAGE_LOC_PSPOLL(u1RsvdPageLoc, PSPOLL_PG_8821);
1130 /*--------------------------------------------------------
1132 ---------------------------------------------------------*/
1133 nullfunc = &reserved_page_packet_8821[NULL_PG_8821 * 256];
1134 SET_80211_HDR_ADDRESS1(nullfunc, mac->bssid);
1135 SET_80211_HDR_ADDRESS2(nullfunc, mac->mac_addr);
1136 SET_80211_HDR_ADDRESS3(nullfunc, mac->bssid);
1138 SET_H2CCMD_RSVDPAGE_LOC_NULL_DATA(u1RsvdPageLoc, NULL_PG_8821);
1140 /*---------------------------------------------------------
1142 ----------------------------------------------------------*/
1143 p_probersp = &reserved_page_packet_8821[PROBERSP_PG_8821 * 256];
1144 SET_80211_HDR_ADDRESS1(p_probersp, mac->bssid);
1145 SET_80211_HDR_ADDRESS2(p_probersp, mac->mac_addr);
1146 SET_80211_HDR_ADDRESS3(p_probersp, mac->bssid);
1148 SET_H2CCMD_RSVDPAGE_LOC_PROBE_RSP(u1RsvdPageLoc, PROBERSP_PG_8821);
1150 totalpacketlen = TOTAL_RESERVED_PKT_LEN_8821;
1152 RT_PRINT_DATA(rtlpriv, COMP_CMD, DBG_LOUD,
1153 "rtl8821ae_set_fw_rsvdpagepkt(): HW_VAR_SET_TX_CMD: ALL \n",
1154 &reserved_page_packet_8821[0], totalpacketlen);
1155 RT_PRINT_DATA(rtlpriv, COMP_CMD, DBG_DMESG,
1156 "rtl8821ae_set_fw_rsvdpagepkt(): HW_VAR_SET_TX_CMD: ALL \n",
1160 skb = dev_alloc_skb(totalpacketlen);
1161 memcpy((u8 *) skb_put(skb, totalpacketlen),
1162 &reserved_page_packet_8821, totalpacketlen);
1164 rtstatus = _rtl8821ae_cmd_send_packet(hw, skb);
1170 RT_TRACE(COMP_POWER, DBG_LOUD,
1171 ("Set RSVD page location to Fw.\n"));
1172 RT_PRINT_DATA(rtlpriv, COMP_CMD, DBG_DMESG,
1175 rtl8821ae_fill_h2c_cmd(hw, H2C_8821AE_RSVDPAGE,
1176 sizeof(u1RsvdPageLoc), u1RsvdPageLoc);
1178 RT_TRACE(COMP_ERR, DBG_WARNING,
1179 ("Set RSVD page location to Fw FAIL!!!!!!.\n"));
1182 /*Shoud check FW support p2p or not.*/
1183 void rtl8821ae_set_p2p_ctw_period_cmd(struct ieee80211_hw *hw, u8 ctwindow)
1185 u8 u1_ctwindow_period[1] ={ ctwindow};
1187 rtl8821ae_fill_h2c_cmd(hw, H2C_8821AE_P2P_PS_CTW_CMD, 1, u1_ctwindow_period);
1191 void rtl8821ae_set_p2p_ps_offload_cmd(struct ieee80211_hw *hw, u8 p2p_ps_state)
1193 struct rtl_priv *rtlpriv = rtl_priv(hw);
1194 struct rtl_ps_ctl *rtlps = rtl_psc(rtl_priv(hw));
1195 struct rtl_hal *rtlhal = rtl_hal(rtl_priv(hw));
1196 struct rtl_p2p_ps_info *p2pinfo = &(rtlps->p2p_ps_info);
1197 struct p2p_ps_offload_t *p2p_ps_offload = &rtlhal->p2p_ps_offload;
1200 u32 start_time, tsf_low;
1202 switch(p2p_ps_state)
1204 case P2P_PS_DISABLE:
1205 RT_TRACE(COMP_FW, DBG_LOUD,("P2P_PS_DISABLE \n"));
1206 memset(p2p_ps_offload, 0, 1);
1209 RT_TRACE(COMP_FW, DBG_LOUD,("P2P_PS_ENABLE \n"));
1210 /* update CTWindow value. */
1211 if( p2pinfo->ctwindow > 0 )
1213 p2p_ps_offload->CTWindow_En = 1;
1214 ctwindow = p2pinfo->ctwindow;
1215 rtl8821ae_set_p2p_ctw_period_cmd(hw, ctwindow);
1218 /* hw only support 2 set of NoA */
1219 for( i=0 ; i<p2pinfo->noa_num ; i++)
1221 /* To control the register setting for which NOA*/
1222 rtl_write_byte(rtlpriv, 0x5cf, (i << 4));
1224 p2p_ps_offload->NoA0_En = 1;
1226 p2p_ps_offload->NoA1_En = 1;
1228 /* config P2P NoA Descriptor Register */
1229 rtl_write_dword(rtlpriv, 0x5E0, p2pinfo->noa_duration[i]);
1230 rtl_write_dword(rtlpriv, 0x5E4, p2pinfo->noa_interval[i]);
1232 /*Get Current
\14TSF value */
1233 tsf_low = rtl_read_dword(rtlpriv, REG_TSFTR);
1235 start_time = p2pinfo->noa_start_time[i];
1236 if(p2pinfo->noa_count_type[i] != 1)
1238 while( start_time <= (tsf_low+(50*1024) ) ) {
1239 start_time += p2pinfo->noa_interval[i];
1240 if(p2pinfo->noa_count_type[i] != 255)
1241 p2pinfo->noa_count_type[i]--;
1244 rtl_write_dword(rtlpriv, 0x5E8, start_time);
1245 rtl_write_dword(rtlpriv, 0x5EC, p2pinfo->noa_count_type[i] );
1249 if( (p2pinfo->opp_ps == 1) || (p2pinfo->noa_num > 0) )
1251 /* rst p2p circuit */
1252 rtl_write_byte(rtlpriv, REG_DUAL_TSF_RST, BIT(4));
1254 p2p_ps_offload->Offload_En = 1;
1256 if(P2P_ROLE_GO == rtlpriv->mac80211.p2p)
1258 p2p_ps_offload->role= 1;
1259 p2p_ps_offload->AllStaSleep = 0;
1263 p2p_ps_offload->role= 0;
1266 p2p_ps_offload->discovery = 0;
1270 RT_TRACE(COMP_FW, DBG_LOUD,("P2P_PS_SCAN \n"));
1271 p2p_ps_offload->discovery = 1;
1273 case P2P_PS_SCAN_DONE:
1274 RT_TRACE(COMP_FW, DBG_LOUD,("P2P_PS_SCAN_DONE \n"));
1275 p2p_ps_offload->discovery = 0;
1276 p2pinfo->p2p_ps_state = P2P_PS_ENABLE;
1282 rtl8821ae_fill_h2c_cmd(hw, H2C_8821AE_P2P_PS_OFFLOAD, 1, (u8 *)p2p_ps_offload);
1286 void rtl8812ae_c2h_ra_report_handler(
1287 struct ieee80211_hw *hw,
1292 struct rtl_hal *rtlhal = rtl_hal(rtl_priv(hw));
1293 u8 rate = cmd_buf[0] & 0x3F;
1295 rtlhal->current_ra_rate= rtl8812ae_hw_rate_to_mrate(hw, rate);
1297 rtl8812ae_dm_update_init_rate(hw, rate);
1301 void _rtl8812ae_c2h_content_parsing(
1302 struct ieee80211_hw *hw,
1308 struct rtl_priv *rtlpriv = rtl_priv(hw);
1310 switch (c2h_cmd_id) {
1312 RT_TRACE(COMP_FW, DBG_LOUD,("[C2H], C2H_8812_DBG!!\n"));
1315 case C2H_8812_RA_RPT:
1316 rtl8812ae_c2h_ra_report_handler(hw, tmp_buf, c2h_cmd_len);
1325 void rtl8812ae_c2h_packet_handler(
1326 struct ieee80211_hw *hw,
1331 struct rtl_priv *rtlpriv = rtl_priv(hw);
1332 u8 c2h_cmd_id=0, c2h_cmd_seq=0, c2h_cmd_len=0;
1335 c2h_cmd_id = buffer[0];
1336 c2h_cmd_seq = buffer[1];
1337 c2h_cmd_len = length -2;
1338 tmp_buf = buffer + 2;
1340 RT_TRACE(COMP_FW, DBG_LOUD,
1341 ("[C2H packet], c2hCmdId=0x%x, c2hCmdSeq=0x%x, c2hCmdLen=%d\n",
1342 c2h_cmd_id, c2h_cmd_seq, c2h_cmd_len));
1344 RT_PRINT_DATA(rtlpriv, COMP_FW, DBG_LOUD,
1345 "[C2H packet], Content Hex:\n", tmp_buf, c2h_cmd_len);
1346 _rtl8812ae_c2h_content_parsing(hw, c2h_cmd_id, c2h_cmd_len, tmp_buf);