1 /****************************************************************************** 2 * 3 * Copyright(c) 2007 - 2020 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 16 #ifndef _RTW_RECV_SHORTCUT_H_ 17 #define _RTW_RECV_SHORTCUT_H_ 18 19 #ifdef CONFIG_RTW_CORE_RXSC 20 21 #define NUM_RXSC_ENTRY 4 22 23 enum rxsc_entry_status { 24 RXSC_ENTRY_INVALID = 0, 25 RXSC_ENTRY_VALID, 26 RXSC_ENTRY_APPLYING, 27 }; 28 29 struct rxsc_wlan_hdr { 30 unsigned short fmctrl; 31 unsigned short duration; 32 unsigned char addr1[ETH_ALEN]; 33 unsigned char addr2[ETH_ALEN]; 34 unsigned char addr3[ETH_ALEN]; 35 unsigned short sequence; 36 unsigned char addr4[ETH_ALEN]; 37 unsigned short qosctrl; 38 unsigned char iv[8]; 39 }; 40 41 struct core_rxsc_entry { 42 u8 status; 43 u32 rxsc_payload_offset; 44 u32 rxsc_trim_pad; 45 46 struct rxsc_wlan_hdr rxsc_wlanhdr; 47 struct ethhdr rxsc_ethhdr; 48 struct rx_pkt_attrib rxsc_attrib; 49 50 u8 rxsc_wd[64]; 51 }; 52 53 struct core_rxsc_entry *core_rxsc_alloc_entry(_adapter *adapter, union recv_frame *prframe); 54 s32 core_rxsc_apply_check(_adapter *adapter, union recv_frame *prframe); 55 s32 core_rxsc_apply_shortcut(_adapter *adapter, union recv_frame *prframe); 56 void core_rxsc_clear_entry(_adapter *adapter, struct sta_info *psta); 57 58 #endif /* CONFIG_RTW_CORE_RXSC */ 59 #endif /* _RTW_RECV_SHORTCUT_H_ */ 60 61