drc-mac80211 kernel patch question

574 views
Skip to first unread message

Nathan Swenson

unread,
Dec 30, 2013, 10:42:10 PM12/30/13
to libdrc...@googlegroups.com
Let me first say, this looks like an awesome library, I can't wait to stream stuff to my gamepad. Anyway, I'm following the documentation and I got to the part about the wifi kernel patch. I'm having a bit of trouble with it. I cloned the repo and tried running make, but it says:
make: *** No targets.  Stop.

I can see that there's a Makefile in there, so I'm not sure what's going on. Now, I'm fairly new to linux, so I'm probably doing something obvious wrong. I just thought that running make would do the right thing. Do you know what I'm doing wrong? Thanks!

- Nathan

P.S Also I have no idea if the Wii U Gamepad's wifi is compatible with my hardware, I'm just using the built-in wifi on my retina MacBook Pro. But I figured I'd give it a shot, and if I have some incompatibility with this module I would at least expect to get a different error.

Pierre Bourdon

unread,
Dec 30, 2013, 11:07:08 PM12/30/13
to Nathan Swenson, libdrc...@googlegroups.com
Since it is a kernel module you should use something like make -C
/lib/modules/`uname -r`/build M=$PWD

However it is unlikely to work unless your system is running Linux
3.11. A better option might be to take your kernel source code, apply
the patch that we applied in the drc-mac80211 repository and build the
exact version of mac80211 you use + the patch.

(yes, the setup instructions are very complicated and hard to follow
at the moment, sorry about that)

Not sure about your specific Wi-Fi adapter. I guess unless someone
tests that particular hardware we'll never know :)
> --
> You received this message because you are subscribed to the Google Groups
> "libdrc users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to libdrc-users...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.



--
Pierre "delroth" Bourdon <del...@gmail.com>
Software Engineer @ Zürich, Switzerland
http://code.delroth.net/

Nathan Swenson

unread,
Dec 30, 2013, 11:59:02 PM12/30/13
to libdrc...@googlegroups.com, Nathan Swenson
Sounds good, thanks! Not quite sure how to do that, but I'll try and figure it out.

Nathan Swenson

unread,
Dec 31, 2013, 5:12:46 PM12/31/13
to libdrc...@googlegroups.com, Nathan Swenson
So, I've 

Nathan Swenson

unread,
Dec 31, 2013, 5:17:14 PM12/31/13
to libdrc...@googlegroups.com, Nathan Swenson
Oh oops, looks like I accidentally posted. I was going to say, I've taken the mac80211 code from my version of linux, and I used the diff from the repository to manually patch the iface.c file with your custom changes, like that new tsf function and a few other lines. It successfully builds and I get a mac80211.ko file. I've tried using insmod to install the module, but when I run your test: test -f /sys/class/net/$WLANIFACE/tsf && echo ok
it doesn't echo "ok", it just gives me nothing. Did I miss something?

Joel Larson

unread,
Dec 31, 2013, 5:27:45 PM12/31/13
to libdrc...@googlegroups.com, Nathan Swenson
It sounds like the new module isn't loaded into the kernel. When I did this, I had the following happen:

$ sudo insmod mac80211.ko
Error: could not insert module mac80211.ko: File exists

Then I removed the module:

$ sudo rmmod mac80211
Error: Module mac80211 is in use by: b43 brcmsmac

I removed each of those modules:

$ sudo rmmod b43
$ sudo rmmod brcmsmac

Actually removed the module this time:

$ sudo rmmod mac80211

Added the newly created module:

$ sudo insmod mac80211.ko

Reactivated the modules that I removed:

$ sudo modprobe b43
$ sudo modprobe brcmsmac

And it worked fine. The "tsf" file shows up in /sys/class/net/wlan0.

Nathan Swenson

unread,
Jan 3, 2014, 1:56:52 PM1/3/14
to libdrc...@googlegroups.com, Nathan Swenson
Thanks a bunch, sorry to not respond sooner. This is sort of a side-project that I'm doing and with all the New Years stuff I haven't worked on it much. Your instructions still did not work for me, but I'm starting to understand why. I don't have a wlan0 interface in /sys/class/net. All I have is eth0 and lo. I find this odd, because I am using wifi and not ethernet, in fact my retina MacBook Pro doesn't even have an ethernet port. But that indeed seems to be the interface through which my data is travelling.

I'm not entirely sure what the implications of this are, but I'm guessing the mac80211 module isn't getting used, which is supported by the fact that I can rmmod the module without it complaining, and then continue use my wireless internet just fine. I guess I'll try and figure out how to make the internet go through wlan0. I have some USB Wifi dongles I can employ too, if that would cause wlan0 to show up. I'll keep trying stuff, let me know if you have any suggestions. Thanks again for all your support!

Nathan Swenson

unread,
Jan 3, 2014, 2:23:37 PM1/3/14
to libdrc...@googlegroups.com, Nathan Swenson
Woo! I connected my external USB adapter and now the tsf test thing echos ok! Thanks again, and sorry for all the spam.

Callum Carmicheal

unread,
Mar 22, 2014, 9:03:29 AM3/22/14
to libdrc...@googlegroups.com
Im Sorry, im good at unix/linux but i dont understand how to install kernal patches?
can anyone help me ive tryed 
 sudo patch -d 'path to drc-mac80211'
 cd drc then patch * *
ive also tried
 make -C /lib/modules/`uname -r`/build M=$PWD 
i get...
 root@Wii-U-Development-Kit:/home/callum/Desktop/Wii U Development Kit/drc-mac80211#  make -C /lib/modules/`uname -r`/build M=$PWD 
 make: Entering directory `/usr/src/linux-headers-3.11.0-12-generic'
 /usr/src/linux-headers-3.11.0-12-generic/arch/x86/Makefile:107: CONFIG_X86_X32 enabled but no binutils support
 make: *** No rule to make target `U'. Stop.
 make: Leaving directory `/usr/src/linux-headers-3.11.0-12-generic'
 root@Wii-U-Development-Kit:/home/callum/Desktop/Wii U Development Kit/drc-mac80211# 


can i get some help, ive gotten so close yet so far

André Lourenço

unread,
May 2, 2014, 2:23:17 PM5/2/14
to libdrc...@googlegroups.com
I am also having problems installing the kernel patch, my linux version is 3.13.0. It would be great if you cold explain how to install the kernel patch step by step in versions other that Linux 3.11. Thank you.

Best Regards,
André Lourenço
Reply all
Reply to author
Forward
0 new messages