1 /* SPDX-License-Identifier: GPL-2.0 */ 2 /****************************************************************************** 3 * 4 * Copyright(c) 2019 Realtek Corporation. 5 * 6 * This program is free software; you can redistribute it and/or modify it 7 * under the terms of version 2 of the GNU General Public License as 8 * published by the Free Software Foundation. 9 * 10 * This program is distributed in the hope that it will be useful, but WITHOUT 11 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 12 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for 13 * more details. 14 * 15 *****************************************************************************/ 16 #ifndef _RTL8723FU_HAL_H_ 17 #define _RTL8723FU_HAL_H_ 18 19 #ifdef CONFIG_USB_HCI 20 #include <drv_types.h> /* PADAPTER */ 21 22 #ifdef CONFIG_USB_HCI 23 #ifdef USB_PACKET_OFFSET_SZ 24 #define PACKET_OFFSET_SZ (USB_PACKET_OFFSET_SZ) 25 #else 26 #define PACKET_OFFSET_SZ (8) 27 #endif 28 #define TXDESC_OFFSET (TXDESC_SIZE + PACKET_OFFSET_SZ) 29 #endif 30 31 /* undefine MAX_RECVBUF_SZ from rtl8723f_hal.h */ 32 #ifdef MAX_RECVBUF_SZ 33 #undef MAX_RECVBUF_SZ 34 #endif 35 36 /* recv_buffer must be large than usb agg size */ 37 #ifndef MAX_RECVBUF_SZ 38 #ifndef CONFIG_MINIMAL_MEMORY_USAGE 39 #ifdef CONFIG_PLATFORM_NOVATEK_NT72668 40 #define MAX_RECVBUF_SZ (15360) /* 15k */ 41 #elif defined(CONFIG_PLATFORM_HISILICON) 42 /* use 16k to workaround for HISILICON platform */ 43 #define MAX_RECVBUF_SZ (16384) 44 #else 45 #define MAX_RECVBUF_SZ (32768) 46 #endif 47 #else 48 #define MAX_RECVBUF_SZ (4000) 49 #endif 50 #endif /* !MAX_RECVBUF_SZ */ 51 52 /* rtl8723fu_ops.c */ 53 void rtl8723fu_set_hal_ops(PADAPTER padapter); 54 void rtl8723fu_set_hw_type(struct dvobj_priv *pdvobj); 55 56 /* rtl8723fu_io.c */ 57 void rtl8723fu_set_intf_ops(struct _io_ops *pops); 58 59 #endif /* CONFIG_USB_HCI */ 60 61 62 #endif /* _RTL8723FU_HAL_H_ */ 63