Search Linux Wireless

Re: [PATCH v2 1/5] {nl,cfg}80211: add a flags word to scan requests

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Sep 28, 2012 at 4:01 AM, Johannes Berg
<johannes@xxxxxxxxxxxxxxxx> wrote:
> On Thu, 2012-09-27 at 11:59 -0700, Bing Zhao wrote:
>> From: Sam Leffler <sleffler@xxxxxxxxxxxx>
>>
>> Add a flags word to direct and scheduled scan requests; it will
>> be used for control of optional behaviours such as flushing the
>> bss cache prior to doing a scan.
>
> Why for scheduled scan as well?

Because I thought the scheduled scan mechanism is used to trigger
periodic scans w/o involving user space and so might be used to do
bgscan's.  Please enlighten me.

>
>> + * @NL80211_ATTR_SCAN_FLAGS: scan request control flags (u32)
>
> One thing that might be useful is to advertise which flags are even
> supported at all by a driver, if we add different ones? We might then
> ignore the flags that we don't support anyway, but at least userspace
> would know that it can't expect flushing (for example) on an older
> kernel version and might have to use some workarounds or whatever.

Yes I considered this. I don't know what the model is for nl80211 in
this regard (think we've talked about this in the past).  The low
priority scan flag is somewhat advisory so applications should be able
to deal w/ it being ignored.  The flush flag however may be cause some
misbehaviour--e.g. you wakeup, scan, and then act on stale results
that may cause you try and associate to an ap that's out of range in
which case you'll end up doing the equivalent to the flush in user
space to make sure the right thing happens.

>
>> +/**
>> + * enum nl80211_scan_flags -  scan request control flags
>> + *
>> + * Scan request control flags are used to control the handling
>> + * of NL80211_CMD_TRIGGER_SCAN and NL80211_CMD_START_SCHED_SCAN
>> + * requests.
>> + */
>> +enum nl80211_scan_flags {
>> +};
>> +
>
>>  /**
>> + * enum cfg80211_scan_flags -  scan request control flags
>> + */
>> +enum cfg80211_scan_flags {
>> +};
>
> That doesn't make a lot of sense? A single enum seems sufficient?

I thought cfg80211's name space was separate from nl80211's?  Was just
trying to follow what I found elsewhere...

>
>> +     nla_put_u32(msg, NL80211_ATTR_SCAN_FLAGS, req->flags);
>
> Missing error check, also, is there nothing that re-publishes
> information about scheduled scans?
>
> johannes
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
> the body of a message to majordomo@xxxxxxxxxxxxxxx
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Wireless Personal Area Network]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Hiking]     [MIPS Linux]     [ARM Linux]     [Linux RAID]

  Powered by Linux