ath6kl error when ieee80211n=1 - nl80211: Failed to set channel -22 (Invalid argument)

Drasko DRASKOVIC drasko.draskovic at gmail.com
Fri Nov 15 13:21:03 EST 2013


Hi all,
I am having problems putting ath6kl USB dongle in AP mode when
ieee80211n=1 is enabled.

I am using hostapd-2.0

Starting hostapd when ieee80211n=1 is enabled provokes following error:

random: Trying to read entropy from /dev/random
Configuration file: ./hostapd.conf
nl80211: interface wlan0 in phy phy0
rfkill: Cannot open RFKILL control device
nl80211: RFKILL status not available
nl80211: Using driver-based roaming
nl80211: Supports Probe Response offload in AP mode
nl80211: Disable use_monitor with device_ap_sme since no monitor mode
support detected
nl80211: Add own interface ifindex 4
nl80211: Set mode ifindex 4 iftype 3 (AP)
nl80211: Setup AP - device_ap_sme=1 use_monitor=0
nl80211: Subscribe to mgmt frames with AP handle 0x5f650 (device SME)
nl80211: Register frame type=0xd0 nl_handle=0x5f650
nl80211: Register frame match - hexdump(len=0): [NULL]
nl80211: Enable Probe Request reporting nl_preq=0x5f688
nl80211: Register frame type=0x40 nl_handle=0x5f688
nl80211: Register frame match - hexdump(len=0): [NULL]
BSS count 1, BSSID mask 00:00:00:00:00:00 (0 bits)
nl80211: Regulatory information - country=00
nl80211: 2402-2472 @ 40 MHz
nl80211: 2457-2482 @ 40 MHz
nl80211: 2474-2494 @ 20 MHz
nl80211: 5170-5250 @ 80 MHz
nl80211: 5735-5835 @ 80 MHz
nl80211: 57240-63720 @ 2160 MHz
nl80211: Added 802.11b mode based on 802.11g information
Allowed channel: mode=1 chan=1 freq=2412 MHz max_tx_power=20 dBm
Allowed channel: mode=1 chan=2 freq=2417 MHz max_tx_power=20 dBm
Allowed channel: mode=1 chan=3 freq=2422 MHz max_tx_power=20 dBm
Allowed channel: mode=1 chan=4 freq=2427 MHz max_tx_power=20 dBm
Allowed channel: mode=1 chan=5 freq=2432 MHz max_tx_power=20 dBm
Allowed channel: mode=1 chan=6 freq=2437 MHz max_tx_power=20 dBm
Allowed channel: mode=1 chan=7 freq=2442 MHz max_tx_power=20 dBm
Allowed channel: mode=1 chan=8 freq=2447 MHz max_tx_power=20 dBm
Allowed channel: mode=1 chan=9 freq=2452 MHz max_tx_power=20 dBm
Allowed channel: mode=1 chan=10 freq=2457 MHz max_tx_power=20 dBm
Allowed channel: mode=1 chan=11 freq=2462 MHz max_tx_power=20 dBm
Allowed channel: mode=0 chan=1 freq=2412 MHz max_tx_power=20 dBm
Allowed channel: mode=0 chan=2 freq=2417 MHz max_tx_power=20 dBm
Allowed channel: mode=0 chan=3 freq=2422 MHz max_tx_power=20 dBm
Allowed channel: mode=0 chan=4 freq=2427 MHz max_tx_power=20 dBm
Allowed channel: mode=0 chan=5 freq=2432 MHz max_tx_power=20 dBm
Allowed channel: mode=0 chan=6 freq=2437 MHz max_tx_power=20 dBm
Allowed channel: mode=0 chan=7 freq=2442 MHz max_tx_power=20 dBm
Allowed channel: mode=0 chan=8 freq=2447 MHz max_tx_power=20 dBm
Allowed channel: mode=0 chan=9 freq=2452 MHz max_tx_power=20 dBm
Allowed channel: mode=0 chan=10 freq=2457 MHz max_tx_power=20 dBm
Allowed channel: mode=0 chan=11 freq=2462 MHz max_tx_power=20 dBm
Completing interface initialization
Mode: IEEE 802.11g  Channel: 6  Frequency: 2437 MHz
nl80211: Set freq 2437 (ht_enabled=1 sec_channel_offset=0)
nl80211: Failed to set channel (freq=2437): -22 (Invalid argument)
Could not set channel for kernel driver
wlan0: Unable to setup interface.
wlan0: Flushing old station entries
wlan0: Deauthenticate all stations
wpa_driver_nl80211_set_key: ifindex=4 alg=0 addr=(nil) key_idx=0
set_tx=0 seq_len=0 key_len=0
wpa_driver_nl80211_set_key: ifindex=4 alg=0 addr=(nil) key_idx=1
set_tx=0 seq_len=0 key_len=0
wpa_driver_nl80211_set_key: ifindex=4 alg=0 addr=(nil) key_idx=2
set_tx=0 seq_len=0 key_len=0
wpa_driver_nl80211_set_key: ifindex=4 alg=0 addr=(nil) key_idx=3
set_tx=0 seq_len=0 key_len=0
nl80211: Skip disabling of Probe Request reporting nl_preq=0x5f688
while in AP mode
netlink: Operstate: linkmode=0, operstate=6
nl80211: Set mode ifindex 4 iftype 2 (STATION)
nl80211: Disable Probe Request reporting nl_preq=0x5f688
nl80211: Unsubscribe mgmt frames handle 0x5f650 (AP teardown (dev SME))




Please find below hostapd.conf that is used.

Best regards,
Drasko




#sets the wifi interface to use, is wlan0 in most cases
interface=wlan0

#driver to use, nl80211 works in most cases
driver=nl80211

#sets the ssid of the virtual wifi access point
ssid=TEST


#sets the mode of wifi, depends upon the devices you will be using. It
can be a,b,g,n. Setting to g ensures backward compatiblity.
hw_mode=g
#ieee80211n=1
#ht_capab=[HT40-][HT40+][SHORT-GI-40][TX-STBC][RX-STBC1][DSSS_CCK-40]

wmm_enabled=1

#sets the channel for your wifi
channel=6
#channel=36

#macaddr_acl sets options for mac address filtering. 0 means "accept
unless in deny list"
macaddr_acl=0

#setting ignore_broadcast_ssid to 1 will disable the broadcasting of
ssid
#ignore_broadcast_ssid=0

eap_server=1

# IEEE 802.11 specifies two authentication algorithms. hostapd can be
# configured to allow both of these or only one. Open system
authentication
# should be used with IEEE 802.1X.
# Bit fields of allowed authentication algorithms:
# bit 0 = Open System Authentication
# bit 1 = Shared Key Authentication (requires WEP)
auth_algs=3

#####Sets WPA and WPA2 authentication#####
#wpa option sets which wpa implementation to use
#1 - wpa only
#2 - wpa2 only
#3 - both
wpa=1

#sets wpa passphrase required by the clients to authenticate
themselves on the network
wpa_passphrase=opensesame

#sets wpa key management
wpa_key_mgmt=WPA-PSK

#sets encryption used by WPA
wpa_pairwise=TKIP CCMP

#sets encryption used by WPA2
rsn_pairwise=TKIP CCMP


More information about the HostAP mailing list