Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
wifi stopped working after kernel upgrade [RESOLVED]
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
plut0
Apprentice
Apprentice


Joined: 21 Dec 2004
Posts: 272

PostPosted: Tue Jan 11, 2011 1:09 pm    Post subject: wifi stopped working after kernel upgrade [RESOLVED] Reply with quote

I have been using my ath5k wireless card as an access point for some time now. Just yesterday I upgraded my kernel 2.6.28-hardened-r6 to kernel-2.6.36-hardened-r6 and now it is broke.

Apparently madwifi no longer works for ath5k and you are forced to use nl80211 under the newer kernel. For whatever reason the driver is throwing errors attempting to bring the NIC online.

I can add a virtual device without error:
Code:
# iw dev wlan0 interface add ath0 type __ap
# iwconfig ath0
ath0      IEEE 802.11bg  Mode:Master  Tx-Power=off   
          Retry  long limit:7   RTS thr:off   Fragment thr:off
          Power Management:off


When start hostapd I get the following errors:
Code:
# /etc/init.d/hostapd start
 * Starting ath0
RTNETLINK answers: Unknown error 132
RTNETLINK answers: Unknown error 132
RTNETLINK answers: Unknown error 132
 *   Configuring wireless network for ath0
Error for wireless request "Set Encode" (8B2A) :
    SET failed on device ath0 ; Operation not supported.
Error for wireless request "Set ESSID" (8B1A) :
    SET failed on device ath0 ; Operation not supported.
 *   ath0 does not support setting ESSID to "gentoo"
 *   Failed to configure wireless for ath0
 * ERROR:  cannot start hostapd as net.ath0 could not start


/etc/hostapd/hostapd.cfg:
Code:
interface=ath0
driver=nl80211
logger_syslog=-1
logger_syslog_level=2
logger_stdout=-1
logger_stdout_level=1
dump_file=/tmp/hostapd0.dump
ctrl_interface=/var/run/hostapd
ctrl_interface_group=0
ignore_broadcast_ssid=1
ssid=gentoo
hw_mode=g
macaddr_acl=1
accept_mac_file=/etc/hostapd/hostapd.accept
auth_algs=1
wpa=0


/etc/conf.d/net
Code:
mode_ath0=( "master" )
config_ath0=( "192.168.2.1/24" )
essid_ath0=( "gentoo" )


Last edited by plut0 on Wed Jan 12, 2011 3:45 pm; edited 1 time in total
Back to top
View user's profile Send private message
plut0
Apprentice
Apprentice


Joined: 21 Dec 2004
Posts: 272

PostPosted: Wed Jan 12, 2011 3:45 pm    Post subject: Reply with quote

I fixed this, I had to start the interface as ad-hoc and let hostapd set it as a master. I also had to run rfkill to unblock the wireless.

/etc/conf.d/net:
Code:
config_ath0=( "192.168.2.1/24" )
mode_ath0=( "ad-hoc" )
essid_ath0=( "gentoo" )
preup() {
  if [[ ${IFACE} == "ath0" ]]; then
    iw dev wlan0 interface add ${IFACE} type __ap
    rfkill unblock all
  fi
}
postdown() {
  if [[ ${IFACE} == "ath0" ]]; then
    iw dev ${IFACE} del
    iw dev mon.${IFACE} del
  fi
}
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum