Răsfoiți Sursa

qcacld-3.0: Replace tSirMacAddr with cdf_mac_addr in sAniDHCPStopInd

Replace tSirMacAddr with cdf_mac_addr in sAniDHCPStopInd.

Change-Id: I56dfa86947e9711c8727d4e3d025f0f03fc39d3c
CRs-Fixed: 898864
Srinivas Girigowda 9 ani în urmă
părinte
comite
43f63cdbb5
3 a modificat fișierele cu 25 adăugiri și 19 ștergeri
  1. 13 6
      core/mac/inc/sir_api.h
  2. 8 10
      core/sme/src/common/sme_api.c
  3. 4 3
      core/wma/src/wma_features.c

+ 13 - 6
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 {

+ 8 - 10
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;

+ 4 - 3
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,