# hostapd/wifi setup

## djinnZ

Hi. I have an atheros AR5001X+ now supported by the kernel ath5k module (in this case iwconfig is unable to set the master mode for the NIC but only hostapd must be configured for driver=nl80211).

I have also configured it for old madwifi-ng as described in the wiki but the suggestion are not useful by using the 80211 kernel driver.

The intent is to configure it as AP in run level default and have another run level to use as client.

No problem to configure and connect as client and no problem if i start manually with an ifconfig up before hostapd, the client connect but at time to write conf.d/net i am unable to understand how must be configured.

If I configure in conf.net/net the ip the init will try to start wlan0 and hangs waiting for wpa_supplicant or iwconfig, If I not configure hostapd wait for wlan0 to be started.

Yes I can modify init.d/hostapd to not call init.d/net.wlan0 and start rfkill (this must be in preup/predown_wlan0 function in order to re-run ifconfig) and ifconfig up in itself but... don't like those approaches.

Its a bug of baselayout? Switch to baselayout 2 will help? 

Thanks in advice for any suggestion.

----------

## djinnZ

As often i have solved by myself.

Now modules_wlan0="!wpa_supllicant !iwconfig", with openrc 0.8, prevent it to run and the rc will never wait for execution of wireless tools.

Sounds reasonable open a bug about this and the needs of the ability to choiche about a client or ap configuration only by select hostapd or net.wlan0 in runlevels?

----------

