This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

wl1271: Could not set channel for kernel driver

Other Parts Discussed in Thread: WL1271

Hi,

Can anybody help me to figure out the returning message  "Could not set channel for kernel driver"? I tried to set up an AP on my IMX6 board. I have wl12xx_sdio module loaded. The linux BSP is LTIB with kernel 3.0.35. The wifi module is LS TiWi-R2 that using wl1271 driver.

I have stuck this issue for several days, nobody answers my question. I really need a help to go through this issue.

root@xpex ~$ ifconfig wlan0 up                                                 
wl1271: firmware booted (Rev 6.1.5.50.74)                                      
root@xpex ~$ hostapd -B /etc/hostapd.conf                                      
Configuration file: /etc/hostapd.conf                                          
wl1271: down                                                                   
wl1271: firmware booted (Rev 6.2.1.0.54)                                       
Could not set channel for kernel driver                                        
wlan0: Unable to setup interface.                                              
wl1271: down

I've tried using some other channels like channel 1, 2, 4, 6, and 11. But the results are the same "Could not set channel for kernel driver".  I post my hostapd.conf file here for your review. Thanks,

interface=wlan0

ssid=mantis2
driver=nl80211
channel=1
country_code=US
hw_mode=g
ieee80211n=1

  • Hi,

    I post the debugging log message here if somebody may figure out what is wrong on my linux kernel 3.0.35 with wl1271 driver.

    root@epex ~$ hostapd -dKtv /etc/hostapd.conf
    hostapd v2.0-devel-ol_R5.SP6.01
    User space daemon for IEEE 802.11 AP management,
    IEEE 802.1X/WPA/WPA2/EAP/RADIUS Authenticator
    Copyright (c) 2002-2012, Jouni Malinen <j@w1.fi> and contributors
    root@epex ~$
    root@epex ~$ hostapd -dtB /etc/hostapd.conf
    190936.552840: Configuration file: /etc/hostapd.conf
    190936.558363: nl80211: interface wlan0 in phy phy0
    190936.558582: rfkill: initial event: idx=0 type=1 op=0 soft=0 hard=0
    190936.559187: nl80211: Using driver-based off-channel TX
    190936.559479: nl80211: Add own interface ifindex 4
    190936.559596: nl80211: Set mode ifindex 4 iftype 3 (AP)
    190936.559763: nl80211: Setup AP - device_ap_sme=0 use_monitor=1
    190936.559831: nl80211: Create interface iftype 6 (MONITOR)
    190936.562505: nl80211: New interface mon.wlan0 created: ifindex=8
    190936.562575: nl80211: Add own interface ifindex 8
    190936.631527: nl80211: Set TX rates failed: ret=-95 (Operation not supported)
    wl1271: firmware booted (Rev 6.2.1.0.54)
    190937.161729: BSS count 1, BSSIDwl1271: ERROR command execute failure 16
    ------------[ cut here ]------------

    WARNING: at drivers/net/wireless/wl12xx/cmd.c:108 wl1271_cmd_send+0x378/0x3d8 [)
    Modules linked in: wl12xx_sdio wl12xx mac80211 cfg80211
    [<80044e14>] (unwind_backtrace+0x0/0xf8) from [<80070814>] (warn_slowpath_commo)
    [<80070814>] (warn_slowpath_common+0x4c/0x64) from [<80070848>] (warn_slowpath_)
    [<80070848>] (warn_slowpath_null+0x1c/0x24) from [<7f0da590>] (wl1271_cmd_send+)
    [<7f0da590>] (wl1271_cmd_send+0x378/0x3d8 [wl12xx]) from [<7f0db0d4>] (wl1271_c)
    [<7f0db0d4>] (wl1271_cmd_template_set+0xc8/0x120 [wl12xx]) from [<7f0db324>] (w)
    [<7f0db324>] (wl1271_cmd_build_probe_req+0x88/0xec [wl12xx]) from [<7f0e6938>] )
    [<7f0e6938>] (wl1271_scan_send+0x214/0x43c [wl12xx]) from [<7f0e6c78>] (wl1271_)
    [<7f0e6c78>] (wl1271_scan_stm+0x5c/0x178 [wl12xx]) from [<7f0e6e14>] (wl1271_sc)
    [<7f0e6e14>] (wl1271_scan+0x80/0xb4 [wl12xx]) from [<7f0d6bf0>] (wl1271_op_hw_s)
    [<7f0d6bf0>] (wl1271_op_hw_scan+0x64/0x80 [wl12xx]) from [<7f094794>] (__ieee80)
    [<7f094794>] (__ieee80211_start_scan+0x114/0x1b4 [mac80211]) from [<7f09514c>] )
    [<7f09514c>] (ieee80211_request_scan+0x28/0x44 [mac80211]) from [<7f01146c>] (n)
    [<7f01146c>] (nl80211_trigger_scan+0x3c4/0x414 [cfg80211]) from [<80402c18>] (g)
    [<80402c18>] (genl_rcv_msg+0x1bc/0x1f0) from [<80402128>] (netlink_rcv_skb+0xbc)
    [<80402128>] (netlink_rcv_skb+0xbc/0xd8) from [<80402a54>] (genl_rcv+0x1c/0x24)
    [<80402a54>] (genl_rcv+0x1c/0x24) from [<80401aa8>] (netlink_unicast+0x2a0/0x2f)
    [<80401aa8>] (netlink_unicast+0x2a0/0x2fc) from [<80401e2c>] (netlink_sendmsg+0)
    [<80401e2c>] (netlink_sendmsg+0x288/0x300) from [<803cfafc>] (sock_sendmsg+0x94)
    [<803cfafc>] (sock_sendmsg+0x94/0xb4) from [<803d0ef0>] (__sys_sendmsg+0x2bc/0x)
    [<803d0ef0>] (__sys_sendmsg+0x2bc/0x2d4) from [<803d1918>] (sys_sendmsg+0x3c/0x)
    [<803d1918>] (sys_sendmsg+0x3c/0x68) from [<8003dfc0>] (ret_fast_syscall+0x0/0x)
    ---[ end trace ee850a73e20e3893 ]---
    wl1271: WARNING cmd set_template failed: -5
    wl1271: ERROR PROBE request template failed
    wl1271: Hardware recovery in progress. FW ver: Rev 6.2.1.0.54 pc: 0x0
    190937.385128: nl80211: Regulatorwl1271: down
    y information - country=00ieee80211 phy0: Hardware restart was requested

    190937.395156: nl80211: 2402-2472 @ 40 MHz
    190937.395196: nl80211: 2457-2482 @ 20 MHz
    190937.395229: nl80211: 2474-2494 @ 20 MHz
    190937.395248: nl80211: 5170-5250 @ 40 MHz
    190937.395267: nl80211: 5735-5835 @ 40 MHz
    190937.395373: Completing interface initialization
    190937.401595: Mode: IEEE 802.11g  Channel: 11  Frequency: 2462 MHz
    190937.401694: nl80211: Set freq 2462 (ht_enabled=1 sec_channel_offset=0)
    wl1271: firmware booted (Rev 6.2.1.0.54)
    190937.953801: nl80211: Failed toNOHZ: local_softirq_pending 08
     set channel (freq=2462): -22 (Invalid argument)
    190937.953880: Could not set channel for kernel driver
    190937.953898: wlan0: Unable to setup interface.
    190937.953956: wlan0: Flushing old station entries
    190937.954079: wlan0: Deauthenticate all stations
    190937.954105: wpa_driver_nl80211_send_mlme_freq: Sending frame using monitor it
    190937.954223: wpa_driver_nl80211_set_key: ifindex=4 alg=0 addr=(nil) key_idx=00
    190937.954326: wpa_driver_nl80211_set_key: ifindex=4 alg=0 addr=(nil) key_idx=10
    190937.954416: wpa_driver_nl80211_set_key: ifindex=4 alg=0 addr=(nil) key_idx=20
    190937.954507: wpa_driver_nl80211_set_key: ifindex=4 alg=0 addr=(nil) key_idx=30
    190938.001096: nl80211: Remove interface ifindex=8
    wl1271: ERROR command execute failure 16
    ------------[ cut here ]------------

  • Hi Bill,

    Sorry for late response.

    Can you please provide the log and your hostapd.conf file?

  • Hi Abhijit,

    I am using wl1271 driver on TiWi-R2 module on my Nitrogen6x board. I tried to turn on access point by running hostapd as below. But I got returning message said "Could not set channel for kernel driver". I don't know the issue is. Could you please figure out if the failure related to hardware or driver. the kernel is 3.0.35 and driver module is wl12xx_sdio which loaded properly.

    root@epex ~$ modprobe wl12xx_sdio

    root@epex ~$ hostapd -B /etc/hostapd.conf
    Configuration file: /etc/hostapd.conf
    wl1271: firmware booted (Rev 6.2.1.0.54)
    Could not set channel for kernel driver
    wlan0: Unable to setup interface.
    wl1271: down

    The hostapd.conf listing as below.

    interface=wlan0

    ssid=mantis2
    driver=nl80211
    channel=4
    country_code=US
    hw_mode=g
    ieee80211n=1