On Fri, 2014-02-21 at 09:37 +0100, Johannes Berg wrote: > On Thu, 2014-02-20 at 16:36 +0200, Luciano Coelho wrote: > > > +/** > > + * cfg80211_check_combinations() - check interface combinations > > I don't think those parentheses are right? Right. Fixed. > > + * > > + * @wiphy: the wiphy > > + * @num_different_channels: the number of different channels we want > > + * to use for verification > > + * @num_interfaces: the number of different interfaces we want to use > > + * for verification > > + * @used_iftypes: a bitmap where each bit corresponds to an interface > > + * type, as in the definition of &struct > > + * ieee80211_iface_limit.@types. > > + * @radar_detect: a bitmap where each bit corresponds to a channel > > + * width where radar detection is needed, as in the definition of > > + * &struct ieee80211_iface_combination.@radar_detect_widths > > Doesn't that need to be something like hweight(radar_detect) == 1? No, at this point we should have already checked all the interfaces and pass the combination of radar widths required. > > + * @iftype_num: array with the numbers of interfaces of each interface > > + * type. The index is the interface type as specified in &enum > > + * nl80211_iftype. > > + * > > + * This function can be called by the driver to check whether a > > + * combination of interfaces and their types are allowed according to > > + * the interface combinations. > > + */ > > +int cfg80211_check_combinations(struct wiphy *wiphy, > > + const int num_different_channels, > > + const int num_interfaces, > > + const u32 used_iftypes, > > + const u8 radar_detect, > > + const int *iftype_num); > > I think that array should be const int iftype_num[NUM_NL80211_IFTYPES], > I'm pretty sure that works as a function argument as well and would > serve as a bit of documentation (and possibly even compiler warnings if > somebody has an array that's too short) Yep, sounds good. Fixed. -- Luca. -- 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