qcacld-3.0: Replace tSirMacAddr with cdf_mac_addr in tSirRcvFltPkt
Replace tSirMacAddr with cdf_mac_addr in tSirRcvFltPkt group of
structures.
1. tSirRcvPktFilterCfgType
2. tSirRcvFltPktClearParam
3. tSirRcvFltMcAddrList
4. tSirRcvFltPktMatchRsp
Change-Id: I7c0dabc5c4643eee6dfe69dad76fb7363b40dce6
CRs-Fixed: 898864
diff --git a/core/hdd/src/wlan_hdd_ioctl.c b/core/hdd/src/wlan_hdd_ioctl.c
index cdf13f9..c593a6a 100644
--- a/core/hdd/src/wlan_hdd_ioctl.c
+++ b/core/hdd/src/wlan_hdd_ioctl.c
@@ -5757,14 +5757,14 @@
for (i = 0; i < adapter->mc_addr_list.mc_cnt; i++) {
if (!memcmp(adapter->mc_addr_list.addr[i],
&pattern, 1)) {
- memcpy(filter->multicastAddr[i],
+ memcpy(filter->multicastAddr[i].bytes,
adapter->mc_addr_list.addr[i],
sizeof(adapter->mc_addr_list.addr[i]));
filter->ulMulticastAddrCnt++;
hdd_info("%s RX filter : addr ="
MAC_ADDRESS_STR,
action ? "setting" : "clearing",
- MAC_ADDR_ARRAY(filter->multicastAddr[i]));
+ MAC_ADDR_ARRAY(filter->multicastAddr[i].bytes));
}
}
/* Set rx filter */
diff --git a/core/hdd/src/wlan_hdd_power.c b/core/hdd/src/wlan_hdd_power.c
index bf98cdb..df5620b 100644
--- a/core/hdd/src/wlan_hdd_power.c
+++ b/core/hdd/src/wlan_hdd_power.c
@@ -923,16 +923,15 @@
pAdapter->mc_addr_list.mc_cnt;
for (i = 0; i < pAdapter->mc_addr_list.mc_cnt;
i++) {
- memcpy(pMulticastAddrs->multicastAddr[i],
+ memcpy(pMulticastAddrs->multicastAddr[i].bytes,
pAdapter->mc_addr_list.addr[i],
sizeof(pAdapter->mc_addr_list.
addr[i]));
- hddLog(CDF_TRACE_LEVEL_INFO,
- "%s: %s multicast filter: addr ="
- MAC_ADDRESS_STR, __func__,
+ hdd_info("%s multicast filter: addr ="
+ MAC_ADDRESS_STR,
set ? "setting" : "clearing",
MAC_ADDR_ARRAY(pMulticastAddrs->
- multicastAddr[i]));
+ multicastAddr[i].bytes));
}
/* Set multicast filter */
sme_8023_multicast_list(hHal, pAdapter->sessionId,
@@ -945,7 +944,7 @@
pAdapter->mc_addr_list.mc_cnt;
for (i = 0; i < pAdapter->mc_addr_list.mc_cnt;
i++) {
- memcpy(pMulticastAddrs->multicastAddr[i],
+ memcpy(pMulticastAddrs->multicastAddr[i].bytes,
pAdapter->mc_addr_list.addr[i],
sizeof(pAdapter->mc_addr_list.
addr[i]));
diff --git a/core/mac/inc/sir_api.h b/core/mac/inc/sir_api.h
index ecff914..459499f 100644
--- a/core/mac/inc/sir_api.h
+++ b/core/mac/inc/sir_api.h
@@ -3026,8 +3026,8 @@
eSirReceivePacketFilterType filterType;
uint32_t numFieldParams;
uint32_t coalesceTime;
- tSirMacAddr selfMacAddr;
- tSirMacAddr bssId; /* Bssid of the connected AP */
+ struct cdf_mac_addr self_macaddr;
+ struct cdf_mac_addr bssid; /* Bssid of the connected AP */
tSirRcvPktFilterFieldParams paramsData[SIR_MAX_NUM_TESTS_PER_FILTER];
} tSirRcvPktFilterCfgType, *tpSirRcvPktFilterCfgType;
@@ -3046,7 +3046,7 @@
/* Success or Failure */
uint32_t status;
tSirRcvFltPktMatchCnt filterMatchCnt[SIR_MAX_NUM_FILTERS];
- tSirMacAddr bssId;
+ struct cdf_mac_addr bssid;
} tSirRcvFltPktMatchRsp, *tpSirRcvFltPktMatchRsp;
/* */
@@ -3055,8 +3055,8 @@
typedef struct sSirRcvFltPktClearParam {
uint32_t status; /* only valid for response message */
uint8_t filterId;
- tSirMacAddr selfMacAddr;
- tSirMacAddr bssId;
+ struct cdf_mac_addr self_macaddr;
+ struct cdf_mac_addr bssid;
} tSirRcvFltPktClearParam, *tpSirRcvFltPktClearParam;
/* */
@@ -3064,9 +3064,9 @@
/* */
typedef struct sSirRcvFltMcAddrList {
uint32_t ulMulticastAddrCnt;
- tSirMacAddr multicastAddr[SIR_MAX_NUM_MULTICAST_ADDRESS];
- tSirMacAddr selfMacAddr;
- tSirMacAddr bssId;
+ struct cdf_mac_addr multicastAddr[SIR_MAX_NUM_MULTICAST_ADDRESS];
+ struct cdf_mac_addr self_macaddr;
+ struct cdf_mac_addr bssid;
uint8_t action;
} tSirRcvFltMcAddrList, *tpSirRcvFltMcAddrList;
#endif /* WLAN_FEATURE_PACKET_FILTERING */
diff --git a/core/sme/src/common/sme_api.c b/core/sme/src/common/sme_api.c
index 7161c9f..948f8bb 100644
--- a/core/sme/src/common/sme_api.c
+++ b/core/sme/src/common/sme_api.c
@@ -7412,7 +7412,7 @@
CDF_TRACE(CDF_MODULE_ID_SME, CDF_TRACE_LEVEL_INFO, "%s: "
"ulMulticastAddrCnt=%d, multicastAddr[0]=%p", __func__,
pMulticastAddrs->ulMulticastAddrCnt,
- pMulticastAddrs->multicastAddr[0]);
+ pMulticastAddrs->multicastAddr[0].bytes);
/*
*Find the connected Infra / P2P_client connected session
@@ -7449,10 +7449,9 @@
cdf_mem_copy(request_buf, pMulticastAddrs,
sizeof(tSirRcvFltMcAddrList));
- cdf_mem_copy(request_buf->selfMacAddr, pSession->selfMacAddr.bytes,
- sizeof(tSirMacAddr));
- cdf_mem_copy(request_buf->bssId, pSession->connectedProfile.bssid.bytes,
- sizeof(tSirMacAddr));
+ cdf_copy_macaddr(&request_buf->self_macaddr, &pSession->selfMacAddr);
+ cdf_copy_macaddr(&request_buf->bssid,
+ &pSession->connectedProfile.bssid);
msg.type = WMA_8023_MULTICAST_LIST_REQ;
msg.reserved = 0;
@@ -7503,11 +7502,10 @@
return CDF_STATUS_E_FAILURE;
}
- cdf_mem_copy(pRcvPktFilterCfg->selfMacAddr, pSession->selfMacAddr.bytes,
- sizeof(tSirMacAddr));
- cdf_mem_copy(pRcvPktFilterCfg->bssId,
- pSession->connectedProfile.bssid.bytes,
- sizeof(tSirMacAddr));
+ cdf_copy_macaddr(&pRcvPktFilterCfg->self_macaddr,
+ &pSession->selfMacAddr);
+ cdf_copy_macaddr(&pRcvPktFilterCfg->bssid,
+ &pSession->connectedProfile.bssid);
cdf_mem_copy(request_buf, pRcvPktFilterCfg, allocSize);
msg.type = WMA_RECEIVE_FILTER_SET_FILTER_REQ;
@@ -7578,6 +7576,12 @@
CDF_TRACE(CDF_MODULE_ID_SME, CDF_TRACE_LEVEL_INFO, "%s: filterId = %d",
__func__, pRcvFltPktClearParam->filterId);
+ if (NULL == pSession) {
+ CDF_TRACE(CDF_MODULE_ID_SME, CDF_TRACE_LEVEL_ERROR,
+ "%s: Session Not found", __func__);
+ return CDF_STATUS_E_FAILURE;
+ }
+
request_buf = cdf_mem_malloc(sizeof(tSirRcvFltPktClearParam));
if (NULL == request_buf) {
CDF_TRACE(CDF_MODULE_ID_SME, CDF_TRACE_LEVEL_ERROR,
@@ -7585,18 +7589,11 @@
"Clear Filter request", __func__);
return CDF_STATUS_E_NOMEM;
}
- if (NULL == pSession) {
- CDF_TRACE(CDF_MODULE_ID_SME, CDF_TRACE_LEVEL_ERROR,
- "%s: Session Not find ", __func__);
- cdf_mem_free(request_buf);
- return CDF_STATUS_E_FAILURE;
- }
- cdf_mem_copy(pRcvFltPktClearParam->selfMacAddr,
- pSession->selfMacAddr.bytes,
- sizeof(tSirMacAddr));
- cdf_mem_copy(pRcvFltPktClearParam->bssId,
- pSession->connectedProfile.bssid.bytes, sizeof(tSirMacAddr));
+ cdf_copy_macaddr(&pRcvFltPktClearParam->self_macaddr,
+ &pSession->selfMacAddr);
+ cdf_copy_macaddr(&pRcvFltPktClearParam->bssid,
+ &pSession->connectedProfile.bssid);
cdf_mem_copy(request_buf, pRcvFltPktClearParam,
sizeof(tSirRcvFltPktClearParam));
diff --git a/core/wma/src/wma_features.c b/core/wma/src/wma_features.c
index cd8e7d3..7900541 100644
--- a/core/wma/src/wma_features.c
+++ b/core/wma/src/wma_features.c
@@ -4402,9 +4402,10 @@
uint8_t vdev_id;
/* Get the vdev id */
- if (!wma_find_vdev_by_bssid(wma, rcv_filter_param->bssId, &vdev_id)) {
+ if (!wma_find_vdev_by_bssid(wma,
+ rcv_filter_param->bssid.bytes, &vdev_id)) {
WMA_LOGE("vdev handle is invalid for %pM",
- rcv_filter_param->bssId);
+ rcv_filter_param->bssid.bytes);
return -EINVAL;
}
@@ -4428,8 +4429,10 @@
uint8_t vdev_id;
/* Get the vdev id */
- if (!wma_find_vdev_by_bssid(wma, rcv_clear_param->bssId, &vdev_id)) {
- WMA_LOGE("vdev handle is invalid for %pM", rcv_clear_param->bssId);
+ if (!wma_find_vdev_by_bssid(wma,
+ rcv_clear_param->bssid.bytes, &vdev_id)) {
+ WMA_LOGE("vdev handle is invalid for %pM",
+ rcv_clear_param->bssid.bytes);
return -EINVAL;
}
@@ -4542,7 +4545,8 @@
* Return: 0 for success or error code
*/
static int wma_add_clear_mcbc_filter(tp_wma_handle wma_handle, uint8_t vdev_id,
- tSirMacAddr multicastAddr, bool clearList)
+ struct cdf_mac_addr multicast_addr,
+ bool clearList)
{
WMI_SET_MCASTBCAST_FILTER_CMD_fixed_param *cmd;
wmi_buf_t buf;
@@ -4564,7 +4568,7 @@
cmd->action =
(clearList ? WMI_MCAST_FILTER_DELETE : WMI_MCAST_FILTER_SET);
cmd->vdev_id = vdev_id;
- WMI_CHAR_ARRAY_TO_MAC_ADDR(multicastAddr, &cmd->mcastbdcastaddr);
+ WMI_CHAR_ARRAY_TO_MAC_ADDR(multicast_addr.bytes, &cmd->mcastbdcastaddr);
err = wmi_unified_cmd_send(wma_handle->wmi_handle, buf,
sizeof(*cmd),
WMI_SET_MCASTBCAST_FILTER_CMDID);
@@ -4573,11 +4577,10 @@
cdf_mem_free(buf);
return -EIO;
}
- WMA_LOGD("Action:%d; vdev_id:%d; clearList:%d\n",
+ WMA_LOGD("Action:%d; vdev_id:%d; clearList:%d",
cmd->action, vdev_id, clearList);
- WMA_LOGD("MCBC MAC Addr: %0x:%0x:%0x:%0x:%0x:%0x\n",
- multicastAddr[0], multicastAddr[1], multicastAddr[2],
- multicastAddr[3], multicastAddr[4], multicastAddr[5]);
+ WMA_LOGD("MCBC MAC Addr: "MAC_ADDRESS_STR,
+ MAC_ADDR_ARRAY(multicast_addr.bytes));
return 0;
}
@@ -4599,10 +4602,10 @@
return CDF_STATUS_E_FAILURE;
}
- if (!wma_find_vdev_by_addr
- (wma_handle, mcbc_param->selfMacAddr, &vdev_id)) {
+ if (!wma_find_vdev_by_addr(wma_handle,
+ mcbc_param->self_macaddr.bytes, &vdev_id)) {
WMA_LOGE("%s: Failed to find vdev id for %pM", __func__,
- mcbc_param->bssId);
+ mcbc_param->bssid.bytes);
return CDF_STATUS_E_FAILURE;
}
/* set mcbc_param->action to clear MCList and reset