diff options
| author | Sundar Subramaniyan <subrams@qti.qualcomm.com> | 2013-12-30 13:16:54 -0800 |
|---|---|---|
| committer | Prakash Dhavali <pdhavali@codeaurora.org> | 2014-01-17 21:45:11 -0800 |
| commit | 05be1936e941646dae3c360c8dabec17ee2985a8 (patch) | |
| tree | a0f10d1ac33dec51470e95204f0bc40f80810b38 | |
| parent | fcf27bfd6c003fea06058e5390b92ff44f06d895 (diff) | |
cld: Fix crash in FTM initialization for discrete
For discrete chipset, during initialization in FTM mode,
there is a crash when regulatory notifier callback is called
as the regulatory and other configuration parameters are not
setup for FTM mode. FTM mode in discrete does not require
regulatory settings and just needs the wiphy register to be done.
So fix this by skipping the notifier callbacks setup when driver
is loaded in FTM mode. Also the SME module is skipped for FTM mode
for discrete chipset as this is not required.
.
Change-Id: Id19178572ff1369777ecd3adb1a96edd4c0e79be
CRs-Fixed: 594742
| -rw-r--r-- | CORE/HDD/src/wlan_hdd_cfg80211.c | 8 | ||||
| -rw-r--r-- | CORE/HDD/src/wlan_hdd_ftm.c | 8 |
2 files changed, 16 insertions, 0 deletions
diff --git a/CORE/HDD/src/wlan_hdd_cfg80211.c b/CORE/HDD/src/wlan_hdd_cfg80211.c index 6bfa05319375..858c03ab2ead 100644 --- a/CORE/HDD/src/wlan_hdd_cfg80211.c +++ b/CORE/HDD/src/wlan_hdd_cfg80211.c @@ -712,6 +712,10 @@ int wlan_hdd_cfg80211_init(struct device *dev, } #endif/*FEATURE_WLAN_SCAN_PNO*/ +#if defined(QCA_WIFI_2_0) && defined (QCA_WIFI_FTM) && !defined(QCA_WIFI_ISOC) + if (vos_get_conparam() != VOS_FTM_MODE) { +#endif + #ifdef CONFIG_ENABLE_LINUX_REG /* even with WIPHY_FLAG_CUSTOM_REGULATORY, driver can still register regulatory callback and @@ -724,6 +728,10 @@ int wlan_hdd_cfg80211_init(struct device *dev, wiphy->reg_notifier = wlan_hdd_crda_reg_notifier; #endif +#if defined(QCA_WIFI_2_0) && defined (QCA_WIFI_FTM) && !defined(QCA_WIFI_ISOC) + } +#endif + wiphy->max_scan_ssids = MAX_SCAN_SSID; wiphy->max_scan_ie_len = SIR_MAC_MAX_IE_LENGTH; diff --git a/CORE/HDD/src/wlan_hdd_ftm.c b/CORE/HDD/src/wlan_hdd_ftm.c index f289717b724d..9bcf52d99110 100644 --- a/CORE/HDD/src/wlan_hdd_ftm.c +++ b/CORE/HDD/src/wlan_hdd_ftm.c @@ -629,6 +629,7 @@ static VOS_STATUS wlan_ftm_vos_open( v_CONTEXT_t pVosContext, v_SIZE_t hddContex goto err_nv_close; } +#ifndef QCA_WIFI_FTM /* Now proceed to open the SME */ vStatus = sme_Open(gpVosContext->pMACContext); if (!VOS_IS_STATUS_SUCCESS(vStatus)) @@ -648,8 +649,13 @@ static VOS_STATUS wlan_ftm_vos_open( v_CONTEXT_t pVosContext, v_SIZE_t hddContex "%s: VOSS successfully Opened", __func__); return VOS_STATUS_SUCCESS; } +#else + return VOS_STATUS_SUCCESS; +#endif +#ifndef QCA_WIFI_FTM err_mac_close: +#endif macClose(gpVosContext->pMACContext); err_nv_close: @@ -708,6 +714,7 @@ static VOS_STATUS wlan_ftm_vos_close( v_CONTEXT_t vosContext ) VOS_STATUS vosStatus; pVosContextType gpVosContext = (pVosContextType)vosContext; +#ifndef QCA_WIFI_FTM vosStatus = sme_Close(((pVosContextType)vosContext)->pMACContext); if (!VOS_IS_STATUS_SUCCESS(vosStatus)) { @@ -715,6 +722,7 @@ static VOS_STATUS wlan_ftm_vos_close( v_CONTEXT_t vosContext ) "%s: Failed to close BAL",__func__); VOS_ASSERT( VOS_IS_STATUS_SUCCESS( vosStatus ) ); } +#endif vosStatus = macClose( ((pVosContextType)vosContext)->pMACContext); if (!VOS_IS_STATUS_SUCCESS(vosStatus)) |
