1*4882a593Smuzhiyun /****************************************************************************** 2*4882a593Smuzhiyun * 3*4882a593Smuzhiyun * Copyright(c) 2019 Realtek Corporation. 4*4882a593Smuzhiyun * 5*4882a593Smuzhiyun * This program is free software; you can redistribute it and/or modify it 6*4882a593Smuzhiyun * under the terms of version 2 of the GNU General Public License as 7*4882a593Smuzhiyun * published by the Free Software Foundation. 8*4882a593Smuzhiyun * 9*4882a593Smuzhiyun * This program is distributed in the hope that it will be useful, but WITHOUT 10*4882a593Smuzhiyun * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 11*4882a593Smuzhiyun * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for 12*4882a593Smuzhiyun * more details. 13*4882a593Smuzhiyun * 14*4882a593Smuzhiyun *****************************************************************************/ 15*4882a593Smuzhiyun #ifndef _PHL_API_H_ 16*4882a593Smuzhiyun #define _PHL_API_H_ 17*4882a593Smuzhiyun 18*4882a593Smuzhiyun u8 rtw_phl_read8(void *phl, u32 addr); 19*4882a593Smuzhiyun u16 rtw_phl_read16(void *phl, u32 addr); 20*4882a593Smuzhiyun u32 rtw_phl_read32(void *phl, u32 addr); 21*4882a593Smuzhiyun void rtw_phl_write8(void *phl, u32 addr, u8 val); 22*4882a593Smuzhiyun void rtw_phl_write16(void *phl, u32 addr, u16 val); 23*4882a593Smuzhiyun void rtw_phl_write32(void *phl, u32 addr, u32 val); 24*4882a593Smuzhiyun 25*4882a593Smuzhiyun u32 rtw_phl_read_macreg(void *phl, u32 offset, u32 bit_mask); 26*4882a593Smuzhiyun void rtw_phl_write_macreg(void *phl, 27*4882a593Smuzhiyun u32 offset, u32 bit_mask, u32 data); 28*4882a593Smuzhiyun u32 rtw_phl_read_bbreg(void *phl, u32 offset, u32 bit_mask); 29*4882a593Smuzhiyun void rtw_phl_write_bbreg(void *phl, 30*4882a593Smuzhiyun u32 offset, u32 bit_mask, u32 data); 31*4882a593Smuzhiyun u32 rtw_phl_read_rfreg(void *phl, 32*4882a593Smuzhiyun enum rf_path path, u32 offset, u32 bit_mask); 33*4882a593Smuzhiyun void rtw_phl_write_rfreg(void *phl, 34*4882a593Smuzhiyun enum rf_path path, u32 offset, u32 bit_mask, u32 data); 35*4882a593Smuzhiyun enum rtw_phl_status rtw_phl_interrupt_handler(void *phl); 36*4882a593Smuzhiyun void rtw_phl_enable_interrupt(void *phl); 37*4882a593Smuzhiyun void rtw_phl_disable_interrupt(void *phl); 38*4882a593Smuzhiyun bool rtw_phl_recognize_interrupt(void *phl); 39*4882a593Smuzhiyun void rtw_phl_clear_interrupt(void *phl); 40*4882a593Smuzhiyun void rtw_phl_restore_interrupt(void *phl); 41*4882a593Smuzhiyun 42*4882a593Smuzhiyun 43*4882a593Smuzhiyun #ifdef PHL_PLATFORM_LINUX 44*4882a593Smuzhiyun void rtw_phl_mac_reg_dump(void *sel, void *phl); 45*4882a593Smuzhiyun void rtw_phl_bb_reg_dump(void *sel, void *phl); 46*4882a593Smuzhiyun void rtw_phl_bb_reg_dump_ex(void *sel, void *phl); 47*4882a593Smuzhiyun void rtw_phl_rf_reg_dump(void *sel, void *phl); 48*4882a593Smuzhiyun #endif 49*4882a593Smuzhiyun bool rtw_phl_get_sec_cam(void *phl, u16 num, u8 *buf, u16 size); 50*4882a593Smuzhiyun bool rtw_phl_get_addr_cam(void *phl, u16 num, u8 *buf, u16 size); 51*4882a593Smuzhiyun 52*4882a593Smuzhiyun struct rtw_phl_com_t *rtw_phl_get_com(void *phl); 53*4882a593Smuzhiyun enum rtw_phl_status rtw_phl_init(void *drv_priv, void **phl, 54*4882a593Smuzhiyun struct rtw_ic_info *ic_info); 55*4882a593Smuzhiyun void rtw_phl_deinit(void *phl); 56*4882a593Smuzhiyun 57*4882a593Smuzhiyun void rtw_phl_watchdog_init(void *phl, 58*4882a593Smuzhiyun u16 period, 59*4882a593Smuzhiyun void (*core_sw_wdog)(void *drv_priv), 60*4882a593Smuzhiyun void (*core_hw_wdog)(void *drv_priv)); 61*4882a593Smuzhiyun void rtw_phl_watchdog_deinit(void *phl); 62*4882a593Smuzhiyun void rtw_phl_watchdog_start(void *phl); 63*4882a593Smuzhiyun void rtw_phl_watchdog_stop(void *phl); 64*4882a593Smuzhiyun 65*4882a593Smuzhiyun enum rtw_phl_status rtw_phl_trx_alloc(void *phl); 66*4882a593Smuzhiyun void rtw_phl_trx_free(void *phl); 67*4882a593Smuzhiyun void rtw_phl_trx_free_handler(void *phl); 68*4882a593Smuzhiyun void rtw_phl_trx_free_sw_rsc(void *phl); 69*4882a593Smuzhiyun void rtw_phl_cap_pre_config(void *phl); 70*4882a593Smuzhiyun enum rtw_phl_status rtw_phl_preload(void *phl); 71*4882a593Smuzhiyun enum rtw_phl_status rtw_phl_start(void *phl); 72*4882a593Smuzhiyun void rtw_phl_stop(void *phl); 73*4882a593Smuzhiyun bool rtw_phl_is_init_completed(void *phl); 74*4882a593Smuzhiyun 75*4882a593Smuzhiyun void rtw_phl_ps_set_rt_cap(void *phl, u8 band_idx, bool ps_allow, enum phl_ps_rt_rson rt_rson); 76*4882a593Smuzhiyun enum rtw_phl_status rtw_phl_ps_set_rf_state(void *phl, u8 band_idx, enum rtw_rf_state rf_state); 77*4882a593Smuzhiyun 78*4882a593Smuzhiyun enum rtw_phl_status rtw_phl_suspend(void *phl, struct rtw_phl_stainfo_t *sta, u8 wow_en); 79*4882a593Smuzhiyun enum rtw_phl_status rtw_phl_resume(void *phl, struct rtw_phl_stainfo_t *sta, u8 *hw_reinit); 80*4882a593Smuzhiyun 81*4882a593Smuzhiyun enum rtw_phl_status rtw_phl_tx_req_notify(void *phl); 82*4882a593Smuzhiyun enum rtw_phl_status rtw_phl_add_tx_req(void *phl, struct rtw_xmit_req *tx_req); 83*4882a593Smuzhiyun void rtw_phl_tx_stop(void *phl); 84*4882a593Smuzhiyun void rtw_phl_tx_resume(void *phl); 85*4882a593Smuzhiyun u16 rtw_phl_tring_rsc(void *phl, u16 macid, u8 tid); 86*4882a593Smuzhiyun u16 rtw_phl_query_new_rx_num(void *phl); 87*4882a593Smuzhiyun struct rtw_recv_pkt *rtw_phl_query_rx_pkt(void *phl); 88*4882a593Smuzhiyun 89*4882a593Smuzhiyun void rtw_phl_rx_deferred_In_token(void *phl); 90*4882a593Smuzhiyun void rtw_phl_post_in_complete(void *phl, void *rxobj, u32 inbuf_len, u8 status_code); 91*4882a593Smuzhiyun enum rtw_phl_status rtw_phl_return_rxbuf(void *phl, u8* rxpkt); 92*4882a593Smuzhiyun 93*4882a593Smuzhiyun enum rtw_phl_status rtw_phl_recycle_tx_buf(void *phl, u8 *tx_buf_ptr); 94*4882a593Smuzhiyun 95*4882a593Smuzhiyun enum rtw_phl_status 96*4882a593Smuzhiyun rtw_phl_cmd_cfg_ampdu(void *phl, 97*4882a593Smuzhiyun struct rtw_wifi_role_t *wrole, 98*4882a593Smuzhiyun struct rtw_phl_stainfo_t *sta, 99*4882a593Smuzhiyun enum phl_cmd_type cmd_type, 100*4882a593Smuzhiyun u32 cmd_timeout); 101*4882a593Smuzhiyun 102*4882a593Smuzhiyun void rtw_phl_proc_cmd(void *phl, char proc_cmd, 103*4882a593Smuzhiyun struct rtw_proc_cmd *incmd, char *output, u32 out_len); 104*4882a593Smuzhiyun 105*4882a593Smuzhiyun void rtw_phl_get_fw_ver(void *phl, char *ver_str, u16 len); 106*4882a593Smuzhiyun 107*4882a593Smuzhiyun enum rtw_fw_status rtw_phl_get_fw_status(void *phl); 108*4882a593Smuzhiyun 109*4882a593Smuzhiyun /* command thread jobs */ 110*4882a593Smuzhiyun enum rtw_phl_status rtw_phl_job_run_func(void *phl, 111*4882a593Smuzhiyun void *func, void *priv, void *parm, char *name); 112*4882a593Smuzhiyun 113*4882a593Smuzhiyun /*WIFI Role management section*/ 114*4882a593Smuzhiyun u8 rtw_phl_wifi_role_alloc(void *phl, u8 *mac_addr, enum role_type type, 115*4882a593Smuzhiyun u8 ridx, struct rtw_wifi_role_t **wifi_role, bool ignore_hw_fail); 116*4882a593Smuzhiyun 117*4882a593Smuzhiyun enum rtw_phl_status 118*4882a593Smuzhiyun rtw_phl_cmd_wrole_change(void *phl, 119*4882a593Smuzhiyun struct rtw_wifi_role_t *wrole, 120*4882a593Smuzhiyun enum wr_chg_id chg_id, u8 *chg_info, u8 chg_info_len, 121*4882a593Smuzhiyun enum phl_cmd_type cmd_type, u32 cmd_timeout); 122*4882a593Smuzhiyun 123*4882a593Smuzhiyun void rtw_phl_wifi_role_free(void *phl, u8 role_idx); 124*4882a593Smuzhiyun 125*4882a593Smuzhiyun /*WIFI sta_info management section*/ 126*4882a593Smuzhiyun struct rtw_phl_stainfo_t * 127*4882a593Smuzhiyun rtw_phl_alloc_stainfo_sw(void *phl, 128*4882a593Smuzhiyun u8 *sta_addr, 129*4882a593Smuzhiyun struct rtw_wifi_role_t *wrole); 130*4882a593Smuzhiyun 131*4882a593Smuzhiyun enum rtw_phl_status 132*4882a593Smuzhiyun rtw_phl_free_stainfo_sw(void *phl, struct rtw_phl_stainfo_t *sta); 133*4882a593Smuzhiyun 134*4882a593Smuzhiyun enum rtw_phl_status 135*4882a593Smuzhiyun rtw_phl_cmd_alloc_stainfo(void *phl, 136*4882a593Smuzhiyun struct rtw_phl_stainfo_t **sta, 137*4882a593Smuzhiyun u8 *sta_addr, 138*4882a593Smuzhiyun struct rtw_wifi_role_t *wrole, 139*4882a593Smuzhiyun bool alloc, 140*4882a593Smuzhiyun bool only_hw, 141*4882a593Smuzhiyun enum phl_cmd_type cmd_type, 142*4882a593Smuzhiyun u32 cmd_timeout); 143*4882a593Smuzhiyun 144*4882a593Smuzhiyun enum rtw_phl_status 145*4882a593Smuzhiyun rtw_phl_cmd_change_stainfo(void *phl, 146*4882a593Smuzhiyun struct rtw_phl_stainfo_t *sta, enum sta_chg_id chg_id, 147*4882a593Smuzhiyun u8 *chg_info, u8 chg_info_len, 148*4882a593Smuzhiyun enum phl_cmd_type cmd_type, u32 cmd_timeout); 149*4882a593Smuzhiyun 150*4882a593Smuzhiyun enum rtw_phl_status 151*4882a593Smuzhiyun rtw_phl_cmd_update_media_status(void *phl, 152*4882a593Smuzhiyun struct rtw_phl_stainfo_t *sta, 153*4882a593Smuzhiyun u8 *sta_addr, 154*4882a593Smuzhiyun bool is_connect, 155*4882a593Smuzhiyun enum phl_cmd_type cmd_type, 156*4882a593Smuzhiyun u32 cmd_timeout); 157*4882a593Smuzhiyun 158*4882a593Smuzhiyun struct rtw_phl_stainfo_t * 159*4882a593Smuzhiyun rtw_phl_get_stainfo_self(void *phl, struct rtw_wifi_role_t *wrole); 160*4882a593Smuzhiyun 161*4882a593Smuzhiyun struct rtw_phl_stainfo_t * 162*4882a593Smuzhiyun rtw_phl_get_stainfo_by_addr(void *phl, struct rtw_wifi_role_t *wrole, u8 *addr); 163*4882a593Smuzhiyun 164*4882a593Smuzhiyun struct rtw_phl_stainfo_t * 165*4882a593Smuzhiyun rtw_phl_get_stainfo_by_macid(void *phl, u16 macid); 166*4882a593Smuzhiyun 167*4882a593Smuzhiyun u8 168*4882a593Smuzhiyun rtw_phl_get_sta_rssi(struct rtw_phl_stainfo_t *sta); 169*4882a593Smuzhiyun 170*4882a593Smuzhiyun enum rtw_phl_status 171*4882a593Smuzhiyun rtw_phl_query_rainfo(void *phl, struct rtw_phl_stainfo_t *phl_sta, 172*4882a593Smuzhiyun struct rtw_phl_rainfo *ra_info); 173*4882a593Smuzhiyun 174*4882a593Smuzhiyun void rtw_phl_sta_up_rx_bcn(void *phl, struct rtw_bcn_pkt_info *info); 175*4882a593Smuzhiyun 176*4882a593Smuzhiyun /*macid management section, temporary for debuge*/ 177*4882a593Smuzhiyun u16 178*4882a593Smuzhiyun rtw_phl_get_macid_max_num(void *phl); 179*4882a593Smuzhiyun 180*4882a593Smuzhiyun u16 181*4882a593Smuzhiyun rtw_phl_wrole_bcmc_id_get(void *phl, struct rtw_wifi_role_t *wrole); 182*4882a593Smuzhiyun 183*4882a593Smuzhiyun u8 184*4882a593Smuzhiyun rtw_phl_macid_is_bmc(void *phl, u16 macid); 185*4882a593Smuzhiyun 186*4882a593Smuzhiyun u8 187*4882a593Smuzhiyun rtw_phl_macid_is_used(void *phl, u16 macid); 188*4882a593Smuzhiyun 189*4882a593Smuzhiyun enum rtw_phl_status 190*4882a593Smuzhiyun rtw_phl_cmd_add_key(void *phl, 191*4882a593Smuzhiyun struct rtw_phl_stainfo_t *sta, 192*4882a593Smuzhiyun struct phl_sec_param_h *crypt, 193*4882a593Smuzhiyun u8 *keybuf, 194*4882a593Smuzhiyun enum phl_cmd_type cmd_type, 195*4882a593Smuzhiyun u32 cmd_timeout); 196*4882a593Smuzhiyun 197*4882a593Smuzhiyun enum rtw_phl_status 198*4882a593Smuzhiyun rtw_phl_cmd_del_key(void *phl, 199*4882a593Smuzhiyun struct rtw_phl_stainfo_t *sta, 200*4882a593Smuzhiyun struct phl_sec_param_h *crypt, 201*4882a593Smuzhiyun enum phl_cmd_type cmd_type, 202*4882a593Smuzhiyun u32 cmd_timeout); 203*4882a593Smuzhiyun /* phy msg forwarder functions*/ 204*4882a593Smuzhiyun enum rtw_phl_status rtw_phl_msg_hub_register_recver(void* phl, 205*4882a593Smuzhiyun struct phl_msg_receiver* ctx, enum phl_msg_recver_layer layer); 206*4882a593Smuzhiyun enum rtw_phl_status rtw_phl_msg_hub_update_recver_mask(void* phl, 207*4882a593Smuzhiyun enum phl_msg_recver_layer layer, u8* mdl_id, u32 len, u8 clr); 208*4882a593Smuzhiyun enum rtw_phl_status rtw_phl_msg_hub_deregister_recver(void* phl, 209*4882a593Smuzhiyun enum phl_msg_recver_layer layer); 210*4882a593Smuzhiyun enum rtw_phl_status rtw_phl_msg_hub_send(void* phl, 211*4882a593Smuzhiyun struct phl_msg_attribute* attr, struct phl_msg* msg); 212*4882a593Smuzhiyun 213*4882a593Smuzhiyun 214*4882a593Smuzhiyun u8 rtw_phl_trans_sec_mode(u8 unicast, u8 multicast); 215*4882a593Smuzhiyun 216*4882a593Smuzhiyun u8 rtw_phl_get_sec_cam_idx(void *phl, struct rtw_phl_stainfo_t *sta, 217*4882a593Smuzhiyun u8 keyid, u8 key_type); 218*4882a593Smuzhiyun 219*4882a593Smuzhiyun void rtw_phl_test_txtb_cfg(struct rtw_phl_com_t* phl_com, void *buf, 220*4882a593Smuzhiyun u32 buf_len, u8 *cfg_bssid, u16 cfg_aid, u8 cfg_bsscolor); 221*4882a593Smuzhiyun /* command dispatcher module section*/ 222*4882a593Smuzhiyun enum rtw_phl_status rtw_phl_register_module(void *phl, u8 band_idx, 223*4882a593Smuzhiyun enum phl_module_id id, 224*4882a593Smuzhiyun struct phl_bk_module_ops* ops); 225*4882a593Smuzhiyun enum rtw_phl_status rtw_phl_deregister_module(void *phl,u8 band_idx, 226*4882a593Smuzhiyun enum phl_module_id id); 227*4882a593Smuzhiyun u8 rtw_phl_is_fg_empty(void *phl, u8 band_idx); 228*4882a593Smuzhiyun /* opt: refer to enum phl_msg_opt */ 229*4882a593Smuzhiyun enum rtw_phl_status rtw_phl_send_msg_to_dispr(void *phl, struct phl_msg* msg, 230*4882a593Smuzhiyun struct phl_msg_attribute* attr, u32* msg_hdl); 231*4882a593Smuzhiyun enum rtw_phl_status rtw_phl_cancel_dispr_msg(void *phl, u8 band_idx, u32* msg_hdl); 232*4882a593Smuzhiyun 233*4882a593Smuzhiyun enum rtw_phl_status rtw_phl_add_cmd_token_req(void *phl, u8 band_idx, 234*4882a593Smuzhiyun struct phl_cmd_token_req* req, u32* req_hdl); 235*4882a593Smuzhiyun enum rtw_phl_status rtw_phl_cancel_cmd_token(void *phl, u8 band_idx, u32* req_hdl); 236*4882a593Smuzhiyun enum rtw_phl_status rtw_phl_set_cur_cmd_info(void *phl, u8 band_idx, 237*4882a593Smuzhiyun struct phl_module_op_info* op_info); 238*4882a593Smuzhiyun enum rtw_phl_status rtw_phl_query_cur_cmd_info(void *phl, u8 band_idx, 239*4882a593Smuzhiyun struct phl_module_op_info* op_info); 240*4882a593Smuzhiyun 241*4882a593Smuzhiyun enum rtw_phl_status rtw_phl_free_cmd_token(void *phl, u8 band_idx, u32* req_hdl); 242*4882a593Smuzhiyun enum rtw_phl_status rtw_phl_set_bk_module_info(void *phl, u8 band_idx, 243*4882a593Smuzhiyun enum phl_module_id id, struct phl_module_op_info* op_info); 244*4882a593Smuzhiyun enum rtw_phl_status rtw_phl_query_bk_module_info(void *phl, u8 band_idx, 245*4882a593Smuzhiyun enum phl_module_id id, struct phl_module_op_info* op_info); 246*4882a593Smuzhiyun enum rtw_phl_status rtw_phl_set_msg_disp_seq(void *phl, 247*4882a593Smuzhiyun struct phl_msg_attribute *attr, 248*4882a593Smuzhiyun struct msg_self_def_seq* seq); 249*4882a593Smuzhiyun 250*4882a593Smuzhiyun /* BA session management */ 251*4882a593Smuzhiyun void rtw_phl_stop_rx_ba_session(void *phl, struct rtw_phl_stainfo_t *sta, 252*4882a593Smuzhiyun u16 tid); 253*4882a593Smuzhiyun enum rtw_phl_status 254*4882a593Smuzhiyun rtw_phl_start_rx_ba_session(void *phl, struct rtw_phl_stainfo_t *sta, 255*4882a593Smuzhiyun u8 dialog_token, u16 timeout, u16 start_seq_num, 256*4882a593Smuzhiyun u16 ba_policy, u16 tid, u16 buf_size); 257*4882a593Smuzhiyun void rtw_phl_rx_bar(void *phl, struct rtw_phl_stainfo_t *sta, u8 tid, u16 seq); 258*4882a593Smuzhiyun void rtw_phl_flush_reorder_buf(void *phl, struct rtw_phl_stainfo_t *sta); 259*4882a593Smuzhiyun enum rtw_phl_status 260*4882a593Smuzhiyun rtw_phl_enter_mon_mode(void *phl, struct rtw_wifi_role_t *wrole); 261*4882a593Smuzhiyun enum rtw_phl_status 262*4882a593Smuzhiyun rtw_phl_leave_mon_mode(void *phl, struct rtw_wifi_role_t *wrole); 263*4882a593Smuzhiyun #ifdef RTW_PHL_BCN 264*4882a593Smuzhiyun enum rtw_phl_status rtw_phl_free_bcn_entry(void *phl, struct rtw_wifi_role_t *wrole); 265*4882a593Smuzhiyun enum rtw_phl_status 266*4882a593Smuzhiyun rtw_phl_cmd_issue_beacon(void *phl, 267*4882a593Smuzhiyun struct rtw_wifi_role_t *wifi_role, 268*4882a593Smuzhiyun struct rtw_bcn_info_cmn *bcn_cmn, 269*4882a593Smuzhiyun enum phl_cmd_type cmd_type, 270*4882a593Smuzhiyun u32 cmd_timeout); 271*4882a593Smuzhiyun enum rtw_phl_status 272*4882a593Smuzhiyun rtw_phl_cmd_stop_beacon(void *phl, 273*4882a593Smuzhiyun struct rtw_wifi_role_t *wifi_role, 274*4882a593Smuzhiyun u8 stop, 275*4882a593Smuzhiyun enum phl_cmd_type cmd_type, 276*4882a593Smuzhiyun u32 cmd_timeout); 277*4882a593Smuzhiyun #endif 278*4882a593Smuzhiyun 279*4882a593Smuzhiyun #ifdef CONFIG_CMD_DISP 280*4882a593Smuzhiyun enum rtw_phl_status 281*4882a593Smuzhiyun rtw_phl_cmd_chg_op_chdef(struct rtw_wifi_role_t *wrole, 282*4882a593Smuzhiyun struct rtw_chan_def *new_chdef, bool cmd_wait, u32 cmd_timeout, 283*4882a593Smuzhiyun void (*chg_opch_done)(void *priv, u8 ridx, enum rtw_phl_status status)); 284*4882a593Smuzhiyun 285*4882a593Smuzhiyun 286*4882a593Smuzhiyun enum rtw_phl_status 287*4882a593Smuzhiyun rtw_phl_cmd_set_ch_bw(struct rtw_wifi_role_t *wifi_role, 288*4882a593Smuzhiyun struct rtw_chan_def *chdef, 289*4882a593Smuzhiyun bool do_rfk, 290*4882a593Smuzhiyun enum phl_cmd_type cmd_type, 291*4882a593Smuzhiyun u32 cmd_timeout); 292*4882a593Smuzhiyun 293*4882a593Smuzhiyun enum rtw_phl_status 294*4882a593Smuzhiyun rtw_phl_cmd_enqueue(void *phl, 295*4882a593Smuzhiyun enum phl_band_idx band_idx, 296*4882a593Smuzhiyun enum phl_msg_evt_id evt_id, 297*4882a593Smuzhiyun u8 *cmd_buf, 298*4882a593Smuzhiyun u32 cmd_len, 299*4882a593Smuzhiyun void (*core_cmd_complete)(void *priv, u8 *cmd, u32 cmd_len, enum rtw_phl_status status), 300*4882a593Smuzhiyun enum phl_cmd_type cmd_type, 301*4882a593Smuzhiyun u32 cmd_timeout); 302*4882a593Smuzhiyun 303*4882a593Smuzhiyun #endif /*CONFIG_CMD_DISP*/ 304*4882a593Smuzhiyun 305*4882a593Smuzhiyun u8 rtw_phl_get_cur_ch(struct rtw_wifi_role_t *wifi_role); 306*4882a593Smuzhiyun enum rtw_phl_status 307*4882a593Smuzhiyun rtw_phl_get_cur_hal_chdef(struct rtw_wifi_role_t *wifi_role, 308*4882a593Smuzhiyun struct rtw_chan_def *cur_chandef); 309*4882a593Smuzhiyun 310*4882a593Smuzhiyun enum band_type rtw_phl_get_band_type(u8 chan); 311*4882a593Smuzhiyun u8 rtw_phl_get_center_ch(u8 ch, 312*4882a593Smuzhiyun enum channel_width bw, enum chan_offset offset); 313*4882a593Smuzhiyun 314*4882a593Smuzhiyun enum rtw_phl_status 315*4882a593Smuzhiyun rtw_phl_cmd_dfs_tx_pause(struct rtw_wifi_role_t *wifi_role, bool pause, 316*4882a593Smuzhiyun enum phl_cmd_type cmd_type, u32 cmd_timeout); 317*4882a593Smuzhiyun 318*4882a593Smuzhiyun u8 319*4882a593Smuzhiyun rtw_phl_get_operating_class( 320*4882a593Smuzhiyun struct rtw_chan_def chan_def 321*4882a593Smuzhiyun ); 322*4882a593Smuzhiyun 323*4882a593Smuzhiyun bool 324*4882a593Smuzhiyun rtw_phl_get_chandef_from_operating_class( 325*4882a593Smuzhiyun u8 channel, 326*4882a593Smuzhiyun u8 operating_class, 327*4882a593Smuzhiyun struct rtw_chan_def *chan_def 328*4882a593Smuzhiyun ); 329*4882a593Smuzhiyun /* 330*4882a593Smuzhiyun * export API from sw cap module 331*4882a593Smuzhiyun */ 332*4882a593Smuzhiyun void rtw_phl_final_cap_decision(void *phl); 333*4882a593Smuzhiyun 334*4882a593Smuzhiyun 335*4882a593Smuzhiyun enum rtw_phl_status 336*4882a593Smuzhiyun rtw_phl_get_dft_proto_cap(void *phl, u8 hw_band, enum role_type rtype, 337*4882a593Smuzhiyun struct protocol_cap_t *role_proto_cap); 338*4882a593Smuzhiyun enum rtw_phl_status 339*4882a593Smuzhiyun rtw_phl_get_dft_cap(void *phl, u8 hw_band, struct role_cap_t *role_cap); 340*4882a593Smuzhiyun 341*4882a593Smuzhiyun void rtw_phl_mac_dbg_status_dump(void *phl, u32 *val, u8 *en); 342*4882a593Smuzhiyun 343*4882a593Smuzhiyun #ifdef CONFIG_DBCC_SUPPORT 344*4882a593Smuzhiyun enum rtw_phl_status 345*4882a593Smuzhiyun rtw_phl_dbcc_test(void *phl, enum dbcc_test_id id, void *param); 346*4882a593Smuzhiyun #endif 347*4882a593Smuzhiyun /* 348*4882a593Smuzhiyun * API for config channel info CR 349*4882a593Smuzhiyun */ 350*4882a593Smuzhiyun #ifdef CONFIG_PHL_CHANNEL_INFO 351*4882a593Smuzhiyun enum rtw_phl_status 352*4882a593Smuzhiyun rtw_phl_cmd_cfg_chinfo(void *phl, struct rtw_phl_stainfo_t *sta, 353*4882a593Smuzhiyun u8 enable, enum phl_cmd_type cmd_type, u32 cmd_timeout); 354*4882a593Smuzhiyun enum rtw_phl_status rtw_phl_query_chan_info(void *phl, u32 buf_len, 355*4882a593Smuzhiyun u8* chan_info_buffer, u32 *length, struct csi_header_t *csi_header); 356*4882a593Smuzhiyun #endif /* CONFIG_PHL_CHANNEL_INFO */ 357*4882a593Smuzhiyun 358*4882a593Smuzhiyun void rtw_phl_set_edcca_mode(void *phl, enum rtw_edcca_mode mode); 359*4882a593Smuzhiyun enum rtw_edcca_mode rtw_phl_get_edcca_mode(void *phl); 360*4882a593Smuzhiyun 361*4882a593Smuzhiyun bool rtw_phl_set_user_def_chplan(void *phl, struct rtw_user_def_chplan *udef); 362*4882a593Smuzhiyun bool rtw_phl_valid_regulation_domain(u8 domain); 363*4882a593Smuzhiyun bool rtw_phl_regulation_set_domain(void *phl, u8 domain, 364*4882a593Smuzhiyun enum regulation_rsn reason); 365*4882a593Smuzhiyun bool rtw_phl_regulation_set_country(void *phl, char *country, 366*4882a593Smuzhiyun enum regulation_rsn reason); 367*4882a593Smuzhiyun bool rtw_phl_regulation_set_capability(void *phl, 368*4882a593Smuzhiyun enum rtw_regulation_capability capability); 369*4882a593Smuzhiyun bool rtw_phl_regulation_query_chplan( 370*4882a593Smuzhiyun void *phl, enum rtw_regulation_query type, 371*4882a593Smuzhiyun struct rtw_chlist *filter, 372*4882a593Smuzhiyun struct rtw_regulation_chplan *plan); 373*4882a593Smuzhiyun bool rtw_phl_query_specific_chplan(void *phl, u8 domain, 374*4882a593Smuzhiyun struct rtw_regulation_chplan *plan); 375*4882a593Smuzhiyun bool rtw_phl_query_country_chplan(char *country, 376*4882a593Smuzhiyun struct rtw_regulation_country_chplan *country_chplan); 377*4882a593Smuzhiyun bool rtw_phl_generate_scan_instance(struct instance_strategy *strategy, 378*4882a593Smuzhiyun struct rtw_regulation_chplan *chplan, 379*4882a593Smuzhiyun struct instance *inst); 380*4882a593Smuzhiyun bool rtw_phl_scan_instance_insert_ch(void *phl, struct instance *inst, 381*4882a593Smuzhiyun enum band_type band, u8 channel, 382*4882a593Smuzhiyun u8 strategy_period); 383*4882a593Smuzhiyun bool rtw_phl_regulation_valid_channel(void *phl, enum band_type band, 384*4882a593Smuzhiyun u16 channel, u8 reject); 385*4882a593Smuzhiyun bool rtw_phl_regulation_dfs_channel(void *phl, enum band_type band, 386*4882a593Smuzhiyun u16 channel, bool *dfs); 387*4882a593Smuzhiyun bool rtw_phl_query_regulation_info(void *phl, struct rtw_regulation_info *info); 388*4882a593Smuzhiyun bool rtw_phl_regulation_query_ch(void *phl, enum band_type band, u8 channel, 389*4882a593Smuzhiyun struct rtw_regulation_channel *ch); 390*4882a593Smuzhiyun u8 rtw_phl_get_domain_regulation_2g(u8 domain); 391*4882a593Smuzhiyun u8 rtw_phl_get_domain_regulation_5g(u8 domain); 392*4882a593Smuzhiyun 393*4882a593Smuzhiyun enum rtw_phl_status rtw_phl_get_mac_addr_efuse(void* phl, u8 *addr); 394*4882a593Smuzhiyun 395*4882a593Smuzhiyun /** 396*4882a593Smuzhiyun * rtw_phl_usb_tx_ep_id - query USB tx end point index 397*4882a593Smuzhiyun * identified by macid, tid and band 398*4882a593Smuzhiyun * @macid: input target macid is 0 ~ 127 399*4882a593Smuzhiyun * @tid: input target tid, range is 0 ~ 7 400*4882a593Smuzhiyun * @band: input target band, 0 for band 0 / 1 for band 1 401*4882a593Smuzhiyun * 402*4882a593Smuzhiyun * returns corresponding end point idx of a specific tid 403*4882a593Smuzhiyun */ 404*4882a593Smuzhiyun u8 rtw_phl_usb_tx_ep_id(void *phl, u16 macid, u8 tid, u8 band); 405*4882a593Smuzhiyun 406*4882a593Smuzhiyun enum rtw_phl_status 407*4882a593Smuzhiyun rtw_phl_cfg_trx_path(void* phl, enum rf_path tx, u8 tx_nss, 408*4882a593Smuzhiyun enum rf_path rx, u8 rx_nss); 409*4882a593Smuzhiyun 410*4882a593Smuzhiyun void rtw_phl_reset_stat_ma_rssi(struct rtw_phl_com_t *phl_com); 411*4882a593Smuzhiyun 412*4882a593Smuzhiyun u8 413*4882a593Smuzhiyun rtw_phl_get_ma_rssi(struct rtw_phl_com_t *phl_com, 414*4882a593Smuzhiyun enum rtw_rssi_type rssi_type); 415*4882a593Smuzhiyun 416*4882a593Smuzhiyun bool rtw_phl_chanctx_chk(void *phl, struct rtw_wifi_role_t *wifi_role, 417*4882a593Smuzhiyun u8 chan, enum channel_width bw, enum chan_offset offset); 418*4882a593Smuzhiyun bool rtw_phl_chanctx_add(void *phl, struct rtw_wifi_role_t *wifi_role, 419*4882a593Smuzhiyun u8 *chan, enum channel_width *bw, enum chan_offset *offset); 420*4882a593Smuzhiyun int rtw_phl_chanctx_del(void *phl, struct rtw_wifi_role_t *wifi_role, 421*4882a593Smuzhiyun struct rtw_chan_def *chan_def); 422*4882a593Smuzhiyun enum rtw_phl_status rtw_phl_chanctx_del_no_self(void *phl, struct rtw_wifi_role_t *wifi_role); 423*4882a593Smuzhiyun int rtw_phl_mr_get_chanctx_num(void *phl, struct rtw_wifi_role_t *wifi_role); 424*4882a593Smuzhiyun enum rtw_phl_status rtw_phl_mr_get_chandef(void *phl, struct rtw_wifi_role_t *wifi_role, 425*4882a593Smuzhiyun struct rtw_chan_def *chandef); 426*4882a593Smuzhiyun enum rtw_phl_status rtw_phl_mr_upt_chandef(void *phl, struct rtw_wifi_role_t *wifi_role); 427*4882a593Smuzhiyun 428*4882a593Smuzhiyun #ifdef CONFIG_MCC_SUPPORT 429*4882a593Smuzhiyun u8 rtw_phl_mr_query_mcc_inprogress (void *phl, struct rtw_wifi_role_t *wrole, 430*4882a593Smuzhiyun enum rtw_phl_mcc_chk_inprocess_type check_type); 431*4882a593Smuzhiyun #endif 432*4882a593Smuzhiyun 433*4882a593Smuzhiyun u8 rtw_phl_mr_dump_mac_addr(void *phl, 434*4882a593Smuzhiyun struct rtw_wifi_role_t *wifi_role); 435*4882a593Smuzhiyun u8 rtw_phl_mr_buddy_dump_mac_addr(void *phl, 436*4882a593Smuzhiyun struct rtw_wifi_role_t *wifi_role); 437*4882a593Smuzhiyun enum rtw_phl_status 438*4882a593Smuzhiyun rtw_phl_mr_rx_filter(void *phl, struct rtw_wifi_role_t *wrole); 439*4882a593Smuzhiyun 440*4882a593Smuzhiyun #ifdef CONFIG_FSM 441*4882a593Smuzhiyun enum rtw_phl_status 442*4882a593Smuzhiyun rtw_phl_mr_offch_hdl(void *phl, 443*4882a593Smuzhiyun struct rtw_wifi_role_t *wrole, 444*4882a593Smuzhiyun bool off_ch, 445*4882a593Smuzhiyun void *obj_priv, 446*4882a593Smuzhiyun u8 (*issue_null_data)(void *priv, u8 ridx, bool ps), 447*4882a593Smuzhiyun struct rtw_chan_def *chandef); 448*4882a593Smuzhiyun #endif 449*4882a593Smuzhiyun void rtw_phl_mr_ops_init (void *phl, struct rtw_phl_mr_ops *mr_ops); 450*4882a593Smuzhiyun 451*4882a593Smuzhiyun #ifdef PHL_MR_PROC_CMD 452*4882a593Smuzhiyun void rtw_phl_mr_dump_info(void *phl, bool show_caller); 453*4882a593Smuzhiyun void rtw_phl_mr_dump_band_ctl(void *phl, bool show_caller); 454*4882a593Smuzhiyun bool rtw_phl_chanctx_test(void *phl, struct rtw_wifi_role_t *wifi_role, bool is_add, 455*4882a593Smuzhiyun u8 *chan, enum channel_width *bw, enum chan_offset *offset); 456*4882a593Smuzhiyun #endif 457*4882a593Smuzhiyun void rtw_phl_sta_dump_info(void *phl, bool show_caller, struct rtw_wifi_role_t *wr, u8 mode); 458*4882a593Smuzhiyun 459*4882a593Smuzhiyun bool rtw_phl_mr_query_info(void *phl, struct rtw_wifi_role_t *wrole, 460*4882a593Smuzhiyun struct mr_query_info *info); 461*4882a593Smuzhiyun 462*4882a593Smuzhiyun u8 rtw_phl_mr_get_opch_list(void *phl, struct rtw_wifi_role_t *wifi_role, 463*4882a593Smuzhiyun struct rtw_chan_def *chdef_list, u8 list_size); 464*4882a593Smuzhiyun 465*4882a593Smuzhiyun void rtw_phl_mr_dump_cur_chandef(void *phl, struct rtw_wifi_role_t *wifi_role); 466*4882a593Smuzhiyun 467*4882a593Smuzhiyun enum mr_op_mode 468*4882a593Smuzhiyun rtw_phl_mr_get_opmode(void *phl, struct rtw_wifi_role_t *wrole); 469*4882a593Smuzhiyun 470*4882a593Smuzhiyun void rtw_phl_led_set_ctrl_mode(void *phl, enum rtw_led_id led_id, 471*4882a593Smuzhiyun enum rtw_led_ctrl_mode ctrl_mode); 472*4882a593Smuzhiyun void rtw_phl_led_set_toggle_intervals(void *phl, u8 intervals_idx, 473*4882a593Smuzhiyun u32 *intervals, u8 intervals_len); 474*4882a593Smuzhiyun void rtw_phl_led_set_action(void *phl, enum rtw_led_event event, 475*4882a593Smuzhiyun enum rtw_led_state state_condition, 476*4882a593Smuzhiyun struct rtw_led_action_args_t *action_args_arr, 477*4882a593Smuzhiyun u8 action_args_arr_len, u32 toggle_delay_unit); 478*4882a593Smuzhiyun void rtw_phl_led_control(void *phl, enum rtw_led_event led_event); 479*4882a593Smuzhiyun 480*4882a593Smuzhiyun #ifdef CONFIG_RTW_ACS 481*4882a593Smuzhiyun u16 rtw_phl_acs_get_channel_by_idx(void *phl, u8 ch_idx); 482*4882a593Smuzhiyun u8 rtw_phl_acs_get_clm_ratio_by_idx(void *phl, u8 ch_idx); 483*4882a593Smuzhiyun s8 rtw_phl_noise_query_by_idx(void *phl, u8 ch_idx); 484*4882a593Smuzhiyun #endif /* CONFIG_RTW_ACS */ 485*4882a593Smuzhiyun 486*4882a593Smuzhiyun void rtw_phl_get_env_rpt(void *phl, struct rtw_env_report *env_rpt, struct rtw_wifi_role_t *wrole); 487*4882a593Smuzhiyun 488*4882a593Smuzhiyun #ifdef RTW_WKARD_DYNAMIC_BFEE_CAP 489*4882a593Smuzhiyun enum rtw_phl_status 490*4882a593Smuzhiyun rtw_phl_bfee_ctrl(void *phl, struct rtw_wifi_role_t *wrole, bool ctrl); 491*4882a593Smuzhiyun #endif 492*4882a593Smuzhiyun 493*4882a593Smuzhiyun enum rtw_phl_status 494*4882a593Smuzhiyun rtw_phl_snd_init_ops_send_ndpa(void *phl, 495*4882a593Smuzhiyun enum rtw_phl_status (*snd_send_ndpa)(void *, 496*4882a593Smuzhiyun struct rtw_wifi_role_t *, 497*4882a593Smuzhiyun u8 *, 498*4882a593Smuzhiyun u32 *, 499*4882a593Smuzhiyun enum channel_width)); 500*4882a593Smuzhiyun 501*4882a593Smuzhiyun u8 rtw_phl_snd_chk_in_progress(void *phl); 502*4882a593Smuzhiyun 503*4882a593Smuzhiyun enum rtw_phl_status 504*4882a593Smuzhiyun rtw_phl_sound_start(void *phl, u8 wrole_idx, u8 st_dlg_tkn, u8 period, u8 test_flag); 505*4882a593Smuzhiyun 506*4882a593Smuzhiyun enum rtw_phl_status 507*4882a593Smuzhiyun rtw_phl_sound_abort(void *phl); 508*4882a593Smuzhiyun 509*4882a593Smuzhiyun enum rtw_phl_status 510*4882a593Smuzhiyun rtw_phl_set_power_lmt(void *phl, u8 hw_band); 511*4882a593Smuzhiyun 512*4882a593Smuzhiyun s8 rtw_phl_get_power_limit(void *phl, u8 hw_band, 513*4882a593Smuzhiyun u16 rate, u8 bandwidth, u8 beamforming, u8 tx_num, u8 channel); 514*4882a593Smuzhiyun 515*4882a593Smuzhiyun void 516*4882a593Smuzhiyun rtw_phl_enable_ext_pwr_lmt(void *phl, u8 hw_band, 517*4882a593Smuzhiyun struct rtw_phl_ext_pwr_lmt_info *ext_pwr_lmt_info); 518*4882a593Smuzhiyun 519*4882a593Smuzhiyun void rtw_phl_init_ppdu_sts_para(struct rtw_phl_com_t *phl_com, 520*4882a593Smuzhiyun bool en_psts_per_pkt, bool psts_ampdu, 521*4882a593Smuzhiyun u8 rx_fltr); 522*4882a593Smuzhiyun 523*4882a593Smuzhiyun enum rtw_phl_status rtw_phl_rf_on(void *phl); 524*4882a593Smuzhiyun enum rtw_phl_status rtw_phl_rf_off(void *phl); 525*4882a593Smuzhiyun 526*4882a593Smuzhiyun 527*4882a593Smuzhiyun #ifdef CONFIG_PHL_TWT 528*4882a593Smuzhiyun enum rtw_phl_status 529*4882a593Smuzhiyun rtw_phl_twt_alloc_twt_config(void *phl, struct rtw_wifi_role_t *role, 530*4882a593Smuzhiyun struct rtw_phl_twt_setup_info setup_info, u8 benable, u8 *id); 531*4882a593Smuzhiyun 532*4882a593Smuzhiyun enum rtw_phl_status 533*4882a593Smuzhiyun rtw_phl_twt_free_twt_config(void *phl, u8 id); 534*4882a593Smuzhiyun 535*4882a593Smuzhiyun enum rtw_phl_status 536*4882a593Smuzhiyun rtw_phl_twt_enable_twt_config(void *phl, u8 id); 537*4882a593Smuzhiyun 538*4882a593Smuzhiyun enum rtw_phl_status 539*4882a593Smuzhiyun rtw_phl_twt_free_all_twt_by_role(void *phl, struct rtw_wifi_role_t *role); 540*4882a593Smuzhiyun 541*4882a593Smuzhiyun enum rtw_phl_status 542*4882a593Smuzhiyun rtw_phl_twt_disable_all_twt_by_role(void *phl, struct rtw_wifi_role_t *role); 543*4882a593Smuzhiyun 544*4882a593Smuzhiyun enum rtw_phl_status 545*4882a593Smuzhiyun rtw_phl_twt_enable_all_twt_by_role(void *phl, struct rtw_wifi_role_t *role); 546*4882a593Smuzhiyun 547*4882a593Smuzhiyun enum rtw_phl_status 548*4882a593Smuzhiyun rtw_phl_twt_add_sta_info(void *phl, struct rtw_phl_stainfo_t *phl_sta, 549*4882a593Smuzhiyun u8 config_id, u8 id); 550*4882a593Smuzhiyun 551*4882a593Smuzhiyun enum rtw_phl_status 552*4882a593Smuzhiyun rtw_phl_twt_teardown_sta(void *phl, struct rtw_phl_stainfo_t *phl_sta, 553*4882a593Smuzhiyun struct rtw_phl_twt_flow_field *twt_flow, u8 *bitmap); 554*4882a593Smuzhiyun 555*4882a593Smuzhiyun enum rtw_phl_status 556*4882a593Smuzhiyun rtw_phl_twt_get_new_flow_id(void *phl, struct rtw_phl_stainfo_t *phl_sta, u8 *id); 557*4882a593Smuzhiyun 558*4882a593Smuzhiyun 559*4882a593Smuzhiyun enum rtw_phl_status 560*4882a593Smuzhiyun rtw_phl_twt_accept_for_sta_mode(void *phl, struct rtw_phl_stainfo_t *phl_sta, 561*4882a593Smuzhiyun struct rtw_phl_twt_setup_info *setup_info, u8 *id); 562*4882a593Smuzhiyun 563*4882a593Smuzhiyun enum rtw_phl_status 564*4882a593Smuzhiyun rtw_phl_twt_teardown_for_sta_mode(void *phl, struct rtw_phl_stainfo_t *phl_sta, 565*4882a593Smuzhiyun struct rtw_phl_twt_flow_field *twt_flow); 566*4882a593Smuzhiyun 567*4882a593Smuzhiyun enum rtw_phl_status 568*4882a593Smuzhiyun rtw_phl_twt_delete_all_sta_info(void *phl, struct rtw_phl_stainfo_t *phl_sta, 569*4882a593Smuzhiyun u8 *bitmap); 570*4882a593Smuzhiyun 571*4882a593Smuzhiyun enum rtw_phl_status 572*4882a593Smuzhiyun rtw_phl_twt_get_target_wake_time(void *phl, u8 port, u8 id, u16 offset, u32 *tsf_h, 573*4882a593Smuzhiyun u32 *tsf_l); 574*4882a593Smuzhiyun 575*4882a593Smuzhiyun enum rtw_phl_status 576*4882a593Smuzhiyun rtw_phl_twt_sta_announce_to_fw(void *phl, u16 macid); 577*4882a593Smuzhiyun 578*4882a593Smuzhiyun enum rtw_phl_status 579*4882a593Smuzhiyun rtw_phl_twt_handle_c2h(void *phl_com, void *c); 580*4882a593Smuzhiyun 581*4882a593Smuzhiyun enum rtw_phl_status 582*4882a593Smuzhiyun rtw_phl_twt_fill_twt_element(struct rtw_phl_twt_element *twt_ele, u8 *buf, 583*4882a593Smuzhiyun u8 *length); 584*4882a593Smuzhiyun 585*4882a593Smuzhiyun enum rtw_phl_status 586*4882a593Smuzhiyun rtw_phl_twt_fill_flow_field(struct rtw_phl_twt_flow_field *twt_flow, u8 *buf, 587*4882a593Smuzhiyun u16 *length); 588*4882a593Smuzhiyun enum rtw_phl_status 589*4882a593Smuzhiyun rtw_phl_twt_parse_element(u8 *twt_ele, u16 length, 590*4882a593Smuzhiyun struct rtw_phl_twt_element *twt_element); 591*4882a593Smuzhiyun 592*4882a593Smuzhiyun enum rtw_phl_status 593*4882a593Smuzhiyun rtw_phl_twt_parse_setup_info(u8 *pkt, u16 length, 594*4882a593Smuzhiyun struct rtw_phl_twt_setup_info *setup_info); 595*4882a593Smuzhiyun 596*4882a593Smuzhiyun enum rtw_phl_status 597*4882a593Smuzhiyun rtw_phl_twt_parse_flow_field(u8 *ie_twt_flow, u16 length, 598*4882a593Smuzhiyun struct rtw_phl_twt_flow_field *twt_flow); 599*4882a593Smuzhiyun #endif /* CONFIG_PHL_TWT */ 600*4882a593Smuzhiyun 601*4882a593Smuzhiyun enum rtw_phl_status 602*4882a593Smuzhiyun rtw_phl_snd_cmd_set_vht_gid(void *phl, 603*4882a593Smuzhiyun struct rtw_wifi_role_t *wrole, 604*4882a593Smuzhiyun struct rtw_phl_gid_pos_tbl *tbl); 605*4882a593Smuzhiyun 606*4882a593Smuzhiyun enum rtw_phl_status 607*4882a593Smuzhiyun rtw_phl_snd_cmd_set_aid(void *phl, 608*4882a593Smuzhiyun struct rtw_wifi_role_t *wrole, 609*4882a593Smuzhiyun struct rtw_phl_stainfo_t *sta, 610*4882a593Smuzhiyun u16 aid); 611*4882a593Smuzhiyun 612*4882a593Smuzhiyun #ifdef RTW_WKARD_P2PPS_REFINE 613*4882a593Smuzhiyun #ifdef CONFIG_PHL_P2PPS 614*4882a593Smuzhiyun enum rtw_phl_status 615*4882a593Smuzhiyun rtw_phl_p2pps_noa_update(void *phl, struct rtw_phl_noa_desc *in_desc); 616*4882a593Smuzhiyun 617*4882a593Smuzhiyun void 618*4882a593Smuzhiyun rtw_phl_p2pps_init_ops(void *phl, struct rtw_phl_p2pps_ops *ops); 619*4882a593Smuzhiyun 620*4882a593Smuzhiyun void rtw_phl_p2pps_noa_disable_all(void *phl, struct rtw_wifi_role_t *w_role); 621*4882a593Smuzhiyun #endif 622*4882a593Smuzhiyun #endif 623*4882a593Smuzhiyun enum rtw_phl_status 624*4882a593Smuzhiyun rtw_phl_snd_cmd_set_vht_gid(void *phl, 625*4882a593Smuzhiyun struct rtw_wifi_role_t *wrole, 626*4882a593Smuzhiyun struct rtw_phl_gid_pos_tbl *tbl); 627*4882a593Smuzhiyun 628*4882a593Smuzhiyun void rtw_phl_event_notify(void *phl, enum phl_msg_evt_id event, 629*4882a593Smuzhiyun struct rtw_wifi_role_t *wrole); 630*4882a593Smuzhiyun void rtw_phl_notification(void *phl, 631*4882a593Smuzhiyun enum phl_msg_evt_id event, 632*4882a593Smuzhiyun struct rtw_wifi_role_t *wrole); 633*4882a593Smuzhiyun void rtw_phl_dev_terminate_ntf(void *phl); 634*4882a593Smuzhiyun 635*4882a593Smuzhiyun enum rtw_phl_status 636*4882a593Smuzhiyun rtw_phl_cmd_force_usb_switch(void *phl, u32 speed, 637*4882a593Smuzhiyun enum phl_band_idx band_idx, 638*4882a593Smuzhiyun enum phl_cmd_type cmd_type, u32 cmd_timeout); 639*4882a593Smuzhiyun enum rtw_phl_status 640*4882a593Smuzhiyun rtw_phl_cmd_get_usb_speed(void *phl, u32* speed, 641*4882a593Smuzhiyun enum phl_band_idx band_idx, 642*4882a593Smuzhiyun enum phl_cmd_type cmd_type, u32 cmd_timeout); 643*4882a593Smuzhiyun enum rtw_phl_status 644*4882a593Smuzhiyun rtw_phl_cmd_get_usb_support_ability(void *phl, u32* ability, 645*4882a593Smuzhiyun enum phl_band_idx band_idx, 646*4882a593Smuzhiyun enum phl_cmd_type cmd_type, u32 cmd_timeout); 647*4882a593Smuzhiyun u8 rtw_phl_get_sta_mgnt_rssi(struct rtw_phl_stainfo_t *psta); 648*4882a593Smuzhiyun 649*4882a593Smuzhiyun enum rtw_phl_status 650*4882a593Smuzhiyun rtw_phl_txsts_rpt_config(void *phl, struct rtw_phl_stainfo_t *phl_sta); 651*4882a593Smuzhiyun 652*4882a593Smuzhiyun #ifdef CONFIG_USB_HCI 653*4882a593Smuzhiyun /* tx_ok/tx_fail are from release report*/ 654*4882a593Smuzhiyun enum rtw_phl_status 655*4882a593Smuzhiyun rtw_phl_get_tx_ok_rpt(void *phl, struct rtw_phl_stainfo_t *phl_sta, u32 *tx_ok_cnt, 656*4882a593Smuzhiyun enum phl_ac_queue qsel); 657*4882a593Smuzhiyun 658*4882a593Smuzhiyun enum rtw_phl_status 659*4882a593Smuzhiyun rtw_phl_get_tx_fail_rpt(void *phl, struct rtw_phl_stainfo_t *phl_sta, u32 *tx_fail_cnt, 660*4882a593Smuzhiyun enum phl_ac_queue qsel); 661*4882a593Smuzhiyun 662*4882a593Smuzhiyun /* tx retry is from ra sts report.*/ 663*4882a593Smuzhiyun enum rtw_phl_status 664*4882a593Smuzhiyun rtw_phl_get_tx_retry_rpt(void *phl, struct rtw_phl_stainfo_t *phl_sta, u32 *tx_retry_cnt, 665*4882a593Smuzhiyun enum phl_ac_queue qsel); 666*4882a593Smuzhiyun #endif /* CONFIG_USB_HCI */ 667*4882a593Smuzhiyun 668*4882a593Smuzhiyun enum rtw_rx_status rtw_phl_get_rx_status(void *phl); 669*4882a593Smuzhiyun 670*4882a593Smuzhiyun void rtw_phl_dbg_dump_rx(void *phl, struct rtw_wifi_role_t *wrole); 671*4882a593Smuzhiyun 672*4882a593Smuzhiyun /****************************************************************************** 673*4882a593Smuzhiyun * 674*4882a593Smuzhiyun * TX power APIs 675*4882a593Smuzhiyun * 676*4882a593Smuzhiyun *****************************************************************************/ 677*4882a593Smuzhiyun const char *rtw_phl_get_pw_lmt_regu_type_str(void *phl, enum band_type band); 678*4882a593Smuzhiyun 679*4882a593Smuzhiyun bool rtw_phl_get_pwr_lmt_en(void *phl, u8 band_idx); 680*4882a593Smuzhiyun 681*4882a593Smuzhiyun enum rtw_phl_status rtw_phl_set_tx_power(void *phl, u8 band_idx); 682*4882a593Smuzhiyun /*****************************************************************************/ 683*4882a593Smuzhiyun 684*4882a593Smuzhiyun u32 rtw_phl_get_phy_stat_info(void *phl, enum phl_band_idx hw_band, 685*4882a593Smuzhiyun enum phl_stat_info_query phy_stat); 686*4882a593Smuzhiyun #endif /*_PHL_API_H_*/ 687*4882a593Smuzhiyun 688