From 71caa0734a29192dcc9c63525d2267130d8b0d23 Mon Sep 17 00:00:00 2001 From: c_manjee Date: Wed, 11 Jan 2017 16:32:49 +0530 Subject: qcacmn: CL 2776384 - update fw common interface files wmi changes for ANQP randomization Change-Id: I49e59125320ce5f079b8dc6c86d4b43775829238 CRs-Fixed: 865207 --- wmi/src/wmi_unified.c | 1 + 1 file changed, 1 insertion(+) diff --git a/wmi/src/wmi_unified.c b/wmi/src/wmi_unified.c index f1e99b27ae01..0c784a6b8da8 100644 --- a/wmi/src/wmi_unified.c +++ b/wmi/src/wmi_unified.c @@ -1652,6 +1652,7 @@ static uint8_t *wmi_id_to_name(uint32_t wmi_command) CASE_RETURN_STRING(WMI_11D_SCAN_STOP_CMDID); CASE_RETURN_STRING(WMI_REQUEST_RADIO_CHAN_STATS_CMDID); CASE_RETURN_STRING(WMI_ROAM_PER_CONFIG_CMDID); + CASE_RETURN_STRING(WMI_VDEV_ADD_MAC_ADDR_TO_RX_FILTER_CMDID); } return "Invalid WMI cmd"; -- cgit v1.2.3 From 8b23bb07693b8db24921b1e35cb38bfbc43da4aa Mon Sep 17 00:00:00 2001 From: c_manjee Date: Wed, 11 Jan 2017 17:19:26 +0530 Subject: qcacmn: CL 2779193 - update fw common interface files WMI changes for active APF and hw data filtering requirement Change-Id: Ifacb8c220e9f3a3c44136e9c937ea4e6b387ea5f CRs-Fixed: 865207 --- wmi/src/wmi_unified.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/wmi/src/wmi_unified.c b/wmi/src/wmi_unified.c index 0c784a6b8da8..8845ec14e1ff 100644 --- a/wmi/src/wmi_unified.c +++ b/wmi/src/wmi_unified.c @@ -1653,6 +1653,8 @@ static uint8_t *wmi_id_to_name(uint32_t wmi_command) CASE_RETURN_STRING(WMI_REQUEST_RADIO_CHAN_STATS_CMDID); CASE_RETURN_STRING(WMI_ROAM_PER_CONFIG_CMDID); CASE_RETURN_STRING(WMI_VDEV_ADD_MAC_ADDR_TO_RX_FILTER_CMDID); + CASE_RETURN_STRING(WMI_BPF_SET_VDEV_ACTIVE_MODE_CMDID); + CASE_RETURN_STRING(WMI_HW_DATA_FILTER_CMDID); } return "Invalid WMI cmd"; -- cgit v1.2.3 From 59e53adca11a786cfd12c7b3e51e48865e29d6ab Mon Sep 17 00:00:00 2001 From: qcabuildsw Date: Thu, 26 Jan 2017 16:27:41 -0800 Subject: Release 5.1.0.27A Release 5.1.0.27A Change-Id: I1b83c43f4f504b32761d03789d7936f9234fa391 CRs-Fixed: 688141 --- VERSION.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/VERSION.txt b/VERSION.txt index c5b29b96eaea..b592bba40c3f 100644 --- a/VERSION.txt +++ b/VERSION.txt @@ -1,2 +1,2 @@ -Current Component wlan-cmn.driver.lnx.1.0 version 5.1.0.27 +Current Component wlan-cmn.driver.lnx.1.0 version 5.1.0.27A Matches Component wlan-cld3.driver.lnx.1.1 version 5.1.0.22D -- cgit v1.2.3 From bfe57ac2e249d384254bf46fe5574c0f9224c720 Mon Sep 17 00:00:00 2001 From: Mohit Khanna Date: Thu, 19 Jan 2017 21:15:35 -0800 Subject: qcacmn: modify HIF NAPI blacklist mechanism The existing HIF NAPI blacklist feature uses irq_blacklist_on(off) APIs which make a call to the userspace irq_balancer. Replace these APIs with kernel API irq_modify_status to mark (or unmark) the individual interrupts with IRQ_NO_BALANCING flag. Once marked, the msm-irq-balancer will not be able to move the CE interrupts around. Change-Id: I4d780fa8780b42a668006e13a49eb1299304e633 CRs-Fixed: 1114161 --- hif/inc/hif_napi.h | 4 +-- hif/src/hif_napi.c | 95 ++++++++++++++++++++++++++++++++++++++++-------------- 2 files changed, 72 insertions(+), 27 deletions(-) diff --git a/hif/inc/hif_napi.h b/hif/inc/hif_napi.h index ebf9dff179d9..3ff8a3c2e02f 100644 --- a/hif/inc/hif_napi.h +++ b/hif/inc/hif_napi.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2016 The Linux Foundation. All rights reserved. + * Copyright (c) 2015-2017 The Linux Foundation. All rights reserved. * * Previously licensed under the ISC license by Qualcomm Atheros, Inc. * @@ -173,7 +173,7 @@ enum qca_blacklist_op { BLACKLIST_ON }; -int hif_napi_cpu_blacklist(uint8_t flags, enum qca_blacklist_op op); +int hif_napi_cpu_blacklist(struct qca_napi_data *napid, enum qca_blacklist_op op); /** * Local interface to HIF implemented functions of NAPI CPU affinity management. * Note: diff --git a/hif/src/hif_napi.c b/hif/src/hif_napi.c index 2209b2bd9a7b..46b87e5e89d4 100644 --- a/hif/src/hif_napi.c +++ b/hif/src/hif_napi.c @@ -39,6 +39,7 @@ #include #include #include +#include #ifdef HELIUMPLUS #include #include @@ -76,7 +77,8 @@ static int hif_napi_cpu_migrate(struct qca_napi_data *napid, int cpu, return 0; } -int hif_napi_cpu_blacklist(uint8_t flags, enum qca_blacklist_op op) +int hif_napi_cpu_blacklist(struct qca_napi_data *napid, + enum qca_blacklist_op op) { return 0; } @@ -597,22 +599,21 @@ int hif_napi_event(struct hif_opaque_softc *hif_ctx, enum qca_napi_event event, }; /* switch */ - qdf_spin_unlock_bh(&(napid->lock)); - - /* Call this API without spin_locks hif_napi_cpu_blacklist */ switch (blacklist_pending) { case BLACKLIST_ON_PENDING: /* assume the control of WLAN IRQs */ - hif_napi_cpu_blacklist(napid->flags, BLACKLIST_ON); + hif_napi_cpu_blacklist(napid, BLACKLIST_ON); break; case BLACKLIST_OFF_PENDING: /* yield the control of WLAN IRQs */ - hif_napi_cpu_blacklist(napid->flags, BLACKLIST_OFF); + hif_napi_cpu_blacklist(napid, BLACKLIST_OFF); break; default: /* nothing to do */ break; } /* switch blacklist_pending */ + qdf_spin_unlock_bh(&(napid->lock)); + if (prev_state != napid->state) { if (napid->state == ENABLE_NAPI_MASK) { rc = 1; @@ -727,15 +728,19 @@ bool hif_napi_correct_cpu(struct qca_napi_info *napi_info) if (napid->flags & QCA_NAPI_FEATURE_CPU_CORRECTION) { cpu = qdf_get_cpu(); - if (unlikely((hif_napi_cpu_blacklist(napid->flags, + if (unlikely((hif_napi_cpu_blacklist(napid, BLACKLIST_QUERY) > 0) && (cpu != napi_info->cpu))) { right_cpu = false; NAPI_DEBUG("interrupt on wrong CPU, correcting"); cpumask.bits[0] = (0x01 << napi_info->cpu); + + irq_modify_status(napi_info->irq, IRQ_NO_BALANCING, 0); rc = irq_set_affinity_hint(napi_info->irq, &cpumask); + irq_modify_status(napi_info->irq, 0, IRQ_NO_BALANCING); + if (rc) HIF_ERROR("error setting irq affinity hint: %d", rc); else @@ -903,9 +908,10 @@ void hif_napi_update_yield_stats(struct CE_state *ce_state, return; } else { napi_data = &(hif->napi_data); - if (unlikely(NULL == napi_data)) + if (unlikely(NULL == napi_data)) { QDF_ASSERT(NULL != napi_data); - return; + return; + } } ce_id = ce_state->id; @@ -1326,6 +1332,8 @@ static int hncm_migrate_to(struct qca_napi_data *napid, NAPI_DEBUG("-->%s(napi_cd=%d, didx=%d)", __func__, napi_ce, didx); cpumask.bits[0] = (1 << didx); + + irq_modify_status(napid->napis[napi_ce].irq, IRQ_NO_BALANCING, 0); rc = irq_set_affinity_hint(napid->napis[napi_ce].irq, &cpumask); /* unmark the napis bitmap in the cpu table */ @@ -1483,20 +1491,56 @@ hncm_return: return rc; } + +/** + * hif_napi_bl_irq() - calls irq_modify_status to enable/disable blacklisting + * @napid: pointer to qca_napi_data structure + * @bl_flag: blacklist flag to enable/disable blacklisting + * + * The function enables/disables blacklisting for all the copy engine + * interrupts on which NAPI is enabled. + * + * Return: None + */ +static inline void hif_napi_bl_irq(struct qca_napi_data *napid, bool bl_flag) +{ + int i; + for (i = 0; i < CE_COUNT_MAX; i++) { + /* check if NAPI is enabled on the CE */ + if (!(napid->ce_map & (0x01 << i))) + continue; + + if (bl_flag == true) + irq_modify_status(napid->napis[i].irq, + 0, IRQ_NO_BALANCING); + else + irq_modify_status(napid->napis[i].irq, + IRQ_NO_BALANCING, 0); + HIF_INFO("%s: bl_flag %d CE %d", __func__, bl_flag, i); + } +} + /** - * hif_napi_cpu_blacklist() - calls kernel API to enable/disable blacklisting - * @flags: NAPI feature flags + * hif_napi_cpu_blacklist() - en(dis)ables blacklisting for NAPI RX interrupts. + * @napid: pointer to qca_napi_data structure * @op: blacklist operation to perform * + * The function enables/disables/queries blacklisting for all CE RX + * interrupts with NAPI enabled. Besides blacklisting, it also enables/disables + * core_ctl_set_boost. + * Once blacklisting is enabled, the interrupts will not be managed by the IRQ + * balancer. + * * Return: -EINVAL, in case IRQ_BLACKLISTING and CORE_CTL_BOOST is not enabled * for BLACKLIST_QUERY op - blacklist refcount - * for BLACKLIST_ON op - return value from kernel blacklist API - * for BLACKLIST_OFF op - return value from kernel blacklist API + * for BLACKLIST_ON op - return value from core_ctl_set_boost API + * for BLACKLIST_OFF op - return value from core_ctl_set_boost API */ -int hif_napi_cpu_blacklist(uint8_t flags, enum qca_blacklist_op op) +int hif_napi_cpu_blacklist(struct qca_napi_data *napid, enum qca_blacklist_op op) { int rc = 0; static int ref_count; /* = 0 by the compiler */ + uint8_t flags = napid->flags; bool bl_en = flags & QCA_NAPI_FEATURE_IRQ_BLACKLISTING; bool ccb_en = flags & QCA_NAPI_FEATURE_CORE_CTL_BOOST; @@ -1513,22 +1557,23 @@ int hif_napi_cpu_blacklist(uint8_t flags, enum qca_blacklist_op op) break; case BLACKLIST_ON: ref_count++; - rc = irq_blacklist_on(); - NAPI_DEBUG("blacklist_on() returns %d", rc); - - rc = core_ctl_set_boost(true); - NAPI_DEBUG("boost_on() returns %d - refcnt=%d", rc, ref_count); + rc = 0; + if (ref_count == 1) { + rc = core_ctl_set_boost(true); + NAPI_DEBUG("boost_on() returns %d - refcnt=%d", + rc, ref_count); + hif_napi_bl_irq(napid, true); + } break; - case BLACKLIST_OFF: - while (ref_count > 0) { - rc = irq_blacklist_off(); - NAPI_DEBUG("blacklist_off() returns %d", rc); - + if (ref_count) + ref_count--; + rc = 0; + if (ref_count == 0) { rc = core_ctl_set_boost(false); NAPI_DEBUG("boost_off() returns %d - refcnt=%d", rc, ref_count); - ref_count--; + hif_napi_bl_irq(napid, false); } break; default: -- cgit v1.2.3 From 00c10f123a97a6af6de1e867fd2d7f397be1b484 Mon Sep 17 00:00:00 2001 From: qcabuildsw Date: Thu, 26 Jan 2017 18:59:56 -0800 Subject: Release 5.1.0.27B Release 5.1.0.27B Change-Id: I559e55fa311c542afb6ead0947f0d3cfe31eff7b CRs-Fixed: 688141 --- VERSION.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/VERSION.txt b/VERSION.txt index b592bba40c3f..60fdbbcdf475 100644 --- a/VERSION.txt +++ b/VERSION.txt @@ -1,2 +1,2 @@ -Current Component wlan-cmn.driver.lnx.1.0 version 5.1.0.27A +Current Component wlan-cmn.driver.lnx.1.0 version 5.1.0.27B Matches Component wlan-cld3.driver.lnx.1.1 version 5.1.0.22D -- cgit v1.2.3 From ca172ff64dc81b8f24155f1544db92cae5cd41f7 Mon Sep 17 00:00:00 2001 From: Himanshu Agarwal Date: Wed, 25 Jan 2017 18:54:11 +0530 Subject: qcacmn: Add msdu index for tso stats in msdu info Add msdu index for tso stats in msdu info. Change-Id: I37413ab7ccf6bd5171815af0038401925aa7831b CRs-Fixed: 1114150 --- qdf/inc/qdf_types.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/qdf/inc/qdf_types.h b/qdf/inc/qdf_types.h index 543cec5bfeaf..ad26a54acc7f 100644 --- a/qdf/inc/qdf_types.h +++ b/qdf/inc/qdf_types.h @@ -597,6 +597,7 @@ struct qdf_tso_num_seg_elem_t { * @tso_seg_list: list of TSO segments for this jumbo packet * @curr_seg: segment that is currently being processed * @tso_num_seg_list: num of tso seg for this jumbo packet + * @msdu_stats_idx: msdu index for tso stats * * This structure holds the TSO information extracted after parsing the TSO * jumbo network buffer. It contains a chain of the TSO segments belonging to @@ -608,6 +609,7 @@ struct qdf_tso_info_t { struct qdf_tso_seg_elem_t *tso_seg_list; struct qdf_tso_seg_elem_t *curr_seg; struct qdf_tso_num_seg_elem_t *tso_num_seg_list; + uint32_t msdu_stats_idx; }; /** -- cgit v1.2.3 From fb277e61a901c8717830ac6a0115738741f12587 Mon Sep 17 00:00:00 2001 From: qcabuildsw Date: Thu, 26 Jan 2017 23:09:30 -0800 Subject: Release 5.1.0.27C Release 5.1.0.27C Change-Id: I17a418b687199e85e20605f0d89fed56049e51b4 CRs-Fixed: 688141 --- VERSION.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/VERSION.txt b/VERSION.txt index 60fdbbcdf475..52ee2778fdcd 100644 --- a/VERSION.txt +++ b/VERSION.txt @@ -1,2 +1,2 @@ -Current Component wlan-cmn.driver.lnx.1.0 version 5.1.0.27B +Current Component wlan-cmn.driver.lnx.1.0 version 5.1.0.27C Matches Component wlan-cld3.driver.lnx.1.1 version 5.1.0.22D -- cgit v1.2.3 From 367683896e2af0b4b6c7adf8530af5f5010950e8 Mon Sep 17 00:00:00 2001 From: Srinivas Girigowda Date: Wed, 7 Dec 2016 14:32:24 -0800 Subject: qcacmn: Add boundary check for number of APs Add boundary check for number of APs. Change-Id: I41e36d11bc3e71928866a27afc2fbf046b59f0f5 CRs-Fixed: 1095770 --- wmi/src/wmi_unified_tlv.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/wmi/src/wmi_unified_tlv.c b/wmi/src/wmi_unified_tlv.c index d8c6f699f335..1085e9098981 100644 --- a/wmi/src/wmi_unified_tlv.c +++ b/wmi/src/wmi_unified_tlv.c @@ -11080,8 +11080,8 @@ QDF_STATUS send_get_buf_extscan_hotlist_cmd_tlv(wmi_unified_t wmi_handle, /* setbssid hotlist expects the bssid list * to be non zero value */ - if (!numap) { - WMI_LOGE("%s: Invalid number of bssid's", __func__); + if ((numap <= 0) || (numap > WMI_WLAN_EXTSCAN_MAX_HOTLIST_APS)) { + WMI_LOGE("Invalid number of APs: %d", numap); return QDF_STATUS_E_INVAL; } -- cgit v1.2.3 From d4c3f4f21735897f4b6914d427fc55d39892b769 Mon Sep 17 00:00:00 2001 From: qcabuildsw Date: Sat, 28 Jan 2017 01:12:14 -0800 Subject: Release 5.1.0.27D Release 5.1.0.27D Change-Id: Ie661266207c90b6e3a7899860bb72e722251e6e8 CRs-Fixed: 688141 --- VERSION.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/VERSION.txt b/VERSION.txt index 52ee2778fdcd..dd0a8dfed75a 100644 --- a/VERSION.txt +++ b/VERSION.txt @@ -1,2 +1,2 @@ -Current Component wlan-cmn.driver.lnx.1.0 version 5.1.0.27C +Current Component wlan-cmn.driver.lnx.1.0 version 5.1.0.27D Matches Component wlan-cld3.driver.lnx.1.1 version 5.1.0.22D -- cgit v1.2.3 From a31029197f34c0e68ca42f08509685f2e1e33f71 Mon Sep 17 00:00:00 2001 From: Dustin Brown Date: Fri, 13 Jan 2017 15:24:07 -0800 Subject: qcacmn: Add APIs to configure Active BPF Mode Active Mode Berkeley Packet Filter (Active BPF) is a new feature that allows firmware to apply BPF even while the Apps processor is active. There are 3 modes: * Disabled: do not apply BPF in active mode * Enabled: apply BPF to all packets in active mode * Adaptive: apply BPF up to some threshold to avoid performance impact Add WMI APIs and related logic to support configuration of Active BPF Mode. Change-Id: I8c0778b3fa73d148422aa103b0fc0950433fec95 CRs-Fixed: 1111400 --- wmi/inc/wmi_unified_api.h | 14 ++++++++++++++ wmi/inc/wmi_unified_priv.h | 5 +++++ wmi/inc/wmi_unified_tlv.h | 16 ++++++++++++++++ wmi/src/wmi_unified_api.c | 18 +++++++++++++++++ wmi/src/wmi_unified_tlv.c | 48 ++++++++++++++++++++++++++++++++++++++++++++++ 5 files changed, 101 insertions(+) diff --git a/wmi/inc/wmi_unified_api.h b/wmi/inc/wmi_unified_api.h index 32e38f46fc57..ce83cf445aa4 100644 --- a/wmi/inc/wmi_unified_api.h +++ b/wmi/inc/wmi_unified_api.h @@ -900,6 +900,20 @@ QDF_STATUS wmi_unified_get_buf_extscan_hotlist_cmd(void *wmi_hdl, struct ext_scan_setbssi_hotlist_params * photlist, int *buf_len); +/** + * wmi_unified_set_active_bpf_mode_cmd() - config active BPF mode in FW + * @wmi_hdl: the WMI handle + * @vdev_id: the Id of the vdev to apply the configuration to + * @ucast_mode: the active BPF mode to configure for unicast packets + * @mcast_bcast_mode: the active BPF mode to configure for multicast/broadcast + * packets + */ +QDF_STATUS +wmi_unified_set_active_bpf_mode_cmd(void *wmi_hdl, + uint8_t vdev_id, + FW_ACTIVE_BPF_MODE ucast_mode, + FW_ACTIVE_BPF_MODE mcast_bcast_mode); + QDF_STATUS wmi_unified_stats_request_send(void *wmi_hdl, uint8_t macaddr[IEEE80211_ADDR_LEN], struct stats_request_params *param); diff --git a/wmi/inc/wmi_unified_priv.h b/wmi/inc/wmi_unified_priv.h index 59a1511f41d8..639b42ec91a4 100644 --- a/wmi/inc/wmi_unified_priv.h +++ b/wmi/inc/wmi_unified_priv.h @@ -717,6 +717,11 @@ QDF_STATUS (*send_get_buf_extscan_hotlist_cmd)(wmi_unified_t wmi_handle, struct ext_scan_setbssi_hotlist_params * photlist, int *buf_len); +QDF_STATUS (*send_set_active_bpf_mode_cmd)(wmi_unified_t wmi_handle, + uint8_t vdev_id, + FW_ACTIVE_BPF_MODE ucast_mode, + FW_ACTIVE_BPF_MODE mcast_bcast_mode); + QDF_STATUS (*send_pdev_get_tpc_config_cmd)(wmi_unified_t wmi_handle, uint32_t param); diff --git a/wmi/inc/wmi_unified_tlv.h b/wmi/inc/wmi_unified_tlv.h index f18cf8c61779..8d0539070c70 100644 --- a/wmi/inc/wmi_unified_tlv.h +++ b/wmi/inc/wmi_unified_tlv.h @@ -585,5 +585,21 @@ QDF_STATUS send_per_roam_config_cmd_tlv(wmi_unified_t wmi_handle, QDF_STATUS send_get_buf_extscan_hotlist_cmd_tlv(wmi_unified_t wmi_handle, struct ext_scan_setbssi_hotlist_params * photlist, int *buf_len); + +/** + * send_set_active_bpf_mode_cmd_tlv() - configure active BPF mode in FW + * @wmi_handle: the WMI handle + * @vdev_id: the Id of the vdev to apply the configuration to + * @ucast_mode: the active BPF mode to configure for unicast packets + * @mcast_bcast_mode: the active BPF mode to configure for multicast/broadcast + * packets + * + * Return: QDF status + */ +QDF_STATUS +send_set_active_bpf_mode_cmd_tlv(wmi_unified_t wmi_handle, + uint8_t vdev_id, + FW_ACTIVE_BPF_MODE ucast_mode, + FW_ACTIVE_BPF_MODE mcast_bcast_mode); #endif diff --git a/wmi/src/wmi_unified_api.c b/wmi/src/wmi_unified_api.c index 2d8c9767a610..fbe555458a19 100644 --- a/wmi/src/wmi_unified_api.c +++ b/wmi/src/wmi_unified_api.c @@ -3481,6 +3481,24 @@ QDF_STATUS wmi_unified_get_buf_extscan_hotlist_cmd(void *wmi_hdl, return QDF_STATUS_E_FAILURE; } +QDF_STATUS +wmi_unified_set_active_bpf_mode_cmd(void *wmi_hdl, + uint8_t vdev_id, + FW_ACTIVE_BPF_MODE ucast_mode, + FW_ACTIVE_BPF_MODE mcast_bcast_mode) +{ + wmi_unified_t wmi = (wmi_unified_t)wmi_hdl; + + if (!wmi->ops->send_set_active_bpf_mode_cmd) { + WMI_LOGI("send_set_active_bpf_mode_cmd op is NULL"); + return QDF_STATUS_E_FAILURE; + } + + return wmi->ops->send_set_active_bpf_mode_cmd(wmi, vdev_id, + ucast_mode, + mcast_bcast_mode); +} + /** * wmi_unified_pdev_get_tpc_config_cmd_send() - WMI get tpc config function * @param wmi_handle : handle to WMI. diff --git a/wmi/src/wmi_unified_tlv.c b/wmi/src/wmi_unified_tlv.c index 1085e9098981..da3e0751a2f7 100644 --- a/wmi/src/wmi_unified_tlv.c +++ b/wmi/src/wmi_unified_tlv.c @@ -11166,6 +11166,53 @@ QDF_STATUS send_get_buf_extscan_hotlist_cmd_tlv(wmi_unified_t wmi_handle, return QDF_STATUS_SUCCESS; } +QDF_STATUS send_set_active_bpf_mode_cmd_tlv(wmi_unified_t wmi_handle, + uint8_t vdev_id, + FW_ACTIVE_BPF_MODE ucast_mode, + FW_ACTIVE_BPF_MODE mcast_bcast_mode) +{ + const WMITLV_TAG_ID tag_id = + WMITLV_TAG_STRUC_wmi_bpf_set_vdev_active_mode_cmd_fixed_param; + const uint32_t tlv_len = WMITLV_GET_STRUCT_TLVLEN( + wmi_bpf_set_vdev_active_mode_cmd_fixed_param); + QDF_STATUS status; + wmi_bpf_set_vdev_active_mode_cmd_fixed_param *cmd; + wmi_buf_t buf; + + WMI_LOGI("Sending WMI_BPF_SET_VDEV_ACTIVE_MODE_CMDID(%u, %d, %d)", + vdev_id, ucast_mode, mcast_bcast_mode); + + /* allocate command buffer */ + buf = wmi_buf_alloc(wmi_handle, sizeof(*cmd)); + if (!buf) { + WMI_LOGE("%s: wmi_buf_alloc failed", __func__); + return QDF_STATUS_E_NOMEM; + } + + /* set TLV header */ + cmd = (wmi_bpf_set_vdev_active_mode_cmd_fixed_param *)wmi_buf_data(buf); + WMITLV_SET_HDR(&cmd->tlv_header, tag_id, tlv_len); + + /* populate data */ + cmd->vdev_id = vdev_id; + cmd->uc_mode = ucast_mode; + cmd->mcbc_mode = mcast_bcast_mode; + + /* send to FW */ + status = wmi_unified_cmd_send(wmi_handle, buf, sizeof(*cmd), + WMI_BPF_SET_VDEV_ACTIVE_MODE_CMDID); + if (QDF_IS_STATUS_ERROR(status)) { + WMI_LOGE("Failed to send WMI_BPF_SET_VDEV_ACTIVE_MODE_CMDID:%d", + status); + wmi_buf_free(buf); + return status; + } + + WMI_LOGI("Sent WMI_BPF_SET_VDEV_ACTIVE_MODE_CMDID successfully"); + + return QDF_STATUS_SUCCESS; +} + /** * send_power_dbg_cmd_tlv() - send power debug commands * @wmi_handle: wmi handle @@ -12709,6 +12756,7 @@ struct wmi_ops tlv_ops = { send_roam_scan_offload_rssi_change_cmd_tlv, .send_get_buf_extscan_hotlist_cmd = send_get_buf_extscan_hotlist_cmd_tlv, + .send_set_active_bpf_mode_cmd = send_set_active_bpf_mode_cmd_tlv, .send_adapt_dwelltime_params_cmd = send_adapt_dwelltime_params_cmd_tlv, .init_cmd_send = init_cmd_send_tlv, -- cgit v1.2.3 From 88322d23ecaceeea06a3726a544bbc845b5f99b0 Mon Sep 17 00:00:00 2001 From: qcabuildsw Date: Sat, 28 Jan 2017 04:50:15 -0800 Subject: Release 5.1.0.27E Release 5.1.0.27E Change-Id: I2297b21a65290057b2316ce4abdd59cc53b82d86 CRs-Fixed: 688141 --- VERSION.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/VERSION.txt b/VERSION.txt index dd0a8dfed75a..f4112ea6c411 100644 --- a/VERSION.txt +++ b/VERSION.txt @@ -1,2 +1,2 @@ -Current Component wlan-cmn.driver.lnx.1.0 version 5.1.0.27D +Current Component wlan-cmn.driver.lnx.1.0 version 5.1.0.27E Matches Component wlan-cld3.driver.lnx.1.1 version 5.1.0.22D -- cgit v1.2.3 From 55864b958d0b76cc2fbb161e847b8ce624444936 Mon Sep 17 00:00:00 2001 From: c_manjee Date: Mon, 23 Jan 2017 15:14:13 +0530 Subject: qcacmn: Send Grat-ARP Keep Alive request to FW Setting Gratious ARP request through iwpriv command is not supported. Add condition to set Gratious ARP request as method in Keep Alive functionality CRs-Fixed: 1114602 Change-Id: I299d39131e7ab0ebae6bd10f41bc4549debda048 --- wmi/src/wmi_unified_tlv.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/wmi/src/wmi_unified_tlv.c b/wmi/src/wmi_unified_tlv.c index da3e0751a2f7..fe037cdaa0d5 100644 --- a/wmi/src/wmi_unified_tlv.c +++ b/wmi/src/wmi_unified_tlv.c @@ -3408,7 +3408,9 @@ QDF_STATUS send_set_sta_keep_alive_cmd_tlv(wmi_unified_t wmi_handle, WMITLV_TAG_STRUC_WMI_STA_KEEPALVE_ARP_RESPONSE, WMITLV_GET_STRUCT_TLVLEN(WMI_STA_KEEPALVE_ARP_RESPONSE)); - if (params->method == WMI_KEEP_ALIVE_UNSOLICIT_ARP_RSP) { + if ((params->method == WMI_KEEP_ALIVE_UNSOLICIT_ARP_RSP) || + (params->method == + WMI_STA_KEEPALIVE_METHOD_GRATUITOUS_ARP_REQUEST)) { if ((NULL == params->hostv4addr) || (NULL == params->destv4addr) || (NULL == params->destmac)) { @@ -3418,7 +3420,7 @@ QDF_STATUS send_set_sta_keep_alive_cmd_tlv(wmi_unified_t wmi_handle, wmi_buf_free(buf); return QDF_STATUS_E_FAILURE; } - cmd->method = WMI_STA_KEEPALIVE_METHOD_UNSOLICITED_ARP_RESPONSE; + cmd->method = params->method; qdf_mem_copy(&arp_rsp->sender_prot_addr, params->hostv4addr, WMI_IPV4_ADDR_LEN); qdf_mem_copy(&arp_rsp->target_prot_addr, params->destv4addr, -- cgit v1.2.3 From d8259be533b014c6c3a1f4fd3e8ac6c28b427a90 Mon Sep 17 00:00:00 2001 From: qcabuildsw Date: Mon, 30 Jan 2017 05:38:32 -0800 Subject: Release 5.1.0.27F Release 5.1.0.27F Change-Id: I9c711618b0c63de5dac25bada88e4113feaa8b49 CRs-Fixed: 688141 --- VERSION.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/VERSION.txt b/VERSION.txt index f4112ea6c411..282a3a317fa8 100644 --- a/VERSION.txt +++ b/VERSION.txt @@ -1,2 +1,2 @@ -Current Component wlan-cmn.driver.lnx.1.0 version 5.1.0.27E +Current Component wlan-cmn.driver.lnx.1.0 version 5.1.0.27F Matches Component wlan-cld3.driver.lnx.1.1 version 5.1.0.22D -- cgit v1.2.3 From 58ac36258231d1cf273fba50c8c10e3b96eea21a Mon Sep 17 00:00:00 2001 From: Prashanth Bhatta Date: Thu, 19 Jan 2017 15:33:43 -0800 Subject: qcacmn: Change semantics of Runtime Lock APIs Runtime PM lock init API right now returns pointer to a context but this would cause confusion to the caller if feature is not defined and dummy function return NULL as caller can't find real failure versus dummy function returning because feature not being enabled. Fix declaring a data structure in QDF layer that caller can use but it hides the internal details of HIF implementation for Runtime PM locks. CRs-fixed: 1116509 Change-Id: I4dcba604e803faa0e14fac6403610391895e382e --- hif/inc/hif.h | 10 +++++----- hif/src/pcie/if_pci.c | 25 ++++++++++++------------- hif/src/pcie/if_pci.h | 4 ++-- qdf/inc/qdf_lock.h | 16 +++++++++++----- qdf/linux/src/qdf_lock.c | 25 +++++++++++++++---------- 5 files changed, 45 insertions(+), 35 deletions(-) diff --git a/hif/inc/hif.h b/hif/inc/hif.h index 775bb7f817de..4aa72e43c3fd 100644 --- a/hif/inc/hif.h +++ b/hif/inc/hif.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2013-2016 The Linux Foundation. All rights reserved. + * Copyright (c) 2013-2017 The Linux Foundation. All rights reserved. * * Previously licensed under the ISC license by Qualcomm Atheros, Inc. * @@ -573,7 +573,7 @@ struct hif_pm_runtime_lock; int hif_pm_runtime_get(struct hif_opaque_softc *hif_ctx); void hif_pm_runtime_get_noresume(struct hif_opaque_softc *hif_ctx); int hif_pm_runtime_put(struct hif_opaque_softc *hif_ctx); -struct hif_pm_runtime_lock *hif_runtime_lock_init(const char *name); +int hif_runtime_lock_init(qdf_runtime_lock_t *lock, const char *name); void hif_runtime_lock_deinit(struct hif_opaque_softc *hif_ctx, struct hif_pm_runtime_lock *lock); int hif_pm_runtime_prevent_suspend(struct hif_opaque_softc *ol_sc, @@ -594,9 +594,9 @@ static inline int hif_pm_runtime_get(struct hif_opaque_softc *hif_ctx) { return 0; } static inline int hif_pm_runtime_put(struct hif_opaque_softc *hif_ctx) { return 0; } -static inline struct hif_pm_runtime_lock *hif_runtime_lock_init( - const char *name) -{ return NULL; } +static inline int hif_runtime_lock_init(qdf_runtime_lock_t *lock, + const char *name) +{ return 0; } static inline void hif_runtime_lock_deinit(struct hif_opaque_softc *hif_ctx, struct hif_pm_runtime_lock *lock) {} diff --git a/hif/src/pcie/if_pci.c b/hif/src/pcie/if_pci.c index 022b0c552fa0..21a6b83edad1 100644 --- a/hif/src/pcie/if_pci.c +++ b/hif/src/pcie/if_pci.c @@ -1180,8 +1180,7 @@ static void hif_pm_runtime_open(struct hif_pci_softc *sc) spin_lock_init(&sc->runtime_lock); qdf_atomic_init(&sc->pm_state); - sc->prevent_linkdown_lock = - hif_runtime_lock_init("linkdown suspend disabled"); + qdf_runtime_lock_init(&sc->prevent_linkdown_lock); qdf_atomic_set(&sc->pm_state, HIF_PM_RUNTIME_STATE_NONE); INIT_LIST_HEAD(&sc->prevent_suspend_list); } @@ -1262,8 +1261,8 @@ static void hif_pm_runtime_close(struct hif_pci_softc *sc) if (qdf_atomic_read(&sc->pm_state) == HIF_PM_RUNTIME_STATE_NONE) return; - else - hif_pm_runtime_stop(sc); + + hif_pm_runtime_stop(sc); hif_is_recovery_in_progress(scn) ? hif_pm_runtime_sanitize_on_ssr_exit(sc) : @@ -2539,11 +2538,9 @@ static void hif_runtime_prevent_linkdown(struct hif_softc *scn, bool flag) struct hif_opaque_softc *hif_hdl = GET_HIF_OPAQUE_HDL(scn); if (flag) - hif_pm_runtime_prevent_suspend(hif_hdl, - sc->prevent_linkdown_lock); + qdf_runtime_pm_prevent_suspend(&sc->prevent_linkdown_lock); else - hif_pm_runtime_allow_suspend(hif_hdl, - sc->prevent_linkdown_lock); + qdf_runtime_pm_allow_suspend(&sc->prevent_linkdown_lock); } #else static void hif_runtime_prevent_linkdown(struct hif_softc *scn, bool flag) @@ -4064,21 +4061,23 @@ int hif_pm_runtime_prevent_suspend_timeout(struct hif_opaque_softc *ol_sc, * This API initalizes the Runtime PM context of the caller and * return the pointer. * - * Return: void * + * Return: None */ -struct hif_pm_runtime_lock *hif_runtime_lock_init(const char *name) +int hif_runtime_lock_init(qdf_runtime_lock_t *lock, const char *name) { struct hif_pm_runtime_lock *context; context = qdf_mem_malloc(sizeof(*context)); if (!context) { HIF_ERROR("%s: No memory for Runtime PM wakelock context\n", - __func__); - return NULL; + __func__); + return -ENOMEM; } context->name = name ? name : "Default"; - return context; + lock->lock = context; + + return 0; } /** diff --git a/hif/src/pcie/if_pci.h b/hif/src/pcie/if_pci.h index ab89f7d6d6ca..9c19b4a358dd 100644 --- a/hif/src/pcie/if_pci.h +++ b/hif/src/pcie/if_pci.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2013-2016 The Linux Foundation. All rights reserved. + * Copyright (c) 2013-2017 The Linux Foundation. All rights reserved. * * Previously licensed under the ISC license by Qualcomm Atheros, Inc. * @@ -137,7 +137,7 @@ struct hif_pci_softc { struct timer_list runtime_timer; struct list_head prevent_suspend_list; unsigned long runtime_timer_expires; - struct hif_pm_runtime_lock *prevent_linkdown_lock; + qdf_runtime_lock_t prevent_linkdown_lock; #ifdef WLAN_OPEN_SOURCE struct dentry *pm_dentry; #endif diff --git a/qdf/inc/qdf_lock.h b/qdf/inc/qdf_lock.h index b375ac781922..915f66ad6d2e 100644 --- a/qdf/inc/qdf_lock.h +++ b/qdf/inc/qdf_lock.h @@ -488,14 +488,20 @@ QDF_STATUS qdf_wake_lock_release(qdf_wake_lock_t *lock, uint32_t reason); QDF_STATUS qdf_wake_lock_destroy(qdf_wake_lock_t *lock); struct hif_pm_runtime_lock; -typedef struct hif_pm_runtime_lock *qdf_runtime_lock_t; +typedef struct qdf_runtime_lock { + struct hif_pm_runtime_lock *lock; +} qdf_runtime_lock_t; QDF_STATUS qdf_runtime_pm_get(void); QDF_STATUS qdf_runtime_pm_put(void); -QDF_STATUS qdf_runtime_pm_prevent_suspend(qdf_runtime_lock_t lock); -QDF_STATUS qdf_runtime_pm_allow_suspend(qdf_runtime_lock_t lock); -qdf_runtime_lock_t qdf_runtime_lock_init(const char *name); -void qdf_runtime_lock_deinit(qdf_runtime_lock_t lock); +QDF_STATUS qdf_runtime_pm_prevent_suspend(qdf_runtime_lock_t *lock); +QDF_STATUS qdf_runtime_pm_allow_suspend(qdf_runtime_lock_t *lock); + +QDF_STATUS __qdf_runtime_lock_init(qdf_runtime_lock_t *lock, const char *name); + +#define qdf_runtime_lock_init(lock) __qdf_runtime_lock_init(lock, #lock) + +void qdf_runtime_lock_deinit(qdf_runtime_lock_t *lock); QDF_STATUS qdf_spinlock_acquire(qdf_spinlock_t *lock); diff --git a/qdf/linux/src/qdf_lock.c b/qdf/linux/src/qdf_lock.c index ffddb53438dc..b05f43782eab 100644 --- a/qdf/linux/src/qdf_lock.c +++ b/qdf/linux/src/qdf_lock.c @@ -470,7 +470,7 @@ EXPORT_SYMBOL(qdf_runtime_pm_put); * * return: QDF_STATUS_SUCCESS or failure code. */ -QDF_STATUS qdf_runtime_pm_prevent_suspend(qdf_runtime_lock_t lock) +QDF_STATUS qdf_runtime_pm_prevent_suspend(qdf_runtime_lock_t *lock) { void *ol_sc; int ret; @@ -484,7 +484,7 @@ QDF_STATUS qdf_runtime_pm_prevent_suspend(qdf_runtime_lock_t lock) return QDF_STATUS_E_INVAL; } - ret = hif_pm_runtime_prevent_suspend(ol_sc, lock); + ret = hif_pm_runtime_prevent_suspend(ol_sc, lock->lock); if (ret) return QDF_STATUS_E_FAILURE; @@ -493,14 +493,14 @@ QDF_STATUS qdf_runtime_pm_prevent_suspend(qdf_runtime_lock_t lock) EXPORT_SYMBOL(qdf_runtime_pm_prevent_suspend); /** - * qdf_runtime_pm_prevent_suspend() - prevent a runtime bus suspend + * qdf_runtime_pm_allow_suspend() - prevent a runtime bus suspend * @lock: an opaque context for tracking * * The lock can only be acquired once per lock context and is tracked. * * return: QDF_STATUS_SUCCESS or failure code. */ -QDF_STATUS qdf_runtime_pm_allow_suspend(qdf_runtime_lock_t lock) +QDF_STATUS qdf_runtime_pm_allow_suspend(qdf_runtime_lock_t *lock) { void *ol_sc; int ret; @@ -513,7 +513,7 @@ QDF_STATUS qdf_runtime_pm_allow_suspend(qdf_runtime_lock_t lock) return QDF_STATUS_E_INVAL; } - ret = hif_pm_runtime_allow_suspend(ol_sc, lock); + ret = hif_pm_runtime_allow_suspend(ol_sc, lock->lock); if (ret) return QDF_STATUS_E_FAILURE; return QDF_STATUS_SUCCESS; @@ -530,11 +530,16 @@ EXPORT_SYMBOL(qdf_runtime_pm_allow_suspend); * * Return: runtime_pm_lock_t */ -qdf_runtime_lock_t qdf_runtime_lock_init(const char *name) +QDF_STATUS __qdf_runtime_lock_init(qdf_runtime_lock_t *lock, const char *name) { - return hif_runtime_lock_init(name); + int ret = hif_runtime_lock_init(lock, name); + + if (ret) + return QDF_STATUS_E_NOMEM; + + return QDF_STATUS_SUCCESS; } -EXPORT_SYMBOL(qdf_runtime_lock_init); +EXPORT_SYMBOL(__qdf_runtime_lock_init); /** * qdf_runtime_lock_deinit() - deinitialize runtime pm lock @@ -544,10 +549,10 @@ EXPORT_SYMBOL(qdf_runtime_lock_init); * * Return: void */ -void qdf_runtime_lock_deinit(qdf_runtime_lock_t lock) +void qdf_runtime_lock_deinit(qdf_runtime_lock_t *lock) { void *hif_ctx = cds_get_context(QDF_MODULE_ID_HIF); - hif_runtime_lock_deinit(hif_ctx, lock); + hif_runtime_lock_deinit(hif_ctx, lock->lock); } EXPORT_SYMBOL(qdf_runtime_lock_deinit); -- cgit v1.2.3 From 6215956b26b5bb91967e082d7d728273b9cfa720 Mon Sep 17 00:00:00 2001 From: qcabuildsw Date: Mon, 30 Jan 2017 21:22:05 -0800 Subject: Release 5.1.0.27G Release 5.1.0.27G Change-Id: I5ca0e27fb2e9fd8b5128a3088aea4e019f4078a2 CRs-Fixed: 688141 --- VERSION.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/VERSION.txt b/VERSION.txt index 282a3a317fa8..cca08cc0556a 100644 --- a/VERSION.txt +++ b/VERSION.txt @@ -1,2 +1,2 @@ -Current Component wlan-cmn.driver.lnx.1.0 version 5.1.0.27F +Current Component wlan-cmn.driver.lnx.1.0 version 5.1.0.27G Matches Component wlan-cld3.driver.lnx.1.1 version 5.1.0.22D -- cgit v1.2.3 From 55b252251b88e1a7ca8f85bbd775865c133cbe6f Mon Sep 17 00:00:00 2001 From: Rajeev Kumar Sirasanagandla Date: Tue, 27 Dec 2016 13:12:35 +0530 Subject: qcacmn: Add support to include selective scan IEs only qcacld-2.0 to qcacmn propagation Add support to include only selective IEs in probe requests in order to improve user's privacy. Change-Id: I59cf4181f60f5b4cd87a32fbcf29160d87ca59c8 CRs-Fixed: 1105495 --- wmi/inc/wmi_unified_param.h | 48 +++++++++++++++++++- wmi/src/wmi_unified_tlv.c | 107 ++++++++++++++++++++++++++++++++++++++++++-- 2 files changed, 151 insertions(+), 4 deletions(-) diff --git a/wmi/inc/wmi_unified_param.h b/wmi/inc/wmi_unified_param.h index ee7a5ba1582c..1a1dc484b1be 100644 --- a/wmi/inc/wmi_unified_param.h +++ b/wmi/inc/wmi_unified_param.h @@ -215,6 +215,8 @@ #define WMI_HOST_MAX_NUM_CHAINS 4 #define WMI_MAX_NUM_OF_RATE_THRESH 4 +#define PROBE_REQ_BITMAP_LEN 8 + #include "qdf_atomic.h" #ifdef BIG_ENDIAN_HOST @@ -953,6 +955,16 @@ struct ap_ps_params { uint32_t value; }; +/** + * struct vendor_oui - probe request ie vendor oui information + * @oui_type: type of the vendor oui (3 valid octets) + * @oui_subtype: subtype of the vendor oui (1 valid octet) + */ +struct vendor_oui { + uint32_t oui_type; + uint32_t oui_subtype; +}; + #define WMI_HOST_SCAN_CHAN_FREQ_SHIFT 0 #define WMI_HOST_SCAN_CHAN_FREQ_MASK 0xffff #define WMI_HOST_SCAN_CHAN_MODE_SHIFT 16 @@ -1003,6 +1015,11 @@ struct ap_ps_params { * @mac_addr_mask: MAC address mask used with randomization, bits that * are 0 in the mask should be randomized, bits that are 1 should * be taken from the @mac_addr + * @ie_whitelist: set to true for enabling ie whitelisting + * @probe_req_ie_bitmap: contains IEs to be included in probe req + * @num_vendor_oui: number of vendor OUIs + * @oui_field_len: size of total number of OUIs + * @voui: pointer to OUI buffer */ struct scan_start_params { uint32_t scan_id; @@ -1049,6 +1066,13 @@ struct scan_start_params { bool enable_scan_randomization; uint8_t mac_addr[QDF_MAC_ADDR_SIZE]; uint8_t mac_addr_mask[QDF_MAC_ADDR_SIZE]; + + /* probe req ie whitelisting attrs */ + bool ie_whitelist; + uint32_t probe_req_ie_bitmap[PROBE_REQ_BITMAP_LEN]; + uint32_t num_vendor_oui; + uint32_t oui_field_len; + uint8_t *voui; }; /** @@ -1622,11 +1646,22 @@ struct rssi_monitor_param { * @vdev_id: session id * @enb_probe_req_sno_randomization: set to true for enabling * seq number randomization of probe req frames + * @ie_whitelist: set to true for enabling ie whitelisting + * @probe_req_ie_bitmap: contains IEs to be included in probe req + * @num_vendor_oui: number of vendor OUIs + * @oui_field_len: size of total number of OUIs + * @voui: pointer to OUI buffer */ struct scan_mac_oui { uint8_t oui[WMI_WIFI_SCANNING_MAC_OUI_LENGTH]; uint32_t vdev_id; bool enb_probe_req_sno_randomization; + /* probe req ie whitelisting attrs */ + bool ie_whitelist; + uint32_t probe_req_ie_bitmap[PROBE_REQ_BITMAP_LEN]; + uint32_t num_vendor_oui; + uint32_t oui_field_len; + uint8_t *voui; }; #define WMI_PASSPOINT_REALM_LEN 256 @@ -2048,6 +2083,11 @@ struct pno_nw_type { * @mac_addr_mask: MAC address mask used with randomization, bits that * are 0 in the mask should be randomized, bits that are 1 should * be taken from the @mac_addr + * @ie_whitelist: set to true for enabling ie whitelisting + * @probe_req_ie_bitmap: contains IEs to be included in probe req + * @num_vendor_oui: number of vendor OUIs + * @oui_field_len: size of total number of OUIs + * @voui: pointer to OUI buffer */ struct pno_scan_req_params { uint8_t enable; @@ -2078,8 +2118,14 @@ struct pno_scan_req_params { bool enable_pno_scan_randomization; uint8_t mac_addr[QDF_MAC_ADDR_SIZE]; uint8_t mac_addr_mask[QDF_MAC_ADDR_SIZE]; -}; + /* probe req ie whitelisting attrs */ + bool ie_whitelist; + uint32_t probe_req_ie_bitmap[PROBE_REQ_BITMAP_LEN]; + uint32_t num_vendor_oui; + uint32_t oui_field_len; + uint8_t *voui; +}; #define WMI_WLAN_EXTSCAN_MAX_CHANNELS 36 #define WMI_WLAN_EXTSCAN_MAX_BUCKETS 16 diff --git a/wmi/src/wmi_unified_tlv.c b/wmi/src/wmi_unified_tlv.c index fe037cdaa0d5..5a9f3057037c 100644 --- a/wmi/src/wmi_unified_tlv.c +++ b/wmi/src/wmi_unified_tlv.c @@ -1421,6 +1421,36 @@ QDF_STATUS send_peer_assoc_cmd_tlv(wmi_unified_t wmi_handle, return ret; } +/* + * wmi_fill_vendor_oui() - fill vendor OUIs + * @buf_ptr: pointer to wmi tlv buffer + * @num_vendor_oui: number of vendor OUIs to be filled + * @param_voui: pointer to OUI buffer + * + * This function populates the wmi tlv buffer when vendor specific OUIs are + * present. + * + * Return: None + */ +static void wmi_fill_vendor_oui(uint8_t *buf_ptr, uint32_t num_vendor_oui, + void *param_voui) +{ + wmi_vendor_oui *voui = NULL; + struct vendor_oui *pvoui = NULL; + uint32_t i; + + voui = (wmi_vendor_oui *)buf_ptr; + pvoui = (struct vendor_oui *)param_voui; + + for (i = 0; i < num_vendor_oui; i++) { + WMITLV_SET_HDR(&voui[i].tlv_header, + WMITLV_TAG_STRUC_wmi_vendor_oui, + WMITLV_GET_STRUCT_TLVLEN(wmi_vendor_oui)); + voui[i].oui_type_subtype = pvoui[i].oui_type | + (pvoui[i].oui_subtype << 24); + } +} + /** * send_scan_start_cmd_tlv() - WMI scan start function * @param wmi_handle : handle to WMI. @@ -1461,6 +1491,10 @@ QDF_STATUS send_scan_start_cmd_tlv(wmi_unified_t wmi_handle, if (params->ie_len) len += roundup(params->ie_len, sizeof(uint32_t)); + len += WMI_TLV_HDR_SIZE; /* Length of TLV for array of wmi_vendor_oui */ + if (params->num_vendor_oui) + len += params->num_vendor_oui * sizeof(wmi_vendor_oui); + /* Allocate the memory */ wmi_buf = wmi_buf_alloc(wmi_handle, len); if (!wmi_buf) { @@ -1506,6 +1540,15 @@ QDF_STATUS send_scan_start_cmd_tlv(wmi_unified_t wmi_handle, &cmd->mac_mask); } + if (params->ie_whitelist) { + cmd->scan_ctrl_flags |= + WMI_SCAN_ENABLE_IE_WHTELIST_IN_PROBE_REQ; + for (i = 0; i < PROBE_REQ_BITMAP_LEN; i++) + cmd->ie_bitmap[i] = params->probe_req_ie_bitmap[i]; + + cmd->num_vendor_oui = params->num_vendor_oui; + } + WMI_LOGI("scan_ctrl_flags = %x", cmd->scan_ctrl_flags); buf_ptr += sizeof(*cmd); @@ -1550,6 +1593,17 @@ QDF_STATUS send_scan_start_cmd_tlv(wmi_unified_t wmi_handle, } buf_ptr += WMI_TLV_HDR_SIZE + params->ie_len_with_pad; + /* probe req ie whitelisting */ + WMITLV_SET_HDR(buf_ptr, WMITLV_TAG_ARRAY_STRUC, + params->num_vendor_oui * sizeof(wmi_vendor_oui)); + + buf_ptr += WMI_TLV_HDR_SIZE; + + if (cmd->num_vendor_oui != 0) { + wmi_fill_vendor_oui(buf_ptr, cmd->num_vendor_oui, params->voui); + buf_ptr += cmd->num_vendor_oui * sizeof(wmi_vendor_oui); + } + ret = wmi_unified_cmd_send(wmi_handle, wmi_buf, len, WMI_START_SCAN_CMDID); if (ret) { @@ -4100,8 +4154,11 @@ QDF_STATUS send_scan_probe_setoui_cmd_tlv(wmi_unified_t wmi_handle, uint32_t len; uint8_t *buf_ptr; uint32_t *oui_buf; + uint32_t i = 0; + + len = sizeof(*cmd) + WMI_TLV_HDR_SIZE + + psetoui->num_vendor_oui * sizeof(wmi_vendor_oui); - len = sizeof(*cmd); wmi_buf = wmi_buf_alloc(wmi_handle, len); if (!wmi_buf) { WMI_LOGE("%s: wmi_buf_alloc failed", __func__); @@ -4126,8 +4183,27 @@ QDF_STATUS send_scan_probe_setoui_cmd_tlv(wmi_unified_t wmi_handle, if (psetoui->enb_probe_req_sno_randomization) cmd->flags |= WMI_SCAN_PROBE_OUI_RANDOM_SEQ_NO_IN_PROBE_REQ; + if (psetoui->ie_whitelist) { + cmd->flags |= + WMI_SCAN_PROBE_OUI_ENABLE_IE_WHITELIST_IN_PROBE_REQ; + cmd->num_vendor_oui = psetoui->num_vendor_oui; + for (i = 0; i < PROBE_REQ_BITMAP_LEN; i++) + cmd->ie_bitmap[i] = psetoui->probe_req_ie_bitmap[i]; + } + WMI_LOGI(FL("vdev_id = %d, flags = %x"), cmd->vdev_id, cmd->flags); + buf_ptr += sizeof(*cmd); + WMITLV_SET_HDR(buf_ptr, WMITLV_TAG_ARRAY_STRUC, + psetoui->num_vendor_oui * sizeof(wmi_vendor_oui)); + buf_ptr += WMI_TLV_HDR_SIZE; + + if (cmd->num_vendor_oui != 0) { + wmi_fill_vendor_oui(buf_ptr, cmd->num_vendor_oui, + psetoui->voui); + buf_ptr += cmd->num_vendor_oui * sizeof(wmi_vendor_oui); + } + if (wmi_unified_cmd_send(wmi_handle, wmi_buf, len, WMI_SCAN_PROB_REQ_OUI_CMDID)) { WMI_LOGE("%s: failed to send command", __func__); @@ -5983,15 +6059,19 @@ QDF_STATUS send_pno_start_cmd_tlv(wmi_unified_t wmi_handle, * TLV place holder for array nlo_configured_parameters(nlo_list) * TLV place holder for array of uint32_t channel_list * TLV place holder for chnnl prediction cfg + * TLV place holder for array of wmi_vendor_oui */ len = sizeof(*cmd) + - WMI_TLV_HDR_SIZE + WMI_TLV_HDR_SIZE + WMI_TLV_HDR_SIZE; + WMI_TLV_HDR_SIZE + WMI_TLV_HDR_SIZE + WMI_TLV_HDR_SIZE + + WMI_TLV_HDR_SIZE; len += sizeof(uint32_t) * QDF_MIN(pno->aNetworks[0].ucChannelCount, WMI_NLO_MAX_CHAN); len += sizeof(nlo_configured_parameters) * QDF_MIN(pno->ucNetworksCount, WMI_NLO_MAX_SSIDS); len += sizeof(nlo_channel_prediction_cfg); + len += sizeof(enlo_candidate_score_params); + len += sizeof(wmi_vendor_oui) * pno->num_vendor_oui; buf = wmi_buf_alloc(wmi_handle, len); if (!buf) { @@ -6091,11 +6171,15 @@ QDF_STATUS send_pno_start_cmd_tlv(wmi_unified_t wmi_handle, sizeof(nlo_channel_prediction_cfg)); buf_ptr += WMI_TLV_HDR_SIZE; wmi_set_pno_channel_prediction(buf_ptr, pno); - buf_ptr += WMI_TLV_HDR_SIZE; + buf_ptr += sizeof(nlo_channel_prediction_cfg); /** TODO: Discrete firmware doesn't have command/option to configure * App IE which comes from wpa_supplicant as of part PNO start request. */ + WMITLV_SET_HDR(buf_ptr, WMITLV_TAG_STRUC_enlo_candidate_score_param, + WMITLV_GET_STRUCT_TLVLEN(enlo_candidate_score_params)); + buf_ptr += sizeof(enlo_candidate_score_params); + /* mac randomization attributes */ if (pno->enable_pno_scan_randomization) { cmd->flags |= WMI_NLO_CONFIG_SPOOFED_MAC_IN_PROBE_REQ | @@ -6103,8 +6187,25 @@ QDF_STATUS send_pno_start_cmd_tlv(wmi_unified_t wmi_handle, WMI_CHAR_ARRAY_TO_MAC_ADDR(pno->mac_addr, &cmd->mac_addr); WMI_CHAR_ARRAY_TO_MAC_ADDR(pno->mac_addr_mask, &cmd->mac_mask); } + if (pno->ie_whitelist) { + cmd->flags |= WMI_NLO_CONFIG_ENABLE_IE_WHITELIST_IN_PROBE_REQ; + cmd->num_vendor_oui = pno->num_vendor_oui; + for (i = 0; i < PROBE_REQ_BITMAP_LEN; i++) + cmd->ie_bitmap[i] = pno->probe_req_ie_bitmap[i]; + } WMI_LOGI("pno flags = %x", cmd->flags); + /* ie white list */ + WMITLV_SET_HDR(buf_ptr, WMITLV_TAG_ARRAY_STRUC, pno->num_vendor_oui * + sizeof(wmi_vendor_oui)); + + buf_ptr += WMI_TLV_HDR_SIZE; + + if (cmd->num_vendor_oui != 0) { + wmi_fill_vendor_oui(buf_ptr, cmd->num_vendor_oui, pno->voui); + buf_ptr += cmd->num_vendor_oui * sizeof(wmi_vendor_oui); + } + ret = wmi_unified_cmd_send(wmi_handle, buf, len, WMI_NETWORK_LIST_OFFLOAD_CONFIG_CMDID); if (ret) { -- cgit v1.2.3 From 02b37893180055b8382436662afd55e1a6d5bc5c Mon Sep 17 00:00:00 2001 From: qcabuildsw Date: Mon, 30 Jan 2017 22:24:37 -0800 Subject: Release 5.1.0.27H Release 5.1.0.27H Change-Id: I86174be98dad43dfdb08d3f95f2bd8cbdfe7bfe6 CRs-Fixed: 688141 --- VERSION.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/VERSION.txt b/VERSION.txt index cca08cc0556a..b4f7944dd890 100644 --- a/VERSION.txt +++ b/VERSION.txt @@ -1,2 +1,2 @@ -Current Component wlan-cmn.driver.lnx.1.0 version 5.1.0.27G +Current Component wlan-cmn.driver.lnx.1.0 version 5.1.0.27H Matches Component wlan-cld3.driver.lnx.1.1 version 5.1.0.22D -- cgit v1.2.3 From f4bc44ad81b3753184aa4fa9b2fd88ae89619227 Mon Sep 17 00:00:00 2001 From: Hanumanth Reddy Pothula Date: Thu, 19 Jan 2017 18:47:43 +0530 Subject: qcacmn: Enable HW broadcast filter Add ini to param to enable/disable HW filter for bc (except arp) frame Change-Id: Iccb68e1816c897a63414fff849f3d505ef6361e5 CRs-Fixed: 1113550 --- wmi/inc/wmi_unified_api.h | 14 ++++++++++++++ wmi/inc/wmi_unified_priv.h | 3 +++ wmi/inc/wmi_unified_tlv.h | 13 +++++++++++++ wmi/src/wmi_unified_api.c | 12 ++++++++++++ wmi/src/wmi_unified_tlv.c | 45 +++++++++++++++++++++++++++++++++++++++++++++ 5 files changed, 87 insertions(+) diff --git a/wmi/inc/wmi_unified_api.h b/wmi/inc/wmi_unified_api.h index ce83cf445aa4..310132fc04d8 100644 --- a/wmi/inc/wmi_unified_api.h +++ b/wmi/inc/wmi_unified_api.h @@ -842,6 +842,20 @@ QDF_STATUS wmi_unified_enable_arp_ns_offload_cmd(void *wmi_hdl, bool arp_only, uint8_t vdev_id); +/** + * wmi_unified_configure_broadcast_filter_cmd() - Enable/Disable Broadcast + * filter + * when target goes to wow suspend/resume mode + * @wmi_hdl: wmi handle + * @vdev_id: device identifier + * @bc_filter: enable/disable Broadcast filter + * + * + * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure + */ +QDF_STATUS wmi_unified_configure_broadcast_filter_cmd(void *wmi_hdl, + uint8_t vdev_id, bool bc_filter); + QDF_STATUS wmi_unified_set_led_flashing_cmd(void *wmi_hdl, struct flashing_req_params *flashing); diff --git a/wmi/inc/wmi_unified_priv.h b/wmi/inc/wmi_unified_priv.h index 639b42ec91a4..dacb5eb2f1ad 100644 --- a/wmi/inc/wmi_unified_priv.h +++ b/wmi/inc/wmi_unified_priv.h @@ -179,6 +179,9 @@ QDF_STATUS (*send_vdev_delete_cmd)(wmi_unified_t wmi_handle, QDF_STATUS (*send_vdev_stop_cmd)(wmi_unified_t wmi, uint8_t vdev_id); +QDF_STATUS (*send_enable_broadcast_filter_cmd)(wmi_unified_t wmi_handle, + uint8_t vdev_id, bool enable); + QDF_STATUS (*send_vdev_down_cmd)(wmi_unified_t wmi, uint8_t vdev_id); diff --git a/wmi/inc/wmi_unified_tlv.h b/wmi/inc/wmi_unified_tlv.h index 8d0539070c70..08f888a2ac44 100644 --- a/wmi/inc/wmi_unified_tlv.h +++ b/wmi/inc/wmi_unified_tlv.h @@ -529,6 +529,19 @@ QDF_STATUS send_enable_arp_ns_offload_cmd_tlv(wmi_unified_t wmi_handle, bool arp_only, uint8_t vdev_id); +/** + * send_enable_broadcast_filter_cmd_tlv() - Enable/Disable Broadcast filter + * when target goes to wow suspend/resume mode + * @wma: wmi handle + * @vdev_id: device identifier + * @enable: enable/disable broadcast filter + * + * + * Return: QDF Status + */ +QDF_STATUS send_enable_broadcast_filter_cmd_tlv(wmi_unified_t wmi_handle, + uint8_t vdev_id, bool enable); + QDF_STATUS send_set_led_flashing_cmd_tlv(wmi_unified_t wmi_handle, struct flashing_req_params *flashing); diff --git a/wmi/src/wmi_unified_api.c b/wmi/src/wmi_unified_api.c index fbe555458a19..44a42aa30310 100644 --- a/wmi/src/wmi_unified_api.c +++ b/wmi/src/wmi_unified_api.c @@ -3177,6 +3177,18 @@ QDF_STATUS wmi_unified_enable_arp_ns_offload_cmd(void *wmi_hdl, return QDF_STATUS_E_FAILURE; } +QDF_STATUS wmi_unified_configure_broadcast_filter_cmd(void *wmi_hdl, + uint8_t vdev_id, bool bc_filter) +{ + wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; + + if (wmi_handle->ops->send_enable_broadcast_filter_cmd) + return wmi_handle->ops->send_enable_broadcast_filter_cmd( + wmi_handle, vdev_id, bc_filter); + + return QDF_STATUS_E_FAILURE; +} + /** * wmi_unified_set_led_flashing_cmd() - set led flashing in fw * @wmi_hdl: wmi handle diff --git a/wmi/src/wmi_unified_tlv.c b/wmi/src/wmi_unified_tlv.c index 5a9f3057037c..4d5b40805459 100644 --- a/wmi/src/wmi_unified_tlv.c +++ b/wmi/src/wmi_unified_tlv.c @@ -10460,6 +10460,49 @@ QDF_STATUS send_enable_arp_ns_offload_cmd_tlv(wmi_unified_t wmi_handle, return QDF_STATUS_SUCCESS; } +QDF_STATUS send_enable_broadcast_filter_cmd_tlv(wmi_unified_t wmi_handle, + uint8_t vdev_id, bool enable) +{ + int32_t res; + wmi_hw_data_filter_cmd_fixed_param *cmd; + A_UINT8 *buf_ptr; + wmi_buf_t buf; + int32_t len; + + /* + * TLV place holder size for array of ARP tuples + */ + len = sizeof(wmi_hw_data_filter_cmd_fixed_param); + + buf = wmi_buf_alloc(wmi_handle, len); + if (!buf) { + WMI_LOGE("%s: wmi_buf_alloc failed", __func__); + return QDF_STATUS_E_NOMEM; + } + + buf_ptr = (A_UINT8 *) wmi_buf_data(buf); + cmd = (wmi_hw_data_filter_cmd_fixed_param *) buf_ptr; + WMITLV_SET_HDR(&cmd->tlv_header, + WMITLV_TAG_STRUC_wmi_hw_data_filter_cmd_fixed_param, + WMITLV_GET_STRUCT_TLVLEN + (wmi_hw_data_filter_cmd_fixed_param)); + cmd->vdev_id = vdev_id; + cmd->enable = enable; + cmd->hw_filter_bitmap = WMI_HW_DATA_FILTER_DROP_NON_ARP_BC; + + WMI_LOGD("HW Broadcast Filter vdev_id: %d", cmd->vdev_id); + + res = wmi_unified_cmd_send(wmi_handle, buf, len, + WMI_HW_DATA_FILTER_CMDID); + if (res) { + WMI_LOGE("Failed to enable ARP NDP/NSffload"); + wmi_buf_free(buf); + return QDF_STATUS_E_FAILURE; + } + + return QDF_STATUS_SUCCESS; +} + /** * send_set_ssid_hotlist_cmd_tlv() - Handle an SSID hotlist set request * @wmi_handle: wmi handle @@ -12843,6 +12886,8 @@ struct wmi_ops tlv_ops = { send_pdev_set_dual_mac_config_cmd_tlv, .send_enable_arp_ns_offload_cmd = send_enable_arp_ns_offload_cmd_tlv, + .send_enable_broadcast_filter_cmd = + send_enable_broadcast_filter_cmd_tlv, .send_app_type1_params_in_fw_cmd = send_app_type1_params_in_fw_cmd_tlv, .send_set_ssid_hotlist_cmd = send_set_ssid_hotlist_cmd_tlv, -- cgit v1.2.3 From 88060596c1676411c27d44d4fda22875dfe9b3ea Mon Sep 17 00:00:00 2001 From: qcabuildsw Date: Wed, 1 Feb 2017 03:57:21 -0800 Subject: Release 5.1.0.27I Release 5.1.0.27I Change-Id: I7232845ec4b78fcececda0932f0b2d8e7023cc7a CRs-Fixed: 688141 --- VERSION.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/VERSION.txt b/VERSION.txt index b4f7944dd890..d5025a5d312d 100644 --- a/VERSION.txt +++ b/VERSION.txt @@ -1,2 +1,2 @@ -Current Component wlan-cmn.driver.lnx.1.0 version 5.1.0.27H +Current Component wlan-cmn.driver.lnx.1.0 version 5.1.0.27I Matches Component wlan-cld3.driver.lnx.1.1 version 5.1.0.22D -- cgit v1.2.3