I have installed sys-apps/baselayout-2.0.1, sys-apps/openrc-0.6.1, net-wireless/wpa_supplicant-0.7.1. Running kernel has NO WIRELESS_EXT support, nl80211 only! /etc/conf.d/wpa_supplicant: wpa_supplicant_args="-Dnl80211" /etc/init.d/net.wlan0 start failed with: * Bringing up interface wlan0 * Starting wpa_supplicant on wlan0 ... ioctl[SIOCSIWPMKSA]: Invalid argument ioctl[SIOCSIWMODE]: Invalid argument ioctl[SIOCGIWRANGE]: Invalid argument ioctl[SIOCGIWMODE]: Invalid argument ioctl[SIOCSIWAP]: Invalid argument ioctl[SIOCSIWENCODEEXT]: Invalid argument ioctl[SIOCSIWENCODEEXT]: Invalid argument ioctl[SIOCSIWENCODEEXT]: Invalid argument ioctl[SIOCSIWENCODEEXT]: Invalid argument ioctl[SIOCSIWPMKSA]: Invalid argument * Starting wpa_cli on wlan0 ... [ ok ] * Backgrounding ... ... [ ok ] * WARNING: net.wlan0 has started, but is inactive wifi link is of course dead. When I started interface manually without net script: ~ # ip link set dev wlan0 up ~ # /etc/init.d/wpa_supplicant start ~ # ip addr add $ADDRESS dev wlan0 brd + ~ # ip route add default via $GWADDRESS then wpa_supplicant started cleanly and wifi connection running without any problems. But only with wpa_supplicant-0.7.1. When wpa_supplicant-0.6.10 is installed manual start ended with: * Caching service dependencies ... [ ok ] * Stopping WPA Supplicant Daemon ... [ ok ] * Starting WPA Supplicant Daemon ... ioctl[SIOCSIWPMKSA]: Invalid argument ioctl[SIOCGIWRANGE]: Invalid argument ioctl[SIOCSIWPMKSA]: Invalid argument [ ok ] and wifi link is dead again. It looks like /etc/init.d/net script have some problems with handling wireless networks without WIRELESS_EXT. Am I only one affected?
Please paste your emerge --info output.
Since wpa_supplicant works, this seems more like a bug in openrc than a bug in wpa_supplicant.
How can I tell if the interface is wireless or not using nl80211 only? Here's the current code: [ -d /sys/class/net/"${IFACE}"/wireless -o \ -d /sys/class/net/"${IFACE}"/phy80211 ] && return 0 [ ! -e /proc/net/wireless ] && return 1 grep -Eq "^[[:space:]]*${IFACE}:" /proc/net/wireless
Roy, so what you are saying is, that it's a problem with the /etc/ini.d/net init script, or am I misunderstanding you? :)
No, it's a problem with how the kernel says if an interace is wireless or not - each way does it differently. The OP is just using one way, which I don't have the hardware for, so cannot test, hence me asking how I can tell if the interface is wireless or not.
Not sure really - might be an idea to check how the "iw" tool does it. I just tried this on my router: (for a wireless interface) : # iw dev wlan0 info Interface wlan0 ifindex 6 type AP (for a normal ethernet port) : # iw dev wan0 info command failed: No such device (-19) So clearly the iw tool has code for detecting if an interface is wireless or not using nl80211 :-)
That's nice, but I'd like to do it using shell.
I'm afraid I haven't got any ideas then (except calling iw and pass the return code) :-)
/sys/class/net/"${IFACE}"/phy80211 presence is not sufficient?
(In reply to comment #9) > /sys/class/net/"${IFACE}"/phy80211 presence is not sufficient? Unless I'm reading this bug wrong its not, no.
(In reply to comment #1) > It looks like /etc/init.d/net script have some problems with handling wireless > networks without WIRELESS_EXT. Am I only one affected? Same here - since the update to 2.6.35 kernel. 2.6.31 works (with otherwise identical openrc,wpa_supplicant) baselayout 2.0.1 openrc 0.6.3
(In reply to comment #11) > (In reply to comment #1) > > It looks like /etc/init.d/net script have some problems with handling wireless > > networks without WIRELESS_EXT. Am I only one affected? > > Same here - since the update to 2.6.35 kernel. 2.6.31 works (with otherwise > identical openrc,wpa_supplicant) > > baselayout 2.0.1 > openrc 0.6.3 > Could you make sure you don't run in bug #321663. Has this bug something to do with 277594? Does the solutions in 277594 or 321663 help here?
I don't think this is a duplicate of #307191 (of which #321663 is a duplicate), because that bug is where wpa_supplicant does not start at all. However, since the OP has not provided emerge --info or relevant kernel config options (like what the network device is), we're just guessing until they do. Jiří, please post an updated bug report that uses the latest version of the relevant packages. By the way, a quick glance at the iw source code shows that it is using /sys/class/ieee80211/<phyname>/index. Since /sys/class/net/<if>/phy80211 is a link to /sys/class/ieee80211/<phyname>, I would predict that for modern kernels (>=2.6.33) it's reliable.
(In reply to comment #11) > (In reply to comment #1) > > It looks like /etc/init.d/net script have some problems with handling wireless > > networks without WIRELESS_EXT. Am I only one affected? > > Same here - since the update to 2.6.35 kernel. 2.6.31 works (with otherwise > identical openrc,wpa_supplicant) > > baselayout 2.0.1 > openrc 0.6.3 > AH! I believe I know why you run into this problem: WIRELESS_EXT is now CFG80211_WEXT. Is it enabled? I could exactly reproduce this bug after disabling CFG80211_WEXT (baselayout 2.0.1, openrc 0.6.3)
(In reply to comment #3) > How can I tell if the interface is wireless or not using nl80211 only? > > Here's the current code: > > [ -d /sys/class/net/"${IFACE}"/wireless -o \ > -d /sys/class/net/"${IFACE}"/phy80211 ] && return 0 > > [ ! -e /proc/net/wireless ] && return 1 > grep -Eq "^[[:space:]]*${IFACE}:" /proc/net/wireless > Hey Roy, I think Jiří is right: The file /sys/class/net/wlan0/phy80211 exists with and without CFG80211_WEXT in kernel. Thus in theorie, this code should be sufficient. I just recognized something: If I disable CFG80211_WEXT, then iwconfig says wlan0 is not a wirless extension. Can someone confirm this (maybe a new bug in iwconfig)? (tested with drm-radeon-testing kernel from Dave Airlies git repo, almost a vanilla 2.6.38-rc5)
(In reply to comment #15) > > I just recognized something: If I disable CFG80211_WEXT, then iwconfig says > wlan0 is not a wirless extension. Can someone confirm this (maybe a new bug in > iwconfig)? (tested with drm-radeon-testing kernel from Dave Airlies git repo, > almost a vanilla 2.6.38-rc5) That's not a bug, that's just iwconfig confirming that you disabled Wireless Extensions for that interface. (And so iwconfig can't talk to it -- you need net-wireless/iw, which speaks "nl80211": http://linuxwireless.org/en/developers/Documentation/cfg80211).
I just made a new install of Gentoo on a laptop and hit this bug. However, I think it's not actually a bug at all, I just made the same mistake as Jiří: I configured wpa_supplicant via /etc/conf.d/wpa_supplicant but I used /etc/init.d/net.wlan0! The correct way to configure it is via /etc/conf.d/net, just like the Gentoo wireless manual instructs.
Created attachment 321406 [details] wpa_supplicant-1 log
Comment on attachment 321406 [details] wpa_supplicant-1 log wrong bug
Is this actually a bug? Didn't the OP misconfigure their wireless network? I suspect that it can be closed, but some more comments from nl80211-only users might be warranted. It works fine for me.
Hi, all. From Jeremy comment, and my own test on openrc-0.10 git and wpa_supplicant v1.0 using nl80211. This bug seems not to be reproducible now. I'd like to close it. Feel free to reopen it if there are issues that I've been missed. Thanks a lot.