1*4882a593Smuzhiyun /****************************************************************************** 2*4882a593Smuzhiyun * 3*4882a593Smuzhiyun * Copyright(c) 2015 - 2017 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 _RTL8822CU_HAL_H_ 16*4882a593Smuzhiyun #define _RTL8822CU_HAL_H_ 17*4882a593Smuzhiyun 18*4882a593Smuzhiyun #ifdef CONFIG_USB_HCI 19*4882a593Smuzhiyun #include <drv_types.h> /* PADAPTER */ 20*4882a593Smuzhiyun 21*4882a593Smuzhiyun #ifdef CONFIG_USB_HCI 22*4882a593Smuzhiyun #ifdef USB_PACKET_OFFSET_SZ 23*4882a593Smuzhiyun #define PACKET_OFFSET_SZ (USB_PACKET_OFFSET_SZ) 24*4882a593Smuzhiyun #else 25*4882a593Smuzhiyun #define PACKET_OFFSET_SZ (8) 26*4882a593Smuzhiyun #endif 27*4882a593Smuzhiyun #define TXDESC_OFFSET (TXDESC_SIZE + PACKET_OFFSET_SZ) 28*4882a593Smuzhiyun #endif 29*4882a593Smuzhiyun 30*4882a593Smuzhiyun /* undefine MAX_RECVBUF_SZ from rtl8822c_hal.h */ 31*4882a593Smuzhiyun #ifdef MAX_RECVBUF_SZ 32*4882a593Smuzhiyun #undef MAX_RECVBUF_SZ 33*4882a593Smuzhiyun #endif 34*4882a593Smuzhiyun 35*4882a593Smuzhiyun /* recv_buffer must be large than usb agg size */ 36*4882a593Smuzhiyun #ifndef MAX_RECVBUF_SZ 37*4882a593Smuzhiyun #ifndef CONFIG_MINIMAL_MEMORY_USAGE 38*4882a593Smuzhiyun #ifdef CONFIG_PLATFORM_NOVATEK_NT72668 39*4882a593Smuzhiyun #define MAX_RECVBUF_SZ (15360) /* 15k */ 40*4882a593Smuzhiyun #elif defined(CONFIG_PLATFORM_HISILICON) || defined(CONFIG_PLATFORM_ARM_RTD299X) 41*4882a593Smuzhiyun /* use 16k to workaround for HISILICON and RTK TV platform */ 42*4882a593Smuzhiyun #define MAX_RECVBUF_SZ (16384) 43*4882a593Smuzhiyun #else 44*4882a593Smuzhiyun #define MAX_RECVBUF_SZ (32768) 45*4882a593Smuzhiyun #endif 46*4882a593Smuzhiyun #else 47*4882a593Smuzhiyun #define MAX_RECVBUF_SZ (4000) 48*4882a593Smuzhiyun #endif 49*4882a593Smuzhiyun #endif /* !MAX_RECVBUF_SZ */ 50*4882a593Smuzhiyun 51*4882a593Smuzhiyun /* rtl8822cu_ops.c */ 52*4882a593Smuzhiyun void rtl8822cu_set_hal_ops(PADAPTER padapter); 53*4882a593Smuzhiyun void rtl8822cu_set_hw_type(struct dvobj_priv *pdvobj); 54*4882a593Smuzhiyun 55*4882a593Smuzhiyun /* rtl8822cu_io.c */ 56*4882a593Smuzhiyun void rtl8822cu_set_intf_ops(struct _io_ops *pops); 57*4882a593Smuzhiyun 58*4882a593Smuzhiyun #endif /* CONFIG_USB_HCI */ 59*4882a593Smuzhiyun 60*4882a593Smuzhiyun 61*4882a593Smuzhiyun #endif /* _RTL8822CU_HAL_H_ */ 62