summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorService qcabuildsw <qcabuildsw@localhost>2016-07-07 12:39:29 -0700
committerGerrit - the friendly Code Review server <code-review@localhost>2016-07-07 12:39:29 -0700
commit80b98532e8a671a8ba58937ca0ca6365d1b01dda (patch)
tree0503674e162c8d80b3d7f5d072839dfe9b671253
parent98f6df1aaf7d8152b151396c287184ba4ea38901 (diff)
parentdc7f2c9c2fa37f500b951cb561632e8d9e90ebb9 (diff)
Merge "qcacld-3.0: Fix NULL pointer dereferencing in p2p TX MGMT" into wlan-cld3.driver.lnx.1.1-dev
-rw-r--r--core/hdd/src/wlan_hdd_p2p.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/core/hdd/src/wlan_hdd_p2p.c b/core/hdd/src/wlan_hdd_p2p.c
index e7bd3315b86a..9d41dc3e8c68 100644
--- a/core/hdd/src/wlan_hdd_p2p.c
+++ b/core/hdd/src/wlan_hdd_p2p.c
@@ -1411,7 +1411,9 @@ int __wlan_hdd_mgmt_tx(struct wiphy *wiphy, struct wireless_dev *wdev,
home_ch = goAdapter->sessionCtx.ap.operatingChannel;
}
- if (ieee80211_frequency_to_channel(chan->center_freq) == home_ch) {
+ if (chan &&
+ (ieee80211_frequency_to_channel(chan->center_freq) ==
+ home_ch)) {
/* if adapter is already on requested ch, no need for ROC */
wait = 0;
hddLog(LOG1,
@@ -1419,7 +1421,7 @@ int __wlan_hdd_mgmt_tx(struct wiphy *wiphy, struct wireless_dev *wdev,
goto send_frame;
}
- if (offchan && wait) {
+ if (offchan && wait && chan) {
int status;
rem_on_channel_request_type_t req_type = OFF_CHANNEL_ACTION_TX;
/* In case of P2P Client mode if we are already */