Scan wifi card on linux when connected-

Sam Leffler sam
Wed May 30 20:07:12 PDT 2007


hong zhang wrote:
> Your suggestion should be called progressive scan not
> normal scan. Some driver supports it. But I do not
> think madwifi supports progressive scan yet. For QoS
> feature, voice data interval is not more than 60ms.
> Otherwise, voice will be paused and quality is bad. To
> support WMM, client needs progressive scan to find APs
> near it so that it can roam if need. But normal scan
> would not work for QoS when connected. Timing is also
> an issue here too. 
> 
> Should AP know when client is scanning for normal
> scan?
> 
> Madwifif provides background scan. I believe it scans
> when client connected.
> 
> There are 3 kinds of scan. Normal scan, background
> scan and progressive scan. Madwifi currently supports
> first two.

madwifi's bg scan algorithm returns to the home channel periodically so
it does not lose frames.  I'm not aware of any bg scan algorithm that
ignores the listen interval and does a complete scan while associated
(even if it notifies the ap it's in power save mode); that would not
work.  Also some ap's don't honor a listen interval supplied by a sta if
it'd require significant buffering of unicast frames (or aggressively
age out frames on the sta's ps q) so in general it's not feasible to do
what I think you're describing as "bg scan" (as opposed to your
"progressive scan").

In general bg scanning should never lose frames.  Catching mcast frames
when the dtim period is 1 can be hard as that narrows the interval you
can listen off-channel.  All the more reason why it's important to take
advantage of f/w scanning support when available.

	Sam

> 
> 
> --- Dan Williams <dcbw at redhat.com> wrote:
> 
>> On Wed, 2007-05-30 at 12:44 -0700, hong zhang wrote:
>>> when driver scans, it will scan all channels as
>>> default. Driver supports about 32 channels on
>> a/b/g.
>>> Default scan time on each channel is 100ms. It
>> takes
>>> at least 3 seconds to complete scan job. If client
>> is
>>> associated with AP, for example at channel 6. If
>> scan
>>> is allowed, driver will leave channel 6 when it
>> scan
>>> on other channels. Unless AP konws driver is
>> canning
>>> and AP buffers packets for more than 3 seconds.
>>> Otherwise, packets will be lost.
>>>
>>> So I think normal scan is not allowed when
>> connected.
>>
>> So that's you answer then, as to why it's not
>> returning scan results
>> when it's connected.
>>
>> If the driver is smart, it will send the AP a power
>> save enter frame, do
>> the scanning, then tell the AP it's woken up again,
>> then get all the
>> buffered packets from the AP.
>>
>> Or, the driver could scan 2 or 3 channels, then hop
>> back to the
>> associated channel for a small amount of time to
>> talk to the AP, then do
>> the next set of channels.
>>
>> The driver should be keeping a list of scan results
>> from previous scans
>> to return when iwlist gets called, and aging those
>> scan results to
>> delete each BSS when a certain amount of time has
>> elapsed since the last
>> beacon has been seen from that BSS.
>>
>> In any case, if the driver doesn't allow scans while
>> connected, that
>> driver is dumb and broken and should be made
>> smarter.
>>
>> Dan
>>
>>> --- Dan Williams <dcbw at redhat.com> wrote:
>>>
>>>> On Wed, 2007-05-30 at 10:31 -0700, hong zhang
>> wrote:
>>>>> Magda,
>>>>>
>>>>> When client is already associated with AP,
>> iwlist
>>>> will
>>>>> not do scan (normal scan). You can
>> disaasociate
>>>> with
>>>>> the AP and run iwlist again. See any
>> difference.
>>>> To 
>>>>> verify what I said. You can put printk() on
>>>>> ieee80211_notify_scan_done(struct ieee80211vap
>>>> *vap)
>>>>> to prove scan is done when iwlist is executed.
>>>> Sounds like a driver bug; if you look in the
>> source
>>>> for the SIOCSIWSCAN
>>>> handler, does it dis-allow a scan when
>> connected?
>>>> Dan
>>>>
>>>>> ----henry
>>>>> --- magda chelly <sandra26899 at yahoo.fr> wrote:
>>>>>
>>>>>> Hello,
>>>>>>
>>>>>> I'm trying to scan a wifi card on debian
>>>>>> distribution,
>>>>>> (armel:nokia n800), but with iwlist scan, it
>>>> doesn't
>>>>>> show me all the networks, the connected one,
>>>> does
>>>>>> not
>>>>>> appear and others are missing.
>>>>>> Can someone help me please.
>>>>>>
>>>>>> Thanks,
>>>>>> Magda,
>>>>>>
>>>>>>
>>>>>>      
>>>>>>
> _____________________________________________________________________________
>>>>>> Ne gardez plus qu'une seule adresse mail !
>>>> Copiez
>>>>>> vos mails vers Yahoo! Mail 
>>>>>>
>> _______________________________________________
>>>>>> HostAP mailing list
>>>>>> HostAP at shmoo.com
>>>>>>
>> http://lists.shmoo.com/mailman/listinfo/hostap
>>>>>
>>>>>
>>>>>        
>>>>>
> ____________________________________________________________________________________Take
>>>> the Internet to Go: Yahoo!Go puts the Internet
>> in
>>>> your pocket: mail, news, photos & more. 
>>>>> http://mobile.yahoo.com/go?refer=1GNXIC
>>>>>
>> _______________________________________________
>>>>> HostAP mailing list
>>>>> HostAP at shmoo.com
>>>>> http://lists.shmoo.com/mailman/listinfo/hostap
>>>>
>>>
>>>        
>>>
> ____________________________________________________________________________________You
>> snooze, you lose. Get messages ASAP with AutoCheck
>>> in the all-new Yahoo! Mail Beta.
>>>
> http://advision.webevents.yahoo.com/mailbeta/newmail_html.html
>>
> 
> 
> 
>        
> ____________________________________________________________________________________Sick sense of humor? Visit Yahoo! TV's 
> Comedy with an Edge to see what's on, when. 
> http://tv.yahoo.com/collections/222
> _______________________________________________
> HostAP mailing list
> HostAP at shmoo.com
> http://lists.shmoo.com/mailman/listinfo/hostap
> 
> 





More information about the Hostap mailing list