Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
90 commits
Select commit Hold shift + click to select a range
720c314
Fix build with 4.20
kelebek333 Jan 14, 2019
5e5c0f3
Create dkms.conf
kelebek333 Jan 14, 2019
9040a3d
Update Readme
kelebek333 Jan 14, 2019
bde3eae
Update Readme (install firmware)
kelebek333 Jan 14, 2019
23e5018
Fix for building Kernel 4.15.x
kelebek333 Jan 23, 2019
be62b69
Fix for building Kernel 4.15.x
kelebek333 Jan 23, 2019
8ff5f14
Update README.md
kelebek333 Jan 23, 2019
054355b
Add deb files for dkms and firmware
kelebek333 Jan 23, 2019
5eb90f3
Update Readme for deb packages
kelebek333 Jan 23, 2019
ace988b
Update Readme
kelebek333 Jan 23, 2019
caf65b6
Update Readme
kelebek333 Jan 23, 2019
cc3ea7d
Add info for PM
kelebek333 Feb 15, 2019
dbd5ccb
Update PM info
kelebek333 Feb 15, 2019
0766220
Update PM info
kelebek333 Feb 15, 2019
27a245c
Delete deb package for update
kelebek333 Feb 22, 2019
6e8f611
Update deb package: add conf file
kelebek333 Feb 22, 2019
f68e225
Update for new deb package
kelebek333 Feb 22, 2019
6ca0cef
Update from upstream
kelebek333 Mar 29, 2019
0efa5b4
Update from upstream for v5.0 fix
kelebek333 Mar 29, 2019
a0cddd9
Update from upstream - fix for missing signal
kelebek333 Mar 29, 2019
3ea5259
Remove 1.0.2-1 package
kelebek333 Mar 29, 2019
a6c55b9
Add package version 1.0.3
kelebek333 Mar 29, 2019
1ea1c6e
Update readme for 1.0.3/5.0.x
kelebek333 Mar 29, 2019
ca07683
Update readme with command bbcode
kelebek333 Mar 29, 2019
c958062
Fix for kernel 5.1
kelebek333 Jun 12, 2019
b6d1b73
Fix for kernel 5.2
kelebek333 Jun 12, 2019
3a70b5f
Remove 1.0.3 package
kelebek333 Jun 12, 2019
ee2655b
Add package of 1.0.4
kelebek333 Jun 12, 2019
ab6d350
Update readme for package of 1.0.4
kelebek333 Jun 12, 2019
a607589
Update readme for kernel version
kelebek333 Sep 1, 2019
b14fc9d
Install from PPA
kelebek333 Oct 15, 2019
9b2f7d4
Update configuration section
kelebek333 Oct 15, 2019
5ef279b
Update PPA install section
kelebek333 Oct 15, 2019
39061c5
Info distro for PPA
kelebek333 Oct 15, 2019
80c2dd1
Update distro info for PPA
kelebek333 Oct 15, 2019
9662856
Delete package
kelebek333 Oct 15, 2019
17825f9
Delete package
kelebek333 Oct 15, 2019
252c6f5
Fixes kernel 5.6
kelebek333 Jun 9, 2020
a00dd25
Update readme kernel 5.7 and arm
kelebek333 Jun 9, 2020
977ad12
Update README.md
kelebek333 Jun 9, 2020
09ca8cb
Update ppa info for supported series
kelebek333 Jun 10, 2020
291e4bf
Fix for kernel 5.8
kelebek333 Aug 21, 2020
7fcca3f
Fix for kernel 5.8
kelebek333 Aug 21, 2020
1c5cc06
Fix for kernel 5.8
kelebek333 Aug 21, 2020
5c8094c
Fix for kernel 5.8
kelebek333 Aug 21, 2020
eb524f7
Update Readme
kelebek333 Aug 21, 2020
7c988d6
Add "disable MAC Address Spoofing" info
kelebek333 Sep 13, 2020
b01ebdf
Update readme for Linux 5.9
kelebek333 Oct 22, 2020
3980925
Fix for kernel 5.10
kelebek333 Jan 2, 2021
21813e9
Update readme for Linux 5.10
kelebek333 Jan 2, 2021
6ac279a
Update readme for kernel 5.11
kelebek333 Jan 23, 2021
c91db45
5.10 new patch
kelebek333 Aug 6, 2021
1b5ba4c
5.10 new patch
kelebek333 Aug 6, 2021
e91ab59
5.10 new patch
kelebek333 Aug 6, 2021
1935e11
5.10 new patch
kelebek333 Aug 6, 2021
3f3fd10
5.10 new patch
kelebek333 Aug 6, 2021
9fa3ec4
5.10 new patch
kelebek333 Aug 6, 2021
29422e0
Merge pull request #8 from kelebek333/kelebek333-5.10-new-patch
kelebek333 Aug 6, 2021
adeb8a4
Fix wireless regulatory API misuse (#10)
kelebek333 Aug 15, 2021
b9002a2
Added kernel 5.15 support
kelebek333 Oct 1, 2021
e9b34e3
Update readme
kelebek333 Oct 1, 2021
8758a6d
Remove deprecated feature: REMAKE_INITRD
kelebek333 Dec 25, 2021
6ce79ae
Fix fallthrough warning (#17)
kelebek333 Dec 26, 2021
4c37674
Add info for kernel 5.15 conflict
kelebek333 Dec 26, 2021
e7f2fcc
Update configuration section
kelebek333 Dec 26, 2021
b92dcad
Build fix for kernel 5.17 (#27)
kelebek333 Feb 5, 2022
3596933
Update readme for 5.17
kelebek333 Feb 5, 2022
f0eb4d2
Update readme
kelebek333 Feb 18, 2022
688e56d
Architecture support updated
kelebek333 Feb 21, 2022
5f962a3
Readme updated - remove arm info
kelebek333 Feb 21, 2022
19d58ae
Added buildfix for Linux 5.18
kelebek333 Apr 9, 2022
211e8b6
Update README.md
kelebek333 Apr 9, 2022
dfe0a50
Fixed rtw_memcpy warnings
kelebek333 Apr 11, 2022
3c6679d
Added 5.19 and 6.0 buildfix
kelebek333 Sep 25, 2022
e9fed31
update readme
kelebek333 Sep 25, 2022
89d7288
info about builtin module
kelebek333 Sep 25, 2022
f5df53d
update readme for builtin driver link
kelebek333 Oct 4, 2022
4b1a8a0
Buildfix linux 6.0
kelebek333 Nov 1, 2022
751882b
update readme
kelebek333 Nov 1, 2022
ff2c2fe
Buildfix for Linux 6.1
kelebek333 Aug 2, 2023
b037432
Update README.md
kelebek333 Aug 2, 2023
702611f
Update README.md (removed arm branch link)
kelebek333 Aug 2, 2023
0fc73d1
Update README.md
kelebek333 Aug 10, 2023
c889f89
Update README.md
kelebek333 Sep 25, 2023
68ced40
Update README
kelebek333 Oct 18, 2023
1e1b834
Buildfix for Linux 6.7
kelebek333 Jan 21, 2024
f5fc696
ISO C90: fix the APIs to compile with standard (#46)
djkabutar Feb 14, 2024
0ede079
Reduce debug logging in kernel logs (dmesg) (#42)
pdcastro Feb 14, 2024
9f9411a
Fix build for kernel 6.8.x (#47)
es-fabricemarie Apr 17, 2024
7ce4303
Update info linux kernel module
kelebek333 Oct 14, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -401,7 +401,7 @@ EXTRA_CFLAGS += -DDM_ODM_SUPPORT_TYPE=0x04
ifeq ($(CONFIG_PLATFORM_I386_PC), y)
EXTRA_CFLAGS += -DCONFIG_LITTLE_ENDIAN
EXTRA_CFLAGS += -DCONFIG_IOCTL_CFG80211 -DRTW_USE_CFG80211_STA_EVENT
SUBARCH := $(shell uname -m | sed -e s/i.86/i386/)
SUBARCH := $(shell uname -m | sed -e "s/i.86/i386/; s/ppc/powerpc/; s/armv.l/arm/; s/aarch64/arm64/;")
ARCH ?= $(SUBARCH)
CROSS_COMPILE ?=
KVER := $(shell uname -r)
Expand Down Expand Up @@ -506,4 +506,3 @@ clean:
rm -fr *.mod.c *.mod *.o .*.cmd *.ko *~
rm -fr .tmp_versions
endif

119 changes: 93 additions & 26 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,38 +1,105 @@
rtl8188fu for linux
===================
RTL8188FU driver for Linux kernel 4.15.x ~ 6.7.x (Linux Mint, Ubuntu or Debian Derivatives)

rtl8188fu linux driver for wireless bgn device
info: rtl8188fu support added to rtl8xxxu module of Linux kernel with version 6.2.

Note:
This is an USB2 only adapter,
Source is ripped out of firefly source tree found at
https://gitlab.com/TeeFirefly/linux-kernel
------------------

<u>If one USB-ID is missing, please mail me.</u>
## How to install

build/load/function tested with v4.19
`sudo apt-get install build-essential git dkms linux-headers-$(uname -r)`

Building and install driver
---------------------------
`git clone https://github.com/kelebek333/rtl8188fu`

for building type
`make`
`sudo dkms install ./rtl8188fu`

for load the driver
`sudo modprobe cfg80211`
`sudo insmod rtl8188fu.ko`
`sudo cp ./rtl8188fu/firmware/rtl8188fufw.bin /lib/firmware/rtlwifi/`

You need to install the needed fw with
`sudo make installfw`
------------------

If you need to crosscompile use
`ARCH= CROSS_COMPILE= KSRC=`
while calling `make` i.e.
## Configuration

`make ARCH="arm" CROSS_COMPILE=armv5tel-softfloat-linux-gnueabi- KSRC=/home/linux-master modules`
#### Disable Power Management

Please use prefix **rtl8188fu** if you want to mail me
But please please don't, I have enough to do.
TIA
Run following commands for disable power management and plugging/replugging issues.

Hans Ulli Kroll <ulli.kroll@googlemail.com>
`sudo mkdir -p /etc/modprobe.d/`

`sudo touch /etc/modprobe.d/rtl8188fu.conf`

`echo "options rtl8188fu rtw_power_mgnt=0 rtw_enusbss=0 rtw_ips_mode=0" | sudo tee /etc/modprobe.d/rtl8188fu.conf`

#### Disable MAC Address Spoofing

Run following commands for disabling MAC Address Spoofing (Note: This is not needed on Ubuntu based distributions. MAC Address Spoofing is already disable on Ubuntu base).

`sudo mkdir -p /etc/NetworkManager/conf.d/`

`sudo touch /etc/NetworkManager/conf.d/disable-random-mac.conf`

`echo -e "[device]\nwifi.scan-rand-mac-address=no" | sudo tee /etc/NetworkManager/conf.d/disable-random-mac.conf`

#### Blacklist (alias) for kernel 5.15 and 5.16 (No needed for kernel 5.17 and up)

If you are using kernel 5.15 and 5.16, you must create a configuration file with following command for preventing to conflict rtl8188fu module with built-in r8188eu module.

`echo 'alias usb:v0BDApF179d*dc*dsc*dp*icFFiscFFipFFin* rtl8188fu' | sudo tee /etc/modprobe.d/r8188eu-blacklist.conf`

#### Blacklist (alias) for kernel 6.2 and up

If you are using kernel 6.2 and up, you must create a configuration file with following command for preventing to conflict rtl8188fu module with built-in rtl8xxxu module.

`echo 'alias usb:v0BDApF179d*dc*dsc*dp*icFFiscFFipFFin* rtl8188fu' | sudo tee /etc/modprobe.d/rtl8xxxu-blacklist.conf`

##### Then you must update initramfs

For initramfs

`sudo update-initramfs -u`

For dracut

`sudo dracut -q --force`

##### Enable rtl8188fu module

Run following command for up to kernel 6.1

`sudo modprobe rtl8188fu`

Run following commands for kernel 6.2 and up

`sudo modprobe -r rtl8188fu`

`sudo modprobe rtl8188fu`

------------------

## How to uninstall

`sudo dkms remove rtl8188fu/1.0 --all`

`sudo rm -f /lib/firmware/rtlwifi/rtl8188fufw.bin`

`sudo rm -f /etc/modprobe.d/rtl8188fu.conf`


------------------

## How to install from PPA repository

You can install rtl8188fu driver with following commands from PPA.

for xUbuntu 16.04-18.04-20.04-22.04-23.04-23.10 / Linux Mint 20.x-21.x

`sudo add-apt-repository ppa:kelebek333/kablosuz`

`sudo apt-get update`

`sudo apt install rtl8188fu-dkms`


You can purge packages with following commands

`sudo apt purge rtl8188fu-dkms`

------------------
10 changes: 10 additions & 0 deletions core/efuse/rtw_efuse.c
Original file line number Diff line number Diff line change
Expand Up @@ -1590,7 +1590,9 @@ int storeAdaptorInfoFile(char *path, u8* efuse_data)
int retriveAdaptorInfoFile(char *path, u8* efuse_data)
{
int ret = _SUCCESS;
#ifdef set_fs
mm_segment_t oldfs;
#endif
struct file *fp;

if(path && efuse_data) {
Expand Down Expand Up @@ -1626,7 +1628,9 @@ u32 rtw_read_efuse_from_file(const char *path, u8 *buf)
u32 ret = _FAIL;

struct file *fp;
#ifdef set_fs
mm_segment_t fs;
#endif
loff_t pos = 0;

fp = filp_open(path, O_RDONLY, 0);
Expand All @@ -1643,8 +1647,10 @@ u32 rtw_read_efuse_from_file(const char *path, u8 *buf)

temp[2] = 0; /* add end of string '\0' */

#ifdef set_fs
fs = get_fs();
set_fs(KERNEL_DS);
#endif

for (i = 0 ; i < HWSET_MAX_SIZE ; i++) {
vfs_read(fp, temp, 2, &pos);
Expand Down Expand Up @@ -1690,7 +1696,9 @@ u32 rtw_read_efuse_from_file(const char *path, u8 *buf)
u32 rtw_read_macaddr_from_file(const char *path, u8 *buf)
{
struct file *fp;
#ifdef set_fs
mm_segment_t fs;
#endif
loff_t pos = 0;

u8 source_addr[18];
Expand All @@ -1712,8 +1720,10 @@ u32 rtw_read_macaddr_from_file(const char *path, u8 *buf)
goto exit;
}

#ifdef set_fs
fs = get_fs();
set_fs(KERNEL_DS);
#endif

vfs_read(fp, source_addr, 18, &pos);
source_addr[17] = ':';
Expand Down
7 changes: 7 additions & 0 deletions core/rtw_br_ext.c
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,10 @@
#ifdef __KERNEL__
#include <linux/if_arp.h>
#include <net/ip.h>
#include <linux/version.h>
#if (LINUX_VERSION_CODE <= KERNEL_VERSION(5, 14, 0))
#include <net/ipx.h>
#endif
#include <linux/atalk.h>
#include <linux/udp.h>
#include <linux/if_pppox.h>
Expand Down Expand Up @@ -174,6 +177,7 @@ static __inline__ void __nat25_generate_ipv4_network_addr(unsigned char *network
}


#if (LINUX_VERSION_CODE <= KERNEL_VERSION(5, 14, 0))
static __inline__ void __nat25_generate_ipx_network_addr_with_node(unsigned char *networkAddr,
unsigned int *ipxNetAddr, unsigned char *ipxNodeAddr)
{
Expand Down Expand Up @@ -205,6 +209,7 @@ static __inline__ void __nat25_generate_apple_network_addr(unsigned char *networ
memcpy(networkAddr+1, (unsigned char *)network, 2);
networkAddr[3] = *node;
}
#endif


static __inline__ void __nat25_generate_pppoe_network_addr(unsigned char *networkAddr,
Expand Down Expand Up @@ -931,6 +936,7 @@ int nat25_db_handle(_adapter *priv, struct sk_buff *skb, int method)
}
}

#if (LINUX_VERSION_CODE <= KERNEL_VERSION(5, 14, 0))
/*---------------------------------------------------*/
/* Handle IPX and Apple Talk frame */
/*---------------------------------------------------*/
Expand Down Expand Up @@ -1191,6 +1197,7 @@ int nat25_db_handle(_adapter *priv, struct sk_buff *skb, int method)

return -1;
}
#endif

/*---------------------------------------------------*/
/* Handle PPPoE frame */
Expand Down
10 changes: 8 additions & 2 deletions core/rtw_btcoex.c
Original file line number Diff line number Diff line change
Expand Up @@ -1435,7 +1435,9 @@ u8 rtw_btcoex_sendmsgbysocket(_adapter *padapter, u8 *msg, u8 msg_size, bool for
{
u8 error;
struct msghdr udpmsg;
mm_segment_t oldfs;
#ifdef set_fs
mm_segment_t oldfs;
#endif
struct iovec iov;
struct bt_coex_info *pcoex_info = &padapter->coex_info;

Expand Down Expand Up @@ -1465,15 +1467,19 @@ u8 rtw_btcoex_sendmsgbysocket(_adapter *padapter, u8 *msg, u8 msg_size, bool for
udpmsg.msg_control = NULL;
udpmsg.msg_controllen = 0;
udpmsg.msg_flags = MSG_DONTWAIT | MSG_NOSIGNAL;
oldfs = get_fs();
#ifdef set_fs
oldfs = get_fs();
set_fs(KERNEL_DS);
#endif

#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4, 1, 0))
error = sock_sendmsg(pcoex_info->udpsock, &udpmsg);
#else
error = sock_sendmsg(pcoex_info->udpsock, &udpmsg, msg_size);
#endif
#ifdef set_fs
set_fs(oldfs);
#endif
if (error < 0) {
DBG_871X("Error when sendimg msg, error:%d\n", error);
return _FAIL;
Expand Down
4 changes: 3 additions & 1 deletion core/rtw_ieee80211.c
Original file line number Diff line number Diff line change
Expand Up @@ -1406,7 +1406,9 @@ int rtw_get_mac_addr_intel(unsigned char *buf)
int ret = 0;
int i;
struct file *fp = NULL;
mm_segment_t oldfs;
#ifdef set_fs
mm_segment_t oldfs;
#endif
unsigned char c_mac[MAC_ADDRESS_LEN];
char fname[]="/config/wifi/mac.txt";
int jj,kk;
Expand Down
7 changes: 5 additions & 2 deletions core/rtw_mlme_ext.c
Original file line number Diff line number Diff line change
Expand Up @@ -1188,7 +1188,9 @@ void mgt_dispatcher(_adapter *padapter, union recv_frame *precv_frame)
ptable->func = &OnAuth;
else
ptable->func = &OnAuthClient;
//pass through
#if defined(fallthrough)
fallthrough;
#endif
case WIFI_ASSOCREQ:
case WIFI_REASSOCREQ:
_mgt_dispatcher(padapter, ptable, precv_frame);
Expand Down Expand Up @@ -15274,7 +15276,8 @@ u8 set_chplan_hdl(_adapter *padapter, unsigned char *pbuf)
rtw_hal_set_odm_var(padapter,HAL_ODM_REGULATION,NULL,_TRUE);

#ifdef CONFIG_IOCTL_CFG80211
rtw_reg_notify_by_driver(padapter);
if (padapter->rtw_wdev != NULL)
rtw_reg_notify_by_driver(padapter->rtw_wdev->wiphy);
#endif //CONFIG_IOCTL_CFG80211

return H2C_SUCCESS;
Expand Down
10 changes: 5 additions & 5 deletions core/rtw_security.c
Original file line number Diff line number Diff line change
Expand Up @@ -2281,7 +2281,7 @@ u32 rtw_BIP_verify(_adapter *padapter, u8 *precvframe)

#ifndef PLATFORM_FREEBSD
/* compress 512-bits */
static int sha256_compress(struct sha256_state *md, unsigned char *buf)
static int sha256_compress(struct rtw_sha256_state *md, unsigned char *buf)
{
u32 S[8], W[64], t0, t1;
u32 t;
Expand Down Expand Up @@ -2323,7 +2323,7 @@ static int sha256_compress(struct sha256_state *md, unsigned char *buf)
}

/* Initialize the hash state */
static void sha256_init(struct sha256_state *md)
static void sha256_init(struct rtw_sha256_state *md)
{
md->curlen = 0;
md->length = 0;
Expand All @@ -2344,7 +2344,7 @@ static void sha256_init(struct sha256_state *md)
@param inlen The length of the data (octets)
@return CRYPT_OK if successful
*/
static int sha256_process(struct sha256_state *md, unsigned char *in,
static int sha256_process(struct rtw_sha256_state *md, unsigned char *in,
unsigned long inlen)
{
unsigned long n;
Expand Down Expand Up @@ -2385,7 +2385,7 @@ static int sha256_process(struct sha256_state *md, unsigned char *in,
@param out [out] The destination of the hash (32 bytes)
@return CRYPT_OK if successful
*/
static int sha256_done(struct sha256_state *md, unsigned char *out)
static int sha256_done(struct rtw_sha256_state *md, unsigned char *out)
{
int i;

Expand Down Expand Up @@ -2437,7 +2437,7 @@ static int sha256_done(struct sha256_state *md, unsigned char *out)
static int sha256_vector(size_t num_elem, u8 *addr[], size_t *len,
u8 *mac)
{
struct sha256_state ctx;
struct rtw_sha256_state ctx;
size_t i;

sha256_init(&ctx);
Expand Down
6 changes: 6 additions & 0 deletions core/rtw_wlan_util.c
Original file line number Diff line number Diff line change
Expand Up @@ -4169,7 +4169,9 @@ int rtw_dev_nlo_info_set(struct pno_nlo_info *nlo_info, pno_ssid_t* ssid,

int i = 0;
struct file *fp;
#ifdef set_fs
mm_segment_t fs;
#endif
loff_t pos = 0;
u8 *source = NULL;
long len = 0;
Expand Down Expand Up @@ -4206,8 +4208,10 @@ int rtw_dev_nlo_info_set(struct pno_nlo_info *nlo_info, pno_ssid_t* ssid,
return 0;
}

#ifdef set_fs
fs = get_fs();
set_fs(KERNEL_DS);
#endif

source = rtw_zmalloc(2048);

Expand All @@ -4217,7 +4221,9 @@ int rtw_dev_nlo_info_set(struct pno_nlo_info *nlo_info, pno_ssid_t* ssid,
rtw_mfree(source, 2048);
}

#ifdef set_fs
set_fs(fs);
#endif
filp_close(fp, NULL);

DBG_871X("-%s-\n", __func__);
Expand Down
7 changes: 7 additions & 0 deletions dkms.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
PACKAGE_NAME="rtl8188fu"
PACKAGE_VERSION="1.0"
BUILT_MODULE_NAME="rtl8188fu"
DEST_MODULE_LOCATION="/kernel/drivers/net/wireless/"
AUTOINSTALL="yes"
MAKE="'make' all KVER=${kernelver}"
CLEAN="make clean"
3 changes: 3 additions & 0 deletions hal/rtl8188f/usb/usb_halinit.c
Original file line number Diff line number Diff line change
Expand Up @@ -764,6 +764,9 @@ static void usb_AggSettingRxUpdate(PADAPTER padapter)
aggctrl &= ~RXDMA_AGG_EN;
aggrx &= ~BIT_USB_RXDMA_AGG_EN;
rxdmamode &= ~BIT_DMA_MODE;
#if defined(fallthrough)
fallthrough;
#endif
default:
DBG_8192C("%s: RX Aggregation Disable!\n", __func__);
break;
Expand Down
Loading