Search Linux Wireless

Re: [PATCH 2/3] cfg80211: implement multi-vif interface combination validation

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

 



On Wed, 2014-01-22 at 07:11 +0100, Michal Kazior wrote:

> >> +             if (params[i].wdev && params[i].wdev->wiphy != &rdev->wiphy)
> >> +                     return -EINVAL;
> >
> > How could you ever have a param without a wdev? That seems like a bug as
> > well?
> 
> cfg80211_can_add_interface() calls with wdev == NULL.

Oh, right, sorry.

> >> +             err = cfg80211_is_radar_required(params[i].iftype,
> >> +                                              params[i].chan,
> >> +                                              params[i].chanmode,
> >> +                                              params[i].radar_detect_width);
> >> +             if (err < 0)
> >> +                     return err;
> >> +             else if (err && !params[i].radar_detect_width)
> >> +                     return -EINVAL;
> >
> > That's a bit confusing - why do you pass the radar_detect_width in, and
> > then check it again? Couldn't you just do all the checks in the
> > function, perhaps renamed a bit?
> 
> I can move this into the helper function. Any suggestions for the
> rename? cfg80211_validate_radar_params() and it would return a 0 or an
> errno?

Sounds good to me.

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