summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDeepthi Gowri <deepthi@codeaurora.org>2016-08-25 14:28:55 +0530
committerGerrit - the friendly Code Review server <code-review@localhost>2016-09-14 23:37:19 -0700
commitf039cdf2a2241510987db42a08dbfb38741a550e (patch)
tree74e60dfe9f35cdf7a0ef01844a5e3c7e4e58d504
parentafa16b8110a96587e1b34022927c129232eeea95 (diff)
qcacld-2.0: Protect the ROC ctx with mutex during mgmt TX
Protect access of remain_on_chan_ctx in __wlan_hdd_mgmt_tx under remain_on_chan_ctx_lock mutex. CRs-Fixed: 1054846 Change-Id: Ia96d1ea901bcbe95b5ecf608d63ba6a544a1465c
-rw-r--r--CORE/HDD/src/wlan_hdd_p2p.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/CORE/HDD/src/wlan_hdd_p2p.c b/CORE/HDD/src/wlan_hdd_p2p.c
index 52e2f03c967a..1ea663e5f04a 100644
--- a/CORE/HDD/src/wlan_hdd_p2p.c
+++ b/CORE/HDD/src/wlan_hdd_p2p.c
@@ -1626,17 +1626,18 @@ int __wlan_hdd_mgmt_tx(struct wiphy *wiphy, struct net_device *dev,
} else
mutex_unlock(&cfgState->remain_on_chan_ctx_lock);
+ mutex_lock(&cfgState->remain_on_chan_ctx_lock);
if((cfgState->remain_on_chan_ctx != NULL) &&
(cfgState->current_freq == chan->center_freq)
)
{
+ mutex_unlock(&cfgState->remain_on_chan_ctx_lock);
hddLog(LOG1,"action frame: extending the wait time");
extendedWait = (tANI_U16)wait;
goto send_frame;
}
-
+ mutex_unlock(&cfgState->remain_on_chan_ctx_lock);
INIT_COMPLETION(pAdapter->offchannel_tx_event);
-
status = wlan_hdd_request_remain_on_channel(wiphy, dev,
chan,
#if (LINUX_VERSION_CODE < KERNEL_VERSION(3,8,0)) && !defined(WITH_BACKPORTS)