How to set a scan with ath9k driver

Francisco Cuesta ndarkness
Fri May 24 00:12:55 PDT 2013


HEllo Mohammend, thanks for replying your sequence was really helpful

2013/5/22 Mohammed Shafi Shajakhan <mohammed at qca.qualcomm.com>:
> 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...
     */
    drv_sw_scan_start(local);

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

    ieee80211_offchannel_stop_vifs(local, true);

    ieee80211_configure_filter(local);

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

    ieee80211_queue_delayed_work(&local->hw,
                     &local->scan_work, 0);

    return 0;
}

Is the function called ieee80211_queue_delayed_work??

> ieee80211_scan_work has the states
> SCAN_DECISION/SET_CHANNEL/PROBE etc
>
> 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 lists.shmoo.com
>> http://lists.shmoo.com/mailman/listinfo/hostap



More information about the Hostap mailing list