Implementation of FR-878
To support MCC-Coex DHCP indications are required.
CRs-fixed: 385843
Change-Id: I24b3c81f294d80e2a3e9a5ac33874f285b1aa7e7
diff --git a/CORE/HDD/src/wlan_hdd_main.c b/CORE/HDD/src/wlan_hdd_main.c
index 82f6da2..b297e96 100644
--- a/CORE/HDD/src/wlan_hdd_main.c
+++ b/CORE/HDD/src/wlan_hdd_main.c
@@ -2037,6 +2037,21 @@
pAdapter->sessionId);
}
#endif
+ else if (strncmp(command, "BTCOEXMODE", 10) == 0 )
+ {
+ char *dhcpPhase;
+ dhcpPhase = command + 12;
+ if ('1' == *dhcpPhase)
+ {
+ sme_DHCPStartInd(pHddCtx->hHal, pAdapter->device_mode,
+ pAdapter->macAddressCurrent.bytes);
+ }
+ else if ('2' == *dhcpPhase)
+ {
+ sme_DHCPStopInd(pHddCtx->hHal, pAdapter->device_mode,
+ pAdapter->macAddressCurrent.bytes);
+ }
+ }
else {
hddLog( VOS_TRACE_LEVEL_WARN, "%s: Unsupported GUI command %s",
__func__, command);
diff --git a/CORE/MAC/inc/sirApi.h b/CORE/MAC/inc/sirApi.h
index aed8177..20f5903 100644
--- a/CORE/MAC/inc/sirApi.h
+++ b/CORE/MAC/inc/sirApi.h
@@ -2127,6 +2127,15 @@
} tAniChangeCountryCodeReq, *tpAniChangeCountryCodeReq;
+typedef struct sAniDHCPStopInd
+{
+ tANI_U16 msgType; // message type is same as the request type
+ tANI_U16 msgLen; // length of the entire request
+ tANI_U8 device_mode; // Mode of the device(ex:STA, AP)
+ tSirMacAddr macAddr;
+
+} tAniDHCPInd, *tpAniDHCPInd;
+
typedef struct sAniSummaryStatsInfo
{
tANI_U32 retry_cnt[4]; //Total number of packets(per AC) that were successfully transmitted with retries
diff --git a/CORE/MAC/src/include/sirParams.h b/CORE/MAC/src/include/sirParams.h
index cc810d1..0c35bb1 100644
--- a/CORE/MAC/src/include/sirParams.h
+++ b/CORE/MAC/src/include/sirParams.h
@@ -583,6 +583,8 @@
#define SIR_HAL_STOP_SCAN_OFFLOAD_REQ (SIR_HAL_ITC_MSG_TYPES_BEGIN + 201)
#define SIR_HAL_STOP_SCAN_OFFLOAD_RSP (SIR_HAL_ITC_MSG_TYPES_BEGIN + 202)
#define SIR_HAL_RX_SCAN_EVENT (SIR_HAL_ITC_MSG_TYPES_BEGIN + 203)
+#define SIR_HAL_DHCP_START_IND (SIR_HAL_ITC_MSG_TYPES_BEGIN + 204)
+#define SIR_HAL_DHCP_STOP_IND (SIR_HAL_ITC_MSG_TYPES_BEGIN + 205)
#define SIR_HAL_MSG_TYPES_END (SIR_HAL_ITC_MSG_TYPES_BEGIN + 0xFF)
// CFG message types
diff --git a/CORE/SME/inc/sme_Api.h b/CORE/SME/inc/sme_Api.h
index c598332..b9f69f9 100644
--- a/CORE/SME/inc/sme_Api.h
+++ b/CORE/SME/inc/sme_Api.h
@@ -1419,6 +1419,49 @@
void* pVosContext,
tAniBool countryFromUserSpace );
+/* ---------------------------------------------------------------------------
+
+ \fn sme_DHCPStartInd
+
+ \brief Indicate FW about DHCP start event.
+
+ \param hHal - The handle returned by macOpen.
+
+ \param device_mode the mode of the device
+
+ \param macAddr the macAddress of the devices
+
+ \return eHalStatus SUCCESS.
+
+ FAILURE or RESOURCES The API finished and failed.
+
+ -------------------------------------------------------------------------------*/
+
+eHalStatus sme_DHCPStartInd( tHalHandle hHal,
+ tANI_U8 device_mode,
+ tANI_U8 *macAddr );
+
+/* ---------------------------------------------------------------------------
+
+ \fn sme_DHCPStopInd
+
+ \brief Indicate FW about DHCP stop event.
+
+ \param hHal - The handle returned by macOpen.
+
+ \param device_mode the mode of the device
+
+ \param macAddr the macAddress of the devices
+
+ \return eHalStatus SUCCESS.
+
+ FAILURE or RESOURCES The API finished and failed.
+
+ -------------------------------------------------------------------------------*/
+eHalStatus sme_DHCPStopInd( tHalHandle hHal,
+ tANI_U8 device_mode,
+ tANI_U8 *macAddr );
+
/* ---------------------------------------------------------------------------
\fn sme_BtcSignalBtEvent
diff --git a/CORE/SME/src/sme_common/sme_Api.c b/CORE/SME/src/sme_common/sme_Api.c
index e9544eb..23e21f2 100644
--- a/CORE/SME/src/sme_common/sme_Api.c
+++ b/CORE/SME/src/sme_common/sme_Api.c
@@ -4345,6 +4345,123 @@
return (status);
}
+/* ---------------------------------------------------------------------------
+
+ \fn sme_DHCPStartInd
+
+ \brief API to signal the FW about the DHCP Start event.
+
+ \param hHal - HAL handle for device.
+
+ \param device_mode - mode(AP,SAP etc) of the device.
+
+ \param macAddr - MAC address of the device.
+
+ \return eHalStatus SUCCESS.
+
+ FAILURE or RESOURCES The API finished and failed.
+ --------------------------------------------------------------------------*/
+eHalStatus sme_DHCPStartInd( tHalHandle hHal,
+ tANI_U8 device_mode,
+ tANI_U8 *macAddr )
+{
+ eHalStatus status;
+ VOS_STATUS vosStatus;
+ tpAniSirGlobal pMac = PMAC_STRUCT( hHal );
+ vos_msg_t vosMessage;
+ tAniDHCPInd *pMsg;
+
+ status = sme_AcquireGlobalLock(&pMac->sme);
+ if ( eHAL_STATUS_SUCCESS == status)
+ {
+ pMsg = (tAniDHCPInd*)vos_mem_malloc(sizeof(tAniDHCPInd));
+ if (NULL == pMsg)
+ {
+ VOS_TRACE(VOS_MODULE_ID_SME, VOS_TRACE_LEVEL_ERROR,
+ "%s: Not able to allocate memory for dhcp start", __func__);
+ sme_ReleaseGlobalLock( &pMac->sme );
+ return eHAL_STATUS_FAILURE;
+ }
+ pMsg->msgType = WDA_DHCP_START_IND;
+ pMsg->msgLen = (tANI_U16)sizeof(tAniDHCPInd);
+ pMsg->device_mode = device_mode;
+ vos_mem_copy( pMsg->macAddr, macAddr, sizeof(tSirMacAddr));
+
+ vosMessage.type = WDA_DHCP_START_IND;
+ vosMessage.bodyptr = pMsg;
+ vosMessage.reserved = 0;
+
+ vosStatus = vos_mq_post_message( VOS_MQ_ID_WDA, &vosMessage );
+ if ( !VOS_IS_STATUS_SUCCESS(vosStatus) )
+ {
+ VOS_TRACE(VOS_MODULE_ID_SME, VOS_TRACE_LEVEL_ERROR,
+ "%s: Post DHCP Start MSG fail", __func__);
+ vos_mem_free(pMsg);
+ status = eHAL_STATUS_FAILURE;
+ }
+ sme_ReleaseGlobalLock( &pMac->sme );
+ }
+ return (status);
+}
+/* ---------------------------------------------------------------------------
+ \fn sme_DHCPStopInd
+
+ \brief API to signal the FW about the DHCP complete event.
+
+ \param hHal - HAL handle for device.
+
+ \param device_mode - mode(AP, SAP etc) of the device.
+
+ \param macAddr - MAC address of the device.
+
+ \return eHalStatus SUCCESS.
+ FAILURE or RESOURCES The API finished and failed.
+ --------------------------------------------------------------------------*/
+eHalStatus sme_DHCPStopInd( tHalHandle hHal,
+ tANI_U8 device_mode,
+ tANI_U8 *macAddr )
+{
+ eHalStatus status;
+ VOS_STATUS vosStatus;
+ tpAniSirGlobal pMac = PMAC_STRUCT( hHal );
+ vos_msg_t vosMessage;
+ tAniDHCPInd *pMsg;
+
+ status = sme_AcquireGlobalLock(&pMac->sme);
+ if ( eHAL_STATUS_SUCCESS == status)
+ {
+ pMsg = (tAniDHCPInd*)vos_mem_malloc(sizeof(tAniDHCPInd));
+ if (NULL == pMsg)
+ {
+ VOS_TRACE(VOS_MODULE_ID_SME, VOS_TRACE_LEVEL_ERROR,
+ "%s: Not able to allocate memory for dhcp stop", __func__);
+ sme_ReleaseGlobalLock( &pMac->sme );
+ return eHAL_STATUS_FAILURE;
+ }
+
+ pMsg->msgType = WDA_DHCP_STOP_IND;
+ pMsg->msgLen = (tANI_U16)sizeof(tAniDHCPInd);
+ pMsg->device_mode = device_mode;
+ vos_mem_copy( pMsg->macAddr, macAddr, sizeof(tSirMacAddr));
+
+ vosMessage.type = WDA_DHCP_STOP_IND;
+ vosMessage.bodyptr = pMsg;
+ vosMessage.reserved = 0;
+
+ vosStatus = vos_mq_post_message( VOS_MQ_ID_WDA, &vosMessage );
+ if ( !VOS_IS_STATUS_SUCCESS(vosStatus) )
+ {
+ VOS_TRACE(VOS_MODULE_ID_SME, VOS_TRACE_LEVEL_ERROR,
+ "%s: Post DHCP Stop MSG fail", __func__);
+ vos_mem_free(pMsg);
+ status = eHAL_STATUS_FAILURE;
+ }
+
+ sme_ReleaseGlobalLock( &pMac->sme );
+ }
+ return (status);
+}
+
/* ---------------------------------------------------------------------------
\fn sme_BtcSignalBtEvent
diff --git a/CORE/WDA/inc/wlan_qct_wda.h b/CORE/WDA/inc/wlan_qct_wda.h
index e1830f8..2cadd0a 100644
--- a/CORE/WDA/inc/wlan_qct_wda.h
+++ b/CORE/WDA/inc/wlan_qct_wda.h
@@ -1058,6 +1058,9 @@
#endif // WLAN_FEATURE_PACKET_FILTERING
#define WDA_SET_POWER_PARAMS_REQ SIR_HAL_SET_POWER_PARAMS_REQ
+#define WDA_DHCP_START_IND SIR_HAL_DHCP_START_IND
+#define WDA_DHCP_STOP_IND SIR_HAL_DHCP_STOP_IND
+
#ifdef WLAN_FEATURE_GTK_OFFLOAD
#define WDA_GTK_OFFLOAD_REQ SIR_HAL_GTK_OFFLOAD_REQ
diff --git a/CORE/WDA/src/wlan_qct_wda.c b/CORE/WDA/src/wlan_qct_wda.c
index 327b6a8..4bcc5db 100644
--- a/CORE/WDA/src/wlan_qct_wda.c
+++ b/CORE/WDA/src/wlan_qct_wda.c
@@ -10574,6 +10574,70 @@
return status;
}
/*
+ * FUNCTION: WDA_ProcessDHCPStartInd
+ * Forward DHCP Start to WDI
+ */
+static VOS_STATUS WDA_ProcessDHCPStartInd (tWDA_CbContext *pWDA,
+ tAniDHCPInd *dhcpStartInd)
+{
+ WDI_Status status;
+ WDI_DHCPInd *wdiDHCPInd = (WDI_DHCPInd*)vos_mem_malloc(sizeof(WDI_DHCPInd)) ;
+ if (NULL == wdiDHCPInd)
+ {
+ VOS_TRACE( VOS_MODULE_ID_WDA, VOS_TRACE_LEVEL_ERROR,
+ "%s: VOS MEM Alloc Failure", __func__);
+ VOS_ASSERT(0);
+ vos_mem_free(dhcpStartInd);
+ return VOS_STATUS_E_NOMEM;
+ }
+
+ wdiDHCPInd->device_mode = dhcpStartInd->device_mode;
+ vos_mem_copy(wdiDHCPInd->macAddr, dhcpStartInd->macAddr,
+ sizeof(tSirMacAddr));
+
+ status = WDI_dhcpStartInd(wdiDHCPInd);
+
+ if (IS_WDI_STATUS_FAILURE(status))
+ {
+ vos_mem_free(wdiDHCPInd);
+ VOS_TRACE( VOS_MODULE_ID_WDA, VOS_TRACE_LEVEL_ERROR,
+ "DHCP Start Indication failed");
+ }
+ vos_mem_free(dhcpStartInd);
+ return CONVERT_WDI2VOS_STATUS(status) ;
+}
+
+ /*
+ * FUNCTION: WDA_ProcessDHCPStopInd
+ * Forward DHCP Stop to WDI
+ */
+ static VOS_STATUS WDA_ProcessDHCPStopInd (tWDA_CbContext *pWDA,
+ tAniDHCPInd *dhcpStopInd)
+ {
+ WDI_Status status;
+ WDI_DHCPInd *wdiDHCPInd = (WDI_DHCPInd*)vos_mem_malloc(sizeof(WDI_DHCPInd)) ;
+ if (NULL == wdiDHCPInd)
+ {
+ VOS_TRACE( VOS_MODULE_ID_WDA, VOS_TRACE_LEVEL_ERROR,
+ "%s: VOS MEM Alloc Failure", __func__);
+ VOS_ASSERT(0);
+ vos_mem_free(dhcpStopInd);
+ return VOS_STATUS_E_NOMEM;
+ }
+ wdiDHCPInd->device_mode = dhcpStopInd->device_mode;
+ vos_mem_copy(wdiDHCPInd->macAddr, dhcpStopInd->macAddr, sizeof(tSirMacAddr));
+ status = WDI_dhcpStopInd(wdiDHCPInd);
+ if (IS_WDI_STATUS_FAILURE(status))
+ {
+ vos_mem_free(wdiDHCPInd);
+ VOS_TRACE( VOS_MODULE_ID_WDA, VOS_TRACE_LEVEL_ERROR,
+ "DHCP Start Indication failed");
+ }
+ vos_mem_free(dhcpStopInd);
+ return CONVERT_WDI2VOS_STATUS(status) ;
+ }
+
+/*
* FUNCTION: WDA_McProcessMsg
* Trigger DAL-AL to start CFG download
*/
@@ -11206,6 +11270,16 @@
break;
}
#endif
+ case WDA_DHCP_START_IND:
+ {
+ WDA_ProcessDHCPStartInd(pWDA, (tAniDHCPInd *)pMsg->bodyptr);
+ break;
+ }
+ case WDA_DHCP_STOP_IND:
+ {
+ WDA_ProcessDHCPStopInd(pWDA, (tAniDHCPInd *)pMsg->bodyptr);
+ break;
+ }
default:
{
VOS_TRACE( VOS_MODULE_ID_WDA, VOS_TRACE_LEVEL_ERROR,
@@ -13741,6 +13815,7 @@
return WDI_getFwWlanFeatCaps(featEnumValue);
}
+
/*
* FUNCTION: WDA_shutdown
* Shutdown WDA/WDI without handshaking with Riva.
diff --git a/CORE/WDI/CP/inc/wlan_qct_wdi.h b/CORE/WDI/CP/inc/wlan_qct_wdi.h
index 33ef3e8..1e55b03 100644
--- a/CORE/WDI/CP/inc/wlan_qct_wdi.h
+++ b/CORE/WDI/CP/inc/wlan_qct_wdi.h
@@ -498,6 +498,17 @@
} WDI_CoexIndType;
/*---------------------------------------------------------------------------
+ WDI_DHCPInd
+---------------------------------------------------------------------------*/
+
+typedef struct
+{
+ wpt_uint8 device_mode;
+ wpt_uint8 macAddr[WDI_MAC_ADDR_LEN];
+}WDI_DHCPInd;
+
+/*---------------------------------------------------------------------------
+
WDI_MacSSid
---------------------------------------------------------------------------*/
typedef struct
@@ -9444,6 +9455,40 @@
WDI_SetPowerParamsCb wdiPowerParamsCb,
void* pUserData
);
+/**
+ @brief WDI_dhcpStartInd
+ Forward the DHCP Start event
+
+ @param
+
+ wdiDHCPInd: device mode and MAC address is passed
+
+ @see
+ @return Result of the function call
+*/
+
+WDI_Status
+WDI_dhcpStartInd
+(
+ WDI_DHCPInd *wdiDHCPInd
+);
+/**
+ @brief WDI_dhcpStopReq
+ Forward the DHCP Stop event
+
+ @param
+
+ wdiDHCPInd: device mode and MAC address is passed
+
+ @see
+ @return Result of the function call
+*/
+
+WDI_Status
+WDI_dhcpStopInd
+(
+ WDI_DHCPInd *wdiDHCPInd
+);
#ifdef WLAN_FEATURE_GTK_OFFLOAD
/**
diff --git a/CORE/WDI/CP/inc/wlan_qct_wdi_i.h b/CORE/WDI/CP/inc/wlan_qct_wdi_i.h
index 50a77ee..9965b35 100644
--- a/CORE/WDI/CP/inc/wlan_qct_wdi_i.h
+++ b/CORE/WDI/CP/inc/wlan_qct_wdi_i.h
@@ -449,6 +449,7 @@
WDI_TDLS_LINK_ESTABLISH_REQ = 84,
+
WDI_MAX_REQ,
/*Send a suspend Indication down to HAL*/
@@ -457,6 +458,12 @@
/* Send a traffic stats indication to HAL */
WDI_TRAFFIC_STATS_IND,
+ /* DHCP Start Indication */
+ WDI_DHCP_START_IND,
+
+ /* DHCP Stop Indication */
+ WDI_DHCP_STOP_IND,
+
/* Drop/Receive unencrypted frames indication to HAL */
WDI_EXCLUDE_UNENCRYPTED_IND,
@@ -2742,6 +2749,38 @@
WDI_EventInfoType* pEventData
);
+/**
+ @brief DHCP Start Event Indication
+
+ @param pWDICtx: pointer to the WLAN DAL context
+ pEventData: pointer to the event information structure
+
+ @see
+ @return Result of the function call
+*/
+WDI_Status
+WDI_ProcessDHCPStartInd
+(
+ WDI_ControlBlockType* pWDICtx,
+ WDI_EventInfoType* pEventData
+);
+
+/**
+ @brief DHCP Stop Event Indication
+
+ @param pWDICtx: pointer to the WLAN DAL context
+ pEventData: pointer to the event information structure
+
+ @see
+ @return Result of the function call
+*/
+WDI_Status
+WDI_ProcessDHCPStopInd
+(
+ WDI_ControlBlockType* pWDICtx,
+ WDI_EventInfoType* pEventData
+);
+
/**
@brief Process Traffic Stats Indications function (called when Main FSM allows it)
diff --git a/CORE/WDI/CP/src/wlan_qct_wdi.c b/CORE/WDI/CP/src/wlan_qct_wdi.c
index 346506f..ca840d4 100644
--- a/CORE/WDI/CP/src/wlan_qct_wdi.c
+++ b/CORE/WDI/CP/src/wlan_qct_wdi.c
@@ -369,6 +369,8 @@
-------------------------------------------------------------------------*/
WDI_ProcessHostSuspendInd, /* WDI_HOST_SUSPEND_IND*/
WDI_ProcessTrafficStatsInd, /* WDI_TRAFFIC_STATS_IND*/
+ WDI_ProcessDHCPStartInd, /* WDI_DHCP_START_IND*/
+ WDI_ProcessDHCPStopInd, /* WDI_DHCP_STOP_IND*/
#ifdef WLAN_FEATURE_11W
WDI_ProcessExcludeUnencryptInd, /* WDI_EXCLUDE_UNENCRYPTED_IND */
#else
@@ -22168,6 +22170,10 @@
#endif
case WDI_GET_ROAM_RSSI_REQ:
return WLAN_HAL_GET_ROAM_RSSI_REQ;
+ case WDI_DHCP_START_IND:
+ return WLAN_HAL_DHCP_START_IND;
+ case WDI_DHCP_STOP_IND:
+ return WLAN_HAL_DHCP_STOP_IND;
default:
return WLAN_HAL_MSG_MAX;
}
@@ -26084,6 +26090,225 @@
return WDI_STATUS_SUCCESS;
}/*WDI_ProcessSetPowerParamsRsp*/
+/**
+ @brief WDI_dhcpStartInd
+ Host will send an event to the FW when DHCP is initiated
+
+ @param
+ WDI_DHCPInd: DHCP Indication
+ @see
+ @return Result of the function call
+*/
+WDI_Status
+WDI_dhcpStartInd
+(
+ WDI_DHCPInd *wdiDHCPInd
+)
+{
+ WDI_EventInfoType wdiEventData;
+
+ /*------------------------------------------------------------------------
+ Sanity Check
+ ------------------------------------------------------------------------*/
+ if ( eWLAN_PAL_FALSE == gWDIInitialized )
+ {
+ WPAL_TRACE(eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_ERROR,
+ "WDI API call before module is initialized - Fail request");
+
+ return WDI_STATUS_E_NOT_ALLOWED;
+ }
+
+ wdiEventData.wdiRequest = WDI_DHCP_START_IND;
+ wdiEventData.pEventData = wdiDHCPInd;
+ wdiEventData.uEventDataSize = sizeof(wdiDHCPInd);
+ wdiEventData.pCBfnc = NULL;
+ wdiEventData.pUserData = NULL;
+
+ return WDI_PostMainEvent(&gWDICb, WDI_REQUEST_EVENT, &wdiEventData);
+}
+
+
+/**
+ @brief WDI_dhcpStopInd
+ Host will send an event to the FW when DHCP is completed
+
+ @param
+ WDI_DHCPInd: DHCP Indication
+ @see
+ @return Result of the function call
+*/
+WDI_Status
+WDI_dhcpStopInd
+(
+ WDI_DHCPInd *wdiDHCPInd
+)
+{
+ WDI_EventInfoType wdiEventData;
+
+ /*------------------------------------------------------------------------
+ Sanity Check
+ ------------------------------------------------------------------------*/
+ if ( eWLAN_PAL_FALSE == gWDIInitialized )
+ {
+ WPAL_TRACE(eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_ERROR,
+ "WDI API call before module is initialized - Fail request");
+
+ return WDI_STATUS_E_NOT_ALLOWED;
+ }
+
+ wdiEventData.wdiRequest = WDI_DHCP_STOP_IND;
+ wdiEventData.pEventData = wdiDHCPInd;
+ wdiEventData.uEventDataSize = sizeof(wdiDHCPInd);
+ wdiEventData.pCBfnc = NULL;
+ wdiEventData.pUserData = NULL;
+
+ return WDI_PostMainEvent(&gWDICb, WDI_REQUEST_EVENT, &wdiEventData);
+}
+
+
+/**
+ @brief Process DHCP Start Indication message and post it to HAL
+
+ @param pWDICtx: pointer to the WLAN DAL context
+ pEventData: pointer to the event information structure
+
+ @see
+ @return Result of the function call
+*/
+WDI_Status
+WDI_ProcessDHCPStartInd
+(
+ WDI_ControlBlockType* pWDICtx,
+ WDI_EventInfoType* pEventData
+)
+{
+ wpt_uint8* pSendBuffer = NULL;
+ wpt_uint16 usDataOffset = 0;
+ wpt_uint16 usSendSize = 0;
+ wpt_uint16 usLen = 0;
+ WDI_DHCPInd* pwdiDHCPInd = NULL;
+ tDHCPInfo* pDHCPInfo;
+
+ /*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
+
+ WPAL_TRACE(eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_INFO,
+ "%s", __func__);
+
+ /*-------------------------------------------------------------------------
+ Sanity check
+ -------------------------------------------------------------------------*/
+ if (( NULL == pEventData ) || ( NULL == pEventData->pEventData ))
+ {
+ WPAL_TRACE( eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_FATAL,
+ "%s: Invalid parameters", __func__);
+ WDI_ASSERT(0);
+ return WDI_STATUS_E_FAILURE;
+ }
+ pwdiDHCPInd = (WDI_DHCPInd*)pEventData->pEventData;
+ /*-----------------------------------------------------------------------
+ Get message buffer
+ -----------------------------------------------------------------------*/
+
+ if (( WDI_STATUS_SUCCESS != WDI_GetMessageBuffer( pWDICtx,
+ WDI_DHCP_START_IND,
+ sizeof(tDHCPInfo),
+ &pSendBuffer, &usDataOffset, &usSendSize))||
+ ( usSendSize < (usDataOffset + usLen )))
+ {
+ WPAL_TRACE( eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_FATAL,
+ "Unable to get send buffer in DHCP Start req %p ",
+ pEventData);
+ WDI_ASSERT(0);
+ return WDI_STATUS_E_FAILURE;
+ }
+
+ pDHCPInfo = (tDHCPInfo*)pSendBuffer+usDataOffset;
+ pDHCPInfo->device_mode = pwdiDHCPInd->device_mode;
+ wpalMemoryCopy(pDHCPInfo->macAddr, pwdiDHCPInd->macAddr,
+ WDI_MAC_ADDR_LEN);
+
+ pWDICtx->pReqStatusUserData = NULL;
+ pWDICtx->pfncRspCB = NULL;
+
+ /*-------------------------------------------------------------------------
+ Send DHCP Start Indication to HAL
+ -------------------------------------------------------------------------*/
+ return WDI_SendIndication( pWDICtx, pSendBuffer, usSendSize);
+
+}/*WDI_ProcessDHCPStartInd*/
+
+/**
+ @brief Process DHCP Stop indication message and post it to HAL
+
+ @param pWDICtx: pointer to the WLAN DAL context
+ pEventData: pointer to the event information structure
+
+ @see
+ @return Result of the function call
+*/
+WDI_Status
+WDI_ProcessDHCPStopInd
+(
+ WDI_ControlBlockType* pWDICtx,
+ WDI_EventInfoType* pEventData
+)
+{
+ wpt_uint8* pSendBuffer = NULL;
+ wpt_uint16 usDataOffset = 0;
+ wpt_uint16 usSendSize = 0;
+ wpt_uint16 usLen = 0;
+ WDI_DHCPInd* pwdiDHCPInd = NULL;
+ tDHCPInfo* pDHCPInfo;
+
+ /*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
+
+ WPAL_TRACE(eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_INFO,
+ "%s", __func__);
+
+ /*-------------------------------------------------------------------------
+ Sanity check
+ -------------------------------------------------------------------------*/
+
+ if (( NULL == pEventData ) || ( NULL == pEventData->pEventData ))
+ {
+ WPAL_TRACE( eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_FATAL,
+ "%s: Invalid parameters", __func__);
+ WDI_ASSERT(0);
+ return WDI_STATUS_E_FAILURE;
+ }
+ pwdiDHCPInd = (WDI_DHCPInd*)pEventData->pEventData;
+ /*-----------------------------------------------------------------------
+ Get message buffer
+ -----------------------------------------------------------------------*/
+
+ if (( WDI_STATUS_SUCCESS != WDI_GetMessageBuffer( pWDICtx,
+ WDI_DHCP_STOP_IND,
+ sizeof(tDHCPInfo),
+ &pSendBuffer, &usDataOffset, &usSendSize))||
+ ( usSendSize < (usDataOffset + usLen )))
+ {
+ WPAL_TRACE( eWLAN_MODULE_DAL_CTRL, eWLAN_PAL_TRACE_LEVEL_FATAL,
+ "Unable to get send buffer in DHCP Start req %p ",
+ pEventData);
+ WDI_ASSERT(0);
+ return WDI_STATUS_E_FAILURE;
+ }
+
+ pDHCPInfo = (tDHCPInfo*)pSendBuffer+usDataOffset;
+ pDHCPInfo->device_mode = pwdiDHCPInd->device_mode;
+ wpalMemoryCopy(pDHCPInfo->macAddr, pwdiDHCPInd->macAddr,
+ WDI_MAC_ADDR_LEN);
+
+ pWDICtx->pReqStatusUserData = NULL;
+ pWDICtx->pfncRspCB = NULL;
+ /*-------------------------------------------------------------------------
+ Send DHCP Stop indication to HAL
+ -------------------------------------------------------------------------*/
+ return WDI_SendIndication( pWDICtx, pSendBuffer, usSendSize);
+
+}/*WDI_ProcessDHCPStopInd*/
+
+
#ifdef WLAN_FEATURE_GTK_OFFLOAD
/**
@brief WDI_GTKOffloadReq will be called when the upper MAC