77 for ( i = 0 ; i <
sizeof (
regs ) ; i++ )
79 DBGC ( rtl,
"REALTEK %p register dump:\n", rtl );
135 unsigned int bit_id ) {
144 return (
reg & mask );
155 unsigned int bit_id,
unsigned long data ) {
196 DBGC ( rtl,
"REALTEK %p EEPROM is a 93C56\n", rtl );
197 init_at93c56 ( &rtl->
eeprom, 16 );
199 DBGC ( rtl,
"REALTEK %p EEPROM is a 93C46\n", rtl );
200 init_at93c46 ( &rtl->
eeprom, 16 );
208 &
id, sizeof (
id ) ) ) != 0 ) {
209 DBGC ( rtl,
"REALTEK %p could not read EEPROM ID: %s\n",
214 DBGC ( rtl,
"REALTEK %p EEPROM ID incorrect (%#04x); assuming " 226 DBGC ( rtl,
"REALTEK %p EEPROM in use for VPD; cannot use " 227 "for options\n", rtl );
279 DBGC ( rtl,
"REALTEK %p timed out waiting for MII read\n", rtl );
294 unsigned int data ) {
319 DBGC ( rtl,
"REALTEK %p timed out waiting for MII write\n", rtl );
360 DBGC ( rtl,
"REALTEK %p timed out waiting for reset\n", rtl );
376 if ( ctrl1000 < 0 ) {
378 DBGC ( rtl,
"REALTEK %p could not read CTRL1000: %s\n",
386 DBGC ( rtl,
"REALTEK %p could not write CTRL1000: %s\n",
409 DBGC ( rtl,
"REALTEK %p could not reset MII: %s\n",
435 DBGC ( rtl,
"REALTEK %p could not restart MII: %s\n",
466 DBGC ( rtl,
"REALTEK %p PHY status is %02x (%s%s%s%s%s%s, " 467 "Link%s, %sDuplex)\n", rtl, phystatus,
486 DBGC ( rtl,
"REALTEK %p media status is %02x (Link%s, " 487 "%dMbps%s%s%s%s%s)\n", rtl, msr,
534 DBGC ( rtl,
"REALTEK %p receive buffer is at [%08lx,%08lx,%08lx)\n",
593 DBGC ( rtl,
"REALTEK %p ring %02x is at [%08lx,%08lx)\n",
667 DBGC2 ( rtl,
"REALTEK %p RX %d is [%lx,%lx)\n",
695 goto err_create_buffer;
829 DBGC2 ( rtl,
"REALTEK %p TX %d is [%lx,%lx)\n",
868 DBGC2 ( rtl,
"REALTEK %p TX %d complete\n", rtl, tx_idx );
895 DBGC2 ( rtl,
"REALTEK %p RX offset %x+%zx\n",
915 DBGC ( rtl,
"REALTEK %p RX offset %x+%zx error %04x\n",
969 DBGC ( rtl,
"REALTEK %p RX %d error (length %zd, " 970 "flags %04x)\n", rtl, rx_idx,
len,
974 DBGC2 ( rtl,
"REALTEK %p RX %d complete (length " 975 "%zd)\n", rtl, rx_idx,
len );
1083 if ( check_rms == rms ) {
1084 DBGC ( rtl,
"REALTEK %p appears to be an RTL8169\n", rtl );
1089 if ( ( check_cpcr == cpcr ) && ( cpcr != 0xffff ) ) {
1090 DBGC ( rtl,
"REALTEK %p appears to be an RTL8139C+\n",
1095 DBGC ( rtl,
"REALTEK %p appears to be an RTL8139\n",
1125 memset ( rtl, 0,
sizeof ( *rtl ) );
1134 if ( ! rtl->
regs ) {
1156 DBGC ( rtl,
"REALTEK %p could not read MAC address: " 1179 goto err_register_netdev;
1188 goto err_register_nvo;
1195 err_register_netdev:
1235 PCI_ROM ( 0x0001, 0x8168,
"clone8169",
"Cloned 8169", 0 ),
1236 PCI_ROM ( 0x018a, 0x0106,
"fpc0106tx",
"LevelOne FPC-0106TX", 0 ),
1237 PCI_ROM ( 0x021b, 0x8139,
"hne300",
"Compaq HNE-300", 0 ),
1238 PCI_ROM ( 0x02ac, 0x1012,
"s1012",
"SpeedStream 1012", 0 ),
1239 PCI_ROM ( 0x0357, 0x000a,
"ttpmon",
"TTTech TTP-Monitoring", 0 ),
1240 PCI_ROM ( 0x10ec, 0x8129,
"rtl8129",
"RTL-8129", 0 ),
1241 PCI_ROM ( 0x10ec, 0x8136,
"rtl8136",
"RTL8101E/RTL8102E", 0 ),
1242 PCI_ROM ( 0x10ec, 0x8138,
"rtl8138",
"RT8139 (B/C)", 0 ),
1243 PCI_ROM ( 0x10ec, 0x8139,
"rtl8139",
"RTL-8139/8139C/8139C+", 0 ),
1244 PCI_ROM ( 0x10ec, 0x8167,
"rtl8167",
"RTL-8110SC/8169SC", 0 ),
1245 PCI_ROM ( 0x10ec, 0x8168,
"rtl8168",
"RTL8111/8168B", 0 ),
1246 PCI_ROM ( 0x10ec, 0x8169,
"rtl8169",
"RTL-8169", 0 ),
1247 PCI_ROM ( 0x1113, 0x1211,
"smc1211",
"SMC2-1211TX", 0 ),
1248 PCI_ROM ( 0x1186, 0x1300,
"dfe538",
"DFE530TX+/DFE538TX", 0 ),
1249 PCI_ROM ( 0x1186, 0x1340,
"dfe690",
"DFE-690TXD", 0 ),
1250 PCI_ROM ( 0x1186, 0x4300,
"dge528t",
"DGE-528T", 0 ),
1251 PCI_ROM ( 0x11db, 0x1234,
"sega8139",
"Sega Enterprises 8139", 0 ),
1252 PCI_ROM ( 0x1259, 0xa117,
"allied8139",
"Allied Telesyn 8139", 0 ),
1253 PCI_ROM ( 0x1259, 0xa11e,
"allied81xx",
"Allied Telesyn 81xx", 0 ),
1254 PCI_ROM ( 0x1259, 0xc107,
"allied8169",
"Allied Telesyn 8169", 0 ),
1255 PCI_ROM ( 0x126c, 0x1211,
"northen8139",
"Northern Telecom 8139", 0 ),
1256 PCI_ROM ( 0x13d1, 0xab06,
"fe2000vx",
"Abocom FE2000VX", 0 ),
1257 PCI_ROM ( 0x1432, 0x9130,
"edi8139",
"Edimax 8139", 0 ),
1258 PCI_ROM ( 0x14ea, 0xab06,
"fnw3603tx",
"Planex FNW-3603-TX", 0 ),
1259 PCI_ROM ( 0x14ea, 0xab07,
"fnw3800tx",
"Planex FNW-3800-TX", 0 ),
1260 PCI_ROM ( 0x1500, 0x1360,
"delta8139",
"Delta Electronics 8139", 0 ),
1261 PCI_ROM ( 0x16ec, 0x0116,
"usr997902",
"USR997902", 0 ),
1262 PCI_ROM ( 0x1737, 0x1032,
"linksys8169",
"Linksys 8169", 0 ),
1263 PCI_ROM ( 0x1743, 0x8139,
"rolf100",
"Peppercorn ROL/F-100", 0 ),
1264 PCI_ROM ( 0x4033, 0x1360,
"addron8139",
"Addtron 8139", 0 ),
1265 PCI_ROM ( 0xffff, 0x8139,
"clonse8139",
"Cloned 8139", 0 ),
#define RTL_MSR_RXPF
RX pause flag.
#define RTL_TPPOLL_NPQ
Normal Priority Queue Polling.
struct realtek_descriptor * desc
Descriptors.
struct bit_basher basher
Bit-bashing interface.
#define RTL_RXBUF_ALIGN
Receive buffer alignment.
unsigned long membase
Memory base.
#define RTL_RCR_AB
Accept broadcast packets.
static void realtek_spi_write_bit(struct bit_basher *basher, unsigned int bit_id, unsigned long data)
Set/clear output bit.
struct arbelprm_rc_send_wqe rc
#define RTL_TCR_MXDMA_DEFAULT
#define RTL_CR_RE
Receiver Enable.
uint8_t readb(volatile uint8_t *io_addr)
Read byte from memory-mapped device.
static void realtek_destroy_ring(struct realtek_nic *rtl, struct realtek_ring *ring)
Destroy descriptor ring.
#define iob_put(iobuf, len)
struct dma_device dma
DMA device.
void netdev_rx_err(struct net_device *netdev, struct io_buffer *iobuf, int rc)
Discard received packet.
void netdev_tx_defer(struct net_device *netdev, struct io_buffer *iobuf)
Defer transmitted packet.
#define RTL_EEPROM_MAC
Word offset of MAC address within EEPROM.
#define ADVERTISE_1000FULL
#define RTL_RCR_WRAP
Overrun receive buffer.
#define RTL_IRQ_RER
Receive error.
#define RTL_RCR_9356SEL
EEPROM is a 93C56.
static unsigned int unsigned int reg
#define RTL_EEPROM_ID_MAGIC
EEPROM code word magic value.
static void realtek_spi_open_bit(struct bit_basher *basher)
Open bit-bashing interface.
struct dma_mapping map
Descriptor ring DMA mapping.
int(* open)(struct net_device *netdev)
Open network device.
#define RTL_CAPR
Current Address of Packet Read (word, 8139 only)
unsigned int prod
Producer index.
#define RTL_MII_MAX_WAIT_US
Maximum time to wait for PHY access, in microseconds.
static int realtek_create_buffer(struct realtek_nic *rtl)
Create receive buffer (legacy mode)
#define RTL_RCR_AM
Accept multicast packets.
#define RTL_MSR_SPEED_10
10Mbps
#define RTL_TCR
Transmit (Tx) Configuration Register (dword)
static void realtek_detect(struct realtek_nic *rtl)
Detect device type.
uint16_t readw(volatile uint16_t *io_addr)
Read 16-bit word from memory-mapped device.
#define RTL_RX_MAX_LEN
Receive buffer length.
static void netdev_tx_complete_next(struct net_device *netdev)
Complete network transmission.
#define RTL_MSR_LINKB
Inverse of link status.
#define DBG_ENABLE(level)
struct pci_device_id * ids
PCI ID table.
uint64_t address
Base address.
#define RTL_MSR_TXPF
TX pause flag.
int register_nvo(struct nvo_block *nvo, struct settings *parent)
Register non-volatile stored options.
int(* read)(struct mii_interface *mdio, unsigned int phy, unsigned int reg)
Read from MII register.
static struct bit_basher_operations realtek_basher_ops
SPI bit-bashing interface.
static struct pci_device_id realtek_nics[]
Realtek PCI device IDs.
#define RTL_ISR
Interrupt Status Register (word)
#define RTL_PHYSTATUS_RXFLOW
RX flow control enabled.
struct nvo_block nvo
Non-volatile options.
int have_phy_regs
PHYAR and PHYSTATUS registers are present.
uint32_t readl(volatile uint32_t *io_addr)
Read 32-bit dword from memory-mapped device.
#define RTL_EEPROM_ID
Word offset of ID code word within EEPROM.
#define RTL_IDR0
ID Register 0 (6 bytes)
#define RTL_EEPROM_VPD
Word offset of VPD / non-volatile options within EEPROM.
#define RTL_PHYSTATUS_100M
100Mbps
static __always_inline void dma_set_mask_64bit(struct dma_device *dma)
Set 64-bit addressable space mask.
#define RTL_MSR_AUX_STATUS
Aux power present.
unsigned long long uint64_t
#define DBG_DISABLE(level)
#define RTL_9346CR_EEDO
Data out.
Realtek 10/100/1000 network card driver.
#define cpu_to_le64(value)
void netdev_link_down(struct net_device *netdev)
Mark network device as having link down.
#define RTL_BAR_SIZE
PCI memory BAR size.
#define RTL_TSD_ERTXTH_DEFAULT
static void realtek_remove(struct pci_device *pci)
Remove PCI device.
#define RTL_TSD_OWN
Ownership.
#define RTL_MSR
Media Status Register (byte, 8139 only)
static void realtek_poll_rx(struct net_device *netdev)
Poll for received packets.
static const uint8_t realtek_eeprom_bits[]
Pin mapping for SPI bit-bashing interface.
static int realtek_init_eeprom(struct net_device *netdev)
Initialise EEPROM.
void adjust_pci_device(struct pci_device *pci)
Enable PCI device.
struct bit_basher_operations * op
Bit-bashing operations.
struct io_buffer * alloc_iob(size_t len)
Allocate I/O buffer.
static __always_inline unsigned long virt_to_phys(volatile const void *addr)
Convert virtual address to a physical address.
struct device dev
Generic device.
static struct settings * netdev_settings(struct net_device *netdev)
Get per-netdevice configuration settings block.
unsigned int reg
Descriptor start address register.
unsigned int mode
SPI interface mode.
void writeb(uint8_t data, volatile uint8_t *io_addr)
Write byte to memory-mapped device.
#define ENOTSUP
Operation not supported.
static void mdio_init(struct mii_interface *mdio, struct mii_operations *op)
Initialise MII interface.
#define RTL_RCR_STOP_WORKING
Here be dragons.
#define RTL_NUM_TX_DESC
Number of transmit descriptors.
Dynamic memory allocation.
struct realtek_rx_buffer rxbuf
Receive buffer (legacy mode)
#define RTL_EEPROM_VPD_LEN
Length of VPD / non-volatile options within EEPROM.
#define RTL_9346CR_EEDI
Data in.
static __always_inline int iob_map_tx(struct io_buffer *iobuf, struct dma_device *dma)
Map I/O buffer for transmit DMA.
int mii_restart(struct mii_device *mii)
Restart autonegotiation.
#define RTL_RCR_MXDMA_DEFAULT
#define RTL_CONFIG1
Configuration Register 1 (byte)
static void netdev_init(struct net_device *netdev, struct net_device_operations *op)
Initialise a network device.
#define RTL_MSR_TXFCE
TX flow control enabled.
struct mii_device mii
MII device.
static void pci_set_drvdata(struct pci_device *pci, void *priv)
Set PCI driver-private data.
#define ENOMEM
Not enough space.
#define RTL_RING_ALIGN
Descriptor ring alignment.
void * memcpy(void *dest, const void *src, size_t len) __nonnull
Three-wire serial interface.
#define RTL_IMR
Interrupt Mask Register (word)
struct dma_device * dma
DMA device.
#define RTL_CONFIG1_VPD
Vital Product Data enabled.
#define RTL_9346CR
93C46 (93C56) Command Register (byte)
void dma_free(struct dma_mapping *map, void *addr, size_t len)
Unmap and free DMA-coherent buffer.
#define RTL_PHYAR_VALUE(flag, reg, data)
Construct PHY Access Register value.
assert((readw(&hdr->flags) &(GTF_reading|GTF_writing))==0)
static void netdev_put(struct net_device *netdev)
Drop reference to network device.
#define container_of(ptr, type, field)
Get containing structure.
static int realtek_reset(struct realtek_nic *rtl)
Reset hardware.
static void realtek_dump(struct realtek_nic *rtl)
Dump all registers (for debugging)
void * priv
Driver private data.
pseudo_bit_t value[0x00020]
#define __unused
Declare a variable or data structure as unused.
#define RTL_PHYSTATUS_FULLDUP
Full duplex.
void init_spi_bit_basher(struct spi_bit_basher *spibit)
Initialise SPI bit-bashing interface.
#define RTL_CPCR_CPTX
C+ transmit enable.
static void netdev_link_up(struct net_device *netdev)
Mark network device as having link up.
void writel(uint32_t data, volatile uint32_t *io_addr)
Write 32-bit dword to memory-mapped device.
struct realtek_ring rx
Receive descriptor ring.
void udelay(unsigned long usecs)
Delay for a fixed number of microseconds.
static int realtek_phy_reset(struct realtek_nic *rtl)
Reset PHY.
static struct net_device * netdev
unsigned int offset
Offset within buffer.
static void realtek_poll_tx(struct net_device *netdev)
Poll for completed packets.
static __always_inline physaddr_t iob_dma(struct io_buffer *iobuf)
Get I/O buffer DMA address.
static void realtek_close(struct net_device *netdev)
Close network device.
Descriptor is owned by NIC.
static void realtek_destroy_buffer(struct realtek_nic *rtl)
Destroy receive buffer (legacy mode)
#define RTL_CR_BUFE
Receive buffer empty.
struct dma_mapping map
Buffer DMA mapping.
void unregister_netdev(struct net_device *netdev)
Unregister network device.
static void realtek_poll(struct net_device *netdev)
Poll for completed and received packets.
#define RTL_IRQ_PUN_LINKCHG
Packet underrun / link change.
void unregister_nvo(struct nvo_block *nvo)
Unregister non-volatile stored options.
#define RTL_TCR_MXDMA_MASK
uint8_t id
Request identifier.
size_t len
Length (in bytes)
static void realtek_init_ring(struct realtek_ring *ring, unsigned int count, unsigned int reg)
Initialise descriptor ring.
static void realtek_irq(struct net_device *netdev, int enable)
Enable or disable interrupts.
#define RTL_PHYSTATUS_ENTBI
TBI / GMII mode.
#define RTL_CR
Command Register (byte)
#define iob_unput(iobuf, len)
struct nvs_device * nvs
Underlying non-volatile storage device.
char * strerror(int errno)
Retrieve string representation of error number.
struct refcnt refcnt
Reference counter.
#define RTL_CR_TE
Transmit Enable.
static void realtek_check_link(struct net_device *netdev)
Check link state.
struct io_buffer * alloc_rx_iob(size_t len, struct dma_device *dma)
Allocate and map I/O buffer for receive DMA.
void nvo_init(struct nvo_block *nvo, struct nvs_device *nvs, size_t address, size_t len, int(*resize)(struct nvo_block *nvo, size_t len), struct refcnt *refcnt)
Initialise non-volatile stored options.
#define RTL_CPCR
C+ Command Register (word)
#define RTL_RCR_RXFTH_DEFAULT
#define RTL_RCR_RBLEN_MASK
#define RTL_RCR_AAP
Accept all packets.
int register_netdev(struct net_device *netdev)
Register network device.
static size_t iob_len(struct io_buffer *iobuf)
Calculate length of data in an I/O buffer.
static int realtek_transmit(struct net_device *netdev, struct io_buffer *iobuf)
Transmit packet.
Receive buffer (legacy mode *)
Media Independent Interface.
#define RTL_PHYAR
PHY Access Register (dword, 8169 only)
static void realtek_refill_rx(struct realtek_nic *rtl)
Refill receive descriptor ring.
#define ENODEV
No such device.
unsigned int cons
Consumer index.
#define SPI_BIT_SS(slave)
Determine bit index for a particular slave.
static void netdev_nullify(struct net_device *netdev)
Stop using a network device.
#define RTL_CPCR_CPRX
C+ receive enable.
#define RTL_RCR_RXFTH_MASK
#define RTL_PHYSTATUS_LINKSTS
Link ok.
static void mii_dump(struct mii_device *mii)
Dump MII registers (for debugging)
int mii_reset(struct mii_device *mii)
Reset MII device.
static int realtek_mii_read(struct mii_interface *mdio, unsigned int phy __unused, unsigned int reg)
Read from MII register.
A PCI device ID list entry.
#define ADVERTISE_1000HALF
#define le16_to_cpu(value)
#define RTL_9346CR_EEM_NORMAL
Normal mode.
struct spi_bus bus
SPI bus.
static struct xen_remove_from_physmap * remove
#define RTL_MSR_RXFCE
RX flow control enabled.
Network device operations.
void netdev_rx(struct net_device *netdev, struct io_buffer *iobuf)
Add packet to receive queue.
struct device * dev
Underlying hardware device.
static void mii_init(struct mii_device *mii, struct mii_interface *mdio, unsigned int address)
Initialise MII device.
static struct mii_operations realtek_mii_operations
Realtek MII operations.
void * dma_alloc(struct dma_device *dma, struct dma_mapping *map, size_t len, size_t align)
Allocate and map DMA-coherent buffer.
Network device management.
MII interface operations.
static int realtek_probe(struct pci_device *pci)
Probe PCI device.
#define RTL_TNPDS
Transmit Normal Priority Descriptors (qword)
struct nvs_device nvs
NVS device.
static void * pci_get_drvdata(struct pci_device *pci)
Get PCI driver-private data.
void mdelay(unsigned long msecs)
Delay for a fixed number of milliseconds.
#define RTL_TSD(n)
Transmit Status of Descriptor N (dword, 8139 only)
static int realtek_mii_write(struct mii_interface *mdio, unsigned int phy __unused, unsigned int reg, unsigned int data)
Write to MII register.
struct pci_driver realtek_driver __pci_driver
Realtek PCI driver.
int legacy
Legacy datapath mode.
#define RTL_RMS
RX Packet Maximum Size Register (word)
#define RTL_MAR4
Multicast Register 4 (dword)
#define RTL_IRQ_ROK
Receive OK.
struct mii_interface mdio
MII interface.
void free_rx_iob(struct io_buffer *iobuf)
Unmap and free I/O buffer for receive DMA.
#define RTL_IRQ_TOK
Transmit OK.
int(* probe)(struct pci_device *pci)
Probe device.
#define RTL_RCR_RBLEN_DEFAULT
#define RTL_RXBUF_LEN
Receive buffer length.
#define RTL_PHYSTATUS_TXFLOW
TX flow control enabled.
void * data
Start of data.
#define RTL_RESET_MAX_WAIT_MS
Maximum time to wait for a reset, in milliseconds.
#define EIO
Input/output error.
#define RTL_9346CR_EESK
Clock.
struct spi_bus * bus
SPI bus to which device is attached.
#define RTL_IRQ_TER
Transmit error.
struct net_device * alloc_etherdev(size_t priv_size)
Allocate Ethernet device.
u8 rx[WPA_TKIP_MIC_KEY_LEN]
MIC key for packets from the AP.
#define RTL_TPPOLL_8169
Transmit Priority Polling Register (byte, 8169 only)
unsigned int tppoll
TPPoll register offset.
#define cpu_to_le16(value)
void iounmap(volatile const void *io_addr)
Unmap I/O address.
uint8_t data[48]
Additional event data.
#define RTL_DESC_SIZE_MASK
Descriptor buffer size mask.
static struct net_device_operations realtek_operations
Realtek network device operations.
static int realtek_open(struct net_device *netdev)
Open network device.
int nvs_read(struct nvs_device *nvs, unsigned int address, void *data, size_t len)
Read from non-volatile storage device.
static int mii_read(int phy_id, int location)
#define RTL_RXBUF_PAD
Receive buffer padding.
#define RTL_CPCR_VLAN
VLAN tag stripping enable.
static int realtek_spi_read_bit(struct bit_basher *basher, unsigned int bit_id)
Read input bit.
void(* open)(struct bit_basher *basher)
Open bit-bashing interface (optional)
#define SPI_MODE_THREEWIRE
Threewire-compatible mode.
#define RTL_RDSAR
Receive Descriptor Start Address Register (qword)
static int realtek_create_ring(struct realtek_nic *rtl, struct realtek_ring *ring)
Create descriptor ring.
#define RTL_CPCR_DAC
PCI Dual Address Cycle enable.
#define RTL_9346CR_EEM_EEPROM
EEPROM mode.
#define RTL_RCR_MXDMA_MASK
#define RTL_TPPOLL_8139CP
Transmit Priority Polling Register (byte, 8139C+ only)
A Realtek descriptor ring.
static __always_inline physaddr_t dma(struct dma_mapping *map, void *addr)
Get DMA address from virtual address.
void * pci_ioremap(struct pci_device *pci, unsigned long bus_addr, size_t len)
Map PCI bus address as an I/O address.
#define RTL_CPCR_MULRW
PCI Multiple Read/Write enable.
#define RTL_MAR0
Multicast Register 0 (dword)
FILE_LICENCE(GPL2_OR_LATER_OR_UBDL)
First segment descriptor.
#define RTL_PHYAR_DATA(value)
Extract PHY Access Register data.
static int mii_write(struct mii_device *mii, unsigned int reg, unsigned int data)
Write to MII register.
#define RTL_RBSTART
Receive Buffer Start Address (dword, 8139 only)
uint8_t hw_addr[MAX_HW_ADDR_LEN]
Hardware address.
#define NULL
NULL pointer (VOID *)
#define RTL_PHYAR_FLAG
Read/write flag.
#define ETIMEDOUT
Connection timed out.
struct realtek_ring tx
Transmit descriptor ring.
#define PCI_ROM(_vendor, _device, _name, _description, _data)
void iob_pad(struct io_buffer *iobuf, size_t min_len)
Pad I/O buffer.
struct io_buffer * rx_iobuf[RTL_NUM_RX_DESC]
Receive I/O buffers.
static void realtek_spi_close_bit(struct bit_basher *basher)
Close bit-bashing interface.
#define RTL_RCR_APM
Accept physical match.
#define RTL_PHYSTATUS
PHY (GMII, MII, or TBI) Status Register (byte, 8169 only)
#define RTL_NUM_RX_DESC
Number of receive descriptors.
#define RTL_PHYSTATUS_10M
10Mbps
#define RTL_RCR
Receive (Rx) Configuration Register (dword)
#define RTL_PHYSTATUS_1000MF
1000Mbps full-duplex
struct spi_bit_basher spibit
SPI bit-bashing interface.
u8 tx[WPA_TKIP_MIC_KEY_LEN]
MIC key for packets to the AP.
static int realtek_phy_speed(struct realtek_nic *rtl)
Configure PHY for Gigabit operation.
#define RTL_9346CR_EECS
Chip select.
void * memset(void *dest, int character, size_t len) __nonnull
static void realtek_legacy_poll_rx(struct net_device *netdev)
Poll for received packets (legacy mode)
struct spi_device eeprom
EEPROM.
#define RTL_TSAD(n)
Transmit Start Address of Descriptor N (dword, 8139 only)