lwfinger / rtl8723du

89 stars 43 forks source link

Make fails on the new kernel 5.19.2 on Arch #26

Closed lordraiden750 closed 2 years ago

lordraiden750 commented 2 years ago

Running make exits with the following error and I suspect the cause is the new kernel..

/home/tony/Git/rtl8723du/os_dep/ioctl_cfg80211.c: In function ‘rtw_cfg80211_ch_switch_notify’: /home/tony/Git/rtl8723du/os_dep/ioctl_cfg80211.c:175:9: error: too few arguments to function ‘cfg80211_ch_switch_notify’ 175 | cfg80211_ch_switch_notify(adapter->pnetdev, &chdef); | ^~~~~~~~~ In file included from /home/tony/Git/rtl8723du/include/osdep_service_linux.h:79, from /home/tony/Git/rtl8723du/include/osdep_service.h:31, from /home/tony/Git/rtl8723du/include/drv_types.h:16, from /home/tony/Git/rtl8723du/os_dep/ioctl_cfg80211.c:6: ./include/net/cfg80211.h:7967:6: note: declared here 7967 | void cfg80211_ch_switch_notify(struct net_device dev, | ^~~~~~~~~ /home/tony/Git/rtl8723du/os_dep/ioctl_cfg80211.c: At top level: /home/tony/Git/rtl8723du/os_dep/ioctl_cfg80211.c:5627: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] 5627 | .stop_ap = cfg80211_rtw_stop_ap, | ^~~~~~~~ /home/tony/Git/rtl8723du/os_dep/ioctl_cfg80211.c:5627:20: note: (near initialization for ‘rtw_cfg80211_ops.stop_ap’) /home/tony/Git/rtl8723du/os_dep/ioctl_cfg80211.c: In function ‘rtw_wdev_unregister’: /home/tony/Git/rtl8723du/os_dep/ioctl_cfg80211.c:5836:17: error: ‘struct wireless_dev’ has no member named ‘current_bss’ 5836 | if (wdev->current_bss) { | ^~ cc1: some warnings being treated as errors make[2]: [scripts/Makefile.build:249: /home/tony/Git/rtl8723du/os_dep/ioctl_cfg80211.o] Error 1 make[1]: [Makefile:1849: /home/tony/Git/rtl8723du] Error 2 make[1]: Leaving directory '/usr/lib/modules/5.19.2-arch1-1/build' make: *** [Makefile:199: modules] Error 2

lwfinger commented 2 years ago

I think I got it right. At least, it builds with kernel 6.0.0-rc1. Do a 'git pull' and rebuild

lordraiden750 commented 2 years ago

I have done a git pull but it's still throwing the error

CC [M] /home/tony/Git/rtl8723du/os_dep/ioctl_cfg80211.o /home/tony/Git/rtl8723du/os_dep/ioctl_cfg80211.c: In function ‘rtw_cfg80211_ch_switch_notify’: /home/tony/Git/rtl8723du/os_dep/ioctl_cfg80211.c:175:9: error: too few arguments to function ‘cfg80211_ch_switch_notify’ 175 | cfg80211_ch_switch_notify(adapter->pnetdev, &chdef); | ^~~~~~~~~

I'm currently on this kernel 5.19.2-arch1-2

lwfinger commented 2 years ago

Your error message says it happens at line 175. I do not have that call anywhere near that line.

I did find one that is not called on my system, but must be the one that is erroring for you. Do another 'git pull'.

lordraiden750 commented 2 years ago

I just did a 'git pull' on the same kernel: 5.19.2-arch1-2, and it threw the same error. I even tried on another machine earlier with the same results.

But it builds and work fine on this kernel: linux-5.19.1.arch2-1. Maybe I keep it there and wait for kernel 6.0 ?

lwfinger commented 2 years ago

I was working on the wrong branch of the code. Do another pull, and it should work.

lordraiden750 commented 2 years ago

There's a new error after the pull:

/home/tony/Git/rtl8723du/os_dep/ioctl_cfg80211.c:5631: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] 5631 | .stop_ap = cfg80211_rtw_stop_ap, | ^~~~~~~~ /home/tony/Git/rtl8723du/os_dep/ioctl_cfg80211.c:5631:20: note: (near initialization for ‘rtw_cfg80211_ops.stop_ap’) /home/tony/Git/rtl8723du/os_dep/ioctl_cfg80211.c: In function ‘rtw_wdev_unregister’: /home/tony/Git/rtl8723du/os_dep/ioctl_cfg80211.c:5840:17: error: ‘struct wireless_dev’ has no member named ‘current_bss’ 5840 | if (wdev->current_bss) { | ^~ cc1: some warnings being treated as errors make[2]: [scripts/Makefile.build:249: /home/tony/Git/rtl8723du/os_dep/ioctl_cfg80211.o] Error 1 make[1]: [Makefile:1849: /home/tony/Git/rtl8723du] Error 2 make[1]: Leaving directory '/usr/lib/modules/5.19.2-arch1-2/build' make: *** [Makefile:199: modules] Error 2

lwfinger commented 2 years ago

Try again. I think I fixed them this time. I do not have 5.19.2 and am running 6.0.0-rc2, thus I do not get a good test.

lordraiden750 commented 2 years ago

After a rebuild I get this error:

CC [M] /home/tony/Git/rtl8723du/os_dep/ioctl_cfg80211.o /home/tony/Git/rtl8723du/os_dep/ioctl_cfg80211.c: In function ‘rtw_cfg80211_indicate_connect’: /home/tony/Git/rtl8723du/os_dep/ioctl_cfg80211.c:756:26: error: ‘struct cfg80211_roam_info’ has no member named ‘links’ 756 | roam_info.links[0].bssid = cur_network->network.MacAddress; | ^ make[2]: [scripts/Makefile.build:249: /home/tony/Git/rtl8723du/os_dep/ioctl_cfg80211.o] Error 1 make[1]: [Makefile:1849: /home/tony/Git/rtl8723du] Error 2 make[1]: Leaving directory '/usr/lib/modules/5.19.2-arch1-2/build' make: *** [Makefile:199: modules] Error 2

lwfinger commented 2 years ago

My distro (openSUSE) just released kernel 5.19.2, and if does not have any of these changes that ARCH does. At this point, you will have to fix it yourself. As I say in all my README.md files, I cannot fix things that distros backport. There are too many.

I did change the place that errored for you, but that is it.

lordraiden750 commented 2 years ago

Your final fix did it. I really appreciate your time and help. Thank you.

On Tue, 23 Aug 2022, 01:44 lwfinger, @.***> wrote:

My distro (openSUSE) just released kernel 5.19.2, and if does not have any of these changes that ARCH does. At this point, you will have to fix it yourself. As I say in all my README.md files, I cannot fix things that distros backport. There are too many.

I did change the place that errored for you, but that is it.

— Reply to this email directly, view it on GitHub https://github.com/lwfinger/rtl8723du/issues/26#issuecomment-1223279789, or unsubscribe https://github.com/notifications/unsubscribe-auth/A2LM7J5C4PSCIXT2WENGJ7DV2P7GTANCNFSM57FK2U4Q . You are receiving this because you authored the thread.Message ID: @.***>