Skip to content

Commit

Permalink
Imported version 8.051.02
Browse files Browse the repository at this point in the history
  • Loading branch information
mtorromeo committed Nov 30, 2022
1 parent 3c30658 commit 8264305
Show file tree
Hide file tree
Showing 2 changed files with 386 additions and 188 deletions.
15 changes: 12 additions & 3 deletions src/r8168.h
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ do { \
#define NETIF_F_RXFCS 0
#endif

#ifndef HAVE_FREE_NETDEV
#if !defined(HAVE_FREE_NETDEV) && (LINUX_VERSION_CODE < KERNEL_VERSION(3,1,0))
#define free_netdev(x) kfree(x)
#endif

Expand Down Expand Up @@ -344,7 +344,7 @@ do { \
#define DASH_SUFFIX ""
#endif

#define RTL8168_VERSION "8.050.03" NAPI_SUFFIX FIBER_SUFFIX REALWOW_SUFFIX DASH_SUFFIX
#define RTL8168_VERSION "8.051.02" NAPI_SUFFIX FIBER_SUFFIX REALWOW_SUFFIX DASH_SUFFIX
#define MODULENAME "r8168"
#define PFX MODULENAME ": "

Expand Down Expand Up @@ -445,6 +445,11 @@ This is free software, and you are welcome to redistribute it under certain cond

#define OCP_STD_PHY_BASE 0xa400

//Channel Wait Count
#define R8168_CHANNEL_WAIT_COUNT (20000)
#define R8168_CHANNEL_WAIT_TIME (1) // 1us
#define R8168_CHANNEL_EXIT_DELAY_TIME (20) //20us

#define NODE_ADDRESS_SIZE 6

#define SHORT_PACKET_PADDING_BUF_SIZE 256
Expand Down Expand Up @@ -1387,6 +1392,7 @@ enum _DescStatusBit {
enum features {
// RTL_FEATURE_WOL = (1 << 0),
RTL_FEATURE_MSI = (1 << 1),
RTL_FEATURE_MSIX = (1 << 2),
};

enum wol_capability {
Expand Down Expand Up @@ -1513,6 +1519,8 @@ struct rtl8168_private {
struct RxDesc *RxDescArray; /* 256-aligned Rx descriptor ring */
dma_addr_t TxPhyAddr;
dma_addr_t RxPhyAddr;
u32 TxDescAllocSize;
u32 RxDescAllocSize;
struct sk_buff *Rx_skbuff[MAX_NUM_RX_DESC]; /* Rx data buffers */
struct ring_info tx_skb[MAX_NUM_TX_DESC]; /* Tx data buffers */
unsigned rx_buf_sz;
Expand All @@ -1525,6 +1533,7 @@ struct rtl8168_private {
u16 cp_cmd;
u16 intr_mask;
u16 timer_intr_mask;
int irq;
int phy_auto_nego_reg;
int phy_1000_ctrl_reg;
u8 org_mac_addr[NODE_ADDRESS_SIZE];
Expand Down Expand Up @@ -1810,7 +1819,7 @@ enum mcfg {
#define NIC_RAMCODE_VERSION_CFG_METHOD_28 (0x0019)
#define NIC_RAMCODE_VERSION_CFG_METHOD_29 (0x0055)
#define NIC_RAMCODE_VERSION_CFG_METHOD_31 (0x0003)
#define NIC_RAMCODE_VERSION_CFG_METHOD_35 (0x0010)
#define NIC_RAMCODE_VERSION_CFG_METHOD_35 (0x0019)

//hwoptimize
#define HW_PATCH_SOC_LAN (BIT_0)
Expand Down
Loading

0 comments on commit 8264305

Please sign in to comment.