1 /******************************************************************************
3 * Copyright(c) 2016 Realtek Corporation.
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.
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
14 * The full GNU General Public License is included in this distribution in the
15 * file called LICENSE.
17 * Contact Information:
18 * wlanfae <wlanfae@realtek.com>
19 * Realtek Corporation, No. 2, Innovation Road II, Hsinchu Science Park,
20 * Hsinchu 300, Taiwan.
22 * Larry Finger <Larry.Finger@lwfinger.net>
24 *****************************************************************************/
25 #ifndef _HALMAC_RX_BD_NIC_H_
26 #define _HALMAC_RX_BD_NIC_H_
30 #define GET_RX_BD_RXFAIL(__rx_bd) LE_BITS_TO_4BYTE(__rx_bd + 0x00, 31, 1)
31 #define GET_RX_BD_TOTALRXPKTSIZE(__rx_bd) \
32 LE_BITS_TO_4BYTE(__rx_bd + 0x00, 16, 13)
33 #define GET_RX_BD_RXTAG(__rx_bd) LE_BITS_TO_4BYTE(__rx_bd + 0x00, 16, 13)
34 #define GET_RX_BD_FS(__rx_bd) LE_BITS_TO_4BYTE(__rx_bd + 0x00, 15, 1)
35 #define GET_RX_BD_LS(__rx_bd) LE_BITS_TO_4BYTE(__rx_bd + 0x00, 14, 1)
36 #define GET_RX_BD_RXBUFFSIZE(__rx_bd) LE_BITS_TO_4BYTE(__rx_bd + 0x00, 0, 14)
40 #define GET_RX_BD_PHYSICAL_ADDR_LOW(__rx_bd) \
41 LE_BITS_TO_4BYTE(__rx_bd + 0x04, 0, 32)
45 #define GET_RX_BD_PHYSICAL_ADDR_HIGH(__rx_bd) \
46 LE_BITS_TO_4BYTE(__rx_bd + 0x08, 0, 32)