/* Find the channel frequency power info with specific channel.  */
struct chan_freq_power* lbs_find_cfp_by_band_and_channel(struct lbs_private *priv, u8 band, u16 channel)
/* Find the channel frequency power info with specific channel.  */
struct chan_freq_power* lbs_find_cfp_by_band_and_channel(struct lbs_private *priv, u8 band, u16 channel)
{
	struct chan_freq_power *cfp = NULL;
	struct region_channel *rc;
	int i, j;
	for (j = 0; !cfp && (j < ARRAY_SIZE(priv->region_channel)); j++) {
		rc = &priv->region_channel[j];
		if (!rc->valid || !rc->CFP)
			continue;
		if (rc->band != band)
			continue;
		for (i = 0; i < rc->nrcfp; i++) {
			if (rc->CFP[i].channel == channel) {
				cfp = &rc->CFP[i];
				break;
			}
		}
	}
	if (!cfp && channel)
		lbs_deb_wext("lbs_find_cfp_by_band_and_channel: can't find "
		       "cfp by band %d / channel %d\n", band, channel);
	return cfp;
}