From b31e64fa7a31a9f75bc121ffbb72043cc0837cc3 Mon Sep 17 00:00:00 2001 From: Srinivas Girigowda Date: Mon, 8 Jun 2015 10:49:45 -0700 Subject: qcacld-2.0: SSR protection for wmm work queue This is a prima to qcacld-2.0 propagation. If SSR trigger in middle of execution of wmm work queue, driver may access uninitialized data. Hence Driver need to protect this function from SSR. Change-Id: If0c861a8af3323b7227fcdd4e711be6a5686f5a7 CRs-Fixed: 799466 --- CORE/HDD/src/wlan_hdd_wmm.c | 30 +++++++++++++++++++++--------- 1 file changed, 21 insertions(+), 9 deletions(-) diff --git a/CORE/HDD/src/wlan_hdd_wmm.c b/CORE/HDD/src/wlan_hdd_wmm.c index a9a595841589..5be199cc68a0 100644 --- a/CORE/HDD/src/wlan_hdd_wmm.c +++ b/CORE/HDD/src/wlan_hdd_wmm.c @@ -1232,15 +1232,14 @@ int hdd_wmmps_helper(hdd_adapter_t *pAdapter, tANI_U8 *ptr) return 0; } -/**============================================================================ - @brief hdd_wmm_do_implicit_qos() - Function which will attempt to setup - QoS for any AC requiring it - - @param work : [in] pointer to work structure - - @return : void - ===========================================================================*/ -static void hdd_wmm_do_implicit_qos(struct work_struct *work) +/** + * __hdd_wmm_do_implicit_qos() - Function which will attempt to setup + * QoS for any AC requiring it. + * @work: [in] pointer to work structure. + * + * Return: none + */ +static void __hdd_wmm_do_implicit_qos(struct work_struct *work) { hdd_wmm_qos_context_t* pQosContext = container_of(work, hdd_wmm_qos_context_t, wmmAcSetupImplicitQos); @@ -1469,6 +1468,19 @@ static void hdd_wmm_do_implicit_qos(struct work_struct *work) } +/** + * hdd_wmm_do_implicit_qos() - SSR wraper function for hdd_wmm_do_implicit_qos + * @work: pointer to work_struct + * + * Return: none + */ +static void hdd_wmm_do_implicit_qos(struct work_struct *work) +{ + vos_ssr_protect(__func__); + __hdd_wmm_do_implicit_qos(work); + vos_ssr_unprotect(__func__); +} + /**============================================================================ @brief hdd_wmm_init() - Function which will initialize the WMM configuration and status to an initial state. The configuration can later be overwritten -- cgit v1.2.3