summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYuanyuan Liu <yuanliu@qca.qualcomm.com>2014-03-26 13:26:43 -0700
committerAkash Patel <c_akashp@qca.qualcomm.com>2014-03-27 09:22:13 -0700
commit321f24b5f2698014094dd7869767f97630eab4e5 (patch)
tree23e36327341d940afccb080640913321f8180f1a
parent3d171312a332e247d130313c20624a6e00522454 (diff)
qcacld: Read scan_mode from HDD context in iwlist scan command
Read scan_mode from HDD context instead of Adapter when using iwlist command for scan. Change-Id: Ibe35400d0d87a2f7ae739ee4b60283b334ec8b23 CRs-Fixed: 639211
-rw-r--r--CORE/HDD/src/wlan_hdd_scan.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/CORE/HDD/src/wlan_hdd_scan.c b/CORE/HDD/src/wlan_hdd_scan.c
index a75fffefd622..ebb3439ab8c2 100644
--- a/CORE/HDD/src/wlan_hdd_scan.c
+++ b/CORE/HDD/src/wlan_hdd_scan.c
@@ -610,6 +610,7 @@ int iw_set_scan(struct net_device *dev, struct iw_request_info *info,
union iwreq_data *wrqu, char *extra)
{
hdd_adapter_t *pAdapter = WLAN_HDD_GET_PRIV_PTR(dev) ;
+ hdd_context_t *pHddCtx = WLAN_HDD_GET_CTX(pAdapter);
hdd_wext_state_t *pwextBuf = WLAN_HDD_GET_WEXT_STATE_PTR(pAdapter);
tCsrScanRequest scanRequest;
v_U32_t scanId = 0;
@@ -643,7 +644,8 @@ int iw_set_scan(struct net_device *dev, struct iw_request_info *info,
if (NULL != wrqu->data.pointer)
{
/* set scanType, active or passive */
- if ((IW_SCAN_TYPE_ACTIVE == scanReq->scan_type) || (eSIR_ACTIVE_SCAN == pAdapter->scan_info.scan_mode))
+ if ((IW_SCAN_TYPE_ACTIVE == scanReq->scan_type) ||
+ (eSIR_ACTIVE_SCAN == pHddCtx->ioctl_scan_mode))
{
scanRequest.scanType = eSIR_ACTIVE_SCAN;
}
@@ -681,7 +683,7 @@ int iw_set_scan(struct net_device *dev, struct iw_request_info *info,
}
else
{
- if(pAdapter->scan_info.scan_mode == eSIR_ACTIVE_SCAN) {
+ if (pHddCtx->ioctl_scan_mode == eSIR_ACTIVE_SCAN) {
/* set the scan type to active */
scanRequest.scanType = eSIR_ACTIVE_SCAN;
} else {