diff options
| author | Linux Build Service Account <lnxbuild@localhost> | 2014-09-13 13:30:08 -0700 |
|---|---|---|
| committer | Gerrit - the friendly Code Review server <code-review@localhost> | 2014-09-13 13:30:08 -0700 |
| commit | eaeb8210b627a5764ebace804cd87fd75ad5057d (patch) | |
| tree | 81bf0b850205818dbcbe420b29216c250a59295b | |
| parent | e4734e88b926215ecfde04ae473f3f81ec3df7ee (diff) | |
| parent | 46cc3ba890759792f542e7f6b7dbcc52d579e3c9 (diff) | |
Merge "Release 1.0.0.189 QCACLD WLAN Driver"
63 files changed, 1491 insertions, 1118 deletions
diff --git a/CORE/HDD/src/wlan_hdd_cfg80211.c b/CORE/HDD/src/wlan_hdd_cfg80211.c index 225eab62679b..f0a3628ab2ef 100644 --- a/CORE/HDD/src/wlan_hdd_cfg80211.c +++ b/CORE/HDD/src/wlan_hdd_cfg80211.c @@ -4942,15 +4942,33 @@ static int wlan_hdd_cfg80211_start_bss(hdd_adapter_t *pHostapdAdapter, con_sap_adapter = hdd_get_con_sap_adapter(pHostapdAdapter); if (con_sap_adapter) { /* we have active SAP running */ - con_ch = con_sap_adapter->sessionCtx.ap.operatingChannel; - if (con_ch != 0 && VOS_IS_DFS_CH(con_ch)) { + /* Check if user configured channel is ACS or DFS */ + con_ch = con_sap_adapter->sessionCtx.ap.sapConfig.channel; + /* For fixed channel or ACS, once primary AP chooses a DFS + * channel secondary AP should alway follow primary APs channel + * This is applicable for cases even when primary AP moves to + * non DFS channel after RADAR detection. + */ + if (con_ch == AUTO_CHANNEL_SELECT) { + con_ch = con_sap_adapter->sessionCtx.ap.operatingChannel; + } + + if (VOS_IS_DFS_CH(con_ch)) { /* AP-AP DFS: secondary AP has to follow primary AP's * channel */ + /* NOTE:Even if orig user configured channel is DFS, use the + * current operating channel since when RADAR detected orig + * configured channel will be in NOL and already running AP + * might have choosen another channel + */ + con_ch = con_sap_adapter->sessionCtx.ap.operatingChannel; hddLog(VOS_TRACE_LEVEL_ERROR, - "%s: Only SCC AP-AP DFS Permitted (chan=%d, con_ch=%d) !!, overriding guest AP's channel", - __func__, - pConfig->channel, - con_ch); + "%s: Only SCC AP-AP DFS Permitted (ch=%d, con_ch=%d)", + __func__, + pConfig->channel, + con_ch); + hddLog(VOS_TRACE_LEVEL_ERROR, + "Overriding guest AP's channel !!"); pConfig->channel = con_ch; } } else { @@ -11299,6 +11317,9 @@ static int __wlan_hdd_cfg80211_del_station(struct wiphy *wiphy, hddLog(VOS_TRACE_LEVEL_INFO, FL("Delete STA with MAC::"MAC_ADDRESS_STR), MAC_ADDR_ARRAY(macAddr)); + + /* Send disassoc and deauth both to avoid some IOT issues */ + hdd_softap_sta_disassoc(pAdapter, macAddr); vos_status = hdd_softap_sta_deauth(pAdapter, macAddr); if (VOS_IS_STATUS_SUCCESS(vos_status)) pAdapter->aStaInfo[i].isDeauthInProgress = TRUE; @@ -11326,6 +11347,8 @@ static int __wlan_hdd_cfg80211_del_station(struct wiphy *wiphy, FL("Delete STA with MAC::"MAC_ADDRESS_STR), MAC_ADDR_ARRAY(mac)); + /* Send disassoc and deauth both to avoid some IOT issues */ + hdd_softap_sta_disassoc(pAdapter, mac); vos_status = hdd_softap_sta_deauth(pAdapter, mac); if (!VOS_IS_STATUS_SUCCESS(vos_status)) { pAdapter->aStaInfo[staId].isDeauthInProgress = FALSE; diff --git a/CORE/HDD/src/wlan_hdd_hostapd.c b/CORE/HDD/src/wlan_hdd_hostapd.c index 9809fa15dcca..e4de8281f866 100644 --- a/CORE/HDD/src/wlan_hdd_hostapd.c +++ b/CORE/HDD/src/wlan_hdd_hostapd.c @@ -725,6 +725,7 @@ static int hdd_stop_p2p_link(hdd_adapter_t *pHostapdAdapter,v_PVOID_t usrDataFor return (status == VOS_STATUS_SUCCESS) ? 0 : -EBUSY; } +#ifdef QCA_HT_2040_COEX static void hdd_send_channel_switch_evt(hdd_adapter_t *pHostapdAdapter, tpSap_Event pSapEvent, v_PVOID_t usrDataForCallback) @@ -805,6 +806,7 @@ static void hdd_send_channel_switch_evt(hdd_adapter_t *pHostapdAdapter, cfg80211_ch_switch_notify(dev, &chandef); } } +#endif VOS_STATUS hdd_hostapd_SAPEventCB( tpSap_Event pSapEvent, v_PVOID_t usrDataForCallback) @@ -1522,10 +1524,12 @@ VOS_STATUS hdd_hostapd_SAPEventCB( tpSap_Event pSapEvent, v_PVOID_t usrDataForCa /* Allow suspend for old channel */ hdd_hostapd_channel_allow_suspend(pHostapdAdapter, pHddApCtx->operatingChannel); +#ifdef QCA_HT_2040_COEX /* indicate operating channel change to hostapd */ hdd_send_channel_switch_evt(pHostapdAdapter, pSapEvent, usrDataForCallback); +#endif return VOS_STATUS_SUCCESS; #ifdef FEATURE_WLAN_AP_AP_ACS_OPTIMIZE diff --git a/CORE/HDD/src/wlan_hdd_main.c b/CORE/HDD/src/wlan_hdd_main.c index a9bf9f63a34e..b4f6a890a611 100755 --- a/CORE/HDD/src/wlan_hdd_main.c +++ b/CORE/HDD/src/wlan_hdd_main.c @@ -681,6 +681,7 @@ static int hdd_netdev_notifier_call(struct notifier_block * nb, break; case NETDEV_UP: + sme_ChAvoidUpdateReq(pHddCtx->hHal); break; case NETDEV_DOWN: @@ -11444,6 +11445,8 @@ int hdd_wlan_startup(struct device *dev, v_VOID_t *hif_sc) #ifdef FEATURE_WLAN_CH_AVOID int unsafeChannelIndex; #endif + tANI_U8 rtnl_lock_enable; + tANI_U8 reg_netdev_notifier_done = FALSE; ENTER(); @@ -11842,8 +11845,15 @@ int hdd_wlan_startup(struct device *dev, v_VOID_t *hif_sc) return VOS_STATUS_SUCCESS; } +#if defined(CONFIG_HDD_INIT_WITH_RTNL_LOCK) + rtnl_lock(); + rtnl_lock_enable = TRUE; +#else + rtnl_lock_enable = FALSE; +#endif + pAdapter = hdd_open_adapter( pHddCtx, WLAN_HDD_INFRA_STATION, "wlan%d", - wlan_hdd_get_intf_addr(pHddCtx), FALSE ); + wlan_hdd_get_intf_addr(pHddCtx), rtnl_lock_enable ); #ifdef WLAN_OPEN_P2P_INTERFACE /* Open P2P device interface */ @@ -11878,7 +11888,8 @@ int hdd_wlan_startup(struct device *dev, v_VOID_t *hif_sc) } pP2pAdapter = hdd_open_adapter( pHddCtx, WLAN_HDD_P2P_DEVICE, "p2p%d", - &pHddCtx->p2pDeviceAddress.bytes[0], FALSE ); + &pHddCtx->p2pDeviceAddress.bytes[0], rtnl_lock_enable ); + if ( NULL == pP2pAdapter ) { hddLog(VOS_TRACE_LEVEL_FATAL, @@ -12015,7 +12026,7 @@ int hdd_wlan_startup(struct device *dev, v_VOID_t *hif_sc) __func__); goto err_unregister_pmops; } - +#if !defined(CONFIG_HDD_INIT_WITH_RTNL_LOCK) // register net device notifier for device change notification ret = register_netdevice_notifier(&hdd_netdev_notifier); @@ -12024,6 +12035,8 @@ int hdd_wlan_startup(struct device *dev, v_VOID_t *hif_sc) hddLog(VOS_TRACE_LEVEL_ERROR,"%s: register_netdevice_notifier failed",__func__); goto err_free_power_on_lock; } + reg_netdev_notifier_done = TRUE; +#endif //Initialize the nlink service if(nl_srv_init() != 0) @@ -12094,6 +12107,20 @@ int hdd_wlan_startup(struct device *dev, v_VOID_t *hif_sc) mutex_init(&pHddCtx->sap_lock); pHddCtx->isLoadInProgress = FALSE; +#if defined(CONFIG_HDD_INIT_WITH_RTNL_LOCK) + if (rtnl_lock_enable == TRUE) { + rtnl_lock_enable = FALSE; + rtnl_unlock(); + } + /* register net device notifier for device change notification */ + ret = register_netdevice_notifier(&hdd_netdev_notifier); + if (ret < 0) { + hddLog(VOS_TRACE_LEVEL_ERROR,"%s: register_netdevice_notifier failed", + __func__); + goto err_nl_srv; + } + reg_netdev_notifier_done = TRUE; +#endif #ifdef WLAN_FEATURE_HOLD_RX_WAKELOCK /* Initialize the wake lcok */ @@ -12233,10 +12260,20 @@ err_nl_srv: #else nl_srv_exit(); #endif /* WLAN_KD_READY_NOTIFIER */ + err_reg_netdev: - unregister_netdevice_notifier(&hdd_netdev_notifier); + if (rtnl_lock_enable == TRUE) { + rtnl_lock_enable = FALSE; + rtnl_unlock(); + } + if (reg_netdev_notifier_done == TRUE) { + unregister_netdevice_notifier(&hdd_netdev_notifier); + reg_netdev_notifier_done = FALSE; + } +#if !defined(CONFIG_HDD_INIT_WITH_RTNL_LOCK) err_free_power_on_lock: +#endif free_riva_power_on_lock("wlan"); err_unregister_pmops: @@ -12256,6 +12293,12 @@ err_bap_close: #endif err_close_adapter: +#if defined(CONFIG_HDD_INIT_WITH_RTNL_LOCK) + if (rtnl_lock_enable == TRUE) { + rtnl_lock_enable = FALSE; + rtnl_unlock(); + } +#endif hdd_close_all_adapters( pHddCtx ); err_vosstop: diff --git a/CORE/MAC/inc/aniGlobal.h b/CORE/MAC/inc/aniGlobal.h index b69c46d58b9a..8ff49725a887 100644 --- a/CORE/MAC/inc/aniGlobal.h +++ b/CORE/MAC/inc/aniGlobal.h @@ -347,7 +347,7 @@ typedef struct sAniSirLim /// Place holder for current channel ID /// being scanned during background scanning tANI_U32 gLimBackgroundScanChannelId; - /// flag to indicate that bacground scan timer has been started + /* Flag to indicate that background scan timer has been started */ tANI_U8 gLimBackgroundScanStarted; /* Used to store the list of legacy bss sta detected during scan on one channel */ @@ -355,17 +355,17 @@ typedef struct sAniSirLim tANI_U16 gLimRestoreCBCount; tSirMacAddr gLimLegacyBssidList[MAX_NUM_LEGACY_BSSID_PER_CHANNEL]; - // - // If this flag is 1, - // then, LIM will "try and trigger" a background - // scan whenever it receives a Quiet BSS IE - // - // If this flag is 0, - // then, LIM will simply shut-off Tx/Rx whenever it - // receives a Quiet BSS IE. - // This is the default behavior when a Quiet BSS IE - // is received and 11H is enabled - // + /* + * If this flag is 1, + * then, LIM will "try and trigger" a background + * scan whenever it receives a Quiet BSS IE + * + * If this flag is 0, + * then, LIM will simply shut-off Tx/Rx whenever it + * receives a Quiet BSS IE. + * This is the default behaviour when a Quiet BSS IE + * is received and 11H is enabled + */ tANI_U32 gLimTriggerBackgroundScanDuringQuietBss; @@ -582,7 +582,7 @@ typedef struct sAniSirLim tANI_U32 gLimNumWdsInfoSet; tSirWdsInfo gLimWdsInfo; - // Deferred Queue Paramters + /* Deferred Queue Parameters */ tLimDeferredMsgQParams gLimDeferredMsgQ; // addts request if any - only one can be outstanding at any time @@ -594,7 +594,7 @@ typedef struct sAniSirLim tCfgProtection cfgProtection; tANI_U8 gLimProtectionControl; - //RF band to determibe 2.4/5 GHZ + /* RF band to determine 2.4/5 GHz */ // alternate radio info used by STA tSirAlternateRadioInfo gLimAlternateRadio; @@ -630,7 +630,7 @@ typedef struct sAniSirLim /* Used on STA for AC downgrade. This is a dynamic mask * setting which keep tracks of ACs being admitted. - * If bit is set to 0: That partiular AC is not admitted + * If bit is set to 0: That particular AC is not admitted * If bit is set to 1: That particular AC is admitted */ tANI_U8 gAcAdmitMask[SIR_MAC_DIRECTION_DIRECT]; @@ -833,10 +833,10 @@ typedef struct sAniSirLim // tANI_U8 gHTDualCTSProtection; - // - // Identifies a single STBC MCS that shall ne used for - // STBC control frames and STBC beacons - // + /* + * Identifies a single STBC MCS that shall be used for + * STBC control frames and STBC beacons + */ tANI_U8 gHTSTBCBasicMCS; tANI_U8 gHTNonGFDevicesPresent; @@ -998,7 +998,7 @@ typedef struct sMacOpenParameters typedef struct sHalMacStartParameters { - // parametes for the Firmware + /* Parameters for the Firmware */ tDriverType driverType; } tHalMacStartParameters; @@ -1051,8 +1051,8 @@ typedef struct sAniSirGlobal tANI_U32 menuCurrent; /* logDump specific */ tANI_U32 dumpTablecurrentId; - /* Instead of static allocation I will dyanamically allocate memory for dumpTableEntry - Thinking of using linkedlist */ + /* Instead of static allocation I will dynamically allocate memory + for dumpTableEntry thinking of using linked list */ tDumpModuleEntry *dumpTableEntry[MAX_DUMP_TABLE_ENTRY]; #ifdef FEATURE_WLAN_TDLS v_BOOL_t isTdlsPowerSaveProhibited; diff --git a/CORE/MAC/inc/qwlan_version.h b/CORE/MAC/inc/qwlan_version.h index b26e7e6d4e49..870d63f56e18 100644 --- a/CORE/MAC/inc/qwlan_version.h +++ b/CORE/MAC/inc/qwlan_version.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012-2013,2014 The Linux Foundation. All rights reserved. + * Copyright (c) 2012-2014 The Linux Foundation. All rights reserved. * * Previously licensed under the ISC license by Qualcomm Atheros, Inc. * @@ -34,7 +34,7 @@ FILE: BRIEF DESCRIPTION: WLAN Host Version file. - Build number automaticly updated by build scripts. + Build number automatically updated by build scripts. ===========================================================================*/ @@ -42,10 +42,9 @@ BRIEF DESCRIPTION: #define QWLAN_VERSION_MINOR 0 #define QWLAN_VERSION_PATCH 0 #define QWLAN_VERSION_EXTRA "" -#define QWLAN_VERSION_BUILD 188 - -#define QWLAN_VERSIONSTR "1.0.0.188" +#define QWLAN_VERSION_BUILD 189 +#define QWLAN_VERSIONSTR "1.0.0.189" #define AR6320_REV1_VERSION 0x5000000 #define AR6320_REV1_1_VERSION 0x5000001 diff --git a/CORE/MAC/inc/sirApi.h b/CORE/MAC/inc/sirApi.h index c5deadc791af..040ad7d4695a 100644 --- a/CORE/MAC/inc/sirApi.h +++ b/CORE/MAC/inc/sirApi.h @@ -270,7 +270,10 @@ typedef enum eSirResultCodes eSIR_SME_NO_KEY_MAPPING_KEY_FOR_PEER, eSIR_SME_ASSOC_REFUSED, eSIR_SME_REASSOC_REFUSED, - eSIR_SME_DEAUTH_WHILE_JOIN, //Received Deauth while joining or pre-auhtentication. + + /* Received Deauth while joining or pre-authenticating */ + eSIR_SME_DEAUTH_WHILE_JOIN, + eSIR_SME_DISASSOC_WHILE_JOIN, //Received Disassociation while joining. eSIR_SME_DEAUTH_WHILE_REASSOC, //Received Deauth while ReAssociate. eSIR_SME_DISASSOC_WHILE_REASSOC, //Received Disassociation while ReAssociate @@ -448,7 +451,7 @@ typedef enum eSirRFBand /* -* Specifies which beacons are to be indicated upto the host driver when +* Specifies which beacons are to be indicated up to the host driver when * Station is in power save mode. */ typedef enum eBeaconForwarding @@ -484,10 +487,10 @@ typedef struct sSirRegisterMgmtFrame tANI_U8 matchData[1]; }tSirRegisterMgmtFrame, *tpSirRegisterMgmtFrame; -// -// Identifies the neighbor BSS' that was(were) detected -// by an STA and reported to the AP -// +/* + * Identifies the neighbor BSS' that was(were) detected + * by an STA and reported to the AP + */ typedef struct sAniTitanCBNeighborInfo { // A BSS was found on the Primary @@ -682,7 +685,9 @@ typedef struct sSirSmeStartBssReq tAniAuthType authType; tANI_U32 dtimPeriod; tANI_U8 wps_state; - tANI_U8 isCoalesingInIBSSAllowed; //Coalesing on/off knob + + /* Coalescing on/off knob */ + tANI_U8 isCoalesingInIBSSAllowed; tVOS_CON_MODE bssPersona; tANI_U8 txLdpcIniFeatureEnabled; @@ -785,7 +790,7 @@ typedef struct sSirSmeStartBssRsp tSirResultCodes statusCode; tSirBssType bssType;//Add new type for WDS mode tANI_U16 beaconInterval;//Beacon Interval for both type - tANI_U32 staId;//Staion ID for Self + tANI_U32 staId; /* Station ID for Self */ tSirBssDescription bssDescription;//Peer BSS description #ifdef FEATURE_WLAN_MCC_TO_SCC_SWITCH tSirSmeHTProfile HTProfile; @@ -918,7 +923,7 @@ typedef struct sSirSmeScanReq tANI_U8 returnFreshResults; /* backgroundScanMode can take following values: - * 0x0 - agressive scan + * 0x0 - aggressive scan * 0x1 - normal scan where HAL will check for link traffic * prior to proceeding with the scan */ @@ -1017,7 +1022,7 @@ typedef struct sSirSmeBackgroundScanModeReq tSirBackgroundScanMode mode; } tSirSmeBackgroundScanModeReq, *tpSirSmeBackgroundScanModeReq; -/// Background Scan Statisics +/* Background Scan Statistics */ typedef struct sSirBackgroundScanInfo { tANI_U32 numOfScanSuccess; tANI_U32 numOfScanFailure; @@ -1026,7 +1031,7 @@ typedef struct sSirBackgroundScanInfo { #define SIR_BACKGROUND_SCAN_INFO_SIZE (3 * sizeof(tANI_U32)) -/// Definition for Join/Reassoc info - Reshmi: need to check if this is a def which moved from elsehwere. +/* Definition for Join/Reassoc info */ typedef struct sJoinReassocInfo { tAniTitanCBNeighborInfo cbNeighbors; @@ -1131,8 +1136,7 @@ typedef struct sSirSmeJoinReq } tSirSmeJoinReq, *tpSirSmeJoinReq; -/// Definition for reponse message to previously issued join request -/// MAC ---> +/* Definition for response message to previously issued join request */ typedef struct sSirSmeJoinRsp { tANI_U16 messageType; // eWNI_SME_JOIN_RSP @@ -1670,7 +1674,7 @@ typedef struct sSirSmeDisassocCnf tSirMacAddr peerMacAddr; } tSirSmeDisassocCnf, *tpSirSmeDisassocCnf; -/// Definition for Deauthetication request +/* Definition for Deauthentication request */ typedef struct sSirSmeDeauthReq { tANI_U16 messageType; // eWNI_SME_DEAUTH_REQ @@ -1682,7 +1686,7 @@ typedef struct sSirSmeDeauthReq tANI_U16 reasonCode; } tSirSmeDeauthReq, *tpSirSmeDeauthReq; -/// Definition for Deauthetication response +/* Definition for Deauthentication response */ typedef struct sSirSmeDeauthRsp { tANI_U16 messageType; // eWNI_SME_DEAUTH_RSP @@ -1693,7 +1697,7 @@ typedef struct sSirSmeDeauthRsp tSirMacAddr peerMacAddr; } tSirSmeDeauthRsp, *tpSirSmeDeauthRsp; -/// Definition for Deauthetication indication from peer +/* Definition for Deauthentication indication from peer */ typedef struct sSirSmeDeauthInd { tANI_U16 messageType; // eWNI_SME_DEAUTH_IND @@ -1771,9 +1775,11 @@ typedef struct sirUlaCompleteCnf tSirMacAddr peerMacAddr; } tSirUlaCompleteCnf, *tpSirUlaCompleteCnf; -/// Definition for Neighbor BSS indication -/// MAC ---> -/// MAC reports this each time a new I/BSS is detected +/* + * Definition for Neighbor BSS indication + * MAC ---> + * MAC reports this each time a new I/BSS is detected + */ typedef struct sSirSmeNeighborBssInd { tANI_U16 messageType; // eWNI_SME_NEIGHBOR_BSS_IND @@ -1782,9 +1788,11 @@ typedef struct sSirSmeNeighborBssInd tSirBssDescription bssDescription[1]; } tSirSmeNeighborBssInd, *tpSirSmeNeighborBssInd; -/// Definition for MIC failure indication -/// MAC ---> -/// MAC reports this each time a MIC failure occures on Rx TKIP packet +/* + * Definition for MIC failure indication + * MAC ---> + * MAC reports this each time a MIC failure occurs on Rx TKIP packet + */ typedef struct sSirSmeMicFailureInd { tANI_U16 messageType; // eWNI_SME_MIC_FAILURE_IND @@ -2373,13 +2381,14 @@ typedef struct sAniGlobalClassAStatsInfo //or MMPDU frames tANI_U32 promiscuous_rx_frag_cnt; //The number of MPDU frames received by the 802.11 station for MSDU packets //or MMPDU frames when a promiscuous packet filter was enabled - //tANI_U32 rx_fcs_err; //The number of MPDU frames that the 802.11 station received with FCS errors tANI_U32 rx_input_sensitivity; //The receiver input sensitivity referenced to a FER of 8% at an MPDU length //of 1024 bytes at the antenna connector. Each element of the array shall correspond //to a supported rate and the order shall be the same as the supporteRates parameter. - tANI_U32 max_pwr; //The maximum transmit power in dBm upto one decimal. - //for eg: if it is 10.5dBm, the value would be 105 - //tANI_U32 default_pwr; //The nominal transmit level used after normal power on sequence + + /* The maximum transmit power in dBm up-to one decimal + for eg: if it is 10.5dBm, the value would be 105 */ + tANI_U32 max_pwr; + tANI_U32 sync_fail_cnt; //Number of times the receiver failed to synchronize with the incoming signal //after detecting the sync in the preamble of the transmitted PLCP protocol data unit. tANI_U32 tx_rate; //Legacy transmit rate, in units of @@ -2881,7 +2890,10 @@ typedef enum eRequestFullPowerReason eSME_BMPS_STATUS_IND_RCVD, /* PE received a SIR_HAL_BMPS_STATUS_IND */ eSME_BMPS_MODE_DISABLED, /* BMPS mode was disabled by HDD in SME */ eSME_LINK_DISCONNECTED_BY_HDD, /* Link has been disconnected requested by HDD */ - eSME_LINK_DISCONNECTED_BY_OTHER,/* Disconnect due to linklost or requested by peer */ + + /* Disconnect due to link lost or requested by peer */ + eSME_LINK_DISCONNECTED_BY_OTHER, + eSME_FULL_PWR_NEEDED_BY_HDD, /* HDD request full power for some reason */ eSME_FULL_PWR_NEEDED_BY_BAP, /* BAP request full power for BT_AMP */ eSME_FULL_PWR_NEEDED_BY_CSR, /* CSR requests full power */ @@ -2895,7 +2907,7 @@ typedef enum eRequestFullPowerReason -//This is sent alongwith eWNI_PMC_EXIT_BMPS_REQ message +/* This is sent along with eWNI_PMC_EXIT_BMPS_REQ message */ typedef struct sExitBmpsInfo { tExitBmpsReason exitBmpsReason; /*Reason for exiting BMPS */ @@ -3093,7 +3105,7 @@ typedef struct sSirSmeWowlEnterParams */ tANI_U8 ucWowNetScanOffloadMatch; - /* This configuration allows a host wakeup on any GTK rekeying error. + /* This configuration allows a host wakeup on any GTK re-keying error. */ tANI_U8 ucWowGTKRekeyError; @@ -3272,7 +3284,7 @@ typedef struct sSirWPSProbeRspIE { v_U8_t PrimaryDeviceOUI[4] ; // Vendor specific OUI for Device Sub Category v_U32_t DeviceSubCategory ; // Device Sub Category ID: 1-PC, 2-Server if Device Category ID is computer tSirText DeviceName; - v_U16_t ConfigMethod; // Configuaration method + v_U16_t ConfigMethod; /* Configuration method */ v_U8_t RFBand; // RF bands available on the AP } tSirWPSProbeRspIE; @@ -3307,7 +3319,7 @@ typedef struct sSirWPSAssocRspIE { } tSirWPSAssocRspIE; typedef struct sSirAPWPSIEs { - tSirWPSProbeRspIE SirWPSProbeRspIE; /*WPS Set Probe Respose IE*/ + tSirWPSProbeRspIE SirWPSProbeRspIE; /* WPS Set Probe Response IE */ tSirWPSBeaconIE SirWPSBeaconIE; /*WPS Set Beacon IE*/ tSirWPSAssocRspIE SirWPSAssocRspIE; /*WPS Set Assoc Response IE*/ } tSirAPWPSIEs, *tpSiriAPWPSIEs; @@ -3865,7 +3877,7 @@ typedef struct /* Listen Interval */ tANI_U32 uListenInterval; - /* Broadcast Multicas Filter */ + /* Broadcast Multicast Filter */ tANI_U32 uBcastMcastFilter; /* Beacon Early Termination */ @@ -4095,7 +4107,9 @@ typedef struct sSirTdlsSendMgmtReq tANI_U32 peerCapability; tSirMacAddr bssid; // For multi-session, for PE to locate peSession ID tSirMacAddr peerMac; - tANI_U8 addIe[1]; //Variable lenght. Dont add any field after this. + + /* Variable length. Dont add any field after this. */ + tANI_U8 addIe[1]; } tSirTdlsSendMgmtReq, *tpSirSmeTdlsSendMgmtReq ; typedef enum TdlsAddOper @@ -4489,7 +4503,7 @@ typedef struct sSirDelPeriodicTxPtrn } tSirDelPeriodicTxPtrn, *tpSirDelPeriodicTxPtrn; #ifdef FEATURE_WLAN_BATCH_SCAN -// Set batch scan resposne from FW +/* Set batch scan response from FW */ typedef struct { /*maximum number of scans which FW can cache*/ @@ -4530,8 +4544,8 @@ typedef PACKED_PRE struct PACKED_POST tANI_U8 ssid[33]; /* SSID */ tANI_U8 ch; /* Channel */ tANI_S8 rssi; /* RSSI or Level */ - /*Timestamp when Network was found. Used to calculate age based on timestamp - in GET_RSP msg header */ + /* Time stamp when Network was found. Used to calculate age based + on time stamp in GET_RSP msg header */ tANI_U32 timestamp; } tSirBatchScanNetworkInfo, *tpSirBatchScanNetworkInfo; @@ -4689,7 +4703,7 @@ typedef enum tUpdateIEsType } eUpdateIEsType; -/* Modify particular IE in addition IE for prob resp Bcn */ +/* Modify particular IE in addition IE for probe resp Bcn */ typedef struct sSirModifyIE { tSirMacAddr bssid; @@ -5453,7 +5467,7 @@ typedef struct tANI_U32 txMpdu; /* number of received unicast mpdus */ tANI_U32 rxMpdu; - /* number of succesfully transmitted multicast data packets */ + /* Number of successfully transmitted multicast data packets */ /* STA case: implies ACK received from AP for the unicast */ /* packet in which mcast pkt was sent */ tANI_U32 txMcast; diff --git a/CORE/MAC/inc/sirMacProtDef.h b/CORE/MAC/inc/sirMacProtDef.h index d962bdf00344..69ab8d9326be 100644 --- a/CORE/MAC/inc/sirMacProtDef.h +++ b/CORE/MAC/inc/sirMacProtDef.h @@ -297,7 +297,7 @@ #define SIR_MAC_QBSS_LOAD_EID_MAX 5 #define SIR_MAC_EDCA_PARAM_SET_EID 12 // EDCA parameter set #define SIR_MAC_EDCA_PARAM_SET_EID_MIN 18 -#define SIR_MAC_EDCA_PARAM_SET_EID_MAX 20 // TBD temp - change backto 18 +#define SIR_MAC_EDCA_PARAM_SET_EID_MAX 20 #define SIR_MAC_TSPEC_EID 13 #define SIR_MAC_TSPEC_EID_MIN 55 #define SIR_MAC_TSPEC_EID_MAX 55 @@ -690,8 +690,14 @@ typedef enum eSirMacStatusCodes eSIR_MAC_UNSUPPORTED_RSN_IE_VERSION_STATUS = 44, //Unsupported RSN information element version eSIR_MAC_INVALID_RSN_IE_CAPABILITIES_STATUS = 45, //Invalid RSN information element capabilities eSIR_MAC_CIPHER_SUITE_REJECTED_STATUS = 46, //Cipher suite rejected because of security policy - eSIR_MAC_TS_NOT_CREATED_STATUS = 47, //The TS has not been created; however, the HC may be capable of creating a TS, in - //response to a request, after the time indicated in the TS Delay element + + /* + * The TS has not been created; however, the HC may be capable of creating + * a TS, in response to a request, after the time indicated in the TS Delay + * element + */ + eSIR_MAC_TS_NOT_CREATED_STATUS = 47, + eSIR_MAC_DL_NOT_ALLOWED_STATUS = 48, //Direct link is not allowed in the BSS by policy eSIR_MAC_DEST_STA_NOT_KNOWN_STATUS = 49, //The Destination STA is not present within this BSS eSIR_MAC_DEST_STA_NOT_QSTA_STATUS = 50, //The Destination STA is not a QoS STA @@ -721,8 +727,13 @@ typedef enum eSirMacReasonCodes eSIR_MAC_DEAUTH_LEAVING_BSS_REASON = 3, //Deauthenticated because sending station is leaving (or has left) IBSS or ESS eSIR_MAC_DISASSOC_DUE_TO_INACTIVITY_REASON = 4, //Disassociated due to inactivity eSIR_MAC_DISASSOC_DUE_TO_DISABILITY_REASON = 5, //Disassociated because AP is unable to handle all currently associated stations - eSIR_MAC_CLASS2_FRAME_FROM_NON_AUTH_STA_REASON = 6, //Class 2 frame received from nonauthenticated station - eSIR_MAC_CLASS3_FRAME_FROM_NON_ASSOC_STA_REASON = 7, //Class 3 frame received from nonassociated station + + /* Class 2 frame received from non-authenticated station */ + eSIR_MAC_CLASS2_FRAME_FROM_NON_AUTH_STA_REASON = 6, + + /* Class 3 frame received from non-associated station */ + eSIR_MAC_CLASS3_FRAME_FROM_NON_ASSOC_STA_REASON = 7, + eSIR_MAC_DISASSOC_LEAVING_BSS_REASON = 8, //Disassociated because sending station is leaving (or has left) BSS eSIR_MAC_STA_NOT_PRE_AUTHENTICATED_REASON = 9, //Station requesting (re)association is not authenticated with responding station eSIR_MAC_PWR_CAPABILITY_BAD_REASON = 10, //Disassociated because the information in the Power Capability element is unacceptable @@ -743,8 +754,12 @@ typedef enum eSirMacReasonCodes eSIR_MAC_1X_AUTH_FAILURE_REASON = 23, //IEEE 802.1X authentication failed eSIR_MAC_CIPHER_SUITE_REJECTED_REASON = 24, //Cipher suite rejected because of the security policy #ifdef FEATURE_WLAN_TDLS - eSIR_MAC_TDLS_TEARDOWN_PEER_UNREACHABLE = 25, //TDLS direct link teardown due to TDLS peer STA unreachable via the TDLS direct link - eSIR_MAC_TDLS_TEARDOWN_UNSPEC_REASON = 26, //TDLS direct link teardown for unspecified reason + /* TDLS direct link tear down due to TDLS peer STA unreachable + via the TDLS direct link */ + eSIR_MAC_TDLS_TEARDOWN_PEER_UNREACHABLE = 25, + + /* TDLS direct link tear down for unspecified reason */ + eSIR_MAC_TDLS_TEARDOWN_UNSPEC_REASON = 26, #endif // reserved 27 - 30 #ifdef WLAN_FEATURE_11W @@ -1611,7 +1626,7 @@ typedef enum eSirMacHTOperatingMode eSIR_HT_OP_MODE_PURE, // No Protection eSIR_HT_OP_MODE_OVERLAP_LEGACY, // Overlap Legacy device present, protection is optional eSIR_HT_OP_MODE_NO_LEGACY_20MHZ_HT, // No legacy device, but 20 MHz HT present - eSIR_HT_OP_MODE_MIXED // Protetion is required + eSIR_HT_OP_MODE_MIXED /* Protection is required */ } tSirMacHTOperatingMode; diff --git a/CORE/MAC/inc/wniApi.h b/CORE/MAC/inc/wniApi.h index 282484ac141f..8134d1666e65 100644 --- a/CORE/MAC/inc/wniApi.h +++ b/CORE/MAC/inc/wniApi.h @@ -168,7 +168,7 @@ enum eWniMsgTypes eWNI_SME_SELECT_CHANNEL_RSP, eWNI_SME_SET_PROPRIETARY_IE_REQ, eWNI_SME_SET_PROPRIETARY_IE_RSP, // #endif - eWNI_SME_DISCARD_SKB_NTF, // Used to cleanup SKBs by HDD + eWNI_SME_DISCARD_SKB_NTF, /* Used to clean up SKBs by HDD */ eWNI_SME_DEAUTH_CNF, eWNI_SME_MIC_FAILURE_IND, eWNI_SME_ADDTS_REQ, @@ -311,8 +311,8 @@ enum eWniMsgTypes eWNI_SME_MAX_ASSOC_EXCEEDED, - eWNI_SME_BTAMP_LOG_LINK_IND,//to serialize the create/accpet LL req from HCI - + /* To serialize the create/accept LL req from HCI */ + eWNI_SME_BTAMP_LOG_LINK_IND, #ifdef WLAN_WAKEUP_EVENTS eWNI_SME_WAKE_REASON_IND, @@ -335,11 +335,13 @@ enum eWniMsgTypes eWNI_SME_TDLS_SHOULD_TEARDOWN, eWNI_SME_TDLS_PEER_DISCONNECTED, #endif - //NOTE: If you are planning to add more mesages, please make sure that - //SIR_LIM_ITC_MSG_TYPES_BEGIN is moved appropriately. It is set as - //SIR_LIM_MSG_TYPES_BEGIN+0xB0 = 12B0 (which means max of 176 messages and - //eWNI_SME_TDLS_DEL_STA_RSP = 175. - //Should fix above issue to enable TDLS_INTERNAL + /* + * NOTE: If you are planning to add more messages, please make sure that + * SIR_LIM_ITC_MSG_TYPES_BEGIN is moved appropriately. It is set as + * SIR_LIM_MSG_TYPES_BEGIN+0xB0 = 12B0 (which means max of 176 messages and + * eWNI_SME_TDLS_DEL_STA_RSP = 175. + * Should fix above issue to enable TDLS_INTERNAL + */ eWNI_SME_SET_BCN_FILTER_REQ, eWNI_SME_RESET_AP_CAPS_CHANGED, #ifdef WLAN_FEATURE_11W @@ -372,7 +374,7 @@ enum eWniMsgTypes eWNI_SME_DFS_CSAIE_TX_COMPLETE_IND, //To indicate completion of CSA IE //update in beacons/probe rsp eWNI_SME_STATS_EXT_EVENT, - eWNI_SME_LINK_SPEED_IND,//Indicate linkspeed response from WMA + eWNI_SME_LINK_SPEED_IND, /* Indicate link speed response from WMA */ eWNI_SME_CSA_OFFLOAD_EVENT, eWNI_SME_UPDATE_ADDITIONAL_IES, // indicates Additional IE from hdd to PE eWNI_SME_MODIFY_ADDITIONAL_IES, /* To indicate IE modify from hdd to PE */ @@ -445,7 +447,7 @@ typedef enum { /*---------------------------------------------------------------------*/ -/* CFG to HDD message paramter indices */ +/* CFG to HDD message parameter indices */ /* The followings are word indices starting from the message body */ @@ -541,7 +543,7 @@ typedef enum { /*---------------------------------------------------------------------*/ -/* HDD to CFG message paramter indices */ +/* HDD to CFG message parameter indices */ /* */ /* The followings are word indices starting from the message body */ /* */ diff --git a/CORE/MAC/src/cfg/cfgApi.c b/CORE/MAC/src/cfg/cfgApi.c index a5ae387d3041..d34961b8f6e5 100644 --- a/CORE/MAC/src/cfg/cfgApi.c +++ b/CORE/MAC/src/cfg/cfgApi.c @@ -87,7 +87,7 @@ tANI_U32 cfgNeedReload(tpAniSirGlobal pMac, tANI_U16 cfgId) * * LOGIC: * Please see Configuration & Statistic Collection Micro-Architecture - * specification for the pseudocode. + * specification for the pseudo code. * * ASSUMPTIONS: * None. @@ -741,7 +741,7 @@ cfgGetDot11dTransmitPower(tpAniSirGlobal pMac, tANI_U16 cfgId, cfgLog(pMac, LOGP, FL("Failed to retrieve 11d configuration parameters while retrieving 11d tuples")); goto error; } - /* Identify the channel and maxtxpower */ + /* Identify the channel and max txpower */ while(count <= (cfgLength - (sizeof(tSirMacChanInfo)))) { tANI_U8 firstChannel, maxChannels; @@ -1008,7 +1008,7 @@ cfgSetCapabilityInfo(tpAniSirGlobal pMac, tANI_U16 caps) * cfgCleanup() * * FUNCTION: - * CFG cleanup function. + * CFG clean up function. * * LOGIC: * @@ -1016,7 +1016,7 @@ cfgSetCapabilityInfo(tpAniSirGlobal pMac, tANI_U16 caps) * None. * * NOTE: - * This function must be called during system shutdown. + * This function must be called during system shut down. * * @param None * diff --git a/CORE/MAC/src/dph/dphHashTable.h b/CORE/MAC/src/dph/dphHashTable.h index da6d584393e5..b918604eaa62 100644 --- a/CORE/MAC/src/dph/dphHashTable.h +++ b/CORE/MAC/src/dph/dphHashTable.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2011-2013 The Linux Foundation. All rights reserved. + * Copyright (c) 2011-2014 The Linux Foundation. All rights reserved. * * Previously licensed under the ISC license by Qualcomm Atheros, Inc. * @@ -68,7 +68,7 @@ typedef struct /// The hash table object extern dphHashTableClass dphHashTable; -/// Print MAC addresse +/* Print MAC address */ extern void dphPrintMacAddr(struct sAniSirGlobal *pMac, tANI_U8 addr[], tANI_U32); tpDphHashNode dphLookupHashEntry(tpAniSirGlobal pMac, tANI_U8 staAddr[], tANI_U16 *pStaId, dphHashTableClass* pDphHashTable); diff --git a/CORE/MAC/src/include/cfgApi.h b/CORE/MAC/src/include/cfgApi.h index fbd2f582a8ce..6691e728497b 100644 --- a/CORE/MAC/src/include/cfgApi.h +++ b/CORE/MAC/src/include/cfgApi.h @@ -120,7 +120,7 @@ extern tSirRetStatus cfgGetCapabilityInfo(tpAniSirGlobal pMac, tANI_U16 *pCap,tp /// Set capability info extern void cfgSetCapabilityInfo(tpAniSirGlobal, tANI_U16); -/// Cleanup CFG module +/* Clean up CFG module */ void cfgCleanup(tpAniSirGlobal pMac); extern tANI_U8 *gCfgParamName[]; diff --git a/CORE/MAC/src/include/dphGlobal.h b/CORE/MAC/src/include/dphGlobal.h index 7eb5197cd718..3ec1f5e38ac8 100644 --- a/CORE/MAC/src/include/dphGlobal.h +++ b/CORE/MAC/src/include/dphGlobal.h @@ -300,13 +300,10 @@ typedef struct sDphHashNode tANI_U8 timWaitCount; - /// Number of Successfull MPDU's being sent - + /* Number of Successful MPDU's being sent */ tANI_U32 curTxMpduCnt; - - /// number of consecutive TIMs sent without response tANI_U8 numTimSent; @@ -430,7 +427,7 @@ typedef struct sDphHashNode /////////////////////////////////////////////////////////////////////// - tANI_U8 dpuSig:4; // DPU signiture + tANI_U8 dpuSig:4; /* DPU signature */ tANI_U8 staSig:4; // STA signature @@ -481,27 +478,6 @@ typedef struct sDphHashNode tCfgTrafficClass tcCfg[STACFG_MAX_TC]; - // Block Ack state - - // This is used between PE and HAL only. - - // can be set to one of the values from the following enum - - /*typedef enum eLimBAState - - { - - eLIM_BA_STATE_IDLE, // we are not waiting for anything from HAL. - - eLIM_BA_STATE_WT_ADD_RSP, //We are waiting for Add rsponse from HAL. - - eLIM_BA_STATE_WT_DEL_RSP // We are waiting for Del response from HAL. - - } tLimBAState; */ - - - - //BA state bitmap 2 bits per tid // BA state for tid i = (baState >> tid*2) & 0x3 diff --git a/CORE/MAC/src/include/parserApi.h b/CORE/MAC/src/include/parserApi.h index 3feb34c31266..e00be867cf85 100644 --- a/CORE/MAC/src/include/parserApi.h +++ b/CORE/MAC/src/include/parserApi.h @@ -69,7 +69,7 @@ typedef struct sSirCountryInformation } tSirCountryInformation,*tpSirCountryInformation; -/// Structure common to Beaons & Probe Responses +/* Structure common to Beacons & Probe Responses */ typedef struct sSirProbeRespBeacon { tSirMacTimeStamp timeStamp; @@ -211,8 +211,8 @@ typedef struct sSirAssocReq tANI_U8 powerCapabilityPresent; tANI_U8 supportedChannelsPresent; - // keeing copy of assoction request received, this is - // required for indicating the frame to upper layers + /* keeping copy of association request received, this is + required for indicating the frame to upper layers */ tANI_U32 assocReqFrameLength; tANI_U8* assocReqFrame; #ifdef WLAN_FEATURE_11AC @@ -454,7 +454,7 @@ sirConvertMeasReqFrame2Struct(struct sAniSirGlobal *, tANI_U8 *, * \sa PopulatedDot11fCapabilities2 * * - * \param pMac Pointer to the global MAC datastructure + * \param pMac Pointer to the global MAC data structure * * \param pDot11f Address of a tDot11fFfCapabilities to be filled in * @@ -476,7 +476,7 @@ PopulateDot11fCapabilities(tpAniSirGlobal pMac, * \sa PopulatedDot11fCapabilities2 * * - * \param pMac Pointer to the global MAC datastructure + * \param pMac Pointer to the global MAC data structure * * \param pDot11f Address of a tDot11fFfCapabilities to be filled in * @@ -553,7 +553,7 @@ PopulateDot11fBeaconReport(tpAniSirGlobal pMac, * \brief Populate a tDot11fIEExtSuppRates * * - * \param pMac Pointer to the global MAC datastructure + * \param pMac Pointer to the global MAC data structure * * \param nChannelNum Channel on which the enclosing frame will be going out * @@ -707,7 +707,7 @@ PopulateDot11fSuppChannels(tpAniSirGlobal pMac, * \brief Populated a tDot11fIESuppRates * * - * \param pMac Pointer to the global MAC datastructure + * \param pMac Pointer to the global MAC data structure * * \param nChannelNum Channel the enclosing frame will be going out on; see * below diff --git a/CORE/MAC/src/include/sirParams.h b/CORE/MAC/src/include/sirParams.h index 084e1cdb24d7..0161f484d649 100644 --- a/CORE/MAC/src/include/sirParams.h +++ b/CORE/MAC/src/include/sirParams.h @@ -136,8 +136,8 @@ typedef struct sSirMsgQ /** * Based on the type either a bodyptr pointer into * memory or bodyval as a 32 bit data is used. - * bodyptr: is always a freeable pointer, one should always - * make sure that bodyptr is always freeable. + * bodyptr: is always a free able pointer, one should always + * make sure that bodyptr is always free able. * * Messages should use either bodyptr or bodyval; not both !!!. */ @@ -697,7 +697,7 @@ typedef struct sSirMbMsgP2p #define SIR_LIM_UPDATE_BEACON (SIR_LIM_ITC_MSG_TYPES_BEGIN + 0x13) -// LIM Timeout messages +/* LIM Time out messages */ #define SIR_LIM_TIMEOUT_MSG_START ((SIR_LIM_MODULE_ID << 8) + 0xD0) #define SIR_LIM_MIN_CHANNEL_TIMEOUT SIR_LIM_TIMEOUT_MSG_START #define SIR_LIM_MAX_CHANNEL_TIMEOUT (SIR_LIM_TIMEOUT_MSG_START + 1) @@ -778,7 +778,7 @@ typedef struct sSirMbMsgP2p /* ****************************************** * * * - * EVENT TYPE Defintions * + * EVENT TYPE Definitions * * * * ****************************************** */ diff --git a/CORE/MAC/src/include/utilsApi.h b/CORE/MAC/src/include/utilsApi.h index bc9e8cc4ea3e..e130f969b104 100644 --- a/CORE/MAC/src/include/utilsApi.h +++ b/CORE/MAC/src/include/utilsApi.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2011-2013 The Linux Foundation. All rights reserved. + * Copyright (c) 2011-2014 The Linux Foundation. All rights reserved. * * Previously licensed under the ISC license by Qualcomm Atheros, Inc. * @@ -123,7 +123,7 @@ sirSwapU16(tANI_U16 val) * * FUNCTION: * This function is called to swap two U8s of an tANI_U16 value depending - * on endiannes of the target processor/compiler the software is + * on endianness of the target processor/compiler the software is * running on * * LOGIC: @@ -180,7 +180,7 @@ sirSwapU32(tANI_U32 val) * * FUNCTION: * This function is called to swap U8s of an tANI_U32 value depending - * on endiannes of the target processor/compiler the software is + * on endianness of the target processor/compiler the software is * running on * * LOGIC: @@ -241,7 +241,7 @@ sirSwapU32Buf(tANI_U32 *ptr, tANI_U32 nWords) * * FUNCTION: * This function is called to swap U8s of U32s in the buffer depending - * on endiannes of the target processor/compiler the software is + * on endianness of the target processor/compiler the software is * running on * * LOGIC: @@ -709,7 +709,7 @@ halRoundS32(tANI_S32 p) return(k); } -// New functions for endianess conversion +/* New functions for endianness conversion */ #ifdef ANI_LITTLE_BYTE_ENDIAN #define ani_cpu_to_be16(x) sirSwapU16((x)) #define ani_cpu_to_le16(x) (x) diff --git a/CORE/MAC/src/pe/include/limApi.h b/CORE/MAC/src/pe/include/limApi.h index efac4f9521f4..f47aace58e06 100644 --- a/CORE/MAC/src/pe/include/limApi.h +++ b/CORE/MAC/src/pe/include/limApi.h @@ -106,7 +106,7 @@ tSirRetStatus pePostMsgApi(tpAniSirGlobal pMac, tSirMsgQ* pMsg); tSirRetStatus peProcessMsg(tpAniSirGlobal pMac, tSirMsgQ* limMsg); void limDumpInit(tpAniSirGlobal pMac); /** - * Function to cleanup LIM state. + * Function to clean up LIM state. * This called upon reset/persona change etc */ extern void limCleanup(tpAniSirGlobal); diff --git a/CORE/MAC/src/pe/lim/limFT.c b/CORE/MAC/src/pe/lim/limFT.c index b31c5589f24c..1e3135e7f809 100644 --- a/CORE/MAC/src/pe/lim/limFT.c +++ b/CORE/MAC/src/pe/lim/limFT.c @@ -66,7 +66,7 @@ void limFTOpen(tpAniSirGlobal pMac, tpPESession psessionEntry) } /*-------------------------------------------------------------------------- - Cleanup FT variables. + Clean up FT variables. ------------------------------------------------------------------------*/ void limFTCleanupPreAuthInfo(tpAniSirGlobal pMac, tpPESession psessionEntry) { diff --git a/CORE/MAC/src/pe/lim/limP2P.c b/CORE/MAC/src/pe/lim/limP2P.c index 0daddf4be5c3..d0e29124e32a 100644 --- a/CORE/MAC/src/pe/lim/limP2P.c +++ b/CORE/MAC/src/pe/lim/limP2P.c @@ -620,8 +620,8 @@ void limRemainOnChnRsp(tpAniSirGlobal pMac, eHalStatus status, tANI_U32 *data) return; } - //Incase of the Remain on Channel Failure Case - //Cleanup Everything + /* Incase of the Remain on Channel Failure Case + Clean up Everything */ if(eHAL_STATUS_FAILURE == status) { //Deactivate Remain on Channel Timer diff --git a/CORE/MAC/src/pe/lim/limProcessAssocReqFrame.c b/CORE/MAC/src/pe/lim/limProcessAssocReqFrame.c index 63473d321e4d..1ff33a47ae19 100644 --- a/CORE/MAC/src/pe/lim/limProcessAssocReqFrame.c +++ b/CORE/MAC/src/pe/lim/limProcessAssocReqFrame.c @@ -156,6 +156,47 @@ limConvertSupportedChannels(tpAniSirGlobal pMac, pMlmAssocInd->supportedChannels.numChnl);) } +/**--------------------------------------------------------------- +\fn lim_check_sta_in_pe_entries +\brief This function is called by limProcessAssocReqFrame() +\ to check if STA entry already exists in any of the +\ PE entries of the AP. If it exists, deauth will be +\ sent on that session and the STA deletion will +\ happen. After this, the ASSOC request will be +\ processed +\ +\param pMac - A pointer to Global MAC structure +\param pHdr - A pointer to the MAC header +\return None +------------------------------------------------------------------*/ +void lim_check_sta_in_pe_entries(tpAniSirGlobal pMac, tpSirMacMgmtHdr pHdr) +{ + tANI_U8 i; + tANI_U16 assocId = 0; + tpDphHashNode pStaDs = NULL; + tpPESession psessionEntry=NULL; + + for(i = 0; i < pMac->lim.maxBssId; i++) + { + if( (pMac->lim.gpSession[i].valid) && + (pMac->lim.gpSession[i].pePersona == VOS_STA_SAP_MODE) && + ((psessionEntry = &pMac->lim.gpSession[i]) != NULL)) { + + pStaDs = dphLookupHashEntry(pMac, pHdr->sa, &assocId, + &psessionEntry->dph.dphHashTable); + if (pStaDs) { + limLog(pMac, LOGE, + FL("Sending Deauth and Deleting existing STA entry: " + MAC_ADDRESS_STR), + MAC_ADDR_ARRAY(psessionEntry->selfMacAddr)); + limSendDeauthMgmtFrame(pMac, eSIR_MAC_UNSPEC_FAILURE_REASON, + (tANI_U8 *) pHdr->sa, psessionEntry, FALSE); + limTriggerSTAdeletion(pMac, pStaDs, psessionEntry); + break; + } + } + } +} /**--------------------------------------------------------------- \fn limProcessAssocReqFrame @@ -213,6 +254,8 @@ limProcessAssocReqFrame(tpAniSirGlobal pMac, tANI_U8 *pRxPacketInfo, psessionEntry->peSessionId, psessionEntry->limSystemRole, psessionEntry->limMlmState, MAC_ADDR_ARRAY(pHdr->sa)); + lim_check_sta_in_pe_entries(pMac, pHdr); + if (psessionEntry->limSystemRole == eLIM_STA_ROLE || psessionEntry->limSystemRole == eLIM_BT_AMP_STA_ROLE ) { limLog(pMac, LOGE, FL("received unexpected ASSOC REQ on sessionid: %d " diff --git a/CORE/MAC/src/pe/lim/limProcessMlmReqMessages.c b/CORE/MAC/src/pe/lim/limProcessMlmReqMessages.c index d2e9c490800c..131f91946ee4 100644 --- a/CORE/MAC/src/pe/lim/limProcessMlmReqMessages.c +++ b/CORE/MAC/src/pe/lim/limProcessMlmReqMessages.c @@ -2403,7 +2403,7 @@ limProcessMlmAuthReq(tpAniSirGlobal pMac, tANI_U32 *pMsgBuf) // Log error limLog(pMac, LOGP, FL("could not start Auth failure timer")); - // Cleanup as if auth timer expired + /* Clean up as if auth timer expired */ limProcessAuthFailureTimeout(pMac); } @@ -2515,7 +2515,7 @@ limProcessMlmAssocReq(tpAniSirGlobal pMac, tANI_U32 *pMsgBuf) limLog(pMac, LOGP, FL("SessionId:%d could not start Association failure timer"), psessionEntry->peSessionId); - // Cleanup as if assoc timer expired + /* Clean up as if assoc timer expired */ limProcessAssocFailureTimeout(pMac,LIM_ASSOC ); } @@ -3085,12 +3085,6 @@ limProcessMlmDeauthReqNtf(tpAniSirGlobal pMac, eHalStatus suspendStatus, tANI_U3 MTRACE(macTrace(pMac, TRACE_CODE_MLM_STATE, psessionEntry->peSessionId, psessionEntry->limMlmState)); goto end; } - else - { - // LINK_ESTABLISED_STATE - // Cleanup RX & TX paths - // below - } break; diff --git a/CORE/MAC/src/pe/lim/limSendManagementFrames.c b/CORE/MAC/src/pe/lim/limSendManagementFrames.c index b5a43b3c2e0f..17f7a7857da0 100644 --- a/CORE/MAC/src/pe/lim/limSendManagementFrames.c +++ b/CORE/MAC/src/pe/lim/limSendManagementFrames.c @@ -3836,7 +3836,7 @@ eHalStatus limSendDisassocCnf(tpAniSirGlobal pMac) eSIR_MAC_DISASSOC_DUE_TO_FTHANDOFF_REASON)) { PELOGE(limLog(pMac, LOGE, - FL("FT Preauth Session (%p,%d) Cleanup"), + FL("FT Preauth Session (%p,%d) Clean up"), psessionEntry, psessionEntry->peSessionId);); #if defined WLAN_FEATURE_VOWIFI_11R @@ -3847,7 +3847,7 @@ eHalStatus limSendDisassocCnf(tpAniSirGlobal pMac) else { PELOGE(limLog(pMac, LOGE, - FL("No FT Preauth Session Cleanup in role %d" + FL("No FT Preauth Session Clean up in role %d" #ifdef FEATURE_WLAN_ESE " isESE %d" #endif diff --git a/CORE/MAC/src/pe/lim/limSession.c b/CORE/MAC/src/pe/lim/limSession.c index 0ca2caa05879..0001940df792 100644 --- a/CORE/MAC/src/pe/lim/limSession.c +++ b/CORE/MAC/src/pe/lim/limSession.c @@ -162,7 +162,7 @@ tpPESession peCreateSession(tpAniSirGlobal pMac, sirCopyMacAddr(pMac->lim.gpSession[i].bssId, bssid); pMac->lim.gpSession[i].valid = TRUE; - /* Intialize the SME and MLM states to IDLE */ + /* Initialize the SME and MLM states to IDLE */ pMac->lim.gpSession[i].limMlmState = eLIM_MLM_IDLE_STATE; pMac->lim.gpSession[i].limSmeState = eLIM_SME_IDLE_STATE; pMac->lim.gpSession[i].limCurrentAuthType = eSIR_OPEN_SYSTEM; @@ -488,7 +488,7 @@ void peDeleteSession(tpAniSirGlobal pMac, tpPESession psessionEntry) if (psessionEntry->parsedAssocReq != NULL) { - // Cleanup the individual allocation first + /* Clean up the individual allocation first */ for (i=0; i < psessionEntry->dph.dphHashTable.size; i++) { if ( psessionEntry->parsedAssocReq[i] != NULL ) @@ -504,7 +504,7 @@ void peDeleteSession(tpAniSirGlobal pMac, tpPESession psessionEntry) psessionEntry->parsedAssocReq[i] = NULL; } } - // Cleanup the whole block + /* Clean up the whole block */ vos_mem_free(psessionEntry->parsedAssocReq); psessionEntry->parsedAssocReq = NULL; } diff --git a/CORE/MAC/src/pe/lim/limSessionUtils.c b/CORE/MAC/src/pe/lim/limSessionUtils.c index d3b6ddc66ac2..e818c5f5e758 100644 --- a/CORE/MAC/src/pe/lim/limSessionUtils.c +++ b/CORE/MAC/src/pe/lim/limSessionUtils.c @@ -47,11 +47,11 @@ /*-------------------------------------------------------------------------- \brief peGetVhtCapable() - Returns the Vht capable from a valid session. - This function itrates the session Table and returns the VHT capable from first valid session - if no sessions are valid/present it returns FALSE + This function iterates the session Table and returns the VHT capable from + first valid session if no sessions are valid/present it returns FALSE \param pMac - pointer to global adapter context - \return - channel to scan from valid session else zero. + \return - channel to scan from valid session else zero. \sa @@ -76,7 +76,7 @@ tANI_U8 peGetVhtCapable(tpAniSirGlobal pMac) /*-------------------------------------------------------------------------- \brief peGetCurrentChannel() - Returns the channel number for scanning, from a valid session. - This function itrates the session Table and returns the channel number + This function iterates the session Table and returns the channel number from first valid session if no sessions are valid/present it returns zero \param pMac - pointer to global adapter context @@ -132,11 +132,12 @@ tANI_U8 peValidateBtJoinRequest(tpAniSirGlobal pMac) } /*-------------------------------------------------------------------------- - \brief peGetValidPowerSaveSession() - Fetches the valid session for powersave . + \brief peGetValidPowerSaveSession() - Fetches the valid session for power save - This function is called to check the valid session for power save, if more than one session is active , this function - it returns NULL. - if there is only one valid "infrastructure" session present in "linkestablished" state this function returns sessionentry. + This function is called to check the valid session for power save, if more + than one session is active , this function it returns NULL. + if there is only one valid "infrastructure" session present in + "link established" state this function returns sessionentry. For all other cases it returns NULL. \param pMac - pointer to global adapter context @@ -181,10 +182,12 @@ tpPESession peGetValidPowerSaveSession(tpAniSirGlobal pMac) /*-------------------------------------------------------------------------- \brief peIsAnySessionActive() - checks for the active session presence . - This function returns TRUE if atleast one valid session is present else it returns FALSE + This function returns TRUE if at least one valid session is present + else it returns FALSE \param pMac - pointer to global adapter context - \return - return TRUE if atleast one session is active else return FALSE. + \return - return TRUE if at least one session + is active else return FALSE. \sa --------------------------------------------------------------------------*/ @@ -238,7 +241,7 @@ void pePrintActiveSession(tpAniSirGlobal pMac) session. This function returns TRUE if the session Id passed needs to be on a different - channel than atleast one session already active. + channel than at least one session already active. \param pMac - pointer to global adapter context \param sessionId - session ID of the session to be verified. @@ -266,8 +269,8 @@ isLimSessionOffChannel(tpAniSirGlobal pMac, tANI_U8 sessionId) //Skip the sessionId that is to be joined. continue; } - //if another ession is valid and it is on different channel - //it is an off channel operation. + /* If another session is valid and it is on different channel + it is an off channel operation. */ if( (pMac->lim.gpSession[i].valid) && (pMac->lim.gpSession[i].currentOperChannel != pMac->lim.gpSession[sessionId].currentOperChannel) ) @@ -378,7 +381,7 @@ limIsInQuietDuration (tpAniSirGlobal pMac) return 0; } /*-------------------------------------------------------------------------- - \brief limIsQuietBegin() - Check if channel quieting is begining on any + \brief limIsQuietBegin() - Check if channel quieting is beginning on any valid session. \param pMac - pointer to global adapter context diff --git a/CORE/MAC/src/pe/lim/limSessionUtils.h b/CORE/MAC/src/pe/lim/limSessionUtils.h index 28561190c8e1..db56cc9b64b9 100644 --- a/CORE/MAC/src/pe/lim/limSessionUtils.h +++ b/CORE/MAC/src/pe/lim/limSessionUtils.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012-2013 The Linux Foundation. All rights reserved. + * Copyright (c) 2012-2014 The Linux Foundation. All rights reserved. * * Previously licensed under the ISC license by Qualcomm Atheros, Inc. * @@ -57,7 +57,7 @@ /*------------------------------------------------------------------------- - Function declarations and documenation + Function declarations and documentation ------------------------------------------------------------------------*/ /*-------------------------------------------------------------------------- @@ -92,11 +92,12 @@ tANI_U8 peValidateBtJoinRequest(tpAniSirGlobal pMac); /*-------------------------------------------------------------------------- - \brief peGetValidPowerSaveSession() - Fetches the valid session for powersave . + \brief peGetValidPowerSaveSession() - Fetches the valid session for power save . This function is called to check the valid session for power save, if more than one session is active , this function it returns NULL. - if there is only one valid "infrastructure" session present in "linkestablished" state this function returns sessionentry. + if there is only one valid "infrastructure" session present in + "link stablished" state this function returns sessionentry. For all other cases it returns NULL. \param pMac - pointer to global adapter context @@ -114,10 +115,11 @@ tpPESession peGetValidPowerSaveSession(tpAniSirGlobal pMac); /*-------------------------------------------------------------------------- \brief peIsAnySessionActive() - checks for the active session presence . - This function returns TRUE if atleast one valid session is present else it returns FALSE + This function returns TRUE if at least one valid session is present else it returns FALSE \param pMac - pointer to global adapter context - \return - return TRUE if atleast one session is active else return FALSE. + \return - return TRUE if at least one session is active + else return FALSE. \sa --------------------------------------------------------------------------*/ @@ -200,7 +202,7 @@ tANI_U8 limIsInQuietDuration (tpAniSirGlobal pMac); /*-------------------------------------------------------------------------- - \brief limIsQuietBegin() - Check if channel quieting is begining on any + \brief limIsQuietBegin() - Check if channel quieting is beginning on any valid session. \param pMac - pointer to global adapter context diff --git a/CORE/MAC/src/pe/lim/limSmeReqUtils.c b/CORE/MAC/src/pe/lim/limSmeReqUtils.c index 6385aa1b2a3e..2d2ce7f8f255 100644 --- a/CORE/MAC/src/pe/lim/limSmeReqUtils.c +++ b/CORE/MAC/src/pe/lim/limSmeReqUtils.c @@ -393,14 +393,14 @@ limSetRSNieWPAiefromSmeStartBSSReqMessage(tpAniSirGlobal pMac, * received in various SME_REQ messages is valid or not * *LOGIC: - * BSS Descritipion validity checks are performed in this function + * BSS Description validity checks are performed in this function * *ASSUMPTIONS: * *NOTE: * * @param pMac Pointer to Global MAC structure - * @param pBssDescr Pointer to received Bss Descritipion + * @param pBssDescr Pointer to received Bss Description * @return true when BSS description is valid, false otherwise */ @@ -595,7 +595,7 @@ limIsSmeStartBssReqValid(tpAniSirGlobal pMac, goto end; } } - // check if all the rates in the operatioal rate set are legal 11G rates + /* Check if all the rates in the operational rate set are legal 11G rates */ else if (pStartBssReq->nwType == eSIR_11G_NW_TYPE) { for (i = 0; i < pStartBssReq->operationalRateSet.numRates; i++) diff --git a/CORE/MAC/src/pe/lim/limSmeReqUtils.h b/CORE/MAC/src/pe/lim/limSmeReqUtils.h index 6dbf0fe64262..922d71600b18 100644 --- a/CORE/MAC/src/pe/lim/limSmeReqUtils.h +++ b/CORE/MAC/src/pe/lim/limSmeReqUtils.h @@ -28,7 +28,7 @@ /* * * This file limSmeReqUtils.h contains the utility definitions - * LIM uses while processing SME request messsages. + * LIM uses while processing SME request messages. * Author: Chandra Modumudi * Date: 02/13/02 * History:- diff --git a/CORE/MAC/src/pe/lim/limTimerUtils.c b/CORE/MAC/src/pe/lim/limTimerUtils.c index 6918a391b861..b2f42ba7ef3b 100644 --- a/CORE/MAC/src/pe/lim/limTimerUtils.c +++ b/CORE/MAC/src/pe/lim/limTimerUtils.c @@ -151,7 +151,7 @@ limCreateTimers(tpAniSirGlobal pMac) } cfgValue = SYS_MS_TO_TICKS(cfgValue); - /* Limiting max numm of probe req for each channel scan */ + /* Limiting max number of probe req for each channel scan */ pMac->lim.maxProbe = (cfgValue/cfgValue1); if (tx_timer_create(&pMac->lim.limTimers.gLimMaxChannelTimer, @@ -407,8 +407,8 @@ limCreateTimers(tpAniSirGlobal pMac) 0, TX_NO_ACTIVATE) != TX_SUCCESS) { - // Could not creat wt-probe-after-HeartBeat-failure timer. - // Log error + /* Could not create wt-probe-after-HeartBeat-failure timer. + Log error */ limLog(pMac, LOGP, FL("unable to create ProbeAfterHBTimer")); goto err_timer; @@ -479,18 +479,18 @@ limCreateTimers(tpAniSirGlobal pMac) FL("Created Disassociate throttle timer "));) /** - * Create keepalive timer and activate it right away for AP role + * Create keep alive timer and activate it right away for AP role */ if (wlan_cfgGetInt(pMac, WNI_CFG_KEEPALIVE_TIMEOUT, &cfgValue) != eSIR_SUCCESS) { /** - * Could not get keepalive timeout value + * Could not get keep alive timeout value * from CFG. Log error. */ limLog(pMac, LOGP, - FL("could not retrieve keepalive timeout value")); + FL("could not retrieve keep alive timeout value")); } // A value of zero implies keep alive should be disabled @@ -514,8 +514,8 @@ limCreateTimers(tpAniSirGlobal pMac) TX_AUTO_ACTIVATE : TX_NO_ACTIVATE) != TX_SUCCESS) { - // Cannot create keepalive timer. Log error. - limLog(pMac, LOGP, FL("Cannot create keepalive timer.")); + /* Cannot create keep alive timer. Log error. */ + limLog(pMac, LOGP, FL("Cannot create keep alive timer.")); goto err_timer; } @@ -769,7 +769,7 @@ limCreateTimers(tpAniSirGlobal pMac) * 3. AUTH_FAILURE timer expiration while authenticating with a peer * 4. Heartbeat timer expiration on STA * 5. Background scan timer expiration on STA - * 6. AID release, Pre-auth cleanup and Link monitoring timer + * 6. AID release, Pre-auth clean up and Link monitoring timer * expiration on AP * *LOGIC: @@ -1391,8 +1391,7 @@ limDeactivateAndChangeTimer(tpAniSirGlobal pMac, tANI_U32 timerId) if (tx_timer_deactivate(&pMac->lim.limTimers.gLimKeepaliveTimer) != TX_SUCCESS) { - // Could not deactivate Keepalive timer. - // Log error + /* Could not deactivate Keep alive timer. Log error */ limLog(pMac, LOGP, FL("unable to deactivate KeepaliveTimer timer")); } @@ -1403,11 +1402,11 @@ limDeactivateAndChangeTimer(tpAniSirGlobal pMac, tANI_U32 timerId) &val) != eSIR_SUCCESS) { /** - * Could not get keepalive timeout value + * Could not get keep alive timeout value * from CFG. Log error. */ limLog(pMac, LOGP, - FL("could not retrieve keepalive timeout value")); + FL("could not retrieve keep alive timeout value")); } if (val == 0) { @@ -1722,7 +1721,7 @@ limReactivateHeartBeatTimer(tpAniSirGlobal pMac, tpPESession psessionEntry) limHeartBeatDeactivateAndChangeTimer(pMac, psessionEntry); MTRACE(macTrace(pMac, TRACE_CODE_TIMER_ACTIVATE, psessionEntry->peSessionId, eLIM_HEART_BEAT_TIMER)); - //only start the hearbeat-timer if the timeout value is non-zero + /* Only start the heartbeat-timer if the timeout value is non-zero */ if(pMac->lim.limTimers.gLimHeartBeatTimer.initScheduleTimeInMsecs > 0) { /* diff --git a/CORE/MAC/src/pe/lim/limTrace.c b/CORE/MAC/src/pe/lim/limTrace.c index 5f1e1981d6fe..7270535ae5cc 100644 --- a/CORE/MAC/src/pe/lim/limTrace.c +++ b/CORE/MAC/src/pe/lim/limTrace.c @@ -141,7 +141,7 @@ void limTraceDump(tpAniSirGlobal pMac, tpvosTraceRecord pRecord, tANI_U16 recInd NULL, "Beacon", "ATIM", - "Disassocation", + "Disassociation", "Authentication", "Deauthentication", "Action" diff --git a/CORE/MAC/src/pe/lim/limTypes.h b/CORE/MAC/src/pe/lim/limTypes.h index dc8961920fc0..708abf20fe7e 100644 --- a/CORE/MAC/src/pe/lim/limTypes.h +++ b/CORE/MAC/src/pe/lim/limTypes.h @@ -114,7 +114,7 @@ #define LIM_DECRYPT_ICV_FAIL 1 -/// Definitions to distinquish between Association/Reassociaton +/* Definitions to distinguish between Association/Reassociation */ #define LIM_ASSOC 0 #define LIM_REASSOC 1 @@ -609,7 +609,7 @@ void limProcessSmeDelBssRsp( tpAniSirGlobal , tANI_U32,tpPESession); void limGetRandomBssid(tpAniSirGlobal pMac ,tANI_U8 *data); -// Function to handle HT and HT IE CFG parameter intializations +/* Function to handle HT and HT IE CFG parameter initializations */ void handleHTCapabilityandHTInfo(struct sAniSirGlobal *pMac, tpPESession psessionEntry); // Function to handle CFG parameter updates @@ -626,10 +626,10 @@ void limSetCfgProtection(tpAniSirGlobal pMac, tpPESession pesessionEntry); // Function to Initialize MLM state machine on STA void limInitMlm(tpAniSirGlobal); -// Function to cleanup MLM state machine +/* Function to clean up MLM state machine */ void limCleanupMlm(tpAniSirGlobal); -// Function to cleanup LMM state machine +/* Function to clean up LMM state machine */ void limCleanupLmm(tpAniSirGlobal); // Management frame handling functions @@ -757,7 +757,7 @@ void limSetChannel(tpAniSirGlobal pMac, tANI_U8 channel, tANI_U8 secChannelOffse void limCompleteMlmScan(tpAniSirGlobal, tSirResultCodes); #ifdef FEATURE_OEM_DATA_SUPPORT -/// Funtion that sets system into meas mode for oem data req +/* Function that sets system into meas mode for oem data req */ void limSetOemDataReqMode(tpAniSirGlobal pMac, eHalStatus status, tANI_U32* data); #endif diff --git a/CORE/MAC/src/pe/lim/limUtils.c b/CORE/MAC/src/pe/lim/limUtils.c index 6a7e26fd2677..155269ea72b7 100644 --- a/CORE/MAC/src/pe/lim/limUtils.c +++ b/CORE/MAC/src/pe/lim/limUtils.c @@ -3209,7 +3209,7 @@ void limStartQuietTimer(tpAniSirGlobal pMac, tANI_U8 sessionId) * For the first and last ANI peer, we have to update EDCA params as needed * * When the first ANI peer joins the BSS, we notify SCH - * When the last ANI peer leaves the BSS, we notfiy SCH + * When the last ANI peer leaves the BSS, we notify SCH */ void limUtilCountStaAdd( @@ -3324,7 +3324,7 @@ void limSwitchChannelCback(tpAniSirGlobal pMac, eHalStatus status, * *NOTE: * @param pMac Pointer to Global MAC structure - * @param newChannel new chnannel ID + * @param newChannel new channel ID * @return NONE */ void limSwitchPrimaryChannel(tpAniSirGlobal pMac, tANI_U8 newChannel,tpPESession psessionEntry) @@ -3370,7 +3370,7 @@ void limSwitchPrimaryChannel(tpAniSirGlobal pMac, tANI_U8 newChannel,tpPESession * *NOTE: * @param pMac Pointer to Global MAC structure - * @param newChannel New chnannel ID (or current channel ID) + * @param newChannel New channel ID (or current channel ID) * @param subband CB secondary info: * - eANI_CB_SECONDARY_NONE * - eANI_CB_SECONDARY_UP @@ -3606,7 +3606,7 @@ tSirMacASCapabilityInfo macASCapabilityInfo = {0}; if( htCap >= eHT_ANTENNA_SELECTION && htCap < eHT_SI_GRANULARITY ) { - // Get Antenna Seletion HT Capabilities + /* Get Antenna Selection HT Capabilities */ if( eSIR_SUCCESS != wlan_cfgGetInt( pMac, WNI_CFG_AS_CAP, &cfgValue )) cfgValue = 0; ptr = (tANI_U8 *) &macASCapabilityInfo; @@ -3867,7 +3867,7 @@ limEnable11aProtection(tpAniSirGlobal pMac, tANI_U8 enable, } } - //This part is common for staiton as well. + /* This part is common for station as well. */ if(false == psessionEntry->beaconParams.llaCoexist) { PELOG1(limLog(pMac, LOG1, FL(" => protection from 11A Enabled"));) @@ -3887,7 +3887,7 @@ limEnable11aProtection(tpAniSirGlobal pMac, tANI_U8 enable, //Overlap Legacy protection disabled. pMac->lim.gLimOverlap11aParams.protectionEnabled = false; - //We need to take care of HT OP mode iff we are HT AP. + /* We need to take care of HT OP mode if we are HT AP. */ if(psessionEntry->htCapability) { // no HT op mode change if any of the overlap protection enabled. @@ -4070,7 +4070,7 @@ limEnable11gProtection(tpAniSirGlobal pMac, tANI_U8 enable, } } - //This part is common for staiton as well. + /* This part is common for station as well. */ if(false == psessionEntry->beaconParams.llbCoexist) { PELOG1(limLog(pMac, LOG1, FL("=> 11G Protection Enabled"));) @@ -4103,12 +4103,9 @@ limEnable11gProtection(tpAniSirGlobal pMac, tANI_U8 enable, { limEnableHtRifsProtection(pMac, false, overlap, pBeaconParams,psessionEntry); limEnableHtOBSSProtection(pMac, false, overlap, pBeaconParams,psessionEntry); - if(psessionEntry->gLimHt20Params.protectionEnabled){ - //Commenting out beacuse of CR 258588 WFA cert - //psessionEntry->htOperMode = eSIR_HT_OP_MODE_NO_LEGACY_20MHZ_HT; + if (psessionEntry->gLimHt20Params.protectionEnabled) { psessionEntry->htOperMode = eSIR_HT_OP_MODE_PURE; - } - else + } else psessionEntry->htOperMode = eSIR_HT_OP_MODE_PURE; } } @@ -4165,7 +4162,7 @@ limEnable11gProtection(tpAniSirGlobal pMac, tANI_U8 enable, //Overlap Legacy protection disabled. psessionEntry->gLimOlbcParams.protectionEnabled = false; - //We need to take care of HT OP mode iff we are HT AP. + /* We need to take care of HT OP mode if we are HT AP. */ if(psessionEntry->htCapability) { // no HT op mode change if any of the overlap protection enabled. @@ -4349,7 +4346,7 @@ limEnableHtProtectionFrom11g(tpAniSirGlobal pMac, tANI_U8 enable, } } - //This part is common for staiton as well. + /* This part is common for station as well. */ if(false == psessionEntry->beaconParams.llgCoexist) { pBeaconParams->llgCoexist = psessionEntry->beaconParams.llgCoexist = true; @@ -4694,10 +4691,10 @@ limEnableHT20Protection(tpAniSirGlobal pMac, tANI_U8 enable, } } - //This part is common for staiton as well. + /* This part is common for station as well. */ if(false == psessionEntry->beaconParams.ht20Coexist) { - PELOG1(limLog(pMac, LOG1, FL("=> Prtection from HT20 Enabled"));) + PELOG1(limLog(pMac, LOG1, FL("=> Protection from HT20 Enabled"));) pBeaconParams->ht20MhzCoexist = psessionEntry->beaconParams.ht20Coexist = true; pBeaconParams->paramChangeBitmap |= PARAM_HT20MHZCOEXIST_CHANGED; } @@ -4725,8 +4722,6 @@ limEnableHT20Protection(tpAniSirGlobal pMac, tANI_U8 enable, { if(psessionEntry->gLimHt20Params.protectionEnabled) { - //Commented beacuse of CR 258588 for WFA Cert - //psessionEntry->htOperMode = eSIR_HT_OP_MODE_NO_LEGACY_20MHZ_HT; psessionEntry->htOperMode = eSIR_HT_OP_MODE_PURE; limEnableHtRifsProtection(pMac, false, overlap, pBeaconParams,psessionEntry); limEnableHtOBSSProtection(pMac, false, overlap, pBeaconParams,psessionEntry); @@ -4855,7 +4850,7 @@ limEnableHTNonGfProtection(tpAniSirGlobal pMac, tANI_U8 enable, if(psessionEntry->limSystemRole == eLIM_AP_ROLE){ if ((enable) && (false == psessionEntry->beaconParams.llnNonGFCoexist)) { - PELOG1(limLog(pMac, LOG1, FL(" => Prtection from non GF Enabled"));) + PELOG1(limLog(pMac, LOG1, FL(" => Protection from non GF Enabled"));) pBeaconParams->llnNonGFCoexist = psessionEntry->beaconParams.llnNonGFCoexist = true; pBeaconParams->paramChangeBitmap |= PARAM_NON_GF_DEVICES_PRESENT_CHANGED; } @@ -4869,7 +4864,7 @@ limEnableHTNonGfProtection(tpAniSirGlobal pMac, tANI_U8 enable, { if ((enable) && (false == psessionEntry->beaconParams.llnNonGFCoexist)) { - PELOG1(limLog(pMac, LOG1, FL(" => Prtection from non GF Enabled"));) + PELOG1(limLog(pMac, LOG1, FL(" => Protection from non GF Enabled"));) pBeaconParams->llnNonGFCoexist = psessionEntry->beaconParams.llnNonGFCoexist = true; pBeaconParams->paramChangeBitmap |= PARAM_NON_GF_DEVICES_PRESENT_CHANGED; } @@ -4928,7 +4923,7 @@ limEnableHTLsigTxopProtection(tpAniSirGlobal pMac, tANI_U8 enable, if(psessionEntry->limSystemRole == eLIM_AP_ROLE){ if ((enable) && (false == psessionEntry->beaconParams.fLsigTXOPProtectionFullSupport)) { - PELOG1(limLog(pMac, LOG1, FL(" => Prtection from LsigTxop Enabled"));) + PELOG1(limLog(pMac, LOG1, FL(" => Protection from LsigTxop Enabled"));) pBeaconParams->fLsigTXOPProtectionFullSupport = psessionEntry->beaconParams.fLsigTXOPProtectionFullSupport = true; pBeaconParams->paramChangeBitmap |= PARAM_LSIG_TXOP_FULL_SUPPORT_CHANGED; } @@ -4942,7 +4937,7 @@ limEnableHTLsigTxopProtection(tpAniSirGlobal pMac, tANI_U8 enable, { if ((enable) && (false == psessionEntry->beaconParams.fLsigTXOPProtectionFullSupport)) { - PELOG1(limLog(pMac, LOG1, FL(" => Prtection from LsigTxop Enabled"));) + PELOG1(limLog(pMac, LOG1, FL(" => Protection from LsigTxop Enabled"));) pBeaconParams->fLsigTXOPProtectionFullSupport = psessionEntry->beaconParams.fLsigTXOPProtectionFullSupport = true; pBeaconParams->paramChangeBitmap |= PARAM_LSIG_TXOP_FULL_SUPPORT_CHANGED; } @@ -5167,7 +5162,7 @@ void limTxComplete( tHalHandle hHal, void *pData, v_BOOL_t free) * have changed, and sends an indication to HAL also with the * updated HT Parameters. * This function does not detect the change in the primary channel, that is done as part - * of channel Swtich IE processing. + * of channel Switch IE processing. * If STA is configured with '20Mhz only' mode, then this function does not do anything * This function changes the CB mode, only if the self capability is set to '20 as well as 40Mhz' * @@ -5655,7 +5650,7 @@ limProcessAddBaInd(tpAniSirGlobal pMac, tpSirMsgQ limMsg) } #endif - //delete the complete dialoguetoken linked list + /* Delete the complete dialogue token linked list */ limDeleteDialogueTokenList(pMac); pBaCandidate = (tpAddBaCandidate) (((tANI_U8*)pBaActivityInd) + sizeof(tBaActivityInd)); @@ -5684,7 +5679,7 @@ limProcessAddBaInd(tpAniSirGlobal pMac, tpSirMsgQ limMsg) /** ------------------------------------------------------------- \fn limDeleteBASessions -\brief Deletes all the exisitng BA sessions for given session +\brief Deletes all the existing BA sessions for given session and BA direction. \param tpAniSirGlobal pMac \param tpPESession pSessionEntry @@ -5765,7 +5760,7 @@ limDeleteBASessions(tpAniSirGlobal pMac, tpPESession pSessionEntry, /** ------------------------------------------------------------- \fn limDelAllBASessions -\brief Deletes all the exisitng BA sessions. +\brief Deletes all the existing BA sessions. \param tpAniSirGlobal pMac \return None -------------------------------------------------------------*/ @@ -5787,7 +5782,7 @@ void limDelAllBASessions(tpAniSirGlobal pMac) /** ------------------------------------------------------------- \fn limDelAllBASessionsBtc -\brief Deletes all the exisitng BA receipent sessions in 2.4GHz +\brief Deletes all the existing BA recipient sessions in 2.4GHz band. \param tpAniSirGlobal pMac \return None @@ -5809,8 +5804,9 @@ void limDelPerBssBASessionsBtc(tpAniSirGlobal pMac) /** ------------------------------------------------------------- \fn limProcessDelTsInd -\brief handles the DeleteTS indication coming from HAL or generated by PE itself in some error cases. - Validates the request, sends the DelTs action frame to the Peer and sends DelTs indicatoin to HDD. +\brief Handles the DeleteTS indication coming from HAL or generated by + PE itself in some error cases. Validates the request, sends the + DelTs action frame to the Peer and sends DelTs indication to HDD. \param tpAniSirGlobal pMac \param tSirMsgQ limMsg \return None @@ -6379,12 +6375,6 @@ tSirMsgQ msgQ; pDelBAParams->baTID = baTID; pDelBAParams->baDirection = baDirection; - /* Update PE session ID */ - - - //TBD-RAJESH Updating of the session ID is requird for SIR_HAL_DELBA_IND????? - //pDelBAParams->sessionId = psessionEntry->peSessionId; - // Post WDA_DELBA_IND to HAL. msgQ.type = WDA_DELBA_IND; msgQ.reserved = 0; @@ -6966,9 +6956,11 @@ tSirNwType limGetNwType(tpAniSirGlobal pMac, tANI_U8 channelNum, tANI_U32 type, if ((channelNum > 0) && (channelNum < 15)) { int i; - // 11b or 11g packet - // 11g iff extended Rate IE is present or - // if there is an A rate in suppRate IE + /* + * 11b or 11g packet + * 11g if extended Rate IE is present or + * if there is an A rate in suppRate IE + */ for (i = 0; i < pBeacon->supportedRates.numRates; i++) { if (sirIsArate(pBeacon->supportedRates.rate[i] & 0x7f)) @@ -7026,7 +7018,7 @@ tANI_U8 limGetChannelFromBeacon(tpAniSirGlobal pMac, tpSchBeaconStruct pBeacon) \ in the TS Info Fields. \ \ An AC is a trigger-enabled AC if the PSB subfield -\ is set to 1 in the uplink direction. +\ is set to 1 in the up link direction. \ An AC is a delivery-enabled AC if the PSB subfield \ is set to 1 in the down-link direction. \ @@ -7165,7 +7157,8 @@ void limHandleHeartBeatTimeout(tpAniSirGlobal pMac ) { if(pMac->lim.gpSession[i].LimHBFailureStatus == eANI_BOOLEAN_TRUE) { - /* Activate Probe After HeartBeat Timer incase HB Failure detected */ + /* Activate Probe After HeartBeat Timer in-case + HB Failure detected */ PELOGW(limLog(pMac, LOGW,FL("Sending Probe for Session: %d"), i);) limDeactivateAndChangeTimer(pMac, eLIM_PROBE_AFTER_HB_TIMER); @@ -7205,7 +7198,8 @@ void limHandleHeartBeatTimeoutForSession(tpAniSirGlobal pMac, tpPESession psessi { if(psessionEntry->LimHBFailureStatus == eANI_BOOLEAN_TRUE) { - /* Activate Probe After HeartBeat Timer incase HB Failure detected */ + /* Activate Probe After HeartBeat Timer in-case + HB Failure detected */ PELOGW(limLog(pMac, LOGW,FL("Sending Probe for Session: %d"), psessionEntry->bssIdx);) limDeactivateAndChangeTimer(pMac, eLIM_PROBE_AFTER_HB_TIMER); @@ -7346,8 +7340,6 @@ void limHandleHeartBeatFailureTimeout(tpAniSirGlobal pMac) } } } - /* Deactivate Timer ProbeAfterHB Timer -> As its a oneshot timer, need not deactivate the timer */ - // tx_timer_deactivate(&pMac->lim.limTimers.gLimProbeAfterHBTimer); } diff --git a/CORE/MAC/src/pe/lim/limUtils.h b/CORE/MAC/src/pe/lim/limUtils.h index 1b88c5fdbfa0..881d589808fc 100644 --- a/CORE/MAC/src/pe/lim/limUtils.h +++ b/CORE/MAC/src/pe/lim/limUtils.h @@ -141,7 +141,7 @@ void limUpdateShortPreamble(tpAniSirGlobal pMac, tSirMacAddr peerMacAddr, tpUpda void limUpdateShortSlotTime(tpAniSirGlobal pMac, tSirMacAddr peerMacAddr, tpUpdateBeaconParams pBeaconParams, tpPESession psessionEntry); /* - * The below 'product' check tobe removed if 'Association' is + * The below 'product' check to be removed if 'Association' is * allowed in IBSS. */ void limReleasePeerIdx(tpAniSirGlobal, tANI_U16, tpPESession); diff --git a/CORE/MAC/src/pe/pmm/pmmApi.c b/CORE/MAC/src/pe/pmm/pmmApi.c index cba7b151acf5..e14da8155b21 100644 --- a/CORE/MAC/src/pe/pmm/pmmApi.c +++ b/CORE/MAC/src/pe/pmm/pmmApi.c @@ -322,7 +322,7 @@ void pmmExitBmpsRequestHandler(tpAniSirGlobal pMac, tpExitBmpsInfo pExitBmpsInfo * BMPS mode while Nth Beacon is delivered. Essentially, PMC * can request the device to get out of power-save while * background scanning is happening. since, the device is already - * out of powersave, just inform that device is out of powersave + * out of power save, just inform that device is out of power save */ if(limIsSystemInScanState(pMac)) { @@ -549,7 +549,7 @@ tSirRetStatus pmmSendChangePowerSaveMsg(tpAniSirGlobal pMac) msgQ.bodyval = 0; /* If reason for full power is disconnecting (ie. link is - * disconnected) or becasue of channel switch or full power requested + * disconnected) or because of channel switch or full power requested * because of beacon miss and connected on DFS channel * then we should not send data null. * For all other reason code, send data null. @@ -584,7 +584,7 @@ tSirRetStatus pmmSendChangePowerSaveMsg(tpAniSirGlobal pMac) * *FUNCTION: * This function is called to send ENTER_BMPS_REQ message to HAL. - * This message is sent to intialize the process of bringing the + * This message is sent to initialize the process of bringing the * station into power save state. * *LOGIC: @@ -687,7 +687,7 @@ tSirRetStatus pmmSendInitPowerSaveMsg(tpAniSirGlobal pMac,tpPESession psessionE * pmmSendPowerSaveCfg() * *FUNCTION: - * This function is called to send power save configurtion. + * This function is called to send power save configuration. * *NOTE: * @@ -795,8 +795,8 @@ returnFailure: * pmmExitBmpsResponseHandler * *FUNCTION: - * This function processes the Wakeup Rsp from HAL and if successfull, - * sends a respnose back to PMC layer. + * This function processes the Wakeup Rsp from HAL and if successful, + * sends a response back to PMC layer. *LOGIC: * *ASSUMPTIONS: @@ -1033,7 +1033,7 @@ void pmmExitBmpsIndicationHandler(tpAniSirGlobal pMac, tANI_U8 mode, eHalStatus return; } - /* Since, the hardware is already wokenup, PE also wakesup and informs + /* Since, the hardware is already woken up, PE also wakes up and informs * the upper layers that the system is waking up. Hence always Success is * sent in the reason code for the message sent to PMC */ @@ -1336,7 +1336,7 @@ void pmmEnterImpsRequestHandler (tpAniSirGlobal pMac) if(peIsAnySessionActive(pMac)) { /* Print active pesession and tracedump once in every 16 - * continous error. + * continuous error. */ if (!(pMac->pmc.ImpsReqFailCnt & 0xF)) { @@ -2860,7 +2860,7 @@ void pmmGTKOffloadGetInfoResponseHandler(tpAniSirGlobal pMac, tpSirMsgQ limMsg) } #endif // WLAN_FEATURE_GTK_OFFLOAD -/* Powersave Offload Implementation */ +/* Power save Offload Implementation */ eHalStatus pmmPsOffloadOpen(tpAniSirGlobal pMac,tpPESession psessionEntry) { if(psessionEntry->valid) @@ -3144,7 +3144,7 @@ tSirRetStatus pmmOffloadEnterBmpsReqHandler(tpAniSirGlobal pMac, * get a WDA_EXIT_BMPS_RSP from HAL. */ SET_LIM_PROCESS_DEFD_MESGS(pMac, false); - pmmLog(pMac, LOG1, FL("WDA_ENTER_BMPS_REQ Successfully sendt to WDA")); + pmmLog(pMac, LOG1, FL("WDA_ENTER_BMPS_REQ Successfully sent to WDA")); return eSIR_SUCCESS; } @@ -3279,7 +3279,7 @@ tSirRetStatus pmmOffloadExitBmpsReqHandler(tpAniSirGlobal pMac, */ SET_LIM_PROCESS_DEFD_MESGS(pMac, false); - pmmLog(pMac, LOG1, FL("WDA_EXIT_BMPS_REQ Successfully sendt to WDA")); + pmmLog(pMac, LOG1, FL("WDA_EXIT_BMPS_REQ Successfully sent to WDA")); return eSIR_SUCCESS; } @@ -3431,7 +3431,7 @@ tSirRetStatus pmmOffloadEnterUapsdReqHandler(tpAniSirGlobal pMac, * get a WDA_EXIT_UAPSD_RSP from HAL. */ SET_LIM_PROCESS_DEFD_MESGS(pMac, false); - pmmLog(pMac, LOG1, FL("WDA_ENTER_UAPSD_REQ Successfully sendt to WDA")); + pmmLog(pMac, LOG1, FL("WDA_ENTER_UAPSD_REQ Successfully sent to WDA")); return eSIR_SUCCESS; } @@ -3549,7 +3549,7 @@ tSirRetStatus pmmOffloadExitUapsdReqHandler(tpAniSirGlobal pMac, * get a WDA_EXIT_UAPSD_RSP from HAL. */ SET_LIM_PROCESS_DEFD_MESGS(pMac, false); - pmmLog(pMac, LOG1, FL("WDA_EXIT_UAPSD_REQ Successfully sendt to WDA")); + pmmLog(pMac, LOG1, FL("WDA_EXIT_UAPSD_REQ Successfully sent to WDA")); return eSIR_SUCCESS; } diff --git a/CORE/MAC/src/pe/rrm/rrmApi.c b/CORE/MAC/src/pe/rrm/rrmApi.c index c0975debfe2f..045aa17f2099 100644 --- a/CORE/MAC/src/pe/rrm/rrmApi.c +++ b/CORE/MAC/src/pe/rrm/rrmApi.c @@ -156,7 +156,7 @@ rrmSendSetMaxTxPowerReq ( tpAniSirGlobal pMac, tPowerdBm txPower, tpPESession pS if( pSessionEntry == NULL ) { - PELOGE(limLog(pMac, LOGE, FL(" Inavalid parameters"));) + PELOGE(limLog(pMac, LOGE, FL("Invalid parameters"));) return eSIR_FAILURE; } pMaxTxParams = vos_mem_malloc(sizeof(tMaxTxPowerParams)); @@ -490,7 +490,7 @@ rrmProcessNeighborReportReq( tpAniSirGlobal pMac, * * NOTE: * - * @param pCurrentReq pointer to the current Req comtext. + * @param pCurrentReq pointer to the current Req context. * @param pBeaconReq pointer to the beacon report request IE from the peer. * @param pSessionEntry session entry. * @return None @@ -511,10 +511,14 @@ rrmProcessBeaconReportReq( tpAniSirGlobal pMac, if( pBeaconReq->measurement_request.Beacon.BeaconReporting.present && (pBeaconReq->measurement_request.Beacon.BeaconReporting.reportingCondition != 0) ) { - //Repeated measurement is not supported. This means number of repetitions should be zero.(Already checked) - //All test case in VoWifi(as of version 0.36) use zero for number of repetitions. - //Beacon reporting should not be included in request if number of repetitons is zero. - // IEEE Std 802.11k-2008 Table 7-29g and section 11.10.8.1 + /* + * Repeated measurement is not supported. This means number of repetitions + * should be zero.(Already checked). + * All test case in VoWifi(as of version 0.36) use zero for number of + * repetitions. Beacon reporting should not be included in request + * if number of repetitions is zero. + * IEEE Std 802.11k-2008 Table 7-29g and section 11.10.8.1 + */ PELOGE(limLog( pMac, LOGE, "Dropping the request: Reporting condition included in beacon report request and it is not zero");) return eRRM_INCAPABLE; @@ -596,7 +600,7 @@ rrmProcessBeaconReportReq( tpAniSirGlobal pMac, vos_mem_set(pSmeBcnReportReq,sizeof( tSirBeaconReportReqInd ),0); - /* Allocated memory for pSmeBcnReportReq....will be freed by other modulea*/ + /* Allocated memory for pSmeBcnReportReq will be freed by other modules */ vos_mem_copy(pSmeBcnReportReq->bssId, pSessionEntry->bssId, sizeof(tSirMacAddr)); pSmeBcnReportReq->messageType = eWNI_SME_BEACON_REPORT_REQ_IND; pSmeBcnReportReq->length = sizeof( tSirBeaconReportReqInd ); @@ -1077,7 +1081,7 @@ rrmProcessRadioMeasurementRequest( tpAniSirGlobal pMac, } break; default: - //Send a report with incapabale bit set. + /* Send a report with incapable bit set. */ if ( pReport == NULL ) //Allocate memory to send reports for any subsequent requests. { pReport = vos_mem_malloc(sizeof( tSirMacRadioMeasureReport ) @@ -1093,7 +1097,7 @@ rrmProcessRadioMeasurementRequest( tpAniSirGlobal pMac, * (pRRMReq->num_MeasurementRequest - i), 0); limLog( pMac, LOG3, - FL(" rrm beacon type incapble of %d report "), + FL("rrm beacon type incapable of %d report "), num_report ); } pReport[num_report].incapable = 1; diff --git a/CORE/MAC/src/pe/sch/schApi.c b/CORE/MAC/src/pe/sch/schApi.c index 88f8b862884f..58c2f8e825ec 100644 --- a/CORE/MAC/src/pe/sch/schApi.c +++ b/CORE/MAC/src/pe/sch/schApi.c @@ -298,7 +298,7 @@ tSirRetStatus schSendBeaconReq( tpAniSirGlobal pMac, tANI_U8 *beaconPayload, tAN beaconParams->timIeOffset = psessionEntry->schBeaconOffsetBegin; } - /* p2pIeOffset should be atleast greater than timIeOffset */ + /* p2pIeOffset should be at-least greater than timIeOffset */ if ((pMac->sch.schObject.p2pIeOffset != 0) && (pMac->sch.schObject.p2pIeOffset < psessionEntry->schBeaconOffsetBegin)) diff --git a/CORE/MAC/src/pe/sch/schBeaconGen.c b/CORE/MAC/src/pe/sch/schBeaconGen.c index 70365e7a6316..7be0d7464122 100644 --- a/CORE/MAC/src/pe/sch/schBeaconGen.c +++ b/CORE/MAC/src/pe/sch/schBeaconGen.c @@ -242,13 +242,13 @@ tSirRetStatus schSetFixedBeaconFields(tpAniSirGlobal pMac,tpPESession psessionEn vos_mem_set(( tANI_U8*) pBcn1, sizeof( tDot11fBeacon1 ), 0); - // Skip over the timestamp (it'll be updated later). + /* Skip over the time stamp (it'll be updated later). */ pBcn1->BeaconInterval.interval = pMac->sch.schObject.gSchBeaconInterval; PopulateDot11fCapabilities( pMac, &pBcn1->Capabilities, psessionEntry ); if (psessionEntry->ssidHidden) { - pBcn1->SSID.present = 1; //rest of the fileds are 0 for hidden ssid + pBcn1->SSID.present = 1; /* Rest of the fields are 0 for hidden ssid */ if((psessionEntry->ssId.length) && (psessionEntry->ssidHidden == eHIDDEN_SSID_ZERO_CONTENTS)) pBcn1->SSID.num_ssid = psessionEntry->ssId.length; @@ -569,7 +569,7 @@ void limUpdateProbeRspTemplateIeBitmapBeacon2(tpAniSirGlobal pMac, sizeof(beacon2->PowerConstraints)); } - /* Channel Switch Annoouncement SIR_MAC_CHNL_SWITCH_ANN_EID */ + /* Channel Switch Announcement SIR_MAC_CHNL_SWITCH_ANN_EID */ if(beacon2->ChanSwitchAnn.present) { SetProbeRspIeBitmap(DefProbeRspIeBitmap,SIR_MAC_CHNL_SWITCH_ANN_EID); diff --git a/CORE/MAC/src/pe/sch/schBeaconProcess.c b/CORE/MAC/src/pe/sch/schBeaconProcess.c index 52d26d36d8c1..9f1a9dee337d 100644 --- a/CORE/MAC/src/pe/sch/schBeaconProcess.c +++ b/CORE/MAC/src/pe/sch/schBeaconProcess.c @@ -275,9 +275,12 @@ static void __schBeaconProcessNoSession(tpAniSirGlobal pMac, tpSchBeaconStruct p limHandleIBSScoalescing(pMac, pBeacon, pRxPacketInfo, psessionEntry); } - //If station(STA/BT-STA/BT-AP/IBSS) mode, Always save the beacon in the scan results, if atleast one session is active - //schBeaconProcessNoSession will be called only when there is atleast one session active, so not checking - //it again here. + /* + * If station(STA/BT-STA/BT-AP/IBSS) mode, Always save the beacon in the + * scan results, if at-least one session is active schBeaconProcessNoSession + * will be called only when there is at-least one session active, + * so not checking it again here. + */ limCheckAndAddBssDescription(pMac, pBeacon, pRxPacketInfo, eANI_BOOLEAN_FALSE, eANI_BOOLEAN_FALSE); return; } @@ -294,11 +297,11 @@ static void __schBeaconProcessNoSession(tpAniSirGlobal pMac, tpSchBeaconStruct p * * LOGIC: * Following scenarios exist when Session exists - * * IBSS STA receving beacons from IBSS Peers, who are part of IBSS. + * * IBSS STA receiving beacons from IBSS Peers, who are part of IBSS. * - call limHandleIBSScoalescing with that session context. - * * Infra STA receving beacons from AP to which it is connected + * * Infra STA receiving beacons from AP to which it is connected * - call schBeaconProcessFromAP with that session's context. - * * BTAMP STA receving beacons from BTAMP AP + * * BTAMP STA receiving beacons from BTAMP AP * - call schBeaconProcessFromAP with that session's context. * * BTAMP AP receiving beacons from BTAMP STA * (here need to make sure BTAP creates session entry for BT STA) @@ -356,8 +359,8 @@ static void __schBeaconProcessForSession( tpAniSirGlobal pMac, { /* * This handles two cases: - * -- Infra STA receving beacons from AP - * -- BTAMP_STA receving beacons from BTAMP_AP + * -- Infra STA receiving beacons from AP + * -- BTAMP_STA receiving beacons from BTAMP_AP */ //Always save the beacon into LIM's cached scan results limCheckAndAddBssDescription(pMac, pBeacon, pRxPacketInfo, eANI_BOOLEAN_FALSE, eANI_BOOLEAN_FALSE); diff --git a/CORE/MAC/src/pe/sch/schMessage.c b/CORE/MAC/src/pe/sch/schMessage.c index bd33de47d557..359b7a31d2a1 100644 --- a/CORE/MAC/src/pe/sch/schMessage.c +++ b/CORE/MAC/src/pe/sch/schMessage.c @@ -247,8 +247,8 @@ void schProcessMessage(tpAniSirGlobal pMac,tpSirMsgQ pSchMsg) } -// get the local or broadcast parameters based on the profile sepcified in the config -// params are delivered in this order: BK, BE, VI, VO +/* Get the local or broadcast parameters based on the profile specified in the + config params are delivered in this order: BK, BE, VI, VO */ tSirRetStatus schGetParams( tpAniSirGlobal pMac, @@ -377,7 +377,11 @@ static void broadcastWMMOfConcurrentSTASession(tpAniSirGlobal pMac, tpPESession psessionEntry->gLimEdcaParamsBC[j].txoplimit);) } - /* Once atleast one concurrent session on same channel is found and WMM broadcast params for current SoftAP/GO session updated, return*/ + /* + * Once at-least one concurrent session on same channel is found + * and WMM broadcast params for current SoftAP/GO session updated, + * return + */ break; } } diff --git a/CORE/SME/inc/pmc.h b/CORE/SME/inc/pmc.h index ff618b4c33f9..be84e5e8860d 100644 --- a/CORE/SME/inc/pmc.h +++ b/CORE/SME/inc/pmc.h @@ -205,8 +205,11 @@ typedef struct sPmcInfo void *wakeReasonIndCBContext; /* value to be passed as parameter to routine specified above */ #endif // WLAN_WAKEUP_EVENTS -/* If TRUE driver will go to BMPS only if host operatiing system asks to enter BMPS. -* For android wlan_hdd_cfg80211_set_power_mgmt API will be used to set host powersave*/ +/* + * If TRUE driver will go to BMPS only if host operating system + * asks to enter BMPS. For android wlan_hdd_cfg80211_set_power_mgmt API will + * be used to set host power save + */ v_BOOL_t isHostPsEn; v_BOOL_t ImpsReqFailed; v_BOOL_t ImpsReqTimerFailed; @@ -346,7 +349,7 @@ typedef struct sPsOffloadPerSessionInfo tDblLinkList uapsdCbList; /* - * Whether TDLS session allows powersave or not + * Whether TDLS session allows power save or not */ #ifdef FEATURE_WLAN_TDLS v_BOOL_t isTdlsPowerSaveProhibited; diff --git a/CORE/SME/inc/pmcApi.h b/CORE/SME/inc/pmcApi.h index 46ee179ceb1e..8eeced65f77d 100644 --- a/CORE/SME/inc/pmcApi.h +++ b/CORE/SME/inc/pmcApi.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2011-2012 The Linux Foundation. All rights reserved. + * Copyright (c) 2011-2012, 2014 The Linux Foundation. All rights reserved. * * Previously licensed under the ISC license by Qualcomm Atheros, Inc. * @@ -48,8 +48,11 @@ #define __PMC_API_H__ -//This timer value determines the default periodicity at which BMPS retries will happen -//This default value is overwritten typicaly by OS specific registry/INI values. +/* + * This timer value determines the default periodicity at which BMPS retries + * will happen; this default value is overwritten typically by OS specific + * registry/INI values. + */ #define BMPS_TRAFFIC_TIMER_DEFAULT 5000 //unit = ms #define DHCP_REMAIN_POWER_ACTIVE_THRESHOLD 12 // (12 * 5) sec = 60 seconds = 1 min @@ -203,7 +206,7 @@ typedef enum ePmcBeaconsToForward -/* The Spatial Mulitplexing Power Save modes. */ +/* The Spatial Multiplexing Power Save modes. */ typedef enum ePmcSmpsMode @@ -281,7 +284,7 @@ typedef struct sPmcBmpsConfigParams -/* Configuration parameters for Spatial Mulitplexing Power Save (SMPS). */ +/* Configuration parameters for Spatial Multiplexing Power Save (SMPS). */ typedef struct sPmcSmpsConfigParams @@ -430,7 +433,7 @@ extern eHalStatus pmcSetHostOffload (tHalHandle hHal, tpSirHostOffloadReq pReque \param hHal - The handle returned by macOpen. \param pRequest - Pointer to the Keep Alive. \return eHalStatus - eHAL_STATUS_FAILURE Cannot set the keepalive. + eHAL_STATUS_FAILURE Cannot set the keep alive. eHAL_STATUS_SUCCESS Request accepted. ---------------------------------------------------------------------------*/ extern eHalStatus pmcSetKeepAlive (tHalHandle hHal, tpSirKeepAliveReq pRequest, tANI_U8 sessionId); @@ -529,7 +532,7 @@ extern eHalStatus pmcTriggerBatchScanResultInd /* ----------------------------------------------------------------------------- \fn pmcStopBatchScanInd - \brief Stoping batch scan request in FW + \brief Stop batch scan request in FW \param hHal - The handle returned by macOpen. \param pInd - Pointer to stop batch scan indication \return eHalStatus @@ -556,7 +559,7 @@ typedef enum eUapsdStatus PMC_UAPSD_ENABLE_PENDING }tUapsdStatus; -/* Powersave Check Routine */ +/* Power save Check Routine */ typedef tANI_BOOLEAN (*PwrSaveCheckRoutine)(void *checkContext, tANI_U32 sessionId); diff --git a/CORE/SME/inc/smeInside.h b/CORE/SME/inc/smeInside.h index dcd8f044dd52..101849f3135a 100644 --- a/CORE/SME/inc/smeInside.h +++ b/CORE/SME/inc/smeInside.h @@ -33,7 +33,7 @@ \file smeInside.h - \brief prototype for SME structures and APIs used insside SME + \brief prototype for SME structures and APIs used inside SME ========================================================================*/ @@ -74,7 +74,10 @@ typedef struct sGenericPmcCmd tANI_U32 size; //sizeof the data in the union, if any tANI_U32 sessionId; tRequestFullPowerReason fullPowerReason; - tANI_BOOLEAN fReleaseWhenDone; //if TRUE, the command shall not put back to the queue, free te memory instead. + + /* If TRUE, the command shall not put back to the queue, + free the memory instead */ + tANI_BOOLEAN fReleaseWhenDone; union { tExitBmpsInfo exitBmpsInfo; diff --git a/CORE/SME/inc/smeInternal.h b/CORE/SME/inc/smeInternal.h index 61d325d078e5..3eae0e11e84f 100644 --- a/CORE/SME/inc/smeInternal.h +++ b/CORE/SME/inc/smeInternal.h @@ -165,7 +165,7 @@ typedef struct tagSmeStruct /* Maximum interfaces allowed by the host */ tANI_U8 max_intf_count; void (* StatsExtCallback) (void *, tStatsExtEvent *); - /* linkspeed callback */ + /* link speed callback */ void (*pLinkSpeedIndCb) (tSirLinkSpeedInfo *indParam, void *pDevContext); void *pLinkSpeedCbContext; #ifdef FEATURE_WLAN_EXTSCAN diff --git a/CORE/SME/inc/sme_Api.h b/CORE/SME/inc/sme_Api.h index b2cc092ca2f6..0514fc63f366 100644 --- a/CORE/SME/inc/sme_Api.h +++ b/CORE/SME/inc/sme_Api.h @@ -182,12 +182,12 @@ typedef struct { } tSmeThermalParams; /*------------------------------------------------------------------------- - Function declarations and documenation + Function declarations and documentation ------------------------------------------------------------------------*/ /*-------------------------------------------------------------------------- - \brief sme_Open() - Initialze all SME modules and put them at idle state + \brief sme_Open() - Initialize all SME modules and put them at idle state The function initializes each module inside SME, PMC, CCM, CSR, etc. . Upon successfully return, all modules are at idle state ready to start. @@ -207,7 +207,7 @@ eHalStatus sme_Open(tHalHandle hHal); /*-------------------------------------------------------------------------- - \breif sme_init_chan_list() - Initialize sme channel info + \brief sme_init_chan_list() - Initialize sme channel info This function initializes sme channel information which can be known only after getting the regulatory information which, for discrete, @@ -348,7 +348,7 @@ eHalStatus sme_CloseSession(tHalHandle hHal, tANI_U8 sessionId, /*-------------------------------------------------------------------------- - \brief sme_UpdateConfig() - Change configurations for all SME moduels + \brief sme_UpdateConfig() - Change configurations for all SME modules The function updates some configuration for modules in SME, CCM, CSR, etc during SMEs close -> open sequence. @@ -376,7 +376,7 @@ eHalStatus sme_UpdateConfig(tHalHandle hHal, tpSmeConfigParams pSmeConfigParams) It is used at driver start up to inform RIVA of the default channel configuration. - This is a synchronuous call + This is a synchronous call \param hHal - The handle returned by macOpen. @@ -397,7 +397,7 @@ eHalStatus sme_UpdateChannelConfig(tHalHandle hHal); It is used to initiate PLM request - This is a synchronuous call + This is a synchronous call \param hHal - The handle returned by macOpen. @@ -416,7 +416,7 @@ eHalStatus sme_SetPlmRequest(tHalHandle hHal, tpSirPlmReq pPlm); and there power using information from nvRAM This function is called only for AP. - This is a synchronuous call + This is a synchronous call \param hHal - The handle returned by macOpen. \Param pSmeConfigParams - a pointer to a caller allocated object of @@ -434,7 +434,7 @@ eHalStatus sme_set11dinfo(tHalHandle hHal, tpSmeConfigParams pSmeConfigParams); \brief sme_getSoftApDomain() - Get the current regulatory domain of softAp. - This is a synchronuous call + This is a synchronous call \param hHal - The handle returned by HostapdAdapter. \Param v_REGDOMAIN_t - The current Regulatory Domain requested for SoftAp. @@ -460,7 +460,7 @@ eHalStatus sme_setRegInfo(tHalHandle hHal, tANI_U8 *apCntryCode); API provides info regarding 11d only at reset but we can extend this for other params (PMC, QoS) which needs to be initialized again at reset. - This is a synchronuous call + This is a synchronous call \param hHal - The handle returned by macOpen. @@ -561,7 +561,7 @@ eHalStatus sme_ScanFlushResult(tHalHandle hHal, tANI_U8 sessionId); * --------------------------------------------------------------------------- * \fn sme_FilterScanResults * \brief a wrapper function to request CSR to filter the scan results based - * on valid chennel list. + * on valid channel list. * \param hHal - The handle returned by macOpen. * \param sessionId - the sessionId returned by sme_OpenSession. * \return eHalStatus @@ -598,7 +598,7 @@ tCsrScanResultInfo *sme_ScanResultGetNext(tHalHandle, in the list and free memory for each item \param hScanResult - returned from csrScanGetResult. hScanResult is considered gone by - calling this function and even before this function reutrns. + calling this function and even before this function returns. \return eHalStatus ---------------------------------------------------------------------------*/ eHalStatus sme_ScanResultPurge(tHalHandle hHal, tScanResultHandle hScanResult); @@ -609,7 +609,7 @@ eHalStatus sme_ScanResultPurge(tHalHandle hHal, tScanResultHandle hScanResult); \param pPmkidList - caller allocated buffer point to an array of tPmkidCandidateInfo \param pNumItems - pointer to a variable that has the number of - tPmkidCandidateInfo allocated when retruning, this is + tPmkidCandidateInfo allocated when returning, this is either the number needed or number of items put into pPmkidList \return eHalStatus - when fail, it usually means the buffer allocated is not @@ -649,7 +649,7 @@ eHalStatus sme_RoamRegisterLinkQualityIndCallback(tHalHandle hHal, tANI_U8 sessi /* --------------------------------------------------------------------------- \fn sme_RoamConnect - \brief a wrapper function to request CSR to inititiate an association + \brief a wrapper function to request CSR to initiate an association \param sessionId - the sessionId returned by sme_OpenSession. \param pProfile - can be NULL to join to any open ones \param pRoamId - to get back the request ID @@ -660,7 +660,7 @@ eHalStatus sme_RoamConnect(tHalHandle hHal, tANI_U8 sessionId, tCsrRoamProfile * /* --------------------------------------------------------------------------- \fn sme_RoamReassoc - \brief a wrapper function to request CSR to inititiate a re-association + \brief a wrapper function to request CSR to initiate a re-association \param pProfile - can be NULL to join the currently connected AP. In that case modProfileFields should carry the modified field(s) which could trigger reassoc @@ -686,7 +686,7 @@ eHalStatus sme_RoamConnectToLastProfile(tHalHandle hHal, tANI_U8 sessionId); \fn sme_RoamDisconnect \brief a wrapper function to request CSR to disconnect from a network \param reason -- To indicate the reason for disconnecting. Currently, only - eCSR_DISCONNECT_REASON_MIC_ERROR is meanful. + eCSR_DISCONNECT_REASON_MIC_ERROR is meaningful. \return eHalStatus ---------------------------------------------------------------------------*/ eHalStatus sme_RoamDisconnect(tHalHandle hHal, tANI_U8 sessionId, eCsrRoamDisconnectReason reason); @@ -704,11 +704,13 @@ eHalStatus sme_RoamStopBss(tHalHandle hHal, tANI_U8 sessionId); \brief To probe the list of associated stations from various modules of CORE stack. \This is an asynchronous API. \param sessionId - sessionId of SoftAP - \param modId - Module from whom list of associtated stations is to be probed. + \param modId - Module from whom list of associated stations is to be + probed. If an invalid module is passed then by default VOS_MODULE_ID_PE will be probed \param pUsrContext - Opaque HDD context \param pfnSapEventCallback - Sap event callback in HDD - \param pAssocBuf - Caller allocated memory to be filled with associatd stations info + \param pAssocBuf - Caller allocated memory to be filled with associated + stations info \return eHalStatus -------------------------------------------------------------------------------*/ eHalStatus sme_RoamGetAssociatedStas(tHalHandle hHal, tANI_U8 sessionId, @@ -793,8 +795,8 @@ eHalStatus sme_RoamFreeConnectProfile(tHalHandle hHal, \param pPMKIDCache - caller allocated buffer point to an array of tPmkidCacheInfo \param numItems - a variable that has the number of tPmkidCacheInfo - allocated when retruning, this is either the number - needed or number of items put into pPMKIDCache + allocated when returning, this is either the number needed + or number of items put into pPMKIDCache \param update_entire_cache - if TRUE, then it overwrites the entire cache with pPMKIDCache, else it updates entry by entry without deleting the old entries. @@ -829,7 +831,7 @@ eHalStatus sme_RoamSetPSK_PMK (tHalHandle hHal, tANI_U8 sessionId, \fn sme_RoamGetSecurityReqIE \brief a wrapper function to request CSR to return the WPA or RSN or WAPI IE CSR passes to PE to JOIN request or START_BSS request - This is a synchronuous call. + This is a synchronous call. \param sessionId - returned by sme_OpenSession. \param pLen - caller allocated memory that has the length of pBuf as input. Upon returned, *pLen has the needed or IE length in pBuf. @@ -924,7 +926,7 @@ eHalStatus sme_GetStatistics(tHalHandle hHal, eCsrStatsRequesterType requesterId /* --------------------------------------------------------------------------- \fn smeGetTLSTAState - \helper function to get teh TL STA State whenever the function is called. + \helper function to get the TL STA State whenever the function is called. \param staId - The staID to be passed to the TL to get the relevant TL STA State @@ -1084,7 +1086,7 @@ eHalStatus sme_SetConfigPowerSave(tHalHandle hHal, tPmcPowerSavingMode psMode, /*-------------------------------------------------------------------------- \fn sme_GetConfigPowerSave - \brief Wrapper fn to retireve power save configuration in SME (PMC) module + \brief Wrapper fn to retrieve power save configuration in SME (PMC) module \param hHal - The handle returned by macOpen. \param psMode - Power Saving mode \param pConfigParams - a pointer to a caller allocated object of type @@ -1180,7 +1182,7 @@ extern tANI_BOOLEAN sme_IsPowerSaveEnabled ( /* --------------------------------------------------------------------------- \fn sme_RequestFullPower \brief Request that the device be brought to full power state. - Note 1: If "fullPowerReason" specificied in this API is set to + Note 1: If "fullPowerReason" specified in this API is set to eSME_FULL_PWR_NEEDED_BY_HDD, PMC will clear any "buffered wowl" requests and also clear any "buffered BMPS requests by HDD". Assumption is that since HDD is requesting full power, we need to undo any previous HDD requests for @@ -1277,7 +1279,7 @@ extern eHalStatus sme_StopUapsd (tHalHandle hHal); /* --------------------------------------------------------------------------- \fn sme_RequestStandby \brief Request that the device be put in standby. It is HDD's responsibility - to bring the chip to full power and do a discconnect before calling + to bring the chip to full power and do a disconnect before calling this API. Request for standby will be rejected if STA is associated to an AP. \param hHal - The handle returned by macOpen. @@ -1402,8 +1404,9 @@ extern eHalStatus sme_WowlDelBcastPattern ( Note 1: After WoWL request is accepted, If module other than HDD requests full power BEFORE WoWL request is completed, PMC will buffer the WoWL request and attempt to put the chip into BMPS+WOWL based on a timer. - Note 2: Buffered request for WoWL will be cleared immedisately AFTER "enter Wowl" - completes or if HDD requests full power or if sme_ExitWoWL API is invoked. + Note 2: Buffered request for WoWL will be cleared immediately AFTER + "enter Wowl" completes or if HDD requests full power or + if sme_ExitWoWL API is invoked. Note 3: Both UAPSD and WOWL work on top of BMPS. On entry into BMPS, SME will give priority to UAPSD and enable only UAPSD if both UAPSD and WOWL are required. Currently there is no requirement or use case to support UAPSD @@ -1606,10 +1609,12 @@ eHalStatus sme_GetRegulatoryDomainForCountry(tHalHandle hHal, tANI_U8 *pCountry, \param pDomains - pointer to a caller allocated buffer for returned regulatory domains. - \param pNumDomains For input, this parameter indicates howm many domains pDomains can hold. - Upon return, this parameter has the number for supported domains. If pDomains - doesn't have enough space for all the supported domains, this function returns - fail status and this parameter contains the number that is needed. + \param pNumDomains For input, this parameter indicates how many domains + pDomains can hold. Upon return, this parameter has the + number for supported domains. If pDomains doesn't have + enough space for all the supported domains, this + function returns fail status and this parameter + contains the number that is needed. \return eHalStatus SUCCESS. @@ -1630,7 +1635,7 @@ typedef void ( *tSmeChangeCountryCallback)(void *pContext); \fn sme_ChangeCountryCode - \brief Change Country code from upperlayer during WLAN driver operation. + \brief Change Country code from upper layer during WLAN driver operation. This is a synchronous API. \param hHal - The handle returned by macOpen. @@ -1820,7 +1825,7 @@ VOS_STATUS sme_GetWcnssHardwareVersion(tHalHandle hHal, \param pBkidList - caller allocated buffer point to an array of tBkidCandidateInfo \param pNumItems - pointer to a variable that has the number of - tBkidCandidateInfo allocated when retruning, this is + tBkidCandidateInfo allocated when returning, this is either the number needed or number of items put into pPmkidList \return eHalStatus - when fail, it usually means the buffer allocated is not @@ -1960,7 +1965,7 @@ eHalStatus sme_GetOperationChannel(tHalHandle hHal, tANI_U32 *pChannel, tANI_U8 \fn sme_RegisterMgtFrame - \brief To register managment frame of specified type and subtype. + \brief To register management frame of specified type and subtype. \param frameType - type of the frame that needs to be passed to HDD. \param matchData - data which needs to be matched before passing frame to HDD. @@ -1974,7 +1979,7 @@ eHalStatus sme_RegisterMgmtFrame(tHalHandle hHal, tANI_U8 sessionId, \fn sme_DeregisterMgtFrame - \brief To De-register managment frame of specified type and subtype. + \brief To De-register management frame of specified type and subtype. \param frameType - type of the frame that needs to be passed to HDD. \param matchData - data which needs to be matched before passing frame to HDD. @@ -2505,8 +2510,8 @@ void sme_featureCapsExchange(tHalHandle hHal); /*--------------------------------------------------------------------------- - \brief sme_disableActiveModeOffload() - SME interface to disable Active mode Offload capabilitu - between in Host. + \brief sme_disableActiveModeOffload() - SME interface to disable Active + mode Offload capability between Host and FW. \param hHal - HAL handle for device @@ -2545,7 +2550,7 @@ eHalStatus sme_GetCurrentCountryCode(tHalHandle hHal, tANI_U8 *pCountry); /* --------------------------------------------------------------------------- \fn sme_transportDebug \brief Dynamically monitoring Transport channels - Private IOCTL will querry transport channel status if driver loaded + Private IOCTL will query transport channel status if driver loaded \param hHal Upper MAC context \param displaySnapshot Display transport channel snapshot option \param toggleStallDetect Enable stall detect feature @@ -2674,7 +2679,7 @@ eHalStatus sme_UpdateRoamRssiDiff(tHalHandle hHal, tANI_U8 sessionId, \brief sme_UpdateFastTransitionEnabled() - enable/disable Fast Transition support at runtime It is used at in the REG_DYNAMIC_VARIABLE macro definition of isFastTransitionEnabled. - This is a synchronuous call + This is a synchronous call \param hHal - The handle returned by macOpen. \return eHAL_STATUS_SUCCESS - SME update isFastTransitionEnabled config successfully. Other status means SME is failed to update isFastTransitionEnabled. @@ -2790,7 +2795,7 @@ eHalStatus sme_UpdateEnableFastRoamInConcurrency(tHalHandle hHal, \brief sme_UpdateIsEseFeatureEnabled() - enable/disable ESE support at runtime It is used at in the REG_DYNAMIC_VARIABLE macro definition of isEseIniFeatureEnabled. - This is a synchronuous call + This is a synchronous call \param hHal - The handle returned by macOpen. \return eHAL_STATUS_SUCCESS - SME update isEseIniFeatureEnabled config successfully. Other status means SME is failed to update isEseIniFeatureEnabled. @@ -2802,10 +2807,11 @@ eHalStatus sme_UpdateIsEseFeatureEnabled(tHalHandle hHal, tANI_U8 sessionId, #endif /* FEATURE_WLAN_ESE */ /*-------------------------------------------------------------------------- - \brief sme_UpdateConfigFwRssiMonitoring() - enable/disable firmware RSSI Monitornig at runtime + \brief sme_UpdateConfigFwRssiMonitoring() - enable/disable firmware + RSSI Monitoring at runtime It is used at in the REG_DYNAMIC_VARIABLE macro definition of fEnableFwRssiMonitoring. - This is a synchronuous call + This is a synchronous call \param hHal - The handle returned by macOpen. \return eHAL_STATUS_SUCCESS - SME update fEnableFwRssiMonitoring config successfully. Other status means SME is failed to update @@ -2873,7 +2879,7 @@ v_U8_t sme_GetRoamOpportunisticScanThresholdDiff(tHalHandle hHal); /*-------------------------------------------------------------------------- \brief sme_setNeighborLookupRssiThreshold() - update neighbor lookup rssi threshold - This is a synchronuous call + This is a synchronous call \param hHal - The handle returned by macOpen. \param sessionId - Session identifier \return eHAL_STATUS_SUCCESS - SME update config successful. @@ -2909,7 +2915,7 @@ v_U8_t sme_getNeighborLookupRssiThreshold(tHalHandle hHal); /*-------------------------------------------------------------------------- \brief sme_setNeighborScanRefreshPeriod() - set neighbor scan results refresh period - This is a synchronuous call + This is a synchronous call \param hHal - The handle returned by macOpen. \param sessionId - Session identifier \return eHAL_STATUS_SUCCESS - SME update config successful. @@ -2922,7 +2928,7 @@ eHalStatus sme_setNeighborScanRefreshPeriod(tHalHandle hHal, /*-------------------------------------------------------------------------- \brief sme_getNeighborScanRefreshPeriod() - get neighbor scan results refresh period - This is a synchronuous call + This is a synchronous call \param hHal - The handle returned by macOpen. \return eHAL_STATUS_SUCCESS - SME update config successful. Other status means SME is failed to update @@ -2932,7 +2938,7 @@ v_U16_t sme_getNeighborScanRefreshPeriod(tHalHandle hHal); /*-------------------------------------------------------------------------- \brief sme_getEmptyScanRefreshPeriod() - get empty scan refresh period - This is a synchronuous call + This is a synchronous call \param hHal - The handle returned by macOpen. \return eHAL_STATUS_SUCCESS - SME update config successful. Other status means SME is failed to update @@ -3268,7 +3274,7 @@ v_BOOL_t sme_GetRoamScanControl(tHalHandle hHal); /*-------------------------------------------------------------------------- \brief sme_getIsLfrFeatureEnabled() - get LFR feature enabled or not - This is a synchronuous call + This is a synchronous call \param hHal - The handle returned by macOpen. \return TRUE (1) - if the feature is enabled FALSE (0) - if feature is disabled (compile or runtime) @@ -3278,7 +3284,7 @@ tANI_BOOLEAN sme_getIsLfrFeatureEnabled(tHalHandle hHal); /*-------------------------------------------------------------------------- \brief sme_getIsFtFeatureEnabled() - get FT feature enabled or not - This is a synchronuous call + This is a synchronous call \param hHal - The handle returned by macOpen. \return TRUE (1) - if the feature is enabled FALSE (0) - if feature is disabled (compile or runtime) @@ -3290,7 +3296,8 @@ tANI_BOOLEAN sme_getIsFtFeatureEnabled(tHalHandle hHal); #ifdef WLAN_FEATURE_ROAM_SCAN_OFFLOAD /*-------------------------------------------------------------------------- - \brief sme_UpdateRoamScanOffloadEnabled() - enable/disable roam scan offload feaure + \brief sme_UpdateRoamScanOffloadEnabled() - enable/disable roam scan offload + feature It is used at in the REG_DYNAMIC_VARIABLE macro definition of gRoamScanOffloadEnabled. This is a synchronous call @@ -3320,7 +3327,7 @@ tANI_U8 sme_IsFeatureSupportedByFW(tANI_U8 featEnumValue); \fn sme_SendTdlsLinkEstablishParams \brief API to send TDLS Link Establishment Parameters. - \param peerMac - peer's Mac Adress. + \param peerMac - peer's Mac Address. \param tdlsLinkEstablishParams - TDLS Peer Link Establishment Parameters \- return VOS_STATUS_SUCCES -------------------------------------------------------------------------*/ @@ -3334,13 +3341,13 @@ VOS_STATUS sme_SendTdlsLinkEstablishParams(tHalHandle hHal, \fn sme_SendTdlsMgmtFrame \brief API to send TDLS management frames. - \param peerMac - peer's Mac Adress. + \param peerMac - peer's Mac Address. \param frame_type - Type of TDLS mgmt frame to be sent. \param dialog - dialog token used in the frame. - \param status - status to be incuded in the frame. - \param peerCapability - peerCapability to be incuded in the frame. + \param status - status to be included in the frame. + \param peerCapability - peerCapability to be included in the frame. \param buf - additional IEs to be included - \param len - lenght of additional Ies + \param len - length of additional Ies \param responder - Tdls request type \- return VOS_STATUS_SUCCES -------------------------------------------------------------------------*/ @@ -3350,7 +3357,7 @@ VOS_STATUS sme_SendTdlsMgmtFrame(tHalHandle hHal, tANI_U8 sessionId, tSirMacAddr \fn sme_ChangeTdlsPeerSta \brief API to Update TDLS peer sta parameters. - \param peerMac - peer's Mac Adress. + \param peerMac - peer's Mac Address. \param staParams - Peer Station Parameters. \- return VOS_STATUS_SUCCES -------------------------------------------------------------------------*/ @@ -3360,7 +3367,7 @@ VOS_STATUS sme_ChangeTdlsPeerSta(tHalHandle hHal, tANI_U8 sessionId, tSirMacAddr \fn sme_AddTdlsPeerSta \brief API to Add TDLS peer sta entry. - \param peerMac - peer's Mac Adress. + \param peerMac - peer's Mac Address. \- return VOS_STATUS_SUCCES -------------------------------------------------------------------------*/ VOS_STATUS sme_AddTdlsPeerSta(tHalHandle hHal, tANI_U8 sessionId, tSirMacAddr peerMac); @@ -3368,7 +3375,7 @@ VOS_STATUS sme_AddTdlsPeerSta(tHalHandle hHal, tANI_U8 sessionId, tSirMacAddr pe \fn sme_DeleteTdlsPeerSta \brief API to Delete TDLS peer sta entry. - \param peerMac - peer's Mac Adress. + \param peerMac - peer's Mac Address. \- return VOS_STATUS_SUCCES -------------------------------------------------------------------------*/ VOS_STATUS sme_DeleteTdlsPeerSta(tHalHandle hHal, tANI_U8 sessionId, tSirMacAddr peerMac); @@ -3583,8 +3590,8 @@ sme_StopBatchScanInd #endif /* - * SME API to enable/disable idle mode powersave - * This should be called only if powersave offload + * SME API to enable/disable idle mode power save + * This should be called only if power save offload * is enabled */ VOS_STATUS sme_SetIdlePowersaveConfig(v_PVOID_t vosContext, tANI_U32 value); @@ -3717,11 +3724,11 @@ eHalStatus sme_SetThermalLevel( tHalHandle hHal, tANI_U8 level ); eHalStatus sme_TxpowerLimit( tHalHandle hHal, tSirTxPowerLimit *psmetx); /* --------------------------------------------------------------------------- \fn sme_GetLinkSpeed - \brief SME API to get the linkspeed for peermac + \brief SME API to get the link speed for peermac \param hHal - \param lsReq: peermac address to retrieve linkspeed + \param lsReq: peermac address to retrieve link speed \param plsContext: callback context - \param pCallbackfn: callback fn with response (linkspeed) + \param pCallbackfn: callback fn with response (link speed) \- return eHalStatus -------------------------------------------------------------------------*/ eHalStatus sme_GetLinkSpeed(tHalHandle hHal,tSirLinkSpeedInfo *lsReq,void *plsContext, diff --git a/CORE/SME/inc/sme_QosApi.h b/CORE/SME/inc/sme_QosApi.h index 4c138481983b..1497b57a20bc 100644 --- a/CORE/SME/inc/sme_QosApi.h +++ b/CORE/SME/inc/sme_QosApi.h @@ -132,9 +132,9 @@ typedef enum SME_QOS_STATUS_MODIFY_SETUP_SUCCESS_IND_APSD_SET_FAILED, //sync: STA is handing off to a new AP SME_QOS_STATUS_HANDING_OFF = 300, - //async:powersave mode changed by PMC from UAPSD to Full power + /* async:power save mode changed by PMC from UAPSD to Full power */ SME_QOS_STATUS_OUT_OF_APSD_POWER_MODE_IND = 400, - //async:powersave mode changed by PMC from Full power to UAPSD + /* async:power save mode changed by PMC from Full power to UAPSD */ SME_QOS_STATUS_INTO_APSD_POWER_MODE_IND, }sme_QosStatusType; @@ -240,7 +240,7 @@ typedef struct \param hHal - The handle returned by macOpen. \param HDDcontext - A cookie passed by HDD during QoS setup, to be used by SME - during any QoS notification (through the callabck) to HDD + during any QoS notification (through the callback) to HDD \param pCurrentQoSInfo - Pointer to sme_QosWmmTspecInfo which contains the WMM TSPEC related info as defined above, fed back to HDD \param status - The status of the flow running on an AC. It could be of @@ -276,7 +276,7 @@ typedef eHalStatus (*sme_QosCallback)(tHalHandle hHal, void * HDDcontext, flow (i.e. setup success/failure/release) which needs to be sent to HDD \param HDDcontext - A cookie passed by HDD to be used by SME during any QoS - notification (through the callabck) to HDD + notification (through the callback) to HDD \param UPType - Useful only if HDD or any other upper layer module (BAP etc.) looking for implicit QoS setup, in that case, the pQoSInfo will be NULL & SME will know about the AC @@ -301,7 +301,7 @@ sme_QosStatusType sme_QosSetupReq(tHalHandle hHal, tANI_U32 sessionId, \brief sme_QosModifyReq() - The SME QoS API exposed to HDD to request for modification of certain QoS params on a flow running on a particular AC. This function should be called after a link has been established, i.e. STA is - associated with an AP etc. & a QoS setup has been succesful for that flow. + associated with an AP etc. & a QoS setup has been successful for that flow. If the request involves admission control on the requested AC, HDD needs to provide the necessary Traffic Specification (TSPEC) parameters & SME might start the renegotiation process through ADDTS. @@ -328,7 +328,7 @@ sme_QosStatusType sme_QosModifyReq(tHalHandle hHal, /*-------------------------------------------------------------------------- \brief sme_QosReleaseReq() - The SME QoS API exposed to HDD to request for releasing a QoS flow running on a particular AC. This function should be - called only if a QoS is set up with a valid FlowID. HDD sould invoke this + called only if a QoS is set up with a valid FlowID. HDD should invoke this API only if an explicit request for QoS release has come from Application \param hHal - The handle returned by macOpen. @@ -346,7 +346,8 @@ sme_QosStatusType sme_QosReleaseReq(tHalHandle hHal, v_U32_t QosFlowID); /*-------------------------------------------------------------------------- \brief sme_QosIsTSInfoAckPolicyValid() - The SME QoS API exposed to HDD to - check if TS info ack policy field can be set to "HT-immediate block acknowledgement" + check if TS info ack policy field can be set to "HT-immediate block + acknowledgment" \param pMac - The handle returned by macOpen. \param pQoSInfo - Pointer to sme_QosWmmTspecInfo which contains the WMM TSPEC @@ -354,7 +355,7 @@ sme_QosStatusType sme_QosReleaseReq(tHalHandle hHal, v_U32_t QosFlowID); \param sessionId - sessionId returned by sme_OpenSession. \return VOS_TRUE - Current Association is HT association and so TS info ack policy - can be set to "HT-immediate block acknowledgement" + can be set to "HT-immediate block acknowledgment" \sa diff --git a/CORE/SME/inc/wlan_ps_wow_diag.h b/CORE/SME/inc/wlan_ps_wow_diag.h index cd1c64b6848b..71ec44cdd1d2 100644 --- a/CORE/SME/inc/wlan_ps_wow_diag.h +++ b/CORE/SME/inc/wlan_ps_wow_diag.h @@ -62,7 +62,10 @@ typedef enum WLAN_BMPS_STATUS_IND_RCVD, /* PE received a SIR_HAL_BMPS_STATUS_IND */ WLAN_BMPS_MODE_DISABLED, /* BMPS mode was disabled by HDD in SME */ WLAN_LINK_DISCONNECTED_BY_HDD, /* Link has been disconnected requested by HDD */ - WLAN_LINK_DISCONNECTED_BY_OTHER,/* Disconnect due to linklost or requested by peer */ + + /* Disconnect due to link lost or requested by peer */ + WLAN_LINK_DISCONNECTED_BY_OTHER, + WLAN_FULL_PWR_NEEDED_BY_HDD, /* HDD request full power for some reason */ WLAN_FULL_PWR_NEEDED_BY_BAP, /* BAP request full power for BT_AMP */ WLAN_FULL_PWR_NEEDED_BY_CSR, /* CSR requests full power */ diff --git a/CORE/SME/src/QoS/sme_Qos.c b/CORE/SME/src/QoS/sme_Qos.c index 4cefb9cd061d..6c3c52fdd214 100644 --- a/CORE/SME/src/QoS/sme_Qos.c +++ b/CORE/SME/src/QoS/sme_Qos.c @@ -83,7 +83,7 @@ #define SME_QOS_TSPEC_MASK_BIT_1_2_SET 3 #define SME_QOS_TSPEC_MASK_CLEAR 0 -//which key to search on, in the flowlist (1 = flowID, 2 = AC, 4 = reason) +/* Which key to search on, in the flow list (1 = flowID, 2 = AC, 4 = reason) */ #define SME_QOS_SEARCH_KEY_INDEX_1 1 #define SME_QOS_SEARCH_KEY_INDEX_2 2 #define SME_QOS_SEARCH_KEY_INDEX_3 4 @@ -195,10 +195,13 @@ typedef struct sme_QosFlowInfoEntry_s sme_QosWmmTspecInfo QoSInfo; void * HDDcontext; sme_QosCallback QoSCallback; - v_BOOL_t hoRenewal;//set to TRUE while re-negotiating flows after - //handoff, will set to FALSE once done with - //the process. Helps SME to decide if at all - //to notify HDD/LIS for flow renewal after HO + + /* + * Set to TRUE while re-negotiating flows after + * handoff, will set to FALSE once done with the process. Helps SME to + * decide if at all to notify HDD/LIS for flow renewal after HO + */ + v_BOOL_t hoRenewal; } sme_QosFlowInfoEntry; /*--------------------------------------------------------------------------- DESCRIPTION @@ -211,10 +214,13 @@ typedef struct sme_QosSetupCmdInfo_s void *HDDcontext; sme_QosCallback QoSCallback; sme_QosWmmUpType UPType; - v_BOOL_t hoRenewal;//set to TRUE while re-negotiating flows after - //handoff, will set to FALSE once done with - //the process. Helps SME to decide if at all - //to notify HDD/LIS for flow renewal after HO + + /* + * Set to TRUE while re-negotiating flows after + * handoff, will set to FALSE once done with the process. Helps SME to + * decide if at all to notify HDD/LIS for flow renewal after HO + */ + v_BOOL_t hoRenewal; } sme_QosSetupCmdInfo; /*--------------------------------------------------------------------------- DESCRIPTION @@ -288,10 +294,13 @@ typedef struct sme_QosACInfo_s //different direction. We will refer each TSPEC with an index v_U8_t tspec_mask_status; //status showing if both the indices are in use v_U8_t tspec_pending;//tspec negotiation going on for which index - v_BOOL_t hoRenewal;//set to TRUE while re-negotiating flows after - //handoff, will set to FALSE once done with - //the process. Helps SME to decide if at all - //to notify HDD/LIS for flow renewal after HO + + /* + * Set to TRUE while re-negotiating flows after + * handoff, will set to FALSE once done with the process. Helps SME to + * decide if at all to notify HDD/LIS for flow renewal after HO + */ + v_BOOL_t hoRenewal; #ifdef WLAN_FEATURE_VOWIFI_11R v_U8_t ricIdentifier[SME_QOS_TSPEC_INDEX_MAX]; /* stores the ADD TS response for each AC. The ADD TS response is formed by @@ -321,9 +330,13 @@ typedef struct sme_QosSessionInfo_s sme_QosAssocInfo assocInfo; // ID assigned to our reassoc request v_U32_t roamID; - // maintaining a powersave status in QoS module, to be fed back to PMC at - // times through the sme_QosPmcCheckRoutine + + /* + * Maintaining a power save status in QoS module, to be fed back to PMC at + * times through the sme_QosPmcCheckRoutine + */ v_BOOL_t readyForPowerSave; + // are we in the process of handing off to a different AP v_BOOL_t handoffRequested; // following reassoc or AddTS has UAPSD already been requested from PMC @@ -598,12 +611,12 @@ eHalStatus sme_QosOpen(tpAniSirGlobal pMac) if(!pMac->psOffloadEnabled) { - //the routine registered here gets called by PMC - //whenever the device is about - //to enter one of the power save modes. - //PMC runs a poll with all the - //registered modules if device can enter - //powersave mode or remain full power + /* + * The routine registered here gets called by PMC whenever the device + * is about to enter one of the power save modes. PMC runs a poll with all + * the registered modules if device can enter power save mode or + * remain full power. + */ if(!HAL_STATUS_SUCCESS( pmcRegisterPowerSaveCheck(pMac, sme_QosPmcCheckRoutine, pMac))) { @@ -753,7 +766,7 @@ eHalStatus sme_QosClose(tpAniSirGlobal pMac) flow (i.e. setup success/failure/release) which needs to be sent to HDD \param HDDcontext - A cookie passed by HDD to be used by SME during any QoS - notification (through the callabck) to HDD + notification (through the callback) to HDD \param UPType - Useful only if HDD or any other upper layer module (BAP etc.) looking for implicit QoS setup, in that case, the pQoSInfo will be NULL & SME will know about the AC @@ -839,7 +852,7 @@ sme_QosStatusType sme_QosSetupReq(tHalHandle hHal, tANI_U32 sessionId, \brief sme_QosModifyReq() - The SME QoS API exposed to HDD to request for modification of certain QoS params on a flow running on a particular AC. This function should be called after a link has been established, i.e. STA is - associated with an AP etc. & a QoS setup has been succesful for that flow. + associated with an AP etc. & a QoS setup has been successful for that flow. If the request involves admission control on the requested AC, HDD needs to provide the necessary Traffic Specification (TSPEC) parameters & SME might start the renegotiation process through ADDTS. @@ -889,7 +902,7 @@ sme_QosStatusType sme_QosModifyReq(tHalHandle hHal, /*-------------------------------------------------------------------------- \brief sme_QosReleaseReq() - The SME QoS API exposed to HDD to request for releasing a QoS flow running on a particular AC. This function should be - called only if a QoS is set up with a valid FlowID. HDD sould invoke this + called only if a QoS is set up with a valid FlowID. HDD should invoke this API only if an explicit request for QoS release has come from Application \param hHal - The handle returned by macOpen. @@ -1243,7 +1256,7 @@ v_U8_t sme_QosGetACMMask(tpAniSirGlobal pMac, tSirBssDescription *pSirBssDesc, t flow (i.e. setup success/failure/release) which needs to be sent to HDD \param HDDcontext - A cookie passed by HDD to be used by SME during any QoS - notification (through the callabck) to HDD + notification (through the callback) to HDD \param UPType - Useful only if HDD or any other upper layer module (BAP etc.) looking for implicit QoS setup, in that case, the pQoSInfo will be NULL & SME will know about the AC @@ -1332,15 +1345,18 @@ sme_QosStatusType sme_QosInternalSetupReq(tpAniSirGlobal pMac, Tspec_Info = *pQoSInfo; } pACInfo = &pSession->ac_info[ac]; - // need to vote off powersave for the duration of this request + /* Need to vote off power save for the duration of this request */ pSession->readyForPowerSave = VOS_FALSE; // assume we won't have to (re)buffer the command bufferCommand = VOS_FALSE; - //check to consider the following flowing scenario - //Addts request is pending on one AC, while APSD requested on another which - //needs a reassoc. Will buffer a request if Addts is pending on any AC, - //which will safegaurd the above scenario, & also won't confuse PE with back - //to back Addts or Addts followed by Reassoc + + /* + * Check to consider the following flowing scenario Addts request is pending + * on one AC, while APSD requested on another which needs a reassoc. + * Will buffer a request if Addts is pending on any AC, which will safeguard + * the above scenario, & also won't confuse PE with back to back Addts or + * Addts followed by Reassoc. + */ if(sme_QosIsRspPending(sessionId, ac)) { VOS_TRACE(VOS_MODULE_ID_SME, VOS_TRACE_LEVEL_INFO_MED, @@ -1395,8 +1411,8 @@ sme_QosStatusType sme_QosInternalSetupReq(tpAniSirGlobal pMac, "%s: %d: couldn't buffer the setup request in state = %d", __func__, __LINE__, pACInfo->curr_state ); - // unable to buffer the request - // nothing is pending so vote powersave back on + /* Unable to buffer the request + nothing is pending so vote power save back on */ pSession->readyForPowerSave = VOS_TRUE; return SME_QOS_STATUS_SETUP_FAILURE_RSP; } @@ -1421,8 +1437,8 @@ sme_QosStatusType sme_QosInternalSetupReq(tpAniSirGlobal pMac, sessionId, ac, status); if(SME_QOS_STATUS_SETUP_REQ_PENDING_RSP != status) { - // we aren't waiting for a response from the AP - // so vote powersave back on + /* We aren't waiting for a response from the AP + so vote power save back on */ pSession->readyForPowerSave = VOS_TRUE; } if((SME_QOS_STATUS_SETUP_REQ_PENDING_RSP == status)|| @@ -1545,8 +1561,8 @@ sme_QosStatusType sme_QosInternalSetupReq(tpAniSirGlobal pMac, "request for flow %d in state = %d", __func__, __LINE__, sessionId, QosFlowID, pACInfo->curr_state ); - // unable to buffer the request - // nothing is pending so vote powersave back on + /* Unable to buffer the request + nothing is pending so vote power save back on */ pSession->readyForPowerSave = VOS_TRUE; return SME_QOS_STATUS_SETUP_FAILURE_RSP; } @@ -1575,8 +1591,8 @@ sme_QosStatusType sme_QosInternalSetupReq(tpAniSirGlobal pMac, __func__, __LINE__, ac, pACInfo->curr_state); VOS_ASSERT(0); - // unable to service the request - // nothing is pending so vote powersave back on + /* Unable to buffer the request + nothing is pending so vote power save back on */ pSession->readyForPowerSave = VOS_TRUE; return status; } @@ -1584,9 +1600,12 @@ sme_QosStatusType sme_QosInternalSetupReq(tpAniSirGlobal pMac, if ( ((pACInfo->tspec_mask_status > 0) && (pACInfo->tspec_mask_status <= SME_QOS_TSPEC_INDEX_MAX)) ) { - /* Either of upstream, downstream or bidirectional flows are present */ - /* If either of new stream or current stream is for bidirecional, aggregate - * the new stream with the current streams present and send out aggregated Tspec.*/ + /* + * Either of upstream, downstream or bidirectional + * flows are present. If either of new stream or current stream is + * for bidirectional, aggregate the new stream with the current + * streams present and send out aggregated Tspec. + */ if((Tspec_Info.ts_info.direction == SME_QOS_WMM_TS_DIR_BOTH) || (pACInfo->curr_QoSInfo[pACInfo->tspec_mask_status - 1]. ts_info.direction == SME_QOS_WMM_TS_DIR_BOTH)) @@ -1690,8 +1709,8 @@ sme_QosStatusType sme_QosInternalSetupReq(tpAniSirGlobal pMac, VOS_TRACE(VOS_MODULE_ID_SME, VOS_TRACE_LEVEL_ERROR, "%s: %d: failed to aggregate params", __func__, __LINE__); - // unable to service the request - // nothing is pending so vote powersave back on + /* Unable to service the request + nothing is pending so vote power save back on */ pSession->readyForPowerSave = VOS_TRUE; return SME_QOS_STATUS_SETUP_FAILURE_RSP; } @@ -1713,8 +1732,8 @@ sme_QosStatusType sme_QosInternalSetupReq(tpAniSirGlobal pMac, __func__, __LINE__, ac, pACInfo->curr_state ); VOS_ASSERT(0); - // unable to service the request - // nothing is pending so vote powersave back on + /* Unable to service the request + nothing is pending so vote power save back on */ pSession->readyForPowerSave = VOS_TRUE; return status; } @@ -1732,8 +1751,8 @@ sme_QosStatusType sme_QosInternalSetupReq(tpAniSirGlobal pMac, sessionId, ac, status); if(SME_QOS_STATUS_SETUP_REQ_PENDING_RSP != status) { - // we aren't waiting for a response from the AP - // so vote powersave back on + /* We aren't waiting for a response from the AP + so vote power save back on */ pSession->readyForPowerSave = VOS_TRUE; } if((SME_QOS_STATUS_SETUP_REQ_PENDING_RSP == status)|| @@ -1836,17 +1855,19 @@ sme_QosStatusType sme_QosInternalSetupReq(tpAniSirGlobal pMac, "%s: %d: setup requested in unexpected state = %d", __func__, __LINE__, pACInfo->curr_state); - // unable to service the request - // nothing is pending so vote powersave back on + /* Unable to service the request + nothing is pending so vote power save back on */ pSession->readyForPowerSave = VOS_TRUE; VOS_ASSERT(0); new_state = pACInfo->curr_state; } - /* if current state is same as previous no need for transistion, - if we are doing reassoc & we are already in handoff state, no need to move - to requested state. But make sure to set the previous state as requested - state - */ + + /* + * if current state is same as previous no need for transition, + * if we are doing reassoc & we are already in handoff state, no need to + * move to requested state. But make sure to set the previous state as + * requested state + */ if((new_state != pACInfo->curr_state)&& (!(pACInfo->reassoc_pending && (SME_QOS_HANDOFF == pACInfo->curr_state)))) @@ -1955,15 +1976,17 @@ sme_QosStatusType sme_QosInternalModifyReq(tpAniSirGlobal pMac, return SME_QOS_STATUS_MODIFY_SETUP_INVALID_PARAMS_RSP; } - // need to vote off powersave for the duration of this request + /* Need to vote off power save for the duration of this request */ pSession->readyForPowerSave = VOS_FALSE; // assume we won't have to (re)buffer the command bufferCommand = VOS_FALSE; - //check to consider the following flowing scenario - //Addts request is pending on one AC, while APSD requested on another which - //needs a reassoc. Will buffer a request if Addts is pending on any AC, - //which will safegaurd the above scenario, & also won't confuse PE with back - //to back Addts or Addts followed by Reassoc + /* + * Check to consider the following flowing scenario Addts request is pending + * on one AC, while APSD requested on another which needs a reassoc. Will + * buffer a request if Addts is pending on any AC, which will safeguard the + * above scenario, & also won't confuse PE with back to back Addts or + * Addts followed by Reassoc. + */ if(sme_QosIsRspPending(sessionId, ac)) { VOS_TRACE(VOS_MODULE_ID_SME, VOS_TRACE_LEVEL_INFO_MED, @@ -2014,8 +2037,8 @@ sme_QosStatusType sme_QosInternalModifyReq(tpAniSirGlobal pMac, "%s: %d: couldn't buffer the modify request in state = %d", __func__, __LINE__, pACInfo->curr_state ); - // unable to buffer the request - // nothing is pending so vote powersave back on + /* Unable to buffer the request + nothing is pending so vote power save back on */ pSession->readyForPowerSave = VOS_TRUE; return SME_QOS_STATUS_MODIFY_SETUP_FAILURE_RSP; } @@ -2039,8 +2062,8 @@ sme_QosStatusType sme_QosInternalModifyReq(tpAniSirGlobal pMac, "%s: %d: couldn't allocate memory for the new " "entry in the Flow List", __func__, __LINE__); - // unable to service the request - // nothing is pending so vote powersave back on + /* Unable to service the request + nothing is pending so vote power save back on */ pSession->readyForPowerSave = VOS_TRUE; return SME_QOS_STATUS_MODIFY_SETUP_FAILURE_RSP; } @@ -2081,8 +2104,8 @@ sme_QosStatusType sme_QosInternalModifyReq(tpAniSirGlobal pMac, sessionId, ac, status); if(SME_QOS_STATUS_SETUP_REQ_PENDING_RSP != status) { - // we aren't waiting for a response from the AP - // so vote powersave back on + /* We aren't waiting for a response from the AP + so vote power save back on */ pSession->readyForPowerSave = VOS_TRUE; } if(SME_QOS_STATUS_SETUP_REQ_PENDING_RSP == status) @@ -2159,8 +2182,8 @@ sme_QosStatusType sme_QosInternalModifyReq(tpAniSirGlobal pMac, VOS_TRACE(VOS_MODULE_ID_SME, VOS_TRACE_LEVEL_ERROR, "%s: %d: sme_QosUpdateParams() failed", __func__, __LINE__); - // unable to service the request - // nothing is pending so vote powersave back on + /* Unable to service the request + nothing is pending so vote power save back on */ pSession->readyForPowerSave = VOS_TRUE; new_state = SME_QOS_LINK_UP; } @@ -2197,8 +2220,8 @@ sme_QosStatusType sme_QosInternalModifyReq(tpAniSirGlobal pMac, "%s: %d: couldn't buffer the modify request in state = %d", __func__, __LINE__, pACInfo->curr_state ); - // unable to buffer the request - // nothing is pending so vote powersave back on + /* Unable to service the request + nothing is pending so vote power save back on */ pSession->readyForPowerSave = VOS_TRUE; return SME_QOS_STATUS_MODIFY_SETUP_FAILURE_RSP; } @@ -2212,8 +2235,8 @@ sme_QosStatusType sme_QosInternalModifyReq(tpAniSirGlobal pMac, "%s: %d: modify requested in unexpected state = %d", __func__, __LINE__, pACInfo->curr_state); - // unable to service the request - // nothing is pending so vote powersave back on + /* Unable to service the request + nothing is pending so vote power save back on */ pSession->readyForPowerSave = VOS_TRUE; break; } @@ -2290,15 +2313,17 @@ sme_QosStatusType sme_QosInternalReleaseReq(tpAniSirGlobal pMac, sessionId = flow_info->sessionId; pSession = &sme_QosCb.sessionInfo[sessionId]; pACInfo = &pSession->ac_info[ac]; - // need to vote off powersave for the duration of this request + /* Need to vote off power save for the duration of this request */ pSession->readyForPowerSave = VOS_FALSE; // assume we won't have to (re)buffer the command bufferCommand = VOS_FALSE; - //check to consider the following flowing scenario - //Addts request is pending on one AC, while APSD requested on another which - //needs a reassoc. Will buffer a request if Addts is pending on any AC, - //which will safegaurd the above scenario, & also won't confuse PE with back - //to back Addts or Addts followed by Reassoc + /* + * Check to consider the following flowing scenario Addts request is pending + * on one AC, while APSD requested on another which needs a reassoc. + * Will buffer a request if Addts is pending on any AC, which will safeguard + * the above scenario, & also won't confuse PE with back to back Addts or + * Addts followed by Reassoc. + */ if(sme_QosIsRspPending(sessionId, ac)) { VOS_TRACE(VOS_MODULE_ID_SME, VOS_TRACE_LEVEL_INFO_MED, @@ -2348,8 +2373,8 @@ sme_QosStatusType sme_QosInternalReleaseReq(tpAniSirGlobal pMac, "%s: %d: couldn't buffer the release request in state = %d", __func__, __LINE__, pACInfo->curr_state ); - // unable to buffer the request - // nothing is pending so vote powersave back on + /* Unable to service the request + nothing is pending so vote power save back on */ pSession->readyForPowerSave = VOS_TRUE; return SME_QOS_STATUS_RELEASE_FAILURE_RSP; } @@ -2376,18 +2401,20 @@ sme_QosStatusType sme_QosInternalReleaseReq(tpAniSirGlobal pMac, //is requested flow_info->reason = SME_QOS_REASON_RELEASE; - /* Check if the flow being released is for bi-diretional. + /* + * Check if the flow being released is for bi-directional. * Following flows may present in the system. * a) bi-directional flows * b) uplink flows * c) downlink flows. - * If the flow being released is for bidirectional, splitting of existing - * streams into two tspec indices is required in case ff (b), (c) are present - * and not (a). - * In case if split occurs, all upstreams are aggregated into tspec index 0, - * downstreams are aggregaed into tspec index 1 and two tspec requests for - * (aggregated) upstream(s) followed by (aggregated) downstream(s) is sent - * to AP. */ + * If the flow being released is for bidirectional, splitting of + * existing streams into two tspec indices is required in case ff (b), + * (c) are present and not (a). + * In case if split occurs, all upstreams are aggregated into tspec + * index 0, downstreams are aggregated into tspec index 1 and two + * tspec requests for (aggregated) upstream(s) followed by + * (aggregated) downstream(s) is sent to AP. + */ if(flow_info->QoSInfo.ts_info.direction == SME_QOS_WMM_TS_DIR_BOTH) { vos_mem_zero(&search_key, sizeof(sme_QosSearchInfo)); @@ -2440,9 +2467,11 @@ sme_QosStatusType sme_QosInternalReleaseReq(tpAniSirGlobal pMac, __func__, __LINE__, sessionId, ac, pACInfo->curr_state); - // Buffer the (aggregated) tspec request for downstream flows. - // Please note that the (aggregated) tspec for upstream flows is sent - // out by the susequent logic. + /* + * Buffer the (aggregated) tspec request for downstream flows. + * Please note that the (aggregated) tspec for upstream flows is + * sent out by the subsequent logic. + */ cmd.command = SME_QOS_RESEND_REQ; cmd.pMac = pMac; cmd.sessionId = sessionId; @@ -2458,8 +2487,8 @@ sme_QosStatusType sme_QosInternalReleaseReq(tpAniSirGlobal pMac, __func__, __LINE__, sessionId, ac, SME_QOS_TSPEC_MASK_BIT_2_SET, pACInfo->curr_state); - // unable to buffer the request - // nothing is pending so vote powersave back on + /* Unable to service the request + nothing is pending so vote power save back on */ pSession->readyForPowerSave = VOS_TRUE; return SME_QOS_STATUS_MODIFY_SETUP_FAILURE_RSP; @@ -2489,8 +2518,8 @@ sme_QosStatusType sme_QosInternalReleaseReq(tpAniSirGlobal pMac, sessionId, ac, status); if(SME_QOS_STATUS_SETUP_REQ_PENDING_RSP != status) { - // we aren't waiting for a response from the AP - // so vote powersave back on + /* We aren't waiting for a response from the AP + so vote power save back on */ pSession->readyForPowerSave = VOS_TRUE; } if(SME_QOS_STATUS_SETUP_REQ_PENDING_RSP == status) @@ -2573,8 +2602,8 @@ sme_QosStatusType sme_QosInternalReleaseReq(tpAniSirGlobal pMac, VOS_TRACE(VOS_MODULE_ID_SME, VOS_TRACE_LEVEL_ERROR, "%s: %d: sme_QosUpdateParams() failed", __func__, __LINE__); - // unable to service the request - // nothing is pending so vote powersave back on + /* Unable to service the request + nothing is pending so vote power save back on */ pSession->readyForPowerSave = VOS_TRUE; new_state = SME_QOS_LINK_UP; if(buffered_cmd) @@ -2643,8 +2672,8 @@ sme_QosStatusType sme_QosInternalReleaseReq(tpAniSirGlobal pMac, "%s: %d: sme_QosDelTsReq() failed", __func__, __LINE__); status = SME_QOS_STATUS_RELEASE_FAILURE_RSP; - // we won't be waiting for a response from the AP - // so vote powersave back on + /* We aren't waiting for a response from the AP + so vote power save back on */ pSession->readyForPowerSave = VOS_TRUE; } else @@ -2696,8 +2725,8 @@ sme_QosStatusType sme_QosInternalReleaseReq(tpAniSirGlobal pMac, "%s: %d: Reassoc failed", __func__, __LINE__); status = SME_QOS_STATUS_RELEASE_FAILURE_RSP; - // we won't be waiting for a response from the AP - // so vote powersave back on + /* We aren't waiting for a response from the AP + so vote power save back on */ pSession->readyForPowerSave = VOS_TRUE; } else @@ -2712,8 +2741,8 @@ sme_QosStatusType sme_QosInternalReleaseReq(tpAniSirGlobal pMac, VOS_TRACE(VOS_MODULE_ID_SME, VOS_TRACE_LEVEL_INFO_HIGH, "%s: %d: nothing to do for AC = %d", __func__, __LINE__, ac); - // we won't be waiting for a response from the AP - // so vote powersave back on + /* We aren't waiting for a response from the AP + so vote power save back on */ pSession->readyForPowerSave = VOS_TRUE; } @@ -2809,8 +2838,8 @@ sme_QosStatusType sme_QosInternalReleaseReq(tpAniSirGlobal pMac, "%s: %d: couldn't buffer the release request in state = %d", __func__, __LINE__, pACInfo->curr_state ); - // unable to service the request - // nothing is pending so vote powersave back on + /* Unable to service the request + nothing is pending so vote power save back on */ pSession->readyForPowerSave = VOS_TRUE; return SME_QOS_STATUS_RELEASE_FAILURE_RSP; } @@ -2826,8 +2855,8 @@ sme_QosStatusType sme_QosInternalReleaseReq(tpAniSirGlobal pMac, __func__, __LINE__, pACInfo->curr_state ); VOS_ASSERT(0); - // unable to service the request - // nothing is pending so vote powersave back on + /* Unable to service the request + nothing is pending so vote power save back on */ pSession->readyForPowerSave = VOS_TRUE; break; } @@ -3187,7 +3216,7 @@ eHalStatus sme_QosESESaveTspecResponse(tpAniSirGlobal pMac, v_U8_t sessionId, tD \brief sme_QosESEProcessReassocTspecRsp() - This function processes the WMM TSPEC IE in the reassoc response. Reassoc triggered as part of ESE roaming to another ESE capable AP. If the TSPEC was added before - reassoc, as part of Call Admission Control, the reasso req from the + reassoc, as part of Call Admission Control, the reassoc req from the STA would carry the TSPEC parameters which were already negotiated with the older AP. @@ -3216,8 +3245,8 @@ eHalStatus sme_QosESEProcessReassocTspecRsp(tpAniSirGlobal pMac, v_U8_t sessionI pTspecIE = (tDot11fIEWMMTSPEC *)(pCsrConnectedInfo->pbFrames + pCsrConnectedInfo->nBeaconLength + pCsrConnectedInfo->nAssocReqLength + pCsrConnectedInfo->nAssocRspLength + pCsrConnectedInfo->nRICRspLength); - // Get the number of tspecs Ies in the frame, the min length - // should be atleast equal to the one TSPEC IE + /* Get the number of tspecs Ies in the frame, the min length + should be at-least equal to the one TSPEC IE */ tspecIeLen = pCsrConnectedInfo->nTspecIeLength; if (tspecIeLen < sizeof(tDot11fIEWMMTSPEC)) { VOS_TRACE(VOS_MODULE_ID_SME, VOS_TRACE_LEVEL_ERROR, @@ -4177,8 +4206,8 @@ eHalStatus sme_QosProcessAddTsRsp(tpAniSirGlobal pMac, void *pMsgBuf) "%s: %d: Invoked on session %d with return code %d", __func__, __LINE__, sessionId, paddts_rsp->rc); - // our outstanding request has been serviced - // we can go into powersave + /* Our outstanding request has been serviced + we can go into power save */ pSession->readyForPowerSave = VOS_TRUE; if(paddts_rsp->rc) { @@ -4219,8 +4248,8 @@ eHalStatus sme_QosProcessDelTsRsp(tpAniSirGlobal pMac, void *pMsgBuf) __func__, __LINE__, sessionId, pDeltsRsp->rc); pSession = &sme_QosCb.sessionInfo[sessionId]; - // our outstanding request has been serviced - // we can go into powersave + /* Our outstanding request has been serviced + we can go into power save */ pSession->readyForPowerSave = VOS_TRUE; (void)sme_QosProcessBufferedCmd(sessionId); return eHAL_STATUS_SUCCESS; @@ -4273,8 +4302,10 @@ eHalStatus sme_QosProcessDelTsInd(tpAniSirGlobal pMac, void *pMsgBuf) search_key.key.ac_type = ac; search_key.index = SME_QOS_SEARCH_KEY_INDEX_2; search_key.sessionId = sessionId; - //find all Flows on the perticular AC & delete them, also send HDD indication - // through the callback it registered per request + /* + * Find all Flows on the particular AC & delete them, also send HDD + * indication through the callback it registered per request + */ if(!HAL_STATUS_SUCCESS(sme_QosFindAllInFlowList(pMac, search_key, sme_QosDelTsIndFnp))) { VOS_TRACE(VOS_MODULE_ID_SME, VOS_TRACE_LEVEL_ERROR, @@ -4550,8 +4581,8 @@ eHalStatus sme_QosProcessReassocSuccessEv(tpAniSirGlobal pMac, v_U8_t sessionId, pCsrRoamSession = CSR_GET_SESSION( pMac, sessionId ); pSession = &sme_QosCb.sessionInfo[sessionId]; - // our pending reassociation has completed - // we can allow powersave + /* Our pending reassociation has completed + we can allow power save */ pSession->readyForPowerSave = VOS_TRUE; //get the association info if(!pEvent_info) @@ -4724,8 +4755,8 @@ eHalStatus sme_QosProcessReassocFailureEv(tpAniSirGlobal pMac, v_U8_t sessionId, __func__, __LINE__, sessionId); pSession = &sme_QosCb.sessionInfo[sessionId]; - // our pending reassociation has completed - // we can allow powersave + /* Our pending reassociation has completed + we can allow power save */ pSession->readyForPowerSave = VOS_TRUE; for(ac = SME_QOS_EDCA_AC_BE; ac < SME_QOS_EDCA_AC_MAX; ac++) { @@ -5330,7 +5361,7 @@ eHalStatus sme_QosProcessAddTsFailureRsp(tpAniSirGlobal pMac, } /*-------------------------------------------------------------------------- - \brief sme_QosUpdateTspecMask() - Utiltity function to update the tspec. + \brief sme_QosUpdateTspecMask() - Utility function to update the tspec. Typical usage while aggregating unidirectional flows into a bi-directional flow on AC which is running multiple flows @@ -5664,7 +5695,7 @@ eHalStatus sme_QosProcessAddTsSuccessRsp(tpAniSirGlobal pMac, } /*-------------------------------------------------------------------------- - \brief sme_QosAggregateParams() - Utiltity function to increament the TSPEC + \brief sme_QosAggregateParams() - Utility function to increment the TSPEC params per AC. Typical usage while using flow aggregation or deletion of flows \param pInput_Tspec_Info - Pointer to sme_QosWmmTspecInfo which contains the @@ -5847,7 +5878,7 @@ eHalStatus sme_QosAggregateParams( return eHAL_STATUS_SUCCESS; } /*-------------------------------------------------------------------------- - \brief sme_QosUpdateParams() - Utiltity function to update the TSPEC + \brief sme_QosUpdateParams() - Utility function to update the TSPEC params per AC. Typical usage while deleting flows on AC which is running multiple flows @@ -5936,7 +5967,7 @@ static eHalStatus sme_QosUpdateParams(v_U8_t sessionId, return eHAL_STATUS_SUCCESS; } /*-------------------------------------------------------------------------- - \brief sme_QosAcToUp() - Utiltity function to map an AC to UP + \brief sme_QosAcToUp() - Utility function to map an AC to UP Note: there is a quantization loss here because 4 ACs are mapped to 8 UPs Mapping is done for consistency \param ac - Enumeration of the various EDCA Access Categories. @@ -5958,7 +5989,7 @@ sme_QosWmmUpType sme_QosAcToUp(sme_QosEdcaAcType ac) return up; } /*-------------------------------------------------------------------------- - \brief sme_QosUpToAc() - Utiltity function to map an UP to AC + \brief sme_QosUpToAc() - Utility function to map an UP to AC \param up - Enumeration of the various User priorities (UP). \return an Access Category @@ -6631,11 +6662,11 @@ static eHalStatus sme_QosDeleteBufferedRequests(tpAniSirGlobal pMac, } /*-------------------------------------------------------------------------- \brief sme_QosSaveAssocInfo() - Utility function to save the assoc info in the - CB like BSS descritor of the AP, the profile that HDD sent down with the + CB like BSS descriptor of the AP, the profile that HDD sent down with the connect request, while CSR notifies for assoc/reassoc success. - \param pAssoc_info - pointer to the assoc structure to store the BSS descritor - of the AP, the profile that HDD sent down with the - connect request + \param pAssoc_info - pointer to the assoc structure to store the BSS + descriptor of the AP, the profile that HDD sent down with + the connect request \return eHalStatus @@ -6770,7 +6801,7 @@ eHalStatus sme_QosModificationNotifyFnp(tpAniSirGlobal pMac, tListElem *pEntry) return eHAL_STATUS_SUCCESS; } /*-------------------------------------------------------------------------- - \brief sme_QosModifyFnp() - Utility function (pointer) to delete the origianl + \brief sme_QosModifyFnp() - Utility function (pointer) to delete the original entry in FLOW list & add the modified one \param pMac - Pointer to the global MAC parameter structure. \param pEntry - Pointer to an entry in the flow_list(i.e. tListElem structure) @@ -6815,7 +6846,7 @@ eHalStatus sme_QosModifyFnp(tpAniSirGlobal pMac, tListElem *pEntry) } /*-------------------------------------------------------------------------- \brief sme_QosDelTsIndFnp() - Utility function (pointer) to find all Flows on - the perticular AC & delete them, also send HDD indication through the callback + the particular AC & delete them, also send HDD indication through the callback it registered per request \param pMac - Pointer to the global MAC parameter structure. \param pEntry - Pointer to an entry in the flow_list(i.e. tListElem structure) @@ -7345,7 +7376,7 @@ eHalStatus sme_QosAddTsSuccessFnp(tpAniSirGlobal pMac, tListElem *pEntry) \brief sme_QosIsRspPending() - Utility function to check if we are waiting for an AddTS or reassoc response on some AC other than the given AC - \param sessionId - Session we are interted in + \param sessionId - Session we are interested in \param ac - Enumeration of the various EDCA Access Categories. \return boolean @@ -7489,7 +7520,7 @@ void sme_QosPmcStartUapsdCallback(void *callbackContext, eHalStatus status) sme_QosSessionInfo *pSession = callbackContext; // NOTE WELL // - // In the orignal QoS design the TL module was responsible for + // In the original QoS design the TL module was responsible for // the generation of trigger frames. When that design was in // use, we had to queue up any flows which were waiting for PMC // since we didn't want to notify HDD until PMC had changed to @@ -7525,7 +7556,7 @@ void sme_QosPmcOffloadStartUapsdCallback(void *callbackContext, \brief sme_QosPmcCheckRoutine() - Function registered with PMC to check with SME-QoS whenever the device is about to enter one of the power save modes. PMC runs a poll with all the registered modules if device can - enter powersave mode or remain in full power + enter power save mode or remain in full power \param callbackContext - The context passed to PMC during registration through pmcRegisterPowerSaveCheck. @@ -7550,7 +7581,7 @@ v_BOOL_t sme_QosPmcCheckRoutine(void *callbackContext) return VOS_FALSE; } } - // all active sessions have voted for powersave + /* All active sessions have voted for power save */ return VOS_TRUE; } @@ -7832,7 +7863,8 @@ void sme_QosCleanupCtrlBlkForHandoff(tpAniSirGlobal pMac, v_U8_t sessionId) /*-------------------------------------------------------------------------- \brief sme_QosIsTSInfoAckPolicyValid() - The SME QoS API exposed to HDD to - check if TS info ack policy field can be set to "HT-immediate block acknowledgement" + check if TS info ack policy field can be set to "HT-immediate block + acknowledgment" \param pMac - The handle returned by macOpen. \param pQoSInfo - Pointer to sme_QosWmmTspecInfo which contains the WMM TSPEC @@ -7840,7 +7872,7 @@ void sme_QosCleanupCtrlBlkForHandoff(tpAniSirGlobal pMac, v_U8_t sessionId) \param sessionId - sessionId returned by sme_OpenSession. \return VOS_TRUE - Current Association is HT association and so TS info ack policy - can be set to "HT-immediate block acknowledgement" + can be set to "HT-immediate block acknowledgment" \sa @@ -8205,15 +8237,15 @@ static sme_QosStatusType sme_QosReRequestAddTS(tpAniSirGlobal pMac, sessionId, ac, tspecMask); pSession = &sme_QosCb.sessionInfo[sessionId]; pACInfo = &pSession->ac_info[ac]; - // need to vote off powersave for the duration of this request + /* Need to vote off power save for the duration of this request */ pSession->readyForPowerSave = VOS_FALSE; - //call PMC's request for power function - // AND - //another check is added considering the flowing scenario - //Addts reqest is pending on one AC, while APSD requested on another which - //needs a reassoc. Will buffer a request if Addts is pending on any AC, - //which will safegaurd the above scenario, & also won't confuse PE with back - //to back Addts or Addts followed by Reassoc + /* + * Check to consider the following flowing scenario Addts request is pending + * on one AC, while APSD requested on another which needs a reassoc. + * Will buffer a request if Addts is pending on any AC, which will safeguard + * the above scenario, & also won't confuse PE with back to back Addts or + * Addts followed by Reassoc. + */ if(!pMac->psOffloadEnabled) { if(sme_QosIsRspPending(sessionId, ac) || @@ -8240,8 +8272,8 @@ static sme_QosStatusType sme_QosReRequestAddTS(tpAniSirGlobal pMac, "request for AC %d TSPEC %d in state %d", __func__, __LINE__, sessionId, ac, tspecMask, pACInfo->curr_state); - // unable to buffer the request - // nothing is pending so vote powersave back on + /* Unable to service the request + nothing is pending so vote power save back on */ pSession->readyForPowerSave = VOS_TRUE; return SME_QOS_STATUS_MODIFY_SETUP_FAILURE_RSP; } @@ -8274,8 +8306,8 @@ static sme_QosStatusType sme_QosReRequestAddTS(tpAniSirGlobal pMac, "request for AC %d TSPEC %d in state %d", __func__, __LINE__, sessionId, ac, tspecMask, pACInfo->curr_state); - // unable to buffer the request - // nothing is pending so vote powersave back on + /* Unable to service the request + nothing is pending so vote power save back on */ pSession->readyForPowerSave = VOS_TRUE; return SME_QOS_STATUS_MODIFY_SETUP_FAILURE_RSP; } @@ -8298,8 +8330,8 @@ static sme_QosStatusType sme_QosReRequestAddTS(tpAniSirGlobal pMac, ac, status); if(SME_QOS_STATUS_SETUP_REQ_PENDING_RSP != status) { - // we aren't waiting for a response from the AP - // so vote powersave back on + /* We aren't waiting for a response from the AP + so vote power save back on */ pSession->readyForPowerSave = VOS_TRUE; } if(SME_QOS_STATUS_SETUP_REQ_PENDING_RSP == status) @@ -8342,11 +8374,11 @@ static sme_QosStatusType sme_QosReRequestAddTS(tpAniSirGlobal pMac, if(!HAL_STATUS_SUCCESS(sme_QosBufferCmd(&cmd, VOS_FALSE))) { VOS_TRACE(VOS_MODULE_ID_SME, VOS_TRACE_LEVEL_ERROR, - "%s: %d: couldn't buffer the readd request in state = %d", + "%s: %d: couldn't buffer the read request in state = %d", __func__, __LINE__, pACInfo->curr_state ); - // unable to buffer the request - // nothing is pending so vote powersave back on + /* Unable to service the request + nothing is pending so vote power save back on */ pSession->readyForPowerSave = VOS_TRUE; return SME_QOS_STATUS_MODIFY_SETUP_FAILURE_RSP; } @@ -8361,8 +8393,8 @@ static sme_QosStatusType sme_QosReRequestAddTS(tpAniSirGlobal pMac, "%s: %d: ReAdd request in unexpected state = %d", __func__, __LINE__, pACInfo->curr_state ); - // unable to service the request - // nothing is pending so vote powersave back on + /* Unable to service the request + nothing is pending so vote power save back on */ pSession->readyForPowerSave = VOS_TRUE; // ASSERT? break; diff --git a/CORE/SME/src/btc/btcApi.c b/CORE/SME/src/btc/btcApi.c index 4b5169d14ed1..35e21cf13fb2 100644 --- a/CORE/SME/src/btc/btcApi.c +++ b/CORE/SME/src/btc/btcApi.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012-2013 The Linux Foundation. All rights reserved. + * Copyright (c) 2012-2014 The Linux Foundation. All rights reserved. * * Previously licensed under the ISC license by Qualcomm Atheros, Inc. * @@ -72,7 +72,7 @@ VOS_STATUS btcOpen (tHalHandle hHal) VOS_STATUS vosStatus; int i; - /* Initialize BTC configuartion. */ + /* Initialize BTC configuration. */ pMac->btc.btcConfig.btcExecutionMode = BTC_SMART_COEXISTENCE; pMac->btc.btcConfig.btcConsBtSlotsToBlockDuringDhcp = 0; pMac->btc.btcConfig.btcA2DPBtSubIntervalsDuringDhcp = BTC_MAX_NUM_ACL_BT_SUB_INTS; @@ -202,9 +202,9 @@ VOS_STATUS btcClose (tHalHandle hHal) \fn btcReady \brief fn to inform BTC that eWNI_SME_SYS_READY_IND has been sent to PE. This acts as a trigger to send a message to HAL to update the BTC - related conig to FW. Note that if HDD configures any power BTC + related config to FW. Note that if HDD configures any power BTC related stuff before this API is invoked, BTC will buffer all the - configutaion. + configuration. \param hHal - The handle returned by macOpen. \return VOS_STATUS ---------------------------------------------------------------------------*/ @@ -447,7 +447,7 @@ VOS_STATUS btcCheckHeartBeatMonitoring(tHalHandle hHal, tpSmeBtEvent pBtEvent) } /* --------------------------------------------------------------------------- \fn btcRestoreHeartBeatMonitoringHandle - \brief Timer handler to handlet the timeout condition when a specific BT + \brief Timer handler to handle the timeout condition when a specific BT stop event does not come back, in which case to restore back the heartbeat timer. \param hHal - The handle returned by macOpen. @@ -580,7 +580,8 @@ VOS_STATUS btcGetConfig (tHalHandle hHal, tpSmeBtcConfig pSmeBtcConfig) /* btcFindAclEventHist find a suited ACL event buffer Param: bdAddr - NULL meaning not care. - pointer to caller alocated buffer containing the BD address to find a match + pointer to caller allocated buffer containing the BD + address to find a match handle - BT_INVALID_CONN_HANDLE == not care otherwise, a handle to match NOPTE: Either bdAddr or handle can be valid, if both of them are valid, use bdAddr only. If neither @@ -639,7 +640,8 @@ static tpSmeBtAclEventHist btcFindAclEventHist( tpAniSirGlobal pMac, v_U8_t *bdA /* btcFindSyncEventHist find a suited SYNC event buffer Param: bdAddr - NULL meaning not care. - pointer to caller alocated buffer containing the BD address to find a match + pointer to caller allocated buffer containing the + BD address to find a match handle - BT_INVALID_CONN_HANDLE == not care otherwise, a handle to match NOPTE: Either bdAddr or handle can be valid, if both of them are valid, use bdAddr only. If neither @@ -697,7 +699,7 @@ static tpSmeBtSyncEventHist btcFindSyncEventHist( tpAniSirGlobal pMac, v_U8_t *b /* btcFindDisconnEventHist find a slot for the deferred disconnect event - If handle is invlid, it returns a free slot, if any. + If handle is invalid, it returns a free slot, if any. If handle is valid, it tries to find a match first in case same disconnect event comes down again. */ static tpSmeBtDisconnectEventHist btcFindDisconnEventHist( tpAniSirGlobal pMac, v_U16_t handle ) @@ -733,7 +735,7 @@ static tpSmeBtDisconnectEventHist btcFindDisconnEventHist( tpAniSirGlobal pMac, } /* - btcFindModeChangeEventHist find a slot for the deferred mopde change event + btcFindModeChangeEventHist find a slot for the deferred mode change event If handle is invalid, it returns a free slot, if any. If handle is valid, it tries to find a match first in case same disconnect event comes down again. */ @@ -1085,12 +1087,13 @@ static VOS_STATUS btcDeferSyncCreate( tpAniSirGlobal pMac, tpSmeBtEvent pEvent ) return status; } -/*Defer a SYNC completion event - If there is cached event on this BD address, check completion status. - If status is fail and last cached event is creation, remove te creation event and drop - this completion event. - Otherwise, cache this completion event as the latest one. -*/ +/* + * Defer a SYNC completion event + * If there is cached event on this BD address, check completion status. + * If status is fail and last cached event is creation, remove the + * creation event and drop this completion event. + * Otherwise, cache this completion event as the latest one. + */ static VOS_STATUS btcDeferSyncComplete( tpAniSirGlobal pMac, tpSmeBtEvent pEvent ) { VOS_STATUS status = VOS_STATUS_SUCCESS; @@ -1187,7 +1190,7 @@ static VOS_STATUS btcDeferDisconnectEventForACL( tpAniSirGlobal pMac, tpSmeBtEve smsLog(pMac, LOGE, FL(" ACL event history index:%d overflow, resetting to BT_MAX_NUM_EVENT_ACL_DEFERRED"), pAclEventHist->bNextEventIdx); pAclEventHist->bNextEventIdx = BT_MAX_NUM_EVENT_ACL_DEFERRED; } - //Looking backwords + /* Looking back-words */ for(i = pAclEventHist->bNextEventIdx - 1; i >= 0; i--) { if( BT_EVENT_ACL_CONNECTION_COMPLETE == pAclEventHist->btEventType[i] ) @@ -1242,10 +1245,12 @@ static VOS_STATUS btcDeferDisconnectEventForACL( tpAniSirGlobal pMac, tpSmeBtEve return status; } -//This function works the same as btcDeferDisconnectEventForACL except it hanldes SYNC events -//return VOS_STATUS_E_EXISTS if the event handle cannot be found -//VOS_STATUS_SUCCESS if the event is processed -//Other error status meaning it cannot continue due to other errors +/* + * This function works the same as btcDeferDisconnectEventForACL except it + * handles SYNC events return VOS_STATUS_E_EXISTS if the event handle cannot be + * found VOS_STATUS_SUCCESS if the event is processed. + * Other error status meaning it cannot continue due to other errors + */ /* Defer a disconnect event for SYNC Check if any SYNC history on this event handle. @@ -1271,7 +1276,7 @@ static VOS_STATUS btcDeferDisconnectEventForSync( tpAniSirGlobal pMac, tpSmeBtEv smsLog(pMac, LOGE, FL(" SYNC event history index:%d overflow, resetting to BT_MAX_NUM_EVENT_SCO_DEFERRED"), pSyncEventHist->bNextEventIdx); pSyncEventHist->bNextEventIdx = BT_MAX_NUM_EVENT_SCO_DEFERRED; } - //Looking backwords + /* Looking back-words */ for(i = pSyncEventHist->bNextEventIdx - 1; i >= 0; i--) { //if a mode change event exists, drop it @@ -1894,7 +1899,7 @@ void btcUapsdCheck( tpAniSirGlobal pMac, tpSmeBtEvent pBtEvent ) //Make sure it is a success if( BT_CONN_STATUS_FAIL != pBtEvent->uEventParam.btSyncConnection.status ) { - //Save te handle for later use + /* Save the handle for later use */ for( i = 0; i < BT_MAX_SCO_SUPPORT; i++) { VOS_ASSERT(BT_INVALID_CONN_HANDLE != pBtEvent->uEventParam.btSyncConnection.connectionHandle); diff --git a/CORE/SME/src/ccm/ccmApi.c b/CORE/SME/src/ccm/ccmApi.c index 7f6648a83a71..a85226a60f61 100644 --- a/CORE/SME/src/ccm/ccmApi.c +++ b/CORE/SME/src/ccm/ccmApi.c @@ -578,7 +578,7 @@ eHalStatus ccmCfgSetInt(tHalHandle hHal, tANI_U32 cfgId, tANI_U32 ccmValue, tCcm { if( callback || toBeSaved) { - //we need to sychronous this one + /* We need to synchronous this one */ return cfgSet(hHal, cfgId, CCM_INTEGER_TYPE, sizeof(tANI_U32), NULL, ccmValue, callback, toBeSaved); } else @@ -605,7 +605,7 @@ eHalStatus ccmCfgSetStr(tHalHandle hHal, tANI_U32 cfgId, tANI_U8 *pStr, tANI_U32 { if( callback || toBeSaved ) { - //we need to sychronous this one + /* We need to synchronous this one */ return cfgSet(hHal, cfgId, CCM_STRING_TYPE, length, pStr, 0, callback, toBeSaved); } else diff --git a/CORE/SME/src/csr/csrApiRoam.c b/CORE/SME/src/csr/csrApiRoam.c index 3d12e312649f..e455635fafeb 100644 --- a/CORE/SME/src/csr/csrApiRoam.c +++ b/CORE/SME/src/csr/csrApiRoam.c @@ -368,9 +368,11 @@ eHalStatus csrSetRegInfo(tHalHandle hHal, tANI_U8 *apCntryCode) return eHAL_STATUS_FAILURE; } smsLog( pMac, LOG1, FL(" country Code %.2s"), apCntryCode ); - /* To get correct Regulatory domain from NV table + /* + * To get correct Regulatory domain from NV table * 2 character Country code should be used - * 3rd charater is optional for indoor/outdoor setting */ + * 3rd character is optional for indoor/outdoor setting + */ cntryCodeLength = WNI_CFG_COUNTRY_CODE_LEN; status = csrGetRegulatoryDomainForCountry(pMac, apCntryCode, ®Id, COUNTRY_USER); @@ -446,8 +448,8 @@ static tChannelPwrLimit csrFindChannelPwr(tChannelListWithPower * pdefaultPowerT if (pdefaultPowerTable[i].chanId == ChannelNum) return pdefaultPowerTable[i].pwr; } - // could not find the channel list in default list - // this should not have occured + /* Could not find the channel list in default list + this should not have occurred */ VOS_ASSERT(0); return 0; } @@ -631,7 +633,7 @@ eHalStatus csrStop(tpAniSirGlobal pMac, tHalStopType stopType) } } - //Reset the domain back to the deault + /* Reset the domain back to the default */ pMac->scan.domainIdCurrent = pMac->scan.domainIdDefault; for (sessionId = 0; sessionId < CSR_ROAM_SESSION_MAX; sessionId++) { @@ -1486,7 +1488,8 @@ eHalStatus csrSetBand(tHalHandle hHal, tANI_U8 sessionId, eCsrBand eBand) } -/* The funcns csrConvertCBIniValueToPhyCBState and csrConvertPhyCBStateToIniValue have been +/* The function csrConvertCBIniValueToPhyCBState and + * csrConvertPhyCBStateToIniValue have been * introduced to convert the ini value to the ENUM used in csr and MAC for CB state * Ideally we should have kept the ini value and enum value same and representing the same * cb values as in 11n standard i.e. @@ -1497,7 +1500,8 @@ eHalStatus csrSetBand(tHalHandle hHal, tANI_U8 sessionId, eCsrBand eBand) * 0 - secondary none * 1 - secondary LOW * 2 - secondary HIGH - * and convert to enum value used within the driver in csrChangeDefaultConfigParam using this funcn + * and convert to enum value used within the driver in + * csrChangeDefaultConfigParam using this function * The enum values are as follows: * PHY_SINGLE_CHANNEL_CENTERED = 0 * PHY_DOUBLE_CHANNEL_LOW_PRIMARY = 1 @@ -1849,11 +1853,14 @@ eHalStatus csrChangeDefaultConfigParam(tpAniSirGlobal pMac, tCsrConfigParam *pPa pMac->roam.configParam.fScanTwice = pParam->fScanTwice; pMac->scan.fFirstScanOnly2GChnl = pParam->fFirstScanOnly2GChnl; pMac->scan.scanBandPreference = pParam->scanBandPreference; - /* This parameter is not available in cfg and not passed from upper layers. Instead it is initialized here - * This paramtere is used in concurrency to determine if there are concurrent active sessions. - * Is used as a temporary fix to disconnect all active sessions when BMPS enabled so the active session if Infra STA - * will automatically connect back and resume BMPS since resume BMPS is not working when moving from concurrent to - * single session + /* + * This parameter is not available in cfg and not passed from upper + * layers. Instead it is initialized here. This parameter is used in + * concurrency to determine if there are concurrent active sessions. + * Is used as a temporary fix to disconnect all active sessions when + * BMPS enabled so the active session if Infra STA + * will automatically connect back and resume BMPS since resume BMPS is + * not working when moving from concurrent to single session */ //Remove this code once SLM_Sessionization is supported //BMPS_WORKAROUND_NOT_NEEDED @@ -2198,13 +2205,13 @@ void csrPruneChannelListForMode( tpAniSirGlobal pMac, tCsrChannel *pChannelList cChannels++; } } - // Cleanup the rest of channels. Note we only need to clean up the channels if we had - // to trim the list. Calling palZeroMemory() with a 0 size is going to throw asserts on - // the debug builds so let's be a bit smarter about that. Zero out the reset of the channels - // only if we need to. - // - // The amount of memory to clear is the number of channesl that we trimmed - // (pChannelList->numChannels - cChannels) times the size of a channel in the structure. + /* + * Cleanup the rest of channels. Note we only need to clean up the + * channels if we had to trim the list. + * The amount of memory to clear is the number of channels that we + * trimmed (pChannelList->numChannels - cChannels) times the size + * of a channel in the structure. + */ if ( pChannelList->numChannels > cChannels ) { @@ -2225,13 +2232,13 @@ void csrPruneChannelListForMode( tpAniSirGlobal pMac, tCsrChannel *pChannelList cChannels++; } } - // Cleanup the rest of channels. Note we only need to clean up the channels if we had - // to trim the list. Calling palZeroMemory() with a 0 size is going to throw asserts on - // the debug builds so let's be a bit smarter about that. Zero out the reset of the channels - // only if we need to. - // - // The amount of memory to clear is the number of channesl that we trimmed - // (pChannelList->numChannels - cChannels) times the size of a channel in the structure. + /* + * Cleanup the rest of channels. Note we only need to clean up the + * channels if we had to trim the list. + * The amount of memory to clear is the number of channels that we + * trimmed (pChannelList->numChannels - cChannels) times the size + * of a channel in the structure. + */ if ( pChannelList->numChannels > cChannels ) { vos_mem_set(&pChannelList->channelList[ cChannels ], @@ -2390,8 +2397,8 @@ static eHalStatus CsrInit11dInfo(tpAniSirGlobal pMac, tCsr11dinfo *ps11dinfo) WNI_CFG_COUNTRY_CODE_LEN); - //Tush: at csropen get this initialized with default, during csr reset if this - // already set with some value no need initilaize with default again + /* Tush: at csropen get this initialized with default, during csr reset if + this already set with some value no need initialize with default again */ if(0 == pMac->scan.countryCodeCurrent[0]) { vos_mem_copy(pMac->scan.countryCodeCurrent, ps11dinfo->countryCode, @@ -2507,7 +2514,7 @@ void csrRoamRemoveDuplicateCommand(tpAniSirGlobal pMac, tANI_U32 sessionId, tSme if ( (pCommand && ( pCommand->sessionId == pDupCommand->sessionId ) && ((pCommand->command == pDupCommand->command) && - /* This peermac check is requried for Softap/GO scenarios + /* This peermac check is required for Softap/GO scenarios * For STA scenario below OR check will suffice as pCommand will * always be NULL for STA scenarios */ @@ -2538,7 +2545,7 @@ void csrRoamRemoveDuplicateCommand(tpAniSirGlobal pMac, tANI_U32 sessionId, tSme while( (pEntry = csrLLRemoveHead(&localList, LL_ACCESS_NOLOCK)) ) { pDupCommand = GET_BASE_ADDR( pEntry, tSmeCmd, Link ); - //Tell caller that the command is cancelled + /* Tell caller that the command is canceled */ csrRoamCallCallback(pMac, pDupCommand->sessionId, NULL, pDupCommand->u.roamCmd.roamId, eCSR_ROAM_CANCELLED, eCSR_ROAM_RESULT_NONE); csrReleaseCommandRoam(pMac, pDupCommand); @@ -2575,7 +2582,7 @@ eHalStatus csrRoamCallCallback(tpAniSirGlobal pMac, tANI_U32 sessionId, tCsrRoam return eHAL_STATUS_FAILURE; } - smsLog(pMac, LOG4, "Recieved RoamCmdStatus %d with Roam Result %d", u1, u2); + smsLog(pMac, LOG4, "Received RoamCmdStatus %d with Roam Result %d", u1, u2); if (eCSR_ROAM_ASSOCIATION_COMPLETION == u1 && pRoamInfo) { @@ -2668,9 +2675,10 @@ eHalStatus csrRoamCallCallback(tpAniSirGlobal pMac, tANI_U32 sessionId, tCsrRoam { pRoamInfo->sessionId = (tANI_U8)sessionId; /* - * the reasonCode will be passed to supplicant by cfg80211_disconnected. - * Based on the document, the reason code passed to supplicant needs to set - * to 0 if unknow. eSIR_BEACON_MISSED reason code is not recognizable so that + * the reasonCode will be passed to supplicant by + * cfg80211_disconnected. Based on the document, the reason code + * passed to supplicant needs to set to 0 if unknown. + * eSIR_BEACON_MISSED reason code is not recognizable so that * we set to 0 instead. */ pRoamInfo->reasonCode = @@ -2772,6 +2780,7 @@ eHalStatus csrRoamCallCallback(tpAniSirGlobal pMac, tANI_U32 sessionId, tCsrRoam return (status); } + // Returns whether handoff is currently in progress or not tANI_BOOLEAN csrRoamIsHandoffInProgress(tpAniSirGlobal pMac, tANI_U8 sessionId) { @@ -3131,7 +3140,7 @@ eHalStatus csrRoamPrepareBssConfig(tpAniSirGlobal pMac, tCsrRoamProfile *pProfil pBssConfig->SSID.length = 0; if(csrIsNULLSSID(pBssConfig->SSID.ssId, pBssConfig->SSID.length)) { - smsLog(pMac, LOGW, " BSS desc SSID is a wildcard"); + smsLog(pMac, LOGW, "BSS desc SSID is a wild card"); //Return failed if profile doesn't have an SSID either. if(pProfile->SSIDs.numOfSSIDs == 0) { @@ -3269,7 +3278,7 @@ static eHalStatus csrRoamPrepareBssConfigFromProfile(tpAniSirGlobal pMac, tCsrRo //SSID must present return eHAL_STATUS_FAILURE; } - //Settomg up the capabilities + /* Setting up the capabilities */ if( csrIsBssTypeIBSS(pProfile->BSSType) ) { pBssConfig->BssCap.ibss = 1; @@ -4203,8 +4212,12 @@ eHalStatus csrRoamStopNetwork( tpAniSirGlobal pMac, tANI_U32 sessionId, tCsrRoam } else { - // In an Infrastucture and going to an Infrastructure network with the same SSID. This - // calls for a Reassociation sequence. So issue the CFG sets for this new AP. + /* + * In an Infrastructure and going to an Infrastructure + * network with the same SSID. This calls for a + * Reassociation sequence. So issue the CFG + * sets for this new AP. + */ if ( pBssDesc ) { // Set parameters for this Bss. @@ -4216,8 +4229,10 @@ eHalStatus csrRoamStopNetwork( tpAniSirGlobal pMac, tANI_U32 sessionId, tCsrRoam } else { - // Neiher in IBSS nor in Infra. We can go ahead and set the CFG for tne new network... - // Nothing to stop. + /* + * Neither in IBSS nor in Infra. We can go ahead + * and set the CFG for the new network. Nothing to stop + */ if ( pBssDesc || CSR_IS_WDS_AP( pProfile ) || CSR_IS_INFRA_AP(pProfile) ) @@ -4278,10 +4293,13 @@ eCsrJoinState csrRoamJoin( tpAniSirGlobal pMac, tANI_U32 sessionId, csrIsSsidEqual( pMac, pSession->pConnectBssDesc, pBssDesc, pIesLocal ) ) { - // Check to see if the Auth type has changed in the Profile. If so, we don't want to Reassociate - // with Authenticating first. To force this, stop the current association (Disassociate) and - // then re 'Join' the AP, wihch will force an Authentication (with the new Auth type) followed by - // a new Association. + /* + * Check to see if the Auth type has changed in the Profile. + * If so, we don't want to Reassociate with Authenticating first. + * To force this, stop the current association (Disassociate) and + * then re 'Join' the AP, which will force an Authentication + * (with the new Auth type) followed by a new Association. + */ if(csrIsSameProfile(pMac, &pSession->connectedProfile, pProfile)) { smsLog(pMac, LOGW, FL(" detect same profile")); @@ -4389,7 +4407,8 @@ static void csrRoamAssignDefaultParam( tpAniSirGlobal pMac, tSmeCmd *pCommand ) } pCommand->u.roamCmd.roamProfile.negotiatedUCEncryptionType = pCommand->u.roamCmd.roamProfile.EncryptionType.encryptionType[0]; - //In this case, the multicast encryption needs to follow the uncast ones. + /* In this case, the multicast encryption needs to follow + the unicast ones */ pCommand->u.roamCmd.roamProfile.negotiatedMCEncryptionType = pCommand->u.roamCmd.roamProfile.EncryptionType.encryptionType[0]; } @@ -4546,7 +4565,8 @@ static eCsrJoinState csrRoamJoinNextBss( tpAniSirGlobal pMac, tSmeCmd *pCommand, { pSession->bRefAssocStartCnt--; pRoamInfo->pProfile = pProfile; - //Complete the last association attemp because a new one is about to be tried + /* Complete the last association attempt because a new one + is about to be tried */ csrRoamCallCallback(pMac, sessionId, pRoamInfo, pCommand->u.roamCmd.roamId, eCSR_ROAM_ASSOCIATION_COMPLETION, eCSR_ROAM_RESULT_NOT_ASSOCIATED); @@ -4710,7 +4730,8 @@ static eCsrJoinState csrRoamJoinNextBss( tpAniSirGlobal pMac, tSmeCmd *pCommand, if(pSession->bRefAssocStartCnt > 0) { pSession->bRefAssocStartCnt--; - //Complete the last association attemp because a new one is about to be tried + /* Complete the last association attempt because a new one is + about to be tried */ pRoamInfo = &roamInfo; pRoamInfo->pProfile = pProfile; csrRoamCallCallback(pMac, sessionId, pRoamInfo, pCommand->u.roamCmd.roamId, @@ -4730,7 +4751,7 @@ static eHalStatus csrRoam( tpAniSirGlobal pMac, tSmeCmd *pCommand ) //***if( hddIsRadioStateOn( pAdapter ) ) { - // Attept to join a Bss... + /* Attempt to join a Bss... */ RoamState = csrRoamJoinNextBss( pMac, pCommand, eANI_BOOLEAN_FALSE ); // if nothing to join.. @@ -4816,8 +4837,8 @@ eHalStatus csrProcessFTReassocRoamCommand ( tpAniSirGlobal pMac, tSmeCmd *pComma if(CSR_IS_ROAMING(pSession) && pSession->fCancelRoaming) { - //the roaming is cancelled. Simply complete the command - smsLog(pMac, LOG1, FL(" Roam command cancelled")); + /* The roaming is canceled. Simply complete the command */ + smsLog(pMac, LOG1, FL("Roam command canceled")); csrRoamComplete(pMac, eCsrNothingToJoin, NULL); return eHAL_STATUS_FAILURE; } @@ -4828,8 +4849,8 @@ eHalStatus csrProcessFTReassocRoamCommand ( tpAniSirGlobal pMac, tSmeCmd *pComma } else { - //the roaming is cancelled. Simply complete the command - smsLog(pMac, LOG1, FL(" Roam command cancelled")); + /* The roaming is canceled. Simply complete the command */ + smsLog(pMac, LOG1, FL("Roam command canceled")); csrRoamComplete(pMac, eCsrNothingToJoin, NULL); return eHAL_STATUS_FAILURE; } @@ -5178,7 +5199,7 @@ static eHalStatus csrRoamSaveSecurityRspIE(tpAniSirGlobal pMac, tANI_U32 session vos_mem_set(pSession->pWpaRsnRspIE, nIeLen + 2, 0); pSession->pWpaRsnRspIE[0] = DOT11F_EID_RSN; pSession->pWpaRsnRspIE[1] = (tANI_U8)nIeLen; - //copy upto akm_suites + /* Copy up to akm_suites */ pIeBuf = pSession->pWpaRsnRspIE + 2; vos_mem_copy(pIeBuf, &pIesLocal->RSN.version, sizeof(pIesLocal->RSN.version)); @@ -5225,11 +5246,14 @@ static eHalStatus csrRoamSaveSecurityRspIE(tpAniSirGlobal pMac, tANI_U32 session + pIesLocal->WPA.unicast_cipher_count * 4 //unicast_ciphers + 2 //auth_suite_count + pIesLocal->WPA.auth_suite_count * 4; //auth_suites - // The WPA capabilities follows the Auth Suite (two octects)-- - // this field is optional, and we always "send" zero, so just - // remove it. This is consistent with our assumptions in the - // frames compiler; c.f. bug 15234: - //nIeLen doesn't count EID and length fields + + /* + * The WPA capabilities follows the Auth Suite (two octets) + * this field is optional, and we always "send" zero, so + * just remove it. This is consistent with our assumptions + * in the frames compiler; c.f. bug 15234: + * nIeLen doesn't count EID and length fields + */ pSession->pWpaRsnRspIE = vos_mem_malloc(nIeLen + 2); if ( NULL == pSession->pWpaRsnRspIE ) @@ -5278,7 +5302,7 @@ static eHalStatus csrRoamSaveSecurityRspIE(tpAniSirGlobal pMac, tANI_U32 session pSession->pWapiRspIE[0] = DOT11F_EID_WAPI; pSession->pWapiRspIE[1] = (tANI_U8)nIeLen; pIeBuf = pSession->pWapiRspIE + 2; - //copy upto akm_suite_count + /* Copy up to akm_suite_count */ vos_mem_copy(pIeBuf, &pIesLocal->WAPI.version, 2); pIeBuf += 4; if( pIesLocal->WAPI.akm_suite_count ) @@ -5696,10 +5720,10 @@ static tANI_BOOLEAN csrRoamProcessResults( tpAniSirGlobal pMac, tSmeCmd *pComman roamInfo.isESEAssoc = pSession->connectedProfile.isESEAssoc; #endif - // csrRoamStateChange also affects sub-state. Hence, csrRoamStateChange happens first and then - // substate change. - // Moving even save profile above so that below mentioned conditon is also met. - // JEZ100225: Moved to after saving the profile. Fix needed in main/latest + /* csrRoamStateChange also affects sub-state. Hence, + * csrRoamStateChange happens first and then sub state change. + * Moving even save profile above so that below mentioned + * condition is also met. */ csrRoamStateChange( pMac, eCSR_ROAMING_STATE_JOINED, sessionId ); // Make sure the Set Context is issued before link indication to NDIS. After link indication is // made to NDIS, frames could start flowing. If we have not set context with LIM, the frames @@ -5740,9 +5764,10 @@ static tANI_BOOLEAN csrRoamProcessResults( tpAniSirGlobal pMac, tSmeCmd *pComman csrRoamSubstateChange( pMac, eCSR_ROAM_SUBSTATE_NONE, sessionId); } else { #endif - //Need to wait for supplicant authtication + /* Need to wait for supplicant authentication */ roamInfo.fAuthRequired = eANI_BOOLEAN_TRUE; - //Set the subestate to WaitForKey in case authentiation is needed + /* Set the sub-state to WaitForKey in case + authentication is needed */ csrRoamSubstateChange( pMac, eCSR_ROAM_SUBSTATE_WAIT_FOR_KEY, sessionId ); /* Set remainInPowerActiveTillDHCP to make sure we wait for @@ -5775,7 +5800,7 @@ static tANI_BOOLEAN csrRoamProcessResults( tpAniSirGlobal pMac, tSmeCmd *pComman //This time should be long enough for the rest of the process plus setting key if(!HAL_STATUS_SUCCESS( csrRoamStartWaitForKeyTimer( pMac, key_timeout_interval ) ) ) { - //Reset our state so nothting is blocked. + /* Reset our state so nothing is blocked. */ smsLog( pMac, LOGE, FL(" Failed to start pre-auth timer") ); csrRoamSubstateChange( pMac, eCSR_ROAM_SUBSTATE_NONE, sessionId); } @@ -5928,10 +5953,13 @@ static tANI_BOOLEAN csrRoamProcessResults( tpAniSirGlobal pMac, tSmeCmd *pComman // reset the PMKID candidate list csrResetPMKIDCandidateList( pMac, sessionId ); //Update TL's AC weight base on the current EDCA parameters - //These parameters may change in the course of the connection, that sictuation - //is not taken care here. This change is mainly to address a WIFI WMM test where - //BE has a equal or higher TX priority than VI. - //We only do this for infra link + /* + * These parameters may change in the course of the connection, + * that situation is not taken care here. This change is mainly + * to address a WIFI WMM test where BE has a equal or + * higher TX priority than VI. + * We only do this for infra link + */ if( csrIsConnStateConnectedInfra(pMac, sessionId ) && pIes ) { csrCheckAndUpdateACWeight(pMac, pIes); @@ -6003,7 +6031,10 @@ static tANI_BOOLEAN csrRoamProcessResults( tpAniSirGlobal pMac, tSmeCmd *pComman { smsLog(pMac, LOGW, FL("cannot parse IBSS IEs")); roamInfo.pBssDesc = pSirBssDesc; - //We need to associate_complete it first, becasue Associate_start already indicated. + /* + * We need to associate_complete it first, because + * Associate_start already indicated. + */ csrRoamCallCallback( pMac, sessionId, &roamInfo, pCommand->u.roamCmd.roamId, eCSR_ROAM_IBSS_IND, eCSR_ROAM_RESULT_IBSS_START_FAILED ); break; @@ -6024,7 +6055,7 @@ static tANI_BOOLEAN csrRoamProcessResults( tpAniSirGlobal pMac, tSmeCmd *pComman vos_mem_copy(&roamInfo.bssid, &pSirBssDesc->bssId, sizeof(tCsrBssid)); } - //We are doen with the IEs so free it + /* We are done with the IEs so free it */ vos_mem_free(pIes); #ifdef FEATURE_WLAN_DIAG_SUPPORT_CSR { @@ -6204,7 +6235,8 @@ static tANI_BOOLEAN csrRoamProcessResults( tpAniSirGlobal pMac, tSmeCmd *pComman } vos_mem_set(&roamInfo, sizeof(tCsrRoamInfo), 0); roamInfo.pBssDesc = pSirBssDesc; - //We need to associate_complete it first, becasue Associate_start already indicated. + /* We need to associate_complete it first, because + Associate_start already indicated. */ csrRoamCallCallback( pMac, sessionId, &roamInfo, pCommand->u.roamCmd.roamId, roamStatus, roamResult ); csrSetDefaultDot11Mode( pMac ); break; @@ -6233,7 +6265,7 @@ static tANI_BOOLEAN csrRoamProcessResults( tpAniSirGlobal pMac, tSmeCmd *pComman smsLog(pMac, LOGW, FL("receives silently stop roaming indication")); vos_mem_set(&roamInfo, sizeof(roamInfo), 0); - //to aviod resetting the substate to NONE + /* To avoid resetting the substate to NONE */ pMac->roam.curState[sessionId] = eCSR_ROAMING_STATE_JOINED; //No need to change substate to wai_for_key because there is no state change roamInfo.pBssDesc = pSession->pConnectBssDesc; @@ -6360,8 +6392,11 @@ static tANI_BOOLEAN csrRoamProcessResults( tpAniSirGlobal pMac, tSmeCmd *pComman csrRoamCompletion(pMac, sessionId, NULL, pCommand, eCSR_ROAM_RESULT_FAILURE, eANI_BOOLEAN_FALSE); csrScanStartIdleScan(pMac); #ifdef FEATURE_WLAN_BTAMP_UT_RF - //For WDS STA. To fix the issue where the WDS AP side may be too busy by - //BT activity and not able to recevie WLAN traffic. Retry the join + /* + * For WDS STA. To fix the issue where the WDS AP side may + * be too busy by BT activity and not able to receive + * WLAN traffic. Retry the join + */ if( CSR_IS_WDS_STA(pProfile) ) { csrRoamStartJoinRetryTimer(pMac, sessionId, CSR_JOIN_RETRY_TIMEOUT_PERIOD); @@ -6401,9 +6436,9 @@ static tANI_BOOLEAN csrRoamProcessResults( tpAniSirGlobal pMac, tSmeCmd *pComman csrRoamLinkDown(pMac, sessionId); /* - DelSta not done FW still in conneced state so dont - issue IMPS req - */ + * DelSta not done FW still in connected state so dont + * issue IMPS req + */ if (pMac->roam.deauthRspStatus == eSIR_SME_DEAUTH_STATUS) { @@ -6466,7 +6501,7 @@ static tANI_BOOLEAN csrRoamProcessResults( tpAniSirGlobal pMac, tSmeCmd *pComman default: csrRoamStateChange( pMac, eCSR_ROAMING_STATE_IDLE, sessionId ); - //We are done with one round of lostlink roaming here + /* We are done with one round of lost link roaming here */ csrScanHandleFailedLostlink3(pMac, sessionId); break; } @@ -7398,7 +7433,8 @@ eHalStatus csrRoamProcessDisassocDeauth( tpAniSirGlobal pMac, tSmeCmd *pCommand, pMac->roam.ucACWeights[2], pMac->roam.ucACWeights[3]); //Restore AC weight in case we change it WLANTL_SetACWeights(pMac->roam.gVosContext, pMac->roam.ucACWeights); - // in Infrasturcture, we need to disassociate from the Infrastructure network... + /* In Infrastructure, we need to disassociate from the + Infrastructure network... */ NewSubstate = eCSR_ROAM_SUBSTATE_DISASSOC_FORCED; if(eCsrSmeIssuedDisassocForHandoff == pCommand->u.roamCmd.roamReason) { @@ -7575,7 +7611,7 @@ eHalStatus csrRoamDisconnectInternal(tpAniSirGlobal pMac, tANI_U32 sessionId, eC } #ifdef FEATURE_WLAN_BTAMP_UT_RF - //Stop te retry + /* Stop the retry */ pSession->maxRetryCount = 0; csrRoamStopJoinRetryTimer(pMac, sessionId); #endif @@ -7658,7 +7694,8 @@ eHalStatus csrRoamSaveConnectedInfomation(tpAniSirGlobal pMac, tANI_U32 sessionI smsLog(pMac, LOGW, FL("ERROR: Beacon interval is ZERO")); } vos_mem_copy(&pConnectProfile->Keys, &pProfile->Keys, sizeof(tCsrKeys)); - /* saving the addional IE`s like Hot spot indication element and extended capabilities */ + /* Saving the additional IE`s like Hot spot indication element and + extended capabilities */ if(pProfile->nAddIEAssocLength) { pConnectProfile->pAddIEAssoc = vos_mem_malloc(pProfile->nAddIEAssocLength); @@ -7945,7 +7982,7 @@ tANI_BOOLEAN csrIsRoamCommandWaitingForSession(tpAniSirGlobal pMac, tANI_U32 ses tANI_BOOLEAN fRet = eANI_BOOLEAN_FALSE; tListElem *pEntry; tSmeCmd *pCommand = NULL; - //alwasy lock active list before locking pending list + /* Always lock active list before locking pending list */ csrLLLock( &pMac->sme.smeCmdActiveList ); pEntry = csrLLPeekHead(&pMac->sme.smeCmdActiveList, LL_ACCESS_NOLOCK); if(pEntry) @@ -8009,7 +8046,7 @@ tANI_BOOLEAN csrIsRoamCommandWaiting(tpAniSirGlobal pMac) tANI_BOOLEAN csrIsCommandWaiting(tpAniSirGlobal pMac) { tANI_BOOLEAN fRet = eANI_BOOLEAN_FALSE; - //alwasy lock active list before locking pending list + /* Always lock active list before locking pending list */ csrLLLock( &pMac->sme.smeCmdActiveList ); fRet = csrLLIsListEmpty(&pMac->sme.smeCmdActiveList, LL_ACCESS_NOLOCK); if(eANI_BOOLEAN_FALSE == fRet) @@ -8025,7 +8062,7 @@ tANI_BOOLEAN csrIsScanForRoamCommandActive( tpAniSirGlobal pMac ) tANI_BOOLEAN fRet = eANI_BOOLEAN_FALSE; tListElem *pEntry; tCsrCmd *pCommand; - //alwasy lock active list before locking pending list + /* Always lock active list before locking pending list */ csrLLLock( &pMac->sme.smeCmdActiveList ); pEntry = csrLLPeekHead(&pMac->sme.smeCmdActiveList, LL_ACCESS_NOLOCK); if( pEntry ) @@ -8128,8 +8165,8 @@ static void csrRoamingStateConfigCnfProcessor( tpAniSirGlobal pMac, tANI_U32 res if(CSR_IS_ROAMING(pSession) && pSession->fCancelRoaming) { - //the roaming is cancelled. Simply complete the command - smsLog(pMac, LOGW, FL(" Roam command cancelled")); + /* The roaming is canceled. Simply complete the command */ + smsLog(pMac, LOGW, FL(" Roam command canceled")); csrRoamComplete(pMac, eCsrNothingToJoin, NULL); } /* If the roaming has stopped, not to continue the roaming command*/ @@ -8218,9 +8255,13 @@ static void csrRoamingStateConfigCnfProcessor( tpAniSirGlobal pMac, tANI_U32 res { eHalStatus status = eHAL_STATUS_SUCCESS; - /* We need to come with other way to figure out that this is because of HO in BMP - The below API will be only available for Android as it uses a different HO algorithm */ - /* Reassoc request will be used only for ESE and 11r handoff whereas other legacy roaming should + /* + * We need to come with other way to figure out that + * this is because of HO in BMP. The below API will be + * only available for Android as it uses a different + * HO algorithm. + * Reassoc request will be used only for ESE and 11r + * handoff whereas other legacy roaming should * use join request */ #ifdef WLAN_FEATURE_VOWIFI_11R if (csrRoamIsHandoffInProgress(pMac, sessionId) && @@ -8314,8 +8355,11 @@ static void csrRoamRoamingStateReassocRspProcessor( tpAniSirGlobal pMac, tpSirSm result = eCsrReassocSuccess; /* Defeaturize this part later if needed */ #ifdef WLAN_FEATURE_NEIGHBOR_ROAMING - /* Since the neighbor roam algorithm uses reassoc req for handoff instead of join, - * we need the response contents while processing the result in csrRoamProcessResults() */ + /* + * Since the neighbor roam algorithm uses reassoc req for + * handoff instead of join, we need the response contents while + * processing the result in csrRoamProcessResults() + */ if (csrRoamIsHandoffInProgress(pMac, pSmeJoinRsp->sessionId)) { /* Need to dig more on indicating events to SME QoS module */ @@ -8618,12 +8662,16 @@ POST_ROAM_FAILURE: { // Successfully disassociated from the 'old' Bss... // - // We get Disassociate response in three conditions. - // - First is the case where we are disasociating from an Infra Bss to start an IBSS. - // - Second is the when we are disassociating from an Infra Bss to join an IBSS or a new - // Infrastructure network. - // - Third is where we are doing an Infra to Infra roam between networks with different - // SSIDs. In all cases, we set the new Bss configuration here and attempt to join + /* + * We get Disassociate response in three conditions. + * - First is the case where we are disassociating from an + * Infra Bss to start an IBSS. + * - Second is the when we are disassociating from an Infra Bss + * to join an IBSS or a new Infrastructure network. + * - Third is where we are doing an Infra to Infra roam between + * networks with different SSIDs. In all cases, we set the new + * Bss configuration here and attempt to join + */ smsLog( pMac, LOG2, "CSR SmeDisassocReq disassociated Successfully" ); } @@ -8683,12 +8731,12 @@ static void csrRoamRoamingStateStartBssRspProcessor( tpAniSirGlobal pMac, tSirSm } /* - We need to be careful on whether to cast pMsgBuf (pSmeRsp) to other type of strucutres. - It depends on how the message is constructed. If the message is sent by limSendSmeRsp, - the pMsgBuf is only a generic response and can only be used as pointer to tSirSmeRsp. - For the messages where sender allocates memory for specific structures, then it can be - cast accordingly. -*/ + * We need to be careful on whether to cast pMsgBuf (pSmeRsp) to other type of + * structures. It depends on how the message is constructed. If the message is + * sent by limSendSmeRsp, the pMsgBuf is only a generic response and can only be + * used as pointer to tSirSmeRsp. For the messages where sender allocates memory + * for specific structures, then it can be cast accordingly. + */ void csrRoamingStateMsgProcessor( tpAniSirGlobal pMac, void *pMsgBuf ) { tSirSmeRsp *pSmeRsp; @@ -8765,7 +8813,8 @@ void csrRoamingStateMsgProcessor( tpAniSirGlobal pMac, void *pMsgBuf ) csrRoamingStateConfigCnfProcessor( pMac, ((tCsrCfgSetRsp *)pSmeRsp)->respStatus ); } break; - //In case CSR issues STOP_BSS, we need to tell HDD about peer departed becasue PE is removing them + /* In case CSR issues STOP_BSS, we need to tell HDD about peer departed + because PE is removing them */ case eWNI_SME_IBSS_PEER_DEPARTED_IND: pIbssPeerInd = (tSmeIbssPeerInd*)pSmeRsp; smsLog(pMac, LOGE, "CSR: Peer departed notification from LIM in joining state"); @@ -8893,8 +8942,12 @@ eHalStatus csrRoamIssueSetContextReq( tpAniSirGlobal pMac, tANI_U32 sessionId, e edType = csrTranslateEncryptTypeToEdType( EncryptType ); - // Allow 0 keys to be set for the non-WPA encrypt types... For WPA encrypt types, the num keys must be non-zero - // or LIM will reject the set context (assumes the SET_CONTEXT does not occur until the keys are distrubuted). + /* + * Allow 0 keys to be set for the non-WPA encrypt types. + * For WPA encrypt types, the num keys must be non-zero + * or LIM will reject the set context (assumes the SET_CONTEXT does not + * occur until the keys are distributed). + */ if ( CSR_IS_ENC_TYPE_STATIC( EncryptType ) || addKey ) { @@ -8903,7 +8956,7 @@ eHalStatus csrRoamIssueSetContextReq( tpAniSirGlobal pMac, tANI_U32 sessionId, e setKey.keyDirection = aniKeyDirection; //Tx, Rx or Tx-and-Rx vos_mem_copy(&setKey.peerMac, bssId, sizeof(tCsrBssid)); setKey.paeRole = paeRole; //0 for supplicant - setKey.keyId = keyId; // Kye index + setKey.keyId = keyId; /* Key index */ setKey.keyLength = keyLength; if( keyLength ) { @@ -9114,7 +9167,8 @@ eHalStatus csrRoamIssueRemoveKeyCommand( tpAniSirGlobal pMac, tANI_U32 sessionId pCommand->u.removeKeyCmd.keyId = pRemoveKey->keyId; if( CSR_IS_WAIT_FOR_KEY( pMac, sessionId ) ) { - //in this case, put it to the end of the Q incase there is a set key pending. + /* In this case, put it to the end of the Q in-case there + is a set key pending. */ fImediate = eANI_BOOLEAN_FALSE; } smsLog( pMac, LOGE, FL("keyType=%d, keyId=%d, PeerMac="MAC_ADDRESS_STR), @@ -10267,7 +10321,7 @@ void csrRoamCheckForLinkStatusChange( tpAniSirGlobal pMac, tSirSmeRsp *pSirMsg ) vos_mem_copy(&roamInfo.bssid, &pNewBss->bssId, sizeof(tCsrBssid)); pRoamInfo = &roamInfo; - //This BSSID is th ereal BSSID, let's save it + /* This BSSID is the real BSSID, let's save it */ if(pSession->pConnectBssDesc) { vos_mem_copy(pSession->pConnectBssDesc->bssId, @@ -10521,7 +10575,8 @@ void csrRoamCheckForLinkStatusChange( tpAniSirGlobal pMac, tSirSmeRsp *pSirMsg ) { csrRoamStopWaitForKeyTimer( pMac ); - //We are done with authentication, whethere succeed or not + /* We are done with authentication, + whether succeed or not */ csrRoamSubstateChange( pMac, eCSR_ROAM_SUBSTATE_NONE, sessionId); //We do it here because this linkup function is not called after association //when a key needs to be set. @@ -10571,7 +10626,7 @@ void csrRoamCheckForLinkStatusChange( tpAniSirGlobal pMac, tSirSmeRsp *pSirMsg ) // can go ahead and initiate the TSPEC if any are pending sme_QosCsrEventInd(pMac, (v_U8_t)sessionId, SME_QOS_CSR_SET_KEY_SUCCESS_IND, NULL); #ifdef FEATURE_WLAN_ESE - //Send Adjacent AP repot to new AP. + /* Send Adjacent AP report to new AP. */ if (result == eCSR_ROAM_RESULT_AUTHENTICATED && pSession->isPrevApInfoValid && pSession->connectedProfile.isESEAssoc) @@ -10805,10 +10860,12 @@ tANI_BOOLEAN csrRoamCompleteRoaming(tpAniSirGlobal pMac, tANI_U32 sessionId, smsLog(pMac, LOGW, FL(" indicates roaming completion")); if(pSession->fCancelRoaming && CSR_IS_LOSTLINK_ROAMING(pSession->roamingReason)) { - //roaming is cancelled, tell HDD to indicate disconnect - //Because LIM overload deauth_ind for both deauth frame and missed beacon - //we need to use this logic to detinguish it. For missed beacon, LIM set reason - //to be eSIR_BEACON_MISSED + /* + * Roaming is canceled, tell HDD to indicate disconnect + * Because LIM overload deauth_ind for both deauth frame and + * missed beacon we need to use this logic to distinguish it. + * For missed beacon, LIM set reason to be eSIR_BEACON_MISSED + */ if(eSIR_BEACON_MISSED == pSession->roamingStatusCode) { roamResult = eCSR_ROAM_RESULT_LOSTLINK; @@ -10858,7 +10915,7 @@ void csrRoamCancelRoaming(tpAniSirGlobal pMac, tANI_U32 sessionId) if(CSR_IS_ROAMING(pSession)) { - smsLog(pMac, LOGW, " Cancelling roaming"); + smsLog(pMac, LOGW, "Cancel roaming"); pSession->fCancelRoaming = eANI_BOOLEAN_TRUE; if(CSR_IS_ROAM_JOINING(pMac, sessionId) && CSR_IS_ROAM_SUBSTATE_CONFIG(pMac, sessionId)) { @@ -10870,7 +10927,8 @@ void csrRoamCancelRoaming(tpAniSirGlobal pMac, tANI_U32 sessionId) eCSR_ROAM_RESULT_LOSTLINK : eCSR_ROAM_RESULT_NONE; //Roaming is stopped after here csrRoamCompleteRoaming(pMac, sessionId, eANI_BOOLEAN_TRUE, roamResult); - //Since CSR may be in lostlink roaming situation, abort all roaming related activities + /* Since CSR may be in lost link roaming situation, abort all + roaming related activities */ csrScanAbortMacScan(pMac, sessionId, eCSR_SCAN_ABORT_DEFAULT); csrRoamStopRoamingTimer(pMac, sessionId); } @@ -11120,9 +11178,10 @@ eHalStatus csrRoamLostLink( tpAniSirGlobal pMac, tANI_U32 sessionId, tANI_U32 ty pSession->joinFailStatusCode.reasonCode = (pDeauthIndMsg->reasonCode == eSIR_BEACON_MISSED) ? 0 : pDeauthIndMsg->reasonCode; - /* cfg layer expects 0 as reason code if - the driver dosent know the reason code - eSIR_BEACON_MISSED is defined as locally */ + /* + * cfg layer expects 0 as reason code if the driver doesn't know the + * reason code eSIR_BEACON_MISSED is defined as locally + */ } else { @@ -11183,7 +11242,7 @@ eHalStatus csrRoamLostLink( tpAniSirGlobal pMac, tANI_U32 sessionId, tANI_U32 ty { //Only remove the connected BSS in infrastructure mode csrRoamRemoveConnectedBssFromScanCache(pMac, &pSession->connectedProfile); - //Not to do anying for lostlink with WDS + /* Not to do anything for lost link with WDS */ if( pMac->roam.configParam.nRoamingTime ) { if(HAL_STATUS_SUCCESS(status = csrRoamStartRoaming(pMac, sessionId, @@ -11216,7 +11275,7 @@ eHalStatus csrRoamLostLink( tpAniSirGlobal pMac, tANI_U32 sessionId, tANI_U32 ty } else { - //We are told not to roam, indicate lostlink + /* We are told not to roam, indicate lost link */ fToRoam = eANI_BOOLEAN_FALSE; } } @@ -11285,7 +11344,7 @@ eHalStatus csrRoamLostLinkAfterhandoffFailure( tpAniSirGlobal pMac,tANI_U32 sess } else { - //We are told not to roam, indicate lostlink + /* We are told not to roam, indicate lost link */ status = eHAL_STATUS_FAILURE; } @@ -11360,8 +11419,10 @@ void csrRoamProcessWmStatusChangeCommand( tpAniSirGlobal pMac, tSmeCmd *pCommand smsLog(pMac, LOGE, FL(" failed to issue stopBSS command")); } } - // Lost Link just triggers a roaming sequence. We can complte the Lost Link - // command here since there is nothing else to do. + /* + * Lost Link just triggers a roaming sequence. We can complete the Lost Link + * command here since there is nothing else to do. + */ csrRoamWmStatusChangeComplete( pMac ); } @@ -11579,7 +11640,8 @@ static eCsrCfgDot11Mode csrRoamGetPhyModeBandForBss( tpAniSirGlobal pMac, tCsrRo cfgDot11Mode = eCSR_CFG_DOT11_MODE_11B; } - /* Incase of WEP Security encryption type is coming as part of add key. So while STart BSS dont have information */ + /* In-case of WEP Security encryption type is coming as part of add key. + So while STart BSS dont have information */ if( (!CSR_IS_11n_ALLOWED(pProfile->EncryptionType.encryptionType[0] ) || ((pProfile->privacy == 1) && (pProfile->EncryptionType.encryptionType[0] == eCSR_ENCRYPT_TYPE_NONE)) ) && ((eCSR_CFG_DOT11_MODE_11N == cfgDot11Mode) || #ifdef WLAN_FEATURE_11AC @@ -11684,7 +11746,7 @@ tPowerdBm csrGetCfgMaxTxPower (tpAniSirGlobal pMac, tANI_U8 channel) { goto error; } - /* Identify the channel and maxtxpower */ + /* Identify the channel and max txpower */ while (count <= (cfgLength - (sizeof(tSirMacChanInfo)))) { firstChannel = pCountryInfo[count++]; @@ -12845,7 +12907,7 @@ eRoamCmdStatus csrGetRoamCompleteStatus(tpAniSirGlobal pMac, tANI_U32 sessionId) return (retStatus); } -//This function remove the connected BSS from te cached scan result +/* This function remove the connected BSS from the cached scan result */ eHalStatus csrRoamRemoveConnectedBssFromScanCache(tpAniSirGlobal pMac, tCsrRoamConnectedProfile *pConnProfile) { @@ -13121,10 +13183,14 @@ static void csrPrepareJoinReassocReqBuffer( tpAniSirGlobal pMac, /* * The communication between HDD and LIM is thru mailbox (MB). * Both sides will access the data structure "tSirSmeJoinReq". - * The rule is, while the components of "tSirSmeJoinReq" can be accessed in the regular way like tSirSmeJoinReq.assocType, this guideline - * stops at component tSirRSNie; any acces to the components after tSirRSNie is forbidden because the space from tSirRSNie is quueezed - * with the component "tSirBssDescription". And since the size of actual 'tSirBssDescription' varies, the receiving side (which is the routine - * limJoinReqSerDes() of limSerDesUtils.cc) should keep in mind not to access the components DIRECTLY after tSirRSNie. + * The rule is, while the components of "tSirSmeJoinReq" can be accessed + * in the regular way like tSirSmeJoinReq.assocType, this guideline + * stops at component tSirRSNie; any access to the components after tSirRSNie + * is forbidden because the space from tSirRSNie is squeezed + * with the component "tSirBssDescription". And since the size of actual + * 'tSirBssDescription' varies, the receiving side (which is the routine + * limJoinReqSerDes() of limSerDesUtils.cc) should keep in mind not to access + * the components DIRECTLY after tSirRSNie. */ eHalStatus csrSendJoinReqMsg( tpAniSirGlobal pMac, tANI_U32 sessionId, tSirBssDescription *pBssDescription, tCsrRoamProfile *pProfile, tDot11fBeaconIEs *pIes, tANI_U16 messageType ) @@ -13147,7 +13213,7 @@ eHalStatus csrSendJoinReqMsg( tpAniSirGlobal pMac, tANI_U32 sessionId, tSirBssDe smsLog(pMac, LOGE, FL(" session %d not found "), sessionId); return eHAL_STATUS_FAILURE; } - /* To satisfy klockworks */ + if (NULL == pBssDescription) { smsLog(pMac, LOGE, FL(" pBssDescription is NULL")); @@ -13575,7 +13641,7 @@ eHalStatus csrSendJoinReqMsg( tpAniSirGlobal pMac, tANI_U32 sessionId, tSirBssDe /* A profile can not be both ESE and 11R. But an 802.11R AP * may be advertising support for ESE as well. So if we are * associating Open or explicitly ESE then we will get ESE. - * If we are associating explictly 11R only then we will get + * If we are associating explicitly 11R only then we will get * 11R. */ if ((csrIsProfileESE(pProfile) || @@ -14389,8 +14455,11 @@ eHalStatus csrSendMBSetContextReqMsg( tpAniSirGlobal pMac, tANI_U32 sessionId, keyLength, edType); do { if( ( 1 != numKeys ) && ( 0 != numKeys ) ) break; - // all of these fields appear in every SET_CONTEXT message. Below we'll add in the size for each - // key set. Since we only support upto one key, we always allocate memory for 1 key + /* + * All of these fields appear in every SET_CONTEXT message. + * Below we'll add in the size for each key set. Since we only support + * up to one key, we always allocate memory for 1 key. + */ msgLen = sizeof( tANI_U16) + sizeof( tANI_U16 ) + sizeof( tSirMacAddr ) + sizeof( tSirMacAddr ) + 1 + sizeof(tANI_U16) + sizeof( pMsg->keyMaterial.length ) + sizeof( pMsg->keyMaterial.edType ) + sizeof( pMsg->keyMaterial.numKeys ) + @@ -14789,7 +14858,7 @@ eHalStatus csrProcessAddStaSessionRsp( tpAniSirGlobal pMac, tANI_U8 *pMsg) //Remove this command out of the active list if(csrLLRemoveEntry(&pMac->sme.smeCmdActiveList, pEntry, LL_ACCESS_LOCK)) { - //Now put this command back on the avilable command list + /* Now put this command back on the available command list */ csrReleaseCommand(pMac, pCommand); } smeProcessPendingQueue( pMac ); @@ -14943,7 +15012,7 @@ eHalStatus csrRoamOpenSession(tpAniSirGlobal pMac, if (!HAL_STATUS_SUCCESS(status)) { smsLog(pMac, LOGE, - FL("cannot allocate memory for joinretry timer")); + FL("cannot allocate memory for join retry timer")); break; } #endif @@ -15017,7 +15086,7 @@ eHalStatus csrProcessDelStaSessionRsp( tpAniSirGlobal pMac, tANI_U8 *pMsg) //Remove this command out of the active list if(csrLLRemoveEntry(&pMac->sme.smeCmdActiveList, pEntry, LL_ACCESS_LOCK)) { - //Now put this command back on the avilable command list + /* Now put this command back on the available command list */ csrReleaseCommand(pMac, pCommand); } smeProcessPendingQueue( pMac ); @@ -15322,7 +15391,7 @@ static void csrRoamLinkUp(tpAniSirGlobal pMac, tCsrBssid bssid) #if defined WLAN_FEATURE_NEIGHBOR_ROAMING { tANI_U32 sessionId = 0; - /* Indicate the neighbor roal algorithm about the connect indication */ + /* Indicate the neighbor roam algorithm about the connect indication */ csrRoamGetSessionIdFromBSSID(pMac, (tCsrBssid *)bssid, &sessionId); csrNeighborRoamIndicateConnect(pMac, sessionId, VOS_STATUS_SUCCESS); } @@ -15345,7 +15414,7 @@ static void csrRoamLinkDown(tpAniSirGlobal pMac, tANI_U32 sessionId) return; } /* - * Incase of station mode, immediately stop data transmission whenever + * In-case of station mode, immediately stop data transmission whenever * link down is detected. */ if (csrRoamIsStaMode(pMac, sessionId) @@ -15362,7 +15431,7 @@ static void csrRoamLinkDown(tpAniSirGlobal pMac, tANI_U32 sessionId) csrRoamDeregStatisticsReq(pMac); pMac->roam.vccLinkQuality = eCSR_ROAM_LINK_QUAL_POOR_IND; #if defined WLAN_FEATURE_NEIGHBOR_ROAMING - /* Indicate the neighbor roal algorithm about the disconnect indication */ + /* Indicate the neighbor roam algorithm about the disconnect indication */ csrNeighborRoamIndicateDisconnect(pMac, sessionId); #endif @@ -15541,7 +15610,7 @@ void csrRoamStatsRspProcessor(tpAniSirGlobal pMac, tSirSmeRsp *pSirMsg) * in this 'stats' message. */ length = pSmeStatsRsp->msgLen - sizeof(tAniGetPEStatsRsp); - //new stats info from PE, fill up the stats strucutres in PMAC + /* New stats info from PE, fill up the stats structures in PMAC */ while(tempMask) { if(tempMask & 1) @@ -16094,7 +16163,7 @@ eHalStatus csrGetTsmStats(tpAniSirGlobal pMac, /* --------------------------------------------------------------------------- \fn csrGetTLSTAState - \helper function to get teh TL STA State whenever the function is called. + \helper function to get the TL STA State whenever the function is called. \param staId - The staID to be passed to the TL to get the relevant TL STA State @@ -16247,7 +16316,8 @@ eHalStatus csrGetStatistics(tpAniSirGlobal pMac, eCsrStatsRequesterType requeste } } - //request stats from TL rightaway if requested by client, update tlStatsReqInfo if needed + /* request stats from TL right away if requested by client, + update tlStatsReqInfo if needed */ if(statsMask & (1 << eCsrGlobalClassDStats)) { if(cache && pMac->roam.tlStatsReqInfo.numClient) @@ -17176,7 +17246,7 @@ void csrRoamReportStatistics(tpAniSirGlobal pMac, tANI_U32 statsMask, { if(tempMask & 1) { - //new stats info from PE, fill up the stats strucutres in PMAC + /* new stats info from PE, fill up the stats structures in PMAC */ switch(counter) { case eCsrSummaryStats: @@ -17388,8 +17458,11 @@ eHalStatus csrIsFullPowerNeeded( tpAniSirGlobal pMac, tSmeCmd *pCommand, fNeedFullPower = eANI_BOOLEAN_TRUE; break; default: - //Check whether the profile is already connected. If so, no need for full power - //Note: IBSS is ignored for now because we don't support powersave in IBSS + /* + * Check whether the profile is already connected. If so, + * no need for full power. Note: IBSS is ignored for now + * because we don't support power save in IBSS + */ if ( csrIsConnStateConnectedInfra(pMac, sessionId) && pBSSList ) { //Only need to check the first one @@ -18252,7 +18325,7 @@ VOS_STATUS csrSetCCKMIe(tpAniSirGlobal pMac, const tANI_U8 sessionId, last beacon or probe response reception from the hand off AP to arrive at the latest TSF value. \param pMac - pMac global structure - \param pTimestamp - output TSF timestamp + \param pTimestamp - output TSF time stamp \- return Success or failure -------------------------------------------------------------------------*/ VOS_STATUS csrRoamReadTSF(tpAniSirGlobal pMac, tANI_U8 *pTimestamp, diff --git a/CORE/SME/src/csr/csrApiScan.c b/CORE/SME/src/csr/csrApiScan.c index 481c9750fe69..4ac1d155bb74 100644 --- a/CORE/SME/src/csr/csrApiScan.c +++ b/CORE/SME/src/csr/csrApiScan.c @@ -55,17 +55,23 @@ #define MAX_CHN_TIME_TO_FIND_GO 100 #define DIRECT_SSID_LEN 7 -/* Purpose of HIDDEN_TIMER -** When we remove hidden ssid from the profile i.e., forget the SSID via GUI that SSID shouldn't see in the profile -** For above requirement we used timer limit, logic is explained below -** Timer value is initialsed to current time when it receives corresponding probe response of hidden SSID (The probe request is -** received regularly till SSID in the profile. Once it is removed from profile probe request is not sent.) when we receive probe response -** for broadcast probe request, during update SSID with saved SSID we will diff current time with saved SSID time if it is greater than 1 min -** then we are not updating with old one -*/ +/* + * Purpose of HIDDEN_TIMER + * When we remove hidden ssid from the profile i.e., forget the SSID via GUI + * that SSID shouldn't see in the profile for above requirement we used timer + * limit, logic is explained below timer value is initialized to current time + * when it receives corresponding probe response of hidden SSID + * (The probe request is received regularly till SSID in the profile. + * Once it is removed from profile probe request is not sent.) when we receive + * probe response for broadcast probe request, during update SSID with saved + * SSID we will diff current time with saved SSID time if it is greater than + * 1 min then we are not updating with old one. + */ #define HIDDEN_TIMER (1*60*1000) -#define CSR_SCAN_RESULT_RSSI_WEIGHT 80 // must be less than 100, represent the persentage of new RSSI + +/* Must be less than 100, represent the percentage of new RSSI */ +#define CSR_SCAN_RESULT_RSSI_WEIGHT 80 #define MAX_ACTIVE_SCAN_FOR_ONE_CHANNEL 140 #define MIN_ACTIVE_SCAN_FOR_ONE_CHANNEL 120 @@ -547,7 +553,6 @@ static void csrScan2GOnyRequest(tpAniSirGlobal pMac,tSmeCmd *pScanCmd, static tANI_U8 validchannelList[CSR_MAX_2_4_GHZ_SUPPORTED_CHANNELS] = {0}; VOS_ASSERT(pScanCmd && pScanRequest); - /* To silence the KW tool null check is added */ if((pScanCmd == NULL) || (pScanRequest == NULL)) { smsLog( pMac, LOGE, FL(" pScanCmd or pScanRequest is NULL ")); @@ -558,7 +563,7 @@ static void csrScan2GOnyRequest(tpAniSirGlobal pMac,tSmeCmd *pScanCmd, (eCSR_SCAN_REQUEST_FULL_SCAN != pScanRequest->requestType)) return; - //Contsruct valid Supported 2.4 GHz Channel List + /* Construct valid Supported 2.4 GHz Channel List */ for( index = 0; index < ARRAY_SIZE(channelList2G); index++ ) { channelId = channelList2G[index]; @@ -1056,7 +1061,7 @@ eHalStatus csrIssueRoamAfterLostlinkScan(tpAniSirGlobal pMac, tANI_U32 sessionId smsLog(pMac, LOG1, " csrIssueRoamAfterLostlinkScan called"); if(pSession->fCancelRoaming) { - smsLog(pMac, LOGW, " lostlink roaming is cancelled"); + smsLog(pMac, LOGW, " lost link roaming is canceled"); csrScanStartIdleScan(pMac); status = eHAL_STATUS_SUCCESS; break; @@ -1187,7 +1192,7 @@ eHalStatus csrScanHandleFailedLostlink1(tpAniSirGlobal pMac, tANI_U32 sessionId) return eHAL_STATUS_FAILURE; } - smsLog(pMac, LOGW, " Lostlink scan 1 failed"); + smsLog(pMac, LOGW, "Lost link scan 1 failed"); if(pSession->fCancelRoaming) { csrScanStartIdleScan(pMac); @@ -1198,18 +1203,18 @@ eHalStatus csrScanHandleFailedLostlink1(tpAniSirGlobal pMac, tANI_U32 sessionId) if(pSession->pCurRoamProfile->SSIDs.numOfSSIDs == 0 || pSession->pCurRoamProfile->SSIDs.numOfSSIDs > 1) { - //try lostlink scan2 + /* Try lost link scan2 */ status = csrScanRequestLostLink2(pMac, sessionId); } else if(!pSession->pCurRoamProfile->ChannelInfo.ChannelList || pSession->pCurRoamProfile->ChannelInfo.ChannelList[0] == 0) { - //go straight to lostlink scan3 + /* Go straight to lost link scan3 */ status = csrScanRequestLostLink3(pMac, sessionId); } else { - //we are done with lostlink + /* We are done with lost link */ if(csrRoamCompleteRoaming(pMac, sessionId, eANI_BOOLEAN_FALSE, eCSR_ROAM_RESULT_FAILURE)) { csrScanStartIdleScan(pMac); @@ -1238,7 +1243,7 @@ eHalStatus csrScanHandleFailedLostlink2(tpAniSirGlobal pMac, tANI_U32 sessionId) return eHAL_STATUS_FAILURE; } - smsLog(pMac, LOGW, " Lostlink scan 2 failed"); + smsLog(pMac, LOGW, "Lost link scan 2 failed"); if(pSession->fCancelRoaming) { csrScanStartIdleScan(pMac); @@ -1246,12 +1251,12 @@ eHalStatus csrScanHandleFailedLostlink2(tpAniSirGlobal pMac, tANI_U32 sessionId) else if(!pSession->pCurRoamProfile || !pSession->pCurRoamProfile->ChannelInfo.ChannelList || pSession->pCurRoamProfile->ChannelInfo.ChannelList[0] == 0) { - //try lostlink scan3 + /* Try lost link scan3 */ status = csrScanRequestLostLink3(pMac, sessionId); } else { - //we are done with lostlink + /* We are done with lost link */ if(csrRoamCompleteRoaming(pMac, sessionId, eANI_BOOLEAN_FALSE, eCSR_ROAM_RESULT_FAILURE)) { csrScanStartIdleScan(pMac); @@ -1267,10 +1272,10 @@ eHalStatus csrScanHandleFailedLostlink3(tpAniSirGlobal pMac, tANI_U32 sessionId) { eHalStatus status = eHAL_STATUS_SUCCESS; - smsLog(pMac, LOGW, " Lostlink scan 3 failed"); + smsLog(pMac, LOGW, "Lost link scan 3 failed"); if(eANI_BOOLEAN_TRUE == csrRoamCompleteRoaming(pMac, sessionId, eANI_BOOLEAN_FALSE, eCSR_ROAM_RESULT_FAILURE)) { - //we are done with lostlink + /* We are done with lost link */ csrScanStartIdleScan(pMac); } @@ -1707,7 +1712,7 @@ eHalStatus csrScanHandleSearchForSSID(tpAniSirGlobal pMac, tSmeCmd *pCommand) //In case of WDS station, let it retry. if( CSR_IS_WDS_STA(pProfile) ) { - //Save the roma profile so we can retry + /* Save the roam profile so we can retry */ csrFreeRoamProfile( pMac, sessionId ); pSession->pCurRoamProfile = vos_mem_malloc(sizeof(tCsrRoamProfile)); if ( NULL != pSession->pCurRoamProfile ) @@ -1818,7 +1823,7 @@ eHalStatus csrScanHandleSearchForSSIDFailure(tpAniSirGlobal pMac, tSmeCmd *pComm //In case of WDS station, let it retry. if( CSR_IS_WDS_STA(pProfile) ) { - //Save the roma profile so we can retry + /* Save the roam profile so we can retry */ csrFreeRoamProfile( pMac, sessionId ); pSession->pCurRoamProfile = vos_mem_malloc(sizeof(tCsrRoamProfile)); if ( NULL != pSession->pCurRoamProfile ) @@ -1994,7 +1999,7 @@ static tANI_U32 csrGetBssCapValue(tpAniSirGlobal pMac, tSirBssDescription *pBssD } -//To check whther pBss1 is better than pBss2 +/* To check whether pBss1 is better than pBss2 */ static tANI_BOOLEAN csrIsBetterBss(tCsrScanResult *pBss1, tCsrScanResult *pBss2) { tANI_BOOLEAN ret; @@ -2223,9 +2228,11 @@ eHalStatus csrScanGetResult(tpAniSirGlobal pMac, tCsrScanResultFilter *pFilter, { pBssDesc = GET_BASE_ADDR( pEntry, tCsrScanResult, Link ); pIes = (tDot11fBeaconIEs *)( pBssDesc->Result.pvIes ); - //if pBssDesc->Result.pvIes is NULL, we need to free any memory allocated by csrMatchBSS - //for any error condition, otherwiase, it will be freed later. - //reset + /* + * If pBssDesc->Result.pvIes is NULL, we need to free any memory + * allocated by csrMatchBSS for any error condition, otherwise, + * it will be freed later. + */ fMatch = eANI_BOOLEAN_FALSE; pNewIes = NULL; @@ -2797,7 +2804,7 @@ void csrCheckNSaveWscIe(tpAniSirGlobal pMac, tSirBssDescription *pNewBssDescr, t if((DOT11F_EID_WSCPROBERES == pbIe[0]) && (0x00 == pbIe[2]) && (0x50 == pbIe[3]) && (0xf2 == pbIe[4]) && (0x04 == pbIe[5])) { - //Founrd it + /* Found it */ if((DOT11F_IE_WSCPROBERES_MAX_LEN - 2) >= pbIe[1]) { vos_mem_copy(pNewBssDescr->WscIeProbeRsp, pbIe, pbIe[1] + 2); @@ -2907,7 +2914,7 @@ eHalStatus csrAddPMKIDCandidateList( tpAniSirGlobal pMac, tANI_U32 sessionId, // if yes, then add to PMKIDCandidateList vos_mem_copy(pSession->PmkidCandidateInfo[pSession->NumPmkidCandidate].BSSID, pBssDesc->bssId, VOS_MAC_ADDR_SIZE); - // Bit 0 offirst byte - PreAuthentication Capability + /* Bit 0 of first byte - PreAuthentication Capability */ if ( (pIes->RSN.RSN_Cap[0] >> 0) & 0x1 ) { pSession->PmkidCandidateInfo[pSession->NumPmkidCandidate].preAuthSupported @@ -3331,7 +3338,7 @@ eHalStatus csrSaveToChannelPower2G_5G( tpAniSirGlobal pMac, tANI_U32 tableSize, tANI_BOOLEAN f2GListPurged = FALSE, f5GListPurged = FALSE; pChannelInfo = channelTable; - // atleast 3 bytes have to be remaining -- from "countryString" + /* At-least 3 bytes have to be remaining -- from "countryString" */ while ( i-- ) { pChannelSet = vos_mem_malloc(sizeof(tCsrChannelPowerInfo)); @@ -3774,8 +3781,7 @@ void csrApplyCountryInformation( tpAniSirGlobal pMac, tANI_BOOLEAN fForce ) if( !csrIs11dSupported( pMac ) || 0 == pMac->scan.channelOf11dInfo) break; if( pMac->scan.fAmbiguous11dInfoFound ) { - // ambiguous info found - //Restore te default domain as well + /* Ambiguous info found; Restore the default domain as well */ if(HAL_STATUS_SUCCESS(csrGetRegulatoryDomainForCountry( pMac, pMac->scan.countryCodeCurrent, &domainId, COUNTRY_QUERY))) @@ -3919,9 +3925,12 @@ tANI_BOOLEAN csrSave11dCountryString( tpAniSirGlobal pMac, tANI_U8 *pCountryCode fCountryNotPresentInDriver = TRUE; } - // We've seen some of the AP's improperly put a 0 for the third character of the country code. - // spec says valid charcters are 'O' (for outdoor), 'I' for Indoor, or ' ' (space; for either). - // if we see a 0 in this third character, let's change it to a ' '. + /* + * We've seen some of the AP's improperly put a 0 for the third character + * of the country code. Spec says valid characters are 'O' (for outdoor), + * 'I' for Indoor, or ' ' (space; for either). + * if we see a 0 in this third character, let's change it to a ' '. + */ if ( 0 == pCountryCode[ 2 ] ) { pCountryCode[ 2 ] = ' '; @@ -4887,11 +4896,14 @@ static tANI_BOOLEAN csrScanValidateScanResult( tpAniSirGlobal pMac, tANI_U8 *pCh for( index = 0; index < numChn; index++ ) { - // This check relies on the fact that a single BSS description is returned in each - // ScanRsp call, which is the way LIM implemented the scan req/rsp funtions. We changed - // to this model when we ran with a large number of APs. If this were to change, then - // this check would have to mess with removing the bssDescription from somewhere in an - // arbitrary index in the bssDescription array. + /* + * This check relies on the fact that a single BSS description is + * returned in each ScanRsp call, which is the way LIM implemented + * the scan req/rsp functions. We changed to this model when we ran + * with a large number of APs. If this were to change, then this check + * would have to mess with removing the bssDescription from somewhere + * in an arbitrary index in the bssDescription array. + */ if ( pChannels[ index ] == pBssDesc->channelId ) { fValidChannel = TRUE; @@ -4937,10 +4949,12 @@ static tANI_BOOLEAN csrScanProcessScanResults( tpAniSirGlobal pMac, tSmeCmd *pCo tpCsrNeighborRoamControlInfo pNeighborRoamInfo = &pMac->roam.neighborRoamInfo[pScanRsp->sessionId]; - // don't consider the scan rsp to be valid if the status code is Scan Failure. Scan Failure - // is returned when the scan could not find anything. so if we get scan failure return that - // the scan response is invalid. Also check the lenght in the scan result for valid scan - // BssDescriptions.... + /* + * Don't consider the scan rsp to be valid if the status code is Scan + * Failure. Scan Failure is returned when the scan could not find anything. + * So if we get scan failure return that the scan response is invalid. + * Also check the length in the scan result for valid scan BssDescriptions. + */ do { if ( ( cbScanResult <= pScanRsp->length ) && @@ -5235,7 +5249,7 @@ eHalStatus csrScanSmeScanResponse( tpAniSirGlobal pMac, void *pMsgBuf ) pScanChnInfo = (tSmeGetScanChnRsp *)pMsgBuf; /* * status code not available in tSmeGetScanChnRsp, so - * by default considereing it to be success + * by default considering it to be success */ scanStatus = eSIR_SME_SUCCESS; csrScanAgeResults(pMac, pScanChnInfo); @@ -5251,8 +5265,11 @@ eHalStatus csrScanSmeScanResponse( tpAniSirGlobal pMac, void *pMsgBuf ) default: if(csrScanProcessScanResults( pMac, pCommand, pScanRsp, &fRemoveCommand )) { - //Not to get channel info if the scan is not a wildcard scan because - //it may cause scan results got aged out incorrectly. + /* + * Not to get channel info if the scan is not a + * wild card scan because it may cause scan results got + * aged out incorrectly. + */ if( csrScanIsWildCardScan( pMac, pCommand ) && (!pCommand->u.scanCmd.u.scanRequest.p2pSearch) #ifdef WLAN_FEATURE_ROAM_SCAN_OFFLOAD && (pCommand->u.scanCmd.reason != eCsrScanGetLfrResult) @@ -5438,7 +5455,8 @@ tANI_BOOLEAN csrScanAgeOutBss(tpAniSirGlobal pMac, tCsrScanResult *pResult) if( isConnBssfound ) { - //Reset the counter so that aging out of connected BSS won't hapeen too soon + /* Reset the counter so that aging out of connected BSS won't + happen too soon */ pResult->AgingCount = (tANI_S32)pMac->roam.configParam.agingCount; smsLog(pMac, LOGW, FL(" Connected BSS, Set Aging Count=%d for BSS "MAC_ADDRESS_STR" "), @@ -6819,9 +6837,12 @@ void csrScanIMPSCallback(void *callbackContext, eHalStatus status) } -//Param: pTimeInterval -- Caller allocated memory in return, if failed, to specify the nxt time interval for -//idle scan timer interval -//Return: Not success -- meaning it cannot start IMPS, caller needs to start a timer for idle scan +/* + * Param: pTimeInterval -- Caller allocated memory in return, if failed, + * to specify the next time interval for idle scan timer interval + * Return: Not success -- meaning it cannot start IMPS, caller needs to + * start a timer for idle scan + */ eHalStatus csrScanTriggerIdleScan(tpAniSirGlobal pMac, tANI_U32 *pTimeInterval) { eHalStatus status = eHAL_STATUS_CSR_WRONG_STATE; @@ -6974,7 +6995,7 @@ void csrScanCancelIdleScan(tpAniSirGlobal pMac) } smsLog(pMac, LOG1, " csrScanCancelIdleScan"); pMac->scan.fCancelIdleScan = eANI_BOOLEAN_TRUE; - //Set the restart flag in case later on it is uncancelled + /* Set the restart flag in case later on it is uncanceled */ pMac->scan.fRestartIdleScan = eANI_BOOLEAN_TRUE; csrScanStopIdleScanTimer(pMac); csrScanRemoveNotRoamingScanCommand(pMac); @@ -7391,7 +7412,7 @@ eHalStatus csrScanForSSID(tpAniSirGlobal pMac, tANI_U32 sessionId, tCsrRoamProfi { pScanCmd->u.scanCmd.u.scanRequest.uIEFieldLen = 0; } - /* For one channel be good enpugh time to receive beacon atleast */ + /* For one channel be good enough time to receive beacon at-least */ if( 1 == pProfile->ChannelInfo.numOfChannels ) { #if defined (WLAN_FEATURE_ROAM_SCAN_OFFLOAD) @@ -7515,9 +7536,11 @@ eHalStatus csrScanForSSID(tpAniSirGlobal pMac, tANI_U32 sessionId, tCsrRoamProfi } -//Issue a scan base on the new capability infomation -//This should only happen when the associated AP changes its capability. -//After this scan is done, CSR reroams base on the new scan results +/* + * Issue a scan based on the new capability information + * This should only happen when the associated AP changes its capability. + * After this scan is done, CSR re-roams based on the new scan results + */ eHalStatus csrScanForCapabilityChange(tpAniSirGlobal pMac, tSirSmeApNewCaps *pNewCaps) { eHalStatus status = eHAL_STATUS_INVALID_PARAMETER; @@ -7706,9 +7729,12 @@ void csrSaveTxPowerToCfg( tpAniSirGlobal pMac, tDblLinkList *pList, tANI_U32 cfg pChannelSet = GET_BASE_ADDR( pEntry, tCsrChannelPowerInfo, link ); if ( 1 != pChannelSet->interChannelOffset ) { - // we keep the 5G channel sets internally with an interchannel offset of 4. Expand these - // to the right format... (inter channel offset of 1 is the only option for the triplets - // that 11d advertises. + /* + * we keep the 5G channel sets internally with an inter channel + * offset of 4. Expand these to the right format. + * (inter channel offset of 1 is the only option for the + * triplets that 11d advertises. + */ if ((cbLen + (pChannelSet->numChannels * sizeof(tSirMacChanInfo))) >= dataLen) { // expanding this entry will overflow our allocation @@ -7907,7 +7933,7 @@ eHalStatus csrProcessSetBGScanParam(tpAniSirGlobal pMac, tSmeCmd *pCommand) //Not set the background scan interval if not connected because bd scan should not be run if not connected if(!csrIsAllSessionDisconnected(pMac)) { - //If disbaling BG scan here, we need to stop aging as well + /* If disabling BG scan here, we need to stop aging as well */ if(pScanReq->scanInterval == 0) { //Stop aging because no new result is coming in @@ -8365,11 +8391,10 @@ eHalStatus csrScanSavePreferredNetworkFound(tpAniSirGlobal pMac, vos_mem_set(pScanResult, sizeof(tCsrScanResult) + uLen, 0); pBssDescr = &pScanResult->Result.BssDescriptor; - /** - * Length of BSS desription is without length of - * length itself and length of pointer - * that holds the next BSS description - */ + /* + * Length of BSS description is without length of length itself and length + * of pointer that holds the next BSS description + */ pBssDescr->length = (tANI_U16)( sizeof(tSirBssDescription) - sizeof(tANI_U16) - sizeof(tANI_U32) + uLen); diff --git a/CORE/SME/src/csr/csrInsideApi.h b/CORE/SME/src/csr/csrInsideApi.h index 6df3bada4a81..e2ce5925828f 100644 --- a/CORE/SME/src/csr/csrInsideApi.h +++ b/CORE/SME/src/csr/csrInsideApi.h @@ -70,8 +70,8 @@ #define CSR_MAX_BSS_SUPPORT 250 #define SYSTEM_TIME_MSEC_TO_USEC 1000 -//This number minus 1 means the number of times a channel is scanned before a BSS is remvoed from -//cache scan result +/* This number minus 1 means the number of times a channel is scanned + before a BSS is removed from cache scan result */ #define CSR_AGING_COUNT 3 //The following defines are used by palTimer //This is used for palTimer when request to imps fails @@ -166,9 +166,15 @@ typedef struct tagCsrScanResult tListElem Link; tANI_S32 AgingCount; //This BSS is removed when it reaches 0 or less tANI_U32 preferValue; //The bigger the number, the better the BSS. This value override capValue - tANI_U32 capValue; //The biggger the better. This value is in use only if we have equal preferValue - //This member must be the last in the structure because the end of tSirBssDescription (inside) is an - // array with nonknown size at this time + + /* The bigger the better. This value is in use only if + we have equal preferValue */ + tANI_U32 capValue; + + /* + * This member must be the last in the structure because the end of + * tSirBssDescription (inside) is an array with non known size at this time + */ eCsrEncryptionType ucEncryptionType; //Preferred Encryption type that matched with profile. eCsrEncryptionType mcEncryptionType; @@ -269,8 +275,8 @@ eHalStatus csrScanBGScanEnable(tpAniSirGlobal pMac); eHalStatus csrScanStartIdleScanTimer(tpAniSirGlobal pMac, tANI_U32 interval); eHalStatus csrScanStopIdleScanTimer(tpAniSirGlobal pMac); eHalStatus csrScanStartIdleScan(tpAniSirGlobal pMac); -//Param: pTimeInterval -- Caller allocated memory in return, if failed, to specify the nxt time interval for -//idle scan timer interval +/* Param: pTimeInterval -- Caller allocated memory in return, if failed, + to specify the next time interval for idle scan timer interval */ //Return: Not success -- meaning it cannot start IMPS, caller needs to start a timer for idle scan eHalStatus csrScanTriggerIdleScan(tpAniSirGlobal pMac, tANI_U32 *pTimeInterval); void csrScanCancelIdleScan(tpAniSirGlobal pMac); @@ -426,7 +432,7 @@ eHalStatus csrRoamOpenSession(tpAniSirGlobal pMac, void *pContext, tANI_U8 *pSelfMacAddr, tANI_U8 *pbSessionId, tANI_U32 type, tANI_U32 subType ); -//fSync: TRUE means cleanupneeds to handle synchronously. +/* fSync: TRUE means clean up needs to handle synchronously. */ eHalStatus csrRoamCloseSession( tpAniSirGlobal pMac, tANI_U32 sessionId, tANI_BOOLEAN fSync, csrRoamSessionCloseCallback callback, @@ -445,8 +451,8 @@ eHalStatus csrScanEnable(tpAniSirGlobal); /* --------------------------------------------------------------------------- \fn csrScanDisable - \brief Disableing the scanning feature of CSR. After this function return success, no scan is performed until -a successfull to csrScanEnable + \brief Disabling the scanning feature of CSR. After this function return + success, no scan is performed until a successful to csrScanEnable \param tHalHandle - HAL context handle \return eHalStatus -------------------------------------------------------------------------------*/ @@ -535,8 +541,8 @@ eHalStatus csrGetCountryCode(tpAniSirGlobal pMac, tANI_U8 *pBuf, tANI_U8 *pbLen) /* --------------------------------------------------------------------------- \fn csrSetCountryCode - \brief this function is to set the country code so channel/power setting matches the countrycode and - the domain it belongs to. + \brief this function is to set the country code so channel/power + setting matches the country code and the domain it belongs to. \param pCountry - Caller allocated buffer with at least 3 bytes specifying the country code \param pfRestartNeeded - pointer to a caller allocated space. Upon successful return, it indicates whether a restart is needed to apply the change @@ -708,7 +714,7 @@ int diagEncTypeFromCSRType(eCsrEncryptionType encType); \fn csrScanResultPurge \brief remove all items(tCsrScanResult) in the list and free memory for each item \param hScanResult - returned from csrScanGetResult. hScanResult is considered gone by - calling this function and even before this function reutrns. + calling this function and even before this function returns. \return eHalStatus -------------------------------------------------------------------------------*/ eHalStatus csrScanResultPurge(tpAniSirGlobal pMac, tScanResultHandle hScanResult); @@ -718,7 +724,7 @@ eHalStatus csrScanResultPurge(tpAniSirGlobal pMac, tScanResultHandle hScanResult /* --------------------------------------------------------------------------- \fn csrRoamConnect - \brief To inititiate an association + \brief To initiate an association \param pProfile - can be NULL to join to any open ones \param hBssListIn - a list of BSS descriptor to roam to. It is returned from csrScanGetResult \param pRoamId - to get back the request ID @@ -729,7 +735,7 @@ eHalStatus csrRoamConnect(tpAniSirGlobal pMac, tANI_U32 sessionId, tCsrRoamProfi /* --------------------------------------------------------------------------- \fn csrRoamReassoc - \brief To inititiate a re-association + \brief To initiate a re-association \param pProfile - can be NULL to join the currently connected AP. In that case modProfileFields should carry the modified field(s) which could trigger reassoc @@ -755,8 +761,9 @@ eHalStatus csrRoamReconnect(tpAniSirGlobal pMac, tANI_U32 sessionId); \fn csrRoamSetPMKIDCache \brief return the PMKID candidate list \param pPMKIDCache - caller allocated buffer point to an array of tPmkidCacheInfo - \param numItems - a variable that has the number of tPmkidCacheInfo allocated - when retruning, this is either the number needed or number of items put into pPMKIDCache + \param numItems - A variable that has the number of tPmkidCacheInfo allocated + when returning, this is either the number needed or + number of items put into pPMKIDCache \return eHalStatus - when fail, it usually means the buffer allocated is not big enough and pNumItems has the number of tPmkidCacheInfo. \Note: pNumItems is a number of tPmkidCacheInfo, not sizeof(tPmkidCacheInfo) * something @@ -870,7 +877,7 @@ eHalStatus csrInitChannelList( tHalHandle hHal ); \brief The CSR API exposed for HDD to provide config params to CSR during SMEs stop -> start sequence. If HDD changed the domain that will cause a reset. This function will - provide the new set of 11d information for the new domain. Currrently this + provide the new set of 11d information for the new domain. Currently this API provides info regarding 11d only at reset but we can extend this for other params (PMC, QoS) which needs to be initialized again at reset. \param @@ -896,7 +903,8 @@ eHalStatus csrRoamConnectToLastProfile(tpAniSirGlobal pMac, tANI_U32 sessionId); /* --------------------------------------------------------------------------- \fn csrRoamDisconnect \brief To disconnect from a network - \param reason -- To indicate the reason for disconnecting. Currently, only eCSR_DISCONNECT_REASON_MIC_ERROR is meanful. + \param reason -- To indicate the reason for disconnecting. Currently, + only eCSR_DISCONNECT_REASON_MIC_ERROR is meaningful. \return eHalStatus -------------------------------------------------------------------------------*/ eHalStatus csrRoamDisconnect(tpAniSirGlobal pMac, tANI_U32 sessionId, eCsrRoamDisconnectReason reason); @@ -905,8 +913,10 @@ eHalStatus csrRoamDisconnect(tpAniSirGlobal pMac, tANI_U32 sessionId, eCsrRoamDi \fn csrScanGetPMKIDCandidateList \brief return the PMKID candidate list \param pPmkidList - caller allocated buffer point to an array of tPmkidCandidateInfo - \param pNumItems - pointer to a variable that has the number of tPmkidCandidateInfo allocated - when retruning, this is either the number needed or number of items put into pPmkidList + \param pNumItems - pointer to a variable that has the number of + tPmkidCandidateInfo allocated when returning, this is + either the number needed or number of items put into + pPmkidList. \return eHalStatus - when fail, it usually means the buffer allocated is not big enough and pNumItems has the number of tPmkidCandidateInfo. \Note: pNumItems is a number of tPmkidCandidateInfo, not sizeof(tPmkidCandidateInfo) * something @@ -965,7 +975,8 @@ eHalStatus csrSendMBTkipCounterMeasuresReqMsg( tpAniSirGlobal pMac, tANI_U32 ses \param modId - module ID - PE/HAL/TL \param pUsrContext - Opaque HDD context \param pfnSapEventCallback - Sap event callback in HDD - \param pAssocStasBuf - Caller allocated memory to be filled with associatd stations info + \param pAssocStasBuf - Caller allocated memory to be filled with associated + stations info \return eHalStatus ---------------------------------------------------------------------------*/ eHalStatus csrRoamGetAssociatedStas( tpAniSirGlobal pMac, tANI_U32 sessionId, VOS_MODULE_ID modId, diff --git a/CORE/SME/src/csr/csrNeighborRoam.c b/CORE/SME/src/csr/csrNeighborRoam.c index e22549b85858..59563f2c3cdc 100644 --- a/CORE/SME/src/csr/csrNeighborRoam.c +++ b/CORE/SME/src/csr/csrNeighborRoam.c @@ -231,7 +231,7 @@ tpCsrNeighborRoamBSSInfo csrNeighborRoamGetRoamableAPListNextEntry(tpAniSirGloba \fn csrNeighborRoamFreeRoamableBSSList - \brief Empties and frees all the nodes in the roamable AP list + \brief Empties and frees all the nodes in the roam able AP list \param pMac - The handle returned by macOpen. pList - Neighbor Roam BSS List to be emptied @@ -340,7 +340,7 @@ static void csrNeighborRoamTriggerHandoff(tpAniSirGlobal pMac, } else { - smsLog(pMac, LOGE, FL("Non-11R Reassoc indication received in unexpected state %s or Roaming is diisabled"), + smsLog(pMac, LOGE, FL("Non-11R Reassoc indication received in unexpected state %s or Roaming is disabled"), macTraceGetNeighbourRoamState( pNeighborRoamInfo->neighborRoamState)); } @@ -479,7 +479,7 @@ VOS_STATUS csrNeighborRoamUpdateEseModeEnabled(tpAniSirGlobal pMac, FL("Failed to register RSSI indication callback: Status = %d"), vosStatus); - /* Registration failed, freeup user context */ + /* Registration failed, free the user context */ vos_mem_free(pUsrCtx); vosStatus = VOS_STATUS_E_FAILURE; } @@ -582,7 +582,7 @@ VOS_STATUS csrNeighborRoamSetLookupRssiThreshold(tpAniSirGlobal pMac, FL("Failed to register DOWN event with TL: Status = %d"), vosStatus); - /* Registration failed, freeup user context as well */ + /* Registration failed, free the user context */ vos_mem_free(pUsrCtx); vosStatus = VOS_STATUS_E_FAILURE; } @@ -879,7 +879,7 @@ csrNeighborRoamSetRoamBeaconRssiWeight(tpAniSirGlobal pMac, \fn csrNeighborRoamReassocIndCallback \brief Reassoc callback invoked by TL on crossing the registered re-assoc threshold. - Directly triggere HO in case of non-11r association + Directly trigger HO in case of non-11r association In case of 11R association, triggers a pre-auth eventually followed by actual HO \param pAdapter - VOS Context @@ -1166,7 +1166,7 @@ void csrNeighborRoamResetReportScanStateControlInfo(tpAniSirGlobal pMac, vos_timer_stop(&pNeighborRoamInfo->neighborResultsRefreshTimer); /* Stop empty scan results refresh timer */ vos_timer_stop(&pNeighborRoamInfo->emptyScanRefreshTimer); - /* Purge roamable AP list */ + /* Purge roam able AP list */ csrNeighborRoamFreeRoamableBSSList(pMac, &pNeighborRoamInfo->roamableAPList); return; } @@ -1210,8 +1210,8 @@ void csrNeighborRoamResetInitStateControlInfo(tpAniSirGlobal pMac, \param pMac - The handle returned by macOpen. pScanFilter - Scan filter to be filled and returned - \return eHAL_STATUS_SUCCESS on succesful filter creation, corresponding error - code otherwise + \return eHAL_STATUS_SUCCESS on successful filter creation, corresponding + error code otherwise ---------------------------------------------------------------------------*/ static eHalStatus csrNeighborRoamBssIdScanFilter(tpAniSirGlobal pMac, @@ -1361,7 +1361,7 @@ tANI_BOOLEAN csrNeighborRoamIsPreauthCandidate(tpAniSirGlobal pMac, \fn csrNeighborRoamIssuePreauthReq \brief This function issues preauth request to PE with the 1st AP entry in the - roamable AP list + roam able AP list \param pMac - The handle returned by macOpen. @@ -1388,9 +1388,13 @@ static eHalStatus csrNeighborRoamIssuePreauthReq(tpAniSirGlobal pMac, } /* Issue Preauth request to PE here */ - /* Need to issue the preauth request with the BSSID that is there in the head of the roamable AP list */ - /* Parameters that should be passed are BSSID, Channel number and the neighborScanPeriod(probably) */ - /* If roamableAPList gets empty, should transition to REPORT_SCAN state */ + /* + * Need to issue the preauth request with the BSSID that is there in the + * head of the roam able AP list + * Parameters that should be passed are BSSID, Channel number and the + * neighborScanPeriod(probably) + * If roamableAPList gets empty, should transition to REPORT_SCAN state + */ pNeighborBssNode = csrNeighborRoamGetRoamableAPListNextEntry(pMac, &pNeighborRoamInfo->roamableAPList, NULL); if (NULL == pNeighborBssNode) @@ -1454,9 +1458,9 @@ static eHalStatus csrNeighborRoamIssuePreauthReq(tpAniSirGlobal pMac, \brief This function handle the Preauth response from PE Every preauth is allowed max 3 tries if it fails. If a bssid failed for more than MAX_TRIES, we will remove it from the list and try - with the next node in the roamable AP list and add the BSSID to pre-auth failed - list. If no more entries present in - roamable AP list, transition to REPORT_SCAN state + with the next node in the roam able AP list and add the BSSID + to pre-auth failed list. If no more entries present in + roam able AP list, transition to REPORT_SCAN state \param pMac - The handle returned by macOpen. limStatus - eSIR_SUCCESS/eSIR_FAILURE/eSIR_LIM_MAX_STA_REACHED_ERROR/ @@ -1544,7 +1548,8 @@ eHalStatus csrNeighborRoamPreauthRspHandler(tpAniSirGlobal pMac, } #endif - /* Preauth competer successfully. Insert the preauthenticated node to tail of preAuthDoneList */ + /* Preauth completed successfully. Insert the preauthenticated + node to tail of preAuthDoneList */ csrNeighborRoamRemoveRoamableAPListEntry(pMac, &pNeighborRoamInfo->roamableAPList, pPreauthRspNode); csrLLInsertTail(&pNeighborRoamInfo->FTRoamInfo.preAuthDoneList, &pPreauthRspNode->List, LL_ACCESS_LOCK); @@ -1554,8 +1559,11 @@ eHalStatus csrNeighborRoamPreauthRspHandler(tpAniSirGlobal pMac, sessionId) pNeighborRoamInfo->FTRoamInfo.numPreAuthRetries = 0; - /* The caller of this function would start a timer and by the time it expires, supplicant should - have provided the updated FTIEs to SME. So, when it expires, handoff will be triggered then */ + /* + * The caller of this function would start a timer and by the time it + * expires, supplicant should have provided the updated FTIEs to SME. + * So, when it expires, handoff will be triggered then + */ } else { @@ -1565,7 +1573,8 @@ eHalStatus csrNeighborRoamPreauthRspHandler(tpAniSirGlobal pMac, smsLog(pMac, LOGE, FL("Preauth failed retry number %d, status = 0x%x"), pNeighborRoamInfo->FTRoamInfo.numPreAuthRetries, limStatus); - /* Preauth failed. Add the bssId to the preAuth failed list MAC Address. Also remove the AP from roamable AP list */ + /* Preauth failed. Add the bssId to the preAuth failed list MAC Address. + Also remove the AP from roam able AP list */ if ((pNeighborRoamInfo->FTRoamInfo.numPreAuthRetries >= CSR_NEIGHBOR_ROAM_MAX_NUM_PREAUTH_RETRIES) || (eSIR_LIM_MAX_STA_REACHED_ERROR == limStatus)) @@ -1846,7 +1855,7 @@ csrNeighborRoamPrepareScanProfileFilter(tpAniSirGlobal pMac, pScanFilter->BSSType = pCurProfile->BSSType; - /* We are intrested only in the scan results on channels that we scanned */ + /* We are interested only in the scan results on channels that we scanned */ pScanFilter->ChannelInfo.numOfChannels = pNeighborRoamInfo->roamChannelInfo.currentChannelListInfo.numOfChannels; pScanFilter->ChannelInfo.ChannelList = vos_mem_malloc(pScanFilter->ChannelInfo.numOfChannels * sizeof(tANI_U8)); if (NULL == pScanFilter->ChannelInfo.ChannelList) @@ -1990,7 +1999,7 @@ csrNeighborRoamProcessScanResults(tpAniSirGlobal pMac, (VOS_TRUE != vos_mem_compare(pScanResult->BssDescriptor.bssId, pNeighborRoamInfo->cfgRoambssId, sizeof(tSirMacAddr))))) { /* - * currently associated AP. Do not have this in the roamable AP + * currently associated AP. Do not have this in the roam able AP * list */ VOS_TRACE (VOS_MODULE_ID_SME, VOS_TRACE_LEVEL_INFO, @@ -2148,8 +2157,8 @@ csrNeighborRoamProcessScanResults(tpAniSirGlobal pMac, #endif /* FEATURE_WLAN_LFR */ /* - * If the received timestamp in BSS description is earlier than the - * scan request timestamp, skip this result + * If the received times tamp in BSS description is earlier than the + * scan request time stamp, skip this result */ if ((pNeighborRoamInfo->scanRequestTimeStamp >= pScanResult->BssDescriptor.nReceivedTime) @@ -2159,7 +2168,7 @@ csrNeighborRoamProcessScanResults(tpAniSirGlobal pMac, ) { smsLog(pMac, LOGE, FL("Ignoring BSS as it is older than the scan request " - "timestamp")); + "time stamp")); continue; } @@ -2258,7 +2267,7 @@ csrNeighborRoamProcessScanResults(tpAniSirGlobal pMac, * iterations and no candidate were found */ if (ageConstraint == eANI_BOOLEAN_FALSE) { VOS_TRACE (VOS_MODULE_ID_SME, VOS_TRACE_LEVEL_ERROR, - "%s: No roamable candidates found", __func__); + "%s: No roam able candidates found", __func__); break; } /* @@ -2292,8 +2301,8 @@ csrNeighborRoamProcessScanResults(tpAniSirGlobal pMac, 2b. Else if this is the second time we encountered empty scan, then start neighbor scan results refresh timer (20s). 2c. Else, nothing more to do. - NOTE: In LFR, channels selected for scanning is dervied from - the occuped channel list. Scan cycle following one which + NOTE: In LFR, channels selected for scanning is derived from + the occupied channel list. Scan cycle following one which yielded empty results is split into two halves: (i) scan on channels in the occupied list, and (ii) scan on channels not in the occupied list. This helps converging faster (while @@ -2554,7 +2563,7 @@ static eHalStatus csrNeighborRoamProcessScanComplete (tpAniSirGlobal pMac, { NEIGHBOR_ROAM_DEBUG(pMac, LOGE, FL("Get Scan Result status code %d"), hstatus); } - /* Process the scan results and update roamable AP list */ + /* Process the scan results and update roam able AP list */ roamNow = csrNeighborRoamProcessScanResults(pMac, sessionId, &scanResult); @@ -2581,50 +2590,51 @@ static eHalStatus csrNeighborRoamProcessScanComplete (tpAniSirGlobal pMac, pNeighborRoamInfo->uScanMode = DEFAULT_SCAN; #endif #ifdef WLAN_FEATURE_VOWIFI_11R - /* If this is a non-11r association, then we can register the reassoc callback here as we have some - APs in the roamable AP list */ - if (pNeighborRoamInfo->is11rAssoc) - { - /* Valid APs are found after scan. Now we can initiate pre-authentication */ + /* + * If this is a non-11r association, then we can register + * the reassoc callback here as we have some APs in the + * roam able AP list + */ + if (pNeighborRoamInfo->is11rAssoc) { + /* Valid APs are found after scan. Now we can initiate + pre-authentication */ CSR_NEIGHBOR_ROAM_STATE_TRANSITION( eCSR_NEIGHBOR_ROAM_STATE_REPORT_SCAN, sessionId) - } - else + } else #endif #ifdef FEATURE_WLAN_ESE - /* If this is a non-11r association, then we can register the reassoc callback here as we have some - APs in the roamable AP list */ - if (pNeighborRoamInfo->isESEAssoc) - { - /* Valid APs are found after scan. Now we can initiate pre-authentication */ + /* + * If this is a non-11r association, then we can register + * the reassoc callback here as we have some APs in the + * roam able AP list + */ + if (pNeighborRoamInfo->isESEAssoc) { + /* Valid APs are found after scan. Now we can initiate + pre-authentication */ CSR_NEIGHBOR_ROAM_STATE_TRANSITION( eCSR_NEIGHBOR_ROAM_STATE_REPORT_SCAN, sessionId) - } - else + } else #endif #ifdef FEATURE_WLAN_LFR - /* If LFR is enabled, then we can register the reassoc callback here as we have some - APs in the roamable AP list */ - if (csrRoamIsFastRoamEnabled(pMac, sessionId)) - { - /* Valid APs are found after scan. Now we can initiate pre-authentication */ + /* + * If LFR is enabled, then we can register the reassoc + * callback here as we have some APs in the roam able + * AP list + */ + if (csrRoamIsFastRoamEnabled(pMac, sessionId)) { + /* Valid APs are found after scan. Now we can initiate + pre-authentication */ CSR_NEIGHBOR_ROAM_STATE_TRANSITION( eCSR_NEIGHBOR_ROAM_STATE_REPORT_SCAN, sessionId) - } - else + } else #endif { NEIGHBOR_ROAM_DEBUG(pMac, LOGE, FL("Completed scanning of CFG CHAN LIST in non-11r association. Registering reassoc callback")); /* Nothing much to do now. Will continue to remain in this state in case of non-11r association */ - /* Stop the timer. But how long the roamable AP list will be valid in here. At some point of time, we - need to restart the CFG CHAN list scan procedure if reassoc callback is not invoked from TL - within certain duration */ - -// vos_timer_stop(&pNeighborRoamInfo->neighborScanTimer); } } else @@ -3412,10 +3422,10 @@ void csrNeighborRoamEmptyScanRefreshTimerCallback(void *context) \fn csrNeighborRoamResultsRefreshTimerCallback - \brief This function is the timer callback function for results refresh timer. - When this is invoked, it is as good as down event received from TL. So, - clear off the roamable AP list and start the scan procedure based on 11R - or non-11R association + \brief This function is the timer callback function for results + refresh timer. When this is invoked, it is as good as down event + received from TL. So, clear off the roam able AP list and start + the scan procedure based on 11R or non-11R association \param context - CSR timer context info which includes pMac and session ID @@ -3857,7 +3867,8 @@ void csrNeighborRoamRRMNeighborReportResult(void *context, VOS_STATUS vosStatus) NEIGHBOR_ROAM_DEBUG(pMac, LOGE, FL("Channel List created from Neighbor report, Transitioning to NEIGHBOR_SCAN state")); } - /* We are gonna scan now. Remember the time stamp to filter out results only after this timestamp */ + /* We are gonna scan now. Remember the time stamp to filter out + results only after this time stamp */ pNeighborRoamInfo->scanRequestTimeStamp = (tANI_TIMESTAMP)palGetTickCount(pMac->hHdd); /* Now ready for neighbor scan based on the channel list created */ @@ -4404,7 +4415,8 @@ VOS_STATUS csrNeighborRoamTransitToCFGChanScan(tpAniSirGlobal pMac, } } - /* We are gonna scan now. Remember the time stamp to filter out results only after this timestamp */ + /* We are gonna scan now. Remember the time stamp to filter out results + only after this time stamp */ pNeighborRoamInfo->scanRequestTimeStamp = (tANI_TIMESTAMP)palGetTickCount(pMac->hHdd); vos_timer_stop(&pNeighborRoamInfo->neighborScanTimer); @@ -4511,9 +4523,9 @@ VOS_STATUS csrNeighborRoamNeighborLookupUpEvent(tpAniSirGlobal pMac, \fn csrNeighborRoamNeighborLookupDownEvent \brief This function is called as soon as TL indicates that the current AP's - RSSI falls below the current eighbor lookup threshold. Here, we transition to - REPORT_QUERY for 11r association and CFG_CHAN_LIST_SCAN state if the assoc is - a non-11R association. + RSSI falls below the current neighbor lookup threshold. + Here, we transition to REPORT_QUERY for 11r association and + CFG_CHAN_LIST_SCAN state if the assoc is a non-11R association. \param pMac - The handle returned by macOpen. \param sessionId - Session Id @@ -5393,7 +5405,7 @@ eHalStatus csrNeighborRoamInit(tpAniSirGlobal pMac, tANI_U8 sessionId) status = csrLLOpen(pMac->hHdd, &pNeighborRoamInfo->roamableAPList); if (eHAL_STATUS_SUCCESS != status) { - smsLog(pMac, LOGE, FL("LL Open of roamable AP List failed")); + smsLog(pMac, LOGE, FL("LL Open of roam able AP List failed")); vos_mem_free(pNeighborRoamInfo->cfgParams.channelInfo.ChannelList); pNeighborRoamInfo->cfgParams.channelInfo.ChannelList = NULL; vos_timer_destroy(&pNeighborRoamInfo->neighborScanTimer); @@ -5412,7 +5424,7 @@ eHalStatus csrNeighborRoamInit(tpAniSirGlobal pMac, tANI_U8 sessionId) status = csrNeighborRoamInit11rAssocInfo(pMac); if (eHAL_STATUS_SUCCESS != status) { - smsLog(pMac, LOGE, FL("LL Open of roamable AP List failed")); + smsLog(pMac, LOGE, FL("LL Open of roam able AP List failed")); vos_mem_free(pNeighborRoamInfo->cfgParams.channelInfo.ChannelList); pNeighborRoamInfo->cfgParams.channelInfo.ChannelList = NULL; vos_timer_destroy(&pNeighborRoamInfo->neighborScanTimer); @@ -5505,8 +5517,8 @@ void csrNeighborRoamClose(tpAniSirGlobal pMac, tANI_U8 sessionId) \fn csrNeighborRoamRequestHandoff \brief This function triggers actual switching from one AP to the new AP. - It issues disassociate with reason code as Handoff and CSR as a part of - handling disassoc rsp, issues reassociate to the new AP + It issues disassociate with reason code as Handoff and CSR as a + part of handling disassoc rsp, issues reassociate to the new AP \param pMac - The handle returned by macOpen. @@ -5571,8 +5583,11 @@ void csrNeighborRoamRequestHandoff(tpAniSirGlobal pMac, tANI_U8 sessionId) /* Free the profile.. Just to make sure we dont leak memory here */ csrReleaseProfile(pMac, &pNeighborRoamInfo->csrNeighborRoamProfile); - /* Create the Handoff AP profile. Copy the currently connected profile and update only the BSSID and channel number - This should happen before issuing disconnect */ + /* + * Create the Handoff AP profile. Copy the currently connected profile and + * update only the BSSID and channel number. This should happen before + * issuing disconnect. + */ csrRoamCopyConnectedProfile(pMac, sessionId, &pNeighborRoamInfo->csrNeighborRoamProfile); vos_mem_copy(pNeighborRoamInfo->csrNeighborRoamProfile.BSSIDs.bssid, handoffNode.pBssDescription->bssId, sizeof(tSirMacAddr)); @@ -5586,7 +5601,7 @@ void csrNeighborRoamRequestHandoff(tpAniSirGlobal pMac, tANI_U8 sessionId) return; } - //notify HDD for handoff, providing the BSSID too + /* Notify HDD for handoff, providing the BSSID too */ roamInfo.reasonCode = eCsrRoamReasonBetterAP; vos_mem_copy(roamInfo.bssid, @@ -5603,8 +5618,8 @@ void csrNeighborRoamRequestHandoff(tpAniSirGlobal pMac, tANI_U8 sessionId) \fn csrNeighborRoamIsHandoffInProgress - \brief This function returns whether handoff is in progress or not based on - the current neighbor roam state + \brief This function returns whether hand-off is in progress or not based + on the current neighbor roam state \param pMac - The handle returned by macOpen. is11rReassoc - Return whether reassoc is of type 802.11r reassoc @@ -5645,12 +5660,12 @@ tANI_BOOLEAN csrNeighborRoamIs11rAssoc(tpAniSirGlobal pMac, tANI_U8 sessionId) \fn csrNeighborRoamGetHandoffAPInfo - \brief This function returns the best possible AP for handoff. For 11R case, it - returns the 1st entry from pre-auth done list. For non-11r case, it returns - the 1st entry from roamable AP list + \brief This function returns the best possible AP for handoff. + For 11R case, it returns the 1st entry from pre-auth done list. + For non-11r case, it returns the 1st entry from roam able AP list \param pMac - The handle returned by macOpen. - pHandoffNode - AP node that is the handoff candidate returned + pHandoffNode - AP node that is the hand-off candidate returned \return VOID @@ -5681,24 +5696,30 @@ void csrNeighborRoamGetHandoffAPInfo(tpAniSirGlobal pMac, #ifdef FEATURE_WLAN_ESE if (pNeighborRoamInfo->isESEAssoc) { - /* Always the BSS info in the head is the handoff candidate */ + /* Always the BSS info in the head is the hand-off candidate */ pBssNode = csrNeighborRoamGetRoamableAPListNextEntry(pMac, &pNeighborRoamInfo->FTRoamInfo.preAuthDoneList, NULL); - NEIGHBOR_ROAM_DEBUG(pMac, LOG1, FL("Number of Handoff candidates = %d"), csrLLCount(&pNeighborRoamInfo->FTRoamInfo.preAuthDoneList)); + NEIGHBOR_ROAM_DEBUG(pMac, LOG1, + FL("Number of Handoff candidates = %d"), + csrLLCount(&pNeighborRoamInfo->FTRoamInfo.preAuthDoneList)); } else #endif #ifdef FEATURE_WLAN_LFR if (csrRoamIsFastRoamEnabled(pMac, sessionId)) { - /* Always the BSS info in the head is the handoff candidate */ + /* Always the BSS info in the head is the hand-off candidate */ pBssNode = csrNeighborRoamGetRoamableAPListNextEntry(pMac, &pNeighborRoamInfo->FTRoamInfo.preAuthDoneList, NULL); - NEIGHBOR_ROAM_DEBUG(pMac, LOG1, FL("Number of Handoff candidates = %d"), csrLLCount(&pNeighborRoamInfo->FTRoamInfo.preAuthDoneList)); + NEIGHBOR_ROAM_DEBUG(pMac, LOG1, + FL("Number of Handoff candidates = %d"), + csrLLCount(&pNeighborRoamInfo->FTRoamInfo.preAuthDoneList)); } else #endif { pBssNode = csrNeighborRoamGetRoamableAPListNextEntry(pMac, &pNeighborRoamInfo->roamableAPList, NULL); - NEIGHBOR_ROAM_DEBUG(pMac, LOG1, FL("Number of Handoff candidates = %d"), csrLLCount(&pNeighborRoamInfo->roamableAPList)); + NEIGHBOR_ROAM_DEBUG(pMac, LOG1, + FL("Number of Handoff candidates = %d"), + csrLLCount(&pNeighborRoamInfo->roamableAPList)); } vos_mem_copy(pHandoffNode, pBssNode, sizeof(tCsrNeighborRoamBSSInfo)); @@ -5946,7 +5967,7 @@ eHalStatus csrNeighborRoamProcessHandoffReq(tpAniSirGlobal pMac, \brief This function is called once SSID scan is done. If SSID scan failed to find our candidate add an entry to csr scan cache ourself before starting - the handoff process + the hand-off process \param pMac - The handle returned by macOpen. diff --git a/CORE/SME/src/csr/csrTdlsProcess.c b/CORE/SME/src/csr/csrTdlsProcess.c index fe94a0a82b18..1f3120518db6 100644 --- a/CORE/SME/src/csr/csrTdlsProcess.c +++ b/CORE/SME/src/csr/csrTdlsProcess.c @@ -54,7 +54,7 @@ /* * common routine to remove TDLS cmd from SME command list.. - * commands are removed after getting reponse from PE. + * commands are removed after getting response from PE. */ eHalStatus csrTdlsRemoveSmeCmd(tpAniSirGlobal pMac, eSmeCommandType cmdType) { @@ -609,7 +609,7 @@ eHalStatus csrTdlsProcessCmd(tpAniSirGlobal pMac, tSmeCmd *cmd) break; default: { - /* TODO: Add defualt handling */ + /* TODO: Add default handling */ break ; } @@ -674,7 +674,7 @@ eHalStatus csrTdlsProcessLinkEstablish( tpAniSirGlobal pMac, tSmeCmd *cmd ) } /* - * TDLS Message processor, will be called after TDLS message recieved from + * TDLS Message processor, will be called after TDLS message received from * PE */ eHalStatus tdlsMsgProcessor(tpAniSirGlobal pMac, v_U16_t msgType, diff --git a/CORE/SME/src/csr/csrUtil.c b/CORE/SME/src/csr/csrUtil.c index ac378bb99d50..39206e0f6566 100644 --- a/CORE/SME/src/csr/csrUtil.c +++ b/CORE/SME/src/csr/csrUtil.c @@ -2274,7 +2274,7 @@ eHalStatus csrUpdateMCCp2pBeaconInterval(tpAniSirGlobal pMac) if (pMac->roam.roamSession[sessionId].bssParams.bssPersona == VOS_P2P_GO_MODE) { - /* Handle different BI scneario based on the configuration set. + /* Handle different BI scenario based on the configuration set. * If Config is set to 0x02 then Disconnect all the P2P clients * associated. If config is set to 0x04 then update the BI * without disconnecting all the clients @@ -2312,11 +2312,11 @@ tANI_U16 csrCalculateMCCBeaconInterval(tpAniSirGlobal pMac, tANI_U16 sta_bi, tAN if ( sta_bi == 0 ) { /* There is possibility to receive zero as value. - Which will cause divide by zero. Hence initialise with 100 + Which will cause divide by zero. Hence initialize with 100 */ sta_bi = 100; smsLog(pMac, LOGW, - FL("sta_bi 2nd parameter is zero, initialise to %d"), sta_bi); + FL("sta_bi 2nd parameter is zero, initialize to %d"), sta_bi); } // check, if either one is multiple of another @@ -2504,10 +2504,12 @@ eHalStatus csrValidateMCCBeaconInterval(tpAniSirGlobal pMac, tANI_U8 channelId, != *beaconInterval)) { /* - * Updated beaconInterval should be used only when we are starting a new BSS - * not incase of client or STA case + * Updated beaconInterval should be used only when + * we are starting a new BSS not in-case of client + * or STA case */ - //Calculate beacon Interval for P2P-GO incase of MCC + /* Calculate beacon Interval for P2P-GO + in-case of MCC */ new_beaconInterval = csrCalculateMCCBeaconInterval(pMac, pMac->roam.roamSession[sessionId].connectedProfile.beaconInterval, *beaconInterval ); @@ -2530,7 +2532,7 @@ eHalStatus csrValidateMCCBeaconInterval(tpAniSirGlobal pMac, tANI_U8 channelId, } #ifdef WLAN_FEATURE_VOWIFI_11R -/* Function to return TRUE if the authtype is 11r */ +/* Function to return TRUE if the auth type is 11r */ tANI_BOOLEAN csrIsAuthType11r( eCsrAuthType AuthType, tANI_U8 mdiePresent) { switch ( AuthType ) @@ -2559,7 +2561,7 @@ tANI_BOOLEAN csrIsProfile11r( tCsrRoamProfile *pProfile ) #ifdef FEATURE_WLAN_ESE -/* Function to return TRUE if the authtype is ESE */ +/* Function to return TRUE if the auth type is ESE */ tANI_BOOLEAN csrIsAuthTypeESE( eCsrAuthType AuthType ) { switch ( AuthType ) @@ -3043,7 +3045,7 @@ csrIsPMFCapabilitiesInRSNMatch( tHalHandle hHal, { /* * This is tricky, because supplicant asked us to make mandatory - * PMF connection eventhough PMF connection is optional here. + * PMF connection even though PMF connection is optional here. * so if AP is not capable of PMF then drop it. Don't try to * connect with it. */ @@ -3068,7 +3070,7 @@ csrIsPMFCapabilitiesInRSNMatch( tHalHandle hHal, (apProfileMFPCapable == 1)) { VOS_TRACE(VOS_MODULE_ID_SME, VOS_TRACE_LEVEL_INFO, - "we don't need PMF connection eventhough both parties are capable"); + "we don't need PMF connection even though both parties are capable"); return VOS_FALSE; } } @@ -3116,7 +3118,7 @@ tANI_BOOLEAN csrLookupPMKID( tpAniSirGlobal pMac, tANI_U32 sessionId, tANI_U8 *p } /* to force the AP initiate fresh 802.1x authentication after re-association should not * fill the PMKID from cache this is needed - * by the HS 2.0 passpoint certification 5.2.a and b testcases */ + * by the HS 2.0 pass point certification 5.2.a and b test cases */ if(pSession->fIgnorePMKIDCache) { @@ -3203,11 +3205,14 @@ tANI_U8 csrConstructRSNIe( tHalHandle hHal, tANI_U32 sessionId, tCsrRoamProfile pAuthSuite->cAuthenticationSuites = 1; vos_mem_copy(&pAuthSuite->AuthOui[ 0 ], AuthSuite, sizeof( AuthSuite )); - // RSN capabilities follows the Auth Suite (two octects) - // !!REVIEW - What should STA put in RSN capabilities, currently - // just putting back APs capabilities - // For one, we shouldn't EVER be sending out "pre-auth supported". It is an AP only capability - // For another, we should use the Management Frame Protection values given by the supplicant + /* + * RSN capabilities follows the Auth Suite (two octets) + * !!REVIEW - What should STA put in RSN capabilities, currently + * just putting back APs capabilities For one, we shouldn't EVER be + * sending out "pre-auth supported". It is an AP only capability. + * For another, we should use the Management Frame Protection + * values given by the supplicant + */ RSNCapabilities.PreAuthSupported = 0; #ifdef WLAN_FEATURE_11W RSNCapabilities.MFPRequired = pProfile->MFPRequired; @@ -3349,7 +3354,8 @@ tANI_BOOLEAN csrGetWapiInformation( tHalHandle hHal, tCsrAuthList *pAuthType, eC if( pNegotiatedMCCipher ) *pNegotiatedMCCipher = pMCEncryption->encryptionType[i]; - //Ciphers are supported, Match authentication algorithm and pick first matching authtype. + /* Ciphers are supported, Match authentication algorithm and pick + first matching auth type. */ if ( csrIsAuthWapiCert( pMac, AuthSuites, cAuthSuites, Authentication ) ) { negAuthType = eCSR_AUTH_TYPE_WAPI_WAI_CERTIFICATE; @@ -3503,9 +3509,12 @@ tANI_U8 csrConstructWapiIe( tpAniSirGlobal pMac, tANI_U32 sessionId, tCsrRoamPro pWapi += sizeof( MulticastCypher ); - // WAPI capabilities follows the Auth Suite (two octects) - // we shouldn't EVER be sending out "pre-auth supported". It is an AP only capability - // & since we already did a memset pWapiIe to 0, skip these fields + /* + * WAPI capabilities follows the Auth Suite (two octets) + * we shouldn't EVER be sending out "pre-auth supported". + * It is an AP only capability & since we already did a memset + * pWapiIe to 0, skip these fields + */ pWapi +=2; fBKIDFound = csrLookupBKID( pMac, sessionId, pSirBssDesc->bssId, &(BKId[0]) ); @@ -3606,7 +3615,8 @@ tANI_BOOLEAN csrGetWpaCyphers( tpAniSirGlobal pMac, tCsrAuthList *pAuthType, eCs fAcceptableCyphers = FALSE; for (i = 0 ; i < pAuthType->numEntries; i++) { - //Ciphers are supported, Match authentication algorithm and pick first matching authtype. + /* Ciphers are supported, Match authentication algorithm + and pick first matching auth type */ if ( csrIsAuthWpa( pMac, pWpaIe->auth_suites, cAuthSuites, Authentication ) ) { if (eCSR_AUTH_TYPE_WPA == pAuthType->authType[i]) @@ -3719,14 +3729,17 @@ tANI_U8 csrConstructWpaIe( tHalHandle hHal, tCsrRoamProfile *pProfile, tSirBssDe pAuthSuite->cAuthenticationSuites = 1; vos_mem_copy(&pAuthSuite->AuthOui[ 0 ], AuthSuite, sizeof( AuthSuite )); - // The WPA capabilities follows the Auth Suite (two octects)-- - // this field is optional, and we always "send" zero, so just - // remove it. This is consistent with our assumptions in the - // frames compiler; c.f. bug 15234: - // http://gold.woodsidenet.com/bugzilla/show_bug.cgi?id=15234 - - // Add in the fixed fields plus 1 Unicast cypher, less the IE Header length - // Add in the size of the Auth suite (count plus a single OUI) + /* + * The WPA capabilities follows the Auth Suite (two octets)-- + * this field is optional, and we always "send" zero, so just + * remove it. This is consistent with our assumptions in the + * frames compiler; c.f. bug 15234: + * http://gold.woodsidenet.com/bugzilla/show_bug.cgi?id=15234 + * + * Add in the fixed fields plus 1 Unicast cypher, less the IE Header + * length + * Add in the size of the Auth suite (count plus a single OUI) + */ pWpaIe->IeHeader.Length = sizeof( *pWpaIe ) - sizeof ( pWpaIe->IeHeader ) + sizeof( *pAuthSuite ); @@ -3864,8 +3877,11 @@ tANI_BOOLEAN csrGetWpaRsnIe( tHalHandle hHal, tANI_U8 *pIes, tANI_U32 len, } -//If a WPAIE exists in the profile, just use it. Or else construct one from the BSS -//Caller allocated memory for pWpaIe and guarrantee it can contain a max length WPA IE +/* + * If a WPAIE exists in the profile, just use it. Or else construct one from + * the BSS Caller allocated memory for pWpaIe and guarantee it can contain a max + * length WPA IE + */ tANI_U8 csrRetrieveWpaIe( tHalHandle hHal, tCsrRoamProfile *pProfile, tSirBssDescription *pSirBssDesc, tDot11fBeaconIEs *pIes, tCsrWpaIe *pWpaIe ) { @@ -3897,8 +3913,11 @@ tANI_U8 csrRetrieveWpaIe( tHalHandle hHal, tCsrRoamProfile *pProfile, tSirBssDes } -//If a RSNIE exists in the profile, just use it. Or else construct one from the BSS -//Caller allocated memory for pWpaIe and guarrantee it can contain a max length WPA IE +/* + * If a RSNIE exists in the profile, just use it. Or else construct one from the + * BSS. Caller allocated memory for pWpaIe and guarantee it can contain a max + * length WPA IE + */ tANI_U8 csrRetrieveRsnIe( tHalHandle hHal, tANI_U32 sessionId, tCsrRoamProfile *pProfile, tSirBssDescription *pSirBssDesc, tDot11fBeaconIEs *pIes, tCsrRSNIe *pRsnIe ) { @@ -3941,8 +3960,11 @@ tANI_U8 csrRetrieveRsnIe( tHalHandle hHal, tANI_U32 sessionId, tCsrRoamProfile * #ifdef FEATURE_WLAN_WAPI -//If a WAPI IE exists in the profile, just use it. Or else construct one from the BSS -//Caller allocated memory for pWapiIe and guarrantee it can contain a max length WAPI IE +/* + * If a WAPI IE exists in the profile, just use it. Or else construct one from + * the BSS. Caller allocated memory for pWapiIe and guarantee it can contain a + * max length WAPI IE. + */ tANI_U8 csrRetrieveWapiIe( tHalHandle hHal, tANI_U32 sessionId, tCsrRoamProfile *pProfile, tSirBssDescription *pSirBssDesc, tDot11fBeaconIEs *pIes, tCsrWapiIe *pWapiIe ) @@ -4428,13 +4450,14 @@ tANI_BOOLEAN csrIsSsidMatch( tpAniSirGlobal pMac, tANI_U8 *ssid1, tANI_U8 ssid1L tANI_BOOLEAN fMatch = FALSE; do { - - // There are a few special cases. If the Bss description has a Broadcast SSID, - // then our Profile must have a single SSID without Wildcards so we can program - // the SSID. - // SSID could be suppressed in beacons. In that case SSID IE has valid length - // but the SSID value is all NULL characters. That condition is trated same - // as NULL SSID + /* + * There are a few special cases. If the Bss description has a + * Broadcast SSID, then our Profile must have a single SSID without + * Wild cards so we can program the SSID. + * SSID could be suppressed in beacons. In that case SSID IE has valid + * length but the SSID value is all NULL characters. + * That condition is treated same as NULL SSID. + */ if ( csrIsNULLSSID( bssSsid, bssSsidLen ) ) { if ( eANI_BOOLEAN_FALSE == fSsidRequired ) @@ -5420,8 +5443,8 @@ tSirResultCodes csrGetDisassocRspStatusCode( tSirSmeDisassocRsp *pSmeDisassocRsp tANI_U32 ret; pBuffer += (sizeof(tANI_U16) + sizeof(tANI_U16) + sizeof(tSirMacAddr)); - //tSirResultCodes is an enum, assuming is 32bit - //If we cannot make this assumption, use copymemory + /* tSirResultCodes is an enum, assuming is 32bit + If we cannot make this assumption, use copy memory */ pal_get_U32( pBuffer, &ret ); return( ( tSirResultCodes )ret ); @@ -5434,8 +5457,8 @@ tSirResultCodes csrGetDeAuthRspStatusCode( tSirSmeDeauthRsp *pSmeRsp ) tANI_U32 ret; pBuffer += (sizeof(tANI_U16) + sizeof(tANI_U16) + sizeof(tANI_U8) +sizeof(tANI_U16)); - //tSirResultCodes is an enum, assuming is 32bit - //If we cannot make this assumption, use copymemory + /* tSirResultCodes is an enum, assuming is 32bit + If we cannot make this assumption, use copy memory */ pal_get_U32( pBuffer, &ret ); return( ( tSirResultCodes )ret ); @@ -5796,7 +5819,7 @@ eHalStatus csrGetSupportedCountryCode(tpAniSirGlobal pMac, tANI_U8 *pBuf, tANI_U v_SIZE_t size = (v_SIZE_t)*pbLen; vosStatus = vos_nv_getSupportedCountryCode( pBuf, &size, 1 ); - //eiter way, return the value back + /* Either way, return the value back */ *pbLen = (tANI_U32)size; //If pBuf is NULL, caller just want to get the size, consider it success diff --git a/CORE/SME/src/nan/nan_Api.c b/CORE/SME/src/nan/nan_Api.c index ce10b62e8db5..26650ac40b0b 100644 --- a/CORE/SME/src/nan/nan_Api.c +++ b/CORE/SME/src/nan/nan_Api.c @@ -64,7 +64,7 @@ void sme_NanRegisterCallback(tHalHandle hHal, NanCallback callback) * * Description: * This function gets called when HDD receives NAN vendor command - * from userspace + * from user space * * Args: * Nan Request structure ptr diff --git a/CORE/SME/src/oemData/oemDataApi.c b/CORE/SME/src/oemData/oemDataApi.c index 5ccf6a4e5491..e2a61b1f115c 100644 --- a/CORE/SME/src/oemData/oemDataApi.c +++ b/CORE/SME/src/oemData/oemDataApi.c @@ -116,7 +116,7 @@ void oemData_ReleaseOemDataReqCommand(tpAniSirGlobal pMac, tSmeCmd *pOemDataCmd, { vos_mem_set(&(pOemDataCmd->u.oemDataCmd), sizeof(tOemDataCmd), 0); - //Now put this command back on the avilable command list + /* Now put this command back on the available command list */ smeReleaseCommand(pMac, pOemDataCmd); } else @@ -308,7 +308,7 @@ eHalStatus sme_HandleOemDataRsp(tHalHandle hHal, tANI_U8* pMsg) * OEM Data request, SME does not peek into data response so SME * can not know which response is the last one. So SME clears active * request command on receiving first response and thereafter SME - * passes each sunsequent response to upper user layer. + * passes each subsequent response to upper user layer. */ pEntry = csrLLPeekHead(&pMac->sme.smeCmdActiveList, LL_ACCESS_LOCK); if (pEntry) diff --git a/CORE/SME/src/p2p/p2p_Api.c b/CORE/SME/src/p2p/p2p_Api.c index 566c9d337e65..44282c08d3c2 100644 --- a/CORE/SME/src/p2p/p2p_Api.c +++ b/CORE/SME/src/p2p/p2p_Api.c @@ -139,7 +139,7 @@ eHalStatus sme_remainOnChnRsp( tpAniSirGlobal pMac, tANI_U8 *pMsg) if (fFound) { - //Now put this command back on the avilable command list + /* Now put this command back on the available command list */ smeReleaseCommand(pMac, pCommand); } smeProcessPendingQueue( pMac ); diff --git a/CORE/SME/src/pmc/pmc.c b/CORE/SME/src/pmc/pmc.c index 768cc8053ee9..d2d3a2ee6bac 100644 --- a/CORE/SME/src/pmc/pmc.c +++ b/CORE/SME/src/pmc/pmc.c @@ -192,9 +192,11 @@ eHalStatus pmcEnterFullPowerState (tHalHandle hHal) /* Do all the callbacks. */ pmcDoCallbacks(hHal, eHAL_STATUS_SUCCESS); - /* Update registerd modules that we are entering Full Power. This is - only way to inform modules if PMC exited a power save mode because - of error conditions or if som other module requested full power */ + /* + * Update registered modules that we are entering Full Power. This is + * only way to inform modules if PMC exited a power save mode because + * of error conditions or if some other module requested full power. + */ pmcDoDeviceStateUpdateCallbacks(hHal, FULL_POWER); break; @@ -416,7 +418,7 @@ eHalStatus pmcEnterImpsState (tHalHandle hHal) /* Change state. */ pMac->pmc.pmcState = IMPS; - /* If we have a reqeust for full power pending then we have to go + /* If we have a request for full power pending then we have to go directly into full power. */ if (pMac->pmc.requestFullPowerPending) { @@ -555,12 +557,15 @@ eHalStatus pmcEnterBmpsState (tHalHandle hHal) /* Change state. */ pMac->pmc.pmcState = BMPS; - /* Update registerd modules that we are entering BMPS. This is - only way to inform modules if PMC entered BMPS power save mode - on its own because of traffic timer */ + /* + * Update registered modules that we are entering BMPS. This is + * only way to inform modules if PMC entered BMPS power save mode + * on its own because of traffic timer. + */ pmcDoDeviceStateUpdateCallbacks(hHal, BMPS); - /* If we have a reqeust for full power pending then we have to go directly into full power. */ + /* If we have a request for full power pending then we have to go directly + into full power. */ if (pMac->pmc.requestFullPowerPending) { @@ -633,8 +638,8 @@ tANI_BOOLEAN pmcPowerSaveCheck (tHalHandle hHal) pPowerSaveCheckEntry = GET_BASE_ADDR(pEntry, tPowerSaveCheckEntry, link); checkRoutine = pPowerSaveCheckEntry->checkRoutine; - /* If the checkRoutine is NULL for a paricular entry, proceed with other entries - * in the list */ + /* If the checkRoutine is NULL for a particular entry, proceed with + * other entries in the list */ if (NULL != checkRoutine) { if (!checkRoutine(pPowerSaveCheckEntry->checkContext)) @@ -666,7 +671,7 @@ tANI_BOOLEAN pmcPowerSaveCheck (tHalHandle hHal) * hHal - HAL handle for device * * Returns: -* eHAL_STATUS_SUCCESS - message successfuly sent +* eHAL_STATUS_SUCCESS - message successfully sent * eHAL_STATUS_FAILURE - error while sending message * ******************************************************************************/ @@ -758,7 +763,7 @@ eHalStatus pmcSendPowerSaveConfigMessage (tHalHandle hHal) * messageSize - Size of the message data * * Returns: -* eHAL_STATUS_SUCCESS - message successfuly sent +* eHAL_STATUS_SUCCESS - message successfully sent * eHAL_STATUS_FAILURE - error while sending message * ******************************************************************************/ @@ -850,7 +855,7 @@ void pmcDoCallbacks (tHalHandle hHal, eHalStatus callbackStatus) * hHal - HAL handle for device * * Returns: -* eHAL_STATUS_SUCCESS - timer successfuly started +* eHAL_STATUS_SUCCESS - timer successfully started * eHAL_STATUS_FAILURE - error while starting timer * ******************************************************************************/ @@ -963,7 +968,7 @@ void pmcTrafficTimerExpired (tHalHandle hHal) return; } - /* Untill DHCP is not completed remain in power active */ + /* Until DHCP is not completed remain in power active */ if(pMac->pmc.remainInPowerActiveTillDHCP) { pmcLog(pMac, LOG2, FL("BMPS Traffic Timer expired before DHCP completion ignore enter BMPS")); @@ -1293,12 +1298,14 @@ eHalStatus pmcEnterUapsdState (tHalHandle hHal) /* Change state. */ pMac->pmc.pmcState = UAPSD; - /* Update registerd modules that we are entering UAPSD. This is - only way to inform modules if PMC resumed UAPSD power save mode - on its own after full power mode */ + /* + * Update registered modules that we are entering UAPSD. This is + * only way to inform modules if PMC resumed UAPSD power save mode + * on its own after full power mode. + */ pmcDoDeviceStateUpdateCallbacks(hHal, UAPSD); - /* If we have a reqeust for full power pending then we have to go + /* If we have a request for full power pending then we have to go directly into full power. */ if (pMac->pmc.requestFullPowerPending) { @@ -1438,7 +1445,7 @@ eHalStatus pmcEnterStandbyState (tHalHandle hHal) /* Change state. */ pMac->pmc.pmcState = STANDBY; - /* If we have a reqeust for full power pending then we have to go + /* If we have a request for full power pending then we have to go directly into full power. */ if (pMac->pmc.requestFullPowerPending) { @@ -1678,7 +1685,7 @@ eHalStatus pmcEnterWowlState (tHalHandle hHal) /* Clear the buffered command for WOWL */ pMac->pmc.wowlModeRequired = FALSE; - /* If we have a reqeust for full power pending then we have to go + /* If we have a request for full power pending then we have to go directly into full power. */ if (pMac->pmc.requestFullPowerPending) { @@ -1882,13 +1889,14 @@ void pmcReleaseCommand( tpAniSirGlobal pMac, tSmeCmd *pCommand ) { if(!pCommand->u.pmcCmd.fReleaseWhenDone) { - //This is a normal command, put it back to the free lsit + /* This is a normal command, put it back to the free list */ pCommand->u.pmcCmd.size = 0; smeReleaseCommand( pMac, pCommand ); } else { - //this is a specially allocated comamnd due to out of command buffer. free it. + /* This is a specially allocated command due to out of command buffer. + free it. */ vos_mem_free(pCommand); } } @@ -2139,8 +2147,11 @@ tANI_BOOLEAN pmcProcessCommand( tpAniSirGlobal pMac, tSmeCmd *pCommand ) status = pmcSendMessage(pMac, eWNI_PMC_ENTER_IMPS_REQ, NULL, 0); if( HAL_STATUS_SUCCESS( status ) ) { - /* If we already went back Full Power State (meaning that request did not - get as far as the device) then we are not successfull. */ + /* + * If we already went back Full Power State (meaning + * that request did not get as far as the device) + * then we are not successful. + */ if ( FULL_POWER != pMac->pmc.pmcState ) { fRemoveCmd = eANI_BOOLEAN_FALSE; @@ -2180,7 +2191,6 @@ tANI_BOOLEAN pmcProcessCommand( tpAniSirGlobal pMac, tSmeCmd *pCommand ) { pmcLog(pMac, LOGE, FL("eWNI_PMC_EXIT_IMPS_REQ fail to be sent to PE status %d"), status); - //Callbacks are called with success srarus, do we need to pass in real status?? pmcEnterFullPowerState(pMac); } } @@ -2257,7 +2267,8 @@ tANI_BOOLEAN pmcProcessCommand( tpAniSirGlobal pMac, tSmeCmd *pCommand ) { pmcLog(pMac, LOGE, "PMC: failure to send message " "eWNI_PMC_ENTER_BMPS_REQ"); - //there is no retry for re-entering UAPSD so tell the requester we are done witgh failure. + /* There is no retry for re-entering UAPSD so tell the + requester we are done with failure. */ pMac->pmc.uapsdSessionRequired = FALSE; pmcDoStartUapsdCallbacks(pMac, eHAL_STATUS_FAILURE); } @@ -2340,12 +2351,17 @@ tANI_BOOLEAN pmcProcessCommand( tpAniSirGlobal pMac, tSmeCmd *pCommand ) case eSmeCommandEnterStandby: if( FULL_POWER == pMac->pmc.pmcState ) { - //Disallow standby if concurrent sessions are present. Note that CSR would have - //caused the STA to disconnect the Infra session (if not already disconnected) because of - //standby request. But we are now failing the standby request because of concurrent session. - //So was the tearing of infra session wasteful if we were going to fail the standby request ? - //Not really. This is beacuse if and when BT-AMP etc sessions are torn down we will transition - //to IMPS/standby and still save power. + /* + * Disallow standby if concurrent sessions are present. Note that + * CSR would have caused the STA to disconnect the Infra session + * (if not already disconnected) because of standby request. + * But we are now failing the standby request because of + * concurrent session. So was the tearing of infra session + * wasteful if we were going to fail the standby request? + * Not really. This is because if and when BT-AMP etc sessions + * are torn down we will transition to IMPS/standby and still + * save power. + */ if (csrIsIBSSStarted(pMac) || csrIsBTAMPStarted(pMac)) { VOS_TRACE(VOS_MODULE_ID_SME, VOS_TRACE_LEVEL_FATAL, @@ -2454,9 +2470,11 @@ eHalStatus pmcEnterImpsCheck( tpAniSirGlobal pMac ) return ( eHAL_STATUS_SUCCESS ); } -/* This API detrmines if it is ok to proceed with a Enter BMPS Request or not . Note when - device is in BMPS/UAPSD states, this API returns failure because it is not ok to issue - a BMPS request */ +/* + * This API determines if it is ok to proceed with a Enter BMPS Request or not. + * Note when device is in BMPS/UAPSD states, this API returns failure because it + * is not ok to issue a BMPS request. + */ eHalStatus pmcEnterBmpsCheck( tpAniSirGlobal pMac ) { @@ -2891,7 +2909,7 @@ tANI_BOOLEAN pmcOffloadPowerSaveCheck(tHalHandle hHal, link); checkRoutine = pPowerSaveCheckEntry->pwrsaveCheckCb; /* - * If the checkRoutine is NULL for a paricular entry, + * If the checkRoutine is NULL for a particular entry, * proceed with other entries * in the list */ @@ -2997,7 +3015,7 @@ void pmcOffloadStopAutoStaPsTimer(tpAniSirGlobal pMac, tANI_U32 sessionId) tpPsOffloadPerSessionInfo pmc = &pMac->pmcOffloadInfo.pmc[sessionId]; /* - * Stop the auto ps entry timer if runnin + * Stop the auto ps entry timer if running */ if(VOS_TIMER_STATE_RUNNING == vos_timer_getCurrentState(&pmc->autoPsEnableTimer)) @@ -3370,7 +3388,7 @@ eHalStatus pmcOffloadEnterUapsdState(tpAniSirGlobal pMac, tANI_U32 sessionId) /* Change the State */ pmc->pmcState = UAPSD; - /* Call the State Chnage Indication through Registered Cbs */ + /* Call the State Change Indication through Registered Cbs */ pmcOffloadDoDeviceStateUpdateCallbacks(pMac, sessionId, UAPSD); /* Call the registered uapsd cbs */ diff --git a/CORE/SME/src/pmc/pmcApi.c b/CORE/SME/src/pmc/pmcApi.c index 3633b543e402..c0b95013d702 100644 --- a/CORE/SME/src/pmc/pmcApi.c +++ b/CORE/SME/src/pmc/pmcApi.c @@ -1111,7 +1111,7 @@ eHalStatus pmcRegisterPowerSaveCheck (tHalHandle hHal, tANI_BOOLEAN (*checkRouti * Name: pmcDeregisterPowerSaveCheck * * Description: -* Reregisters a routine that was previously registered with +* Re-registers a routine that was previously registered with * pmcRegisterPowerSaveCheck. * * Parameters: @@ -1594,7 +1594,8 @@ tANI_BOOLEAN pmcAllowImps( tHalHandle hHal ) //All sessions must be disconnected to allow IMPS if ( !csrIsAllSessionDisconnected( pMac ) ) { - pmcLog(pMac, LOGW, "PMC: Atleast one connected session. IMPS cannot be entered"); + pmcLog(pMac, LOGW, + "PMC: At-least one connected session. IMPS cannot be entered"); return eANI_BOOLEAN_FALSE; } @@ -2005,9 +2006,9 @@ eHalStatus pmcDeregisterDeviceStateUpdateInd (tHalHandle hHal, \fn pmcReady \brief fn to inform PMC that eWNI_SME_SYS_READY_IND has been sent to PE. This acts as a trigger to send a message to PE to update the power - save related conig to FW. Note that if HDD configures any power save - related stuff before this API is invoked, PMC will buffer all the - configutaion. + save related config to FW. Note that if HDD configures any power + save related stuff before this API is invoked, PMC will buffer all + the configuration. \param hHal - The handle returned by macOpen. \return eHalStatus ---------------------------------------------------------------------------*/ @@ -2223,33 +2224,37 @@ skip_pmc_state_transition: /* --------------------------------------------------------------------------- \fn pmcEnterWowl \brief Request that the device be brought to full power state. - Note 1: If "fullPowerReason" specificied in this API is set to - eSME_FULL_PWR_NEEDED_BY_HDD, PMC will clear any "buffered wowl" requests - and also clear any "buffered BMPS requests by HDD". Assumption is that since - HDD is requesting full power, we need to undo any previous HDD requests for - BMPS (using sme_RequestBmps) or WoWL (using sme_EnterWoWL). If the reason is - specified anything other than above, the buffered requests for BMPS and WoWL + Note 1: If "fullPowerReason" specified in this API is set to + eSME_FULL_PWR_NEEDED_BY_HDD, PMC will clear any "buffered wowl" + requests and also clear any "buffered BMPS requests by HDD". + Assumption is that since HDD is requesting full power, we need to + undo any previous HDD requests for BMPS (using sme_RequestBmps) or + WoWL (using sme_EnterWoWL). If the reason is specified anything + other than above, the buffered requests for BMPS and WoWL will not be cleared. - Note 2: Requesting full power (no matter what the fullPowerReason is) doesn't - disable the "auto bmps timer" (if it is enabled) or clear any "buffered uapsd - request". - Note 3: When the device finally enters Full Power PMC will start a timer - if any of the following holds true: + Note 2: Requesting full power (no matter what the fullPowerReason + is) doesn't disable the "auto bmps timer" (if it is enabled) or + clear any "buffered uapsd request". + Note 3: When the device finally enters Full Power PMC will start + a timer if any of the following holds true: - Auto BMPS mode is enabled - Uapsd request is pending - HDD's request for BMPS is pending - HDD's request for WoWL is pending - On timer expiry PMC will attempt to put the device in BMPS mode if following - (in addition to those listed above) holds true: + On timer expiry PMC will attempt to put the device in BMPS mode + if following (in addition to those listed above) holds true: - Polling of all modules through the Power Save Check routine passes - STA is associated to an access point \param hHal - The handle returned by macOpen. - \param - enterWowlCallbackRoutine Callback routine invoked in case of success/failure - \param - enterWowlCallbackContext - Cookie to be passed back during callback - \param - wakeReasonIndCB Callback routine invoked for Wake Reason Indication + \param - enterWowlCallbackRoutine Callback routine invoked in case of + success/failure + \param - enterWowlCallbackContext - Cookie to be passed back during + callback + \param - wakeReasonIndCB Callback routine invoked for Wake Reason + Indication \param - wakeReasonIndCBContext - Cookie to be passed back during callback - \param - fullPowerReason - Reason why this API is being invoked. SME needs to - distinguish between BAP and HDD requests + \param - fullPowerReason - Reason why this API is being invoked. SME needs + to distinguish between BAP and HDD requests \return eHalStatus - status eHAL_STATUS_SUCCESS - device brought to full power state eHAL_STATUS_FAILURE - device cannot be brought to full power state @@ -2332,7 +2337,7 @@ eHalStatus pmcEnterWowl ( } /* Is there a pending UAPSD request? HDD should have triggered QoS - module to do the necessary cleanup before triggring WOWL*/ + module to do the necessary cleanup before triggering WOWL*/ if(pMac->pmc.uapsdSessionRequired) { pmcLog(pMac, LOGE, "PMC: Cannot request WOWL. Pending UAPSD request"); @@ -2473,7 +2478,7 @@ eHalStatus pmcSetHostOffload (tHalHandle hHal, tpSirHostOffloadReq pRequest, \param hHal - The handle returned by macOpen. \param pRequest - Pointer to the Keep Alive. \return eHalStatus - eHAL_STATUS_FAILURE Cannot set the keepalive. + eHAL_STATUS_FAILURE Cannot set the keep alive. eHAL_STATUS_SUCCESS Request accepted. ---------------------------------------------------------------------------*/ eHalStatus pmcSetKeepAlive (tHalHandle hHal, tpSirKeepAliveReq pRequest, tANI_U8 sessionId) @@ -3385,9 +3390,10 @@ eHalStatus pmcTriggerBatchScanResultInd /* ----------------------------------------------------------------------------- \fn pmcStopBatchScanInd - \brief Stoping batch scan request in FW + \brief Stop batch scan request in FW \param hHal - The handle returned by macOpen. - \param callbackRoutine - Pointer to stop batch scan request callback routine + \param callbackRoutine - Pointer to stop batch scan request + callback routine \return eHalStatus eHAL_STATUS_FAILURE Cannot set batch scan request eHAL_STATUS_SUCCESS Request accepted. @@ -3613,7 +3619,7 @@ eHalStatus pmcOffloadDeregisterPowerSaveCheck(tHalHandle hHal, else { smsLog(pMac, LOGE, - FL("Cannot remove powersave check routine list entry")); + FL("Cannot remove power save check routine list entry")); return eHAL_STATUS_FAILURE; } return eHAL_STATUS_SUCCESS; @@ -3681,7 +3687,7 @@ eHalStatus pmcOffloadDeregisterDeviceStateUpdateInd(tHalHandle hHal, pEntry, FALSE)) { smsLog(pMac, LOGE, - FL("Cannot remove devicestate update ind entry list")); + FL("Cannot remove device state update ind entry list")); return eHAL_STATUS_FAILURE; } vos_mem_free(pDeviceStateUpdateIndEntry); @@ -3717,7 +3723,7 @@ eHalStatus PmcOffloadEnableStaModePowerSave(tHalHandle hHal, { /* Successfully Queued Enabling Sta Mode Ps Request */ smsLog(pMac, LOG2, - FL("Successfull Queued Enabling Sta Mode Ps Request")); + FL("Successful Queued Enabling Sta Mode Ps Request")); pmc->configStaPsEnabled = TRUE; return eHAL_STATUS_SUCCESS; @@ -3735,7 +3741,7 @@ eHalStatus PmcOffloadEnableStaModePowerSave(tHalHandle hHal, /* * configStaPsEnabled is the master flag * to enable sta mode power save - * If it is already set Auto Powersave Timer + * If it is already set Auto Power save Timer * will take care of enabling Power Save */ smsLog(pMac, LOGE, diff --git a/CORE/SME/src/rrm/sme_rrm.c b/CORE/SME/src/rrm/sme_rrm.c index 83e52761939d..e9c4933de0fe 100644 --- a/CORE/SME/src/rrm/sme_rrm.c +++ b/CORE/SME/src/rrm/sme_rrm.c @@ -60,7 +60,8 @@ #endif /* Roam score for a neighbor AP will be calculated based on the below definitions. - The calculated roam score will be used to select the roamable candidate from neighbor AP list */ + The calculated roam score will be used to select the roam able + candidate from neighbor AP list */ #define RRM_ROAM_SCORE_NEIGHBOR_REPORT_REACHABILITY 0 /* When we support 11r over the DS, this should have a non-zero value */ #define RRM_ROAM_SCORE_NEIGHBOR_REPORT_SECURITY 10 #define RRM_ROAM_SCORE_NEIGHBOR_REPORT_KEY_SCOPE 20 @@ -532,17 +533,21 @@ static eHalStatus sme_RrmSendScanResult( tpAniSirGlobal pMac, if (NULL == pResult) { - // no scan results - // - // Spec. doesnt say anything about such condition. - // Since section 7.4.6.2 (IEEE802.11k-2008) says-rrm report frame should contain - // one or more report IEs. It probably means dont send any respose if no matching - // BSS found. Moreover, there is no flag or field in measurement report IE(7.3.2.22) - // OR beacon report IE(7.3.2.22.6) that can be set to indicate no BSS found on a given channel. - // - // If we finished measurement on all the channels, we still need to - // send a xmit indication with moreToFollow set to MEASURMENT_DONE - // so that PE can clean any context allocated. + /* + * no scan results + * + * Spec. doesnt say anything about such condition. + * Since section 7.4.6.2 (IEEE802.11k-2008) says-rrm report frame should + * contain one or more report IEs. It probably means dont send any + * response if no matching BSS found. Moreover, there is no flag or + * field in measurement report IE(7.3.2.22) OR beacon report + * IE(7.3.2.22.6) that can be set to indicate no BSS found on a + * given channel. + * + * If we finished measurement on all the channels, we still need to + * send a xmit indication with moreToFollow set to MEASURMENT_DONE + * so that PE can clean any context allocated. + */ if( measurementDone ) { #if defined(FEATURE_WLAN_ESE_UPLOAD) @@ -659,8 +664,9 @@ static eHalStatus sme_RrmScanRequestCallback(tHalHandle halHandle, sme_RrmSendScanResult( pMac, 1, &pSmeRrmContext->channelList.ChannelList[pSmeRrmContext->currentIndex], false ); pSmeRrmContext->currentIndex++; //Advance the current index. - //start the timer to issue next request. - //From timer tick get a random number within 10ms and max randmization interval. + + /* Start the timer to issue next request. From timer tick get a random + number within 10ms and max randomization interval. */ time_tick = vos_timer_get_system_ticks(); interval = time_tick % (pSmeRrmContext->randnIntvl - 10 + 1) + 10; @@ -1298,10 +1304,8 @@ eHalStatus sme_RrmMsgProcessor( tpAniSirGlobal pMac, v_U16_t msg_type, \fn rrmIterMeasTimerHandle - \brief Timer handler to handlet the timeout condition when a specific BT - + \brief Timer handler to handle the timeout condition when a specific BT stop event does not come back, in which case to restore back the - heartbeat timer. \param pMac - The handle returned by macOpen. diff --git a/CORE/SME/src/sme_common/sme_Api.c b/CORE/SME/src/sme_common/sme_Api.c index 56781dab6fbd..402518eae2aa 100644 --- a/CORE/SME/src/sme_common/sme_Api.c +++ b/CORE/SME/src/sme_common/sme_Api.c @@ -396,9 +396,11 @@ tSmeCmd *smeGetCommandBuffer( tpAniSirGlobal pMac ) pEntry = csrLLRemoveHead( &pMac->sme.smeCmdFreeList, LL_ACCESS_LOCK ); - // If we can get another MS Msg buffer, then we are ok. Just link - // the entry onto the linked list. (We are using the linked list - // to keep track of tfhe message buffers). + /* + * If we can get another MS Msg buffer, then we are ok. Just link + * the entry onto the linked list. (We are using the linked list + * to keep track of the message buffers). + */ if ( pEntry ) { pRetCmd = GET_BASE_ADDR( pEntry, tSmeCmd, Link ); @@ -696,8 +698,8 @@ tANI_BOOLEAN smeProcessScanQueue(tpAniSirGlobal pMac) pSmeCommand = GET_BASE_ADDR(pEntry, tSmeCmd, Link) ; - /* if scan is running on one interface and SME recei - ves the next command on the same interface then + /* if scan is running on one interface and SME receives + the next command on the same interface then dont the allow the command to be queued to smeCmdPendingList. If next scan is allowed on the same interface the CSR state machine will @@ -758,9 +760,11 @@ tANI_BOOLEAN smeProcessCommand( tpAniSirGlobal pMac ) tSmeCmd *pSmeCommand; eSmeCommandType pmcCommand = eSmeNoCommand; - // if the ActiveList is empty, then nothing is active so we can process a - // pending command... - //alwasy lock active list before locking pending list + /* + * If the ActiveList is empty, then nothing is active so we can process a + * pending command. + * Always lock active list before locking pending list. + */ csrLLLock( &pMac->sme.smeCmdActiveList ); if ( csrLLIsListEmpty( &pMac->sme.smeCmdActiveList, LL_ACCESS_NOLOCK ) ) { @@ -1191,7 +1195,7 @@ tANI_BOOLEAN smeCommandPending(tpAniSirGlobal pMac) /*-------------------------------------------------------------------------- - \brief sme_Open() - Initialze all SME modules and put them at idle state + \brief sme_Open() - Initialize all SME modules and put them at idle state The function initializes each module inside SME, PMC, CCM, CSR, etc. . Upon successfully return, all modules are at idle state ready to start. @@ -1554,7 +1558,7 @@ eHalStatus sme_UpdateChannelConfig(tHalHandle hHal) /*-------------------------------------------------------------------------- - \brief sme_UpdateConfig() - Change configurations for all SME moduels + \brief sme_UpdateConfig() - Change configurations for all SME modules The function updates some configuration for modules in SME, CCM, CSR, etc during SMEs close open sequence. @@ -1613,9 +1617,11 @@ eHalStatus sme_UpdateConfig(tHalHandle hHal, tpSmeConfigParams pSmeConfigParams) if (pMac->fScanOffload) { - /* If scan offload is enabled then lim has allow the sending of - scan request to firmware even in powersave mode. The firmware has - to take care of exiting from power save mode */ + /* + * If scan offload is enabled then lim has allow the sending of + * scan request to firmware even in power save mode. The firmware has + * to take care of exiting from power save mode + */ status = ccmCfgSetInt(hHal, WNI_CFG_SCAN_IN_POWERSAVE, eANI_BOOLEAN_TRUE, NULL, eANI_BOOLEAN_FALSE); @@ -1750,7 +1756,7 @@ void sme_ProcessReadyToExtWoW( tHalHandle hHal, SMEs stop -> start sequence. If HDD changed the domain that will cause a reset. This function will - provide the new set of 11d information for the new domain. Currrently this + provide the new set of 11d information for the new domain. Currently this API provides info regarding 11d only at reset but we can extend this for other params (PMC, QoS) which needs to be initialized again at reset. @@ -1792,7 +1798,7 @@ eHalStatus sme_ChangeConfigParams(tHalHandle hHal, /*-------------------------------------------------------------------------- \brief sme_HDDReadyInd() - SME sends eWNI_SME_SYS_READY_IND to PE to inform - that the NIC is ready tio run. + that the NIC is ready to run. The function is called by HDD at the end of initialization stage so PE/HAL can enable the NIC to running state. @@ -2098,7 +2104,7 @@ eHalStatus dfsMsgProcessor(tpAniSirGlobal pMac, v_U16_t msgType, void *pMsgBuf) roamStatus = eCSR_ROAM_DFS_RADAR_IND; roamResult = eCSR_ROAM_RESULT_DFS_RADAR_FOUND_IND; VOS_TRACE(VOS_MODULE_ID_SME, VOS_TRACE_LEVEL_INFO_MED, - "sapdfs: Radar indication event occured"); + "sapdfs: Radar indication event occurred"); break; } case eWNI_SME_DFS_CSAIE_TX_COMPLETE_IND: @@ -2561,8 +2567,8 @@ eHalStatus sme_ProcessMsg(tHalHandle hHal, vos_msg_t* pMsg) #ifdef FEATURE_WLAN_TDLS /* - * command rescived from PE, SME tdls msg processor shall be called - * to process commands recieved from PE + * command received from PE, SME tdls msg processor shall be called + * to process commands received from PE */ case eWNI_SME_TDLS_SEND_MGMT_RSP: case eWNI_SME_TDLS_ADD_STA_RSP: @@ -3273,7 +3279,7 @@ eHalStatus sme_ScanSetBGScanparams(tHalHandle hHal, tANI_U8 sessionId, tCsrBGSca This is a synchronous call \param hScanResult - returned from csrScanGetResult. hScanResult is considered gone by - calling this function and even before this function reutrns. + calling this function and even before this function returns. \return eHalStatus ---------------------------------------------------------------------------*/ eHalStatus sme_ScanResultPurge(tHalHandle hHal, tScanResultHandle hScanResult) @@ -3300,7 +3306,7 @@ eHalStatus sme_ScanResultPurge(tHalHandle hHal, tScanResultHandle hScanResult) \param pPmkidList - caller allocated buffer point to an array of tPmkidCandidateInfo \param pNumItems - pointer to a variable that has the number of - tPmkidCandidateInfo allocated when retruning, this is + tPmkidCandidateInfo allocated when returning, this is either the number needed or number of items put into pPmkidList \return eHalStatus - when fail, it usually means the buffer allocated is not @@ -3393,7 +3399,7 @@ tANI_U32 sme_GetChannelBondingMode24G(tHalHandle hHal) /* --------------------------------------------------------------------------- \fn sme_RoamConnect - \brief a wrapper function to request CSR to inititiate an association + \brief a wrapper function to request CSR to initiate an association This is an asynchronous call. \param sessionId - the sessionId returned by sme_OpenSession. \param pProfile - description of the network to which to connect @@ -3472,7 +3478,7 @@ eHalStatus sme_SetPhyMode(tHalHandle hHal, eCsrPhyMode phyMode) /* --------------------------------------------------------------------------- \fn sme_RoamReassoc - \brief a wrapper function to request CSR to inititiate a re-association + \brief a wrapper function to request CSR to initiate a re-association \param pProfile - can be NULL to join the currently connected AP. In that case modProfileFields should carry the modified field(s) which could trigger reassoc @@ -3500,9 +3506,12 @@ eHalStatus sme_RoamReassoc(tHalHandle hHal, tANI_U8 sessionId, tCsrRoamProfile * if((NULL == pProfile) && (fForce == 1)) { tCsrRoamSession *pSession = CSR_GET_SESSION( pMac, sessionId ); - /* to force the AP initiate fresh 802.1x authentication need to clear - * the PMKID cache for that set the following boolean. this is needed - * by the HS 2.0 passpoint certification 5.2.a and b testcases */ + /* + * To force the AP initiate fresh 802.1x authentication need to + * clear the PMKID cache for that set the following boolean. + * this is needed by the HS 2.0 pass point certification 5.2.a + * and b test cases. + */ pSession->fIgnorePMKIDCache = TRUE; status = csrReassoc( pMac, sessionId, &modProfileFields, pRoamId , fForce); } @@ -3557,7 +3566,7 @@ eHalStatus sme_RoamConnectToLastProfile(tHalHandle hHal, tANI_U8 sessionId) \brief a wrapper function to request CSR to disconnect from a network This is an asynchronous call. \param reason -- To indicate the reason for disconnecting. Currently, only - eCSR_DISCONNECT_REASON_MIC_ERROR is meanful. + eCSR_DISCONNECT_REASON_MIC_ERROR is meaningful. \return eHalStatus ---------------------------------------------------------------------------*/ eHalStatus sme_RoamDisconnect(tHalHandle hHal, tANI_U8 sessionId, eCsrRoamDisconnectReason reason) @@ -3732,11 +3741,12 @@ eHalStatus sme_RoamTKIPCounterMeasures(tHalHandle hHal, tANI_U8 sessionId, \brief To probe the list of associated stations from various modules of CORE stack. \This is an asynchronous API. \param sessionId - sessionId of SoftAP - \param modId - Module from whom list of associtated stations is to be probed. + \param modId - Module from whom list of associated stations is to be probed. If an invalid module is passed then by default VOS_MODULE_ID_PE will be probed \param pUsrContext - Opaque HDD context \param pfnSapEventCallback - Sap event callback in HDD - \param pAssocBuf - Caller allocated memory to be filled with associatd stations info + \param pAssocBuf - Caller allocated memory to be filled with + associated stations info \return eHalStatus -------------------------------------------------------------------------------*/ eHalStatus sme_RoamGetAssociatedStas(tHalHandle hHal, tANI_U8 sessionId, @@ -3908,7 +3918,7 @@ eHalStatus sme_RoamFreeConnectProfile(tHalHandle hHal, \param pPMKIDCache - caller allocated buffer point to an array of tPmkidCacheInfo \param numItems - a variable that has the number of tPmkidCacheInfo - allocated when retruning, this is either the number needed + allocated when returning, this is either the number needed or number of items put into pPMKIDCache \param update_entire_cache - this bool value specifies if the entire pmkid cache should be overwritten or should it be @@ -4588,7 +4598,8 @@ void sme_SetDHCPTillPowerActiveFlag(tHalHandle hHal, tANI_U8 flag) MTRACE(vos_trace(VOS_MODULE_ID_SME, TRACE_CODE_SME_RX_HDD_SET_DHCP_FLAG, NO_SESSION, flag)); - // Set/Clear the DHCP flag which will disable/enable auto BMPS entery by PMC + /* Set/Clear the DHCP flag which will disable/enable + auto BMPS enter by PMC */ pMac->pmc.remainInPowerActiveTillDHCP = flag; } @@ -5313,23 +5324,25 @@ tANI_U16 smeGetTLSTAState(tHalHandle hHal, tANI_U8 staId) \fn sme_GetCountryCode - \brief To return the current country code. If no country code is applied, default country code is - used to fill the buffer. - If 11d supported is turned off, an error is return and the last applied/default country code is used. + \brief To return the current country code. If no country code is applied, + default country code is used to fill the buffer. + If 11d supported is turned off, an error is return and the last + applied/default country code is used. This is a synchronous API. - \param pBuf - pointer to a caller allocated buffer for returned country code. + \param pBuf - pointer to a caller allocated buffer for returned country code \param pbLen For input, this parameter indicates how big is the buffer. - Upon return, this parameter has the number of bytes for country. If pBuf - doesn't have enough space, this function returns - fail status and this parameter contains the number that is needed. + Upon return, this parameter has the number of bytes for + country. If pBuf doesn't have enough space, + this function returns fail status and this parameter contains + the number that is needed. \return eHalStatus SUCCESS. FAILURE or RESOURCES The API finished and failed. - -------------------------------------------------------------------------------*/ + ----------------------------------------------------------------------------*/ eHalStatus sme_GetCountryCode(tHalHandle hHal, tANI_U8 *pBuf, tANI_U8 *pbLen) { tpAniSirGlobal pMac = PMAC_STRUCT( hHal ); @@ -5489,10 +5502,12 @@ eHalStatus sme_GetRegulatoryDomainForCountry(tHalHandle hHal, tANI_U8 *pCountry, \param pDomains - pointer to a caller allocated buffer for returned regulatory domains. - \param pNumDomains For input, this parameter indicates howm many domains pDomains can hold. - Upon return, this parameter has the number for supported domains. If pDomains - doesn't have enough space for all the supported domains, this function returns - fail status and this parameter contains the number that is needed. + \param pNumDomains For input, this parameter indicates how many + domains pDomains can hold. Upon return, this parameter + has the number for supported domains. If pDomains + doesn't have enough space for all the supported domains, + this function returns fail status and this parameter + contains the number that is needed. \return eHalStatus SUCCESS. @@ -5572,7 +5587,7 @@ eHalStatus sme_ScanGetBaseChannels( tHalHandle hHal, tCsrChannelInfo * pChannelI \fn sme_ChangeCountryCode - \brief Change Country code from upperlayer during WLAN driver operation. + \brief Change Country code from upper layer during WLAN driver operation. This is a synchronous API. \param hHal - The handle returned by macOpen. @@ -5655,7 +5670,7 @@ eHalStatus sme_ChangeCountryCode( tHalHandle hHal, \fn sme_GenericChangeCountryCode - \brief Change Country code from upperlayer during WLAN driver operation. + \brief Change Country code from upper layer during WLAN driver operation. This is a synchronous API. \param hHal - The handle returned by macOpen. @@ -6193,7 +6208,7 @@ VOS_STATUS sme_GetWcnssHardwareVersion(tHalHandle hHal, \param pBkidList - caller allocated buffer point to an array of tBkidCandidateInfo \param pNumItems - pointer to a variable that has the number of - tBkidCandidateInfo allocated when retruning, this is + tBkidCandidateInfo allocated when returning, this is either the number needed or number of items put into pPmkidList \return eHalStatus - when fail, it usually means the buffer allocated is not @@ -6504,7 +6519,7 @@ eHalStatus sme_ChangeMCCBeaconInterval(tHalHandle hHal, tANI_U8 sessionId) \fn sme_sendBTAmpEvent - \brief to receive the coex priorty request from BT-AMP PAL + \brief to receive the coex priority request from BT-AMP PAL and send the BT_AMP link state to HAL \param btAmpEvent - btAmpEvent @@ -6847,7 +6862,7 @@ eHalStatus sme_GetOperationChannel(tHalHandle hHal, tANI_U32 *pChannel, tANI_U8 \fn sme_RegisterMgtFrame - \brief To register managment frame of specified type and subtype. + \brief To register management frame of specified type and subtype. \param frameType - type of the frame that needs to be passed to HDD. \param matchData - data which needs to be matched before passing frame to HDD. @@ -6909,7 +6924,7 @@ eHalStatus sme_RegisterMgmtFrame(tHalHandle hHal, tANI_U8 sessionId, \fn sme_DeregisterMgtFrame - \brief To De-register managment frame of specified type and subtype. + \brief To De-register management frame of specified type and subtype. \param frameType - type of the frame that needs to be passed to HDD. \param matchData - data which needs to be matched before passing frame to HDD. @@ -7001,7 +7016,8 @@ eHalStatus sme_RemainOnChannel(tHalHandle hHal, tANI_U8 sessionId, \fn sme_ReportProbeReq \brief API to enable/disable forwarding of probeReq to apps in p2p. \param hHal - The handle returned by macOpen. - \param falg: to set the Probe request forarding to wpa_supplicant in listen state in p2p + \param flag: to set the Probe request forwarding to wpa_supplicant in + listen state in p2p \return eHalStatus ---------------------------------------------------------------------------*/ @@ -7518,8 +7534,11 @@ tANI_U8 sme_GetInfraOperationChannel( tHalHandle hHal, tANI_U8 sessionId) return (channel); } -//This routine will return poerating channel on which other BSS is operating to be used for concurrency mode. -//If other BSS is not up or not connected it will return 0 +/* + * This routine will return operating channel on which other BSS is operating to + * be used for concurrency mode. + * If other BSS is not up or not connected it will return 0. + */ tANI_U8 sme_GetConcurrentOperationChannel( tHalHandle hHal ) { eHalStatus status = eHAL_STATUS_FAILURE; @@ -7629,7 +7648,7 @@ eHalStatus sme_PreferredNetworkFoundInd (tHalHandle hHal, void* pMsg) pPrefNetworkFoundInd->mesgLen, sizeof(tSirPrefNetworkFoundInd)); } - /* Call Preferred Netowrk Found Indication callback routine. */ + /* Call Preferred Network Found Indication callback routine. */ if (HAL_STATUS_SUCCESS(status) && (pMac->pmc.prefNetwFoundCB != NULL)) { pMac->pmc.prefNetwFoundCB( @@ -7729,7 +7748,7 @@ eHalStatus sme_SetTxPerTracking(tHalHandle hHal, If Supplicant country code is priority than 11d is disabled. If 11D is enabled, we update the country code after every scan. Hence when Supplicant country code is priority, we don't need 11D info. - Country code from Supplicant is set as current courtry code. + Country code from Supplicant is set as current country code. User can send reset command XX (instead of country code) to reset the country code to default values which is read from NV. In case of reset, 11D is enabled and default NV code is Set as current country code @@ -7786,7 +7805,7 @@ eHalStatus sme_HandleChangeCountryCode(tpAniSirGlobal pMac, void *pMsgBuf) * 11D should be supported? * 11D Channel should be enforced? * 11D Country code should be matched? - * 11D Reg Domian should be matched? + * 11D Reg Domain should be matched? * Country string changed */ if(pMac->roam.configParam.Is11dSupportEnabled && pMac->roam.configParam.fEnforce11dChannels && @@ -7810,7 +7829,7 @@ eHalStatus sme_HandleChangeCountryCode(tpAniSirGlobal pMac, void *pMsgBuf) return status; } - /* overwrite the defualt country code */ + /* Overwrite the default country code */ vos_mem_copy(pMac->scan.countryCodeDefault, pMac->scan.countryCodeCurrent, WNI_CFG_COUNTRY_CODE_LEN); @@ -7894,7 +7913,7 @@ eHalStatus sme_HandleChangeCountryCodeByUser(tpAniSirGlobal pMac, is11dCountry = VOS_TRUE; } - /* Set the country code given by userspace when 11dOriginal is FALSE + /* Set the country code given by user space when 11dOriginal is FALSE * when 11doriginal is True,is11dCountry =0 and * fSupplicantCountryCodeHasPriority = 0, then revert the country code, * and return failure @@ -7938,7 +7957,7 @@ eHalStatus sme_HandleChangeCountryCodeByUser(tpAniSirGlobal pMac, if (VOS_FALSE == is11dCountry ) { - /* overwrite the defualt country code */ + /* Overwrite the default country code */ vos_mem_copy(pMac->scan.countryCodeDefault, pMac->scan.countryCodeCurrent, WNI_CFG_COUNTRY_CODE_LEN); /* set to default domain ID */ @@ -8061,7 +8080,7 @@ eHalStatus sme_HandleChangeCountryCodeByCore(tpAniSirGlobal pMac, tAniGenericCha \brief Disconnect STA and P2P client session if channel is not supported If new country code does not support the channel on which STA/P2P client - is connetced, it sends the disconnect to the AP/P2P GO + is connected, it sends the disconnect to the AP/P2P GO \param pMac - The handle returned by macOpen @@ -8439,7 +8458,7 @@ void sme_PreChannelSwitchIndOffloadFullPowerCB(void *callbackContext,tANI_U32 se /* --------------------------------------------------------------------------- \fn sme_HandlePreChannelSwitchInd - \brief Processes the indcation from PE for pre-channel switch. + \brief Processes the indication from PE for pre-channel switch. \param hHal \param void *pMsgBuf to carry session id \- The handle returned by macOpen. return eHalStatus @@ -8482,7 +8501,7 @@ eHalStatus sme_HandlePreChannelSwitchInd(tHalHandle hHal, void *pMsgBuf) /* --------------------------------------------------------------------------- \fn sme_HandlePostChannelSwitchInd - \brief Processes the indcation from PE for post-channel switch. + \brief Processes the indication from PE for post-channel switch. \param hHal \- The handle returned by macOpen. return eHalStatus ---------------------------------------------------------------------------*/ @@ -8927,8 +8946,8 @@ void sme_featureCapsExchange( tHalHandle hHal) /*--------------------------------------------------------------------------- - \brief sme_disableFeatureCapablity() - SME interface to disable Active mode offload capablity - in Host. + \brief sme_disableFeatureCapablity() - SME interface to disable Active mode + offload capability in Host. \param hHal - HAL handle for device @@ -8983,7 +9002,7 @@ eHalStatus sme_GetCurrentCountryCode(tHalHandle hHal, tANI_U8 *pCountry) /* --------------------------------------------------------------------------- \fn sme_transportDebug \brief Dynamically monitoring Transport channels - Private IOCTL will querry transport channel status if driver loaded + Private IOCTL will query transport channel status if driver loaded \param hHal Upper MAC context \param displaySnapshot Display transport channel snapshot option \param toggleStallDetect Enable stall detect feature @@ -9521,7 +9540,7 @@ eHalStatus sme_startRoaming(tHalHandle hHal, /*-------------------------------------------------------------------------- \brief sme_UpdateEnableFastRoamInConcurrency() - enable/disable LFR if Concurrent session exists - This is a synchronuous call + This is a synchronous call \param hHal - The handle returned by macOpen. \return eHAL_STATUS_SUCCESS Other status means SME is failed @@ -10051,7 +10070,8 @@ eHalStatus sme_setNeighborScanRefreshPeriod #ifdef WLAN_FEATURE_ROAM_SCAN_OFFLOAD /*-------------------------------------------------------------------------- - \brief sme_UpdateRoamScanOffloadEnabled() - enable/disable roam scan offload feaure + \brief sme_UpdateRoamScanOffloadEnabled() - + Enable/disable roam scan offload feature It is used at in the REG_DYNAMIC_VARIABLE macro definition of gRoamScanOffloadEnabled. This is a synchronous call @@ -10098,7 +10118,7 @@ v_U16_t sme_getNeighborScanRefreshPeriod(tHalHandle hHal) /*-------------------------------------------------------------------------- \brief sme_getEmptyScanRefreshPeriod() - get empty scan refresh period - This is a synchronuous call + This is a synchronous call \param hHal - The handle returned by macOpen. \return eHAL_STATUS_SUCCESS - SME update config successful. Other status means SME is failed to update @@ -10529,7 +10549,7 @@ eHalStatus sme_ChangeRoamScanChannelList(tHalHandle hHal, tANI_U8 sessionId, #ifdef FEATURE_WLAN_ESE_UPLOAD /*-------------------------------------------------------------------------- \brief sme_SetEseRoamScanChannelList() - set ese roam scan channel list - This is a synchronuous call + This is a synchronous call \param hHal - The handle returned by macOpen. \param sessionId - Session Identifier \param pChannelList - Input channel list @@ -10645,7 +10665,7 @@ eHalStatus sme_getRoamScanChannelList(tHalHandle hHal, tANI_U8 *pChannelList, /*-------------------------------------------------------------------------- \brief sme_getIsEseFeatureEnabled() - get ESE feature enabled or not - This is a synchronuous call + This is a synchronous call \param hHal - The handle returned by macOpen. \return TRUE (1) - if the ESE feature is enabled FALSE (0) - if feature is disabled (compile or runtime) @@ -10690,7 +10710,7 @@ v_BOOL_t sme_GetRoamScanControl(tHalHandle hHal) /*-------------------------------------------------------------------------- \brief sme_getIsLfrFeatureEnabled() - get LFR feature enabled or not - This is a synchronuous call + This is a synchronous call \param hHal - The handle returned by macOpen. \return TRUE (1) - if the feature is enabled FALSE (0) - if feature is disabled (compile or runtime) @@ -10708,7 +10728,7 @@ tANI_BOOLEAN sme_getIsLfrFeatureEnabled(tHalHandle hHal) /*-------------------------------------------------------------------------- \brief sme_getIsFtFeatureEnabled() - get FT feature enabled or not - This is a synchronuous call + This is a synchronous call \param hHal - The handle returned by macOpen. \return TRUE (1) - if the feature is enabled FALSE (0) - if feature is disabled (compile or runtime) @@ -10742,7 +10762,7 @@ tANI_U8 sme_IsFeatureSupportedByFW(tANI_U8 featEnumValue) \fn sme_SendTdlsLinkEstablishParams \brief API to send TDLS Peer Link Establishment Parameters. - \param peerMac - peer's Mac Adress. + \param peerMac - peer's Mac Address. \param tdlsLinkEstablishParams - TDLS Peer Link Establishment Parameters \- return VOS_STATUS_SUCCES -------------------------------------------------------------------------*/ @@ -10768,13 +10788,13 @@ VOS_STATUS sme_SendTdlsLinkEstablishParams(tHalHandle hHal, \fn sme_SendTdlsMgmtFrame \brief API to send TDLS management frames. - \param peerMac - peer's Mac Adress. + \param peerMac - peer's Mac Address. \param frame_type - Type of TDLS mgmt frame to be sent. \param dialog - dialog token used in the frame. - \param status - status to be incuded in the frame. - \param peerCapability - peer cpabilities + \param status - status to be included in the frame. + \param peerCapability - peer capabilities \param buf - additional IEs to be included - \param len - lenght of additional Ies + \param len - length of additional Ies \param responder - Tdls request type \- return VOS_STATUS_SUCCES -------------------------------------------------------------------------*/ @@ -10812,7 +10832,7 @@ VOS_STATUS sme_SendTdlsMgmtFrame(tHalHandle hHal, tANI_U8 sessionId, \fn sme_ChangeTdlsPeerSta \brief API to Update TDLS peer sta parameters. - \param peerMac - peer's Mac Adress. + \param peerMac - peer's Mac Address. \param staParams - Peer Station Parameters \- return VOS_STATUS_SUCCES -------------------------------------------------------------------------*/ @@ -10844,7 +10864,7 @@ VOS_STATUS sme_ChangeTdlsPeerSta(tHalHandle hHal, tANI_U8 sessionId, tSirMacAddr \fn sme_AddTdlsPeerSta \brief API to Add TDLS peer sta entry. - \param peerMac - peer's Mac Adress. + \param peerMac - peer's Mac Address. \- return VOS_STATUS_SUCCES -------------------------------------------------------------------------*/ VOS_STATUS sme_AddTdlsPeerSta(tHalHandle hHal, tANI_U8 sessionId, tSirMacAddr peerMac) @@ -10867,7 +10887,7 @@ VOS_STATUS sme_AddTdlsPeerSta(tHalHandle hHal, tANI_U8 sessionId, tSirMacAddr pe \fn sme_DeleteTdlsPeerSta \brief API to Delete TDLS peer sta entry. - \param peerMac - peer's Mac Adress. + \param peerMac - peer's Mac Address. \- return VOS_STATUS_SUCCES -------------------------------------------------------------------------*/ VOS_STATUS sme_DeleteTdlsPeerSta(tHalHandle hHal, tANI_U8 sessionId, tSirMacAddr peerMac) @@ -11078,7 +11098,7 @@ eHalStatus sme_UpdateTdlsPeerState(tHalHandle hHal, pTdlsPeerStateParams->peerCap.prefOffChanBandwidth = peerStateParams->peerCap.prefOffChanBandwidth; - /* Ideally better to get offset from ini or userspace, for now + /* Ideally better to get offset from ini or user space, for now * in case of 40MHz, assume lower primary */ if (pTdlsPeerStateParams->peerCap.prefOffChanBandwidth == 20) @@ -11188,7 +11208,7 @@ void sme_UpdateEnableSSR(tHalHandle hHal, tANI_BOOLEAN enableSSR) { VOS_TRACE(VOS_MODULE_ID_SME, VOS_TRACE_LEVEL_DEBUG, "SSR level is changed %d", enableSSR); - /* not serializing this messsage, as this is only going + /* not serializing this message, as this is only going * to set a variable in WDA/WDI */ WDA_SetEnableSSR(enableSSR); @@ -12143,8 +12163,8 @@ eHalStatus sme_SetPhyCBMode24G(tHalHandle hHal, ePhyChanBondState phyCBMode) #endif /* - * SME API to enable/disable idle mode powersave - * This should be called only if powersave offload + * SME API to enable/disable idle mode power save + * This should be called only if power save offload * is enabled */ VOS_STATUS sme_SetIdlePowersaveConfig(v_PVOID_t vosContext, tANI_U32 value) @@ -12950,7 +12970,7 @@ void sme_StatsExtRegisterCallback(tHalHandle hHal, StatsExtCallback callback) \fn sme_StatsExtRequest \brief - a function called when HDD receives STATS EXT vendor command from userspace + a function called when HDD receives STATS EXT vendor command from user space \param sessionID - vdevID for the stats ext request @@ -13885,7 +13905,7 @@ eHalStatus sme_SetLinkLayerStatsIndCB #endif /* WLAN_FEATURE_LINK_LAYER_STATS */ #ifdef WLAN_FEATURE_ROAM_OFFLOAD /*-------------------------------------------------------------------------- - \brief sme_UpdateRoamOffloadEnabled() - enable/disable roam offload feaure + \brief sme_UpdateRoamOffloadEnabled() - enable/disable roam offload feature It is used at in the REG_DYNAMIC_VARIABLE macro definition of \param hHal - The handle returned by macOpen. \param nRoamOffloadEnabled - The boolean to update with diff --git a/CORE/SME/src/sme_common/sme_FTApi.c b/CORE/SME/src/sme_common/sme_FTApi.c index 814e9c0ee653..2fd87dc0d55c 100644 --- a/CORE/SME/src/sme_common/sme_FTApi.c +++ b/CORE/SME/src/sme_common/sme_FTApi.c @@ -136,7 +136,7 @@ v_BOOL_t sme_GetFTPreAuthState(tHalHandle hHal, tANI_U32 sessionId) /*-------------------------------------------------------------------------- Each time the supplicant sends down the FT IEs to the driver. - This function is called in SME. This fucntion packages and sends + This function is called in SME. This function packages and sends the FT IEs to PE. ------------------------------------------------------------------------*/ void sme_SetFTIEs(tHalHandle hHal, tANI_U32 sessionId, const tANI_U8 *ft_ies, @@ -25,6 +25,8 @@ ifeq ($(KERNEL_BUILD),1) MODNAME := wlan WLAN_ROOT := drivers/staging/qcacld-2.0 WLAN_OPEN_SOURCE := 1 + CONFIG_QCA_WIFI_2_0 := 1 + CONFIG_QCA_WIFI_ISOC := 0 endif ifeq ($(KERNEL_BUILD), 0) @@ -1035,6 +1037,7 @@ CDEFINES += -DCONFIG_ATH_PROCFS_DIAG_SUPPORT CDEFINES += -DQCA_SUPPORT_OL_RX_REORDER_TIMEOUT CDEFINES += -DCONFIG_ATH_PCIE_MAX_PERF=0 -DCONFIG_ATH_PCIE_AWAKE_WHILE_DRIVER_LOAD=0 -DCONFIG_DISABLE_CDC_MAX_PERF_WAR=0 CDEFINES += -DQCA_TX_HTT2_SUPPORT +CDEFINES += -DCONFIG_HDD_INIT_WITH_RTNL_LOCK endif # enable the MAC Address auto-generation feature @@ -1,29 +1,13 @@ -comment "Qualcomm Atheros Prima WLAN module" +comment "Qualcomm Atheros CLD WLAN module" -config PRIMA_WLAN +config QCA_CLD_WLAN - tristate "Qualcomm Atheros Prima WLAN module" + tristate "Qualcomm Atheros CLD WLAN module" default n help - Add support for the Qualcomm Atheros Prima WLAN module + Add support for the Qualcomm Atheros CLD WLAN module -config PRONTO_WLAN - - tristate "Qualcomm Atheros Pronto WLAN module" - default n - help - Add support for the Qualcomm Atheros Pronto WLAN module - - -# depends on WLAN -# depends on CFG80211 -# depends on WCNSS_CORE - -if PRIMA_WLAN != n || PRONTO_WLAN != n - -config PRIMA_WLAN_BTAMP - bool "Enable the Prima WLAN BT-AMP feature" - default n +if QCA_CLD_WLAN != n config QCACLD_WLAN_LFR3 bool "Enable the WLAN Legacy Fast Roaming feature Version 3" @@ -53,4 +37,12 @@ config CONFIG_FEATURE_NAN bool "Enable NAN feature" default n -endif # PRIMA_WLAN || PRONTO_WLAN +config QCOM_TDLS + bool "Enable TDLS feature" + default n + +config QCOM_LTE_COEX + bool "Enable QCOM LTE Coex feature" + default n + +endif # QCA_CLD_WLAN |
