xref: /OK3568_Linux_fs/external/rkwifibt/drivers/rtl8852bs/phl/hal_g6/hal_tx.h (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1 /******************************************************************************
2  *
3  * Copyright(c) 2019 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_TX_H_
16 #define _HAL_TX_H_
17 
18 /**
19  * this function will be used in read / write pointer mechanism and
20  * return the number of available read pointer
21  * @rptr: input, the read pointer
22  * @wptr: input, the write pointer
23  * @bndy: input, the boundary of read / write pointer mechanism
24  */
25 u16 hal_calc_avail_rptr(u16 rptr, u16 wptr, u16 bndy);
26 
27 /**
28  * this function will be used in read / write pointer mechanism and
29  * return the number of available write pointer
30  * @rptr: input, the read pointer
31  * @wptr: input, the write pointer
32  * @bndy: input, the boundary of read / write pointer mechanism
33  */
34 u16 hal_calc_avail_wptr(u16 rptr, u16 wptr, u16 bndy);
35 
36 #ifdef CONFIG_PCI_HCI
37 /**
38  * rtw_hal_query_txch_num - query total hw tx dma channels number
39  *
40  * returns the number of  hw tx dma channel
41  */
42 u8 rtw_hal_query_txch_num(void *hal);
43 #endif
44 
45 #endif /*_HAL_TX_H_*/
46