software/drivers/sd8887/src/wlan/mlan/mlan_11h.c
/**
 *  @brief Check if start channel 165 is allowed to operate in
 *  previous uAP channel's band config
 *
 *  @param pcfp          a pointer to chan_freq_power_t structure
 *  @param Band_cfg      Private driver uAP band configuration information structure
 *
 *  @return MFALSE if the channel is not allowed in given band
 */
@brief Check if start channel 165 is allowed to operate in
previous uAP channel's band config

@param pcfp          a pointer to chan_freq_power_t structure
@param Band_cfg      Private driver uAP band configuration information structure

@return MFALSE if the channel is not allowed in given band
@brief Check if start channel 165 is allowed to operate in previous uAP channel ' s band config @param pcfp a pointer to chan_freq_power_t structure @param Band_cfg Private driver uAP band configuration information structure @return MFALSE if the channel is not allowed in given band
static t_bool
wlan_11h_is_chan_band_valid(chan_freq_power_t *pcfp, Band_Config_t bandcfg)
{
	t_u8 start_ch = pcfp->channel;
	t_bool ret = MTRUE;
	if (pcfp->dynamic.flags & NXP_CHANNEL_DISABLED)
		return MFALSE;
	if (start_ch == 165 && (bandcfg.chanWidth != CHAN_BW_20MHZ))
		return MFALSE;
	switch (bandcfg.chanWidth) {
	case CHAN_BW_80MHZ:
		if (pcfp->dynamic.flags & NXP_CHANNEL_NOHT80)
			ret = MFALSE;
		break;
	case CHAN_BW_40MHZ:
		if (pcfp->dynamic.flags & NXP_CHANNEL_NOHT40)
			ret = MFALSE;
		break;
	default:
		break;
	}
	return ret;
}
static t_bool wlan_11h_is_chan_band_valid ( chan_freq_power_t * pcfp , Band_Config_t bandcfg ) { t_u8 start_ch = pcfp -> channel ; t_bool ret = MTRUE ; if ( pcfp -> dynamic . flags & NXP_CHANNEL_DISABLED ) return MFALSE ; if ( start_ch == 165 && ( bandcfg . chanWidth != CHAN_BW_20MHZ ) ) return MFALSE ; switch ( bandcfg . chanWidth ) { case CHAN_BW_80MHZ : if ( pcfp -> dynamic . flags & NXP_CHANNEL_NOHT80 ) ret = MFALSE ; break ; case CHAN_BW_40MHZ : if ( pcfp -> dynamic . flags & NXP_CHANNEL_NOHT40 ) ret = MFALSE ; break ; default : break ; } return ret ; }
@brief Check if start channel 165 is allowed to operate in
  previous uAP channel's band config
@brief Check if start channel 165 is allowed to operate in previous uAP channel ' s band config
/* if band width is not 20MHZ (either 40 or 80MHz)
	 * return MFALSE, 165 is not allowed in bands other than 20MHZ
	 */