From d460329ba283ad54049de4fe4442275b676147ec Mon Sep 17 00:00:00 2001 From: Nachiket Kukade Date: Tue, 27 Feb 2018 18:21:53 +0530 Subject: [PATCH] qcacmn: 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. Use the correct bitmap sent by cld for disabling the hw filter. Change-Id: I465e2ec40b6fde8a9e99743a1b9979b67cce5408 CRs-Fixed: 2194973 --- wmi/src/wmi_unified_tlv.c | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/wmi/src/wmi_unified_tlv.c b/wmi/src/wmi_unified_tlv.c index 5489449cde9c..02d2396019b9 100644 --- a/wmi/src/wmi_unified_tlv.c +++ b/wmi/src/wmi_unified_tlv.c @@ -14542,11 +14542,16 @@ static QDF_STATUS send_conf_hw_filter_cmd_tlv(wmi_unified_t wmi, WMITLV_TAG_STRUC_wmi_hw_data_filter_cmd_fixed_param, WMITLV_GET_STRUCT_TLVLEN(wmi_hw_data_filter_cmd_fixed_param)); cmd->vdev_id = req->vdev_id; - cmd->enable = req->mode != PMO_HW_FILTER_DISABLED; - cmd->hw_filter_bitmap = req->mode; + cmd->enable = req->enable; + /* Set all modes in case of disable */ + if (!cmd->enable) + cmd->hw_filter_bitmap = ((uint32_t)~0U); + else + cmd->hw_filter_bitmap = req->mode_bitmap; - WMI_LOGD("configure hw filter (vdev_id: %d, mode: %d)", - req->vdev_id, req->mode); + WMI_LOGD("Send %s hw filter mode: 0x%X for vdev id %d", + req->enable ? "enable" : "disable", req->mode_bitmap, + req->vdev_id); status = wmi_unified_cmd_send(wmi, wmi_buf, sizeof(*cmd), WMI_HW_DATA_FILTER_CMDID);