diff options
| author | Linux Build Service Account <lnxbuild@localhost> | 2017-01-13 21:31:55 -0700 |
|---|---|---|
| committer | Linux Build Service Account <lnxbuild@localhost> | 2017-01-13 21:31:55 -0700 |
| commit | bb24dc6d82045e094aff20c08b05c50bab5f71c5 (patch) | |
| tree | a9316df9389a319159e13bc29a9cc62a5efd00d9 | |
| parent | 4f055fb7c108fe44be6b0f88f6dc4a00b65797f9 (diff) | |
| parent | e9f06355175b88e52a11b381f52365fcea1d540e (diff) | |
Promotion of wlan-cmn.driver.lnx.1.0-00117.
CRs Change ID Subject
--------------------------------------------------------------------------------------------------------------
1106496 I4e55733ad8403581aca0b49ce9442fc5591335c0 qcacmn: Runtime PM packets tagging after wow suspend
1048598 Ie4b7d3e31db2f2b3cad116bb0e993f9f55a7d322 qcacmn: Add new HW version for QCA9379
688141 I056c63e67a937f721f3b44833921d7c478fef12f Release 5.1.0.26Q
902092 I1b1b9232ffb9d8d5c0bc9a1d75145d39c9fe9e6b qcacmn: Follow spec for NL80211_CMD_START_SCHED_SCAN
688141 Ie4dc7f802a06921da4f7d862274c8aef2a474cc8 Release 5.1.0.26P
688141 Ie3ac7b246ffedd022e3a07591c84cd90e6856aa7 Release 5.1.0.26O
Change-Id: I893a8f27151daeadf2c42e1d4f631b37cb9ea277
CRs-Fixed: 688141, 1106496, 1048598, 902092
| -rw-r--r-- | VERSION.txt | 2 | ||||
| -rw-r--r-- | hif/src/hif_main.c | 5 | ||||
| -rw-r--r-- | hif/src/pcie/if_pci.c | 4 | ||||
| -rw-r--r-- | wmi/inc/wmi_unified_api.h | 15 | ||||
| -rw-r--r-- | wmi/inc/wmi_unified_param.h | 2 | ||||
| -rw-r--r-- | wmi/inc/wmi_unified_priv.h | 5 | ||||
| -rw-r--r-- | wmi/src/wmi_unified.c | 54 | ||||
| -rw-r--r-- | wmi/src/wmi_unified_non_tlv.c | 17 | ||||
| -rw-r--r-- | wmi/src/wmi_unified_tlv.c | 114 |
9 files changed, 181 insertions, 37 deletions
diff --git a/VERSION.txt b/VERSION.txt index 734de90a8584..ee08542a5405 100644 --- a/VERSION.txt +++ b/VERSION.txt @@ -1,2 +1,2 @@ -Current Component wlan-cmn.driver.lnx.1.0 version 5.1.0.26N +Current Component wlan-cmn.driver.lnx.1.0 version 5.1.0.26Q Matches Component wlan-cld3.driver.lnx.1.1 version 5.1.0.22D diff --git a/hif/src/hif_main.c b/hif/src/hif_main.c index 41a4a9c4b654..2b6470d1003e 100644 --- a/hif/src/hif_main.c +++ b/hif/src/hif_main.c @@ -310,6 +310,11 @@ static const struct qwlan_hw qwlan_hw_list[] = { .id = QCA9379_REV1_VERSION, .subid = 0xC, .name = "QCA9379_REV1", + }, + { + .id = QCA9379_REV1_VERSION, + .subid = 0xD, + .name = "QCA9379_REV1_1", } }; diff --git a/hif/src/pcie/if_pci.c b/hif/src/pcie/if_pci.c index 58fab197dc52..022b0c552fa0 100644 --- a/hif/src/pcie/if_pci.c +++ b/hif/src/pcie/if_pci.c @@ -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. * @@ -924,7 +924,7 @@ static const char *hif_pm_runtime_state_to_string(uint32_t state) * * Return: void */ -void hif_pci_runtime_pm_warn(struct hif_pci_softc *sc, const char *msg) +static void hif_pci_runtime_pm_warn(struct hif_pci_softc *sc, const char *msg) { struct hif_pm_runtime_lock *ctx; diff --git a/wmi/inc/wmi_unified_api.h b/wmi/inc/wmi_unified_api.h index d4508c6829e2..7fbac7e04497 100644 --- a/wmi/inc/wmi_unified_api.h +++ b/wmi/inc/wmi_unified_api.h @@ -242,6 +242,20 @@ int wmi_get_pending_cmds(wmi_unified_t wmi_handle); void wmi_set_target_suspend(wmi_unified_t wmi_handle, bool val); /** + * WMI API to set bus suspend state + * @param wmi_handle: handle to WMI. + * @param val: suspend state boolean + */ +void wmi_set_is_wow_bus_suspended(wmi_unified_t wmi_handle, A_BOOL val); + +/** + * WMI API to set crash injection state + * @param wmi_handle: handle to WMI. + * @param val: crash injection state boolean + */ +void wmi_tag_crash_inject(wmi_unified_t wmi_handle, A_BOOL flag); + +/** * generic function to block unified WMI command * @param wmi_handle : handle to WMI. * @return 0 on success and -ve on failure. @@ -281,7 +295,6 @@ static inline bool wmi_get_runtime_pm_inprogress(wmi_unified_t wmi_handle) } #endif - /** * UMAC Callback to process fw event. * @param wmi_handle : handle to WMI. diff --git a/wmi/inc/wmi_unified_param.h b/wmi/inc/wmi_unified_param.h index 44756e715e97..2c07747563b9 100644 --- a/wmi/inc/wmi_unified_param.h +++ b/wmi/inc/wmi_unified_param.h @@ -2012,6 +2012,7 @@ struct pno_nw_type { * @enable: flag to enable or disable * @modePNO: PNO Mode * @ucNetworksCount: Number of networks + * @do_passive_scan: Flag to request passive scan to fw * @aNetworks: Preferred network list * @sessionId: Session identifier * @fast_scan_period: Fast Scan period @@ -2033,6 +2034,7 @@ struct pno_scan_req_params { uint8_t enable; enum pno_mode modePNO; uint8_t ucNetworksCount; + bool do_passive_scan; struct pno_nw_type aNetworks[WMI_PNO_MAX_SUPP_NETWORKS]; uint8_t sessionId; uint32_t fast_scan_period; diff --git a/wmi/inc/wmi_unified_priv.h b/wmi/inc/wmi_unified_priv.h index cd206cbb1142..e91d5c66a5bf 100644 --- a/wmi/inc/wmi_unified_priv.h +++ b/wmi/inc/wmi_unified_priv.h @@ -1145,6 +1145,8 @@ QDF_STATUS (*send_encrypt_decrypt_send_cmd)(wmi_unified_t wmi_handle, QDF_STATUS (*send_sar_limit_cmd)(wmi_unified_t wmi_handle, struct sar_limit_cmd_params *params); +uint16_t (*wmi_set_htc_tx_tag)(wmi_unified_t wmi_handle, + wmi_buf_t buf, uint32_t cmd_id); }; struct target_abi_version { @@ -1209,7 +1211,8 @@ struct wmi_unified { #ifdef FEATURE_RUNTIME_PM qdf_atomic_t runtime_pm_inprogress; #endif - + qdf_atomic_t is_wow_bus_suspended; + bool tag_crash_inject; enum wmi_target_type target_type; struct wmi_rx_ops rx_ops; struct wmi_ops *ops; diff --git a/wmi/src/wmi_unified.c b/wmi/src/wmi_unified.c index cd0f1b156d60..352959b582c1 100644 --- a/wmi/src/wmi_unified.c +++ b/wmi/src/wmi_unified.c @@ -1670,32 +1670,7 @@ static uint8_t *wmi_id_to_name(uint32_t wmi_command) #endif -/** - * wmi_is_runtime_pm_cmd() - check if a cmd is from suspend resume sequence - * @cmd: command to check - * - * Return: true if the command is part of the suspend resume sequence. - */ #ifndef WMI_NON_TLV_SUPPORT -static bool wmi_is_runtime_pm_cmd(uint32_t cmd_id) -{ - switch (cmd_id) { - case WMI_WOW_ENABLE_CMDID: - case WMI_PDEV_SUSPEND_CMDID: - case WMI_WOW_ENABLE_DISABLE_WAKE_EVENT_CMDID: - case WMI_WOW_ADD_WAKE_PATTERN_CMDID: - case WMI_WOW_HOSTWAKEUP_FROM_SLEEP_CMDID: - case WMI_PDEV_RESUME_CMDID: - case WMI_WOW_DEL_WAKE_PATTERN_CMDID: - case WMI_WOW_SET_ACTION_WAKE_UP_CMDID: - case WMI_D0_WOW_ENABLE_DISABLE_CMDID: - return true; - - default: - return false; - } -} - /** * wmi_is_pm_resume_cmd() - check if a cmd is part of the resume sequence * @cmd_id: command to check @@ -1714,10 +1689,6 @@ static bool wmi_is_pm_resume_cmd(uint32_t cmd_id) } } #else -static bool wmi_is_runtime_pm_cmd(uint32_t cmd_id) -{ - return false; -} static bool wmi_is_pm_resume_cmd(uint32_t cmd_id) { return false; @@ -1743,8 +1714,9 @@ QDF_STATUS wmi_unified_cmd_send(wmi_unified_t wmi_handle, wmi_buf_t buf, uint16_t htc_tag = 0; if (wmi_get_runtime_pm_inprogress(wmi_handle)) { - if (wmi_is_runtime_pm_cmd(cmd_id)) - htc_tag = HTC_TX_PACKET_TAG_AUTO_PM; + htc_tag = + (A_UINT16)wmi_handle->ops->wmi_set_htc_tx_tag( + wmi_handle, buf, cmd_id); } else if (qdf_atomic_read(&wmi_handle->is_target_suspended) && (!wmi_is_pm_resume_cmd(cmd_id))) { QDF_TRACE(QDF_MODULE_ID_WMI, QDF_TRACE_LEVEL_ERROR, @@ -2484,6 +2456,26 @@ void wmi_set_target_suspend(wmi_unified_t wmi_handle, A_BOOL val) qdf_atomic_set(&wmi_handle->is_target_suspended, val); } +/** + * WMI API to set crash injection state + * @param wmi_handle: handle to WMI. + * @param val: crash injection state boolean. + */ +void wmi_tag_crash_inject(wmi_unified_t wmi_handle, A_BOOL flag) +{ + wmi_handle->tag_crash_inject = flag; +} + +/** + * WMI API to set bus suspend state + * @param wmi_handle: handle to WMI. + * @param val: suspend state boolean. + */ +void wmi_set_is_wow_bus_suspended(wmi_unified_t wmi_handle, A_BOOL val) +{ + qdf_atomic_set(&wmi_handle->is_wow_bus_suspended, val); +} + #ifdef WMI_NON_TLV_SUPPORT /** * API to flush all the previous packets associated with the wmi endpoint diff --git a/wmi/src/wmi_unified_non_tlv.c b/wmi/src/wmi_unified_non_tlv.c index 85c799b91a0b..f28f87ce0f0c 100644 --- a/wmi/src/wmi_unified_non_tlv.c +++ b/wmi/src/wmi_unified_non_tlv.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016 The Linux Foundation. All rights reserved. + * Copyright (c) 2016-2017 The Linux Foundation. All rights reserved. * * Previously licensed under the ISC license by Qualcomm Atheros, Inc. * @@ -7235,6 +7235,20 @@ static bool is_management_record_non_tlv(uint32_t cmd_id) } #endif +/** + * wmi_set_htc_tx_tag_non_tlv() - set HTC TX tag for WMI commands + * @wmi_handle: WMI handle + * @buf: WMI buffer + * @cmd_id: WMI command Id + * + * Return htc_tx_tag + */ +static uint16_t wmi_set_htc_tx_tag_non_tlv(wmi_unified_t wmi_handle, + wmi_buf_t buf, uint32_t cmd_id) +{ + return 0; +} + struct wmi_ops non_tlv_ops = { .send_vdev_create_cmd = send_vdev_create_cmd_non_tlv, .send_vdev_delete_cmd = send_vdev_delete_cmd_non_tlv, @@ -7425,6 +7439,7 @@ struct wmi_ops non_tlv_ops = { .extract_fips_event_data = extract_fips_event_data_non_tlv, .extract_fips_event_error_status = extract_fips_event_error_status_non_tlv, + .wmi_set_htc_tx_tag = wmi_set_htc_tx_tag_non_tlv, }; /** diff --git a/wmi/src/wmi_unified_tlv.c b/wmi/src/wmi_unified_tlv.c index 50aeb4c7fb6f..3b7a2cd1264c 100644 --- a/wmi/src/wmi_unified_tlv.c +++ b/wmi/src/wmi_unified_tlv.c @@ -5996,6 +5996,8 @@ QDF_STATUS send_pno_start_cmd_tlv(wmi_unified_t wmi_handle, cmd->active_dwell_time = pno->active_max_time; cmd->passive_dwell_time = pno->passive_max_time; + if (pno->do_passive_scan) + cmd->flags |= WMI_NLO_CONFIG_SCAN_PASSIVE; /* Copy scan interval */ cmd->fast_scan_period = pno->fast_scan_period; cmd->slow_scan_period = pno->slow_scan_period; @@ -12313,6 +12315,117 @@ static bool is_management_record_tlv(uint32_t cmd_id) } #endif +static uint16_t wmi_tag_vdev_set_cmd(wmi_unified_t wmi_hdl, wmi_buf_t buf) +{ + wmi_vdev_set_param_cmd_fixed_param *set_cmd; + + set_cmd = (wmi_vdev_set_param_cmd_fixed_param *)wmi_buf_data(buf); + + switch (set_cmd->param_id) { + case WMI_VDEV_PARAM_LISTEN_INTERVAL: + case WMI_VDEV_PARAM_DTIM_POLICY: + return HTC_TX_PACKET_TAG_AUTO_PM; + default: + break; + } + + return 0; +} + +static uint16_t wmi_tag_sta_powersave_cmd(wmi_unified_t wmi_hdl, wmi_buf_t buf) +{ + wmi_sta_powersave_param_cmd_fixed_param *ps_cmd; + + ps_cmd = (wmi_sta_powersave_param_cmd_fixed_param *)wmi_buf_data(buf); + + switch (ps_cmd->param) { + case WMI_STA_PS_PARAM_TX_WAKE_THRESHOLD: + case WMI_STA_PS_PARAM_INACTIVITY_TIME: + case WMI_STA_PS_ENABLE_QPOWER: + return HTC_TX_PACKET_TAG_AUTO_PM; + default: + break; + } + + return 0; +} + +static uint16_t wmi_tag_common_cmd(wmi_unified_t wmi_hdl, wmi_buf_t buf, + uint32_t cmd_id) +{ + if (qdf_atomic_read(&wmi_hdl->is_wow_bus_suspended)) + return 0; + + switch (cmd_id) { + case WMI_VDEV_SET_PARAM_CMDID: + return wmi_tag_vdev_set_cmd(wmi_hdl, buf); + case WMI_STA_POWERSAVE_PARAM_CMDID: + return wmi_tag_sta_powersave_cmd(wmi_hdl, buf); + default: + break; + } + + return 0; +} + +static uint16_t wmi_tag_fw_hang_cmd(wmi_unified_t wmi_handle) +{ + uint16_t tag = 0; + + if (qdf_atomic_read(&wmi_handle->is_target_suspended)) { + pr_err("%s: Target is already suspended, Ignore FW Hang Command\n", + __func__); + return tag; + } + + if (wmi_handle->tag_crash_inject) + tag = HTC_TX_PACKET_TAG_AUTO_PM; + + wmi_handle->tag_crash_inject = false; + return tag; +} + +/** + * wmi_set_htc_tx_tag() - set HTC TX tag for WMI commands + * @wmi_handle: WMI handle + * @buf: WMI buffer + * @cmd_id: WMI command Id + * + * Return htc_tx_tag + */ +static uint16_t wmi_set_htc_tx_tag_tlv(wmi_unified_t wmi_handle, + wmi_buf_t buf, + uint32_t cmd_id) +{ + uint16_t htc_tx_tag = 0; + + switch (cmd_id) { + case WMI_WOW_ENABLE_CMDID: + case WMI_PDEV_SUSPEND_CMDID: + case WMI_WOW_ENABLE_DISABLE_WAKE_EVENT_CMDID: + case WMI_WOW_ADD_WAKE_PATTERN_CMDID: + case WMI_WOW_HOSTWAKEUP_FROM_SLEEP_CMDID: + case WMI_PDEV_RESUME_CMDID: + case WMI_WOW_DEL_WAKE_PATTERN_CMDID: + case WMI_WOW_SET_ACTION_WAKE_UP_CMDID: +#ifdef FEATURE_WLAN_D0WOW + case WMI_D0_WOW_ENABLE_DISABLE_CMDID: +#endif + htc_tx_tag = HTC_TX_PACKET_TAG_AUTO_PM; + break; + case WMI_FORCE_FW_HANG_CMDID: + htc_tx_tag = wmi_tag_fw_hang_cmd(wmi_handle); + break; + case WMI_VDEV_SET_PARAM_CMDID: + case WMI_STA_POWERSAVE_PARAM_CMDID: + htc_tx_tag = wmi_tag_common_cmd(wmi_handle, buf, cmd_id); + default: + break; + } + + return htc_tx_tag; +} + struct wmi_ops tlv_ops = { .send_vdev_create_cmd = send_vdev_create_cmd_tlv, .send_vdev_delete_cmd = send_vdev_delete_cmd_tlv, @@ -12569,6 +12682,7 @@ struct wmi_ops tlv_ops = { send_encrypt_decrypt_send_cmd_tlv, .send_sar_limit_cmd = send_sar_limit_cmd_tlv, .send_per_roam_config_cmd = send_per_roam_config_cmd_tlv, + .wmi_set_htc_tx_tag = wmi_set_htc_tx_tag_tlv, }; #ifdef WMI_TLV_AND_NON_TLV_SUPPORT |
