On Mon, 2014-01-20 at 15:09 +0100, Michal Kazior wrote: > + /* sanity check - make sure all wdevs in params[] are unique */ > + for (j = 0; j < num_params; j++) > + if (WARN_ON(i != j && params[i].wdev == params[j].wdev)) > + return -EINVAL; > + > + 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? > + used_iftypes |= BIT(params[i].iftype); > + num[params[i].iftype]++; > + > + 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? 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