summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVidyullatha Kanchanapally <vidyullatha@codeaurora.org>2016-05-24 15:49:44 +0530
committerqcabuildsw <qcabuildsw@localhost>2016-10-04 23:00:47 -0700
commit87b224f183bdbfb51c4ce63ee90caae64739b09b (patch)
treebec8d7d839c0bf97b46f28f1bfe11c3d9338255c
parent518c5d7979f0427b34fe99982b36486073ffd3ae (diff)
qcacld-3.0: Get operating channel only when connected or bss started
qcacld-2.0 to qcacld-3.0 propagation wlan_hdd_mgmt_tx can be called in not-connected state in case of station mode. Here the operating channel is fetched from the connected info without actually checking whether the sta interface is connected or not and hence can lead to making a wrong decision whether or not to request ROC. Fix the above issue by fetching the operating channel only in connected state. In not-connected state driver always goes for requesting a ROC. Add similar check in case of soft ap and P2P-GO to get operating channel only when the bss is started. Change-Id: I91571f3b6a4f68487afcddd3152f469ff502eb6b CRs-Fixed: 957469
-rw-r--r--core/hdd/src/wlan_hdd_p2p.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/core/hdd/src/wlan_hdd_p2p.c b/core/hdd/src/wlan_hdd_p2p.c
index 193a0d26d926..ea3df68c7a47 100644
--- a/core/hdd/src/wlan_hdd_p2p.c
+++ b/core/hdd/src/wlan_hdd_p2p.c
@@ -1326,14 +1326,18 @@ int __wlan_hdd_mgmt_tx(struct wiphy *wiphy, struct wireless_dev *wdev,
[WLAN_HDD_PUBLIC_ACTION_FRAME_OFFSET]));
}
- if (pAdapter->device_mode == QDF_SAP_MODE) {
+ if ((pAdapter->device_mode == QDF_SAP_MODE) &&
+ (test_bit(SOFTAP_BSS_STARTED, &pAdapter->event_flags))) {
home_ch = pAdapter->sessionCtx.ap.operatingChannel;
- } else if (pAdapter->device_mode == QDF_STA_MODE) {
+ } else if ((pAdapter->device_mode == QDF_STA_MODE) &&
+ (pAdapter->sessionCtx.station.conn_info.connState ==
+ eConnectionState_Associated)) {
home_ch =
pAdapter->sessionCtx.station.conn_info.operationChannel;
} else {
goAdapter = hdd_get_adapter(pAdapter->pHddCtx, QDF_P2P_GO_MODE);
- if (goAdapter)
+ if (goAdapter &&
+ (test_bit(SOFTAP_BSS_STARTED, &goAdapter->event_flags)))
home_ch = goAdapter->sessionCtx.ap.operatingChannel;
}