software/drivers/sd8887/src/wlan/mlan/mlan_11h.c
/**
 *  @brief Retrieve channel closed for operation by Channel Switch Announcement
 *
 *  After receiving CSA, we must not transmit in any form on the original
 *    channel for a certain duration.  This checks the time, and returns
 *    the channel if valid.
 *
 *  @param priv  Private driver information structure
 *
 *  @return      Closed channel, else 0
 */
@brief Retrieve channel closed for operation by Channel Switch Announcement
After receiving CSA, we must not transmit in any form on the original
channel for a certain duration.  This checks the time, and returns
the channel if valid.

@param priv  Private driver information structure

@return      Closed channel, else 0
@brief Retrieve channel closed for operation by Channel Switch Announcement After receiving CSA we must not transmit in any form on the original channel for a certain duration . This checks the time and returns the channel if valid . @param priv Private driver information structure @return Closed channel else 0
t_u8
wlan_11h_get_csa_closed_channel(mlan_private *priv)
{
	t_u32 sec, usec;
	ENTER();
	if (!priv->intf_state_11h.dfs_slave_csa_chan) {
		LEAVE();
		return 0;
	}
	priv->adapter->callbacks.moal_get_system_time(priv->adapter->
						      pmoal_handle, &sec,
						      &usec);
	if (sec > priv->intf_state_11h.dfs_slave_csa_expire_at_sec) {
		wlan_set_chan_blacklist(priv, BAND_A,
					priv->intf_state_11h.dfs_slave_csa_chan,
					MFALSE);
		priv->intf_state_11h.dfs_slave_csa_chan = 0;
		priv->intf_state_11h.dfs_slave_csa_expire_at_sec = 0;
	}
	LEAVE();
	return priv->intf_state_11h.dfs_slave_csa_chan;
}
t_u8 wlan_11h_get_csa_closed_channel ( mlan_private * priv ) { t_u32 sec , usec ; ENTER ( ) ; if ( ! priv -> intf_state_11h . dfs_slave_csa_chan ) { LEAVE ( ) ; return 0 ; } priv -> adapter -> callbacks . moal_get_system_time ( priv -> adapter -> pmoal_handle , & sec , & usec ) ; if ( sec > priv -> intf_state_11h . dfs_slave_csa_expire_at_sec ) { wlan_set_chan_blacklist ( priv , BAND_A , priv -> intf_state_11h . dfs_slave_csa_chan , MFALSE ) ; priv -> intf_state_11h . dfs_slave_csa_chan = 0 ; priv -> intf_state_11h . dfs_slave_csa_expire_at_sec = 0 ; } LEAVE ( ) ; return priv -> intf_state_11h . dfs_slave_csa_chan ; }
@brief Retrieve channel closed for operation by Channel Switch Announcement
  After receiving CSA, we must not transmit in any form on the original
    channel for a certain duration.
@brief Retrieve channel closed for operation by Channel Switch Announcement After receiving CSA we must not transmit in any form on the original channel for a certain duration .
/* have csa channel, check if expired or not */ /* expired:  remove channel from blacklist table, and clear vars */