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 _RTW_TRX_H_ 16*4882a593Smuzhiyun #define _RTW_TRX_H_ 17*4882a593Smuzhiyun 18*4882a593Smuzhiyun struct dvobj_priv; 19*4882a593Smuzhiyun struct rtw_intf_ops { 20*4882a593Smuzhiyun #ifdef CONFIG_SDIO_HCI 21*4882a593Smuzhiyun int __must_check (*read)(struct dvobj_priv *d, unsigned int addr, void *buf, 22*4882a593Smuzhiyun size_t len, bool fixed); 23*4882a593Smuzhiyun int __must_check (*write)(struct dvobj_priv *d, unsigned int addr, void *buf, 24*4882a593Smuzhiyun size_t len, bool fixed); 25*4882a593Smuzhiyun #endif /*CONFIG_SDIO_HCI*/ 26*4882a593Smuzhiyun 27*4882a593Smuzhiyun /*** xmit section ***/ 28*4882a593Smuzhiyun s32(*init_xmit_priv)(_adapter *adapter); 29*4882a593Smuzhiyun void(*free_xmit_priv)(_adapter *adapter); 30*4882a593Smuzhiyun 31*4882a593Smuzhiyun s32(*data_xmit)(_adapter *adapter, struct xmit_frame *pxmitframe); 32*4882a593Smuzhiyun s32(*xmitframe_enqueue)(_adapter *adapter, struct xmit_frame *pxmitframe); 33*4882a593Smuzhiyun 34*4882a593Smuzhiyun #if 0 /*def CONFIG_XMIT_THREAD_MODE*/ 35*4882a593Smuzhiyun s32(*xmit_buf_handler)(_adapter *adapter); 36*4882a593Smuzhiyun #endif 37*4882a593Smuzhiyun #if defined(CONFIG_SDIO_HCI) || defined(CONFIG_GSPI_HCI) 38*4882a593Smuzhiyun #ifndef CONFIG_SDIO_TX_TASKLET 39*4882a593Smuzhiyun u8(*start_xmit_frame_thread)(_adapter *adapter); 40*4882a593Smuzhiyun void(*cancel_xmit_frame_thread)(_adapter *adapter); 41*4882a593Smuzhiyun #endif 42*4882a593Smuzhiyun #endif 43*4882a593Smuzhiyun /*** recv section ***/ 44*4882a593Smuzhiyun s32(*init_recv_priv)(struct dvobj_priv *dvobj); 45*4882a593Smuzhiyun void(*free_recv_priv)(struct dvobj_priv *dvobj); 46*4882a593Smuzhiyun #ifdef CONFIG_RECV_THREAD_MODE 47*4882a593Smuzhiyun s32 (*recv_hdl)(_adapter *adapter); 48*4882a593Smuzhiyun #endif 49*4882a593Smuzhiyun 50*4882a593Smuzhiyun #if defined(CONFIG_PCI_HCI) 51*4882a593Smuzhiyun u32(*trxbd_init)(_adapter *adapter); 52*4882a593Smuzhiyun u32(*trxbd_deinit)(_adapter *adapter); 53*4882a593Smuzhiyun void(*trxbd_reset)(_adapter *adapter); 54*4882a593Smuzhiyun s32(*interrupt_handler)(_adapter *adapter); 55*4882a593Smuzhiyun #endif 56*4882a593Smuzhiyun 57*4882a593Smuzhiyun #if defined(CONFIG_USB_HCI) 58*4882a593Smuzhiyun #ifdef CONFIG_SUPPORT_USB_INT 59*4882a593Smuzhiyun void(*interrupt_handler)(_adapter *adapter, u16 pkt_len, u8 *pbuf); 60*4882a593Smuzhiyun #endif 61*4882a593Smuzhiyun #endif 62*4882a593Smuzhiyun 63*4882a593Smuzhiyun #ifdef CONFIG_HOSTAPD_MLME 64*4882a593Smuzhiyun s32(*hostap_mgnt_xmit_entry)(_adapter *adapter, struct sk_buff *pkt); 65*4882a593Smuzhiyun #endif 66*4882a593Smuzhiyun }; 67*4882a593Smuzhiyun 68*4882a593Smuzhiyun s32 rtw_mgnt_xmit(_adapter *adapter, struct xmit_frame *pmgntframe); 69*4882a593Smuzhiyun 70*4882a593Smuzhiyun 71*4882a593Smuzhiyun #endif /* _RTW_TRX_H_ */ 72