/* Converts channel frequency to channel number. Returns 0 if the frequency does not match any channel definition.  */
uint wf_freq2channel(uint freq)
/* Converts channel frequency to channel number. Returns 0 if the frequency does not match any channel definition.  */
uint wf_freq2channel(uint freq)
{
	uint i;
	for (i = 0; i < ARRAYSIZE(chan_info); i++) {
		if (chan_info[i].freq == freq)
			return (chan_info[i].chan);
	}
	return (0);
}