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