Skip to content

Commit

Permalink
Imported version 8.055.00
Browse files Browse the repository at this point in the history
  • Loading branch information
mtorromeo committed Feb 7, 2025
1 parent 34e2e39 commit 9fbab99
Show file tree
Hide file tree
Showing 8 changed files with 406 additions and 298 deletions.
24 changes: 19 additions & 5 deletions autorun.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,14 @@ echo
echo "Check old driver and unload it."
check=`lsmod | grep r8169`
if [ "$check" != "" ]; then
echo "rmmod r8169"
/sbin/rmmod r8169
echo "rmmod r8169"
/sbin/rmmod r8169
fi

check=`lsmod | grep r8168`
if [ "$check" != "" ]; then
echo "rmmod r8168"
/sbin/rmmod r8168
echo "rmmod r8168"
/sbin/rmmod r8168
fi

echo "Build the module and install"
Expand Down Expand Up @@ -52,6 +52,21 @@ elif [ "$module" != "r8169" ]; then
mv $TARGET_PATH/r8169.ko $TARGET_PATH/r8169.bak
fi
fi
if test -e $TARGET_PATH/r8169.ko.zst ; then
echo "Backup r8169.ko.zst"
if test -e $TARGET_PATH/r8169.zst.bak ; then
i=0
while test -e $TARGET_PATH/r8169.zst.bak$i
do
i=$(($i+1))
done
echo "rename r8169.ko.zst to r8169.zst.bak$i"
mv $TARGET_PATH/r8169.ko.zst $TARGET_PATH/r8169.zst.bak$i
else
echo "rename r8169.ko.zst to r8169.zst.bak"
mv $TARGET_PATH/r8169.ko.zst $TARGET_PATH/r8169.zst.bak
fi
fi
fi

echo "DEPMOD $(uname -r)"
Expand Down Expand Up @@ -84,4 +99,3 @@ fi

echo "Completed."
exit 0

6 changes: 5 additions & 1 deletion src/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
# US6,570,884, US6,115,776, and US6,327,625.
################################################################################

CONFIG_SOC_LAN = n
CONFIG_SOC_LAN = y
ENABLE_FIBER_SUPPORT = n
ENABLE_REALWOW_SUPPORT = n
ENABLE_DASH_SUPPORT = n
Expand All @@ -48,6 +48,7 @@ ENABLE_MULTIPLE_TX_QUEUE = n
ENABLE_RSS_SUPPORT = n
ENABLE_LIB_SUPPORT = n
DISABLE_WOL_SUPPORT = n
ENABLE_GIGA_LITE = y

ifneq ($(KERNELRELEASE),)
obj-m := r8168.o
Expand Down Expand Up @@ -117,6 +118,9 @@ ifneq ($(KERNELRELEASE),)
ifeq ($(DISABLE_WOL_SUPPORT), y)
EXTRA_CFLAGS += -DDISABLE_WOL_SUPPORT
endif
ifeq ($(ENABLE_GIGA_LITE), y)
EXTRA_CFLAGS += -DENABLE_GIGA_LITE
endif
else
BASEDIR := /lib/modules/$(shell uname -r)
KERNELDIR ?= $(BASEDIR)/build
Expand Down
15 changes: 14 additions & 1 deletion src/r8168.h
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,18 @@ static inline void netdev_tx_completed_queue(struct netdev_queue *dev_queue,
static inline void netdev_tx_reset_queue(struct netdev_queue *q) {}
#endif

#if LINUX_VERSION_CODE < KERNEL_VERSION(5,8,0)
static inline void fsleep(unsigned long usecs)
{
if (usecs <= 10)
udelay(usecs);
else if (usecs <= 20000)
usleep_range(usecs, 2 * usecs);
else
msleep(DIV_ROUND_UP(usecs, 1000));
}
#endif /* LINUX_VERSION_CODE < KERNEL_VERSION(5,8,0) */

#if LINUX_VERSION_CODE < KERNEL_VERSION(5,2,0)
#define netdev_xmit_more() (0)
#endif
Expand Down Expand Up @@ -500,7 +512,7 @@ do { \
#define RSS_SUFFIX ""
#endif

#define RTL8168_VERSION "8.054.00" NAPI_SUFFIX FIBER_SUFFIX REALWOW_SUFFIX DASH_SUFFIX RSS_SUFFIX
#define RTL8168_VERSION "8.055.00" NAPI_SUFFIX FIBER_SUFFIX REALWOW_SUFFIX DASH_SUFFIX RSS_SUFFIX
#define MODULENAME "r8168"
#define PFX MODULENAME ": "

Expand Down Expand Up @@ -2170,6 +2182,7 @@ struct rtl8168_private {
u8 DASH;
u8 dash_printer_enabled;
u8 HwPkgDet;
u8 HwSuppOcpChannelVer;
void __iomem *cmac_ioaddr; /* cmac memory map physical address */
DECLARE_BITMAP(dash_req_flags, R8168_DASH_REQ_FLAG_MAX);

Expand Down
Loading

0 comments on commit 9fbab99

Please sign in to comment.