Search Linux Wireless

Re: [RFC 7/9] nl80211/cfg80211: add DFS feature flag

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

 



On Mon, Feb 13, 2012 at 12:28 PM, Johannes Berg
<johannes@xxxxxxxxxxxxxxxx> wrote:
> On Thu, 2012-02-09 at 15:11 -0800, Luis R. Rodriguez wrote:
>> On Thu, Feb 2, 2012 at 8:08 AM, Goldenshtein, Victor <victorg@xxxxxx> wrote:
>> > On Tue, Jan 31, 2012 at 7:52 AM, Johannes Berg
>> > <johannes@xxxxxxxxxxxxxxxx> wrote:
>> >> On 1/26/2012 4:38 AM, Victor Goldenshtein wrote:
>> >>>
>> >>> +static int nl80211_put_feature_flags(struct wiphy *wiphy,
>> >>> +                                    struct sk_buff *msg)
>> >>> +{
>> >>> +       if (wiphy->flags&  WIPHY_FLAG_SUPPORTS_DFS)
>> >>>
>> >>> +               wiphy->features |= NL80211_FEATURE_DFS;
>> >>> +
>> >>> +
>> >>> +       NLA_PUT_U32(msg, NL80211_ATTR_FEATURE_FLAGS, wiphy->features);
>> >>> +
>> >>> +       return 0;
>> >>> +nla_put_failure:
>> >>> +       return -ENOBUFS;
>> >>> +}
>> >>
>> >>
>> >> I think you misunderstood the new feature flags -- they're supposed to be
>> >> set by the driver directly, not indirectly via wiphy->flags.
>> >>
>> >
>> > yep, I guess you're right.
>>
>> While a it, consider adding one for the requirement of sending the
>> channel switch announcement within mac80211, not the driver. In that
>> case, although a DFS feature may be available in the driver, DFS
>> should not be enabled on the driver through nl80211 unless that
>> feature gets implemented in mac80211.
>
> That, however, should be feature flag in mac80211, not cfg80211 (wiphy),
> and in fact I think it can probably be done by checking if the low-level
> function is there instead.
>
> johannes
>

Besides the NL80211_FEATURE_DFS, I'd prefer to add an additional flag
which will indicate current DFS state, as I wrote in one of my
previous emails:
Zefir Kurtisi and myself thought to rename the start_radar detection +
en_tx functions to something like dfs_start_cac() and
dfs_resume_cac(),
these two will set/reset WIPHY_FLAG_DFS_CAC_IN_PROGRESS flag, which
should add some additional protection.


-- 
Thanks,
Victor.
--
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