Jason Carson schrieb:
Jason Carson schrieb:
Alright, I have done everything you have suggested but when hostapd
tries
to start I am getting this error...
penguin ~ # /etc/init.d/hostapd start
* Starting hostapd...
Configuration file: /etc/hostapd/hostapd.conf
Failed to set interface wlan0 to master mode.
nl80211 driver initialization failed.
ELOOP: remaining socket: sock=5 eloop_data=0x80f1a38 user_data=(nil)
handler=0x8091790
* start-stop-daemon: failed to start `/usr/sbin/hostapd'
[ !! ]
* ERROR: hostapd failed to start
Do you have any idea why this is happening?
Not quite...
What kernelsettings do you activate for you wlan?
I used the kernel settings mentioned here...
http://linuxwireless.org/en/users/Drivers/ath5k#Enabling_ath5k
...but I built everything directly into the kernel, NOT as modules.
I have attached my .config to this email so you can see if I am missing
anything.
I also activated
CONFIG_HOSTAP=y
CONFIG_HOSTAP_FIRMWARE=y
CONFIG_HOSTAP_FIRMWARE_NVRAM=y
but i think i found the real reason.
I checked the 2.6.29.x ath5k base.c and found, that the AP code is still
dormant.
You need to apply this patch:
--- linux-2.6.29/drivers/net/wireless/ath5k/base.c 2009-02-10
06:11:43.186470883 +0100
+++ linux-2.6.29/drivers/net/wireless/ath5k/base.c.old
2008-11-14 09:36:40.000000000 +0100
@@ -522,6 +501,7 @@
hw->wiphy->interface_modes =
BIT(NL80211_IFTYPE_STATION) |
BIT(NL80211_IFTYPE_ADHOC) |
+ BIT(NL80211_IFTYPE_AP) |
BIT(NL80211_IFTYPE_MESH_POINT);
hw->extra_tx_headroom = 2;
Open the file
/usr/src/linux-<yourversion>/drivers/net/wireless/ath5k/base.c, search for
hw->wiphy->interface_modes
and the apply the line
BIT(NL80211_IFTYPE_AP) |
between these lines.
Rebuild and install the kernel.
Background: The AP code is there, but it is not activated yet. This line
activates it.
I thought newer 2.6.29er kernels do not have this restriction, so i did
not think of this, but apparently they do.