1 /****************************************************************************** 2 * 3 * Copyright(c) 2019 - 2020 Realtek Corporation. 4 * 5 * This program is free software; you can redistribute it and/or modify it 6 * under the terms of version 2 of the GNU General Public License as 7 * published by the Free Software Foundation. 8 * 9 * This program is distributed in the hope that it will be useful, but WITHOUT 10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for 12 * more details. 13 * 14 *****************************************************************************/ 15 #ifndef _HAL_API_H_ 16 #define _HAL_API_H_ 17 18 /******************* IO APIs *******************/ 19 u8 rtw_hal_read8(void *h, u32 addr); 20 u16 rtw_hal_read16(void *h, u32 addr); 21 u32 rtw_hal_read32(void *h, u32 addr); 22 void rtw_hal_write8(void *h, u32 addr, u8 val); 23 void rtw_hal_write16(void *h, u32 addr, u16 val); 24 void rtw_hal_write32(void *h, u32 addr, u32 val); 25 26 u32 rtw_hal_read_macreg(void *h, u32 offset, u32 bit_mask); 27 void rtw_hal_write_macreg(void *h, 28 u32 offset, u32 bit_mask, u32 data); 29 u32 rtw_hal_read_bbreg(void *h, u32 offset, u32 bit_mask); 30 void rtw_hal_write_bbreg(void *h, 31 u32 offset, u32 bit_mask, u32 data); 32 u32 rtw_hal_read_rfreg(void *h, 33 enum rf_path path, u32 offset, u32 bit_mask); 34 void rtw_hal_write_rfreg(void *h, 35 enum rf_path path, u32 offset, u32 bit_mask, u32 data); 36 37 #ifdef PHL_PLATFORM_LINUX 38 void rtw_hal_mac_reg_dump(void *sel, void *h); 39 void rtw_hal_bb_reg_dump(void *sel, void *h); 40 void rtw_hal_bb_reg_dump_ex(void *sel, void *h); 41 void rtw_hal_rf_reg_dump(void *sel, void *h); 42 #endif 43 44 enum rtw_hal_status 45 rtw_hal_get_addr_cam(void *h, u16 num, u8 *buf, u16 size); 46 enum rtw_hal_status 47 rtw_hal_get_sec_cam(void *h, u16 num, u8 *buf, u16 size); 48 49 void rtw_hal_enable_interrupt(struct rtw_phl_com_t *phl_com, void *h); 50 void rtw_hal_disable_interrupt(struct rtw_phl_com_t *phl_com, void *h); 51 void rtw_hal_config_interrupt(void *h, enum rtw_phl_config_int int_mode); 52 bool rtw_hal_recognize_interrupt(void *h); 53 bool rtw_hal_recognize_halt_c2h_interrupt(void *h); 54 void rtw_hal_clear_interrupt(void *h); 55 void rtw_hal_restore_interrupt(struct rtw_phl_com_t *phl_com, void *h); 56 57 u32 rtw_hal_interrupt_handler(void *h); 58 void rtw_hal_restore_rx_interrupt(void *h); 59 60 enum rtw_hal_status rtw_hal_get_pwr_state(void *h, enum rtw_mac_pwr_st *pwr_state); 61 62 enum rtw_hal_status rtw_hal_init(void *drv_priv, 63 struct rtw_phl_com_t *phl_com, void **hal, enum rtl_ic_id chip_id); 64 struct rtw_hal_com_t *rtw_hal_get_halcom(void *hal); 65 void rtw_hal_deinit(struct rtw_phl_com_t *phl_com, void *hal); 66 67 bool rtw_hal_is_inited(struct rtw_phl_com_t *phl_com, void *hal); 68 69 u32 rtw_hal_hci_cfg(struct rtw_phl_com_t *phl_com, void *hal, 70 struct rtw_ic_info *ic_info); 71 u32 rtw_hal_read_chip_info(struct rtw_phl_com_t *phl_com, void *hal); 72 73 void rtw_hal_set_default_var(void *hal, enum rtw_hal_set_def_var_rsn rsn); 74 75 u32 rtw_hal_var_init(struct rtw_phl_com_t *phl_com, void *hal); 76 77 enum rtw_hal_status rtw_hal_ser_ctrl(void *hal, bool en); 78 79 u32 80 rtw_hal_ser_get_error_status(void *hal, u32 *err); 81 82 enum rtw_hal_status rtw_hal_ser_set_error_status(void *hal, u32 err); 83 84 enum rtw_hal_status rtw_hal_trigger_cmac_err(void *hal); 85 86 enum rtw_hal_status rtw_hal_trigger_dmac_err(void *hal); 87 88 enum rtw_hal_status rtw_hal_lv1_rcvy(void *hal, u32 step); 89 90 void 91 rtw_hal_dump_fw_rsvd_ple(void *phl); 92 void 93 rtw_hal_ser_reset_wdt_intr(void *hal); 94 95 enum rtw_hal_status rtw_hal_cfg_fw_ps_log(void *hal, u8 en); 96 97 enum rtw_hal_status rtw_hal_cfg_fw_mcc_log(void *hal, u8 en); 98 99 enum rtw_hal_status 100 rtw_hal_download_fw(struct rtw_phl_com_t *phl_com, void *hal); 101 102 enum rtw_hal_status 103 rtw_hal_redownload_fw(struct rtw_phl_com_t *phl_com, void *hal); 104 void rtw_hal_fw_dbg_dump(void *hal); 105 106 enum rtw_fw_status rtw_hal_get_fw_status(void *h); 107 108 enum rtw_hal_status rtw_hal_preload(struct rtw_phl_com_t *phl_com, void *hal); 109 enum rtw_hal_status rtw_hal_start(struct rtw_phl_com_t *phl_com, void *hal); 110 void rtw_hal_stop(struct rtw_phl_com_t *phl_com, void *hal); 111 enum rtw_hal_status rtw_hal_restart(struct rtw_phl_com_t *phl_com, void *hal); 112 enum rtw_hal_status rtw_hal_hal_deinit(struct rtw_phl_com_t *phl_com, void *hal); 113 114 #ifdef CONFIG_WOWLAN 115 enum rtw_hal_status rtw_hal_get_wake_rsn(void *hal, enum rtw_wow_wake_reason *wake_rsn, u8 *reset); 116 enum rtw_hal_status rtw_hal_cfg_wow_sleep(void *hal, u8 sleep); 117 enum rtw_hal_status rtw_hal_get_wow_aoac_rpt(void *hal, struct rtw_aoac_report *aoac_info, u8 rx_ready); 118 enum rtw_hal_status rtw_hal_get_wow_fw_status(void *hal, u8 *status); 119 enum rtw_hal_status rtw_hal_wow_cfg_txdma(void *hal, u8 en); 120 121 enum rtw_hal_status rtw_hal_wow_init(struct rtw_phl_com_t *phl_com, void *hal, struct rtw_phl_stainfo_t *sta); 122 enum rtw_hal_status rtw_hal_wow_deinit(struct rtw_phl_com_t *phl_com, void *hal, struct rtw_phl_stainfo_t *sta); 123 124 enum rtw_hal_status 125 rtw_hal_wow_func_en(struct rtw_phl_com_t *phl_com, void *hal, u16 macid, 126 struct rtw_hal_wow_cfg *cfg); 127 enum rtw_hal_status 128 rtw_hal_wow_func_dis(struct rtw_phl_com_t *phl_com, void *hal, u16 macid, 129 struct rtw_hal_wow_cfg *cfg); 130 131 enum rtw_hal_status rtw_hal_wow_func_start(struct rtw_phl_com_t *phl_com, void *hal, u16 macid, struct rtw_hal_wow_cfg *cfg); 132 enum rtw_hal_status rtw_hal_wow_func_stop(struct rtw_phl_com_t *phl_com, void *hal, u16 macid); 133 134 enum rtw_hal_status rtw_hal_set_wowlan(struct rtw_phl_com_t *phl_com, void *hal, u8 enter); 135 enum rtw_hal_status rtw_hal_sw_gpio_ctrl(struct rtw_phl_com_t *phl_com, void *hal, u8 high, u8 gpio); 136 enum rtw_hal_status rtw_hal_set_sw_gpio_mode(struct rtw_phl_com_t *phl_com, void *hal, enum rtw_gpio_mode mode, u8 gpio); 137 enum rtw_hal_status rtw_hal_wow_drop_tx(void *hal, u8 band); 138 139 enum rtw_hal_status 140 rtw_hal_wow_cfg_nlo_chnl_list(void *hal, struct rtw_nlo_info *cfg); 141 142 enum rtw_hal_status 143 rtw_hal_wow_cfg_nlo(void *hal, enum SCAN_OFLD_OP op, u16 mac_id, 144 u8 hw_band, u8 hw_port, struct rtw_nlo_info *cfg); 145 146 #endif /* CONFIG_WOWLAN */ 147 148 void 149 rtw_hal_dl_all_para_file(struct rtw_phl_com_t *phl_com, char *ic_name, void *hal); 150 151 enum rtw_hal_status rtw_hal_trx_init(void *hal, u8 *txbd_buf, u8 *rxbd_buf); 152 void rtw_hal_trx_deinit(void *hal); 153 154 enum rtw_hal_status 155 rtw_hal_role_cfg(void *hal, struct rtw_wifi_role_t *wrole); 156 enum rtw_hal_status 157 rtw_hal_role_cfg_ex(void *hal, struct rtw_wifi_role_t *wrole, 158 enum pcfg_type type, void *param); 159 enum rtw_hal_status 160 rtw_hal_beacon_stop(void *hal, struct rtw_wifi_role_t *wrole, bool stop); 161 162 enum rtw_hal_status 163 rtw_hal_stainfo_init(void *hal, struct rtw_phl_stainfo_t *sta); 164 enum rtw_hal_status 165 rtw_hal_stainfo_deinit(void *hal, struct rtw_phl_stainfo_t *sta); 166 167 enum rtw_hal_status 168 rtw_hal_add_sta_entry(void *hal, struct rtw_phl_stainfo_t *sta); 169 enum rtw_hal_status 170 rtw_hal_del_sta_entry(void *hal, struct rtw_phl_stainfo_t *sta); 171 enum rtw_hal_status 172 rtw_hal_update_sta_entry(void *hal, struct rtw_phl_stainfo_t *sta, 173 bool is_connect); 174 enum rtw_hal_status 175 rtw_hal_change_sta_entry(void *hal, struct rtw_phl_stainfo_t *sta, 176 enum phl_upd_mode mode); 177 u8 rtw_hal_get_sta_rssi(struct rtw_phl_stainfo_t *sta); 178 u8 rtw_hal_get_sta_rssi_bcn(struct rtw_phl_stainfo_t *sta); 179 180 bool rtw_hal_is_sta_linked(void *hal, struct rtw_phl_stainfo_t *sta); 181 182 enum rtw_hal_status 183 rtw_hal_set_sta_rx_sts(struct rtw_phl_stainfo_t *sta, u8 rst, 184 struct rtw_r_meta_data *meta); 185 186 enum rtw_hal_status 187 rtw_hal_query_rainfo(void *hal, struct rtw_hal_stainfo_t *hal_sta, 188 struct rtw_phl_rainfo *phl_rainfo); 189 190 enum rtw_hal_status 191 rtw_hal_start_ba_session(void *hal, struct rtw_phl_stainfo_t *sta, 192 u8 dialog_token, u16 timeout, u16 start_seq_num, 193 u16 ba_policy, u16 tid, u16 buf_size); 194 enum rtw_hal_status 195 rtw_hal_stop_ba_session(void *hal, struct rtw_phl_stainfo_t *sta, u16 tid); 196 197 /** 198 * rtw_hal_set_edca() - setup WMM EDCA parameter 199 * @hal: struct hal_info_t * 200 * @wrole: struct rtw_wifi_role_t * 201 * @ac: Access Category, 0:BE, 1:BK, 2:VI, 3:VO 202 * @param: AIFS:BIT[7:0], CWMIN:BIT[11:8], CWMAX:BIT[15:12], 203 * TXOP:BIT[31:16] 204 * 205 * Setup WMM EDCA parameter set for sending packets. 206 * 207 * Return RTW_HAL_STATUS_SUCCESS when setting is ok. 208 */ 209 enum rtw_hal_status 210 rtw_hal_set_edca(void *hal, struct rtw_wifi_role_t *wrole, u8 ac, u32 edca); 211 212 enum rtw_hal_status 213 rtw_hal_cfg_tx_ampdu(void *hal, struct rtw_phl_stainfo_t *sta); 214 215 #ifdef CONFIG_PHL_CUSTOM_FEATURE 216 enum rtw_hal_status 217 rtw_hal_custom_cfg_tx_ampdu(void *hal, 218 struct rtw_wifi_role_t *wrole, 219 struct rtw_phl_custom_ampdu_cfg *ampdu); 220 enum rtw_hal_status 221 rtw_hal_get_ampdu_cfg(void *hal, 222 struct rtw_wifi_role_t *wrole, 223 struct rtw_phl_custom_ampdu_cfg *cfg); 224 enum rtw_hal_status 225 rtw_hal_set_pop_en(void *hal, bool en, enum phl_phy_idx phy_idx); 226 227 bool 228 rtw_hal_query_pop_en(void *hal, enum phl_phy_idx phy_idx); 229 230 enum rtw_hal_status 231 rtw_hal_set_pkt_detect_thold(void *hal, u32 bound); 232 233 u8 234 rtw_hal_query_pkt_detect_thold(void *hal, 235 bool get_en_info, 236 enum phl_phy_idx phy_idx); 237 #endif 238 enum rtw_hal_status 239 rtw_hal_thermal_protect_cfg_tx_duty( 240 void *hal, 241 u16 tx_duty_interval, 242 u8 ratio); 243 244 enum rtw_hal_status 245 rtw_hal_thermal_protect_stop_tx_duty( 246 void *hal); 247 248 enum rtw_hal_status 249 rtw_hal_set_key(void *hal, struct rtw_phl_stainfo_t *sta, u8 type, u8 ext_key, u8 spp, 250 u8 keyid, u8 keytype, u8 *keybuf); 251 252 u32 253 rtw_hal_search_key_idx(void *hal, struct rtw_phl_stainfo_t *sta, 254 u8 keyid, u8 keytype); 255 /** 256 * rtw_hal_tx_chnl_mapping - query hw tx dma channel mapping to the sw xmit ring 257 * identified by macid, tid and band 258 * @hal: see struct hal_info_t 259 * @macid: input target macid is 0 ~ 127 260 * @cat: input target packet category, see enum rtw_phl_ring_cat 261 * @band: input target band, 0 for band 0 / 1 for band 1 262 * 263 * returns the mapping hw tx dma channel 264 */ 265 u8 rtw_hal_tx_chnl_mapping(void *hal, u16 macid, 266 enum rtw_phl_ring_cat cat, u8 band); 267 268 269 /** 270 * rtw_hal_convert_qsel_to_tid - convert qsel to tid value 271 * @hal: see struct hal_info_t 272 * @qsel: HW queue selection 273 * @tid_indic: tid indicator 274 * 275 * returns enum RTW_HAL_STATUS 276 */ 277 u8 rtw_hal_convert_qsel_to_tid(void *hal, u8 qsel_id, u8 tid_indic); 278 279 280 /** 281 * rtw_hal_tx_res_query - query current HW tx resource with specifc dma channel 282 * @hal: see struct hal_info_t 283 * @dma_ch: the target dma channel 284 * @host_idx: current host index of this channel 285 * @hw_idx: current hw index of this channel 286 * 287 * this function returns the number of available tx resource 288 * NOTE, input host_idx and hw_idx ptr shall NOT be NULL 289 */ 290 u16 rtw_hal_tx_res_query(void *hal, u8 dma_ch, u16 *host_idx, u16 *hw_idx); 291 292 /** 293 * rtw_hal_rx_res_query - query current HW rx resource with specifc dma channel 294 * @hal: see struct hal_info_t 295 * @dma_ch: the target dma channel 296 * @host_idx: current host index of this channel 297 * @hw_idx: current hw index of this channel 298 * 299 * this function returns the number of available tx resource 300 * NOTE, input host_idx and hw_idx ptr shall NOT be NULL 301 */ 302 u16 rtw_hal_rx_res_query(void *hal, u8 dma_ch, u16 *host_idx, u16 *hw_idx); 303 304 305 /** 306 * rtw_hal_query_txch_num - query total hw tx dma channels number 307 * 308 * returns the number of hw tx dma channel 309 */ 310 u8 rtw_hal_query_txch_num(void *hal); 311 312 /** 313 * rtw_hal_query_rxch_num - query total hw rx dma channels number 314 * 315 * returns the number of hw rx dma channel 316 */ 317 u8 rtw_hal_query_rxch_num(void *hal); 318 319 320 /** 321 * rtw_hal_update_wd_page - update wd page for xmit packet 322 * @hal: see struct hal_info_t 323 * @phl_pkt_req: packet xmit request from phl, see struct rtw_phl_pkt_req 324 * 325 * returns enum RTW_HAL_STATUS 326 */ 327 enum rtw_hal_status rtw_hal_update_wd_page(void *hal, void *phl_pkt_req); 328 329 enum rtw_hal_status 330 rtw_hal_handle_rx_buffer(struct rtw_phl_com_t *phl_com, void* hal, 331 u8 *buf, u32 buf_size, 332 struct rtw_phl_rx_pkt *rxpkt); 333 334 enum rtw_hal_status 335 rtw_hal_query_info(void* hal, u8 info_id, void *value); 336 337 #ifdef CONFIG_PHL_DFS 338 bool rtw_hal_in_radar_domain(void *hal, u8 ch, enum channel_width bw); 339 enum rtw_hal_status rtw_hal_radar_detect_cfg(void *hal, bool dfs_enable); 340 #endif /*CONFIG_PHL_DFS*/ 341 342 enum rtw_hal_status 343 rtw_hal_set_ch_bw(void *hal, u8 band_idx, 344 struct rtw_chan_def *chdef, bool do_rfk); 345 u8 rtw_hal_get_cur_ch(void *hal, u8 band_idx); 346 void rtw_hal_get_cur_chdef(void *hal, u8 band_idx, 347 struct rtw_chan_def *cur_chandef); 348 349 void rtw_hal_sync_cur_ch(void *hal, u8 band_idx, struct rtw_chan_def chandef); 350 351 u8 rtw_hal_get_fwcmd_queue_idx(void* hal); 352 void rtw_hal_cfg_txhci(void *hal, u8 en); 353 void rtw_hal_cfg_rxhci(void *hal, u8 en); 354 enum rtw_hal_status rtw_hal_chk_allq_empty(void *hal, u8 *empty); 355 s8 rtw_hal_rf_get_power_limit(void *hal, enum phl_phy_idx phy, 356 u16 rate, u8 bandwidth, u8 beamforming, u8 tx_num, u8 channel); 357 enum rtw_hal_status rtw_hal_set_power_lmt(void *hal, u8 band_idx); 358 void rtw_hal_set_ext_pwr_lmt_en(void *hal, bool enable); 359 void rtw_hal_enable_ext_pwr_lmt(void *hal, u8 hw_band, 360 struct rtw_tpu_ext_pwr_lmt_info *ext_pwr_lmt_info); 361 362 #ifdef CONFIG_RTW_ACS 363 void rtw_hal_acs_mntr_trigger(void *hal, u16 monitor_time); 364 enum rtw_hal_status rtw_hal_acs_mntr_result(void *hal, void *rpt); 365 #endif /* CONFIG_RTW_ACS */ 366 367 /*watchdog update env result*/ 368 void rtw_hal_env_rpt(struct rtw_hal_com_t *hal_com, struct rtw_env_report *env_rpt, 369 struct rtw_wifi_role_t *wrole); 370 371 #ifdef CONFIG_PCI_HCI 372 /** 373 * rtw_hal_update_txbd - update tx bd for xmit packet 374 * @hal: see struct hal_info_t 375 * @txbd: the target txbd to update 376 * @wd: buffer pointer of wd page to fill in txbd 377 * 378 * returns enum RTW_HAL_STATUS 379 * NOTE, this function is PCIe specific function 380 */ 381 enum rtw_hal_status 382 rtw_hal_update_txbd(void *hal, void *txbd, void *wd, u8 dma_ch, u16 wd_num); 383 384 /** 385 * rtw_hal_update_rxbd - update rx bd for recv packet 386 * @hal: see struct hal_info_t 387 * @rxbd: the target rxbd to update 388 * @wd: buffer pointer of wd page to fill in rxbd 389 * 390 * returns enum RTW_HAL_STATUS 391 * NOTE, this function is PCIe specific function 392 */ 393 enum rtw_hal_status 394 rtw_hal_update_rxbd(void *hal, struct rx_base_desc *rxbd, 395 struct rtw_rx_buf *rxbuf); 396 397 /** 398 * rtw_hal_update_trigger_txstart - trigger hw to start tx 399 * @hal: see struct hal_info_t 400 * @txbd: the target txbd to update 401 * @dma_ch: the dma channel index of this txbd_ring 402 * 403 * returns enum RTW_HAL_STATUS 404 */ 405 enum rtw_hal_status rtw_hal_trigger_txstart(void *hal, void *txbd, u8 dma_ch); 406 407 /** 408 * rtw_hal_notify_rxdone - notify hw rx done 409 * @hal: see struct hal_info_t 410 * @rxbd: the target rxbd to update 411 * @ch: the target rx channel 412 * @rxcnt: handling done rx count this function will notify hw 413 * 414 * returns enum RTW_HAL_STATUS 415 */ 416 enum rtw_hal_status rtw_hal_notify_rxdone(void* hal, void *rxbd, u8 ch, 417 u16 rxcnt); 418 419 /** 420 * rtw_hal_handle_wp_rpt -parsing the wp recycle report packet 421 * @hal: see struct hal_info_t 422 * @rp: input, the pointer of target recycle report buffer to parse 423 * @len: input, the length of this report buffer 424 * @sw_retry: output, the packet mentioned in this report needs sw retry if sw_retry == 1 425 * @dma_ch: output, the tx dma channel of this packet mentioned in this report 426 * @wp_seq: output, the wp_seq of this packet mentioned in this report 427 * @macid: output, the mac_id of this packet mentioned in this report 428 * @ac_queue: output, the tid of this packet mentioned in this report 429 * @txsts: output, the tx status of this packet mentioned in this report 430 * 431 * returns the length of report buffer which has been parsed in this function 432 */ 433 u16 rtw_hal_handle_wp_rpt(void *hal, u8 *rp, u16 len, u8 *sw_retry, u8 *dma_ch, 434 u16 *wp_seq, u8 *macid, u8 *ac_queue, u8 *txsts); 435 436 u8 rtw_hal_check_rxrdy(struct rtw_phl_com_t *phl_com, void* hal, u8 *rxbuf, u8 dma_ch); 437 u8 rtw_hal_handle_rxbd_info(void* hal, u8 *rxbuf, u16 *buf_size); 438 enum rtw_hal_status rtw_hal_set_l2_leave(void *hal); 439 void rtw_hal_clear_bdidx(void *hal); 440 void rtw_hal_rst_bdram(void *hal); 441 bool rtw_hal_poll_txdma_idle(void *hal); 442 void rtw_hal_cfg_dma_io(void *hal, u8 en); 443 444 445 enum rtw_hal_status rtw_hal_ltr_sw_trigger(void *hal, 446 enum rtw_pcie_ltr_state state); 447 enum rtw_hal_status rtw_hal_ltr_en_hw_mode(void *hal, bool hw_mode); 448 #ifdef RTW_WKARD_DYNAMIC_LTR 449 void rtw_hal_ltr_update_stats(void *hal, bool clear); 450 bool rtw_hal_ltr_is_sw_ctrl(struct rtw_phl_com_t *phl_com, void *hal); 451 bool rtw_hal_ltr_is_hw_ctrl(struct rtw_phl_com_t *phl_com, void *hal); 452 #endif 453 454 #endif /*CONFIG_PCI_HCI*/ 455 456 #ifdef CONFIG_USB_HCI 457 458 u8 rtw_hal_get_bulkout_id(void *hal, u8 dma_ch, u8 mode); 459 460 enum rtw_hal_status rtw_hal_fill_wd(void *hal, 461 struct rtw_xmit_req *tx_req, 462 u8 *wd_buf, u32 *wd_len); 463 464 enum rtw_hal_status 465 rtw_hal_usb_tx_agg_cfg(void *hal, u8* wd_buf, u8 agg_num); 466 467 enum rtw_hal_status 468 rtw_hal_usb_rx_agg_cfg(void *hal, u8 mode, u8 agg_mode, 469 u8 drv_define, u8 timeout, u8 size, u8 pkt_num); 470 471 u8 rtw_hal_get_max_bulkout_wd_num(void *hal); 472 u32 rtwl_hal_get_cur_usb_mode(void *h); 473 u32 rtwl_hal_get_usb_support_ability(void *h); 474 enum rtw_hal_status rtw_hal_force_usb_switch(void *h, enum usb_type type); 475 /** 476 * rtw_hal_handle_wp_rpt_usb -parsing the wp recycle report packet 477 * @hal: see struct hal_info_t 478 * @rp: input, the pointer of target recycle report buffer to parse 479 * @len: input, the length of this report buffer 480 * @macid: output, the mac_id of this packet mentioned in this report 481 * @ac_queue: output, the tid of this packet mentioned in this report 482 * @txsts: output, the tx status of this packet mentioned in this report 483 * 484 * returns the length of report buffer which has been parsed in this function 485 */ 486 u16 rtw_hal_handle_wp_rpt_usb(void *hal, u8 *rp, u16 len, u8 *macid, u8 *ac_queue, 487 u8 *txsts); 488 489 enum rtw_rx_status rtw_hal_get_usb_status(void *h); 490 #endif 491 492 #ifdef CONFIG_SDIO_HCI 493 /** 494 * rtw_hal_sdio_tx_cfg - SDIO TX related setting 495 * @hal: pointer of struct hal_info_t 496 * 497 * Configure setting for SDIO TX. 498 * 499 * No return value for this function. 500 */ 501 void rtw_hal_sdio_tx_cfg(void *hal); 502 503 enum rtw_hal_status rtw_hal_sdio_tx(void *hal, u8 dma_ch, u8 *buf, u32 buf_len, 504 u8 agg_count, u16 *pkt_len, u8 *wp_offset); 505 void rtw_hal_sdio_rx_agg_cfg(void *hal, bool enable, u8 drv_define, 506 u8 timeout, u8 size, u8 pkt_num); 507 int rtw_hal_sdio_rx(void *hal, struct rtw_rx_buf *rxbuf); 508 int rtw_hal_sdio_parse_rx(void *hal, struct rtw_rx_buf *rxbuf); 509 #endif /* CONFIG_SDIO_HCI */ 510 511 /* HAL SOUND API */ 512 enum rtw_hal_status rtw_hal_snd_query_proc_sta_res( 513 void *hal, struct rtw_phl_stainfo_t *sta, 514 bool mu, enum channel_width bw, bool en_swap); 515 516 enum rtw_hal_status 517 rtw_hal_snd_release_proc_sta_res(void *hal, struct rtw_phl_stainfo_t *sta); 518 519 enum rtw_hal_status 520 rtw_hal_snd_proc_pre_cfg_sta(void *hal, struct rtw_phl_stainfo_t *sta); 521 522 void 523 rtw_hal_snd_ndpa_sta_info_vht(struct rtw_phl_stainfo_t *psta_info, 524 u32 *ndpa, u8 mu); 525 526 void 527 rtw_hal_snd_ndpa_sta_info_he(struct rtw_phl_stainfo_t *psta_info, 528 u32 *ndpa, enum channel_width bw, u8 fb_type); 529 530 enum rtw_hal_status 531 rtw_hal_snd_proc_post_cfg_sta(void *hal, 532 struct rtw_phl_stainfo_t *sta, bool mu); 533 534 enum rtw_hal_status 535 rtw_hal_snd_proc_post_cfg_gid(void *hal, u8 gid, void *ba_info); 536 537 enum rtw_hal_status 538 rtw_hal_snd_proc_post_cfg(void *hal, bool he, bool mu, bool en_fixed_mode); 539 540 enum rtw_hal_status 541 rtw_hal_snd_mac_ctrl(void *hal, u8 band, u8 ctrl); 542 543 enum rtw_hal_status 544 rtw_hal_snd_chk_bf_res(void *hal, struct rtw_phl_stainfo_t *sta, 545 bool mu, enum channel_width bw); 546 547 void 548 rtw_hal_snd_polling_snd_sts(void *hal, struct rtw_phl_stainfo_t *sta); 549 550 /* fw sounding commmand ralated */ 551 void rtw_hal_snd_set_fw_cmd_dialogtkn(void *hal, u8 *buf, u8 he, u8 token); 552 553 void rtw_hal_snd_vht_fwcmd_su(void *hal, u8 *buf, enum channel_width bw, 554 struct rtw_phl_stainfo_t *psta, u32 *npda_sta); 555 556 void rtw_hal_snd_vht_fwcmd_mu_pri(void *hal, u8 *buf, enum channel_width bw, 557 struct rtw_phl_stainfo_t *psta, u8 sta_nr, u32 *ndpa_sta); 558 559 void rtw_hal_snd_vht_fwcmd_mu_add_sta(void *hal, u8 *buf, u32 *ndpa_sta, 560 struct rtw_phl_stainfo_t *sta, 561 u8 ndpa_idx, u8 last); 562 563 void rtw_hal_snd_ax_fwcmd_nontb(void *hal, u8 *buf, enum channel_width bw, 564 struct rtw_phl_stainfo_t *psta, u32 *npda_sta); 565 566 void rtw_hal_snd_ax_fwcmd_tb_pri(void *hal, u8 *buf, enum channel_width bw, 567 struct rtw_phl_stainfo_t *psta, u8 sta_nr1, u8 sta_nr2); 568 569 void rtw_hal_snd_ax_fwcmd_tb_add_sta(void *hal, u8 *buf, u32 *ndpa_sta, 570 struct rtw_phl_stainfo_t *sta, u8 ru_idx, 571 u8 ndpa_idx, u8 bfrp_idx, u8 bfrp_u_idx); 572 573 u8 *rtw_hal_snd_prepare_snd_cmd(void *hal); 574 enum rtw_hal_status rtw_hal_snd_release_snd_cmd(void *hal, u8 *buf); 575 enum rtw_hal_status rtw_hal_snd_send_fw_cmd(void *hal, u8 *cmd); 576 577 /*HAL CSI Buffer Mgnt APIs*/ 578 enum channel_width 579 rtw_hal_get_csi_buf_bw(void *buf); 580 581 bool 582 rtw_hal_get_csi_buf_type(void *buf); 583 584 /*HAL Beamform Mgnt APIs*/ 585 void rtw_hal_bf_dbg_dump_entry(void *entry); 586 void rtw_hal_bf_dbg_dump_entry_all(void *hal); 587 u8 rtw_hal_bf_get_sumu_idx(void *hal, void *entry); 588 bool rtw_hal_bf_chk_bf_type(void *hal_info, 589 struct rtw_phl_stainfo_t *sta, bool mu); 590 void rtw_hal_bf_preset_mu_ba_info(void *hal, 591 struct rtw_phl_stainfo_t *psta, void *hal_ba_info); 592 void rtw_hal_bf_set_txmu_para(void *hal, u8 gid , u8 en, 593 enum rtw_hal_protection_type rts_type, 594 enum rtw_hal_ack_resp_type ack_type); 595 enum rtw_hal_status 596 rtw_hal_bf_set_fix_mode(void *hal, bool mu, bool he); 597 enum rtw_hal_status 598 rtw_hal_bf_get_entry_snd_sts(void *entry); 599 600 void rtw_hal_beamform_set_vht_gid(void *hal, u8 band, 601 struct rtw_phl_gid_pos_tbl *tbl); 602 603 /****************************************************************************** 604 * 605 * BTC APIs 606 * 607 *****************************************************************************/ 608 #ifdef CONFIG_BTCOEX 609 void rtw_hal_btc_scan_start_ntfy(void *hinfo, enum phl_phy_idx phy_idx, 610 enum band_type band); 611 void rtw_hal_btc_scan_finish_ntfy(void *hinfo, enum phl_phy_idx phy_idx); 612 void rtw_hal_btc_update_role_info_ntfy(void *hinfo, u8 role_id, 613 struct rtw_wifi_role_t *wrole, 614 struct rtw_phl_stainfo_t *sta, 615 enum role_state rstate); 616 void rtw_hal_btc_packet_event_ntfy(void *hinfo, u8 pkt_evt_type); 617 void rtw_hal_btc_radio_state_ntfy(void *hinfo, u8 rf_state); 618 void rtw_hal_btc_customerize_ntfy(void *hinfo, u8 type, u16 len, u8 *buf); 619 void rtw_hal_btc_wl_status_ntfy(void *hinfo, struct rtw_phl_com_t *phl_com, u8 ntfy_num, 620 struct rtw_phl_stainfo_t *sta[], 621 u8 reason); 622 void rtw_hal_btc_timer(void *hinfo, void *timer); 623 void rtw_hal_btc_fwinfo_ntfy(void *hinfo); 624 #endif 625 626 enum rtw_hal_status rtw_hal_scan_set_rxfltr_by_mode(void *hinfo, 627 enum phl_phy_idx phy_idx, bool off_channel, u8 *mode); 628 enum rtw_hal_status 629 rtw_hal_enter_mon_mode(void *hinfo, enum phl_phy_idx phy_idx); 630 enum rtw_hal_status 631 rtw_hal_leave_mon_mode(void *hinfo, enum phl_phy_idx phy_idx); 632 #ifdef CONFIG_FSM 633 enum rtw_hal_status rtw_hal_scan_flush_queue(void *hinfo, 634 struct rtw_wifi_role_t *wrole); 635 #endif 636 enum rtw_hal_status rtw_hal_scan_pause_tx_fifo(void *hinfo, 637 u8 band_idx, bool off_ch); 638 639 enum rtw_hal_status rtw_hal_dfs_pause_tx(void *hinfo, 640 u8 band_idx, bool off_ch); 641 /*****************************************************************************/ 642 643 void rtw_hal_com_scan_set_tx_lifetime(void *hal, u8 band); 644 void rtw_hal_com_scan_restore_tx_lifetime(void *hal, u8 band); 645 646 #ifdef RTW_PHL_BCN 647 enum rtw_hal_status 648 rtw_hal_add_beacon(struct rtw_phl_com_t *phl_com, void *hal, void *bcn_cmn); 649 650 enum rtw_hal_status 651 rtw_hal_update_beacon(struct rtw_phl_com_t *phl_com, void *hal, u8 bcn_id); 652 653 enum rtw_hal_status 654 rtw_hal_free_beacon(struct rtw_phl_com_t *phl_com, void *hal, u8 bcn_id); 655 #endif 656 657 enum rtw_hal_status 658 rtw_hal_proc_cmd(void *hal, char proc_cmd, struct rtw_proc_cmd *incmd, 659 char *output, u32 out_len); 660 661 void rtw_hal_get_fw_ver(void *hal, char *ver_str, u16 len); 662 663 enum rtw_hal_status 664 rtw_hal_tx_pause(struct rtw_hal_com_t *hal_com, 665 u8 band_idx, bool tx_pause, enum tx_pause_rson rson); 666 667 enum rtw_hal_status rtw_hal_set_macid_pause(void *hinfo, 668 u16 macid, 669 bool pause); 670 671 /** 672 * rtw_hal_set_rxfltr_by_mode - Set rx filter option by scenario 673 * @hal: pointer of struct hal_info_t 674 * @band: 0x0: band0, 0x1: band1 675 * @mode: scenario mode 676 * 677 * Set RX filter setting by scenario. 678 * 679 * Return RTW_HAL_STATUS_SUCCESS when setting is ok. 680 */ 681 enum rtw_hal_status rtw_hal_set_rxfltr_by_mode(void *hal, u8 band, 682 enum rtw_rx_fltr_mode mode); 683 684 /** 685 * rtw_hal_get_rxfltr_mode - Get rx filter option 686 * @hal: pointer of struct hal_info_t 687 * @band: 0x0: band0, 0x1: band1 688 * 689 * Get RX filter mode 690 * 691 * Return rtw_rx_fltr_mode 692 */ 693 enum rtw_rx_fltr_mode rtw_hal_get_rxfltr_mode(void *hal, u8 band); 694 695 /** 696 * rtw_hal_mac_acpt_crc_err_pkt - Accept CRC error packets or not 697 * @hal: pointer of struct rtw_hal_info_t 698 * @band: 0x0: band0, 0x1: band1 699 * @enable: 0: deny, 1: accept 700 * 701 * Control accepting CRC error packets or not. 702 * 703 * Return RTW_HAL_STATUS_SUCCESS when setting is ok. 704 */ 705 enum rtw_hal_status rtw_hal_acpt_crc_err_pkt(void *hal, u8 band, u8 enable); 706 707 /** 708 * rtw_hal_set_rxfltr_mpdu_size - Set max MPDU size 709 * @hal: pointer of struct hal_info_t 710 * @band: 0x0: band0, 0x1: band1 711 * @size: MPDU max size, unit: byte. 0 for no limit. 712 * 713 * MPDU size exceed max size would be dropped. 714 * 715 * Return RTW_HAL_STATUS_SUCCESS when setting is ok. 716 */ 717 enum rtw_hal_status rtw_hal_set_rxfltr_mpdu_size(void *hal, u8 band, u16 size); 718 enum rtw_hal_status rtw_hal_set_rxfltr_by_type(void *hal, u8 band, u8 type,u8 target); 719 720 721 enum rtw_hal_status 722 rtw_hal_fw_log_cfg(void *hal, u8 op, u8 type, u32 value); 723 724 void rtw_hal_dbg_status_dump(void *hal, struct hal_mac_dbg_dump_cfg *cfg); 725 /****************************************************************************** 726 * 727 * Packet Offload APIs 728 * 729 *****************************************************************************/ 730 enum rtw_hal_status rtw_hal_reset_pkt_ofld_state(void *hal); 731 732 enum rtw_hal_status rtw_hal_pkt_ofld(void *hal, u8 *id, u8 op, 733 u8 *pkt, u16 *len); 734 enum rtw_hal_status rtw_hal_pkt_update_ids(void *hal, 735 struct pkt_ofld_entry *entry); 736 void rtw_hal_fw_cap_pre_config(struct rtw_phl_com_t *phl_com, void *hal); 737 void rtw_hal_bus_cap_pre_config(struct rtw_phl_com_t *phl_com, void *hal); 738 void rtw_hal_fw_final_cap_config(struct rtw_phl_com_t *phl_com, void *hal); 739 void rtw_hal_final_cap_decision(struct rtw_phl_com_t *phl_com, void *hal); 740 741 /****************************************************************************** 742 * 743 * Power Save APIs 744 * 745 *****************************************************************************/ 746 747 enum rtw_hal_status 748 rtw_hal_ps_pwr_lvl_cfg(struct rtw_phl_com_t *phl_com, void *hal, 749 u32 req_pwr_lvl); 750 enum rtw_hal_status 751 rtw_hal_ps_lps_cfg(void *hal, struct rtw_hal_lps_info *lps_info); 752 enum rtw_hal_status 753 rtw_hal_ps_ips_cfg(void *hal, struct rtw_hal_ips_info *ips_info); 754 enum rtw_hal_status 755 rtw_hal_get_bf_proto_cap(struct rtw_phl_com_t *phl_com, void *hal, 756 u8 band, struct protocol_cap_t *proto_cap); 757 758 enum rtw_hal_status 759 rtw_hal_get_stbc_proto_cap(struct rtw_phl_com_t *phl_com, void *hal, 760 u8 band, struct protocol_cap_t *proto_cap); 761 762 enum rtw_hal_status rtw_hal_rf_chl_rfk_trigger(void *hal, u8 phy_idx, u8 force); 763 764 enum rtw_hal_status rtw_hal_watchdog(void *hal); 765 enum rtw_hal_status rtw_hal_simple_watchdog(void *hal, u8 io_en); 766 void rtw_hal_ps_chk_hw_rf_state(struct rtw_phl_com_t *phl_com, void *hal); 767 void rtw_hal_ps_notify_wake(void *hal); 768 769 /****************************************************************************** 770 * 771 * TWT APIs 772 * 773 *****************************************************************************/ 774 #ifdef CONFIG_PHL_TWT 775 enum rtw_hal_status 776 rtw_hal_twt_info_update(void *hal, struct rtw_phl_twt_info twt_info, 777 struct rtw_wifi_role_t *role, u8 action); 778 779 enum rtw_hal_status 780 rtw_hal_twt_sta_update(void *hal, u8 macid, u8 twt_id, u8 action); 781 782 enum rtw_hal_status 783 rtw_hal_twt_sta_announce(void *hal, u8 macid); 784 #endif /* CONFIG_PHL_TWT */ 785 786 /****************************************************************************** 787 * 788 * BB APIs 789 * 790 *****************************************************************************/ 791 /*@--------------------------[Prptotype]-------------------------------------*/ 792 /** 793 * rtw_hal_bb_get_txsc input arguments: 794 * @hal_com: hal com info 795 * @pri_ch: Spec-defined primary channel index 796 * @central_ch: Spec-defined central channel index 797 * @cbw: Channel BW 798 * @dbw: Data BW 799 */ 800 u8 rtw_hal_bb_get_txsc(struct rtw_hal_com_t *hal_com, u8 pri_ch, 801 u8 central_ch, enum channel_width cbw, enum channel_width dbw); 802 803 804 #ifdef CONFIG_DBCC_SUPPORT 805 enum rtw_hal_status 806 rtw_hal_dbcc_pre_cfg(void *hal, struct rtw_phl_com_t *phl_com, bool dbcc_en); 807 808 enum rtw_hal_status 809 rtw_hal_dbcc_cfg(void *hal, struct rtw_phl_com_t *phl_com, bool dbcc_en); 810 811 enum rtw_hal_status 812 rtw_hal_clean_tx_queue(void *hal); 813 814 enum rtw_hal_status 815 rtw_hal_dbcc_tx_cnt(void *hal, struct rtw_phl_com_t *phl_com, u8 band); 816 817 enum rtw_hal_status 818 rtw_hal_dbcc_reset_tx_cnt(void *hal, struct rtw_phl_com_t *phl_com, u8 band); 819 #endif 820 821 /* 822 * API for config channel info CR 823 */ 824 #ifdef CONFIG_PHL_CHANNEL_INFO 825 826 enum rtw_hal_status 827 rtw_hal_cfg_chinfo(void *hal, struct rtw_phl_stainfo_t *sta, u8 enable); 828 829 #endif /* CONFIG_PHL_CHANNEL_INFO */ 830 831 enum rtw_hal_status 832 rtw_hal_get_efuse_info(void *hal, enum rtw_efuse_info info_type, 833 void *value, u8 size); 834 835 enum rtw_hal_status 836 rtw_hal_cfg_trx_path(void *hal, enum rf_path tx, u8 tx_nss, 837 enum rf_path rx, u8 rx_nss); 838 839 enum rtw_hal_status 840 rtw_hal_tsf_sync(void *hal, u8 wrole_sync_from, u8 wrole_sync_to, 841 enum phl_band_idx band, s32 sync_offset_tu, 842 enum hal_tsf_sync_act act); 843 844 /** 845 * rtw_hal_fill_txdesc() - Fill hardware tx header 846 * @hal: pointer of struct hal_info_t 847 * @treq: the xmit request for this tx descriptor 848 * @wd_buf: the wd buffer to fill 849 * @wd_len: output, return the total length of filled wd 850 * 851 * Fill hardware tx header/tx descriptor/wifi descriptor 852 * 853 * Return RTW_HAL_STATUS_SUCCESS when everything is ok. 854 */ 855 enum rtw_hal_status rtw_hal_fill_txdesc(void *hal, struct rtw_xmit_req *treq, 856 u8 *wd_buf, u32 *wd_len); 857 858 enum rtw_hal_status rtw_hal_poll_hw_tx_done(void *hal); 859 enum rtw_hal_status rtw_hal_hw_tx_resume(void *hal); 860 enum rtw_hal_status rtw_hal_poll_hw_rx_done(void *hal); 861 enum rtw_hal_status rtw_hal_hw_rx_resume(void *hal); 862 863 void rtw_hal_tx_dbg_status_dump(void *hal); 864 865 #ifdef RTW_WKARD_DYNAMIC_BFEE_CAP 866 enum rtw_hal_status rtw_hal_bf_bfee_ctrl(void *hal, u8 band, bool ctrl); 867 #endif 868 869 870 enum rtw_hal_status 871 rtw_hal_set_mu_edca(void *hal, u8 band, u8 ac, 872 u16 timer, u8 cw_min, u8 cw_max, u8 aifsn); 873 enum rtw_hal_status 874 rtw_hal_set_mu_edca_ctrl(void *hal, u8 band, u8 wmm, u8 set); 875 876 enum rtw_hal_status rtw_hal_led_set_ctrl_mode(void *hal, enum rtw_led_id led_id, 877 enum rtw_led_ctrl_mode ctrl_mode); 878 enum rtw_hal_status rtw_hal_led_control(void *hal, enum rtw_led_id led_id, 879 u8 high); 880 881 enum rtw_hal_status rtw_hal_pcie_trx_mit(void *hal, u32 tx_timer, u8 tx_counter, 882 u32 rx_timer, u8 rx_counter); 883 884 enum rtw_hal_status rtw_hal_get_tsf(void *hal, u8 port, u32 *tsf_h, u32 *tsf_l); 885 886 u32 rtw_hal_get_btc_req_slot(void *hal); 887 888 enum rtw_hal_status 889 rtw_hal_set_macid_pause(void *hal, u16 macid, bool pause); 890 891 enum rtw_hal_status 892 rtw_hal_set_macid_grp_pause(void *hal, u32 *macid_arr, u8 arr_size, bool pause); 893 894 #ifdef CONFIG_MCC_SUPPORT 895 enum rtw_hal_status rtw_hal_mcc_get_2ports_tsf(void *hal, u8 group, 896 u16 macid_x, u16 macid_y, u32 *tsf_x_h, u32 *tsf_x_l, 897 u32 *tsf_y_h, u32 *tsf_y_l); 898 899 enum rtw_hal_status rtw_hal_notify_mcc_macid(void *hal, 900 struct rtw_phl_mcc_role *mrole, 901 enum rtw_phl_tdmra_wmode wmode); 902 903 enum rtw_hal_status rtw_hal_mcc_update_macid_bitmap(void *hal, u8 group, 904 u16 macid, struct rtw_phl_mcc_macid_bitmap *info); 905 906 enum rtw_hal_status rtw_hal_mcc_sync_enable(void *hal, 907 struct rtw_phl_mcc_en_info *info); 908 909 enum rtw_hal_status rtw_hal_mcc_change_pattern(void *hal, 910 struct rtw_phl_mcc_en_info *ori_info, 911 struct rtw_phl_mcc_en_info *new_info, 912 struct rtw_phl_mcc_bt_info *new_bt_info); 913 914 enum rtw_hal_status rtw_hal_mcc_reset(void *hal, u8 group, 915 enum rtw_phl_tdmra_wmode wmode); 916 917 enum rtw_hal_status rtw_hal_mcc_disable(void *hal, u8 group, u16 macid, 918 enum rtw_phl_tdmra_wmode wmode); 919 920 enum rtw_hal_status rtw_hal_mcc_enable(void *hal, struct rtw_phl_mcc_en_info *info, 921 struct rtw_phl_mcc_bt_info *bt_info, 922 enum rtw_phl_tdmra_wmode wmode); 923 #endif /* CONFIG_MCC_SUPPORT */ 924 925 #ifdef CONFIG_PHL_P2PPS 926 enum rtw_hal_status rtw_hal_noa_enable(void *hal, 927 struct rtw_phl_noa_info *noa_info, 928 struct rtw_phl_noa_desc *in_desc, 929 u16 macid); 930 931 enum rtw_hal_status rtw_hal_noa_disable(void *hal, 932 struct rtw_phl_noa_info *noa_info, 933 struct rtw_phl_noa_desc *in_desc, 934 u16 macid); 935 936 enum rtw_hal_status rtw_hal_tsf32_tog_enable(void *hal, 937 struct rtw_wifi_role_t *w_role); 938 939 enum rtw_hal_status rtw_hal_tsf32_tog_disable(void *hal, 940 struct rtw_wifi_role_t *w_role); 941 942 enum rtw_hal_status rtw_hal_get_tsf32_tog_rpt(void *hal, 943 struct rtw_phl_tsf32_tog_rpt *rpt); 944 #endif 945 void rtw_hal_disconnect_notify(void *hal, struct rtw_chan_def *chandef); 946 947 bool rtw_hal_check_ch_rfk(void *hal, struct rtw_chan_def *chandef); 948 enum rtw_hal_status rtw_hal_ppdu_sts_cfg(void *hal, u8 band_idx, bool en); 949 void rtw_hal_notification(void *hal, enum phl_msg_evt_id event, u8 hw_idx); 950 951 void rtw_hal_cmd_notification(void *hal, 952 enum phl_msg_evt_id event, 953 void *hal_cmd, 954 u8 hw_idx); 955 956 enum rtw_hal_status 957 rtw_hal_config_rts_th(void *hal, u8 band_idx, u16 rts_time_th, u16 rts_len_th); 958 959 enum rtw_hal_status 960 rtw_hal_query_txsts_rpt(void *hal, u16 macid); 961 962 enum rtw_hal_status rtw_hal_set_dfs_tb_ctrl(void *hal, u8 set); 963 enum rtw_hal_status 964 rtw_hal_thermal_protect_cfg_tx_ampdu( 965 void *hal, 966 struct rtw_phl_stainfo_t *sta, 967 u8 ratio); 968 969 bool rtw_hal_check_thermal_protect( 970 struct rtw_phl_com_t *phl_com, 971 void *hal); 972 973 enum rtw_hal_status 974 rtw_hal_beamform_set_aid(void *hal, struct rtw_phl_stainfo_t *sta, u16 aid); 975 976 /****************************************************************************** 977 * 978 * TX power APIs 979 * 980 *****************************************************************************/ 981 const char *rtw_hal_get_pw_lmt_regu_type_str(void *hal, enum band_type band); 982 983 bool rtw_hal_get_pwr_lmt_en(void *hal, u8 band_idx); 984 985 enum rtw_hal_status rtw_hal_set_tx_power(void *hal, u8 band_idx, 986 enum phl_pwr_table pwr_table); 987 988 enum rtw_hal_status rtw_hal_get_txinfo_power( 989 void *hal, s16 *txinfo_power_dbm); 990 /*****************************************************************************/ 991 992 u32 rtw_hal_get_phy_stat_info(void *hal, enum phl_band_idx hw_band, 993 enum phl_stat_info_query phy_stat); 994 #endif /*_HAL_API_H_*/ 995