-
Notifications
You must be signed in to change notification settings - Fork 600
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
8188eu and 8192cus coexisting #185
Comments
Realtek tends to derive all of their USB drivers from the same database, which leads to namespace conflicts of exactly the form you mention when having them built into the kernel, even though they are OK when built as modules. The only solution is to rename the offending symbols in one of those drivers. The standalone drivers (which are from Realtek) will not solve the problem. Where does your code for the 8192cu come from? I just built an "all yes" configuration for the mainline kernel with no problems. At least, sed will be your friend when it comes to renaming the symbols that need to be changed.. |
Currently I'm just using the driver code from the rpi-linux github account. |
So before I sharpened my SED skills, I removed the 8192cu driver and added the 8188eu driver from 4.4.y kernel version just to check it worked. It built without any symbol clashes and the 8188eu driver was loaded as wlan0. BUT, NOOBS (which uses the cfg80211 interface from wpa_supplicant, controlled via DBUS, and using the nl80211 interface) claimed there was no wireless interface. This suggests to me that the driver is not cfg80211 compliant, or the correct compile option is not set to enable it. Within buildroot kernel options, both CONFIG_CFG80211 and CONFIG_CFG80211_WEXT were set. Is there anything else I need to set, to enable the cfg80211 interface? |
The in-kernel version of that driver does not use cfg80211. You will need to implement the v4.1.8_9499 |
Thanks. I'll give it a go. |
After successfully renaming the functions and integrating this 8188eu driver on the v4.1.8_9499 branch into Buildroot as a builtin driver with cfg80211 for kernel 4.1.y, I am now trying to upgrade the kernel to 4.14.15. Is this driver still appropriate for that kernel version?
I'm guessing the implicit-function-declaration flag is something new to this kernel version - maybe I can fix the driver with some forward function declarations (?). But I just wanted to make sure that this driver is still the most appropriate for cfg80211 functionality before I went further. TIA. |
The kernel APIs change from time to time. An out-of-kernel driver such as this needs to be able to test the kernel version and change the code appropriately. That is why you will see conditional statements such as "#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 15, 0)" sprinkled throughout the code. Unfortunately, some distros (most notably Ubuntu) backport such changes to older kernel versions. Once they do this, a simple test of the kernel version is not sufficient. Unfortunately, for you, I do not try to keep my repos in a state where they will build on distros that subscribe to these practices. You will need to determine the necessary modifications, and make them yourself. Sorry, but that has been my policy ever since Ubuntu started this madness. FYI, this repo builds perfectly on unadultered kernels through the current 4.16.0-rc3. This driver is the best one that I have. |
Thanks for the background info. |
EDIT: Doh! I think I need to pull down the latest commit and rename the functions again 😉 |
That was what I was about to suggest. Of course, stale repos probably will not build with the latest kernels! |
Yeah, when I remembered you said it built perfectly on 4.16, I had a lightbulb moment and then saw I was slowly re-implementing all the commits you had already done! (Well, at least it confirmed I was doing the changes in the right way). I don't fancy going through SED again, even though I automated most of it, so I'll try and merge your latest changes into my old version. Thanks for your advice. |
I think
That gets everything compiled up until:
|
I have not been maintaining that branch. If you can fix it great, otherwise, it will be a few days until I can get to it. |
Ah. Ok. Well, if I spot anything obvious like above, or can merge diffs from master, I may post a PR for you. But it may take me several days too! |
Looking at the previous issues, I found #232. Applying the v4.1.8_9499_fix.zip patch from there allowed the branch to compile. Next step: testing.... |
When compiling, I got the following warning. Is this an issue?
I got the following messages in dmesg:
The I can't test this with an Access Point til later, but so far it's looking quite promising. |
The frame size warning comes from the statement "u8 buf[MAX_BSSINFO_LEN], *pbuf;", and is due to that large array on the stack. The fix is not difficult, but it is tricky. The line is changed to "u8 *buf, *pbuf" and someplace before buf is used, that amount of space is gotten with a kzalloc() call. The difficult part to remember is to kfree(buf) before the routine exits, otherwise you leak the memory. Unless you really want to fix it, you can ignore it. The x86 stack is large enough that it will not cause any problems. |
Thanks. I'll see what I can do & report back later. |
Those 2 issues are now fixed.
I found it in hal/rtl8188e_hal_init.c rtl8188e_iol_efuse_patch(struct adapter *padapter) Is this necessary, or can I just comment it out? Is it just a debug message? |
I've now been able to connect to an AP and it all seems to work. |
PR #244 created |
Hi @lwfinger, not an issue as such, but more of a request for advice.
I am trying to add cfg80211 versions of rtl8192cus and rlt8188eu wifi drivers to my fork of NOOBS, so that means building them into the 4.1.y kernel with buildroot, not as modules.
I backported the 8192cus driver from 4.8.y into buildroot and that seems to work ok.
But when I try to add the 8188eu driver from staging, buildroot fails with multiple definitions of the same labels in built-in.o - I assume because the 8192c and 8188eu are very similar and have a lot of the same names. I even tried bumping the kernel to 4.8, but the same name clashes arose.
Do you have any suggestions how I can overcome this problem and get both of them integrated? Would your standalone drivers here solve my problem?
The text was updated successfully, but these errors were encountered: