From 8884aeac630f32f5d4838ab3f0c716e5295f93be Mon Sep 17 00:00:00 2001 From: Shiva Krishna Pittala Date: Wed, 9 May 2018 14:49:23 +0530 Subject: [PATCH] qcacmn: Mark spectral cache valid after writing into it Setting of any spectral parameter after 'wifi load', before doing a get operation, is not getting affected. This is because the current implementation marks the spectral cache valid only during the read operation. To fix this, mark the cache valid after write as well. Change-Id: I53df704e60e29cab7ce7afdd49b917e3482479e5 CRs-Fixed: 2238814 --- target_if/spectral/target_if_spectral.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/target_if/spectral/target_if_spectral.c b/target_if/spectral/target_if_spectral.c index 1c4dd06533b1..b64e7cb66bbe 100644 --- a/target_if/spectral/target_if_spectral.c +++ b/target_if/spectral/target_if_spectral.c @@ -790,6 +790,10 @@ target_if_spectral_info_write( } info->osps_cache.osc_spectral_active = *pval; + + /* The cache is now valid */ + info->osps_cache.osc_is_valid = 1; + qdf_spin_unlock(&info->osps_lock); break; @@ -816,6 +820,10 @@ target_if_spectral_info_write( } info->osps_cache.osc_spectral_enabled = *pval; + + /* The cache is now valid */ + info->osps_cache.osc_is_valid = 1; + qdf_spin_unlock(&info->osps_lock); break; @@ -843,6 +851,10 @@ target_if_spectral_info_write( qdf_mem_copy(&info->osps_cache.osc_params, param, sizeof(info->osps_cache.osc_params)); + + /* The cache is now valid */ + info->osps_cache.osc_is_valid = 1; + qdf_spin_unlock(&info->osps_lock); break;