diff options
| author | Yuanyuan Liu <yuanliu@qca.qualcomm.com> | 2014-02-21 13:55:57 -0800 |
|---|---|---|
| committer | Akash Patel <c_akashp@qca.qualcomm.com> | 2014-02-26 02:55:59 -0800 |
| commit | 234e2fe3a36160ff58bfd879de374b4bf8490485 (patch) | |
| tree | 61108ffac59a2bbc96b9d1f6a0d9e359cbeae618 | |
| parent | f33fc8ec105a158c27585d2b77a64c119c5db12e (diff) | |
qcacld: Fix active/passive scan selection via DRIVER command
Currently, the adapters of hdd_ioctl and hdd_wlan_cfg80211_scan
are two different interfaces(p2p0/wlan0), which makes DRIVER scan
command have no effect. Fix the problem by setting scan mode in
shared pHddctx instead of pAdapter.
CRs-Fixed: 614358
Change-Id: Ie174a3e02355582d889f60c68512a1e344bb8336
| -rw-r--r-- | CORE/HDD/inc/wlan_hdd_main.h | 1 | ||||
| -rw-r--r-- | CORE/HDD/src/wlan_hdd_cfg80211.c | 2 | ||||
| -rw-r--r-- | CORE/HDD/src/wlan_hdd_main.c | 7 | ||||
| -rw-r--r-- | CORE/HDD/src/wlan_hdd_wext.c | 6 |
4 files changed, 11 insertions, 5 deletions
diff --git a/CORE/HDD/inc/wlan_hdd_main.h b/CORE/HDD/inc/wlan_hdd_main.h index 957333f86ced..919e4ccf6abe 100644 --- a/CORE/HDD/inc/wlan_hdd_main.h +++ b/CORE/HDD/inc/wlan_hdd_main.h @@ -1293,6 +1293,7 @@ struct hdd_context_s v_U8_t max_intf_count; v_U8_t current_intf_count; + tSirScanType ioctl_scan_mode; }; diff --git a/CORE/HDD/src/wlan_hdd_cfg80211.c b/CORE/HDD/src/wlan_hdd_cfg80211.c index 1e8406021d2e..5f003f270ab3 100644 --- a/CORE/HDD/src/wlan_hdd_cfg80211.c +++ b/CORE/HDD/src/wlan_hdd_cfg80211.c @@ -5251,7 +5251,7 @@ int wlan_hdd_cfg80211_scan( struct wiphy *wiphy, else { /*Set the scan type to default type, in this case it is ACTIVE*/ - scanRequest.scanType = pScanInfo->scan_mode; + scanRequest.scanType = pHddCtx->ioctl_scan_mode; } scanRequest.minChnTime = cfg_param->nActiveMinChnTime; scanRequest.maxChnTime = cfg_param->nActiveMaxChnTime; diff --git a/CORE/HDD/src/wlan_hdd_main.c b/CORE/HDD/src/wlan_hdd_main.c index f5d1dba00f71..1cb7ca1f3f68 100644 --- a/CORE/HDD/src/wlan_hdd_main.c +++ b/CORE/HDD/src/wlan_hdd_main.c @@ -3916,11 +3916,13 @@ int hdd_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd) } else if (strncmp(command, "SCAN-ACTIVE", 11) == 0) { - pAdapter->scan_info.scan_mode = eSIR_ACTIVE_SCAN; + hdd_context_t *pHddCtx = WLAN_HDD_GET_CTX(pAdapter); + pHddCtx->ioctl_scan_mode = eSIR_ACTIVE_SCAN; } else if (strncmp(command, "SCAN-PASSIVE", 12) == 0) { - pAdapter->scan_info.scan_mode = eSIR_PASSIVE_SCAN; + hdd_context_t *pHddCtx = WLAN_HDD_GET_CTX(pAdapter); + pHddCtx->ioctl_scan_mode = eSIR_PASSIVE_SCAN; } else if (strncmp(command, "GETDWELLTIME", 12) == 0) { @@ -9041,6 +9043,7 @@ int hdd_wlan_startup(struct device *dev, v_VOID_t *hif_sc) pHddCtx->wiphy = wiphy; hdd_prevent_suspend(); pHddCtx->isLoadInProgress = TRUE; + pHddCtx->ioctl_scan_mode = eSIR_ACTIVE_SCAN; vos_set_load_unload_in_progress(VOS_MODULE_ID_VOSS, TRUE); diff --git a/CORE/HDD/src/wlan_hdd_wext.c b/CORE/HDD/src/wlan_hdd_wext.c index 0b76b393e975..10981ef56452 100644 --- a/CORE/HDD/src/wlan_hdd_wext.c +++ b/CORE/HDD/src/wlan_hdd_wext.c @@ -3289,12 +3289,14 @@ static int iw_set_priv(struct net_device *dev, } else if (strcasecmp(cmd, "scan-active") == 0) { - pAdapter->scan_info.scan_mode = eSIR_ACTIVE_SCAN; + hdd_context_t *pHddCtx = WLAN_HDD_GET_CTX(pAdapter); + pHddCtx->ioctl_scan_mode = eSIR_ACTIVE_SCAN; ret = snprintf(cmd, cmd_len, "OK"); } else if (strcasecmp(cmd, "scan-passive") == 0) { - pAdapter->scan_info.scan_mode = eSIR_PASSIVE_SCAN; + hdd_context_t *pHddCtx = WLAN_HDD_GET_CTX(pAdapter); + pHddCtx->ioctl_scan_mode = eSIR_PASSIVE_SCAN; ret = snprintf(cmd, cmd_len, "OK"); } else if( strcasecmp(cmd, "scan-mode") == 0 ) |
