Search Linux Wireless

Re: [RFC 2/9] mac80211: add radar detection command/event

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

 



On Tue, Jan 31, 2012 at 7:42 AM, Johannes Berg
<johannes@xxxxxxxxxxxxxxxx> wrote:
> This name is getting ridiculously long -- no need for the hw_ prefix either.
>

will remove it

>
>> +void ieee80211_radar_detected_notify(struct ieee80211_vif *vif,
>> +                                    u16 freq, gfp_t gfp);
>
>
> Btw, why not a channel pointer? Most APIs use that.
>

I can't find any use for other ieee80211_channel parameters, moreover
the freq parameter is also not required for single channel platforms
because the usermode knows his own operational channel. The freq is
here for future multi-channel DFS support.

>
>> +static int ieee80211_dfs_start_radar_detection(struct wiphy *wiphy,
>> +                                              struct net_device *dev)
>> +{
>> +       struct ieee80211_sub_if_data *sdata =
>> IEEE80211_DEV_TO_SUB_IF(dev);
>> +       struct ieee80211_local *local = sdata->local;
>> +       int ret = -ENOENT;
>
>
> ??? No need for a default value.
>

right, will remove it.

>
>> +       if (!local->ops->hw_dfs_start_radar_detection)
>> +               return -EOPNOTSUPP;
>> +
>> +       mutex_lock(&local->mtx);
>> +       ret = drv_dfs_en_radar_detection(local, sdata);
>> +       mutex_unlock(&local->mtx);
>
>
> Why even lock here? That's not protecting anything.
>

will remove it.


>
>> +static inline int drv_dfs_en_radar_detection(struct ieee80211_local
>> *local,
>> +                                        struct ieee80211_sub_if_data
>> *sdata)
>> +{
>> +       int ret;
>> +
>> +       might_sleep();
>> +
>> +       trace_drv_dfs_en_radar_detection(local, sdata);
>> +       ret =
>> local->ops->hw_dfs_start_radar_detection(&local->hw,&sdata->vif);
>
>
> trace_drv_ret_int()


will change the trace to trace_drv_return_int()


-- 
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 Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]
  Powered by Linux