summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeff Johnson <jjohnson@qca.qualcomm.com>2014-07-18 13:00:45 -0700
committerAkash Patel <c_akashp@qca.qualcomm.com>2014-07-29 18:45:05 -0700
commit7d6e1fd7aa904466207c56d2a220203b2d447308 (patch)
tree1493c0521a16dba84145bb350e743d4fc10eb76f
parent839dbf6291c2bd60eb0534df38fdd448dba90df3 (diff)
wlan: hdd: Remove obsolete ISOC and WIFI_2_0 conditions
The qcacld driver contains a large amount of conditional compilation that was initially added to allow the driver to support both integrated and discrete wlan solutions. However it has been decided that the integrated solutions will only be supported by the prima driver, so remove from HDD all of the conditional compilation that is now obsolete. - Code that is conditional upon QCA_WIFI_ISOC being defined is removed. - Code that is conditional upon QCA_WIFI_ISOC not being defined is retained without conditional compilation. - Code that is conditional upon QCA_WIFI_2_0 being defined is retained without conditional compilation. - Code that is conditional upon QCA_WIFI_2_0 not being defined is removed. Change-Id: I5d11c5d7c4bb5d45ca98c491633a26d1be69e29a CRs-fixed: 698342
-rw-r--r--CORE/HDD/inc/qc_sap_ioctl.h2
-rw-r--r--CORE/HDD/inc/wlan_hdd_assoc.h9
-rw-r--r--CORE/HDD/inc/wlan_hdd_cfg.h32
-rw-r--r--CORE/HDD/inc/wlan_hdd_cfg80211.h5
-rw-r--r--CORE/HDD/inc/wlan_hdd_dev_pwr.h46
-rw-r--r--CORE/HDD/inc/wlan_hdd_ftm.h5
-rw-r--r--CORE/HDD/inc/wlan_hdd_main.h15
-rw-r--r--CORE/HDD/inc/wlan_hdd_oemdata.h10
-rw-r--r--CORE/HDD/inc/wlan_hdd_softap_tx_rx.h21
-rw-r--r--CORE/HDD/inc/wlan_hdd_tdls.h12
-rw-r--r--CORE/HDD/inc/wlan_hdd_tx_rx.h20
-rw-r--r--CORE/HDD/inc/wlan_hdd_wowl.h6
-rw-r--r--CORE/HDD/src/wlan_hdd_assoc.c23
-rw-r--r--CORE/HDD/src/wlan_hdd_cfg.c23
-rw-r--r--CORE/HDD/src/wlan_hdd_cfg80211.c121
-rw-r--r--CORE/HDD/src/wlan_hdd_dev_pwr.c405
-rw-r--r--CORE/HDD/src/wlan_hdd_early_suspend.c109
-rw-r--r--CORE/HDD/src/wlan_hdd_ftm.c120
-rw-r--r--CORE/HDD/src/wlan_hdd_hostapd.c74
-rwxr-xr-xCORE/HDD/src/wlan_hdd_main.c321
-rw-r--r--CORE/HDD/src/wlan_hdd_oemdata.c4
-rw-r--r--CORE/HDD/src/wlan_hdd_p2p.c2
-rw-r--r--CORE/HDD/src/wlan_hdd_softap_tx_rx.c421
-rw-r--r--CORE/HDD/src/wlan_hdd_tdls.c328
-rw-r--r--CORE/HDD/src/wlan_hdd_tx_rx.c548
-rw-r--r--CORE/HDD/src/wlan_hdd_wext.c74
-rw-r--r--CORE/HDD/src/wlan_hdd_wmm.c86
27 files changed, 34 insertions, 2808 deletions
diff --git a/CORE/HDD/inc/qc_sap_ioctl.h b/CORE/HDD/inc/qc_sap_ioctl.h
index e5d693a90575..b6584721d3e7 100644
--- a/CORE/HDD/inc/qc_sap_ioctl.h
+++ b/CORE/HDD/inc/qc_sap_ioctl.h
@@ -179,7 +179,6 @@ typedef struct
#define QCSAP_IOCTL_MAX_STR_LEN 1024
-#ifdef QCA_WIFI_2_0
#define RC_2_RATE_IDX(_rc) ((_rc) & 0x7)
#define HT_RC_2_STREAMS(_rc) ((((_rc) & 0x78) >> 3) + 1)
@@ -187,7 +186,6 @@ typedef struct
#define RC_2_RATE_IDX_11AC(_rc) ((_rc) & 0xf)
#define HT_RC_2_STREAMS_11AC(_rc) ((((_rc) & 0x30) >> 4) + 1)
-#endif /* QCA_WIFI_2_0 */
enum {
QCSAP_PARAM_MAX_ASSOC = 1,
diff --git a/CORE/HDD/inc/wlan_hdd_assoc.h b/CORE/HDD/inc/wlan_hdd_assoc.h
index 9c53f4b28f0e..4abef31bffaa 100644
--- a/CORE/HDD/inc/wlan_hdd_assoc.h
+++ b/CORE/HDD/inc/wlan_hdd_assoc.h
@@ -32,13 +32,8 @@
#ifdef FEATURE_WLAN_TDLS
#define HDD_MAX_NUM_TDLS_STA ( 8 )
#define HDD_MAX_NUM_TDLS_STA_P_UAPSD ( 1 )
-#ifdef QCA_WIFI_2_0
#define TDLS_STA_INDEX_VALID(staId) \
(((staId) >= 1) && ((staId) < 0xFF))
-#else
-#define TDLS_STA_INDEX_VALID(staId) \
- (((staId) >= 4) && ((staId) < 0xFF))
-#endif
#endif
#define TKIP_COUNTER_MEASURE_STARTED 1
#define TKIP_COUNTER_MEASURE_STOPED 0
@@ -127,13 +122,11 @@ typedef struct hdd_station_ctx hdd_station_ctx_t;
typedef struct hdd_ap_ctx_s hdd_ap_ctx_t;
typedef struct hdd_mon_ctx_s hdd_mon_ctx_t;
-#ifdef QCA_WIFI_2_0
typedef enum
{
ePeerConnected = 1,
ePeerDisconnected
}ePeerStatus;
-#endif /* QCA_WIFI_2_0 */
extern v_BOOL_t hdd_connIsConnected( hdd_station_ctx_t *pHddStaCtx );
eCsrBand hdd_connGetConnectedBand( hdd_station_ctx_t *pHddStaCtx );
@@ -152,13 +145,11 @@ VOS_STATUS hdd_roamRegisterTDLSSTA( hdd_adapter_t *pAdapter,
tANI_U8 *peerMac, tANI_U16 staId, tANI_U8 ucastSig);
void hdd_PerformRoamSetKeyComplete(hdd_adapter_t *pAdapter);
-#ifdef QCA_WIFI_2_0
void hdd_SendPeerStatusIndToOemApp(v_MACADDR_t *peerMac,
tANI_U8 peerStatus,
tANI_U8 peerTimingMeasCap,
tANI_U8 sessionId,
tANI_U8 chanId);
-#endif /* QCA_WIFI_2_0 */
#if defined(FEATURE_WLAN_ESE) && defined(FEATURE_WLAN_ESE_UPLOAD)
void hdd_indicateEseBcnReportNoResults(const hdd_adapter_t *pAdapter,
const tANI_U16 measurementToken,
diff --git a/CORE/HDD/inc/wlan_hdd_cfg.h b/CORE/HDD/inc/wlan_hdd_cfg.h
index c1cb4076f41c..261228246fa0 100644
--- a/CORE/HDD/inc/wlan_hdd_cfg.h
+++ b/CORE/HDD/inc/wlan_hdd_cfg.h
@@ -45,14 +45,9 @@
#include <wlan_hdd_wmm.h>
#include <vos_types.h>
#include <csrApi.h>
-#if defined (QCA_WIFI_2_0) && \
- !defined (QCA_WIFI_ISOC)
#include <wlan_hdd_tgt_cfg.h>
-#endif
-#ifdef QCA_WIFI_2_0
#define FW_MODULE_LOG_LEVEL_STRING_LENGTH (255)
-#endif
//Number of items that can be configured
#define MAX_CFG_INI_ITEMS 512
@@ -1600,7 +1595,6 @@ typedef enum
#define CFG_ENABLE_PACKET_LOG_MAX ( 1 )
#define CFG_ENABLE_PACKET_LOG_DEFAULT ( 0 )
-#ifdef QCA_WIFI_2_0
#define CFG_ENABLE_FW_LOG_TYPE "gFwDebugLogType"
#define CFG_ENABLE_FW_LOG_TYPE_MIN ( 0 )
#define CFG_ENABLE_FW_LOG_TYPE_MAX ( 255 )
@@ -1615,7 +1609,6 @@ typedef enum
#define CFG_ENABLE_FW_MODULE_LOG_LEVEL "gFwDebugModuleLoglevel"
#define CFG_ENABLE_FW_MODULE_LOG_DEFAULT ""
-#endif
#ifdef FEATURE_GREEN_AP
#define CFG_ENABLE_GREEN_AP_FEATURE "gEnableGreenAp"
@@ -1839,7 +1832,6 @@ typedef enum
#define CFG_THERMAL_MIGRATION_ENABLE_DEFAULT ( 0 )
-#ifndef QCA_WIFI_ISOC
#define CFG_THROTTLE_PERIOD_NAME "gThrottlePeriod"
#define CFG_THROTTLE_PERIOD_MIN ( 10 )
@@ -1886,7 +1878,6 @@ typedef enum
#define CFG_THERMAL_TEMP_MAX_LEVEL3_MAX ( 1000 )
#define CFG_THERMAL_TEMP_MAX_LEVEL3_DEFAULT ( 0 )
-#endif /*#ifndef QCA_WIFI_ISOC*/
/*
* Enable/Disable Modulated DTIM feature
@@ -2002,12 +1993,10 @@ typedef enum
#define CFG_TDLS_RSSI_TEARDOWN_THRESHOLD_MAX ( 0 )
#define CFG_TDLS_RSSI_TEARDOWN_THRESHOLD_DEFAULT ( -75 )
-#ifdef QCA_WIFI_2_0
#define CFG_TDLS_RSSI_DELTA "gTDLSRSSIDelta"
#define CFG_TDLS_RSSI_DELTA_MIN ( -30 )
#define CFG_TDLS_RSSI_DELTA_MAX ( 0 )
#define CFG_TDLS_RSSI_DELTA_DEFAULT ( -20 )
-#endif
#define CFG_TDLS_QOS_WMM_UAPSD_MASK_NAME "gTDLSUapsdMask" // ACs to setup U-APSD for TDLS Sta
#define CFG_TDLS_QOS_WMM_UAPSD_MASK_MIN (0)
@@ -2018,11 +2007,7 @@ typedef enum
#define CFG_TDLS_BUFFER_STA_SUPPORT_ENABLE_MIN (0)
#define CFG_TDLS_BUFFER_STA_SUPPORT_ENABLE_MAX (1)
/* Buffer STA is not enabled in CLD 2.0 yet */
-#ifdef QCA_WIFI_2_0
#define CFG_TDLS_BUFFER_STA_SUPPORT_ENABLE_DEFAULT (0)
-#else
-#define CFG_TDLS_BUFFER_STA_SUPPORT_ENABLE_DEFAULT (1)
-#endif
#define CFG_TDLS_PUAPSD_INACTIVITY_TIME "gTDLSPuapsdInactivityTime"
#define CFG_TDLS_PUAPSD_INACTIVITY_TIME_MIN (0)
@@ -2560,7 +2545,6 @@ This feature requires the dependent cfg.ini "gRoamPrefer5GHz" set to 1 */
#define CFG_ENABLE_STRICT_REGULATORY_FOR_FCC_MAX ( 1 )
#define CFG_ENABLE_STRICT_REGULATORY_FOR_FCC_DEFAULT ( 0 )
-#ifdef QCA_WIFI_2_0
#define CFG_SAP_MAX_OFFLOAD_PEERS "gMaxOffloadPeers"
#define CFG_SAP_MAX_OFFLOAD_PEERS_MIN (2)
#define CFG_SAP_MAX_OFFLOAD_PEERS_MAX (5)
@@ -2570,7 +2554,6 @@ This feature requires the dependent cfg.ini "gRoamPrefer5GHz" set to 1 */
#define CFG_SAP_MAX_OFFLOAD_REORDER_BUFFS_MIN (0)
#define CFG_SAP_MAX_OFFLOAD_REORDER_BUFFS_MAX (3)
#define CFG_SAP_MAX_OFFLOAD_REORDER_BUFFS_DEFAULT (2)
-#endif
#ifdef FEATURE_WLAN_RA_FILTERING
#define CFG_RA_FILTER_ENABLE_NAME "gRAFilterEnable"
@@ -2668,12 +2651,10 @@ This feature requires the dependent cfg.ini "gRoamPrefer5GHz" set to 1 */
#define CFG_DFS_RADAR_PRI_MULTIPLIER_DEFAULT ( 4 )
#define CFG_DFS_RADAR_PRI_MULTIPLIER_MIN ( 0 )
#define CFG_DFS_RADAR_PRI_MULTIPLIER_MAX ( 10 )
-#if !defined(QCA_WIFI_ISOC)
#define CFG_REORDER_OFFLOAD_SUPPORT_NAME "gReorderOffloadSupported"
#define CFG_REORDER_OFFLOAD_SUPPORT_MIN ( 0 )
#define CFG_REORDER_OFFLOAD_SUPPORT_MAX ( 1 )
#define CFG_REORDER_OFFLOAD_SUPPORT_DEFAULT ( 0 )
-#endif
#ifdef WLAN_FEATURE_ROAM_OFFLOAD
#define CFG_ROAMING_OFFLOAD_NAME "gRoamOffloadEnabled"
@@ -3086,9 +3067,7 @@ typedef struct
v_U8_t allowMCCGODiffBI;
v_BOOL_t isP2pDeviceAddrAdministrated;
v_U8_t thermalMitigationEnable;
-#ifndef QCA_WIFI_ISOC
v_U32_t throttlePeriod;
-#endif
#ifdef WLAN_FEATURE_11AC
v_U8_t vhtChannelWidth;
v_U8_t vhtRxMCS;
@@ -3130,9 +3109,7 @@ typedef struct
v_U32_t fTDLSRSSIHysteresis;
v_S31_t fTDLSRSSITriggerThreshold;
v_S31_t fTDLSRSSITeardownThreshold;
-#ifdef QCA_WIFI_2_0
v_S31_t fTDLSRSSIDelta;
-#endif
v_U32_t fTDLSUapsdMask; // what ACs to setup U-APSD for TDLS
v_U32_t fEnableTDLSBufferSta;
v_U32_t fEnableTDLSSleepSta;
@@ -3233,7 +3210,6 @@ typedef struct
v_U8_t maxNumberOfPeers;
v_U8_t disableDFSChSwitch;
v_U8_t enableDFSMasterCap;
-#ifndef QCA_WIFI_ISOC
v_U16_t thermalTempMinLevel0;
v_U16_t thermalTempMaxLevel0;
v_U16_t thermalTempMinLevel1;
@@ -3244,7 +3220,6 @@ typedef struct
v_U16_t thermalTempMaxLevel3;
v_U32_t TxPower2g;
v_U32_t TxPower5g;
-#endif
v_U32_t gEnableDebugLog;
v_U8_t enableRxThread;
v_BOOL_t fDfsPhyerrFilterOffload;
@@ -3287,12 +3262,10 @@ typedef struct
v_U32_t busBandwidthComputeInterval;
#endif /* MSM_PLATFORM */
-#ifdef QCA_WIFI_2_0
/* FW debug log parameters */
v_U32_t enableFwLogType;
v_U32_t enableFwLogLevel;
v_U8_t enableFwModuleLogLevel[FW_MODULE_LOG_LEVEL_STRING_LENGTH];
-#endif
#ifdef WLAN_FEATURE_11W
v_U32_t pmfSaQueryMaxRetries;
@@ -3312,9 +3285,7 @@ typedef struct
#endif
v_S31_t dfsRadarPriMultiplier;
-#if !defined(QCA_WIFI_ISOC)
v_U8_t reorderOffloadSupport;
-#endif
#ifdef WLAN_FEATURE_ROAM_OFFLOAD
v_BOOL_t isRoamOffloadEnabled;
@@ -3476,11 +3447,8 @@ VOS_STATUS hdd_execute_sap_dyn_config_command(hdd_adapter_t *pAdapter,
tANI_BOOLEAN hdd_is_okc_mode_enabled(hdd_context_t *pHddCtx);
VOS_STATUS hdd_set_idle_ps_config(hdd_context_t *pHddCtx, v_U32_t val);
-#if defined (QCA_WIFI_2_0) && \
- !defined (QCA_WIFI_ISOC)
void hdd_update_tgt_cfg(void *context, void *param);
void hdd_dfs_indicate_radar(void *context, void *param);
-#endif /* QCA_WIFI_2_0 && !QCA_WIFI_ISOC */
VOS_STATUS hdd_string_to_u8_array( char *str, tANI_U8 *intArray, tANI_U8 *len,
tANI_U8 intArrayMaxLen );
diff --git a/CORE/HDD/inc/wlan_hdd_cfg80211.h b/CORE/HDD/inc/wlan_hdd_cfg80211.h
index c3fd9da4a316..e23eb8bbea07 100644
--- a/CORE/HDD/inc/wlan_hdd_cfg80211.h
+++ b/CORE/HDD/inc/wlan_hdd_cfg80211.h
@@ -825,16 +825,13 @@ v_U8_t* wlan_hdd_cfg80211_get_ie_ptr(v_U8_t *pIes, int length, v_U8_t eid);
int wlan_hdd_cfg80211_del_station(struct wiphy *wiphy,
struct net_device *dev, u8 *mac);
-#if defined(QCA_WIFI_2_0) && defined(QCA_WIFI_FTM) \
- && !defined(QCA_WIFI_ISOC) && defined(CONFIG_NL80211_TESTMODE)
+#if defined(QCA_WIFI_FTM) && defined(CONFIG_NL80211_TESTMODE)
void wlan_hdd_testmode_rx_event(void *buf, size_t buf_len);
#endif
-#ifdef QCA_WIFI_2_0
void hdd_suspend_wlan(void (*callback)(void *callbackContext, boolean suspended),
void *callbackContext);
void hdd_resume_wlan(void);
-#endif
#ifdef FEATURE_WLAN_CH_AVOID
int wlan_hdd_send_avoid_freq_event(hdd_context_t *pHddCtx,
diff --git a/CORE/HDD/inc/wlan_hdd_dev_pwr.h b/CORE/HDD/inc/wlan_hdd_dev_pwr.h
index ae7ab7899490..c17b1b0a6031 100644
--- a/CORE/HDD/inc/wlan_hdd_dev_pwr.h
+++ b/CORE/HDD/inc/wlan_hdd_dev_pwr.h
@@ -33,51 +33,6 @@
#include <vos_sched.h>
#include <vos_api.h>
-#ifdef QCA_WIFI_ISOC
-/*----------------------------------------------------------------------------
-
- @brief Registration function.
- Register suspend, resume callback functions with platform driver.
-
- @param hdd_context_t pHddCtx
- Global hdd context
-
- @return General status code
- VOS_STATUS_SUCCESS Registration Success
- VOS_STATUS_E_FAILURE Registration Fail
-
-----------------------------------------------------------------------------*/
-VOS_STATUS hddRegisterPmOps(hdd_context_t *pHddCtx);
-
-/*----------------------------------------------------------------------------
-
- @brief De-registration function.
- Deregister the suspend, resume callback functions with platform driver
-
- @param hdd_context_t pHddCtx
- Global hdd context
-
- @return General status code
- VOS_STATUS_SUCCESS De-Registration Success
- VOS_STATUS_E_FAILURE De-Registration Fail
-
-----------------------------------------------------------------------------*/
-VOS_STATUS hddDeregisterPmOps(hdd_context_t *pHddCtx);
-
-/*----------------------------------------------------------------------------
-
- @brief TM Level Change handler
- Received Tm Level changed notification
-
- @param dev : Device context
- changedTmLevel : Changed new TM level
-
- @return
-
-----------------------------------------------------------------------------*/
-void hddDevTmLevelChangedHandler(struct device *dev, int changedTmLevel);
-
-#else
/*----------------------------------------------------------------------------
@@ -131,7 +86,6 @@ static inline void hddDevTmLevelChangedHandler(struct device *dev,
{
return;
}
-#endif /*QCA_WIFI_ISOC*/
/*----------------------------------------------------------------------------
diff --git a/CORE/HDD/inc/wlan_hdd_ftm.h b/CORE/HDD/inc/wlan_hdd_ftm.h
index b1758be7e28a..97217240af40 100644
--- a/CORE/HDD/inc/wlan_hdd_ftm.h
+++ b/CORE/HDD/inc/wlan_hdd_ftm.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2013-2014 The Linux Foundation. All rights reserved.
*
* Previously licensed under the ISC license by Qualcomm Atheros, Inc.
*
@@ -212,8 +212,7 @@ int wlan_hdd_ftm_open(hdd_context_t *pHddCtx);
void wlan_hdd_process_ftm_cmd (hdd_context_t *pHddCtx,tAniNlHdr *wnl);
int wlan_hdd_ftm_close(hdd_context_t *pHddCtx);
-#if defined(QCA_WIFI_2_0) && defined(QCA_WIFI_FTM) \
- && !defined(QCA_WIFI_ISOC)
+#if defined(QCA_WIFI_FTM)
VOS_STATUS wlan_hdd_ftm_testmode_cmd(void *data, int len);
int wlan_hdd_qcmbr_unified_ioctl(hdd_adapter_t *pAdapter, struct ifreq *ifr);
#endif
diff --git a/CORE/HDD/inc/wlan_hdd_main.h b/CORE/HDD/inc/wlan_hdd_main.h
index 570823d02c0b..87a540c3d6e9 100644
--- a/CORE/HDD/inc/wlan_hdd_main.h
+++ b/CORE/HDD/inc/wlan_hdd_main.h
@@ -108,7 +108,6 @@
#define WLAN_WAIT_TIME_SESSIONOPENCLOSE 15000
#define WLAN_WAIT_TIME_ABORTSCAN 2000
-#ifdef QCA_WIFI_2_0
/** Maximum time(ms) to wait for mc thread suspend **/
#define WLAN_WAIT_TIME_MCTHREAD_SUSPEND 1200
@@ -116,7 +115,6 @@
/** Maximum time(ms) to wait for target to be ready for suspend **/
#define WLAN_WAIT_TIME_READY_TO_SUSPEND 2000
-#endif
/** Maximum time(ms) to wait for tdls add sta to complete **/
#define WAIT_TIME_TDLS_ADD_STA 1500
@@ -204,15 +202,11 @@
#define HDD_MOD_EXIT_SSR_MAX_RETRIES 30
/* Maximum number of interfaces allowed(STA, P2P Device, P2P Interfaces) */
-#ifndef QCA_WIFI_2_0
-#define WLAN_MAX_INTERFACES 3
-#else
#ifndef WLAN_OPEN_P2P_INTERFACE
#define WLAN_MAX_INTERFACES 3
#else
#define WLAN_MAX_INTERFACES 4
#endif
-#endif
#ifdef WLAN_FEATURE_GTK_OFFLOAD
#define GTK_OFFLOAD_ENABLE 0
@@ -300,9 +294,6 @@ extern spinlock_t hdd_context_lock;
#define HDD_GET_BATCH_SCAN_RSP_TIME_OUT (15000) /*Batch scan req timeout in ms*/
#define HDD_BATCH_SCAN_AP_META_INFO_SIZE (150) /*AP meta info size in string*/
-#ifndef QCA_WIFI_2_0
-#define MIN(a, b) (a > b ? b : a)
-#endif
#endif
#ifdef QCA_LL_TX_FLOW_CT
@@ -1346,14 +1337,12 @@ struct hdd_context_s
#endif /* WLAN_KD_READY_NOTIFIER */
#ifdef FEATURE_OEM_DATA_SUPPORT
-#ifdef QCA_WIFI_2_0
/* OEM App registered or not */
v_BOOL_t oem_app_registered;
/* OEM App Process ID */
v_SINT_t oem_pid;
#endif
-#endif
v_U8_t change_iface;
@@ -1477,7 +1466,6 @@ struct hdd_context_s
v_BOOL_t isVHT80Allowed;
struct completion ready_to_suspend;
-#ifdef QCA_WIFI_2_0
/* defining the solution type */
v_U32_t target_type;
@@ -1491,7 +1479,6 @@ struct hdd_context_s
v_U32_t target_hw_revision;
/* chip/rom name */
const char *target_hw_name;
-#endif
struct regulatory reg;
#ifdef FEATURE_WLAN_CH_AVOID
v_U16_t unsafe_channel_count;
@@ -1600,9 +1587,7 @@ void hdd_set_ssr_required(e_hdd_ssr_required value);
VOS_STATUS hdd_enable_bmps_imps(hdd_context_t *pHddCtx);
VOS_STATUS hdd_disable_bmps_imps(hdd_context_t *pHddCtx, tANI_U8 session_type);
-#ifdef QCA_WIFI_2_0
void wlan_hdd_cfg80211_update_wiphy_caps(struct wiphy *wiphy);
-#endif
VOS_STATUS hdd_setIbssPowerSaveParams(hdd_adapter_t *pAdapter);
void wlan_hdd_cfg80211_update_reg_info(struct wiphy *wiphy);
VOS_STATUS wlan_hdd_restart_driver(hdd_context_t *pHddCtx);
diff --git a/CORE/HDD/inc/wlan_hdd_oemdata.h b/CORE/HDD/inc/wlan_hdd_oemdata.h
index 955f49b9698b..e4b232cc68cb 100644
--- a/CORE/HDD/inc/wlan_hdd_oemdata.h
+++ b/CORE/HDD/inc/wlan_hdd_oemdata.h
@@ -40,22 +40,13 @@
#define __WLAN_HDD_OEM_DATA_H__
#ifndef OEM_DATA_REQ_SIZE
-#ifdef QCA_WIFI_2_0
#define OEM_DATA_REQ_SIZE 280
-#else
-#define OEM_DATA_REQ_SIZE 134
-#endif
#endif
#ifndef OEM_DATA_RSP_SIZE
-#ifdef QCA_WIFI_2_0
#define OEM_DATA_RSP_SIZE 1724
-#else
-#define OEM_DATA_RSP_SIZE 1968
-#endif
#endif
-#ifdef QCA_WIFI_2_0
#define OEM_APP_SIGNATURE_LEN 16
#define OEM_APP_SIGNATURE_STR "QUALCOMM-OEM-APP"
@@ -161,7 +152,6 @@ typedef PACKED_PRE struct PACKED_POST
/* channel info on which peer is connected */
tHddChannelInfo peer_chan_info;
} tPeerStatusInfo;
-#endif /* QCA_WIFI_2_0 */
struct iw_oem_data_req
{
diff --git a/CORE/HDD/inc/wlan_hdd_softap_tx_rx.h b/CORE/HDD/inc/wlan_hdd_softap_tx_rx.h
index b78ec1c13be8..c5fddd676a51 100644
--- a/CORE/HDD/inc/wlan_hdd_softap_tx_rx.h
+++ b/CORE/HDD/inc/wlan_hdd_softap_tx_rx.h
@@ -200,26 +200,6 @@ extern VOS_STATUS hdd_softap_tx_fetch_packet_cbk( v_VOID_t *vosContext,
extern VOS_STATUS hdd_softap_tx_low_resource_cbk( vos_pkt_t *pVosPacket,
v_VOID_t *userData );
-#ifndef QCA_WIFI_2_0
-/**============================================================================
- @brief hdd_softap_rx_packet_cbk() - Receive callback registered with TL.
- TL will call this to notify the HDD when a packet was received
- for a registered STA.
-
- @param vosContext : [in] pointer to VOS context
- @param pVosPacket : [in] pointer to VOS packet (conatining sk_buff)
- @param staId : [in] Station Id
- @param pRxMetaInfo : [in] pointer to meta info for the received pkt(s)
-
- @return : VOS_STATUS_E_FAILURE if any errors encountered,
- : VOS_STATUS_SUCCESS otherwise
- ===========================================================================*/
-extern VOS_STATUS hdd_softap_rx_packet_cbk( v_VOID_t *vosContext,
- vos_pkt_t *pVosPacket,
- v_U8_t staId,
- WLANTL_RxMetaInfoType* pRxMetaInfo );
-
-#else
/**============================================================================
@brief hdd_softap_rx_packet_cbk() - Receive callback registered with TL.
TL will call this to notify the HDD when a packet was received
@@ -251,7 +231,6 @@ extern VOS_STATUS hdd_softap_rx_packet_cbk(v_VOID_t *vosContext,
VOS_STATUS hdd_softap_rx_mul_packet_cbk(v_VOID_t *vosContext,
adf_nbuf_t rx_buf_list, v_U8_t staId);
#endif /* IPA_OFFLOAD */
-#endif
/**============================================================================
@brief hdd_softap_DeregisterSTA - Deregister a station from TL block
diff --git a/CORE/HDD/inc/wlan_hdd_tdls.h b/CORE/HDD/inc/wlan_hdd_tdls.h
index 47243a217d31..8ffb12d0a9ff 100644
--- a/CORE/HDD/inc/wlan_hdd_tdls.h
+++ b/CORE/HDD/inc/wlan_hdd_tdls.h
@@ -82,9 +82,7 @@ typedef struct
tANI_U32 rssi_hysteresis;
tANI_S32 rssi_trigger_threshold;
tANI_S32 rssi_teardown_threshold;
-#ifdef QCA_WIFI_2_0
tANI_S32 rssi_delta;
-#endif
} tdls_config_params_t;
typedef struct
@@ -148,9 +146,6 @@ typedef struct {
#ifdef TDLS_USE_SEPARATE_DISCOVERY_TIMER
vos_timer_t peerDiscoverTimer;
#endif
-#ifndef QCA_WIFI_2_0
- vos_timer_t peerUpdateTimer;
-#endif
vos_timer_t peerDiscoveryTimeoutTimer;
tdls_config_params_t threshold_config;
tANI_S32 discovery_peer_cnt;
@@ -183,9 +178,6 @@ typedef struct _hddTdlsPeer_t {
tANI_U8 supported_channels[SIR_MAC_MAX_SUPP_CHANNELS];
tANI_U8 supported_oper_classes_len;
tANI_U8 supported_oper_classes[SIR_MAC_MAX_SUPP_OPER_CLASSES];
-#ifndef QCA_WIFI_2_0
- vos_timer_t peerIdleTimer;
-#endif
vos_timer_t initiatorWaitTimeoutTimer;
tANI_BOOLEAN isForcedPeer;
} hddTdlsPeer_t;
@@ -199,7 +191,6 @@ typedef struct {
v_MACADDR_t peerMac;
} tdlsConnInfo_t;
-#ifdef QCA_WIFI_2_0
typedef struct {
tANI_U32 vdev_id;
tANI_U32 tdls_state;
@@ -215,7 +206,6 @@ typedef struct {
tANI_U32 puapsd_inactivity_time;
tANI_U32 puapsd_rx_frame_threshold;
} tdlsInfo_t;
-#endif
int wlan_hdd_tdls_init(hdd_adapter_t *pAdapter);
@@ -316,12 +306,10 @@ void wlan_hdd_tdls_indicate_teardown(hdd_adapter_t *pAdapter,
hddTdlsPeer_t *curr_peer,
tANI_U16 reason);
-#ifdef QCA_WIFI_2_0
#ifdef CONFIG_TDLS_IMPLICIT
void wlan_hdd_tdls_pre_setup_init_work(tdlsCtx_t *pHddTdlsCtx,
hddTdlsPeer_t *curr_candidate);
#endif
-#endif
int wlan_hdd_tdls_set_force_peer(hdd_adapter_t *pAdapter, u8 *mac,
tANI_BOOLEAN forcePeer);
diff --git a/CORE/HDD/inc/wlan_hdd_tx_rx.h b/CORE/HDD/inc/wlan_hdd_tx_rx.h
index 0925e7894192..d970bb4e105a 100644
--- a/CORE/HDD/inc/wlan_hdd_tx_rx.h
+++ b/CORE/HDD/inc/wlan_hdd_tx_rx.h
@@ -197,25 +197,6 @@ extern VOS_STATUS hdd_tx_fetch_packet_cbk( v_VOID_t *vosContext,
extern VOS_STATUS hdd_tx_low_resource_cbk( vos_pkt_t *pVosPacket,
v_VOID_t *userData );
-#ifndef QCA_WIFI_2_0
-/**============================================================================
- @brief hdd_rx_packet_cbk() - Receive callback registered with TL.
- TL will call this to notify the HDD when a packet was received
- for a registered STA.
-
- @param vosContext : [in] pointer to VOS context
- @param pVosPacket : [in] pointer to VOS packet (conatining sk_buff)
- @param staId : [in] Station Id
- @param pRxMetaInfo : [in] pointer to meta info for the received pkt(s)
-
- @return : VOS_STATUS_E_FAILURE if any errors encountered,
- : VOS_STATUS_SUCCESS otherwise
- ===========================================================================*/
-extern VOS_STATUS hdd_rx_packet_cbk( v_VOID_t *vosContext,
- vos_pkt_t *pVosPacket,
- v_U8_t staId,
- WLANTL_RxMetaInfoType* pRxMetaInfo );
-#else
/**============================================================================
@brief hdd_rx_packet_cbk() - Receive callback registered with TL.
TL will call this to notify the HDD when a packet was received
@@ -247,7 +228,6 @@ extern VOS_STATUS hdd_rx_packet_cbk(v_VOID_t *vosContext, adf_nbuf_t rxBufChain,
VOS_STATUS hdd_rx_mul_packet_cbk(v_VOID_t *vosContext,
adf_nbuf_t rx_buf_list, v_U8_t staId);
#endif /* IPA_OFFLOAD */
-#endif
/**============================================================================
@brief hdd_IsEAPOLPacket() - Checks the packet is EAPOL or not.
diff --git a/CORE/HDD/inc/wlan_hdd_wowl.h b/CORE/HDD/inc/wlan_hdd_wowl.h
index d6eab9ff18d9..96b9ea639a5b 100644
--- a/CORE/HDD/inc/wlan_hdd_wowl.h
+++ b/CORE/HDD/inc/wlan_hdd_wowl.h
@@ -107,15 +107,9 @@
/*----------------------------------------------------------------------------
* Preprocessor Definitions and Constants
* -------------------------------------------------------------------------*/
-#ifdef QCA_WIFI_2_0
#define WOWL_PTRN_MAX_SIZE 146
#define WOWL_PTRN_MASK_MAX_SIZE 19
#define WOWL_MAX_PTRNS_ALLOWED 22
-#else
-#define WOWL_PTRN_MAX_SIZE 128
-#define WOWL_PTRN_MASK_MAX_SIZE 16
-#define WOWL_MAX_PTRNS_ALLOWED 16
-#endif
/*----------------------------------------------------------------------------
* Type Declarations
diff --git a/CORE/HDD/src/wlan_hdd_assoc.c b/CORE/HDD/src/wlan_hdd_assoc.c
index 01d7a160f55f..0e0cdaba3f2e 100644
--- a/CORE/HDD/src/wlan_hdd_assoc.c
+++ b/CORE/HDD/src/wlan_hdd_assoc.c
@@ -635,9 +635,7 @@ static void hdd_SendAssociationEvent(struct net_device *dev,tCsrRoamInfo *pCsrRo
#ifdef MSM_PLATFORM
unsigned long flags;
#endif
-#ifdef QCA_WIFI_2_0
v_MACADDR_t peerMacAddr;
-#endif
#if defined (WLAN_FEATURE_VOWIFI_11R)
// Added to find the auth type on the fly at run time
@@ -710,7 +708,6 @@ static void hdd_SendAssociationEvent(struct net_device *dev,tCsrRoamInfo *pCsrRo
hdd_SendFTAssocResponse(dev, pAdapter, pCsrRoamInfo);
}
#endif
-#ifdef QCA_WIFI_2_0
if (pAdapter->device_mode == WLAN_HDD_P2P_CLIENT)
{
vos_mem_copy(peerMacAddr.bytes, pHddStaCtx->conn_info.bssId,
@@ -722,7 +719,6 @@ static void hdd_SendAssociationEvent(struct net_device *dev,tCsrRoamInfo *pCsrRo
pAdapter->sessionId,
pHddStaCtx->conn_info.operationChannel);
}
-#endif
#ifdef WLAN_FEATURE_LPSS
wlan_hdd_send_status_pkg(pAdapter, pHddStaCtx, 1, 1);
@@ -766,7 +762,6 @@ static void hdd_SendAssociationEvent(struct net_device *dev,tCsrRoamInfo *pCsrRo
wlan_hdd_auto_shutdown_enable(pHddCtx, VOS_TRUE);
#endif
-#ifdef QCA_WIFI_2_0
if (pAdapter->device_mode == WLAN_HDD_P2P_CLIENT)
{
vos_mem_copy(peerMacAddr.bytes, pHddStaCtx->conn_info.bssId,
@@ -777,7 +772,6 @@ static void hdd_SendAssociationEvent(struct net_device *dev,tCsrRoamInfo *pCsrRo
0, pAdapter->sessionId,
pHddStaCtx->conn_info.operationChannel);
}
-#endif
#ifdef WLAN_FEATURE_LPSS
wlan_hdd_send_status_pkg(pAdapter, pHddStaCtx, 1, 0);
@@ -2584,12 +2578,10 @@ eHalStatus hdd_RoamTdlsStatusUpdateHandler(hdd_adapter_t *pAdapter,
eCsrRoamResult roamResult)
{
hdd_context_t *pHddCtx = WLAN_HDD_GET_CTX(pAdapter);
-#ifdef QCA_WIFI_2_0
#ifdef CONFIG_TDLS_IMPLICIT
tdlsCtx_t *pHddTdlsCtx = WLAN_HDD_GET_TDLS_CTX_PTR(pAdapter);
#endif
tSmeTdlsPeerStateParams smeTdlsPeerStateParams;
-#endif
eHalStatus status = eHAL_STATUS_FAILURE ;
tANI_U8 staIdx;
@@ -2602,17 +2594,14 @@ eHalStatus hdd_RoamTdlsStatusUpdateHandler(hdd_adapter_t *pAdapter,
roamResult == eCSR_ROAM_RESULT_DELETE_ALL_TDLS_PEER_IND? "DEL_ALL_TDLS_PEER_IND" :
roamResult == eCSR_ROAM_RESULT_UPDATE_TDLS_PEER? "UPDATE_TDLS_PEER" :
roamResult == eCSR_ROAM_RESULT_LINK_ESTABLISH_REQ_RSP? "LINK_ESTABLISH_REQ_RSP" :
-#ifdef QCA_WIFI_2_0
roamResult == eCSR_ROAM_RESULT_TDLS_SHOULD_DISCOVER? "TDLS_SHOULD_DISCOVER" :
roamResult == eCSR_ROAM_RESULT_TDLS_SHOULD_TEARDOWN? "TDLS_SHOULD_TEARDOWN" :
roamResult == eCSR_ROAM_RESULT_TDLS_SHOULD_PEER_DISCONNECTED? "TDLS_SHOULD_PEER_DISCONNECTED" :
-#endif
"UNKNOWN",
pRoamInfo->staId,
MAC_ADDR_ARRAY(pRoamInfo->peerMac)) ;
#endif
-#ifdef QCA_WIFI_2_0
#ifdef CONFIG_TDLS_IMPLICIT
if (!pHddTdlsCtx)
{
@@ -2622,7 +2611,6 @@ eHalStatus hdd_RoamTdlsStatusUpdateHandler(hdd_adapter_t *pAdapter,
return status;
}
#endif
-#endif
switch( roamResult )
{
@@ -2668,13 +2656,6 @@ eHalStatus hdd_RoamTdlsStatusUpdateHandler(hdd_adapter_t *pAdapter,
/* store the ucast signature , if required for further reference. */
wlan_hdd_tdls_set_signature( pAdapter, pRoamInfo->peerMac, pRoamInfo->ucastSig );
-#ifndef QCA_WIFI_2_0
- /* start TDLS client registration with TL */
- status = hdd_roamRegisterTDLSSTA( pAdapter,
- pRoamInfo->peerMac,
- pRoamInfo->staId,
- pRoamInfo->ucastSig);
-#endif /* QCA_WIFI_2_0 */
}
else
{
@@ -2771,7 +2752,6 @@ eHalStatus hdd_RoamTdlsStatusUpdateHandler(hdd_adapter_t *pAdapter,
MAC_ADDR_ARRAY(pHddCtx->tdlsConnInfo[staIdx].peerMac.bytes));
wlan_hdd_tdls_reset_peer(pAdapter, pHddCtx->tdlsConnInfo[staIdx].peerMac.bytes);
hdd_roamDeregisterTDLSSTA ( pAdapter, pHddCtx->tdlsConnInfo[staIdx].staId );
-#ifdef QCA_WIFI_2_0
vos_mem_zero(&smeTdlsPeerStateParams,
sizeof(smeTdlsPeerStateParams));
smeTdlsPeerStateParams.vdevId =
@@ -2795,7 +2775,6 @@ eHalStatus hdd_RoamTdlsStatusUpdateHandler(hdd_adapter_t *pAdapter,
MAC_ADDRESS_STR, __func__,
MAC_ADDR_ARRAY(pHddCtx->tdlsConnInfo[staIdx].peerMac.bytes));
}
-#endif
wlan_hdd_tdls_decrement_peer_count(pAdapter);
(WLAN_HDD_GET_CTX(pAdapter))->sta_to_adapter[staIdx] = NULL;
@@ -2810,7 +2789,6 @@ eHalStatus hdd_RoamTdlsStatusUpdateHandler(hdd_adapter_t *pAdapter,
wlan_hdd_tdls_check_bmps(pAdapter);
break ;
}
-#ifdef QCA_WIFI_2_0
case eCSR_ROAM_RESULT_TDLS_SHOULD_DISCOVER:
{
#ifdef CONFIG_TDLS_IMPLICIT
@@ -2936,7 +2914,6 @@ eHalStatus hdd_RoamTdlsStatusUpdateHandler(hdd_adapter_t *pAdapter,
#endif
break ;
}
-#endif /* QCA_WIFI_2_0 */
default:
{
break ;
diff --git a/CORE/HDD/src/wlan_hdd_cfg.c b/CORE/HDD/src/wlan_hdd_cfg.c
index 0bf3ec332fd9..3651cd7b6731 100644
--- a/CORE/HDD/src/wlan_hdd_cfg.c
+++ b/CORE/HDD/src/wlan_hdd_cfg.c
@@ -2537,14 +2537,12 @@ REG_TABLE_ENTRY g_registry_table[] =
CFG_THERMAL_MIGRATION_ENABLE_MIN,
CFG_THERMAL_MIGRATION_ENABLE_MAX ),
-#ifndef QCA_WIFI_ISOC
REG_VARIABLE( CFG_THROTTLE_PERIOD_NAME, WLAN_PARAM_Integer,
hdd_config_t, throttlePeriod,
VAR_FLAGS_OPTIONAL | VAR_FLAGS_RANGE_CHECK_ASSUME_DEFAULT,
CFG_THROTTLE_PERIOD_DEFAULT,
CFG_THROTTLE_PERIOD_MIN,
CFG_THROTTLE_PERIOD_MAX ),
-#endif
REG_VARIABLE( CFG_ENABLE_MODULATED_DTIM_NAME, WLAN_PARAM_Integer,
hdd_config_t, enableModulatedDTIM,
@@ -2815,14 +2813,12 @@ REG_TABLE_ENTRY g_registry_table[] =
CFG_TDLS_RSSI_TEARDOWN_THRESHOLD_MIN,
CFG_TDLS_RSSI_TEARDOWN_THRESHOLD_MAX ),
-#ifdef QCA_WIFI_2_0
REG_VARIABLE( CFG_TDLS_RSSI_DELTA, WLAN_PARAM_SignedInteger,
hdd_config_t, fTDLSRSSIDelta,
VAR_FLAGS_OPTIONAL | VAR_FLAGS_RANGE_CHECK_ASSUME_DEFAULT,
CFG_TDLS_RSSI_DELTA_DEFAULT,
CFG_TDLS_RSSI_DELTA_MIN,
CFG_TDLS_RSSI_DELTA_MAX ),
-#endif
REG_VARIABLE( CFG_TDLS_QOS_WMM_UAPSD_MASK_NAME , WLAN_PARAM_HexInteger,
hdd_config_t, fTDLSUapsdMask,
@@ -3328,7 +3324,6 @@ REG_TABLE_ENTRY g_registry_table[] =
CFG_IBSS_PS_1RX_CHAIN_IN_ATIM_WINDOW_MIN,
CFG_IBSS_PS_1RX_CHAIN_IN_ATIM_WINDOW_MAX ),
-#ifndef QCA_WIFI_ISOC
REG_VARIABLE( CFG_THERMAL_TEMP_MIN_LEVEL0_NAME, WLAN_PARAM_Integer,
hdd_config_t, thermalTempMinLevel0,
VAR_FLAGS_OPTIONAL | VAR_FLAGS_RANGE_CHECK_ASSUME_DEFAULT,
@@ -3398,7 +3393,6 @@ REG_TABLE_ENTRY g_registry_table[] =
CFG_SET_TXPOWER_LIMIT5G_DEFAULT,
CFG_SET_TXPOWER_LIMIT5G_MIN,
CFG_SET_TXPOWER_LIMIT5G_MAX ),
-#endif /*#ifndef QCA_WIFI_ISOC*/
REG_VARIABLE( CFG_ENABLE_DEBUG_CONNECT_ISSUE, WLAN_PARAM_Integer,
hdd_config_t, gEnableDebugLog,
@@ -3629,7 +3623,6 @@ REG_TABLE_ENTRY g_registry_table[] =
CFG_BUS_BANDWIDTH_COMPUTE_INTERVAL_MAX),
#endif
-#ifdef QCA_WIFI_2_0
REG_VARIABLE( CFG_ENABLE_FW_LOG_TYPE , WLAN_PARAM_Integer,
hdd_config_t, enableFwLogType,
@@ -3650,7 +3643,6 @@ REG_TABLE_ENTRY g_registry_table[] =
VAR_FLAGS_OPTIONAL,
(void *) CFG_ENABLE_FW_MODULE_LOG_DEFAULT),
-#endif
#ifdef WLAN_FEATURE_11W
@@ -3714,14 +3706,12 @@ REG_TABLE_ENTRY g_registry_table[] =
CFG_DFS_RADAR_PRI_MULTIPLIER_MIN,
CFG_DFS_RADAR_PRI_MULTIPLIER_MAX),
-#if !defined(QCA_WIFI_ISOC)
REG_VARIABLE( CFG_REORDER_OFFLOAD_SUPPORT_NAME, WLAN_PARAM_Integer,
hdd_config_t, reorderOffloadSupport,
VAR_FLAGS_OPTIONAL | VAR_FLAGS_RANGE_CHECK_ASSUME_DEFAULT,
CFG_REORDER_OFFLOAD_SUPPORT_DEFAULT,
CFG_REORDER_OFFLOAD_SUPPORT_MIN,
CFG_REORDER_OFFLOAD_SUPPORT_MAX ),
-#endif
#ifdef IPA_UC_OFFLOAD
REG_VARIABLE( CFG_IPA_UC_OFFLOAD_ENABLED_NAME, WLAN_PARAM_Integer,
hdd_config_t, IpaUcOffloadEnabled,
@@ -4847,12 +4837,9 @@ static VOS_STATUS hdd_apply_cfg_ini( hdd_context_t *pHddCtx, tCfgIniEntry* iniTa
}
}
- // Keep qcacld-2.0 specific ini params disabled for non-qcacld-2.0
-#ifndef QCA_WIFI_2_0
- pHddCtx->cfg_ini->enablePowersaveOffload = 0;
-#endif
+ print_hdd_cfg(pHddCtx);
- return( ret_status );
+ return( ret_status );
}
#ifdef WLAN_FEATURE_MBSSID
@@ -5697,11 +5684,7 @@ v_BOOL_t hdd_update_config_dat( hdd_context_t *pHddCtx )
}
else
{
-#ifndef QCA_WIFI_2_0
- val = WNI_CFG_ASSOC_STA_LIMIT_STADEF;
-#else
val = pConfig->maxNumberOfPeers;
-#endif
}
if(ccmCfgSetInt(pHddCtx->hHal, WNI_CFG_ASSOC_STA_LIMIT, val,
@@ -6114,12 +6097,10 @@ VOS_STATUS hdd_set_sme_config( hdd_context_t *pHddCtx )
/* Update the Directed scan offload setting */
smeConfig->fScanOffload = pHddCtx->cfg_ini->fScanOffload;
-#ifdef QCA_WIFI_2_0
/* Update the p2p listen offload setting */
smeConfig->fP2pListenOffload = pHddCtx->cfg_ini->fP2pListenOffload;
smeConfig->csrConfig.scanBandPreference =
pHddCtx->cfg_ini->acsScanBandPreference;
-#endif
#ifdef FEATURE_WLAN_SCAN_PNO
/* Update PNO offoad status */
diff --git a/CORE/HDD/src/wlan_hdd_cfg80211.c b/CORE/HDD/src/wlan_hdd_cfg80211.c
index 4fbee8408945..f8874db31282 100644
--- a/CORE/HDD/src/wlan_hdd_cfg80211.c
+++ b/CORE/HDD/src/wlan_hdd_cfg80211.c
@@ -332,7 +332,6 @@ static struct ieee80211_supported_band wlan_hdd_band_2_4_GHZ =
.ht_cap.mcs.rx_mask = { 0xff, 0, 0, 0, 0, 0, 0, 0, 0, 0, },
.ht_cap.mcs.rx_highest = cpu_to_le16( 72 ),
.ht_cap.mcs.tx_params = IEEE80211_HT_MCS_TX_DEFINED,
-#ifdef QCA_WIFI_2_0
.vht_cap.cap = IEEE80211_VHT_CAP_MAX_MPDU_LENGTH_11454
| IEEE80211_VHT_CAP_SHORT_GI_80
| IEEE80211_VHT_CAP_TXSTBC
@@ -342,7 +341,6 @@ static struct ieee80211_supported_band wlan_hdd_band_2_4_GHZ =
| IEEE80211_VHT_CAP_RXSTBC_2))
#endif
| IEEE80211_VHT_CAP_RXLDPC,
-#endif
};
static struct ieee80211_supported_band wlan_hdd_band_p2p_2_4_GHZ =
@@ -3567,7 +3565,7 @@ int wlan_hdd_cfg80211_init(struct device *dev,
}
#endif/*FEATURE_WLAN_SCAN_PNO*/
-#if defined(QCA_WIFI_2_0) && defined (QCA_WIFI_FTM) && !defined(QCA_WIFI_ISOC)
+#if defined QCA_WIFI_FTM
if (vos_get_conparam() != VOS_FTM_MODE) {
#endif
@@ -3583,7 +3581,7 @@ int wlan_hdd_cfg80211_init(struct device *dev,
wiphy->reg_notifier = wlan_hdd_crda_reg_notifier;
#endif
-#if defined(QCA_WIFI_2_0) && defined (QCA_WIFI_FTM) && !defined(QCA_WIFI_ISOC)
+#if defined QCA_WIFI_FTM
}
#endif
@@ -3746,7 +3744,6 @@ int wlan_hdd_cfg80211_register(struct wiphy *wiphy)
return 0;
}
-#ifdef QCA_WIFI_2_0
/*
HDD function to update wiphy capability based on target offload status.
@@ -3774,7 +3771,6 @@ void wlan_hdd_cfg80211_update_wiphy_caps(struct wiphy *wiphy)
}
#endif
}
-#endif
/* In this function we are updating channel list when,
regulatory domain is FCC and country code is US.
@@ -5989,51 +5985,6 @@ static int __wlan_hdd_cfg80211_change_iface(struct wiphy *wiphy,
{
case NL80211_IFTYPE_STATION:
case NL80211_IFTYPE_P2P_CLIENT:
-#ifndef QCA_WIFI_2_0
- hddLog(VOS_TRACE_LEVEL_INFO,
- "%s: setting interface Type to INFRASTRUCTURE", __func__);
- pRoamProfile->BSSType = eCSR_BSS_TYPE_INFRASTRUCTURE;
-#ifdef WLAN_FEATURE_11AC
- if(pConfig->dot11Mode == eHDD_DOT11_MODE_AUTO)
- {
- pConfig->dot11Mode = eHDD_DOT11_MODE_11ac;
- }
-#endif
- pRoamProfile->phyMode =
- hdd_cfg_xlate_to_csr_phy_mode(pConfig->dot11Mode);
- wdev->iftype = type;
- //Check for sub-string p2p to confirm its a p2p interface
- if (NULL != strstr(ndev->name,"p2p"))
- {
- pAdapter->device_mode = (type == NL80211_IFTYPE_STATION) ?
- WLAN_HDD_P2P_DEVICE : WLAN_HDD_P2P_CLIENT;
- }
- else
- {
- pAdapter->device_mode = (type == NL80211_IFTYPE_STATION) ?
- WLAN_HDD_INFRA_STATION: WLAN_HDD_P2P_CLIENT;
- }
-#ifdef FEATURE_WLAN_TDLS
- /* The open adapter for the p2p shall skip initializations in
- * tdls_init if the device mode is WLAN_HDD_P2P_DEVICE, for
- * TDLS is supported only on WLAN_HDD_P2P_CLIENT. Hence invoke
- * tdls_init when the change_iface sets the device mode to
- * WLAN_HDD_P2P_CLIENT.
- */
-
- if ( pAdapter->device_mode == WLAN_HDD_P2P_CLIENT)
- {
- if (0 != wlan_hdd_tdls_init (pAdapter))
- {
- hddLog(VOS_TRACE_LEVEL_ERROR,
- "%s: tdls initialization failed", __func__);
- return -EINVAL;
- }
- }
- break;
-#endif
-
-#else
vstatus = wlan_hdd_change_iface_to_sta_mode(ndev, type);
if (vstatus != VOS_STATUS_SUCCESS)
return -EINVAL;
@@ -6049,7 +6000,6 @@ static int __wlan_hdd_cfg80211_change_iface(struct wiphy *wiphy,
(void *)pAdapter);
#endif /* QCA_LL_TX_FLOW_CT */
-#endif
goto done;
case NL80211_IFTYPE_ADHOC:
@@ -6742,9 +6692,6 @@ static int __wlan_hdd_cfg80211_add_key( struct wiphy *wiphy,
v_CONTEXT_t pVosContext = (WLAN_HDD_GET_CTX(pAdapter))->pvosContext;
#endif
hdd_hostapd_state_t *pHostapdState;
-#ifndef QCA_WIFI_2_0
- VOS_STATUS vos_status;
-#endif
eHalStatus halStatus;
hdd_context_t *pHddCtx;
@@ -6919,9 +6866,7 @@ static int __wlan_hdd_cfg80211_add_key( struct wiphy *wiphy,
vos_mem_copy(&pAdapter->sessionCtx.station.ibss_enc_key,
&setKey, sizeof(tCsrRoamSetKey));
-#if defined (QCA_WIFI_2_0) && !defined (QCA_WIFI_ISOC)
pAdapter->sessionCtx.station.ibss_enc_key_installed = 1;
-#endif
return status;
}
if ((pAdapter->device_mode == WLAN_HDD_SOFTAP) ||
@@ -6995,21 +6940,6 @@ static int __wlan_hdd_cfg80211_add_key( struct wiphy *wiphy,
setKey.peerMac[4], setKey.peerMac[5],
setKey.keyDirection);
-#ifndef QCA_WIFI_2_0
- vos_status = wlan_hdd_check_ula_done(pAdapter);
-
- if ( vos_status != VOS_STATUS_SUCCESS )
- {
- VOS_TRACE( VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_ERROR,
- "[%4d] wlan_hdd_check_ula_done returned ERROR status= %d",
- __LINE__, vos_status );
-
- pHddStaCtx->roam_info.roamingState = HDD_ROAM_STATE_NONE;
-
- return -EINVAL;
-
- }
-#endif
#ifdef WLAN_FEATURE_VOWIFI_11R
/* The supplicant may attempt to set the PTK once pre-authentication
@@ -10666,7 +10596,6 @@ static int wlan_hdd_cfg80211_get_txpower(struct wiphy *wiphy,
EXIT();
return 0;
}
-#ifdef QCA_WIFI_2_0
static tANI_U8 wlan_hdd_get_mcs_idx(tANI_U16 maxRate, tANI_U8 rate_flags,
tANI_U8 nss)
{
@@ -10744,7 +10673,6 @@ static tANI_U8 wlan_hdd_get_mcs_idx(tANI_U16 maxRate, tANI_U8 rate_flags,
return (curIdx ? (curIdx - 1) : curIdx);
}
-#endif
static int __wlan_hdd_cfg80211_get_station(struct wiphy *wiphy,
struct net_device *dev,
u8* mac, struct station_info *sinfo)
@@ -10815,7 +10743,6 @@ static int __wlan_hdd_cfg80211_get_station(struct wiphy *wiphy,
//convert to the UI units of 100kbps
myRate = pAdapter->hdd_stats.ClassA_stat.tx_rate * 5;
-#ifdef QCA_WIFI_2_0
if (!(rate_flags & eHAL_TX_RATE_LEGACY))
{
nss = pAdapter->hdd_stats.ClassA_stat.rx_frag_cnt;
@@ -10829,7 +10756,6 @@ static int __wlan_hdd_cfg80211_get_station(struct wiphy *wiphy,
myRate);
}
}
-#endif
#ifdef LINKSPEED_DEBUG_ENABLED
pr_info("RSSI %d, RLMS %u, rate %d, rssi high %d, rssi mid %d, rssi low %d, rate_flags 0x%x, MCS %d\n",
sinfo->signal,
@@ -12109,7 +12035,7 @@ static int __wlan_hdd_cfg80211_sched_scan_start(struct wiphy *wiphy,
/*Copying list of valid channel into request */
memcpy(pPnoRequest->aNetworks[i].aChannels, valid_ch, num_ch);
pPnoRequest->aNetworks[i].ucChannelCount = num_ch;
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,10,0)) && defined (QCA_WIFI_2_0)
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,10,0)
pPnoRequest->aNetworks[i].rssiThreshold =
request->match_sets[i].rssi_thold;
#else
@@ -12573,10 +12499,8 @@ static int __wlan_hdd_cfg80211_tdls_oper(struct wiphy *wiphy,
hdd_adapter_t *pAdapter = WLAN_HDD_GET_PRIV_PTR(dev);
hdd_context_t *pHddCtx = wiphy_priv(wiphy);
int status;
-#ifdef QCA_WIFI_2_0
tSmeTdlsPeerStateParams smeTdlsPeerStateParams;
eHalStatus halStatus = eHAL_STATUS_FAILURE;
-#endif
hddTdlsPeer_t *pTdlsPeer;
MTRACE(vos_trace(VOS_MODULE_ID_HDD,
@@ -12602,11 +12526,7 @@ static int __wlan_hdd_cfg80211_tdls_oper(struct wiphy *wiphy,
/* QCA 2.0 Discrete ANDs feature capability in cfg_ini with that
* received from target, so cfg_ini gives combined intersected result
*/
- if ((FALSE == pHddCtx->cfg_ini->fEnableTDLSSupport)
-#ifndef QCA_WIFI_2_0
- || (FALSE == sme_IsFeatureSupportedByFW(TDLS))
-#endif
- )
+ if (FALSE == pHddCtx->cfg_ini->fEnableTDLSSupport)
{
VOS_TRACE( VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_ERROR,
"TDLS Disabled in INI OR not enabled in FW. "
@@ -12672,15 +12592,8 @@ static int __wlan_hdd_cfg80211_tdls_oper(struct wiphy *wiphy,
}
}
wlan_hdd_tdls_set_peer_link_status(pTdlsPeer, eTDLS_LINK_CONNECTED);
-#ifdef QCA_WIFI_2_0
/* start TDLS client registration with TL */
status = hdd_roamRegisterTDLSSTA( pAdapter, peer, pTdlsPeer->staId, pTdlsPeer->signature);
-#else
- /* Mark TDLS client Authenticated .*/
- status = WLANTL_ChangeSTAState( pHddCtx->pvosContext,
- pTdlsPeer->staId,
- WLANTL_STA_AUTHENTICATED);
-#endif /* QCA_WIFI_2_0 */
if (VOS_STATUS_SUCCESS == status)
{
tANI_U8 i;
@@ -12697,7 +12610,6 @@ static int __wlan_hdd_cfg80211_tdls_oper(struct wiphy *wiphy,
WLANTL_SuspendDataTx( (WLAN_HDD_GET_CTX(pAdapter))->pvosContext,
&staId, NULL);
}
-#ifdef QCA_WIFI_2_0
vos_mem_zero(&smeTdlsPeerStateParams,
sizeof(tSmeTdlsPeerStateParams));
@@ -12766,7 +12678,6 @@ static int __wlan_hdd_cfg80211_tdls_oper(struct wiphy *wiphy,
__func__, MAC_ADDR_ARRAY(peer));
return -EPERM;
}
-#endif
wlan_hdd_tdls_increment_peer_count(pAdapter);
}
wlan_hdd_tdls_check_bmps(pAdapter);
@@ -12786,13 +12697,9 @@ static int __wlan_hdd_cfg80211_tdls_oper(struct wiphy *wiphy,
status = WLANTL_EnableUAPSDForAC( (WLAN_HDD_GET_CTX(pAdapter))->pvosContext,
pTdlsPeer->staId, ucAc[ac],
tlTid[ac], tlTid[ac], 0, 0,
-#ifdef QCA_WIFI_2_0
WLANTL_BI_DIR,
1,
pAdapter->sessionId );
-#else
- WLANTL_BI_DIR );
-#endif
}
}
}
@@ -13368,8 +13275,7 @@ static int __wlan_hdd_cfg80211_testmode(struct wiphy *wiphy,
}
#endif /* FEATURE_WLAN_LPHB */
-#if defined(QCA_WIFI_2_0) && !defined(QCA_WIFI_ISOC) \
- && defined(QCA_WIFI_FTM)
+#if defined(QCA_WIFI_FTM)
case WLAN_HDD_TM_CMD_WLAN_FTM:
{
int buf_len;
@@ -13412,8 +13318,7 @@ static int wlan_hdd_cfg80211_testmode(struct wiphy *wiphy, void *data, int len)
return ret;
}
-#if defined(QCA_WIFI_2_0) && !defined(QCA_WIFI_ISOC) \
- && defined(QCA_WIFI_FTM)
+#if defined(QCA_WIFI_FTM)
void wlan_hdd_testmode_rx_event(void *buf, size_t buf_len)
{
struct sk_buff *skb;
@@ -13592,9 +13497,7 @@ int __wlan_hdd_cfg80211_resume_wlan(struct wiphy *wiphy)
hdd_adapter_list_node_t *pAdapterNode, *pNext;
VOS_STATUS status = VOS_STATUS_SUCCESS;
int result;
-#ifdef QCA_WIFI_2_0
pVosSchedContext vosSchedContext = get_vos_sched_ctxt();
-#endif
ENTER();
@@ -13620,7 +13523,6 @@ int __wlan_hdd_cfg80211_resume_wlan(struct wiphy *wiphy)
cnss_request_bus_bandwidth(CNSS_BUS_WIDTH_MEDIUM);
#endif
-#ifdef QCA_WIFI_2_0
/* Resume MC thread */
if (pHddCtx->isMcThreadSuspended) {
complete(&vosSchedContext->ResumeMcEvent);
@@ -13636,7 +13538,6 @@ int __wlan_hdd_cfg80211_resume_wlan(struct wiphy *wiphy)
#endif
hdd_resume_wlan();
-#endif
spin_lock(&pHddCtx->schedScan_lock);
pHddCtx->isWiphySuspended = FALSE;
@@ -13680,14 +13581,12 @@ int __wlan_hdd_cfg80211_resume_wlan(struct wiphy *wiphy)
return result;
}
-#ifdef QCA_WIFI_2_0
void wlan_hdd_cfg80211_ready_to_suspend(void *callbackContext, boolean suspended)
{
hdd_context_t *pHddCtx = (hdd_context_t *)callbackContext;
pHddCtx->suspended = suspended;
complete(&pHddCtx->ready_to_suspend);
}
-#endif
int wlan_hdd_cfg80211_resume_wlan(struct wiphy *wiphy)
{
@@ -13711,13 +13610,11 @@ int __wlan_hdd_cfg80211_suspend_wlan(struct wiphy *wiphy,
#define RX_TLSHIM_SUSPEND_TIMEOUT 200 /* msecs */
#endif
hdd_context_t *pHddCtx = wiphy_priv(wiphy);
-#ifdef QCA_WIFI_2_0
pVosSchedContext vosSchedContext = get_vos_sched_ctxt();
hdd_adapter_list_node_t *pAdapterNode = NULL, *pNext = NULL;
hdd_adapter_t *pAdapter;
hdd_scaninfo_t *pScanInfo;
VOS_STATUS status;
-#endif
int rc;
ENTER();
@@ -13753,7 +13650,6 @@ int __wlan_hdd_cfg80211_suspend_wlan(struct wiphy *wiphy,
pAdapterNode = pNext;
}
-#ifdef QCA_WIFI_2_0
/* Stop ongoing scan on each interface */
status = hdd_get_front_adapter ( pHddCtx, &pAdapterNode );
while ( NULL != pAdapterNode && VOS_STATUS_SUCCESS == status )
@@ -13823,7 +13719,6 @@ int __wlan_hdd_cfg80211_suspend_wlan(struct wiphy *wiphy,
}
pHddCtx->isMcThreadSuspended = TRUE;
-#endif
#ifdef QCA_CONFIG_SMP
/* Suspend tlshim rx thread */
@@ -13853,18 +13748,14 @@ int __wlan_hdd_cfg80211_suspend_wlan(struct wiphy *wiphy,
#ifdef QCA_CONFIG_SMP
resume_all:
-#ifdef QCA_WIFI_2_0
complete(&vosSchedContext->ResumeMcEvent);
pHddCtx->isMcThreadSuspended = FALSE;
#endif
-#endif
-#ifdef QCA_WIFI_2_0
resume_tx:
hdd_resume_wlan();
return -ETIME;
-#endif
}
diff --git a/CORE/HDD/src/wlan_hdd_dev_pwr.c b/CORE/HDD/src/wlan_hdd_dev_pwr.c
index bd09d3213b0e..395fd0e137ff 100644
--- a/CORE/HDD/src/wlan_hdd_dev_pwr.c
+++ b/CORE/HDD/src/wlan_hdd_dev_pwr.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.
*
@@ -88,409 +88,6 @@ static const hdd_tmLevelAction_t thermalMigrationAction[WLAN_HDD_TM_LEVEL_MAX] =
static bool suspend_notify_sent;
#endif
-#ifdef QCA_WIFI_ISOC
-/*----------------------------------------------------------------------------
-
- @brief Function to suspend the wlan driver.
-
- @param hdd_context_t pHddCtx
- Global hdd context
-
-
- @return None
-
-----------------------------------------------------------------------------*/
-static int wlan_suspend(hdd_context_t* pHddCtx)
-{
- unsigned long rc;
-
- pVosSchedContext vosSchedContext = NULL;
-
- /* Get the global VOSS context */
- vosSchedContext = get_vos_sched_ctxt();
-
- if(!vosSchedContext) {
- VOS_TRACE(VOS_MODULE_ID_HDD,VOS_TRACE_LEVEL_FATAL,"%s: Global VOS_SCHED context is Null",__func__);
- return 0;
- }
- if(!vos_is_apps_power_collapse_allowed(pHddCtx))
- {
- /* Fail this suspend */
- VOS_TRACE(VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_ERROR, "%s: Fail wlan suspend: not in IMPS/BMPS", __func__);
- return -EPERM;
- }
-
- /*
- Suspending MC Thread, Rx Thread and Tx Thread as the platform driver is going to Suspend.
- */
- VOS_TRACE(VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_INFO, "%s: Suspending Mc, Rx and Tx Threads",__func__);
-
- INIT_COMPLETION(pHddCtx->tx_sus_event_var);
-
- /* Indicate Tx Thread to Suspend */
- set_bit(TX_SUSPEND_EVENT_MASK, &vosSchedContext->txEventFlag);
-
- wake_up_interruptible(&vosSchedContext->txWaitQueue);
-
- /* Wait for Suspend Confirmation from Tx Thread */
- rc = wait_for_completion_timeout(&pHddCtx->tx_sus_event_var,
- msecs_to_jiffies(200));
-
- if (!rc) {
- VOS_TRACE(VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_FATAL,
- "%s: Not able to suspend TX thread timeout happened", __func__);
- clear_bit(TX_SUSPEND_EVENT_MASK, &vosSchedContext->txEventFlag);
-
- return -ETIME;
- }
- /* Set the Tx Thread as Suspended */
- pHddCtx->isTxThreadSuspended = TRUE;
-
- INIT_COMPLETION(pHddCtx->rx_sus_event_var);
-
- /* Indicate Rx Thread to Suspend */
- set_bit(RX_SUSPEND_EVENT_MASK, &vosSchedContext->rxEventFlag);
-
- wake_up_interruptible(&vosSchedContext->rxWaitQueue);
-
- /* Wait for Suspend Confirmation from Rx Thread */
- rc = wait_for_completion_timeout(&pHddCtx->rx_sus_event_var,
- msecs_to_jiffies(200));
-
- if (!rc) {
- VOS_TRACE(VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_FATAL,
- "%s: Not able to suspend Rx thread timeout happened", __func__);
-
- clear_bit(RX_SUSPEND_EVENT_MASK, &vosSchedContext->rxEventFlag);
-
- /* Indicate Tx Thread to Resume */
- complete(&vosSchedContext->ResumeTxEvent);
-
- /* Set the Tx Thread as Resumed */
- pHddCtx->isTxThreadSuspended = FALSE;
-
- return -ETIME;
- }
-
- /* Set the Rx Thread as Suspended */
- pHddCtx->isRxThreadSuspended = TRUE;
-
- INIT_COMPLETION(pHddCtx->mc_sus_event_var);
-
- /* Indicate MC Thread to Suspend */
- set_bit(MC_SUSPEND_EVENT_MASK, &vosSchedContext->mcEventFlag);
-
- wake_up_interruptible(&vosSchedContext->mcWaitQueue);
-
- /* Wait for Suspend Confirmation from MC Thread */
- rc = wait_for_completion_timeout(&pHddCtx->mc_sus_event_var,
- msecs_to_jiffies(200));
-
- if (!rc) {
- VOS_TRACE(VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_FATAL,
- "%s: Not able to suspend MC thread timeout happened %ld",
- __func__, rc);
-
- clear_bit(MC_SUSPEND_EVENT_MASK, &vosSchedContext->mcEventFlag);
-
- /* Indicate Rx Thread to Resume */
- complete(&vosSchedContext->ResumeRxEvent);
-
- /* Set the Rx Thread as Resumed */
- pHddCtx->isRxThreadSuspended = FALSE;
-
- /* Indicate Tx Thread to Resume */
- complete(&vosSchedContext->ResumeTxEvent);
-
- /* Set the Tx Thread as Resumed */
- pHddCtx->isTxThreadSuspended = FALSE;
-
- return -ETIME;
- }
-
- /* Set the Mc Thread as Suspended */
- pHddCtx->isMcThreadSuspended = TRUE;
-
- /* Set the Station state as Suspended */
- pHddCtx->isWlanSuspended = TRUE;
-
- return 0;
-}
-
-/*----------------------------------------------------------------------------
-
- @brief Function to resume the wlan driver.
-
- @param hdd_context_t pHddCtx
- Global hdd context
-
-
- @return None
-
-----------------------------------------------------------------------------*/
-static void wlan_resume(hdd_context_t* pHddCtx)
-{
- pVosSchedContext vosSchedContext = NULL;
-
- //Get the global VOSS context.
- vosSchedContext = get_vos_sched_ctxt();
-
- if(!vosSchedContext) {
- VOS_TRACE(VOS_MODULE_ID_HDD,VOS_TRACE_LEVEL_FATAL,"%s: Global VOS_SCHED context is Null",__func__);
- return;
- }
-
- /*
- Resuming Mc, Rx and Tx Thread as platform Driver is resuming.
- */
- VOS_TRACE(VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_INFO, "%s: Resuming Mc, Rx and Tx Thread",__func__);
-
- /* Indicate MC Thread to Resume */
- complete(&vosSchedContext->ResumeMcEvent);
-
- /* Set the Mc Thread as Resumed */
- pHddCtx->isMcThreadSuspended = FALSE;
-
- /* Indicate Rx Thread to Resume */
- complete(&vosSchedContext->ResumeRxEvent);
-
- /* Set the Rx Thread as Resumed */
- pHddCtx->isRxThreadSuspended = FALSE;
-
- /* Indicate Tx Thread to Resume */
- complete(&vosSchedContext->ResumeTxEvent);
-
- /* Set the Tx Thread as Resumed */
- pHddCtx->isTxThreadSuspended = FALSE;
-
- /* Set the Station state as Suspended */
- pHddCtx->isWlanSuspended = FALSE;
-}
-
-/*----------------------------------------------------------------------------
-
- @brief Function to suspend the wlan driver.
- This function will get called by platform driver Suspend on System Suspend
-
- @param dev platform_func_device
-
-
- @return None
-
-----------------------------------------------------------------------------*/
-int hddDevSuspendHdlr(struct device *dev)
-{
- int ret = 0;
- hdd_context_t* pHddCtx = NULL;
-
- pHddCtx = (hdd_context_t*)wcnss_wlan_get_drvdata(dev);
-
- VOS_TRACE(VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_INFO, "%s: WLAN suspended by platform driver",__func__);
-
- /* Get the HDD context */
- if(!pHddCtx) {
- VOS_TRACE(VOS_MODULE_ID_HDD,VOS_TRACE_LEVEL_FATAL,"%s: HDD context is Null",__func__);
- return 0;
- }
-
- if(pHddCtx->isWlanSuspended == TRUE)
- {
- VOS_TRACE(VOS_MODULE_ID_HDD,VOS_TRACE_LEVEL_FATAL,"%s: WLAN is already in suspended state",__func__);
- return 0;
- }
-
- /* Suspend the wlan driver */
- ret = wlan_suspend(pHddCtx);
- if(ret != 0)
- {
- VOS_TRACE(VOS_MODULE_ID_HDD,VOS_TRACE_LEVEL_FATAL,"%s: Not able to suspend wlan",__func__);
- return ret;
- }
-
-#ifdef HAVE_WCNSS_SUSPEND_RESUME_NOTIFY
- if(hdd_is_suspend_notify_allowed(pHddCtx))
- {
- wcnss_suspend_notify();
- suspend_notify_sent = true;
- }
-#endif
- return 0;
-}
-
-/*----------------------------------------------------------------------------
-
- @brief Function to resume the wlan driver.
- This function will get called by platform driver Resume on System Resume
-
- @param dev platform_func_device
-
-
- @return None
-
-----------------------------------------------------------------------------*/
-int hddDevResumeHdlr(struct device *dev)
-{
- hdd_context_t* pHddCtx = NULL;
-
- pHddCtx = (hdd_context_t*)wcnss_wlan_get_drvdata(dev);
-
- VOS_TRACE(VOS_MODULE_ID_HDD,VOS_TRACE_LEVEL_INFO, "%s: WLAN being resumed by Android OS",__func__);
-
- if(pHddCtx->isWlanSuspended != TRUE)
- {
- VOS_TRACE(VOS_MODULE_ID_HDD,VOS_TRACE_LEVEL_FATAL,"%s: WLAN is already in resumed state",__func__);
- return 0;
- }
-
- /* Resume the wlan driver */
- wlan_resume(pHddCtx);
-#ifdef HAVE_WCNSS_SUSPEND_RESUME_NOTIFY
- if(suspend_notify_sent == true)
- {
- wcnss_resume_notify();
- suspend_notify_sent = false;
- }
-#endif
-
- return 0;
-}
-
-static const struct dev_pm_ops pm_ops = {
- .suspend = hddDevSuspendHdlr,
- .resume = hddDevResumeHdlr,
-};
-
-/*----------------------------------------------------------------------------
- *
-
- @brief Registration function.
- Register suspend, resume callback functions with platform driver.
-
- @param hdd_context_t pHddCtx
- Global hdd context
-
- @return General status code
- VOS_STATUS_SUCCESS Registration Success
- VOS_STATUS_E_FAILURE Registration Fail
-
-----------------------------------------------------------------------------*/
-VOS_STATUS hddRegisterPmOps(hdd_context_t *pHddCtx)
-{
- wcnss_wlan_set_drvdata(pHddCtx->parent_dev, pHddCtx);
-#ifndef FEATURE_R33D
- wcnss_wlan_register_pm_ops(pHddCtx->parent_dev, &pm_ops);
-#endif /* FEATURE_R33D */
- return VOS_STATUS_SUCCESS;
-}
-
-/*----------------------------------------------------------------------------
-
- @brief De-registration function.
- Deregister the suspend, resume callback functions with platform driver
-
- @param hdd_context_t pHddCtx
- Global hdd context
-
- @return General status code
- VOS_STATUS_SUCCESS De-Registration Success
- VOS_STATUS_E_FAILURE De-Registration Fail
-
-----------------------------------------------------------------------------*/
-VOS_STATUS hddDeregisterPmOps(hdd_context_t *pHddCtx)
-{
-#ifndef FEATURE_R33D
- wcnss_wlan_unregister_pm_ops(pHddCtx->parent_dev, &pm_ops);
-#endif /* FEATURE_R33D */
- return VOS_STATUS_SUCCESS;
-}
-
-/*----------------------------------------------------------------------------
-
- @brief TM Level Change handler
- Received Tm Level changed notification
-
- @param dev : Device context
- changedTmLevel : Changed new TM level
-
- @return
-
-----------------------------------------------------------------------------*/
-void hddDevTmLevelChangedHandler(struct device *dev, int changedTmLevel)
-{
- hdd_context_t *pHddCtx = NULL;
- WLAN_TmLevelEnumType newTmLevel = changedTmLevel;
- hdd_adapter_t *staAdapater;
-
- pHddCtx = (hdd_context_t*)wcnss_wlan_get_drvdata(dev);
-
- if ((pHddCtx->tmInfo.currentTmLevel == newTmLevel) ||
- (!pHddCtx->cfg_ini->thermalMitigationEnable))
- {
- VOS_TRACE(VOS_MODULE_ID_HDD,VOS_TRACE_LEVEL_WARN,
- "%s: TM Not enabled %d or Level does not changed %d",
- __func__, pHddCtx->cfg_ini->thermalMitigationEnable, newTmLevel);
- /* TM Level does not changed,
- * Or feature does not enabled
- * do nothing */
- return;
- }
-
- /* Only STA mode support TM now
- * all other mode, TM feature should be disabled */
- if (~VOS_STA & pHddCtx->concurrency_mode)
- {
- VOS_TRACE(VOS_MODULE_ID_HDD,VOS_TRACE_LEVEL_ERROR,
- "%s: CMODE 0x%x, TM disable",
- __func__, pHddCtx->concurrency_mode);
- newTmLevel = WLAN_HDD_TM_LEVEL_0;
- }
-
- if ((newTmLevel < WLAN_HDD_TM_LEVEL_0) ||
- (newTmLevel >= WLAN_HDD_TM_LEVEL_MAX))
- {
- VOS_TRACE(VOS_MODULE_ID_HDD,VOS_TRACE_LEVEL_ERROR,
- "%s: TM level %d out of range",
- __func__, newTmLevel);
- return;
- }
-
- if (newTmLevel != WLAN_HDD_TM_LEVEL_4)
- sme_SetTmLevel(pHddCtx->hHal, newTmLevel, 0);
-
- if (mutex_lock_interruptible(&pHddCtx->tmInfo.tmOperationLock))
- {
- VOS_TRACE(VOS_MODULE_ID_HDD,VOS_TRACE_LEVEL_ERROR,
- "%s: Acquire lock fail", __func__);
- return;
- }
-
- pHddCtx->tmInfo.currentTmLevel = newTmLevel;
- pHddCtx->tmInfo.txFrameCount = 0;
- vos_mem_copy(&pHddCtx->tmInfo.tmAction,
- &thermalMigrationAction[newTmLevel],
- sizeof(hdd_tmLevelAction_t));
-
-
- if (pHddCtx->tmInfo.tmAction.enterImps)
- {
- staAdapater = hdd_get_adapter(pHddCtx, WLAN_HDD_INFRA_STATION);
- if (staAdapater)
- {
- if (hdd_connIsConnected(WLAN_HDD_GET_STATION_CTX_PTR(staAdapater)))
- {
- sme_RoamDisconnect(pHddCtx->hHal,
- staAdapater->sessionId,
- eCSR_DISCONNECT_REASON_UNSPECIFIED);
- }
- }
- }
-
- mutex_unlock(&pHddCtx->tmInfo.tmOperationLock);
-
- return;
-}
-
-#endif/*QCA_WIFI_ISOC*/
/*----------------------------------------------------------------------------
diff --git a/CORE/HDD/src/wlan_hdd_early_suspend.c b/CORE/HDD/src/wlan_hdd_early_suspend.c
index a8c28da34ba4..ae4fe6a84db2 100644
--- a/CORE/HDD/src/wlan_hdd_early_suspend.c
+++ b/CORE/HDD/src/wlan_hdd_early_suspend.c
@@ -93,7 +93,6 @@
#include "wlan_hdd_power.h"
#include "wlan_hdd_packet_filtering.h"
-#if defined(QCA_WIFI_2_0) && !defined(QCA_WIFI_ISOC)
#include <wlan_qct_wda.h>
#if defined(HIF_PCI)
#include "if_pci.h"
@@ -102,7 +101,6 @@
#elif defined(HIF_SDIO)
#include "if_ath_sdio.h"
#endif
-#endif
#define HDD_SSR_BRING_UP_TIME 10000
static eHalStatus g_full_pwr_status;
@@ -1199,30 +1197,9 @@ static void hdd_conf_resume_ind(hdd_adapter_t *pAdapter)
hdd_context_t* pHddCtx = WLAN_HDD_GET_CTX(pAdapter);
eHalStatus halStatus = eHAL_STATUS_FAILURE;
-#ifndef QCA_WIFI_2_0
-
- tpSirWlanResumeParam wlanResumeParam;
-
- wlanResumeParam = vos_mem_malloc(sizeof(tSirWlanResumeParam));
-
- if (NULL == wlanResumeParam)
- {
- hddLog(VOS_TRACE_LEVEL_FATAL,
- "%s: memory allocation failed for wlanResumeParam ", __func__);
- return;
- }
-
- wlanResumeParam->configuredMcstBcstFilterSetting =
- pHddCtx->configuredMcastBcastFilter;
-
-#endif
halStatus = sme_ConfigureResumeReq(pHddCtx->hHal,
-#ifndef QCA_WIFI_2_0
- wlanResumeParam
-#else
NULL
-#endif
);
if (eHAL_STATUS_SUCCESS != halStatus)
@@ -1230,9 +1207,6 @@ static void hdd_conf_resume_ind(hdd_adapter_t *pAdapter)
hddLog(VOS_TRACE_LEVEL_ERROR,
"%s: sme_ConfigureResumeReq return failure %d",
__func__, halStatus);
-#ifndef QCA_WIFI_2_0
- vos_mem_free(wlanResumeParam);
-#endif
}
@@ -1307,14 +1281,7 @@ void hdd_suspend_wlan(void (*callback)(void *callbackContext, boolean suspended)
&& (WLAN_HDD_P2P_CLIENT != pAdapter->device_mode) )
{
-#ifndef QCA_WIFI_2_0
- // we skip this registration for modes other than STA, SAP and P2P client modes.
- status = hdd_get_next_adapter ( pHddCtx, pAdapterNode, &pNext );
- pAdapterNode = pNext;
- continue;
-#else
goto send_suspend_ind;
-#endif
}
/* Avoid multiple enter/exit BMPS in this while loop using
* hdd_enter_bmps flag
@@ -1347,7 +1314,6 @@ void hdd_suspend_wlan(void (*callback)(void *callbackContext, boolean suspended)
}
#endif
-#ifdef QCA_WIFI_2_0
send_suspend_ind:
//stop all TX queues before suspend
netif_tx_disable(pAdapter->dev);
@@ -1355,7 +1321,6 @@ send_suspend_ind:
/* Keep this suspend indication at the end (before processing next adaptor)
* for discrete. This indication is considered as trigger point to start
* WOW (if wow is enabled). */
-#endif
/*Suspend notification sent down to driver*/
hdd_conf_suspend_ind(pHddCtx, pAdapter, callback, callbackContext);
@@ -1625,14 +1590,7 @@ void hdd_resume_wlan(void)
&& (WLAN_HDD_SOFTAP != pAdapter->device_mode)
&& (WLAN_HDD_P2P_CLIENT != pAdapter->device_mode) )
{
-#ifndef QCA_WIFI_2_0
- // we skip this registration for modes other than STA, SAP and P2P client modes.
- status = hdd_get_next_adapter ( pHddCtx, pAdapterNode, &pNext );
- pAdapterNode = pNext;
- continue;
-#else
goto send_resume_ind;
-#endif
}
@@ -1679,11 +1637,9 @@ void hdd_resume_wlan(void)
}
}
-#ifdef QCA_WIFI_2_0
send_resume_ind:
//wake the tx queues
netif_tx_wake_all_queues(pAdapter->dev);
-#endif
hdd_conf_resume_ind(pAdapter);
@@ -1802,10 +1758,8 @@ VOS_STATUS hdd_wlan_shutdown(void)
return VOS_STATUS_E_FAILURE;
}
-#if defined(QCA_WIFI_2_0) && !defined(QCA_WIFI_ISOC)
pHddCtx->isLogpInProgress = TRUE;
vos_set_logp_in_progress(VOS_MODULE_ID_VOSS, TRUE);
-#endif
vos_clear_concurrent_session_count();
//Stop the traffic monitor timer
@@ -1817,14 +1771,6 @@ VOS_STATUS hdd_wlan_shutdown(void)
hdd_reset_all_adapters(pHddCtx);
-#ifdef QCA_WIFI_ISOC
- /* DeRegister with platform driver as client for Suspend/Resume */
- vosStatus = hddDeregisterPmOps(pHddCtx);
- if ( !VOS_IS_STATUS_SUCCESS( vosStatus ) )
- {
- hddLog(VOS_TRACE_LEVEL_FATAL,"%s: hddDeregisterPmOps failed",__func__);
- }
-#endif
vosStatus = hddDevTmUnregisterNotifyCallback(pHddCtx);
if ( !VOS_IS_STATUS_SUCCESS( vosStatus ) )
{
@@ -1911,7 +1857,6 @@ VOS_STATUS hdd_wlan_shutdown(void)
}
#endif //WLAN_BTAMP_FEATURE
-#if defined(QCA_WIFI_2_0) && !defined(QCA_WIFI_ISOC)
hddLog(VOS_TRACE_LEVEL_FATAL, "%s: Doing WDA STOP", __func__);
vosStatus = WDA_stop(pVosContext, HAL_STOP_TYPE_RF_KILL);
@@ -1922,15 +1867,6 @@ VOS_STATUS hdd_wlan_shutdown(void)
VOS_ASSERT(VOS_IS_STATUS_SUCCESS(vosStatus));
WDA_setNeedShutdown(pVosContext);
}
-#else
- vosStatus = vos_wda_shutdown(pVosContext);
- if (!VOS_IS_STATUS_SUCCESS(vosStatus))
- {
- VOS_TRACE( VOS_MODULE_ID_VOSS, VOS_TRACE_LEVEL_ERROR,
- "%s: Failed to stop wda %d", __func__, vosStatus);
- VOS_ASSERT(0);
- }
-#endif
hddLog(VOS_TRACE_LEVEL_FATAL, "%s: Doing SME STOP",__func__);
/* Stop SME - Cannot invoke vos_stop as vos_stop relies
@@ -1964,9 +1900,7 @@ VOS_STATUS hdd_wlan_shutdown(void)
VOS_ASSERT(0);
}
-#ifndef QCA_WIFI_ISOC
hif_disable_isr(((VosContextType*)pVosContext)->pHIFContext);
-#endif
hdd_unregister_mcast_bcast_filter(pHddCtx);
@@ -2016,25 +1950,11 @@ VOS_STATUS hdd_wlan_re_init(void *hif_sc)
WLANBAP_ConfigType btAmpConfig;
#endif
-#if defined(QCA_WIFI_2_0) && !defined(QCA_WIFI_ISOC)
adf_os_device_t adf_ctx;
hdd_adapter_t *pAdapter;
-#endif
int i;
hdd_prevent_suspend();
-#ifdef QCA_WIFI_ISOC
-#ifdef HAVE_WCNSS_CAL_DOWNLOAD
- /* wait until WCNSS driver downloads NV */
- while (!wcnss_device_ready() && 10 >= ++max_retries) {
- msleep(1000);
- }
- if (max_retries >= 10) {
- hddLog(VOS_TRACE_LEVEL_FATAL,"%s: WCNSS driver not ready", __func__);
- goto err_re_init;
- }
-#endif
-#endif
vos_set_reinit_in_progress(VOS_MODULE_ID_VOSS, TRUE);
@@ -2055,7 +1975,6 @@ VOS_STATUS hdd_wlan_re_init(void *hif_sc)
goto err_re_init;
}
-#if defined(QCA_WIFI_2_0) && !defined(QCA_WIFI_ISOC)
if (!hif_sc) {
hddLog(VOS_TRACE_LEVEL_FATAL, "%s: hif_sc is NULL", __func__);
goto err_re_init;
@@ -2073,20 +1992,10 @@ VOS_STATUS hdd_wlan_re_init(void *hif_sc)
hif_init_adf_ctx(adf_ctx, hif_sc);
((VosContextType*)pVosContext)->pHIFContext = hif_sc;
((VosContextType*)(pVosContext))->adf_ctx = adf_ctx;
-#endif
/* The driver should always be initialized in STA mode after SSR */
hdd_set_conparam(0);
-#ifdef QCA_WIFI_ISOC
- vosStatus = vos_init_wiphy_from_nv_bin();
- if (!VOS_IS_STATUS_SUCCESS(vosStatus))
- {
- /* NV module cannot be initialized */
- hddLog(VOS_TRACE_LEVEL_FATAL, "%s: vos_init_wiphy failed", __func__);
- goto err_re_init;
- }
-#endif
/* Try to get an adapter from mode ID */
pAdapter = hdd_get_adapter(pHddCtx, WLAN_HDD_INFRA_STATION);
@@ -2112,7 +2021,7 @@ VOS_STATUS hdd_wlan_re_init(void *hif_sc)
goto err_re_init;
}
-#if defined(QCA_WIFI_2_0) && !defined(QCA_WIFI_ISOC) && !defined(REMOVE_PKT_LOG)
+#if !defined(REMOVE_PKT_LOG)
hif_init_pdev_txrx_handle(hif_sc,
vos_get_context(VOS_MODULE_ID_TXRX, pVosContext));
#endif
@@ -2141,7 +2050,6 @@ VOS_STATUS hdd_wlan_re_init(void *hif_sc)
}
#ifdef CONFIG_ENABLE_LINUX_REG
-#ifndef QCA_WIFI_ISOC
/* initialize the NV module. This is required so that
we can initialize the channel information in wiphy
from the NV.bin data. The channel information in
@@ -2156,7 +2064,6 @@ VOS_STATUS hdd_wlan_re_init(void *hif_sc)
goto err_vosclose;
}
#endif
-#endif
vosStatus = hdd_set_sme_chan_list(pHddCtx);
if (!VOS_IS_STATUS_SUCCESS(vosStatus)) {
@@ -2273,15 +2180,6 @@ VOS_STATUS hdd_wlan_re_init(void *hif_sc)
hdd_register_mcast_bcast_filter(pHddCtx);
hdd_ssr_timer_del();
-#ifdef QCA_WIFI_ISOC
- /* Register with platform driver as client for Suspend/Resume */
- vosStatus = hddRegisterPmOps(pHddCtx);
- if ( !VOS_IS_STATUS_SUCCESS( vosStatus ) )
- {
- hddLog(VOS_TRACE_LEVEL_FATAL,"%s: hddRegisterPmOps failed",__func__);
- goto err_bap_stop;
- }
-#endif
wlan_hdd_send_svc_nlink_msg(WLAN_SVC_FW_CRASHED_IND, NULL, 0);
@@ -2305,11 +2203,6 @@ VOS_STATUS hdd_wlan_re_init(void *hif_sc)
goto success;
err_unregister_pmops:
-#ifdef QCA_WIFI_ISOC
- hddDeregisterPmOps(pHddCtx);
-
-err_bap_stop:
-#endif
#ifdef CONFIG_HAS_EARLYSUSPEND
hdd_unregister_mcast_bcast_filter(pHddCtx);
#endif
diff --git a/CORE/HDD/src/wlan_hdd_ftm.c b/CORE/HDD/src/wlan_hdd_ftm.c
index 824f4f2d462f..870fb7402aa4 100644
--- a/CORE/HDD/src/wlan_hdd_ftm.c
+++ b/CORE/HDD/src/wlan_hdd_ftm.c
@@ -75,7 +75,7 @@
#include "pttMsgApi.h"
#include "wlan_qct_pal_device.h"
-#if defined(QCA_WIFI_2_0) && defined(QCA_WIFI_FTM)
+#if defined(QCA_WIFI_FTM)
#include "bmi.h"
#include "ol_fw.h"
#include "testmode.h"
@@ -521,7 +521,7 @@ static FTM_STATUS ftm_status;
//tpAniSirGlobal pMac;
static tPttMsgbuffer *pMsgBuf;
-#if defined(QCA_WIFI_2_0) && !defined(QCA_WIFI_ISOC) && defined(QCA_WIFI_FTM)
+#if defined(QCA_WIFI_FTM)
#if defined(LINUX_QCMBR)
#define ATH_XIOCTL_UNIFIED_UTF_CMD 0x1000
#define ATH_XIOCTL_UNIFIED_UTF_RSP 0x1001
@@ -662,14 +662,12 @@ static VOS_STATUS wlan_ftm_vos_open( v_CONTEXT_t pVosContext, v_SIZE_t hddContex
tSirRetStatus sirStatus = eSIR_SUCCESS;
tMacOpenParameters macOpenParms;
pVosContextType gpVosContext = (pVosContextType)pVosContext;
-#if defined(QCA_WIFI_2_0) && defined(QCA_WIFI_FTM)
+#if defined(QCA_WIFI_FTM)
adf_os_device_t adf_ctx;
HTC_INIT_INFO htcInfo;
-#ifndef QCA_WIFI_ISOC
v_PVOID_t pHifContext = NULL;
v_PVOID_t pHtcContext = NULL;
#endif
-#endif
hdd_context_t *pHddCtx;
VOS_TRACE( VOS_MODULE_ID_VOSS, VOS_TRACE_LEVEL_INFO_HIGH,
@@ -735,8 +733,7 @@ static VOS_STATUS wlan_ftm_vos_open( v_CONTEXT_t pVosContext, v_SIZE_t hddContex
goto err_msg_queue;
}
-#if defined(QCA_WIFI_2_0) && defined(QCA_WIFI_FTM)
-#ifndef QCA_WIFI_ISOC
+#if defined(QCA_WIFI_FTM)
/* Initialize BMI and Download firmware */
pHifContext = vos_get_context(VOS_MODULE_ID_HIF, gpVosContext);
if (!pHifContext)
@@ -754,7 +751,6 @@ static VOS_STATUS wlan_ftm_vos_open( v_CONTEXT_t pVosContext, v_SIZE_t hddContex
htcInfo.pContext = gpVosContext->pHIFContext;
htcInfo.TargetFailure = ol_target_failure;
htcInfo.TargetSendSuspendComplete = wma_target_suspend_acknowledge;
-#endif
adf_ctx = vos_get_context(VOS_MODULE_ID_ADF, gpVosContext);
/* Create HTC */
@@ -762,19 +758,15 @@ static VOS_STATUS wlan_ftm_vos_open( v_CONTEXT_t pVosContext, v_SIZE_t hddContex
if (!gpVosContext->htc_ctx) {
VOS_TRACE(VOS_MODULE_ID_VOSS, VOS_TRACE_LEVEL_FATAL,
"%s: Failed to Create HTC", __func__);
-#ifndef QCA_WIFI_ISOC
goto err_bmi_close;
-#endif
goto err_sched_close;
}
-#ifndef QCA_WIFI_ISOC
if (bmi_done(pHifContext)) {
VOS_TRACE(VOS_MODULE_ID_VOSS, VOS_TRACE_LEVEL_FATAL,
"%s: Failed to complete BMI phase", __func__);
goto err_htc_close;
}
-#endif
#endif /* QCA_WIFI_2_0 && QCA_WIFI_FTM */
/* Open the SYS module */
@@ -806,14 +798,9 @@ static VOS_STATUS wlan_ftm_vos_open( v_CONTEXT_t pVosContext, v_SIZE_t hddContex
macOpenParms.powersaveOffloadEnabled =
pHddCtx->cfg_ini->enablePowersaveOffload;
-#ifndef QCA_WIFI_ISOC
vStatus = WDA_open(gpVosContext, gpVosContext->pHDDContext,
wlan_hdd_ftm_update_tgt_cfg, NULL,
&macOpenParms);
-#else
- vStatus = WDA_open(gpVosContext, gpVosContext->pHDDContext,
- NULL, &macOpenParms);
-#endif
if (!VOS_IS_STATUS_SUCCESS(vStatus))
{
/* Critical Error ... Cannot proceed further */
@@ -823,8 +810,7 @@ static VOS_STATUS wlan_ftm_vos_open( v_CONTEXT_t pVosContext, v_SIZE_t hddContex
goto err_sys_close;
}
-#if defined (QCA_WIFI_2_0) && defined(QCA_WIFI_FTM) \
- && !defined (QCA_WIFI_ISOC)
+#if defined(QCA_WIFI_FTM)
pHtcContext = vos_get_context(VOS_MODULE_ID_HTC, gpVosContext);
if (!pHtcContext)
{
@@ -919,17 +905,15 @@ err_wda_close:
err_sys_close:
sysClose(gpVosContext);
-#if defined(QCA_WIFI_2_0) && defined(QCA_WIFI_FTM)
+#if defined(QCA_WIFI_FTM)
err_htc_close:
if (gpVosContext->htc_ctx) {
HTCDestroy(gpVosContext->htc_ctx);
gpVosContext->htc_ctx = NULL;
}
-#ifndef QCA_WIFI_ISOC
err_bmi_close:
BMICleanup(pHifContext);
-#endif /* #ifndef QCA_WIFI_ISOC */
#endif /* #QCA_WIFI_2_0 && QCA_WIFI_FTM */
err_sched_close:
@@ -1011,7 +995,7 @@ static VOS_STATUS wlan_ftm_vos_close( v_CONTEXT_t vosContext )
VOS_ASSERT( VOS_IS_STATUS_SUCCESS( vosStatus ) );
}
-#if defined(QCA_WIFI_2_0) && defined(QCA_WIFI_FTM) && !defined(QCA_WIFI_ISOC)
+#if defined(QCA_WIFI_FTM)
if (gpVosContext->htc_ctx)
{
HTCStop(gpVosContext->htc_ctx);
@@ -1382,7 +1366,7 @@ VOS_STATUS vos_ftm_preStart( v_CONTEXT_t vosContext )
{
VOS_STATUS vStatus = VOS_STATUS_SUCCESS;
pVosContextType pVosContext = (pVosContextType)vosContext;
-#if defined(QCA_WIFI_2_0) && defined(QCA_WIFI_FTM)
+#if defined(QCA_WIFI_FTM)
pVosContextType gpVosContext = vos_get_global_context(VOS_MODULE_ID_VOSS,
NULL);
#endif
@@ -1419,9 +1403,6 @@ VOS_STATUS vos_ftm_preStart( v_CONTEXT_t vosContext )
{
VOS_TRACE(VOS_MODULE_ID_SYS, VOS_TRACE_LEVEL_ERROR,
"Failed to WDA prestart ");
-#ifdef QCA_WIFI_ISOC
- macStop(pVosContext->pMACContext, HAL_STOP_TYPE_SYS_DEEP_SLEEP);
-#endif
ccmStop(pVosContext->pMACContext);
VOS_ASSERT(0);
return VOS_STATUS_E_FAILURE;
@@ -1445,22 +1426,17 @@ VOS_STATUS vos_ftm_preStart( v_CONTEXT_t vosContext )
return VOS_STATUS_E_FAILURE;
}
-#if defined(QCA_WIFI_2_0) && defined(QCA_WIFI_FTM)
+#if defined(QCA_WIFI_FTM)
vStatus = HTCStart(gpVosContext->htc_ctx);
if (!VOS_IS_STATUS_SUCCESS(vStatus))
{
VOS_TRACE(VOS_MODULE_ID_SYS, VOS_TRACE_LEVEL_FATAL,
"Failed to Start HTC");
-#ifdef QCA_WIFI_ISOC
- macStop(gpVosContext->pMACContext, HAL_STOP_TYPE_SYS_DEEP_SLEEP);
-#endif
ccmStop(gpVosContext->pMACContext);
VOS_ASSERT( 0 );
return VOS_STATUS_E_FAILURE;
}
-#ifndef QCA_WIFI_ISOC
wma_wait_for_ready_event(gpVosContext->pWDAContext);
-#endif
#endif /* QCA_WIFI_2_0 && QCA_WIFI_FTM */
return VOS_STATUS_SUCCESS;
@@ -1746,10 +1722,6 @@ static VOS_STATUS wlan_ftm_send_response(hdd_context_t *pHddCtx){
static int wlan_hdd_ftm_start(hdd_context_t *pHddCtx)
{
VOS_STATUS vStatus = VOS_STATUS_SUCCESS;
-#ifdef QCA_WIFI_ISOC
- tSirRetStatus sirStatus = eSIR_SUCCESS;
- tHalMacStartParameters halStartParams;
-#endif
pVosContextType pVosContext = (pVosContextType)(pHddCtx->pvosContext);
if (WLAN_FTM_STARTED == pHddCtx->ftm.ftm_state)
@@ -1788,34 +1760,6 @@ static int wlan_hdd_ftm_start(hdd_context_t *pHddCtx)
}
-#ifdef QCA_WIFI_ISOC
- vStatus = WDA_NVDownload_Start(pVosContext);
-
- if ( vStatus != VOS_STATUS_SUCCESS )
- {
- VOS_TRACE( VOS_MODULE_ID_VOSS, VOS_TRACE_LEVEL_ERROR,
- "%s: Failed to start NV Download",__func__);
- return VOS_STATUS_E_FAILURE;
- }
-
- vStatus = vos_wait_single_event(&(pVosContext->wdaCompleteEvent), 1000);
-
- if ( vStatus != VOS_STATUS_SUCCESS )
- {
- if ( vStatus == VOS_STATUS_E_TIMEOUT )
- {
- VOS_TRACE( VOS_MODULE_ID_VOSS, VOS_TRACE_LEVEL_ERROR,
- "%s: Timeout occurred before WDA_NVDownload_Start complete", __func__);
- }
- else
- {
- VOS_TRACE( VOS_MODULE_ID_VOSS, VOS_TRACE_LEVEL_ERROR,
- "%s: WDA_NVDownload_Start reporting other error", __func__);
- }
- VOS_ASSERT(0);
- goto err_status_failure;
- }
-#endif /* #ifdef QCA_WIFI_ISOC */
vStatus = WDA_start(pVosContext);
if (vStatus != VOS_STATUS_SUCCESS)
@@ -1825,25 +1769,6 @@ static int wlan_hdd_ftm_start(hdd_context_t *pHddCtx)
goto err_status_failure;
}
-#ifdef QCA_WIFI_ISOC
- /* Start the MAC */
- vos_mem_zero((v_PVOID_t)&halStartParams, sizeof(tHalMacStartParameters));
-
-
- halStartParams.driverType = eDRIVER_TYPE_MFG;
-
- /* Start the MAC */
- sirStatus = macStart(pVosContext->pMACContext,(v_PVOID_t)&halStartParams);
-
-
- if (eSIR_SUCCESS != sirStatus)
- {
- VOS_TRACE(VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_ERROR,
- "%s: Failed to start MAC", __func__);
-
- goto err_wda_stop;
- }
-#endif /* #ifdef QCA_WIFI_ISOC */
VOS_TRACE(VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_INFO,
"%s: MAC correctly started",__func__);
@@ -1861,27 +1786,6 @@ static int wlan_hdd_ftm_start(hdd_context_t *pHddCtx)
err_ftm_service_reg:
wlan_hdd_ftm_close(pHddCtx);
-#ifdef QCA_WIFI_ISOC
-err_wda_stop:
- vos_event_reset(&(pVosContext->wdaCompleteEvent));
- WDA_stop(pVosContext, HAL_STOP_TYPE_RF_KILL);
- vStatus = vos_wait_single_event(&(pVosContext->wdaCompleteEvent), 1000);
- if(vStatus != VOS_STATUS_SUCCESS)
- {
- if(vStatus == VOS_STATUS_E_TIMEOUT)
- {
- VOS_TRACE(VOS_MODULE_ID_VOSS, VOS_TRACE_LEVEL_ERROR,
- "%s: Timeout occurred before WDA_stop complete", __func__);
-
- }
- else
- {
- VOS_TRACE(VOS_MODULE_ID_VOSS, VOS_TRACE_LEVEL_ERROR,
- "%s: WDA_stop reporting other error", __func__);
- }
- VOS_ASSERT(0);
- }
-#endif /* #ifdef QCA_WIFI_ISOC */
err_status_failure:
@@ -1889,7 +1793,7 @@ err_status_failure:
}
-#if defined(QCA_WIFI_2_0) && defined(QCA_WIFI_FTM)
+#if defined(QCA_WIFI_FTM)
int hdd_ftm_start(hdd_context_t *pHddCtx)
{
return wlan_hdd_ftm_start(pHddCtx);
@@ -1927,7 +1831,7 @@ static int wlan_ftm_stop(hdd_context_t *pHddCtx)
return WLAN_FTM_SUCCESS;
}
-#if defined(QCA_WIFI_2_0) && defined(QCA_WIFI_FTM)
+#if defined(QCA_WIFI_FTM)
int hdd_ftm_stop(hdd_context_t *pHddCtx)
{
return wlan_ftm_stop(pHddCtx);
@@ -5531,7 +5435,7 @@ static int wlan_ftm_register_wext(hdd_adapter_t *pAdapter)
return 0;
}
-#if defined(QCA_WIFI_2_0) && !defined(QCA_WIFI_ISOC) && defined(QCA_WIFI_FTM)
+#if defined(QCA_WIFI_FTM)
#if defined(LINUX_QCMBR)
int wlan_hdd_qcmbr_command(hdd_adapter_t *pAdapter, qcmbr_data_t *pqcmbr_data)
{
diff --git a/CORE/HDD/src/wlan_hdd_hostapd.c b/CORE/HDD/src/wlan_hdd_hostapd.c
index d1352660b89e..f607465a697c 100644
--- a/CORE/HDD/src/wlan_hdd_hostapd.c
+++ b/CORE/HDD/src/wlan_hdd_hostapd.c
@@ -85,14 +85,12 @@
#include <net/cnss.h>
#endif
-#ifdef QCA_WIFI_2_0
#include "wma.h"
#ifdef DEBUG
#include "wma_api.h"
#endif
extern int process_wma_set_command(int sessid, int paramid,
int sval, int vpdev);
-#endif /* QCA_WIFI_2_0 */
#include "wlan_hdd_trace.h"
#include "vos_types.h"
#include "vos_trace.h"
@@ -1070,7 +1068,6 @@ VOS_STATUS hdd_hostapd_SAPEventCB( tpSap_Event pSapEvent, v_PVOID_t usrDataForCa
hdd_abort_mac_scan(pHddCtx, pHostapdAdapter->sessionId,
eCSR_SCAN_ABORT_DEFAULT);
}
-#ifdef QCA_WIFI_2_0
if (pHostapdAdapter->device_mode == WLAN_HDD_P2P_GO)
{
/* send peer status indication to oem app */
@@ -1080,7 +1077,6 @@ VOS_STATUS hdd_hostapd_SAPEventCB( tpSap_Event pSapEvent, v_PVOID_t usrDataForCa
pSapEvent->sapevt.sapStationAssocReassocCompleteEvent.timingMeasCap,
pHostapdAdapter->sessionId, pHddApCtx->operatingChannel);
}
-#endif
#ifdef FEATURE_GREEN_AP
hdd_wlan_green_ap_mc(pHddCtx, GREEN_AP_ADD_STA_EVENT);
@@ -1166,7 +1162,6 @@ VOS_STATUS hdd_hostapd_SAPEventCB( tpSap_Event pSapEvent, v_PVOID_t usrDataForCa
hddLog(LOGE, "%s: failed to update Beacon interval %d",
__func__, vos_status);
}
-#ifdef QCA_WIFI_2_0
if (pHostapdAdapter->device_mode == WLAN_HDD_P2P_GO)
{
/* send peer status indication to oem app */
@@ -1175,7 +1170,6 @@ VOS_STATUS hdd_hostapd_SAPEventCB( tpSap_Event pSapEvent, v_PVOID_t usrDataForCa
ePeerDisconnected, 0,
pHostapdAdapter->sessionId, pHddApCtx->operatingChannel);
}
-#endif
#ifdef MSM_PLATFORM
/*stop timer in sap/p2p_go */
@@ -1920,7 +1914,6 @@ static iw_softap_setparam(struct net_device *dev,
break;
}
-#ifdef QCA_WIFI_2_0
case QCSAP_PARAM_SET_TXRX_FW_STATS:
{
hddLog(LOG1, "QCSAP_PARAM_SET_TXRX_FW_STATS val %d", set_value);
@@ -2407,11 +2400,7 @@ static iw_softap_setparam(struct net_device *dev,
{
hddLog(VOS_TRACE_LEVEL_INFO, "Set Thermal Mitigation Level %d",
set_value);
-#ifdef QCA_WIFI_ISOC
- hddLog(VOS_TRACE_LEVEL_ERROR, " 'setTmLevel' Command Not supported for this mode");
-#else
(void)sme_SetThermalLevel(hHal, set_value);
-#endif
break;
}
@@ -2440,7 +2429,6 @@ static iw_softap_setparam(struct net_device *dev,
break;
}
-#endif /* QCA_WIFI_2_0 */
case QCASAP_SET_DFS_NOL:
WLANSAP_Set_DfsNol(
@@ -4091,66 +4079,6 @@ static int iw_set_ap_genie(struct net_device *dev,
EXIT();
return halStatus;
}
-#ifdef QCA_WIFI_ISOC
-static VOS_STATUS wlan_hdd_get_classAstats_for_station(hdd_adapter_t *pAdapter, u8 staid)
-{
- eHalStatus hstatus;
- unsigned long rc;
- struct statsContext context;
-
- if (NULL == pAdapter)
- {
- hddLog(VOS_TRACE_LEVEL_ERROR,"%s: pAdapter is NULL", __func__);
- return VOS_STATUS_E_FAULT;
- }
-
- init_completion(&context.completion);
- context.pAdapter = pAdapter;
- context.magic = STATS_CONTEXT_MAGIC;
- hstatus = sme_GetStatistics( WLAN_HDD_GET_HAL_CTX(pAdapter),
- eCSR_HDD,
- SME_GLOBAL_CLASSA_STATS,
- hdd_GetClassA_statisticsCB,
- 0, // not periodic
- FALSE, //non-cached results
- staid,
- &context,
- pAdapter->sessionId );
- if (eHAL_STATUS_SUCCESS != hstatus)
- {
- hddLog(VOS_TRACE_LEVEL_ERROR,
- "%s: Unable to retrieve statistics for link speed",
- __func__);
- }
- else
- {
- rc = wait_for_completion_timeout(&context.completion,
- msecs_to_jiffies(WLAN_WAIT_TIME_STATS));
- if (!rc) {
- hddLog(VOS_TRACE_LEVEL_ERROR,
- "%s: SME timed out while retrieving link speed",
- __func__);
- }
- }
-
- /* either we never sent a request, we sent a request and received a
- response or we sent a request and timed out. if we never sent a
- request or if we sent a request and got a response, we want to
- clear the magic out of paranoia. if we timed out there is a
- race condition such that the callback function could be
- executing at the same time we are. of primary concern is if the
- callback function had already verified the "magic" but had not
- yet set the completion variable when a timeout occurred. we
- serialize these activities by invalidating the magic while
- holding a shared spinlock which will cause us to block if the
- callback is currently executing */
- spin_lock(&hdd_context_lock);
- context.magic = 0;
- spin_unlock(&hdd_context_lock);
-
- return VOS_STATUS_SUCCESS;
-}
-#endif
VOS_STATUS wlan_hdd_get_linkspeed_for_peermac(hdd_adapter_t *pAdapter,
tSirMacAddr macAddress)
@@ -4399,7 +4327,6 @@ static const struct iw_priv_args hostapd_private_args[] = {
{ QCSAP_PARAM_SET_CHANNEL_CHANGE,
IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 1, 0, "setChanChange" },
-#ifdef QCA_WIFI_2_0
/* Sub-cmds DBGLOG specific commands */
{ QCSAP_DBGLOG_LOG_LEVEL ,
IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 1,
@@ -4561,7 +4488,6 @@ static const struct iw_priv_args hostapd_private_args[] = {
0,
"setRadar" },
-#endif /* QCA_WIFI_2_0 */
{ QCSAP_IOCTL_GETPARAM, 0,
IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 1, "getparam" },
diff --git a/CORE/HDD/src/wlan_hdd_main.c b/CORE/HDD/src/wlan_hdd_main.c
index e506bffb583e..50ea5d51dd0d 100755
--- a/CORE/HDD/src/wlan_hdd_main.c
+++ b/CORE/HDD/src/wlan_hdd_main.c
@@ -135,7 +135,6 @@ void hdd_ch_avoid_cb(void *hdd_context,void *indi_param);
#ifdef IPA_OFFLOAD
#include <wlan_hdd_ipa.h>
#endif
-#if defined(QCA_WIFI_2_0) && !defined(QCA_WIFI_ISOC)
#if defined(HIF_PCI)
#include "if_pci.h"
#elif defined(HIF_USB)
@@ -144,7 +143,6 @@ void hdd_ch_avoid_cb(void *hdd_context,void *indi_param);
#include "if_ath_sdio.h"
#endif
#include "wma.h"
-#endif
#if defined(LINUX_QCMBR)
#define SIOCIOCTLTX99 (SIOCDEVPRIVATE+13)
@@ -284,14 +282,11 @@ static int hdd_parse_reassoc_command_v1_data(const tANI_U8 *pValue,
tANI_U8 *pChannel);
#endif
-#if defined (QCA_WIFI_2_0) && \
- !defined (QCA_WIFI_ISOC)
struct completion wlan_start_comp;
#ifdef QCA_WIFI_FTM
extern int hdd_ftm_start(hdd_context_t *pHddCtx);
extern int hdd_ftm_stop(hdd_context_t *pHddCtx);
#endif
-#endif
#ifdef FEATURE_WLAN_AUTO_SHUTDOWN
v_VOID_t wlan_hdd_auto_shutdown_cb(v_VOID_t);
#endif
@@ -2468,9 +2463,7 @@ hdd_reassoc(hdd_adapter_t *pAdapter, const tANI_U8 *bssid, const tANI_U8 channel
hdd_context_t *pHddCtx = WLAN_HDD_GET_CTX(pAdapter);
handoffInfo.channel = channel;
-#ifndef QCA_WIFI_ISOC
handoffInfo.src = REASSOC;
-#endif
memcpy(handoffInfo.bssid, bssid, sizeof(tSirMacAddr));
sme_HandoffRequest(pHddCtx->hHal, pAdapter->sessionId, &handoffInfo);
}
@@ -3819,16 +3812,6 @@ static int hdd_driver_command(hdd_adapter_t *pAdapter,
}
else if (strncmp(command, "SETSUSPENDMODE", 14) == 0)
{
-#ifndef QCA_WIFI_2_0
- int suspend = 0;
- tANI_U8 *ptr = (tANI_U8*)command + 15;
-
- suspend = *ptr - '0';
- MTRACE(vos_trace(VOS_MODULE_ID_HDD,
- TRACE_CODE_HDD_SETSUSPENDMODE_IOCTL,
- pAdapter->sessionId, suspend));
- hdd_set_wlan_suspend_mode(suspend);
-#endif
}
#ifdef WLAN_FEATURE_NEIGHBOR_ROAMING
else if (strncmp(command, "SETROAMTRIGGER", 14) == 0)
@@ -4925,7 +4908,6 @@ static int hdd_driver_command(hdd_adapter_t *pAdapter,
else if (strncmp(command, "FASTREASSOC", 11) == 0)
{
-#ifndef QCA_WIFI_ISOC
tANI_U8 *value = command;
tANI_U8 channel = 0;
tSirMacAddr targetApBssid;
@@ -4978,48 +4960,6 @@ static int hdd_driver_command(hdd_adapter_t *pAdapter,
vos_mem_copy(handoffInfo.bssid, targetApBssid, sizeof(tSirMacAddr));
sme_HandoffRequest(pHddCtx->hHal, pAdapter->sessionId, &handoffInfo);
#endif
-#else
- tANI_U8 *value = command;
- tSirMacAddr targetApBssid;
- tANI_U8 trigger = 0;
- hdd_station_ctx_t *pHddStaCtx = NULL;
- pHddStaCtx = WLAN_HDD_GET_STATION_CTX_PTR(pAdapter);
-
- /* if not associated, no need to proceed with reassoc */
- if (eConnectionState_Associated != pHddStaCtx->conn_info.connState)
- {
- VOS_TRACE(VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_INFO, "%s:Not associated!",__func__);
- ret = -EINVAL;
- goto exit;
- }
-
- ret = hdd_parse_reassoc_command_v1_data(value, targetApBssid,
- &trigger);
- if (ret)
- {
- VOS_TRACE( VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_ERROR,
- "%s: Failed to parse reassoc command data", __func__);
- goto exit;
- }
-
- /* if the target bssid is same as currently associated AP,
- then no need to proceed with reassoc */
- if (VOS_TRUE == vos_mem_compare(targetApBssid,
- pHddStaCtx->conn_info.bssId, sizeof(tSirMacAddr)))
- {
- VOS_TRACE(VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_INFO,
- "%s:11r Reassoc BSSID is same as currently associated AP bssid",
- __func__);
- ret = -EINVAL;
- goto exit;
- }
-
- /* Proceed with scan/roam */
- smeIssueFastRoamNeighborAPEvent(WLAN_HDD_GET_HAL_CTX(pAdapter),
- &targetApBssid[0],
- (tSmeFastRoamTrigger)(trigger),
- pAdapter->sessionId);
-#endif
}
#endif
#if defined(FEATURE_WLAN_ESE) && defined(FEATURE_WLAN_ESE_UPLOAD)
@@ -5816,7 +5756,7 @@ int hdd_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd)
goto exit;
}
-#if defined(QCA_WIFI_2_0) && !defined(QCA_WIFI_ISOC) && defined(QCA_WIFI_FTM) && defined(LINUX_QCMBR)
+#if defined(QCA_WIFI_FTM) && defined(LINUX_QCMBR)
if (VOS_FTM_MODE == hdd_get_conparam()) {
if (SIOCIOCTLTX99 == cmd) {
ret = wlan_hdd_qcmbr_unified_ioctl(pAdapter, ifr);
@@ -6157,7 +6097,6 @@ void hdd_getBand_helper(hdd_context_t *pHddCtx, int *pBand)
}
}
-#if defined (QCA_WIFI_2_0) && !defined (QCA_WIFI_ISOC)
/*
* Mac address for multiple virtual interface is found as following
* i) The mac address of the first interface is just the actual hw mac address.
@@ -6808,7 +6747,6 @@ void hdd_dfs_indicate_radar(void *context, void *param)
}
}
}
-#endif /* QCA_WIFI_2_0 && !QCA_WIFI_ISOC */
/**---------------------------------------------------------------------------
@@ -7938,9 +7876,7 @@ static hdd_adapter_t* hdd_alloc_station_adapter( hdd_context_t *pHddCtx, tSirMac
init_completion(&pHddCtx->mc_sus_event_var);
init_completion(&pHddCtx->tx_sus_event_var);
init_completion(&pHddCtx->rx_sus_event_var);
-#ifdef QCA_WIFI_2_0
init_completion(&pHddCtx->ready_to_suspend);
-#endif
init_completion(&pAdapter->ula_complete);
init_completion(&pAdapter->change_country_code);
@@ -7970,15 +7906,11 @@ static hdd_adapter_t* hdd_alloc_station_adapter( hdd_context_t *pHddCtx, tSirMac
pWlanDev->watchdog_timeo = HDD_TX_TIMEOUT;
pWlanDev->hard_header_len += LIBRA_HW_NEEDED_HEADROOM;
-#ifdef QCA_WIFI_2_0
if (pHddCtx->cfg_ini->enableIPChecksumOffload)
pWlanDev->features |= NETIF_F_HW_CSUM;
else if (pHddCtx->cfg_ini->enableTCPChkSumOffld)
pWlanDev->features |= NETIF_F_IP_CSUM | NETIF_F_IPV6_CSUM;
-#ifndef QCA_WIFI_ISOC
pWlanDev->features |= NETIF_F_RXCSUM;
-#endif
-#endif
hdd_set_station_ops( pAdapter->dev );
pWlanDev->destructor = free_netdev;
@@ -8884,7 +8816,6 @@ hdd_adapter_t* hdd_open_adapter( hdd_context_t *pHddCtx, tANI_U8 session_type,
#endif
}
-#ifdef QCA_WIFI_2_0
if ((vos_get_conparam() != VOS_FTM_MODE) && (!pHddCtx->cfg_ini->enable2x2))
{
#define HDD_DTIM_1CHAIN_RX_ID 0x5
@@ -8942,7 +8873,6 @@ hdd_adapter_t* hdd_open_adapter( hdd_context_t *pHddCtx, tANI_U8 session_type,
}
}
-#endif
#ifdef CONFIG_FW_LOGS_BASED_ON_INI
@@ -10432,10 +10362,6 @@ void hdd_wlan_exit(hdd_context_t *pHddCtx)
struct wiphy *wiphy = pHddCtx->wiphy;
struct statsContext powerContext;
unsigned long rc;
-#if defined (QCA_WIFI_2_0) && \
- defined (QCA_WIFI_ISOC)
- adf_os_device_t adf_ctx;
-#endif
hdd_config_t *pConfig = pHddCtx->cfg_ini;
ENTER();
@@ -10451,7 +10377,7 @@ void hdd_wlan_exit(hdd_context_t *pHddCtx)
if (VOS_FTM_MODE == hdd_get_conparam())
{
hddLog(VOS_TRACE_LEVEL_INFO, "%s: FTM MODE", __func__);
-#if defined(QCA_WIFI_2_0) && !defined(QCA_WIFI_ISOC) && defined(QCA_WIFI_FTM)
+#if defined(QCA_WIFI_FTM)
if (hdd_ftm_stop(pHddCtx))
{
hddLog(VOS_TRACE_LEVEL_FATAL,"%s: hdd_ftm_stop Failed",__func__);
@@ -10682,15 +10608,6 @@ void hdd_wlan_exit(hdd_context_t *pHddCtx)
kfree(pHddCtx->cfg_ini);
pHddCtx->cfg_ini= NULL;
-#if defined (QCA_WIFI_2_0) && \
- defined (QCA_WIFI_ISOC)
- /*
- * Free ADF context here only for ISOC case. For discrete
- * it should be freed after PCI remove
- */
- adf_ctx = vos_get_context(VOS_MODULE_ID_ADF, pVosContext);
- vos_mem_free(adf_ctx);
-#endif
/* free the power on lock from platform driver */
if (free_riva_power_on_lock("wlan"))
@@ -10720,8 +10637,6 @@ free_hdd_ctx:
hdd_set_ssr_required (VOS_FALSE);
}
-#if defined (QCA_WIFI_2_0) && \
- !defined (QCA_WIFI_ISOC)
void __hdd_wlan_exit(void)
{
hdd_context_t *pHddCtx = NULL;
@@ -10789,7 +10704,6 @@ void __hdd_wlan_exit(void)
EXIT();
}
-#endif /* QCA_WIFI_2_0 && !QCA_WIFI_ISOC */
#ifdef QCA_HT_2040_COEX
/**--------------------------------------------------------------------------
@@ -11153,30 +11067,14 @@ boolean hdd_is_5g_supported(hdd_context_t * pHddCtx)
/* If wcnss_wlan_iris_xo_mode() returns WCNSS_XO_48MHZ(1);
* then hardware support 5Ghz.
*/
-#ifdef QCA_WIFI_ISOC
- if (WCNSS_XO_48MHZ == wcnss_wlan_iris_xo_mode())
- {
- hddLog(VOS_TRACE_LEVEL_ERROR, "%s: Hardware supports 5Ghz", __func__);
- return true;
- }
- else
- {
- hddLog(VOS_TRACE_LEVEL_ERROR, "%s: Hardware doesn't supports 5Ghz",
- __func__);
- return false;
- }
-#else
return true;
-#endif
}
#ifdef CONFIG_ENABLE_LINUX_REG
-#ifdef QCA_WIFI_2_0
#define WOW_MAX_FILTER_LISTS 1
#define WOW_MAX_FILTERS_PER_LIST 4
#define WOW_MIN_PATTERN_SIZE 6
#define WOW_MAX_PATTERN_SIZE 64
-#endif
static VOS_STATUS wlan_hdd_reg_init(hdd_context_t *hdd_ctx)
{
@@ -11190,7 +11088,6 @@ static VOS_STATUS wlan_hdd_reg_init(hdd_context_t *hdd_ctx)
from the NV.bin data. The channel information in
wiphy needs to be initialized before wiphy registration */
-#ifndef QCA_WIFI_ISOC
status = vos_init_wiphy_from_eeprom();
if (!VOS_IS_STATUS_SUCCESS(status))
{
@@ -11199,9 +11096,7 @@ static VOS_STATUS wlan_hdd_reg_init(hdd_context_t *hdd_ctx)
"%s: vos_init_wiphy failed", __func__);
return status;
}
-#endif
-#ifdef QCA_WIFI_2_0
wiphy->wowlan.flags = WIPHY_WOWLAN_ANY |
WIPHY_WOWLAN_MAGIC_PKT |
WIPHY_WOWLAN_DISCONNECT |
@@ -11215,7 +11110,6 @@ static VOS_STATUS wlan_hdd_reg_init(hdd_context_t *hdd_ctx)
WOW_MAX_FILTERS_PER_LIST);
wiphy->wowlan.pattern_min_len = WOW_MIN_PATTERN_SIZE;
wiphy->wowlan.pattern_max_len = WOW_MAX_PATTERN_SIZE;
-#endif
/* registration of wiphy dev with cfg80211 */
if (0 > wlan_hdd_cfg80211_register(wiphy))
@@ -11318,69 +11212,6 @@ static void hdd_bus_bw_compute_cbk(void *priv)
}
#endif
-#if defined(WLAN_AUTOGEN_MACADDR_FEATURE) && defined (QCA_WIFI_ISOC)
-/**---------------------------------------------------------------------------
-
- \brief hdd_generate_iface_mac_addr_auto() - HDD Mac Interface Auto
- generate function
-
- This is generate the random mac address for WLAN interface
-
- \param - pHddCtx - Pointer to HDD context
- idx - Start interface index to get auto
- generated mac addr.
- mac_addr - Mac address
-
- \return - 0 for success, < 0 for failure
-
- --------------------------------------------------------------------------*/
-
-static int hdd_generate_iface_mac_addr_auto(hdd_context_t *pHddCtx,
- int idx, v_MACADDR_t mac_addr)
-{
- int i;
- unsigned int serialno;
- serialno = wcnss_get_serial_number();
-
- if (0 != serialno)
- {
- /* MAC address has 3 bytes of OUI so we have a maximum of 3
- bytes of the serial number that can be used to generate
- the other 3 bytes of the MAC address. Mask off all but
- the lower 3 bytes (this will also make sure we don't
- overflow in the next step) */
- serialno &= 0x00FFFFFF;
-
- /* we need a unique address for each session */
- serialno *= VOS_MAX_CONCURRENCY_PERSONA;
-
- /* autogen other Mac addresses */
- for (i = idx; i < VOS_MAX_CONCURRENCY_PERSONA; i++)
- {
- /* start with the entire default address */
- pHddCtx->cfg_ini->intfMacAddr[i] = mac_addr;
- /* then replace the lower 3 bytes */
- pHddCtx->cfg_ini->intfMacAddr[i].bytes[3] = (serialno >> 16) & 0xFF;
- pHddCtx->cfg_ini->intfMacAddr[i].bytes[4] = (serialno >> 8) & 0xFF;
- pHddCtx->cfg_ini->intfMacAddr[i].bytes[5] = serialno & 0xFF;
-
- serialno++;
- hddLog(VOS_TRACE_LEVEL_ERROR,
- "%s: Derived Mac Addr: "
- MAC_ADDRESS_STR, __func__,
- MAC_ADDR_ARRAY(pHddCtx->cfg_ini->intfMacAddr[i].bytes));
- }
-
- }
- else
- {
- hddLog(LOGE, FL("Failed to Get Serial NO"));
- return -1;
- }
-
- return 0;
-}
-#endif // WLAN_AUTOGEN_MACADDR_FEATURE && QCA_WIFI_ISOC
/**---------------------------------------------------------------------------
\brief hdd_11d_scan_done - callback to be executed when 11d scan is
@@ -11439,16 +11270,9 @@ int hdd_wlan_startup(struct device *dev, v_VOID_t *hif_sc)
int i;
struct wiphy *wiphy;
unsigned long rc;
-#ifdef QCA_WIFI_2_0
adf_os_device_t adf_ctx;
-#endif
-#ifndef QCA_WIFI_ISOC
tSmeThermalParams thermalParam;
tSirTxPowerLimit *hddtxlimit;
-#endif
-#if defined(WLAN_AUTOGEN_MACADDR_FEATURE) && defined (QCA_WIFI_ISOC)
- v_MACADDR_t mac_addr;
-#endif
ENTER();
@@ -11521,7 +11345,6 @@ int hdd_wlan_startup(struct device *dev, v_VOID_t *hif_sc)
mutex_init(&pHddCtx->tdls_lock);
#endif
-#ifdef QCA_WIFI_2_0
/* Initialize the adf_ctx handle */
adf_ctx = vos_mem_malloc(sizeof(*adf_ctx));
@@ -11530,17 +11353,12 @@ int hdd_wlan_startup(struct device *dev, v_VOID_t *hif_sc)
goto err_free_hdd_context;
}
vos_mem_zero(adf_ctx, sizeof(*adf_ctx));
-#ifdef QCA_WIFI_ISOC
- adf_ctx->dev = dev;
-#else
hif_init_adf_ctx(adf_ctx, hif_sc);
((VosContextType*)pVosContext)->pHIFContext = hif_sc;
/* store target type and target version info in hdd ctx */
pHddCtx->target_type = ((struct ol_softc *)hif_sc)->target_type;
-#endif
((VosContextType*)(pVosContext))->adf_ctx = adf_ctx;
-#endif /* QCA_WIFI_2_0 */
// Load all config first as TL config is needed during vos_open
pHddCtx->cfg_ini = (hdd_config_t*) kmalloc(sizeof(hdd_config_t), GFP_KERNEL);
@@ -11572,9 +11390,6 @@ int hdd_wlan_startup(struct device *dev, v_VOID_t *hif_sc)
pHddCtx->current_intf_count=0;
pHddCtx->max_intf_count = CSR_ROAM_SESSION_MAX;
-#ifndef QCA_WIFI_2_0
- pHddCtx->cfg_ini->maxWoWFilters = WOWL_MAX_PTRNS_ALLOWED;
-#endif
/* INI has been read, initialise the configuredMcastBcastFilter with
* INI value as this will serve as the default value
*/
@@ -11699,16 +11514,6 @@ int hdd_wlan_startup(struct device *dev, v_VOID_t *hif_sc)
goto err_wdclose;
}
-#ifdef QCA_WIFI_ISOC
- status = vos_init_wiphy_from_nv_bin();
- if (!VOS_IS_STATUS_SUCCESS(status))
- {
- /* NV module cannot be initialized */
- hddLog( VOS_TRACE_LEVEL_FATAL,
- "%s: vos_init_wiphy failed", __func__);
- goto err_vos_nv_close;
- }
-#endif
#endif
status = vos_open( &pVosContext, 0);
@@ -11720,8 +11525,7 @@ int hdd_wlan_startup(struct device *dev, v_VOID_t *hif_sc)
wlan_hdd_update_wiphy(wiphy, pHddCtx->cfg_ini);
-#if defined(QCA_WIFI_2_0) && !defined(QCA_WIFI_ISOC) && \
- !defined(REMOVE_PKT_LOG)
+#if !defined(REMOVE_PKT_LOG)
hif_init_pdev_txrx_handle(hif_sc,
vos_get_context(VOS_MODULE_ID_TXRX, pVosContext));
#endif
@@ -11793,71 +11597,10 @@ int hdd_wlan_startup(struct device *dev, v_VOID_t *hif_sc)
}
// Get mac addr from platform driver
-#if defined(WLAN_AUTOGEN_MACADDR_FEATURE) && defined (QCA_WIFI_ISOC)
- ret = wcnss_get_wlan_mac_address((char*)&mac_addr.bytes);
-
- if ((0 == ret) && (!vos_is_macaddr_zero(&mac_addr)))
- {
- /* Store the mac addr for first interface */
- pHddCtx->cfg_ini->intfMacAddr[0] = mac_addr;
-
- hddLog(VOS_TRACE_LEVEL_ERROR,
- "%s: WLAN Mac Addr: "
- MAC_ADDRESS_STR, __func__,
- MAC_ADDR_ARRAY(pHddCtx->cfg_ini->intfMacAddr[0].bytes));
-
- /* Here, passing Arg2 as 1 because we do not want to change the
- last 3 bytes (means non OUI bytes) of first interface mac
- addr.
- */
- if (0 != hdd_generate_iface_mac_addr_auto(pHddCtx, 1, mac_addr))
- {
- hddLog(VOS_TRACE_LEVEL_ERROR,
- "%s: Failed to generate wlan interface mac addr "
- "using MAC from ini file ", __func__);
- }
- }
- else
-#endif // WLAN_AUTOGEN_MACADDR_FEATURE && QCA_WIFI_ISOC
if (VOS_STATUS_SUCCESS != hdd_update_config_from_nv(pHddCtx))
{
// Apply the NV to cfg.dat
/* Prima Update MAC address only at here */
-#if defined(WLAN_AUTOGEN_MACADDR_FEATURE) && defined (QCA_WIFI_ISOC)
- /* There was not a valid set of MAC Addresses in NV. See if the
- default addresses were modified by the cfg.ini settings. If so,
- we'll use them, but if not, we'll autogenerate a set of MAC
- addresses based upon the device serial number */
-
- static const v_MACADDR_t default_address =
- {{0x00, 0x0A, 0xF5, 0x89, 0x89, 0xFF}};
-
- if (0 == memcmp(&default_address, &pHddCtx->cfg_ini->intfMacAddr[0],
- sizeof(default_address)))
- {
- /* cfg.ini has the default address, invoke autogen logic */
-
- /* Here, passing Arg2 as 0 because we want to change the
- last 3 bytes (means non OUI bytes) of all the interfaces
- mac addr.
- */
- if (0 != hdd_generate_iface_mac_addr_auto(pHddCtx, 0,
- default_address))
- {
- hddLog(VOS_TRACE_LEVEL_ERROR,
- "%s: Failed to generate wlan interface mac addr "
- "using MAC from ini file " MAC_ADDRESS_STR, __func__,
- MAC_ADDR_ARRAY(pHddCtx->cfg_ini->intfMacAddr[0].bytes));
- }
- }
- else
- {
- hddLog(VOS_TRACE_LEVEL_ERROR,
- "%s: Invalid MAC address in NV, using MAC from ini file "
- MAC_ADDRESS_STR, __func__,
- MAC_ADDR_ARRAY(pHddCtx->cfg_ini->intfMacAddr[0].bytes));
- }
-#endif //WLAN_AUTOGEN_MACADDR_FEATURE && QCA_WIFI_ISOC
}
if ( VOS_STATUS_SUCCESS != hdd_update_mac_config( pHddCtx ) )
@@ -11918,9 +11661,7 @@ int hdd_wlan_startup(struct device *dev, v_VOID_t *hif_sc)
#ifndef CONFIG_ENABLE_LINUX_REG
wlan_hdd_cfg80211_update_reg_info( wiphy );
-#ifdef QCA_WIFI_2_0
wlan_hdd_cfg80211_update_wiphy_caps( wiphy );
-#endif
/* registration of wiphy dev with cfg80211 */
if (0 > wlan_hdd_cfg80211_register(wiphy))
@@ -11942,7 +11683,7 @@ int hdd_wlan_startup(struct device *dev, v_VOID_t *hif_sc)
hddLog(VOS_TRACE_LEVEL_FATAL,"%s: wlan_hdd_ftm_open Failed",__func__);
goto err_free_adf_context;
}
-#if defined(QCA_WIFI_2_0) && !defined(QCA_WIFI_ISOC) && defined(QCA_WIFI_FTM)
+#if defined(QCA_WIFI_FTM)
if (hdd_ftm_start(pHddCtx))
{
hddLog(VOS_TRACE_LEVEL_FATAL,"%s: hdd_ftm_start Failed",__func__);
@@ -11951,9 +11692,7 @@ int hdd_wlan_startup(struct device *dev, v_VOID_t *hif_sc)
#endif
vos_set_load_unload_in_progress(VOS_MODULE_ID_VOSS, FALSE);
hddLog(VOS_TRACE_LEVEL_FATAL,"%s: FTM driver loaded", __func__);
-#if defined(QCA_WIFI_2_0) && !defined(QCA_WIFI_ISOC)
complete(&wlan_start_comp);
-#endif
return VOS_STATUS_SUCCESS;
}
@@ -12018,7 +11757,6 @@ int hdd_wlan_startup(struct device *dev, v_VOID_t *hif_sc)
goto err_close_adapter;
}
-#ifdef QCA_WIFI_2_0
/* target hw version/revision would only be retrieved after firmware donwload */
hif_get_hw_info(hif_sc, &pHddCtx->target_hw_version,
@@ -12029,10 +11767,6 @@ int hdd_wlan_startup(struct device *dev, v_VOID_t *hif_sc)
/* pass target_fw_version to HIF layer */
hif_set_fw_info(hif_sc, pHddCtx->target_fw_version);
-#else
- /* Exchange capability info between Host and FW and also get versioning info from FW */
- hdd_exchange_version_and_caps(pHddCtx);
-#endif
if (country_code)
{
@@ -12173,7 +11907,6 @@ int hdd_wlan_startup(struct device *dev, v_VOID_t *hif_sc)
}
#ifdef FEATURE_OEM_DATA_SUPPORT
-#ifdef QCA_WIFI_2_0
//Initialize the OEM service
if (oem_activate_service(pHddCtx) != 0)
{
@@ -12182,7 +11915,6 @@ int hdd_wlan_startup(struct device *dev, v_VOID_t *hif_sc)
goto err_nl_srv;
}
#endif
-#endif
#ifdef PTT_SOCK_SVC_ENABLE
//Initialize the PTT service
@@ -12279,7 +12011,6 @@ int hdd_wlan_startup(struct device *dev, v_VOID_t *hif_sc)
wlan_hdd_cfg80211_nan_init(pHddCtx);
#endif
-#ifndef QCA_WIFI_ISOC
/* Thermal Mitigation */
thermalParam.smeThermalMgmtEnabled =
pHddCtx->cfg_ini->thermalMitigationEnable;
@@ -12325,7 +12056,6 @@ int hdd_wlan_startup(struct device *dev, v_VOID_t *hif_sc)
hddLog(VOS_TRACE_LEVEL_ERROR,
"%s: Error setting txlimit in sme", __func__);
}
-#endif /*#ifndef QCA_WIFI_ISOC*/
#ifdef MSM_PLATFORM
spin_lock_init(&pHddCtx->bus_bw_lock);
@@ -12353,9 +12083,7 @@ int hdd_wlan_startup(struct device *dev, v_VOID_t *hif_sc)
pHddCtx->target_hw_name);
#endif
-#if defined(QCA_WIFI_2_0) && !defined(QCA_WIFI_ISOC)
complete(&wlan_start_comp);
-#endif
goto success;
err_nl_srv:
@@ -12423,7 +12151,7 @@ err_wdclose:
if (VOS_FTM_MODE == hdd_get_conparam())
{
-#if defined(QCA_WIFI_2_0) && !defined(QCA_WIFI_ISOC) && defined(QCA_WIFI_FTM)
+#if defined(QCA_WIFI_FTM)
err_free_ftm_open:
wlan_hdd_ftm_close(pHddCtx);
#endif
@@ -12434,10 +12162,8 @@ err_config:
pHddCtx->cfg_ini= NULL;
err_free_adf_context:
-#ifdef QCA_WIFI_2_0
vos_mem_free(adf_ctx);
hif_deinit_adf_ctx(hif_sc);
-#endif
err_free_hdd_context:
hdd_allow_suspend();
@@ -12482,8 +12208,7 @@ static int hdd_driver_init( void)
{
VOS_STATUS status;
v_CONTEXT_t pVosContext = NULL;
-#if defined (QCA_WIFI_ISOC) || \
- defined (ANI_BUS_TYPE_PCI)
+#if defined (ANI_BUS_TYPE_PCI)
struct device *dev = NULL;
#endif
int ret_status = 0;
@@ -12535,13 +12260,6 @@ static int hdd_driver_init( void)
do {
-#ifdef QCA_WIFI_ISOC
- if (NULL == dev) {
- hddLog(VOS_TRACE_LEVEL_FATAL, "%s: WLAN device not found!!",__func__);
- ret_status = -1;
- break;
- }
-#endif
#ifndef MODULE
if (WLAN_IS_EPPING_ENABLED(con_mode)) {
@@ -12581,8 +12299,6 @@ static int hdd_driver_init( void)
hdd_set_conparam((v_UINT_t)con_mode);
#endif
-#if defined(QCA_WIFI_2_0) && \
- !defined(QCA_WIFI_ISOC)
#ifdef HIF_SDIO
#define WLAN_WAIT_TIME_WLANSTART 10000
#else
@@ -12616,19 +12332,7 @@ static int hdd_driver_init( void)
pr_info("%s: driver loaded\n", WLAN_MODULE_NAME);
return 0;
}
-#endif
-#ifdef QCA_WIFI_ISOC
- // Call our main init function
- if (hdd_wlan_startup(dev, NULL))
- {
- hddLog(VOS_TRACE_LEVEL_FATAL,"%s: WLAN Driver Initialization failed",
- __func__);
- vos_preClose( &pVosContext );
- ret_status = -1;
- break;
- }
-#endif
} while (0);
@@ -12702,9 +12406,7 @@ static void hdd_driver_exit(void)
{
hdd_context_t *pHddCtx = NULL;
int retry = 0;
-#ifndef QCA_WIFI_ISOC
adf_os_device_t adf_ctx;
-#endif
v_CONTEXT_t pVosContext = NULL;
pr_info("%s: unloading driver v%s\n", WLAN_MODULE_NAME, QWLAN_VERSIONSTR);
@@ -12754,10 +12456,6 @@ static void hdd_driver_exit(void)
vos_wait_for_work_thread_completion(__func__);
-#ifdef QCA_WIFI_ISOC
- //Do all the cleanup before deregistering the driver
- hdd_wlan_exit(pHddCtx);
-#else
hif_unregister_driver();
/*
@@ -12766,7 +12464,6 @@ static void hdd_driver_exit(void)
*/
adf_ctx = vos_get_context(VOS_MODULE_ID_ADF, pVosContext);
vos_mem_free(adf_ctx);
-#endif
vos_preClose( &pVosContext );
@@ -12809,7 +12506,7 @@ static int fwpath_changed_handler(const char *kmessage,
return param_set_copystring(kmessage, kp);
}
-#if !(defined(QCA_WIFI_2_0) && defined(QCA_WIFI_FTM) && !defined(QCA_WIFI_ISOC))
+#if ! defined(QCA_WIFI_FTM)
static int con_mode_handler(const char *kmessage,
struct kernel_param *kp)
{
@@ -12869,7 +12566,7 @@ static int fwpath_changed_handler(const char *kmessage,
return ret;
}
-#if !(defined(QCA_WIFI_2_0) && defined(QCA_WIFI_FTM) && !defined(QCA_WIFI_ISOC))
+#if ! defined(QCA_WIFI_FTM)
/**---------------------------------------------------------------------------
\brief con_mode_handler() -
@@ -14107,7 +13804,7 @@ MODULE_LICENSE("Dual BSD/GPL");
MODULE_AUTHOR("Qualcomm Atheros, Inc.");
MODULE_DESCRIPTION("WLAN HOST DEVICE DRIVER");
-#if defined(QCA_WIFI_2_0) && defined(QCA_WIFI_FTM) && !defined(QCA_WIFI_ISOC)
+#if defined(QCA_WIFI_FTM)
module_param(con_mode, int, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH);
#else
module_param_call(con_mode, con_mode_handler, param_get_int, &con_mode,
diff --git a/CORE/HDD/src/wlan_hdd_oemdata.c b/CORE/HDD/src/wlan_hdd_oemdata.c
index 04ca34ac388a..71aa9adbf5fc 100644
--- a/CORE/HDD/src/wlan_hdd_oemdata.c
+++ b/CORE/HDD/src/wlan_hdd_oemdata.c
@@ -45,9 +45,7 @@
#include <net/arp.h>
#include "qwlan_version.h"
-#ifdef QCA_WIFI_2_0
static struct hdd_context_s *pHddCtx;
-#endif /* QCA_WIFI_2_0 */
/*---------------------------------------------------------------------------------------------
@@ -249,7 +247,6 @@ int iw_set_oem_data_req(
return rc;
}
-#ifdef QCA_WIFI_2_0
/* Forward declaration */
static int oem_msg_callback(struct sk_buff *skb);
@@ -1053,5 +1050,4 @@ int oem_msg_callback(struct sk_buff *skb)
return 0;
}
-#endif /* QCA_WIFI_2_0 */
#endif
diff --git a/CORE/HDD/src/wlan_hdd_p2p.c b/CORE/HDD/src/wlan_hdd_p2p.c
index db0e6c822325..556983f693a5 100644
--- a/CORE/HDD/src/wlan_hdd_p2p.c
+++ b/CORE/HDD/src/wlan_hdd_p2p.c
@@ -1821,13 +1821,11 @@ struct net_device* __wlan_hdd_add_virtual_intf(
/*Allow addition multiple interface for WLAN_HDD_P2P_CLIENT and
WLAN_HDD_SOFTAP session type*/
if ((hdd_get_adapter(pHddCtx, wlan_hdd_get_session_type(type)) != NULL)
-#ifdef QCA_WIFI_2_0
#ifdef WLAN_FEATURE_MBSSID
&& WLAN_HDD_SOFTAP != wlan_hdd_get_session_type(type)
#endif
&& WLAN_HDD_P2P_CLIENT != wlan_hdd_get_session_type(type)
&& WLAN_HDD_INFRA_STATION != wlan_hdd_get_session_type(type)
-#endif
)
{
hddLog(VOS_TRACE_LEVEL_ERROR,"%s: Interface type %d already exists. "
diff --git a/CORE/HDD/src/wlan_hdd_softap_tx_rx.c b/CORE/HDD/src/wlan_hdd_softap_tx_rx.c
index 19f8f1f464bd..85925a430634 100644
--- a/CORE/HDD/src/wlan_hdd_softap_tx_rx.c
+++ b/CORE/HDD/src/wlan_hdd_softap_tx_rx.c
@@ -253,215 +253,6 @@ static VOS_STATUS hdd_softap_flush_tx_queues( hdd_adapter_t *pAdapter )
return status;
}
-#ifndef QCA_WIFI_2_0
-/**============================================================================
- @brief hdd_softap_hard_start_xmit() - Function registered with the Linux OS for
- transmitting packets. There are 2 versions of this function. One that uses
- locked queue and other that uses lockless queues. Both have been retained to
- do some performance testing
-
- @param skb : [in] pointer to OS packet (sk_buff)
- @param dev : [in] pointer to Libra network device
-
- @return : NET_XMIT_DROP if packets are dropped
- : NET_XMIT_SUCCESS if packet is enqueued succesfully
- ===========================================================================*/
-int hdd_softap_hard_start_xmit(struct sk_buff *skb, struct net_device *dev)
-{
- VOS_STATUS status;
- WLANTL_ACEnumType ac = WLANTL_AC_BE;
- sme_QosWmmUpType up = SME_QOS_WMM_UP_BE;
- skb_list_node_t *pktNode = NULL;
- v_SIZE_t pktListSize = 0;
- v_BOOL_t txSuspended = VOS_FALSE;
- hdd_adapter_t *pAdapter = (hdd_adapter_t *)netdev_priv(dev);
- hdd_ap_ctx_t *pHddApCtx = WLAN_HDD_GET_AP_CTX_PTR(pAdapter);
- vos_list_node_t *anchor = NULL;
- v_U8_t STAId = WLAN_MAX_STA_COUNT;
- //Extract the destination address from ethernet frame
- v_MACADDR_t *pDestMacAddress = (v_MACADDR_t*)skb->data;
- int os_status = NETDEV_TX_OK;
-
- pDestMacAddress = (v_MACADDR_t*)skb->data;
-
- ++pAdapter->hdd_stats.hddTxRxStats.txXmitCalled;
-
- VOS_TRACE( VOS_MODULE_ID_HDD_SAP_DATA, VOS_TRACE_LEVEL_INFO,
- "%s: enter", __func__);
-
- spin_lock_bh( &pAdapter->staInfo_lock );
- if (vos_is_macaddr_broadcast( pDestMacAddress ) || vos_is_macaddr_group(pDestMacAddress))
- {
- //The BC/MC station ID is assigned during BSS starting phase. SAP will return the station
- //ID used for BC/MC traffic. The station id is registered to TL as well.
- STAId = pHddApCtx->uBCStaId;
-
- /* Setting priority for broadcast packets which doesn't go to select_queue function */
- skb->priority = SME_QOS_WMM_UP_BE;
- skb->queue_mapping = HDD_LINUX_AC_BE;
-
- VOS_TRACE( VOS_MODULE_ID_HDD_SAP_DATA, VOS_TRACE_LEVEL_INFO_LOW,
- "%s: BC/MC packet", __func__);
- }
- else
- {
- STAId = *(v_U8_t *)(((v_U8_t *)(skb->data)) - 1);
- if (STAId == HDD_WLAN_INVALID_STA_ID)
- {
- VOS_TRACE( VOS_MODULE_ID_HDD_SAP_DATA, VOS_TRACE_LEVEL_WARN,
- "%s: Failed to find right station", __func__);
- ++pAdapter->stats.tx_dropped;
- ++pAdapter->hdd_stats.hddTxRxStats.txXmitDropped;
- kfree_skb(skb);
- goto xmit_done;
- }
- else if (FALSE == pAdapter->aStaInfo[STAId].isUsed )
- {
- VOS_TRACE( VOS_MODULE_ID_HDD_SAP_DATA, VOS_TRACE_LEVEL_WARN,
- "%s: STA %d is unregistered", __func__, STAId);
- ++pAdapter->stats.tx_dropped;
- ++pAdapter->hdd_stats.hddTxRxStats.txXmitDropped;
- kfree_skb(skb);
- goto xmit_done;
- }
-
- if ( (WLANTL_STA_CONNECTED != pAdapter->aStaInfo[STAId].tlSTAState) &&
- (WLANTL_STA_AUTHENTICATED != pAdapter->aStaInfo[STAId].tlSTAState) )
- {
- VOS_TRACE( VOS_MODULE_ID_HDD_SAP_DATA, VOS_TRACE_LEVEL_WARN,
- "%s: Station not connected yet", __func__);
- ++pAdapter->stats.tx_dropped;
- ++pAdapter->hdd_stats.hddTxRxStats.txXmitDropped;
- kfree_skb(skb);
- goto xmit_done;
- }
- else if(WLANTL_STA_CONNECTED == pAdapter->aStaInfo[STAId].tlSTAState)
- {
- if(ntohs(skb->protocol) != HDD_ETHERTYPE_802_1_X)
- {
- VOS_TRACE( VOS_MODULE_ID_HDD_SAP_DATA, VOS_TRACE_LEVEL_WARN,
- "%s: NON-EAPOL packet in non-Authenticated state", __func__);
- ++pAdapter->stats.tx_dropped;
- ++pAdapter->hdd_stats.hddTxRxStats.txXmitDropped;
- kfree_skb(skb);
- goto xmit_done;
- }
- }
- }
-
- //Get TL AC corresponding to Qdisc queue index/AC.
- ac = hdd_QdiscAcToTlAC[skb->queue_mapping];
- //user priority from IP header, which is already extracted and set from
- //select_queue call back function
- up = skb->priority;
- ++pAdapter->hdd_stats.hddTxRxStats.txXmitClassifiedAC[ac];
-
- VOS_TRACE( VOS_MODULE_ID_HDD_SAP_DATA, VOS_TRACE_LEVEL_INFO,
- "%s: Classified as ac %d up %d", __func__, ac, up);
-
- // If the memory differentiation mode is enabled, the memory limit of each queue will be
- // checked. Over-limit packets will be dropped.
- spin_lock_bh(&pAdapter->aStaInfo[STAId].wmm_tx_queue[ac].lock);
- hdd_list_size(&pAdapter->aStaInfo[STAId].wmm_tx_queue[ac], &pktListSize);
- if(pktListSize >= pAdapter->aTxQueueLimit[ac])
- {
- VOS_TRACE( VOS_MODULE_ID_HDD_SAP_DATA, VOS_TRACE_LEVEL_WARN,
- "%s: station %d ac %d queue over limit %d", __func__, STAId, ac, pktListSize);
- pAdapter->aStaInfo[STAId].txSuspended[ac] = VOS_TRUE;
- netif_stop_subqueue(dev, skb_get_queue_mapping(skb));
- txSuspended = VOS_TRUE;
- }
-
- /* If 3/4th of the max queue size is used then enable the flag.
- * This flag indicates to place the DHCP packets in VOICE AC queue.*/
- if (WLANTL_AC_BE == ac)
- {
- if (pAdapter->aStaInfo[STAId].wmm_tx_queue[ac].count >= HDD_TX_QUEUE_LOW_WATER_MARK)
- {
- VOS_TRACE( VOS_MODULE_ID_HDD_SAP_DATA, VOS_TRACE_LEVEL_WARN,
- "%s: TX queue for Best Effort AC is 3/4th full", __func__);
- pAdapter->aStaInfo[STAId].vosLowResource = VOS_TRUE;
- }
- else
- {
- pAdapter->aStaInfo[STAId].vosLowResource = VOS_FALSE;
- }
- }
- spin_unlock_bh(&pAdapter->aStaInfo[STAId].wmm_tx_queue[ac].lock);
-
- if (VOS_TRUE == txSuspended)
- {
- VOS_TRACE( VOS_MODULE_ID_HDD_SAP_DATA, VOS_TRACE_LEVEL_WARN,
- "%s: TX queue full for AC=%d Disable OS TX queue",
- __func__, ac );
- os_status = NETDEV_TX_BUSY;
- goto xmit_done;
- }
-
- //Use the skb->cb field to hold the list node information
- pktNode = (skb_list_node_t *)&skb->cb;
-
- //Stick the OS packet inside this node.
- pktNode->skb = skb;
-
- //Stick the User Priority inside this node
- pktNode->userPriority = up;
-
- INIT_LIST_HEAD(&pktNode->anchor);
-
- spin_lock_bh(&pAdapter->aStaInfo[STAId].wmm_tx_queue[ac].lock);
- status = hdd_list_insert_back_size(&pAdapter->aStaInfo[STAId].wmm_tx_queue[ac], &pktNode->anchor, &pktListSize );
- spin_unlock_bh(&pAdapter->aStaInfo[STAId].wmm_tx_queue[ac].lock);
-
- if ( !VOS_IS_STATUS_SUCCESS( status ) )
- {
- VOS_TRACE( VOS_MODULE_ID_HDD_SAP_DATA, VOS_TRACE_LEVEL_WARN,
- "%s:Insert Tx queue failed. Pkt dropped", __func__);
- ++pAdapter->hdd_stats.hddTxRxStats.txXmitDropped;
- ++pAdapter->hdd_stats.hddTxRxStats.txXmitDroppedAC[ac];
- ++pAdapter->stats.tx_dropped;
- kfree_skb(skb);
- goto xmit_done;
- }
-
- ++pAdapter->hdd_stats.hddTxRxStats.txXmitQueued;
- ++pAdapter->hdd_stats.hddTxRxStats.txXmitQueuedAC[ac];
- ++pAdapter->hdd_stats.hddTxRxStats.pkt_tx_count;
-
- if (1 == pktListSize)
- {
- //Let TL know we have a packet to send for this AC
- status = WLANTL_STAPktPending( (WLAN_HDD_GET_CTX(pAdapter))->pvosContext, STAId, ac );
-
- if ( !VOS_IS_STATUS_SUCCESS( status ) )
- {
- VOS_TRACE( VOS_MODULE_ID_HDD_SAP_DATA, VOS_TRACE_LEVEL_WARN,
- "%s: Failed to signal TL for AC=%d STAId =%d",
- __func__, ac, STAId );
-
- //Remove the packet from queue. It must be at the back of the queue, as TX thread cannot preempt us in the middle
- //as we are in a soft irq context. Also it must be the same packet that we just allocated.
- spin_lock_bh(&pAdapter->aStaInfo[STAId].wmm_tx_queue[ac].lock);
- status = hdd_list_remove_back( &pAdapter->aStaInfo[STAId].wmm_tx_queue[ac], &anchor);
- spin_unlock_bh(&pAdapter->aStaInfo[STAId].wmm_tx_queue[ac].lock);
- ++pAdapter->stats.tx_dropped;
- ++pAdapter->hdd_stats.hddTxRxStats.txXmitDropped;
- ++pAdapter->hdd_stats.hddTxRxStats.txXmitDroppedAC[ac];
- kfree_skb(skb);
- goto xmit_done;
- }
- }
- dev->trans_start = jiffies;
-
- VOS_TRACE( VOS_MODULE_ID_HDD_SAP_DATA, VOS_TRACE_LEVEL_INFO_LOW,
- "%s: exit", __func__);
-
-xmit_done:
- spin_unlock_bh( &pAdapter->staInfo_lock );
- return os_status;
-}
-
-#else
#ifdef QCA_LL_TX_FLOW_CT
/**============================================================================
@@ -726,7 +517,6 @@ drop_pkt:
return NETDEV_TX_OK;
}
-#endif
/**============================================================================
@brief hdd_softap_sta_2_sta_xmit This function for Transmitting the frames when the traffic is between two stations.
@@ -1540,202 +1330,6 @@ VOS_STATUS hdd_softap_tx_low_resource_cbk( vos_pkt_t *pVosPacket,
}
-#ifndef QCA_WIFI_2_0
-/**============================================================================
- @brief hdd_softap_rx_packet_cbk() - Receive callback registered with TL.
- TL will call this to notify the HDD when one or more packets were
- received for a registered STA.
-
- @param vosContext : [in] pointer to VOS context
- @param pVosPacketChain : [in] pointer to VOS packet chain
- @param staId : [in] Station Id (Adress 1 Index)
- @param pRxMetaInfo : [in] pointer to meta info for the received pkt(s).
-
- @return : VOS_STATUS_E_FAILURE if any errors encountered,
- : VOS_STATUS_SUCCESS otherwise
- ===========================================================================*/
-VOS_STATUS hdd_softap_rx_packet_cbk( v_VOID_t *vosContext,
- vos_pkt_t *pVosPacketChain,
- v_U8_t staId,
- WLANTL_RxMetaInfoType* pRxMetaInfo )
-{
- hdd_adapter_t *pAdapter = NULL;
- VOS_STATUS status = VOS_STATUS_E_FAILURE;
- int rxstat;
- struct sk_buff *skb = NULL;
- vos_pkt_t* pVosPacket;
- vos_pkt_t* pNextVosPacket;
- hdd_context_t *pHddCtx = NULL;
- hdd_ap_ctx_t *pHddApCtx;
-
- //Sanity check on inputs
- if ( ( NULL == vosContext ) ||
- ( NULL == pVosPacketChain ) ||
- ( NULL == pRxMetaInfo ) )
- {
- VOS_TRACE( VOS_MODULE_ID_HDD_SAP_DATA, VOS_TRACE_LEVEL_ERROR,
- "%s: Null params being passed", __func__);
- return VOS_STATUS_E_FAILURE;
- }
-
- pHddCtx = (hdd_context_t *)vos_get_context( VOS_MODULE_ID_HDD, vosContext );
- if ( NULL == pHddCtx )
- {
- VOS_TRACE( VOS_MODULE_ID_HDD_SAP_DATA, VOS_TRACE_LEVEL_ERROR,
- "%s: HDD adapter context is Null", __func__);
- return VOS_STATUS_E_FAILURE;
- }
-
- pAdapter = pHddCtx->sta_to_adapter[staId];
- if( NULL == pAdapter )
- {
- VOS_ASSERT(0);
- return VOS_STATUS_E_FAILURE;
- }
-
- /* Monitor traffic */
- if ( pHddCtx->cfg_ini->enableTrafficMonitor )
- {
- pHddCtx->traffic_monitor.lastFrameTs = vos_timer_get_system_time();
- if ( !atomic_read(&pHddCtx->traffic_monitor.isActiveMode) )
- {
- vos_lock_acquire(&pHddCtx->traffic_monitor.trafficLock);
- /* It was IDLE mode,
- * this is new state, then switch mode from suspend to resume */
- if ( !atomic_read(&pHddCtx->traffic_monitor.isActiveMode) )
- {
- hdd_set_wlan_suspend_mode(0);
- vos_timer_start(&pHddCtx->traffic_monitor.trafficTimer,
- pHddCtx->cfg_ini->trafficIdleTimeout);
- atomic_set(&pHddCtx->traffic_monitor.isActiveMode, 1);
- }
- vos_lock_release(&pHddCtx->traffic_monitor.trafficLock);
- }
- }
-
- ++pAdapter->hdd_stats.hddTxRxStats.rxChains;
-
- // walk the chain until all are processed
- pVosPacket = pVosPacketChain;
- do
- {
- // get the pointer to the next packet in the chain
- // (but don't unlink the packet since we free the entire chain later)
- status = vos_pkt_walk_packet_chain( pVosPacket, &pNextVosPacket, VOS_FALSE);
-
- // both "success" and "empty" are acceptable results
- if (!((status == VOS_STATUS_SUCCESS) || (status == VOS_STATUS_E_EMPTY)))
- {
- ++pAdapter->hdd_stats.hddTxRxStats.rxDropped;
- VOS_TRACE( VOS_MODULE_ID_HDD_SAP_DATA, VOS_TRACE_LEVEL_ERROR,
- "%s: Failure walking packet chain", __func__);
- return VOS_STATUS_E_FAILURE;
- }
-
- // Extract the OS packet (skb).
- // Tell VOS to detach the OS packet from the VOS packet
- status = vos_pkt_get_os_packet( pVosPacket, (v_VOID_t **)&skb, VOS_TRUE );
- if(!VOS_IS_STATUS_SUCCESS( status ))
- {
- ++pAdapter->hdd_stats.hddTxRxStats.rxDropped;
- VOS_TRACE( VOS_MODULE_ID_HDD_SAP_DATA, VOS_TRACE_LEVEL_ERROR,
- "%s: Failure extracting skb from vos pkt", __func__);
- return VOS_STATUS_E_FAILURE;
- }
-
- //hdd_softap_dump_sk_buff(skb);
-
- skb->dev = pAdapter->dev;
-
- if(skb->dev == NULL) {
-
- VOS_TRACE( VOS_MODULE_ID_HDD_SAP_DATA, VOS_TRACE_LEVEL_FATAL,
- "ERROR!!Invalid netdevice");
- return VOS_STATUS_E_FAILURE;
- }
- ++pAdapter->hdd_stats.hddTxRxStats.rxPackets;
- ++pAdapter->stats.rx_packets;
- pAdapter->stats.rx_bytes += skb->len;
-
- pHddApCtx = WLAN_HDD_GET_AP_CTX_PTR(pAdapter);
-
- if (WLAN_RX_BCMC_STA_ID == pRxMetaInfo->ucDesSTAId)
- {
- //MC/BC packets. Duplicate a copy of packet
- struct sk_buff *pSkbCopy;
-
- if (!(pHddApCtx->apDisableIntraBssFwd))
- {
- pSkbCopy = skb_copy(skb, GFP_ATOMIC);
- if (pSkbCopy)
- {
- hdd_softap_sta_2_sta_xmit(pSkbCopy, pSkbCopy->dev,
- pHddApCtx->uBCStaId, (pRxMetaInfo->ucUP));
- }
- else
- {
- VOS_TRACE(VOS_MODULE_ID_HDD_SAP_DATA, VOS_TRACE_LEVEL_ERROR,
- "%s: skb allocation fails", __func__);
- }
- }
-
- } //(WLAN_RX_BCMC_STA_ID == staId)
-
- if ((WLAN_RX_BCMC_STA_ID == pRxMetaInfo->ucDesSTAId) ||
-#ifdef WLAN_FEATURE_MBSSID
- (pHddApCtx->uBCStaId == pRxMetaInfo->ucDesSTAId))
-#else
- (WLAN_RX_SAP_SELF_STA_ID == pRxMetaInfo->ucDesSTAId))
-#endif
- {
- VOS_TRACE( VOS_MODULE_ID_HDD_SAP_DATA, VOS_TRACE_LEVEL_INFO_LOW,
- "%s: send one packet to kernel", __func__);
-
- skb->protocol = eth_type_trans(skb, skb->dev);
- skb->ip_summed = CHECKSUM_NONE;
-#ifdef WLAN_FEATURE_HOLD_RX_WAKELOCK
- vos_wake_lock_timeout_acquire(&pHddCtx->rx_wake_lock,
- HDD_WAKE_LOCK_DURATION);
-#endif
- rxstat = netif_rx_ni(skb);
- if (NET_RX_SUCCESS == rxstat)
- {
- ++pAdapter->hdd_stats.hddTxRxStats.rxDelivered;
- ++pAdapter->hdd_stats.hddTxRxStats.pkt_rx_count;
- }
- else
- {
- ++pAdapter->hdd_stats.hddTxRxStats.rxRefused;
- }
- }
- else if ((WLAN_HDD_GET_AP_CTX_PTR(pAdapter))->apDisableIntraBssFwd)
- {
- kfree_skb(skb);
- }
- else
- {
- //loopback traffic
- status = hdd_softap_sta_2_sta_xmit(skb, skb->dev,
- pRxMetaInfo->ucDesSTAId, (pRxMetaInfo->ucUP));
- }
-
- // now process the next packet in the chain
- pVosPacket = pNextVosPacket;
-
- } while (pVosPacket);
-
- //Return the entire VOS packet chain to the resource pool
- status = vos_pkt_return_packet( pVosPacketChain );
- if(!VOS_IS_STATUS_SUCCESS( status ))
- {
- VOS_TRACE( VOS_MODULE_ID_HDD_SAP_DATA, VOS_TRACE_LEVEL_ERROR,"%s: Failure returning vos pkt", __func__);
- }
-
- pAdapter->dev->last_rx = jiffies;
-
- return status;
-}
-#else
/**============================================================================
@brief hdd_softap_rx_packet_cbk() - Receive callback registered with TL.
@@ -1875,15 +1469,12 @@ VOS_STATUS hdd_softap_rx_mul_packet_cbk(v_VOID_t *vosContext,
return VOS_STATUS_SUCCESS;
}
#endif /* IPA_OFFLOAD */
-#endif
VOS_STATUS hdd_softap_DeregisterSTA( hdd_adapter_t *pAdapter, tANI_U8 staId )
{
VOS_STATUS vosStatus = VOS_STATUS_SUCCESS;
hdd_context_t *pHddCtx;
-#ifdef QCA_WIFI_2_0
v_U8_t i;
-#endif
if (NULL == pAdapter)
{
@@ -1911,7 +1502,6 @@ VOS_STATUS hdd_softap_DeregisterSTA( hdd_adapter_t *pAdapter, tANI_U8 staId )
staId, vosStatus, vosStatus );
}
-#ifdef QCA_WIFI_2_0
if (pAdapter->aStaInfo[staId].isUsed) {
spin_lock_bh( &pAdapter->staInfo_lock );
vos_mem_zero(&pAdapter->aStaInfo[staId], sizeof(hdd_station_info_t));
@@ -1926,17 +1516,6 @@ VOS_STATUS hdd_softap_DeregisterSTA( hdd_adapter_t *pAdapter, tANI_U8 staId )
}
spin_unlock_bh( &pAdapter->staInfo_lock );
}
-#else
- vosStatus = hdd_softap_deinit_tx_rx_sta ( pAdapter, staId );
- if( VOS_STATUS_E_FAILURE == vosStatus )
- {
- VOS_TRACE ( VOS_MODULE_ID_HDD_SAP_DATA, VOS_TRACE_LEVEL_ERROR,
- "hdd_softap_deinit_tx_rx_sta() failed for staID %d. "
- "Status = %d [0x%08X]",
- staId, vosStatus, vosStatus );
- return( vosStatus );
- }
-#endif
pHddCtx->sta_to_adapter[staId] = NULL;
return( vosStatus );
diff --git a/CORE/HDD/src/wlan_hdd_tdls.c b/CORE/HDD/src/wlan_hdd_tdls.c
index 85fe6488e5c3..c19fee624f3d 100644
--- a/CORE/HDD/src/wlan_hdd_tdls.c
+++ b/CORE/HDD/src/wlan_hdd_tdls.c
@@ -88,7 +88,6 @@ void wlan_hdd_tdls_pre_setup_init_work(tdlsCtx_t * pHddTdlsCtx,
if (TDLS_CTX_MAGIC != pHddTdlsCtx->magic)
{
-#ifdef QCA_WIFI_2_0
/* When TDLS discovery attempt for a peer reaches to max configured
* threshold then tdls support for that peer would be disabled and
* in that case, ignore discovery trigger from FW for that peer.
@@ -101,7 +100,6 @@ void wlan_hdd_tdls_pre_setup_init_work(tdlsCtx_t * pHddTdlsCtx,
__func__, MAC_ADDR_ARRAY(curr_candidate->peerMac));
return;
}
-#endif /* QCA_WIFI_2_0 */
pHddTdlsCtx->curr_candidate = curr_candidate;
pHddTdlsCtx->magic = TDLS_CTX_MAGIC;
@@ -278,246 +276,7 @@ done:
}
#endif /* TDLS_USE_SEPARATE_DISCOVERY_TIMER */
-#ifndef QCA_WIFI_2_0
-static v_VOID_t wlan_hdd_tdls_update_peer_cb( v_PVOID_t userData )
-{
- int i;
- struct list_head *head;
- struct list_head *pos;
- hddTdlsPeer_t *curr_peer;
- tdlsCtx_t *pHddTdlsCtx = (tdlsCtx_t *)userData;
- hdd_context_t *pHddCtx;
-
- if ((NULL == pHddTdlsCtx) || (NULL == pHddTdlsCtx->pAdapter))
- {
- VOS_TRACE(VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_ERROR,
- FL("pHddTdlsCtx or pAdapter points to NULL"));
- return;
- }
-
- pHddCtx = WLAN_HDD_GET_CTX( pHddTdlsCtx->pAdapter );
- if (0 != (wlan_hdd_validate_context(pHddCtx)))
- {
- VOS_TRACE(VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_ERROR,
- FL("pHddCtx is not valid"));
- return;
- }
-
- if (NULL == pHddCtx)
- return;
-
- mutex_lock(&pHddCtx->tdls_lock);
-
- for (i = 0; i < 256; i++) {
- head = &pHddTdlsCtx->peer_list[i];
-
- list_for_each (pos, head) {
- curr_peer = list_entry (pos, hddTdlsPeer_t, node);
-
- VOS_TRACE( VOS_MODULE_ID_HDD, TDLS_LOG_LEVEL,
- "%s: " MAC_ADDRESS_STR " link_status %d"
- " tdls_support %d", __func__, MAC_ADDR_ARRAY(curr_peer->peerMac),
- curr_peer->link_status, curr_peer->tdls_support);
-
- if (eTDLS_CAP_SUPPORTED == curr_peer->tdls_support) {
- VOS_TRACE( VOS_MODULE_ID_HDD, TDLS_LOG_LEVEL,
- "tx %d, rx %d (thr.pkt %d/idle %d), rssi %d (thr.trig %d/hys %d/tear %d)",
- curr_peer->tx_pkt, curr_peer->rx_pkt,
- pHddTdlsCtx->threshold_config.tx_packet_n,
- pHddTdlsCtx->threshold_config.idle_packet_n,
- curr_peer->rssi,
- pHddTdlsCtx->threshold_config.rssi_trigger_threshold,
- pHddTdlsCtx->threshold_config.rssi_hysteresis,
- pHddTdlsCtx->threshold_config.rssi_teardown_threshold);
-
- if ((eTDLS_LINK_IDLE == curr_peer->link_status) ||
- (eTDLS_LINK_DISCOVERING == curr_peer->link_status)){
-
- if (pHddCtx->cfg_ini->fTDLSExternalControl &&
- (FALSE == curr_peer->isForcedPeer)) {
- continue;
- }
-
- if (curr_peer->tx_pkt >=
- pHddTdlsCtx->threshold_config.tx_packet_n) {
-
- if (pHddCtx->max_num_tdls_sta > wlan_hdd_tdlsConnectedPeers(pHddTdlsCtx->pAdapter))
- {
-
- VOS_TRACE( VOS_MODULE_ID_HDD, TDLS_LOG_LEVEL, "Tput trigger TDLS pre-setup");
-#ifdef CONFIG_TDLS_IMPLICIT
- wlan_hdd_tdls_pre_setup_init_work(pHddTdlsCtx, curr_peer);
-#endif
- }
- else
- {
- VOS_TRACE( VOS_MODULE_ID_HDD, TDLS_LOG_LEVEL,
- "%s: Maximum peer connected already! %d",
- __func__, wlan_hdd_tdlsConnectedPeers(pHddTdlsCtx->pAdapter) );
- }
- goto next_peer;
- }
- }
- else if (eTDLS_LINK_CONNECTED == curr_peer->link_status) {
- if ((tANI_S32)curr_peer->rssi <
- (tANI_S32)pHddTdlsCtx->threshold_config.rssi_teardown_threshold) {
-
- VOS_TRACE( VOS_MODULE_ID_HDD,
- VOS_TRACE_LEVEL_WARN,
- "Tear down - low RSSI: " MAC_ADDRESS_STR "!",
- MAC_ADDR_ARRAY(curr_peer->peerMac));
-#ifdef CONFIG_TDLS_IMPLICIT
- wlan_hdd_tdls_indicate_teardown(pHddTdlsCtx->pAdapter,
- curr_peer,
- eSIR_MAC_TDLS_TEARDOWN_UNSPEC_REASON);
-#endif
- goto next_peer;
- }
-
- /* Only teardown based on non zero idle packet threshold, to address a use
- * case where this threshold does not get consider for TEAR DOWN.
- */
-
- if (( 0 != pHddTdlsCtx->threshold_config.idle_packet_n ) &&
- ((curr_peer->tx_pkt <
- pHddTdlsCtx->threshold_config.idle_packet_n) &&
- (curr_peer->rx_pkt <
- pHddTdlsCtx->threshold_config.idle_packet_n))) {
- if (VOS_TIMER_STATE_RUNNING !=
- vos_timer_getCurrentState(&curr_peer->peerIdleTimer)) {
- VOS_TRACE(VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_WARN,
- "Tx/Rx Idle timer start: " MAC_ADDRESS_STR "!",
- MAC_ADDR_ARRAY(curr_peer->peerMac));
- wlan_hdd_tdls_timer_restart(pHddTdlsCtx->pAdapter,
- &curr_peer->peerIdleTimer,
- pHddTdlsCtx->threshold_config.idle_timeout_t);
- }
- } else {
- if (VOS_TIMER_STATE_RUNNING ==
- vos_timer_getCurrentState(&curr_peer->peerIdleTimer)) {
- VOS_TRACE(VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_WARN,
- "Tx/Rx Idle timer stop: " MAC_ADDRESS_STR "!",
- MAC_ADDR_ARRAY(curr_peer->peerMac));
- vos_timer_stop( &curr_peer->peerIdleTimer);
- }
- }
-
-// if (curr_peer->rssi <
-// (pHddTdlsCtx->threshold_config.rssi_hysteresis +
-// pHddTdlsCtx->ap_rssi)) {
-//
-//#ifdef CONFIG_TDLS_IMPLICIT
-// cfg80211_tdls_oper_request(pHddTdlsCtx->dev,
-// curr_peer->peerMac,
-// NL80211_TDLS_TEARDOWN, FALSE,
-// GFP_KERNEL);
-//#endif
-// }
- }
- } else if (eTDLS_CAP_UNKNOWN == curr_peer->tdls_support) {
-
- if (pHddCtx->cfg_ini->fTDLSExternalControl &&
- (FALSE == curr_peer->isForcedPeer)) {
- continue;
- }
- if (!TDLS_IS_CONNECTED(curr_peer)) {
- if (curr_peer->tx_pkt >=
- pHddTdlsCtx->threshold_config.tx_packet_n) {
-
- if (curr_peer->discovery_attempt++ <
- pHddTdlsCtx->threshold_config.discovery_tries_n) {
- VOS_TRACE( VOS_MODULE_ID_HDD, TDLS_LOG_LEVEL, "TDLS UNKNOWN discover ");
-#ifdef CONFIG_TDLS_IMPLICIT
- wlan_hdd_tdls_pre_setup_init_work(pHddTdlsCtx, curr_peer);
-#endif
- }
- else
- {
- curr_peer->tdls_support = eTDLS_CAP_NOT_SUPPORTED;
- curr_peer->link_status = eTDLS_LINK_IDLE;
- }
- }
- }
- }
-
-next_peer:
- curr_peer->tx_pkt = 0;
- curr_peer->rx_pkt = 0;
- }
- }
-
- wlan_hdd_tdls_timer_restart(pHddTdlsCtx->pAdapter,
- &pHddTdlsCtx->peerUpdateTimer,
- pHddTdlsCtx->threshold_config.tx_period_t);
- mutex_unlock(&pHddCtx->tdls_lock);
-}
-#endif
-
-#ifndef QCA_WIFI_2_0
-static v_VOID_t wlan_hdd_tdls_idle_cb( v_PVOID_t userData )
-{
-#ifdef CONFIG_TDLS_IMPLICIT
- hddTdlsPeer_t *curr_peer = (hddTdlsPeer_t *)userData;
- tdlsCtx_t *pHddTdlsCtx;
- hdd_context_t *pHddCtx;
-
- if (NULL == curr_peer)
- {
- VOS_TRACE(VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_ERROR,
- FL("Invalid tdls idle timer expired"));
- return;
- }
-
- pHddTdlsCtx = curr_peer->pHddTdlsCtx;
- if ((NULL == pHddTdlsCtx) || (NULL == pHddTdlsCtx->pAdapter) )
- {
- VOS_TRACE(VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_ERROR,
- FL("pHddTdlsCtx or pAdapter points to NULL"));
- return;
- }
-
- pHddCtx = WLAN_HDD_GET_CTX( pHddTdlsCtx->pAdapter );
- if (0 != (wlan_hdd_validate_context(pHddCtx)))
- {
- VOS_TRACE(VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_ERROR,
- FL("pHddCtx is not valid"));
- return;
- }
- VOS_TRACE(VOS_MODULE_ID_HDD, TDLS_LOG_LEVEL,
- "%s: Tx/Rx Idle " MAC_ADDRESS_STR " tx_pkt: %d, rx_pkt: %d, idle_packet_n: %d",
- __func__, MAC_ADDR_ARRAY(curr_peer->peerMac),
- curr_peer->tx_pkt,
- curr_peer->rx_pkt,
- curr_peer->pHddTdlsCtx->threshold_config.idle_packet_n);
-
- mutex_lock(&pHddCtx->tdls_lock);
-
- /* Check tx/rx statistics on this tdls link for recent activities and
- * then decide whether to tear down the link or keep it.
- */
- if ((curr_peer->tx_pkt >= curr_peer->pHddTdlsCtx->threshold_config.idle_packet_n) || (curr_peer->rx_pkt >= curr_peer->pHddTdlsCtx->threshold_config.idle_packet_n))
- {
- /* this tdls link got back to normal, so keep it */
- VOS_TRACE(VOS_MODULE_ID_HDD, TDLS_LOG_LEVEL,
- "%s: tdls link to " MAC_ADDRESS_STR " back to normal, will stay",
- __func__, MAC_ADDR_ARRAY(curr_peer->peerMac));
- }
- else
- {
- /* this tdls link needs to get torn down */
- VOS_TRACE(VOS_MODULE_ID_HDD, TDLS_LOG_LEVEL,
- "%s: trigger tdls link to " MAC_ADDRESS_STR " down",
- __func__, MAC_ADDR_ARRAY(curr_peer->peerMac));
-
- wlan_hdd_tdls_indicate_teardown(curr_peer->pHddTdlsCtx->pAdapter,
- curr_peer,
- eSIR_MAC_TDLS_TEARDOWN_UNSPEC_REASON);
- }
- mutex_unlock(&pHddCtx->tdls_lock);
-#endif
-}
-#endif /* QCA_WIFI_2_0 */
static v_VOID_t wlan_hdd_tdls_discovery_timeout_peer_cb(v_PVOID_t userData)
{
@@ -654,10 +413,8 @@ int wlan_hdd_tdls_init(hdd_adapter_t *pAdapter)
tdlsCtx_t *pHddTdlsCtx;
int i;
v_U8_t staIdx;
-#ifdef QCA_WIFI_2_0
tdlsInfo_t *tInfo;
eHalStatus halStatus = eHAL_STATUS_FAILURE;
-#endif
if (NULL == pHddCtx)
return -1;
@@ -668,23 +425,13 @@ int wlan_hdd_tdls_init(hdd_adapter_t *pAdapter)
* received from target, so cfg_ini gives combined intersected result
*/
if ((FALSE == pHddCtx->cfg_ini->fEnableTDLSSupport)
-#ifndef QCA_WIFI_2_0
- || (FALSE == sme_IsFeatureSupportedByFW(TDLS))
-#endif
)
{
pHddCtx->tdls_mode = eTDLS_SUPPORT_NOT_ENABLED;
pAdapter->sessionCtx.station.pHddTdlsCtx = NULL;
-#ifndef QCA_WIFI_2_0
- hddLog(VOS_TRACE_LEVEL_ERROR,
- "%s TDLS not enabled (%d) or FW doesn't support (%d)",
- __func__, pHddCtx->cfg_ini->fEnableTDLSSupport,
- sme_IsFeatureSupportedByFW(TDLS));
-#else
hddLog(VOS_TRACE_LEVEL_ERROR,
"%s TDLS not enabled (%d) or FW doesn't support",
__func__, pHddCtx->cfg_ini->fEnableTDLSSupport);
-#endif
mutex_unlock(&pHddCtx->tdls_lock);
return 0;
}
@@ -728,12 +475,6 @@ int wlan_hdd_tdls_init(hdd_adapter_t *pAdapter)
pHddTdlsCtx);
#endif
-#ifndef QCA_WIFI_2_0
- vos_timer_init(&pHddTdlsCtx->peerUpdateTimer,
- VOS_TIMER_TYPE_SW,
- wlan_hdd_tdls_update_peer_cb,
- pHddTdlsCtx);
-#endif
vos_timer_init(&pHddTdlsCtx->peerDiscoveryTimeoutTimer,
VOS_TIMER_TYPE_SW,
wlan_hdd_tdls_discovery_timeout_peer_cb,
@@ -784,9 +525,7 @@ int wlan_hdd_tdls_init(hdd_adapter_t *pAdapter)
pHddTdlsCtx->threshold_config.rssi_hysteresis = pHddCtx->cfg_ini->fTDLSRSSIHysteresis;
pHddTdlsCtx->threshold_config.rssi_trigger_threshold = pHddCtx->cfg_ini->fTDLSRSSITriggerThreshold;
pHddTdlsCtx->threshold_config.rssi_teardown_threshold = pHddCtx->cfg_ini->fTDLSRSSITeardownThreshold;
-#ifdef QCA_WIFI_2_0
pHddTdlsCtx->threshold_config.rssi_delta = pHddCtx->cfg_ini->fTDLSRSSIDelta;
-#endif
if (FALSE == pHddCtx->cfg_ini->fEnableTDLSImplicitTrigger)
{
@@ -807,16 +546,12 @@ int wlan_hdd_tdls_init(hdd_adapter_t *pAdapter)
* which would try to acquire sme lock.
*/
mutex_unlock(&pHddCtx->tdls_lock);
-#ifdef QCA_WIFI_2_0
tInfo = vos_mem_malloc(sizeof(tdlsInfo_t));
if (NULL == tInfo)
{
hddLog(VOS_TRACE_LEVEL_ERROR,
"%s: vos_mem_alloc failed for tInfo", __func__);
vos_timer_destroy(&pHddTdlsCtx->peerDiscoveryTimeoutTimer);
-#ifndef QCA_WIFI_2_0
- vos_timer_destroy(&pHddTdlsCtx->peerUpdateTimer);
-#endif
#ifdef TDLS_USE_SEPARATE_DISCOVERY_TIMER
vos_timer_destroy(&pHddTdlsCtx->peerDiscoverTimer);
#endif
@@ -885,16 +620,12 @@ int wlan_hdd_tdls_init(hdd_adapter_t *pAdapter)
{
vos_mem_free(tInfo);
vos_timer_destroy(&pHddTdlsCtx->peerDiscoveryTimeoutTimer);
-#ifndef QCA_WIFI_2_0
- vos_timer_destroy(&pHddTdlsCtx->peerUpdateTimer);
-#endif
#ifdef TDLS_USE_SEPARATE_DISCOVERY_TIMER
vos_timer_destroy(&pHddTdlsCtx->peerDiscoverTimer);
#endif
vos_mem_free(pHddTdlsCtx);
return -1;
}
-#endif
return 0;
}
@@ -903,10 +634,8 @@ void wlan_hdd_tdls_exit(hdd_adapter_t *pAdapter)
{
tdlsCtx_t *pHddTdlsCtx;
hdd_context_t *pHddCtx;
-#ifdef QCA_WIFI_2_0
tdlsInfo_t *tInfo;
eHalStatus halStatus = eHAL_STATUS_FAILURE;
-#endif
pHddCtx = WLAN_HDD_GET_CTX( pAdapter );
if (!pHddCtx)
@@ -942,7 +671,6 @@ void wlan_hdd_tdls_exit(hdd_adapter_t *pAdapter)
wlan_hdd_tdls_free_scan_request(&pHddCtx->tdls_scan_ctxt);
-#ifdef QCA_WIFI_2_0
tInfo = vos_mem_malloc(sizeof(tdlsInfo_t));
if (NULL != tInfo)
{
@@ -1015,7 +743,6 @@ void wlan_hdd_tdls_exit(hdd_adapter_t *pAdapter)
hddLog(VOS_TRACE_LEVEL_ERROR,
"%s: vos_mem_alloc failed for tInfo", __func__);
}
-#endif
vos_mem_free(pHddTdlsCtx);
pAdapter->sessionCtx.station.pHddTdlsCtx = NULL;
@@ -1028,9 +755,6 @@ static void wlan_hdd_tdls_monitor_timers_stop(tdlsCtx_t *pHddTdlsCtx)
#ifdef TDLS_USE_SEPARATE_DISCOVERY_TIMER
vos_timer_stop(&pHddTdlsCtx->peerDiscoverTimer);
#endif
-#ifndef QCA_WIFI_2_0
- vos_timer_stop(&pHddTdlsCtx->peerUpdateTimer);
-#endif
vos_timer_stop(&pHddTdlsCtx->peerDiscoveryTimeoutTimer);
}
@@ -1046,13 +770,6 @@ static void wlan_hdd_tdls_peer_timers_stop(tdlsCtx_t *pHddTdlsCtx)
head = &pHddTdlsCtx->peer_list[i];
list_for_each (pos, head) {
curr_peer = list_entry (pos, hddTdlsPeer_t, node);
-#ifndef QCA_WIFI_2_0
- VOS_TRACE( VOS_MODULE_ID_HDD, TDLS_LOG_LEVEL,
- "%s: " MAC_ADDRESS_STR " -> stop idle timer",
- __func__,
- MAC_ADDR_ARRAY(curr_peer->peerMac));
- vos_timer_stop ( &curr_peer->peerIdleTimer );
-#endif
vos_timer_stop( &curr_peer->initiatorWaitTimeoutTimer );
}
}
@@ -1071,10 +788,6 @@ static void wlan_hdd_tdls_monitor_timers_destroy(tdlsCtx_t *pHddTdlsCtx)
vos_timer_stop(&pHddTdlsCtx->peerDiscoverTimer);
vos_timer_destroy(&pHddTdlsCtx->peerDiscoverTimer);
#endif
-#ifndef QCA_WIFI_2_0
- vos_timer_stop(&pHddTdlsCtx->peerUpdateTimer);
- vos_timer_destroy(&pHddTdlsCtx->peerUpdateTimer);
-#endif
vos_timer_stop(&pHddTdlsCtx->peerDiscoveryTimeoutTimer);
vos_timer_destroy(&pHddTdlsCtx->peerDiscoveryTimeoutTimer);
}
@@ -1092,14 +805,6 @@ static void wlan_hdd_tdls_peer_timers_destroy(tdlsCtx_t *pHddTdlsCtx)
list_for_each (pos, head) {
curr_peer = list_entry (pos, hddTdlsPeer_t, node);
-#ifndef QCA_WIFI_2_0
- VOS_TRACE( VOS_MODULE_ID_HDD, TDLS_LOG_LEVEL,
- "%s: " MAC_ADDRESS_STR " -> destroy idle timer",
- __func__,
- MAC_ADDR_ARRAY(curr_peer->peerMac));
- vos_timer_stop ( &curr_peer->peerIdleTimer );
- vos_timer_destroy ( &curr_peer->peerIdleTimer );
-#endif
vos_timer_stop(&curr_peer->initiatorWaitTimeoutTimer);
vos_timer_destroy(&curr_peer->initiatorWaitTimeoutTimer);
}
@@ -1167,12 +872,6 @@ hddTdlsPeer_t *wlan_hdd_tdls_get_peer(hdd_adapter_t *pAdapter, u8 *mac)
vos_mem_copy(peer->peerMac, mac, sizeof(peer->peerMac));
peer->pHddTdlsCtx = pHddTdlsCtx;
-#ifndef QCA_WIFI_2_0
- vos_timer_init(&peer->peerIdleTimer,
- VOS_TIMER_TYPE_SW,
- wlan_hdd_tdls_idle_cb,
- peer);
-#endif
vos_timer_init(&peer->initiatorWaitTimeoutTimer,
VOS_TIMER_TYPE_SW,
@@ -1218,7 +917,6 @@ void wlan_hdd_tdls_set_peer_link_status(hddTdlsPeer_t *curr_peer, tTDLSLinkStatu
curr_peer->link_status = status;
-#ifdef QCA_WIFI_2_0
/* If TDLS link status is already passed the discovery state
* then clear discovery attempt count
*/
@@ -1226,7 +924,6 @@ void wlan_hdd_tdls_set_peer_link_status(hddTdlsPeer_t *curr_peer, tTDLSLinkStatu
{
curr_peer->discovery_attempt = 0;
}
-#endif /* QCA_WIFI_2_0 */
return;
}
@@ -1247,7 +944,6 @@ void wlan_hdd_tdls_set_link_status(hdd_adapter_t *pAdapter,
curr_peer->link_status= linkStatus;
-#ifdef QCA_WIFI_2_0
/* If TDLS link status is already passed the discovery state
* then clear discovery attempt count
*/
@@ -1255,7 +951,6 @@ void wlan_hdd_tdls_set_link_status(hdd_adapter_t *pAdapter,
{
curr_peer->discovery_attempt = 0;
}
-#endif /* QCA_WIFI_2_0 */
return;
}
@@ -1601,10 +1296,8 @@ int wlan_hdd_tdls_set_params(struct net_device *dev, tdls_config_params_t *confi
hdd_context_t *pHddCtx = WLAN_HDD_GET_CTX( pAdapter );
tdlsCtx_t *pHddTdlsCtx = WLAN_HDD_GET_TDLS_CTX_PTR(pAdapter);
eTDLSSupportMode req_tdls_mode;
-#ifdef QCA_WIFI_2_0
tdlsInfo_t *tdlsParams;
eHalStatus halStatus = eHAL_STATUS_FAILURE;
-#endif
if (NULL == pHddTdlsCtx)
{
@@ -1646,7 +1339,6 @@ int wlan_hdd_tdls_set_params(struct net_device *dev, tdls_config_params_t *confi
wlan_hdd_tdls_set_mode(pHddCtx, req_tdls_mode, TRUE);
-#ifdef QCA_WIFI_2_0
tdlsParams = vos_mem_malloc(sizeof(tdlsInfo_t));
if (NULL == tdlsParams)
{
@@ -1717,7 +1409,6 @@ int wlan_hdd_tdls_set_params(struct net_device *dev, tdls_config_params_t *confi
vos_mem_free(tdlsParams);
return -1;
}
-#endif
return 0;
}
@@ -1864,11 +1555,6 @@ int wlan_hdd_tdls_reset_peer(hdd_adapter_t *pAdapter, u8 *mac)
curr_peer->link_status = eTDLS_LINK_IDLE;
curr_peer->staId = 0;
-#ifndef QCA_WIFI_2_0
- if(eTDLS_SUPPORT_ENABLED == pHddCtx->tdls_mode) {
- vos_timer_stop( &curr_peer->peerIdleTimer );
- }
-#endif
return 0;
}
@@ -2042,11 +1728,6 @@ void wlan_hdd_tdls_connection_callback(hdd_adapter_t *pAdapter)
&pHddTdlsCtx->peerDiscoverTimer,
pHddTdlsCtx->threshold_config.discovery_period_t);
#endif
-#ifndef QCA_WIFI_2_0
- wlan_hdd_tdls_timer_restart(pHddTdlsCtx->pAdapter,
- &pHddTdlsCtx->peerUpdateTimer,
- pHddTdlsCtx->threshold_config.tx_period_t);
-#endif
}
mutex_unlock(&pHddCtx->tdls_lock);
@@ -2324,11 +2005,6 @@ static void wlan_hdd_tdls_implicit_enable(tdlsCtx_t *pHddTdlsCtx)
&pHddTdlsCtx->peerDiscoverTimer,
pHddTdlsCtx->threshold_config.discovery_period_t);
#endif
-#ifndef QCA_WIFI_2_0
- wlan_hdd_tdls_timer_restart(pHddTdlsCtx->pAdapter,
- &pHddTdlsCtx->peerUpdateTimer,
- pHddTdlsCtx->threshold_config.tx_period_t);
-#endif
}
void wlan_hdd_tdls_set_mode(hdd_context_t *pHddCtx,
@@ -2454,7 +2130,6 @@ static void __wlan_hdd_tdls_pre_setup(struct work_struct *work)
if (eTDLS_CAP_UNKNOWN != curr_peer->tdls_support)
curr_peer->link_status = eTDLS_LINK_DISCOVERING;
-#ifdef QCA_WIFI_2_0
if (curr_peer->discovery_attempt >=
pHddTdlsCtx->threshold_config.discovery_tries_n)
{
@@ -2468,7 +2143,6 @@ static void __wlan_hdd_tdls_pre_setup(struct work_struct *work)
goto done;
}
curr_peer->link_status = eTDLS_LINK_DISCOVERING;
-#endif
status = wlan_hdd_cfg80211_send_tdls_discover_req(pHddTdlsCtx->pAdapter->wdev.wiphy,
pHddTdlsCtx->pAdapter->dev,
@@ -2485,9 +2159,7 @@ static void __wlan_hdd_tdls_pre_setup(struct work_struct *work)
pHddTdlsCtx->discovery_sent_cnt++;
-#ifdef QCA_WIFI_2_0
curr_peer->discovery_attempt++;
-#endif /* QCA_WIFI_2_0 */
mutex_lock(&pHddCtx->tdls_lock);
diff --git a/CORE/HDD/src/wlan_hdd_tx_rx.c b/CORE/HDD/src/wlan_hdd_tx_rx.c
index 967c671d4b39..18195a7996f2 100644
--- a/CORE/HDD/src/wlan_hdd_tx_rx.c
+++ b/CORE/HDD/src/wlan_hdd_tx_rx.c
@@ -614,237 +614,6 @@ fail:
return NETDEV_TX_OK;
}
-#ifndef QCA_WIFI_2_0
-/**============================================================================
- @brief hdd_hard_start_xmit() - Function registered with the Linux OS for
- transmitting packets. There are 2 versions of this function. One that uses
- locked queue and other that uses lockless queues. Both have been retained to
- do some performance testing
-
- @param skb : [in] pointer to OS packet (sk_buff)
- @param dev : [in] pointer to Libra network device
-
- @return : NET_XMIT_DROP if packets are dropped
- : NET_XMIT_SUCCESS if packet is enqueued succesfully
- ===========================================================================*/
-int hdd_hard_start_xmit(struct sk_buff *skb, struct net_device *dev)
-{
- VOS_STATUS status;
- WLANTL_ACEnumType ac;
- sme_QosWmmUpType up;
- skb_list_node_t *pktNode = NULL;
- hdd_list_node_t *anchor = NULL;
- v_SIZE_t pktListSize = 0;
- hdd_adapter_t *pAdapter = WLAN_HDD_GET_PRIV_PTR(dev);
- v_BOOL_t granted;
- v_U8_t STAId = WLAN_MAX_STA_COUNT;
- hdd_station_ctx_t *pHddStaCtx = &pAdapter->sessionCtx.station;
- v_BOOL_t txSuspended = VOS_FALSE;
-
- ++pAdapter->hdd_stats.hddTxRxStats.txXmitCalled;
-
- if (unlikely(netif_subqueue_stopped(dev, skb))) {
- VOS_TRACE( VOS_MODULE_ID_HDD_DATA, VOS_TRACE_LEVEL_ERROR,
- "%s is called when netif TX %d is disabled",
- __func__, skb->queue_mapping);
- return NETDEV_TX_BUSY;
- }
-
- //Get TL AC corresponding to Qdisc queue index/AC.
- ac = hdd_QdiscAcToTlAC[skb->queue_mapping];
-
- if (WLAN_HDD_IBSS == pAdapter->device_mode)
- {
- v_MACADDR_t *pDestMacAddress = (v_MACADDR_t*)skb->data;
-
- if (eConnectionState_IbssDisconnected == pHddStaCtx->conn_info.connState)
- {
- VOS_TRACE( VOS_MODULE_ID_HDD_DATA, VOS_TRACE_LEVEL_INFO,
- "%s: Tx frame in disconnected state in IBSS mode", __func__);
- ++pAdapter->stats.tx_dropped;
- ++pAdapter->hdd_stats.hddTxRxStats.txXmitDropped;
- ++pAdapter->hdd_stats.hddTxRxStats.txXmitDroppedAC[ac];
- kfree_skb(skb);
- return NETDEV_TX_OK;
- }
-
- STAId = *(v_U8_t *)(((v_U8_t *)(skb->data)) - 1);
-
- if ((STAId == HDD_WLAN_INVALID_STA_ID) &&
- (vos_is_macaddr_broadcast( pDestMacAddress ) ||
- vos_is_macaddr_group(pDestMacAddress)))
- {
- STAId = IBSS_BROADCAST_STAID;
- VOS_TRACE( VOS_MODULE_ID_HDD_DATA, VOS_TRACE_LEVEL_INFO_LOW,
- "%s: BC/MC packet", __func__);
- }
- else if (STAId == HDD_WLAN_INVALID_STA_ID)
- {
- VOS_TRACE( VOS_MODULE_ID_HDD_DATA, VOS_TRACE_LEVEL_INFO,
- "%s: Received Unicast frame with invalid staID", __func__);
- ++pAdapter->stats.tx_dropped;
- ++pAdapter->hdd_stats.hddTxRxStats.txXmitDropped;
- ++pAdapter->hdd_stats.hddTxRxStats.txXmitDroppedAC[ac];
- kfree_skb(skb);
- return NETDEV_TX_OK;
- }
- }
- else
- {
- STAId = pHddStaCtx->conn_info.staId[0];
- }
-
- //user priority from IP header, which is already extracted and set from
- //select_queue call back function
- up = skb->priority;
-
- ++pAdapter->hdd_stats.hddTxRxStats.txXmitClassifiedAC[ac];
-
-#ifdef HDD_WMM_DEBUG
- VOS_TRACE( VOS_MODULE_ID_HDD_DATA, VOS_TRACE_LEVEL_FATAL,
- "%s: Classified as ac %d up %d", __func__, ac, up);
-#endif // HDD_WMM_DEBUG
-
- spin_lock(&pAdapter->wmm_tx_queue[ac].lock);
- /*CR 463598,384996*/
- /*For every increment of 10 pkts in the queue, we inform TL about pending pkts.
- *We check for +1 in the logic,to take care of Zero count which
- *occurs very frequently in low traffic cases */
- if((pAdapter->wmm_tx_queue[ac].count + 1) % 10 == 0)
- {
- /* Use the following debug statement during Engineering Debugging.There are chance that this will lead to a Watchdog Bark
- * if it is in the mainline code and if the log level is enabled by someone for debugging
- VOS_TRACE( VOS_MODULE_ID_HDD_DATA, VOS_TRACE_LEVEL_INFO,"%s:Queue is Filling up.Inform TL again about pending packets", __func__);*/
-
- status = WLANTL_STAPktPending( (WLAN_HDD_GET_CTX(pAdapter))->pvosContext,
- STAId, ac
- );
- if ( !VOS_IS_STATUS_SUCCESS( status ) )
- {
- VOS_TRACE( VOS_MODULE_ID_HDD_DATA, VOS_TRACE_LEVEL_ERROR,
- "%s: WLANTL_STAPktPending() returned error code %d",
- __func__, status);
- ++pAdapter->stats.tx_dropped;
- ++pAdapter->hdd_stats.hddTxRxStats.txXmitDropped;
- ++pAdapter->hdd_stats.hddTxRxStats.txXmitDroppedAC[ac];
- kfree_skb(skb);
- spin_unlock(&pAdapter->wmm_tx_queue[ac].lock);
- return NETDEV_TX_OK;
- }
- }
- //If we have already reached the max queue size, disable the TX queue
- if ( pAdapter->wmm_tx_queue[ac].count == pAdapter->wmm_tx_queue[ac].max_size)
- {
- ++pAdapter->hdd_stats.hddTxRxStats.txXmitBackPressured;
- ++pAdapter->hdd_stats.hddTxRxStats.txXmitBackPressuredAC[ac];
- netif_tx_stop_queue(netdev_get_tx_queue(dev, skb_get_queue_mapping(skb)));
- pAdapter->isTxSuspended[ac] = VOS_TRUE;
- txSuspended = VOS_TRUE;
- }
-
- /* If 3/4th of the max queue size is used then enable the flag.
- * This flag indicates to place the DHCP packets in VOICE AC queue.*/
- if (WLANTL_AC_BE == ac)
- {
- if (pAdapter->wmm_tx_queue[ac].count >= HDD_TX_QUEUE_LOW_WATER_MARK)
- {
- pAdapter->isVosLowResource = VOS_TRUE;
- }
- else
- {
- pAdapter->isVosLowResource = VOS_FALSE;
- }
- }
-
- spin_unlock(&pAdapter->wmm_tx_queue[ac].lock);
- if (VOS_TRUE == txSuspended)
- {
- VOS_TRACE( VOS_MODULE_ID_HDD_DATA, VOS_TRACE_LEVEL_INFO,
- "%s: TX queue full for AC=%d Disable OS TX queue",
- __func__, ac );
- return NETDEV_TX_BUSY;
- }
-
- //Use the skb->cb field to hold the list node information
- pktNode = (skb_list_node_t *)&skb->cb;
-
- //Stick the OS packet inside this node.
- pktNode->skb = skb;
-
- //Stick the User Priority inside this node
- pktNode->userPriority = up;
-
-
- INIT_LIST_HEAD(&pktNode->anchor);
-
- //Insert the OS packet into the appropriate AC queue
- spin_lock(&pAdapter->wmm_tx_queue[ac].lock);
- status = hdd_list_insert_back_size( &pAdapter->wmm_tx_queue[ac], &pktNode->anchor, &pktListSize );
- spin_unlock(&pAdapter->wmm_tx_queue[ac].lock);
-
- if ( !VOS_IS_STATUS_SUCCESS( status ) )
- {
- VOS_TRACE( VOS_MODULE_ID_HDD_DATA, VOS_TRACE_LEVEL_WARN,"%s:Insert Tx queue failed. Pkt dropped", __func__);
- ++pAdapter->hdd_stats.hddTxRxStats.txXmitDropped;
- ++pAdapter->hdd_stats.hddTxRxStats.txXmitDroppedAC[ac];
- ++pAdapter->stats.tx_dropped;
- kfree_skb(skb);
- return NETDEV_TX_OK;
- }
-
- ++pAdapter->hdd_stats.hddTxRxStats.txXmitQueued;
- ++pAdapter->hdd_stats.hddTxRxStats.txXmitQueuedAC[ac];
- ++pAdapter->hdd_stats.hddTxRxStats.pkt_tx_count;
-
- if (HDD_PSB_CHANGED == pAdapter->psbChanged)
- {
- /* Function which will determine acquire admittance for a
- * WMM AC is required or not based on psb configuration done
- * in the framework
- */
- hdd_wmm_acquire_access_required(pAdapter, ac);
- }
-
- //Make sure we have access to this access category
- if (((pAdapter->psbChanged & (1 << ac)) && likely(pAdapter->hddWmmStatus.wmmAcStatus[ac].wmmAcAccessAllowed)) ||
- (pHddStaCtx->conn_info.uIsAuthenticated == VOS_FALSE))
- {
- granted = VOS_TRUE;
- }
- else
- {
- status = hdd_wmm_acquire_access( pAdapter, ac, &granted );
- pAdapter->psbChanged |= (1 << ac);
- }
- if ( granted && ( pktListSize == 1 ))
- {
- //Let TL know we have a packet to send for this AC
- //VOS_TRACE( VOS_MODULE_ID_HDD_DATA, VOS_TRACE_LEVEL_ERROR,"%s:Indicating Packet to TL", __func__);
- status = WLANTL_STAPktPending(
- (WLAN_HDD_GET_CTX(pAdapter))->pvosContext,
- STAId, ac );
- if ( !VOS_IS_STATUS_SUCCESS( status ) )
- {
- VOS_TRACE( VOS_MODULE_ID_HDD_DATA, VOS_TRACE_LEVEL_WARN, "%s: Failed to signal TL for AC=%d", __func__, ac );
-
- //Remove the packet from queue. It must be at the back of the queue, as TX thread cannot preempt us in the middle
- //as we are in a soft irq context. Also it must be the same packet that we just allocated.
- spin_lock(&pAdapter->wmm_tx_queue[ac].lock);
- status = hdd_list_remove_back( &pAdapter->wmm_tx_queue[ac], &anchor );
- spin_unlock(&pAdapter->wmm_tx_queue[ac].lock);
- ++pAdapter->stats.tx_dropped;
- ++pAdapter->hdd_stats.hddTxRxStats.txXmitDropped;
- ++pAdapter->hdd_stats.hddTxRxStats.txXmitDroppedAC[ac];
- kfree_skb(skb);
- return NETDEV_TX_OK;
- }
- }
-
- dev->trans_start = jiffies;
-
- return NETDEV_TX_OK;
-}
-#else
#ifdef QCA_LL_TX_FLOW_CT
/**============================================================================
@brief hdd_tx_resume_timer_expired_handler() - Resume OS TX Q timer expired
@@ -1136,7 +905,6 @@ drop_pkt:
kfree_skb(skb);
return NETDEV_TX_OK;
}
-#endif /* QCA_WIFI_2_0 */
/**============================================================================
@brief hdd_Ibss_GetStaId() - Get the StationID using the Peer Mac address
@@ -1858,292 +1626,6 @@ VOS_STATUS hdd_tx_low_resource_cbk( vos_pkt_t *pVosPacket,
}
-#ifndef QCA_WIFI_2_0
-/**============================================================================
- @brief hdd_rx_packet_cbk() - Receive callback registered with TL.
- TL will call this to notify the HDD when one or more packets were
- received for a registered STA.
-
- @param vosContext : [in] pointer to VOS context
- @param pVosPacketChain : [in] pointer to VOS packet chain
- @param staId : [in] Station Id
- @param pRxMetaInfo : [in] pointer to meta info for the received pkt(s)
-
- @return : VOS_STATUS_E_FAILURE if any errors encountered,
- : VOS_STATUS_SUCCESS otherwise
- ===========================================================================*/
-VOS_STATUS hdd_rx_packet_cbk( v_VOID_t *vosContext,
- vos_pkt_t *pVosPacketChain,
- v_U8_t staId,
- WLANTL_RxMetaInfoType* pRxMetaInfo )
-{
- hdd_adapter_t *pAdapter = NULL;
- hdd_context_t *pHddCtx = NULL;
- VOS_STATUS status = VOS_STATUS_E_FAILURE;
- int rxstat;
- struct sk_buff *skb = NULL;
- vos_pkt_t* pVosPacket;
- vos_pkt_t* pNextVosPacket;
-
- //Sanity check on inputs
- if ( ( NULL == vosContext ) ||
- ( NULL == pVosPacketChain ) ||
- ( NULL == pRxMetaInfo ) )
- {
- VOS_TRACE( VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_ERROR,
- "%s: Null params being passed", __func__);
- return VOS_STATUS_E_FAILURE;
- }
-
- pHddCtx = (hdd_context_t *)vos_get_context( VOS_MODULE_ID_HDD, vosContext );
- if ( NULL == pHddCtx )
- {
- VOS_TRACE( VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_ERROR,
- "%s: HDD adapter context is Null", __func__);
- return VOS_STATUS_E_FAILURE;
- }
-
- pAdapter = pHddCtx->sta_to_adapter[staId];
- if( NULL == pAdapter )
- {
- VOS_TRACE( VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_ERROR,
- "%s: pAdapter is Null for staId %u",
- __func__, staId);
- return VOS_STATUS_E_FAILURE;
- }
-
- ++pAdapter->hdd_stats.hddTxRxStats.rxChains;
-
- // walk the chain until all are processed
- pVosPacket = pVosPacketChain;
- do
- {
- // get the pointer to the next packet in the chain
- // (but don't unlink the packet since we free the entire chain later)
- status = vos_pkt_walk_packet_chain( pVosPacket, &pNextVosPacket, VOS_FALSE);
-
- // both "success" and "empty" are acceptable results
- if (!((status == VOS_STATUS_SUCCESS) || (status == VOS_STATUS_E_EMPTY)))
- {
- ++pAdapter->hdd_stats.hddTxRxStats.rxDropped;
- VOS_TRACE( VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_ERROR,
- "%s: Failure walking packet chain", __func__);
- return VOS_STATUS_E_FAILURE;
- }
-
- // Extract the OS packet (skb).
- // Tell VOS to detach the OS packet from the VOS packet
- status = vos_pkt_get_os_packet( pVosPacket, (v_VOID_t **)&skb, VOS_TRUE );
- if(!VOS_IS_STATUS_SUCCESS( status ))
- {
- ++pAdapter->hdd_stats.hddTxRxStats.rxDropped;
- VOS_TRACE( VOS_MODULE_ID_HDD_DATA, VOS_TRACE_LEVEL_ERROR,
- "%s: Failure extracting skb from vos pkt", __func__);
- return VOS_STATUS_E_FAILURE;
- }
-
- if (WLAN_HDD_ADAPTER_MAGIC != pAdapter->magic)
- {
- VOS_TRACE(VOS_MODULE_ID_HDD_DATA, VOS_TRACE_LEVEL_FATAL,
- "Magic cookie(%x) for adapter sanity verification is invalid", pAdapter->magic);
- return eHAL_STATUS_FAILURE;
- }
-
-#ifdef FEATURE_WLAN_TDLS
- if ((eTDLS_SUPPORT_ENABLED == pHddCtx->tdls_mode) &&
- 0 != pHddCtx->connected_peer_count)
- {
- hdd_station_ctx_t *pHddStaCtx = &pAdapter->sessionCtx.station;
- u8 mac[6];
-
- wlan_hdd_tdls_extract_sa(skb, mac);
-
- if (vos_is_macaddr_group((v_MACADDR_t *)mac)) {
- VOS_TRACE( VOS_MODULE_ID_HDD_DATA, VOS_TRACE_LEVEL_INFO_MED,
- "rx broadcast packet, not adding to peer list");
- } else if (memcmp(pHddStaCtx->conn_info.bssId,
- mac, 6) != 0) {
- hddTdlsPeer_t *curr_peer;
- VOS_TRACE( VOS_MODULE_ID_HDD_DATA, VOS_TRACE_LEVEL_INFO_MED,
- "rx extract mac:" MAC_ADDRESS_STR,
- MAC_ADDR_ARRAY(mac) );
- curr_peer = wlan_hdd_tdls_find_peer(pAdapter, mac, TRUE);
- if ((NULL != curr_peer) && (eTDLS_LINK_CONNECTED == curr_peer->link_status)
- && (TRUE == pRxMetaInfo->isStaTdls))
- {
- wlan_hdd_tdls_increment_pkt_count(pAdapter, mac, 0);
- VOS_TRACE( VOS_MODULE_ID_HDD_DATA, VOS_TRACE_LEVEL_INFO,"rssi is %d", pRxMetaInfo->rssiAvg);
- wlan_hdd_tdls_set_rssi (pAdapter, mac, pRxMetaInfo->rssiAvg);
- }
- } else {
- VOS_TRACE( VOS_MODULE_ID_HDD_DATA, VOS_TRACE_LEVEL_INFO_MED,
- "rx packet sa is bssid, not adding to peer list");
- }
- }
-#endif
-
- skb->dev = pAdapter->dev;
- skb->protocol = eth_type_trans(skb, skb->dev);
- skb->ip_summed = CHECKSUM_NONE;
- ++pAdapter->hdd_stats.hddTxRxStats.rxPackets;
- ++pAdapter->stats.rx_packets;
- pAdapter->stats.rx_bytes += skb->len;
-#ifdef WLAN_FEATURE_HOLD_RX_WAKELOCK
- vos_wake_lock_timeout_acquire(&pHddCtx->rx_wake_lock,
- HDD_WAKE_LOCK_DURATION);
-#endif
- rxstat = netif_rx_ni(skb);
- if (NET_RX_SUCCESS == rxstat)
- {
- ++pAdapter->hdd_stats.hddTxRxStats.rxDelivered;
- ++pAdapter->hdd_stats.hddTxRxStats.pkt_rx_count;
- }
- else
- {
- ++pAdapter->hdd_stats.hddTxRxStats.rxRefused;
- }
- // now process the next packet in the chain
- pVosPacket = pNextVosPacket;
-
- } while (pVosPacket);
-
- //Return the entire VOS packet chain to the resource pool
- status = vos_pkt_return_packet( pVosPacketChain );
- if(!VOS_IS_STATUS_SUCCESS( status ))
- {
- VOS_TRACE( VOS_MODULE_ID_HDD_DATA, VOS_TRACE_LEVEL_ERROR,"%s: Failure returning vos pkt", __func__);
- }
-
- pAdapter->dev->last_rx = jiffies;
-
- return status;
-}
-/**============================================================================
- @brief hdd_tx_rx_pkt_cnt_stat_timer_handler() -
- Enable/Disable split scan based on TX and RX traffic.
- @param HddContext : [in] pointer to Hdd context
- @return : None
- ===========================================================================*/
-void hdd_tx_rx_pkt_cnt_stat_timer_handler( void *phddctx)
-{
- hdd_adapter_list_node_t *pAdapterNode = NULL, *pNext = NULL;
- hdd_adapter_t *pAdapter = NULL;
- hdd_station_ctx_t *pHddStaCtx = NULL;
- hdd_context_t *pHddCtx = (hdd_context_t *)phddctx;
- hdd_config_t *cfg_param = pHddCtx->cfg_ini;
- tpAniSirGlobal pMac = PMAC_STRUCT(phddctx->hHal);
- VOS_STATUS status;
- v_U8_t staId = 0;
- v_U8_t fconnected = 0;
-
- if (NULL == phddctx)
- {
- VOS_TRACE( VOS_MODULE_ID_HDD_DATA, VOS_TRACE_LEVEL_ERROR,
- FL("phddctx is NULL"));
- VOS_ASSERT(0);
- return;
- }
-
- if (!cfg_param->dynSplitscan)
- {
- VOS_TRACE( VOS_MODULE_ID_HDD_DATA, VOS_TRACE_LEVEL_INFO,
- "%s: Error : Dynamic split scan is not Enabled : %d",
- __func__, pHddCtx->cfg_ini->dynSplitscan);
- return;
- }
-
- status = hdd_get_front_adapter ( pHddCtx, &pAdapterNode );
- while ( NULL != pAdapterNode && VOS_STATUS_SUCCESS == status )
- {
- pAdapter = pAdapterNode->pAdapter;
-
- if ( pAdapter )
- {
- VOS_TRACE( VOS_MODULE_ID_HDD_DATA, VOS_TRACE_LEVEL_INFO,
- "%s: Adapter with device mode %d exists",
- __func__, pAdapter->device_mode);
-
- if ((WLAN_HDD_INFRA_STATION == pAdapter->device_mode) ||
- (WLAN_HDD_P2P_CLIENT == pAdapter->device_mode))
- {
- pHddStaCtx = WLAN_HDD_GET_STATION_CTX_PTR(pAdapter);
- if ((eConnectionState_Associated ==
- pHddStaCtx->conn_info.connState) &&
- (VOS_TRUE == pHddStaCtx->conn_info.uIsAuthenticated))
- {
- fconnected = TRUE;
- }
- }
- else if ((WLAN_HDD_SOFTAP == pAdapter->device_mode) ||
- (WLAN_HDD_P2P_GO == pAdapter->device_mode))
- {
- for (staId = 0; staId < WLAN_MAX_STA_COUNT; staId++)
- {
- if ((pAdapter->aStaInfo[staId].isUsed) &&
- (WLANTL_STA_AUTHENTICATED ==
- pAdapter->aStaInfo[staId].tlSTAState))
- {
- fconnected = TRUE;
- }
- }
- }
- if ( fconnected )
- {
- VOS_TRACE( VOS_MODULE_ID_HDD_DATA, VOS_TRACE_LEVEL_INFO,
- "%s: One of the interface is connected check for scan",
- __func__);
- VOS_TRACE( VOS_MODULE_ID_HDD_DATA, VOS_TRACE_LEVEL_INFO,
- "%s: pkt_tx_count: %d, pkt_rx_count: %d", __func__,
- pAdapter->hdd_stats.hddTxRxStats.pkt_tx_count,
- pAdapter->hdd_stats.hddTxRxStats.pkt_rx_count);
-
- vos_timer_start(&pHddCtx->tx_rx_trafficTmr,
- cfg_param->trafficMntrTmrForSplitScan);
- //Check for the previous statistics count
- if ((pAdapter->hdd_stats.hddTxRxStats.pkt_tx_count >
- cfg_param->txRxThresholdForSplitScan) ||
- (pAdapter->hdd_stats.hddTxRxStats.pkt_rx_count >
- cfg_param->txRxThresholdForSplitScan) ||
- pMac->fMiracastSessionPresent)
- {
- pAdapter->hdd_stats.hddTxRxStats.pkt_tx_count = 0;
- pAdapter->hdd_stats.hddTxRxStats.pkt_rx_count = 0;
-
- if (!pHddCtx->issplitscan_enabled)
- {
- pHddCtx->issplitscan_enabled = TRUE;
- sme_enable_disable_split_scan(
- WLAN_HDD_GET_HAL_CTX(pAdapter),
- cfg_param->nNumStaChanCombinedConc,
- cfg_param->nNumP2PChanCombinedConc);
- }
- return;
- }
- else
- {
- pAdapter->hdd_stats.hddTxRxStats.pkt_tx_count = 0;
- pAdapter->hdd_stats.hddTxRxStats.pkt_rx_count = 0;
- }
- fconnected = FALSE;
- }
- }
- status = hdd_get_next_adapter( pHddCtx, pAdapterNode, &pNext);
- pAdapterNode = pNext;
- }
-
- if (pHddCtx->issplitscan_enabled)
- {
- VOS_TRACE( VOS_MODULE_ID_HDD_DATA, VOS_TRACE_LEVEL_ERROR,
- "%s: Disable split scan", __func__);
- pHddCtx->issplitscan_enabled = FALSE;
- sme_enable_disable_split_scan(
- pHddCtx->hHal,
- SME_DISABLE_SPLIT_SCAN,
- SME_DISABLE_SPLIT_SCAN);
- }
- return;
-}
-#else
/**============================================================================
@brief hdd_rx_packet_cbk() - Receive callback registered with TL.
@@ -2212,35 +1694,6 @@ VOS_STATUS hdd_rx_packet_cbk(v_VOID_t *vosContext,
}
#ifdef FEATURE_WLAN_TDLS
-#ifndef QCA_WIFI_2_0
- if ((eTDLS_SUPPORT_ENABLED == pHddCtx->tdls_mode) &&
- 0 != pHddCtx->connected_peer_count)
- {
- u8 mac[6];
-
- wlan_hdd_tdls_extract_sa(skb, mac);
-
- if (vos_is_macaddr_group((v_MACADDR_t *)mac)) {
- VOS_TRACE( VOS_MODULE_ID_HDD_DATA, VOS_TRACE_LEVEL_INFO_MED,
- "rx broadcast packet, not adding to peer list");
- } else if (memcmp(pHddStaCtx->conn_info.bssId,
- mac, 6) != 0) {
- hddTdlsPeer_t *curr_peer;
- VOS_TRACE( VOS_MODULE_ID_HDD_DATA, VOS_TRACE_LEVEL_INFO_MED,
- "rx extract mac:" MAC_ADDRESS_STR,
- MAC_ADDR_ARRAY(mac) );
- curr_peer = wlan_hdd_tdls_find_peer(pAdapter, mac, TRUE);
- if ((NULL != curr_peer) && (eTDLS_LINK_CONNECTED == curr_peer->link_status))
- {
- wlan_hdd_tdls_increment_pkt_count(pAdapter, mac, 0);
- /* TODO: Update the rssi by using wlan_hdd_tdls_set_rssi() */
- }
- } else {
- VOS_TRACE( VOS_MODULE_ID_HDD_DATA, VOS_TRACE_LEVEL_INFO_MED,
- "rx packet sa is bssid, not adding to peer list");
- }
- }
-#endif /* QCA_WIFI_2_0 */
#endif
#ifdef QCA_PKT_PROTO_TRACE
@@ -2332,4 +1785,3 @@ VOS_STATUS hdd_rx_mul_packet_cbk(v_VOID_t *vosContext,
}
#endif /* IPA_OFFLOAD */
-#endif /* QCA_WIFI_2_0 */
diff --git a/CORE/HDD/src/wlan_hdd_wext.c b/CORE/HDD/src/wlan_hdd_wext.c
index 5ca5ef149964..e8972182c8b0 100644
--- a/CORE/HDD/src/wlan_hdd_wext.c
+++ b/CORE/HDD/src/wlan_hdd_wext.c
@@ -73,12 +73,10 @@
#include "wlan_hdd_tdls.h"
#endif
-#ifdef QCA_WIFI_2_0
#include "ieee80211_common.h"
#include "ol_if_athvar.h"
#include "dbglog_host.h"
#include "wma.h"
-#endif
#ifdef CONFIG_HAS_EARLYSUSPEND
#include <linux/earlysuspend.h>
@@ -255,7 +253,6 @@ static const hdd_freq_chan_map_t freq_chan_map[] = { {2412, 1}, {2417, 2},
#define WE_GET_WDI_DBG 7
#define WE_GET_SAP_AUTO_CHANNEL_SELECTION 8
#define WE_GET_CONCURRENCY_MODE 9
-#ifdef QCA_WIFI_2_0
#define WE_GET_NSS 11
#define WE_GET_LDPC 12
#define WE_GET_TX_STBC 13
@@ -303,7 +300,6 @@ static const hdd_freq_chan_map_t freq_chan_map[] = { {2412, 1}, {2417, 2},
#define WE_GET_GTX_MINTPC 53
#define WE_GET_GTX_BWMASK 54
#define WE_GET_SCAN_BAND_PREFERENCE 55
-#endif
/* Private ioctls and their sub-ioctls */
#define WLAN_PRIV_SET_INT_GET_INT (SIOCIWFIRSTPRIV + 2)
@@ -342,12 +338,10 @@ static const hdd_freq_chan_map_t freq_chan_map[] = { {2412, 1}, {2417, 2},
#define WE_GET_11W_INFO 9
#endif
#define WE_GET_STATES 10
-#ifdef QCA_WIFI_2_0
#define WE_GET_PHYMODE 12
#ifdef FEATURE_OEM_DATA_SUPPORT
#define WE_GET_OEM_DATA_CAP 13
#endif
-#endif
/* Private ioctls and their sub-ioctls */
#define WLAN_PRIV_SET_NONE_GET_NONE (SIOCIWFIRSTPRIV + 6)
@@ -362,7 +356,6 @@ static const hdd_freq_chan_map_t freq_chan_map[] = { {2412, 1}, {2417, 2},
#define WE_DISPLAY_DXE_SNAP_SHOT 7
#define WE_SET_REASSOC_TRIGGER 8
#define WE_DISPLAY_DATAPATH_SNAP_SHOT 9
-#ifdef QCA_WIFI_2_0
#define WE_DUMP_AGC_START 11
#define WE_DUMP_AGC 12
#define WE_DUMP_CHANINFO_START 13
@@ -371,7 +364,6 @@ static const hdd_freq_chan_map_t freq_chan_map[] = { {2412, 1}, {2417, 2},
#ifdef CONFIG_ATH_PCIE_ACCESS_DEBUG
#define WE_DUMP_PCIE_LOG 16
#endif
-#endif
#define WE_GET_RECOVERY_STAT 17
/* Private ioctls and their sub-ioctls */
@@ -392,12 +384,8 @@ static const hdd_freq_chan_map_t freq_chan_map[] = { {2412, 1}, {2417, 2},
#ifdef FEATURE_WLAN_TDLS
#undef MAX_VAR_ARGS
-#ifdef QCA_WIFI_2_0
#define MAX_VAR_ARGS 11
#else
-#define MAX_VAR_ARGS 10
-#endif
-#else
#define MAX_VAR_ARGS 7
#endif
@@ -674,13 +662,7 @@ void hdd_wlan_get_version(hdd_adapter_t *pAdapter, union iwreq_data *wrqu,
const char *pSWversion;
const char *pHWversion;
v_U32_t MSPId = 0, mSPId = 0, SIId = 0, CRMId = 0;
-#ifndef QCA_WIFI_2_0
- VOS_STATUS status;
- tSirVersionString wcnss_HW_version;
- tHalHandle hHal = WLAN_HDD_GET_HAL_CTX(pAdapter);
-#endif
-#ifdef QCA_WIFI_2_0
hdd_context_t *pHddContext;
int i = 0;
@@ -710,29 +692,6 @@ void hdd_wlan_get_version(hdd_adapter_t *pAdapter, union iwreq_data *wrqu,
if (i == ARRAY_SIZE(qwlan_hw_list))
pHWversion = "Unknown";
-#else
- status = sme_GetWcnssSoftwareVersion(hHal, wcnss_SW_version,
- sizeof(wcnss_SW_version));
- if (VOS_IS_STATUS_SUCCESS(status))
- {
- pSWversion = wcnss_SW_version;
- }
- else
- {
- pSWversion = "Unknown";
- }
-
- status = sme_GetWcnssHardwareVersion(hHal, wcnss_HW_version,
- sizeof(wcnss_HW_version));
- if (VOS_IS_STATUS_SUCCESS(status))
- {
- pHWversion = wcnss_HW_version;
- }
- else
- {
- pHWversion = "Unknown";
- }
-#endif
pHddContext->target_hw_name = pHWversion;
if (wrqu) {
@@ -4335,7 +4294,6 @@ static int iw_set_mlme(struct net_device *dev,
}
-#ifdef QCA_WIFI_2_0
int process_wma_set_command(int sessid, int paramid,
int sval, int vpdev)
{
@@ -4366,9 +4324,7 @@ int process_wma_set_command(int sessid, int paramid,
}
return ret;
}
-#endif
-#ifdef QCA_WIFI_2_0
static int wlan_hdd_update_phymode(struct net_device *net, tHalHandle hal,
int new_phymode,
hdd_context_t *phddctx)
@@ -4555,7 +4511,6 @@ static int wlan_hdd_update_phymode(struct net_device *net, tHalHandle hal,
return 0;
}
-#endif
/* set param sub-ioctls */
static int iw_setint_getnone(struct net_device *dev, struct iw_request_info *info,
@@ -4927,16 +4882,10 @@ static int iw_setint_getnone(struct net_device *dev, struct iw_request_info *inf
{
hddLog(VOS_TRACE_LEVEL_INFO, "Set Thermal Mitigation Level %d",
set_value);
-#ifdef QCA_WIFI_ISOC
- hdd_context_t *hddCtxt = WLAN_HDD_GET_CTX(pAdapter);
- hddDevTmLevelChangedHandler(hddCtxt->parent_dev, set_value);
-#else
(void)sme_SetThermalLevel(hHal, set_value);
-#endif
break;
}
-#ifdef QCA_WIFI_2_0
case WE_SET_PHYMODE:
{
hdd_context_t *phddctx = WLAN_HDD_GET_CTX(pAdapter);
@@ -5942,7 +5891,6 @@ static int iw_setint_getnone(struct net_device *dev, struct iw_request_info *inf
break;
}
#endif
-#endif
default:
{
hddLog(LOGE, "%s: Invalid sub command %d", __func__, sub_cmd);
@@ -6083,10 +6031,8 @@ static int iw_setnone_getint(struct net_device *dev, struct iw_request_info *inf
tHalHandle hHal = WLAN_HDD_GET_HAL_CTX(pAdapter);
int *value = (int *)extra;
int ret = 0; /* success */
-#ifdef QCA_WIFI_2_0
hdd_context_t *wmahddCtxt = WLAN_HDD_GET_CTX(pAdapter);
void *wmapvosContext = wmahddCtxt->pvosContext;
-#endif
tSmeConfigParams smeConfig;
if ((WLAN_HDD_GET_CTX(pAdapter))->isLogpInProgress)
@@ -6160,7 +6106,6 @@ static int iw_setnone_getint(struct net_device *dev, struct iw_request_info *inf
break;
}
-#ifdef QCA_WIFI_2_0
case WE_GET_NSS:
{
hddLog(LOG1, "GET WMI_VDEV_PARAM_NSS");
@@ -6618,7 +6563,6 @@ static int iw_setnone_getint(struct net_device *dev, struct iw_request_info *inf
"scanBandPreference = %d", *value);
break;
}
-#endif
default:
{
@@ -7091,7 +7035,6 @@ static int iw_get_char_setnone(struct net_device *dev, struct iw_request_info *i
break;
}
#endif
-#ifdef QCA_WIFI_2_0
case WE_GET_PHYMODE:
{
v_BOOL_t ch_bond24 = VOS_FALSE, ch_bond5g = VOS_FALSE;
@@ -7188,7 +7131,6 @@ static int iw_get_char_setnone(struct net_device *dev, struct iw_request_info *i
return iw_get_oem_data_cap(dev, info, wrqu, extra);
}
#endif /* FEATURE_OEM_DATA_SUPPORT */
-#endif
default:
{
hddLog(LOGE, "%s: Invalid IOCTL command %d", __func__, sub_cmd );
@@ -7381,7 +7323,6 @@ static int iw_setnone_getnone(struct net_device *dev, struct iw_request_info *in
return 0;
}
-#ifdef QCA_WIFI_2_0
case WE_DUMP_AGC_START:
{
hddLog(LOG1, "WE_DUMP_AGC_START");
@@ -7433,7 +7374,6 @@ static int iw_setnone_getnone(struct net_device *dev, struct iw_request_info *in
break;
}
#endif
-#endif
default:
{
hddLog(LOGE, "%s: unknown ioctl %d", __func__, sub_cmd);
@@ -7647,9 +7587,7 @@ static int __iw_set_var_ints_getnone(struct net_device *dev,
tdlsParams.rssi_hysteresis = apps_args[7];
tdlsParams.rssi_trigger_threshold = apps_args[8];
tdlsParams.rssi_teardown_threshold = apps_args[9];
-#ifdef QCA_WIFI_2_0
tdlsParams.rssi_delta = apps_args[10];
-#endif
wlan_hdd_tdls_set_params(dev, &tdlsParams);
}
@@ -8617,7 +8555,6 @@ void wlan_hdd_set_mc_addr_list(hdd_adapter_t *pAdapter, v_U8_t set)
*/
if (pAdapter->mc_addr_list.isFilterApplied)
{
-#ifdef QCA_WIFI_2_0
pMulticastAddrs->ulMulticastAddrCnt =
pAdapter->mc_addr_list.mc_cnt;
for (i = 0; i < pAdapter->mc_addr_list.mc_cnt; i++) {
@@ -8625,9 +8562,6 @@ void wlan_hdd_set_mc_addr_list(hdd_adapter_t *pAdapter, v_U8_t set)
pAdapter->mc_addr_list.addr[i],
sizeof(pAdapter->mc_addr_list.addr[i]));
}
-#else
- pMulticastAddrs->ulMulticastAddrCnt = 0;
-#endif
sme_8023MulticastList(hHal, pAdapter->sessionId,
pMulticastAddrs);
}
@@ -9794,7 +9728,6 @@ static const struct iw_priv_args we_private_args[] = {
0,
"setTmLevel" },
-#ifdef QCA_WIFI_2_0
{ WE_SET_PHYMODE,
IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 1,
0,
@@ -10128,7 +10061,6 @@ static const struct iw_priv_args we_private_args[] = {
IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 1,
0, "crash_inject" },
#endif
-#endif
{ WLAN_PRIV_SET_NONE_GET_INT,
0,
@@ -10176,7 +10108,6 @@ static const struct iw_priv_args we_private_args[] = {
IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 1,
"getconcurrency" },
-#ifdef QCA_WIFI_2_0
{ WE_GET_NSS,
0,
IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 1,
@@ -10409,7 +10340,6 @@ static const struct iw_priv_args we_private_args[] = {
0,
IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 1,
"get_scan_pref"},
-#endif
/* handlers for main ioctl */
{ WLAN_PRIV_SET_CHAR_GET_NONE,
@@ -10525,7 +10455,6 @@ static const struct iw_priv_args we_private_args[] = {
IW_PRIV_TYPE_CHAR| WE_MAX_STR_LEN,
"getPMFInfo" },
#endif
-#ifdef QCA_WIFI_2_0
{ WE_GET_PHYMODE,
0,
IW_PRIV_TYPE_CHAR| WE_MAX_STR_LEN,
@@ -10536,7 +10465,6 @@ static const struct iw_priv_args we_private_args[] = {
IW_PRIV_TYPE_CHAR| WE_MAX_STR_LEN,
"getOemDataCap" },
#endif /* FEATURE_OEM_DATA_SUPPORT */
-#endif
/* handlers for main ioctl */
{ WLAN_PRIV_SET_NONE_GET_NONE,
@@ -10588,7 +10516,6 @@ static const struct iw_priv_args we_private_args[] = {
0,
0,
"reassoc" },
-#ifdef QCA_WIFI_2_0
{ WE_DUMP_AGC_START,
0,
0,
@@ -10619,7 +10546,6 @@ static const struct iw_priv_args we_private_args[] = {
0,
"dump_pcie_log" },
#endif
-#endif
/* handlers for main ioctl */
{ WLAN_PRIV_SET_VAR_INT_GET_NONE,
IW_PRIV_TYPE_INT | MAX_VAR_ARGS,
diff --git a/CORE/HDD/src/wlan_hdd_wmm.c b/CORE/HDD/src/wlan_hdd_wmm.c
index 9ca53a7d3aa5..728d2e0c8308 100644
--- a/CORE/HDD/src/wlan_hdd_wmm.c
+++ b/CORE/HDD/src/wlan_hdd_wmm.c
@@ -210,13 +210,9 @@ static void hdd_wmm_enable_tl_uapsd (hdd_wmm_qos_context_t* pQosContext)
pAc->wmmAcTspecInfo.ts_info.up,
service_interval,
suspension_interval,
-#ifdef QCA_WIFI_2_0
direction,
psb,
pAdapter->sessionId);
-#else
- direction);
-#endif
if ( !VOS_IS_STATUS_SUCCESS( status ) )
{
@@ -266,12 +262,8 @@ static void hdd_wmm_disable_tl_uapsd (hdd_wmm_qos_context_t* pQosContext)
{
status = WLANTL_DisableUAPSDForAC((WLAN_HDD_GET_CTX(pAdapter))->pvosContext,
(WLAN_HDD_GET_STATION_CTX_PTR(pAdapter))->conn_info.staId[0],
-#ifdef QCA_WIFI_2_0
acType,
pAdapter->sessionId);
-#else
- acType);
-#endif
if ( !VOS_IS_STATUS_SUCCESS( status ) )
{
@@ -388,60 +380,6 @@ static void hdd_wmm_notify_app (hdd_wmm_qos_context_t* pQosContext)
}
-#ifndef QCA_WIFI_2_0
-/**
- @brief hdd_wmm_is_access_allowed() - function which determines if access
- is allowed for the given AC. this is designed to be called during SME
- callback processing since that is when access can be granted or removed
-
- @param pAdapter : [in] pointer to adapter context
- @param pAc : [in] pointer to the per-AC status
-
- @return : VOS_TRUE - access is allowed
- : VOS_FALSE - access is not allowed
- None
-*/
-static v_BOOL_t hdd_wmm_is_access_allowed(hdd_adapter_t* pAdapter,
- hdd_wmm_ac_status_t* pAc)
-{
- // if we don't want QoS or the AP doesn't support QoS
- // or we don't want to do implicit QoS
- // or if AP doesn't require admission for this AC
- // then we have access
- if (!hdd_wmm_is_active(pAdapter) ||
- !(WLAN_HDD_GET_CTX(pAdapter))->cfg_ini->bImplicitQosEnabled ||
- !pAc->wmmAcAccessRequired)
- {
- return VOS_TRUE;
- }
-
- // if implicit QoS has already completed, successfully or not,
- // then access is allowed
- if (pAc->wmmAcAccessGranted || pAc->wmmAcAccessFailed)
- {
- return VOS_TRUE;
- }
-
- // admission is required and implicit QoS hasn't completed
- // however explicit QoS may have completed and we'll have
- // a Tspec
- // if we don't have a Tspec then access is not allowed
- if (!pAc->wmmAcTspecValid)
- {
- return VOS_FALSE;
- }
-
- // we have a Tspec -- does it allow upstream or bidirectional traffic?
- // if it only allows downstream traffic then access is not allowed
- if (pAc->wmmAcTspecInfo.ts_info.direction == SME_QOS_WMM_TS_DIR_DOWNLINK)
- {
- return VOS_FALSE;
- }
-
- // we meet all of the criteria for access
- return VOS_TRUE;
-}
-#endif /* QCA_WIFI_2_0 */
#ifdef FEATURE_WLAN_ESE
/**
@@ -1219,13 +1157,6 @@ static eHalStatus hdd_wmm_sme_callback (tHalHandle hHal,
VOS_ASSERT(0);
}
-#ifndef QCA_WIFI_2_0
- // our access to the particular access category may have changed.
- // some of the implicit QoS cases above may have already set this
- // prior to invoking TL (so that we will properly service the
- // Tx queues) but let's consistently handle all cases here
- pAc->wmmAcAccessAllowed = hdd_wmm_is_access_allowed(pAdapter, pAc);
-#else
// if Tspec only allows downstream traffic then access is not allowed
if (pAc->wmmAcTspecValid &&
(pAc->wmmAcTspecInfo.ts_info.direction == SME_QOS_WMM_TS_DIR_DOWNLINK)) {
@@ -1238,7 +1169,6 @@ static eHalStatus hdd_wmm_sme_callback (tHalHandle hHal,
!pAc->wmmAcAccessRequired) {
pAc->wmmAcAccessAllowed = VOS_TRUE;
}
-#endif
VOS_TRACE(VOS_MODULE_ID_HDD, WMM_TRACE_LEVEL_INFO,
"%s: complete, access for TL AC %d is%sallowed",
@@ -2191,13 +2121,9 @@ VOS_STATUS hdd_wmm_assoc( hdd_adapter_t* pAdapter,
7,
(WLAN_HDD_GET_CTX(pAdapter))->cfg_ini->InfraUapsdVoSrvIntv,
(WLAN_HDD_GET_CTX(pAdapter))->cfg_ini->InfraUapsdVoSuspIntv,
-#ifdef QCA_WIFI_2_0
WLANTL_BI_DIR,
1,
pAdapter->sessionId);
-#else
- WLANTL_BI_DIR);
-#endif
VOS_ASSERT( VOS_IS_STATUS_SUCCESS( status ));
}
@@ -2211,13 +2137,9 @@ VOS_STATUS hdd_wmm_assoc( hdd_adapter_t* pAdapter,
5,
(WLAN_HDD_GET_CTX(pAdapter))->cfg_ini->InfraUapsdViSrvIntv,
(WLAN_HDD_GET_CTX(pAdapter))->cfg_ini->InfraUapsdViSuspIntv,
-#ifdef QCA_WIFI_2_0
WLANTL_BI_DIR,
1,
pAdapter->sessionId);
-#else
- WLANTL_BI_DIR);
-#endif
VOS_ASSERT( VOS_IS_STATUS_SUCCESS( status ));
}
@@ -2231,13 +2153,9 @@ VOS_STATUS hdd_wmm_assoc( hdd_adapter_t* pAdapter,
2,
(WLAN_HDD_GET_CTX(pAdapter))->cfg_ini->InfraUapsdBkSrvIntv,
(WLAN_HDD_GET_CTX(pAdapter))->cfg_ini->InfraUapsdBkSuspIntv,
-#ifdef QCA_WIFI_2_0
WLANTL_BI_DIR,
1,
pAdapter->sessionId);
-#else
- WLANTL_BI_DIR);
-#endif
VOS_ASSERT( VOS_IS_STATUS_SUCCESS( status ));
}
@@ -2251,13 +2169,9 @@ VOS_STATUS hdd_wmm_assoc( hdd_adapter_t* pAdapter,
3,
(WLAN_HDD_GET_CTX(pAdapter))->cfg_ini->InfraUapsdBeSrvIntv,
(WLAN_HDD_GET_CTX(pAdapter))->cfg_ini->InfraUapsdBeSuspIntv,
-#ifdef QCA_WIFI_2_0
WLANTL_BI_DIR,
1,
pAdapter->sessionId);
-#else
- WLANTL_BI_DIR);
-#endif
VOS_ASSERT( VOS_IS_STATUS_SUCCESS( status ));
}