Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added DKMS support, added Arch/Manjaro repositories in the AUR #33

Open
wants to merge 12 commits into
base: master
Choose a base branch
from
5 changes: 3 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -1885,7 +1885,8 @@ endif

obj-$(CONFIG_RTL8710BU) := $(MODULE_NAME).o

else
#else
endif

export CONFIG_RTL8710BU = m

Expand Down Expand Up @@ -1961,4 +1962,4 @@ clean:
rm -fr *.mod.c *.mod *.o *.o.* .*.cmd *.ko *~
rm -fr .tmp_versions
rm -fr .cache.mk
endif
#endif
20 changes: 17 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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.
8 changes: 8 additions & 0 deletions dkms.conf
Original file line number Diff line number Diff line change
@@ -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"
6 changes: 3 additions & 3 deletions include/ieee80211.h
Original file line number Diff line number Diff line change
Expand Up @@ -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));
Expand Down
6 changes: 0 additions & 6 deletions os_dep/osdep_service.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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) {
Expand Down Expand Up @@ -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) {
Expand Down