diff --git a/core/mac/inc/sir_api.h b/core/mac/inc/sir_api.h index c0fc77e058ab..de8250080530 100644 --- a/core/mac/inc/sir_api.h +++ b/core/mac/inc/sir_api.h @@ -1800,13 +1800,20 @@ typedef struct sAniGenericChangeCountryCodeReq { uint16_t domain_index; } tAniGenericChangeCountryCodeReq, *tpAniGenericChangeCountryCodeReq; +/** + * struct sAniDHCPStopInd - DHCP Stop indication message + * @msgType: message type is same as the request type + * @msgLen: length of the entire request + * @device_mode: Mode of the device(ex:STA, AP) + * @adapterMacAddr: MAC address of the adapter + * @peerMacAddr: MAC address of the connected peer + */ typedef struct sAniDHCPStopInd { - uint16_t msgType; /* message type is same as the request type */ - uint16_t msgLen; /* length of the entire request */ - uint8_t device_mode; /* Mode of the device(ex:STA, AP) */ - tSirMacAddr adapterMacAddr; /* MAC address of the adapter */ - tSirMacAddr peerMacAddr; /* MAC address of the connected peer */ - + uint16_t msgType; + uint16_t msgLen; + uint8_t device_mode; + struct cdf_mac_addr adapterMacAddr; + struct cdf_mac_addr peerMacAddr; } tAniDHCPInd, *tpAniDHCPInd; typedef enum eTxRateInfo { diff --git a/core/sme/src/common/sme_api.c b/core/sme/src/common/sme_api.c index 0a767e8f4242..81f59e15038a 100644 --- a/core/sme/src/common/sme_api.c +++ b/core/sme/src/common/sme_api.c @@ -5239,11 +5239,10 @@ CDF_STATUS sme_dhcp_start_ind(tHalHandle hHal, pMsg->msgType = WMA_DHCP_START_IND; pMsg->msgLen = (uint16_t) sizeof(tAniDHCPInd); pMsg->device_mode = device_mode; - cdf_mem_copy(pMsg->adapterMacAddr, macAddr, - sizeof(tSirMacAddr)); - cdf_mem_copy(pMsg->peerMacAddr, - pSession->connectedProfile.bssid.bytes, - sizeof(tSirMacAddr)); + cdf_mem_copy(pMsg->adapterMacAddr.bytes, macAddr, + CDF_MAC_ADDR_SIZE); + cdf_copy_macaddr(&pMsg->peerMacAddr, + &pSession->connectedProfile.bssid); cds_message.type = WMA_DHCP_START_IND; cds_message.bodyptr = pMsg; @@ -5311,11 +5310,10 @@ CDF_STATUS sme_dhcp_stop_ind(tHalHandle hHal, pMsg->msgType = WMA_DHCP_STOP_IND; pMsg->msgLen = (uint16_t) sizeof(tAniDHCPInd); pMsg->device_mode = device_mode; - cdf_mem_copy(pMsg->adapterMacAddr, macAddr, - sizeof(tSirMacAddr)); - cdf_mem_copy(pMsg->peerMacAddr, - pSession->connectedProfile.bssid.bytes, - sizeof(tSirMacAddr)); + cdf_mem_copy(pMsg->adapterMacAddr.bytes, macAddr, + CDF_MAC_ADDR_SIZE); + cdf_copy_macaddr(&pMsg->peerMacAddr, + &pSession->connectedProfile.bssid); cds_message.type = WMA_DHCP_STOP_IND; cds_message.bodyptr = pMsg; diff --git a/core/wma/src/wma_features.c b/core/wma/src/wma_features.c index 3a0ca154f4f3..775785cf0f2c 100644 --- a/core/wma/src/wma_features.c +++ b/core/wma/src/wma_features.c @@ -782,7 +782,8 @@ CDF_STATUS wma_process_dhcp_ind(tp_wma_handle wma_handle, return CDF_STATUS_E_FAILURE; } - if (!wma_find_vdev_by_addr(wma_handle, ta_dhcp_ind->adapterMacAddr, + if (!wma_find_vdev_by_addr(wma_handle, + ta_dhcp_ind->adapterMacAddr.bytes, &vdev_id)) { WMA_LOGE("%s: Failed to find vdev id for DHCP indication", __func__); @@ -796,7 +797,7 @@ CDF_STATUS wma_process_dhcp_ind(tp_wma_handle wma_handle, ta_dhcp_ind->msgType == WMA_DHCP_START_IND ? "WMA_DHCP_START_IND" : "WMA_DHCP_STOP_IND", ta_dhcp_ind->device_mode, - MAC_ADDR_ARRAY(ta_dhcp_ind->peerMacAddr)); + MAC_ADDR_ARRAY(ta_dhcp_ind->peerMacAddr.bytes)); buf = wmi_buf_alloc(wma_handle->wmi_handle, len); if (!buf) { @@ -818,7 +819,7 @@ CDF_STATUS wma_process_dhcp_ind(tp_wma_handle wma_handle, peer_set_param_fp->param_value = 1; else peer_set_param_fp->param_value = 0; - WMI_CHAR_ARRAY_TO_MAC_ADDR(ta_dhcp_ind->peerMacAddr, + WMI_CHAR_ARRAY_TO_MAC_ADDR(ta_dhcp_ind->peerMacAddr.bytes, &peer_set_param_fp->peer_macaddr); status = wmi_unified_cmd_send(wma_handle->wmi_handle, buf,