0001
0002
0003
0004 #include "../wifi.h"
0005 #include "../pci.h"
0006 #include "../base.h"
0007 #include "../core.h"
0008 #include "../efuse.h"
0009 #include "reg.h"
0010 #include "def.h"
0011 #include "fw.h"
0012 #include "dm.h"
0013
0014 static void _rtl8821ae_enable_fw_download(struct ieee80211_hw *hw, bool enable)
0015 {
0016 struct rtl_priv *rtlpriv = rtl_priv(hw);
0017 u8 tmp;
0018
0019 if (enable) {
0020 rtl_write_byte(rtlpriv, REG_MCUFWDL, 0x05);
0021
0022 tmp = rtl_read_byte(rtlpriv, REG_MCUFWDL + 2);
0023 rtl_write_byte(rtlpriv, REG_MCUFWDL + 2, tmp & 0xf7);
0024
0025 tmp = rtl_read_byte(rtlpriv, REG_MCUFWDL);
0026 } else {
0027 tmp = rtl_read_byte(rtlpriv, REG_MCUFWDL);
0028 rtl_write_byte(rtlpriv, REG_MCUFWDL, tmp & 0xfe);
0029 tmp = rtl_read_byte(rtlpriv, REG_MCUFWDL);
0030 }
0031 }
0032
0033 static void _rtl8821ae_write_fw(struct ieee80211_hw *hw,
0034 enum version_8821ae version,
0035 u8 *buffer, u32 size)
0036 {
0037 struct rtl_priv *rtlpriv = rtl_priv(hw);
0038 u8 *bufferptr = (u8 *)buffer;
0039 u32 pagenums, remainsize;
0040 u32 page, offset;
0041
0042 rtl_dbg(rtlpriv, COMP_FW, DBG_LOUD, "FW size is %d bytes,\n", size);
0043
0044 rtl_fill_dummy(bufferptr, &size);
0045
0046 pagenums = size / FW_8821AE_PAGE_SIZE;
0047 remainsize = size % FW_8821AE_PAGE_SIZE;
0048
0049 if (pagenums > 8)
0050 pr_err("Page numbers should not greater then 8\n");
0051
0052 for (page = 0; page < pagenums; page++) {
0053 offset = page * FW_8821AE_PAGE_SIZE;
0054 rtl_fw_page_write(hw, page, (bufferptr + offset),
0055 FW_8821AE_PAGE_SIZE);
0056 }
0057
0058 if (remainsize) {
0059 offset = pagenums * FW_8821AE_PAGE_SIZE;
0060 page = pagenums;
0061 rtl_fw_page_write(hw, page, (bufferptr + offset), remainsize);
0062 }
0063 }
0064
0065 static int _rtl8821ae_fw_free_to_go(struct ieee80211_hw *hw)
0066 {
0067 struct rtl_priv *rtlpriv = rtl_priv(hw);
0068 int err = -EIO;
0069 u32 counter = 0;
0070 u32 value32;
0071
0072 do {
0073 value32 = rtl_read_dword(rtlpriv, REG_MCUFWDL);
0074 } while ((counter++ < FW_8821AE_POLLING_TIMEOUT_COUNT) &&
0075 (!(value32 & FWDL_CHKSUM_RPT)));
0076
0077 if (counter >= FW_8821AE_POLLING_TIMEOUT_COUNT) {
0078 rtl_dbg(rtlpriv, COMP_ERR, DBG_LOUD,
0079 "chksum report fail! REG_MCUFWDL:0x%08x .\n",
0080 value32);
0081 goto exit;
0082 }
0083 value32 = rtl_read_dword(rtlpriv, REG_MCUFWDL);
0084 value32 |= MCUFWDL_RDY;
0085 value32 &= ~WINTINI_RDY;
0086 rtl_write_dword(rtlpriv, REG_MCUFWDL, value32);
0087
0088 rtl8821ae_firmware_selfreset(hw);
0089
0090 counter = 0;
0091 do {
0092 value32 = rtl_read_dword(rtlpriv, REG_MCUFWDL);
0093 if (value32 & WINTINI_RDY)
0094 return 0;
0095
0096 udelay(FW_8821AE_POLLING_DELAY);
0097 } while (counter++ < FW_8821AE_POLLING_TIMEOUT_COUNT);
0098
0099 pr_err("Polling FW ready fail!! REG_MCUFWDL:0x%08x .\n",
0100 value32);
0101
0102 exit:
0103 return err;
0104 }
0105
0106 static void _rtl8821ae_wait_for_h2c_cmd_finish(struct rtl_priv *rtlpriv)
0107 {
0108 u8 val;
0109 u16 count = 0;
0110
0111 do {
0112 val = rtl_read_byte(rtlpriv, REG_HMETFR);
0113 mdelay(1);
0114 count++;
0115 } while ((val & 0x0F) && (count < 1000));
0116 }
0117
0118 int rtl8821ae_download_fw(struct ieee80211_hw *hw, bool buse_wake_on_wlan_fw)
0119 {
0120 struct rtl_priv *rtlpriv = rtl_priv(hw);
0121 struct rtl_hal *rtlhal = rtl_hal(rtl_priv(hw));
0122 struct rtlwifi_firmware_header *pfwheader;
0123 u8 *pfwdata;
0124 u32 fwsize;
0125 int err;
0126 bool support_remote_wakeup;
0127 enum version_8821ae version = rtlhal->version;
0128
0129 rtlpriv->cfg->ops->get_hw_reg(hw, HAL_DEF_WOWLAN,
0130 (u8 *)(&support_remote_wakeup));
0131
0132 if (support_remote_wakeup)
0133 _rtl8821ae_wait_for_h2c_cmd_finish(rtlpriv);
0134
0135 if (buse_wake_on_wlan_fw) {
0136 if (!rtlhal->wowlan_firmware)
0137 return 1;
0138
0139 pfwheader =
0140 (struct rtlwifi_firmware_header *)rtlhal->wowlan_firmware;
0141 rtlhal->fw_version = le16_to_cpu(pfwheader->version);
0142 rtlhal->fw_subversion = pfwheader->subversion;
0143 pfwdata = (u8 *)rtlhal->wowlan_firmware;
0144 fwsize = rtlhal->wowlan_fwsize;
0145 } else {
0146 if (!rtlhal->pfirmware)
0147 return 1;
0148
0149 pfwheader =
0150 (struct rtlwifi_firmware_header *)rtlhal->pfirmware;
0151 rtlhal->fw_version = le16_to_cpu(pfwheader->version);
0152 rtlhal->fw_subversion = pfwheader->subversion;
0153 pfwdata = (u8 *)rtlhal->pfirmware;
0154 fwsize = rtlhal->fwsize;
0155 }
0156
0157 rtl_dbg(rtlpriv, COMP_FW, DBG_DMESG,
0158 "%s Firmware SIZE %d\n",
0159 buse_wake_on_wlan_fw ? "Wowlan" : "Normal", fwsize);
0160
0161 if (IS_FW_HEADER_EXIST_8812(pfwheader) ||
0162 IS_FW_HEADER_EXIST_8821(pfwheader)) {
0163 rtl_dbg(rtlpriv, COMP_FW, DBG_DMESG,
0164 "Firmware Version(%d), Signature(%#x)\n",
0165 pfwheader->version, pfwheader->signature);
0166
0167 pfwdata = pfwdata + sizeof(struct rtlwifi_firmware_header);
0168 fwsize = fwsize - sizeof(struct rtlwifi_firmware_header);
0169 }
0170
0171 if (rtlhal->mac_func_enable) {
0172 if (rtl_read_byte(rtlpriv, REG_MCUFWDL) & BIT(7)) {
0173 rtl_write_byte(rtlpriv, REG_MCUFWDL, 0x00);
0174 rtl8821ae_firmware_selfreset(hw);
0175 }
0176 }
0177 _rtl8821ae_enable_fw_download(hw, true);
0178 _rtl8821ae_write_fw(hw, version, pfwdata, fwsize);
0179 _rtl8821ae_enable_fw_download(hw, false);
0180
0181 err = _rtl8821ae_fw_free_to_go(hw);
0182 if (err) {
0183 rtl_dbg(rtlpriv, COMP_ERR, DBG_DMESG,
0184 "Firmware is not ready to run!\n");
0185 } else {
0186 rtl_dbg(rtlpriv, COMP_FW, DBG_LOUD,
0187 "Firmware is ready to run!\n");
0188 }
0189
0190 return 0;
0191 }
0192
0193 #if (USE_SPECIFIC_FW_TO_SUPPORT_WOWLAN == 1)
0194 void rtl8821ae_set_fw_related_for_wowlan(struct ieee80211_hw *hw,
0195 bool used_wowlan_fw)
0196 {
0197 struct rtl_priv *rtlpriv = rtl_priv(hw);
0198 struct rtl_hal *rtlhal = rtl_hal(rtl_priv(hw));
0199 struct rtl_ps_ctl *ppsc = rtl_psc(rtl_priv(hw));
0200
0201 if (rtl8821ae_download_fw(hw, used_wowlan_fw)) {
0202 rtl_dbg(rtlpriv, COMP_INIT, DBG_DMESG,
0203 "Re-Download Firmware failed!!\n");
0204 rtlhal->fw_ready = false;
0205 return;
0206 }
0207 rtl_dbg(rtlpriv, COMP_INIT, DBG_DMESG,
0208 "Re-Download Firmware Success !!\n");
0209 rtlhal->fw_ready = true;
0210
0211
0212 ppsc->fw_current_inpsmode = false;
0213 rtlhal->fw_ps_state = FW_PS_STATE_ALL_ON_8821AE;
0214 rtlhal->fw_clk_change_in_progress = false;
0215 rtlhal->allow_sw_to_change_hwclc = false;
0216 rtlhal->last_hmeboxnum = 0;
0217 }
0218 #endif
0219
0220 static bool _rtl8821ae_check_fw_read_last_h2c(struct ieee80211_hw *hw,
0221 u8 boxnum)
0222 {
0223 struct rtl_priv *rtlpriv = rtl_priv(hw);
0224 u8 val_hmetfr;
0225 bool result = false;
0226
0227 val_hmetfr = rtl_read_byte(rtlpriv, REG_HMETFR);
0228 if (((val_hmetfr >> boxnum) & BIT(0)) == 0)
0229 result = true;
0230 return result;
0231 }
0232
0233 static void _rtl8821ae_fill_h2c_command(struct ieee80211_hw *hw,
0234 u8 element_id, u32 cmd_len,
0235 u8 *cmdbuffer)
0236 {
0237 struct rtl_priv *rtlpriv = rtl_priv(hw);
0238 struct rtl_hal *rtlhal = rtl_hal(rtl_priv(hw));
0239 u8 boxnum = 0;
0240 u16 box_reg = 0, box_extreg = 0;
0241 u8 u1b_tmp = 0;
0242 bool isfw_read = false;
0243 u8 buf_index = 0;
0244 bool bwrite_sucess = false;
0245 u8 wait_h2c_limmit = 100;
0246
0247 u8 boxcontent[4], boxextcontent[4];
0248 u32 h2c_waitcounter = 0;
0249 unsigned long flag = 0;
0250 u8 idx = 0;
0251
0252 rtl_dbg(rtlpriv, COMP_CMD, DBG_LOUD, "come in\n");
0253
0254 while (true) {
0255 spin_lock_irqsave(&rtlpriv->locks.h2c_lock, flag);
0256 if (rtlhal->h2c_setinprogress) {
0257 rtl_dbg(rtlpriv, COMP_CMD, DBG_LOUD,
0258 "H2C set in progress! Wait to set..element_id(%d).\n",
0259 element_id);
0260
0261 while (rtlhal->h2c_setinprogress) {
0262 spin_unlock_irqrestore(&rtlpriv->locks.h2c_lock,
0263 flag);
0264 h2c_waitcounter++;
0265 rtl_dbg(rtlpriv, COMP_CMD, DBG_LOUD,
0266 "Wait 100 us (%d times)...\n",
0267 h2c_waitcounter);
0268 udelay(100);
0269
0270 if (h2c_waitcounter > 1000)
0271 return;
0272 spin_lock_irqsave(&rtlpriv->locks.h2c_lock,
0273 flag);
0274 }
0275 spin_unlock_irqrestore(&rtlpriv->locks.h2c_lock, flag);
0276 } else {
0277 rtlhal->h2c_setinprogress = true;
0278 spin_unlock_irqrestore(&rtlpriv->locks.h2c_lock, flag);
0279 break;
0280 }
0281 }
0282
0283 while (!bwrite_sucess) {
0284 boxnum = rtlhal->last_hmeboxnum;
0285 switch (boxnum) {
0286 case 0:
0287 box_reg = REG_HMEBOX_0;
0288 box_extreg = REG_HMEBOX_EXT_0;
0289 break;
0290 case 1:
0291 box_reg = REG_HMEBOX_1;
0292 box_extreg = REG_HMEBOX_EXT_1;
0293 break;
0294 case 2:
0295 box_reg = REG_HMEBOX_2;
0296 box_extreg = REG_HMEBOX_EXT_2;
0297 break;
0298 case 3:
0299 box_reg = REG_HMEBOX_3;
0300 box_extreg = REG_HMEBOX_EXT_3;
0301 break;
0302 default:
0303 rtl_dbg(rtlpriv, COMP_ERR, DBG_LOUD,
0304 "switch case %#x not processed\n", boxnum);
0305 break;
0306 }
0307
0308 isfw_read = false;
0309 u1b_tmp = rtl_read_byte(rtlpriv, REG_CR);
0310
0311 if (u1b_tmp != 0xEA) {
0312 isfw_read = true;
0313 } else {
0314 if (rtl_read_byte(rtlpriv, REG_TXDMA_STATUS) == 0xEA ||
0315 rtl_read_byte(rtlpriv, REG_TXPKT_EMPTY) == 0xEA)
0316 rtl_write_byte(rtlpriv, REG_SYS_CFG1 + 3, 0xFF);
0317 }
0318
0319 if (isfw_read) {
0320 wait_h2c_limmit = 100;
0321 isfw_read =
0322 _rtl8821ae_check_fw_read_last_h2c(hw, boxnum);
0323 while (!isfw_read) {
0324
0325 wait_h2c_limmit--;
0326 if (wait_h2c_limmit == 0) {
0327 rtl_dbg(rtlpriv, COMP_CMD, DBG_LOUD,
0328 "Waiting too long for FW read clear HMEBox(%d)!\n",
0329 boxnum);
0330 break;
0331 }
0332
0333 udelay(10);
0334
0335 isfw_read =
0336 _rtl8821ae_check_fw_read_last_h2c(hw, boxnum);
0337 u1b_tmp = rtl_read_byte(rtlpriv, 0x130);
0338 rtl_dbg(rtlpriv, COMP_CMD, DBG_LOUD,
0339 "Waiting for FW read clear HMEBox(%d)!!! 0x130 = %2x\n",
0340 boxnum, u1b_tmp);
0341 }
0342 }
0343
0344 if (!isfw_read) {
0345 rtl_dbg(rtlpriv, COMP_CMD, DBG_LOUD,
0346 "Write H2C register BOX[%d] fail!!!!! Fw do not read.\n",
0347 boxnum);
0348 break;
0349 }
0350
0351 memset(boxcontent, 0, sizeof(boxcontent));
0352 memset(boxextcontent, 0, sizeof(boxextcontent));
0353 boxcontent[0] = element_id;
0354 rtl_dbg(rtlpriv, COMP_CMD, DBG_LOUD,
0355 "Write element_id box_reg(%4x) = %2x\n",
0356 box_reg, element_id);
0357
0358 switch (cmd_len) {
0359 case 1:
0360 case 2:
0361 case 3:
0362
0363 memcpy((u8 *)(boxcontent) + 1,
0364 cmdbuffer + buf_index, cmd_len);
0365
0366 for (idx = 0; idx < 4; idx++) {
0367 rtl_write_byte(rtlpriv, box_reg + idx,
0368 boxcontent[idx]);
0369 }
0370 break;
0371 case 4:
0372 case 5:
0373 case 6:
0374 case 7:
0375
0376 memcpy((u8 *)(boxextcontent),
0377 cmdbuffer + buf_index+3, cmd_len-3);
0378 memcpy((u8 *)(boxcontent) + 1,
0379 cmdbuffer + buf_index, 3);
0380
0381 for (idx = 0; idx < 4; idx++) {
0382 rtl_write_byte(rtlpriv, box_extreg + idx,
0383 boxextcontent[idx]);
0384 }
0385
0386 for (idx = 0; idx < 4; idx++) {
0387 rtl_write_byte(rtlpriv, box_reg + idx,
0388 boxcontent[idx]);
0389 }
0390 break;
0391 default:
0392 rtl_dbg(rtlpriv, COMP_ERR, DBG_LOUD,
0393 "switch case %#x not processed\n", cmd_len);
0394 break;
0395 }
0396
0397 bwrite_sucess = true;
0398
0399 rtlhal->last_hmeboxnum = boxnum + 1;
0400 if (rtlhal->last_hmeboxnum == 4)
0401 rtlhal->last_hmeboxnum = 0;
0402
0403 rtl_dbg(rtlpriv, COMP_CMD, DBG_LOUD,
0404 "pHalData->last_hmeboxnum = %d\n",
0405 rtlhal->last_hmeboxnum);
0406 }
0407
0408 spin_lock_irqsave(&rtlpriv->locks.h2c_lock, flag);
0409 rtlhal->h2c_setinprogress = false;
0410 spin_unlock_irqrestore(&rtlpriv->locks.h2c_lock, flag);
0411
0412 rtl_dbg(rtlpriv, COMP_CMD, DBG_LOUD, "go out\n");
0413 }
0414
0415 void rtl8821ae_fill_h2c_cmd(struct ieee80211_hw *hw,
0416 u8 element_id, u32 cmd_len, u8 *cmdbuffer)
0417 {
0418 struct rtl_hal *rtlhal = rtl_hal(rtl_priv(hw));
0419 u32 tmp_cmdbuf[2];
0420
0421 if (!rtlhal->fw_ready) {
0422 WARN_ONCE(true,
0423 "rtl8821ae: error H2C cmd because of Fw download fail!!!\n");
0424 return;
0425 }
0426
0427 memset(tmp_cmdbuf, 0, 8);
0428 memcpy(tmp_cmdbuf, cmdbuffer, cmd_len);
0429 _rtl8821ae_fill_h2c_command(hw, element_id, cmd_len, (u8 *)&tmp_cmdbuf);
0430 }
0431
0432 void rtl8821ae_firmware_selfreset(struct ieee80211_hw *hw)
0433 {
0434 struct rtl_priv *rtlpriv = rtl_priv(hw);
0435 struct rtl_hal *rtlhal = rtl_hal(rtl_priv(hw));
0436 u8 u1b_tmp;
0437
0438 if (rtlhal->hw_type == HARDWARE_TYPE_RTL8812AE) {
0439 u1b_tmp = rtl_read_byte(rtlpriv, REG_RSV_CTRL+1);
0440 rtl_write_byte(rtlpriv, REG_RSV_CTRL+1, (u1b_tmp & (~BIT(3))));
0441 } else {
0442 u1b_tmp = rtl_read_byte(rtlpriv, REG_RSV_CTRL+1);
0443 rtl_write_byte(rtlpriv, REG_RSV_CTRL+1, (u1b_tmp & (~BIT(0))));
0444 }
0445
0446 u1b_tmp = rtl_read_byte(rtlpriv, REG_SYS_FUNC_EN+1);
0447 rtl_write_byte(rtlpriv, REG_SYS_FUNC_EN+1, (u1b_tmp & (~BIT(2))));
0448 udelay(50);
0449
0450 if (rtlhal->hw_type == HARDWARE_TYPE_RTL8812AE) {
0451 u1b_tmp = rtl_read_byte(rtlpriv, REG_RSV_CTRL+1);
0452 rtl_write_byte(rtlpriv, REG_RSV_CTRL+1, (u1b_tmp | BIT(3)));
0453 } else {
0454 u1b_tmp = rtl_read_byte(rtlpriv, REG_RSV_CTRL+1);
0455 rtl_write_byte(rtlpriv, REG_RSV_CTRL+1, (u1b_tmp | BIT(0)));
0456 }
0457
0458 u1b_tmp = rtl_read_byte(rtlpriv, REG_SYS_FUNC_EN+1);
0459 rtl_write_byte(rtlpriv, REG_SYS_FUNC_EN+1, (u1b_tmp | BIT(2)));
0460
0461 rtl_dbg(rtlpriv, COMP_INIT, DBG_LOUD,
0462 "_8051Reset8812ae(): 8051 reset success .\n");
0463 }
0464
0465 void rtl8821ae_set_fw_pwrmode_cmd(struct ieee80211_hw *hw, u8 mode)
0466 {
0467 struct rtl_priv *rtlpriv = rtl_priv(hw);
0468 u8 u1_h2c_set_pwrmode[H2C_8821AE_PWEMODE_LENGTH] = { 0 };
0469 struct rtl_ps_ctl *ppsc = rtl_psc(rtl_priv(hw));
0470 u8 rlbm, power_state = 0, byte5 = 0;
0471 u8 awake_intvl;
0472 struct rtl_btc_ops *btc_ops = rtlpriv->btcoexist.btc_ops;
0473 bool bt_ctrl_lps = (rtlpriv->cfg->ops->get_btc_status() ?
0474 btc_ops->btc_is_bt_ctrl_lps(rtlpriv) : false);
0475 bool bt_lps_on = (rtlpriv->cfg->ops->get_btc_status() ?
0476 btc_ops->btc_is_bt_lps_on(rtlpriv) : false);
0477
0478 if (bt_ctrl_lps)
0479 mode = (bt_lps_on ? FW_PS_MIN_MODE : FW_PS_ACTIVE_MODE);
0480
0481 rtl_dbg(rtlpriv, COMP_POWER, DBG_DMESG, "FW LPS mode = %d (coex:%d)\n",
0482 mode, bt_ctrl_lps);
0483
0484 switch (mode) {
0485 case FW_PS_MIN_MODE:
0486 rlbm = 0;
0487 awake_intvl = 2;
0488 break;
0489 case FW_PS_MAX_MODE:
0490 rlbm = 1;
0491 awake_intvl = 2;
0492 break;
0493 case FW_PS_DTIM_MODE:
0494 rlbm = 2;
0495 awake_intvl = ppsc->reg_max_lps_awakeintvl;
0496
0497
0498
0499 break;
0500 default:
0501 rlbm = 2;
0502 awake_intvl = 4;
0503 break;
0504 }
0505
0506 if (rtlpriv->mac80211.p2p) {
0507 awake_intvl = 2;
0508 rlbm = 1;
0509 }
0510
0511 if (mode == FW_PS_ACTIVE_MODE) {
0512 byte5 = 0x40;
0513 power_state = FW_PWR_STATE_ACTIVE;
0514 } else {
0515 if (bt_ctrl_lps) {
0516 byte5 = btc_ops->btc_get_lps_val(rtlpriv);
0517 power_state = btc_ops->btc_get_rpwm_val(rtlpriv);
0518
0519 if ((rlbm == 2) && (byte5 & BIT(4))) {
0520
0521
0522
0523 awake_intvl = 2;
0524 rlbm = 2;
0525 }
0526 } else {
0527 byte5 = 0x40;
0528 power_state = FW_PWR_STATE_RF_OFF;
0529 }
0530 }
0531
0532 SET_H2CCMD_PWRMODE_PARM_MODE(u1_h2c_set_pwrmode, ((mode) ? 1 : 0));
0533 SET_H2CCMD_PWRMODE_PARM_RLBM(u1_h2c_set_pwrmode, rlbm);
0534 SET_H2CCMD_PWRMODE_PARM_SMART_PS(u1_h2c_set_pwrmode,
0535 bt_ctrl_lps ? 0 :
0536 ((rtlpriv->mac80211.p2p) ?
0537 ppsc->smart_ps : 1));
0538 SET_H2CCMD_PWRMODE_PARM_AWAKE_INTERVAL(u1_h2c_set_pwrmode,
0539 awake_intvl);
0540 SET_H2CCMD_PWRMODE_PARM_ALL_QUEUE_UAPSD(u1_h2c_set_pwrmode, 0);
0541 SET_H2CCMD_PWRMODE_PARM_PWR_STATE(u1_h2c_set_pwrmode, power_state);
0542 SET_H2CCMD_PWRMODE_PARM_BYTE5(u1_h2c_set_pwrmode, byte5);
0543
0544 RT_PRINT_DATA(rtlpriv, COMP_CMD, DBG_DMESG,
0545 "rtl92c_set_fw_pwrmode(): u1_h2c_set_pwrmode\n",
0546 u1_h2c_set_pwrmode, H2C_8821AE_PWEMODE_LENGTH);
0547 if (rtlpriv->cfg->ops->get_btc_status())
0548 btc_ops->btc_record_pwr_mode(rtlpriv, u1_h2c_set_pwrmode,
0549 H2C_8821AE_PWEMODE_LENGTH);
0550 rtl8821ae_fill_h2c_cmd(hw, H2C_8821AE_SETPWRMODE,
0551 H2C_8821AE_PWEMODE_LENGTH,
0552 u1_h2c_set_pwrmode);
0553 }
0554
0555 void rtl8821ae_set_fw_media_status_rpt_cmd(struct ieee80211_hw *hw,
0556 u8 mstatus)
0557 {
0558 u8 parm[3] = { 0, 0, 0 };
0559
0560
0561
0562
0563
0564
0565
0566 SET_H2CCMD_MSRRPT_PARM_OPMODE(parm, mstatus);
0567 SET_H2CCMD_MSRRPT_PARM_MACID_IND(parm, 0);
0568
0569 rtl8821ae_fill_h2c_cmd(hw, H2C_8821AE_MSRRPT, 3, parm);
0570 }
0571
0572 void rtl8821ae_set_fw_ap_off_load_cmd(struct ieee80211_hw *hw,
0573 u8 ap_offload_enable)
0574 {
0575 struct rtl_mac *mac = rtl_mac(rtl_priv(hw));
0576 u8 u1_apoffload_parm[H2C_8821AE_AP_OFFLOAD_LENGTH] = { 0 };
0577
0578 SET_H2CCMD_AP_OFFLOAD_ON(u1_apoffload_parm, ap_offload_enable);
0579 SET_H2CCMD_AP_OFFLOAD_HIDDEN(u1_apoffload_parm, mac->hiddenssid);
0580 SET_H2CCMD_AP_OFFLOAD_DENYANY(u1_apoffload_parm, 0);
0581
0582 rtl8821ae_fill_h2c_cmd(hw, H2C_8821AE_AP_OFFLOAD,
0583 H2C_8821AE_AP_OFFLOAD_LENGTH,
0584 u1_apoffload_parm);
0585 }
0586
0587 void rtl8821ae_set_fw_wowlan_mode(struct ieee80211_hw *hw, bool func_en)
0588 {
0589 struct rtl_priv *rtlpriv = rtl_priv(hw);
0590 struct rtl_ps_ctl *ppsc = rtl_psc(rtl_priv(hw));
0591 u8 fw_wowlan_info[H2C_8821AE_WOWLAN_LENGTH] = {0};
0592
0593 rtl_dbg(rtlpriv, COMP_POWER, DBG_LOUD, "enable(%d)\n", func_en);
0594
0595 SET_8812_H2CCMD_WOWLAN_FUNC_ENABLE(fw_wowlan_info,
0596 (func_en ? true : false));
0597
0598 SET_8812_H2CCMD_WOWLAN_PATTERN_MATCH_ENABLE(fw_wowlan_info,
0599 ((ppsc->wo_wlan_mode & WAKE_ON_PATTERN_MATCH) ? 1 : 0));
0600 SET_8812_H2CCMD_WOWLAN_MAGIC_PKT_ENABLE(fw_wowlan_info,
0601 ((ppsc->wo_wlan_mode & WAKE_ON_MAGIC_PACKET) ? 1 : 0));
0602
0603 SET_8812_H2CCMD_WOWLAN_UNICAST_PKT_ENABLE(fw_wowlan_info, 0);
0604 SET_8812_H2CCMD_WOWLAN_ALL_PKT_DROP(fw_wowlan_info, false);
0605 SET_8812_H2CCMD_WOWLAN_GPIO_ACTIVE(fw_wowlan_info, 0);
0606 SET_8812_H2CCMD_WOWLAN_DISCONNECT_WAKE_UP(fw_wowlan_info, 1);
0607 SET_8812_H2CCMD_WOWLAN_GPIONUM(fw_wowlan_info, 0);
0608 SET_8812_H2CCMD_WOWLAN_GPIO_DURATION(fw_wowlan_info, 0);
0609
0610 RT_PRINT_DATA(rtlpriv, COMP_POWER, DBG_DMESG,
0611 "wowlan mode: cmd 0x80: Content:\n",
0612 fw_wowlan_info, H2C_8821AE_WOWLAN_LENGTH);
0613
0614 rtl8821ae_fill_h2c_cmd(hw, H2C_8821AE_WO_WLAN,
0615 H2C_8821AE_WOWLAN_LENGTH,
0616 fw_wowlan_info);
0617 }
0618
0619 void rtl8821ae_set_fw_remote_wake_ctrl_cmd(struct ieee80211_hw *hw,
0620 u8 enable)
0621 {
0622 struct rtl_priv *rtlpriv = rtl_priv(hw);
0623 struct rtl_ps_ctl *ppsc = rtl_psc(rtl_priv(hw));
0624 struct rtl_hal *rtlhal = rtl_hal(rtl_priv(hw));
0625 u8 remote_wake_ctrl_parm[H2C_8821AE_REMOTE_WAKE_CTRL_LEN] = {0};
0626
0627 rtl_dbg(rtlpriv, COMP_POWER, DBG_LOUD,
0628 "enable=%d, ARP offload=%d, GTK offload=%d\n",
0629 enable, ppsc->arp_offload_enable, ppsc->gtk_offload_enable);
0630
0631 SET_8812_H2CCMD_REMOTE_WAKECTRL_ENABLE(remote_wake_ctrl_parm, enable);
0632 SET_8812_H2CCMD_REMOTE_WAKE_CTRL_ARP_OFFLOAD_EN(remote_wake_ctrl_parm,
0633 (ppsc->arp_offload_enable ? 1 : 0));
0634 SET_8812_H2CCMD_REMOTE_WAKE_CTRL_GTK_OFFLOAD_EN(remote_wake_ctrl_parm,
0635 (ppsc->gtk_offload_enable ? 1 : 0));
0636 SET_8812_H2CCMD_REMOTE_WAKE_CTRL_REALWOWV2_EN(remote_wake_ctrl_parm,
0637 (rtlhal->real_wow_v2_enable ? 1 : 0));
0638
0639 RT_PRINT_DATA(rtlpriv, COMP_POWER, DBG_TRACE,
0640 "remote_wake_ctrl: cmd 0x4: Content:\n",
0641 remote_wake_ctrl_parm, H2C_8821AE_REMOTE_WAKE_CTRL_LEN);
0642
0643 rtl8821ae_fill_h2c_cmd(hw, H2C_8821AE_REMOTE_WAKE_CTRL,
0644 H2C_8821AE_REMOTE_WAKE_CTRL_LEN,
0645 remote_wake_ctrl_parm);
0646 }
0647
0648 void rtl8821ae_set_fw_keep_alive_cmd(struct ieee80211_hw *hw,
0649 bool func_en)
0650 {
0651 struct rtl_priv *rtlpriv = rtl_priv(hw);
0652 u8 keep_alive_info[H2C_8821AE_KEEP_ALIVE_CTRL_LENGTH] = {0};
0653
0654 rtl_dbg(rtlpriv, COMP_POWER, DBG_LOUD, "Enable(%d)\n", func_en);
0655
0656 SET_8812_H2CCMD_KEEP_ALIVE_ENABLE(keep_alive_info, func_en);
0657
0658 SET_8812_H2CCMD_KEEP_ALIVE_ACCPEPT_USER_DEFINED(keep_alive_info, 1);
0659 SET_8812_H2CCMD_KEEP_ALIVE_PERIOD(keep_alive_info, 10);
0660
0661 RT_PRINT_DATA(rtlpriv, COMP_POWER, DBG_TRACE,
0662 "keep alive: cmd 0x3: Content:\n",
0663 keep_alive_info, H2C_8821AE_KEEP_ALIVE_CTRL);
0664 rtl8821ae_fill_h2c_cmd(hw, H2C_8821AE_KEEP_ALIVE_CTRL,
0665 H2C_8821AE_KEEP_ALIVE_CTRL_LENGTH,
0666 keep_alive_info);
0667 }
0668
0669 void rtl8821ae_set_fw_disconnect_decision_ctrl_cmd(struct ieee80211_hw *hw,
0670 bool enabled)
0671 {
0672 struct rtl_priv *rtlpriv = rtl_priv(hw);
0673 u8 parm[H2C_8821AE_DISCONNECT_DECISION_CTRL_LEN] = {0};
0674
0675 SET_8812_H2CCMD_DISCONNECT_DECISION_CTRL_ENABLE(parm, enabled);
0676 SET_8812_H2CCMD_DISCONNECT_DECISION_CTRL_USER_SETTING(parm, 1);
0677 SET_8812_H2CCMD_DISCONNECT_DECISION_CTRL_CHECK_PERIOD(parm, 30);
0678 SET_8812_H2CCMD_DISCONNECT_DECISION_CTRL_TRYPKT_NUM(parm, 3);
0679
0680 RT_PRINT_DATA(rtlpriv, COMP_POWER, DBG_TRACE,
0681 "disconnect_decision_ctrl: cmd 0x4: Content:\n",
0682 parm, H2C_8821AE_DISCONNECT_DECISION_CTRL_LEN);
0683 rtl8821ae_fill_h2c_cmd(hw, H2C_8821AE_DISCONNECT_DECISION,
0684 H2C_8821AE_DISCONNECT_DECISION_CTRL_LEN, parm);
0685 }
0686
0687 void rtl8821ae_set_fw_global_info_cmd(struct ieee80211_hw *hw)
0688 {
0689 struct rtl_priv *rtlpriv = rtl_priv(hw);
0690 struct rtl_security *sec = &rtlpriv->sec;
0691 u8 remote_wakeup_sec_info[H2C_8821AE_AOAC_GLOBAL_INFO_LEN] = {0};
0692
0693 rtl_dbg(rtlpriv, COMP_POWER, DBG_LOUD,
0694 "PairwiseEncAlgorithm=%d, GroupEncAlgorithm=%d\n",
0695 sec->pairwise_enc_algorithm, sec->group_enc_algorithm);
0696
0697 SET_8812_H2CCMD_AOAC_GLOBAL_INFO_PAIRWISE_ENC_ALG(
0698 remote_wakeup_sec_info,
0699 sec->pairwise_enc_algorithm);
0700 SET_8812_H2CCMD_AOAC_GLOBAL_INFO_GROUP_ENC_ALG(remote_wakeup_sec_info,
0701 sec->group_enc_algorithm);
0702
0703 rtl8821ae_fill_h2c_cmd(hw, H2C_8821AE_AOAC_GLOBAL_INFO,
0704 H2C_8821AE_AOAC_GLOBAL_INFO_LEN,
0705 remote_wakeup_sec_info);
0706
0707 RT_PRINT_DATA(rtlpriv, COMP_CMD, DBG_TRACE,
0708 "rtl8821ae_set_global_info: cmd 0x82:\n",
0709 remote_wakeup_sec_info, H2C_8821AE_AOAC_GLOBAL_INFO_LEN);
0710 }
0711
0712 #define BEACON_PG 0
0713 #define PSPOLL_PG 1
0714 #define NULL_PG 2
0715 #define QOSNULL_PG 3
0716 #define BT_QOSNULL_PG 4
0717 #define ARPRESP_PG 5
0718 #define REMOTE_PG 6
0719 #define GTKEXT_PG 7
0720
0721 #define TOTAL_RESERVED_PKT_LEN_8812 4096
0722 #define TOTAL_RESERVED_PKT_LEN_8821 2048
0723
0724 static u8 reserved_page_packet_8821[TOTAL_RESERVED_PKT_LEN_8821] = {
0725
0726 0x80, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff,
0727 0xff, 0xff, 0x00, 0xe0, 0x4c, 0x02, 0xe2, 0x64,
0728 0x40, 0x16, 0x9f, 0x23, 0xd4, 0x46, 0x20, 0x00,
0729 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0730 0x64, 0x00, 0x20, 0x04, 0x00, 0x06, 0x64, 0x6c,
0731 0x69, 0x6e, 0x6b, 0x31, 0x01, 0x08, 0x82, 0x84,
0732 0x8b, 0x96, 0x0c, 0x18, 0x30, 0x48, 0x03, 0x01,
0733 0x0b, 0x06, 0x02, 0x00, 0x00, 0x2a, 0x01, 0x8b,
0734 0x32, 0x04, 0x12, 0x24, 0x60, 0x6c, 0x00, 0x00,
0735 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0736 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0737 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0738 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0739 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0740 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0741 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0742 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0743 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0744 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0745 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0746 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0747 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0748 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0749 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0750 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0751 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0752 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0753 0x10, 0x00, 0x28, 0x8c, 0x00, 0x12, 0x00, 0x00,
0754 0x00, 0x00, 0x00, 0x00, 0x00, 0x81, 0x00, 0x00,
0755 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0756 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0757 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0758
0759 0xa4, 0x10, 0x01, 0xc0, 0x40, 0x16, 0x9f, 0x23,
0760 0xd4, 0x46, 0x00, 0xe0, 0x4c, 0x02, 0xe2, 0x64,
0761 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0762 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0763 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0764 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0765 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0766 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0767 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0768 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0769 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0770 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0771 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0772 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0773 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0774 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0775 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0776 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0777 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0778 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0779 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0780 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0781 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0782 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0783 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0784 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0785 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0786 0x18, 0x00, 0x28, 0x8c, 0x00, 0x12, 0x00, 0x00,
0787 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00,
0788 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0789 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0790 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0791
0792 0x48, 0x01, 0x00, 0x00, 0x40, 0x16, 0x9f, 0x23,
0793 0xd4, 0x46, 0x00, 0xe0, 0x4c, 0x02, 0xe2, 0x64,
0794 0x40, 0x16, 0x9f, 0x23, 0xd4, 0x46, 0x00, 0x00,
0795 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0796 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0797 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0798 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0799 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0800 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0801 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0802 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0803 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0804 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0805 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0806 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0807 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0808 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0809 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0810 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0811 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0812 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0813 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0814 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0815 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0816 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0817 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0818 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0819 0x1A, 0x00, 0x28, 0x8C, 0x00, 0x12, 0x00, 0x00,
0820 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00,
0821 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0822 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0823 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0824
0825 0xC8, 0x01, 0x00, 0x00, 0x84, 0xC9, 0XB2, 0xA7,
0826 0XB3, 0x6E, 0x00, 0xE0, 0x4C, 0x02, 0x51, 0x02,
0827 0x84, 0xC9, 0XB2, 0xA7, 0XB3, 0x6E, 0x00, 0x00,
0828 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0829 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0830 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0831 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0832 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0833 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0834 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0835 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0836 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0837 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0838 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0839 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0840 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0841 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0842 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0843 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0844 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0845 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0846 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0847 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0848 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0849 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0850 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0851 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0852 0x1A, 0x00, 0x28, 0x8C, 0x00, 0x12, 0x00, 0x00,
0853 0x00, 0x00, 0x80, 0x00, 0x00, 0x01, 0x00, 0x00,
0854 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0855 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0856 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0857
0858 0xC8, 0x01, 0x00, 0x00, 0x84, 0xC9, 0XB2, 0xA7,
0859 0XB3, 0x6E, 0x00, 0xE0, 0x4C, 0x02, 0x51, 0x02,
0860 0x84, 0xC9, 0XB2, 0xA7, 0XB3, 0x6E, 0x00, 0x00,
0861 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0862 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0863 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0864 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0865 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0866 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0867 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0868 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0869 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0870 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0871 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0872 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0873 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0874 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0875 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0876 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0877 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0878 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0879 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0880 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0881 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0882 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0883 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0884 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0885 0x3C, 0x00, 0x28, 0x8C, 0x00, 0x12, 0x00, 0x00,
0886 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00,
0887 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0888 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0889 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0890
0891
0892 0x08, 0x01, 0x00, 0x00, 0x84, 0xC9, 0XB2, 0xA7,
0893 0XB3, 0x6E, 0x00, 0xE0, 0x4C, 0x02, 0x51, 0x02,
0894 0x84, 0xC9, 0XB2, 0xA7, 0XB3, 0x6E, 0x00, 0x00,
0895 0xAA, 0xAA, 0x03, 0x00, 0x00, 0x00, 0x08, 0x06,
0896 0x00, 0x01, 0x08, 0x00, 0x06, 0x04, 0x00, 0x02,
0897 0x00, 0xE0, 0x4C, 0x02, 0x51, 0x02, 0x00, 0x00,
0898 0x00, 0x00, 0x00, 0xE0, 0x4C, 0x02, 0x51, 0x02,
0899 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0900 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0901 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0902 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0903 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0904 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0905 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0906 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0907 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0908 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0909 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0910 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0911 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0912 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0913 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0914 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0915 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0916 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0917 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0918 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0919 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0920 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0921 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0922 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0923 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0924
0925 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0926 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0927 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0928 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0929 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0930 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0931 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0932 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0933 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0934 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0935 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0936 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0937 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0938 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0939 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0940 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0941 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0942 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0943 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0944 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0945 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0946 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0947 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0948 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0949 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0950 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0951 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0952 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0953 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0954 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0955 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0956 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0957
0958 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0959 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0960 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0961 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0962 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0963 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0964 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0965 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0966 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0967 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0968 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0969 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0970 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0971 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0972 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0973 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0974 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0975 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0976 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0977 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0978 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0979 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0980 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0981 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0982 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0983 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0984 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0985 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0986 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0987 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0988 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0989 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0990 };
0991
0992 static u8 reserved_page_packet_8812[TOTAL_RESERVED_PKT_LEN_8812] = {
0993
0994 0x80, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF,
0995 0xFF, 0xFF, 0x00, 0xE0, 0x4C, 0x02, 0x51, 0x02,
0996 0x84, 0xC9, 0XB2, 0xA7, 0XB3, 0x6E, 0x60, 0x00,
0997 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0998 0x64, 0x00, 0x20, 0x04, 0x00, 0x03, 0x32, 0x31,
0999 0x35, 0x01, 0x08, 0x82, 0x84, 0x8B, 0x96, 0x0C,
1000 0x12, 0x18, 0x24, 0x03, 0x01, 0x01, 0x06, 0x02,
1001 0x00, 0x00, 0x2A, 0x01, 0x02, 0x32, 0x04, 0x30,
1002 0x48, 0x60, 0x6C, 0x2D, 0x1A, 0xED, 0x09, 0x03,
1003 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1004 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1005 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3D,
1006 0x00, 0xDD, 0x07, 0x00, 0xE0, 0x4C, 0x02, 0x02,
1007 0x08, 0x04, 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,
1012 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1013 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1014 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1015 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1016 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1017 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1018 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1019 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1020 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1021 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1022 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1023 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1024 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1025 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1026 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1027 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1028 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1029 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1030 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1031 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1032 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1033 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1034 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1035 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1036 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1037 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1038 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1039 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1040 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1041 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1042 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1043 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1044 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1045 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1046 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1047 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1048 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1049 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1050 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1051 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1052 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1053 0x10, 0x00, 0x28, 0x8C, 0x00, 0x12, 0x00, 0x00,
1054 0x00, 0x00, 0x00, 0x00, 0x00, 0x81, 0x00, 0x00,
1055 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1056 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1057 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1058
1059 0xA4, 0x10, 0x09, 0xC0, 0x84, 0xC9, 0XB2, 0xA7,
1060 0XB3, 0x6E, 0x00, 0xE0, 0x4C, 0x02, 0x51, 0x02,
1061 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1062 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1063 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1064 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1065 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1066 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1067 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1068 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1069 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1070 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1071 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1072 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1073 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1074 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1075 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1076 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1077 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1078 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1079 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1080 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1081 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1082 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1083 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1084 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1085 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1086 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1087 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1088 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1089 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1090 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1091 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1092 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1093 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1094 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1095 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1096 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1097 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1098 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1099 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1100 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1101 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1102 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1103 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1104 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1105 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1106 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1107 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1108 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1109 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1110 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1111 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1112 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1113 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1114 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1115 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1116 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1117 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1118 0x18, 0x00, 0x28, 0x8C, 0x00, 0x12, 0x00, 0x00,
1119 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00,
1120 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1121 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1122 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1123
1124 0x48, 0x01, 0x00, 0x00, 0x84, 0xC9, 0XB2, 0xA7,
1125 0XB3, 0x6E, 0x00, 0xE0, 0x4C, 0x02, 0x51, 0x02,
1126 0x84, 0xC9, 0XB2, 0xA7, 0XB3, 0x6E, 0x00, 0x00,
1127 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1128 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1129 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1130 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1131 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1132 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1133 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1134 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1135 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1136 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1137 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1138 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1139 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1140 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1141 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1142 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1143 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1144 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1145 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1146 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1147 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1148 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1149 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1150 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1151 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1152 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1153 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1154 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1155 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1156 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1157 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1158 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1159 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1160 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1161 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1162 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1163 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1164 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1165 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1166 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1167 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1168 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1169 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1170 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1171 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1172 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1173 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1174 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1175 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1176 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1177 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1178 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1179 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1180 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1181 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1182 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1183 0x1A, 0x00, 0x28, 0x8C, 0x00, 0x12, 0x00, 0x00,
1184 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00,
1185 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1186 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1187 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1188
1189 0xC8, 0x01, 0x00, 0x00, 0x84, 0xC9, 0XB2, 0xA7,
1190 0XB3, 0x6E, 0x00, 0xE0, 0x4C, 0x02, 0x51, 0x02,
1191 0x84, 0xC9, 0XB2, 0xA7, 0XB3, 0x6E, 0x00, 0x00,
1192 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1193 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1194 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1195 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1196 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1197 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1198 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1199 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1200 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1201 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1202 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1203 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1204 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1205 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1206 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1207 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1208 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1209 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1210 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1211 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1212 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1213 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1214 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1215 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1216 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1217 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1218 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1219 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1220 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1221 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1222 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1223 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1224 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1225 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1226 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1227 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1228 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1229 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1230 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1231 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1232 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1233 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1234 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1235 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1236 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1237 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1238 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1239 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1240 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1241 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1242 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1243 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1244 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1245 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1246 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1247 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1248 0x1A, 0x00, 0x28, 0x8C, 0x00, 0x12, 0x00, 0x00,
1249 0x00, 0x00, 0x80, 0x00, 0x00, 0x01, 0x00, 0x00,
1250 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1251 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1252 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1253
1254 0xC8, 0x01, 0x00, 0x00, 0x84, 0xC9, 0XB2, 0xA7,
1255 0XB3, 0x6E, 0x00, 0xE0, 0x4C, 0x02, 0x51, 0x02,
1256 0x84, 0xC9, 0XB2, 0xA7, 0XB3, 0x6E, 0x00, 0x00,
1257 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1258 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1259 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1260 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1261 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1262 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1263 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1264 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1265 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1266 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1267 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1268 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1269 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1270 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1271 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1272 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1273 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1274 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1275 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1276 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1277 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1278 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1279 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1280 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1281 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1282 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1283 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1284 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1285 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1286 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1287 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1288 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1289 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1290 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1291 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1292 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1293 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1294 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1295 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1296 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1297 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1298 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1299 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1300 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1301 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1302 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1303 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1304 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1305 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1306 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1307 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1308 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1309 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1310 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1311 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1312 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1313 0x3C, 0x00, 0x28, 0x8C, 0x00, 0x12, 0x00, 0x00,
1314 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00,
1315 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1316 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1317 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1318
1319
1320 0x08, 0x01, 0x00, 0x00, 0x84, 0xC9, 0XB2, 0xA7,
1321 0XB3, 0x6E, 0x00, 0xE0, 0x4C, 0x02, 0x51, 0x02,
1322 0x84, 0xC9, 0XB2, 0xA7, 0XB3, 0x6E, 0x00, 0x00,
1323 0xAA, 0xAA, 0x03, 0x00, 0x00, 0x00, 0x08, 0x06,
1324 0x00, 0x01, 0x08, 0x00, 0x06, 0x04, 0x00, 0x02,
1325 0x00, 0xE0, 0x4C, 0x02, 0x51, 0x02, 0x00, 0x00,
1326 0x00, 0x00, 0x00, 0xE0, 0x4C, 0x02, 0x51, 0x02,
1327 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1328 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1329 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1330 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1331 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1332 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1333 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1334 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1335 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1336 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1337 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1338 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1339 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1340 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1341 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1342 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1343 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1344 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1345 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1346 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1347 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1348 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1349 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1350 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1351 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1352 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1353 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1354 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1355 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1356 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1357 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1358 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1359 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1360 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1361 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1362 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1363 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1364 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1365 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1366 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1367 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1368 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1369 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1370 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1371 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1372 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1373 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1374 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1375 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1376 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1377 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1378 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1379 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1380 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1381 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1382 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1383 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1384
1385 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1386 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1387 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1388 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1389 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1390 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1391 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1392 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1393 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1394 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1395 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1396 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1397 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1398 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1399 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1400 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1401 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1402 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1403 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1404 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1405 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1406 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1407 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1408 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1409 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1410 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1411 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1412 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1413 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1414 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1415 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1416 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1417 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1418 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1419 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1420 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1421 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1422 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1423 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1424 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1425 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1426 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1427 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1428 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1429 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1430 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1431 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1432 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1433 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1434 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1435 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1436 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1437 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1438 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1439 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1440 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1441 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1442 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1443 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1444 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1445 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1446 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1447 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1448 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1449
1450 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1451 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1452 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1453 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1454 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1455 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1456 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1457 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1458 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1459 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1460 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1461 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1462 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1463 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1464 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1465 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1466 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1467 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1468 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1469 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1470 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1471 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1472 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1473 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1474 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1475 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1476 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1477 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1478 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1479 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1480 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1481 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1482 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1483 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1484 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1485 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1486 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1487 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1488 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1489 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1490 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1491 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1492 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1493 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1494 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1495 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1496 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1497 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1498 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1499 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1500 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1501 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1502 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1503 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1504 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1505 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1506 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1507 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1508 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1509 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1510 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1511 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1512 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1513 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1514 };
1515
1516 void rtl8812ae_set_fw_rsvdpagepkt(struct ieee80211_hw *hw,
1517 bool b_dl_finished, bool dl_whole_packets)
1518 {
1519 struct rtl_priv *rtlpriv = rtl_priv(hw);
1520 struct rtl_mac *mac = rtl_mac(rtlpriv);
1521 struct sk_buff *skb = NULL;
1522 u32 totalpacketlen;
1523 bool rtstatus;
1524 u8 u1rsvdpageloc[5] = { 0 };
1525 u8 u1rsvdpageloc2[7] = { 0 };
1526 bool b_dlok = false;
1527 u8 *beacon;
1528 u8 *p_pspoll;
1529 u8 *nullfunc;
1530 u8 *qosnull;
1531 u8 *btqosnull;
1532 u8 *arpresp;
1533
1534
1535
1536
1537
1538 beacon = &reserved_page_packet_8812[BEACON_PG * 512];
1539 SET_80211_HDR_ADDRESS2(beacon, mac->mac_addr);
1540 SET_80211_HDR_ADDRESS3(beacon, mac->bssid);
1541
1542 if (b_dl_finished) {
1543 totalpacketlen = 512 - 40;
1544 goto out;
1545 }
1546
1547
1548
1549
1550 p_pspoll = &reserved_page_packet_8812[PSPOLL_PG * 512];
1551 SET_80211_PS_POLL_AID(p_pspoll, (mac->assoc_id | 0xc000));
1552 SET_80211_PS_POLL_BSSID(p_pspoll, mac->bssid);
1553 SET_80211_PS_POLL_TA(p_pspoll, mac->mac_addr);
1554
1555 SET_H2CCMD_RSVDPAGE_LOC_PSPOLL(u1rsvdpageloc, PSPOLL_PG);
1556
1557
1558
1559
1560
1561 nullfunc = &reserved_page_packet_8812[NULL_PG * 512];
1562 SET_80211_HDR_ADDRESS1(nullfunc, mac->bssid);
1563 SET_80211_HDR_ADDRESS2(nullfunc, mac->mac_addr);
1564 SET_80211_HDR_ADDRESS3(nullfunc, mac->bssid);
1565
1566 SET_H2CCMD_RSVDPAGE_LOC_NULL_DATA(u1rsvdpageloc, NULL_PG);
1567
1568
1569
1570
1571
1572 qosnull = &reserved_page_packet_8812[QOSNULL_PG * 512];
1573 SET_80211_HDR_ADDRESS1(qosnull, mac->bssid);
1574 SET_80211_HDR_ADDRESS2(qosnull, mac->mac_addr);
1575 SET_80211_HDR_ADDRESS3(qosnull, mac->bssid);
1576
1577 SET_H2CCMD_RSVDPAGE_LOC_QOS_NULL_DATA(u1rsvdpageloc, QOSNULL_PG);
1578
1579
1580
1581
1582
1583 btqosnull = &reserved_page_packet_8812[BT_QOSNULL_PG * 512];
1584 SET_80211_HDR_ADDRESS1(btqosnull, mac->bssid);
1585 SET_80211_HDR_ADDRESS2(btqosnull, mac->mac_addr);
1586 SET_80211_HDR_ADDRESS3(btqosnull, mac->bssid);
1587
1588 SET_H2CCMD_RSVDPAGE_LOC_BT_QOS_NULL_DATA(u1rsvdpageloc, BT_QOSNULL_PG);
1589
1590 if (!dl_whole_packets) {
1591 totalpacketlen = 512 * (BT_QOSNULL_PG + 1) - 40;
1592 goto out;
1593 }
1594
1595
1596
1597
1598 arpresp = &reserved_page_packet_8812[ARPRESP_PG * 512];
1599 SET_80211_HDR_ADDRESS1(arpresp, mac->bssid);
1600 SET_80211_HDR_ADDRESS2(arpresp, mac->mac_addr);
1601 SET_80211_HDR_ADDRESS3(arpresp, mac->bssid);
1602
1603 SET_8821AE_H2CCMD_AOAC_RSVDPAGE_LOC_ARP_RSP(u1rsvdpageloc2, ARPRESP_PG);
1604
1605
1606
1607
1608
1609 SET_8821AE_H2CCMD_AOAC_RSVDPAGE_LOC_REMOTE_WAKE_CTRL_INFO(u1rsvdpageloc2,
1610 REMOTE_PG);
1611
1612
1613
1614
1615
1616 SET_8821AE_H2CCMD_AOAC_RSVDPAGE_LOC_GTK_EXT_MEM(u1rsvdpageloc2, GTKEXT_PG);
1617
1618 totalpacketlen = TOTAL_RESERVED_PKT_LEN_8812 - 40;
1619
1620 out:
1621 RT_PRINT_DATA(rtlpriv, COMP_CMD, DBG_LOUD,
1622 "rtl8812ae_set_fw_rsvdpagepkt(): packet data\n",
1623 &reserved_page_packet_8812[0], totalpacketlen);
1624
1625 skb = dev_alloc_skb(totalpacketlen);
1626 if (!skb)
1627 return;
1628 skb_put_data(skb, &reserved_page_packet_8812, totalpacketlen);
1629
1630 rtstatus = rtl_cmd_send_packet(hw, skb);
1631
1632 if (rtstatus)
1633 b_dlok = true;
1634
1635 if (!b_dl_finished && b_dlok) {
1636 RT_PRINT_DATA(rtlpriv, COMP_CMD, DBG_DMESG,
1637 "H2C_RSVDPAGE:\n", u1rsvdpageloc, 5);
1638 rtl8821ae_fill_h2c_cmd(hw, H2C_8821AE_RSVDPAGE,
1639 sizeof(u1rsvdpageloc), u1rsvdpageloc);
1640 if (dl_whole_packets) {
1641 RT_PRINT_DATA(rtlpriv, COMP_CMD, DBG_DMESG,
1642 "wowlan H2C_RSVDPAGE:\n", u1rsvdpageloc2, 7);
1643 rtl8821ae_fill_h2c_cmd(hw, H2C_8821AE_AOAC_RSVDPAGE,
1644 sizeof(u1rsvdpageloc2), u1rsvdpageloc2);
1645 }
1646 }
1647
1648 if (!b_dlok)
1649 rtl_dbg(rtlpriv, COMP_ERR, DBG_WARNING,
1650 "Set RSVD page location to Fw FAIL!!!!!!.\n");
1651 }
1652
1653 void rtl8821ae_set_fw_rsvdpagepkt(struct ieee80211_hw *hw,
1654 bool b_dl_finished, bool dl_whole_packets)
1655 {
1656 struct rtl_priv *rtlpriv = rtl_priv(hw);
1657 struct rtl_mac *mac = rtl_mac(rtl_priv(hw));
1658 struct sk_buff *skb = NULL;
1659 u32 totalpacketlen;
1660 bool rtstatus;
1661 u8 u1rsvdpageloc[5] = { 0 };
1662 u8 u1rsvdpageloc2[7] = { 0 };
1663 bool b_dlok = false;
1664 u8 *beacon;
1665 u8 *p_pspoll;
1666 u8 *nullfunc;
1667 u8 *qosnull;
1668 u8 *btqosnull;
1669 u8 *arpresp;
1670
1671
1672
1673
1674
1675 beacon = &reserved_page_packet_8821[BEACON_PG * 256];
1676 SET_80211_HDR_ADDRESS2(beacon, mac->mac_addr);
1677 SET_80211_HDR_ADDRESS3(beacon, mac->bssid);
1678
1679 if (b_dl_finished) {
1680 totalpacketlen = 256 - 40;
1681 goto out;
1682 }
1683
1684
1685
1686
1687 p_pspoll = &reserved_page_packet_8821[PSPOLL_PG * 256];
1688 SET_80211_PS_POLL_AID(p_pspoll, (mac->assoc_id | 0xc000));
1689 SET_80211_PS_POLL_BSSID(p_pspoll, mac->bssid);
1690 SET_80211_PS_POLL_TA(p_pspoll, mac->mac_addr);
1691
1692 SET_H2CCMD_RSVDPAGE_LOC_PSPOLL(u1rsvdpageloc, PSPOLL_PG);
1693
1694
1695
1696
1697
1698 nullfunc = &reserved_page_packet_8821[NULL_PG * 256];
1699 SET_80211_HDR_ADDRESS1(nullfunc, mac->bssid);
1700 SET_80211_HDR_ADDRESS2(nullfunc, mac->mac_addr);
1701 SET_80211_HDR_ADDRESS3(nullfunc, mac->bssid);
1702
1703 SET_H2CCMD_RSVDPAGE_LOC_NULL_DATA(u1rsvdpageloc, NULL_PG);
1704
1705
1706
1707
1708
1709 qosnull = &reserved_page_packet_8821[QOSNULL_PG * 256];
1710 SET_80211_HDR_ADDRESS1(qosnull, mac->bssid);
1711 SET_80211_HDR_ADDRESS2(qosnull, mac->mac_addr);
1712 SET_80211_HDR_ADDRESS3(qosnull, mac->bssid);
1713
1714 SET_H2CCMD_RSVDPAGE_LOC_QOS_NULL_DATA(u1rsvdpageloc, QOSNULL_PG);
1715
1716
1717
1718
1719
1720 btqosnull = &reserved_page_packet_8821[BT_QOSNULL_PG * 256];
1721 SET_80211_HDR_ADDRESS1(btqosnull, mac->bssid);
1722 SET_80211_HDR_ADDRESS2(btqosnull, mac->mac_addr);
1723 SET_80211_HDR_ADDRESS3(btqosnull, mac->bssid);
1724
1725 SET_H2CCMD_RSVDPAGE_LOC_BT_QOS_NULL_DATA(u1rsvdpageloc, BT_QOSNULL_PG);
1726
1727 if (!dl_whole_packets) {
1728 totalpacketlen = 256 * (BT_QOSNULL_PG + 1) - 40;
1729 goto out;
1730 }
1731
1732
1733
1734
1735 arpresp = &reserved_page_packet_8821[ARPRESP_PG * 256];
1736 SET_80211_HDR_ADDRESS1(arpresp, mac->bssid);
1737 SET_80211_HDR_ADDRESS2(arpresp, mac->mac_addr);
1738 SET_80211_HDR_ADDRESS3(arpresp, mac->bssid);
1739
1740 SET_8821AE_H2CCMD_AOAC_RSVDPAGE_LOC_ARP_RSP(u1rsvdpageloc2, ARPRESP_PG);
1741
1742
1743
1744
1745
1746 SET_8821AE_H2CCMD_AOAC_RSVDPAGE_LOC_REMOTE_WAKE_CTRL_INFO(u1rsvdpageloc2,
1747 REMOTE_PG);
1748
1749
1750
1751
1752
1753 SET_8821AE_H2CCMD_AOAC_RSVDPAGE_LOC_GTK_EXT_MEM(u1rsvdpageloc2, GTKEXT_PG);
1754
1755 totalpacketlen = TOTAL_RESERVED_PKT_LEN_8821 - 40;
1756
1757 out:
1758
1759 RT_PRINT_DATA(rtlpriv, COMP_CMD, DBG_LOUD,
1760 "rtl8821ae_set_fw_rsvdpagepkt(): packet data\n",
1761 &reserved_page_packet_8821[0], totalpacketlen);
1762
1763 skb = dev_alloc_skb(totalpacketlen);
1764 if (!skb)
1765 return;
1766 skb_put_data(skb, &reserved_page_packet_8821, totalpacketlen);
1767
1768 rtstatus = rtl_cmd_send_packet(hw, skb);
1769
1770 if (rtstatus)
1771 b_dlok = true;
1772
1773 if (!b_dl_finished && b_dlok) {
1774 rtl_dbg(rtlpriv, COMP_POWER, DBG_LOUD,
1775 "Set RSVD page location to Fw.\n");
1776 RT_PRINT_DATA(rtlpriv, COMP_CMD, DBG_DMESG,
1777 "H2C_RSVDPAGE:\n", u1rsvdpageloc, 5);
1778 rtl8821ae_fill_h2c_cmd(hw, H2C_8821AE_RSVDPAGE,
1779 sizeof(u1rsvdpageloc), u1rsvdpageloc);
1780 if (dl_whole_packets) {
1781 RT_PRINT_DATA(rtlpriv, COMP_CMD, DBG_DMESG,
1782 "wowlan H2C_RSVDPAGE:\n",
1783 u1rsvdpageloc2, 7);
1784 rtl8821ae_fill_h2c_cmd(hw, H2C_8821AE_AOAC_RSVDPAGE,
1785 sizeof(u1rsvdpageloc2),
1786 u1rsvdpageloc2);
1787 }
1788 }
1789
1790 if (!b_dlok) {
1791 rtl_dbg(rtlpriv, COMP_ERR, DBG_WARNING,
1792 "Set RSVD page location to Fw FAIL!!!!!!.\n");
1793 }
1794 }
1795
1796
1797 static void rtl8821ae_set_p2p_ctw_period_cmd(struct ieee80211_hw *hw, u8 ctwindow)
1798 {
1799 u8 u1_ctwindow_period[1] = { ctwindow};
1800
1801 rtl8821ae_fill_h2c_cmd(hw, H2C_8821AE_P2P_PS_CTW_CMD, 1,
1802 u1_ctwindow_period);
1803 }
1804
1805 void rtl8821ae_set_p2p_ps_offload_cmd(struct ieee80211_hw *hw, u8 p2p_ps_state)
1806 {
1807 struct rtl_priv *rtlpriv = rtl_priv(hw);
1808 struct rtl_ps_ctl *rtlps = rtl_psc(rtl_priv(hw));
1809 struct rtl_hal *rtlhal = rtl_hal(rtl_priv(hw));
1810 struct rtl_p2p_ps_info *p2pinfo = &rtlps->p2p_ps_info;
1811 struct p2p_ps_offload_t *p2p_ps_offload = &rtlhal->p2p_ps_offload;
1812 u8 i;
1813 u16 ctwindow;
1814 u32 start_time, tsf_low;
1815
1816 switch (p2p_ps_state) {
1817 case P2P_PS_DISABLE:
1818 rtl_dbg(rtlpriv, COMP_FW, DBG_LOUD, "P2P_PS_DISABLE\n");
1819 memset(p2p_ps_offload, 0, sizeof(*p2p_ps_offload));
1820 break;
1821 case P2P_PS_ENABLE:
1822 rtl_dbg(rtlpriv, COMP_FW, DBG_LOUD, "P2P_PS_ENABLE\n");
1823
1824 if (p2pinfo->ctwindow > 0) {
1825 p2p_ps_offload->ctwindow_en = 1;
1826 ctwindow = p2pinfo->ctwindow;
1827 rtl8821ae_set_p2p_ctw_period_cmd(hw, ctwindow);
1828 }
1829
1830
1831 for (i = 0 ; i < p2pinfo->noa_num ; i++) {
1832
1833 rtl_write_byte(rtlpriv, 0x5cf, (i << 4));
1834 if (i == 0)
1835 p2p_ps_offload->noa0_en = 1;
1836 else
1837 p2p_ps_offload->noa1_en = 1;
1838
1839
1840 rtl_write_dword(rtlpriv, 0x5E0, p2pinfo->noa_duration[i]);
1841 rtl_write_dword(rtlpriv, 0x5E4, p2pinfo->noa_interval[i]);
1842
1843
1844 tsf_low = rtl_read_dword(rtlpriv, REG_TSFTR);
1845
1846 start_time = p2pinfo->noa_start_time[i];
1847 if (p2pinfo->noa_count_type[i] != 1) {
1848 while (start_time <= (tsf_low+(50*1024))) {
1849 start_time += p2pinfo->noa_interval[i];
1850 if (p2pinfo->noa_count_type[i] != 255)
1851 p2pinfo->noa_count_type[i]--;
1852 }
1853 }
1854 rtl_write_dword(rtlpriv, 0x5E8, start_time);
1855 rtl_write_dword(rtlpriv, 0x5EC,
1856 p2pinfo->noa_count_type[i]);
1857 }
1858
1859 if ((p2pinfo->opp_ps == 1) || (p2pinfo->noa_num > 0)) {
1860
1861 rtl_write_byte(rtlpriv, REG_DUAL_TSF_RST, BIT(4));
1862
1863 p2p_ps_offload->offload_en = 1;
1864
1865 if (P2P_ROLE_GO == rtlpriv->mac80211.p2p) {
1866 p2p_ps_offload->role = 1;
1867 p2p_ps_offload->allstasleep = 0;
1868 } else {
1869 p2p_ps_offload->role = 0;
1870 }
1871
1872 p2p_ps_offload->discovery = 0;
1873 }
1874 break;
1875 case P2P_PS_SCAN:
1876 rtl_dbg(rtlpriv, COMP_FW, DBG_LOUD, "P2P_PS_SCAN\n");
1877 p2p_ps_offload->discovery = 1;
1878 break;
1879 case P2P_PS_SCAN_DONE:
1880 rtl_dbg(rtlpriv, COMP_FW, DBG_LOUD, "P2P_PS_SCAN_DONE\n");
1881 p2p_ps_offload->discovery = 0;
1882 p2pinfo->p2p_ps_state = P2P_PS_ENABLE;
1883 break;
1884 default:
1885 break;
1886 }
1887
1888 rtl8821ae_fill_h2c_cmd(hw,
1889 H2C_8821AE_P2P_PS_OFFLOAD, 1, (u8 *)p2p_ps_offload);
1890 }
1891
1892 void rtl8821ae_c2h_ra_report_handler(struct ieee80211_hw *hw,
1893 u8 *cmd_buf, u8 cmd_len)
1894 {
1895 struct rtl_hal *rtlhal = rtl_hal(rtl_priv(hw));
1896 u8 rate = cmd_buf[0] & 0x3F;
1897
1898 rtlhal->current_ra_rate = rtl8821ae_hw_rate_to_mrate(hw, rate);
1899
1900 rtl8821ae_dm_update_init_rate(hw, rate);
1901 }