summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDeepthi Gowri <deepthi@codeaurora.org>2016-10-13 14:31:41 +0530
committerqcabuildsw <qcabuildsw@localhost>2016-10-17 21:58:13 -0700
commit0a151cbb2e486bc3eec039d45ce6fe600803243c (patch)
treeff80844b9ce9d822e388655472a5abe5bf486901
parentb62b564728e6e457cbcf3a46a526a4b023fba164 (diff)
qcacld-3.0: Protect the ROC ctx with mutex during mgmt TX
qcacld-2.0 to qcacld-3.0 propagation 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.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/core/hdd/src/wlan_hdd_p2p.c b/core/hdd/src/wlan_hdd_p2p.c
index 967cbc1638d3..490e3665b59d 100644
--- a/core/hdd/src/wlan_hdd_p2p.c
+++ b/core/hdd/src/wlan_hdd_p2p.c
@@ -1449,14 +1449,17 @@ static int __wlan_hdd_mgmt_tx(struct wiphy *wiphy, struct wireless_dev *wdev,
} 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);
hdd_notice("action frame: extending the wait time");
extendedWait = (uint16_t) 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,