Browse Source

qcacld-3.0: Use sme_dhcp_start/stop_ind api for dhcp state

Android framework indicates dhcp start and stop using power save
(ps disable for dhcp start, ps enable for dhcp stop).

Use this new indication method for any of the dhcp dependent operations.

Also remove resetting dhcp_done flag in csr_roam_connect() function,
as assumption of dhcp will trigger for every new connection is not
correct, like in static IP address case there won’t be dhcp indications,
and this flag remains false.

Change-Id: I3a995d859c39591b0a9fb4bc6e636e580c02dbd4
CRs-Fixed: 1088523
Arif Hussain 8 years ago
parent
commit
3316f402c3
2 changed files with 2 additions and 2 deletions
  1. 2 0
      core/sme/src/common/sme_api.c
  2. 0 2
      core/sme/src/csr/csr_api_roam.c

+ 2 - 0
core/sme/src/common/sme_api.c

@@ -5663,6 +5663,7 @@ QDF_STATUS sme_dhcp_start_ind(tHalHandle hHal,
 			sme_release_global_lock(&pMac->sme);
 			return QDF_STATUS_E_FAILURE;
 		}
+		pSession->dhcp_done = false;
 
 		pMsg = (tAniDHCPInd *) qdf_mem_malloc(sizeof(tAniDHCPInd));
 		if (NULL == pMsg) {
@@ -5734,6 +5735,7 @@ QDF_STATUS sme_dhcp_stop_ind(tHalHandle hHal,
 			sme_release_global_lock(&pMac->sme);
 			return QDF_STATUS_E_FAILURE;
 		}
+		pSession->dhcp_done = true;
 
 		pMsg = (tAniDHCPInd *) qdf_mem_malloc(sizeof(tAniDHCPInd));
 		if (NULL == pMsg) {

+ 0 - 2
core/sme/src/csr/csr_api_roam.c

@@ -7619,8 +7619,6 @@ QDF_STATUS csr_roam_connect(tpAniSirGlobal pMac, uint32_t sessionId,
 		sme_bss_type_to_string(pProfile->BSSType),
 		pProfile->BSSType, pProfile->AuthType.authType[0],
 		pProfile->EncryptionType.encryptionType[0]);
-	/* Reset dhcp_done for the fresh connection */
-	pSession->dhcp_done = false;
 	csr_roam_cancel_roaming(pMac, sessionId);
 	csr_scan_remove_fresh_scan_command(pMac, sessionId);
 	csr_scan_abort_all_scans(pMac, eCSR_SCAN_ABORT_DEFAULT);