summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CORE/HDD/inc/wlan_hdd_main.h4
-rw-r--r--CORE/HDD/src/wlan_hdd_assoc.c5
-rw-r--r--CORE/HDD/src/wlan_hdd_cfg.c226
-rw-r--r--CORE/HDD/src/wlan_hdd_cfg80211.c19
-rwxr-xr-xCORE/HDD/src/wlan_hdd_main.c278
-rw-r--r--CORE/HDD/src/wlan_hdd_oemdata.c6
-rw-r--r--CORE/HDD/src/wlan_hdd_scan.c13
-rw-r--r--CORE/HDD/src/wlan_hdd_wext.c34
-rw-r--r--CORE/VOSS/inc/i_vos_packet.h3
-rw-r--r--CORE/VOSS/inc/vos_getBin.h2
-rw-r--r--CORE/VOSS/src/vos_getBin.c57
11 files changed, 463 insertions, 184 deletions
diff --git a/CORE/HDD/inc/wlan_hdd_main.h b/CORE/HDD/inc/wlan_hdd_main.h
index d9c1138f4856..0e65ccebb277 100644
--- a/CORE/HDD/inc/wlan_hdd_main.h
+++ b/CORE/HDD/inc/wlan_hdd_main.h
@@ -1727,4 +1727,8 @@ void wlan_hdd_cfg80211_link_layer_stats_init(hdd_context_t *pHddCtx);
#endif
void hdd_update_macaddr(hdd_config_t *cfg_ini, v_MACADDR_t hw_macaddr);
+#if defined(FEATURE_WLAN_LFR) && defined(WLAN_FEATURE_ROAM_SCAN_OFFLOAD)
+void wlan_hdd_disable_roaming(hdd_adapter_t *pAdapter);
+void wlan_hdd_enable_roaming(hdd_adapter_t *pAdapter);
+#endif
#endif // end #if !defined( WLAN_HDD_MAIN_H )
diff --git a/CORE/HDD/src/wlan_hdd_assoc.c b/CORE/HDD/src/wlan_hdd_assoc.c
index 4acdde45c9da..e29eec6d7917 100644
--- a/CORE/HDD/src/wlan_hdd_assoc.c
+++ b/CORE/HDD/src/wlan_hdd_assoc.c
@@ -752,6 +752,10 @@ static void hdd_SendAssociationEvent(struct net_device *dev,tCsrRoamInfo *pCsrRo
pr_info("wlan: disconnected\n");
type = WLAN_STA_DISASSOC_DONE_IND;
memset(wrqu.ap_addr.sa_data,'\0',ETH_ALEN);
+ wlan_hdd_decr_active_session(pHddCtx, pAdapter->device_mode);
+#if defined(FEATURE_WLAN_LFR) && defined(WLAN_FEATURE_ROAM_SCAN_OFFLOAD)
+ wlan_hdd_enable_roaming(pAdapter);
+#endif
#ifdef IPA_OFFLOAD
if (hdd_ipa_is_enabled(pHddCtx))
@@ -924,7 +928,6 @@ static eHalStatus hdd_DisConnectHandler( hdd_adapter_t *pAdapter, tCsrRoamInfo *
pHddCtx->isAmpAllowed = VOS_TRUE;
}
hdd_clearRoamProfileIe( pAdapter );
- wlan_hdd_decr_active_session(pHddCtx, pAdapter->device_mode);
hdd_wmm_init( pAdapter );
// indicate 'disconnect' status to wpa_supplicant...
diff --git a/CORE/HDD/src/wlan_hdd_cfg.c b/CORE/HDD/src/wlan_hdd_cfg.c
index f0dbbc09677f..19020c4ea313 100644
--- a/CORE/HDD/src/wlan_hdd_cfg.c
+++ b/CORE/HDD/src/wlan_hdd_cfg.c
@@ -61,196 +61,254 @@
#include <wlan_hdd_misc.h>
#if defined (WLAN_FEATURE_VOWIFI_11R) || defined (FEATURE_WLAN_ESE) || defined(FEATURE_WLAN_LFR)
-static void cbNotifySetRoamPrefer5GHz(hdd_context_t *pHddCtx, unsigned long NotifyId)
+static void
+cbNotifySetRoamPrefer5GHz(hdd_context_t *pHddCtx, unsigned long NotifyId)
{
- sme_UpdateRoamPrefer5GHz((tHalHandle)(pHddCtx->hHal), pHddCtx->cfg_ini->nRoamPrefer5GHz);
+ sme_UpdateRoamPrefer5GHz(pHddCtx->hHal, pHddCtx->cfg_ini->nRoamPrefer5GHz);
}
-static void cbNotifySetImmediateRoamRssiDiff(hdd_context_t *pHddCtx, unsigned long NotifyId)
+static void
+cbNotifySetImmediateRoamRssiDiff(hdd_context_t *pHddCtx, unsigned long NotifyId)
{
- sme_UpdateImmediateRoamRssiDiff((tHalHandle)(pHddCtx->hHal),
- pHddCtx->cfg_ini->nImmediateRoamRssiDiff);
+ sme_UpdateImmediateRoamRssiDiff(pHddCtx->hHal,
+ pHddCtx->cfg_ini->nImmediateRoamRssiDiff,
+ 0);
}
-static void cbNotifySetRoamRssiDiff(hdd_context_t *pHddCtx, unsigned long NotifyId)
+static void
+cbNotifySetRoamRssiDiff(hdd_context_t *pHddCtx, unsigned long NotifyId)
{
- sme_UpdateRoamRssiDiff((tHalHandle)(pHddCtx->hHal),
- pHddCtx->cfg_ini->RoamRssiDiff);
+ sme_UpdateRoamRssiDiff(pHddCtx->hHal,
+ 0,
+ pHddCtx->cfg_ini->RoamRssiDiff);
}
-static void cbNotifySetFastTransitionEnabled(hdd_context_t *pHddCtx, unsigned long NotifyId)
+static void
+cbNotifySetFastTransitionEnabled(hdd_context_t *pHddCtx, unsigned long NotifyId)
{
- sme_UpdateFastTransitionEnabled((tHalHandle)(pHddCtx->hHal), pHddCtx->cfg_ini->isFastTransitionEnabled);
+ sme_UpdateFastTransitionEnabled(pHddCtx->hHal,
+ pHddCtx->cfg_ini->isFastTransitionEnabled);
}
-static void cbNotifySetRoamIntraBand(hdd_context_t *pHddCtx, unsigned long NotifyId)
+static void
+cbNotifySetRoamIntraBand(hdd_context_t *pHddCtx, unsigned long NotifyId)
{
- sme_setRoamIntraBand((tHalHandle)(pHddCtx->hHal), pHddCtx->cfg_ini->nRoamIntraBand);
+ sme_setRoamIntraBand(pHddCtx->hHal, pHddCtx->cfg_ini->nRoamIntraBand);
}
-static void cbNotifySetWESMode(hdd_context_t *pHddCtx, unsigned long NotifyId)
+static void
+cbNotifySetWESMode(hdd_context_t *pHddCtx, unsigned long NotifyId)
{
- // at the point this routine is called, the value in the cfg_ini table has already been updated
- sme_UpdateWESMode((tHalHandle)(pHddCtx->hHal), pHddCtx->cfg_ini->isWESModeEnabled);
+ /* At the point this routine is called, the value in the cfg_ini
+ table has already been updated */
+ sme_UpdateWESMode(pHddCtx->hHal,
+ pHddCtx->cfg_ini->isWESModeEnabled,
+ 0);
}
-static void cbNotifySetRoamScanNProbes(hdd_context_t *pHddCtx, unsigned long NotifyId)
+static void
+cbNotifySetRoamScanNProbes(hdd_context_t *pHddCtx, unsigned long NotifyId)
{
- sme_UpdateRoamScanNProbes((tHalHandle)(pHddCtx->hHal), pHddCtx->cfg_ini->nProbes);
+ sme_UpdateRoamScanNProbes(pHddCtx->hHal, 0,
+ pHddCtx->cfg_ini->nProbes);
}
-static void cbNotifySetRoamScanHomeAwayTime(hdd_context_t *pHddCtx, unsigned long NotifyId)
+static void
+cbNotifySetRoamScanHomeAwayTime(hdd_context_t *pHddCtx, unsigned long NotifyId)
{
- sme_UpdateRoamScanHomeAwayTime((tHalHandle)(pHddCtx->hHal), pHddCtx->cfg_ini->nRoamScanHomeAwayTime, eANI_BOOLEAN_TRUE);
+ sme_UpdateRoamScanHomeAwayTime(pHddCtx->hHal, 0,
+ pHddCtx->cfg_ini->nRoamScanHomeAwayTime,
+ eANI_BOOLEAN_TRUE);
}
#endif
#ifdef FEATURE_WLAN_OKC
-static void cbNotifySetOkcFeatureEnabled(hdd_context_t *pHddCtx, unsigned long NotifyId)
+static void
+cbNotifySetOkcFeatureEnabled(hdd_context_t *pHddCtx, unsigned long NotifyId)
{
- // at the point this routine is called, the value in the cfg_ini table has already been updated
+ /* At the point this routine is called, the value in the cfg_ini
+ table has already been updated */
}
#endif
#ifdef FEATURE_WLAN_LFR
-static void NotifyIsFastRoamIniFeatureEnabled(hdd_context_t *pHddCtx, unsigned long NotifyId)
+static void
+NotifyIsFastRoamIniFeatureEnabled(hdd_context_t *pHddCtx,
+ unsigned long NotifyId)
{
- // at the point this routine is called, the value in the cfg_ini table has already been updated
- sme_UpdateIsFastRoamIniFeatureEnabled((tHalHandle)(pHddCtx->hHal), pHddCtx->cfg_ini->isFastRoamIniFeatureEnabled );
+ /* At the point this routine is called, the value in the cfg_ini
+ table has already been updated */
+ sme_UpdateIsFastRoamIniFeatureEnabled(pHddCtx->hHal, 0,
+ pHddCtx->cfg_ini->isFastRoamIniFeatureEnabled );
}
-static void NotifyIsMAWCIniFeatureEnabled(hdd_context_t *pHddCtx, unsigned long NotifyId)
+static void
+NotifyIsMAWCIniFeatureEnabled(hdd_context_t *pHddCtx, unsigned long NotifyId)
{
- /* at the point this routine is called, the value in the cfg_ini table has already been updated */
- sme_UpdateIsMAWCIniFeatureEnabled((tHalHandle)(pHddCtx->hHal), pHddCtx->cfg_ini->MAWCEnabled );
+ /* At the point this routine is called, the value in the cfg_ini
+ table has already been updated */
+ sme_UpdateIsMAWCIniFeatureEnabled(pHddCtx->hHal,
+ pHddCtx->cfg_ini->MAWCEnabled );
}
#endif
#ifdef FEATURE_WLAN_ESE
-static void cbNotifySetEseFeatureEnabled(hdd_context_t *pHddCtx, unsigned long NotifyId)
+static void
+cbNotifySetEseFeatureEnabled(hdd_context_t *pHddCtx, unsigned long NotifyId)
{
- // at the point this routine is called, the value in the cfg_ini table has already been updated
- sme_UpdateIsEseFeatureEnabled((tHalHandle)(pHddCtx->hHal), pHddCtx->cfg_ini->isEseIniFeatureEnabled );
+ /* At the point this routine is called, the value in the cfg_ini
+ table has already been updated */
+ sme_UpdateIsEseFeatureEnabled(pHddCtx->hHal,
+ pHddCtx->cfg_ini->isEseIniFeatureEnabled );
}
#endif
-static void cbNotifySetFwRssiMonitoring(hdd_context_t *pHddCtx, unsigned long NotifyId)
+static void
+cbNotifySetFwRssiMonitoring(hdd_context_t *pHddCtx, unsigned long NotifyId)
{
- // at the point this routine is called, the value in the cfg_ini table has already been updated
- sme_UpdateConfigFwRssiMonitoring((tHalHandle)(pHddCtx->hHal), pHddCtx->cfg_ini->fEnableFwRssiMonitoring );
+ /* At the point this routine is called, the value in the cfg_ini
+ table has already been updated */
+ sme_UpdateConfigFwRssiMonitoring(pHddCtx->hHal,
+ pHddCtx->cfg_ini->fEnableFwRssiMonitoring);
}
#ifdef WLAN_FEATURE_NEIGHBOR_ROAMING
static void cbNotifySetOpportunisticScanThresholdDiff(hdd_context_t *pHddCtx,
unsigned long NotifyId)
{
- /*
- * at the point this routine is called, the value in the cfg_ini table
- * has already been updated
- */
- sme_SetRoamOpportunisticScanThresholdDiff((tHalHandle)(pHddCtx->hHal),
+ /* At the point this routine is called, the value in the cfg_ini
+ table has already been updated */
+ sme_SetRoamOpportunisticScanThresholdDiff(pHddCtx->hHal, 0,
pHddCtx->cfg_ini->nOpportunisticThresholdDiff );
}
static void cbNotifySetRoamRescanRssiDiff(hdd_context_t *pHddCtx,
unsigned long NotifyId)
{
- /*
- * at the point this routine is called, the value in the cfg_ini table
- * has already been updated
- */
- sme_SetRoamRescanRssiDiff((tHalHandle)(pHddCtx->hHal),
+ /* At the point this routine is called, the value in the cfg_ini
+ table has already been updated */
+ sme_SetRoamRescanRssiDiff(pHddCtx->hHal,
+ 0,
pHddCtx->cfg_ini->nRoamRescanRssiDiff);
}
-static void cbNotifySetNeighborLookupRssiThreshold(hdd_context_t *pHddCtx, unsigned long NotifyId)
+static void
+cbNotifySetNeighborLookupRssiThreshold(hdd_context_t *pHddCtx,
+ unsigned long NotifyId)
{
- // at the point this routine is called, the value in the cfg_ini table has already been updated
- sme_setNeighborLookupRssiThreshold((tHalHandle)(pHddCtx->hHal), pHddCtx->cfg_ini->nNeighborLookupRssiThreshold );
+ /* At the point this routine is called, the value in the cfg_ini
+ table has already been updated */
+ sme_setNeighborLookupRssiThreshold(pHddCtx->hHal, 0,
+ pHddCtx->cfg_ini->nNeighborLookupRssiThreshold);
}
-static void cbNotifySetNeighborScanPeriod(hdd_context_t *pHddCtx, unsigned long NotifyId)
+static void
+cbNotifySetNeighborScanPeriod(hdd_context_t *pHddCtx, unsigned long NotifyId)
{
- // at the point this routine is called, the value in the cfg_ini table has already been updated
- sme_setNeighborScanPeriod((tHalHandle)(pHddCtx->hHal), pHddCtx->cfg_ini->nNeighborScanPeriod );
+ /* At the point this routine is called, the value in the cfg_ini
+ table has already been updated */
+ sme_setNeighborScanPeriod(pHddCtx->hHal, 0,
+ pHddCtx->cfg_ini->nNeighborScanPeriod );
}
-static void cbNotifySetNeighborResultsRefreshPeriod(hdd_context_t *pHddCtx, unsigned long NotifyId)
+static void
+cbNotifySetNeighborResultsRefreshPeriod(hdd_context_t *pHddCtx,
+ unsigned long NotifyId)
{
- // at the point this routine is called, the value in the cfg_ini table has already been updated
- sme_setNeighborScanRefreshPeriod((tHalHandle)(pHddCtx->hHal), pHddCtx->cfg_ini->nNeighborResultsRefreshPeriod );
+ /* At the point this routine is called, the value in the cfg_ini
+ table has already been updated */
+ sme_setNeighborScanRefreshPeriod(pHddCtx->hHal, 0,
+ pHddCtx->cfg_ini->nNeighborResultsRefreshPeriod);
}
-static void cbNotifySetEmptyScanRefreshPeriod(hdd_context_t *pHddCtx, unsigned long NotifyId)
+static void
+cbNotifySetEmptyScanRefreshPeriod(hdd_context_t *pHddCtx,
+ unsigned long NotifyId)
{
- // at the point this routine is called, the value in the cfg_ini table has already been updated
- sme_UpdateEmptyScanRefreshPeriod((tHalHandle)(pHddCtx->hHal), pHddCtx->cfg_ini->nEmptyScanRefreshPeriod);
+ /* At the point this routine is called, the value in the cfg_ini
+ table has already been updated */
+ sme_UpdateEmptyScanRefreshPeriod(pHddCtx->hHal, 0,
+ pHddCtx->cfg_ini->nEmptyScanRefreshPeriod);
}
-static void cbNotifySetNeighborScanMinChanTime(hdd_context_t *pHddCtx, unsigned long NotifyId)
+static void
+cbNotifySetNeighborScanMinChanTime(hdd_context_t *pHddCtx,
+ unsigned long NotifyId)
{
- // at the point this routine is called, the value in the cfg_ini table has already been updated
- sme_setNeighborScanMinChanTime((tHalHandle)(pHddCtx->hHal), pHddCtx->cfg_ini->nNeighborScanMinChanTime);
+ /* At the point this routine is called, the value in the cfg_ini
+ table has already been updated */
+ sme_setNeighborScanMinChanTime(pHddCtx->hHal,
+ pHddCtx->cfg_ini->nNeighborScanMinChanTime,
+ 0);
}
-static void cbNotifySetNeighborScanMaxChanTime(hdd_context_t *pHddCtx, unsigned long NotifyId)
+static void
+cbNotifySetNeighborScanMaxChanTime(hdd_context_t *pHddCtx,
+ unsigned long NotifyId)
{
- sme_setNeighborScanMaxChanTime((tHalHandle)(pHddCtx->hHal), pHddCtx->cfg_ini->nNeighborScanMaxChanTime);
+ sme_setNeighborScanMaxChanTime(pHddCtx->hHal, 0,
+ pHddCtx->cfg_ini->nNeighborScanMaxChanTime);
}
static void cbNotifySetRoamBmissFirstBcnt(hdd_context_t *pHddCtx,
unsigned long NotifyId)
{
- /*
- * at the point this routine is called, the value in the cfg_ini table
- * has already been updated
- */
- sme_SetRoamBmissFirstBcnt((tHalHandle)(pHddCtx->hHal),
+ /* At the point this routine is called, the value in the cfg_ini
+ table has already been updated */
+ sme_SetRoamBmissFirstBcnt(pHddCtx->hHal,
+ 0,
pHddCtx->cfg_ini->nRoamBmissFirstBcnt);
}
static void cbNotifySetRoamBmissFinalBcnt(hdd_context_t *pHddCtx,
unsigned long NotifyId)
{
- sme_SetRoamBmissFinalBcnt((tHalHandle)(pHddCtx->hHal),
+ sme_SetRoamBmissFinalBcnt(pHddCtx->hHal, 0,
pHddCtx->cfg_ini->nRoamBmissFinalBcnt);
}
static void cbNotifySetRoamBeaconRssiWeight(hdd_context_t *pHddCtx,
unsigned long NotifyId)
{
- sme_SetRoamBeaconRssiWeight((tHalHandle)(pHddCtx->hHal),
+ sme_SetRoamBeaconRssiWeight(pHddCtx->hHal, 0,
pHddCtx->cfg_ini->nRoamBeaconRssiWeight);
}
+
+static void
+cbNotifySetDFSScanMode(hdd_context_t *pHddCtx, unsigned long NotifyId)
+{
+ /* At the point this routine is called, the value in the cfg_ini
+ table has already been updated */
+ sme_UpdateDFSScanMode(pHddCtx->hHal, 0,
+ pHddCtx->cfg_ini->allowDFSChannelRoam);
+}
+
#endif
static void cbNotifySetEnableSSR(hdd_context_t *pHddCtx, unsigned long NotifyId)
{
- sme_UpdateEnableSSR((tHalHandle)(pHddCtx->hHal), pHddCtx->cfg_ini->enableSSR);
+ sme_UpdateEnableSSR(pHddCtx->hHal, pHddCtx->cfg_ini->enableSSR);
}
#ifdef WLAN_FEATURE_ROAM_SCAN_OFFLOAD
-static void cbNotifyUpdateRoamScanOffloadEnabled(hdd_context_t *pHddCtx, unsigned long NotifyId)
+static void
+cbNotifyUpdateRoamScanOffloadEnabled(hdd_context_t *pHddCtx,
+ unsigned long NotifyId)
{
- sme_UpdateRoamScanOffloadEnabled((tHalHandle)(pHddCtx->hHal), pHddCtx->cfg_ini->isRoamOffloadScanEnabled);
- if (0 == pHddCtx->cfg_ini->isRoamOffloadScanEnabled)
- {
+ sme_UpdateRoamScanOffloadEnabled(pHddCtx->hHal,
+ pHddCtx->cfg_ini->isRoamOffloadScanEnabled);
+ if (0 == pHddCtx->cfg_ini->isRoamOffloadScanEnabled) {
pHddCtx->cfg_ini->bFastRoamInConIniFeatureEnabled = 0;
- sme_UpdateEnableFastRoamInConcurrency((tHalHandle)(pHddCtx->hHal), pHddCtx->cfg_ini->bFastRoamInConIniFeatureEnabled );
+ sme_UpdateEnableFastRoamInConcurrency(pHddCtx->hHal,
+ pHddCtx->cfg_ini->bFastRoamInConIniFeatureEnabled);
}
}
-static void cbNotifySetEnableFastRoamInConcurrency(hdd_context_t *pHddCtx, unsigned long NotifyId)
+static void
+cbNotifySetEnableFastRoamInConcurrency(hdd_context_t *pHddCtx,
+ unsigned long NotifyId)
{
- sme_UpdateEnableFastRoamInConcurrency((tHalHandle)(pHddCtx->hHal), pHddCtx->cfg_ini->bFastRoamInConIniFeatureEnabled );
-}
-
-static void cbNotifySetDFSScanMode(hdd_context_t *pHddCtx, unsigned long NotifyId)
-{
- /* at the point this routine is called, the value in the cfg_ini table has
- * already been updated
- */
- sme_UpdateDFSScanMode((tHalHandle)(pHddCtx->hHal),
- pHddCtx->cfg_ini->allowDFSChannelRoam);
+ sme_UpdateEnableFastRoamInConcurrency(pHddCtx->hHal,
+ pHddCtx->cfg_ini->bFastRoamInConIniFeatureEnabled);
}
#endif
diff --git a/CORE/HDD/src/wlan_hdd_cfg80211.c b/CORE/HDD/src/wlan_hdd_cfg80211.c
index 740f6b0969d4..9fddea7dd3d2 100644
--- a/CORE/HDD/src/wlan_hdd_cfg80211.c
+++ b/CORE/HDD/src/wlan_hdd_cfg80211.c
@@ -8089,7 +8089,10 @@ VOS_STATUS wlan_hdd_cfg80211_roam_metrics_handover(hdd_adapter_t * pAdapter,
*
*/
static eHalStatus hdd_cfg80211_scan_done_callback(tHalHandle halHandle,
- void *pContext, tANI_U32 scanId, eCsrScanStatus status)
+ void *pContext,
+ tANI_U8 sessionId,
+ tANI_U32 scanId,
+ eCsrScanStatus status)
{
struct net_device *dev = (struct net_device *) pContext;
//struct wireless_dev *wdev = dev->ieee80211_ptr;
@@ -9728,6 +9731,10 @@ static int __wlan_hdd_cfg80211_connect( struct wiphy *wiphy,
return -ECONNREFUSED;
}
+#if defined(FEATURE_WLAN_LFR) && defined(WLAN_FEATURE_ROAM_SCAN_OFFLOAD)
+ wlan_hdd_disable_roaming(pAdapter);
+#endif
+
#ifdef WLAN_BTAMP_FEATURE
//Infra connect not supported when AMP traffic is on.
if (VOS_TRUE == WLANBAP_AmpSessionOn()) {
@@ -13731,12 +13738,6 @@ int __wlan_hdd_cfg80211_suspend_wlan(struct wiphy *wiphy,
return -EAGAIN;
}
- if (sme_staInMiddleOfRoaming(pHddCtx->hHal)) {
- hddLog(VOS_TRACE_LEVEL_DEBUG, FL("Roaming in progress "
- "Do not allow suspend"));
- return -EAGAIN;
- }
-
/* If RADAR detection is in progress (HDD), prevent suspend. The flag
* "dfs_cac_block_tx" is set to TRUE when RADAR is found and stay TRUE until
* CAC is done for a SoftAP which is in started state.
@@ -13764,6 +13765,10 @@ int __wlan_hdd_cfg80211_suspend_wlan(struct wiphy *wiphy,
pAdapter = pAdapterNode->pAdapter;
pScanInfo = &pAdapter->scan_info;
+ if (sme_staInMiddleOfRoaming(pHddCtx->hHal, pAdapter->sessionId)) {
+ hddLog(LOG1, FL("Roaming in progress, do not allow suspend"));
+ return -EAGAIN;
+ }
if (pScanInfo->mScanPending && pAdapter->request)
{
INIT_COMPLETION(pScanInfo->abortscan_event_var);
diff --git a/CORE/HDD/src/wlan_hdd_main.c b/CORE/HDD/src/wlan_hdd_main.c
index 25972db202b6..95d9d583493e 100755
--- a/CORE/HDD/src/wlan_hdd_main.c
+++ b/CORE/HDD/src/wlan_hdd_main.c
@@ -2472,7 +2472,7 @@ hdd_reassoc(hdd_adapter_t *pAdapter, const tANI_U8 *bssid, const tANI_U8 channel
handoffInfo.src = REASSOC;
#endif
memcpy(handoffInfo.bssid, bssid, sizeof(tSirMacAddr));
- sme_HandoffRequest(pHddCtx->hHal, &handoffInfo);
+ sme_HandoffRequest(pHddCtx->hHal, pAdapter->sessionId, &handoffInfo);
}
#endif
exit:
@@ -2665,7 +2665,7 @@ hdd_sendactionframe(hdd_adapter_t *pAdapter, const tANI_U8 *bssid,
* roaming scans. Otherwise large dwell times may cause long
* delays in sending action frames.
*/
- sme_abortRoamScan(pHddCtx->hHal);
+ sme_abortRoamScan(pHddCtx->hHal, pAdapter->sessionId);
} else {
/* 0 is accepted as current home channel, delayed
* transmission of action frame is ok.
@@ -2897,8 +2897,8 @@ hdd_parse_set_roam_scan_channels_v1(hdd_adapter_t *pAdapter,
goto exit;
}
- status = sme_ChangeRoamScanChannelList(pHddCtx->hHal, channel_list,
- num_chan);
+ status = sme_ChangeRoamScanChannelList(pHddCtx->hHal, pAdapter->sessionId,
+ channel_list, num_chan);
if (eHAL_STATUS_SUCCESS != status) {
VOS_TRACE( VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_ERROR,
"%s: Failed to update channel list information", __func__);
@@ -2968,8 +2968,8 @@ hdd_parse_set_roam_scan_channels_v2(hdd_adapter_t *pAdapter,
}
channel_list[i] = channel;
}
- status = sme_ChangeRoamScanChannelList(pHddCtx->hHal, channel_list,
- num_chan);
+ status = sme_ChangeRoamScanChannelList(pHddCtx->hHal, pAdapter->sessionId,
+ channel_list, num_chan);
if (eHAL_STATUS_SUCCESS != status) {
VOS_TRACE( VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_ERROR,
"%s: Failed to update channel list information", __func__);
@@ -3879,7 +3879,9 @@ static int hdd_driver_command(hdd_adapter_t *pAdapter,
" (Neighbor lookup threshold) = %d", __func__, lookUpThreshold);
pHddCtx->cfg_ini->nNeighborLookupRssiThreshold = lookUpThreshold;
- status = sme_setNeighborLookupRssiThreshold((tHalHandle)(pHddCtx->hHal), lookUpThreshold);
+ status = sme_setNeighborLookupRssiThreshold(pHddCtx->hHal,
+ pAdapter->sessionId,
+ lookUpThreshold);
if (eHAL_STATUS_SUCCESS != status)
{
VOS_TRACE( VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_ERROR,
@@ -3889,11 +3891,14 @@ static int hdd_driver_command(hdd_adapter_t *pAdapter,
}
/* Set Reassoc threshold to (lookup rssi threshold + 5 dBm) */
- sme_setNeighborReassocRssiThreshold((tHalHandle)(pHddCtx->hHal), lookUpThreshold + 5);
+ sme_setNeighborReassocRssiThreshold(pHddCtx->hHal,
+ pAdapter->sessionId,
+ lookUpThreshold + 5);
}
else if (strncmp(command, "GETROAMTRIGGER", 14) == 0)
{
- tANI_U8 lookUpThreshold = sme_getNeighborLookupRssiThreshold((tHalHandle)(pHddCtx->hHal));
+ tANI_U8 lookUpThreshold =
+ sme_getNeighborLookupRssiThreshold(pHddCtx->hHal);
int rssi = (-1) * lookUpThreshold;
char extra[32];
tANI_U8 len = 0;
@@ -3954,11 +3959,14 @@ static int hdd_driver_command(hdd_adapter_t *pAdapter,
" (Empty Scan refresh period) = %d", __func__, roamScanPeriod);
pHddCtx->cfg_ini->nEmptyScanRefreshPeriod = neighborEmptyScanRefreshPeriod;
- sme_UpdateEmptyScanRefreshPeriod((tHalHandle)(pHddCtx->hHal), neighborEmptyScanRefreshPeriod);
+ sme_UpdateEmptyScanRefreshPeriod(pHddCtx->hHal,
+ pAdapter->sessionId,
+ neighborEmptyScanRefreshPeriod);
}
else if (strncmp(command, "GETROAMSCANPERIOD", 17) == 0)
{
- tANI_U16 nEmptyScanRefreshPeriod = sme_getEmptyScanRefreshPeriod((tHalHandle)(pHddCtx->hHal));
+ tANI_U16 nEmptyScanRefreshPeriod =
+ sme_getEmptyScanRefreshPeriod(pHddCtx->hHal);
char extra[32];
tANI_U8 len = 0;
@@ -4019,11 +4027,13 @@ static int hdd_driver_command(hdd_adapter_t *pAdapter,
" (Scan refresh period) = %d", __func__, roamScanRefreshPeriod);
pHddCtx->cfg_ini->nNeighborResultsRefreshPeriod = neighborScanRefreshPeriod;
- sme_setNeighborScanRefreshPeriod((tHalHandle)(pHddCtx->hHal), neighborScanRefreshPeriod);
+ sme_setNeighborScanRefreshPeriod(pHddCtx->hHal,
+ pAdapter->sessionId,
+ neighborScanRefreshPeriod);
}
else if (strncmp(command, "GETROAMSCANREFRESHPERIOD", 24) == 0)
{
- tANI_U16 value = sme_getNeighborScanRefreshPeriod((tHalHandle)(pHddCtx->hHal));
+ tANI_U16 value = sme_getNeighborScanRefreshPeriod(pHddCtx->hHal);
char extra[32];
tANI_U8 len = 0;
@@ -4088,12 +4098,14 @@ static int hdd_driver_command(hdd_adapter_t *pAdapter,
roamMode = CFG_LFR_FEATURE_ENABLED_MIN; /* Roam disable */
pHddCtx->cfg_ini->isFastRoamIniFeatureEnabled = roamMode;
- sme_UpdateIsFastRoamIniFeatureEnabled((tHalHandle)(pHddCtx->hHal), roamMode);
+ sme_UpdateIsFastRoamIniFeatureEnabled(pHddCtx->hHal,
+ pAdapter->sessionId,
+ roamMode);
}
/* GETROAMMODE */
else if (strncmp(priv_data.buf, "GETROAMMODE", SIZE_OF_GETROAMMODE) == 0)
{
- tANI_BOOLEAN roamMode = sme_getIsLfrFeatureEnabled((tHalHandle)(pHddCtx->hHal));
+ tANI_BOOLEAN roamMode = sme_getIsLfrFeatureEnabled(pHddCtx->hHal);
char extra[32];
tANI_U8 len = 0;
@@ -4154,11 +4166,12 @@ static int hdd_driver_command(hdd_adapter_t *pAdapter,
"%s: Received Command to Set roam rssi diff = %d", __func__, roamRssiDiff);
pHddCtx->cfg_ini->RoamRssiDiff = roamRssiDiff;
- sme_UpdateRoamRssiDiff((tHalHandle)(pHddCtx->hHal), roamRssiDiff);
+ sme_UpdateRoamRssiDiff(pHddCtx->hHal,
+ pAdapter->sessionId, roamRssiDiff);
}
else if (strncmp(priv_data.buf, "GETROAMDELTA", 12) == 0)
{
- tANI_U8 roamRssiDiff = sme_getRoamRssiDiff((tHalHandle)(pHddCtx->hHal));
+ tANI_U8 roamRssiDiff = sme_getRoamRssiDiff(pHddCtx->hHal);
char extra[32];
tANI_U8 len = 0;
@@ -4208,8 +4221,11 @@ static int hdd_driver_command(hdd_adapter_t *pAdapter,
char extra[128] = {0};
int len;
- if (eHAL_STATUS_SUCCESS != sme_getRoamScanChannelList( (tHalHandle)(pHddCtx->hHal),
- ChannelList, &numChannels ))
+ if (eHAL_STATUS_SUCCESS != sme_getRoamScanChannelList(
+ pHddCtx->hHal,
+ ChannelList,
+ &numChannels,
+ pAdapter->sessionId))
{
VOS_TRACE( VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_FATAL,
"%s: failed to get roam scan channel list", __func__);
@@ -4239,7 +4255,7 @@ static int hdd_driver_command(hdd_adapter_t *pAdapter,
}
else if (strncmp(command, "GETCCXMODE", 10) == 0)
{
- tANI_BOOLEAN eseMode = sme_getIsEseFeatureEnabled((tHalHandle)(pHddCtx->hHal));
+ tANI_BOOLEAN eseMode = sme_getIsEseFeatureEnabled(pHddCtx->hHal);
char extra[32];
tANI_U8 len = 0;
@@ -4247,7 +4263,7 @@ static int hdd_driver_command(hdd_adapter_t *pAdapter,
then this operation is not permitted (return FAILURE) */
if (eseMode &&
hdd_is_okc_mode_enabled(pHddCtx) &&
- sme_getIsFtFeatureEnabled((tHalHandle)(pHddCtx->hHal)))
+ sme_getIsFtFeatureEnabled(pHddCtx->hHal))
{
VOS_TRACE( VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_WARN,
"%s: OKC/ESE/11R are supported simultaneously"
@@ -4275,8 +4291,8 @@ static int hdd_driver_command(hdd_adapter_t *pAdapter,
/* Check if the features OKC/ESE/11R are supported simultaneously,
then this operation is not permitted (return FAILURE) */
if (okcMode &&
- sme_getIsEseFeatureEnabled((tHalHandle)(pHddCtx->hHal)) &&
- sme_getIsFtFeatureEnabled((tHalHandle)(pHddCtx->hHal)))
+ sme_getIsEseFeatureEnabled(pHddCtx->hHal) &&
+ sme_getIsFtFeatureEnabled(pHddCtx->hHal))
{
VOS_TRACE( VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_WARN,
"%s: OKC/ESE/11R are supported simultaneously"
@@ -4297,7 +4313,7 @@ static int hdd_driver_command(hdd_adapter_t *pAdapter,
}
else if (strncmp(command, "GETFASTROAM", 11) == 0)
{
- tANI_BOOLEAN lfrMode = sme_getIsLfrFeatureEnabled((tHalHandle)(pHddCtx->hHal));
+ tANI_BOOLEAN lfrMode = sme_getIsLfrFeatureEnabled(pHddCtx->hHal);
char extra[32];
tANI_U8 len = 0;
@@ -4313,7 +4329,7 @@ static int hdd_driver_command(hdd_adapter_t *pAdapter,
}
else if (strncmp(command, "GETFASTTRANSITION", 17) == 0)
{
- tANI_BOOLEAN ft = sme_getIsFtFeatureEnabled((tHalHandle)(pHddCtx->hHal));
+ tANI_BOOLEAN ft = sme_getIsFtFeatureEnabled(pHddCtx->hHal);
char extra[32];
tANI_U8 len = 0;
@@ -4366,7 +4382,8 @@ static int hdd_driver_command(hdd_adapter_t *pAdapter,
"%s: Received Command to change channel min time = %d", __func__, minTime);
pHddCtx->cfg_ini->nNeighborScanMinChanTime = minTime;
- sme_setNeighborScanMinChanTime((tHalHandle)(pHddCtx->hHal), minTime);
+ sme_setNeighborScanMinChanTime(pHddCtx->hHal,
+ minTime, pAdapter->sessionId);
}
else if (strncmp(command, "SENDACTIONFRAME", 15) == 0)
{
@@ -4374,7 +4391,9 @@ static int hdd_driver_command(hdd_adapter_t *pAdapter,
}
else if (strncmp(command, "GETROAMSCANCHANNELMINTIME", 25) == 0)
{
- tANI_U16 val = sme_getNeighborScanMinChanTime((tHalHandle)(pHddCtx->hHal));
+ tANI_U16 val = sme_getNeighborScanMinChanTime(
+ pHddCtx->hHal,
+ pAdapter->sessionId);
char extra[32];
tANI_U8 len = 0;
@@ -4429,11 +4448,13 @@ static int hdd_driver_command(hdd_adapter_t *pAdapter,
"%s: Received Command to change channel max time = %d", __func__, maxTime);
pHddCtx->cfg_ini->nNeighborScanMaxChanTime = maxTime;
- sme_setNeighborScanMaxChanTime((tHalHandle)(pHddCtx->hHal), maxTime);
+ sme_setNeighborScanMaxChanTime(pHddCtx->hHal,
+ pAdapter->sessionId, maxTime);
}
else if (strncmp(command, "GETSCANCHANNELTIME", 18) == 0)
{
- tANI_U16 val = sme_getNeighborScanMaxChanTime((tHalHandle)(pHddCtx->hHal));
+ tANI_U16 val = sme_getNeighborScanMaxChanTime(pHddCtx->hHal,
+ pAdapter->sessionId);
char extra[32];
tANI_U8 len = 0;
@@ -4485,11 +4506,13 @@ static int hdd_driver_command(hdd_adapter_t *pAdapter,
"%s: Received Command to change scan home time = %d", __func__, val);
pHddCtx->cfg_ini->nNeighborScanPeriod = val;
- sme_setNeighborScanPeriod((tHalHandle)(pHddCtx->hHal), val);
+ sme_setNeighborScanPeriod(pHddCtx->hHal,
+ pAdapter->sessionId, val);
}
else if (strncmp(command, "GETSCANHOMETIME", 15) == 0)
{
- tANI_U16 val = sme_getNeighborScanPeriod((tHalHandle)(pHddCtx->hHal));
+ tANI_U16 val = sme_getNeighborScanPeriod(pHddCtx->hHal,
+ pAdapter->sessionId);
char extra[32];
tANI_U8 len = 0;
@@ -4540,11 +4563,11 @@ static int hdd_driver_command(hdd_adapter_t *pAdapter,
"%s: Received Command to change intra band = %d", __func__, val);
pHddCtx->cfg_ini->nRoamIntraBand = val;
- sme_setRoamIntraBand((tHalHandle)(pHddCtx->hHal), val);
+ sme_setRoamIntraBand(pHddCtx->hHal, val);
}
else if (strncmp(command, "GETROAMINTRABAND", 16) == 0)
{
- tANI_U16 val = sme_getRoamIntraBand((tHalHandle)(pHddCtx->hHal));
+ tANI_U16 val = sme_getRoamIntraBand(pHddCtx->hHal);
char extra[32];
tANI_U8 len = 0;
@@ -4596,11 +4619,12 @@ static int hdd_driver_command(hdd_adapter_t *pAdapter,
"%s: Received Command to Set nProbes = %d", __func__, nProbes);
pHddCtx->cfg_ini->nProbes = nProbes;
- sme_UpdateRoamScanNProbes((tHalHandle)(pHddCtx->hHal), nProbes);
+ sme_UpdateRoamScanNProbes(pHddCtx->hHal, pAdapter->sessionId,
+ nProbes);
}
else if (strncmp(priv_data.buf, "GETSCANNPROBES", 14) == 0)
{
- tANI_U8 val = sme_getRoamScanNProbes((tHalHandle)(pHddCtx->hHal));
+ tANI_U8 val = sme_getRoamScanNProbes(pHddCtx->hHal);
char extra[32];
tANI_U8 len = 0;
@@ -4652,12 +4676,14 @@ static int hdd_driver_command(hdd_adapter_t *pAdapter,
if (pHddCtx->cfg_ini->nRoamScanHomeAwayTime != homeAwayTime)
{
pHddCtx->cfg_ini->nRoamScanHomeAwayTime = homeAwayTime;
- sme_UpdateRoamScanHomeAwayTime((tHalHandle)(pHddCtx->hHal), homeAwayTime, eANI_BOOLEAN_TRUE);
+ sme_UpdateRoamScanHomeAwayTime(pHddCtx->hHal,
+ pAdapter->sessionId,
+ homeAwayTime, eANI_BOOLEAN_TRUE);
}
}
else if (strncmp(priv_data.buf, "GETSCANHOMEAWAYTIME", 19) == 0)
{
- tANI_U16 val = sme_getRoamScanHomeAwayTime((tHalHandle)(pHddCtx->hHal));
+ tANI_U16 val = sme_getRoamScanHomeAwayTime(pHddCtx->hHal);
char extra[32];
tANI_U8 len = 0;
@@ -4710,11 +4736,11 @@ static int hdd_driver_command(hdd_adapter_t *pAdapter,
"%s: Received Command to Set WES Mode rssi diff = %d", __func__, wesMode);
pHddCtx->cfg_ini->isWESModeEnabled = wesMode;
- sme_UpdateWESMode((tHalHandle)(pHddCtx->hHal), wesMode);
+ sme_UpdateWESMode(pHddCtx->hHal, wesMode, pAdapter->sessionId);
}
else if (strncmp(priv_data.buf, "GETWESMODE", 10) == 0)
{
- tANI_BOOLEAN wesMode = sme_GetWESMode((tHalHandle)(pHddCtx->hHal));
+ tANI_BOOLEAN wesMode = sme_GetWESMode(pHddCtx->hHal);
char extra[32];
tANI_U8 len = 0;
@@ -4749,14 +4775,16 @@ static int hdd_driver_command(hdd_adapter_t *pAdapter,
VOS_TRACE( VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_INFO,
"%s: Received Command to Set Opportunistic Threshold diff = %d",
__func__,
- nOpportunisticThresholdDiff);
+ nOpportunisticThresholdDiff);
- sme_SetRoamOpportunisticScanThresholdDiff((tHalHandle)(pHddCtx->hHal),
- nOpportunisticThresholdDiff);
+ sme_SetRoamOpportunisticScanThresholdDiff(pHddCtx->hHal,
+ pAdapter->sessionId,
+ nOpportunisticThresholdDiff);
}
else if (strncmp(priv_data.buf, "GETOPPORTUNISTICRSSIDIFF", 24) == 0)
{
- tANI_S8 val = sme_GetRoamOpportunisticScanThresholdDiff((tHalHandle)(pHddCtx->hHal));
+ tANI_S8 val = sme_GetRoamOpportunisticScanThresholdDiff(
+ pHddCtx->hHal);
char extra[32];
tANI_U8 len = 0;
@@ -4792,12 +4820,13 @@ static int hdd_driver_command(hdd_adapter_t *pAdapter,
"%s: Received Command to Set Roam Rescan RSSI Diff = %d",
__func__,
nRoamRescanRssiDiff);
- sme_SetRoamRescanRssiDiff((tHalHandle)(pHddCtx->hHal),
+ sme_SetRoamRescanRssiDiff(pHddCtx->hHal,
+ pAdapter->sessionId,
nRoamRescanRssiDiff);
}
else if (strncmp(priv_data.buf, "GETROAMRESCANRSSIDIFF", 21) == 0)
{
- tANI_U8 val = sme_GetRoamRescanRssiDiff((tHalHandle)(pHddCtx->hHal));
+ tANI_U8 val = sme_GetRoamRescanRssiDiff(pHddCtx->hHal);
char extra[32];
tANI_U8 len = 0;
@@ -4849,7 +4878,9 @@ static int hdd_driver_command(hdd_adapter_t *pAdapter,
"%s: Received Command to change lfr mode = %d", __func__, lfrMode);
pHddCtx->cfg_ini->isFastRoamIniFeatureEnabled = lfrMode;
- sme_UpdateIsFastRoamIniFeatureEnabled((tHalHandle)(pHddCtx->hHal), lfrMode);
+ sme_UpdateIsFastRoamIniFeatureEnabled(pHddCtx->hHal,
+ pAdapter->sessionId,
+ lfrMode);
}
#endif
#ifdef WLAN_FEATURE_VOWIFI_11R
@@ -4890,7 +4921,7 @@ static int hdd_driver_command(hdd_adapter_t *pAdapter,
"%s: Received Command to change ft mode = %d", __func__, ft);
pHddCtx->cfg_ini->isFastTransitionEnabled = ft;
- sme_UpdateFastTransitionEnabled((tHalHandle)(pHddCtx->hHal), ft);
+ sme_UpdateFastTransitionEnabled(pHddCtx->hHal, ft);
}
else if (strncmp(command, "FASTREASSOC", 11) == 0)
@@ -4946,7 +4977,7 @@ static int hdd_driver_command(hdd_adapter_t *pAdapter,
handoffInfo.channel = channel;
handoffInfo.src = FASTREASSOC;
vos_mem_copy(handoffInfo.bssid, targetApBssid, sizeof(tSirMacAddr));
- sme_HandoffRequest(pHddCtx->hHal, &handoffInfo);
+ sme_HandoffRequest(pHddCtx->hHal, pAdapter->sessionId, &handoffInfo);
#endif
#else
tANI_U8 *value = command;
@@ -4987,7 +5018,8 @@ static int hdd_driver_command(hdd_adapter_t *pAdapter,
/* Proceed with scan/roam */
smeIssueFastRoamNeighborAPEvent(WLAN_HDD_GET_HAL_CTX(pAdapter),
&targetApBssid[0],
- (tSmeFastRoamTrigger)(trigger));
+ (tSmeFastRoamTrigger)(trigger),
+ pAdapter->sessionId);
#endif
}
#endif
@@ -5013,7 +5045,7 @@ static int hdd_driver_command(hdd_adapter_t *pAdapter,
}
pPlmRequest->sessionId = pAdapter->sessionId;
- status = sme_SetPlmRequest((tHalHandle)(pHddCtx->hHal), pPlmRequest);
+ status = sme_SetPlmRequest(pHddCtx->hHal, pPlmRequest);
if (eHAL_STATUS_SUCCESS != status)
{
vos_mem_free(pPlmRequest);
@@ -5031,9 +5063,9 @@ static int hdd_driver_command(hdd_adapter_t *pAdapter,
/* Check if the features OKC/ESE/11R are supported simultaneously,
then this operation is not permitted (return FAILURE) */
- if (sme_getIsEseFeatureEnabled((tHalHandle)(pHddCtx->hHal)) &&
+ if (sme_getIsEseFeatureEnabled(pHddCtx->hHal) &&
hdd_is_okc_mode_enabled(pHddCtx) &&
- sme_getIsFtFeatureEnabled((tHalHandle)(pHddCtx->hHal)))
+ sme_getIsFtFeatureEnabled(pHddCtx->hHal))
{
VOS_TRACE( VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_WARN,
"%s: OKC/ESE/11R are supported simultaneously"
@@ -5072,7 +5104,7 @@ static int hdd_driver_command(hdd_adapter_t *pAdapter,
"%s: Received Command to change ese mode = %d", __func__, eseMode);
pHddCtx->cfg_ini->isEseIniFeatureEnabled = eseMode;
- sme_UpdateIsEseFeatureEnabled((tHalHandle)(pHddCtx->hHal), eseMode);
+ sme_UpdateIsEseFeatureEnabled(pHddCtx->hHal, eseMode);
}
#endif
else if (strncmp(command, "SETROAMSCANCONTROL", 18) == 0)
@@ -5103,7 +5135,8 @@ static int hdd_driver_command(hdd_adapter_t *pAdapter,
goto exit;
}
- sme_SetRoamScanControl((tHalHandle)(pHddCtx->hHal), roamScanControl);
+ sme_SetRoamScanControl(pHddCtx->hHal,
+ pAdapter->sessionId, roamScanControl);
}
#ifdef FEATURE_WLAN_OKC
else if (strncmp(command, "SETOKCMODE", 10) == 0)
@@ -5113,9 +5146,9 @@ static int hdd_driver_command(hdd_adapter_t *pAdapter,
/* Check if the features OKC/ESE/11R are supported simultaneously,
then this operation is not permitted (return FAILURE) */
- if (sme_getIsEseFeatureEnabled((tHalHandle)(pHddCtx->hHal)) &&
+ if (sme_getIsEseFeatureEnabled(pHddCtx->hHal) &&
hdd_is_okc_mode_enabled(pHddCtx) &&
- sme_getIsFtFeatureEnabled((tHalHandle)(pHddCtx->hHal)))
+ sme_getIsFtFeatureEnabled(pHddCtx->hHal))
{
VOS_TRACE( VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_WARN,
"%s: OKC/ESE/11R are supported simultaneously"
@@ -5160,7 +5193,7 @@ static int hdd_driver_command(hdd_adapter_t *pAdapter,
#endif /* FEATURE_WLAN_OKC */
else if (strncmp(priv_data.buf, "GETROAMSCANCONTROL", 18) == 0)
{
- tANI_BOOLEAN roamScanControl = sme_GetRoamScanControl((tHalHandle)(pHddCtx->hHal));
+ tANI_BOOLEAN roamScanControl = sme_GetRoamScanControl(pHddCtx->hHal);
char extra[32];
tANI_U8 len = 0;
@@ -5380,7 +5413,8 @@ static int hdd_driver_command(hdd_adapter_t *pAdapter,
ret = -EINVAL;
goto exit;
}
- status = sme_SetEseRoamScanChannelList((tHalHandle)(pHddCtx->hHal),
+ status = sme_SetEseRoamScanChannelList(pHddCtx->hHal,
+ pAdapter->sessionId,
ChannelList,
numChannels);
if (eHAL_STATUS_SUCCESS != status)
@@ -5524,10 +5558,7 @@ static int hdd_driver_command(hdd_adapter_t *pAdapter,
ret = -EINVAL;
goto exit;
}
- sme_SetCCKMIe((tHalHandle)(pHddCtx->hHal),
- pAdapter->sessionId,
- cckmIe,
- cckmIeLen);
+ sme_SetCCKMIe(pHddCtx->hHal, pAdapter->sessionId, cckmIe, cckmIeLen);
if (NULL != cckmIe)
{
vos_mem_free(cckmIe);
@@ -5558,7 +5589,7 @@ static int hdd_driver_command(hdd_adapter_t *pAdapter,
goto exit;
}
- status = sme_SetEseBeaconRequest((tHalHandle)(pHddCtx->hHal),
+ status = sme_SetEseBeaconRequest(pHddCtx->hHal,
pAdapter->sessionId,
&eseBcnReq);
@@ -5678,12 +5709,12 @@ static int hdd_driver_command(hdd_adapter_t *pAdapter,
__func__, dfsScanMode);
pHddCtx->cfg_ini->allowDFSChannelRoam = dfsScanMode;
- sme_UpdateDFSScanMode((tHalHandle)(pHddCtx->hHal), dfsScanMode);
+ sme_UpdateDFSScanMode(pHddCtx->hHal, pAdapter->sessionId,
+ dfsScanMode);
}
else if (strncmp(command, "GETDFSSCANMODE", 14) == 0)
{
- tANI_U8 dfsScanMode =
- sme_GetDFSScanMode((tHalHandle)(pHddCtx->hHal));
+ tANI_U8 dfsScanMode = sme_GetDFSScanMode(pHddCtx->hHal);
char extra[32];
tANI_U8 len = 0;
@@ -11359,7 +11390,8 @@ static int hdd_generate_iface_mac_addr_auto(hdd_context_t *pHddCtx,
--------------------------------------------------------------------------*/
static eHalStatus hdd_11d_scan_done(tHalHandle halHandle, void *pContext,
- tANI_U32 scanId, eCsrScanStatus status)
+ tANI_U8 sessionId, tANI_U32 scanId,
+ eCsrScanStatus status)
{
ENTER();
@@ -13007,8 +13039,8 @@ tVOS_CONCURRENCY_MODE hdd_get_concurrency_mode ( void )
v_BOOL_t hdd_is_apps_power_collapse_allowed(hdd_context_t* pHddCtx)
{
tPmcState pmcState = pmcGetPmcState(pHddCtx->hHal);
- tANI_BOOLEAN scanRspPending = csrNeighborRoamScanRspPending(pHddCtx->hHal);
- tANI_BOOLEAN inMiddleOfRoaming = csrNeighborMiddleOfRoaming(pHddCtx->hHal);
+ tANI_BOOLEAN scanRspPending;
+ tANI_BOOLEAN inMiddleOfRoaming;
hdd_config_t *pConfig = pHddCtx->cfg_ini;
hdd_adapter_list_node_t *pAdapterNode = NULL, *pNext = NULL;
hdd_adapter_t *pAdapter = NULL;
@@ -13035,6 +13067,10 @@ v_BOOL_t hdd_is_apps_power_collapse_allowed(hdd_context_t* pHddCtx)
if ( (WLAN_HDD_INFRA_STATION == pAdapter->device_mode)
|| (WLAN_HDD_P2P_CLIENT == pAdapter->device_mode) )
{
+ scanRspPending = csrNeighborRoamScanRspPending(pHddCtx->hHal,
+ pAdapter->sessionId);
+ inMiddleOfRoaming = csrNeighborMiddleOfRoaming(pHddCtx->hHal,
+ pAdapter->sessionId);
if (((pConfig->fIsImpsEnabled || pConfig->fIsBmpsEnabled)
&& (pmcState != IMPS && pmcState != BMPS
&& pmcState != STOPPED && pmcState != STANDBY)) ||
@@ -13630,6 +13666,110 @@ int wlan_hdd_gen_wlan_version_pack(struct wlan_version_data *data,
}
#endif
+#if defined(FEATURE_WLAN_LFR) && defined(WLAN_FEATURE_ROAM_SCAN_OFFLOAD)
+/**---------------------------------------------------------------------------
+
+ \brief wlan_hdd_disable_roaming()
+
+ This function loop through each adapter and disable roaming on each STA
+ device mode except the input adapter.
+ Note: On the input adapter roaming is not enabled yet hence no need to
+ disable.
+
+ \param - pAdapter HDD adapter pointer
+
+ \return - None
+
+ --------------------------------------------------------------------------*/
+void wlan_hdd_disable_roaming(hdd_adapter_t *pAdapter)
+{
+ hdd_context_t *pHddCtx = WLAN_HDD_GET_CTX(pAdapter);
+ hdd_adapter_t *pAdapterIdx = NULL;
+ hdd_adapter_list_node_t *pAdapterNode = NULL;
+ hdd_adapter_list_node_t *pNext = NULL;
+ VOS_STATUS status;
+
+ if (pHddCtx->cfg_ini->isFastRoamIniFeatureEnabled &&
+ pHddCtx->cfg_ini->isRoamOffloadScanEnabled &&
+ WLAN_HDD_INFRA_STATION == pAdapter->device_mode &&
+ vos_is_sta_active_connection_exists()) {
+ hddLog(LOG1, FL("Connect received on STA sessionId(%d)"),
+ pAdapter->sessionId);
+ /* Loop through adapter and disable roaming for each STA device mode
+ except the input adapter. */
+
+ status = hdd_get_front_adapter (pHddCtx, &pAdapterNode);
+
+ while (NULL != pAdapterNode && VOS_STATUS_SUCCESS == status) {
+ pAdapterIdx = pAdapterNode->pAdapter;
+
+ if (WLAN_HDD_INFRA_STATION == pAdapterIdx->device_mode &&
+ pAdapter->sessionId != pAdapterIdx->sessionId) {
+ hddLog(LOG1, FL("Disable Roaming on sessionId(%d)"),
+ pAdapterIdx->sessionId);
+ sme_stopRoaming(WLAN_HDD_GET_HAL_CTX(pAdapterIdx),
+ pAdapterIdx->sessionId, 0);
+ }
+
+ status = hdd_get_next_adapter(pHddCtx, pAdapterNode, &pNext);
+ pAdapterNode = pNext;
+ }
+ }
+}
+
+/**---------------------------------------------------------------------------
+
+ \brief wlan_hdd_enable_roaming()
+
+ This function loop through each adapter and enable roaming on each STA
+ device mode except the input adapter.
+ Note: On the input adapter no need to enable roaming because link got
+ disconnected on this.
+
+ \param - pAdapter HDD adapter pointer
+
+ \return - None
+
+ --------------------------------------------------------------------------*/
+void wlan_hdd_enable_roaming(hdd_adapter_t *pAdapter)
+{
+ hdd_context_t *pHddCtx = WLAN_HDD_GET_CTX(pAdapter);
+ hdd_adapter_t *pAdapterIdx = NULL;
+ hdd_adapter_list_node_t *pAdapterNode = NULL;
+ hdd_adapter_list_node_t *pNext = NULL;
+ VOS_STATUS status;
+
+ if (pHddCtx->cfg_ini->isFastRoamIniFeatureEnabled &&
+ pHddCtx->cfg_ini->isRoamOffloadScanEnabled &&
+ WLAN_HDD_INFRA_STATION == pAdapter->device_mode &&
+ vos_is_sta_active_connection_exists()) {
+ hddLog(LOG1, FL("Disconnect received on STA sessionId(%d)"),
+ pAdapter->sessionId);
+ /* Loop through adapter and enable roaming for each STA device mode
+ except the input adapter. */
+
+ status = hdd_get_front_adapter (pHddCtx, &pAdapterNode);
+
+ while (NULL != pAdapterNode && VOS_STATUS_SUCCESS == status) {
+ pAdapterIdx = pAdapterNode->pAdapter;
+
+ if (WLAN_HDD_INFRA_STATION == pAdapterIdx->device_mode &&
+ pAdapter->sessionId != pAdapterIdx->sessionId) {
+ hddLog(LOG1, FL("Enabling Roaming on sessionId(%d)"),
+ pAdapterIdx->sessionId);
+ sme_startRoaming(WLAN_HDD_GET_HAL_CTX(pAdapterIdx),
+ pAdapterIdx->sessionId,
+ REASON_CONNECT);
+ }
+
+ status = hdd_get_next_adapter(pHddCtx, pAdapterNode, &pNext);
+ pAdapterNode = pNext;
+ }
+ }
+}
+#endif
+
+
void wlan_hdd_send_svc_nlink_msg(int type, void *data, int len)
{
struct sk_buff *skb;
diff --git a/CORE/HDD/src/wlan_hdd_oemdata.c b/CORE/HDD/src/wlan_hdd_oemdata.c
index e52eb1dd85a6..04ca34ac388a 100644
--- a/CORE/HDD/src/wlan_hdd_oemdata.c
+++ b/CORE/HDD/src/wlan_hdd_oemdata.c
@@ -331,9 +331,11 @@ int iw_get_oem_data_cap(
oemDataCap.allowed_dwell_time_min = pConfig->nNeighborScanMinChanTime;
oemDataCap.allowed_dwell_time_max = pConfig->nNeighborScanMaxChanTime;
oemDataCap.curr_dwell_time_min =
- sme_getNeighborScanMinChanTime(pHddContext->hHal);
+ sme_getNeighborScanMinChanTime(pHddContext->hHal,
+ pAdapter->sessionId);
oemDataCap.curr_dwell_time_max =
- sme_getNeighborScanMaxChanTime(pHddContext->hHal);
+ sme_getNeighborScanMaxChanTime(pHddContext->hHal,
+ pAdapter->sessionId);
oemDataCap.supported_bands = pConfig->nBandCapability;
/* request for max num of channels */
diff --git a/CORE/HDD/src/wlan_hdd_scan.c b/CORE/HDD/src/wlan_hdd_scan.c
index f20915456eb8..e5c5760a2984 100644
--- a/CORE/HDD/src/wlan_hdd_scan.c
+++ b/CORE/HDD/src/wlan_hdd_scan.c
@@ -537,6 +537,7 @@ static eHalStatus hdd_IndicateScanResult(hdd_scan_info_t *scanInfo, tCsrScanResu
\param - halHandle - Pointer to the Hal Handle.
- pContext - Pointer to the data context.
+ - sessionId - Session identifier
- scanId - Scan ID.
- status - CSR Status.
\return - 0 for success, non zero for failure
@@ -544,7 +545,8 @@ static eHalStatus hdd_IndicateScanResult(hdd_scan_info_t *scanInfo, tCsrScanResu
--------------------------------------------------------------------------*/
static eHalStatus hdd_ScanRequestCallback(tHalHandle halHandle, void *pContext,
- tANI_U32 scanId, eCsrScanStatus status)
+ tANI_U8 sessionId, tANI_U32 scanId,
+ eCsrScanStatus status)
{
struct net_device *dev = (struct net_device *) pContext;
hdd_adapter_t *pAdapter = WLAN_HDD_GET_PRIV_PTR(dev) ;
@@ -734,7 +736,9 @@ int iw_set_scan(struct net_device *dev, struct iw_request_info *info,
scanRequest.pIEField = pAdapter->scan_info.scanAddIE.addIEdata;
}
- status = sme_ScanRequest( (WLAN_HDD_GET_CTX(pAdapter))->hHal, pAdapter->sessionId,&scanRequest, &scanId, &hdd_ScanRequestCallback, dev );
+ status = sme_ScanRequest((WLAN_HDD_GET_CTX(pAdapter))->hHal,
+ pAdapter->sessionId, &scanRequest, &scanId,
+ &hdd_ScanRequestCallback, dev);
if (!HAL_STATUS_SUCCESS(status))
{
VOS_TRACE(VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_FATAL, "%s:sme_ScanRequest fail %d!!!",__func__, status);
@@ -1112,8 +1116,9 @@ int iw_set_cscan(struct net_device *dev, struct iw_request_info *info,
scanRequest.pIEField = pAdapter->scan_info.scanAddIE.addIEdata;
}
- status = sme_ScanRequest( (WLAN_HDD_GET_CTX(pAdapter))->hHal,
- pAdapter->sessionId,&scanRequest, &scanId, &hdd_ScanRequestCallback, dev );
+ status = sme_ScanRequest((WLAN_HDD_GET_CTX(pAdapter))->hHal,
+ pAdapter->sessionId, &scanRequest, &scanId,
+ &hdd_ScanRequestCallback, dev);
if( !HAL_STATUS_SUCCESS(status) )
{
VOS_TRACE(VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_FATAL, "%s: SME scan fail status %d !!!",__func__, status);
diff --git a/CORE/HDD/src/wlan_hdd_wext.c b/CORE/HDD/src/wlan_hdd_wext.c
index e876943643f6..166bf38169d3 100644
--- a/CORE/HDD/src/wlan_hdd_wext.c
+++ b/CORE/HDD/src/wlan_hdd_wext.c
@@ -6917,11 +6917,14 @@ static int iw_get_char_setnone(struct net_device *dev, struct iw_request_info *i
macTraceGetHDDWlanConnState(
pHddStaCtx->conn_info.connState),
macTraceGetNeighbourRoamState(
- pMac->roam.neighborRoamInfo.neighborRoamState),
+ sme_getNeighborRoamState(hHal,
+ useAdapter->sessionId)),
macTraceGetcsrRoamState(
- pMac->roam.curState[useAdapter->sessionId]),
+ sme_getCurrentRoamState(hHal,
+ useAdapter->sessionId)),
macTraceGetcsrRoamSubState(
- pMac->roam.curSubState[useAdapter->sessionId]),
+ sme_getCurrentRoamSubState(hHal,
+ useAdapter->sessionId)),
pHddStaCtx->conn_info.staId[0],
macTraceGetTLState(tlState)
);
@@ -6936,24 +6939,24 @@ static int iw_get_char_setnone(struct net_device *dev, struct iw_request_info *i
"\n Global Sme State - %s "\
"\n Global mlm State - %s "\
"\n",
- macTraceGetLimSmeState(pMac->lim.gLimSmeState),
- macTraceGetLimMlmState(pMac->lim.gLimMlmState)
+ macTraceGetLimSmeState(sme_getLimSmeState(hHal)),
+ macTraceGetLimMlmState(sme_getLimSmeState(hHal))
);
len += buf;
- /*printing the PE Sme and Mlm states for valid lim sessions*/
- while ( check < 3 && count < 255)
- {
- if ( pMac->lim.gpSession[count].valid )
- {
+ /* Printing the PE Sme and Mlm states for valid lim sessions */
+ while (check < 3 && count < 255) {
+ if (sme_IsLimSessionValid(hHal, count)) {
buf = scnprintf(extra + len, WE_MAX_STR_LEN - len,
"\n Lim Valid Session %d:-"
"\n PE Sme State - %s "
"\n PE Mlm State - %s "
"\n",
check,
- macTraceGetLimSmeState(pMac->lim.gpSession[count].limSmeState),
- macTraceGetLimMlmState(pMac->lim.gpSession[count].limMlmState)
+ macTraceGetLimSmeState(sme_getLimSmeSessionState(
+ hHal, count)),
+ macTraceGetLimMlmState(sme_getLimMlmSessionState(
+ hHal, count))
);
len += buf;
@@ -9365,11 +9368,10 @@ int hdd_setBand(struct net_device *dev, u8 ui_band)
pAdapterNode = pNext;
}
- if (eHAL_STATUS_SUCCESS != sme_SetFreqBand(hHal, band))
- {
+ if (eHAL_STATUS_SUCCESS != sme_SetFreqBand(hHal, pAdapter->sessionId,
+ band)) {
VOS_TRACE(VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_FATAL,
- "%s: failed to set the band value to %u ",
- __func__, band);
+ FL("Failed to set the band value to %u"), band);
return -EINVAL;
}
wlan_hdd_cfg80211_update_band(pHddCtx->wiphy, (eCsrBand)band);
diff --git a/CORE/VOSS/inc/i_vos_packet.h b/CORE/VOSS/inc/i_vos_packet.h
index ea9938f5068d..59d592c461f3 100644
--- a/CORE/VOSS/inc/i_vos_packet.h
+++ b/CORE/VOSS/inc/i_vos_packet.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2013-2014 The Linux Foundation. All rights reserved.
*
* Previously licensed under the ISC license by Qualcomm Atheros, Inc.
*
@@ -64,6 +64,7 @@ typedef struct
u_int8_t roamCandidateInd:1;
u_int8_t scan:1;
u_int8_t dpuFeedback;
+ u_int8_t sessionId;
}t_packetmeta, *tp_packetmeta;
/* implementation specific vos packet type */
diff --git a/CORE/VOSS/inc/vos_getBin.h b/CORE/VOSS/inc/vos_getBin.h
index ec3d949bf686..fc5122ad4efd 100644
--- a/CORE/VOSS/inc/vos_getBin.h
+++ b/CORE/VOSS/inc/vos_getBin.h
@@ -140,6 +140,8 @@ tVOS_CONCURRENCY_MODE vos_get_concurrency_mode( void );
v_BOOL_t vos_concurrent_open_sessions_running(void);
v_BOOL_t vos_max_concurrent_connections_reached(void);
void vos_clear_concurrent_session_count(void);
+v_BOOL_t vos_is_multiple_active_sta_sessions (void);
+v_BOOL_t vos_is_sta_active_connection_exists (void);
#ifdef WLAN_FEATURE_MBSSID
v_BOOL_t vos_concurrent_sap_sessions_running(v_VOID_t);
diff --git a/CORE/VOSS/src/vos_getBin.c b/CORE/VOSS/src/vos_getBin.c
index 345527e652b4..f9a21c09ef8e 100644
--- a/CORE/VOSS/src/vos_getBin.c
+++ b/CORE/VOSS/src/vos_getBin.c
@@ -235,3 +235,60 @@ void vos_clear_concurrent_session_count(void)
}
}
}
+
+/**---------------------------------------------------------------------------
+ *
+ * \brief vos_is_multiple_active_sta_sessions()
+ *
+ * This function checks for presence of multiple active sta connections
+ * and it returns TRUE if the more than 1 active sta connection exists.
+ *
+ * \param - None
+ *
+ * \return - TRUE or FALSE
+ *
+ * --------------------------------------------------------------------------*/
+v_BOOL_t vos_is_multiple_active_sta_sessions (void)
+{
+ hdd_context_t *pHddCtx;
+ v_U8_t j = 0;
+
+ v_CONTEXT_t pVosContext = vos_get_global_context(VOS_MODULE_ID_HDD, NULL);
+ if (NULL != pVosContext) {
+ pHddCtx = vos_get_context(VOS_MODULE_ID_HDD, pVosContext);
+ if (NULL != pHddCtx) {
+ j = pHddCtx->no_of_active_sessions[VOS_STA_MODE];
+ }
+ }
+
+ return (j > 1);
+}
+
+/**---------------------------------------------------------------------------
+ *
+ * \brief vos_is_sta_active_connection_exists()
+ *
+ * This function checks for the presence of active sta connection
+ * and it returns TRUE if exists.
+ *
+ * \param - None
+ *
+ * \return - VOS_TRUE or VOS_FALSE
+ *
+ * --------------------------------------------------------------------------*/
+v_BOOL_t vos_is_sta_active_connection_exists (void)
+{
+ hdd_context_t *pHddCtx;
+ v_U8_t j = 0;
+
+ v_CONTEXT_t pVosContext = vos_get_global_context(VOS_MODULE_ID_HDD, NULL);
+ if (NULL != pVosContext) {
+ pHddCtx = vos_get_context(VOS_MODULE_ID_HDD, pVosContext);
+ if (NULL != pHddCtx) {
+ j = pHddCtx->no_of_active_sessions[VOS_STA_MODE];
+ }
+ }
+
+ return (j ? VOS_TRUE : VOS_FALSE);
+}
+