> This is a bit weird -- this way you don't report errors if the > user specified frequencies that don't exist. The old code did this: Loop over all bands Loop over all channels Stick channel to scan request I simply added this: Loop over all bands Loop over all channels If scan-request hasn't this channel freq: continue Stick channel to scan request Now, if I want to report an -EINVAL for every possibly invalid scan-request channel, I'd have to do this: If scan-request has freqs: Loop over all scan-request freqs Loop over all bands Loop over all channels search for freq if found: Stick channel to scan request else: err = -EINVAL else: Loop over all bands Loop over all channels Stick channel to scan request This is considerable code-bloat for such a seldom-used function. I'd rather do it like this: Loop over all bands Loop over all channels If scan-request hasn't this channel freq: continue Stick channel to scan request if no channels: err = -EINVAL That's a compromise :-) -- http://www.holgerschurig.de -- 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