diff --git a/Makefile b/Makefile index fb07213..a2d431c 100644 --- a/Makefile +++ b/Makefile @@ -1885,7 +1885,8 @@ endif obj-$(CONFIG_RTL8710BU) := $(MODULE_NAME).o -else +#else +endif export CONFIG_RTL8710BU = m @@ -1961,4 +1962,4 @@ clean: rm -fr *.mod.c *.mod *.o *.o.* .*.cmd *.ko *~ rm -fr .tmp_versions rm -fr .cache.mk -endif +#endif diff --git a/README.md b/README.md index 587a3cd..d4a6b00 100644 --- a/README.md +++ b/README.md @@ -10,11 +10,24 @@ Compiling & Building To compile the driver, you need to have make and a compiler installed. In addition, you must have the kernel headers installed. If you do not understand what this means, consult your distro. -### Compiling + +### Via DKMS + +> sudo dkms install . + +### Arch + +> paru -S rtl8188gu-dkms-git + +See [for Ubuntu and others](https://tutorialforlinux.com/2022/01/07/how-to-add-realtek-rtl8188gu-driver-ppa-for-ubuntu-based-systems/) + +### Manually + +#### Compiling > make -### Installing +#### Installing > sudo make install @@ -29,4 +42,5 @@ consult your distro. 3. In Ubuntu 20.04 detected as GSM modem, need remove option driver as "sudo rmmod option". ### Testing -I tested on Ubuntu 16.04, 20.04 and last version OpenWRT, it's work... +The original author [McMCCRU](https://github.com/McMCCRU) tested on Ubuntu 16.04, 20.04 and last version OpenWRT, it's work... +I have tested this on Arch, Manjaro 22, Ubuntu 21.10, Debian 11, Fedora 35, openSUSE 15.3. diff --git a/dkms.conf b/dkms.conf new file mode 100644 index 0000000..508baf8 --- /dev/null +++ b/dkms.conf @@ -0,0 +1,8 @@ +PACKAGE_NAME="rtl8188gu" +PACKAGE_VERSION="1.0" +BUILT_MODULE_NAME="8188gu" +DEST_MODULE_LOCATION="/kernel/drivers/net/wireless/" +REMAKE_INITRD="yes" +AUTOINSTALL="yes" +MAKE="'make' all KVER=${kernelver}" +CLEAN="make clean" diff --git a/include/ieee80211.h b/include/ieee80211.h index efc2d2a..8c4a01e 100644 --- a/include/ieee80211.h +++ b/include/ieee80211.h @@ -1478,18 +1478,18 @@ enum ieee80211_state { (((Addr[2]) & 0xff) == 0xff) && (((Addr[3]) & 0xff) == 0xff) && (((Addr[4]) & 0xff) == 0xff) && \ (((Addr[5]) & 0xff) == 0xff)) #else -static __inline int is_multicast_mac_addr(const u8 *addr) +extern __inline int is_multicast_mac_addr(const u8 *addr) { return (addr[0] != 0xff) && (0x01 & addr[0]); } -static __inline int is_broadcast_mac_addr(const u8 *addr) +extern __inline int is_broadcast_mac_addr(const u8 *addr) { return ((addr[0] == 0xff) && (addr[1] == 0xff) && (addr[2] == 0xff) && \ (addr[3] == 0xff) && (addr[4] == 0xff) && (addr[5] == 0xff)); } -static __inline int is_zero_mac_addr(const u8 *addr) +extern __inline int is_zero_mac_addr(const u8 *addr) { return ((addr[0] == 0x00) && (addr[1] == 0x00) && (addr[2] == 0x00) && \ (addr[3] == 0x00) && (addr[4] == 0x00) && (addr[5] == 0x00)); diff --git a/os_dep/osdep_service.c b/os_dep/osdep_service.c index c7f7992..9dcb717 100644 --- a/os_dep/osdep_service.c +++ b/os_dep/osdep_service.c @@ -2086,9 +2086,7 @@ static int isFileReadable(const char *path, u32 *sz) { struct file *fp; int ret = 0; -#if (LINUX_VERSION_CODE < KERNEL_VERSION(5, 10, 0)) mm_segment_t oldfs; -#endif char buf; fp = filp_open(path, O_RDONLY, 0); @@ -2128,9 +2126,7 @@ static int isFileReadable(const char *path, u32 *sz) static int retriveFromFile(const char *path, u8 *buf, u32 sz) { int ret = -1; -#if (LINUX_VERSION_CODE < KERNEL_VERSION(5, 10, 0)) mm_segment_t oldfs; -#endif struct file *fp; if (path && buf) { @@ -2169,9 +2165,7 @@ static int retriveFromFile(const char *path, u8 *buf, u32 sz) static int storeToFile(const char *path, u8 *buf, u32 sz) { int ret = 0; -#if (LINUX_VERSION_CODE < KERNEL_VERSION(5, 10, 0)) mm_segment_t oldfs; -#endif struct file *fp; if (path && buf) {