software/drivers/sd8887/src/wlan/mlan/mlan_cfp.c
/**
 *  @brief Get if a channel is blacklisted or not
 *
 *  @param priv     Private driver information structure
 *  @param band     Band to check
 *  @param chan     Channel to check
 *
 *  @return
 *    - MTRUE if channel is blacklisted
 *    - MFALSE otherwise
 */
@brief Get if a channel is blacklisted or not
@param priv     Private driver information structure
@param band     Band to check
@param chan     Channel to check

@return
- MTRUE if channel is blacklisted
- MFALSE otherwise
@brief Get if a channel is blacklisted or not @param priv Private driver information structure @param band Band to check @param chan Channel to check @return - MTRUE if channel is blacklisted - MFALSE otherwise
t_bool
wlan_is_chan_blacklisted(mlan_private *priv, t_u8 band, t_u8 chan)
{
	int i, j;
	t_bool blacklist = MFALSE;
	chan_freq_power_t *pcfp = MNULL;
	ENTER();
	for (i = 0; i < MAX_REGION_CHANNEL_NUM; i++) {
		if (priv->adapter->region_channel[i].band & band) {
			pcfp = priv->adapter->region_channel[i].pcfp;
			break;
		}
	}
	if (pcfp) {
		for (j = 0; j < priv->adapter->region_channel[i].num_cfp; j++) {
			if (pcfp[j].channel == chan) {
				blacklist = pcfp[j].dynamic.blacklist;
				break;
			}
		}
	}
	LEAVE();
	return blacklist;
}
t_bool wlan_is_chan_blacklisted ( mlan_private * priv , t_u8 band , t_u8 chan ) { int i , j ; t_bool blacklist = MFALSE ; chan_freq_power_t * pcfp = MNULL ; ENTER ( ) ; for ( i = 0 ; i < MAX_REGION_CHANNEL_NUM ; i ++ ) { if ( priv -> adapter -> region_channel [ i ] . band & band ) { pcfp = priv -> adapter -> region_channel [ i ] . pcfp ; break ; } } if ( pcfp ) { for ( j = 0 ; j < priv -> adapter -> region_channel [ i ] . num_cfp ; j ++ ) { if ( pcfp [ j ] . channel == chan ) { blacklist = pcfp [ j ] . dynamic . blacklist ; break ; } } } LEAVE ( ) ; return blacklist ; }
@brief Get if a channel is blacklisted or not
  @param priv     Private driver information structure
  @param band     Band to check
  @param chan     Channel to check
@brief Get if a channel is blacklisted or not @param priv Private driver information structure @param band Band to check @param chan Channel to check
/*get the cfp table first */ /*check table according to chan num */