<div dir="ltr"><div>INIT_DELAYED_WORK(&amp;local-&gt;scan_work, ieee80211_scan_work);<br><br></div>So it would do void ieee80211_scan_work(struct work_struct *work) {.....<br></div><div class="gmail_extra"><br><br><div class="gmail_quote">
2013/5/24 Francisco Cuesta <span dir="ltr">&lt;<a href="mailto:ndarkness@gmail.com" target="_blank">ndarkness@gmail.com</a>&gt;</span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
HEllo Mohammend, thanks for replying your sequence was really helpful<br>
<br>
2013/5/22 Mohammed Shafi Shajakhan &lt;<a href="mailto:mohammed@qca.qualcomm.com">mohammed@qca.qualcomm.com</a>&gt;:<br>
<div class="im">&gt; On Wed, May 22, 2013 at 02:12:13PM +0200, Francisco Cuesta wrote:<br>
&gt;&gt; Hello,<br>
&gt;&gt;<br>
&gt;&gt; I would like to know whether someone might point out where a  sta-mode<br>
&gt;&gt; scan in ath9k driver is carried out. I mean, if I want to perform such<br>
&gt;&gt; a scan, I have seen that hostapd or wpa supplicant requests the driver<br>
&gt;&gt; through nl80211 interface such a petition. But I cannot understand how<br>
&gt;&gt; this petition is made, in terms of assigning the parameters of the<br>
&gt;&gt; scan. How or where is the frequency or channel imposed for such a<br>
&gt;&gt; scan?<br>
&gt;<br>
&gt; nl80211 nl80211_trigger_scan-&gt;rdev_scan which<br>
&gt; calls mac80211&#39;s callback iee80211_scan<br>
&gt;<br>
&gt; iee80211_scan -&gt; ieee80211_request_scan -&gt; ieee80211_start_scan<br>
&gt; -&gt;ieee80211_start_sw_scan -&gt; queues ieee80211_scan_work<br>
&gt;<br>
</div>I&#39;m getting stuck since I&#39;m looking for the function queues<br>
ieee80211_scan_work, but I cannot identify it on my mac80211 code,<br>
which is as follows<br>
<br>
static int ieee80211_start_sw_scan(struct ieee80211_local *local)<br>
{<br>
    /*<br>
     * Hardware/driver doesn&#39;t support hw_scan, so use software...<br>
     */<br>
    drv_sw_scan_start(local);<br>
<br>
    local-&gt;leave_oper_channel_time = jiffies;<br>
    local-&gt;next_scan_state = SCAN_DECISION;<br>
    local-&gt;scan_channel_idx = 0;<br>
<br>
    ieee80211_offchannel_stop_vifs(local, true);<br>
<br>
    ieee80211_configure_filter(local);<br>
<br>
    /* We need to set power level at maximum rate for scanning. */<br>
    ieee80211_hw_config(local, 0);<br>
<br>
    ieee80211_queue_delayed_work(&amp;local-&gt;hw,<br>
                     &amp;local-&gt;scan_work, 0);<br>
<br>
    return 0;<br>
}<br>
<br>
Is the function called ieee80211_queue_delayed_work??<br>
<div class="HOEnZb"><div class="h5"><br>
&gt; ieee80211_scan_work has the states<br>
&gt; SCAN_DECISION/SET_CHANNEL/PROBE etc<br>
&gt;<br>
&gt; SCAN_SET_CHANNEL calls drivers ath9k_config with CONF_CHANGE_CHANNEL<br>
&gt; flag set, please follow from there for the driver code.<br>
&gt;<br>
&gt;<br>
&gt;&gt;<br>
&gt;&gt; I really appreciate any hint,<br>
&gt;&gt;<br>
&gt;&gt; Regards,<br>
&gt;&gt; _______________________________________________<br>
&gt;&gt; HostAP mailing list<br>
&gt;&gt; <a href="mailto:HostAP@lists.shmoo.com">HostAP@lists.shmoo.com</a><br>
&gt;&gt; <a href="http://lists.shmoo.com/mailman/listinfo/hostap" target="_blank">http://lists.shmoo.com/mailman/listinfo/hostap</a><br>
_______________________________________________<br>
HostAP mailing list<br>
<a href="mailto:HostAP@lists.shmoo.com">HostAP@lists.shmoo.com</a><br>
<a href="http://lists.shmoo.com/mailman/listinfo/hostap" target="_blank">http://lists.shmoo.com/mailman/listinfo/hostap</a><br>
<br>
</div></div></blockquote></div><br></div>