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
This commit is contained in:
Srinivas Girigowda
2015-11-20 17:39:24 -08:00
committed by Satish Singh
父節點 906d66bb82
當前提交 003f054801
共有 5 個文件被更改,包括 49 次插入50 次删除

查看文件

@@ -5757,14 +5757,14 @@ static int hdd_set_rx_filter(hdd_adapter_t *adapter, bool action,
for (i = 0; i < adapter->mc_addr_list.mc_cnt; i++) { for (i = 0; i < adapter->mc_addr_list.mc_cnt; i++) {
if (!memcmp(adapter->mc_addr_list.addr[i], if (!memcmp(adapter->mc_addr_list.addr[i],
&pattern, 1)) { &pattern, 1)) {
memcpy(filter->multicastAddr[i], memcpy(filter->multicastAddr[i].bytes,
adapter->mc_addr_list.addr[i], adapter->mc_addr_list.addr[i],
sizeof(adapter->mc_addr_list.addr[i])); sizeof(adapter->mc_addr_list.addr[i]));
filter->ulMulticastAddrCnt++; filter->ulMulticastAddrCnt++;
hdd_info("%s RX filter : addr =" hdd_info("%s RX filter : addr ="
MAC_ADDRESS_STR, MAC_ADDRESS_STR,
action ? "setting" : "clearing", action ? "setting" : "clearing",
MAC_ADDR_ARRAY(filter->multicastAddr[i])); MAC_ADDR_ARRAY(filter->multicastAddr[i].bytes));
} }
} }
/* Set rx filter */ /* Set rx filter */

查看文件

@@ -923,16 +923,15 @@ void wlan_hdd_set_mc_addr_list(hdd_adapter_t *pAdapter, uint8_t set)
pAdapter->mc_addr_list.mc_cnt; pAdapter->mc_addr_list.mc_cnt;
for (i = 0; i < pAdapter->mc_addr_list.mc_cnt; for (i = 0; i < pAdapter->mc_addr_list.mc_cnt;
i++) { i++) {
memcpy(pMulticastAddrs->multicastAddr[i], memcpy(pMulticastAddrs->multicastAddr[i].bytes,
pAdapter->mc_addr_list.addr[i], pAdapter->mc_addr_list.addr[i],
sizeof(pAdapter->mc_addr_list. sizeof(pAdapter->mc_addr_list.
addr[i])); addr[i]));
hddLog(CDF_TRACE_LEVEL_INFO, hdd_info("%s multicast filter: addr ="
"%s: %s multicast filter: addr =" MAC_ADDRESS_STR,
MAC_ADDRESS_STR, __func__,
set ? "setting" : "clearing", set ? "setting" : "clearing",
MAC_ADDR_ARRAY(pMulticastAddrs-> MAC_ADDR_ARRAY(pMulticastAddrs->
multicastAddr[i])); multicastAddr[i].bytes));
} }
/* Set multicast filter */ /* Set multicast filter */
sme_8023_multicast_list(hHal, pAdapter->sessionId, sme_8023_multicast_list(hHal, pAdapter->sessionId,
@@ -945,7 +944,7 @@ void wlan_hdd_set_mc_addr_list(hdd_adapter_t *pAdapter, uint8_t set)
pAdapter->mc_addr_list.mc_cnt; pAdapter->mc_addr_list.mc_cnt;
for (i = 0; i < pAdapter->mc_addr_list.mc_cnt; for (i = 0; i < pAdapter->mc_addr_list.mc_cnt;
i++) { i++) {
memcpy(pMulticastAddrs->multicastAddr[i], memcpy(pMulticastAddrs->multicastAddr[i].bytes,
pAdapter->mc_addr_list.addr[i], pAdapter->mc_addr_list.addr[i],
sizeof(pAdapter->mc_addr_list. sizeof(pAdapter->mc_addr_list.
addr[i])); addr[i]));

查看文件

@@ -3026,8 +3026,8 @@ typedef struct sSirRcvPktFilterCfg {
eSirReceivePacketFilterType filterType; eSirReceivePacketFilterType filterType;
uint32_t numFieldParams; uint32_t numFieldParams;
uint32_t coalesceTime; uint32_t coalesceTime;
tSirMacAddr selfMacAddr; struct cdf_mac_addr self_macaddr;
tSirMacAddr bssId; /* Bssid of the connected AP */ struct cdf_mac_addr bssid; /* Bssid of the connected AP */
tSirRcvPktFilterFieldParams paramsData[SIR_MAX_NUM_TESTS_PER_FILTER]; tSirRcvPktFilterFieldParams paramsData[SIR_MAX_NUM_TESTS_PER_FILTER];
} tSirRcvPktFilterCfgType, *tpSirRcvPktFilterCfgType; } tSirRcvPktFilterCfgType, *tpSirRcvPktFilterCfgType;
@@ -3046,7 +3046,7 @@ typedef struct sSirRcvFltPktMatchRsp {
/* Success or Failure */ /* Success or Failure */
uint32_t status; uint32_t status;
tSirRcvFltPktMatchCnt filterMatchCnt[SIR_MAX_NUM_FILTERS]; tSirRcvFltPktMatchCnt filterMatchCnt[SIR_MAX_NUM_FILTERS];
tSirMacAddr bssId; struct cdf_mac_addr bssid;
} tSirRcvFltPktMatchRsp, *tpSirRcvFltPktMatchRsp; } tSirRcvFltPktMatchRsp, *tpSirRcvFltPktMatchRsp;
/* */ /* */
@@ -3055,8 +3055,8 @@ typedef struct sSirRcvFltPktMatchRsp {
typedef struct sSirRcvFltPktClearParam { typedef struct sSirRcvFltPktClearParam {
uint32_t status; /* only valid for response message */ uint32_t status; /* only valid for response message */
uint8_t filterId; uint8_t filterId;
tSirMacAddr selfMacAddr; struct cdf_mac_addr self_macaddr;
tSirMacAddr bssId; struct cdf_mac_addr bssid;
} tSirRcvFltPktClearParam, *tpSirRcvFltPktClearParam; } tSirRcvFltPktClearParam, *tpSirRcvFltPktClearParam;
/* */ /* */
@@ -3064,9 +3064,9 @@ typedef struct sSirRcvFltPktClearParam {
/* */ /* */
typedef struct sSirRcvFltMcAddrList { typedef struct sSirRcvFltMcAddrList {
uint32_t ulMulticastAddrCnt; uint32_t ulMulticastAddrCnt;
tSirMacAddr multicastAddr[SIR_MAX_NUM_MULTICAST_ADDRESS]; struct cdf_mac_addr multicastAddr[SIR_MAX_NUM_MULTICAST_ADDRESS];
tSirMacAddr selfMacAddr; struct cdf_mac_addr self_macaddr;
tSirMacAddr bssId; struct cdf_mac_addr bssid;
uint8_t action; uint8_t action;
} tSirRcvFltMcAddrList, *tpSirRcvFltMcAddrList; } tSirRcvFltMcAddrList, *tpSirRcvFltMcAddrList;
#endif /* WLAN_FEATURE_PACKET_FILTERING */ #endif /* WLAN_FEATURE_PACKET_FILTERING */

查看文件

@@ -7412,7 +7412,7 @@ CDF_STATUS sme_8023_multicast_list(tHalHandle hHal, uint8_t sessionId,
CDF_TRACE(CDF_MODULE_ID_SME, CDF_TRACE_LEVEL_INFO, "%s: " CDF_TRACE(CDF_MODULE_ID_SME, CDF_TRACE_LEVEL_INFO, "%s: "
"ulMulticastAddrCnt=%d, multicastAddr[0]=%p", __func__, "ulMulticastAddrCnt=%d, multicastAddr[0]=%p", __func__,
pMulticastAddrs->ulMulticastAddrCnt, pMulticastAddrs->ulMulticastAddrCnt,
pMulticastAddrs->multicastAddr[0]); pMulticastAddrs->multicastAddr[0].bytes);
/* /*
*Find the connected Infra / P2P_client connected session *Find the connected Infra / P2P_client connected session
@@ -7449,10 +7449,9 @@ CDF_STATUS sme_8023_multicast_list(tHalHandle hHal, uint8_t sessionId,
cdf_mem_copy(request_buf, pMulticastAddrs, cdf_mem_copy(request_buf, pMulticastAddrs,
sizeof(tSirRcvFltMcAddrList)); sizeof(tSirRcvFltMcAddrList));
cdf_mem_copy(request_buf->selfMacAddr, pSession->selfMacAddr.bytes, cdf_copy_macaddr(&request_buf->self_macaddr, &pSession->selfMacAddr);
sizeof(tSirMacAddr)); cdf_copy_macaddr(&request_buf->bssid,
cdf_mem_copy(request_buf->bssId, pSession->connectedProfile.bssid.bytes, &pSession->connectedProfile.bssid);
sizeof(tSirMacAddr));
msg.type = WMA_8023_MULTICAST_LIST_REQ; msg.type = WMA_8023_MULTICAST_LIST_REQ;
msg.reserved = 0; msg.reserved = 0;
@@ -7503,11 +7502,10 @@ CDF_STATUS sme_receive_filter_set_filter(tHalHandle hHal,
return CDF_STATUS_E_FAILURE; return CDF_STATUS_E_FAILURE;
} }
cdf_mem_copy(pRcvPktFilterCfg->selfMacAddr, pSession->selfMacAddr.bytes, cdf_copy_macaddr(&pRcvPktFilterCfg->self_macaddr,
sizeof(tSirMacAddr)); &pSession->selfMacAddr);
cdf_mem_copy(pRcvPktFilterCfg->bssId, cdf_copy_macaddr(&pRcvPktFilterCfg->bssid,
pSession->connectedProfile.bssid.bytes, &pSession->connectedProfile.bssid);
sizeof(tSirMacAddr));
cdf_mem_copy(request_buf, pRcvPktFilterCfg, allocSize); cdf_mem_copy(request_buf, pRcvPktFilterCfg, allocSize);
msg.type = WMA_RECEIVE_FILTER_SET_FILTER_REQ; msg.type = WMA_RECEIVE_FILTER_SET_FILTER_REQ;
@@ -7578,6 +7576,12 @@ CDF_STATUS sme_receive_filter_clear_filter(tHalHandle hHal,
CDF_TRACE(CDF_MODULE_ID_SME, CDF_TRACE_LEVEL_INFO, "%s: filterId = %d", CDF_TRACE(CDF_MODULE_ID_SME, CDF_TRACE_LEVEL_INFO, "%s: filterId = %d",
__func__, pRcvFltPktClearParam->filterId); __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)); request_buf = cdf_mem_malloc(sizeof(tSirRcvFltPktClearParam));
if (NULL == request_buf) { if (NULL == request_buf) {
CDF_TRACE(CDF_MODULE_ID_SME, CDF_TRACE_LEVEL_ERROR, CDF_TRACE(CDF_MODULE_ID_SME, CDF_TRACE_LEVEL_ERROR,
@@ -7585,18 +7589,11 @@ CDF_STATUS sme_receive_filter_clear_filter(tHalHandle hHal,
"Clear Filter request", __func__); "Clear Filter request", __func__);
return CDF_STATUS_E_NOMEM; 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, cdf_copy_macaddr(&pRcvFltPktClearParam->self_macaddr,
pSession->selfMacAddr.bytes, &pSession->selfMacAddr);
sizeof(tSirMacAddr)); cdf_copy_macaddr(&pRcvFltPktClearParam->bssid,
cdf_mem_copy(pRcvFltPktClearParam->bssId, &pSession->connectedProfile.bssid);
pSession->connectedProfile.bssid.bytes, sizeof(tSirMacAddr));
cdf_mem_copy(request_buf, pRcvFltPktClearParam, cdf_mem_copy(request_buf, pRcvFltPktClearParam,
sizeof(tSirRcvFltPktClearParam)); sizeof(tSirRcvFltPktClearParam));

查看文件

@@ -4402,9 +4402,10 @@ int wma_process_receive_filter_set_filter_req(tp_wma_handle wma,
uint8_t vdev_id; uint8_t vdev_id;
/* Get the 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", WMA_LOGE("vdev handle is invalid for %pM",
rcv_filter_param->bssId); rcv_filter_param->bssid.bytes);
return -EINVAL; return -EINVAL;
} }
@@ -4428,8 +4429,10 @@ int wma_process_receive_filter_clear_filter_req(tp_wma_handle wma,
uint8_t vdev_id; uint8_t vdev_id;
/* Get the vdev id */ /* Get the vdev id */
if (!wma_find_vdev_by_bssid(wma, rcv_clear_param->bssId, &vdev_id)) { if (!wma_find_vdev_by_bssid(wma,
WMA_LOGE("vdev handle is invalid for %pM", rcv_clear_param->bssId); rcv_clear_param->bssid.bytes, &vdev_id)) {
WMA_LOGE("vdev handle is invalid for %pM",
rcv_clear_param->bssid.bytes);
return -EINVAL; return -EINVAL;
} }
@@ -4542,7 +4545,8 @@ CDF_STATUS wma_process_tsm_stats_req(tp_wma_handle wma_handler,
* Return: 0 for success or error code * Return: 0 for success or error code
*/ */
static int wma_add_clear_mcbc_filter(tp_wma_handle wma_handle, uint8_t vdev_id, 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_SET_MCASTBCAST_FILTER_CMD_fixed_param *cmd;
wmi_buf_t buf; wmi_buf_t buf;
@@ -4564,7 +4568,7 @@ static int wma_add_clear_mcbc_filter(tp_wma_handle wma_handle, uint8_t vdev_id,
cmd->action = cmd->action =
(clearList ? WMI_MCAST_FILTER_DELETE : WMI_MCAST_FILTER_SET); (clearList ? WMI_MCAST_FILTER_DELETE : WMI_MCAST_FILTER_SET);
cmd->vdev_id = vdev_id; 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, err = wmi_unified_cmd_send(wma_handle->wmi_handle, buf,
sizeof(*cmd), sizeof(*cmd),
WMI_SET_MCASTBCAST_FILTER_CMDID); WMI_SET_MCASTBCAST_FILTER_CMDID);
@@ -4573,11 +4577,10 @@ static int wma_add_clear_mcbc_filter(tp_wma_handle wma_handle, uint8_t vdev_id,
cdf_mem_free(buf); cdf_mem_free(buf);
return -EIO; 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); cmd->action, vdev_id, clearList);
WMA_LOGD("MCBC MAC Addr: %0x:%0x:%0x:%0x:%0x:%0x\n", WMA_LOGD("MCBC MAC Addr: "MAC_ADDRESS_STR,
multicastAddr[0], multicastAddr[1], multicastAddr[2], MAC_ADDR_ARRAY(multicast_addr.bytes));
multicastAddr[3], multicastAddr[4], multicastAddr[5]);
return 0; return 0;
} }
@@ -4599,10 +4602,10 @@ CDF_STATUS wma_process_mcbc_set_filter_req(tp_wma_handle wma_handle,
return CDF_STATUS_E_FAILURE; return CDF_STATUS_E_FAILURE;
} }
if (!wma_find_vdev_by_addr if (!wma_find_vdev_by_addr(wma_handle,
(wma_handle, mcbc_param->selfMacAddr, &vdev_id)) { mcbc_param->self_macaddr.bytes, &vdev_id)) {
WMA_LOGE("%s: Failed to find vdev id for %pM", __func__, WMA_LOGE("%s: Failed to find vdev id for %pM", __func__,
mcbc_param->bssId); mcbc_param->bssid.bytes);
return CDF_STATUS_E_FAILURE; return CDF_STATUS_E_FAILURE;
} }
/* set mcbc_param->action to clear MCList and reset /* set mcbc_param->action to clear MCList and reset