How to set a scan with ath9k driver

Francisco Cuesta ndarkness at
Fri May 24 03:12:55 EDT 2013

HEllo Mohammend, thanks for replying your sequence was really helpful

2013/5/22 Mohammed Shafi Shajakhan <mohammed at>:
> On Wed, May 22, 2013 at 02:12:13PM +0200, Francisco Cuesta wrote:
>> Hello,
>> I would like to know whether someone might point out where a  sta-mode
>> scan in ath9k driver is carried out. I mean, if I want to perform such
>> a scan, I have seen that hostapd or wpa supplicant requests the driver
>> through nl80211 interface such a petition. But I cannot understand how
>> this petition is made, in terms of assigning the parameters of the
>> scan. How or where is the frequency or channel imposed for such a
>> scan?
> nl80211 nl80211_trigger_scan->rdev_scan which
> calls mac80211's callback iee80211_scan
> iee80211_scan -> ieee80211_request_scan -> ieee80211_start_scan
> ->ieee80211_start_sw_scan -> queues ieee80211_scan_work
I'm getting stuck since I'm looking for the function queues
ieee80211_scan_work, but I cannot identify it on my mac80211 code,
which is as follows

static int ieee80211_start_sw_scan(struct ieee80211_local *local)
     * Hardware/driver doesn't support hw_scan, so use software...

    local->leave_oper_channel_time = jiffies;
    local->next_scan_state = SCAN_DECISION;
    local->scan_channel_idx = 0;

    ieee80211_offchannel_stop_vifs(local, true);


    /* We need to set power level at maximum rate for scanning. */
    ieee80211_hw_config(local, 0);

                     &local->scan_work, 0);

    return 0;

Is the function called ieee80211_queue_delayed_work??

> ieee80211_scan_work has the states
> SCAN_SET_CHANNEL calls drivers ath9k_config with CONF_CHANGE_CHANNEL
> flag set, please follow from there for the driver code.
>> I really appreciate any hint,
>> Regards,
>> _______________________________________________
>> HostAP mailing list
>> HostAP at

More information about the HostAP mailing list