Lines Matching refs:h2c_pkt
496 static void rtw_fw_send_h2c_packet(struct rtw_dev *rtwdev, u8 *h2c_pkt) in rtw_fw_send_h2c_packet() argument
502 FW_OFFLOAD_H2C_SET_SEQ_NUM(h2c_pkt, rtwdev->h2c.seq); in rtw_fw_send_h2c_packet()
503 ret = rtw_hci_write_data_h2c(rtwdev, h2c_pkt, H2C_PKT_SIZE); in rtw_fw_send_h2c_packet()
513 u8 h2c_pkt[H2C_PKT_SIZE] = {0}; in rtw_fw_send_general_info() local
519 rtw_h2c_pkt_set_header(h2c_pkt, H2C_PKT_GENERAL_INFO); in rtw_fw_send_general_info()
521 SET_PKT_H2C_TOTAL_LEN(h2c_pkt, total_size); in rtw_fw_send_general_info()
523 GENERAL_INFO_SET_FW_TX_BOUNDARY(h2c_pkt, in rtw_fw_send_general_info()
527 rtw_fw_send_h2c_packet(rtwdev, h2c_pkt); in rtw_fw_send_general_info()
535 u8 h2c_pkt[H2C_PKT_SIZE] = {0}; in rtw_fw_send_phydm_info() local
547 rtw_h2c_pkt_set_header(h2c_pkt, H2C_PKT_PHYDM_INFO); in rtw_fw_send_phydm_info()
549 SET_PKT_H2C_TOTAL_LEN(h2c_pkt, total_size); in rtw_fw_send_phydm_info()
550 PHYDM_INFO_SET_REF_TYPE(h2c_pkt, efuse->rfe_option); in rtw_fw_send_phydm_info()
551 PHYDM_INFO_SET_RF_TYPE(h2c_pkt, fw_rf_type); in rtw_fw_send_phydm_info()
552 PHYDM_INFO_SET_CUT_VER(h2c_pkt, hal->cut_version); in rtw_fw_send_phydm_info()
553 PHYDM_INFO_SET_RX_ANT_STATUS(h2c_pkt, hal->antenna_tx); in rtw_fw_send_phydm_info()
554 PHYDM_INFO_SET_TX_ANT_STATUS(h2c_pkt, hal->antenna_rx); in rtw_fw_send_phydm_info()
556 rtw_fw_send_h2c_packet(rtwdev, h2c_pkt); in rtw_fw_send_phydm_info()
561 u8 h2c_pkt[H2C_PKT_SIZE] = {0}; in rtw_fw_do_iqk() local
564 rtw_h2c_pkt_set_header(h2c_pkt, H2C_PKT_IQK); in rtw_fw_do_iqk()
565 SET_PKT_H2C_TOTAL_LEN(h2c_pkt, total_size); in rtw_fw_do_iqk()
566 IQK_SET_CLEAR(h2c_pkt, para->clear); in rtw_fw_do_iqk()
567 IQK_SET_SEGMENT_IQK(h2c_pkt, para->segment_iqk); in rtw_fw_do_iqk()
569 rtw_fw_send_h2c_packet(rtwdev, h2c_pkt); in rtw_fw_do_iqk()
575 u8 h2c_pkt[H2C_PKT_SIZE] = {0}; in rtw_fw_inform_rfk_status() local
577 SET_H2C_CMD_ID_CLASS(h2c_pkt, H2C_CMD_WIFI_CALIBRATION); in rtw_fw_inform_rfk_status()
579 RFK_SET_INFORM_START(h2c_pkt, start); in rtw_fw_inform_rfk_status()
581 rtw_fw_send_h2c_command(rtwdev, h2c_pkt); in rtw_fw_inform_rfk_status()
587 u8 h2c_pkt[H2C_PKT_SIZE] = {0}; in rtw_fw_query_bt_info() local
589 SET_H2C_CMD_ID_CLASS(h2c_pkt, H2C_CMD_QUERY_BT_INFO); in rtw_fw_query_bt_info()
591 SET_QUERY_BT_INFO(h2c_pkt, true); in rtw_fw_query_bt_info()
593 rtw_fw_send_h2c_command(rtwdev, h2c_pkt); in rtw_fw_query_bt_info()
615 u8 h2c_pkt[H2C_PKT_SIZE] = {0}; in rtw_fw_wl_ch_info() local
617 SET_H2C_CMD_ID_CLASS(h2c_pkt, H2C_CMD_WL_CH_INFO); in rtw_fw_wl_ch_info()
619 SET_WL_CH_INFO_LINK(h2c_pkt, link); in rtw_fw_wl_ch_info()
620 SET_WL_CH_INFO_CHNL(h2c_pkt, ch); in rtw_fw_wl_ch_info()
621 SET_WL_CH_INFO_BW(h2c_pkt, bw); in rtw_fw_wl_ch_info()
623 rtw_fw_send_h2c_command(rtwdev, h2c_pkt); in rtw_fw_wl_ch_info()
629 u8 h2c_pkt[H2C_PKT_SIZE] = {0}; in rtw_fw_query_bt_mp_info() local
631 SET_H2C_CMD_ID_CLASS(h2c_pkt, H2C_CMD_QUERY_BT_MP_INFO); in rtw_fw_query_bt_mp_info()
633 SET_BT_MP_INFO_SEQ(h2c_pkt, req->seq); in rtw_fw_query_bt_mp_info()
634 SET_BT_MP_INFO_OP_CODE(h2c_pkt, req->op_code); in rtw_fw_query_bt_mp_info()
635 SET_BT_MP_INFO_PARA1(h2c_pkt, req->para1); in rtw_fw_query_bt_mp_info()
636 SET_BT_MP_INFO_PARA2(h2c_pkt, req->para2); in rtw_fw_query_bt_mp_info()
637 SET_BT_MP_INFO_PARA3(h2c_pkt, req->para3); in rtw_fw_query_bt_mp_info()
639 rtw_fw_send_h2c_command(rtwdev, h2c_pkt); in rtw_fw_query_bt_mp_info()
644 u8 h2c_pkt[H2C_PKT_SIZE] = {0}; in rtw_fw_force_bt_tx_power() local
647 SET_H2C_CMD_ID_CLASS(h2c_pkt, H2C_CMD_FORCE_BT_TX_POWER); in rtw_fw_force_bt_tx_power()
649 SET_BT_TX_POWER_INDEX(h2c_pkt, index); in rtw_fw_force_bt_tx_power()
651 rtw_fw_send_h2c_command(rtwdev, h2c_pkt); in rtw_fw_force_bt_tx_power()
656 u8 h2c_pkt[H2C_PKT_SIZE] = {0}; in rtw_fw_bt_ignore_wlan_action() local
658 SET_H2C_CMD_ID_CLASS(h2c_pkt, H2C_CMD_IGNORE_WLAN_ACTION); in rtw_fw_bt_ignore_wlan_action()
660 SET_IGNORE_WLAN_ACTION_EN(h2c_pkt, enable); in rtw_fw_bt_ignore_wlan_action()
662 rtw_fw_send_h2c_command(rtwdev, h2c_pkt); in rtw_fw_bt_ignore_wlan_action()
668 u8 h2c_pkt[H2C_PKT_SIZE] = {0}; in rtw_fw_coex_tdma_type() local
670 SET_H2C_CMD_ID_CLASS(h2c_pkt, H2C_CMD_COEX_TDMA_TYPE); in rtw_fw_coex_tdma_type()
672 SET_COEX_TDMA_TYPE_PARA1(h2c_pkt, para1); in rtw_fw_coex_tdma_type()
673 SET_COEX_TDMA_TYPE_PARA2(h2c_pkt, para2); in rtw_fw_coex_tdma_type()
674 SET_COEX_TDMA_TYPE_PARA3(h2c_pkt, para3); in rtw_fw_coex_tdma_type()
675 SET_COEX_TDMA_TYPE_PARA4(h2c_pkt, para4); in rtw_fw_coex_tdma_type()
676 SET_COEX_TDMA_TYPE_PARA5(h2c_pkt, para5); in rtw_fw_coex_tdma_type()
678 rtw_fw_send_h2c_command(rtwdev, h2c_pkt); in rtw_fw_coex_tdma_type()
683 u8 h2c_pkt[H2C_PKT_SIZE] = {0}; in rtw_fw_coex_query_hid_info() local
685 SET_H2C_CMD_ID_CLASS(h2c_pkt, H2C_CMD_QUERY_BT_HID_INFO); in rtw_fw_coex_query_hid_info()
687 SET_COEX_QUERY_HID_INFO_SUBID(h2c_pkt, sub_id); in rtw_fw_coex_query_hid_info()
688 SET_COEX_QUERY_HID_INFO_DATA1(h2c_pkt, data); in rtw_fw_coex_query_hid_info()
690 rtw_fw_send_h2c_command(rtwdev, h2c_pkt); in rtw_fw_coex_query_hid_info()
695 u8 h2c_pkt[H2C_PKT_SIZE] = {0}; in rtw_fw_bt_wifi_control() local
697 SET_H2C_CMD_ID_CLASS(h2c_pkt, H2C_CMD_BT_WIFI_CONTROL); in rtw_fw_bt_wifi_control()
699 SET_BT_WIFI_CONTROL_OP_CODE(h2c_pkt, op_code); in rtw_fw_bt_wifi_control()
701 SET_BT_WIFI_CONTROL_DATA1(h2c_pkt, *data); in rtw_fw_bt_wifi_control()
702 SET_BT_WIFI_CONTROL_DATA2(h2c_pkt, *(data + 1)); in rtw_fw_bt_wifi_control()
703 SET_BT_WIFI_CONTROL_DATA3(h2c_pkt, *(data + 2)); in rtw_fw_bt_wifi_control()
704 SET_BT_WIFI_CONTROL_DATA4(h2c_pkt, *(data + 3)); in rtw_fw_bt_wifi_control()
705 SET_BT_WIFI_CONTROL_DATA5(h2c_pkt, *(data + 4)); in rtw_fw_bt_wifi_control()
707 rtw_fw_send_h2c_command(rtwdev, h2c_pkt); in rtw_fw_bt_wifi_control()
712 u8 h2c_pkt[H2C_PKT_SIZE] = {0}; in rtw_fw_send_rssi_info() local
716 SET_H2C_CMD_ID_CLASS(h2c_pkt, H2C_CMD_RSSI_MONITOR); in rtw_fw_send_rssi_info()
718 SET_RSSI_INFO_MACID(h2c_pkt, si->mac_id); in rtw_fw_send_rssi_info()
719 SET_RSSI_INFO_RSSI(h2c_pkt, rssi); in rtw_fw_send_rssi_info()
720 SET_RSSI_INFO_STBC(h2c_pkt, stbc_en); in rtw_fw_send_rssi_info()
722 rtw_fw_send_h2c_command(rtwdev, h2c_pkt); in rtw_fw_send_rssi_info()
728 u8 h2c_pkt[H2C_PKT_SIZE] = {0}; in rtw_fw_send_ra_info() local
731 SET_H2C_CMD_ID_CLASS(h2c_pkt, H2C_CMD_RA_INFO); in rtw_fw_send_ra_info()
733 SET_RA_INFO_MACID(h2c_pkt, si->mac_id); in rtw_fw_send_ra_info()
734 SET_RA_INFO_RATE_ID(h2c_pkt, si->rate_id); in rtw_fw_send_ra_info()
735 SET_RA_INFO_INIT_RA_LVL(h2c_pkt, si->init_ra_lv); in rtw_fw_send_ra_info()
736 SET_RA_INFO_SGI_EN(h2c_pkt, si->sgi_enable); in rtw_fw_send_ra_info()
737 SET_RA_INFO_BW_MODE(h2c_pkt, si->bw_mode); in rtw_fw_send_ra_info()
738 SET_RA_INFO_LDPC(h2c_pkt, !!si->ldpc_en); in rtw_fw_send_ra_info()
739 SET_RA_INFO_NO_UPDATE(h2c_pkt, !reset_ra_mask); in rtw_fw_send_ra_info()
740 SET_RA_INFO_VHT_EN(h2c_pkt, si->vht_enable); in rtw_fw_send_ra_info()
741 SET_RA_INFO_DIS_PT(h2c_pkt, disable_pt); in rtw_fw_send_ra_info()
742 SET_RA_INFO_RA_MASK0(h2c_pkt, (si->ra_mask & 0xff)); in rtw_fw_send_ra_info()
743 SET_RA_INFO_RA_MASK1(h2c_pkt, (si->ra_mask & 0xff00) >> 8); in rtw_fw_send_ra_info()
744 SET_RA_INFO_RA_MASK2(h2c_pkt, (si->ra_mask & 0xff0000) >> 16); in rtw_fw_send_ra_info()
745 SET_RA_INFO_RA_MASK3(h2c_pkt, (si->ra_mask & 0xff000000) >> 24); in rtw_fw_send_ra_info()
749 rtw_fw_send_h2c_command(rtwdev, h2c_pkt); in rtw_fw_send_ra_info()
754 u8 h2c_pkt[H2C_PKT_SIZE] = {0}; in rtw_fw_media_status_report() local
756 SET_H2C_CMD_ID_CLASS(h2c_pkt, H2C_CMD_MEDIA_STATUS_RPT); in rtw_fw_media_status_report()
757 MEDIA_STATUS_RPT_SET_OP_MODE(h2c_pkt, connect); in rtw_fw_media_status_report()
758 MEDIA_STATUS_RPT_SET_MACID(h2c_pkt, mac_id); in rtw_fw_media_status_report()
760 rtw_fw_send_h2c_command(rtwdev, h2c_pkt); in rtw_fw_media_status_report()
767 u8 h2c_pkt[H2C_PKT_SIZE] = {0}; in rtw_fw_update_wl_phy_info() local
769 SET_H2C_CMD_ID_CLASS(h2c_pkt, H2C_CMD_WL_PHY_INFO); in rtw_fw_update_wl_phy_info()
770 SET_WL_PHY_INFO_TX_TP(h2c_pkt, stats->tx_throughput); in rtw_fw_update_wl_phy_info()
771 SET_WL_PHY_INFO_RX_TP(h2c_pkt, stats->rx_throughput); in rtw_fw_update_wl_phy_info()
772 SET_WL_PHY_INFO_TX_RATE_DESC(h2c_pkt, dm_info->tx_rate); in rtw_fw_update_wl_phy_info()
773 SET_WL_PHY_INFO_RX_RATE_DESC(h2c_pkt, dm_info->curr_rx_rate); in rtw_fw_update_wl_phy_info()
774 SET_WL_PHY_INFO_RX_EVM(h2c_pkt, dm_info->rx_evm_dbm[RF_PATH_A]); in rtw_fw_update_wl_phy_info()
775 rtw_fw_send_h2c_command(rtwdev, h2c_pkt); in rtw_fw_update_wl_phy_info()
788 u8 h2c_pkt[H2C_PKT_SIZE] = {0}; in rtw_fw_beacon_filter_config() local
799 SET_H2C_CMD_ID_CLASS(h2c_pkt, H2C_CMD_BCN_FILTER_OFFLOAD_P1); in rtw_fw_beacon_filter_config()
800 SET_BCN_FILTER_OFFLOAD_P1_ENABLE(h2c_pkt, connect); in rtw_fw_beacon_filter_config()
801 rtw_fw_send_h2c_command(rtwdev, h2c_pkt); in rtw_fw_beacon_filter_config()
809 SET_H2C_CMD_ID_CLASS(h2c_pkt, H2C_CMD_BCN_FILTER_OFFLOAD_P0); in rtw_fw_beacon_filter_config()
810 ether_addr_copy(&h2c_pkt[1], bss_conf->bssid); in rtw_fw_beacon_filter_config()
811 rtw_fw_send_h2c_command(rtwdev, h2c_pkt); in rtw_fw_beacon_filter_config()
813 memset(h2c_pkt, 0, sizeof(h2c_pkt)); in rtw_fw_beacon_filter_config()
815 SET_H2C_CMD_ID_CLASS(h2c_pkt, H2C_CMD_BCN_FILTER_OFFLOAD_P1); in rtw_fw_beacon_filter_config()
816 SET_BCN_FILTER_OFFLOAD_P1_ENABLE(h2c_pkt, connect); in rtw_fw_beacon_filter_config()
817 SET_BCN_FILTER_OFFLOAD_P1_OFFLOAD_MODE(h2c_pkt, in rtw_fw_beacon_filter_config()
819 SET_BCN_FILTER_OFFLOAD_P1_THRESHOLD(h2c_pkt, thold); in rtw_fw_beacon_filter_config()
820 SET_BCN_FILTER_OFFLOAD_P1_BCN_LOSS_CNT(h2c_pkt, BCN_LOSS_CNT); in rtw_fw_beacon_filter_config()
821 SET_BCN_FILTER_OFFLOAD_P1_MACID(h2c_pkt, si->mac_id); in rtw_fw_beacon_filter_config()
822 SET_BCN_FILTER_OFFLOAD_P1_HYST(h2c_pkt, hyst); in rtw_fw_beacon_filter_config()
823 SET_BCN_FILTER_OFFLOAD_P1_BCN_INTERVAL(h2c_pkt, bss_conf->beacon_int); in rtw_fw_beacon_filter_config()
824 rtw_fw_send_h2c_command(rtwdev, h2c_pkt); in rtw_fw_beacon_filter_config()
830 u8 h2c_pkt[H2C_PKT_SIZE] = {0}; in rtw_fw_set_pwr_mode() local
832 SET_H2C_CMD_ID_CLASS(h2c_pkt, H2C_CMD_SET_PWR_MODE); in rtw_fw_set_pwr_mode()
834 SET_PWR_MODE_SET_MODE(h2c_pkt, conf->mode); in rtw_fw_set_pwr_mode()
835 SET_PWR_MODE_SET_RLBM(h2c_pkt, conf->rlbm); in rtw_fw_set_pwr_mode()
836 SET_PWR_MODE_SET_SMART_PS(h2c_pkt, conf->smart_ps); in rtw_fw_set_pwr_mode()
837 SET_PWR_MODE_SET_AWAKE_INTERVAL(h2c_pkt, conf->awake_interval); in rtw_fw_set_pwr_mode()
838 SET_PWR_MODE_SET_PORT_ID(h2c_pkt, conf->port_id); in rtw_fw_set_pwr_mode()
839 SET_PWR_MODE_SET_PWR_STATE(h2c_pkt, conf->state); in rtw_fw_set_pwr_mode()
841 rtw_fw_send_h2c_command(rtwdev, h2c_pkt); in rtw_fw_set_pwr_mode()
846 u8 h2c_pkt[H2C_PKT_SIZE] = {0}; in rtw_fw_set_keep_alive_cmd() local
853 SET_H2C_CMD_ID_CLASS(h2c_pkt, H2C_CMD_KEEP_ALIVE); in rtw_fw_set_keep_alive_cmd()
854 SET_KEEP_ALIVE_ENABLE(h2c_pkt, enable); in rtw_fw_set_keep_alive_cmd()
855 SET_KEEP_ALIVE_ADOPT(h2c_pkt, mode.adopt); in rtw_fw_set_keep_alive_cmd()
856 SET_KEEP_ALIVE_PKT_TYPE(h2c_pkt, mode.pkt_type); in rtw_fw_set_keep_alive_cmd()
857 SET_KEEP_ALIVE_CHECK_PERIOD(h2c_pkt, mode.period); in rtw_fw_set_keep_alive_cmd()
859 rtw_fw_send_h2c_command(rtwdev, h2c_pkt); in rtw_fw_set_keep_alive_cmd()
865 u8 h2c_pkt[H2C_PKT_SIZE] = {0}; in rtw_fw_set_disconnect_decision_cmd() local
872 SET_H2C_CMD_ID_CLASS(h2c_pkt, H2C_CMD_DISCONNECT_DECISION); in rtw_fw_set_disconnect_decision_cmd()
875 SET_DISCONNECT_DECISION_ENABLE(h2c_pkt, enable); in rtw_fw_set_disconnect_decision_cmd()
876 SET_DISCONNECT_DECISION_ADOPT(h2c_pkt, mode.adopt); in rtw_fw_set_disconnect_decision_cmd()
877 SET_DISCONNECT_DECISION_CHECK_PERIOD(h2c_pkt, mode.period); in rtw_fw_set_disconnect_decision_cmd()
878 SET_DISCONNECT_DECISION_TRY_PKT_NUM(h2c_pkt, mode.retry_count); in rtw_fw_set_disconnect_decision_cmd()
881 rtw_fw_send_h2c_command(rtwdev, h2c_pkt); in rtw_fw_set_disconnect_decision_cmd()
887 u8 h2c_pkt[H2C_PKT_SIZE] = {0}; in rtw_fw_set_wowlan_ctrl_cmd() local
889 SET_H2C_CMD_ID_CLASS(h2c_pkt, H2C_CMD_WOWLAN); in rtw_fw_set_wowlan_ctrl_cmd()
891 SET_WOWLAN_FUNC_ENABLE(h2c_pkt, enable); in rtw_fw_set_wowlan_ctrl_cmd()
894 SET_WOWLAN_MAGIC_PKT_ENABLE(h2c_pkt, enable); in rtw_fw_set_wowlan_ctrl_cmd()
896 SET_WOWLAN_DEAUTH_WAKEUP_ENABLE(h2c_pkt, enable); in rtw_fw_set_wowlan_ctrl_cmd()
898 SET_WOWLAN_REKEY_WAKEUP_ENABLE(h2c_pkt, enable); in rtw_fw_set_wowlan_ctrl_cmd()
900 SET_WOWLAN_PATTERN_MATCH_ENABLE(h2c_pkt, enable); in rtw_fw_set_wowlan_ctrl_cmd()
903 rtw_fw_send_h2c_command(rtwdev, h2c_pkt); in rtw_fw_set_wowlan_ctrl_cmd()
910 u8 h2c_pkt[H2C_PKT_SIZE] = {0}; in rtw_fw_set_aoac_global_info_cmd() local
912 SET_H2C_CMD_ID_CLASS(h2c_pkt, H2C_CMD_AOAC_GLOBAL_INFO); in rtw_fw_set_aoac_global_info_cmd()
914 SET_AOAC_GLOBAL_INFO_PAIRWISE_ENC_ALG(h2c_pkt, pairwise_key_enc); in rtw_fw_set_aoac_global_info_cmd()
915 SET_AOAC_GLOBAL_INFO_GROUP_ENC_ALG(h2c_pkt, group_key_enc); in rtw_fw_set_aoac_global_info_cmd()
917 rtw_fw_send_h2c_command(rtwdev, h2c_pkt); in rtw_fw_set_aoac_global_info_cmd()
922 u8 h2c_pkt[H2C_PKT_SIZE] = {0}; in rtw_fw_set_remote_wake_ctrl_cmd() local
924 SET_H2C_CMD_ID_CLASS(h2c_pkt, H2C_CMD_REMOTE_WAKE_CTRL); in rtw_fw_set_remote_wake_ctrl_cmd()
926 SET_REMOTE_WAKECTRL_ENABLE(h2c_pkt, enable); in rtw_fw_set_remote_wake_ctrl_cmd()
929 SET_REMOTE_WAKE_CTRL_NLO_OFFLOAD_EN(h2c_pkt, enable); in rtw_fw_set_remote_wake_ctrl_cmd()
931 rtw_fw_send_h2c_command(rtwdev, h2c_pkt); in rtw_fw_set_remote_wake_ctrl_cmd()
950 u8 h2c_pkt[H2C_PKT_SIZE] = {0}; in rtw_fw_set_nlo_info() local
955 SET_H2C_CMD_ID_CLASS(h2c_pkt, H2C_CMD_NLO_INFO); in rtw_fw_set_nlo_info()
957 SET_NLO_FUN_EN(h2c_pkt, enable); in rtw_fw_set_nlo_info()
960 SET_NLO_PS_32K(h2c_pkt, enable); in rtw_fw_set_nlo_info()
961 SET_NLO_IGNORE_SECURITY(h2c_pkt, enable); in rtw_fw_set_nlo_info()
962 SET_NLO_LOC_NLO_INFO(h2c_pkt, loc_nlo); in rtw_fw_set_nlo_info()
965 rtw_fw_send_h2c_command(rtwdev, h2c_pkt); in rtw_fw_set_nlo_info()
970 u8 h2c_pkt[H2C_PKT_SIZE] = {0}; in rtw_fw_set_recover_bt_device() local
972 SET_H2C_CMD_ID_CLASS(h2c_pkt, H2C_CMD_RECOVER_BT_DEV); in rtw_fw_set_recover_bt_device()
973 SET_RECOVER_BT_DEV_EN(h2c_pkt, 1); in rtw_fw_set_recover_bt_device()
975 rtw_fw_send_h2c_command(rtwdev, h2c_pkt); in rtw_fw_set_recover_bt_device()
981 u8 h2c_pkt[H2C_PKT_SIZE] = {0}; in rtw_fw_set_pg_info() local
987 SET_H2C_CMD_ID_CLASS(h2c_pkt, H2C_CMD_LPS_PG_INFO); in rtw_fw_set_pg_info()
989 LPS_PG_INFO_LOC(h2c_pkt, loc_pg); in rtw_fw_set_pg_info()
990 LPS_PG_DPK_LOC(h2c_pkt, loc_dpk); in rtw_fw_set_pg_info()
991 LPS_PG_SEC_CAM_EN(h2c_pkt, conf->sec_cam_backup); in rtw_fw_set_pg_info()
992 LPS_PG_PATTERN_CAM_EN(h2c_pkt, conf->pattern_cam_backup); in rtw_fw_set_pg_info()
994 rtw_fw_send_h2c_command(rtwdev, h2c_pkt); in rtw_fw_set_pg_info()
1033 u8 h2c_pkt[H2C_PKT_SIZE] = {0}; in rtw_send_rsvd_page_h2c() local
1036 SET_H2C_CMD_ID_CLASS(h2c_pkt, H2C_CMD_RSVD_PAGE); in rtw_send_rsvd_page_h2c()
1039 *(h2c_pkt + 1) = location; in rtw_send_rsvd_page_h2c()
1043 *(h2c_pkt + 2) = location; in rtw_send_rsvd_page_h2c()
1047 *(h2c_pkt + 3) = location; in rtw_send_rsvd_page_h2c()
1051 *(h2c_pkt + 4) = location; in rtw_send_rsvd_page_h2c()
1054 rtw_fw_send_h2c_command(rtwdev, h2c_pkt); in rtw_send_rsvd_page_h2c()
1871 u8 h2c_pkt[H2C_PKT_SIZE] = {0}; in __rtw_fw_update_pkt() local
1874 rtw_h2c_pkt_set_header(h2c_pkt, H2C_PKT_UPDATE_PKT); in __rtw_fw_update_pkt()
1876 SET_PKT_H2C_TOTAL_LEN(h2c_pkt, total_size); in __rtw_fw_update_pkt()
1877 UPDATE_PKT_SET_PKT_ID(h2c_pkt, pkt_id); in __rtw_fw_update_pkt()
1878 UPDATE_PKT_SET_LOCATION(h2c_pkt, location); in __rtw_fw_update_pkt()
1882 UPDATE_PKT_SET_SIZE(h2c_pkt, size); in __rtw_fw_update_pkt()
1884 rtw_fw_send_h2c_packet(rtwdev, h2c_pkt); in __rtw_fw_update_pkt()
1911 u8 h2c_pkt[H2C_PKT_SIZE] = {0}; in rtw_fw_channel_switch() local
1925 rtw_h2c_pkt_set_header(h2c_pkt, H2C_PKT_CH_SWITCH); in rtw_fw_channel_switch()
1926 SET_PKT_H2C_TOTAL_LEN(h2c_pkt, total_size); in rtw_fw_channel_switch()
1928 CH_SWITCH_SET_START(h2c_pkt, enable); in rtw_fw_channel_switch()
1929 CH_SWITCH_SET_DEST_CH_EN(h2c_pkt, cs_option.dest_ch_en); in rtw_fw_channel_switch()
1930 CH_SWITCH_SET_DEST_CH(h2c_pkt, cs_option.dest_ch); in rtw_fw_channel_switch()
1931 CH_SWITCH_SET_NORMAL_PERIOD(h2c_pkt, cs_option.normal_period); in rtw_fw_channel_switch()
1932 CH_SWITCH_SET_NORMAL_PERIOD_SEL(h2c_pkt, cs_option.normal_period_sel); in rtw_fw_channel_switch()
1933 CH_SWITCH_SET_SLOW_PERIOD(h2c_pkt, cs_option.slow_period); in rtw_fw_channel_switch()
1934 CH_SWITCH_SET_SLOW_PERIOD_SEL(h2c_pkt, cs_option.slow_period_sel); in rtw_fw_channel_switch()
1935 CH_SWITCH_SET_NORMAL_CYCLE(h2c_pkt, cs_option.normal_cycle); in rtw_fw_channel_switch()
1936 CH_SWITCH_SET_PERIODIC_OPT(h2c_pkt, cs_option.periodic_option); in rtw_fw_channel_switch()
1938 CH_SWITCH_SET_CH_NUM(h2c_pkt, rtw_pno_req->channel_cnt); in rtw_fw_channel_switch()
1939 CH_SWITCH_SET_INFO_SIZE(h2c_pkt, rtw_pno_req->channel_cnt * 4); in rtw_fw_channel_switch()
1942 CH_SWITCH_SET_INFO_LOC(h2c_pkt, loc_ch_info); in rtw_fw_channel_switch()
1944 rtw_fw_send_h2c_packet(rtwdev, h2c_pkt); in rtw_fw_channel_switch()
1950 u8 h2c_pkt[H2C_PKT_SIZE] = {0}; in rtw_fw_adaptivity() local
1958 SET_H2C_CMD_ID_CLASS(h2c_pkt, H2C_CMD_ADAPTIVITY); in rtw_fw_adaptivity()
1959 SET_ADAPTIVITY_MODE(h2c_pkt, dm_info->edcca_mode); in rtw_fw_adaptivity()
1960 SET_ADAPTIVITY_OPTION(h2c_pkt, 1); in rtw_fw_adaptivity()
1961 SET_ADAPTIVITY_IGI(h2c_pkt, dm_info->igi_history[0]); in rtw_fw_adaptivity()
1962 SET_ADAPTIVITY_L2H(h2c_pkt, dm_info->l2h_th_ini); in rtw_fw_adaptivity()
1963 SET_ADAPTIVITY_DENSITY(h2c_pkt, dm_info->scan_density); in rtw_fw_adaptivity()
1965 rtw_fw_send_h2c_command(rtwdev, h2c_pkt); in rtw_fw_adaptivity()
1970 u8 h2c_pkt[H2C_PKT_SIZE] = {0}; in rtw_fw_scan_notify() local
1972 SET_H2C_CMD_ID_CLASS(h2c_pkt, H2C_CMD_SCAN); in rtw_fw_scan_notify()
1973 SET_SCAN_START(h2c_pkt, start); in rtw_fw_scan_notify()
1975 rtw_fw_send_h2c_command(rtwdev, h2c_pkt); in rtw_fw_scan_notify()
2182 u8 h2c_pkt[H2C_PKT_SIZE] = {0}; in rtw_fw_set_scan_offload() local
2184 rtw_h2c_pkt_set_header(h2c_pkt, H2C_PKT_SCAN_OFFLOAD); in rtw_fw_set_scan_offload()
2185 SET_PKT_H2C_TOTAL_LEN(h2c_pkt, H2C_PKT_CH_SWITCH_LEN); in rtw_fw_set_scan_offload()
2187 SCAN_OFFLOAD_SET_START(h2c_pkt, opt->switch_en); in rtw_fw_set_scan_offload()
2188 SCAN_OFFLOAD_SET_BACK_OP_EN(h2c_pkt, opt->back_op_en); in rtw_fw_set_scan_offload()
2189 SCAN_OFFLOAD_SET_RANDOM_SEQ_EN(h2c_pkt, random_seq); in rtw_fw_set_scan_offload()
2190 SCAN_OFFLOAD_SET_NO_CCK_EN(h2c_pkt, req->no_cck); in rtw_fw_set_scan_offload()
2191 SCAN_OFFLOAD_SET_CH_NUM(h2c_pkt, list->ch_num); in rtw_fw_set_scan_offload()
2192 SCAN_OFFLOAD_SET_CH_INFO_SIZE(h2c_pkt, list->size); in rtw_fw_set_scan_offload()
2193 SCAN_OFFLOAD_SET_CH_INFO_LOC(h2c_pkt, list->addr - fifo->rsvd_boundary); in rtw_fw_set_scan_offload()
2194 SCAN_OFFLOAD_SET_OP_CH(h2c_pkt, scan_info->op_chan); in rtw_fw_set_scan_offload()
2195 SCAN_OFFLOAD_SET_OP_PRI_CH_IDX(h2c_pkt, scan_info->op_pri_ch_idx); in rtw_fw_set_scan_offload()
2196 SCAN_OFFLOAD_SET_OP_BW(h2c_pkt, scan_info->op_bw); in rtw_fw_set_scan_offload()
2197 SCAN_OFFLOAD_SET_OP_PORT_ID(h2c_pkt, rtwvif->port); in rtw_fw_set_scan_offload()
2198 SCAN_OFFLOAD_SET_OP_DWELL_TIME(h2c_pkt, req->duration_mandatory ? in rtw_fw_set_scan_offload()
2200 SCAN_OFFLOAD_SET_OP_GAP_TIME(h2c_pkt, RTW_OFF_CHAN_TIME); in rtw_fw_set_scan_offload()
2201 SCAN_OFFLOAD_SET_SSID_NUM(h2c_pkt, req->n_ssids); in rtw_fw_set_scan_offload()
2202 SCAN_OFFLOAD_SET_PKT_LOC(h2c_pkt, pkt_loc); in rtw_fw_set_scan_offload()
2204 rtw_fw_send_h2c_packet(rtwdev, h2c_pkt); in rtw_fw_set_scan_offload()