iw: parse_freqs: check how many center frequencies to expect

Instead of just plain assuming the next two integer arguments
are, if present, center frequencies, teach the code how many
are expected and check that they're actually present.

This makes it slightly better to use the parser before an int
argument, although it's still ambiguous due to the width.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
1 file changed