mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-09 13:49:24 -04:00
qcacld-3.0: clean up the WLAN_FEATURE_MBSSID flag (phase 1)
WLAN_FEATURE_MBSSID flag is originally added to support MBSSID, specifically for the MOBILE ROUTER build, and is now enabled for all builds, there is no longer needed to have a separate feature flag, so that removing it. This commit cleans up the following modules - cds/mac/sap/sme. Change-Id: I79ad9767b7945af0c567b6294ac07e7697898e9e CRs-fixed: 958154
This commit is contained in:
parent
3cc29cbc23
commit
4252a2fc6f
12 changed files with 44 additions and 280 deletions
|
|
@ -648,16 +648,7 @@ bool cds_max_concurrent_connections_reached(void);
|
|||
void cds_clear_concurrent_session_count(void);
|
||||
bool cds_is_multiple_active_sta_sessions(void);
|
||||
bool cds_is_sta_active_connection_exists(void);
|
||||
|
||||
#ifdef WLAN_FEATURE_MBSSID
|
||||
bool cds_concurrent_beaconing_sessions_running(void);
|
||||
#else
|
||||
static inline bool cds_concurrent_beaconing_sessions_running(void)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
#endif
|
||||
|
||||
CDF_STATUS cdf_wait_for_connection_update(void);
|
||||
CDF_STATUS cdf_reset_connection_update(void);
|
||||
CDF_STATUS cdf_set_connection_update(void);
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 2014-2016 The Linux Foundation. All rights reserved.
|
||||
* Copyright (c) 2012-2016 The Linux Foundation. All rights reserved.
|
||||
*
|
||||
* Previously licensed under the ISC license by Qualcomm Atheros, Inc.
|
||||
*
|
||||
|
|
@ -250,11 +250,6 @@ typedef struct _cds_context_type {
|
|||
/* MAC Module Context */
|
||||
void *pMACContext;
|
||||
|
||||
#ifndef WLAN_FEATURE_MBSSID
|
||||
/* SAP Context */
|
||||
void *pSAPContext;
|
||||
#endif
|
||||
|
||||
cdf_event_t ProbeEvent;
|
||||
|
||||
uint32_t driver_state;
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 2014-2016 The Linux Foundation. All rights reserved.
|
||||
* Copyright (c) 2012-2016 The Linux Foundation. All rights reserved.
|
||||
*
|
||||
* Previously licensed under the ISC license by Qualcomm Atheros, Inc.
|
||||
*
|
||||
|
|
@ -863,14 +863,6 @@ void *cds_get_context(CDF_MODULE_ID moduleId)
|
|||
}
|
||||
|
||||
switch (moduleId) {
|
||||
#ifndef WLAN_FEATURE_MBSSID
|
||||
case CDF_MODULE_ID_SAP:
|
||||
{
|
||||
pModContext = gp_cds_context->pSAPContext;
|
||||
break;
|
||||
}
|
||||
#endif
|
||||
|
||||
case CDF_MODULE_ID_HDD:
|
||||
{
|
||||
pModContext = gp_cds_context->pHDDContext;
|
||||
|
|
@ -1064,15 +1056,6 @@ CDF_STATUS cds_alloc_context(void *p_cds_context, CDF_MODULE_ID moduleID,
|
|||
}
|
||||
|
||||
switch (moduleID) {
|
||||
|
||||
#ifndef WLAN_FEATURE_MBSSID
|
||||
case CDF_MODULE_ID_SAP:
|
||||
{
|
||||
pGpModContext = &(gp_cds_context->pSAPContext);
|
||||
break;
|
||||
}
|
||||
#endif
|
||||
|
||||
case CDF_MODULE_ID_WMA:
|
||||
{
|
||||
pGpModContext = &(gp_cds_context->pWMAContext);
|
||||
|
|
@ -1160,14 +1143,6 @@ CDF_STATUS cds_free_context(void *p_cds_context, CDF_MODULE_ID moduleID,
|
|||
}
|
||||
|
||||
switch (moduleID) {
|
||||
#ifndef WLAN_FEATURE_MBSSID
|
||||
case CDF_MODULE_ID_SAP:
|
||||
{
|
||||
pGpModContext = &(gp_cds_context->pSAPContext);
|
||||
break;
|
||||
}
|
||||
#endif
|
||||
|
||||
case CDF_MODULE_ID_WMA:
|
||||
{
|
||||
pGpModContext = &(gp_cds_context->pWMAContext);
|
||||
|
|
|
|||
|
|
@ -6633,11 +6633,8 @@ static void cds_check_sta_ap_concurrent_ch_intf(void *data)
|
|||
if (hal_handle == NULL)
|
||||
return;
|
||||
|
||||
#ifdef WLAN_FEATURE_MBSSID
|
||||
intf_ch = wlansap_check_cc_intf(hdd_ap_ctx->sapContext);
|
||||
#else
|
||||
intf_ch = wlansap_check_cc_intf(hdd_ctx->pcds_context);
|
||||
#endif
|
||||
|
||||
if (intf_ch == 0)
|
||||
return;
|
||||
|
||||
|
|
@ -7177,9 +7174,7 @@ void cds_set_mcc_latency(hdd_adapter_t *adapter, int set_value)
|
|||
#if defined(FEATURE_WLAN_MCC_TO_SCC_SWITCH) || \
|
||||
defined(FEATURE_WLAN_STA_AP_MODE_DFS_DISABLE)
|
||||
/**
|
||||
* cds_restart_sap() - This function is used to restart SAP in
|
||||
* driver internally
|
||||
*
|
||||
* cds_restart_sap() - to restart SAP in driver internally
|
||||
* @ap_adapter: Pointer to SAP hdd_adapter_t structure
|
||||
*
|
||||
* Return: None
|
||||
|
|
@ -7194,9 +7189,11 @@ void cds_restart_sap(hdd_adapter_t *ap_adapter)
|
|||
struct tagCsrDelStaParams delStaParams;
|
||||
#endif
|
||||
tsap_Config_t *sap_config;
|
||||
void *sap_ctx;
|
||||
|
||||
hdd_ap_ctx = WLAN_HDD_GET_AP_CTX_PTR(ap_adapter);
|
||||
sap_config = &ap_adapter->sessionCtx.ap.sapConfig;
|
||||
sap_config = &hdd_ap_ctx.sapConfig;
|
||||
sap_ctx = hdd_ap_ctx->sapContext;
|
||||
|
||||
mutex_lock(&hdd_ctx->sap_lock);
|
||||
if (test_bit(SOFTAP_BSS_STARTED, &ap_adapter->event_flags)) {
|
||||
|
|
@ -7214,13 +7211,7 @@ void cds_restart_sap(hdd_adapter_t *ap_adapter)
|
|||
hdd_cleanup_actionframe(hdd_ctx, ap_adapter);
|
||||
hostapd_state = WLAN_HDD_GET_HOSTAP_STATE_PTR(ap_adapter);
|
||||
cdf_event_reset(&hostapd_state->cdf_stop_bss_event);
|
||||
if (CDF_STATUS_SUCCESS == wlansap_stop_bss(
|
||||
#ifdef WLAN_FEATURE_MBSSID
|
||||
hdd_ap_ctx->sapContext
|
||||
#else
|
||||
hdd_ctx->pcds_context
|
||||
#endif
|
||||
)) {
|
||||
if (CDF_STATUS_SUCCESS == wlansap_stop_bss(sap_ctx)) {
|
||||
cdf_status =
|
||||
cdf_wait_single_event(&hostapd_state->
|
||||
cdf_stop_bss_event,
|
||||
|
|
@ -7243,16 +7234,9 @@ void cds_restart_sap(hdd_adapter_t *ap_adapter)
|
|||
goto end;
|
||||
}
|
||||
|
||||
if (wlansap_start_bss(
|
||||
#ifdef WLAN_FEATURE_MBSSID
|
||||
hdd_ap_ctx->sapContext,
|
||||
#else
|
||||
hdd_ctx->pcds_context,
|
||||
#endif
|
||||
hdd_hostapd_sap_event_cb,
|
||||
&hdd_ap_ctx->sapConfig,
|
||||
ap_adapter->dev) !=
|
||||
CDF_STATUS_SUCCESS) {
|
||||
if (wlansap_start_bss(sap_ctx, hdd_hostapd_sap_event_cb,
|
||||
sap_config,
|
||||
ap_adapter->dev) != CDF_STATUS_SUCCESS) {
|
||||
cds_err("SAP Start Bss fail");
|
||||
goto end;
|
||||
}
|
||||
|
|
@ -7544,7 +7528,6 @@ bool cds_concurrent_open_sessions_running(void)
|
|||
return j > 1;
|
||||
}
|
||||
|
||||
#ifdef WLAN_FEATURE_MBSSID
|
||||
/**
|
||||
* cds_concurrent_beaconing_sessions_running() - Checks for concurrent beaconing
|
||||
* entities
|
||||
|
|
@ -7567,7 +7550,7 @@ bool cds_concurrent_beaconing_sessions_running(void)
|
|||
}
|
||||
return i > 1;
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
/**
|
||||
* cds_max_concurrent_connections_reached() - Check if max conccurrency is
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 2012-2015 The Linux Foundation. All rights reserved.
|
||||
* Copyright (c) 2012-2016 The Linux Foundation. All rights reserved.
|
||||
*
|
||||
* Previously licensed under the ISC license by Qualcomm Atheros, Inc.
|
||||
*
|
||||
|
|
@ -848,11 +848,10 @@ static void __sch_beacon_process_for_session(tpAniSirGlobal mac_ctx,
|
|||
|
||||
/**
|
||||
* sch_beacon_process() - process the beacon frame
|
||||
*
|
||||
* @mac_ctx: mac global context
|
||||
* @rx_pkt_info: pointer to buffer descriptor
|
||||
*
|
||||
* @return None
|
||||
* Return: None
|
||||
*/
|
||||
void
|
||||
sch_beacon_process(tpAniSirGlobal mac_ctx, uint8_t *rx_pkt_info,
|
||||
|
|
@ -861,9 +860,7 @@ sch_beacon_process(tpAniSirGlobal mac_ctx, uint8_t *rx_pkt_info,
|
|||
static tSchBeaconStruct bcn;
|
||||
tUpdateBeaconParams bcn_prm;
|
||||
tpPESession ap_session = NULL;
|
||||
#ifdef WLAN_FEATURE_MBSSID
|
||||
uint8_t i;
|
||||
#endif
|
||||
|
||||
cdf_mem_zero(&bcn_prm, sizeof(tUpdateBeaconParams));
|
||||
bcn_prm.paramChangeBitmap = 0;
|
||||
|
|
@ -889,7 +886,6 @@ sch_beacon_process(tpAniSirGlobal mac_ctx, uint8_t *rx_pkt_info,
|
|||
* on another concurrent link. In this case also, we want to apply the
|
||||
* protection settings(as advertised by Infra AP) to BTAP beacons
|
||||
*/
|
||||
#ifdef WLAN_FEATURE_MBSSID
|
||||
for (i = 0; i < mac_ctx->lim.maxBssId; i++) {
|
||||
ap_session = pe_find_session_by_session_id(mac_ctx, i);
|
||||
if (!((ap_session != NULL) &&
|
||||
|
|
@ -918,30 +914,7 @@ sch_beacon_process(tpAniSirGlobal mac_ctx, uint8_t *rx_pkt_info,
|
|||
lim_send_beacon_params(mac_ctx, &bcn_prm, ap_session);
|
||||
}
|
||||
}
|
||||
#else
|
||||
ap_session = lim_is_ap_session_active(mac_ctx);
|
||||
if ((ap_session != NULL)
|
||||
&& (!(WMA_GET_OFFLOADSCANLEARN(rx_pkt_info)))) {
|
||||
bcn_prm.bssIdx = ap_session->bssIdx;
|
||||
if (ap_session->gLimProtectionControl !=
|
||||
WNI_CFG_FORCE_POLICY_PROTECTION_DISABLE)
|
||||
ap_beacon_process(mac_ctx, rx_pkt_info, &bcn,
|
||||
&bcn_prm, ap_session);
|
||||
|
||||
if ((false == mac_ctx->sap.SapDfsInfo.is_dfs_cac_timer_running)
|
||||
&& bcn_prm.paramChangeBitmap) {
|
||||
/* Update the bcn and apply the new settings to HAL */
|
||||
sch_set_fixed_beacon_fields(mac_ctx, ap_session);
|
||||
PELOG1(sch_log(mac_ctx, LOG1,
|
||||
FL("Beacon for PE session[%d] got changed."),
|
||||
ap_session->peSessionId);)
|
||||
PELOG1(sch_log(mac_ctx, LOG1,
|
||||
FL("sending beacon param change bitmap: 0x%x "),
|
||||
bcn_prm.paramChangeBitmap);)
|
||||
lim_send_beacon_params(mac_ctx, &bcn_prm, ap_session);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
/*
|
||||
* Now process the beacon in the context of the BSS which is
|
||||
* transmitting the beacons, if one is found
|
||||
|
|
|
|||
|
|
@ -69,11 +69,7 @@ extern "C" {
|
|||
#define MAX_TEXT_SIZE 32
|
||||
|
||||
#define MAX_CHANNEL_LIST_LEN 256
|
||||
#ifdef WLAN_FEATURE_MBSSID
|
||||
#define CDF_MAX_NO_OF_SAP_MODE 2 /* max # of SAP */
|
||||
#else
|
||||
#define CDF_MAX_NO_OF_SAP_MODE 1 /* max # of SAP */
|
||||
#endif
|
||||
#define SAP_MAX_NUM_SESSION 5
|
||||
#define SAP_MAX_OBSS_STA_CNT 1 /* max # of OBSS STA */
|
||||
#define SAP_ACS_WEIGHT_MAX (4444)
|
||||
|
|
@ -803,23 +799,14 @@ typedef struct {
|
|||
bool isSafe;
|
||||
} sapSafeChannelType;
|
||||
#endif /* FEATURE_WLAN_CH_AVOID */
|
||||
#ifdef WLAN_FEATURE_MBSSID
|
||||
void sap_cleanup_channel_list(void *sapContext);
|
||||
#else
|
||||
void sap_cleanup_channel_list(void);
|
||||
#endif
|
||||
void sapCleanupAllChannelList(void);
|
||||
CDF_STATUS wlansap_set_wps_ie(void *p_cds_gctx, tSap_WPSIE *pWPSIe);
|
||||
CDF_STATUS wlansap_update_wps_ie(void *p_cds_gctx);
|
||||
CDF_STATUS wlansap_stop_Wps(void *p_cds_gctx);
|
||||
CDF_STATUS wlansap_get_wps_state(void *p_cds_gctx, bool *pbWPSState);
|
||||
|
||||
#ifdef WLAN_FEATURE_MBSSID
|
||||
void *
|
||||
#else
|
||||
CDF_STATUS
|
||||
#endif
|
||||
wlansap_open(void *p_cds_gctx);
|
||||
void *wlansap_open(void *p_cds_gctx);
|
||||
CDF_STATUS wlansap_start(void *p_cds_gctx);
|
||||
CDF_STATUS wlansap_stop(void *p_cds_gctx);
|
||||
CDF_STATUS wlansap_close(void *p_cds_gctx);
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 2012-2015 The Linux Foundation. All rights reserved.
|
||||
* Copyright (c) 2012-2016 The Linux Foundation. All rights reserved.
|
||||
*
|
||||
* Previously licensed under the ISC license by Qualcomm Atheros, Inc.
|
||||
*
|
||||
|
|
@ -434,8 +434,7 @@ void sap_update_unsafe_channel_list(ptSapContext pSapCtx)
|
|||
}
|
||||
|
||||
/* Try to find unsafe channel */
|
||||
#if defined(FEATURE_WLAN_STA_AP_MODE_DFS_DISABLE) || \
|
||||
defined(WLAN_FEATURE_MBSSID)
|
||||
#if defined(FEATURE_WLAN_STA_AP_MODE_DFS_DISABLE)
|
||||
for (i = 0; i < NUM_20MHZ_RF_CHANNELS; i++) {
|
||||
if (pSapCtx->dfs_ch_disable == true) {
|
||||
if (CDS_IS_DFS_CH(safe_channels[i].channelNumber)) {
|
||||
|
|
@ -501,16 +500,8 @@ void sap_update_unsafe_channel_list(ptSapContext pSapCtx)
|
|||
NULL
|
||||
============================================================================*/
|
||||
|
||||
void sap_cleanup_channel_list(
|
||||
#ifdef WLAN_FEATURE_MBSSID
|
||||
void *p_cds_gctx
|
||||
#else
|
||||
void
|
||||
#endif
|
||||
) {
|
||||
#ifndef WLAN_FEATURE_MBSSID
|
||||
void *p_cds_gctx = cds_get_global_context();
|
||||
#endif
|
||||
void sap_cleanup_channel_list(void *p_cds_gctx)
|
||||
{
|
||||
ptSapContext pSapCtx;
|
||||
|
||||
CDF_TRACE(CDF_MODULE_ID_SAP, CDF_TRACE_LEVEL_INFO,
|
||||
|
|
@ -647,7 +638,7 @@ bool sap_chan_sel_init(tHalHandle halHandle,
|
|||
|
||||
pChans = pMac->scan.base_channels.channelList;
|
||||
|
||||
#if defined(FEATURE_WLAN_STA_AP_MODE_DFS_DISABLE) || defined(WLAN_FEATURE_MBSSID)
|
||||
#if defined(FEATURE_WLAN_STA_AP_MODE_DFS_DISABLE)
|
||||
if (pSapCtx->dfs_ch_disable == true)
|
||||
include_dfs_ch = false;
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -1981,11 +1981,11 @@ CDF_STATUS sap_goto_channel_sel(ptSapContext sap_context,
|
|||
FL("invalid h_hal"));
|
||||
return CDF_STATUS_E_FAULT;
|
||||
}
|
||||
#ifdef WLAN_FEATURE_MBSSID
|
||||
|
||||
if (cds_concurrent_beaconing_sessions_running()) {
|
||||
con_ch =
|
||||
sme_get_concurrent_operation_channel(h_hal);
|
||||
|
||||
#ifdef FEATURE_WLAN_STA_AP_MODE_DFS_DISABLE
|
||||
if (con_ch && sap_context->channel == AUTO_CHANNEL_SELECT) {
|
||||
sap_context->dfs_ch_disable = true;
|
||||
} else if (con_ch && sap_context->channel != con_ch &&
|
||||
|
|
@ -1994,6 +1994,7 @@ CDF_STATUS sap_goto_channel_sel(ptSapContext sap_context,
|
|||
FL("MCC DFS not supported in AP_AP Mode"));
|
||||
return CDF_STATUS_E_ABORTED;
|
||||
}
|
||||
#endif
|
||||
#ifdef FEATURE_WLAN_MCC_TO_SCC_SWITCH
|
||||
if (sap_context->cc_switch_mode !=
|
||||
CDF_MCC_TO_SCC_SWITCH_DISABLE) {
|
||||
|
|
@ -2011,7 +2012,6 @@ CDF_STATUS sap_goto_channel_sel(ptSapContext sap_context,
|
|||
}
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
|
||||
if (cds_get_concurrency_mode() == (CDF_STA_MASK | CDF_SAP_MASK)) {
|
||||
#ifdef FEATURE_WLAN_STA_AP_MODE_DFS_DISABLE
|
||||
|
|
@ -3251,7 +3251,6 @@ static CDF_STATUS sap_fsm_state_ch_select(ptSapContext sap_ctx,
|
|||
eCSR_DOT11_MODE_11g_ONLY))
|
||||
sap_ctx->csr_roamProfile.phyMode = eCSR_DOT11_MODE_11a;
|
||||
|
||||
#ifdef WLAN_FEATURE_MBSSID
|
||||
/*
|
||||
* when AP2 is started while AP1 is performing ACS, we may not
|
||||
* have the AP1 channel yet.So here after the completion of AP2
|
||||
|
|
@ -3265,7 +3264,7 @@ static CDF_STATUS sap_fsm_state_ch_select(ptSapContext sap_ctx,
|
|||
if (con_ch && CDS_IS_DFS_CH(con_ch))
|
||||
sap_ctx->channel = con_ch;
|
||||
}
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Transition from eSAP_CH_SELECT to eSAP_STARTING
|
||||
* (both without substates)
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 2012-2015 The Linux Foundation. All rights reserved.
|
||||
* Copyright (c) 2012-2016 The Linux Foundation. All rights reserved.
|
||||
*
|
||||
* Previously licensed under the ISC license by Qualcomm Atheros, Inc.
|
||||
*
|
||||
|
|
@ -58,13 +58,9 @@ extern "C" {
|
|||
#define SAP_DEBUG
|
||||
/* Used to enable or disable security on the BT-AMP link */
|
||||
#define WLANSAP_SECURITY_ENABLED_STATE true
|
||||
#ifdef WLAN_FEATURE_MBSSID
|
||||
|
||||
/* When MBSSID feature is enabled, SAP context is directly passed to SAP APIs */
|
||||
#define CDS_GET_SAP_CB(ctx) (ptSapContext)(ctx)
|
||||
#else
|
||||
/* How do I get SAP context from cds context? */
|
||||
#define CDS_GET_SAP_CB(ctx) cds_get_context(CDF_MODULE_ID_SAP)
|
||||
#endif
|
||||
|
||||
#define CDS_GET_HAL_CB(ctx) cds_get_context(CDF_MODULE_ID_PE)
|
||||
/* MAC Address length */
|
||||
|
|
@ -239,8 +235,7 @@ typedef struct sSapContext {
|
|||
uint8_t cc_switch_mode;
|
||||
#endif
|
||||
|
||||
#if defined(FEATURE_WLAN_STA_AP_MODE_DFS_DISABLE) || \
|
||||
defined(WLAN_FEATURE_MBSSID)
|
||||
#if defined(FEATURE_WLAN_STA_AP_MODE_DFS_DISABLE)
|
||||
bool dfs_ch_disable;
|
||||
#endif
|
||||
bool isCacEndNotified;
|
||||
|
|
|
|||
|
|
@ -99,54 +99,22 @@ ptSapContext gp_sap_ctx;
|
|||
* all its internal resources and will wait for the call to start to
|
||||
* register with the other modules.
|
||||
*
|
||||
* Return: The result code associated with performing the operation
|
||||
*
|
||||
* #ifdef WLAN_FEATURE_MBSSID
|
||||
* void *: Pointer to the SAP context
|
||||
* #else
|
||||
* CDF_STATUS_E_FAULT: Pointer to SAP cb is NULL ;
|
||||
* access would cause a page fault
|
||||
* CDF_STATUS_SUCCESS: Success
|
||||
* #endif
|
||||
* Return: Pointer to the SAP context
|
||||
*/
|
||||
#ifdef WLAN_FEATURE_MBSSID
|
||||
void *
|
||||
#else
|
||||
CDF_STATUS
|
||||
#endif
|
||||
wlansap_open(void *p_cds_gctx) {
|
||||
void *wlansap_open(void *p_cds_gctx)
|
||||
{
|
||||
ptSapContext pSapCtx = NULL;
|
||||
|
||||
/*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -*/
|
||||
#ifdef WLAN_FEATURE_MBSSID
|
||||
/* amically allocate the sapContext */
|
||||
/* dynamically allocate the sapContext */
|
||||
pSapCtx = (ptSapContext) cdf_mem_malloc(sizeof(tSapContext));
|
||||
#else
|
||||
if (NULL == p_cds_gctx) {
|
||||
CDF_ASSERT(p_cds_gctx);
|
||||
return CDF_STATUS_E_NOMEM;
|
||||
}
|
||||
/*------------------------------------------------------------------------
|
||||
Allocate (and sanity check?!) SAP control block
|
||||
------------------------------------------------------------------------*/
|
||||
cds_alloc_context(p_cds_gctx, CDF_MODULE_ID_SAP, (void **)&pSapCtx,
|
||||
sizeof(tSapContext));
|
||||
#endif
|
||||
|
||||
if (NULL == pSapCtx) {
|
||||
CDF_TRACE(CDF_MODULE_ID_SAP, CDF_TRACE_LEVEL_ERROR,
|
||||
"%s: Invalid SAP pointer from p_cds_gctx", __func__);
|
||||
#ifdef WLAN_FEATURE_MBSSID
|
||||
return NULL;
|
||||
#else
|
||||
return CDF_STATUS_E_FAULT;
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
/*------------------------------------------------------------------------
|
||||
Clean up SAP control block, initialize all values
|
||||
------------------------------------------------------------------------*/
|
||||
/* Clean up SAP control block, initialize all values */
|
||||
CDF_TRACE(CDF_MODULE_ID_SAP, CDF_TRACE_LEVEL_INFO_HIGH, "wlansap_open");
|
||||
|
||||
wlansap_clean_cb(pSapCtx, 0); /*do not empty */
|
||||
|
|
@ -157,15 +125,7 @@ wlansap_open(void *p_cds_gctx) {
|
|||
/* Store a pointer to the SAP context provided by CDS */
|
||||
gp_sap_ctx = pSapCtx;
|
||||
|
||||
/*------------------------------------------------------------------------
|
||||
Allocate internal resources
|
||||
------------------------------------------------------------------------*/
|
||||
|
||||
#ifdef WLAN_FEATURE_MBSSID
|
||||
return pSapCtx;
|
||||
#else
|
||||
return CDF_STATUS_SUCCESS;
|
||||
#endif
|
||||
} /* wlansap_open */
|
||||
|
||||
/**
|
||||
|
|
@ -253,10 +213,7 @@ CDF_STATUS wlansap_stop(void *pCtx)
|
|||
{
|
||||
ptSapContext pSapCtx = NULL;
|
||||
|
||||
/*------------------------------------------------------------------------
|
||||
Sanity check
|
||||
Extract SAP control block
|
||||
------------------------------------------------------------------------*/
|
||||
/* Sanity check - Extract SAP control block */
|
||||
CDF_TRACE(CDF_MODULE_ID_SAP, CDF_TRACE_LEVEL_INFO_HIGH,
|
||||
"wlansap_stop invoked successfully ");
|
||||
|
||||
|
|
@ -274,9 +231,6 @@ CDF_STATUS wlansap_stop(void *pCtx)
|
|||
"wlansap_stop failed destroy lock");
|
||||
return CDF_STATUS_E_FAULT;
|
||||
}
|
||||
/*------------------------------------------------------------------------
|
||||
Stop SAP (de-register RSN handler!?)
|
||||
------------------------------------------------------------------------*/
|
||||
|
||||
return CDF_STATUS_SUCCESS;
|
||||
}
|
||||
|
|
@ -299,12 +253,7 @@ CDF_STATUS wlansap_close(void *pCtx)
|
|||
{
|
||||
ptSapContext pSapCtx = NULL;
|
||||
|
||||
/*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -*/
|
||||
|
||||
/*------------------------------------------------------------------------
|
||||
Sanity check
|
||||
Extract SAP control block
|
||||
------------------------------------------------------------------------*/
|
||||
/* Sanity check - Extract SAP control block */
|
||||
CDF_TRACE(CDF_MODULE_ID_SAP, CDF_TRACE_LEVEL_INFO_HIGH,
|
||||
"wlansap_close invoked");
|
||||
|
||||
|
|
@ -315,22 +264,14 @@ CDF_STATUS wlansap_close(void *pCtx)
|
|||
return CDF_STATUS_E_FAULT;
|
||||
}
|
||||
|
||||
/*------------------------------------------------------------------------
|
||||
Cleanup SAP control block.
|
||||
------------------------------------------------------------------------*/
|
||||
/* Cleanup SAP control block */
|
||||
CDF_TRACE(CDF_MODULE_ID_SAP, CDF_TRACE_LEVEL_INFO_HIGH,
|
||||
"wlansap_close");
|
||||
wlansap_clean_cb(pSapCtx,
|
||||
true); /* empty queues/lists/pkts if any */
|
||||
|
||||
#ifdef WLAN_FEATURE_MBSSID
|
||||
/* empty queues/lists/pkts if any */
|
||||
wlansap_clean_cb(pSapCtx, true);
|
||||
|
||||
cdf_mem_free(pSapCtx);
|
||||
#else
|
||||
/*------------------------------------------------------------------------
|
||||
Free SAP context from CDS global
|
||||
------------------------------------------------------------------------*/
|
||||
cds_free_context(pCtx, CDF_MODULE_ID_SAP, pSapCtx);
|
||||
#endif
|
||||
|
||||
return CDF_STATUS_SUCCESS;
|
||||
} /* wlansap_close */
|
||||
|
|
|
|||
|
|
@ -1045,9 +1045,6 @@ CDF_STATUS sme_open(tHalHandle hHal)
|
|||
{
|
||||
CDF_STATUS status = CDF_STATUS_E_FAILURE;
|
||||
tpAniSirGlobal pMac = PMAC_STRUCT(hHal);
|
||||
#ifndef WLAN_FEATURE_MBSSID
|
||||
void *p_cds_gctx = cds_get_global_context();
|
||||
#endif
|
||||
|
||||
pMac->sme.state = SME_STATE_STOP;
|
||||
pMac->sme.currDeviceMode = CDF_STA_MODE;
|
||||
|
|
@ -1092,18 +1089,6 @@ CDF_STATUS sme_open(tHalHandle hHal)
|
|||
status = init_sme_cmd_list(pMac);
|
||||
if (!CDF_IS_STATUS_SUCCESS(status))
|
||||
return status;
|
||||
#ifndef WLAN_FEATURE_MBSSID
|
||||
if (NULL == p_cds_gctx) {
|
||||
sms_log(pMac, LOGE, FL("p_cds_gctx is NULL"));
|
||||
return CDF_STATUS_E_FAILURE;
|
||||
}
|
||||
status = wlansap_open(p_cds_gctx);
|
||||
if (!CDF_IS_STATUS_SUCCESS(status)) {
|
||||
sms_log(pMac, LOGE, FL("wlansap_open failed, status=%d"),
|
||||
status);
|
||||
return status;
|
||||
}
|
||||
#endif
|
||||
|
||||
#if defined WLAN_FEATURE_VOWIFI
|
||||
status = rrm_open(pMac);
|
||||
|
|
@ -1754,17 +1739,6 @@ CDF_STATUS sme_start(tHalHandle hHal)
|
|||
status);
|
||||
break;
|
||||
}
|
||||
|
||||
#ifndef WLAN_FEATURE_MBSSID
|
||||
status = wlansap_start(cds_get_global_context());
|
||||
if (!CDF_IS_STATUS_SUCCESS(status)) {
|
||||
sms_log(pMac, LOGE,
|
||||
"wlansap_start failed during smeStart with status=%d",
|
||||
status);
|
||||
break;
|
||||
}
|
||||
#endif
|
||||
|
||||
pMac->sme.state = SME_STATE_START;
|
||||
} while (0);
|
||||
|
||||
|
|
@ -2870,16 +2844,6 @@ CDF_STATUS sme_stop(tHalHandle hHal, tHalStopType stopType)
|
|||
CDF_STATUS fail_status = CDF_STATUS_SUCCESS;
|
||||
tpAniSirGlobal pMac = PMAC_STRUCT(hHal);
|
||||
|
||||
#ifndef WLAN_FEATURE_MBSSID
|
||||
status = wlansap_stop(cds_get_global_context());
|
||||
if (!CDF_IS_STATUS_SUCCESS(status)) {
|
||||
sms_log(pMac, LOGE,
|
||||
"wlansap_stop failed during smeStop with status=%d",
|
||||
status);
|
||||
fail_status = status;
|
||||
}
|
||||
#endif
|
||||
|
||||
p2p_stop(hHal);
|
||||
|
||||
status = csr_stop(pMac, stopType);
|
||||
|
|
@ -2936,16 +2900,6 @@ CDF_STATUS sme_close(tHalHandle hHal)
|
|||
status);
|
||||
fail_status = status;
|
||||
}
|
||||
#ifndef WLAN_FEATURE_MBSSID
|
||||
status = wlansap_close(cds_get_global_context());
|
||||
if (!CDF_IS_STATUS_SUCCESS(status)) {
|
||||
sms_log(pMac, LOGE,
|
||||
"WLANSAP_close failed during sme close with status=%d",
|
||||
status);
|
||||
fail_status = status;
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifndef WLAN_MDM_CODE_REDUCTION_OPT
|
||||
status = sme_qos_close(pMac);
|
||||
if (!CDF_IS_STATUS_SUCCESS(status)) {
|
||||
|
|
|
|||
|
|
@ -1912,40 +1912,20 @@ csr_isconcurrentsession_valid(tpAniSirGlobal mac_ctx, uint32_t cur_sessionid,
|
|||
|
||||
case CDF_SAP_MODE:
|
||||
temp = eCSR_ASSOC_STATE_TYPE_IBSS_DISCONNECTED;
|
||||
#ifndef WLAN_FEATURE_MBSSID
|
||||
if ((bss_persona == CDF_SAP_MODE) &&
|
||||
(connect_state !=
|
||||
eCSR_ASSOC_STATE_TYPE_NOT_CONNECTED)) {
|
||||
if ((bss_persona == CDF_IBSS_MODE)
|
||||
&& (connect_state != temp)) {
|
||||
/* allow IBSS+SAP for Emulation only */
|
||||
#ifndef QCA_WIFI_3_0_EMU
|
||||
CDF_TRACE(CDF_MODULE_ID_SME,
|
||||
CDF_TRACE_LEVEL_ERROR,
|
||||
FL("sap mode already exist"));
|
||||
FL("Can't start SAP"));
|
||||
return CDF_STATUS_E_FAILURE;
|
||||
} else
|
||||
#endif
|
||||
if ((bss_persona == CDF_IBSS_MODE)
|
||||
&& (connect_state != temp)) {
|
||||
/* allow IBSS+SAP for Emulation only */
|
||||
#ifndef QCA_WIFI_3_0_EMU
|
||||
CDF_TRACE(CDF_MODULE_ID_SME,
|
||||
CDF_TRACE_LEVEL_ERROR,
|
||||
FL("Can't start SAP"));
|
||||
return CDF_STATUS_E_FAILURE;
|
||||
#endif
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
case CDF_P2P_GO_MODE:
|
||||
temp = eCSR_ASSOC_STATE_TYPE_IBSS_DISCONNECTED;
|
||||
#ifndef WLAN_FEATURE_MBSSID
|
||||
if ((bss_persona == CDF_P2P_GO_MODE) &&
|
||||
(connect_state !=
|
||||
eCSR_ASSOC_STATE_TYPE_NOT_CONNECTED)) {
|
||||
CDF_TRACE(CDF_MODULE_ID_SME,
|
||||
CDF_TRACE_LEVEL_ERROR,
|
||||
FL("GO mode already exists"));
|
||||
return CDF_STATUS_E_FAILURE;
|
||||
}
|
||||
#endif
|
||||
if ((bss_persona == CDF_IBSS_MODE)
|
||||
&& (connect_state != temp)) {
|
||||
CDF_TRACE(CDF_MODULE_ID_SME,
|
||||
|
|
|
|||
Loading…
Reference in a new issue