# Atheros kernel driver and my wireless access point setup

## JC99

Greetings,

I am trying to setup a wireless access point using the atheros kernel driver (Built into the kernel, not as a module). I am using Vanilla-Sources 2.6.29.4. I need my wireless network card to start up in "master mode" but for some reason it is starting up in "managed mode".

When wlan0 starts up I get this error message...

 *Quote:*   

> * Bringing up interface wlan0
> 
> *    configuring wireless network for wlan0
> 
> Error for wireless request "Set Mode" (8B06) :
> ...

 

...then when hostapd starts up I get this error message...

 *Quote:*   

> 
> 
> * Starting hostapd...
> 
> Configuration file: /etc/hostapd/hostapd.conf
> ...

 

Here is my /etc/conf.d/net

```
config_eth0="69.196.152.151 netmask 255.255.255.0 broadcast 69.196.152.255"

config_eth1="null"

config_wlan0="null"

bridge_br0="eth1 wlan0"

config_br0="192.168.0.1 netmask 255.255.255.0 broadcast 192.168.0.255"

channel_wlan0="1"

mode_wlan0="master"

essid_wlan0="MyNetwork"
```

Here is my hostapd.conf

```

interface=wlan0

bridge=br0

driver=nl80211

ssid=MyNetwork

hw_mode=g

channel=1

macaddr_acl=0

auth_algs=1

ignore_broadcast_ssid=0

country_code=CA

wpa=1

wpa_passphrase=passphrase

wpa_key_mgmt=WPA-PSK

wpa_pairwise=TKIP

rsn_pairwise=CCMP

```

Anyone know how to change my wireless card to "master mode" and make it so I don't get those error messages?

Thanks

P.S. I have everything working with madwifi and an older kernel so worst case scenario I stay with that configuration until I get this problem figured out.

----------

## JC99

I think I might know the problem. After doing some reading apparently many distrutions, including Gentoo, don't ship hostapd with support for the nl80211 driver. I checked the Gentoo tarball and this is the case. I tried editing the defconfig file in hostapd.tar.gz (enabling CONFIG_DRIVER_NL80211=y)but when I opened the tarball, edited it, and created a new tarball then tried to emerge it it gave me this...

```
penguin distfiles # emerge hostapd

Calculating dependencies... done!

>>> Verifying ebuild manifests

>>> Emerging (1 of 1) net-wireless/hostapd-0.6.9

Refetching... File renamed to '/usr/portage/distfiles/hostapd-0.6.9.tar.gz._checksum_failure_.70f9W1'
```

...and then wanted to download hostapd again.

Anyone know how I edit the source of the hostapd tarball so it will work?

----------

## ferrelas

Create a local overlay put stuff in there and edit the checksums to conform to your new tarball and update checksums for the ebuild and it should work. Not quite sure how to do this tho since I've gto minimal experience in messing around with ebuilds.

----------

## JC99

As it turned out I had to add a line of code to the kernel to get the AP working. I have written a guide on the gentoo-wiki on how to set up an atheros based wireless card as an access point to help others.

----------

## Paczesiowa

how does it work? is it stable? fast? is it good enough to become madwifi substitute?

----------

## JC99

It is stable but its not as fast as it should be (for me anyways). I have a 802.11g wireless card but I am only getting 802.11b speeds.

With the madwifi driver I was getting a lot of error/dropped packets. With ath5k that hasn't happened.

----------

