From 26476b51ebd8f612935a75389dffa13f529f77c9 Mon Sep 17 00:00:00 2001 From: Yuanyuan Liu Date: Mon, 6 Jun 2016 14:59:23 -0700 Subject: [PATCH 1/8] qcacmn: Add workqueue APIs in QDF Add qdf workqueue APIs for schedule_delayed_work, cancel_work_sync, cancel_delayed_work_sync and flush_delayed_work Change-Id: Idb4de3c30c9c8cfdeb9af5b92f40a6e3dc954a6d CRs-Fixed: 1009560 --- qdf/inc/qdf_defer.h | 70 +++++++++++++++++++++++++++++++- qdf/linux/src/i_qdf_defer.h | 80 +++++++++++++++++++++++++++++++++++++ 2 files changed, 149 insertions(+), 1 deletion(-) diff --git a/qdf/inc/qdf_defer.h b/qdf/inc/qdf_defer.h index ff757aa930e6..5e2f6ffa3b2a 100644 --- a/qdf/inc/qdf_defer.h +++ b/qdf/inc/qdf_defer.h @@ -203,10 +203,64 @@ static inline void qdf_sched_work(qdf_handle_t hdl, qdf_work_t *work) __qdf_sched_work(hdl, work); } +/** + * qdf_sched_delayed_work() - Schedule a delayed task + * @hdl: OS handle + * @work: pointer to delayed work + * @delay: delay interval + * Return: none + */ +static inline void qdf_sched_delayed_work(qdf_handle_t hdl, + qdf_delayed_work_t *work, + uint32_t delay) +{ + __qdf_sched_delayed_work(hdl, work, delay); +} + +/** + * qdf_cancel_work() - Cancel a work + * @hdl: OS handle + * @work: pointer to work + * + * Cancel work and wait for its execution to finish. + * This function can be used even if the work re-queues + * itself or migrates to another workqueue. On return + * from this function, work is guaranteed to be not + * pending or executing on any CPU. The caller must + * ensure that the workqueue on which work was last + * queued can't be destroyed before this function returns. + * + * Return: true if work was pending, false otherwise + */ +static inline bool qdf_cancel_work(qdf_handle_t hdl, + qdf_work_t *work) +{ + return __qdf_cancel_work(hdl, work); +} + +/** + * qdf_cancel_delayed_work() - Cancel a delayed work + * @hdl: OS handle + * @work: pointer to delayed work + * + * This is qdf_cancel_work for delayed works. + * + * Return: true if work was pending, false otherwise + */ +static inline bool qdf_cancel_delayed_work(qdf_handle_t hdl, + qdf_delayed_work_t *work) +{ + return __qdf_cancel_delayed_work(hdl, work); +} + /** * qdf_flush_work - Flush a deferred task on non-interrupt context * @hdl: OS handle * @work: pointer to work + * + * Wait until work has finished execution. work is guaranteed to be + * idle on return if it hasn't been requeued since flush started. + * * Return: none */ static inline void qdf_flush_work(qdf_handle_t hdl, qdf_work_t *work) @@ -214,6 +268,21 @@ static inline void qdf_flush_work(qdf_handle_t hdl, qdf_work_t *work) __qdf_flush_work(hdl, work); } +/** + * qdf_flush_delayed_work() - Flush a delayed work + * @hdl: OS handle + * @work: pointer to delayed work + * + * This is qdf_flush_work for delayed works. + * + * Return: none + */ +static inline void qdf_flush_delayed_work(qdf_handle_t hdl, + qdf_delayed_work_t *work) +{ + __qdf_flush_delayed_work(hdl, work); +} + /** * qdf_disable_work - disable the deferred task (synchronous) * @hdl: OS handle @@ -225,7 +294,6 @@ static inline uint32_t qdf_disable_work(qdf_handle_t hdl, qdf_work_t *work) return __qdf_disable_work(hdl, work); } - /** * qdf_destroy_work - destroy the deferred task (synchronous) * @hdl: OS handle diff --git a/qdf/linux/src/i_qdf_defer.h b/qdf/linux/src/i_qdf_defer.h index b2e539856327..d2a2f730487d 100644 --- a/qdf/linux/src/i_qdf_defer.h +++ b/qdf/linux/src/i_qdf_defer.h @@ -156,6 +156,45 @@ static inline QDF_STATUS __qdf_sched_work(qdf_handle_t hdl, __qdf_work_t *work) return QDF_STATUS_SUCCESS; } +/** + * __qdf_sched_delayed_work() - Schedule a delayed work + * @hdl: OS handle + * @work: pointer to delayed work + * @delay: delay interval + * Return: none + */ +static inline QDF_STATUS __qdf_sched_delayed_work(qdf_handle_t hdl, + __qdf_delayed_work_t *work, + uint32_t delay) +{ + schedule_delayed_work(work, delay); + return QDF_STATUS_SUCCESS; +} + +/** + * __qdf_cancel_work() - Cancel a work + * @hdl: OS handle + * @work: pointer to work + * Return: true if work was pending, false otherwise + */ +static inline bool __qdf_cancel_work(qdf_handle_t hdl, + __qdf_work_t *work) +{ + return cancel_work_sync(work); +} + +/** + * __qdf_cancel_delayed_work() - Cancel a delayed work + * @hdl: OS handle + * @work: pointer to delayed work + * Return: true if work was pending, false otherwise + */ +static inline bool __qdf_cancel_delayed_work(qdf_handle_t hdl, + __qdf_delayed_work_t *work) +{ + return cancel_delayed_work_sync(work); +} + /** * __qdf_flush_work - Flush a deferred task on non-interrupt context * @hdl: OS handle @@ -167,6 +206,20 @@ static inline uint32_t __qdf_flush_work(qdf_handle_t hdl, __qdf_work_t *work) flush_work(work); return QDF_STATUS_SUCCESS; } + +/** + * __qdf_flush_delayed_work() - Flush a delayed work + * @hdl: OS handle + * @work: pointer to delayed work + * Return: none + */ +static inline uint32_t __qdf_flush_delayed_work(qdf_handle_t hdl, + __qdf_delayed_work_t *work) +{ + flush_delayed_work(work); + return QDF_STATUS_SUCCESS; +} + #else static inline QDF_STATUS __qdf_init_work(qdf_handle_t hdl, __qdf_work_t *work, @@ -210,11 +263,38 @@ static inline QDF_STATUS __qdf_sched_work(qdf_handle_t hdl, __qdf_work_t *work) return QDF_STATUS_SUCCESS; } +static inline QDF_STATUS __qdf_sched_delayed_work(qdf_handle_t hdl, + __qdf_delayed_work_t *work, + uint32_t delay) +{ + schedule_delayed_work(&work->dwork, delay); + return QDF_STATUS_SUCCESS; +} + +static inline bool __qdf_cancel_work(qdf_handle_t hdl, + __qdf_work_t *work) +{ + return cancel_work_sync(&work->work); +} + +static inline bool __qdf_cancel_delayed_work(qdf_handle_t hdl, + __qdf_delayed_work_t *work) +{ + return cancel_delayed_work_sync(&work->dwork); +} + static inline uint32_t __qdf_flush_work(qdf_handle_t hdl, __qdf_work_t *work) { flush_work(&work->work); return QDF_STATUS_SUCCESS; } +static inline uint32_t __qdf_flush_delayed_work(qdf_handle_t hdl, + __qdf_delayed_work_t *work) +{ + flush_delayed_work(&work->dwork); + return QDF_STATUS_SUCCESS; +} + #endif /** From f99241ec6678605d7766a49e6996909db485264c Mon Sep 17 00:00:00 2001 From: Varun Reddy Yeturu Date: Thu, 7 Jul 2016 17:42:49 -0700 Subject: [PATCH 2/8] qcacmn: Fix incorrect channel list passed to the firmware Fix the occupied channel list that is being passed from CSR to WMA to WMI to firmware.There is a conversion happening in WMA from channel number to frequency which is the root of the issue. Change-Id: I8a2f8c9d31897b38086df26ebd386ec59d0f3540 CRs-Fixed: 1039020 --- wmi/inc/wmi_unified_api.h | 2 +- wmi/inc/wmi_unified_priv.h | 2 +- wmi/inc/wmi_unified_tlv.h | 2 +- wmi/src/wmi_unified_api.c | 2 +- wmi/src/wmi_unified_tlv.c | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/wmi/inc/wmi_unified_api.h b/wmi/inc/wmi_unified_api.h index 872f059acefd..1bd40a0325b0 100644 --- a/wmi/inc/wmi_unified_api.h +++ b/wmi/inc/wmi_unified_api.h @@ -819,7 +819,7 @@ QDF_STATUS wmi_unified_roam_scan_offload_scan_period(void *wmi_hdl, QDF_STATUS wmi_unified_roam_scan_offload_chan_list_cmd(void *wmi_hdl, uint8_t chan_count, - uint8_t *chan_list, + uint32_t *chan_list, uint8_t list_type, uint32_t vdev_id); QDF_STATUS wmi_unified_roam_scan_offload_rssi_change_cmd(void *wmi_hdl, diff --git a/wmi/inc/wmi_unified_priv.h b/wmi/inc/wmi_unified_priv.h index 9ee234a8c204..69c16abc5825 100644 --- a/wmi/inc/wmi_unified_priv.h +++ b/wmi/inc/wmi_unified_priv.h @@ -698,7 +698,7 @@ QDF_STATUS (*send_roam_scan_offload_scan_period_cmd)(wmi_unified_t wmi_handle, QDF_STATUS (*send_roam_scan_offload_chan_list_cmd)(wmi_unified_t wmi_handle, uint8_t chan_count, - uint8_t *chan_list, + uint32_t *chan_list, uint8_t list_type, uint32_t vdev_id); QDF_STATUS (*send_roam_scan_offload_rssi_change_cmd)(wmi_unified_t wmi_handle, diff --git a/wmi/inc/wmi_unified_tlv.h b/wmi/inc/wmi_unified_tlv.h index b498cef62fb3..aa5a959a9c0e 100644 --- a/wmi/inc/wmi_unified_tlv.h +++ b/wmi/inc/wmi_unified_tlv.h @@ -543,7 +543,7 @@ QDF_STATUS send_roam_scan_offload_scan_period_cmd_tlv(wmi_unified_t wmi_handle, QDF_STATUS send_roam_scan_offload_chan_list_cmd_tlv(wmi_unified_t wmi_handle, uint8_t chan_count, - uint8_t *chan_list, + uint32_t *chan_list, uint8_t list_type, uint32_t vdev_id); QDF_STATUS send_roam_scan_offload_rssi_change_cmd_tlv(wmi_unified_t wmi_handle, diff --git a/wmi/src/wmi_unified_api.c b/wmi/src/wmi_unified_api.c index 375637bc599c..462f4f6945c8 100644 --- a/wmi/src/wmi_unified_api.c +++ b/wmi/src/wmi_unified_api.c @@ -3360,7 +3360,7 @@ QDF_STATUS wmi_unified_roam_scan_offload_scan_period(void *wmi_hdl, */ QDF_STATUS wmi_unified_roam_scan_offload_chan_list_cmd(void *wmi_hdl, uint8_t chan_count, - uint8_t *chan_list, + uint32_t *chan_list, uint8_t list_type, uint32_t vdev_id) { wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; diff --git a/wmi/src/wmi_unified_tlv.c b/wmi/src/wmi_unified_tlv.c index d5bbfde5e300..ba67a6ecf47c 100644 --- a/wmi/src/wmi_unified_tlv.c +++ b/wmi/src/wmi_unified_tlv.c @@ -10187,7 +10187,7 @@ error: */ QDF_STATUS send_roam_scan_offload_chan_list_cmd_tlv(wmi_unified_t wmi_handle, uint8_t chan_count, - uint8_t *chan_list, + uint32_t *chan_list, uint8_t list_type, uint32_t vdev_id) { wmi_buf_t buf = NULL; From 9bf39423c529f30e4e7e58f1c56118d26e6395fe Mon Sep 17 00:00:00 2001 From: Vishwajith Upendra Date: Thu, 14 Jul 2016 12:35:07 -0700 Subject: [PATCH 3/8] Release 5.1.0.22A Release 5.1.0.22A Change-Id: I70159eb36ede6d9f874a07115e9336534aefeb25 CRs-Fixed: 688141 --- VERSION.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/VERSION.txt b/VERSION.txt index d09f3b835b72..de32baddb54a 100644 --- a/VERSION.txt +++ b/VERSION.txt @@ -1,2 +1,2 @@ -Current Component wlan-cmn.driver.lnx.1.0 version 5.1.0.22 -Matches Component wlan-cld3.driver.lnx.1.1 version 5.1.0.22 +Current Component wlan-cmn.driver.lnx.1.0 version 5.1.0.22A +Matches Component wlan-cld3.driver.lnx.1.1 version 5.1.0.22A From 85e722996b33dade5c07fd98af14e374a15dc0fb Mon Sep 17 00:00:00 2001 From: Vishwajith Upendra Date: Fri, 15 Jul 2016 15:20:34 -0700 Subject: [PATCH 4/8] Release 5.1.0.22B Release 5.1.0.22B Change-Id: I3ded6d66eca294b89fd650386a023b7081597d07 CRs-Fixed: 688141 --- VERSION.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/VERSION.txt b/VERSION.txt index de32baddb54a..9537eba221b8 100644 --- a/VERSION.txt +++ b/VERSION.txt @@ -1,2 +1,2 @@ -Current Component wlan-cmn.driver.lnx.1.0 version 5.1.0.22A -Matches Component wlan-cld3.driver.lnx.1.1 version 5.1.0.22A +Current Component wlan-cmn.driver.lnx.1.0 version 5.1.0.22B +Matches Component wlan-cld3.driver.lnx.1.1 version 5.1.0.22B From 4e47333bde5001c6f317bcb3d4b3c90ee4f55d7e Mon Sep 17 00:00:00 2001 From: Nitesh Shah Date: Fri, 8 Jul 2016 11:45:33 +0530 Subject: [PATCH 5/8] qcacmn: CL 1546483 - update fw common interface files Propagation from qcacld-2.0 to qcacld-3.0 Add WMI command to set GPIO numbers that are used to wakeup host and wakeup target. Changes to disable dynamic bandwidth RTS. Add swol_assist_enable field to WMI extwow_set_app_type1_params cmd to enable IoT mode WMI enums for CCK and OFDM max tx rates. Change-Id: I26873873d7a355c179babaa7cc56e187e9771c92 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 7c53367fc5af..fe17c5974678 100644 --- a/wmi/src/wmi_unified.c +++ b/wmi/src/wmi_unified.c @@ -1580,6 +1580,7 @@ static uint8_t *wmi_id_to_name(WMI_CMD_ID wmi_command) CASE_RETURN_STRING(WMI_READ_DATA_FROM_FLASH_CMDID); CASE_RETURN_STRING(WMI_PDEV_SET_REORDER_TIMEOUT_VAL_CMDID); CASE_RETURN_STRING(WMI_PEER_SET_RX_BLOCKSIZE_CMDID); + CASE_RETURN_STRING(WMI_PDEV_SET_WAKEUP_CONFIG_CMDID); } return "Invalid WMI cmd"; From 9d305224a45951a36545f6d9c3dad35bbcf92a54 Mon Sep 17 00:00:00 2001 From: Vishwajith Upendra Date: Wed, 20 Jul 2016 09:22:27 -0700 Subject: [PATCH 6/8] Release 5.1.0.22C Release 5.1.0.22C Change-Id: Ic7cbb639caca889d6fcf3925992c0c8441927a96 CRs-Fixed: 688141 --- VERSION.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/VERSION.txt b/VERSION.txt index 9537eba221b8..73dae2799267 100644 --- a/VERSION.txt +++ b/VERSION.txt @@ -1,2 +1,2 @@ -Current Component wlan-cmn.driver.lnx.1.0 version 5.1.0.22B -Matches Component wlan-cld3.driver.lnx.1.1 version 5.1.0.22B +Current Component wlan-cmn.driver.lnx.1.0 version 5.1.0.22C +Matches Component wlan-cld3.driver.lnx.1.1 version 5.1.0.22C From 343739296c9b93d4929546bd0da93845091d3f06 Mon Sep 17 00:00:00 2001 From: Hardik Kantilal Patel Date: Wed, 13 Jul 2016 22:14:14 +0530 Subject: [PATCH 7/8] qcacmn: Address 32 bit specific compilation issues Fixing 32 bit compliation issues due to improper type casting and shift operation. CRs-Fixed: 1043823 Change-Id: I2c05a0c0940c5d65c40aefdc80dc2888fbe87be1 --- hif/src/ce/ce_reg.h | 3 +-- qdf/linux/src/qdf_nbuf.c | 4 ++-- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/hif/src/ce/ce_reg.h b/hif/src/ce/ce_reg.h index 1fcf71510567..9651f756d9b9 100644 --- a/hif/src/ce/ce_reg.h +++ b/hif/src/ce/ce_reg.h @@ -258,8 +258,7 @@ uint32_t DEBUG_CE_DEST_RING_READ_IDX_GET(struct hif_softc *scn, & (uint64_t)(0xF00000000))>>32)) #define VADDR_FOR_CE(scn, CE_ctrl_addr)\ - ((uint32_t *)((uint64_t)(scn->vaddr_rri_on_ddr) + \ - COPY_ENGINE_ID(CE_ctrl_addr)*sizeof(uint32_t))) + ((scn->vaddr_rri_on_ddr) + COPY_ENGINE_ID(CE_ctrl_addr)) #define SRRI_FROM_DDR_ADDR(addr) ((*(addr)) & 0xFFFF) #define DRRI_FROM_DDR_ADDR(addr) (((*(addr))>>16) & 0xFFFF) diff --git a/qdf/linux/src/qdf_nbuf.c b/qdf/linux/src/qdf_nbuf.c index 9b66867afb0e..aa6e2dcbdf02 100644 --- a/qdf/linux/src/qdf_nbuf.c +++ b/qdf/linux/src/qdf_nbuf.c @@ -1115,8 +1115,8 @@ void __qdf_dmaaddr_to_32s(qdf_dma_addr_t dmaaddr, uint32_t *lo, uint32_t *hi) { if (sizeof(dmaaddr) > sizeof(uint32_t)) { - *lo = (uint32_t) (dmaaddr & 0x0ffffffff); - *hi = (uint32_t) (dmaaddr >> 32); + *lo = lower_32_bits(dmaaddr); + *hi = upper_32_bits(dmaaddr); } else { *lo = dmaaddr; *hi = 0; From 55fb9d398d3db62a6abb7ade95ba10ff43244c41 Mon Sep 17 00:00:00 2001 From: Vishwajith Upendra Date: Mon, 25 Jul 2016 00:41:30 -0700 Subject: [PATCH 8/8] Release 5.1.0.22D Release 5.1.0.22D Change-Id: I68ea19fc5e1ff367c429a7f2324ebd8ee7bd405f CRs-Fixed: 688141 --- VERSION.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/VERSION.txt b/VERSION.txt index 73dae2799267..3be76e56e577 100644 --- a/VERSION.txt +++ b/VERSION.txt @@ -1,2 +1,2 @@ -Current Component wlan-cmn.driver.lnx.1.0 version 5.1.0.22C +Current Component wlan-cmn.driver.lnx.1.0 version 5.1.0.22D Matches Component wlan-cld3.driver.lnx.1.1 version 5.1.0.22C