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

How to install it in android kernel #8

Open
wants to merge 90 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 41 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
1 change: 0 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -506,4 +506,3 @@ clean:
rm -fr *.mod.c *.mod *.o .*.cmd *.ko *~
rm -fr .tmp_versions
endif

77 changes: 51 additions & 26 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,38 +1,63 @@
rtl8188fu for linux
===================
For Kernel 4.15.x ~ 5.7.x (Linux Mint, Ubuntu or Debian Derivatives)

rtl8188fu linux driver for wireless bgn device
------------------

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

<u>If one USB-ID is missing, please mail me.</u>
`sudo apt-get install build-essential git dkms linux-headers-$(uname -r)`

build/load/function tested with v4.19
`git clone https://github.com/kelebek333/rtl8188fu`

Building and install driver
---------------------------
`sudo dkms add ./rtl8188fu`

for building type
`make`
`sudo dkms build rtl8188fu/1.0`

for load the driver
`sudo modprobe cfg80211`
`sudo insmod rtl8188fu.ko`
`sudo dkms install rtl8188fu/1.0`

You need to install the needed fw with
`sudo make installfw`
`sudo cp ./rtl8188fu/firmware/rtl8188fufw.bin /lib/firmware/rtlwifi/`

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

`make ARCH="arm" CROSS_COMPILE=armv5tel-softfloat-linux-gnueabi- KSRC=/home/linux-master modules`
Run following commands for disable power management and plugging/replugging issues.

Please use prefix **rtl8188fu** if you want to mail me
But please please don't, I have enough to do.
TIA
`sudo mkdir -p /etc/modprobe.d/`

Hans Ulli Kroll <[email protected]>
`sudo touch /etc/modprobe.d/rtl8188fu.conf`

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

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

## 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 rtl81188fu driver with following commands from PPA.

for xUbuntu 16.04-18.04-19.10-20.04 / Linux Mint 18.x-19.x-20.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`

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

## How to install (for arm devices)

https://github.com/kelebek333/rtl8188fu/tree/arm#how-to-install-for-arm-devices
8 changes: 8 additions & 0 deletions dkms.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
PACKAGE_NAME="rtl8188fu"
PACKAGE_VERSION="1.0"
BUILT_MODULE_NAME="rtl8188fu"
DEST_MODULE_LOCATION="/kernel/drivers/net/wireless/"
REMAKE_INITRD="yes"
AUTOINSTALL="yes"
MAKE="'make' all KVER=${kernelver}"
CLEAN="make clean"
5 changes: 4 additions & 1 deletion include/osdep_service.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,10 @@
#ifndef __OSDEP_SERVICE_H_
#define __OSDEP_SERVICE_H_

#include <linux/version.h>
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 11, 0)
#include <linux/sched/signal.h>
#endif

#define _FAIL 0
#define _SUCCESS 1
Expand Down Expand Up @@ -631,4 +635,3 @@ char alpha_to_upper(char c);

#endif


10 changes: 9 additions & 1 deletion os_dep/linux/ioctl_cfg80211.c
Original file line number Diff line number Diff line change
Expand Up @@ -355,8 +355,17 @@ rtw_cfg80211_default_mgmt_stypes[NUM_NL80211_IFTYPES] = {
static u64 rtw_get_systime_us(void)
{
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,39))
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,20,0))
struct timespec64 ts;
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5,0,0))
ktime_get_coarse_real_ts64(&ts);
#else
ts = current_kernel_time64();
#endif
#else
struct timespec ts;
get_monotonic_boottime(&ts);
#endif
return ((u64)ts.tv_sec*1000000) + ts.tv_nsec / 1000;
#else
struct timeval tv;
Expand Down Expand Up @@ -6953,4 +6962,3 @@ void rtw_cfg80211_dev_res_unregister(struct dvobj_priv *dvobj)
}

#endif /* CONFIG_IOCTL_CFG80211 */

2 changes: 1 addition & 1 deletion os_dep/linux/os_intfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -885,7 +885,7 @@ static u16 rtw_select_queue(struct net_device *dev, struct sk_buff *skb
#else
, void *accel_priv
#endif
#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 14, 0)
#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 14, 0) && LINUX_VERSION_CODE < KERNEL_VERSION(5, 2, 0)
, select_queue_fallback_t fallback
#endif

Expand Down
39 changes: 36 additions & 3 deletions os_dep/linux/rtw_proc.c
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,12 @@ inline struct proc_dir_entry *rtw_proc_create_dir(const char *name, struct proc_
}

inline struct proc_dir_entry *rtw_proc_create_entry(const char *name, struct proc_dir_entry *parent,
const struct file_operations *fops, void * data)
#if (LINUX_VERSION_CODE < KERNEL_VERSION(5, 6, 0))
const struct file_operations *fops,
#else
const struct proc_ops *fops,
#endif
void * data)
{
struct proc_dir_entry *entry;

Expand Down Expand Up @@ -202,6 +207,7 @@ static ssize_t rtw_drv_proc_write(struct file *file, const char __user *buffer,
return -EROFS;
}

#if (LINUX_VERSION_CODE < KERNEL_VERSION(5, 6, 0))
static const struct file_operations rtw_drv_proc_fops = {
.owner = THIS_MODULE,
.open = rtw_drv_proc_open,
Expand All @@ -210,6 +216,15 @@ static const struct file_operations rtw_drv_proc_fops = {
.release = single_release,
.write = rtw_drv_proc_write,
};
#else
static const struct proc_ops rtw_drv_proc_fops = {
.proc_open = rtw_drv_proc_open,
.proc_read = seq_read,
.proc_lseek = seq_lseek,
.proc_release = seq_release,
.proc_write = rtw_drv_proc_write,
};
#endif

int rtw_drv_proc_init(void)
{
Expand Down Expand Up @@ -1720,6 +1735,7 @@ static ssize_t rtw_adapter_proc_write(struct file *file, const char __user *buff
return -EROFS;
}

#if (LINUX_VERSION_CODE < KERNEL_VERSION(5, 6, 0))
static const struct file_operations rtw_adapter_proc_fops = {
.owner = THIS_MODULE,
.open = rtw_adapter_proc_open,
Expand All @@ -1728,6 +1744,15 @@ static const struct file_operations rtw_adapter_proc_fops = {
.release = single_release,
.write = rtw_adapter_proc_write,
};
#else
static const struct proc_ops rtw_adapter_proc_fops = {
.proc_open = rtw_adapter_proc_open,
.proc_read = seq_read,
.proc_lseek = seq_lseek,
.proc_release = seq_release,
.proc_write = rtw_adapter_proc_write,
};
#endif

int proc_get_odm_dbg_comp(struct seq_file *m, void *v)
{
Expand Down Expand Up @@ -1994,6 +2019,7 @@ static ssize_t rtw_odm_proc_write(struct file *file, const char __user *buffer,
return -EROFS;
}

#if (LINUX_VERSION_CODE < KERNEL_VERSION(5, 6, 0))
static const struct file_operations rtw_odm_proc_fops = {
.owner = THIS_MODULE,
.open = rtw_odm_proc_open,
Expand All @@ -2002,7 +2028,15 @@ static const struct file_operations rtw_odm_proc_fops = {
.release = single_release,
.write = rtw_odm_proc_write,
};

#else
static const struct proc_ops rtw_odm_proc_fops = {
.proc_open = rtw_odm_proc_open,
.proc_read = seq_read,
.proc_lseek = seq_lseek,
.proc_release = seq_release,
.proc_write = rtw_odm_proc_write,
};
#endif
struct proc_dir_entry *rtw_odm_proc_init(struct net_device *dev)
{
struct proc_dir_entry *dir_odm = NULL;
Expand Down Expand Up @@ -2158,4 +2192,3 @@ void rtw_adapter_proc_replace(struct net_device *dev)
}

#endif /* CONFIG_PROC_DEBUG */

6 changes: 3 additions & 3 deletions os_dep/osdep_service.c
Original file line number Diff line number Diff line change
Expand Up @@ -1965,7 +1965,7 @@ static int isFileReadable(char *path)
ret = PTR_ERR(fp);
}
else {
oldfs = get_fs(); set_fs(get_ds());
oldfs = get_fs(); set_fs(KERNEL_DS);

if(1!=readFile(fp, &buf, 1))
ret = PTR_ERR(fp);
Expand Down Expand Up @@ -1993,7 +1993,7 @@ static int retriveFromFile(char *path, u8* buf, u32 sz)
if( 0 == (ret=openFile(&fp,path, O_RDONLY, 0)) ){
DBG_871X("%s openFile path:%s fp=%p\n",__FUNCTION__, path ,fp);

oldfs = get_fs(); set_fs(get_ds());
oldfs = get_fs(); set_fs(KERNEL_DS);
ret=readFile(fp, buf, sz);
set_fs(oldfs);
closeFile(fp);
Expand Down Expand Up @@ -2027,7 +2027,7 @@ static int storeToFile(char *path, u8* buf, u32 sz)
if( 0 == (ret=openFile(&fp, path, O_CREAT|O_WRONLY, 0666)) ) {
DBG_871X("%s openFile path:%s fp=%p\n",__FUNCTION__, path ,fp);

oldfs = get_fs(); set_fs(get_ds());
oldfs = get_fs(); set_fs(KERNEL_DS);
ret=writeFile(fp, buf, sz);
set_fs(oldfs);
closeFile(fp);
Expand Down