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

Fixes kernel v5.17 rc1 and above #96

Open
wants to merge 4 commits into
base: v5.8.5.1
Choose a base branch
from

Conversation

v3rlly
Copy link

@v3rlly v3rlly commented Apr 6, 2022

Fixed issues related to Linux Kernel changes from v5.17 rc1

@v3rlly v3rlly mentioned this pull request Apr 6, 2022
@realFlowControl
Copy link

I can confirm that this PR makes the module compile and work on Kernel 5.17.4 in current Fedora

@matthewsgj
Copy link

I just compiled on Pop-OS! with kernel 5.17.5 (5.17.5-76051705-generic). Builds and installs fine and my wifi dongle runs happily on it. Thanks for the fix.

@brokeboiflex
Copy link

Does not work on Kali with kernel 5.18

@s0kil
Copy link

s0kil commented Aug 18, 2022

Also does not work with 5.19

@Jeffmagma
Copy link

Jeffmagma commented Sep 30, 2022

I still get an error with kthread_complete_and_exit, it says did you mean complete_and_exit? I'm on 5.15, running Ubuntu 22.04

@matthewsgj
Copy link

Just tried to compile on Pop!_OS 22.04 LTS with kernel 6.0.6-76060006-generic and got the errors below:

/home/thor/code/rtl8814au/os_dep/linux/ioctl_cfg80211.c:474:17: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘if’
  474 |                 cfg80211_ch_switch_notify(adapter->pnetdev, &chdef);
      |                 ^~~~~~~~~~~~~~~~~~~~~~~~~
/home/thor/code/rtl8814au/os_dep/linux/ioctl_cfg80211.c:474:17: error: too few arguments to function ‘cfg80211_ch_switch_notify’
In file included from /home/thor/code/rtl8814au/include/osdep_service_linux.h:94,
                 from /home/thor/code/rtl8814au/include/osdep_service.h:57,
                 from /home/thor/code/rtl8814au/include/drv_types.h:27,
                 from /home/thor/code/rtl8814au/os_dep/linux/ioctl_cfg80211.c:17:
./include/net/cfg80211.h:8261:6: note: declared here
 8261 | void cfg80211_ch_switch_notify(struct net_device *dev,
      |      ^~~~~~~~~~~~~~~~~~~~~~~~~
/home/thor/code/rtl8814au/os_dep/linux/ioctl_cfg80211.c: In function ‘rtw_cfg80211_indicate_connect’:
/home/thor/code/rtl8814au/os_dep/linux/ioctl_cfg80211.c:1147:26: error: ‘struct cfg80211_roam_info’ has no member named ‘bssid’
 1147 |                 roam_info.bssid = cur_network->network.MacAddress;
      |                          ^
/home/thor/code/rtl8814au/os_dep/linux/ioctl_cfg80211.c: At top level:
/home/thor/code/rtl8814au/os_dep/linux/ioctl_cfg80211.c:9980:20: error: initialization of ‘int (*)(struct wiphy *, struct net_device *, unsigned int)’ from incompatible pointer type ‘int (*)(struct wiphy *, struct net_device *)’ [-Werror=incompatible-pointer-types]
 9980 |         .stop_ap = cfg80211_rtw_stop_ap,
      |                    ^~~~~~~~~~~~~~~~~~~~
/home/thor/code/rtl8814au/os_dep/linux/ioctl_cfg80211.c:9980:20: note: (near initialization for ‘rtw_cfg80211_ops.stop_ap’)
/home/thor/code/rtl8814au/os_dep/linux/ioctl_cfg80211.c: In function ‘rtw_wdev_unregister’:
/home/thor/code/rtl8814au/os_dep/linux/ioctl_cfg80211.c:10252:17: error: ‘struct wireless_dev’ has no member named ‘current_bss’
10252 |         if (wdev->current_bss) {
      |                 ^~
cc1: some warnings being treated as errors
make[2]: *** [scripts/Makefile.build:249: /home/thor/code/rtl8814au/os_dep/linux/ioctl_cfg80211.o] Error 1
make[1]: *** [Makefile:1858: /home/thor/code/rtl8814au] Error 2
make[1]: Leaving directory '/usr/src/linux-headers-6.0.6-76060006-generic'
make: *** [Makefile:2353: modules] Error 2

@FabienDanieau
Copy link

I had the same issue. I made few changes and was able to compile the driver for Debian 12 with a kernel 6.0
v3rlly#1

@matthewsgj
Copy link

Thanks Fabien. That has compiled fine on my system.
Cheers, :)

@matthewsgj
Copy link

main_to_knl_6-0-0.diff.gz
I've gone back over these various patches because some cause errors with older kernels and I've refactored some of the code so that it now compiles against the kernels on my Debian (5.10), my Kali (5.18) and my Pop!_OS (6.0) systems.
Maybe it is of use to someone.

@TheCustomFHD
Copy link

I am sorry to ask in here for help, but i have a TP-Link Archer T9UH with the RTL8814AU, and am on Arch, would like to use this Stick with Monitor and Packet Injection.. im just having quite a lot of difficulties figuring out how to build this probably fixed version that includes this PR.. would anyone be kind enough to potentially help me get through this? So like, write up a few commands on how to grab the code from this pull request via git clone and such?

@realFlowControl
Copy link

Hey @TheCustomFHD, I switched to https://github.com/morrownr/8814au recently

@TheCustomFHD
Copy link

@realFlowControl , thanks for the answer, im wondering, does this one support packet injection? It states monitor mode, but im unsure about packet injection.

@matthewsgj
Copy link

@realFlowControl , I packaged up all the changes that work into a patch linked above. So if you clone the v5.8 main repository, then download my patch and drop it into the cloned directory, unzip it and run:
$ patch -p1 < main_to_knl_6-0-0.diff

I have the same TP-Link dongle and this works for me on various kernels up to 6.0.6. Good luck!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants