Search Linux Wireless

Re: [PATCH v3 1/2] nl80211/cfg80211: add scan channel times to scan command

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

 



On Wed, 2012-06-20 at 13:38 +0300, Goldenshtein, Victor wrote:

> Will add this check, so we will read scan attributes only if the
> NL80211_FEATURE_SCAN_TIMES is set by the  driver.

Thx.

> > If I set *ONLY* max_passive_ch_time = 10 via nl80211, what will happen?
> >
> 
> There is no MAX times for the software scan, so the default values
> will be used ,no problem here.

What if it's hardware scan, not software scan?

> The hw_scan has it's own specific default values, and it should
> validate that his default min_passive_channel_time is <=
> max_passive_ch_time from the user request.

I don't think you're understanding it yet ...

Say I have USER_max_passive_time but DEFAULT_min_passive_time -- that
can cause all kinds of weird things to happen, and forcing drivers to
validate it seems rather stupid.

> The other option is to enforce usermode to define always min *and*
> max, something like:
> if ((info->attrs[NL80211_ATTR_SCAN_MIN_CH_TIME]) &&
>     (info->attrs[NL80211_ATTR_SCAN_MAX_CH_TIME])) {
>              request->min_ch_time =
> nla_get_u32(info->attrs[NL80211_ATTR_SCAN_MIN_CH_TIME]);
>              request->max_ch_time =
> nla_get_u32(info->attrs[NL80211_ATTR_SCAN_MAX_CH_TIME]);
>     }
> 
> Although, not sure that enforcing is the correct way ?

It makes a lot more sense than your way which can result in invalid
configurations being passed to the driver ...

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


[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