summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNachiket Kukade <nkukade@codeaurora.org>2018-02-23 19:15:44 +0530
committerGerrit - the friendly Code Review server <code-review@localhost>2018-02-27 04:53:46 -0800
commit476c7f2c723045cbcd4920278fc5bc2e3e2a8926 (patch)
tree9348e97d1fb65983c400e3a5d3d86f02680f8b77
parent69d639c41e4abd8fc3287f3e5e1a9da80fd91b0a (diff)
qcacld-3.0: Send enable/disable flag separately in hw filter command
Before wow enable or pdev suspend host sets hardware filter bitmap and enables the filter via a command. But after resuming it sends bitmap as zero with filter disable. This is interpreted by Firmware as disable the modes set in the bitmap, so none of the modes are disabled. With this host will not receive bc/mc packets after disabling the hw filter, which it is expecting. Send the same bitmap after resume that was used before suspend. Change-Id: Ic7425274c9197e907404c3ca9ba0d5269ee51690 CRs-Fixed: 2194964
-rw-r--r--core/hdd/inc/wlan_hdd_power.h6
-rw-r--r--core/hdd/src/wlan_hdd_power.c15
-rw-r--r--core/mac/inc/sir_api.h10
-rw-r--r--core/sme/inc/sme_api.h2
-rw-r--r--core/sme/src/common/sme_api.c6
-rw-r--r--core/wma/inc/wma_internal.h4
-rw-r--r--core/wma/src/wma_features.c18
-rw-r--r--core/wma/src/wma_main.c2
8 files changed, 22 insertions, 41 deletions
diff --git a/core/hdd/inc/wlan_hdd_power.h b/core/hdd/inc/wlan_hdd_power.h
index c57e24ff6279..e27e3cdbbadb 100644
--- a/core/hdd/inc/wlan_hdd_power.h
+++ b/core/hdd/inc/wlan_hdd_power.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2012, 2014-2017 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2012, 2014-2018 The Linux Foundation. All rights reserved.
*
* Previously licensed under the ISC license by Qualcomm Atheros, Inc.
*
@@ -157,10 +157,12 @@ void hdd_conf_hostoffload(hdd_adapter_t *pAdapter, bool fenable);
* hdd_conf_hw_filter_mode() - configure the given mode for the given adapter
* @adapter: the adapter to configure the hw filter for
* @mode: the hw filter mode to configure
+ * @filter_enable: True: Enable HW filter, False: Disable
*
* Return: Errno
*/
-int hdd_conf_hw_filter_mode(hdd_adapter_t *adapter, enum hw_filter_mode mode);
+int hdd_conf_hw_filter_mode(hdd_adapter_t *adapter, enum hw_filter_mode mode,
+ bool filter_enable);
#ifdef WLAN_FEATURE_PACKET_FILTERING
int wlan_hdd_set_mc_addr_list(hdd_adapter_t *pAdapter, uint8_t set);
diff --git a/core/hdd/src/wlan_hdd_power.c b/core/hdd/src/wlan_hdd_power.c
index dc8e6b463c83..0228566ae2e1 100644
--- a/core/hdd/src/wlan_hdd_power.c
+++ b/core/hdd/src/wlan_hdd_power.c
@@ -661,13 +661,8 @@ void hdd_conf_hostoffload(hdd_adapter_t *pAdapter, bool fenable)
}
/* Configure DTIM hardware filter rules */
- {
- enum hw_filter_mode mode = pHddCtx->config->hw_filter_mode;
-
- if (!fenable)
- mode = HW_FILTER_DISABLED;
- hdd_conf_hw_filter_mode(pAdapter, mode);
- }
+ hdd_conf_hw_filter_mode(pAdapter, pHddCtx->config->hw_filter_mode,
+ fenable);
EXIT();
}
@@ -1057,7 +1052,8 @@ QDF_STATUS hdd_conf_arp_offload(hdd_adapter_t *pAdapter, bool fenable)
return QDF_STATUS_SUCCESS;
}
-int hdd_conf_hw_filter_mode(hdd_adapter_t *adapter, enum hw_filter_mode mode)
+int hdd_conf_hw_filter_mode(hdd_adapter_t *adapter, enum hw_filter_mode mode,
+ bool filter_enable)
{
QDF_STATUS status;
@@ -1067,7 +1063,8 @@ int hdd_conf_hw_filter_mode(hdd_adapter_t *adapter, enum hw_filter_mode mode)
}
status = sme_conf_hw_filter_mode(WLAN_HDD_GET_HAL_CTX(adapter),
- adapter->sessionId, mode);
+ adapter->sessionId, mode,
+ filter_enable);
return qdf_status_to_os_return(status);
}
diff --git a/core/mac/inc/sir_api.h b/core/mac/inc/sir_api.h
index 1d0d55508b29..f7973808aa73 100644
--- a/core/mac/inc/sir_api.h
+++ b/core/mac/inc/sir_api.h
@@ -2914,16 +2914,6 @@ typedef struct sSirNsOffloadReq {
} tSirNsOffloadReq, *tpSirNsOffloadReq;
#endif /* WLAN_NS_OFFLOAD */
-/**
- * struct hw_filter_request - For enable/disable HW Filter
- * @mode_bitmap: the hardware filter mode to configure
- * @bssid: bss_id for get session.
- */
-struct hw_filter_request {
- uint8_t mode_bitmap;
- struct qdf_mac_addr bssid;
-};
-
typedef struct sSirHostOffloadReq {
uint8_t offloadType;
uint8_t enableOrDisable;
diff --git a/core/sme/inc/sme_api.h b/core/sme/inc/sme_api.h
index a467d80a8afd..f32b087a953b 100644
--- a/core/sme/inc/sme_api.h
+++ b/core/sme/inc/sme_api.h
@@ -582,7 +582,7 @@ QDF_STATUS sme_set_host_offload(tHalHandle hHal, uint8_t sessionId,
* Return: QDF_STATUS
*/
QDF_STATUS sme_conf_hw_filter_mode(tHalHandle hal, uint8_t session_id,
- uint8_t mode_bitmap);
+ uint8_t mode_bitmap, bool filter_enable);
QDF_STATUS sme_set_keep_alive(tHalHandle hHal, uint8_t sessionId,
tpSirKeepAliveReq pRequest);
diff --git a/core/sme/src/common/sme_api.c b/core/sme/src/common/sme_api.c
index ee5e1b02c98f..ddf8d7d27401 100644
--- a/core/sme/src/common/sme_api.c
+++ b/core/sme/src/common/sme_api.c
@@ -6354,12 +6354,12 @@ QDF_STATUS sme_set_host_offload(tHalHandle hHal, uint8_t sessionId,
}
QDF_STATUS sme_conf_hw_filter_mode(tHalHandle hal, uint8_t session_id,
- uint8_t mode_bitmap)
+ uint8_t mode_bitmap, bool filter_enable)
{
tpAniSirGlobal pMac = PMAC_STRUCT(hal);
QDF_STATUS status;
tCsrRoamSession *session;
- struct hw_filter_request *req;
+ struct wmi_hw_filter_req_params *req;
cds_msg_t msg;
status = sme_acquire_global_lock(&pMac->sme);
@@ -6382,6 +6382,8 @@ QDF_STATUS sme_conf_hw_filter_mode(tHalHandle hal, uint8_t session_id,
return QDF_STATUS_E_NOMEM;
}
+ req->vdev_id = session_id;
+ req->enable = filter_enable;
req->mode_bitmap = mode_bitmap;
qdf_copy_macaddr(&req->bssid, &session->connectedProfile.bssid);
diff --git a/core/wma/inc/wma_internal.h b/core/wma/inc/wma_internal.h
index f9df5341bd16..fad9038e4306 100644
--- a/core/wma/inc/wma_internal.h
+++ b/core/wma/inc/wma_internal.h
@@ -1134,12 +1134,12 @@ QDF_STATUS wma_enable_arp_ns_offload(tp_wma_handle wma,
/**
* wma_conf_hw_filter_mode() - configure hw filter to the given mode
* @wma: wma handle
- * @req: hardware filter request
+ * @req: hardware filter request parameters
*
* Return: QDF_STATUS
*/
QDF_STATUS wma_conf_hw_filter_mode(tp_wma_handle wma,
- struct hw_filter_request *req);
+ struct wmi_hw_filter_req_params *req);
QDF_STATUS wma_process_cesium_enable_ind(tp_wma_handle wma);
diff --git a/core/wma/src/wma_features.c b/core/wma/src/wma_features.c
index 487e453b3ad1..1e5a69913db6 100644
--- a/core/wma/src/wma_features.c
+++ b/core/wma/src/wma_features.c
@@ -7388,28 +7388,18 @@ QDF_STATUS wma_enable_arp_ns_offload(tp_wma_handle wma,
}
QDF_STATUS wma_conf_hw_filter_mode(tp_wma_handle wma,
- struct hw_filter_request *req)
+ struct wmi_hw_filter_req_params *req)
{
QDF_STATUS status;
- uint8_t vdev_id;
-
- /* Get the vdev id */
- if (!wma_find_vdev_by_bssid(wma, req->bssid.bytes, &vdev_id)) {
- WMA_LOGE("vdev handle is invalid for %pM",
- req->bssid.bytes);
- qdf_mem_free(req);
- return QDF_STATUS_E_INVAL;
- }
- if (!wma->interfaces[vdev_id].vdev_up) {
+ if (!wma->interfaces[req->vdev_id].vdev_up) {
WMA_LOGE("vdev %d is not up skipping enable Broadcast Filter",
- vdev_id);
+ req->vdev_id);
qdf_mem_free(req);
return QDF_STATUS_E_FAILURE;
}
- status = wmi_unified_conf_hw_filter_mode_cmd(wma->wmi_handle, vdev_id,
- req->mode_bitmap);
+ status = wmi_unified_conf_hw_filter_mode_cmd(wma->wmi_handle, req);
if (QDF_IS_STATUS_ERROR(status))
WMA_LOGE("Failed to enable/disable Broadcast Filter");
diff --git a/core/wma/src/wma_main.c b/core/wma/src/wma_main.c
index 488a8bbfa209..b677d6499dce 100644
--- a/core/wma/src/wma_main.c
+++ b/core/wma/src/wma_main.c
@@ -8162,7 +8162,7 @@ QDF_STATUS wma_mc_process_msg(void *cds_context, cds_msg_t *msg)
qdf_mem_free(msg->bodyptr);
break;
case WMA_CONF_HW_FILTER: {
- struct hw_filter_request *req = msg->bodyptr;
+ struct wmi_hw_filter_req_params *req = msg->bodyptr;
qdf_status = wma_conf_hw_filter_mode(wma_handle, req);
break;