Search Linux Wireless

Re: [PATCH v3 2/7] mac80211: add radar detection command/event

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

 



On Mon, Sep 10, 2012 at 2:17 PM, Johannes Berg
<johannes@xxxxxxxxxxxxxxxx> wrote:
> On Wed, 2012-08-08 at 14:53 +0300, Victor Goldenshtein wrote:
>> Add command to trigger radar detection in the driver/FW.
>> Once radar detection is started it should continuously
>> monitor for radars as long as the channel active.
>> If radar is detected usermode notified with 'radar
>> detected' event.
>
>> +     if (!local->ops->start_radar_detection)
>> +             return -EOPNOTSUPP;
>> +
>> +     ret = drv_start_radar_detection(local, sdata, chan);
>> +     return ret;
>
> Remove the ret variable please.
>

ok.

>> +++ b/net/mac80211/iface.c
>> @@ -731,6 +731,13 @@ static void ieee80211_do_stop(struct ieee80211_sub_if_data *sdata,
>>               /* free all potentially still buffered bcast frames */
>>               local->total_ps_buffered -= skb_queue_len(&sdata->u.ap.ps_bc_buf);
>>               skb_queue_purge(&sdata->u.ap.ps_bc_buf);
>> +
>> +             /* reset DFS channel availability check */
>> +             if (local->oper_channel && sdata->wdev.preset_chan) {
>> +                     local->oper_channel->cac_type = 0;
>> +                     /* in case AP hasn't started yet */
>> +                     sdata->wdev.preset_chan->cac_type = 0;
>> +             }
>
> Why is mac80211 modifying cfg80211 fields? cfg80211 also uses this, no?
> This seems strange to me.
>
I will remove the "...preset_chan->cac_type = 0;" line.
We can reset the "preset_chan->cac_type" (or the new cac_started flag)
in __nl80211_set_channel().

>> +DEFINE_EVENT(local_sdata_evt, drv_start_radar_detection,
>> +     TP_PROTO(struct ieee80211_local *local,
>> +              struct ieee80211_sub_if_data *sdata),
>> +     TP_ARGS(local, sdata)
>> +);
>
> Umm, parameters?
>

will add here also the channel frequency.

-- 
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