software/drivers/sd8887/src/wlan/mlan/mlan_11h.c
/**
 *  @brief Initialize the 11h parameters and enable 11h when starting an IBSS
 *
 *  @param adapter mlan_adapter structure
 *
 *  @return      N/A
 */
@brief Initialize the 11h parameters and enable 11h when starting an IBSS
@param adapter mlan_adapter structure

@return      N/A
@brief Initialize the 11h parameters and enable 11h when starting an IBSS @param adapter mlan_adapter structure @return N / A
t_void
wlan_11h_init(mlan_adapter *adapter)
{
	wlan_11h_device_state_t *pstate_11h = &adapter->state_11h;
	IEEEtypes_Quiet_t *pquiet = &adapter->state_11h.quiet_ie;
	wlan_dfs_device_state_t *pstate_dfs = &adapter->state_dfs;
	wlan_radar_det_hndlg_state_t *pstate_rdh = &adapter->state_rdh;
#ifdef DFS_TESTING_SUPPORT
	wlan_dfs_testing_settings_t *pdfs_test = &adapter->dfs_test_params;
#endif
	ENTER();
	pstate_11h->usr_def_power_constraint = WLAN_11H_TPC_POWERCONSTRAINT;
	pstate_11h->min_tx_power_capability = WLAN_11H_TPC_POWERCAPABILITY_MIN;
	pstate_11h->max_tx_power_capability = WLAN_11H_TPC_POWERCAPABILITY_MAX;
	pstate_11h->recvd_chanswann_event = MFALSE;
	pstate_11h->master_radar_det_enable_pending = MFALSE;
	pstate_11h->slave_radar_det_enable_pending = MFALSE;
	pstate_11h->is_master_radar_det_active = MFALSE;
	pstate_11h->is_slave_radar_det_active = MFALSE;
	memset(adapter, pquiet, 0, sizeof(IEEEtypes_Quiet_t));
	pquiet->element_id = QUIET;
	pquiet->len =
		(sizeof(pquiet->quiet_count) + sizeof(pquiet->quiet_period)
		 + sizeof(pquiet->quiet_duration)
		 + sizeof(pquiet->quiet_offset));
	pstate_dfs->dfs_check_pending = MFALSE;
	pstate_dfs->dfs_radar_found = MFALSE;
	pstate_dfs->dfs_check_channel = 0;
	pstate_dfs->dfs_report_time_sec = 0;
	util_init_list((pmlan_linked_list)&pstate_dfs->dfs_ts_head);
	pstate_rdh->stage = RDH_OFF;
	pstate_rdh->priv_list_count = 0;
	pstate_rdh->priv_curr_idx = 0;
	pstate_rdh->curr_channel = 0;
	pstate_rdh->new_channel = 0;
	memset(adapter, &(pstate_rdh->uap_band_cfg), 0,
	       sizeof(pstate_rdh->uap_band_cfg));
	pstate_rdh->max_bcn_dtim_ms = 0;
	memset(adapter, pstate_rdh->priv_list, 0,
	       sizeof(pstate_rdh->priv_list));
#define DFS_CS_COUNT 5
	adapter->dfs_cs_count = DFS_CS_COUNT;
#ifdef DFS_TESTING_SUPPORT
	pdfs_test->user_cac_period_msec = 0;
	pdfs_test->user_nop_period_sec = 0;
	pdfs_test->no_channel_change_on_radar = MFALSE;
	pdfs_test->fixed_new_channel_on_radar = 0;
#endif
	LEAVE();
}
t_void wlan_11h_init ( mlan_adapter * adapter ) { wlan_11h_device_state_t * pstate_11h = & adapter -> state_11h ; IEEEtypes_Quiet_t * pquiet = & adapter -> state_11h . quiet_ie ; wlan_dfs_device_state_t * pstate_dfs = & adapter -> state_dfs ; wlan_radar_det_hndlg_state_t * pstate_rdh = & adapter -> state_rdh ; #ifdef DFS_TESTING_SUPPORT wlan_dfs_testing_settings_t * pdfs_test = & adapter -> dfs_test_params ; #endif ENTER ( ) ; pstate_11h -> usr_def_power_constraint = WLAN_11H_TPC_POWERCONSTRAINT ; pstate_11h -> min_tx_power_capability = WLAN_11H_TPC_POWERCAPABILITY_MIN ; pstate_11h -> max_tx_power_capability = WLAN_11H_TPC_POWERCAPABILITY_MAX ; pstate_11h -> recvd_chanswann_event = MFALSE ; pstate_11h -> master_radar_det_enable_pending = MFALSE ; pstate_11h -> slave_radar_det_enable_pending = MFALSE ; pstate_11h -> is_master_radar_det_active = MFALSE ; pstate_11h -> is_slave_radar_det_active = MFALSE ; memset ( adapter , pquiet , 0 , sizeof ( IEEEtypes_Quiet_t ) ) ; pquiet -> element_id = QUIET ; pquiet -> len = ( sizeof ( pquiet -> quiet_count ) + sizeof ( pquiet -> quiet_period ) + sizeof ( pquiet -> quiet_duration ) + sizeof ( pquiet -> quiet_offset ) ) ; pstate_dfs -> dfs_check_pending = MFALSE ; pstate_dfs -> dfs_radar_found = MFALSE ; pstate_dfs -> dfs_check_channel = 0 ; pstate_dfs -> dfs_report_time_sec = 0 ; util_init_list ( ( pmlan_linked_list ) & pstate_dfs -> dfs_ts_head ) ; pstate_rdh -> stage = RDH_OFF ; pstate_rdh -> priv_list_count = 0 ; pstate_rdh -> priv_curr_idx = 0 ; pstate_rdh -> curr_channel = 0 ; pstate_rdh -> new_channel = 0 ; memset ( adapter , & ( pstate_rdh -> uap_band_cfg ) , 0 , sizeof ( pstate_rdh -> uap_band_cfg ) ) ; pstate_rdh -> max_bcn_dtim_ms = 0 ; memset ( adapter , pstate_rdh -> priv_list , 0 , sizeof ( pstate_rdh -> priv_list ) ) ; #define DFS_CS_COUNT  5 adapter -> dfs_cs_count = DFS_CS_COUNT ; #ifdef DFS_TESTING_SUPPORT pdfs_test -> user_cac_period_msec = 0 ; pdfs_test -> user_nop_period_sec = 0 ; pdfs_test -> no_channel_change_on_radar = MFALSE ; pdfs_test -> fixed_new_channel_on_radar = 0 ; #endif LEAVE ( ) ; }
@brief Initialize the 11h parameters and enable 11h when starting an IBSS
  @param adapter mlan_adapter structure
@brief Initialize the 11h parameters and enable 11h when starting an IBSS @param adapter mlan_adapter structure
/* Initialize 11H struct */ /*Initialize quiet_ie */ /* Initialize DFS struct */ /* Initialize RDH struct */ /* Initialize dfs channel switch count */ /* Initialize DFS testing struct */