software/drivers/sd8887/src/wlan/mlan/mlan_11h.c
/**
 *  @brief Return whether the master interface is active, and on DFS channel.
 *  priv is assumed to already be a dfs master interface, doesn't check this.
 *
 *  @param priv  Private driver information structure
 *
 *  @return
 *    - MTRUE if priv is master, and meets both conditions
 *    - MFALSE otherwise
 */
@brief Return whether the master interface is active, and on DFS channel.
priv is assumed to already be a dfs master interface, doesn't check this.

@param priv  Private driver information structure

@return
- MTRUE if priv is master, and meets both conditions
- MFALSE otherwise
@brief Return whether the master interface is active and on DFS channel . priv is assumed to already be a dfs master interface doesn ' t check this . @param priv Private driver information structure @return - MTRUE if priv is master and meets both conditions - MFALSE otherwise
static t_bool
wlan_11h_is_master_active_on_dfs_chan(mlan_private *priv)
{
	t_bool ret = MFALSE;
	ENTER();
	if (GET_BSS_ROLE(priv) == MLAN_BSS_ROLE_STA) {
		if (((priv->media_connected == MTRUE)
		     || (priv->adhoc_state == ADHOC_STARTING)) &&
		    (priv->adapter->adhoc_start_band & BAND_A) &&
		    wlan_11h_radar_detect_required(priv, priv->adhoc_channel))
			ret = MTRUE;
	} else if (GET_BSS_ROLE(priv) == MLAN_BSS_ROLE_UAP) {
#ifdef UAP_SUPPORT
		if ((priv->uap_bss_started == MTRUE) &&
		    (priv->uap_state_chan_cb.bandcfg.chanBand == BAND_5GHZ) &&
		    wlan_11h_radar_detect_required(priv,
						   priv->uap_state_chan_cb.
						   channel))
			ret = MTRUE;
#endif
	}
	LEAVE();
	return ret;
}
static t_bool wlan_11h_is_master_active_on_dfs_chan ( mlan_private * priv ) { t_bool ret = MFALSE ; ENTER ( ) ; if ( GET_BSS_ROLE ( priv ) == MLAN_BSS_ROLE_STA ) { if ( ( ( priv -> media_connected == MTRUE ) || ( priv -> adhoc_state == ADHOC_STARTING ) ) && ( priv -> adapter -> adhoc_start_band & BAND_A ) && wlan_11h_radar_detect_required ( priv , priv -> adhoc_channel ) ) ret = MTRUE ; } else if ( GET_BSS_ROLE ( priv ) == MLAN_BSS_ROLE_UAP ) { #ifdef UAP_SUPPORT if ( ( priv -> uap_bss_started == MTRUE ) && ( priv -> uap_state_chan_cb . bandcfg . chanBand == BAND_5GHZ ) && wlan_11h_radar_detect_required ( priv , priv -> uap_state_chan_cb . channel ) ) ret = MTRUE ; #endif } LEAVE ( ) ; return ret ; }
@brief Return whether the master interface is active, and on DFS channel.
@brief Return whether the master interface is active and on DFS channel .
/* Ad-hoc creator */ /* UAP */