Lines Matching +full:- +full:0
1 // SPDX-License-Identifier: GPL-2.0
2 /* Copyright(c) 2009-2014 Realtek Corporation.*/
20 rtl_write_byte(rtlpriv, REG_MCUFWDL, 0x05); in _rtl92ee_enable_fw_download()
23 rtl_write_byte(rtlpriv, REG_MCUFWDL + 2, tmp & 0xf7); in _rtl92ee_enable_fw_download()
26 rtl_write_byte(rtlpriv, REG_MCUFWDL, tmp & 0xfe); in _rtl92ee_enable_fw_download()
49 for (page = 0; page < pagenums; page++) { in _rtl92ee_write_fw()
66 int err = -EIO; in _rtl92ee_fw_free_to_go()
67 u32 counter = 0; in _rtl92ee_fw_free_to_go()
76 pr_err("chksum report fail! REG_MCUFWDL:0x%08x\n", in _rtl92ee_fw_free_to_go()
86 counter = 0; in _rtl92ee_fw_free_to_go()
91 return 0; in _rtl92ee_fw_free_to_go()
97 pr_err("Polling FW ready fail!! REG_MCUFWDL:0x%08x. count = %d\n", in _rtl92ee_fw_free_to_go()
111 enum version_8192e version = rtlhal->version; in rtl92ee_download_fw()
113 if (!rtlhal->pfirmware) in rtl92ee_download_fw()
116 pfwheader = (struct rtlwifi_firmware_header *)rtlhal->pfirmware; in rtl92ee_download_fw()
117 rtlhal->fw_version = le16_to_cpu(pfwheader->version); in rtl92ee_download_fw()
118 rtlhal->fw_subversion = pfwheader->subversion; in rtl92ee_download_fw()
119 pfwdata = (u8 *)rtlhal->pfirmware; in rtl92ee_download_fw()
120 fwsize = rtlhal->fwsize; in rtl92ee_download_fw()
127 pfwheader->version, pfwheader->signature, in rtl92ee_download_fw()
131 fwsize = fwsize - sizeof(struct rtlwifi_firmware_header); in rtl92ee_download_fw()
135 pfwheader->signature); in rtl92ee_download_fw()
138 if (rtlhal->mac_func_enable) { in rtl92ee_download_fw()
140 rtl_write_byte(rtlpriv, REG_MCUFWDL, 0); in rtl92ee_download_fw()
158 if (((val_hmetfr >> boxnum) & BIT(0)) == 0) in _rtl92ee_check_fw_read_last_h2c()
170 u16 box_reg = 0, box_extreg = 0; in _rtl92ee_fill_h2c_command()
173 u8 buf_index = 0; in _rtl92ee_fill_h2c_command()
177 u32 h2c_waitcounter = 0; in _rtl92ee_fill_h2c_command()
181 if (ppsc->dot11_psmode != EACTIVE || in _rtl92ee_fill_h2c_command()
182 ppsc->inactive_pwrstate == ERFOFF) { in _rtl92ee_fill_h2c_command()
194 spin_lock_irqsave(&rtlpriv->locks.h2c_lock, flag); in _rtl92ee_fill_h2c_command()
195 if (rtlhal->h2c_setinprogress) { in _rtl92ee_fill_h2c_command()
200 while (rtlhal->h2c_setinprogress) { in _rtl92ee_fill_h2c_command()
201 spin_unlock_irqrestore(&rtlpriv->locks.h2c_lock, in _rtl92ee_fill_h2c_command()
211 spin_lock_irqsave(&rtlpriv->locks.h2c_lock, in _rtl92ee_fill_h2c_command()
214 spin_unlock_irqrestore(&rtlpriv->locks.h2c_lock, flag); in _rtl92ee_fill_h2c_command()
216 rtlhal->h2c_setinprogress = true; in _rtl92ee_fill_h2c_command()
217 spin_unlock_irqrestore(&rtlpriv->locks.h2c_lock, flag); in _rtl92ee_fill_h2c_command()
224 boxnum = rtlhal->last_hmeboxnum; in _rtl92ee_fill_h2c_command()
226 case 0: in _rtl92ee_fill_h2c_command()
252 if (u1b_tmp != 0xea) { in _rtl92ee_fill_h2c_command()
255 if (rtl_read_byte(rtlpriv, REG_TXDMA_STATUS) == 0xea || in _rtl92ee_fill_h2c_command()
256 rtl_read_byte(rtlpriv, REG_TXPKT_EMPTY) == 0xea) in _rtl92ee_fill_h2c_command()
257 rtl_write_byte(rtlpriv, REG_SYS_CFG1 + 3, 0xff); in _rtl92ee_fill_h2c_command()
264 wait_h2c_limmit--; in _rtl92ee_fill_h2c_command()
265 if (wait_h2c_limmit == 0) { in _rtl92ee_fill_h2c_command()
274 u1b_tmp = rtl_read_byte(rtlpriv, 0x130); in _rtl92ee_fill_h2c_command()
276 "Waiting for FW read clear HMEBox(%d)!!! 0x130 = %2x\n", in _rtl92ee_fill_h2c_command()
291 memset(boxcontent, 0, sizeof(boxcontent)); in _rtl92ee_fill_h2c_command()
292 memset(boxextcontent, 0, sizeof(boxextcontent)); in _rtl92ee_fill_h2c_command()
293 boxcontent[0] = element_id; in _rtl92ee_fill_h2c_command()
302 /*boxcontent[0] &= ~(BIT(7));*/ in _rtl92ee_fill_h2c_command()
306 for (idx = 0; idx < 4; idx++) { in _rtl92ee_fill_h2c_command()
315 /*boxcontent[0] |= (BIT(7));*/ in _rtl92ee_fill_h2c_command()
317 cmdbuffer + buf_index+3, cmd_len-3); in _rtl92ee_fill_h2c_command()
321 for (idx = 0; idx < 4; idx++) { in _rtl92ee_fill_h2c_command()
326 for (idx = 0; idx < 4; idx++) { in _rtl92ee_fill_h2c_command()
339 rtlhal->last_hmeboxnum = boxnum + 1; in _rtl92ee_fill_h2c_command()
340 if (rtlhal->last_hmeboxnum == 4) in _rtl92ee_fill_h2c_command()
341 rtlhal->last_hmeboxnum = 0; in _rtl92ee_fill_h2c_command()
344 "pHalData->last_hmeboxnum = %d\n", in _rtl92ee_fill_h2c_command()
345 rtlhal->last_hmeboxnum); in _rtl92ee_fill_h2c_command()
348 spin_lock_irqsave(&rtlpriv->locks.h2c_lock, flag); in _rtl92ee_fill_h2c_command()
349 rtlhal->h2c_setinprogress = false; in _rtl92ee_fill_h2c_command()
350 spin_unlock_irqrestore(&rtlpriv->locks.h2c_lock, flag); in _rtl92ee_fill_h2c_command()
361 if (!rtlhal->fw_ready) { in rtl92ee_fill_h2c_cmd()
367 memset(tmp_cmdbuf, 0, 8); in rtl92ee_fill_h2c_cmd()
378 rtl_write_byte(rtlpriv, REG_RSV_CTRL + 1, (u1b_tmp & (~BIT(0)))); in rtl92ee_firmware_selfreset()
386 rtl_write_byte(rtlpriv, REG_RSV_CTRL + 1, (u1b_tmp | BIT(0))); in rtl92ee_firmware_selfreset()
398 u8 u1_h2c_set_pwrmode[H2C_92E_PWEMODE_LENGTH] = { 0 }; in rtl92ee_set_fw_pwrmode_cmd()
400 u8 rlbm, power_state = 0, byte5 = 0; in rtl92ee_set_fw_pwrmode_cmd()
401 u8 awake_intvl; /* DTIM = (awake_intvl - 1) */ in rtl92ee_set_fw_pwrmode_cmd()
402 struct rtl_btc_ops *btc_ops = rtlpriv->btcoexist.btc_ops; in rtl92ee_set_fw_pwrmode_cmd()
403 bool bt_ctrl_lps = (rtlpriv->cfg->ops->get_btc_status() ? in rtl92ee_set_fw_pwrmode_cmd()
404 btc_ops->btc_is_bt_ctrl_lps(rtlpriv) : false); in rtl92ee_set_fw_pwrmode_cmd()
405 bool bt_lps_on = (rtlpriv->cfg->ops->get_btc_status() ? in rtl92ee_set_fw_pwrmode_cmd()
406 btc_ops->btc_is_bt_lps_on(rtlpriv) : false); in rtl92ee_set_fw_pwrmode_cmd()
416 rlbm = 0; in rtl92ee_set_fw_pwrmode_cmd()
425 awake_intvl = ppsc->reg_max_lps_awakeintvl; in rtl92ee_set_fw_pwrmode_cmd()
426 /* hw->conf.ps_dtim_period or mac->vif->bss_conf.dtim_period in rtl92ee_set_fw_pwrmode_cmd()
436 if (rtlpriv->mac80211.p2p) { in rtl92ee_set_fw_pwrmode_cmd()
442 byte5 = 0x40; in rtl92ee_set_fw_pwrmode_cmd()
446 byte5 = btc_ops->btc_get_lps_val(rtlpriv); in rtl92ee_set_fw_pwrmode_cmd()
447 power_state = btc_ops->btc_get_rpwm_val(rtlpriv); in rtl92ee_set_fw_pwrmode_cmd()
457 byte5 = 0x40; in rtl92ee_set_fw_pwrmode_cmd()
462 SET_H2CCMD_PWRMODE_PARM_MODE(u1_h2c_set_pwrmode, ((mode) ? 1 : 0)); in rtl92ee_set_fw_pwrmode_cmd()
465 bt_ctrl_lps ? 0 : in rtl92ee_set_fw_pwrmode_cmd()
466 ((rtlpriv->mac80211.p2p) ? in rtl92ee_set_fw_pwrmode_cmd()
467 ppsc->smart_ps : 1)); in rtl92ee_set_fw_pwrmode_cmd()
470 SET_H2CCMD_PWRMODE_PARM_ALL_QUEUE_UAPSD(u1_h2c_set_pwrmode, 0); in rtl92ee_set_fw_pwrmode_cmd()
477 if (rtlpriv->cfg->ops->get_btc_status()) in rtl92ee_set_fw_pwrmode_cmd()
478 btc_ops->btc_record_pwr_mode(rtlpriv, u1_h2c_set_pwrmode, in rtl92ee_set_fw_pwrmode_cmd()
486 u8 parm[3] = { 0 , 0 , 0 }; in rtl92ee_set_fw_media_status_rpt_cmd()
487 /* parm[0]: bit0=0-->Disconnect, bit0=1-->Connect in rtl92ee_set_fw_media_status_rpt_cmd()
488 * bit1=0-->update Media Status to MACID in rtl92ee_set_fw_media_status_rpt_cmd()
489 * bit1=1-->update Media Status from MACID to MACID_End in rtl92ee_set_fw_media_status_rpt_cmd()
490 * parm[1]: MACID, if this is INFRA_STA, MacID = 0 in rtl92ee_set_fw_media_status_rpt_cmd()
495 SET_H2CCMD_MSRRPT_PARM_MACID_IND(parm, 0); in rtl92ee_set_fw_media_status_rpt_cmd()
500 #define BEACON_PG 0 /* ->1 */
503 #define PROBERSP_PG 4 /* ->5 */
510 /* page 0 beacon */
511 0x80, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF,
512 0xFF, 0xFF, 0x00, 0xE0, 0x4C, 0x02, 0xB1, 0x78,
513 0xEC, 0x1A, 0x59, 0x0B, 0xAD, 0xD4, 0x20, 0x00,
514 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
515 0x64, 0x00, 0x10, 0x04, 0x00, 0x05, 0x54, 0x65,
516 0x73, 0x74, 0x32, 0x01, 0x08, 0x82, 0x84, 0x0B,
517 0x16, 0x24, 0x30, 0x48, 0x6C, 0x03, 0x01, 0x06,
518 0x06, 0x02, 0x00, 0x00, 0x2A, 0x01, 0x02, 0x32,
519 0x04, 0x0C, 0x12, 0x18, 0x60, 0x2D, 0x1A, 0x6C,
520 0x09, 0x03, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00,
521 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
522 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
523 0x00, 0x3D, 0x00, 0xDD, 0x07, 0x00, 0xE0, 0x4C,
524 0x02, 0x02, 0x00, 0x00, 0xDD, 0x18, 0x00, 0x50,
525 0xF2, 0x01, 0x01, 0x00, 0x00, 0x50, 0xF2, 0x04,
526 0x01, 0x00, 0x00, 0x50, 0xF2, 0x04, 0x01, 0x00,
529 0x00, 0x50, 0xF2, 0x02, 0x00, 0x00, 0x00, 0x00,
530 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
531 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
532 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
533 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
534 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
535 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
536 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
537 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
538 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
539 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
540 0x10, 0x00, 0x28, 0x8C, 0x00, 0x12, 0x00, 0x00,
541 0x00, 0x00, 0x00, 0x00, 0x00, 0x81, 0x00, 0x00,
542 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
543 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
544 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
546 /* page 2 ps-poll */
547 0xA4, 0x10, 0x01, 0xC0, 0xEC, 0x1A, 0x59, 0x0B,
548 0xAD, 0xD4, 0x00, 0xE0, 0x4C, 0x02, 0xB1, 0x78,
549 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
550 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
551 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
552 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
553 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
554 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
555 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
556 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
557 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
558 0x18, 0x00, 0x28, 0x8C, 0x00, 0x12, 0x00, 0x00,
559 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00,
560 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
561 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
562 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
565 0x48, 0x01, 0x00, 0x00, 0xEC, 0x1A, 0x59, 0x0B,
566 0xAD, 0xD4, 0x00, 0xE0, 0x4C, 0x02, 0xB1, 0x78,
567 0xEC, 0x1A, 0x59, 0x0B, 0xAD, 0xD4, 0x00, 0x00,
568 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
569 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
570 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
571 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
572 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
573 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
574 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
575 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
576 0x72, 0x00, 0x28, 0x8C, 0x00, 0x12, 0x00, 0x00,
577 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00,
578 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
579 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
580 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
583 0x50, 0x00, 0x00, 0x00, 0x00, 0x40, 0x10, 0x10,
584 0x00, 0x03, 0x00, 0xE0, 0x4C, 0x76, 0x00, 0x42,
585 0x00, 0x40, 0x10, 0x10, 0x00, 0x03, 0x00, 0x00,
586 0x9E, 0x46, 0x15, 0x32, 0x27, 0xF2, 0x2D, 0x00,
587 0x64, 0x00, 0x00, 0x04, 0x00, 0x0C, 0x6C, 0x69,
588 0x6E, 0x6B, 0x73, 0x79, 0x73, 0x5F, 0x77, 0x6C,
589 0x61, 0x6E, 0x01, 0x04, 0x82, 0x84, 0x8B, 0x96,
590 0x03, 0x01, 0x01, 0x06, 0x02, 0x00, 0x00, 0x2A,
591 0x01, 0x00, 0x32, 0x08, 0x24, 0x30, 0x48, 0x6C,
592 0x0C, 0x12, 0x18, 0x60, 0x2D, 0x1A, 0x6C, 0x18,
593 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
594 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
595 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
596 0x3D, 0x00, 0xDD, 0x06, 0x00, 0xE0, 0x4C, 0x02,
597 0x01, 0x70, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
598 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
601 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
602 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
603 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
604 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
605 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
606 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
607 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
608 0x1A, 0x00, 0x28, 0x8C, 0x00, 0x12, 0x00, 0x00,
609 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00,
610 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
611 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
612 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
615 0xC8, 0x01, 0x00, 0x00, 0x84, 0xC9, 0xB2, 0xA7,
616 0xB3, 0x6E, 0x00, 0xE0, 0x4C, 0x02, 0x51, 0x02,
617 0x84, 0xC9, 0xB2, 0xA7, 0xB3, 0x6E, 0x00, 0x00,
618 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
619 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
620 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
621 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
622 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
623 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
624 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
625 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
626 0x1A, 0x00, 0x28, 0x8C, 0x00, 0x12, 0x00, 0x00,
627 0x00, 0x00, 0x80, 0x00, 0x00, 0x01, 0x00, 0x00,
628 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
629 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
630 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
632 /* page 7 BT-qos null data */
633 0xC8, 0x01, 0x00, 0x00, 0x84, 0xC9, 0xB2, 0xA7,
634 0xB3, 0x6E, 0x00, 0xE0, 0x4C, 0x02, 0x51, 0x02,
635 0x84, 0xC9, 0xB2, 0xA7, 0xB3, 0x6E, 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 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
646 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 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,
650 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
651 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
652 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
662 u8 u1rsvdpageloc[5] = { 0 }; in rtl92ee_set_fw_rsvdpagepkt()
671 /*--------------------------------------------------------- in rtl92ee_set_fw_rsvdpagepkt()
673 *--------------------------------------------------------- in rtl92ee_set_fw_rsvdpagepkt()
676 SET_80211_HDR_ADDRESS2(beacon, mac->mac_addr); in rtl92ee_set_fw_rsvdpagepkt()
677 SET_80211_HDR_ADDRESS3(beacon, mac->bssid); in rtl92ee_set_fw_rsvdpagepkt()
679 /*------------------------------------------------------- in rtl92ee_set_fw_rsvdpagepkt()
680 * (2) ps-poll in rtl92ee_set_fw_rsvdpagepkt()
681 *-------------------------------------------------------- in rtl92ee_set_fw_rsvdpagepkt()
684 SET_80211_PS_POLL_AID(p_pspoll, (mac->assoc_id | 0xc000)); in rtl92ee_set_fw_rsvdpagepkt()
685 SET_80211_PS_POLL_BSSID(p_pspoll, mac->bssid); in rtl92ee_set_fw_rsvdpagepkt()
686 SET_80211_PS_POLL_TA(p_pspoll, mac->mac_addr); in rtl92ee_set_fw_rsvdpagepkt()
690 /*-------------------------------------------------------- in rtl92ee_set_fw_rsvdpagepkt()
692 *--------------------------------------------------------- in rtl92ee_set_fw_rsvdpagepkt()
695 SET_80211_HDR_ADDRESS1(nullfunc, mac->bssid); in rtl92ee_set_fw_rsvdpagepkt()
696 SET_80211_HDR_ADDRESS2(nullfunc, mac->mac_addr); in rtl92ee_set_fw_rsvdpagepkt()
697 SET_80211_HDR_ADDRESS3(nullfunc, mac->bssid); in rtl92ee_set_fw_rsvdpagepkt()
701 /*--------------------------------------------------------- in rtl92ee_set_fw_rsvdpagepkt()
703 *---------------------------------------------------------- in rtl92ee_set_fw_rsvdpagepkt()
706 SET_80211_HDR_ADDRESS1(p_probersp, mac->bssid); in rtl92ee_set_fw_rsvdpagepkt()
707 SET_80211_HDR_ADDRESS2(p_probersp, mac->mac_addr); in rtl92ee_set_fw_rsvdpagepkt()
708 SET_80211_HDR_ADDRESS3(p_probersp, mac->bssid); in rtl92ee_set_fw_rsvdpagepkt()
712 /*--------------------------------------------------------- in rtl92ee_set_fw_rsvdpagepkt()
714 *---------------------------------------------------------- in rtl92ee_set_fw_rsvdpagepkt()
717 SET_80211_HDR_ADDRESS1(qosnull, mac->bssid); in rtl92ee_set_fw_rsvdpagepkt()
718 SET_80211_HDR_ADDRESS2(qosnull, mac->mac_addr); in rtl92ee_set_fw_rsvdpagepkt()
719 SET_80211_HDR_ADDRESS3(qosnull, mac->bssid); in rtl92ee_set_fw_rsvdpagepkt()
723 /*--------------------------------------------------------- in rtl92ee_set_fw_rsvdpagepkt()
725 *---------------------------------------------------------- in rtl92ee_set_fw_rsvdpagepkt()
728 SET_80211_HDR_ADDRESS1(btqosnull, mac->bssid); in rtl92ee_set_fw_rsvdpagepkt()
729 SET_80211_HDR_ADDRESS2(btqosnull, mac->mac_addr); in rtl92ee_set_fw_rsvdpagepkt()
730 SET_80211_HDR_ADDRESS3(btqosnull, mac->bssid); in rtl92ee_set_fw_rsvdpagepkt()
738 &reserved_page_packet[0], totalpacketlen); in rtl92ee_set_fw_rsvdpagepkt()
778 struct rtl_p2p_ps_info *p2pinfo = &rtlps->p2p_ps_info; in rtl92ee_set_p2p_ps_offload_cmd()
779 struct p2p_ps_offload_t *p2p_ps_offload = &rtlhal->p2p_ps_offload; in rtl92ee_set_p2p_ps_offload_cmd()
787 memset(p2p_ps_offload, 0, sizeof(*p2p_ps_offload)); in rtl92ee_set_p2p_ps_offload_cmd()
792 if (p2pinfo->ctwindow > 0) { in rtl92ee_set_p2p_ps_offload_cmd()
793 p2p_ps_offload->ctwindow_en = 1; in rtl92ee_set_p2p_ps_offload_cmd()
794 ctwindow = p2pinfo->ctwindow; in rtl92ee_set_p2p_ps_offload_cmd()
798 for (i = 0 ; i < p2pinfo->noa_num ; i++) { in rtl92ee_set_p2p_ps_offload_cmd()
800 rtl_write_byte(rtlpriv, 0x5cf, (i << 4)); in rtl92ee_set_p2p_ps_offload_cmd()
801 if (i == 0) in rtl92ee_set_p2p_ps_offload_cmd()
802 p2p_ps_offload->noa0_en = 1; in rtl92ee_set_p2p_ps_offload_cmd()
804 p2p_ps_offload->noa1_en = 1; in rtl92ee_set_p2p_ps_offload_cmd()
806 rtl_write_dword(rtlpriv, 0x5E0, in rtl92ee_set_p2p_ps_offload_cmd()
807 p2pinfo->noa_duration[i]); in rtl92ee_set_p2p_ps_offload_cmd()
808 rtl_write_dword(rtlpriv, 0x5E4, in rtl92ee_set_p2p_ps_offload_cmd()
809 p2pinfo->noa_interval[i]); in rtl92ee_set_p2p_ps_offload_cmd()
814 start_time = p2pinfo->noa_start_time[i]; in rtl92ee_set_p2p_ps_offload_cmd()
815 if (p2pinfo->noa_count_type[i] != 1) { in rtl92ee_set_p2p_ps_offload_cmd()
817 start_time += p2pinfo->noa_interval[i]; in rtl92ee_set_p2p_ps_offload_cmd()
818 if (p2pinfo->noa_count_type[i] != 255) in rtl92ee_set_p2p_ps_offload_cmd()
819 p2pinfo->noa_count_type[i]--; in rtl92ee_set_p2p_ps_offload_cmd()
822 rtl_write_dword(rtlpriv, 0x5E8, start_time); in rtl92ee_set_p2p_ps_offload_cmd()
823 rtl_write_dword(rtlpriv, 0x5EC, in rtl92ee_set_p2p_ps_offload_cmd()
824 p2pinfo->noa_count_type[i]); in rtl92ee_set_p2p_ps_offload_cmd()
826 if ((p2pinfo->opp_ps == 1) || (p2pinfo->noa_num > 0)) { in rtl92ee_set_p2p_ps_offload_cmd()
829 p2p_ps_offload->offload_en = 1; in rtl92ee_set_p2p_ps_offload_cmd()
831 if (P2P_ROLE_GO == rtlpriv->mac80211.p2p) { in rtl92ee_set_p2p_ps_offload_cmd()
832 p2p_ps_offload->role = 1; in rtl92ee_set_p2p_ps_offload_cmd()
833 p2p_ps_offload->allstasleep = 0; in rtl92ee_set_p2p_ps_offload_cmd()
835 p2p_ps_offload->role = 0; in rtl92ee_set_p2p_ps_offload_cmd()
837 p2p_ps_offload->discovery = 0; in rtl92ee_set_p2p_ps_offload_cmd()
842 p2p_ps_offload->discovery = 1; in rtl92ee_set_p2p_ps_offload_cmd()
846 p2p_ps_offload->discovery = 0; in rtl92ee_set_p2p_ps_offload_cmd()
847 p2pinfo->p2p_ps_state = P2P_PS_ENABLE; in rtl92ee_set_p2p_ps_offload_cmd()
859 u8 rate = cmd_buf[0] & 0x3F; in rtl92ee_c2h_ra_report_handler()
860 bool collision_state = cmd_buf[3] & BIT(0); in rtl92ee_c2h_ra_report_handler()