Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 8077fae3 authored by Ryan Hsu's avatar Ryan Hsu Committed by Akash Patel
Browse files

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
parent 191131ee
Loading
Loading
Loading
Loading
+0 −9
Original line number Diff line number Diff line
@@ -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 −6
Original line number Diff line number Diff line
/*
 * 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 −26
Original line number Diff line number Diff line
/*
 * 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);
+10 −27
Original line number Diff line number Diff line
@@ -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
+2 −29
Original line number Diff line number Diff line
/*
 * 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
Loading