qcacld-3.0: Initial snapshot of ihelium wlan driver
qcacld-3.0: Initial snapshot of ihelium wlan driver
to match code-scanned SU Release 5.0.0.139. This is
open-source version of wlan for next Android release.
Change-Id: Icf598ca97da74f84bea607e4e902d1889806f507
diff --git a/core/hdd/inc/qc_sap_ioctl.h b/core/hdd/inc/qc_sap_ioctl.h
new file mode 100644
index 0000000..5fee04f
--- /dev/null
+++ b/core/hdd/inc/qc_sap_ioctl.h
@@ -0,0 +1,248 @@
+/*
+ * Copyright (c) 2012-2015 The Linux Foundation. All rights reserved.
+ *
+ * Previously licensed under the ISC license by Qualcomm Atheros, Inc.
+ *
+ *
+ * Permission to use, copy, modify, and/or distribute this software for
+ * any purpose with or without fee is hereby granted, provided that the
+ * above copyright notice and this permission notice appear in all
+ * copies.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
+ * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE
+ * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
+ * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
+ * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
+ * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
+ * PERFORMANCE OF THIS SOFTWARE.
+ */
+
+/*
+ * This file was originally distributed by Qualcomm Atheros, Inc.
+ * under proprietary terms before Copyright ownership was assigned
+ * to the Linux Foundation.
+ */
+
+#ifndef _QC_SAP_IOCTL_H_
+#define _QC_SAP_IOCTL_H_
+
+/*
+ * QCSAP ioctls.
+ */
+
+/*
+ * Max size of optional information elements. We artificially
+ * constrain this; it's limited only by the max frame size (and
+ * the max parameter size of the wireless extensions).
+ */
+#define QCSAP_MAX_OPT_IE 256
+#define QCSAP_MAX_WSC_IE 256
+#define QCSAP_MAX_GET_STA_INFO 512
+
+typedef struct sSSID {
+ uint8_t length;
+ uint8_t ssId[32];
+} tSSID;
+
+typedef struct sSSIDInfo {
+ tSSID ssid;
+ uint8_t ssidHidden;
+} tSSIDInfo;
+
+typedef enum {
+ eQC_DOT11_MODE_ALL = 0,
+ eQC_DOT11_MODE_ABG = 0x0001, /* 11a/b/g only, no HT, no proprietary */
+ eQC_DOT11_MODE_11A = 0x0002,
+ eQC_DOT11_MODE_11B = 0x0004,
+ eQC_DOT11_MODE_11G = 0x0008,
+ eQC_DOT11_MODE_11N = 0x0010,
+ eQC_DOT11_MODE_11G_ONLY = 0x0020,
+ eQC_DOT11_MODE_11N_ONLY = 0x0040,
+ eQC_DOT11_MODE_11B_ONLY = 0x0080,
+ eQC_DOT11_MODE_11A_ONLY = 0x0100,
+ /* This is for WIFI test. It is same as eWNIAPI_MAC_PROTOCOL_ALL except when it starts IBSS in 11B of 2.4GHz */
+ /* It is for CSR internal use */
+ eQC_DOT11_MODE_AUTO = 0x0200,
+
+} tQcPhyMode;
+
+#define QCSAP_ADDR_LEN 6
+
+typedef uint8_t qcmacaddr[QCSAP_ADDR_LEN];
+
+struct qc_mac_acl_entry {
+ qcmacaddr addr;
+ int vlan_id;
+};
+
+typedef enum {
+ eQC_AUTH_TYPE_OPEN_SYSTEM,
+ eQC_AUTH_TYPE_SHARED_KEY,
+ eQC_AUTH_TYPE_AUTO_SWITCH
+} eQcAuthType;
+
+typedef enum {
+ eQC_WPS_BEACON_IE,
+ eQC_WPS_PROBE_RSP_IE,
+ eQC_WPS_ASSOC_RSP_IE
+} eQCWPSType;
+
+/*
+ * Retrieve the WPA/RSN information element for an associated station.
+ */
+struct sQcSapreq_wpaie {
+ uint8_t wpa_ie[QCSAP_MAX_OPT_IE];
+ uint8_t wpa_macaddr[QCSAP_ADDR_LEN];
+};
+
+/*
+ * Retrieve the WSC information element for an associated station.
+ */
+struct sQcSapreq_wscie {
+ uint8_t wsc_macaddr[QCSAP_ADDR_LEN];
+ uint8_t wsc_ie[QCSAP_MAX_WSC_IE];
+};
+
+/*
+ * Retrieve the WPS PBC Probe Request IEs.
+ */
+typedef struct sQcSapreq_WPSPBCProbeReqIES {
+ uint8_t macaddr[QCSAP_ADDR_LEN];
+ uint16_t probeReqIELen;
+ uint8_t probeReqIE[512];
+} sQcSapreq_WPSPBCProbeReqIES_t;
+
+/*
+ * Channel List Info
+ */
+
+typedef struct {
+ uint8_t num_channels;
+ uint8_t channels[WNI_CFG_VALID_CHANNEL_LIST_LEN];
+} tChannelListInfo, *tpChannelListInfo;
+
+#ifdef __linux__
+/*
+ * Wireless Extensions API, private ioctl interfaces.
+ *
+ * NB: Even-numbered ioctl numbers have set semantics and are privileged!
+ * (regardless of the incorrect comment in wireless.h!)
+ */
+
+#define QCSAP_IOCTL_SETPARAM (SIOCIWFIRSTPRIV+0)
+#define QCSAP_IOCTL_GETPARAM (SIOCIWFIRSTPRIV+1)
+/* (SIOCIWFIRSTPRIV+2) is unused */
+/* (SIOCIWFIRSTPRIV+3) is unused */
+#define QCSAP_IOCTL_GET_STAWPAIE (SIOCIWFIRSTPRIV+4)
+#define QCSAP_IOCTL_SETWPAIE (SIOCIWFIRSTPRIV+5)
+#define QCSAP_IOCTL_STOPBSS (SIOCIWFIRSTPRIV+6)
+#define QCSAP_IOCTL_VERSION (SIOCIWFIRSTPRIV+7)
+#define QCSAP_IOCTL_GET_WPS_PBC_PROBE_REQ_IES (SIOCIWFIRSTPRIV+8)
+#define QCSAP_IOCTL_GET_CHANNEL (SIOCIWFIRSTPRIV+9)
+#define QCSAP_IOCTL_ASSOC_STA_MACADDR (SIOCIWFIRSTPRIV+10)
+#define QCSAP_IOCTL_DISASSOC_STA (SIOCIWFIRSTPRIV+11)
+/* (SIOCIWFIRSTPRIV+12) is unused */
+/* Private ioctls and their sub-ioctls */
+#define QCSAP_PRIV_GET_CHAR_SET_NONE (SIOCIWFIRSTPRIV + 13)
+#define QCSAP_GET_STATS 1
+#define QCSAP_IOCTL_CLR_STATS (SIOCIWFIRSTPRIV+14)
+
+#define QCSAP_IOCTL_PRIV_SET_THREE_INT_GET_NONE (SIOCIWFIRSTPRIV+15)
+#define WE_SET_WLAN_DBG 1
+#define WE_SET_DP_TRACE 2
+#define WE_SET_SAP_CHANNELS 3
+#define QCSAP_IOCTL_PRIV_SET_VAR_INT_GET_NONE (SIOCIWFIRSTPRIV+16)
+#define WE_UNIT_TEST_CMD 7
+#define QCSAP_IOCTL_SET_CHANNEL_RANGE (SIOCIWFIRSTPRIV+17)
+
+#define WE_P2P_NOA_CMD 2
+
+#define QCSAP_IOCTL_MODIFY_ACL (SIOCIWFIRSTPRIV+18)
+#define QCSAP_IOCTL_GET_CHANNEL_LIST (SIOCIWFIRSTPRIV+19)
+#define QCSAP_IOCTL_SET_TX_POWER (SIOCIWFIRSTPRIV+20)
+#define QCSAP_IOCTL_GET_STA_INFO (SIOCIWFIRSTPRIV+21)
+#define QCSAP_IOCTL_SET_MAX_TX_POWER (SIOCIWFIRSTPRIV+22)
+#define QCSAP_IOCTL_GET_INI_CFG (SIOCIWFIRSTPRIV+25)
+#define QCSAP_IOCTL_SET_INI_CFG (SIOCIWFIRSTPRIV+26)
+#define QCSAP_IOCTL_SET_TWO_INT_GET_NONE (SIOCIWFIRSTPRIV + 28)
+#ifdef DEBUG
+#define QCSAP_IOCTL_SET_FW_CRASH_INJECT 1
+#endif
+#define QCSAP_IOCTL_DUMP_DP_TRACE_LEVEL 2
+
+#define MAX_VAR_ARGS 7
+#define QCSAP_IOCTL_PRIV_GET_SOFTAP_LINK_SPEED (SIOCIWFIRSTPRIV + 31)
+
+#define QCSAP_IOCTL_MAX_STR_LEN 1024
+
+#define RC_2_RATE_IDX(_rc) ((_rc) & 0x7)
+#define HT_RC_2_STREAMS(_rc) ((((_rc) & 0x78) >> 3) + 1)
+
+#define RC_2_RATE_IDX_11AC(_rc) ((_rc) & 0xf)
+#define HT_RC_2_STREAMS_11AC(_rc) ((((_rc) & 0x30) >> 4) + 1)
+
+enum {
+ QCSAP_PARAM_MAX_ASSOC = 1,
+ QCSAP_PARAM_GET_WLAN_DBG,
+ QCSAP_PARAM_CLR_ACL = 4,
+ QCSAP_PARAM_ACL_MODE,
+ QCSAP_PARAM_HIDE_SSID,
+ QCSAP_PARAM_AUTO_CHANNEL,
+ QCSAP_PARAM_SET_MC_RATE,
+ QCSAP_PARAM_SET_TXRX_FW_STATS,
+ QCSAP_PARAM_SET_MCC_CHANNEL_LATENCY,
+ QCSAP_PARAM_SET_MCC_CHANNEL_QUOTA,
+ QCSAP_DBGLOG_LOG_LEVEL,
+ QCSAP_DBGLOG_VAP_ENABLE,
+ QCSAP_DBGLOG_VAP_DISABLE,
+ QCSAP_DBGLOG_MODULE_ENABLE,
+ QCSAP_DBGLOG_MODULE_DISABLE,
+ QCSAP_DBGLOG_MOD_LOG_LEVEL,
+ QCSAP_DBGLOG_TYPE,
+ QCSAP_DBGLOG_REPORT_ENABLE,
+ QCASAP_TXRX_FWSTATS_RESET,
+ QCSAP_PARAM_RTSCTS,
+ QCASAP_SET_11N_RATE,
+ QCASAP_SET_VHT_RATE,
+ QCASAP_SHORT_GI,
+ QCSAP_SET_AMPDU,
+ QCSAP_SET_AMSDU,
+ QCSAP_GTX_HT_MCS,
+ QCSAP_GTX_VHT_MCS,
+ QCSAP_GTX_USRCFG,
+ QCSAP_GTX_THRE,
+ QCSAP_GTX_MARGIN,
+ QCSAP_GTX_STEP,
+ QCSAP_GTX_MINTPC,
+ QCSAP_GTX_BWMASK,
+#ifdef QCA_PKT_PROTO_TRACE
+ QCASAP_SET_DEBUG_LOG,
+#endif
+ QCASAP_SET_TM_LEVEL,
+ QCASAP_SET_DFS_IGNORE_CAC,
+ QCASAP_GET_DFS_NOL,
+ QCASAP_SET_DFS_NOL,
+ QCSAP_PARAM_SET_CHANNEL_CHANGE,
+ QCASAP_SET_DFS_TARGET_CHNL,
+ QCASAP_SET_RADAR_CMD,
+ QCSAP_GET_ACL,
+ QCASAP_TX_CHAINMASK_CMD,
+ QCASAP_RX_CHAINMASK_CMD,
+ QCASAP_NSS_CMD,
+ QCSAP_IPA_UC_STAT,
+ QCASAP_SET_PHYMODE,
+ QCASAP_GET_TEMP_CMD,
+ QCASAP_DUMP_STATS,
+ QCASAP_CLEAR_STATS,
+ QCASAP_SET_RADAR_DBG,
+};
+
+int iw_softap_get_channel_list(struct net_device *dev,
+ struct iw_request_info *info,
+ union iwreq_data *wrqu, char *extra);
+
+#endif /* __linux__ */
+
+#endif /*_QC_SAP_IOCTL_H_*/
diff --git a/core/hdd/inc/wlan_hdd_assoc.h b/core/hdd/inc/wlan_hdd_assoc.h
new file mode 100644
index 0000000..cf136b4
--- /dev/null
+++ b/core/hdd/inc/wlan_hdd_assoc.h
@@ -0,0 +1,251 @@
+/*
+ * Copyright (c) 2013-2015 The Linux Foundation. All rights reserved.
+ *
+ * Previously licensed under the ISC license by Qualcomm Atheros, Inc.
+ *
+ *
+ * Permission to use, copy, modify, and/or distribute this software for
+ * any purpose with or without fee is hereby granted, provided that the
+ * above copyright notice and this permission notice appear in all
+ * copies.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
+ * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE
+ * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
+ * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
+ * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
+ * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
+ * PERFORMANCE OF THIS SOFTWARE.
+ */
+
+/*
+ * This file was originally distributed by Qualcomm Atheros, Inc.
+ * under proprietary terms before Copyright ownership was assigned
+ * to the Linux Foundation.
+ */
+
+#if !defined(WLAN_HDD_ASSOC_H__)
+#define WLAN_HDD_ASSOC_H__
+
+/**
+ * DOC: wlan_hdd_assoc.h
+ *
+ */
+
+/* Include files */
+#include <wlan_hdd_mib.h>
+#include <sme_api.h>
+#include <wlan_defs.h>
+#include "ol_txrx_ctrl_api.h"
+
+/* Preprocessor Definitions and Constants */
+#ifdef FEATURE_WLAN_TDLS
+#define HDD_MAX_NUM_TDLS_STA 8
+#define HDD_MAX_NUM_TDLS_STA_P_UAPSD_OFFCHAN 1
+#define TDLS_STA_INDEX_VALID(staId) \
+ (((staId) >= 1) && ((staId) < 0xFF))
+#endif
+#define TKIP_COUNTER_MEASURE_STARTED 1
+#define TKIP_COUNTER_MEASURE_STOPED 0
+/* Timeout (in ms) for Link to Up before Registering Station */
+#define ASSOC_LINKUP_TIMEOUT 60
+
+/* In pronto case, IBSS owns the first peer for bss peer.
+ In Rome case, IBSS uses the 2nd peer as bss peer */
+#define IBSS_BROADCAST_STAID 1
+
+/* Type Declarations */
+/**
+ * typedef eConnectionState - Connection states
+ * @eConnectionState_NotConnected: Not associated in Infra or participating
+ * in an IBSS / Ad-hoc network
+ * @eConnectionState_Connecting: While connection in progress
+ * @eConnectionState_Associated: Associated in an Infrastructure network
+ * @eConnectionState_IbssDisconnected: Participating in an IBSS network though
+ * disconnected (no partner stations in the IBSS)
+ * @eConnectionState_IbssConnected: Participating in an IBSS network with
+ * partner stations also present
+ * eConnectionState_Disconnecting: Disconnecting in an Infrastructure network
+ */
+typedef enum {
+ eConnectionState_NotConnected,
+ eConnectionState_Connecting,
+ eConnectionState_Associated,
+ eConnectionState_IbssDisconnected,
+ eConnectionState_IbssConnected,
+ eConnectionState_Disconnecting
+} eConnectionState;
+
+/**
+ * typedef ePeerStatus - Peer status
+ * @ePeerConnected: peer connected
+ * @ePeerDisconnected: peer disconnected
+ */
+typedef enum {
+ ePeerConnected = 1,
+ ePeerDisconnected
+} ePeerStatus;
+
+/**
+ * typedef connection_info_t - structure to store connection information
+ * @connState: connection state of the NIC
+ * @connDot11DesiredBssType: BSS type of the current connection.
+ * Comes from the MIB at the time the connect request is issued
+ * in combination with the BssDescription from the
+ * associated entity
+ * @bssId: BSSID
+ * @SSID: SSID Info
+ * @staId: Station ID
+ * @peerMacAddress:Peer Mac Address of the IBSS Stations
+ * @authType: Auth Type
+ * @ucEncryptionType: Unicast Encryption Type
+ * @mcEncryptionType: Multicast Encryption Type
+ * @Keys: Keys
+ * @operationChannel: Operation Channel
+ * @uIsAuthenticated: Remembers authenticated state
+ * @dot11Mode: dot11Mode
+ * @proxyARPService: proxy arp service
+ */
+typedef struct connection_info_s {
+ eConnectionState connState;
+ eMib_dot11DesiredBssType connDot11DesiredBssType;
+ struct cdf_mac_addr bssId;
+ tCsrSSIDInfo SSID;
+ uint8_t staId[MAX_IBSS_PEERS];
+ struct cdf_mac_addr peerMacAddress[MAX_IBSS_PEERS];
+ eCsrAuthType authType;
+ eCsrEncryptionType ucEncryptionType;
+ eCsrEncryptionType mcEncryptionType;
+ tCsrKeys Keys;
+ uint8_t operationChannel;
+ uint8_t uIsAuthenticated;
+ uint32_t dot11Mode;
+ uint8_t proxyARPService;
+} connection_info_t;
+
+/* Forward declarations */
+typedef struct hdd_adapter_s hdd_adapter_t;
+typedef struct hdd_context_s hdd_context_t;
+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;
+
+/**
+ * hdd_is_connecting() - Function to check connection progress
+ * @hdd_sta_ctx: pointer to global HDD Station context
+ *
+ * Return: true if connecting, false otherwise
+ */
+bool hdd_is_connecting(hdd_station_ctx_t *hdd_sta_ctx);
+
+/**
+ * hdd_conn_is_connected() - Function to check connection status
+ * @pHddStaCtx: pointer to global HDD Station context
+ *
+ * Return: false if any errors encountered, true otherwise
+ */
+bool hdd_conn_is_connected(hdd_station_ctx_t *pHddStaCtx);
+
+/**
+ * hdd_conn_get_connected_band() - get current connection radio band
+ * @pHddStaCtx: pointer to global HDD Station context
+ *
+ * Return: eCSR_BAND_24 or eCSR_BAND_5G based on current AP connection
+ * eCSR_BAND_ALL if not connected
+ */
+eCsrBand hdd_conn_get_connected_band(hdd_station_ctx_t *pHddStaCtx);
+
+/**
+ * hdd_sme_roam_callback() - hdd sme roam callback
+ * @pContext: pointer to adapter context
+ * @pRoamInfo: pointer to roam info
+ * @roamId: roam id
+ * @roamStatus: roam status
+ * @roamResult: roam result
+ *
+ * Return: CDF_STATUS enumeration
+ */
+CDF_STATUS hdd_sme_roam_callback(void *pContext, tCsrRoamInfo *pRoamInfo,
+ uint32_t roamId,
+ eRoamCmdStatus roamStatus,
+ eCsrRoamResult roamResult);
+
+/**
+ * hdd_conn_get_connected_bss_type() - get current bss type
+ * @pHddStaCtx: pointer to global HDD Station context
+ * @pConnectedBssType: pointer to connected bss type
+ *
+ * Return: false if any errors encountered, true otherwise
+ */
+bool
+hdd_conn_get_connected_bss_type(hdd_station_ctx_t *pHddStaCtx,
+ eMib_dot11DesiredBssType *pConnectedBssType);
+
+/**
+ * hdd_set_genie_to_csr() - set genie to csr
+ * @pAdapter: pointer to adapter
+ * @RSNAuthType: pointer to auth type
+ *
+ * Return: 0 on success, error number otherwise
+ */
+int hdd_set_genie_to_csr(hdd_adapter_t *pAdapter, eCsrAuthType *RSNAuthType);
+
+/**
+ * hdd_set_csr_auth_type() - set csr auth type
+ * @pAdapter: pointer to adapter
+ * @RSNAuthType: auth type
+ *
+ * Return: 0 on success, error number otherwise
+ */
+int hdd_set_csr_auth_type(hdd_adapter_t *pAdapter, eCsrAuthType RSNAuthType);
+
+/**
+ * hdd_roam_register_tdlssta() - register new TDLS station
+ * @pAdapter: pointer to adapter
+ * @peerMac: pointer to peer MAC address
+ * @staId: station identifier
+ * @ucastSig: unicast signature
+ *
+ * Construct the staDesc and register with TL the new STA.
+ * This is called as part of ADD_STA in the TDLS setup.
+ *
+ * Return: CDF_STATUS enumeration
+ */
+CDF_STATUS hdd_roam_register_tdlssta(hdd_adapter_t *pAdapter,
+ const uint8_t *peerMac, uint16_t staId,
+ uint8_t ucastSig);
+
+/**
+ * hdd_perform_roam_set_key_complete() - perform set key complete
+ * @pAdapter: pointer to adapter
+ *
+ * Return: none
+ */
+void hdd_perform_roam_set_key_complete(hdd_adapter_t *pAdapter);
+
+#if defined(FEATURE_WLAN_ESE) && defined(FEATURE_WLAN_ESE_UPLOAD)
+/**
+ * hdd_indicate_ese_bcn_report_no_results() - beacon report no scan results
+ * @pAdapter: pointer to adapter
+ * @measurementToken: measurement token
+ * @flag: flag
+ * @numBss: number of bss
+ *
+ * If the measurement is none and no scan results found,
+ * indicate the supplicant about measurement done.
+ *
+ * Return: none
+ */
+void
+hdd_indicate_ese_bcn_report_no_results(const hdd_adapter_t *pAdapter,
+ const uint16_t measurementToken,
+ const bool flag,
+ const uint8_t numBss);
+#endif /* FEATURE_WLAN_ESE && FEATURE_WLAN_ESE_UPLOAD */
+
+CDF_STATUS hdd_change_peer_state(hdd_adapter_t *pAdapter,
+ uint8_t sta_id,
+ enum ol_txrx_peer_state sta_state,
+ bool roam_synch_in_progress);
+#endif
diff --git a/core/hdd/inc/wlan_hdd_cfg.h b/core/hdd/inc/wlan_hdd_cfg.h
new file mode 100644
index 0000000..9b8095a
--- /dev/null
+++ b/core/hdd/inc/wlan_hdd_cfg.h
@@ -0,0 +1,3351 @@
+/*
+ * Copyright (c) 2012-2015 The Linux Foundation. All rights reserved.
+ *
+ * Previously licensed under the ISC license by Qualcomm Atheros, Inc.
+ *
+ *
+ * Permission to use, copy, modify, and/or distribute this software for
+ * any purpose with or without fee is hereby granted, provided that the
+ * above copyright notice and this permission notice appear in all
+ * copies.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
+ * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE
+ * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
+ * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
+ * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
+ * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
+ * PERFORMANCE OF THIS SOFTWARE.
+ */
+
+/*
+ * This file was originally distributed by Qualcomm Atheros, Inc.
+ * under proprietary terms before Copyright ownership was assigned
+ * to the Linux Foundation.
+ */
+
+#if !defined(HDD_CONFIG_H__)
+#define HDD_CONFIG_H__
+
+/**
+ *
+ * DOC: wlan_hdd_config.h
+ *
+ * WLAN Adapter Configuration functions
+ */
+
+/* $HEADER$ */
+
+/* Include files */
+#include <wlan_hdd_includes.h>
+#include <wlan_hdd_wmm.h>
+#include <cdf_types.h>
+#include <csr_api.h>
+#include <sap_api.h>
+#include <wmi_unified.h>
+
+#define FW_MODULE_LOG_LEVEL_STRING_LENGTH (255)
+
+#ifdef DHCP_SERVER_OFFLOAD
+#define IPADDR_NUM_ENTRIES (4)
+#define IPADDR_STRING_LENGTH (16)
+#endif
+
+/* Number of items that can be configured */
+#define MAX_CFG_INI_ITEMS 512
+
+/* Defines for all of the things we read from the configuration (registry). */
+
+#define CFG_RTS_THRESHOLD_NAME "RTSThreshold"
+#define CFG_RTS_THRESHOLD_MIN WNI_CFG_RTS_THRESHOLD_STAMIN /* min is 0, meaning always use RTS. */
+#define CFG_RTS_THRESHOLD_MAX WNI_CFG_RTS_THRESHOLD_STAMAX /* max is the max frame size */
+#define CFG_RTS_THRESHOLD_DEFAULT WNI_CFG_RTS_THRESHOLD_STADEF
+
+#define CFG_FRAG_THRESHOLD_NAME "gFragmentationThreshold"
+#define CFG_FRAG_THRESHOLD_MIN WNI_CFG_FRAGMENTATION_THRESHOLD_STAMIN
+#define CFG_FRAG_THRESHOLD_MAX WNI_CFG_FRAGMENTATION_THRESHOLD_STAMAX
+#define CFG_FRAG_THRESHOLD_DEFAULT WNI_CFG_FRAGMENTATION_THRESHOLD_STADEF
+
+#define CFG_OPERATING_CHANNEL_NAME "gOperatingChannel"
+#define CFG_OPERATING_CHANNEL_MIN (0)
+#define CFG_OPERATING_CHANNEL_MAX (14)
+#define CFG_OPERATING_CHANNEL_DEFAULT (1)
+
+#define CFG_SHORT_SLOT_TIME_ENABLED_NAME "gShortSlotTimeEnabled"
+#define CFG_SHORT_SLOT_TIME_ENABLED_MIN WNI_CFG_SHORT_SLOT_TIME_STAMIN
+#define CFG_SHORT_SLOT_TIME_ENABLED_MAX WNI_CFG_SHORT_SLOT_TIME_STAMAX
+#define CFG_SHORT_SLOT_TIME_ENABLED_DEFAULT WNI_CFG_SHORT_SLOT_TIME_STADEF
+
+#define CFG_11D_SUPPORT_ENABLED_NAME "g11dSupportEnabled"
+#define CFG_11D_SUPPORT_ENABLED_MIN WNI_CFG_11D_ENABLED_STAMIN
+#define CFG_11D_SUPPORT_ENABLED_MAX WNI_CFG_11D_ENABLED_STAMAX
+#define CFG_11D_SUPPORT_ENABLED_DEFAULT WNI_CFG_11D_ENABLED_STADEF /* Default is ON */
+
+#define CFG_11H_SUPPORT_ENABLED_NAME "g11hSupportEnabled"
+#define CFG_11H_SUPPORT_ENABLED_MIN (0)
+#define CFG_11H_SUPPORT_ENABLED_MAX (1)
+#define CFG_11H_SUPPORT_ENABLED_DEFAULT (1) /* Default is ON */
+
+/* COUNTRY Code Priority */
+#define CFG_COUNTRY_CODE_PRIORITY_NAME "gCountryCodePriority"
+#define CFG_COUNTRY_CODE_PRIORITY_MIN (0)
+#define CFG_COUNTRY_CODE_PRIORITY_MAX (1)
+#define CFG_COUNTRY_CODE_PRIORITY_DEFAULT (0)
+
+#define CFG_HEARTBEAT_THRESH_24_NAME "gHeartbeat24"
+#define CFG_HEARTBEAT_THRESH_24_MIN WNI_CFG_HEART_BEAT_THRESHOLD_STAMIN
+#define CFG_HEARTBEAT_THRESH_24_MAX WNI_CFG_HEART_BEAT_THRESHOLD_STAMAX
+#define CFG_HEARTBEAT_THRESH_24_DEFAULT WNI_CFG_HEART_BEAT_THRESHOLD_STADEF
+
+#define CFG_POWER_USAGE_NAME "gPowerUsage"
+#define CFG_POWER_USAGE_MIN "Min" /* Minimum Power Save */
+#define CFG_POWER_USAGE_MAX "Max" /* Maximum Power Save */
+#define CFG_POWER_USAGE_DEFAULT "Mod" /* Moderate Power Save */
+
+#define CFG_WOWL_PATTERN_NAME "gWowlPattern"
+#define CFG_WOWL_PATTERN_DEFAULT ""
+
+/* IMPS = IdleModePowerSave */
+#define CFG_ENABLE_IMPS_NAME "gEnableImps"
+#define CFG_ENABLE_IMPS_MIN (0)
+#define CFG_ENABLE_IMPS_MAX (1)
+#define CFG_ENABLE_IMPS_DEFAULT (1)
+
+/* PS = PowerSave */
+#define CFG_ENABLE_PS_NAME "gEnableBmps"
+#define CFG_ENABLE_PS_MIN (0)
+#define CFG_ENABLE_PS_MAX (1)
+#define CFG_ENABLE_PS_DEFAULT (1)
+
+#define CFG_BMPS_MINIMUM_LI_NAME "gBmpsMinListenInterval"
+#define CFG_BMPS_MINIMUM_LI_MIN (1)
+#define CFG_BMPS_MINIMUM_LI_MAX (65535)
+#define CFG_BMPS_MINIMUM_LI_DEFAULT (1)
+
+#define CFG_BMPS_MODERATE_LI_NAME "gBmpsModListenInterval"
+#define CFG_BMPS_MODERATE_LI_MIN (1)
+#define CFG_BMPS_MODERATE_LI_MAX (65535)
+#define CFG_BMPS_MODERATE_LI_DEFAULT (1)
+
+#define CFG_BMPS_MAXIMUM_LI_NAME "gBmpsMaxListenInterval"
+#define CFG_BMPS_MAXIMUM_LI_MIN (1)
+#define CFG_BMPS_MAXIMUM_LI_MAX (65535)
+#define CFG_BMPS_MAXIMUM_LI_DEFAULT (1)
+
+#define CFG_MAX_RX_AMPDU_FACTOR_NAME "gMaxRxAmpduFactor"
+#define CFG_MAX_RX_AMPDU_FACTOR_MIN WNI_CFG_MAX_RX_AMPDU_FACTOR_STAMIN
+#define CFG_MAX_RX_AMPDU_FACTOR_MAX WNI_CFG_MAX_RX_AMPDU_FACTOR_STAMAX
+#define CFG_MAX_RX_AMPDU_FACTOR_DEFAULT WNI_CFG_MAX_RX_AMPDU_FACTOR_STADEF
+
+/* Configuration added to enable/disable CTS2SELF in */
+/* Adaptive RX drain feature */
+#define CFG_ENABLE_ADAPT_RX_DRAIN_NAME "gEnableAdaptRxDrain"
+#define CFG_ENABLE_ADAPT_RX_DRAIN_MIN WNI_CFG_ENABLE_ADAPT_RX_DRAIN_STAMIN
+#define CFG_ENABLE_ADAPT_RX_DRAIN_MAX WNI_CFG_ENABLE_ADAPT_RX_DRAIN_STAMAX
+#define CFG_ENABLE_ADAPT_RX_DRAIN_DEFAULT WNI_CFG_ENABLE_ADAPT_RX_DRAIN_STADEF
+
+#define CFG_REG_CHANGE_DEF_COUNTRY_NAME "gRegulatoryChangeCountry"
+#define CFG_REG_CHANGE_DEF_COUNTRY_DEFAULT (0)
+#define CFG_REG_CHANGE_DEF_COUNTRY_MIN (0)
+#define CFG_REG_CHANGE_DEF_COUNTRY_MAX (1)
+
+#define CFG_ADVERTISE_CONCURRENT_OPERATION_NAME "gAdvertiseConcurrentOperation"
+#define CFG_ADVERTISE_CONCURRENT_OPERATION_DEFAULT (1)
+#define CFG_ADVERTISE_CONCURRENT_OPERATION_MIN (0)
+#define CFG_ADVERTISE_CONCURRENT_OPERATION_MAX (1)
+
+typedef enum {
+ eHDD_DOT11_MODE_AUTO = 0, /* covers all things we support */
+ eHDD_DOT11_MODE_abg, /* 11a/b/g only, no HT, no proprietary */
+ eHDD_DOT11_MODE_11b,
+ eHDD_DOT11_MODE_11g,
+ eHDD_DOT11_MODE_11n,
+ eHDD_DOT11_MODE_11g_ONLY,
+ eHDD_DOT11_MODE_11n_ONLY,
+ eHDD_DOT11_MODE_11b_ONLY,
+ eHDD_DOT11_MODE_11ac_ONLY,
+ eHDD_DOT11_MODE_11ac,
+ eHDD_DOT11_MODE_11a,
+} eHddDot11Mode;
+
+#define CFG_DOT11_MODE_NAME "gDot11Mode"
+#define CFG_DOT11_MODE_MIN eHDD_DOT11_MODE_AUTO
+#ifdef WLAN_FEATURE_11AC
+#define CFG_DOT11_MODE_DEFAULT eHDD_DOT11_MODE_11ac
+#else
+#define CFG_DOT11_MODE_DEFAULT eHDD_DOT11_MODE_11n
+#endif
+#define CFG_DOT11_MODE_MAX eHDD_DOT11_MODE_11a
+
+#define CFG_CHANNEL_BONDING_MODE_24GHZ_NAME "gChannelBondingMode24GHz"
+#define CFG_CHANNEL_BONDING_MODE_MIN WNI_CFG_CHANNEL_BONDING_MODE_STAMIN
+#define CFG_CHANNEL_BONDING_MODE_MAX WNI_CFG_CHANNEL_BONDING_MODE_STAMAX
+#define CFG_CHANNEL_BONDING_MODE_DEFAULT WNI_CFG_CHANNEL_BONDING_MODE_STADEF
+
+#define CFG_CHANNEL_BONDING_MODE_5GHZ_NAME "gChannelBondingMode5GHz"
+#define CFG_CHANNEL_BONDING_MODE_MIN WNI_CFG_CHANNEL_BONDING_MODE_STAMIN
+#define CFG_CHANNEL_BONDING_MODE_MAX WNI_CFG_CHANNEL_BONDING_MODE_STAMAX
+#define CFG_CHANNEL_BONDING_MODE_DEFAULT WNI_CFG_CHANNEL_BONDING_MODE_STADEF
+
+#define CFG_FIXED_RATE_NAME "gFixedRate"
+#define CFG_FIXED_RATE_MIN WNI_CFG_FIXED_RATE_STAMIN
+#define CFG_FIXED_RATE_MAX WNI_CFG_FIXED_RATE_STAMAX
+#define CFG_FIXED_RATE_DEFAULT WNI_CFG_FIXED_RATE_STADEF
+
+#define CFG_SHORT_GI_20MHZ_NAME "gShortGI20Mhz"
+#define CFG_SHORT_GI_20MHZ_MIN WNI_CFG_SHORT_GI_20MHZ_STAMIN
+#define CFG_SHORT_GI_20MHZ_MAX WNI_CFG_SHORT_GI_20MHZ_STAMAX
+#define CFG_SHORT_GI_20MHZ_DEFAULT WNI_CFG_SHORT_GI_20MHZ_STADEF
+
+#define CFG_SCAN_RESULT_AGE_COUNT_NAME "gScanResultAgeCount"
+#define CFG_SCAN_RESULT_AGE_COUNT_MIN (1)
+#define CFG_SCAN_RESULT_AGE_COUNT_MAX (100)
+#define CFG_SCAN_RESULT_AGE_COUNT_DEFAULT (3)
+
+/* All in seconds */
+/* Not Connect, No Power Save */
+#define CFG_SCAN_RESULT_AGE_TIME_NCNPS_NAME "gScanResultAgeNCNPS"
+#define CFG_SCAN_RESULT_AGE_TIME_NCNPS_MIN (10)
+#define CFG_SCAN_RESULT_AGE_TIME_NCNPS_MAX (10000)
+#define CFG_SCAN_RESULT_AGE_TIME_NCNPS_DEFAULT (50)
+/* Not Connect, Power Save */
+#define CFG_SCAN_RESULT_AGE_TIME_NCPS_NAME "gScanResultAgeNCPS"
+#define CFG_SCAN_RESULT_AGE_TIME_NCPS_MIN (10)
+#define CFG_SCAN_RESULT_AGE_TIME_NCPS_MAX (10000)
+#define CFG_SCAN_RESULT_AGE_TIME_NCPS_DEFAULT (300)
+/* Connect, No Power Save */
+#define CFG_SCAN_RESULT_AGE_TIME_CNPS_NAME "gScanResultAgeCNPS"
+#define CFG_SCAN_RESULT_AGE_TIME_CNPS_MIN (10)
+#define CFG_SCAN_RESULT_AGE_TIME_CNPS_MAX (10000)
+#define CFG_SCAN_RESULT_AGE_TIME_CNPS_DEFAULT (150)
+/* Connect, Power Save */
+#define CFG_SCAN_RESULT_AGE_TIME_CPS_NAME "gScanResultAgeCPS"
+#define CFG_SCAN_RESULT_AGE_TIME_CPS_MIN (10)
+#define CFG_SCAN_RESULT_AGE_TIME_CPS_MAX (10000)
+#define CFG_SCAN_RESULT_AGE_TIME_CPS_DEFAULT (600)
+
+#define CFG_RSSI_CATEGORY_GAP_NAME "gRssiCatGap"
+#define CFG_RSSI_CATEGORY_GAP_MIN (5)
+#define CFG_RSSI_CATEGORY_GAP_MAX (100)
+#define CFG_RSSI_CATEGORY_GAP_DEFAULT (5)
+
+#if defined (WLAN_FEATURE_VOWIFI_11R) || defined (FEATURE_WLAN_ESE) || defined(FEATURE_WLAN_LFR)
+#define CFG_ROAM_PREFER_5GHZ "gRoamPrefer5GHz"
+#define CFG_ROAM_PREFER_5GHZ_MIN (0)
+#define CFG_ROAM_PREFER_5GHZ_MAX (1)
+#define CFG_ROAM_PREFER_5GHZ_DEFAULT (1)
+
+/*
+ To enable, set gRoamIntraBand=1 (Roaming within band)
+ To disable, set gRoamIntraBand=0 (Roaming across band)
+ */
+#define CFG_ROAM_INTRA_BAND "gRoamIntraBand"
+#define CFG_ROAM_INTRA_BAND_MIN (0)
+#define CFG_ROAM_INTRA_BAND_MAX (1)
+#define CFG_ROAM_INTRA_BAND_DEFAULT (0)
+#endif
+
+#define CFG_SHORT_PREAMBLE_NAME "gShortPreamble"
+#define CFG_SHORT_PREAMBLE_MIN WNI_CFG_SHORT_PREAMBLE_STAMIN
+#define CFG_SHORT_PREAMBLE_MAX WNI_CFG_SHORT_PREAMBLE_STAMAX
+#define CFG_SHORT_PREAMBLE_DEFAULT WNI_CFG_SHORT_PREAMBLE_STADEF
+
+#define CFG_IBSS_BSSID_NAME "gIbssBssid"
+#define CFG_IBSS_BSSID_MIN "000000000000"
+#define CFG_IBSS_BSSID_MAX "ffffffffffff"
+#define CFG_IBSS_BSSID_DEFAULT "000AF5040506"
+
+#define CFG_INTF0_MAC_ADDR_NAME "Intf0MacAddress"
+#define CFG_INTF0_MAC_ADDR_MIN "000000000000"
+#define CFG_INTF0_MAC_ADDR_MAX "ffffffffffff"
+#define CFG_INTF0_MAC_ADDR_DEFAULT "000AF5898980"
+
+#define CFG_INTF1_MAC_ADDR_NAME "Intf1MacAddress"
+#define CFG_INTF1_MAC_ADDR_MIN "000000000000"
+#define CFG_INTF1_MAC_ADDR_MAX "ffffffffffff"
+#define CFG_INTF1_MAC_ADDR_DEFAULT "000AF5898981"
+
+#define CFG_INTF2_MAC_ADDR_NAME "Intf2MacAddress"
+#define CFG_INTF2_MAC_ADDR_MIN "000000000000"
+#define CFG_INTF2_MAC_ADDR_MAX "ffffffffffff"
+#define CFG_INTF2_MAC_ADDR_DEFAULT "000AF5898982"
+
+#define CFG_INTF3_MAC_ADDR_NAME "Intf3MacAddress"
+#define CFG_INTF3_MAC_ADDR_MIN "000000000000"
+#define CFG_INTF3_MAC_ADDR_MAX "ffffffffffff"
+#define CFG_INTF3_MAC_ADDR_DEFAULT "000AF5898983"
+
+#define CFG_AP_QOS_UAPSD_MODE_NAME "gEnableApUapsd" /* ACs to setup U-APSD for at assoc */
+#define CFG_AP_QOS_UAPSD_MODE_MIN (0)
+#define CFG_AP_QOS_UAPSD_MODE_MAX (1)
+#define CFG_AP_QOS_UAPSD_MODE_DEFAULT (1)
+
+#define CFG_AP_ENABLE_RANDOM_BSSID_NAME "gEnableApRandomBssid"
+#define CFG_AP_ENABLE_RANDOM_BSSID_MIN (0)
+#define CFG_AP_ENABLE_RANDOM_BSSID_MAX (1)
+#define CFG_AP_ENABLE_RANDOM_BSSID_DEFAULT (0)
+
+#define CFG_AP_ENABLE_PROTECTION_MODE_NAME "gEnableApProt"
+#define CFG_AP_ENABLE_PROTECTION_MODE_MIN (0)
+#define CFG_AP_ENABLE_PROTECTION_MODE_MAX (1)
+#define CFG_AP_ENABLE_PROTECTION_MODE_DEFAULT (1)
+
+/* Bit map for CFG_AP_PROTECTION_MODE_DEFAULT */
+/* LOWER byte for associated stations */
+/* UPPER byte for overlapping stations */
+/* each byte will have the following info */
+/* bit15 bit14 bit13 bit12 bit11 bit10 bit9 bit8 */
+/* OBSS RIFS LSIG_TXOP NON_GF HT20 FROM_11G FROM_11B FROM_11A */
+/* bit7 bit6 bit5 bit4 bit3 bit2 bit1 bit0 */
+/* OBSS RIFS LSIG_TXOP NON_GF HT_20 FROM_11G FROM_11B FROM_11A */
+#define CFG_AP_PROTECTION_MODE_NAME "gApProtection"
+#define CFG_AP_PROTECTION_MODE_MIN (0x0)
+#define CFG_AP_PROTECTION_MODE_MAX (0xFFFF)
+#define CFG_AP_PROTECTION_MODE_DEFAULT (0xBFFF)
+
+#define CFG_AP_OBSS_PROTECTION_MODE_NAME "gEnableApOBSSProt"
+#define CFG_AP_OBSS_PROTECTION_MODE_MIN (0)
+#define CFG_AP_OBSS_PROTECTION_MODE_MAX (1)
+#define CFG_AP_OBSS_PROTECTION_MODE_DEFAULT (0)
+
+#define CFG_AP_STA_SECURITY_SEPERATION_NAME "gDisableIntraBssFwd"
+#define CFG_AP_STA_SECURITY_SEPERATION_MIN (0)
+#define CFG_AP_STA_SECURITY_SEPERATION_MAX (1)
+#define CFG_AP_STA_SECURITY_SEPERATION_DEFAULT (0)
+
+#define CFG_AP_LISTEN_MODE_NAME "gEnablePhyAgcListenMode"
+#define CFG_AP_LISTEN_MODE_MIN (0)
+#define CFG_AP_LISTEN_MODE_MAX (128)
+#define CFG_AP_LISTEN_MODE_DEFAULT (128)
+
+#define CFG_AP_AUTO_SHUT_OFF "gAPAutoShutOff"
+#define CFG_AP_AUTO_SHUT_OFF_MIN (0)
+#define CFG_AP_AUTO_SHUT_OFF_MAX (4294967295UL)
+#define CFG_AP_AUTO_SHUT_OFF_DEFAULT (0)
+
+#ifdef FEATURE_WLAN_AUTO_SHUTDOWN
+#define CFG_WLAN_AUTO_SHUTDOWN "gWlanAutoShutdown"
+#define CFG_WLAN_AUTO_SHUTDOWN_MIN (0)
+#define CFG_WLAN_AUTO_SHUTDOWN_MAX (86400) /* Max 1 day timeout */
+#define CFG_WLAN_AUTO_SHUTDOWN_DEFAULT (0)
+#endif
+
+#ifdef FEATURE_WLAN_MCC_TO_SCC_SWITCH
+#define CFG_WLAN_MCC_TO_SCC_SWITCH_MODE "gWlanMccToSccSwitchMode"
+#define CFG_WLAN_MCC_TO_SCC_SWITCH_MODE_MIN (CDF_MCC_TO_SCC_SWITCH_DISABLE)
+#define CFG_WLAN_MCC_TO_SCC_SWITCH_MODE_MAX (CDF_MCC_TO_SCC_SWITCH_FORCE)
+#define CFG_WLAN_MCC_TO_SCC_SWITCH_MODE_DEFAULT (CDF_MCC_TO_SCC_SWITCH_DISABLE)
+#endif
+
+#define CFG_DISABLE_PACKET_FILTER "gDisablePacketFilter"
+#define CFG_DISABLE_PACKET_FILTER_MIN (0)
+#define CFG_DISABLE_PACKET_FILTER_MAX (0x1)
+#define CFG_DISABLE_PACKET_FILTER_DEFAULT (0)
+
+#define CFG_ENABLE_LTE_COEX "gEnableLTECoex"
+#define CFG_ENABLE_LTE_COEX_MIN (0)
+#define CFG_ENABLE_LTE_COEX_MAX (1)
+#define CFG_ENABLE_LTE_COEX_DEFAULT (0)
+
+#define CFG_AP_KEEP_ALIVE_PERIOD_NAME "gApKeepAlivePeriod"
+#define CFG_AP_KEEP_ALIVE_PERIOD_MIN WNI_CFG_AP_KEEP_ALIVE_TIMEOUT_STAMIN
+#define CFG_AP_KEEP_ALIVE_PERIOD_MAX WNI_CFG_AP_KEEP_ALIVE_TIMEOUT_STAMAX
+#define CFG_AP_KEEP_ALIVE_PERIOD_DEFAULT WNI_CFG_AP_KEEP_ALIVE_TIMEOUT_STADEF
+
+#define CFG_GO_KEEP_ALIVE_PERIOD_NAME "gGoKeepAlivePeriod"
+#define CFG_GO_KEEP_ALIVE_PERIOD_MIN WNI_CFG_GO_KEEP_ALIVE_TIMEOUT_STAMIN
+#define CFG_GO_KEEP_ALIVE_PERIOD_MAX WNI_CFG_GO_KEEP_ALIVE_TIMEOUT_STAMAX
+#define CFG_GO_KEEP_ALIVE_PERIOD_DEFAULT WNI_CFG_GO_KEEP_ALIVE_TIMEOUT_STADEF
+
+#define CFG_AP_LINK_MONITOR_PERIOD_NAME "gApLinkMonitorPeriod"
+#define CFG_AP_LINK_MONITOR_PERIOD_MIN (3)
+#define CFG_AP_LINK_MONITOR_PERIOD_MAX (50)
+#define CFG_AP_LINK_MONITOR_PERIOD_DEFAULT (10)
+
+/* gGoLinkMonitorPeriod is period where link is idle and where
+ * we send NULL frame
+ */
+#define CFG_GO_LINK_MONITOR_PERIOD_NAME "gGoLinkMonitorPeriod"
+#define CFG_GO_LINK_MONITOR_PERIOD_MIN (3)
+#define CFG_GO_LINK_MONITOR_PERIOD_MAX (50)
+#define CFG_GO_LINK_MONITOR_PERIOD_DEFAULT (10)
+
+#define CFG_BEACON_INTERVAL_NAME "gBeaconInterval"
+#define CFG_BEACON_INTERVAL_MIN WNI_CFG_BEACON_INTERVAL_STAMIN
+#define CFG_BEACON_INTERVAL_MAX WNI_CFG_BEACON_INTERVAL_STAMAX
+#define CFG_BEACON_INTERVAL_DEFAULT WNI_CFG_BEACON_INTERVAL_STADEF
+
+/* Additional Handoff related Parameters */
+#define CFG_ROAMING_TIME_NAME "gRoamingTime"
+#define CFG_ROAMING_TIME_MIN (0)
+#define CFG_ROAMING_TIME_MAX (4294967UL)
+#define CFG_ROAMING_TIME_DEFAULT (10)
+
+#define CFG_VCC_RSSI_TRIGGER_NAME "gVccRssiTrigger"
+#define CFG_VCC_RSSI_TRIGGER_MIN (0)
+#define CFG_VCC_RSSI_TRIGGER_MAX (80)
+#define CFG_VCC_RSSI_TRIGGER_DEFAULT (80)
+
+#define CFG_VCC_UL_MAC_LOSS_THRESH_NAME "gVccUlMacLossThresh"
+#define CFG_VCC_UL_MAC_LOSS_THRESH_MIN (0)
+#define CFG_VCC_UL_MAC_LOSS_THRESH_MAX (9)
+#define CFG_VCC_UL_MAC_LOSS_THRESH_DEFAULT (9)
+
+#define CFG_PASSIVE_MAX_CHANNEL_TIME_NAME "gPassiveMaxChannelTime"
+#define CFG_PASSIVE_MAX_CHANNEL_TIME_MIN (0)
+#define CFG_PASSIVE_MAX_CHANNEL_TIME_MAX (10000)
+#define CFG_PASSIVE_MAX_CHANNEL_TIME_DEFAULT (110)
+
+#define CFG_PASSIVE_MIN_CHANNEL_TIME_NAME "gPassiveMinChannelTime"
+#define CFG_PASSIVE_MIN_CHANNEL_TIME_MIN (0)
+#define CFG_PASSIVE_MIN_CHANNEL_TIME_MAX (10000)
+#define CFG_PASSIVE_MIN_CHANNEL_TIME_DEFAULT (60)
+
+#define CFG_ACTIVE_MAX_CHANNEL_TIME_NAME "gActiveMaxChannelTime"
+#define CFG_ACTIVE_MAX_CHANNEL_TIME_MIN (0)
+#define CFG_ACTIVE_MAX_CHANNEL_TIME_MAX (10000)
+#define CFG_ACTIVE_MAX_CHANNEL_TIME_DEFAULT (40)
+
+#define CFG_ACTIVE_MIN_CHANNEL_TIME_NAME "gActiveMinChannelTime"
+#define CFG_ACTIVE_MIN_CHANNEL_TIME_MIN (0)
+#define CFG_ACTIVE_MIN_CHANNEL_TIME_MAX (10000)
+#define CFG_ACTIVE_MIN_CHANNEL_TIME_DEFAULT (20)
+
+#define CFG_RETRY_LIMIT_ZERO_NAME "gRetryLimitZero"
+#define CFG_RETRY_LIMIT_ZERO_MIN (0)
+#define CFG_RETRY_LIMIT_ZERO_MAX (15)
+#define CFG_RETRY_LIMIT_ZERO_DEFAULT (5)
+
+#define CFG_RETRY_LIMIT_ONE_NAME "gRetryLimitOne"
+#define CFG_RETRY_LIMIT_ONE_MIN (0)
+#define CFG_RETRY_LIMIT_ONE_MAX (15)
+#define CFG_RETRY_LIMIT_ONE_DEFAULT (10)
+
+#define CFG_RETRY_LIMIT_TWO_NAME "gRetryLimitTwo"
+#define CFG_RETRY_LIMIT_TWO_MIN (0)
+#define CFG_RETRY_LIMIT_TWO_MAX (15)
+#define CFG_RETRY_LIMIT_TWO_DEFAULT (15)
+
+#ifdef WLAN_AP_STA_CONCURRENCY
+
+#define CFG_PASSIVE_MAX_CHANNEL_TIME_CONC_NAME "gPassiveMaxChannelTimeConc"
+#define CFG_PASSIVE_MAX_CHANNEL_TIME_CONC_MIN (0)
+#define CFG_PASSIVE_MAX_CHANNEL_TIME_CONC_MAX (10000)
+#define CFG_PASSIVE_MAX_CHANNEL_TIME_CONC_DEFAULT (110)
+
+#define CFG_PASSIVE_MIN_CHANNEL_TIME_CONC_NAME "gPassiveMinChannelTimeConc"
+#define CFG_PASSIVE_MIN_CHANNEL_TIME_CONC_MIN (0)
+#define CFG_PASSIVE_MIN_CHANNEL_TIME_CONC_MAX (10000)
+#define CFG_PASSIVE_MIN_CHANNEL_TIME_CONC_DEFAULT (60)
+
+#define CFG_ACTIVE_MAX_CHANNEL_TIME_CONC_NAME "gActiveMaxChannelTimeConc"
+#define CFG_ACTIVE_MAX_CHANNEL_TIME_CONC_MIN (0)
+#define CFG_ACTIVE_MAX_CHANNEL_TIME_CONC_MAX (10000)
+#define CFG_ACTIVE_MAX_CHANNEL_TIME_CONC_DEFAULT (40)
+
+#define CFG_ACTIVE_MIN_CHANNEL_TIME_CONC_NAME "gActiveMinChannelTimeConc"
+#define CFG_ACTIVE_MIN_CHANNEL_TIME_CONC_MIN (0)
+#define CFG_ACTIVE_MIN_CHANNEL_TIME_CONC_MAX (10000)
+#define CFG_ACTIVE_MIN_CHANNEL_TIME_CONC_DEFAULT (20)
+
+#define CFG_REST_TIME_CONC_NAME "gRestTimeConc"
+#define CFG_REST_TIME_CONC_MIN (0)
+#define CFG_REST_TIME_CONC_MAX (10000)
+#define CFG_REST_TIME_CONC_DEFAULT (100)
+
+#define CFG_NUM_STA_CHAN_COMBINED_CONC_NAME "gNumStaChanCombinedConc"
+#define CFG_NUM_STA_CHAN_COMBINED_CONC_MIN (1)
+#define CFG_NUM_STA_CHAN_COMBINED_CONC_MAX (255)
+#define CFG_NUM_STA_CHAN_COMBINED_CONC_DEFAULT (3)
+
+#define CFG_NUM_P2P_CHAN_COMBINED_CONC_NAME "gNumP2PChanCombinedConc"
+#define CFG_NUM_P2P_CHAN_COMBINED_CONC_MIN (1)
+#define CFG_NUM_P2P_CHAN_COMBINED_CONC_MAX (255)
+#define CFG_NUM_P2P_CHAN_COMBINED_CONC_DEFAULT (1)
+#endif
+
+#define CFG_MAX_PS_POLL_NAME "gMaxPsPoll"
+#define CFG_MAX_PS_POLL_MIN WNI_CFG_MAX_PS_POLL_STAMIN
+#define CFG_MAX_PS_POLL_MAX WNI_CFG_MAX_PS_POLL_STAMAX
+#define CFG_MAX_PS_POLL_DEFAULT WNI_CFG_MAX_PS_POLL_STADEF
+
+#define CFG_MAX_TX_POWER_NAME "gTxPowerCap"
+#define CFG_MAX_TX_POWER_MIN WNI_CFG_CURRENT_TX_POWER_LEVEL_STAMIN
+#define CFG_MAX_TX_POWER_MAX WNI_CFG_CURRENT_TX_POWER_LEVEL_STAMAX
+/* Not to use CFG default because if no registry setting, this is ignored by SME. */
+#define CFG_MAX_TX_POWER_DEFAULT WNI_CFG_CURRENT_TX_POWER_LEVEL_STAMAX
+
+#define CFG_LOW_GAIN_OVERRIDE_NAME "gLowGainOverride"
+#define CFG_LOW_GAIN_OVERRIDE_MIN WNI_CFG_LOW_GAIN_OVERRIDE_STAMIN
+#define CFG_LOW_GAIN_OVERRIDE_MAX WNI_CFG_LOW_GAIN_OVERRIDE_STAMAX
+#define CFG_LOW_GAIN_OVERRIDE_DEFAULT WNI_CFG_LOW_GAIN_OVERRIDE_STADEF
+
+#define CFG_RSSI_FILTER_PERIOD_NAME "gRssiFilterPeriod"
+#define CFG_RSSI_FILTER_PERIOD_MIN WNI_CFG_RSSI_FILTER_PERIOD_STAMIN
+#define CFG_RSSI_FILTER_PERIOD_MAX WNI_CFG_RSSI_FILTER_PERIOD_STAMAX
+/* Increased this value for Non-ESE AP. This is cause FW RSSI Monitoring */
+/* the consumer of this value is ON by default. So to impact power numbers */
+/* we are setting this to a high value. */
+#define CFG_RSSI_FILTER_PERIOD_DEFAULT WNI_CFG_RSSI_FILTER_PERIOD_STADEF
+
+#define CFG_IGNORE_DTIM_NAME "gIgnoreDtim"
+#define CFG_IGNORE_DTIM_MIN WNI_CFG_IGNORE_DTIM_STAMIN
+#define CFG_IGNORE_DTIM_MAX WNI_CFG_IGNORE_DTIM_STAMAX
+#define CFG_IGNORE_DTIM_DEFAULT WNI_CFG_IGNORE_DTIM_STADEF
+
+#define CFG_MAX_LI_MODULATED_DTIM_NAME "gMaxLIModulatedDTIM"
+#define CFG_MAX_LI_MODULATED_DTIM_MIN (1)
+#define CFG_MAX_LI_MODULATED_DTIM_MAX (10)
+#define CFG_MAX_LI_MODULATED_DTIM_DEFAULT (10)
+
+#define CFG_RX_ANT_CONFIGURATION_NAME "gNumRxAnt"
+#define CFG_RX_ANT_CONFIGURATION_NAME_MIN (1)
+#define CFG_RX_ANT_CONFIGURATION_NAME_MAX (2)
+#define CFG_RX_ANT_CONFIGURATION_NAME_DEFAULT (2)
+
+#define CFG_FW_HEART_BEAT_MONITORING_NAME "gEnableFWHeartBeatMonitoring"
+#define CFG_FW_HEART_BEAT_MONITORING_MIN (0)
+#define CFG_FW_HEART_BEAT_MONITORING_MAX (1)
+#define CFG_FW_HEART_BEAT_MONITORING_DEFAULT (1)
+
+#define CFG_FW_BEACON_FILTERING_NAME "gEnableFWBeaconFiltering"
+#define CFG_FW_BEACON_FILTERING_MIN (0)
+#define CFG_FW_BEACON_FILTERING_MAX (1)
+#define CFG_FW_BEACON_FILTERING_DEFAULT (1)
+
+#define CFG_FW_RSSI_MONITORING_NAME "gEnableFWRssiMonitoring"
+#define CFG_FW_RSSI_MONITORING_MIN (0)
+#define CFG_FW_RSSI_MONITORING_MAX (1)
+#define CFG_FW_RSSI_MONITORING_DEFAULT (1)
+
+/* enable use of long duration RTS-CTS protection when SAP goes off channel
+ * in MCC mode
+ */
+#define CFG_FW_MCC_RTS_CTS_PROT_NAME "gFWMccRtsCtsProtection"
+#define CFG_FW_MCC_RTS_CTS_PROT_MIN (0)
+#define CFG_FW_MCC_RTS_CTS_PROT_MAX (1)
+#define CFG_FW_MCC_RTS_CTS_PROT_DEFAULT (0)
+
+/* Enable use of broadcast probe response to increase the detectability of
+ * SAP in MCC mode
+ */
+#define CFG_FW_MCC_BCAST_PROB_RESP_NAME "gFWMccBCastProbeResponse"
+#define CFG_FW_MCC_BCAST_PROB_RESP_MIN (0)
+#define CFG_FW_MCC_BCAST_PROB_RESP_MAX (1)
+#define CFG_FW_MCC_BCAST_PROB_RESP_DEFAULT (0)
+
+#define CFG_DATA_INACTIVITY_TIMEOUT_NAME "gDataInactivityTimeout"
+#define CFG_DATA_INACTIVITY_TIMEOUT_MIN (1)
+#define CFG_DATA_INACTIVITY_TIMEOUT_MAX (255)
+#define CFG_DATA_INACTIVITY_TIMEOUT_DEFAULT (20)
+
+#define CFG_RF_SETTLING_TIME_CLK_NAME "rfSettlingTimeUs"
+#define CFG_RF_SETTLING_TIME_CLK_MIN (0)
+#define CFG_RF_SETTLING_TIME_CLK_MAX (60000)
+#define CFG_RF_SETTLING_TIME_CLK_DEFAULT (1500)
+
+#define CFG_INFRA_STA_KEEP_ALIVE_PERIOD_NAME "gStaKeepAlivePeriod"
+#define CFG_INFRA_STA_KEEP_ALIVE_PERIOD_MIN (0)
+#define CFG_INFRA_STA_KEEP_ALIVE_PERIOD_MAX (65535)
+#define CFG_INFRA_STA_KEEP_ALIVE_PERIOD_DEFAULT (0)
+
+/* WMM configuration */
+#define CFG_QOS_WMM_MODE_NAME "WmmIsEnabled"
+#define CFG_QOS_WMM_MODE_MIN (0)
+#define CFG_QOS_WMM_MODE_MAX (2) /* HDD_WMM_NO_QOS */
+#define CFG_QOS_WMM_MODE_DEFAULT (0) /* HDD_WMM_AUTO */
+
+#define CFG_QOS_WMM_80211E_ENABLED_NAME "80211eIsEnabled"
+#define CFG_QOS_WMM_80211E_ENABLED_MIN (0)
+#define CFG_QOS_WMM_80211E_ENABLED_MAX (1)
+#define CFG_QOS_WMM_80211E_ENABLED_DEFAULT (0)
+
+#define CFG_QOS_WMM_UAPSD_MASK_NAME "UapsdMask" /* ACs to setup U-APSD for at assoc */
+#define CFG_QOS_WMM_UAPSD_MASK_MIN (0x00)
+#define CFG_QOS_WMM_UAPSD_MASK_MAX (0xFF)
+#define CFG_QOS_WMM_UAPSD_MASK_DEFAULT (0x00)
+
+#define CFG_QOS_WMM_INFRA_UAPSD_VO_SRV_INTV_NAME "InfraUapsdVoSrvIntv"
+#define CFG_QOS_WMM_INFRA_UAPSD_VO_SRV_INTV_MIN (0)
+#define CFG_QOS_WMM_INFRA_UAPSD_VO_SRV_INTV_MAX (4294967295UL)
+#define CFG_QOS_WMM_INFRA_UAPSD_VO_SRV_INTV_DEFAULT (20)
+
+#define CFG_QOS_WMM_INFRA_UAPSD_VO_SUS_INTV_NAME "InfraUapsdVoSuspIntv"
+#define CFG_QOS_WMM_INFRA_UAPSD_VO_SUS_INTV_MIN (0)
+#define CFG_QOS_WMM_INFRA_UAPSD_VO_SUS_INTV_MAX (4294967295UL)
+#define CFG_QOS_WMM_INFRA_UAPSD_VO_SUS_INTV_DEFAULT (2000)
+
+#define CFG_QOS_WMM_INFRA_UAPSD_VI_SRV_INTV_NAME "InfraUapsdViSrvIntv"
+#define CFG_QOS_WMM_INFRA_UAPSD_VI_SRV_INTV_MIN (0)
+#define CFG_QOS_WMM_INFRA_UAPSD_VI_SRV_INTV_MAX (4294967295UL)
+#define CFG_QOS_WMM_INFRA_UAPSD_VI_SRV_INTV_DEFAULT (300)
+
+#define CFG_QOS_WMM_INFRA_UAPSD_VI_SUS_INTV_NAME "InfraUapsdViSuspIntv"
+#define CFG_QOS_WMM_INFRA_UAPSD_VI_SUS_INTV_MIN (0)
+#define CFG_QOS_WMM_INFRA_UAPSD_VI_SUS_INTV_MAX (4294967295UL)
+#define CFG_QOS_WMM_INFRA_UAPSD_VI_SUS_INTV_DEFAULT (2000)
+
+#define CFG_QOS_WMM_INFRA_UAPSD_BE_SRV_INTV_NAME "InfraUapsdBeSrvIntv"
+#define CFG_QOS_WMM_INFRA_UAPSD_BE_SRV_INTV_MIN (0)
+#define CFG_QOS_WMM_INFRA_UAPSD_BE_SRV_INTV_MAX (4294967295UL)
+#define CFG_QOS_WMM_INFRA_UAPSD_BE_SRV_INTV_DEFAULT (300)
+
+#define CFG_QOS_WMM_INFRA_UAPSD_BE_SUS_INTV_NAME "InfraUapsdBeSuspIntv"
+#define CFG_QOS_WMM_INFRA_UAPSD_BE_SUS_INTV_MIN (0)
+#define CFG_QOS_WMM_INFRA_UAPSD_BE_SUS_INTV_MAX (4294967295UL)
+#define CFG_QOS_WMM_INFRA_UAPSD_BE_SUS_INTV_DEFAULT (2000)
+
+#define CFG_QOS_WMM_INFRA_UAPSD_BK_SRV_INTV_NAME "InfraUapsdBkSrvIntv"
+#define CFG_QOS_WMM_INFRA_UAPSD_BK_SRV_INTV_MIN (0)
+#define CFG_QOS_WMM_INFRA_UAPSD_BK_SRV_INTV_MAX (4294967295UL)
+#define CFG_QOS_WMM_INFRA_UAPSD_BK_SRV_INTV_DEFAULT (300)
+
+#define CFG_QOS_WMM_INFRA_UAPSD_BK_SUS_INTV_NAME "InfraUapsdBkSuspIntv"
+#define CFG_QOS_WMM_INFRA_UAPSD_BK_SUS_INTV_MIN (0)
+#define CFG_QOS_WMM_INFRA_UAPSD_BK_SUS_INTV_MAX (4294967295UL)
+#define CFG_QOS_WMM_INFRA_UAPSD_BK_SUS_INTV_DEFAULT (2000)
+
+#ifdef FEATURE_WLAN_ESE
+#define CFG_QOS_WMM_INFRA_INACTIVITY_INTERVAL_NAME "InfraInactivityInterval"
+#define CFG_QOS_WMM_INFRA_INACTIVITY_INTERVAL_MIN (0)
+#define CFG_QOS_WMM_INFRA_INACTIVITY_INTERVAL_MAX (4294967295UL)
+#define CFG_QOS_WMM_INFRA_INACTIVITY_INTERVAL_DEFAULT (0) /* disabled */
+
+#define CFG_ESE_FEATURE_ENABLED_NAME "EseEnabled"
+#define CFG_ESE_FEATURE_ENABLED_MIN (0)
+#define CFG_ESE_FEATURE_ENABLED_MAX (1)
+#define CFG_ESE_FEATURE_ENABLED_DEFAULT (0) /* disabled */
+#endif /* FEATURE_WLAN_ESE */
+
+#ifdef FEATURE_WLAN_LFR
+#define CFG_LFR_FEATURE_ENABLED_NAME "FastRoamEnabled"
+#define CFG_LFR_FEATURE_ENABLED_MIN (0)
+#define CFG_LFR_FEATURE_ENABLED_MAX (1)
+#define CFG_LFR_FEATURE_ENABLED_DEFAULT (0) /* disabled */
+
+#define CFG_LFR_MAWC_FEATURE_ENABLED_NAME "MAWCEnabled"
+#define CFG_LFR_MAWC_FEATURE_ENABLED_MIN (0)
+#define CFG_LFR_MAWC_FEATURE_ENABLED_MAX (1)
+#define CFG_LFR_MAWC_FEATURE_ENABLED_DEFAULT (0) /* disabled */
+#endif /* FEATURE_WLAN_LFR */
+
+#if defined (WLAN_FEATURE_VOWIFI_11R) || defined (FEATURE_WLAN_ESE) || defined(FEATURE_WLAN_LFR)
+/* This flag will control fasttransition in case of 11r and ese. */
+/* Basically with this the whole neighbor roam, pre-auth, reassoc */
+/* can be turned ON/OFF. */
+/* With this turned OFF 11r will completely not work. */
+/* For 11r this flag has to be ON. */
+/* For ESE fastroam will not work. */
+#define CFG_FAST_TRANSITION_ENABLED_NAME "FastTransitionEnabled"
+#define CFG_FAST_TRANSITION_ENABLED_NAME_MIN (0)
+#define CFG_FAST_TRANSITION_ENABLED_NAME_MAX (1)
+#define CFG_FAST_TRANSITION_ENABLED_NAME_DEFAULT (1) /* Enabled */
+
+/* This parameter is used to decide whether to Roam or not.
+ * AP1 is the currently associated AP and AP2 is chosen for roaming.
+ * The Roaming will happen only if AP2 has better Signal Quality and it has a RSSI better than AP1
+ * in terms of RoamRssiDiff,and RoamRssiDiff is the number of units (typically measured in dB) AP2
+ * is better than AP1.
+ * This check is not done if the value is Zero */
+#define CFG_ROAM_RSSI_DIFF_NAME "RoamRssiDiff"
+#define CFG_ROAM_RSSI_DIFF_MIN (0)
+#define CFG_ROAM_RSSI_DIFF_MAX (30)
+#define CFG_ROAM_RSSI_DIFF_DEFAULT (5)
+
+/*This parameter is used to set Wireless Extended Security Mode.*/
+#define CFG_ENABLE_WES_MODE_NAME "gWESModeEnabled"
+#define CFG_ENABLE_WES_MODE_NAME_MIN (0)
+#define CFG_ENABLE_WES_MODE_NAME_MAX (1)
+#define CFG_ENABLE_WES_MODE_NAME_DEFAULT (0)
+
+#define CFG_ROAM_SCAN_N_PROBES "gRoamScanNProbes"
+#define CFG_ROAM_SCAN_N_PROBES_MIN (1)
+#define CFG_ROAM_SCAN_N_PROBES_MAX (10)
+#define CFG_ROAM_SCAN_N_PROBES_DEFAULT (2)
+
+#define CFG_ROAM_SCAN_HOME_AWAY_TIME "gRoamScanHomeAwayTime"
+#define CFG_ROAM_SCAN_HOME_AWAY_TIME_MIN (0) /* 0 for disable */
+#define CFG_ROAM_SCAN_HOME_AWAY_TIME_MAX (300)
+#define CFG_ROAM_SCAN_HOME_AWAY_TIME_DEFAULT (CFG_ROAM_SCAN_HOME_AWAY_TIME_MIN)
+/* disabled by default */
+
+#endif /* (WLAN_FEATURE_VOWIFI_11R) || defined (FEATURE_WLAN_ESE) || defined(FEATURE_WLAN_LFR) */
+
+#ifdef FEATURE_WLAN_OKC
+#define CFG_OKC_FEATURE_ENABLED_NAME "OkcEnabled"
+#define CFG_OKC_FEATURE_ENABLED_MIN (0)
+#define CFG_OKC_FEATURE_ENABLED_MAX (1)
+#define CFG_OKC_FEATURE_ENABLED_DEFAULT (1)
+#endif
+
+#define CFG_ROAM_SCAN_OFFLOAD_ENABLED "gRoamScanOffloadEnabled"
+#define CFG_ROAM_SCAN_OFFLOAD_ENABLED_MIN (0)
+#define CFG_ROAM_SCAN_OFFLOAD_ENABLED_MAX (1)
+#define CFG_ROAM_SCAN_OFFLOAD_ENABLED_DEFAULT (1)
+
+#define CFG_QOS_WMM_PKT_CLASSIFY_BASIS_NAME "PktClassificationBasis" /* DSCP or 802.1Q */
+#define CFG_QOS_WMM_PKT_CLASSIFY_BASIS_MIN (0)
+#define CFG_QOS_WMM_PKT_CLASSIFY_BASIS_MAX (1)
+#define CFG_QOS_WMM_PKT_CLASSIFY_BASIS_DEFAULT (0) /* DSCP */
+
+/* default TSPEC parameters for AC_VO */
+#define CFG_QOS_WMM_INFRA_DIR_AC_VO_NAME "InfraDirAcVo"
+#define CFG_QOS_WMM_INFRA_DIR_AC_VO_MIN (0)
+#define CFG_QOS_WMM_INFRA_DIR_AC_VO_MAX (3)
+#define CFG_QOS_WMM_INFRA_DIR_AC_VO_DEFAULT (3) /* WLAN_QCT_CUST_WMM_TSDIR_BOTH */
+
+#define CFG_QOS_WMM_INFRA_NOM_MSDU_SIZE_AC_VO_NAME "InfraNomMsduSizeAcVo"
+#define CFG_QOS_WMM_INFRA_NOM_MSDU_SIZE_AC_VO_MIN (0x0)
+#define CFG_QOS_WMM_INFRA_NOM_MSDU_SIZE_AC_VO_MAX (0xFFFF)
+#define CFG_QOS_WMM_INFRA_NOM_MSDU_SIZE_AC_VO_DEFAULT (0x80D0)
+
+#define CFG_QOS_WMM_INFRA_MEAN_DATA_RATE_AC_VO_NAME "InfraMeanDataRateAcVo"
+#define CFG_QOS_WMM_INFRA_MEAN_DATA_RATE_AC_VO_MIN (0x0)
+#define CFG_QOS_WMM_INFRA_MEAN_DATA_RATE_AC_VO_MAX (0xFFFFFFFF)
+#define CFG_QOS_WMM_INFRA_MEAN_DATA_RATE_AC_VO_DEFAULT (0x14500)
+
+#define CFG_QOS_WMM_INFRA_MIN_PHY_RATE_AC_VO_NAME "InfraMinPhyRateAcVo"
+#define CFG_QOS_WMM_INFRA_MIN_PHY_RATE_AC_VO_MIN (0x0)
+#define CFG_QOS_WMM_INFRA_MIN_PHY_RATE_AC_VO_MAX (0xFFFFFFFF)
+#define CFG_QOS_WMM_INFRA_MIN_PHY_RATE_AC_VO_DEFAULT (0x5B8D80)
+
+#define CFG_QOS_WMM_INFRA_SBA_AC_VO_NAME "InfraSbaAcVo"
+#define CFG_QOS_WMM_INFRA_SBA_AC_VO_MIN (0x2001)
+#define CFG_QOS_WMM_INFRA_SBA_AC_VO_MAX (0xFFFF)
+#define CFG_QOS_WMM_INFRA_SBA_AC_VO_DEFAULT (0x2001)
+
+/* default TSPEC parameters for AC_VI */
+#define CFG_QOS_WMM_INFRA_DIR_AC_VI_NAME "InfraDirAcVi"
+#define CFG_QOS_WMM_INFRA_DIR_AC_VI_MIN (0)
+#define CFG_QOS_WMM_INFRA_DIR_AC_VI_MAX (3)
+#define CFG_QOS_WMM_INFRA_DIR_AC_VI_DEFAULT (3) /* WLAN_QCT_CUST_WMM_TSDIR_BOTH */
+
+#define CFG_QOS_WMM_INFRA_NOM_MSDU_SIZE_AC_VI_NAME "InfraNomMsduSizeAcVi"
+#define CFG_QOS_WMM_INFRA_NOM_MSDU_SIZE_AC_VI_MIN (0x0)
+#define CFG_QOS_WMM_INFRA_NOM_MSDU_SIZE_AC_VI_MAX (0xFFFF)
+#define CFG_QOS_WMM_INFRA_NOM_MSDU_SIZE_AC_VI_DEFAULT (0x85DC)
+
+#define CFG_QOS_WMM_INFRA_MEAN_DATA_RATE_AC_VI_NAME "InfraMeanDataRateAcVi"
+#define CFG_QOS_WMM_INFRA_MEAN_DATA_RATE_AC_VI_MIN (0x0)
+#define CFG_QOS_WMM_INFRA_MEAN_DATA_RATE_AC_VI_MAX (0xFFFFFFFF)
+#define CFG_QOS_WMM_INFRA_MEAN_DATA_RATE_AC_VI_DEFAULT (0x57E40)
+
+#define CFG_QOS_WMM_INFRA_MIN_PHY_RATE_AC_VI_NAME "InfraMinPhyRateAcVi"
+#define CFG_QOS_WMM_INFRA_MIN_PHY_RATE_AC_VI_MIN (0x0)
+#define CFG_QOS_WMM_INFRA_MIN_PHY_RATE_AC_VI_MAX (0xFFFFFFFF)
+#define CFG_QOS_WMM_INFRA_MIN_PHY_RATE_AC_VI_DEFAULT (0x5B8D80)
+
+#define CFG_QOS_WMM_INFRA_SBA_AC_VI_NAME "InfraSbaAcVi"
+#define CFG_QOS_WMM_INFRA_SBA_AC_VI_MIN (0x2001)
+#define CFG_QOS_WMM_INFRA_SBA_AC_VI_MAX (0xFFFF)
+#define CFG_QOS_WMM_INFRA_SBA_AC_VI_DEFAULT (0x2001)
+
+/* default TSPEC parameters for AC_BE*/
+#define CFG_QOS_WMM_INFRA_DIR_AC_BE_NAME "InfraDirAcBe"
+#define CFG_QOS_WMM_INFRA_DIR_AC_BE_MIN (0)
+#define CFG_QOS_WMM_INFRA_DIR_AC_BE_MAX (3)
+#define CFG_QOS_WMM_INFRA_DIR_AC_BE_DEFAULT (3) /* WLAN_QCT_CUST_WMM_TSDIR_BOTH */
+
+#define CFG_QOS_WMM_INFRA_NOM_MSDU_SIZE_AC_BE_NAME "InfraNomMsduSizeAcBe"
+#define CFG_QOS_WMM_INFRA_NOM_MSDU_SIZE_AC_BE_MIN (0x0)
+#define CFG_QOS_WMM_INFRA_NOM_MSDU_SIZE_AC_BE_MAX (0xFFFF)
+#define CFG_QOS_WMM_INFRA_NOM_MSDU_SIZE_AC_BE_DEFAULT (0x85DC)
+
+#define CFG_QOS_WMM_INFRA_MEAN_DATA_RATE_AC_BE_NAME "InfraMeanDataRateAcBe"
+#define CFG_QOS_WMM_INFRA_MEAN_DATA_RATE_AC_BE_MIN (0x0)
+#define CFG_QOS_WMM_INFRA_MEAN_DATA_RATE_AC_BE_MAX (0xFFFFFFFF)
+#define CFG_QOS_WMM_INFRA_MEAN_DATA_RATE_AC_BE_DEFAULT (0x493E0)
+
+#define CFG_QOS_WMM_INFRA_MIN_PHY_RATE_AC_BE_NAME "InfraMinPhyRateAcBe"
+#define CFG_QOS_WMM_INFRA_MIN_PHY_RATE_AC_BE_MIN (0x0)
+#define CFG_QOS_WMM_INFRA_MIN_PHY_RATE_AC_BE_MAX (0xFFFFFFFF)
+#define CFG_QOS_WMM_INFRA_MIN_PHY_RATE_AC_BE_DEFAULT (0x5B8D80)
+
+#define CFG_QOS_WMM_INFRA_SBA_AC_BE_NAME "InfraSbaAcBe"
+#define CFG_QOS_WMM_INFRA_SBA_AC_BE_MIN (0x2001)
+#define CFG_QOS_WMM_INFRA_SBA_AC_BE_MAX (0xFFFF)
+#define CFG_QOS_WMM_INFRA_SBA_AC_BE_DEFAULT (0x2001)
+
+/* default TSPEC parameters for AC_Bk*/
+#define CFG_QOS_WMM_INFRA_DIR_AC_BK_NAME "InfraDirAcBk"
+#define CFG_QOS_WMM_INFRA_DIR_AC_BK_MIN (0)
+#define CFG_QOS_WMM_INFRA_DIR_AC_BK_MAX (3)
+#define CFG_QOS_WMM_INFRA_DIR_AC_BK_DEFAULT (3) /* WLAN_QCT_CUST_WMM_TSDIR_BOTH */
+
+#define CFG_QOS_WMM_INFRA_NOM_MSDU_SIZE_AC_BK_NAME "InfraNomMsduSizeAcBk"
+#define CFG_QOS_WMM_INFRA_NOM_MSDU_SIZE_AC_BK_MIN (0x0)
+#define CFG_QOS_WMM_INFRA_NOM_MSDU_SIZE_AC_BK_MAX (0xFFFF)
+#define CFG_QOS_WMM_INFRA_NOM_MSDU_SIZE_AC_BK_DEFAULT (0x85DC)
+
+#define CFG_QOS_WMM_INFRA_MEAN_DATA_RATE_AC_BK_NAME "InfraMeanDataRateAcBk"
+#define CFG_QOS_WMM_INFRA_MEAN_DATA_RATE_AC_BK_MIN (0x0)
+#define CFG_QOS_WMM_INFRA_MEAN_DATA_RATE_AC_BK_MAX (0xFFFFFFFF)
+#define CFG_QOS_WMM_INFRA_MEAN_DATA_RATE_AC_BK_DEFAULT (0x493E0)
+
+#define CFG_QOS_WMM_INFRA_MIN_PHY_RATE_AC_BK_NAME "InfraMinPhyRateAcBk"
+#define CFG_QOS_WMM_INFRA_MIN_PHY_RATE_AC_BK_MIN (0x0)
+#define CFG_QOS_WMM_INFRA_MIN_PHY_RATE_AC_BK_MAX (0xFFFFFFFF)
+#define CFG_QOS_WMM_INFRA_MIN_PHY_RATE_AC_BK_DEFAULT (0x5B8D80)
+
+#define CFG_QOS_WMM_INFRA_SBA_AC_BK_NAME "InfraSbaAcBk"
+#define CFG_QOS_WMM_INFRA_SBA_AC_BK_MIN (0x2001)
+#define CFG_QOS_WMM_INFRA_SBA_AC_BK_MAX (0xFFFF)
+#define CFG_QOS_WMM_INFRA_SBA_AC_BK_DEFAULT (0x2001)
+
+#define CFG_TL_DELAYED_TRGR_FRM_INT_NAME "DelayedTriggerFrmInt"
+#define CFG_TL_DELAYED_TRGR_FRM_INT_MIN 1
+#define CFG_TL_DELAYED_TRGR_FRM_INT_MAX (4294967295UL)
+#define CFG_TL_DELAYED_TRGR_FRM_INT_DEFAULT 3000
+
+#if defined WLAN_FEATURE_VOWIFI
+#define CFG_RRM_ENABLE_NAME "gRrmEnable"
+#define CFG_RRM_ENABLE_MIN (0)
+#define CFG_RRM_ENABLE_MAX (1)
+#define CFG_RRM_ENABLE_DEFAULT (0)
+
+#define CFG_RRM_OPERATING_CHAN_MAX_DURATION_NAME "gRrmOperChanMax" /* section 11.10.3 IEEE std. 802.11k-2008 */
+#define CFG_RRM_OPERATING_CHAN_MAX_DURATION_MIN (0) /* Maxduration = 2^(maxDuration - 4) * bcnIntvl. */
+#define CFG_RRM_OPERATING_CHAN_MAX_DURATION_MAX (8)
+#define CFG_RRM_OPERATING_CHAN_MAX_DURATION_DEFAULT (3) /* max duration = 2^-1 * bcnIntvl (50% of bcn intvl) */
+
+#define CFG_RRM_NON_OPERATING_CHAN_MAX_DURATION_NAME "gRrmNonOperChanMax" /* Same as above. */
+#define CFG_RRM_NON_OPERATING_CHAN_MAX_DURATION_MIN (0)
+#define CFG_RRM_NON_OPERATING_CHAN_MAX_DURATION_MAX (8)
+#define CFG_RRM_NON_OPERATING_CHAN_MAX_DURATION_DEFAULT (3)
+
+#define CFG_RRM_MEAS_RANDOMIZATION_INTVL_NAME "gRrmRandnIntvl"
+#define CFG_RRM_MEAS_RANDOMIZATION_INTVL_MIN (10)
+#define CFG_RRM_MEAS_RANDOMIZATION_INTVL_MAX (100)
+#define CFG_RRM_MEAS_RANDOMIZATION_INTVL_DEFAULT (100)
+#endif
+
+#define CFG_QOS_IMPLICIT_SETUP_ENABLED_NAME "ImplicitQosIsEnabled"
+#define CFG_QOS_IMPLICIT_SETUP_ENABLED_MIN (0)
+#define CFG_QOS_IMPLICIT_SETUP_ENABLED_MAX (1)
+#define CFG_QOS_IMPLICIT_SETUP_ENABLED_DEFAULT (1)
+
+#define CFG_ENABLE_LOGP_NAME "gEnableLogp"
+#define CFG_ENABLE_LOGP_MIN (0)
+#define CFG_ENABLE_LOGP_MAX (1)
+#define CFG_ENABLE_LOGP_DEFAULT (0)
+
+#if defined WLAN_FEATURE_VOWIFI_11R
+#define CFG_FT_RESOURCE_REQ_NAME "gFTResourceReqSupported"
+#define CFG_FT_RESOURCE_REQ_MIN (0)
+#define CFG_FT_RESOURCE_REQ_MAX (1)
+#define CFG_FT_RESOURCE_REQ_DEFAULT (0)
+#endif
+
+#define CFG_TELE_BCN_TRANS_LI_NAME "telescopicBeaconTransListenInterval"
+#define CFG_TELE_BCN_TRANS_LI_MIN (0)
+#define CFG_TELE_BCN_TRANS_LI_MAX (7)
+#define CFG_TELE_BCN_TRANS_LI_DEFAULT (3)
+
+#define CFG_TELE_BCN_TRANS_LI_NUM_IDLE_BCNS_NAME "telescopicBeaconTransListenIntervalNumIdleBcns"
+#define CFG_TELE_BCN_TRANS_LI_NUM_IDLE_BCNS_MIN (5)
+#define CFG_TELE_BCN_TRANS_LI_NUM_IDLE_BCNS_MAX (255)
+#define CFG_TELE_BCN_TRANS_LI_NUM_IDLE_BCNS_DEFAULT (10)
+
+#define CFG_TELE_BCN_MAX_LI_NAME "telescopicBeaconMaxListenInterval"
+#define CFG_TELE_BCN_MAX_LI_MIN (0)
+#define CFG_TELE_BCN_MAX_LI_MAX (7)
+#define CFG_TELE_BCN_MAX_LI_DEFAULT (5)
+
+#define CFG_TELE_BCN_MAX_LI_NUM_IDLE_BCNS_NAME "telescopicBeaconMaxListenIntervalNumIdleBcns"
+#define CFG_TELE_BCN_MAX_LI_NUM_IDLE_BCNS_MIN (5)
+#define CFG_TELE_BCN_MAX_LI_NUM_IDLE_BCNS_MAX (255)
+#define CFG_TELE_BCN_MAX_LI_NUM_IDLE_BCNS_DEFAULT (15)
+
+#define CFG_BCN_EARLY_TERM_WAKE_NAME "beaconEarlyTerminationWakeInterval"
+#define CFG_BCN_EARLY_TERM_WAKE_MIN (2)
+#define CFG_BCN_EARLY_TERM_WAKE_MAX (255)
+#define CFG_BCN_EARLY_TERM_WAKE_DEFAULT (3)
+
+#ifdef WLAN_FEATURE_NEIGHBOR_ROAMING
+#define CFG_NEIGHBOR_SCAN_TIMER_PERIOD_NAME "gNeighborScanTimerPeriod"
+#define CFG_NEIGHBOR_SCAN_TIMER_PERIOD_MIN (3)
+#define CFG_NEIGHBOR_SCAN_TIMER_PERIOD_MAX (300)
+#define CFG_NEIGHBOR_SCAN_TIMER_PERIOD_DEFAULT (200)
+
+#define CFG_NEIGHBOR_LOOKUP_RSSI_THRESHOLD_NAME "gNeighborLookupThreshold"
+#define CFG_NEIGHBOR_LOOKUP_RSSI_THRESHOLD_MIN (10)
+#define CFG_NEIGHBOR_LOOKUP_RSSI_THRESHOLD_MAX (120)
+#define CFG_NEIGHBOR_LOOKUP_RSSI_THRESHOLD_DEFAULT (78)
+
+#define CFG_DELAY_BEFORE_VDEV_STOP_NAME "gDelayBeforeVdevStop"
+#define CFG_DELAY_BEFORE_VDEV_STOP_MIN (2)
+#define CFG_DELAY_BEFORE_VDEV_STOP_MAX (200)
+#define CFG_DELAY_BEFORE_VDEV_STOP_DEFAULT (20)
+
+/*
+ * This parameter is the drop in RSSI value that will trigger a precautionary
+ * scan by firmware.
+ * MAX value is choose so that this type of scan can be disabled by user.
+ */
+#define CFG_ROAM_RESCAN_RSSI_DIFF_NAME "gRoamRescanRssiDiff"
+#define CFG_ROAM_RESCAN_RSSI_DIFF_MIN (0)
+#define CFG_ROAM_RESCAN_RSSI_DIFF_MAX (100)
+#define CFG_ROAM_RESCAN_RSSI_DIFF_DEFAULT (5)
+
+/*
+ * This parameter is the RSSI diff above neighbor lookup threshold, when
+ * opportunistic scan should be triggered.
+ * MAX value is choose so that this type of scan can be always enabled by user.
+ * MIN value will cause opportunistic scan to be triggered in neighbor lookup
+ * RSSI range.
+ */
+#define CFG_OPPORTUNISTIC_SCAN_THRESHOLD_DIFF_NAME "gOpportunisticThresholdDiff"
+#define CFG_OPPORTUNISTIC_SCAN_THRESHOLD_DIFF_MIN (0)
+#define CFG_OPPORTUNISTIC_SCAN_THRESHOLD_DIFF_MAX (127)
+#define CFG_OPPORTUNISTIC_SCAN_THRESHOLD_DIFF_DEFAULT (0)
+
+#define CFG_NEIGHBOR_SCAN_CHAN_LIST_NAME "gNeighborScanChannelList"
+#define CFG_NEIGHBOR_SCAN_CHAN_LIST_DEFAULT ""
+
+#define CFG_NEIGHBOR_SCAN_MIN_CHAN_TIME_NAME "gNeighborScanChannelMinTime"
+#define CFG_NEIGHBOR_SCAN_MIN_CHAN_TIME_MIN (10)
+#define CFG_NEIGHBOR_SCAN_MIN_CHAN_TIME_MAX (40)
+#define CFG_NEIGHBOR_SCAN_MIN_CHAN_TIME_DEFAULT (20)
+
+#define CFG_NEIGHBOR_SCAN_MAX_CHAN_TIME_NAME "gNeighborScanChannelMaxTime"
+#define CFG_NEIGHBOR_SCAN_MAX_CHAN_TIME_MIN (3)
+#define CFG_NEIGHBOR_SCAN_MAX_CHAN_TIME_MAX (300)
+#define CFG_NEIGHBOR_SCAN_MAX_CHAN_TIME_DEFAULT (30)
+
+#define CFG_11R_NEIGHBOR_REQ_MAX_TRIES_NAME "gMaxNeighborReqTries"
+#define CFG_11R_NEIGHBOR_REQ_MAX_TRIES_MIN (1)
+#define CFG_11R_NEIGHBOR_REQ_MAX_TRIES_MAX (4)
+#define CFG_11R_NEIGHBOR_REQ_MAX_TRIES_DEFAULT (3)
+
+#define CFG_NEIGHBOR_SCAN_RESULTS_REFRESH_PERIOD_NAME "gNeighborScanRefreshPeriod"
+#define CFG_NEIGHBOR_SCAN_RESULTS_REFRESH_PERIOD_MIN (1000)
+#define CFG_NEIGHBOR_SCAN_RESULTS_REFRESH_PERIOD_MAX (60000)
+#define CFG_NEIGHBOR_SCAN_RESULTS_REFRESH_PERIOD_DEFAULT (20000)
+
+#define CFG_EMPTY_SCAN_REFRESH_PERIOD_NAME "gEmptyScanRefreshPeriod"
+#define CFG_EMPTY_SCAN_REFRESH_PERIOD_MIN (0)
+#define CFG_EMPTY_SCAN_REFRESH_PERIOD_MAX (60000)
+#define CFG_EMPTY_SCAN_REFRESH_PERIOD_DEFAULT (0)
+
+#define CFG_ROAM_BMISS_FIRST_BCNT_NAME "gRoamBmissFirstBcnt"
+#define CFG_ROAM_BMISS_FIRST_BCNT_MIN (5)
+#define CFG_ROAM_BMISS_FIRST_BCNT_MAX (100)
+#define CFG_ROAM_BMISS_FIRST_BCNT_DEFAULT (10)
+
+#define CFG_ROAM_BMISS_FINAL_BCNT_NAME "gRoamBmissFinalBcnt"
+#define CFG_ROAM_BMISS_FINAL_BCNT_MIN (5)
+#define CFG_ROAM_BMISS_FINAL_BCNT_MAX (100)
+#define CFG_ROAM_BMISS_FINAL_BCNT_DEFAULT (10)
+
+#define CFG_ROAM_BEACON_RSSI_WEIGHT_NAME "gRoamBeaconRssiWeight"
+#define CFG_ROAM_BEACON_RSSI_WEIGHT_MIN (0)
+#define CFG_ROAM_BEACON_RSSI_WEIGHT_MAX (16)
+#define CFG_ROAM_BEACON_RSSI_WEIGHT_DEFAULT (14)
+#endif /* WLAN_FEATURE_NEIGHBOR_ROAMING */
+
+#define CFG_QOS_WMM_BURST_SIZE_DEFN_NAME "burstSizeDefinition"
+#define CFG_QOS_WMM_BURST_SIZE_DEFN_MIN (0)
+#define CFG_QOS_WMM_BURST_SIZE_DEFN_MAX (1)
+#define CFG_QOS_WMM_BURST_SIZE_DEFN_DEFAULT (0)
+
+#define CFG_QOS_WMM_TS_INFO_ACK_POLICY_NAME "tsInfoAckPolicy"
+#define CFG_QOS_WMM_TS_INFO_ACK_POLICY_MIN (0x00)
+#define CFG_QOS_WMM_TS_INFO_ACK_POLICY_MAX (0x01)
+#define CFG_QOS_WMM_TS_INFO_ACK_POLICY_DEFAULT (0x00)
+
+#define CFG_SINGLE_TID_RC_NAME "SingleTIDRC"
+#define CFG_SINGLE_TID_RC_MIN (0) /* Seperate replay counter for all TID */
+#define CFG_SINGLE_TID_RC_MAX (1) /* Single replay counter for all TID */
+#define CFG_SINGLE_TID_RC_DEFAULT (1)
+#define CFG_MCAST_BCAST_FILTER_SETTING_NAME "McastBcastFilter"
+#define CFG_MCAST_BCAST_FILTER_SETTING_MIN (0)
+#define CFG_MCAST_BCAST_FILTER_SETTING_MAX (3)
+#define CFG_MCAST_BCAST_FILTER_SETTING_DEFAULT (0)
+
+#define CFG_DYNAMIC_PSPOLL_VALUE_NAME "gDynamicPSPollvalue"
+#define CFG_DYNAMIC_PSPOLL_VALUE_MIN (0)
+#define CFG_DYNAMIC_PSPOLL_VALUE_MAX (255)
+#define CFG_DYNAMIC_PSPOLL_VALUE_DEFAULT (0)
+
+#define CFG_TELE_BCN_WAKEUP_EN_NAME "gTelescopicBeaconWakeupEn"
+#define CFG_TELE_BCN_WAKEUP_EN_MIN (0)
+#define CFG_TELE_BCN_WAKEUP_EN_MAX (1)
+#define CFG_TELE_BCN_WAKEUP_EN_DEFAULT (0)
+
+#define CFG_QOS_ADDTS_WHEN_ACM_IS_OFF_NAME "gAddTSWhenACMIsOff"
+#define CFG_QOS_ADDTS_WHEN_ACM_IS_OFF_MIN (0)
+#define CFG_QOS_ADDTS_WHEN_ACM_IS_OFF_MAX (1) /* Send AddTs even when ACM is not set for the AC */
+#define CFG_QOS_ADDTS_WHEN_ACM_IS_OFF_DEFAULT (0)
+
+#define CFG_VALIDATE_SCAN_LIST_NAME "gValidateScanList"
+#define CFG_VALIDATE_SCAN_LIST_MIN (0)
+#define CFG_VALIDATE_SCAN_LIST_MAX (1)
+#define CFG_VALIDATE_SCAN_LIST_DEFAULT (0)
+
+#define CFG_NULLDATA_AP_RESP_TIMEOUT_NAME "gNullDataApRespTimeout"
+#define CFG_NULLDATA_AP_RESP_TIMEOUT_MIN (WNI_CFG_PS_NULLDATA_AP_RESP_TIMEOUT_STAMIN)
+#define CFG_NULLDATA_AP_RESP_TIMEOUT_MAX (WNI_CFG_PS_NULLDATA_AP_RESP_TIMEOUT_STAMAX)
+#define CFG_NULLDATA_AP_RESP_TIMEOUT_DEFAULT (WNI_CFG_PS_NULLDATA_AP_RESP_TIMEOUT_STADEF)
+
+#define CFG_AP_DATA_AVAIL_POLL_PERIOD_NAME "gApDataAvailPollInterval"
+#define CFG_AP_DATA_AVAIL_POLL_PERIOD_MIN (WNI_CFG_AP_DATA_AVAIL_POLL_PERIOD_STAMIN)
+#define CFG_AP_DATA_AVAIL_POLL_PERIOD_MAX (WNI_CFG_AP_DATA_AVAIL_POLL_PERIOD_STAMAX)
+#define CFG_AP_DATA_AVAIL_POLL_PERIOD_DEFAULT (WNI_CFG_AP_DATA_AVAIL_POLL_PERIOD_STADEF)
+
+#define CFG_ENABLE_HOST_ARPOFFLOAD_NAME "hostArpOffload"
+#define CFG_ENABLE_HOST_ARPOFFLOAD_MIN (0)
+#define CFG_ENABLE_HOST_ARPOFFLOAD_MAX (1)
+#define CFG_ENABLE_HOST_ARPOFFLOAD_DEFAULT (0)
+
+#define CFG_ENABLE_HOST_SSDP_NAME "ssdp"
+#define CFG_ENABLE_HOST_SSDP_MIN (0)
+#define CFG_ENABLE_HOST_SSDP_MAX (1)
+#define CFG_ENABLE_HOST_SSDP_DEFAULT (1)
+
+#define CFG_ENABLE_HOST_NSOFFLOAD_NAME "hostNSOffload"
+#define CFG_ENABLE_HOST_NSOFFLOAD_MIN (0)
+#define CFG_ENABLE_HOST_NSOFFLOAD_MAX (1)
+#define CFG_ENABLE_HOST_NSOFFLOAD_DEFAULT (0)
+
+#define CFG_BAND_CAPABILITY_NAME "BandCapability"
+#define CFG_BAND_CAPABILITY_MIN (0)
+#define CFG_BAND_CAPABILITY_MAX (2)
+#define CFG_BAND_CAPABILITY_DEFAULT (0)
+
+#define CFG_ENABLE_BEACON_EARLY_TERMINATION_NAME "enableBeaconEarlyTermination"
+#define CFG_ENABLE_BEACON_EARLY_TERMINATION_MIN (0)
+#define CFG_ENABLE_BEACON_EARLY_TERMINATION_MAX (1)
+#define CFG_ENABLE_BEACON_EARLY_TERMINATION_DEFAULT (0)
+
+#define CFG_ENABLE_CLOSE_LOOP_NAME "gEnableCloseLoop"
+#define CFG_ENABLE_CLOSE_LOOP_MIN WNI_CFG_FIXED_RATE_STAMIN
+#define CFG_ENABLE_CLOSE_LOOP_MAX WNI_CFG_FIXED_RATE_STAMAX
+#define CFG_ENABLE_CLOSE_LOOP_DEFAULT WNI_CFG_FIXED_RATE_STADEF
+
+#define CFG_ENABLE_BYPASS_11D_NAME "gEnableBypass11d"
+#define CFG_ENABLE_BYPASS_11D_MIN (0)
+#define CFG_ENABLE_BYPASS_11D_MAX (1)
+#define CFG_ENABLE_BYPASS_11D_DEFAULT (1)
+
+#define CFG_ENABLE_DFS_CHNL_SCAN_NAME "gEnableDFSChnlScan"
+#define CFG_ENABLE_DFS_CHNL_SCAN_MIN (0)
+#define CFG_ENABLE_DFS_CHNL_SCAN_MAX (1)
+#define CFG_ENABLE_DFS_CHNL_SCAN_DEFAULT (1)
+
+#define CFG_ENABLE_DFS_PNO_CHNL_SCAN_NAME "gEnableDFSPnoChnlScan"
+#define CFG_ENABLE_DFS_PNO_CHNL_SCAN_MIN (0)
+#define CFG_ENABLE_DFS_PNO_CHNL_SCAN_MAX (1)
+#define CFG_ENABLE_DFS_PNO_CHNL_SCAN_DEFAULT (1)
+
+#define CFG_ENABLE_RAMDUMP_COLLECTION "gEnableDumpCollect"
+#define CFG_ENABLE_RAMDUMP_COLLECTION_MIN (0)
+#define CFG_ENABLE_RAMDUMP_COLLECTION_MAX (1)
+#define CFG_ENABLE_RAMDUMP_COLLECTION_DEFAULT (1)
+
+typedef enum {
+ eHDD_LINK_SPEED_REPORT_ACTUAL = 0,
+ eHDD_LINK_SPEED_REPORT_MAX = 1,
+ eHDD_LINK_SPEED_REPORT_MAX_SCALED = 2,
+} eHddLinkSpeedReportType;
+#ifdef WLAN_FEATURE_11AC
+#define CFG_VHT_CHANNEL_WIDTH "gVhtChannelWidth"
+#define CFG_VHT_CHANNEL_WIDTH_MIN (0)
+#define CFG_VHT_CHANNEL_WIDTH_MAX (4)
+#define CFG_VHT_CHANNEL_WIDTH_DEFAULT (3)
+
+#define CFG_VHT_ENABLE_RX_MCS_8_9 "gVhtRxMCS"
+#define CFG_VHT_ENABLE_RX_MCS_8_9_MIN (0)
+#define CFG_VHT_ENABLE_RX_MCS_8_9_MAX (2)
+#define CFG_VHT_ENABLE_RX_MCS_8_9_DEFAULT (0)
+
+#define CFG_VHT_ENABLE_TX_MCS_8_9 "gVhtTxMCS"
+#define CFG_VHT_ENABLE_TX_MCS_8_9_MIN (0)
+#define CFG_VHT_ENABLE_TX_MCS_8_9_MAX (2)
+#define CFG_VHT_ENABLE_TX_MCS_8_9_DEFAULT (0)
+
+#define CFG_VHT_ENABLE_RX_MCS2x2_8_9 "gVhtRxMCS2x2"
+#define CFG_VHT_ENABLE_RX_MCS2x2_8_9_MIN (0)
+#define CFG_VHT_ENABLE_RX_MCS2x2_8_9_MAX (2)
+#define CFG_VHT_ENABLE_RX_MCS2x2_8_9_DEFAULT (0)
+
+#define CFG_VHT_ENABLE_TX_MCS2x2_8_9 "gVhtTxMCS2x2"
+#define CFG_VHT_ENABLE_TX_MCS2x2_8_9_MIN (0)
+#define CFG_VHT_ENABLE_TX_MCS2x2_8_9_MAX (2)
+#define CFG_VHT_ENABLE_TX_MCS2x2_8_9_DEFAULT (0)
+
+#define CFG_VHT_ENABLE_2x2_CAP_FEATURE "gEnable2x2"
+#define CFG_VHT_ENABLE_2x2_CAP_FEATURE_MIN (0)
+#define CFG_VHT_ENABLE_2x2_CAP_FEATURE_MAX (1)
+#define CFG_VHT_ENABLE_2x2_CAP_FEATURE_DEFAULT (0)
+
+#define CFG_VHT_ENABLE_MU_BFORMEE_CAP_FEATURE "gEnableMuBformee"
+#define CFG_VHT_ENABLE_MU_BFORMEE_CAP_FEATURE_MIN (0)
+#define CFG_VHT_ENABLE_MU_BFORMEE_CAP_FEATURE_MAX (1)
+#define CFG_VHT_ENABLE_MU_BFORMEE_CAP_FEATURE_DEFAULT (0)
+
+#define CFG_VHT_ENABLE_PAID_FEATURE "gEnablePAID"
+#define CFG_VHT_ENABLE_PAID_FEATURE_MIN (0)
+#define CFG_VHT_ENABLE_PAID_FEATURE_MAX (1)
+#define CFG_VHT_ENABLE_PAID_FEATURE_DEFAULT (0)
+
+#define CFG_VHT_ENABLE_GID_FEATURE "gEnableGID"
+#define CFG_VHT_ENABLE_GID_FEATURE_MIN (0)
+#define CFG_VHT_ENABLE_GID_FEATURE_MAX (1)
+#define CFG_VHT_ENABLE_GID_FEATURE_DEFAULT (0)
+#endif
+
+#define CFG_VHT_ENABLE_1x1_TX_CHAINMASK "gSetTxChainmask1x1"
+#define CFG_VHT_ENABLE_1x1_TX_CHAINMASK_MIN (1)
+#define CFG_VHT_ENABLE_1x1_TX_CHAINMASK_MAX (2)
+#define CFG_VHT_ENABLE_1x1_TX_CHAINMASK_DEFAULT (1)
+
+#define CFG_VHT_ENABLE_1x1_RX_CHAINMASK "gSetRxChainmask1x1"
+#define CFG_VHT_ENABLE_1x1_RX_CHAINMASK_MIN (1)
+#define CFG_VHT_ENABLE_1x1_RX_CHAINMASK_MAX (2)
+#define CFG_VHT_ENABLE_1x1_RX_CHAINMASK_DEFAULT (1)
+
+#define CFG_ENABLE_AMPDUPS_FEATURE "gEnableAMPDUPS"
+#define CFG_ENABLE_AMPDUPS_FEATURE_MIN (0)
+#define CFG_ENABLE_AMPDUPS_FEATURE_MAX (1)
+#define CFG_ENABLE_AMPDUPS_FEATURE_DEFAULT (0)
+
+#define CFG_HT_ENABLE_SMPS_CAP_FEATURE "gEnableHtSMPS"
+#define CFG_HT_ENABLE_SMPS_CAP_FEATURE_MIN (0)
+#define CFG_HT_ENABLE_SMPS_CAP_FEATURE_MAX (1)
+#define CFG_HT_ENABLE_SMPS_CAP_FEATURE_DEFAULT (0)
+
+#define CFG_HT_SMPS_CAP_FEATURE "gHtSMPS"
+#define CFG_HT_SMPS_CAP_FEATURE_MIN (0)
+#define CFG_HT_SMPS_CAP_FEATURE_MAX (3)
+#define CFG_HT_SMPS_CAP_FEATURE_DEFAULT (3)
+
+#define CFG_DISABLE_DFS_CH_SWITCH "gDisableDFSChSwitch"
+#define CFG_DISABLE_DFS_CH_SWITCH_MIN (0)
+#define CFG_DISABLE_DFS_CH_SWITCH_MAX (1)
+#define CFG_DISABLE_DFS_CH_SWITCH_DEFAULT (0)
+
+#define CFG_ENABLE_DFS_MASTER_CAPABILITY "gEnableDFSMasterCap"
+#define CFG_ENABLE_DFS_MASTER_CAPABILITY_MIN (0)
+#define CFG_ENABLE_DFS_MASTER_CAPABILITY_MAX (1)
+#define CFG_ENABLE_DFS_MASTER_CAPABILITY_DEFAULT (0)
+
+#define CFG_SAP_PREFERRED_CHANNEL_LOCATION "gSapPreferredChanLocation"
+#define CFG_SAP_PREFERRED_CHANNEL_LOCATION_MIN (0)
+#define CFG_SAP_PREFERRED_CHANNEL_LOCATION_MAX (2)
+#define CFG_SAP_PREFERRED_CHANNEL_LOCATION_DEFAULT (0)
+
+#define CFG_DISABLE_DFS_JAPAN_W53 "gDisableDfsJapanW53"
+#define CFG_DISABLE_DFS_JAPAN_W53_MIN (0)
+#define CFG_DISABLE_DFS_JAPAN_W53_MAX (1)
+#define CFG_DISABLE_DFS_JAPAN_W53_DEFAULT (0)
+
+#define CFG_ENABLE_DFS_PHYERR_FILTEROFFLOAD_NAME "dfsPhyerrFilterOffload"
+#define CFG_ENABLE_DFS_PHYERR_FILTEROFFLOAD_MIN (0)
+#define CFG_ENABLE_DFS_PHYERR_FILTEROFFLOAD_MAX (1)
+#define CFG_ENABLE_DFS_PHYERR_FILTEROFFLOAD_DEFAULT (0)
+
+#define CFG_REPORT_MAX_LINK_SPEED "gReportMaxLinkSpeed"
+#define CFG_REPORT_MAX_LINK_SPEED_MIN (eHDD_LINK_SPEED_REPORT_ACTUAL)
+#define CFG_REPORT_MAX_LINK_SPEED_MAX (eHDD_LINK_SPEED_REPORT_MAX_SCALED)
+#define CFG_REPORT_MAX_LINK_SPEED_DEFAULT (eHDD_LINK_SPEED_REPORT_MAX_SCALED)
+
+/*
+ * RSSI Thresholds
+ * Used when eHDD_LINK_SPEED_REPORT_SCALED is selected
+ */
+#define CFG_LINK_SPEED_RSSI_HIGH "gLinkSpeedRssiHigh"
+#define CFG_LINK_SPEED_RSSI_HIGH_MIN (-127)
+#define CFG_LINK_SPEED_RSSI_HIGH_MAX (0)
+#define CFG_LINK_SPEED_RSSI_HIGH_DEFAULT (-55)
+
+#define CFG_LINK_SPEED_RSSI_MID "gLinkSpeedRssiMed"
+#define CFG_LINK_SPEED_RSSI_MID_MIN (-127)
+#define CFG_LINK_SPEED_RSSI_MID_MAX (0)
+#define CFG_LINK_SPEED_RSSI_MID_DEFAULT (-65)
+
+#define CFG_LINK_SPEED_RSSI_LOW "gLinkSpeedRssiLow"
+#define CFG_LINK_SPEED_RSSI_LOW_MIN (-127)
+#define CFG_LINK_SPEED_RSSI_LOW_MAX (0)
+#define CFG_LINK_SPEED_RSSI_LOW_DEFAULT (-80)
+
+#define CFG_P2P_DEVICE_ADDRESS_ADMINISTRATED_NAME "isP2pDeviceAddrAdministrated"
+#define CFG_P2P_DEVICE_ADDRESS_ADMINISTRATED_MIN (0)
+#define CFG_P2P_DEVICE_ADDRESS_ADMINISTRATED_MAX (1)
+#define CFG_P2P_DEVICE_ADDRESS_ADMINISTRATED_DEFAULT (1)
+
+#define CFG_ENABLE_SSR "gEnableSSR"
+#define CFG_ENABLE_SSR_MIN (0)
+#define CFG_ENABLE_SSR_MAX (1)
+#define CFG_ENABLE_SSR_DEFAULT (1)
+
+#define CFG_ENABLE_OVERLAP_CH "gEnableOverLapCh"
+#define CFG_ENABLE_OVERLAP_CH_MIN (0)
+#define CFG_ENABLE_OVERLAP_CH_MAX (1)
+#define CFG_ENABLE_OVERLAP_CH_DEFAULT (0)
+
+#define CFG_PPS_ENABLE_5G_EBT "gEnable5gEBT"
+#define CFG_PPS_ENABLE_5G_EBT_FEATURE_MIN (0)
+#define CFG_PPS_ENABLE_5G_EBT_FEATURE_MAX (1)
+#define CFG_PPS_ENABLE_5G_EBT_FEATURE_DEFAULT (0)
+
+#define CFG_ENABLE_MEMORY_DEEP_SLEEP "gEnableMemDeepSleep"
+#define CFG_ENABLE_MEMORY_DEEP_SLEEP_MIN (0)
+#define CFG_ENABLE_MEMORY_DEEP_SLEEP_MAX (1)
+#define CFG_ENABLE_MEMORY_DEEP_SLEEP_DEFAULT (1)
+
+/* In cfg.dat 1=1MBPS, 2=2MBPS, 3=5_5MBPS, 4=11MBPS, 5=6MBPS, 6=9MBPS,
+ * 7=12MBPS, 8=18MBPS, 9=24MBPS. But 6=9MBPS and 8=18MBPS are not basic
+ * 11g rates and should not be set by gDefaultRateIndex24Ghz.
+ */
+
+#define CFG_DEFAULT_RATE_INDEX_24GH "gDefaultRateIndex24Ghz"
+#define CFG_DEFAULT_RATE_INDEX_24GH_MIN (1)
+#define CFG_DEFAULT_RATE_INDEX_24GH_MAX (9)
+#define CFG_DEFAULT_RATE_INDEX_24GH_DEFAULT (1)
+
+#define CFG_ENABLE_PACKET_LOG "gEnablePacketLog"
+#define CFG_ENABLE_PACKET_LOG_MIN (0)
+#define CFG_ENABLE_PACKET_LOG_MAX (1)
+#define CFG_ENABLE_PACKET_LOG_DEFAULT (1)
+
+/* gFwDebugLogType takes values from enum dbglog_process_t,
+ * make default value as DBGLOG_PROCESS_NET_RAW to give the
+ * logs to net link since cnss_diag service is started at boot
+ * time by default.
+ */
+#define CFG_ENABLE_FW_LOG_TYPE "gFwDebugLogType"
+#define CFG_ENABLE_FW_LOG_TYPE_MIN (0)
+#define CFG_ENABLE_FW_LOG_TYPE_MAX (255)
+#define CFG_ENABLE_FW_LOG_TYPE_DEFAULT (3)
+
+/* gFwDebugLogLevel takes values from enum DBGLOG_LOG_LVL,
+ * make default value as DBGLOG_WARN to enable error and
+ * warning logs by default.
+ */
+#define CFG_ENABLE_FW_DEBUG_LOG_LEVEL "gFwDebugLogLevel"
+#define CFG_ENABLE_FW_DEBUG_LOG_LEVEL_MIN (0)
+#define CFG_ENABLE_FW_DEBUG_LOG_LEVEL_MAX (255)
+#define CFG_ENABLE_FW_DEBUG_LOG_LEVEL_DEFAULT (4)
+
+/* For valid values of log levels check enum DBGLOG_LOG_LVL and
+ * for valid values of module ids check enum WLAN_MODULE_ID.
+ */
+#define CFG_ENABLE_FW_MODULE_LOG_LEVEL "gFwDebugModuleLoglevel"
+#define CFG_ENABLE_FW_MODULE_LOG_DEFAULT ""
+
+#ifdef FEATURE_GREEN_AP
+#define CFG_ENABLE_GREEN_AP_FEATURE "gEnableGreenAp"
+#define CFG_ENABLE_GREEN_AP_FEATURE_MIN (0)
+#define CFG_ENABLE_GREEN_AP_FEATURE_MAX (1)
+#define CFG_ENABLE_GREEN_AP_FEATURE_DEFAULT (1)
+#endif
+
+#ifdef FEATURE_WLAN_FORCE_SAP_SCC
+#define CFG_SAP_SCC_CHAN_AVOIDANCE "gSapSccChanAvoidance"
+#define CFG_SAP_SCC_CHAN_AVOIDANCE_MIN (0)
+#define CFG_SAP_SCC_CHAN_AVOIDANCE_MAX (1)
+#define CFG_SAP_SCC_CHAN_AVOIDANCE_DEFAULT (0)
+#endif /* FEATURE_WLAN_FORCE_SAP_SCC */
+
+/*
+ * CDF Trace Enable Control
+ * Notes:
+ * the MIN/MAX/DEFAULT values apply for all modules
+ * the DEFAULT value is outside the valid range. if the DEFAULT
+ * value is not overridden, then no change will be made to the
+ * "built in" default values compiled into the code
+ * values are a bitmap indicating which log levels are to enabled
+ * (must match order of cdf_trace_level enumerations)
+ * 00000001 FATAL
+ * 00000010 ERROR
+ * 00000100 WARN
+ * 00001000 INFO
+ * 00010000 INFO HIGH
+ * 00100000 INFO MED
+ * 01000000 INFO LOW
+ * 10000000 DEBUG
+ *
+ * hence a value of 0xFF would set all bits (enable all logs)
+ */
+
+#define CFG_CDF_TRACE_ENABLE_WDI_NAME "cdf_trace_enable_wdi"
+#define CFG_CDF_TRACE_ENABLE_HDD_NAME "cdf_trace_enable_hdd"
+#define CFG_CDF_TRACE_ENABLE_SME_NAME "cdf_trace_enable_sme"
+#define CFG_CDF_TRACE_ENABLE_PE_NAME "cdf_trace_enable_pe"
+#define CFG_CDF_TRACE_ENABLE_PMC_NAME "cdf_trace_enable_pmc"
+#define CFG_CDF_TRACE_ENABLE_WMA_NAME "cdf_trace_enable_wma"
+#define CFG_CDF_TRACE_ENABLE_SYS_NAME "cdf_trace_enable_sys"
+#define CFG_CDF_TRACE_ENABLE_CDF_NAME "cdf_trace_enable_cdf"
+#define CFG_CDF_TRACE_ENABLE_SAP_NAME "cdf_trace_enable_sap"
+#define CFG_CDF_TRACE_ENABLE_HDD_SAP_NAME "cdf_trace_enable_hdd_sap"
+#define CFG_CDF_TRACE_ENABLE_BMI_NAME "cdf_trace_enable_bmi"
+
+#define CFG_CDF_TRACE_ENABLE_MIN (0)
+#define CFG_CDF_TRACE_ENABLE_MAX (0xff)
+#define CFG_CDF_TRACE_ENABLE_DEFAULT (0xffff)
+
+#define HDD_MCASTBCASTFILTER_FILTER_NONE 0x00
+#define HDD_MCASTBCASTFILTER_FILTER_ALL_MULTICAST 0x01
+#define HDD_MCASTBCASTFILTER_FILTER_ALL_BROADCAST 0x02
+#define HDD_MCASTBCASTFILTER_FILTER_ALL_MULTICAST_BROADCAST 0x03
+#define HDD_MULTICAST_FILTER_LIST 0x04
+#define HDD_MULTICAST_FILTER_LIST_CLEAR 0x05
+
+/*BMPS Logic
+ * Notes:
+ * 1 - Then Host driver and above layers control the PS mechanism
+ * 0 - Diver/Core Stack internally control the Power saving mechanism
+ */
+#define CFG_ANDRIOD_POWER_SAVE_NAME "isAndroidPsEn"
+#define CFG_ANDRIOD_POWER_SAVE_MIN (0)
+#define CFG_ANDRIOD_POWER_SAVE_MAX (1)
+#define CFG_ANDRIOD_POWER_SAVE_DEFAULT (0)
+
+/*
+ * Enable Dynamic DTIM
+ * Options
+ * 0 -Disable DynamicDTIM
+ * 1 to 5 - SLM will switch to DTIM specified here when host suspends and
+ * switch DTIM1 when host resumes */
+#define CFG_ENABLE_DYNAMIC_DTIM_NAME "gEnableDynamicDTIM"
+#define CFG_ENABLE_DYNAMIC_DTIM_MIN (0)
+#define CFG_ENABLE_DYNAMIC_DTIM_MAX (5)
+#define CFG_ENABLE_DYNAMIC_DTIM_DEFAULT (0)
+
+/*
+ * Enable First Scan 2G Only
+ * Options
+ * 0 - Disable First Scan 2G Option
+ * 1 - Enable First Scan 2G Option
+ */
+#define CFG_ENABLE_FIRST_SCAN_2G_ONLY_NAME "gEnableFirstScan2GOnly"
+#define CFG_ENABLE_FIRST_SCAN_2G_ONLY_MIN (0)
+#define CFG_ENABLE_FIRST_SCAN_2G_ONLY_MAX (1)
+#define CFG_ENABLE_FIRST_SCAN_2G_ONLY_DEFAULT (0)
+
+/*
+ * Driver Force ACS is reintroduced for android SAP legacy configuration method.
+ * If Driver force acs is enabled, channel/ hw config from hostapd is ignored.
+ * Driver uses INI params dot11Mode, channel bonding mode and vht chan width
+ * to derive ACS HW mode and operating BW.
+ *
+ * Non android platforms shall not use force ACS method and rely on hostapd
+ * driven ACS method for concurrent SAP ACS configuration, OBSS etc.
+ */
+#define CFG_FORCE_SAP_ACS "gApAutoChannelSelection"
+#define CFG_FORCE_SAP_ACS_MIN (0)
+#define CFG_FORCE_SAP_ACS_MAX (1)
+#define CFG_FORCE_SAP_ACS_DEFAULT (0)
+
+#define CFG_FORCE_SAP_ACS_START_CH "gAPChannelSelectStartChannel"
+#define CFG_FORCE_SAP_ACS_START_CH_MIN (0)
+#define CFG_FORCE_SAP_ACS_START_CH_MAX (0xFF)
+#define CFG_FORCE_SAP_ACS_START_CH_DEFAULT (1)
+
+#define CFG_FORCE_SAP_ACS_END_CH "gAPChannelSelectEndChannel"
+#define CFG_FORCE_SAP_ACS_END_CH_MIN (0)
+#define CFG_FORCE_SAP_ACS_END_CH_MAX (0xFF)
+#define CFG_FORCE_SAP_ACS_END_CH_DEFAULT (11)
+
+/*
+ * Skip DFS Channel in case of P2P Search
+ * Options
+ * 0 - Don't Skip DFS Channel in case of P2P Search
+ * 1 - Skip DFS Channel in case of P2P Search
+ */
+#define CFG_ENABLE_SKIP_DFS_IN_P2P_SEARCH_NAME "gSkipDfsChannelInP2pSearch"
+#define CFG_ENABLE_SKIP_DFS_IN_P2P_SEARCH_MIN (0)
+#define CFG_ENABLE_SKIP_DFS_IN_P2P_SEARCH_MAX (1)
+#define CFG_ENABLE_SKIP_DFS_IN_P2P_SEARCH_DEFAULT (1)
+
+/*
+ * Ignore Dynamic Dtim in case of P2P
+ * Options
+ * 0 - Consider Dynamic Dtim incase of P2P
+ * 1 - Ignore Dynamic Dtim incase of P2P
+ */
+#define CFG_IGNORE_DYNAMIC_DTIM_IN_P2P_MODE_NAME "gIgnoreDynamicDtimInP2pMode"
+#define CFG_IGNORE_DYNAMIC_DTIM_IN_P2P_MODE_MIN (0)
+#define CFG_IGNORE_DYNAMIC_DTIM_IN_P2P_MODE_MAX (1)
+#define CFG_IGNORE_DYNAMIC_DTIM_IN_P2P_MODE_DEFAULT (0)
+
+#define CFG_ENABLE_AUTOMATIC_TX_POWER_CONTROL_NAME "gEnableAutomaticTxPowerControl"
+#define CFG_ENABLE_AUTOMATIC_TX_POWER_CONTROL_MIN (0)
+#define CFG_ENABLE_AUTOMATIC_TX_POWER_CONTROL_MAX (1)
+#define CFG_ENABLE_AUTOMATIC_TX_POWER_CONTROL_DEFAULT (1)
+
+#define CFG_SHORT_GI_40MHZ_NAME "gShortGI40Mhz"
+#define CFG_SHORT_GI_40MHZ_MIN 0
+#define CFG_SHORT_GI_40MHZ_MAX 1
+#define CFG_SHORT_GI_40MHZ_DEFAULT 1
+
+/*
+ * Enable / Disable MCC feature
+ * Default: Enable
+ */
+#define CFG_ENABLE_MCC_ENABLED_NAME "gEnableMCCMode"
+#define CFG_ENABLE_MCC_ENABLED_MIN (0)
+#define CFG_ENABLE_MCC_ENABLED_MAX (1)
+#define CFG_ENABLE_MCC_ENABLED_DEFAULT (1)
+
+/*
+ * Allow GO in MCC mode to accept different beacon interval than STA's.
+ * Added for Wi-Fi Cert. 5.1.12
+ * Default: gAllowMCCGODiffBI = 2
+ * If gAllowMCCGODiffBI = 1 // Set to 1 for WFA certification. GO Beacon
+ * interval is not changed. MCC GO
+ * doesn't work well in optimized way.
+ * In worst scenario, it may invite STA
+ * disconnection.
+ * gAllowMCCGODiffBI = 2 //If set to 2 workaround 1 disassoc all the clients
+ * and update beacon Interval
+ * gAllowMCCGODiffBI = 3 //If set to 3 tear down the P2P link in auto/
+ * Non-autonomous -GO case
+ * gAllowMCCGODiffBI = 4 //If set to 4 don't disconnect the P2P client
+ * in autonomous/Non-autonomous -GO case update
+ * the BI dynamically
+ */
+#define CFG_ALLOW_MCC_GO_DIFF_BI_NAME "gAllowMCCGODiffBI"
+#define CFG_ALLOW_MCC_GO_DIFF_BI_MIN (0)
+#define CFG_ALLOW_MCC_GO_DIFF_BI_MAX (4)
+#define CFG_ALLOW_MCC_GO_DIFF_BI_DEFAULT (4)
+
+/*
+ * Enable/Disable Thermal Mitigation feature
+ * Default: Enable
+ */
+#define CFG_THERMAL_MIGRATION_ENABLE_NAME "gThermalMitigationEnable"
+#define CFG_THERMAL_MIGRATION_ENABLE_MIN (0)
+#define CFG_THERMAL_MIGRATION_ENABLE_MAX (1)
+#define CFG_THERMAL_MIGRATION_ENABLE_DEFAULT (1)
+
+#define CFG_THROTTLE_PERIOD_NAME "gThrottlePeriod"
+#define CFG_THROTTLE_PERIOD_MIN (10)
+#define CFG_THROTTLE_PERIOD_MAX (10000)
+#define CFG_THROTTLE_PERIOD_DEFAULT (4000)
+
+#define CFG_THERMAL_TEMP_MIN_LEVEL0_NAME "gThermalTempMinLevel0"
+#define CFG_THERMAL_TEMP_MIN_LEVEL0_MIN (0)
+#define CFG_THERMAL_TEMP_MIN_LEVEL0_MAX (1000)
+#define CFG_THERMAL_TEMP_MIN_LEVEL0_DEFAULT (0)
+
+#define CFG_THERMAL_TEMP_MAX_LEVEL0_NAME "gThermalTempMaxLevel0"
+#define CFG_THERMAL_TEMP_MAX_LEVEL0_MIN (0)
+#define CFG_THERMAL_TEMP_MAX_LEVEL0_MAX (1000)
+#define CFG_THERMAL_TEMP_MAX_LEVEL0_DEFAULT (90)
+
+#define CFG_THERMAL_TEMP_MIN_LEVEL1_NAME "gThermalTempMinLevel1"
+#define CFG_THERMAL_TEMP_MIN_LEVEL1_MIN (0)
+#define CFG_THERMAL_TEMP_MIN_LEVEL1_MAX (1000)
+#define CFG_THERMAL_TEMP_MIN_LEVEL1_DEFAULT (70)
+
+#define CFG_THERMAL_TEMP_MAX_LEVEL1_NAME "gThermalTempMaxLevel1"
+#define CFG_THERMAL_TEMP_MAX_LEVEL1_MIN (0)
+#define CFG_THERMAL_TEMP_MAX_LEVEL1_MAX (1000)
+#define CFG_THERMAL_TEMP_MAX_LEVEL1_DEFAULT (110)
+
+#define CFG_THERMAL_TEMP_MIN_LEVEL2_NAME "gThermalTempMinLevel2"
+#define CFG_THERMAL_TEMP_MIN_LEVEL2_MIN (0)
+#define CFG_THERMAL_TEMP_MIN_LEVEL2_MAX (1000)
+#define CFG_THERMAL_TEMP_MIN_LEVEL2_DEFAULT (90)
+
+#define CFG_THERMAL_TEMP_MAX_LEVEL2_NAME "gThermalTempMaxLevel2"
+#define CFG_THERMAL_TEMP_MAX_LEVEL2_MIN (0)
+#define CFG_THERMAL_TEMP_MAX_LEVEL2_MAX (1000)
+#define CFG_THERMAL_TEMP_MAX_LEVEL2_DEFAULT (125)
+
+#define CFG_THERMAL_TEMP_MIN_LEVEL3_NAME "gThermalTempMinLevel3"
+#define CFG_THERMAL_TEMP_MIN_LEVEL3_MIN (0)
+#define CFG_THERMAL_TEMP_MIN_LEVEL3_MAX (1000)
+#define CFG_THERMAL_TEMP_MIN_LEVEL3_DEFAULT (110)
+
+#define CFG_THERMAL_TEMP_MAX_LEVEL3_NAME "gThermalTempMaxLevel3"
+#define CFG_THERMAL_TEMP_MAX_LEVEL3_MIN (0)
+#define CFG_THERMAL_TEMP_MAX_LEVEL3_MAX (1000)
+#define CFG_THERMAL_TEMP_MAX_LEVEL3_DEFAULT (0)
+
+/*
+ * Enable/Disable Modulated DTIM feature
+ * Default: Disable
+ */
+#define CFG_ENABLE_MODULATED_DTIM_NAME "gEnableModulatedDTIM"
+#define CFG_ENABLE_MODULATED_DTIM_MIN (0)
+#define CFG_ENABLE_MODULATED_DTIM_MAX (5)
+#define CFG_ENABLE_MODULATED_DTIM_DEFAULT (0)
+
+/*
+ * Enable/Disable Multicast MAC Address List feature
+ * Default: Disable
+ */
+#define CFG_MC_ADDR_LIST_ENABLE_NAME "gMCAddrListEnable"
+#define CFG_MC_ADDR_LIST_ENABLE_MIN (0)
+#define CFG_MC_ADDR_LIST_ENABLE_MAX (1)
+#define CFG_MC_ADDR_LIST_ENABLE_DEFAULT (0)
+
+#define CFG_ENABLE_RX_STBC "gEnableRXSTBC"
+#define CFG_ENABLE_RX_STBC_MIN (0)
+#define CFG_ENABLE_RX_STBC_MAX (1)
+#define CFG_ENABLE_RX_STBC_DEFAULT (1)
+
+#define CFG_ENABLE_TX_STBC "gEnableTXSTBC"
+#define CFG_ENABLE_TX_STBC_MIN (0)
+#define CFG_ENABLE_TX_STBC_MAX (1)
+#define CFG_ENABLE_TX_STBC_DEFAULT (0)
+
+#define CFG_ENABLE_RX_LDPC "gEnableRXLDPC"
+#define CFG_ENABLE_RX_LDPC_MIN (0)
+#define CFG_ENABLE_RX_LDPC_MAX (1)
+#define CFG_ENABLE_RX_LDPC_DEFAULT (0)
+
+/*
+ * Enable/Disable vsta based on MAX Assoc limit
+ * defined in WCNSS_qcom_cfg.ini.
+ */
+#ifdef WLAN_SOFTAP_VSTA_FEATURE
+#define CFG_VSTA_SUPPORT_ENABLE "gEnableVSTASupport"
+#define CFG_VSTA_SUPPORT_ENABLE_MIN (0)
+#define CFG_VSTA_SUPPORT_ENABLE_MAX (1)
+#define CFG_VSTA_SUPPORT_ENABLE_DEFAULT (0)
+#endif
+
+#ifdef FEATURE_WLAN_TDLS
+#define CFG_TDLS_SUPPORT_ENABLE "gEnableTDLSSupport"
+#define CFG_TDLS_SUPPORT_ENABLE_MIN (0)
+#define CFG_TDLS_SUPPORT_ENABLE_MAX (1)
+#define CFG_TDLS_SUPPORT_ENABLE_DEFAULT (0)
+
+#define CFG_TDLS_IMPLICIT_TRIGGER "gEnableTDLSImplicitTrigger"
+#define CFG_TDLS_IMPLICIT_TRIGGER_MIN (0)
+#define CFG_TDLS_IMPLICIT_TRIGGER_MAX (1)
+#define CFG_TDLS_IMPLICIT_TRIGGER_DEFAULT (0)
+
+#define CFG_TDLS_TX_STATS_PERIOD "gTDLSTxStatsPeriod"
+#define CFG_TDLS_TX_STATS_PERIOD_MIN (10)
+#define CFG_TDLS_TX_STATS_PERIOD_MAX (4294967295UL)
+#define CFG_TDLS_TX_STATS_PERIOD_DEFAULT (5000)
+
+#define CFG_TDLS_TX_PACKET_THRESHOLD "gTDLSTxPacketThreshold"
+#define CFG_TDLS_TX_PACKET_THRESHOLD_MIN (0)
+#define CFG_TDLS_TX_PACKET_THRESHOLD_MAX (4294967295UL)
+#define CFG_TDLS_TX_PACKET_THRESHOLD_DEFAULT (100)
+
+#define CFG_TDLS_MAX_DISCOVERY_ATTEMPT "gTDLSMaxDiscoveryAttempt"
+#define CFG_TDLS_MAX_DISCOVERY_ATTEMPT_MIN (1)
+#define CFG_TDLS_MAX_DISCOVERY_ATTEMPT_MAX (100)
+#define CFG_TDLS_MAX_DISCOVERY_ATTEMPT_DEFAULT (5)
+
+#define CFG_TDLS_IDLE_PACKET_THRESHOLD "gTDLSIdlePacketThreshold"
+#define CFG_TDLS_IDLE_PACKET_THRESHOLD_MIN (0)
+#define CFG_TDLS_IDLE_PACKET_THRESHOLD_MAX (40000)
+#define CFG_TDLS_IDLE_PACKET_THRESHOLD_DEFAULT (5)
+
+#define CFG_TDLS_RSSI_TRIGGER_THRESHOLD "gTDLSRSSITriggerThreshold"
+#define CFG_TDLS_RSSI_TRIGGER_THRESHOLD_MIN (-120)
+#define CFG_TDLS_RSSI_TRIGGER_THRESHOLD_MAX (0)
+#define CFG_TDLS_RSSI_TRIGGER_THRESHOLD_DEFAULT (-75)
+
+#define CFG_TDLS_RSSI_TEARDOWN_THRESHOLD "gTDLSRSSITeardownThreshold"
+#define CFG_TDLS_RSSI_TEARDOWN_THRESHOLD_MIN (-120)
+#define CFG_TDLS_RSSI_TEARDOWN_THRESHOLD_MAX (0)
+#define CFG_TDLS_RSSI_TEARDOWN_THRESHOLD_DEFAULT (-75)
+
+#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)
+
+#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)
+#define CFG_TDLS_QOS_WMM_UAPSD_MASK_MAX (0x0F)
+#define CFG_TDLS_QOS_WMM_UAPSD_MASK_DEFAULT (0x0F)
+
+#define CFG_TDLS_BUFFER_STA_SUPPORT_ENABLE "gEnableTDLSBufferSta"
+#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 */
+#define CFG_TDLS_BUFFER_STA_SUPPORT_ENABLE_DEFAULT (1)
+
+#define CFG_TDLS_PUAPSD_INACTIVITY_TIME "gTDLSPuapsdInactivityTime"
+#define CFG_TDLS_PUAPSD_INACTIVITY_TIME_MIN (0)
+#define CFG_TDLS_PUAPSD_INACTIVITY_TIME_MAX (10)
+#define CFG_TDLS_PUAPSD_INACTIVITY_TIME_DEFAULT (0)
+
+#define CFG_TDLS_PUAPSD_RX_FRAME_THRESHOLD "gTDLSPuapsdRxFrameThreshold"
+#define CFG_TDLS_PUAPSD_RX_FRAME_THRESHOLD_MIN (10)
+#define CFG_TDLS_PUAPSD_RX_FRAME_THRESHOLD_MAX (20)
+#define CFG_TDLS_PUAPSD_RX_FRAME_THRESHOLD_DEFAULT (10)
+
+#define CFG_TDLS_PUAPSD_PEER_TRAFFIC_IND_WINDOW "gTDLSPuapsdPTIWindow"
+#define CFG_TDLS_PUAPSD_PEER_TRAFFIC_IND_WINDOW_MIN (1)
+#define CFG_TDLS_PUAPSD_PEER_TRAFFIC_IND_WINDOW_MAX (5)
+#define CFG_TDLS_PUAPSD_PEER_TRAFFIC_IND_WINDOW_DEFAULT (2)
+
+#define CFG_TDLS_PUAPSD_PEER_TRAFFIC_RSP_TIMEOUT "gTDLSPuapsdPTRTimeout"
+#define CFG_TDLS_PUAPSD_PEER_TRAFFIC_RSP_TIMEOUT_MIN (0)
+#define CFG_TDLS_PUAPSD_PEER_TRAFFIC_RSP_TIMEOUT_MAX (10000)
+#define CFG_TDLS_PUAPSD_PEER_TRAFFIC_RSP_TIMEOUT_DEFAULT (5000)
+
+#define CFG_TDLS_EXTERNAL_CONTROL "gTDLSExternalControl"
+#define CFG_TDLS_EXTERNAL_CONTROL_MIN (0)
+#define CFG_TDLS_EXTERNAL_CONTROL_MAX (1)
+#define CFG_TDLS_EXTERNAL_CONTROL_DEFAULT (0)
+
+#define CFG_TDLS_OFF_CHANNEL_SUPPORT_ENABLE "gEnableTDLSOffChannel"
+#define CFG_TDLS_OFF_CHANNEL_SUPPORT_ENABLE_MIN (0)
+#define CFG_TDLS_OFF_CHANNEL_SUPPORT_ENABLE_MAX (1)
+#define CFG_TDLS_OFF_CHANNEL_SUPPORT_ENABLE_DEFAULT (0)
+
+#define CFG_TDLS_WMM_MODE_ENABLE "gEnableTDLSWmmMode"
+#define CFG_TDLS_WMM_MODE_ENABLE_MIN (0)
+#define CFG_TDLS_WMM_MODE_ENABLE_MAX (1)
+#define CFG_TDLS_WMM_MODE_ENABLE_DEFAULT (1)
+
+#define CFG_TDLS_PREFERRED_OFF_CHANNEL_NUM "gTDLSPrefOffChanNum"
+#define CFG_TDLS_PREFERRED_OFF_CHANNEL_NUM_MIN (1)
+#define CFG_TDLS_PREFERRED_OFF_CHANNEL_NUM_MAX (165)
+#define CFG_TDLS_PREFERRED_OFF_CHANNEL_NUM_DEFAULT (36)
+
+#define CFG_TDLS_PREFERRED_OFF_CHANNEL_BW "gTDLSPrefOffChanBandwidth"
+#define CFG_TDLS_PREFERRED_OFF_CHANNEL_BW_MIN (0)
+#define CFG_TDLS_PREFERRED_OFF_CHANNEL_BW_MAX (0x0F)
+#define CFG_TDLS_PREFERRED_OFF_CHANNEL_BW_DEFAULT (0x07)
+
+/* Enable TDLS Scan: Allow scan and maintain TDLS link.
+ * 0: If peer is not buffer STA capable and device is not sleep STA
+ * capable, then teardown TDLS link when scan is initiated. If peer
+ * is buffer STA and we can be sleep STA then TDLS link is maintained
+ * during scan.
+ * 1: Maintain TDLS link and allow scan even if peer is not buffer STA
+ * capable and device is not sleep STA capable. There will be loss of
+ * Rx pkts since peer would not know when device moves away from tdls
+ * channel. Tx on TDLS link would stop when device moves away from tdls
+ * channel.
+ */
+#define CFG_TDLS_SCAN_ENABLE "gEnableTDLSScan"
+#define CFG_TDLS_SCAN_ENABLE_MIN (0)
+#define CFG_TDLS_SCAN_ENABLE_MAX (1)
+#define CFG_TDLS_SCAN_ENABLE_DEFAULT (0)
+#endif
+
+/* Enable/Disable LPWR Image(cMEM uBSP) Transition */
+#define CFG_ENABLE_LPWR_IMG_TRANSITION_NAME "gEnableLpwrImgTransition"
+#define CFG_ENABLE_LPWR_IMG_TRANSITION_MIN (0)
+#define CFG_ENABLE_LPWR_IMG_TRANSITION_MAX (1)
+#define CFG_ENABLE_LPWR_IMG_TRANSITION_DEFAULT (0)
+
+/*
+ * Scan Aging timeout value in seconds
+ */
+#define CFG_SCAN_AGING_PARAM_NAME "gScanAgingTime"
+#define CFG_SCAN_AGING_PARAM_MIN (0)
+#define CFG_SCAN_AGING_PARAM_MAX (200)
+#define CFG_SCAN_AGING_PARAM_DEFAULT (60)
+
+/* Config Param to enable the txLdpc capability
+ * 0 - disable
+ * 1 - HT LDPC enable
+ * 2 - VHT LDPC enable
+ * 3 - HT & VHT LDPC enable */
+#define CFG_TX_LDPC_ENABLE_FEATURE "gTxLdpcEnable"
+#define CFG_TX_LDPC_ENABLE_FEATURE_MIN (0)
+#define CFG_TX_LDPC_ENABLE_FEATURE_MAX (3)
+#define CFG_TX_LDPC_ENABLE_FEATURE_DEFAULT (0)
+
+/*
+ * Enable / Disable MCC Adaptive Scheduler feature
+ * Default: Enable
+ */
+#define CFG_ENABLE_MCC_ADATIVE_SCHEDULER_ENABLED_NAME "gEnableMCCAdaptiveScheduler"
+#define CFG_ENABLE_MCC_ADATIVE_SCHEDULER_ENABLED_MIN (0)
+#define CFG_ENABLE_MCC_ADATIVE_SCHEDULER_ENABLED_MAX (1)
+#define CFG_ENABLE_MCC_ADATIVE_SCHEDULER_ENABLED_DEFAULT (1)
+
+#define CFG_VHT_SU_BEAMFORMEE_CAP_FEATURE "gTxBFEnable"
+#define CFG_VHT_SU_BEAMFORMEE_CAP_FEATURE_MIN (WNI_CFG_VHT_SU_BEAMFORMEE_CAP_STAMIN)
+#define CFG_VHT_SU_BEAMFORMEE_CAP_FEATURE_MAX (WNI_CFG_VHT_SU_BEAMFORMEE_CAP_STAMAX)
+#define CFG_VHT_SU_BEAMFORMEE_CAP_FEATURE_DEFAULT (WNI_CFG_VHT_SU_BEAMFORMEE_CAP_STADEF)
+
+#define CFG_VHT_CSN_BEAMFORMEE_ANT_SUPPORTED "gTxBFCsnValue"
+#define CFG_VHT_CSN_BEAMFORMEE_ANT_SUPPORTED_MIN (WNI_CFG_VHT_CSN_BEAMFORMEE_ANT_SUPPORTED_STAMIN)
+#define CFG_VHT_CSN_BEAMFORMEE_ANT_SUPPORTED_MAX (WNI_CFG_VHT_CSN_BEAMFORMEE_ANT_SUPPORTED_STAMAX - 1)
+#define CFG_VHT_CSN_BEAMFORMEE_ANT_SUPPORTED_DEFAULT (WNI_CFG_VHT_CSN_BEAMFORMEE_ANT_SUPPORTED_STAMAX - 1)
+
+#define CFG_VHT_ENABLE_TXBF_IN_20MHZ "gEnableTxBFin20MHz"
+#define CFG_VHT_ENABLE_TXBF_IN_20MHZ_MIN (0)
+#define CFG_VHT_ENABLE_TXBF_IN_20MHZ_MAX (1)
+#define CFG_VHT_ENABLE_TXBF_IN_20MHZ_DEFAULT (0)
+
+#define CFG_VHT_ENABLE_TX_SU_BEAM_FORMER "gEnableTxSUBeamformer"
+#define CFG_VHT_ENABLE_TX_SU_BEAM_FORMER_MIN (0)
+#define CFG_VHT_ENABLE_TX_SU_BEAM_FORMER_MAX (1)
+#define CFG_VHT_ENABLE_TX_SU_BEAM_FORMER_DEFAULT (0)
+
+/* Enable debug for remain on channel issues */
+#define CFG_DEBUG_P2P_REMAIN_ON_CHANNEL_NAME "gDebugP2pRemainOnChannel"
+#define CFG_DEBUG_P2P_REMAIN_ON_CHANNEL_DEFAULT (0)
+#define CFG_DEBUG_P2P_REMAIN_ON_CHANNEL_MIN (0)
+#define CFG_DEBUG_P2P_REMAIN_ON_CHANNEL_MAX (1)
+
+/*
+ * SAP ALLOW All Channels
+ */
+#define CFG_SAP_ALLOW_ALL_CHANNEL_PARAM_NAME "gSapAllowAllChannel"
+#define CFG_SAP_ALLOW_ALL_CHANNEL_PARAM_MIN (0)
+#define CFG_SAP_ALLOW_ALL_CHANNEL_PARAM_MAX (1)
+#define CFG_SAP_ALLOW_ALL_CHANNEL_PARAM_DEFAULT (0)
+
+#ifdef WLAN_FEATURE_11AC
+#define CFG_DISABLE_LDPC_WITH_TXBF_AP "gDisableLDPCWithTxbfAP"
+#define CFG_DISABLE_LDPC_WITH_TXBF_AP_MIN (0)
+#define CFG_DISABLE_LDPC_WITH_TXBF_AP_MAX (1)
+#define CFG_DISABLE_LDPC_WITH_TXBF_AP_DEFAULT (0)
+#endif
+
+/*
+ * IBSS Operating Channels for 2.4G and 5GHz channels
+ */
+#define CFG_IBSS_ADHOC_CHANNEL_5GHZ_NAME "gAdHocChannel5G"
+#define CFG_IBSS_ADHOC_CHANNEL_5GHZ_MIN (36)
+#define CFG_IBSS_ADHOC_CHANNEL_5GHZ_MAX (165)
+#define CFG_IBSS_ADHOC_CHANNEL_5GHZ_DEFAULT (44)
+
+#define CFG_IBSS_ADHOC_CHANNEL_24GHZ_NAME "gAdHocChannel24G"
+#define CFG_IBSS_ADHOC_CHANNEL_24GHZ_MIN (1)
+#define CFG_IBSS_ADHOC_CHANNEL_24GHZ_MAX (14)
+#define CFG_IBSS_ADHOC_CHANNEL_24GHZ_DEFAULT (6)
+
+/* Parameter to control VHT support in 2.4 GHz band */
+#define CFG_ENABLE_VHT_FOR_24GHZ_NAME "gEnableVhtFor24GHzBand"
+#define CFG_ENABLE_VHT_FOR_24GHZ_MIN (0)
+#define CFG_ENABLE_VHT_FOR_24GHZ_MAX (1)
+#define CFG_ENABLE_VHT_FOR_24GHZ_DEFAULT (0)
+
+#define CFG_MAX_MEDIUM_TIME "gMaxMediumTime"
+#define CFG_MAX_MEDIUM_TIME_STAMIN WNI_CFG_MAX_MEDIUM_TIME_STAMIN
+#define CFG_MAX_MEDIUM_TIME_STAMAX WNI_CFG_MAX_MEDIUM_TIME_STAMAX
+#define CFG_MAX_MEDIUM_TIME_STADEFAULT WNI_CFG_MAX_MEDIUM_TIME_STADEF
+
+/*
+ * Enable legacy fast roaming (LFR) on STA link during concurrent sessions
+ */
+#define CFG_ENABLE_FAST_ROAM_IN_CONCURRENCY "gEnableFastRoamInConcurrency"
+#define CFG_ENABLE_FAST_ROAM_IN_CONCURRENCY_MIN (0)
+#define CFG_ENABLE_FAST_ROAM_IN_CONCURRENCY_MAX (1)
+#define CFG_ENABLE_FAST_ROAM_IN_CONCURRENCY_DEFAULT (1)
+
+/*
+ * FlexConnectPowerFactor parameter
+ * Default: Disable (0)
+ */
+#define CFG_FLEX_CONNECT_POWER_FACTOR_NAME "gFlexConnectPowerFactor"
+#define CFG_FLEX_CONNECT_POWER_FACTOR_MIN (0)
+#define CFG_FLEX_CONNECT_POWER_FACTOR_MAX (9)
+#define CFG_FLEX_CONNECT_POWER_FACTOR_DEFAULT (0)
+
+/*
+ * Enable heart beat monitoring offload to FW
+ */
+#define CFG_ENABLE_HEART_BEAT_OFFLOAD "gEnableIbssHeartBeatOffload"
+#define CFG_ENABLE_HEART_BEAT_OFFLOAD_MIN (0)
+#define CFG_ENABLE_HEART_BEAT_OFFLOAD_MAX (1)
+#define CFG_ENABLE_HEART_BEAT_OFFLOAD_DEFAULT (1)
+
+#define CFG_ANTENNA_DIVERSITY_PARAM_NAME "gAntennaDiversity"
+#define CFG_ANTENNA_DIVERSITY_PARAM_MIN (0)
+#define CFG_ANTENNA_DIVERSITY_PARAM_MAX (3)
+#define CFG_ANTENNA_DIVERSITY_PARAM_DEFAULT (0)
+
+#define CFG_ENABLE_SNR_MONITORING_NAME "gEnableSNRMonitoring"
+#define CFG_ENABLE_SNR_MONITORING_MIN (0)
+#define CFG_ENABLE_SNR_MONITORING_MAX (1)
+#define CFG_ENABLE_SNR_MONITORING_DEFAULT (0)
+
+#ifdef FEATURE_WLAN_SCAN_PNO
+#define CFG_PNO_SCAN_SUPPORT "gPNOScanSupport"
+#define CFG_PNO_SCAN_SUPPORT_ENABLE (1)
+#define CFG_PNO_SCAN_SUPPORT_DISABLE (0)
+#define CFG_PNO_SCAN_SUPPORT_DEFAULT (1)
+
+#define CFG_PNO_SCAN_TIMER_REPEAT_VALUE "gPNOScanTimerRepeatValue"
+#define CFG_PNO_SCAN_TIMER_REPEAT_VALUE_DEFAULT (6)
+#define CFG_PNO_SCAN_TIMER_REPEAT_VALUE_MIN (0)
+#define CFG_PNO_SCAN_TIMER_REPEAT_VALUE_MAX (0xffffffff)
+#endif
+
+#define CFG_AMSDU_SUPPORT_IN_AMPDU_NAME "gAmsduSupportInAMPDU"
+#define CFG_AMSDU_SUPPORT_IN_AMPDU_MIN (0)
+#define CFG_AMSDU_SUPPORT_IN_AMPDU_MAX (1)
+#define CFG_AMSDU_SUPPORT_IN_AMPDU_DEFAULT (0) /* disabled */
+
+/* Prefer connecting to 5G AP even if its RSSI is lower by
+ gSelect5GHzMargin dBm than 2.4G AP.
+ This feature requires the dependent cfg.ini "gRoamPrefer5GHz" set to 1 */
+#define CFG_STRICT_5GHZ_PREF_BY_MARGIN "gSelect5GHzMargin"
+#define CFG_STRICT_5GHZ_PREF_BY_MARGIN_MIN (0)
+#define CFG_STRICT_5GHZ_PREF_BY_MARGIN_MAX (60)
+#define CFG_STRICT_5GHZ_PREF_BY_MARGIN_DEFAULT (0) /* set 0 to disable */
+
+/* It enables IP, TCP and UDP checksum offload in hardware
+ * and also advertise same to network stack.
+ */
+#define CFG_ENABLE_IP_TCP_UDP_CHKSUM_OFFLOAD "gEnableIpTcpUdpChecksumOffload"
+#define CFG_ENABLE_IP_TCP_UDP_CHKSUM_OFFLOAD_DISABLE (0)
+#define CFG_ENABLE_IP_TCP_UDP_CHKSUM_OFFLOAD_ENABLE (1)
+#define CFG_ENABLE_IP_TCP_UDP_CHKSUM_OFFLOAD_DEFAULT (CFG_ENABLE_IP_TCP_UDP_CHKSUM_OFFLOAD_ENABLE)
+
+/*
+ * Power Save Offload
+ * Power Save Offload configuration:
+ * Current values of gEnablePowerSaveOffload:
+ * 0 -> Power save offload is disabled
+ * 1 -> Legacy Power save enabled + Deep sleep Disabled
+ * 2 -> QPower enabled + Deep sleep Disabled
+ * 3 -> Legacy Power save enabled + Deep sleep Enabled
+ * 4 -> QPower enabled + Deep sleep Enabled
+ * 5 -> Duty cycling QPower enabled
+ */
+#define CFG_POWERSAVE_OFFLOAD_NAME "gEnablePowerSaveOffload"
+#define CFG_POWERSAVE_OFFLOAD_MIN (0)
+#define CFG_POWERSAVE_OFFLOAD_MAX (PS_DUTY_CYCLING_QPOWER)
+#define CFG_POWERSAVE_OFFLOAD_DEFAULT (CFG_POWERSAVE_OFFLOAD_MIN)
+
+#ifdef WLAN_FEATURE_FASTPATH
+#define CFG_ENABLE_FASTPATH "gEnableFastPath"
+#define CFG_ENABLE_FASTPATH_MIN (0)
+#define CFG_ENABLE_FASTPATH_MAX (1)
+#define CFG_ENABLE_FASTPATH_DEFAULT (CFG_ENABLE_FASTPATH_MIN)
+#endif /* WLAN_FEATURE_FASTPATH */
+
+/*
+ * IPA Offload configuration - Each bit enables a feature
+ * bit0 - IPA Enable
+ * bit1 - IPA Pre filter enable
+ * bit2 - IPv6 enable
+ * bit3 - IPA Resource Manager (RM) enable
+ * bit4 - IPA Clock scaling enable
+ */
+#define CFG_IPA_OFFLOAD_CONFIG_NAME "gIPAConfig"
+#define CFG_IPA_OFFLOAD_CONFIG_MIN (0)
+#define CFG_IPA_OFFLOAD_CONFIG_MAX (0xFFFFFFFF)
+#define CFG_IPA_OFFLOAD_CONFIG_DEFAULT (CFG_IPA_OFFLOAD_CONFIG_MIN)
+
+/*
+ * IPA DESC SIZE
+ */
+#define CFG_IPA_DESC_SIZE_NAME "gIPADescSize"
+#define CFG_IPA_DESC_SIZE_MIN (800)
+#define CFG_IPA_DESC_SIZE_MAX (8000)
+#define CFG_IPA_DESC_SIZE_DEFAULT (800)
+
+#define CFG_IPA_HIGH_BANDWIDTH_MBPS "gIPAHighBandwidthMbps"
+#define CFG_IPA_HIGH_BANDWIDTH_MBPS_MIN (200)
+#define CFG_IPA_HIGH_BANDWIDTH_MBPS_MAX (1000)
+#define CFG_IPA_HIGH_BANDWIDTH_MBPS_DEFAULT (400)
+
+#define CFG_IPA_MEDIUM_BANDWIDTH_MBPS "gIPAMediumBandwidthMbps"
+#define CFG_IPA_MEDIUM_BANDWIDTH_MBPS_MIN (100)
+#define CFG_IPA_MEDIUM_BANDWIDTH_MBPS_MAX (400)
+#define CFG_IPA_MEDIUM_BANDWIDTH_MBPS_DEFAULT (200)
+
+#define CFG_IPA_LOW_BANDWIDTH_MBPS "gIPALowBandwidthMbps"
+#define CFG_IPA_LOW_BANDWIDTH_MBPS_MIN (0)
+#define CFG_IPA_LOW_BANDWIDTH_MBPS_MAX (100)
+#define CFG_IPA_LOW_BANDWIDTH_MBPS_DEFAULT (100)
+
+/*
+ * Firmware uart print
+ */
+#define CFG_ENABLE_FW_UART_PRINT_NAME "gEnablefwprint"
+#define CFG_ENABLE_FW_UART_PRINT_DISABLE (0)
+#define CFG_ENABLE_FW_UART_PRINT_ENABLE (1)
+#define CFG_ENABLE_FW_UART_PRINT_DEFAULT (CFG_ENABLE_FW_UART_PRINT_DISABLE)
+
+/*
+ * Firmware log
+ */
+#define CFG_ENABLE_FW_LOG_NAME "gEnablefwlog"
+#define CFG_ENABLE_FW_LOG_DISABLE (0)
+#define CFG_ENABLE_FW_LOG_ENABLE (1)
+#define CFG_ENABLE_FW_LOG_DEFAULT (CFG_ENABLE_FW_LOG_DISABLE)
+
+/*
+ * Enable/Disable SSR for USB
+ */
+#define CFG_ENABLE_FW_SELF_RECOVERY_NAME "gEnableFwSelfRecovery"
+#define CFG_ENABLE_FW_SELF_RECOVERY_DISABLE (0)
+#define CFG_ENABLE_FW_SELF_RECOVERY_ENABLE (1)
+#define CFG_ENABLE_FW_SELF_RECOVERY_DEFAULT (CFG_ENABLE_FW_SELF_RECOVERY_DISABLE)
+
+#ifdef WLAN_FEATURE_11AC
+/* Macro to handle maximum receive AMPDU size configuration */
+#define CFG_VHT_AMPDU_LEN_EXPONENT_NAME "gVhtAmpduLenExponent"
+#define CFG_VHT_AMPDU_LEN_EXPONENT_MIN (0)
+#define CFG_VHT_AMPDU_LEN_EXPONENT_MAX (7)
+#define CFG_VHT_AMPDU_LEN_EXPONENT_DEFAULT (3)
+
+#define CFG_VHT_MPDU_LEN_NAME "gVhtMpduLen"
+#define CFG_VHT_MPDU_LEN_MIN (0)
+#define CFG_VHT_MPDU_LEN_MAX (2)
+#define CFG_VHT_MPDU_LEN_DEFAULT (0)
+#endif
+
+#define CFG_MAX_WOW_FILTERS_NAME "gMaxWoWFilters"
+#define CFG_MAX_WOW_FILTERS_MIN (0)
+#define CFG_MAX_WOW_FILTERS_MAX (WOW_MAX_BITMAP_FILTERS)
+#define CFG_MAX_WOW_FILTERS_DEFAULT (WOW_MAX_BITMAP_FILTERS)
+
+/*
+ * WOW Enable/Disable.
+ * 0 - Disable both magic pattern match and pattern byte match.
+ * 1 - Enable magic pattern match on all interfaces.
+ * 2 - Enable pattern byte match on all interfaces.
+ * 3 - Enable both magic patter and pattern byte match on all interfaces.
+ */
+#define CFG_WOW_STATUS_NAME "gEnableWoW"
+#define CFG_WOW_ENABLE_MIN (0)
+#define CFG_WOW_ENABLE_MAX (3)
+#define CFG_WOW_STATUS_DEFAULT (3)
+
+#define CFG_COALESING_IN_IBSS_NAME "gCoalesingInIBSS"
+#define CFG_COALESING_IN_IBSS_MIN (0)
+#define CFG_COALESING_IN_IBSS_MAX (1)
+#define CFG_COALESING_IN_IBSS_DEFAULT (0) /* disabled */
+
+#define CFG_IBSS_ATIM_WIN_SIZE_NAME "gIbssATIMWinSize"
+#define CFG_IBSS_ATIM_WIN_SIZE_MIN (0)
+#define CFG_IBSS_ATIM_WIN_SIZE_MAX (50)
+#define CFG_IBSS_ATIM_WIN_SIZE_DEFAULT (0)
+
+/*
+ * Indicates if IBSS Power Save is
+ * supported or not. When not allowed,
+ * IBSS station has to stay awake all
+ * the time and should never set PM=1
+ * in its transmitted frames. This
+ * parameter is meaningful/valid only
+ * when gIbssATIMWinSize is non-zero
+ */
+#define CFG_IBSS_IS_POWER_SAVE_ALLOWED_NAME "gIbssIsPowerSaveAllowed"
+#define CFG_IBSS_IS_POWER_SAVE_ALLOWED_MIN (0)
+#define CFG_IBSS_IS_POWER_SAVE_ALLOWED_MAX (1)
+#define CFG_IBSS_IS_POWER_SAVE_ALLOWED_DEFAULT (1)
+
+/*
+ * Indicates if IBSS Power Collapse
+ * is allowed or not.
+ */
+#define CFG_IBSS_IS_POWER_COLLAPSE_ALLOWED_NAME "gIbssIsPowerCollapseAllowed"
+#define CFG_IBSS_IS_POWER_COLLAPSE_ALLOWED_MIN (0)
+#define CFG_IBSS_IS_POWER_COLLAPSE_ALLOWED_MAX (1)
+#define CFG_IBSS_IS_POWER_COLLAPSE_ALLOWED_DEFAULT (1)
+
+/*
+ * This parameter indicates whether IBSS station
+ * can exit power save mode and enter power active
+ * state whenever there is a TX/RX activity.
+ */
+#define CFG_IBSS_AWAKE_ON_TX_RX_NAME "gIbssAwakeOnTxRx"
+#define CFG_IBSS_AWAKE_ON_TX_RX_MIN (0)
+#define CFG_IBSS_AWAKE_ON_TX_RX_MAX (1)
+#define CFG_IBSS_AWAKE_ON_TX_RX_DEFAULT (0)
+
+/*
+ * In IBSS mode if Awake on TX/RX activity is enabled
+ * Ibss Inactivity parameter indicates the data
+ * inactivity time in number of beacon intervals
+ * after which IBSS station re-inters power save
+ * by sending Null frame with PM=1
+ */
+#define CFG_IBSS_INACTIVITY_TIME_NAME "gIbssInactivityTime"
+#define CFG_IBSS_INACTIVITY_TIME_MIN (1)
+#define CFG_IBSS_INACTIVITY_TIME_MAX (10)
+#define CFG_IBSS_INACTIVITY_TIME_DEFAULT (1)
+
+/*
+ * In IBSS mode Tx Service Period Inactivity
+ * time in msecs indicates the time after
+ * which TX Service Period is terminated by
+ * sending a Qos Null frame with EOSP.
+ * If value is 0, TX SP is terminated with the
+ * last buffered packet itself instead of waiting
+ * for the inactivity
+ */
+#define CFG_IBSS_TXSP_END_INACTIVITY_NAME "gIbssTxSpEndInactivityTime"
+#define CFG_IBSS_TXSP_END_INACTIVITY_MIN (0)
+#define CFG_IBSS_TXSP_END_INACTIVITY_MAX (100)
+#define CFG_IBSS_TXSP_END_INACTIVITY_DEFAULT (0)
+
+/*
+ * When IBSS network is initialized, PS-supporting device
+ * does not enter protocol sleep state during first
+ * gIbssPsWarmupTime seconds.
+ */
+#define CFG_IBSS_PS_WARMUP_TIME_NAME "gIbssPsWarmupTime"
+#define CFG_IBSS_PS_WARMUP_TIME_MIN (0)
+/* Allow unsigned Int Max for now */
+#define CFG_IBSS_PS_WARMUP_TIME_MAX (65535)
+#define CFG_IBSS_PS_WARMUP_TIME_DEFAULT (0)
+
+/*
+ * IBSS Power Save Enable/Disable 1 RX
+ * chain usage during the ATIM window
+ */
+#define CFG_IBSS_PS_1RX_CHAIN_IN_ATIM_WINDOW_NAME "gIbssPs1RxChainInAtim"
+#define CFG_IBSS_PS_1RX_CHAIN_IN_ATIM_WINDOW_MIN (0)
+#define CFG_IBSS_PS_1RX_CHAIN_IN_ATIM_WINDOW_MAX (1)
+#define CFG_IBSS_PS_1RX_CHAIN_IN_ATIM_WINDOW_DEFAULT (0)
+
+#define CFG_SAP_MAX_NO_PEERS "gSoftApMaxPeers"
+#define CFG_SAP_MAX_NO_PEERS_MIN (1)
+#define CFG_SAP_MAX_NO_PEERS_MAX (32)
+#define CFG_SAP_MAX_NO_PEERS_DEFAULT (32)
+
+/*
+ * Connection related log Enable/Disable.
+ * 0x1 - Enable mgmt pkt logs (no probe req/rsp).
+ * 0x2 - Enable EAPOL pkt logs.
+ * 0x4 - Enable DHCP pkt logs.
+ * 0x0 - Disable all the above connection related logs.
+ */
+#define CFG_ENABLE_DEBUG_CONNECT_ISSUE "gEnableDebugLog"
+#define CFG_ENABLE_DEBUG_CONNECT_ISSUE_MIN (0)
+#define CFG_ENABLE_DEBUG_CONNECT_ISSUE_MAX (0xFF)
+#define CFG_ENABLE_DEBUG_CONNECT_ISSUE_DEFAULT (0)
+
+/* This will be used only for debugging purpose, will be removed after sometime */
+#define CFG_ENABLE_RX_THREAD "gEnableRxThread"
+#define CFG_ENABLE_RX_THREAD_MIN (0)
+#define CFG_ENABLE_RX_THREAD_MAX (1)
+#define CFG_ENABLE_RX_THREAD_DEFAULT (1)
+
+/* SAR Thermal limit values for 2g and 5g */
+
+#define CFG_SET_TXPOWER_LIMIT2G_NAME "TxPower2g"
+#define CFG_SET_TXPOWER_LIMIT2G_MIN (0)
+#define CFG_SET_TXPOWER_LIMIT2G_MAX (30)
+#define CFG_SET_TXPOWER_LIMIT2G_DEFAULT (15)
+
+#define CFG_SET_TXPOWER_LIMIT5G_NAME "TxPower5g"
+#define CFG_SET_TXPOWER_LIMIT5G_MIN (0)
+#define CFG_SET_TXPOWER_LIMIT5G_MAX (30)
+#define CFG_SET_TXPOWER_LIMIT5G_DEFAULT (15)
+
+#ifdef QCA_LL_LEGACY_TX_FLOW_CONTROL
+#define CFG_LL_TX_FLOW_LWM "TxFlowLowWaterMark"
+#define CFG_LL_TX_FLOW_LWM_MIN (0)
+#define CFG_LL_TX_FLOW_LWM_MAX (1000)
+
+#define CFG_LL_TX_FLOW_LWM_DEFAULT (300)
+
+#define CFG_LL_TX_FLOW_HWM_OFFSET "TxFlowHighWaterMarkOffset"
+#define CFG_LL_TX_FLOW_HWM_OFFSET_MIN (0)
+#define CFG_LL_TX_FLOW_HWM_OFFSET_MAX (300)
+
+#define CFG_LL_TX_FLOW_HWM_OFFSET_DEFAULT (94)
+
+#define CFG_LL_TX_FLOW_MAX_Q_DEPTH "TxFlowMaxQueueDepth"
+#define CFG_LL_TX_FLOW_MAX_Q_DEPTH_MIN (400)
+#define CFG_LL_TX_FLOW_MAX_Q_DEPTH_MAX (3500)
+#define CFG_LL_TX_FLOW_MAX_Q_DEPTH_DEFAULT (1500)
+
+#define CFG_LL_TX_LBW_FLOW_LWM "TxLbwFlowLowWaterMark"
+#define CFG_LL_TX_LBW_FLOW_LWM_MIN (0)
+#define CFG_LL_TX_LBW_FLOW_LWM_MAX (1000)
+
+#define CFG_LL_TX_LBW_FLOW_LWM_DEFAULT (450)
+
+#define CFG_LL_TX_LBW_FLOW_HWM_OFFSET "TxLbwFlowHighWaterMarkOffset"
+#define CFG_LL_TX_LBW_FLOW_HWM_OFFSET_MIN (0)
+#define CFG_LL_TX_LBW_FLOW_HWM_OFFSET_MAX (300)
+
+#define CFG_LL_TX_LBW_FLOW_HWM_OFFSET_DEFAULT (50)
+
+#define CFG_LL_TX_LBW_FLOW_MAX_Q_DEPTH "TxLbwFlowMaxQueueDepth"
+#define CFG_LL_TX_LBW_FLOW_MAX_Q_DEPTH_MIN (400)
+#define CFG_LL_TX_LBW_FLOW_MAX_Q_DEPTH_MAX (3500)
+#define CFG_LL_TX_LBW_FLOW_MAX_Q_DEPTH_DEFAULT (750)
+
+#define CFG_LL_TX_HBW_FLOW_LWM "TxHbwFlowLowWaterMark"
+#define CFG_LL_TX_HBW_FLOW_LWM_MIN (0)
+#define CFG_LL_TX_HBW_FLOW_LWM_MAX (1000)
+
+#define CFG_LL_TX_HBW_FLOW_LWM_DEFAULT (406)
+
+#define CFG_LL_TX_HBW_FLOW_HWM_OFFSET "TxHbwFlowHighWaterMarkOffset"
+#define CFG_LL_TX_HBW_FLOW_HWM_OFFSET_MIN (0)
+#define CFG_LL_TX_HBW_FLOW_HWM_OFFSET_MAX (300)
+
+#define CFG_LL_TX_HBW_FLOW_HWM_OFFSET_DEFAULT (94)
+
+#define CFG_LL_TX_HBW_FLOW_MAX_Q_DEPTH "TxHbwFlowMaxQueueDepth"
+#define CFG_LL_TX_HBW_FLOW_MAX_Q_DEPTH_MIN (400)
+#define CFG_LL_TX_HBW_FLOW_MAX_Q_DEPTH_MAX (3500)
+#define CFG_LL_TX_HBW_FLOW_MAX_Q_DEPTH_DEFAULT (1500)
+#endif /* QCA_LL_LEGACY_TX_FLOW_CONTROL */
+
+#ifdef QCA_LL_TX_FLOW_CONTROL_V2
+
+#define CFG_LL_TX_FLOW_STOP_QUEUE_TH "TxFlowStopQueueThreshold"
+#define CFG_LL_TX_FLOW_STOP_QUEUE_TH_DEFAULT (15)
+#define CFG_LL_TX_FLOW_STOP_QUEUE_TH_MIN (0)
+#define CFG_LL_TX_FLOW_STOP_QUEUE_TH_MAX (50)
+
+#define CFG_LL_TX_FLOW_START_QUEUE_OFFSET "TxFlowStartQueueOffset"
+#define CFG_LL_TX_FLOW_START_QUEUE_OFFSET_DEFAULT (10)
+#define CFG_LL_TX_FLOW_START_QUEUE_OFFSET_MIN (0)
+#define CFG_LL_TX_FLOW_START_QUEUE_OFFSET_MAX (30)
+
+#endif /* QCA_LL_TX_FLOW_CONTROL_V2 */
+
+#define CFG_SAP_MAX_OFFLOAD_PEERS "gMaxOffloadPeers"
+#define CFG_SAP_MAX_OFFLOAD_PEERS_MIN (2)
+#define CFG_SAP_MAX_OFFLOAD_PEERS_MAX (5)
+#define CFG_SAP_MAX_OFFLOAD_PEERS_DEFAULT (2)
+
+#define CFG_SAP_MAX_OFFLOAD_REORDER_BUFFS "gMaxOffloadReorderBuffs"
+#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)
+
+#ifdef FEATURE_WLAN_RA_FILTERING
+#define CFG_RA_FILTER_ENABLE_NAME "gRAFilterEnable"
+#define CFG_RA_FILTER_ENABLE_MIN (0)
+#define CFG_RA_FILTER_ENABLE_MAX (1)
+#define CFG_RA_FILTER_ENABLE_DEFAULT (0)
+
+#define CFG_RA_RATE_LIMIT_INTERVAL_NAME "gRArateLimitInterval"
+#define CFG_RA_RATE_LIMIT_INTERVAL_MIN (60)
+#define CFG_RA_RATE_LIMIT_INTERVAL_MAX (3600)
+#define CFG_RA_RATE_LIMIT_INTERVAL_DEFAULT (60) /*60 SEC */
+#endif
+
+#define CFG_IGNORE_PEER_ERP_INFO_NAME "gIgnorePeerErpInfo"
+#define CFG_IGNORE_PEER_ERP_INFO_MIN (0)
+#define CFG_IGNORE_PEER_ERP_INFO_MAX (1)
+#define CFG_IGNORE_PEER_ERP_INFO_DEFAULT (0)
+
+/* Enable Memory Debug */
+#ifdef MEMORY_DEBUG
+#define CFG_ENABLE_MEMORY_DEBUG_NAME "gEnableMemoryDebug"
+#define CFG_ENABLE_MEMORY_DEBUG_MIN (0)
+#define CFG_ENABLE_MEMORY_DEBUG_MAX (1)
+#define CFG_ENABLE_MEMORY_DEBUG_DEFAULT (1)
+#endif
+
+#define CFG_INITIAL_DWELL_TIME_NAME "gInitialDwellTime"
+#define CFG_INITIAL_DWELL_TIME_DEFAULT (0)
+#define CFG_INITIAL_DWELL_TIME_MIN (0)
+#define CFG_INITIAL_DWELL_TIME_MAX (100)
+
+#define CFG_INITIAL_SCAN_NO_DFS_CHNL_NAME "gInitialScanNoDFSChnl"
+#define CFG_INITIAL_SCAN_NO_DFS_CHNL_DEFAULT (0)
+#define CFG_INITIAL_SCAN_NO_DFS_CHNL_MIN (0)
+#define CFG_INITIAL_SCAN_NO_DFS_CHNL_MAX (1)
+
+#define CFG_ROAMING_DFS_CHANNEL_NAME "gAllowDFSChannelRoam"
+#define CFG_ROAMING_DFS_CHANNEL_DISABLED (0)
+#define CFG_ROAMING_DFS_CHANNEL_ENABLED_NORMAL (1)
+#define CFG_ROAMING_DFS_CHANNEL_ENABLED_ACTIVE (2)
+#define CFG_ROAMING_DFS_CHANNEL_MIN (CFG_ROAMING_DFS_CHANNEL_DISABLED)
+#define CFG_ROAMING_DFS_CHANNEL_MAX (CFG_ROAMING_DFS_CHANNEL_ENABLED_ACTIVE)
+#define CFG_ROAMING_DFS_CHANNEL_DEFAULT (CFG_ROAMING_DFS_CHANNEL_DISABLED)
+
+#ifdef MSM_PLATFORM
+#define CFG_BUS_BANDWIDTH_HIGH_THRESHOLD "gBusBandwidthHighThreshold"
+#define CFG_BUS_BANDWIDTH_HIGH_THRESHOLD_DEFAULT (2000)
+#define CFG_BUS_BANDWIDTH_HIGH_THRESHOLD_MIN (0)
+#define CFG_BUS_BANDWIDTH_HIGH_THRESHOLD_MAX (4294967295UL)
+
+#define CFG_BUS_BANDWIDTH_MEDIUM_THRESHOLD "gBusBandwidthMediumThreshold"
+#define CFG_BUS_BANDWIDTH_MEDIUM_THRESHOLD_DEFAULT (500)
+#define CFG_BUS_BANDWIDTH_MEDIUM_THRESHOLD_MIN (0)
+#define CFG_BUS_BANDWIDTH_MEDIUM_THRESHOLD_MAX (4294967295UL)
+
+#define CFG_BUS_BANDWIDTH_LOW_THRESHOLD "gBusBandwidthLowThreshold"
+#define CFG_BUS_BANDWIDTH_LOW_THRESHOLD_DEFAULT (150)
+#define CFG_BUS_BANDWIDTH_LOW_THRESHOLD_MIN (0)
+#define CFG_BUS_BANDWIDTH_LOW_THRESHOLD_MAX (4294967295UL)
+
+#define CFG_BUS_BANDWIDTH_COMPUTE_INTERVAL "gBusBandwidthComputeInterval"
+#define CFG_BUS_BANDWIDTH_COMPUTE_INTERVAL_DEFAULT (100)
+#define CFG_BUS_BANDWIDTH_COMPUTE_INTERVAL_MIN (0)
+#define CFG_BUS_BANDWIDTH_COMPUTE_INTERVAL_MAX (10000)
+
+#define CFG_TCP_DELACK_THRESHOLD_HIGH "gTcpDelAckThresholdHigh"
+#define CFG_TCP_DELACK_THRESHOLD_HIGH_DEFAULT (500)
+#define CFG_TCP_DELACK_THRESHOLD_HIGH_MIN (0)
+#define CFG_TCP_DELACK_THRESHOLD_HIGH_MAX (16000)
+
+#define CFG_TCP_DELACK_THRESHOLD_LOW "gTcpDelAckThresholdLow"
+#define CFG_TCP_DELACK_THRESHOLD_LOW_DEFAULT (1000)
+#define CFG_TCP_DELACK_THRESHOLD_LOW_MIN (0)
+#define CFG_TCP_DELACK_THRESHOLD_LOW_MAX (10000)
+#endif /* MSM_PLATFORM */
+
+#ifdef WLAN_FEATURE_11W
+#define CFG_PMF_SA_QUERY_MAX_RETRIES_NAME "pmfSaQueryMaxRetries"
+#define CFG_PMF_SA_QUERY_MAX_RETRIES_DEFAULT (5)
+#define CFG_PMF_SA_QUERY_MAX_RETRIES_MIN (0)
+#define CFG_PMF_SA_QUERY_MAX_RETRIES_MAX (20)
+
+#define CFG_PMF_SA_QUERY_RETRY_INTERVAL_NAME "pmfSaQueryRetryInterval"
+#define CFG_PMF_SA_QUERY_RETRY_INTERVAL_DEFAULT (200)
+#define CFG_PMF_SA_QUERY_RETRY_INTERVAL_MIN (0)
+#define CFG_PMF_SA_QUERY_RETRY_INTERVAL_MAX (2000)
+#endif
+
+#define CFG_MAX_CONCURRENT_CONNECTIONS_NAME "gMaxConcurrentActiveSessions"
+#define CFG_MAX_CONCURRENT_CONNECTIONS_DEFAULT (2)
+#define CFG_MAX_CONCURRENT_CONNECTIONS_MIN (1)
+#define CFG_MAX_CONCURRENT_CONNECTIONS_MAX (4)
+
+#define CFG_IGNORE_CAC_NAME "gIgnoreCAC"
+#define CFG_IGNORE_CAC_MIN (0)
+#define CFG_IGNORE_CAC_MAX (1)
+#define CFG_IGNORE_CAC_DEFAULT (0)
+
+#define CFG_ENABLE_SAP_DFS_CH_SIFS_BURST_NAME "gEnableSAPDfsChSifsBurst"
+#define CFG_ENABLE_SAP_DFS_CH_SIFS_BURST_MIN (0)
+#define CFG_ENABLE_SAP_DFS_CH_SIFS_BURST_MAX (1)
+#define CFG_ENABLE_SAP_DFS_CH_SIFS_BURST_DEFAULT (1)
+
+#define CFG_DFS_RADAR_PRI_MULTIPLIER_NAME "gDFSradarMappingPriMultiplier"
+#define CFG_DFS_RADAR_PRI_MULTIPLIER_DEFAULT (4)
+#define CFG_DFS_RADAR_PRI_MULTIPLIER_MIN (0)
+#define CFG_DFS_RADAR_PRI_MULTIPLIER_MAX (10)
+#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)
+
+#ifdef WLAN_FEATURE_ROAM_OFFLOAD
+#define CFG_ROAMING_OFFLOAD_NAME "gRoamOffloadEnabled"
+#define CFG_ROAMING_OFFLOAD_MIN (0)
+#define CFG_ROAMING_OFFLOAD_MAX (1)
+#define CFG_ROAMING_OFFLOAD_DEFAULT (0)
+#endif
+
+#define CFG_IPA_UC_TX_BUF_COUNT_NAME "IpaUcTxBufCount"
+#define CFG_IPA_UC_TX_BUF_COUNT_MIN (0)
+#define CFG_IPA_UC_TX_BUF_COUNT_MAX (2048)
+#define CFG_IPA_UC_TX_BUF_COUNT_DEFAULT (512)
+
+#define CFG_IPA_UC_TX_BUF_SIZE_NAME "IpaUcTxBufSize"
+#define CFG_IPA_UC_TX_BUF_SIZE_MIN (0)
+#define CFG_IPA_UC_TX_BUF_SIZE_MAX (4096)
+#define CFG_IPA_UC_TX_BUF_SIZE_DEFAULT (2048)
+
+#define CFG_IPA_UC_RX_IND_RING_COUNT_NAME "IpaUcRxIndRingCount"
+#define CFG_IPA_UC_RX_IND_RING_COUNT_MIN (0)
+#define CFG_IPA_UC_RX_IND_RING_COUNT_MAX (2048)
+#define CFG_IPA_UC_RX_IND_RING_COUNT_DEFAULT (1024)
+
+#define CFG_IPA_UC_TX_PARTITION_BASE_NAME "IpaUcTxPartitionBase"
+#define CFG_IPA_UC_TX_PARTITION_BASE_MIN (0)
+#define CFG_IPA_UC_TX_PARTITION_BASE_MAX (9000)
+#define CFG_IPA_UC_TX_PARTITION_BASE_DEFAULT (3000)
+
+#ifdef WLAN_LOGGING_SOCK_SVC_ENABLE
+/* Enable WLAN Logging to app space */
+#define CFG_WLAN_LOGGING_SUPPORT_NAME "wlanLoggingEnable"
+#define CFG_WLAN_LOGGING_SUPPORT_ENABLE (1)
+#define CFG_WLAN_LOGGING_SUPPORT_DISABLE (0)
+#define CFG_WLAN_LOGGING_SUPPORT_DEFAULT (1)
+
+/* Enable FATAL and ERROR logs for kmsg console */
+#define CFG_WLAN_LOGGING_FE_CONSOLE_SUPPORT_NAME "wlanLoggingFEToConsole"
+#define CFG_WLAN_LOGGING_FE_CONSOLE_SUPPORT_ENABLE (1)
+#define CFG_WLAN_LOGGING_FE_CONSOLE_SUPPORT_DISABLE (0)
+#define CFG_WLAN_LOGGING_FE_CONSOLE_SUPPORT_DEFAULT (1)
+
+/* Number of buffers to be used for WLAN logging */
+#define CFG_WLAN_LOGGING_NUM_BUF_NAME "wlanLoggingNumBuf"
+#define CFG_WLAN_LOGGING_NUM_BUF_MIN (4)
+#define CFG_WLAN_LOGGING_NUM_BUF_MAX (512)
+#define CFG_WLAN_LOGGING_NUM_BUF_DEFAULT (256)
+#endif /* WLAN_LOGGING_SOCK_SVC_ENABLE */
+
+#define CFG_ENABLE_SIFS_BURST "gEnableSifsBurst"
+#define CFG_ENABLE_SIFS_BURST_MIN (0)
+#define CFG_ENABLE_SIFS_BURST_MAX (1)
+#define CFG_ENABLE_SIFS_BURST_DEFAULT (0)
+
+#ifdef WLAN_FEATURE_LPSS
+#define CFG_ENABLE_LPASS_SUPPORT "gEnableLpassSupport"
+#define CFG_ENABLE_LPASS_SUPPORT_DEFAULT (0)
+#define CFG_ENABLE_LPASS_SUPPORT_MIN (0)
+#define CFG_ENABLE_LPASS_SUPPORT_MAX (1)
+#endif
+
+/*
+ * NaN feature support configuration
+ * gEnableNanSupport = 0 means NaN is not supported
+ * gEnableNanSupport = 1 means NaN is supported
+ */
+#ifdef WLAN_FEATURE_NAN
+#define CFG_ENABLE_NAN_SUPPORT "gEnableNanSupport"
+#define CFG_ENABLE_NAN_SUPPORT_DEFAULT (0)
+#define CFG_ENABLE_NAN_SUPPORT_MIN (0)
+#define CFG_ENABLE_NAN_SUPPORT_MAX (1)
+#endif
+
+#define CFG_ENABLE_SELF_RECOVERY "gEnableSelfRecovery"
+#define CFG_ENABLE_SELF_RECOVERY_MIN (0)
+#define CFG_ENABLE_SELF_RECOVERY_MAX (1)
+#define CFG_ENABLE_SELF_RECOVERY_DEFAULT (0)
+
+#define CFG_ENABLE_SAP_SUSPEND "gEnableSapSuspend"
+#define CFG_ENABLE_SAP_SUSPEND_MIN (0)
+#define CFG_ENABLE_SAP_SUSPEND_MAX (1)
+#define CFG_ENABLE_SAP_SUSPEND_DEFAULT (1)
+
+#ifdef WLAN_FEATURE_EXTWOW_SUPPORT
+#define CFG_EXTWOW_GO_TO_SUSPEND "gExtWoWgotoSuspend"
+#define CFG_EXTWOW_GO_TO_SUSPEND_MIN (0)
+#define CFG_EXTWOW_GO_TO_SUSPEND_MAX (1)
+#define CFG_EXTWOW_GO_TO_SUSPEND_DEFAULT (1)
+
+#define CFG_EXTWOW_APP1_WAKE_PIN_NUMBER "gExtWowApp1WakeupPinNumber"
+#define CFG_EXTWOW_APP1_WAKE_PIN_NUMBER_MIN (0)
+#define CFG_EXTWOW_APP1_WAKE_PIN_NUMBER_MAX (255)
+#define CFG_EXTWOW_APP1_WAKE_PIN_NUMBER_DEFAULT (12)
+
+#define CFG_EXTWOW_APP2_WAKE_PIN_NUMBER "gExtWowApp2WakeupPinNumber"
+#define CFG_EXTWOW_APP2_WAKE_PIN_NUMBER_MIN (0)
+#define CFG_EXTWOW_APP2_WAKE_PIN_NUMBER_MAX (255)
+#define CFG_EXTWOW_APP2_WAKE_PIN_NUMBER_DEFAULT (16)
+
+#define CFG_EXTWOW_KA_INIT_PING_INTERVAL "gExtWoWApp2KAInitPingInterval"
+#define CFG_EXTWOW_KA_INIT_PING_INTERVAL_MIN (0)
+#define CFG_EXTWOW_KA_INIT_PING_INTERVAL_MAX (0xffffffff)
+#define CFG_EXTWOW_KA_INIT_PING_INTERVAL_DEFAULT (240)
+
+#define CFG_EXTWOW_KA_MIN_PING_INTERVAL "gExtWoWApp2KAMinPingInterval"
+#define CFG_EXTWOW_KA_MIN_PING_INTERVAL_MIN (0)
+#define CFG_EXTWOW_KA_MIN_PING_INTERVAL_MAX (0xffffffff)
+#define CFG_EXTWOW_KA_MIN_PING_INTERVAL_DEFAULT (240)
+
+#define CFG_EXTWOW_KA_MAX_PING_INTERVAL "gExtWoWApp2KAMaxPingInterval"
+#define CFG_EXTWOW_KA_MAX_PING_INTERVAL_MIN (0)
+#define CFG_EXTWOW_KA_MAX_PING_INTERVAL_MAX (0xffffffff)
+#define CFG_EXTWOW_KA_MAX_PING_INTERVAL_DEFAULT (1280)
+
+#define CFG_EXTWOW_KA_INC_PING_INTERVAL "gExtWoWApp2KAIncPingInterval"
+#define CFG_EXTWOW_KA_INC_PING_INTERVAL_MIN (0)
+#define CFG_EXTWOW_KA_INC_PING_INTERVAL_MAX (0xffffffff)
+#define CFG_EXTWOW_KA_INC_PING_INTERVAL_DEFAULT (4)
+
+#define CFG_EXTWOW_TCP_SRC_PORT "gExtWoWApp2TcpSrcPort"
+#define CFG_EXTWOW_TCP_SRC_PORT_MIN (0)
+#define CFG_EXTWOW_TCP_SRC_PORT_MAX (65535)
+#define CFG_EXTWOW_TCP_SRC_PORT_DEFAULT (5000)
+
+#define CFG_EXTWOW_TCP_DST_PORT "gExtWoWApp2TcpDstPort"
+#define CFG_EXTWOW_TCP_DST_PORT_MIN (0)
+#define CFG_EXTWOW_TCP_DST_PORT_MAX (65535)
+#define CFG_EXTWOW_TCP_DST_PORT_DEFAULT (5001)
+
+#define CFG_EXTWOW_TCP_TX_TIMEOUT "gExtWoWApp2TcpTxTimeout"
+#define CFG_EXTWOW_TCP_TX_TIMEOUT_MIN (0)
+#define CFG_EXTWOW_TCP_TX_TIMEOUT_MAX (0xffffffff)
+#define CFG_EXTWOW_TCP_TX_TIMEOUT_DEFAULT (200)
+
+#define CFG_EXTWOW_TCP_RX_TIMEOUT "gExtWoWApp2TcpRxTimeout"
+#define CFG_EXTWOW_TCP_RX_TIMEOUT_MIN (0)
+#define CFG_EXTWOW_TCP_RX_TIMEOUT_MAX (0xffffffff)
+#define CFG_EXTWOW_TCP_RX_TIMEOUT_DEFAULT (200)
+#endif
+
+#define CFG_ENABLE_DEAUTH_TO_DISASSOC_MAP_NAME "gEnableDeauthToDisassocMap"
+#define CFG_ENABLE_DEAUTH_TO_DISASSOC_MAP_MIN (0)
+#define CFG_ENABLE_DEAUTH_TO_DISASSOC_MAP_MAX (1)
+#define CFG_ENABLE_DEAUTH_TO_DISASSOC_MAP_DEFAULT (0)
+
+#ifdef DHCP_SERVER_OFFLOAD
+#define CFG_DHCP_SERVER_OFFLOAD_SUPPORT_NAME "gDHCPServerOffloadEnable"
+#define CFG_DHCP_SERVER_OFFLOAD_SUPPORT_MIN (0)
+#define CFG_DHCP_SERVER_OFFLOAD_SUPPORT_MAX (1)
+#define CFG_DHCP_SERVER_OFFLOAD_SUPPORT_DEFAULT (CFG_DHCP_SERVER_OFFLOAD_SUPPORT_MIN)
+
+#define CFG_DHCP_SERVER_OFFLOAD_NUM_CLIENT_NAME "gDHCPMaxNumClients"
+#define CFG_DHCP_SERVER_OFFLOAD_NUM_CLIENT_MIN (1)
+#define CFG_DHCP_SERVER_OFFLOAD_NUM_CLIENT_MAX (8)
+#define CFG_DHCP_SERVER_OFFLOAD_NUM_CLIENT_DEFAULT (CFG_DHCP_SERVER_OFFLOAD_NUM_CLIENT_MAX)
+
+#define CFG_DHCP_SERVER_IP_NAME "gDHCPServerIP"
+#define CFG_DHCP_SERVER_IP_DEFAULT ""
+#endif /* DHCP_SERVER_OFFLOAD */
+
+/*
+ * If last disconnection was due to HB failure and we reconnect
+ * to same AP next time, send Deauth before starting connection
+ */
+#define CFG_ENABLE_DEAUTH_BEFORE_CONNECTION "gSendDeauthBeforeCon"
+#define CFG_ENABLE_DEAUTH_BEFORE_CONNECTION_MIN (0)
+#define CFG_ENABLE_DEAUTH_BEFORE_CONNECTION_MAX (1)
+#define CFG_ENABLE_DEAUTH_BEFORE_CONNECTION_DEFAULT (0)
+
+/*
+ * Custom concurrency rule1:
+ * If SAP comes up first and STA comes up later then SAP
+ * needs to follow STA's channel.
+ */
+#define CFG_ENABLE_CUSTOM_CONC_RULE1_NAME "gEnableCustomConcRule1"
+#define CFG_ENABLE_CUSTOM_CONC_RULE1_NAME_MIN (0)
+#define CFG_ENABLE_CUSTOM_CONC_RULE1_NAME_MAX (1)
+#define CFG_ENABLE_CUSTOM_CONC_RULE1_NAME_DEFAULT (0)
+
+#define CFG_ENABLE_CUSTOM_CONC_RULE2_NAME "gEnableCustomConcRule2"
+#define CFG_ENABLE_CUSTOM_CONC_RULE2_NAME_MIN (0)
+#define CFG_ENABLE_CUSTOM_CONC_RULE2_NAME_MAX (1)
+#define CFG_ENABLE_CUSTOM_CONC_RULE2_NAME_DEFAULT (0)
+
+#define CFG_ENABLE_STA_CONNECTION_IN_5GHZ "gEnableStaConnectionIn5Ghz"
+#define CFG_ENABLE_STA_CONNECTION_IN_5GHZ_MIN (0)
+#define CFG_ENABLE_STA_CONNECTION_IN_5GHZ_MAX (1)
+#define CFG_ENABLE_STA_CONNECTION_IN_5GHZ_DEFAULT (1)
+
+#define CFG_ENABLE_MAC_ADDR_SPOOFING "gEnableMacAddrSpoof"
+#define CFG_ENABLE_MAC_ADDR_SPOOFING_MIN (0)
+#define CFG_ENABLE_MAC_ADDR_SPOOFING_MAX (1)
+#define CFG_ENABLE_MAC_ADDR_SPOOFING_DEFAULT (1)
+
+#define CFG_P2P_LISTEN_DEFER_INTERVAL_NAME "gP2PListenDeferInterval"
+#define CFG_P2P_LISTEN_DEFER_INTERVAL_MIN (100)
+#define CFG_P2P_LISTEN_DEFER_INTERVAL_MAX (200)
+#define CFG_P2P_LISTEN_DEFER_INTERVAL_DEFAULT (100)
+
+#define CFG_STA_MIRACAST_MCC_REST_TIME_VAL "gStaMiracastMccRestTimeVal"
+#define CFG_STA_MIRACAST_MCC_REST_TIME_VAL_MIN (100)
+#define CFG_STA_MIRACAST_MCC_REST_TIME_VAL_MAX (500)
+#define CFG_STA_MIRACAST_MCC_REST_TIME_VAL_DEFAULT (400)
+
+#ifdef FEATURE_AP_MCC_CH_AVOIDANCE
+#define CFG_SAP_MCC_CHANNEL_AVOIDANCE_NAME "gSapChannelAvoidance"
+#define CFG_SAP_MCC_CHANNEL_AVOIDANCE_MIN (0)
+#define CFG_SAP_MCC_CHANNEL_AVOIDANCE_MAX (1)
+#define CFG_SAP_MCC_CHANNEL_AVOIDANCE_DEFAULT (0)
+#endif /* FEATURE_AP_MCC_CH_AVOIDANCE */
+
+#define CFG_SAP_P2P_11AC_OVERRIDE_NAME "gAP11ACOverride"
+#define CFG_SAP_P2P_11AC_OVERRIDE_MIN (0)
+#define CFG_SAP_P2P_11AC_OVERRIDE_MAX (1)
+#define CFG_SAP_P2P_11AC_OVERRIDE_DEFAULT (1)
+
+#define CFG_SAP_DOT11MC "gSapDot11mc"
+#define CFG_SAP_DOT11MC_MIN (0)
+#define CFG_SAP_DOT11MC_MAX (1)
+#define CFG_SAP_DOT11MC_DEFAULT (0)
+
+#define CFG_ENABLE_NON_DFS_CHAN_ON_RADAR "gPreferNonDfsChanOnRadar"
+#define CFG_ENABLE_NON_DFS_CHAN_ON_RADAR_MIN (0)
+#define CFG_ENABLE_NON_DFS_CHAN_ON_RADAR_MAX (1)
+#define CFG_ENABLE_NON_DFS_CHAN_ON_RADAR_DEFAULT (0)
+
+#define CFG_MULTICAST_HOST_FW_MSGS "gMulticastHostFwMsgs"
+#define CFG_MULTICAST_HOST_FW_MSGS_MIN (0)
+#define CFG_MULTICAST_HOST_FW_MSGS_MAX (1)
+#define CFG_MULTICAST_HOST_FW_MSGS_DEFAULT (1)
+
+/*
+ * wlan system preference option to help policy manager decide
+ * on Preferred Channel List for a new connection. For possible
+ * values refer to enum hdd_conc_priority_mode
+ */
+#define CFG_CONC_SYSTEM_PREF "gSystemPref"
+#define CFG_CONC_SYSTEM_PREF_MIN (0)
+#define CFG_CONC_SYSTEM_PREF_MAX (2)
+#define CFG_CONC_SYSTEM_PREF_DEFAULT (0)
+
+#define CFG_POLICY_MNGR_ENABLE "gPolicyManagerEnable"
+#define CFG_POLICY_MNGR_ENABLE_MIN (0)
+#define CFG_POLICY_MNGR_ENABLE_MAX (1)
+#define CFG_POLICY_MNGR_ENABLE_DEFAULT (1)
+
+#define CFG_TSO_ENABLED_NAME "TSOEnable"
+#define CFG_TSO_ENABLED_MIN (0)
+#define CFG_TSO_ENABLED_MAX (1)
+#define CFG_TSO_ENABLED_DEFAULT (0)
+
+/*
+ * Configuration option to enable or disable LRO (Large Receive Offload)
+ * in the WLAN driver
+ * Set 1 - enable, 0 - disable
+ */
+#define CFG_LRO_ENABLED_NAME "LROEnable"
+#define CFG_LRO_ENABLED_MIN (0)
+#define CFG_LRO_ENABLED_MAX (1)
+#define CFG_LRO_ENABLED_DEFAULT (0)
+
+/*
+ * In static display use case when APPS is in stand alone power save mode enable
+ * active offload mode which helps FW to filter out MC/BC data packets to avoid
+ * APPS wake up and save more power.
+ *
+ * By default enable active mode offload as it helps to save more power in
+ * static display usecase(APPS stand alone power collapse).
+ *
+ * If active mode offload(gActiveModeOffload=1) is enabled then all applicable
+ * data offload/filtering is enabled immediately in FW once config is available
+ * in WLAN driver and FW caches this configuration accross suspend/resume
+ *
+ * If active mode offload is disabled(gActiveModeOffload=0) then all applicable
+ * data offload/filtering is enabled during cfg80211 suspend and disabled
+ * during cfg80211 resume
+ *
+ * Active mode offload feature is bydefault enabled for adrastea and disabled
+ * for non adrastea targets like ROME
+ */
+
+#define CFG_ACTIVE_MODE_OFFLOAD "gActiveModeOffload"
+#define CFG_ACTIVE_MODE_OFFLOAD_MIN (0)
+#define CFG_ACTIVE_MODE_OFFLOAD_MAX (1)
+#ifdef QCA_WIFI_3_0_ADRASTEA
+#define CFG_ACTIVE_MODE_OFFLOAD_DEFAULT (1)
+#else
+#define CFG_ACTIVE_MODE_OFFLOAD_DEFAULT (0)
+#endif
+
+/*
+ * 0: disable the cck tx chain mask (default)
+ * 1: enable the cck tx chain mask
+ */
+#define CFG_TX_CHAIN_MASK_CCK "gCckChainMaskEnable"
+#define CFG_TX_CHAIN_MASK_CCK_MIN (0)
+#define CFG_TX_CHAIN_MASK_CCK_MAX (1)
+#define CFG_TX_CHAIN_MASK_CCK_DEFAULT (0)
+
+#define CFG_TX_CHAIN_MASK_1SS "gTxChainMask1ss"
+#define CFG_TX_CHAIN_MASK_1SS_MIN (0)
+#define CFG_TX_CHAIN_MASK_1SS_MAX (3)
+#define CFG_TX_CHAIN_MASK_1SS_DEFAULT (1)
+
+/*
+ * set the self gen power value from
+ * 0 to 0xffff
+ */
+#define CFG_SELF_GEN_FRM_PWR "gSelfGenFrmPwr"
+#define CFG_SELF_GEN_FRM_PWR_MIN (0)
+#define CFG_SELF_GEN_FRM_PWR_MAX (0xffff)
+#define CFG_SELF_GEN_FRM_PWR_DEFAULT (0)
+
+/*
+ * fine timing measurement capability information
+ *
+ * <----- fine_time_meas_cap (in bits) ----->
+ *+----------+-----+-----+------+------+-------+-------+-----+-----+
+ *| 9-31 | 8 | 7 | 5 | 4 | 3 | 2 | 1 | 0 |
+ *+----------+-----+-----+------+------+-------+-------+-----+-----+
+ *| reserved | SAP | SAP |P2P-GO|P2P-GO|P2P-CLI|P2P-CLI| STA | STA |
+ *| |resp |init |resp |init |resp |init |resp |init |
+ *+----------+-----+-----+------+------+-------+-------+-----+-----+
+ *
+ * resp - responder role; init- initiator role
+ *
+ * CFG_FINE_TIME_MEAS_CAPABILITY_MAX computed based on the table
+ * +-----------------+-----------------+-----------+
+ * | Device Role | Initiator | Responder |
+ * +-----------------+-----------------+-----------+
+ * | Station | Y | N |
+ * | P2P-CLI | Y | Y |
+ * | P2P-GO | Y | Y |
+ * | SAP | N | Y |
+ * +-----------------+-----------------+-----------+
+ */
+#define CFG_FINE_TIME_MEAS_CAPABILITY "gfine_time_meas_cap"
+#define CFG_FINE_TIME_MEAS_CAPABILITY_MIN (0x0000)
+#define CFG_FINE_TIME_MEAS_CAPABILITY_MAX (0x00BD)
+#define CFG_FINE_TIME_MEAS_CAPABILITY_DEFAULT (0x000D)
+
+/*
+ * Maximum number of scans that host can queue at firmware is controlled
+ * through the configuration item 'max_scan_count'.
+ *
+ * Rome - Rome firmware support 8 scan queue size and 4 are reserved
+ * for internal scan requests like roaming. So host can send 4
+ * scan requests.
+ *
+ * ihelium - There is no constraint in number of scan queue size at
+ * firmware but the current uses cases needs support of maximum
+ * of 4 scan request from host.
+ */
+#define CFG_MAX_SCAN_COUNT_NAME "max_scan_count"
+#define CFG_MAX_SCAN_COUNT_MIN (1)
+#define CFG_MAX_SCAN_COUNT_MAX (8)
+#define CFG_MAX_SCAN_COUNT_DEFAULT (4)
+
+/**
+ * enum dot11p_mode - The 802.11p mode of operation
+ * @WLAN_HDD_11P_DISABLED: 802.11p mode is disabled
+ * @WLAN_HDD_11P_STANDALONE: 802.11p-only operation
+ * @WLAN_HDD_11P_CONCURRENT: 802.11p and WLAN operate concurrently
+ */
+enum dot11p_mode {
+ WLAN_HDD_11P_DISABLED = 0,
+ WLAN_HDD_11P_STANDALONE,
+ WLAN_HDD_11P_CONCURRENT,
+};
+
+#define CFG_DOT11P_MODE_NAME "gDot11PMode"
+#define CFG_DOT11P_MODE_DEFAULT (WLAN_HDD_11P_DISABLED)
+#define CFG_DOT11P_MODE_MIN (WLAN_HDD_11P_DISABLED)
+#define CFG_DOT11P_MODE_MAX (WLAN_HDD_11P_CONCURRENT)
+
+#define CFG_NAPI_NAME "gEnableNAPI"
+#define CFG_NAPI_MIN (0)
+#define CFG_NAPI_MAX (1)
+#define CFG_NAPI_DEFAULT (0)
+
+#ifdef FEATURE_WLAN_EXTSCAN
+#define CFG_EXTSCAN_PASSIVE_MAX_CHANNEL_TIME_NAME "gExtScanPassiveMaxChannelTime"
+#define CFG_EXTSCAN_PASSIVE_MAX_CHANNEL_TIME_MIN (110)
+#define CFG_EXTSCAN_PASSIVE_MAX_CHANNEL_TIME_MAX (500)
+#define CFG_EXTSCAN_PASSIVE_MAX_CHANNEL_TIME_DEFAULT (110)
+
+#define CFG_EXTSCAN_PASSIVE_MIN_CHANNEL_TIME_NAME "gExtScanPassiveMinChannelTime"
+#define CFG_EXTSCAN_PASSIVE_MIN_CHANNEL_TIME_MIN (60)
+#define CFG_EXTSCAN_PASSIVE_MIN_CHANNEL_TIME_MAX (500)
+#define CFG_EXTSCAN_PASSIVE_MIN_CHANNEL_TIME_DEFAULT (60)
+
+#define CFG_EXTSCAN_ACTIVE_MAX_CHANNEL_TIME_NAME "gExtScanActiveMaxChannelTime"
+#define CFG_EXTSCAN_ACTIVE_MAX_CHANNEL_TIME_MIN (40)
+#define CFG_EXTSCAN_ACTIVE_MAX_CHANNEL_TIME_MAX (110)
+#define CFG_EXTSCAN_ACTIVE_MAX_CHANNEL_TIME_DEFAULT (40)
+
+#define CFG_EXTSCAN_ACTIVE_MIN_CHANNEL_TIME_NAME "gExtScanActiveMinChannelTime"
+#define CFG_EXTSCAN_ACTIVE_MIN_CHANNEL_TIME_MIN (20)
+#define CFG_EXTSCAN_ACTIVE_MIN_CHANNEL_TIME_MAX (110)
+#define CFG_EXTSCAN_ACTIVE_MIN_CHANNEL_TIME_DEFAULT (20)
+#endif
+
+#define CFG_CE_CLASSIFY_ENABLE_NAME "gCEClassifyEnable"
+#define CFG_CE_CLASSIFY_ENABLE_MIN (0)
+#define CFG_CE_CLASSIFY_ENABLE_MAX (1)
+#define CFG_CE_CLASSIFY_ENABLE_DEFAULT (0)
+
+#define CFG_DUAL_MAC_FEATURE_DISABLE "gDualMacFeatureDisable"
+#define CFG_DUAL_MAC_FEATURE_DISABLE_MIN (0)
+#define CFG_DUAL_MAC_FEATURE_DISABLE_MAX (1)
+#define CFG_DUAL_MAC_FEATURE_DISABLE_DEFAULT (0)
+
+/* Parameters for roaming scans performed at high RSSI */
+
+/* Maximum number of scans after RSSI change */
+#define CFG_ROAM_SCAN_HI_RSSI_MAXCOUNT_NAME "gRoamScanHiRssiMaxCount"
+#define CFG_ROAM_SCAN_HI_RSSI_MAXCOUNT_MIN (0)
+#define CFG_ROAM_SCAN_HI_RSSI_MAXCOUNT_MAX (10)
+#define CFG_ROAM_SCAN_HI_RSSI_MAXCOUNT_DEFAULT (5)
+
+/* Change in RSSI at which scan is triggered */
+#define CFG_ROAM_SCAN_HI_RSSI_DELTA_NAME "gRoamScanHiRssiDelta"
+#define CFG_ROAM_SCAN_HI_RSSI_DELTA_MIN (0)
+#define CFG_ROAM_SCAN_HI_RSSI_DELTA_MAX (16)
+#define CFG_ROAM_SCAN_HI_RSSI_DELTA_DEFAULT (0)
+
+/* Delay between consecutive scans in milliseconds */
+#define CFG_ROAM_SCAN_HI_RSSI_DELAY_NAME "gRoamScanHiRssiDelay"
+#define CFG_ROAM_SCAN_HI_RSSI_DELAY_MIN (5000)
+#define CFG_ROAM_SCAN_HI_RSSI_DELAY_MAX (15000)
+#define CFG_ROAM_SCAN_HI_RSSI_DELAY_DEFAULT (5000)
+
+/* Upper bound after which scan will not be performed */
+#define CFG_ROAM_SCAN_HI_RSSI_UB_NAME "gRoamScanHiRssiUpperBound"
+#define CFG_ROAM_SCAN_HI_RSSI_UB_MIN (-76)
+#define CFG_ROAM_SCAN_HI_RSSI_UB_MAX (-30)
+#define CFG_ROAM_SCAN_HI_RSSI_UB_DEFAULT (-45)
+
+/*---------------------------------------------------------------------------
+ Type declarations
+ -------------------------------------------------------------------------*/
+
+struct hdd_config {
+ /* Bitmap to track what is explicitly configured */
+ DECLARE_BITMAP(bExplicitCfg, MAX_CFG_INI_ITEMS);
+
+ /* Config parameters */
+ uint32_t RTSThreshold;
+ uint32_t FragmentationThreshold;
+ uint8_t OperatingChannel;
+ bool ShortSlotTimeEnabled;
+ bool Is11dSupportEnabled;
+ bool Is11hSupportEnabled;
+ bool fSupplicantCountryCodeHasPriority;
+ uint32_t HeartbeatThresh24;
+ char PowerUsageControl[4];
+ bool fIsLogpEnabled;
+ bool fIsImpsEnabled;
+ bool is_ps_enabled;
+ uint32_t nBmpsModListenInterval;
+ uint32_t nBmpsMaxListenInterval;
+ uint32_t nBmpsMinListenInterval;
+ eHddDot11Mode dot11Mode;
+ uint32_t nChannelBondingMode24GHz;
+ uint32_t nChannelBondingMode5GHz;
+ uint32_t MaxRxAmpduFactor;
+ uint16_t TxRate;
+ uint32_t ShortGI20MhzEnable;
+ uint32_t ScanResultAgeCount;
+ uint32_t nScanAgeTimeNCNPS;
+ uint32_t nScanAgeTimeNCPS;
+ uint32_t nScanAgeTimeCNPS;
+ uint32_t nScanAgeTimeCPS;
+ uint8_t nRssiCatGap;
+ bool fIsShortPreamble;
+ struct cdf_mac_addr IbssBssid;
+ uint32_t AdHocChannel5G;
+ uint32_t AdHocChannel24G;
+ uint8_t intfAddrMask;
+ struct cdf_mac_addr intfMacAddr[CDF_MAX_CONCURRENCY_PERSONA];
+
+ bool apUapsdEnabled;
+ bool apRandomBssidEnabled;
+ bool apProtEnabled;
+ uint16_t apProtection;
+ bool apOBSSProtEnabled;
+ bool apDisableIntraBssFwd;
+ uint8_t nEnableListenMode;
+ uint32_t nAPAutoShutOff;
+ uint8_t enableLTECoex;
+ uint32_t apKeepAlivePeriod;
+ uint32_t goKeepAlivePeriod;
+ uint32_t apLinkMonitorPeriod;
+ uint32_t goLinkMonitorPeriod;
+ uint32_t nBeaconInterval;
+ uint8_t nTxPowerCap; /* In dBm */
+ bool fIsLowGainOverride;
+ uint8_t disablePacketFilter;
+#if defined WLAN_FEATURE_VOWIFI
+ bool fRrmEnable;
+ uint8_t nInChanMeasMaxDuration;
+ uint8_t nOutChanMeasMaxDuration;
+ uint16_t nRrmRandnIntvl;
+#endif
+
+#ifdef WLAN_FEATURE_VOWIFI_11R
+ /* Vowifi 11r params */
+ bool fFTResourceReqSupported;
+#endif
+
+#ifdef WLAN_FEATURE_NEIGHBOR_ROAMING
+ uint16_t nNeighborScanPeriod;
+ uint8_t nNeighborLookupRssiThreshold;
+ uint8_t delay_before_vdev_stop;
+ uint8_t nOpportunisticThresholdDiff;
+ uint8_t nRoamRescanRssiDiff;
+ uint8_t neighborScanChanList[WNI_CFG_VALID_CHANNEL_LIST_LEN];
+ uint16_t nNeighborScanMinChanTime;
+ uint16_t nNeighborScanMaxChanTime;
+ uint16_t nMaxNeighborReqTries;
+ uint16_t nNeighborResultsRefreshPeriod;
+ uint16_t nEmptyScanRefreshPeriod;
+ uint8_t nRoamBmissFirstBcnt;
+ uint8_t nRoamBmissFinalBcnt;
+ uint8_t nRoamBeaconRssiWeight;
+ uint32_t nhi_rssi_scan_max_count;
+ uint32_t nhi_rssi_scan_rssi_delta;
+ uint32_t nhi_rssi_scan_delay;
+ int32_t nhi_rssi_scan_rssi_ub;
+#endif
+
+ /* Additional Handoff params */
+ uint32_t nRoamingTime;
+ uint16_t nVccRssiTrigger;
+ uint32_t nVccUlMacLossThreshold;
+
+ uint32_t nPassiveMinChnTime; /* in units of milliseconds */
+ uint32_t nPassiveMaxChnTime; /* in units of milliseconds */
+ uint32_t nActiveMinChnTime; /* in units of milliseconds */
+ uint32_t nActiveMaxChnTime; /* in units of milliseconds */
+
+ uint32_t nInitialDwellTime; /* in units of milliseconds */
+ bool initial_scan_no_dfs_chnl;
+
+#ifdef WLAN_AP_STA_CONCURRENCY
+ uint32_t nPassiveMinChnTimeConc; /* in units of milliseconds */
+ uint32_t nPassiveMaxChnTimeConc; /* in units of milliseconds */
+ uint32_t nActiveMinChnTimeConc; /* in units of milliseconds */
+ uint32_t nActiveMaxChnTimeConc; /* in units of milliseconds */
+ uint32_t nRestTimeConc; /* in units of milliseconds */
+ uint8_t nNumStaChanCombinedConc; /* number of channels combined for */
+ /* STA in each split scan operation */
+ uint8_t nNumP2PChanCombinedConc; /* number of channels combined for */
+ /* P2P in each split scan operation */
+#endif
+
+ uint8_t nMaxPsPoll;
+
+ uint8_t nRssiFilterPeriod;
+ bool fIgnoreDtim;
+ uint8_t fMaxLIModulatedDTIM;
+
+ uint8_t nRxAnt;
+ uint8_t fEnableFwHeartBeatMonitoring;
+ uint8_t fEnableFwBeaconFiltering;
+ bool fEnableFwRssiMonitoring;
+ bool mcc_rts_cts_prot_enable;
+ bool mcc_bcast_prob_resp_enable;
+ uint8_t nDataInactivityTimeout;
+
+ /* WMM QoS Configuration */
+ hdd_wmm_user_mode_t WmmMode;
+ bool b80211eIsEnabled;
+ uint8_t UapsdMask; /* what ACs to setup U-APSD for at assoc */
+ uint32_t InfraUapsdVoSrvIntv;
+ uint32_t InfraUapsdVoSuspIntv;
+ uint32_t InfraUapsdViSrvIntv;
+ uint32_t InfraUapsdViSuspIntv;
+ uint32_t InfraUapsdBeSrvIntv;
+ uint32_t InfraUapsdBeSuspIntv;
+ uint32_t InfraUapsdBkSrvIntv;
+ uint32_t InfraUapsdBkSuspIntv;
+#ifdef FEATURE_WLAN_LFR
+ bool isFastRoamIniFeatureEnabled;
+ bool MAWCEnabled;
+#endif
+#ifdef FEATURE_WLAN_ESE
+ uint32_t InfraInactivityInterval;
+ bool isEseIniFeatureEnabled;
+#endif
+#if defined (WLAN_FEATURE_VOWIFI_11R) || defined (FEATURE_WLAN_ESE) || defined(FEATURE_WLAN_LFR)
+ bool isFastTransitionEnabled;
+ uint8_t RoamRssiDiff;
+ bool isWESModeEnabled;
+#endif
+#ifdef FEATURE_WLAN_OKC
+ bool isOkcIniFeatureEnabled;
+#endif
+ bool isRoamOffloadScanEnabled;
+ hdd_wmm_classification_t PktClassificationBasis; /* DSCP or 802.1Q */
+ bool bImplicitQosEnabled;
+
+ /* default TSPEC parameters for AC_VO */
+ sme_QosWmmDirType InfraDirAcVo;
+ uint16_t InfraNomMsduSizeAcVo;
+ uint32_t InfraMeanDataRateAcVo;
+ uint32_t InfraMinPhyRateAcVo;
+ uint16_t InfraSbaAcVo;
+
+ /* default TSPEC parameters for AC_VI */
+ sme_QosWmmDirType InfraDirAcVi;
+ uint16_t InfraNomMsduSizeAcVi;
+ uint32_t InfraMeanDataRateAcVi;
+ uint32_t InfraMinPhyRateAcVi;
+ uint16_t InfraSbaAcVi;
+
+ /* default TSPEC parameters for AC_BE */
+ sme_QosWmmDirType InfraDirAcBe;
+ uint16_t InfraNomMsduSizeAcBe;
+ uint32_t InfraMeanDataRateAcBe;
+ uint32_t InfraMinPhyRateAcBe;
+ uint16_t InfraSbaAcBe;
+
+ /* default TSPEC parameters for AC_BK */
+ sme_QosWmmDirType InfraDirAcBk;
+ uint16_t InfraNomMsduSizeAcBk;
+ uint32_t InfraMeanDataRateAcBk;
+ uint32_t InfraMinPhyRateAcBk;
+ uint16_t InfraSbaAcBk;
+
+ uint32_t DelayedTriggerFrmInt;
+
+ /* Wowl pattern */
+ char wowlPattern[1024];
+
+ /* Control for Replay counetr. value 1 means
+ single replay counter for all TID */
+ bool bSingleTidRc;
+ uint8_t mcastBcastFilterSetting;
+ bool fhostArpOffload;
+ bool ssdp;
+#ifdef FEATURE_WLAN_RA_FILTERING
+ bool IsRArateLimitEnabled;
+ uint16_t RArateLimitInterval;
+#endif
+#ifdef FEATURE_WLAN_SCAN_PNO
+ bool PnoOffload;
+#endif
+ bool fhostNSOffload;
+ bool burstSizeDefinition;
+ uint8_t tsInfoAckPolicy;
+
+ /* RF Settling Time Clock */
+ uint32_t rfSettlingTimeUs;
+
+ uint8_t dynamicPsPollValue;
+ bool AddTSWhenACMIsOff;
+ bool fValidateScanList;
+
+ uint32_t infraStaKeepAlivePeriod;
+ uint8_t nNullDataApRespTimeout;
+ uint8_t nBandCapability;
+
+ uint32_t apDataAvailPollPeriodInMs;
+ bool fEnableBeaconEarlyTermination;
+ bool teleBcnWakeupEn;
+
+/* CDF Trace Control*/
+ uint16_t cdf_trace_enable_wdi;
+ uint16_t cdf_trace_enable_hdd;
+ uint16_t cdf_trace_enable_sme;
+ uint16_t cdf_trace_enable_pe;
+ uint16_t cdf_trace_enable_pmc;
+ uint16_t cdf_trace_enable_wma;
+ uint16_t cdf_trace_enable_sys;
+ uint16_t cdf_trace_enable_cdf;
+ uint16_t cdf_trace_enable_sap;
+ uint16_t cdf_trace_enable_hdd_sap;
+ uint16_t cdf_trace_enable_bmi;
+
+ uint16_t nTeleBcnTransListenInterval;
+ uint16_t nTeleBcnMaxListenInterval;
+ uint16_t nTeleBcnTransLiNumIdleBeacons;
+ uint16_t nTeleBcnMaxLiNumIdleBeacons;
+ uint8_t bcnEarlyTermWakeInterval;
+ uint32_t enableCloseLoop;
+ uint8_t enableBypass11d;
+ uint8_t enableDFSChnlScan;
+ uint8_t enable_dfs_pno_chnl_scan;
+ uint8_t enableDynamicDTIM;
+ uint8_t enableAutomaticTxPowerControl;
+ uint8_t ShortGI40MhzEnable;
+ eHddLinkSpeedReportType reportMaxLinkSpeed;
+ int32_t linkSpeedRssiHigh;
+ int32_t linkSpeedRssiMid;
+ int32_t linkSpeedRssiLow;
+#if defined (WLAN_FEATURE_VOWIFI_11R) || defined (FEATURE_WLAN_ESE) || defined(FEATURE_WLAN_LFR)
+ bool nRoamPrefer5GHz;
+ bool nRoamIntraBand;
+ uint8_t nProbes;
+ uint16_t nRoamScanHomeAwayTime;
+#endif
+ uint8_t enableMCC;
+ uint8_t allowMCCGODiffBI;
+ bool isP2pDeviceAddrAdministrated;
+ uint8_t thermalMitigationEnable;
+ uint32_t throttlePeriod;
+ uint8_t vhtChannelWidth;
+ uint8_t vhtRxMCS;
+ uint8_t vhtTxMCS;
+ bool enableTxBF;
+ uint8_t txBFCsnValue;
+ bool enable_su_tx_bformer;
+ uint8_t vhtRxMCS2x2;
+ uint8_t vhtTxMCS2x2;
+ bool enable2x2;
+ bool txchainmask1x1;
+ bool rxchainmask1x1;
+ bool enableMuBformee;
+ bool enableVhtpAid;
+ bool enableVhtGid;
+ bool enableTxBFin20MHz;
+ uint8_t enableAmpduPs;
+ uint8_t enableHtSmps;
+ uint8_t htSmps;
+ uint8_t enableModulatedDTIM;
+ uint32_t fEnableMCAddrList;
+ bool enableFirstScan2GOnly;
+ bool skipDfsChnlInP2pSearch;
+ bool ignoreDynamicDtimInP2pMode;
+ bool enableRxSTBC;
+ bool enableTxSTBC;
+ bool enableRxLDPC;
+ bool enable5gEBT;
+#ifdef FEATURE_WLAN_TDLS
+ bool fEnableTDLSSupport;
+ bool fEnableTDLSImplicitTrigger;
+ uint32_t fTDLSTxStatsPeriod;
+ uint32_t fTDLSTxPacketThreshold;
+ uint32_t fTDLSMaxDiscoveryAttempt;
+ uint32_t fTDLSIdlePacketThreshold;
+ int32_t fTDLSRSSITriggerThreshold;
+ int32_t fTDLSRSSITeardownThreshold;
+ int32_t fTDLSRSSIDelta;
+ uint32_t fTDLSUapsdMask; /* what ACs to setup U-APSD for TDLS */
+ uint32_t fEnableTDLSBufferSta;
+ uint32_t fEnableTDLSSleepSta;
+ uint32_t fTDLSPuapsdInactivityTimer;
+ uint32_t fTDLSRxFrameThreshold;
+ uint32_t fTDLSPuapsdPTIWindow;
+ uint32_t fTDLSPuapsdPTRTimeout;
+ bool fTDLSExternalControl;
+ uint32_t fEnableTDLSOffChannel;
+ uint32_t fEnableTDLSWmmMode;
+ uint8_t fTDLSPrefOffChanNum;
+ uint8_t fTDLSPrefOffChanBandwidth;
+ uint8_t enable_tdls_scan;
+#endif
+#ifdef WLAN_SOFTAP_VSTA_FEATURE
+ bool fEnableVSTASupport;
+#endif
+ uint32_t enableLpwrImgTransition;
+ uint8_t scanAgingTimeout;
+ bool enableTxLdpc;
+ uint8_t disableLDPCWithTxbfAP;
+ uint8_t enableMCCAdaptiveScheduler;
+ bool isAndroidPsEn;
+ bool sapAllowAllChannel;
+ uint8_t retryLimitZero;
+ uint8_t retryLimitOne;
+ uint8_t retryLimitTwo;
+ bool enableSSR;
+ uint32_t cfgMaxMediumTime;
+ bool enableVhtFor24GHzBand;
+ /* Flag indicating whether legacy fast roam during concurrency is enabled in cfg.ini or not */
+ bool bFastRoamInConIniFeatureEnabled;
+ bool fEnableAdaptRxDrain;
+ uint8_t flexConnectPowerFactor;
+ bool enableIbssHeartBeatOffload;
+ uint32_t antennaDiversity;
+ bool fEnableSNRMonitoring;
+ /*PNO related parameters */
+#ifdef FEATURE_WLAN_SCAN_PNO
+ bool configPNOScanSupport;
+ uint32_t configPNOScanTimerRepeatValue;
+#endif
+ uint8_t isAmsduSupportInAMPDU;
+ uint8_t nSelect5GHzMargin;
+ uint8_t isCoalesingInIBSSAllowed;
+
+ /* IBSS Power Save related parameters */
+ uint32_t ibssATIMWinSize;
+ uint8_t isIbssPowerSaveAllowed;
+ uint8_t isIbssPowerCollapseAllowed;
+ uint8_t isIbssAwakeOnTxRx;
+ uint32_t ibssInactivityCount;
+ uint32_t ibssTxSpEndInactivityTime;
+ uint32_t ibssPsWarmupTime;
+ uint32_t ibssPs1RxChainInAtimEnable;
+
+ bool enable_ip_tcp_udp_checksum_offload;
+ bool enablePowersaveOffload;
+ bool enablefwprint;
+ bool enablefwlog;
+#ifdef WLAN_FEATURE_11AC
+ uint8_t fVhtAmpduLenExponent;
+ uint32_t vhtMpduLen;
+#endif
+ uint32_t IpaConfig;
+ bool IpaClkScalingEnable;
+ uint32_t IpaDescSize;
+ uint32_t IpaHighBandwidthMbps;
+ uint32_t IpaMediumBandwidthMbps;
+ uint32_t IpaLowBandwidthMbps;
+#ifdef FEATURE_WLAN_MCC_TO_SCC_SWITCH
+ uint32_t WlanMccToSccSwitchMode;
+#endif
+#ifdef FEATURE_WLAN_AUTO_SHUTDOWN
+ uint32_t WlanAutoShutdown;
+#endif
+ uint8_t maxWoWFilters;
+ uint8_t wowEnable;
+ uint8_t maxNumberOfPeers;
+ uint8_t disableDFSChSwitch;
+ uint8_t enableDFSMasterCap;
+ uint16_t thermalTempMinLevel0;
+ uint16_t thermalTempMaxLevel0;
+ uint16_t thermalTempMinLevel1;
+ uint16_t thermalTempMaxLevel1;
+ uint16_t thermalTempMinLevel2;
+ uint16_t thermalTempMaxLevel2;
+ uint16_t thermalTempMinLevel3;
+ uint16_t thermalTempMaxLevel3;
+ uint32_t TxPower2g;
+ uint32_t TxPower5g;
+ uint32_t gEnableDebugLog;
+ uint8_t enableRxThread;
+ bool fDfsPhyerrFilterOffload;
+ uint8_t gSapPreferredChanLocation;
+ uint8_t gDisableDfsJapanW53;
+ bool gEnableOverLapCh;
+ bool fRegChangeDefCountry;
+#ifdef QCA_LL_LEGACY_TX_FLOW_CONTROL
+ uint32_t TxFlowLowWaterMark;
+ uint32_t TxFlowHighWaterMarkOffset;
+ uint32_t TxFlowMaxQueueDepth;
+ uint32_t TxLbwFlowLowWaterMark;
+ uint32_t TxLbwFlowHighWaterMarkOffset;
+ uint32_t TxLbwFlowMaxQueueDepth;
+ uint32_t TxHbwFlowLowWaterMark;
+ uint32_t TxHbwFlowHighWaterMarkOffset;
+ uint32_t TxHbwFlowMaxQueueDepth;
+#endif /* QCA_LL_LEGACY_TX_FLOW_CONTROL */
+#ifdef QCA_LL_TX_FLOW_CONTROL_V2
+ uint32_t TxFlowStopQueueThreshold;
+ uint32_t TxFlowStartQueueOffset;
+#endif
+ uint8_t apMaxOffloadPeers;
+ uint8_t apMaxOffloadReorderBuffs;
+ bool advertiseConcurrentOperation;
+ bool enableMemDeepSleep;
+
+ uint32_t defaultRateIndex24Ghz;
+#ifdef MEMORY_DEBUG
+ bool IsMemoryDebugSupportEnabled;
+#endif
+
+ uint8_t allowDFSChannelRoam;
+
+ bool debugP2pRemainOnChannel;
+
+ bool enablePacketLog;
+#ifdef MSM_PLATFORM
+ uint32_t busBandwidthHighThreshold;
+ uint32_t busBandwidthMediumThreshold;
+ uint32_t busBandwidthLowThreshold;
+ uint32_t busBandwidthComputeInterval;
+ uint32_t tcpDelackThresholdHigh;
+ uint32_t tcpDelackThresholdLow;
+#endif /* MSM_PLATFORM */
+
+ /* FW debug log parameters */
+ uint32_t enableFwLogType;
+ uint32_t enableFwLogLevel;
+ uint8_t enableFwModuleLogLevel[FW_MODULE_LOG_LEVEL_STRING_LENGTH];
+
+#ifdef WLAN_FEATURE_11W
+ uint32_t pmfSaQueryMaxRetries;
+ uint32_t pmfSaQueryRetryInterval;
+#endif
+
+ uint8_t gMaxConcurrentActiveSessions;
+
+ uint8_t ignoreCAC;
+ bool IsSapDfsChSifsBurstEnabled;
+
+#ifdef FEATURE_GREEN_AP
+ bool enableGreenAP;
+#endif
+ uint8_t force_sap_acs;
+ uint8_t force_sap_acs_st_ch;
+ uint8_t force_sap_acs_end_ch;
+
+ int32_t dfsRadarPriMultiplier;
+ uint8_t reorderOffloadSupport;
+
+#ifdef WLAN_FEATURE_ROAM_OFFLOAD
+ bool isRoamOffloadEnabled;
+#endif
+
+ uint32_t IpaUcTxBufCount;
+ uint32_t IpaUcTxBufSize;
+ uint32_t IpaUcRxIndRingCount;
+ uint32_t IpaUcTxPartitionBase;
+#ifdef WLAN_LOGGING_SOCK_SVC_ENABLE
+ /* WLAN Logging */
+ uint32_t wlanLoggingEnable;
+ uint32_t wlanLoggingFEToConsole;
+ uint32_t wlanLoggingNumBuf;
+#endif /* WLAN_LOGGING_SOCK_SVC_ENABLE */
+
+ bool enableSifsBurst;
+
+#ifdef WLAN_FEATURE_LPSS
+ bool enablelpasssupport;
+#endif
+#ifdef WLAN_FEATURE_NAN
+ bool enable_nan_support;
+#endif
+ bool enableSelfRecovery;
+#ifdef FEATURE_WLAN_FORCE_SAP_SCC
+ uint8_t SapSccChanAvoidance;
+#endif /* FEATURE_WLAN_FORCE_SAP_SCC */
+
+ bool enableSapSuspend;
+
+#ifdef WLAN_FEATURE_EXTWOW_SUPPORT
+ uint8_t extWowGotoSuspend;
+ uint8_t extWowApp1WakeupPinNumber;
+ uint8_t extWowApp2WakeupPinNumber;
+ uint32_t extWowApp2KAInitPingInterval;
+ uint32_t extWowApp2KAMinPingInterval;
+ uint32_t extWowApp2KAMaxPingInterval;
+ uint32_t extWowApp2KAIncPingInterval;
+ uint16_t extWowApp2TcpSrcPort;
+ uint16_t extWowApp2TcpDstPort;
+ uint32_t extWowApp2TcpTxTimeout;
+ uint32_t extWowApp2TcpRxTimeout;
+#endif
+ bool gEnableDeauthToDisassocMap;
+#ifdef DHCP_SERVER_OFFLOAD
+ bool enableDHCPServerOffload;
+ uint32_t dhcpMaxNumClients;
+ uint8_t dhcpServerIP[IPADDR_STRING_LENGTH];
+#endif /* DHCP_SERVER_OFFLOAD */
+ bool enable_mac_spoofing;
+ uint8_t conc_custom_rule1;
+ uint8_t conc_custom_rule2;
+ uint8_t is_sta_connection_in_5gz_enabled;
+ uint16_t p2p_listen_defer_interval;
+ uint32_t sta_miracast_mcc_rest_time_val;
+ bool is_ramdump_enabled;
+#ifdef FEATURE_AP_MCC_CH_AVOIDANCE
+ bool sap_channel_avoidance;
+#endif /* FEATURE_AP_MCC_CH_AVOIDANCE */
+ uint8_t sap_p2p_11ac_override;
+ uint8_t sap_dot11mc;
+ uint8_t prefer_non_dfs_on_radar;
+ bool ignore_peer_erp_info;
+ uint8_t multicast_host_fw_msgs;
+ uint8_t conc_system_pref;
+ bool sendDeauthBeforeCon;
+ bool policy_manager_enabled;
+ bool tso_enable;
+ bool lro_enable;
+ bool active_mode_offload;
+ uint32_t fine_time_meas_cap;
+ uint8_t max_scan_count;
+#ifdef WLAN_FEATURE_FASTPATH
+ bool fastpath_enable;
+#endif
+ uint8_t dot11p_mode;
+#ifdef FEATURE_NAPI
+ bool napi_enable;
+#endif
+#ifdef FEATURE_WLAN_EXTSCAN
+ uint32_t extscan_passive_max_chn_time;
+ uint32_t extscan_passive_min_chn_time;
+ uint32_t extscan_active_max_chn_time;
+ uint32_t extscan_active_min_chn_time;
+#endif
+ bool ce_classify_enabled;
+ uint32_t dual_mac_feature_disable;
+ bool tx_chain_mask_cck;
+ uint8_t tx_chain_mask_1ss;
+ uint16_t self_gen_frm_pwr;
+};
+
+#define VAR_OFFSET(_Struct, _Var) (offsetof(_Struct, _Var))
+#define VAR_SIZE(_Struct, _Var) (sizeof(((_Struct *)0)->_Var))
+
+#define VAR_FLAGS_NONE (0)
+
+/* bit 0 is Required or Optional */
+#define VAR_FLAGS_REQUIRED (1 << 0)
+#define VAR_FLAGS_OPTIONAL (0 << 0)
+
+/*
+ * bit 1 tells if range checking is required.
+ * If less than MIN, assume MIN.
+ * If greater than MAX, assume MAX.
+ */
+#define VAR_FLAGS_RANGE_CHECK (1 << 1)
+#define VAR_FLAGS_RANGE_CHECK_ASSUME_MINMAX (VAR_FLAGS_RANGE_CHECK)
+
+/*
+ * bit 2 is range checking that assumes the DEFAULT value
+ * If less than MIN, assume DEFAULT,
+ * If greater than MAX, assume DEFAULT.
+ */
+#define VAR_FLAGS_RANGE_CHECK_ASSUME_DEFAULT (1 << 2)
+
+/*
+ * Bit 3 indicates that the config item can be modified dynamicially
+ * on a running system
+ */
+#define VAR_FLAGS_DYNAMIC_CFG (1 << 3)
+
+typedef enum {
+ WLAN_PARAM_Integer,
+ WLAN_PARAM_SignedInteger,
+ WLAN_PARAM_HexInteger,
+ WLAN_PARAM_String,
+ WLAN_PARAM_MacAddr,
+} WLAN_PARAMETER_TYPE;
+
+#define REG_VARIABLE(_Name, _Type, _Struct, _VarName, \
+ _Flags, _Default, _Min, _Max) \
+ { \
+ (_Name), \
+ (_Type), \
+ (_Flags), \
+ VAR_OFFSET(_Struct, _VarName), \
+ VAR_SIZE(_Struct, _VarName), \
+ (_Default), \
+ (_Min), \
+ (_Max), \
+ NULL, \
+ 0 \
+ }
+
+#define REG_DYNAMIC_VARIABLE(_Name, _Type, _Struct, _VarName, \
+ _Flags, _Default, _Min, _Max, \
+ _CBFunc, _CBParam) \
+ { \
+ (_Name), \
+ (_Type), \
+ (VAR_FLAGS_DYNAMIC_CFG | (_Flags)), \
+ VAR_OFFSET(_Struct, _VarName), \
+ VAR_SIZE(_Struct, _VarName), \
+ (_Default), \
+ (_Min), \
+ (_Max), \
+ (_CBFunc), \
+ (_CBParam) \
+ }
+
+#define REG_VARIABLE_STRING(_Name, _Type, _Struct, _VarName, \
+ _Flags, _Default) \
+ { \
+ (_Name), \
+ (_Type), \
+ (_Flags), \
+ VAR_OFFSET(_Struct, _VarName), \
+ VAR_SIZE(_Struct, _VarName), \
+ (unsigned long)(_Default), \
+ 0, \
+ 0, \
+ NULL, \
+ 0 \
+ }
+
+typedef struct tREG_TABLE_ENTRY {
+
+ char *RegName; /* variable name in the qcom_cfg.ini file */
+ WLAN_PARAMETER_TYPE RegType; /* variable type in the hdd_config_t structure */
+ unsigned long Flags; /* Specify optional parms and if RangeCheck is performed */
+ unsigned short VarOffset; /* offset to field from the base address of the structure */
+ unsigned short VarSize; /* size (in bytes) of the field */
+ unsigned long VarDefault; /* default value to use */
+ unsigned long VarMin; /* minimum value, for range checking */
+ unsigned long VarMax; /* maximum value, for range checking */
+ /* Dynamic modification notifier */
+ void (*pfnDynamicnotify)(hdd_context_t *pHddCtx,
+ unsigned long notifyId);
+ unsigned long notifyId; /* Dynamic modification identifier */
+} REG_TABLE_ENTRY;
+
+static __inline unsigned long util_min(unsigned long a, unsigned long b)
+{
+ unsigned long r;
+
+ r = ((a < b) ? a : b);
+ return r;
+}
+
+/* Function declarations and documenation */
+CDF_STATUS hdd_parse_config_ini(hdd_context_t *pHddCtx);
+CDF_STATUS hdd_update_mac_config(hdd_context_t *pHddCtx);
+CDF_STATUS hdd_set_sme_config(hdd_context_t *pHddCtx);
+CDF_STATUS hdd_set_sme_chan_list(hdd_context_t *hdd_ctx);
+bool hdd_update_config_dat(hdd_context_t *pHddCtx);
+CDF_STATUS hdd_cfg_get_global_config(hdd_context_t *pHddCtx, char *pBuf,
+ int buflen);
+
+eCsrPhyMode hdd_cfg_xlate_to_csr_phy_mode(eHddDot11Mode dot11Mode);
+CDF_STATUS hdd_execute_global_config_command(hdd_context_t *pHddCtx,
+ char *command);
+
+bool hdd_is_okc_mode_enabled(hdd_context_t *pHddCtx);
+CDF_STATUS hdd_set_idle_ps_config(hdd_context_t *pHddCtx, uint32_t val);
+
+void hdd_update_tgt_cfg(void *context, void *param);
+void hdd_dfs_indicate_radar(void *context, void *param);
+
+CDF_STATUS hdd_string_to_u8_array(char *str, uint8_t *intArray, uint8_t *len,
+ uint8_t intArrayMaxLen);
+void hdd_cfg_print(hdd_context_t *pHddCtx);
+
+CDF_STATUS hdd_update_nss(hdd_context_t *hdd_ctx, uint8_t nss);
+
+#endif
diff --git a/core/hdd/inc/wlan_hdd_conc_ut.h b/core/hdd/inc/wlan_hdd_conc_ut.h
new file mode 100644
index 0000000..95e13f3
--- /dev/null
+++ b/core/hdd/inc/wlan_hdd_conc_ut.h
@@ -0,0 +1,79 @@
+/*
+ * Copyright (c) 2015 The Linux Foundation. All rights reserved.
+ *
+ * Previously licensed under the ISC license by Qualcomm Atheros, Inc.
+ *
+ *
+ * Permission to use, copy, modify, and/or distribute this software for
+ * any purpose with or without fee is hereby granted, provided that the
+ * above copyright notice and this permission notice appear in all
+ * copies.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
+ * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE
+ * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
+ * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
+ * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
+ * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
+ * PERFORMANCE OF THIS SOFTWARE.
+ */
+
+/*
+ * This file was originally distributed by Qualcomm Atheros, Inc.
+ * under proprietary terms before Copyright ownership was assigned
+ * to the Linux Foundation.
+ */
+
+#ifndef __WLAN_HDD_CONC_UT_H
+#define __WLAN_HDD_CONC_UT_H
+
+/* Include files */
+
+#include "wlan_hdd_main.h"
+#include "cds_concurrency.h"
+#ifdef MPC_UT_FRAMEWORK
+void clean_report(hdd_context_t *hdd_ctx);
+void fill_report(hdd_context_t *hdd_ctx, char *title,
+ uint32_t first_persona, uint32_t second_persona, uint32_t third_persona,
+ uint32_t chnl_1st_conn, uint32_t chnl_2nd_conn, uint32_t chnl_3rd_conn,
+ bool status, enum cds_pcl_type pcl_type, char *reason, uint8_t *pcl);
+void print_report(hdd_context_t *hdd_ctx);
+void wlan_hdd_one_connection_scenario(hdd_context_t *hdd_ctx);
+void wlan_hdd_two_connections_scenario(hdd_context_t *hdd_ctx,
+ uint8_t first_chnl, enum cds_chain_mode first_chain_mask);
+void wlan_hdd_three_connections_scenario(hdd_context_t *hdd_ctx,
+ uint8_t first_chnl, uint8_t second_chnl,
+ enum cds_chain_mode chain_mask, uint8_t use_same_mac);
+#else
+static inline void clean_report(hdd_context_t *hdd_ctx)
+{
+}
+
+static inline void fill_report(hdd_context_t *hdd_ctx, char *title,
+ uint32_t first_persona, uint32_t second_persona, uint32_t third_persona,
+ uint32_t chnl_1st_conn, uint32_t chnl_2nd_conn, uint32_t chnl_3rd_conn,
+ bool status, enum hdd_pcl_type pcl_type, char *reason, uint8_t *pcl)
+{
+}
+
+static inline void print_report(hdd_context_t *hdd_ctx)
+{
+}
+
+static inline void wlan_hdd_one_connection_scenario(hdd_context_t *hdd_ctx)
+{
+}
+
+static inline void wlan_hdd_two_connections_scenario(hdd_context_t *hdd_ctx,
+ uint8_t first_chnl, enum hdd_chain_mode first_chain_mask)
+{
+}
+
+static inline void wlan_hdd_three_connections_scenario(hdd_context_t *hdd_ctx,
+ uint8_t first_chnl, uint8_t second_chnl,
+ enum hdd_chain_mode chain_mask, uint8_t use_same_mac)
+{
+}
+#endif
+#endif
diff --git a/core/hdd/inc/wlan_hdd_debugfs.h b/core/hdd/inc/wlan_hdd_debugfs.h
new file mode 100644
index 0000000..be51317
--- /dev/null
+++ b/core/hdd/inc/wlan_hdd_debugfs.h
@@ -0,0 +1,44 @@
+/*
+ * Copyright (c) 2013-2014 The Linux Foundation. All rights reserved.
+ *
+ * Previously licensed under the ISC license by Qualcomm Atheros, Inc.
+ *
+ *
+ * Permission to use, copy, modify, and/or distribute this software for
+ * any purpose with or without fee is hereby granted, provided that the
+ * above copyright notice and this permission notice appear in all
+ * copies.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
+ * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE
+ * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
+ * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
+ * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
+ * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
+ * PERFORMANCE OF THIS SOFTWARE.
+ */
+
+/*
+ * This file was originally distributed by Qualcomm Atheros, Inc.
+ * under proprietary terms before Copyright ownership was assigned
+ * to the Linux Foundation.
+ */
+
+#ifndef _WLAN_HDD_DEBUGFS_H
+#define _WLAN_HDD_DEBUGFS_H
+
+#ifdef WLAN_OPEN_SOURCE
+CDF_STATUS hdd_debugfs_init(hdd_adapter_t *pAdapter);
+void hdd_debugfs_exit(hdd_context_t *pHddCtx);
+#else
+inline CDF_STATUS hdd_debugfs_init(hdd_adapter_t *pAdapter)
+{
+ return CDF_STATUS_SUCCESS;
+}
+
+inline void hdd_debugfs_exit(hdd_context_t *pHddCtx)
+{
+}
+#endif /* #ifdef WLAN_OPEN_SOURCE */
+#endif /* #ifndef _WLAN_HDD_DEBUGFS_H */
diff --git a/core/hdd/inc/wlan_hdd_driver_ops.h b/core/hdd/inc/wlan_hdd_driver_ops.h
new file mode 100644
index 0000000..4619cf8
--- /dev/null
+++ b/core/hdd/inc/wlan_hdd_driver_ops.h
@@ -0,0 +1,39 @@
+/*
+ * Copyright (c) 2015 The Linux Foundation. All rights reserved.
+ *
+ * Previously licensed under the ISC license by Qualcomm Atheros, Inc.
+ *
+ *
+ * Permission to use, copy, modify, and/or distribute this software for
+ * any purpose with or without fee is hereby granted, provided that the
+ * above copyright notice and this permission notice appear in all
+ * copies.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
+ * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE
+ * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
+ * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
+ * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
+ * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
+ * PERFORMANCE OF THIS SOFTWARE.
+ */
+
+/*
+ * This file was originally distributed by Qualcomm Atheros, Inc.
+ * under proprietary terms before Copyright ownership was assigned
+ * to the Linux Foundation.
+ */
+
+#ifndef __WLAN_HDD_DRIVER_OPS_H__
+#define __WLAN_HDD_DRIVER_OPS_H__
+
+/**
+ * DOC: wlan_hdd_driver_ops.h
+ *
+ * Functions to register the wlan driver.
+*/
+int wlan_hdd_register_driver(void);
+void wlan_hdd_unregister_driver(void);
+int wlan_hdd_bus_suspend(pm_message_t state);
+#endif /* __WLAN_HDD_DRIVER_OPS_H__ */
diff --git a/core/hdd/inc/wlan_hdd_ether.h b/core/hdd/inc/wlan_hdd_ether.h
new file mode 100644
index 0000000..cc20ad9
--- /dev/null
+++ b/core/hdd/inc/wlan_hdd_ether.h
@@ -0,0 +1,89 @@
+/*
+ * Copyright (c) 2014 The Linux Foundation. All rights reserved.
+ *
+ * Previously licensed under the ISC license by Qualcomm Atheros, Inc.
+ *
+ *
+ * Permission to use, copy, modify, and/or distribute this software for
+ * any purpose with or without fee is hereby granted, provided that the
+ * above copyright notice and this permission notice appear in all
+ * copies.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
+ * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE
+ * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
+ * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
+ * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
+ * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
+ * PERFORMANCE OF THIS SOFTWARE.
+ */
+
+/*
+ * This file was originally distributed by Qualcomm Atheros, Inc.
+ * under proprietary terms before Copyright ownership was assigned
+ * to the Linux Foundation.
+ */
+
+#ifndef _WLAN_HDD_ETHER_H
+#define _WLAN_HDD_ETHER_H
+/*============================================================================
+ @file wlan_hdd_ether.h
+
+ This module describes Ethernet packet formats for processing by HDD.
+ ============================================================================*/
+/* $Header$ */
+
+/*----------------------------------------------------------------------------
+ * Include Files
+ * -------------------------------------------------------------------------*/
+#include <linux/version.h>
+#include <linux/byteorder/generic.h>
+#include <linux/if_ether.h>
+#include <linux/if_vlan.h>
+
+/*----------------------------------------------------------------------------
+ * Preprocessor Definitions and Constants
+ * -------------------------------------------------------------------------*/
+#define WLAN_SNAP_OUI_LEN 3
+#define WLAN_SNAP_DSAP 0xAAU
+#define WLAN_SNAP_SSAP 0xAAU
+#define WLAN_SNAP_CTRL 0x03
+#define WLAN_MIN_PROTO 0x0600
+
+/*----------------------------------------------------------------------------
+ * Type Declarations
+ * -------------------------------------------------------------------------*/
+struct wlan_snap_hdr {
+ unsigned char dsap;
+ unsigned char ssap;
+ unsigned char ctrl;
+ unsigned char oui[WLAN_SNAP_OUI_LEN];
+} __packed;
+
+struct wlan_8023 {
+ unsigned char h_dest[ETH_ALEN];
+ unsigned char h_source[ETH_ALEN];
+ __be16 h_len;
+ struct wlan_snap_hdr h_snap;
+ __be16 h_proto;
+} __packed;
+
+struct wlan_8023_vlan {
+ unsigned char h_dest[ETH_ALEN];
+ unsigned char h_source[ETH_ALEN];
+ __be16 h_vlan_proto;
+ __be16 h_vlan_TCI;
+ __be16 h_len;
+ struct wlan_snap_hdr h_snap;
+ __be16 h_proto;
+} __packed;
+
+union generic_ethhdr {
+ struct ethhdr eth_II;
+ struct vlan_ethhdr eth_IIv;
+ struct wlan_8023 eth_8023;
+ struct wlan_8023_vlan eth_8023v;
+};
+
+#endif /* #ifndef _WLAN_HDD_ETHER_H */
diff --git a/core/hdd/inc/wlan_hdd_ftm.h b/core/hdd/inc/wlan_hdd_ftm.h
new file mode 100644
index 0000000..c9ed355
--- /dev/null
+++ b/core/hdd/inc/wlan_hdd_ftm.h
@@ -0,0 +1,68 @@
+/*
+ * Copyright (c) 2013-2015 The Linux Foundation. All rights reserved.
+ *
+ * Previously licensed under the ISC license by Qualcomm Atheros, Inc.
+ *
+ *
+ * Permission to use, copy, modify, and/or distribute this software for
+ * any purpose with or without fee is hereby granted, provided that the
+ * above copyright notice and this permission notice appear in all
+ * copies.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
+ * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE
+ * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
+ * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
+ * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
+ * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
+ * PERFORMANCE OF THIS SOFTWARE.
+ */
+
+/*
+ * This file was originally distributed by Qualcomm Atheros, Inc.
+ * under proprietary terms before Copyright ownership was assigned
+ * to the Linux Foundation.
+ */
+
+#ifndef WLAN_HDD_FTM_H
+#define WLAN_HDD_FTM_H
+
+/**
+ * DOC: wlan_hdd_ftm.h
+ *
+ * WLAN Host Device Driver Factory Test Mode header file
+ */
+
+#include "cdf_status.h"
+#include "cds_mq.h"
+#include "cds_api.h"
+#include "msg.h"
+#include "cdf_types.h"
+#include <wlan_ptt_sock_svc.h>
+
+enum wlan_hdd_ftm_state {
+ WLAN_FTM_INITIALIZED,
+ WLAN_FTM_STOPPED,
+ WLAN_FTM_STARTED,
+};
+
+/**
+ * struct wlan_hdd_ftm_status - FTM status
+ * @ftm_state: The current state of the FTM process
+ */
+struct wlan_hdd_ftm_status {
+ enum wlan_hdd_ftm_state ftm_state;
+};
+
+int wlan_hdd_ftm_open(hdd_context_t *hdd_ctx);
+int wlan_hdd_ftm_close(hdd_context_t *hdd_ctx);
+
+#if defined(QCA_WIFI_FTM)
+CDF_STATUS wlan_hdd_ftm_testmode_cmd(void *data, int len);
+int wlan_hdd_qcmbr_unified_ioctl(hdd_adapter_t *adapter, struct ifreq *ifr);
+int hdd_ftm_start(hdd_context_t *hdd_ctx);
+int hdd_ftm_stop(hdd_context_t *hdd_ctx);
+#endif
+
+#endif
diff --git a/core/hdd/inc/wlan_hdd_host_offload.h b/core/hdd/inc/wlan_hdd_host_offload.h
new file mode 100644
index 0000000..515a828
--- /dev/null
+++ b/core/hdd/inc/wlan_hdd_host_offload.h
@@ -0,0 +1,60 @@
+/*
+ * Copyright (c) 2014 The Linux Foundation. All rights reserved.
+ *
+ * Previously licensed under the ISC license by Qualcomm Atheros, Inc.
+ *
+ *
+ * Permission to use, copy, modify, and/or distribute this software for
+ * any purpose with or without fee is hereby granted, provided that the
+ * above copyright notice and this permission notice appear in all
+ * copies.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
+ * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE
+ * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
+ * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
+ * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
+ * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
+ * PERFORMANCE OF THIS SOFTWARE.
+ */
+
+/*
+ * This file was originally distributed by Qualcomm Atheros, Inc.
+ * under proprietary terms before Copyright ownership was assigned
+ * to the Linux Foundation.
+ */
+
+#ifndef __WLAN_HDD_HOST_OFFLOAD_H__
+#define __WLAN_HDD_HOST_OFFLOAD_H__
+
+/**===========================================================================
+
+ \file wlan_hdd_host_offload.h
+
+ \brief Android WLAN HDD Host Offload API
+
+ ==========================================================================*/
+
+/* Offload types. */
+#define WLAN_IPV4_ARP_REPLY_OFFLOAD 0
+#define WLAN_IPV6_NEIGHBOR_DISCOVERY_OFFLOAD 1
+
+/* Enable or disable offload. */
+#define WLAN_OFFLOAD_DISABLE 0
+#define WLAN_OFFLOAD_ENABLE 0x1
+#define WLAN_OFFLOAD_BC_FILTER_ENABLE 0x2
+#define WLAN_OFFLOAD_ARP_AND_BC_FILTER_ENABLE (WLAN_OFFLOAD_ENABLE | WLAN_OFFLOAD_BC_FILTER_ENABLE)
+
+/* Offload request. */
+typedef struct {
+ uint8_t offloadType;
+ uint8_t enableOrDisable;
+ union {
+ uint8_t hostIpv4Addr[4];
+ uint8_t hostIpv6Addr[16];
+ } params;
+ struct cdf_mac_addr bssId;
+} tHostOffloadRequest, *tpHostOffloadRequest;
+
+#endif /* __WLAN_HDD_HOST_OFFLOAD_H__ */
diff --git a/core/hdd/inc/wlan_hdd_includes.h b/core/hdd/inc/wlan_hdd_includes.h
new file mode 100644
index 0000000..cb2e63e
--- /dev/null
+++ b/core/hdd/inc/wlan_hdd_includes.h
@@ -0,0 +1,69 @@
+/*
+ * Copyright (c) 2014 The Linux Foundation. All rights reserved.
+ *
+ * Previously licensed under the ISC license by Qualcomm Atheros, Inc.
+ *
+ *
+ * Permission to use, copy, modify, and/or distribute this software for
+ * any purpose with or without fee is hereby granted, provided that the
+ * above copyright notice and this permission notice appear in all
+ * copies.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
+ * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE
+ * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
+ * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
+ * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
+ * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
+ * PERFORMANCE OF THIS SOFTWARE.
+ */
+
+/*
+ * This file was originally distributed by Qualcomm Atheros, Inc.
+ * under proprietary terms before Copyright ownership was assigned
+ * to the Linux Foundation.
+ */
+
+#if !defined(HDD_INCLUDES_H__)
+#define HDD_INCLUDES_H__
+
+/**===========================================================================
+
+ \file wlan_hdd_includes.h
+
+ \brief Internal includes for the Linux HDD
+
+ ==========================================================================*/
+
+/* $HEADER$ */
+
+/*---------------------------------------------------------------------------
+ Include files
+ -------------------------------------------------------------------------*/
+
+/* throw all the includes in here f to get the .c files in the HDD to compile. */
+
+#include <linux/version.h>
+#include <linux/module.h>
+#include <linux/kernel.h>
+#include <linux/init.h>
+#include <linux/wireless.h>
+#include <linux/if_arp.h>
+#include "ol_txrx_ctrl_api.h"
+#include <cds_api.h>
+#include <sme_api.h>
+#include "wlan_hdd_assoc.h"
+#include "wlan_hdd_mib.h"
+#include "wlan_hdd_wext.h"
+#include "wlan_hdd_main.h"
+#include "wlan_hdd_tx_rx.h"
+
+
+#ifdef FEATURE_OEM_DATA_SUPPORT
+/*include for oem data req specific structures*/
+/*and function declarations*/
+#include "wlan_hdd_oemdata.h"
+#endif
+
+#endif /* end #if !defined(HDD_INCLUDES_H__) */
diff --git a/core/hdd/inc/wlan_hdd_ipa.h b/core/hdd/inc/wlan_hdd_ipa.h
new file mode 100644
index 0000000..a2f5fb3
--- /dev/null
+++ b/core/hdd/inc/wlan_hdd_ipa.h
@@ -0,0 +1,151 @@
+/*
+ * Copyright (c) 2013-2015 The Linux Foundation. All rights reserved.
+ *
+ * Previously licensed under the ISC license by Qualcomm Atheros, Inc.
+ *
+ *
+ * Permission to use, copy, modify, and/or distribute this software for
+ * any purpose with or without fee is hereby granted, provided that the
+ * above copyright notice and this permission notice appear in all
+ * copies.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
+ * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE
+ * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
+ * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
+ * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
+ * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
+ * PERFORMANCE OF THIS SOFTWARE.
+ */
+
+/*
+ * This file was originally distributed by Qualcomm Atheros, Inc.
+ * under proprietary terms before Copyright ownership was assigned
+ * to the Linux Foundation.
+ */
+
+#ifndef HDD_IPA_H__
+#define HDD_IPA_H__
+
+/**
+ * DOC: wlan_hdd_ipa.h
+ *
+ * WLAN IPA interface module headers
+ * Originally written by Qualcomm Atheros, Inc
+ */
+
+#include <linux/ipa.h>
+
+#ifdef IPA_OFFLOAD
+/* Include files */
+CDF_STATUS hdd_ipa_init(hdd_context_t *hdd_ctx);
+CDF_STATUS hdd_ipa_cleanup(hdd_context_t *hdd_ctx);
+CDF_STATUS hdd_ipa_process_rxt(void *cds_context, cdf_nbuf_t rxBuf,
+ uint8_t sta_id);
+int hdd_ipa_wlan_evt(hdd_adapter_t *adapter, uint8_t sta_id,
+ enum ipa_wlan_event type, uint8_t *mac_addr);
+int hdd_ipa_set_perf_level(hdd_context_t *hdd_ctx, uint64_t tx_packets,
+ uint64_t rx_packets);
+int hdd_ipa_suspend(hdd_context_t *hdd_ctx);
+int hdd_ipa_resume(hdd_context_t *hdd_ctx);
+void hdd_ipa_uc_stat_query(hdd_context_t *hdd_ctx, uint32_t *ipa_tx_diff,
+ uint32_t *ipa_rx_diff);
+void hdd_ipa_uc_rt_debug_host_dump(hdd_context_t *hdd_ctx);
+void hdd_ipa_uc_stat_request(hdd_adapter_t *adapter, uint8_t reason);
+bool hdd_ipa_is_enabled(hdd_context_t *pHddCtx);
+bool hdd_ipa_uc_is_enabled(hdd_context_t *pHddCtx);
+int hdd_ipa_send_mcc_scc_msg(hdd_context_t *pHddCtx, bool mcc_mode);
+#else
+static inline CDF_STATUS hdd_ipa_init(hdd_context_t *hdd_ctx)
+{
+ return CDF_STATUS_SUCCESS;
+}
+
+static inline CDF_STATUS hdd_ipa_cleanup(hdd_context_t *hdd_ctx)
+{
+ return CDF_STATUS_SUCCESS;
+}
+
+static inline CDF_STATUS hdd_ipa_process_rxt(void *cds_context,
+ cdf_nbuf_t rxBuf, uint8_t sta_id)
+{
+ return CDF_STATUS_SUCCESS;
+}
+
+static inline int hdd_ipa_wlan_evt(hdd_adapter_t *adapter, uint8_t sta_id,
+ enum ipa_wlan_event type, uint8_t *mac_addr)
+{
+ return 0;
+}
+
+static inline int hdd_ipa_send_mcc_scc_msg(hdd_context_t *hdd_ctx,
+ bool mcc_mode)
+{
+ return 0;
+}
+
+static inline int hdd_ipa_set_perf_level(hdd_context_t *hdd_ctx,
+ uint64_t tx_packets,
+ uint64_t rx_packets)
+{
+ return 0;
+}
+
+static inline int hdd_ipa_suspend(hdd_context_t *hdd_ctx)
+{
+ return 0;
+}
+
+static inline int hdd_ipa_resume(hdd_context_t *hdd_ctx)
+{
+ return 0;
+}
+
+static inline void hdd_ipa_uc_stat_query(hdd_context_t *hdd_ctx,
+ uint32_t *ipa_tx_diff,
+ uint32_t *ipa_rx_diff)
+{
+ *ipa_tx_diff = 0;
+ *ipa_rx_diff = 0;
+ return;
+}
+
+static inline void hdd_ipa_uc_stat_request(hdd_adapter_t *adapter,
+ uint8_t reason)
+{
+ return;
+}
+
+static void hdd_ipa_uc_rt_debug_host_dump(hdd_context_t *hdd_ctx)
+{
+ return;
+}
+
+static inline bool hdd_ipa_is_enabled(hdd_context_t *pHddCtx)
+{
+ return false;
+}
+
+static inline bool hdd_ipa_uc_is_enabled(hdd_context_t *pHddCtx)
+{
+ return false;
+}
+#endif /* IPA_OFFLOAD */
+
+#ifdef IPA_UC_OFFLOAD
+int hdd_ipa_uc_ssr_reinit(void);
+int hdd_ipa_uc_ssr_deinit(void);
+#else
+static inline int hdd_ipa_uc_ssr_reinit(void)
+{
+ return false;
+}
+
+static inline int hdd_ipa_uc_ssr_deinit(void)
+{
+ return false;
+}
+#endif
+
+#endif /* #ifndef HDD_IPA_H__ */
diff --git a/core/hdd/inc/wlan_hdd_lro.h b/core/hdd/inc/wlan_hdd_lro.h
new file mode 100644
index 0000000..db4ea27
--- /dev/null
+++ b/core/hdd/inc/wlan_hdd_lro.h
@@ -0,0 +1,145 @@
+/*
+ * Copyright (c) 2015 The Linux Foundation. All rights reserved.
+ *
+ * Previously licensed under the ISC license by Qualcomm Atheros, Inc.
+ *
+ * Permission to use, copy, modify, and/or distribute this software for
+ * any purpose with or without fee is hereby granted, provided that the
+ * above copyright notice and this permission notice appear in all
+ * copies.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
+ * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE
+ * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
+ * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
+ * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
+ * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
+ * PERFORMANCE OF THIS SOFTWARE.
+ */
+
+/*
+ * This file was originally distributed by Qualcomm Atheros, Inc.
+ * under proprietary terms before Copyright ownership was assigned
+ * to the Linux Foundation.
+ */
+
+#ifndef __WLAN_HDD_LRO_H__
+#define __WLAN_HDD_LRO_H__
+/**
+ * DOC: wlan_hdd_lro.h
+ *
+ * WLAN LRO interface module headers
+ */
+
+/**
+ * enum hdd_lro_rx_status - LRO receive frame status
+ * @HDD_LRO_RX: frame sent over the LRO interface
+ * @HDD_LRO_NO_RX: frame not sent over the LRO interface
+ */
+enum hdd_lro_rx_status {
+ HDD_LRO_RX = 0,
+ HDD_LRO_NO_RX = 1,
+};
+
+#if defined(FEATURE_LRO)
+
+#include <linux/inet_lro.h>
+#include <linux/list.h>
+
+/* LRO_DESC_TABLE_SZ must be a power of 2 */
+#define LRO_DESC_TABLE_SZ 16
+#define LRO_DESC_TABLE_SZ_MASK (LRO_DESC_TABLE_SZ - 1)
+#define LRO_DESC_POOL_SZ 10
+
+/**
+ * hdd_lro_desc_entry - defines the LRO descriptor
+ * element stored in the list
+ * @lro_node: node of the list
+ * @lro_desc: the LRO descriptor contained in this list entry
+ */
+struct hdd_lro_desc_entry {
+ struct list_head lro_node;
+ struct net_lro_desc *lro_desc;
+};
+
+/**
+ * hdd_lro_desc_pool - pool of free LRO descriptors
+ * @lro_desc_array: array of LRO descriptors allocated
+ * @lro_free_list_head: head of the list
+ * @lro_pool_lock: lock to protect access to the list
+ */
+struct hdd_lro_desc_pool {
+ struct hdd_lro_desc_entry *lro_desc_array;
+ struct list_head lro_free_list_head;
+ cdf_spinlock_t lro_pool_lock;
+};
+
+/**
+ * hdd_lro_desc_table - defines each entry of the LRO
+ * hash table
+ * @lro_desc_list: list of LRO descriptors
+ */
+struct hdd_lro_desc_table {
+ struct list_head lro_desc_list;
+};
+
+/**
+ * hdd_lro_desc_info - structure containing the LRO
+ * descriptor information
+ * @lro_hash_table: hash table used for a quick desc. look-up
+ * @lro_hash_lock: lock to protect access to the hash table
+ * @lro_desc_pool: Free pool of LRO descriptors
+ */
+struct hdd_lro_desc_info {
+ struct hdd_lro_desc_table *lro_hash_table;
+ cdf_spinlock_t lro_hash_lock;
+ struct hdd_lro_desc_pool lro_desc_pool;
+};
+
+/**
+ * hdd_lro_s - LRO information per HDD adapter
+ * @lro_mgr: LRO manager
+ * @lro_desc_info: LRO descriptor information
+ */
+struct hdd_lro_s {
+ struct net_lro_mgr *lro_mgr;
+ struct hdd_lro_desc_info lro_desc_info;
+};
+
+int hdd_lro_init(hdd_context_t *hdd_ctx);
+
+int hdd_lro_enable(hdd_context_t *hdd_ctx,
+ hdd_adapter_t *adapter);
+
+void hdd_lro_disable(hdd_context_t *hdd_ctx, hdd_adapter_t *adapter);
+
+enum hdd_lro_rx_status hdd_lro_rx(hdd_context_t *hdd_ctx,
+ hdd_adapter_t *adapter, struct sk_buff *skb);
+
+void hdd_lro_flush_all(hdd_context_t *hdd_ctx,
+ hdd_adapter_t *adapter);
+#else
+struct hdd_lro_s {};
+
+static inline int hdd_lro_enable(hdd_context_t *hdd_ctx,
+ hdd_adapter_t *adapter)
+{
+ return 0;
+}
+
+static inline enum hdd_lro_rx_status hdd_lro_rx(hdd_context_t *hdd_ctx,
+ hdd_adapter_t *adapter, struct sk_buff *skb)
+{
+ return HDD_LRO_NO_RX;
+}
+
+static inline int hdd_lro_init(hdd_context_t *hdd_ctx)
+{
+ return 0;
+}
+
+static inline void hdd_lro_disable(hdd_context_t *hdd_ctx,
+ hdd_adapter_t *adapter){}
+#endif /* FEATURE_LRO */
+#endif /* __WLAN_HDD_LRO_H__ */
diff --git a/core/hdd/inc/wlan_hdd_main.h b/core/hdd/inc/wlan_hdd_main.h
new file mode 100644
index 0000000..3e4ad44
--- /dev/null
+++ b/core/hdd/inc/wlan_hdd_main.h
@@ -0,0 +1,1529 @@
+/*
+ * Copyright (c) 2012-2015 The Linux Foundation. All rights reserved.
+ *
+ * Previously licensed under the ISC license by Qualcomm Atheros, Inc.
+ *
+ *
+ * Permission to use, copy, modify, and/or distribute this software for
+ * any purpose with or without fee is hereby granted, provided that the
+ * above copyright notice and this permission notice appear in all
+ * copies.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
+ * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE
+ * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
+ * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
+ * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
+ * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
+ * PERFORMANCE OF THIS SOFTWARE.
+ */
+
+/*
+ * This file was originally distributed by Qualcomm Atheros, Inc.
+ * under proprietary terms before Copyright ownership was assigned
+ * to the Linux Foundation.
+ */
+
+#if !defined(WLAN_HDD_MAIN_H)
+#define WLAN_HDD_MAIN_H
+/**===========================================================================
+
+ \file WLAN_HDD_MAIN_H.h
+
+ \brief Linux HDD Adapter Type
+
+ ==========================================================================*/
+
+/*---------------------------------------------------------------------------
+ Include files
+ -------------------------------------------------------------------------*/
+
+#include <linux/netdevice.h>
+#include <linux/skbuff.h>
+#include <net/cfg80211.h>
+#include <cdf_list.h>
+#include <cdf_types.h>
+#include "sir_mac_prot_def.h"
+#include "csr_api.h"
+#include <wlan_hdd_assoc.h>
+#include <wlan_hdd_wmm.h>
+#include <wlan_hdd_cfg.h>
+#include <linux/spinlock.h>
+#if defined(WLAN_OPEN_SOURCE) && defined(CONFIG_HAS_WAKELOCK)
+#include <linux/wakelock.h>
+#endif
+#include <wlan_hdd_ftm.h>
+#ifdef FEATURE_WLAN_TDLS
+#include "wlan_hdd_tdls.h"
+#endif
+#include "wlan_hdd_cfg80211.h"
+#include <cdf_defer.h>
+#ifdef WLAN_FEATURE_MBSSID
+#include "sap_api.h"
+#endif
+#include "ol_txrx_osif_api.h"
+#include "ol_txrx_ctrl_api.h"
+#include <wlan_hdd_lro.h>
+
+/*---------------------------------------------------------------------------
+ Preprocessor definitions and constants
+ -------------------------------------------------------------------------*/
+/** Number of Tx Queues */
+#ifdef QCA_LL_TX_FLOW_CONTROL_V2
+#define NUM_TX_QUEUES 5
+#else
+#define NUM_TX_QUEUES 4
+#endif
+/** Bytes to reserve in the headroom */
+#define LIBRA_HW_NEEDED_HEADROOM 128
+/** Hdd Tx Time out value */
+#ifdef LIBRA_LINUX_PC
+#define HDD_TX_TIMEOUT (8000)
+#else
+#define HDD_TX_TIMEOUT msecs_to_jiffies(5000)
+#endif
+/** Hdd Default MTU */
+#define HDD_DEFAULT_MTU (1500)
+
+#ifdef QCA_CONFIG_SMP
+#define NUM_CPUS NR_CPUS
+#else
+#define NUM_CPUS 1
+#endif
+
+/**event flags registered net device*/
+#define NET_DEVICE_REGISTERED (0)
+#define SME_SESSION_OPENED (1)
+#define INIT_TX_RX_SUCCESS (2)
+#define WMM_INIT_DONE (3)
+#define SOFTAP_BSS_STARTED (4)
+#define DEVICE_IFACE_OPENED (5)
+#define TDLS_INIT_DONE (6)
+#define ACS_PENDING (7)
+
+/* HDD global event flags */
+#define ACS_IN_PROGRESS (0)
+
+/** Maximum time(ms)to wait for disconnect to complete **/
+#ifdef QCA_WIFI_3_0_EMU
+#define WLAN_WAIT_TIME_DISCONNECT 3000
+#else
+#define WLAN_WAIT_TIME_DISCONNECT 2000
+#endif
+#define WLAN_WAIT_TIME_STATS 800
+#define WLAN_WAIT_TIME_POWER 800
+#define WLAN_WAIT_TIME_COUNTRY 1000
+#define WLAN_WAIT_TIME_LINK_STATUS 800
+/* Amount of time to wait for sme close session callback.
+ This value should be larger than the timeout used by WDI to wait for
+ a response from WCNSS */
+#define WLAN_WAIT_TIME_SESSIONOPENCLOSE 15000
+#define WLAN_WAIT_TIME_ABORTSCAN 2000
+
+/** Maximum time(ms) to wait for mc thread suspend **/
+#define WLAN_WAIT_TIME_MCTHREAD_SUSPEND 1200
+
+/** Maximum time(ms) to wait for target to be ready for suspend **/
+#define WLAN_WAIT_TIME_READY_TO_SUSPEND 2000
+
+/** Maximum time(ms) to wait for tdls add sta to complete **/
+#define WAIT_TIME_TDLS_ADD_STA 1500
+
+/** Maximum time(ms) to wait for tdls del sta to complete **/
+#define WAIT_TIME_TDLS_DEL_STA 1500
+
+/** Maximum time(ms) to wait for Link Establish Req to complete **/
+#define WAIT_TIME_TDLS_LINK_ESTABLISH_REQ 1500
+
+/** Maximum time(ms) to wait for tdls mgmt to complete **/
+#define WAIT_TIME_TDLS_MGMT 11000
+
+/* Scan Req Timeout */
+#define WLAN_WAIT_TIME_SCAN_REQ 100
+
+#define MAX_NUMBER_OF_ADAPTERS 4
+
+#define MAX_CFG_STRING_LEN 255
+
+#define MAC_ADDR_ARRAY(a) (a)[0], (a)[1], (a)[2], (a)[3], (a)[4], (a)[5]
+/** Mac Address string **/
+#define MAC_ADDRESS_STR "%02x:%02x:%02x:%02x:%02x:%02x"
+#define MAC_ADDRESS_STR_LEN 18 /* Including null terminator */
+#define MAX_GENIE_LEN 255
+
+#define WLAN_CHIP_VERSION "WCNSS"
+
+#define hddLog(level, args ...) CDF_TRACE(CDF_MODULE_ID_HDD, level, ## args)
+
+#define hdd_log(level, args...) CDF_TRACE(CDF_MODULE_ID_HDD, level, ## args)
+#define hdd_logfl(level, format, args...) hdd_log(level, FL(format), ## args)
+
+#define hdd_alert(format, args...) \
+ hdd_logfl(CDF_TRACE_LEVEL_FATAL, format, ## args)
+#define hdd_err(format, args...) \
+ hdd_logfl(CDF_TRACE_LEVEL_ERROR, format, ## args)
+#define hdd_warn(format, args...) \
+ hdd_logfl(CDF_TRACE_LEVEL_WARN, format, ## args)
+#define hdd_notice(format, args...) \
+ hdd_logfl(CDF_TRACE_LEVEL_INFO, format, ## args)
+#define hdd_info(format, args...) \
+ hdd_logfl(CDF_TRACE_LEVEL_INFO_HIGH, format, ## args)
+#define hdd_debug(format, args...) \
+ hdd_logfl(CDF_TRACE_LEVEL_DEBUG, format, ## args)
+
+#define ENTER() hdd_logfl(CDF_TRACE_LEVEL_INFO_LOW, "enter")
+#define EXIT() hdd_logfl(CDF_TRACE_LEVEL_INFO_LOW, "exit")
+
+#define WLAN_HDD_GET_PRIV_PTR(__dev__) (hdd_adapter_t *)(netdev_priv((__dev__)))
+
+#define MAX_NO_OF_2_4_CHANNELS 14
+
+#define WLAN_HDD_PUBLIC_ACTION_FRAME 4
+#define WLAN_HDD_PUBLIC_ACTION_FRAME_OFFSET 24
+#define WLAN_HDD_PUBLIC_ACTION_FRAME_BODY_OFFSET 24
+#define WLAN_HDD_PUBLIC_ACTION_FRAME_TYPE_OFFSET 30
+#define WLAN_HDD_PUBLIC_ACTION_FRAME_CATEGORY_OFFSET 0
+#define WLAN_HDD_PUBLIC_ACTION_FRAME_ACTION_OFFSET 1
+#define WLAN_HDD_PUBLIC_ACTION_FRAME_OUI_OFFSET 2
+#define WLAN_HDD_PUBLIC_ACTION_FRAME_OUI_TYPE_OFFSET 5
+#define WLAN_HDD_VENDOR_SPECIFIC_ACTION 0x09
+#define WLAN_HDD_WFA_OUI 0x506F9A
+#define WLAN_HDD_WFA_P2P_OUI_TYPE 0x09
+#define WLAN_HDD_P2P_SOCIAL_CHANNELS 3
+#define WLAN_HDD_P2P_SINGLE_CHANNEL_SCAN 1
+#define WLAN_HDD_PUBLIC_ACTION_FRAME_SUB_TYPE_OFFSET 6
+
+#define WLAN_HDD_IS_SOCIAL_CHANNEL(center_freq) \
+ (((center_freq) == 2412) || ((center_freq) == 2437) || ((center_freq) == 2462))
+
+#define WLAN_HDD_CHANNEL_IN_UNII_1_BAND(center_freq) \
+ (((center_freq) == 5180) || ((center_freq) == 5200) \
+ || ((center_freq) == 5220) || ((center_freq) == 5240))
+
+#ifdef WLAN_FEATURE_11W
+#define WLAN_HDD_SA_QUERY_ACTION_FRAME 8
+#endif
+
+#define WLAN_HDD_PUBLIC_ACTION_TDLS_DISC_RESP 14
+#define WLAN_HDD_TDLS_ACTION_FRAME 12
+#ifdef WLAN_FEATURE_HOLD_RX_WAKELOCK
+#define HDD_WAKE_LOCK_DURATION 50 /* in msecs */
+#endif
+
+#define WLAN_HDD_QOS_ACTION_FRAME 1
+#define WLAN_HDD_QOS_MAP_CONFIGURE 4
+#define HDD_SAP_WAKE_LOCK_DURATION 10000 /* in msecs */
+
+#define HDD_MOD_EXIT_SSR_MAX_RETRIES 75
+
+#ifdef WLAN_FEATURE_GTK_OFFLOAD
+#define GTK_OFFLOAD_ENABLE 0
+#define GTK_OFFLOAD_DISABLE 1
+#endif
+
+#ifdef FEATURE_WLAN_SCAN_PNO
+#define HDD_PNO_SCAN_TIMERS_SET_ONE 1
+/* value should not be greater than PNO_MAX_SCAN_TIMERS */
+#define HDD_PNO_SCAN_TIMERS_SET_MULTIPLE 6
+#endif
+
+#define MAX_USER_COMMAND_SIZE 4096
+
+#define HDD_MIN_TX_POWER (-100) /* minimum tx power */
+#define HDD_MAX_TX_POWER (+100) /* maximum tx power */
+
+/* If IPA UC data path is enabled, target should reserve extra tx descriptors
+ * for IPA data path.
+ * Then host data path should allow less TX packet pumping in case
+ * IPA data path enabled
+ */
+#define WLAN_TFC_IPAUC_TX_DESC_RESERVE 100
+
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 14, 0))
+#ifdef CONFIG_CNSS
+#define cfg80211_vendor_cmd_reply(skb) cnss_vendor_cmd_reply(skb)
+#endif
+#endif
+
+#define BSS_WAIT_TIMEOUT 10000
+
+/*
+ * Generic asynchronous request/response support
+ *
+ * Many of the APIs supported by HDD require a call to SME to
+ * perform an action or to retrieve some data. In most cases SME
+ * performs the operation asynchronously, and will execute a provided
+ * callback function when the request has completed. In order to
+ * synchronize this the HDD API allocates a context which is then
+ * passed to SME, and which is then, in turn, passed back to the
+ * callback function when the operation completes. The callback
+ * function then sets a completion variable inside the context which
+ * the HDD API is waiting on. In an ideal world the HDD API would
+ * wait forever (or at least for a long time) for the response to be
+ * received and for the completion variable to be set. However in
+ * most cases these HDD APIs are being invoked in the context of a
+ * user space thread which has invoked either a cfg80211 API or a
+ * wireless extensions ioctl and which has taken the kernel rtnl_lock.
+ * Since this lock is used to synchronize many of the kernel tasks, we
+ * do not want to hold it for a long time. In addition we do not want
+ * to block user space threads (such as the wpa supplicant's main
+ * thread) for an extended time. Therefore we only block for a short
+ * time waiting for the response before we timeout. This means that
+ * it is possible for the HDD API to timeout, and for the callback to
+ * be invoked afterwards. In order for the callback function to
+ * determine if the HDD API is still waiting, a magic value is also
+ * stored in the shared context. Only if the context has a valid
+ * magic will the callback routine do any work. In order to further
+ * synchronize these activities a spinlock is used so that if any HDD
+ * API timeout coincides with its callback, the operations of the two
+ * threads will be serialized.
+ */
+
+struct statsContext {
+ struct completion completion;
+ hdd_adapter_t *pAdapter;
+ unsigned int magic;
+};
+
+struct linkspeedContext {
+ struct completion completion;
+ hdd_adapter_t *pAdapter;
+ unsigned int magic;
+};
+
+extern spinlock_t hdd_context_lock;
+
+#define STATS_CONTEXT_MAGIC 0x53544154 /* STAT */
+#define RSSI_CONTEXT_MAGIC 0x52535349 /* RSSI */
+#define POWER_CONTEXT_MAGIC 0x504F5752 /* POWR */
+#define SNR_CONTEXT_MAGIC 0x534E5200 /* SNR */
+#define LINK_CONTEXT_MAGIC 0x4C494E4B /* LINKSPEED */
+#define LINK_STATUS_MAGIC 0x4C4B5354 /* LINKSTATUS(LNST) */
+#define TEMP_CONTEXT_MAGIC 0x74656d70 /* TEMP (temperature) */
+
+/* MAX OS Q block time value in msec
+ * Prevent from permanent stall, resume OS Q if timer expired */
+#define WLAN_HDD_TX_FLOW_CONTROL_OS_Q_BLOCK_TIME 1000
+#define WLAN_SAP_HDD_TX_FLOW_CONTROL_OS_Q_BLOCK_TIME 100
+#define WLAN_HDD_TX_FLOW_CONTROL_MAX_24BAND_CH 14
+
+#define HDD_VHT_RX_HIGHEST_SUPPORTED_DATA_RATE_1_1 390
+#define HDD_VHT_TX_HIGHEST_SUPPORTED_DATA_RATE_1_1 390
+#define HDD_VHT_RX_HIGHEST_SUPPORTED_DATA_RATE_2_2 780
+#define HDD_VHT_TX_HIGHEST_SUPPORTED_DATA_RATE_2_2 780
+
+
+#define NUM_TX_RX_HISTOGRAM 1024
+#define NUM_TX_RX_HISTOGRAM_MASK (NUM_TX_RX_HISTOGRAM - 1)
+
+struct hdd_tx_rx_histogram {
+ uint64_t interval_rx;
+ uint64_t interval_tx;
+ uint64_t total_rx;
+ uint64_t total_tx;
+ uint32_t next_vote_level;
+ uint32_t next_rx_level;
+};
+
+typedef struct hdd_tx_rx_stats_s {
+ /* start_xmit stats */
+ __u32 txXmitCalled;
+ __u32 txXmitDropped;
+ __u32 txXmitClassifiedAC[NUM_TX_QUEUES];
+ __u32 txXmitDroppedAC[NUM_TX_QUEUES];
+ /* complete_cbk_stats */
+ __u32 txCompleted;
+ /* rx stats */
+ __u32 rxPackets[NUM_CPUS];
+ __u32 rxDropped[NUM_CPUS];
+ __u32 rxDelivered[NUM_CPUS];
+ __u32 rxRefused[NUM_CPUS];
+
+ /* txflow stats */
+ bool is_txflow_paused;
+ __u32 txflow_pause_cnt;
+ __u32 txflow_unpause_cnt;
+ __u32 txflow_timer_cnt;
+} hdd_tx_rx_stats_t;
+
+#ifdef WLAN_FEATURE_11W
+typedef struct hdd_pmf_stats_s {
+ uint8_t numUnprotDeauthRx;
+ uint8_t numUnprotDisassocRx;
+} hdd_pmf_stats_t;
+#endif
+
+typedef struct hdd_stats_s {
+ tCsrSummaryStatsInfo summary_stat;
+ tCsrGlobalClassAStatsInfo ClassA_stat;
+ tCsrGlobalClassBStatsInfo ClassB_stat;
+ tCsrGlobalClassCStatsInfo ClassC_stat;
+ tCsrGlobalClassDStatsInfo ClassD_stat;
+ tCsrPerStaStatsInfo perStaStats;
+ hdd_tx_rx_stats_t hddTxRxStats;
+#ifdef WLAN_FEATURE_11W
+ hdd_pmf_stats_t hddPmfStats;
+#endif
+} hdd_stats_t;
+
+typedef enum {
+ HDD_ROAM_STATE_NONE,
+
+ /* Issuing a disconnect due to transition into low power states. */
+ HDD_ROAM_STATE_DISCONNECTING_POWER,
+
+ /* move to this state when HDD sets a key with SME/CSR. Note this is */
+ /* an important state to get right because we will get calls into our SME */
+ /* callback routine for SetKey activity that we did not initiate! */
+ HDD_ROAM_STATE_SETTING_KEY,
+} HDD_ROAM_STATE;
+
+typedef struct roaming_info_s {
+ HDD_ROAM_STATE roamingState;
+ cdf_event_t roamingEvent;
+
+ tSirMacAddr bssid;
+ tSirMacAddr peerMac;
+ uint32_t roamId;
+ eRoamCmdStatus roamStatus;
+ bool deferKeyComplete;
+
+} roaming_info_t;
+
+#ifdef FEATURE_WLAN_WAPI
+/* Define WAPI macros for Length, BKID count etc*/
+#define MAX_WPI_KEY_LENGTH 16
+#define MAX_NUM_PN 16
+#define MAC_ADDR_LEN 6
+#define MAX_ADDR_INDEX 12
+#define MAX_NUM_AKM_SUITES 16
+#define MAX_NUM_UNI_SUITES 16
+#define MAX_NUM_BKIDS 16
+
+/** WAPI AUTH mode definition */
+enum _WAPIAuthMode {
+ WAPI_AUTH_MODE_OPEN = 0,
+ WAPI_AUTH_MODE_PSK = 1,
+ WAPI_AUTH_MODE_CERT
+} __packed;
+typedef enum _WAPIAuthMode WAPIAuthMode;
+
+/** WAPI Work mode structure definition */
+#define WZC_ORIGINAL 0
+#define WAPI_EXTENTION 1
+
+struct _WAPI_FUNCTION_MODE {
+ unsigned char wapiMode;
+} __packed;
+
+typedef struct _WAPI_FUNCTION_MODE WAPI_FUNCTION_MODE;
+
+typedef struct _WAPI_BKID {
+ uint8_t bkid[16];
+} WAPI_BKID, *pWAPI_BKID;
+
+/** WAPI Association information structure definition */
+struct _WAPI_AssocInfo {
+ uint8_t elementID;
+ uint8_t length;
+ uint16_t version;
+ uint16_t akmSuiteCount;
+ uint32_t akmSuite[MAX_NUM_AKM_SUITES];
+ uint16_t unicastSuiteCount;
+ uint32_t unicastSuite[MAX_NUM_UNI_SUITES];
+ uint32_t multicastSuite;
+ uint16_t wapiCability;
+ uint16_t bkidCount;
+ WAPI_BKID bkidList[MAX_NUM_BKIDS];
+} __packed;
+
+typedef struct _WAPI_AssocInfo WAPI_AssocInfo;
+typedef struct _WAPI_AssocInfo *pWAPI_IEAssocInfo;
+
+/** WAPI KEY Type definition */
+enum _WAPIKeyType {
+ PAIRWISE_KEY, /* 0 */
+ GROUP_KEY /* 1 */
+} __packed;
+typedef enum _WAPIKeyType WAPIKeyType;
+
+/** WAPI KEY Direction definition */
+enum _KEY_DIRECTION {
+ None,
+ Rx,
+ Tx,
+ Rx_Tx
+} __packed;
+
+typedef enum _KEY_DIRECTION WAPI_KEY_DIRECTION;
+
+/* WAPI KEY structure definition */
+struct WLAN_WAPI_KEY {
+ WAPIKeyType keyType;
+ WAPI_KEY_DIRECTION keyDirection; /*reserved for future use */
+ uint8_t keyId;
+ uint8_t addrIndex[MAX_ADDR_INDEX]; /*reserved for future use */
+ int wpiekLen;
+ uint8_t wpiek[MAX_WPI_KEY_LENGTH];
+ int wpickLen;
+ uint8_t wpick[MAX_WPI_KEY_LENGTH];
+ uint8_t pn[MAX_NUM_PN]; /*reserved for future use */
+} __packed;
+
+typedef struct WLAN_WAPI_KEY WLAN_WAPI_KEY;
+typedef struct WLAN_WAPI_KEY *pWLAN_WAPI_KEY;
+
+#define WPA_GET_LE16(a) ((u16) (((a)[1] << 8) | (a)[0]))
+#define WPA_GET_BE24(a) ((u32) ((a[0] << 16) | (a[1] << 8) | a[2]))
+#define WLAN_EID_WAPI 68
+#define WAPI_PSK_AKM_SUITE 0x02721400
+#define WAPI_CERT_AKM_SUITE 0x01721400
+
+/* WAPI BKID List structure definition */
+struct _WLAN_BKID_LIST {
+ uint32_t length;
+ uint32_t BKIDCount;
+ WAPI_BKID BKID[1];
+} __packed;
+
+typedef struct _WLAN_BKID_LIST WLAN_BKID_LIST;
+typedef struct _WLAN_BKID_LIST *pWLAN_BKID_LIST;
+
+/* WAPI Information structure definition */
+struct hdd_wapi_info_s {
+ uint32_t nWapiMode;
+ bool fIsWapiSta;
+ struct cdf_mac_addr cachedMacAddr;
+ uint8_t wapiAuthMode;
+} __packed;
+typedef struct hdd_wapi_info_s hdd_wapi_info_t;
+#endif /* FEATURE_WLAN_WAPI */
+
+typedef struct beacon_data_s {
+ u8 *head;
+ u8 *tail;
+ u8 *proberesp_ies;
+ u8 *assocresp_ies;
+ int head_len;
+ int tail_len;
+ int proberesp_ies_len;
+ int assocresp_ies_len;
+ int dtim_period;
+} beacon_data_t;
+
+/* MAINTAIN 1 - 1 CORRESPONDENCE WITH tCDF_CON_MODE */
+typedef enum device_mode {
+ WLAN_HDD_INFRA_STATION,
+ WLAN_HDD_SOFTAP,
+ WLAN_HDD_P2P_CLIENT,
+ WLAN_HDD_P2P_GO,
+ /* Mode 5 is reserved for FTM */
+ WLAN_HDD_FTM = 5,
+ WLAN_HDD_IBSS,
+ WLAN_HDD_P2P_DEVICE,
+ WLAN_HDD_OCB
+} device_mode_t;
+
+typedef enum rem_on_channel_request_type {
+ REMAIN_ON_CHANNEL_REQUEST,
+ OFF_CHANNEL_ACTION_TX,
+} rem_on_channel_request_type_t;
+
+typedef struct action_pkt_buffer {
+ uint8_t *frame_ptr;
+ uint32_t frame_length;
+ uint16_t freq;
+} action_pkt_buffer_t;
+
+typedef struct hdd_remain_on_chan_ctx {
+ struct net_device *dev;
+ struct ieee80211_channel chan;
+ enum nl80211_channel_type chan_type;
+ unsigned int duration;
+ u64 cookie;
+ rem_on_channel_request_type_t rem_on_chan_request;
+ cdf_mc_timer_t hdd_remain_on_chan_timer;
+ action_pkt_buffer_t action_pkt_buff;
+ bool hdd_remain_on_chan_cancel_in_progress;
+ uint32_t scan_id;
+} hdd_remain_on_chan_ctx_t;
+
+/* RoC Request entry */
+typedef struct hdd_roc_req {
+ cdf_list_node_t node; /* MUST be first element */
+ hdd_adapter_t *pAdapter;
+ hdd_remain_on_chan_ctx_t *pRemainChanCtx;
+} hdd_roc_req_t;
+
+/**
+ * struct hdd_scan_req - Scan Request entry
+ * @node : List entry element
+ * @adapter: Adapter address
+ * @scan_request: scan request holder
+ * @scan_id: scan identifier used across host layers which is generated at WMI
+ * @cookie: scan request identifier sent to userspace
+ * @source: scan request originator (NL/Vendor scan)
+ * @timestamp: scan request timestamp
+ *
+ * Scan request linked list element
+ */
+struct hdd_scan_req {
+ cdf_list_node_t node;
+ hdd_adapter_t *adapter;
+ struct cfg80211_scan_request *scan_request;
+ uint32_t scan_id;
+ uint8_t source;
+ uint32_t timestamp;
+};
+
+typedef enum {
+ HDD_IDLE,
+ HDD_PD_REQ_ACK_PENDING,
+ HDD_GO_NEG_REQ_ACK_PENDING,
+ HDD_INVALID_STATE,
+} eP2PActionFrameState;
+
+typedef enum {
+ WLAN_HDD_GO_NEG_REQ,
+ WLAN_HDD_GO_NEG_RESP,
+ WLAN_HDD_GO_NEG_CNF,
+ WLAN_HDD_INVITATION_REQ,
+ WLAN_HDD_INVITATION_RESP,
+ WLAN_HDD_DEV_DIS_REQ,
+ WLAN_HDD_DEV_DIS_RESP,
+ WLAN_HDD_PROV_DIS_REQ,
+ WLAN_HDD_PROV_DIS_RESP,
+} tActionFrmType;
+
+typedef struct hdd_cfg80211_state_s {
+ uint16_t current_freq;
+ u64 action_cookie;
+ uint8_t *buf;
+ size_t len;
+ hdd_remain_on_chan_ctx_t *remain_on_chan_ctx;
+ struct mutex remain_on_chan_ctx_lock;
+ eP2PActionFrameState actionFrmState;
+} hdd_cfg80211_state_t;
+
+typedef enum {
+ HDD_SSR_NOT_REQUIRED,
+ HDD_SSR_REQUIRED,
+ HDD_SSR_DISABLED,
+} e_hdd_ssr_required;
+
+struct hdd_station_ctx {
+ /** Handle to the Wireless Extension State */
+ hdd_wext_state_t WextState;
+
+#ifdef FEATURE_WLAN_TDLS
+ tdlsCtx_t *pHddTdlsCtx;
+#endif
+
+ /**Connection information*/
+ connection_info_t conn_info;
+
+ roaming_info_t roam_info;
+
+#if defined (WLAN_FEATURE_VOWIFI_11R) || defined (FEATURE_WLAN_ESE) || defined(FEATURE_WLAN_LFR)
+ int ft_carrier_on;
+#endif
+
+#ifdef WLAN_FEATURE_GTK_OFFLOAD
+ tSirGtkOffloadParams gtkOffloadReqParams;
+#endif
+ /*Increment whenever ibss New peer joins and departs the network */
+ int ibss_sta_generation;
+
+ /* Indication of wep/wpa-none keys installation */
+ bool ibss_enc_key_installed;
+
+ /*Save the wep/wpa-none keys */
+ tCsrRoamSetKey ibss_enc_key;
+
+ bool hdd_ReassocScenario;
+
+ /* STA ctx debug variables */
+ int staDebugState;
+};
+
+#define BSS_STOP 0
+#define BSS_START 1
+typedef struct hdd_hostapd_state_s {
+ int bssState;
+ cdf_event_t cdf_event;
+ cdf_event_t cdf_stop_bss_event;
+ CDF_STATUS cdf_status;
+ bool bCommit;
+
+} hdd_hostapd_state_t;
+
+/*
+ * Per station structure kept in HDD for multiple station support for SoftAP
+ */
+typedef struct {
+ /** The station entry is used or not */
+ bool isUsed;
+
+ /** Station ID reported back from HAL (through SAP). Broadcast
+ * uses station ID zero by default in both libra and volans. */
+ uint8_t ucSTAId;
+
+ /** MAC address of the station */
+ struct cdf_mac_addr macAddrSTA;
+
+ /** Current Station state so HDD knows how to deal with packet
+ * queue. Most recent states used to change TLSHIM STA state */
+ enum ol_txrx_peer_state tlSTAState;
+
+ /** Track QoS status of station */
+ bool isQosEnabled;
+
+ /** The station entry for which Deauth is in progress */
+ bool isDeauthInProgress;
+} hdd_station_info_t;
+
+struct hdd_ap_ctx_s {
+ hdd_hostapd_state_t HostapdState;
+
+ /* Memory differentiation mode is enabled */
+ /* uint16_t uMemoryDiffThreshold; */
+ /* uint8_t uNumActiveAC; */
+ /* uint8_t uActiveACMask; */
+
+ /** Packet Count to update uNumActiveAC and uActiveACMask */
+ /* uint16_t uUpdatePktCount; */
+
+ /** Station ID assigned after BSS starts */
+ uint8_t uBCStaId;
+
+ uint8_t uPrivacy; /* The privacy bits of configuration */
+
+ tSirWPSPBCProbeReq WPSPBCProbeReq;
+
+ tsap_Config_t sapConfig;
+
+ struct semaphore semWpsPBCOverlapInd;
+
+ bool apDisableIntraBssFwd;
+
+ cdf_mc_timer_t hdd_ap_inactivity_timer;
+
+ uint8_t operatingChannel;
+
+ bool uIsAuthenticated;
+
+ eCsrEncryptionType ucEncryptType;
+
+ /* This will point to group key data, if it is received before start bss. */
+ tCsrRoamSetKey groupKey;
+ /* This will have WEP key data, if it is received before start bss */
+ tCsrRoamSetKey wepKey[CSR_MAX_NUM_KEY];
+
+ beacon_data_t *beacon;
+
+ bool bApActive;
+#ifdef WLAN_FEATURE_MBSSID
+ /* SAP Context */
+ void *sapContext;
+#endif
+ bool dfs_cac_block_tx;
+};
+
+typedef struct hdd_scaninfo_s {
+ /* The scan pending */
+ uint32_t mScanPending;
+
+ /* Counter for mScanPending so that the scan pending
+ error log is not printed for more than 5 times */
+ uint32_t mScanPendingCounter;
+
+ /* Additional IE for scan */
+ tSirAddie scanAddIE;
+
+ /* Scan mode */
+ tSirScanType scan_mode;
+
+ /* completion variable for abortscan */
+ struct completion abortscan_event_var;
+
+} hdd_scaninfo_t;
+
+#define WLAN_HDD_MAX_MC_ADDR_LIST 10
+
+#ifdef WLAN_FEATURE_PACKET_FILTERING
+typedef struct multicast_addr_list {
+ uint8_t isFilterApplied;
+ uint8_t mc_cnt;
+ uint8_t addr[WLAN_HDD_MAX_MC_ADDR_LIST][ETH_ALEN];
+} t_multicast_add_list;
+#endif
+
+#define WLAN_HDD_MAX_HISTORY_ENTRY 10
+
+/**
+ * struct hdd_netif_queue_stats - netif queue operation statistics
+ * @pause_count - pause counter
+ * @unpause_count - unpause counter
+ */
+struct hdd_netif_queue_stats {
+ uint16_t pause_count;
+ uint16_t unpause_count;
+};
+
+/**
+ * struct hdd_netif_queue_history - netif queue operation history
+ * @time: timestamp
+ * @netif_action: action type
+ * @netif_reason: reason type
+ * @pause_map: pause map
+ */
+struct hdd_netif_queue_history {
+ cdf_time_t time;
+ uint16_t netif_action;
+ uint16_t netif_reason;
+ uint32_t pause_map;
+};
+
+
+#define WLAN_HDD_ADAPTER_MAGIC 0x574c414e /* ASCII "WLAN" */
+
+
+struct hdd_adapter_s {
+ void *pHddCtx;
+
+ device_mode_t device_mode;
+
+ /** Handle to the network device */
+ struct net_device *dev;
+
+ /** IPv4 notifier callback for handling ARP offload on change in IP */
+ struct work_struct ipv4NotifierWorkQueue;
+#ifdef WLAN_NS_OFFLOAD
+ /** IPv6 notifier callback for handling NS offload on change in IP */
+ struct work_struct ipv6NotifierWorkQueue;
+#endif
+
+ /* TODO Move this to sta Ctx */
+ struct wireless_dev wdev;
+ struct cfg80211_scan_request *request;
+
+ /** ops checks if Opportunistic Power Save is Enable or Not
+ * ctw stores ctWindow value once we receive Opps command from
+ * wpa_supplicant then using ctWindow value we need to Enable
+ * Opportunistic Power Save
+ */
+ uint8_t ops;
+ uint32_t ctw;
+
+ /** Current MAC Address for the adapter */
+ struct cdf_mac_addr macAddressCurrent;
+
+ /**Event Flags*/
+ unsigned long event_flags;
+
+ /**Device TX/RX statistics*/
+ struct net_device_stats stats;
+ /** HDD statistics*/
+ hdd_stats_t hdd_stats;
+ /** linkspeed statistics */
+ tSirLinkSpeedInfo ls_stats;
+ /**Mib information*/
+ sHddMib_t hdd_mib;
+
+ uint8_t sessionId;
+
+ /* Completion variable for session close */
+ struct completion session_close_comp_var;
+
+ /* Completion variable for session open */
+ struct completion session_open_comp_var;
+
+ /* TODO: move these to sta ctx. These may not be used in AP */
+ /** completion variable for disconnect callback */
+ struct completion disconnect_comp_var;
+
+ /** Completion of change country code */
+ struct completion change_country_code;
+
+ /* completion variable for Linkup Event */
+ struct completion linkup_event_var;
+
+ /* completion variable for cancel remain on channel Event */
+ struct completion cancel_rem_on_chan_var;
+
+ /* completion variable for off channel remain on channel Event */
+ struct completion offchannel_tx_event;
+ /* Completion variable for action frame */
+ struct completion tx_action_cnf_event;
+ /* Completion variable for remain on channel ready */
+ struct completion rem_on_chan_ready_event;
+
+ struct completion sta_authorized_event;
+#ifdef FEATURE_WLAN_TDLS
+ struct completion tdls_add_station_comp;
+ struct completion tdls_del_station_comp;
+ struct completion tdls_mgmt_comp;
+ struct completion tdls_link_establish_req_comp;
+ CDF_STATUS tdlsAddStaStatus;
+#endif
+
+ /* Track whether the linkup handling is needed */
+ bool isLinkUpSvcNeeded;
+
+ /* Mgmt Frames TX completion status code */
+ uint32_t mgmtTxCompletionStatus;
+
+ /* WMM Status */
+ hdd_wmm_status_t hddWmmStatus;
+/*************************************************************
+ */
+/*************************************************************
+ * TODO - Remove it later
+ */
+ /** Multiple station supports */
+ /** Per-station structure */
+ spinlock_t staInfo_lock; /* To protect access to station Info */
+ hdd_station_info_t aStaInfo[WLAN_MAX_STA_COUNT];
+ /* uint8_t uNumActiveStation; */
+
+/*************************************************************
+ */
+
+#ifdef FEATURE_WLAN_WAPI
+ hdd_wapi_info_t wapi_info;
+#endif
+
+ int8_t rssi;
+#ifdef WLAN_FEATURE_LPSS
+ bool rssi_send;
+#endif
+
+ uint8_t snr;
+
+ struct work_struct monTxWorkQueue;
+ struct sk_buff *skb_to_tx;
+
+ union {
+ hdd_station_ctx_t station;
+ hdd_ap_ctx_t ap;
+ } sessionCtx;
+
+ hdd_cfg80211_state_t cfg80211State;
+
+#ifdef WLAN_FEATURE_PACKET_FILTERING
+ t_multicast_add_list mc_addr_list;
+#endif
+ uint8_t addr_filter_pattern;
+
+ /* Magic cookie for adapter sanity verification */
+ uint32_t magic;
+ bool higherDtimTransition;
+ bool survey_idx;
+
+ hdd_scaninfo_t scan_info;
+#if defined(FEATURE_WLAN_ESE) && defined(FEATURE_WLAN_ESE_UPLOAD)
+ tAniTrafStrmMetrics tsmStats;
+#endif
+ /* Flag to ensure PSB is configured through framework */
+ uint8_t psbChanged;
+ /* UAPSD psb value configured through framework */
+ uint8_t configuredPsb;
+#ifdef IPA_OFFLOAD
+ void *ipa_context;
+#endif
+ /* Use delayed work for Sec AP ACS as Pri AP Startup need to complete
+ * since CSR (PMAC Struct) Config is same for both AP
+ */
+ struct delayed_work acs_pending_work;
+
+ struct work_struct scan_block_work;
+#ifdef MSM_PLATFORM
+ unsigned long prev_rx_packets;
+ unsigned long prev_tx_packets;
+ int connection;
+#endif
+ bool is_roc_inprogress;
+
+#ifdef QCA_LL_LEGACY_TX_FLOW_CONTROL
+ cdf_mc_timer_t tx_flow_control_timer;
+ bool tx_flow_timer_initialized;
+ unsigned int tx_flow_low_watermark;
+ unsigned int tx_flow_high_watermark_offset;
+#endif /* QCA_LL_LEGACY_TX_FLOW_CONTROL */
+ bool offloads_configured;
+
+ /* DSCP to UP QoS Mapping */
+ sme_QosWmmUpType hddWmmDscpToUpMap[WLAN_HDD_MAX_DSCP + 1];
+
+#ifdef WLAN_FEATURE_LINK_LAYER_STATS
+ bool isLinkLayerStatsSet;
+#endif
+ uint8_t linkStatus;
+
+ /* variable for temperature in Celsius */
+ int temperature;
+
+ /* Time stamp for last completed RoC request */
+ v_TIME_t last_roc_ts;
+
+ /* Time stamp for start RoC request */
+ v_TIME_t start_roc_ts;
+
+ /* State for synchronous OCB requests to WMI */
+ struct sir_ocb_set_config_response ocb_set_config_resp;
+ struct sir_ocb_get_tsf_timer_response ocb_get_tsf_timer_resp;
+ struct sir_dcc_get_stats_response *dcc_get_stats_resp;
+ struct sir_dcc_update_ndl_response dcc_update_ndl_resp;
+
+ /* MAC addresses used for OCB interfaces */
+ tSirMacAddr ocb_mac_address[CDF_MAX_CONCURRENCY_PERSONA];
+ int ocb_mac_addr_count;
+
+ /* BITMAP indicating pause reason */
+ uint32_t pause_map;
+ spinlock_t pause_map_lock;
+
+ uint8_t history_index;
+ struct hdd_netif_queue_history
+ queue_oper_history[WLAN_HDD_MAX_HISTORY_ENTRY];
+ struct hdd_netif_queue_stats queue_oper_stats[WLAN_REASON_TYPE_MAX];
+ struct hdd_lro_s lro_info;
+};
+
+#define WLAN_HDD_GET_STATION_CTX_PTR(pAdapter) (&(pAdapter)->sessionCtx.station)
+#define WLAN_HDD_GET_AP_CTX_PTR(pAdapter) (&(pAdapter)->sessionCtx.ap)
+#define WLAN_HDD_GET_WEXT_STATE_PTR(pAdapter) (&(pAdapter)->sessionCtx.station.WextState)
+#define WLAN_HDD_GET_CTX(pAdapter) ((hdd_context_t *)pAdapter->pHddCtx)
+#define WLAN_HDD_GET_HAL_CTX(pAdapter) (((hdd_context_t *)(pAdapter->pHddCtx))->hHal)
+#define WLAN_HDD_GET_HOSTAP_STATE_PTR(pAdapter) (&(pAdapter)->sessionCtx.ap.HostapdState)
+#define WLAN_HDD_GET_CFG_STATE_PTR(pAdapter) (&(pAdapter)->cfg80211State)
+#ifdef WLAN_FEATURE_MBSSID
+#define WLAN_HDD_GET_SAP_CTX_PTR(pAdapter) (pAdapter->sessionCtx.ap.sapContext)
+#endif
+#ifdef FEATURE_WLAN_TDLS
+#define WLAN_HDD_IS_TDLS_SUPPORTED_ADAPTER(pAdapter) \
+ (((WLAN_HDD_INFRA_STATION != pAdapter->device_mode) && \
+ (WLAN_HDD_P2P_CLIENT != pAdapter->device_mode)) ? 0 : 1)
+#define WLAN_HDD_GET_TDLS_CTX_PTR(pAdapter) \
+ ((WLAN_HDD_IS_TDLS_SUPPORTED_ADAPTER(pAdapter)) ? \
+ (tdlsCtx_t *)(pAdapter)->sessionCtx.station.pHddTdlsCtx : NULL)
+#endif
+
+/* Set mac address locally administered bit */
+#define WLAN_HDD_RESET_LOCALLY_ADMINISTERED_BIT(macaddr) (macaddr[0] &= 0xFD)
+
+#define HDD_DEFAULT_MCC_P2P_QUOTA 70
+#define HDD_RESET_MCC_P2P_QUOTA 50
+
+typedef struct hdd_adapter_list_node {
+ cdf_list_node_t node; /* MUST be first element */
+ hdd_adapter_t *pAdapter;
+} hdd_adapter_list_node_t;
+
+typedef struct hdd_priv_data_s {
+ uint8_t *buf;
+ int used_len;
+ int total_len;
+} hdd_priv_data_t;
+
+#define MAX_MOD_LOGLEVEL 10
+typedef struct {
+ uint8_t enable;
+ uint8_t dl_type;
+ uint8_t dl_report;
+ uint8_t dl_loglevel;
+ uint8_t index;
+ uint32_t dl_mod_loglevel[MAX_MOD_LOGLEVEL];
+
+} fw_log_info;
+
+#ifdef WLAN_FEATURE_OFFLOAD_PACKETS
+/**
+ * struct hdd_offloaded_packets - request id to pattern id mapping
+ * @request_id: request id
+ * @pattern_id: pattern id
+ *
+ */
+struct hdd_offloaded_packets {
+ uint32_t request_id;
+ uint8_t pattern_id;
+};
+
+/**
+ * struct hdd_offloaded_packets_ctx - offloaded packets context
+ * @op_table: request id to pattern id table
+ * @op_lock: mutex lock
+ */
+struct hdd_offloaded_packets_ctx {
+ struct hdd_offloaded_packets op_table[MAXNUM_PERIODIC_TX_PTRNS];
+ struct mutex op_lock;
+};
+#endif
+
+/** Adapter structure definition */
+
+struct hdd_context_s {
+ /** Global CDS context */
+ v_CONTEXT_t pcds_context;
+
+ /** HAL handle...*/
+ tHalHandle hHal;
+
+ struct wiphy *wiphy;
+ /* TODO Remove this from here. */
+
+ cdf_spinlock_t hdd_adapter_lock;
+ cdf_list_t hddAdapters; /* List of adapters */
+
+ /* One per STA: 1 for BCMC_STA_ID, 1 for each SAP_SELF_STA_ID, 1 for WDS_STAID */
+ hdd_adapter_t *sta_to_adapter[WLAN_MAX_STA_COUNT + CDF_MAX_NO_OF_SAP_MODE + 2]; /* One per sta. For quick reference. */
+
+ /** Pointer for firmware image data */
+ const struct firmware *fw;
+
+ /** Pointer for configuration data */
+ const struct firmware *cfg;
+
+ /** Pointer to the parent device */
+ struct device *parent_dev;
+
+ /** Config values read from qcom_cfg.ini file */
+ struct hdd_config *config;
+
+ struct wlan_hdd_ftm_status ftm;
+
+ /* Completion variable to indicate Mc Thread Suspended */
+ struct completion mc_sus_event_var;
+
+ struct completion reg_init;
+
+ bool isMcThreadSuspended;
+
+#ifdef QCA_CONFIG_SMP
+ bool is_ol_rx_thread_suspended;
+#endif
+
+ volatile bool isLogpInProgress;
+
+ bool isLoadInProgress;
+
+ bool isUnloadInProgress;
+
+ /* Track whether Mcast/Bcast Filter is enabled. */
+ bool hdd_mcastbcast_filter_set;
+
+ bool hdd_wlan_suspended;
+ bool suspended;
+
+ /* Lock to avoid race condition during start/stop bss */
+ struct mutex sap_lock;
+
+#ifdef WLAN_KD_READY_NOTIFIER
+ bool kd_nl_init;
+#endif /* WLAN_KD_READY_NOTIFIER */
+
+#ifdef FEATURE_OEM_DATA_SUPPORT
+ /* OEM App registered or not */
+ bool oem_app_registered;
+
+ /* OEM App Process ID */
+ int32_t oem_pid;
+#endif
+
+ /** Concurrency Parameters*/
+ uint32_t concurrency_mode;
+
+ uint8_t no_of_open_sessions[CDF_MAX_NO_OF_MODE];
+ uint8_t no_of_active_sessions[CDF_MAX_NO_OF_MODE];
+
+ /** P2P Device MAC Address for the adapter */
+ struct cdf_mac_addr p2pDeviceAddress;
+
+#ifdef WLAN_FEATURE_HOLD_RX_WAKELOCK
+ cdf_wake_lock_t rx_wake_lock;
+#endif
+
+ cdf_wake_lock_t sap_wake_lock;
+
+#ifdef FEATURE_WLAN_TDLS
+ eTDLSSupportMode tdls_mode;
+ eTDLSSupportMode tdls_mode_last;
+ tdlsConnInfo_t tdlsConnInfo[HDD_MAX_NUM_TDLS_STA];
+ /* maximum TDLS station number allowed upon runtime condition */
+ uint16_t max_num_tdls_sta;
+ /* TDLS peer connected count */
+ uint16_t connected_peer_count;
+ tdls_scan_context_t tdls_scan_ctxt;
+ /* Lock to avoid race condition during TDLS operations */
+ struct mutex tdls_lock;
+ uint8_t tdls_off_channel;
+ uint16_t tdls_channel_offset;
+#endif
+
+#ifdef IPA_OFFLOAD
+ void *hdd_ipa;
+ /* CE resources */
+ uint32_t ce_sr_base_paddr;
+ uint32_t ce_sr_ring_size;
+ cdf_dma_addr_t ce_reg_paddr;
+
+ /* WLAN TX:IPA->WLAN */
+ uint32_t tx_comp_ring_base_paddr;
+ uint32_t tx_comp_ring_size;
+ uint32_t tx_num_alloc_buffer;
+
+ /* WLAN RX:WLAN->IPA */
+ uint32_t rx_rdy_ring_base_paddr;
+ uint32_t rx_rdy_ring_size;
+ uint32_t rx_proc_done_idx_paddr;
+
+ /* IPA UC doorbell registers paddr */
+ uint32_t tx_comp_doorbell_paddr;
+ uint32_t rx_ready_doorbell_paddr;
+#endif /* IPA_OFFLOAD */
+
+ /* MC/BC Filter state variable
+ * This always contains the value that is currently
+ * configured
+ * */
+ uint8_t configuredMcastBcastFilter;
+
+ uint8_t sus_res_mcastbcast_filter;
+
+ bool sus_res_mcastbcast_filter_valid;
+
+ /* debugfs entry */
+ struct dentry *debugfs_phy;
+
+ /* Use below lock to protect access to isSchedScanUpdatePending
+ * since it will be accessed in two different contexts.
+ */
+ spinlock_t schedScan_lock;
+
+ /* Flag keeps track of wiphy suspend/resume */
+ bool isWiphySuspended;
+
+ /* Indicates about pending sched_scan results */
+ bool isSchedScanUpdatePending;
+
+#ifdef MSM_PLATFORM
+ /* DDR bus bandwidth compute timer
+ */
+ cdf_mc_timer_t bus_bw_timer;
+ int cur_vote_level;
+ spinlock_t bus_bw_lock;
+ int cur_rx_level;
+ uint64_t prev_rx;
+#endif
+ /* VHT80 allowed */
+ bool isVHT80Allowed;
+
+ struct completion ready_to_suspend;
+ /* defining the solution type */
+ uint32_t target_type;
+
+ /* defining the firmware version */
+ uint32_t target_fw_version;
+ uint32_t dfs_radar_found;
+
+ /* defining the chip/rom version */
+ uint32_t target_hw_version;
+ /* defining the chip/rom revision */
+ uint32_t target_hw_revision;
+ /* chip/rom name */
+ const char *target_hw_name;
+ struct regulatory reg;
+#ifdef FEATURE_WLAN_CH_AVOID
+ uint16_t unsafe_channel_count;
+ uint16_t unsafe_channel_list[NUM_20MHZ_RF_CHANNELS];
+#endif /* FEATURE_WLAN_CH_AVOID */
+
+ uint8_t max_intf_count;
+ uint8_t current_intf_count;
+#ifdef WLAN_FEATURE_LPSS
+ uint8_t lpss_support;
+#endif
+ uint8_t ap_arpns_support;
+ tSirScanType ioctl_scan_mode;
+
+#ifdef FEATURE_WLAN_MCC_TO_SCC_SWITCH
+ cdf_work_t sta_ap_intf_check_work;
+#endif
+
+ struct work_struct sap_start_work;
+ bool is_sap_restart_required;
+ bool is_sta_connection_pending;
+ spinlock_t sap_update_info_lock;
+ spinlock_t sta_update_info_lock;
+
+ uint8_t dev_dfs_cac_status;
+
+ bool btCoexModeSet;
+#ifdef FEATURE_GREEN_AP
+ struct hdd_green_ap_ctx *green_ap_ctx;
+#endif
+ fw_log_info fw_log_settings;
+#ifdef FEATURE_WLAN_AP_AP_ACS_OPTIMIZE
+ cdf_mc_timer_t skip_acs_scan_timer;
+ uint8_t skip_acs_scan_status;
+#endif
+
+ cdf_wake_lock_t sap_dfs_wakelock;
+ atomic_t sap_dfs_ref_cnt;
+
+#ifdef WLAN_FEATURE_EXTWOW_SUPPORT
+ bool is_extwow_app_type1_param_set;
+ bool is_extwow_app_type2_param_set;
+ bool ext_wow_should_suspend;
+ struct completion ready_to_extwow;
+#endif
+
+ /* Time since boot up to extscan start (in micro seconds) */
+ uint64_t ext_scan_start_since_boot;
+ unsigned long g_event_flags;
+ /* RoC request queue and work */
+ struct delayed_work roc_req_work;
+ cdf_spinlock_t hdd_roc_req_q_lock;
+ cdf_list_t hdd_roc_req_q;
+ cdf_spinlock_t hdd_scan_req_q_lock;
+ cdf_list_t hdd_scan_req_q;
+ uint8_t miracast_value;
+#ifdef WLAN_NS_OFFLOAD
+ /* IPv6 notifier callback for handling NS offload on change in IP */
+ struct notifier_block ipv6_notifier;
+#endif
+ /* IPv4 notifier callback for handling ARP offload on change in IP */
+ struct notifier_block ipv4_notifier;
+
+ /* number of rf chains supported by target */
+ uint32_t num_rf_chains;
+ /* Is htTxSTBC supported by target */
+ uint8_t ht_tx_stbc_supported;
+#ifdef WLAN_FEATURE_OFFLOAD_PACKETS
+ struct hdd_offloaded_packets_ctx op_ctx;
+#endif
+ bool mcc_mode;
+#ifdef WLAN_FEATURE_MEMDUMP
+ uint8_t *fw_dump_loc;
+ uint32_t dump_loc_paddr;
+ cdf_mc_timer_t memdump_cleanup_timer;
+ struct mutex memdump_lock;
+ bool memdump_in_progress;
+#endif /* WLAN_FEATURE_MEMDUMP */
+
+ cdf_mc_timer_t dbs_opportunistic_timer;
+ bool connection_in_progress;
+ spinlock_t connection_status_lock;
+ cdf_mutex_t hdd_conc_list_lock;
+
+ uint16_t hdd_txrx_hist_idx;
+ struct hdd_tx_rx_histogram hdd_txrx_hist[NUM_TX_RX_HISTOGRAM];
+};
+
+/*---------------------------------------------------------------------------
+ Function declarations and documentation
+ -------------------------------------------------------------------------*/
+#ifdef FEATURE_WLAN_MCC_TO_SCC_SWITCH
+void wlan_hdd_check_sta_ap_concurrent_ch_intf(void *sta_pAdapter);
+#endif
+
+const char *hdd_device_mode_to_string(uint8_t device_mode);
+
+CDF_STATUS hdd_get_front_adapter(hdd_context_t *pHddCtx,
+ hdd_adapter_list_node_t **ppAdapterNode);
+
+CDF_STATUS hdd_get_next_adapter(hdd_context_t *pHddCtx,
+ hdd_adapter_list_node_t *pAdapterNode,
+ hdd_adapter_list_node_t **pNextAdapterNode);
+
+CDF_STATUS hdd_remove_adapter(hdd_context_t *pHddCtx,
+ hdd_adapter_list_node_t *pAdapterNode);
+
+CDF_STATUS hdd_remove_front_adapter(hdd_context_t *pHddCtx,
+ hdd_adapter_list_node_t **ppAdapterNode);
+
+CDF_STATUS hdd_add_adapter_back(hdd_context_t *pHddCtx,
+ hdd_adapter_list_node_t *pAdapterNode);
+
+CDF_STATUS hdd_add_adapter_front(hdd_context_t *pHddCtx,
+ hdd_adapter_list_node_t *pAdapterNode);
+
+hdd_adapter_t *hdd_open_adapter(hdd_context_t *pHddCtx, uint8_t session_type,
+ const char *name, tSirMacAddr macAddr,
+ uint8_t rtnl_held);
+CDF_STATUS hdd_close_adapter(hdd_context_t *pHddCtx, hdd_adapter_t *pAdapter,
+ uint8_t rtnl_held);
+CDF_STATUS hdd_close_all_adapters(hdd_context_t *pHddCtx);
+CDF_STATUS hdd_stop_all_adapters(hdd_context_t *pHddCtx);
+CDF_STATUS hdd_reset_all_adapters(hdd_context_t *pHddCtx);
+CDF_STATUS hdd_start_all_adapters(hdd_context_t *pHddCtx);
+hdd_adapter_t *hdd_get_adapter_by_vdev(hdd_context_t *pHddCtx,
+ uint32_t vdev_id);
+hdd_adapter_t *hdd_get_adapter_by_macaddr(hdd_context_t *pHddCtx,
+ tSirMacAddr macAddr);
+CDF_STATUS hdd_init_station_mode(hdd_adapter_t *pAdapter);
+hdd_adapter_t *hdd_get_adapter(hdd_context_t *pHddCtx, device_mode_t mode);
+void hdd_deinit_adapter(hdd_context_t *pHddCtx, hdd_adapter_t *pAdapter,
+ bool rtnl_held);
+CDF_STATUS hdd_stop_adapter(hdd_context_t *pHddCtx, hdd_adapter_t *pAdapter,
+ const bool bCloseSession);
+void hdd_set_station_ops(struct net_device *pWlanDev);
+uint8_t *wlan_hdd_get_intf_addr(hdd_context_t *pHddCtx);
+void wlan_hdd_release_intf_addr(hdd_context_t *pHddCtx, uint8_t *releaseAddr);
+uint8_t hdd_get_operating_channel(hdd_context_t *pHddCtx, device_mode_t mode);
+
+void hdd_set_conparam(uint32_t newParam);
+tCDF_CON_MODE hdd_get_conparam(void);
+
+void hdd_abort_mac_scan(hdd_context_t *pHddCtx, uint8_t sessionId,
+ eCsrAbortReason reason);
+void hdd_cleanup_actionframe(hdd_context_t *pHddCtx, hdd_adapter_t *pAdapter);
+
+void crda_regulatory_entry_default(uint8_t *countryCode, int domain_id);
+void wlan_hdd_reset_prob_rspies(hdd_adapter_t *pHostapdAdapter);
+void hdd_prevent_suspend(uint32_t reason);
+void hdd_allow_suspend(uint32_t reason);
+void hdd_prevent_suspend_timeout(uint32_t timeout, uint32_t reason);
+bool hdd_is_ssr_required(void);
+void hdd_set_ssr_required(e_hdd_ssr_required value);
+
+void wlan_hdd_cfg80211_update_wiphy_caps(struct wiphy *wiphy);
+CDF_STATUS hdd_set_ibss_power_save_params(hdd_adapter_t *pAdapter);
+CDF_STATUS wlan_hdd_restart_driver(hdd_context_t *pHddCtx);
+void hdd_exchange_version_and_caps(hdd_context_t *pHddCtx);
+int wlan_hdd_validate_context(hdd_context_t *pHddCtx);
+bool hdd_is_valid_mac_address(const uint8_t *pMacAddr);
+CDF_STATUS hdd_issta_p2p_clientconnected(hdd_context_t *pHddCtx);
+
+void hdd_checkandupdate_phymode(hdd_context_t *pHddCtx);
+
+#ifdef MSM_PLATFORM
+void hdd_start_bus_bw_compute_timer(hdd_adapter_t *pAdapter);
+void hdd_stop_bus_bw_compute_timer(hdd_adapter_t *pAdapter);
+#else
+static inline void hdd_start_bus_bw_compute_timer(hdd_adapter_t *pAdapter)
+{
+ return;
+}
+
+static inline void hdd_stop_bus_bw_computer_timer(hdd_adapter_t *pAdapter)
+{
+ return;
+}
+#endif
+
+int hdd_wlan_startup(struct device *dev, void *hif_sc);
+void __hdd_wlan_exit(void);
+int hdd_wlan_notify_modem_power_state(int state);
+#ifdef QCA_HT_2040_COEX
+int hdd_wlan_set_ht2040_mode(hdd_adapter_t *pAdapter, uint16_t staId,
+ struct cdf_mac_addr macAddrSTA, int width);
+#endif
+
+#ifdef WLAN_FEATURE_LPSS
+void wlan_hdd_send_status_pkg(hdd_adapter_t *pAdapter,
+ hdd_station_ctx_t *pHddStaCtx,
+ uint8_t is_on, uint8_t is_connected);
+void wlan_hdd_send_version_pkg(uint32_t fw_version,
+ uint32_t chip_id, const char *chip_name);
+void wlan_hdd_send_all_scan_intf_info(hdd_context_t *pHddCtx);
+#endif
+void wlan_hdd_send_svc_nlink_msg(int type, void *data, int len);
+#ifdef FEATURE_WLAN_AUTO_SHUTDOWN
+void wlan_hdd_auto_shutdown_enable(hdd_context_t *hdd_ctx, bool enable);
+#endif
+
+hdd_adapter_t *hdd_get_con_sap_adapter(hdd_adapter_t *this_sap_adapter,
+ bool check_start_bss);
+
+bool hdd_is_5g_supported(hdd_context_t *pHddCtx);
+
+int wlan_hdd_scan_abort(hdd_adapter_t *pAdapter);
+
+#ifdef WLAN_FEATURE_STATS_EXT
+void wlan_hdd_cfg80211_stats_ext_init(hdd_context_t *pHddCtx);
+#endif
+
+#ifdef WLAN_FEATURE_LINK_LAYER_STATS
+void wlan_hdd_cfg80211_link_layer_stats_init(hdd_context_t *pHddCtx);
+static inline bool hdd_link_layer_stats_supported(void)
+{
+ return true;
+}
+#else
+static inline bool hdd_link_layer_stats_supported(void)
+{
+ return false;
+}
+#endif /* WLAN_FEATURE_LINK_LAYER_STATS */
+
+void hdd_get_fw_version(hdd_context_t *hdd_ctx,
+ uint32_t *major_spid, uint32_t *minor_spid,
+ uint32_t *siid, uint32_t *crmid);
+
+#ifdef WLAN_FEATURE_MEMDUMP
+/**
+ * hdd_is_memdump_supported() - to check if memdump feature support
+ *
+ * This function is used to check if memdump feature is supported in
+ * the host driver
+ *
+ * Return: true if supported and false otherwise
+ */
+static inline bool hdd_is_memdump_supported(void)
+{
+ return true;
+}
+#else
+static inline bool hdd_is_memdump_supported(void)
+{
+ return false;
+}
+#endif /* WLAN_FEATURE_MEMDUMP */
+
+void hdd_update_macaddr(struct hdd_config *config,
+ struct cdf_mac_addr hw_macaddr);
+#if defined(FEATURE_WLAN_LFR)
+void wlan_hdd_disable_roaming(hdd_adapter_t *pAdapter);
+void wlan_hdd_enable_roaming(hdd_adapter_t *pAdapter);
+#endif
+
+CDF_STATUS hdd_post_cds_enable_config(hdd_context_t *pHddCtx);
+
+CDF_STATUS hdd_abort_mac_scan_all_adapters(hdd_context_t *hdd_ctx);
+
+CDF_STATUS wlan_hdd_check_custom_con_channel_rules(hdd_adapter_t *sta_adapter,
+ hdd_adapter_t *ap_adapter,
+ tCsrRoamProfile *roam_profile,
+ tScanResultHandle *scan_cache,
+ bool *concurrent_chnl_same);
+#ifdef WLAN_FEATURE_MBSSID
+void wlan_hdd_stop_sap(hdd_adapter_t *ap_adapter);
+void wlan_hdd_start_sap(hdd_adapter_t *ap_adapter);
+#else
+static inline void wlan_hdd_stop_sap(hdd_adapter_t *ap_adapter) {}
+static inline void wlan_hdd_start_sap(hdd_adapter_t *ap_adapter) {}
+#endif
+cdf_wake_lock_t *hdd_wlan_get_wake_lock_ptr(void);
+
+#ifdef QCA_CONFIG_SMP
+int wlan_hdd_get_cpu(void);
+#else
+static inline int wlan_hdd_get_cpu(void)
+{
+ return 0;
+}
+#endif
+
+void wlan_hdd_txrx_pause_cb(uint8_t vdev_id,
+ enum netif_action_type action, enum netif_reason_type reason);
+
+void hdd_wlan_dump_stats(hdd_adapter_t *adapter, int value);
+void wlan_hdd_display_tx_rx_histogram(hdd_context_t *pHddCtx);
+void wlan_hdd_clear_tx_rx_histogram(hdd_context_t *pHddCtx);
+void wlan_hdd_display_netif_queue_history(hdd_context_t *hdd_ctx);
+void wlan_hdd_clear_netif_queue_history(hdd_context_t *hdd_ctx);
+const char *hdd_get_fwpath(void);
+
+#endif /* end #if !defined(WLAN_HDD_MAIN_H) */
diff --git a/core/hdd/inc/wlan_hdd_memdump.h b/core/hdd/inc/wlan_hdd_memdump.h
new file mode 100644
index 0000000..c3fa839
--- /dev/null
+++ b/core/hdd/inc/wlan_hdd_memdump.h
@@ -0,0 +1,92 @@
+/*
+ * Copyright (c) 2015 The Linux Foundation. All rights reserved.
+ *
+ * Previously licensed under the ISC license by Qualcomm Atheros, Inc.
+ *
+ *
+ * Permission to use, copy, modify, and/or distribute this software for
+ * any purpose with or without fee is hereby granted, provided that the
+ * above copyright notice and this permission notice appear in all
+ * copies.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
+ * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE
+ * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
+ * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
+ * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
+ * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
+ * PERFORMANCE OF THIS SOFTWARE.
+ */
+
+/*
+ * This file was originally distributed by Qualcomm Atheros, Inc.
+ * under proprietary terms before Copyright ownership was assigned
+ * to the Linux Foundation.
+ */
+
+/**
+ * DOC : wlan_hdd_memdump.h
+ *
+ * WLAN Host Device Driver file for dumping firmware memory
+ *
+ */
+
+#if !defined(WLAN_HDD_MEMDUMP_H)
+#define WLAN_HDD_MEMDUMP_H
+
+#include "wlan_hdd_main.h"
+
+#ifdef WLAN_FEATURE_MEMDUMP
+/**
+ * enum qca_wlan_vendor_attr_memory_dump - values for memory dump attributes
+ * @QCA_WLAN_VENDOR_ATTR_MEMORY_DUMP_INVALID - Invalid
+ * @QCA_WLAN_VENDOR_ATTR_REQUEST_ID - Indicate request ID
+ * @QCA_WLAN_VENDOR_ATTR_MEMDUMP_SIZE - Indicate size of the memory dump
+ * @QCA_WLAN_VENDOR_ATTR_MEMORY_DUMP_AFTER_LAST - To keep track of the last enum
+ * @QCA_WLAN_VENDOR_ATTR_MEMORY_DUMP_MAX - max value possible for this type
+ *
+ * enum values are used for NL attributes for data used by
+ * QCA_NL80211_VENDOR_SUBCMD_WIFI_LOGGER_MEMORY_DUMP sub command.
+ */
+enum qca_wlan_vendor_attr_memory_dump {
+ QCA_WLAN_VENDOR_ATTR_MEMORY_DUMP_INVALID = 0,
+ QCA_WLAN_VENDOR_ATTR_REQUEST_ID = 1,
+ QCA_WLAN_VENDOR_ATTR_MEMDUMP_SIZE = 2,
+
+ QCA_WLAN_VENDOR_ATTR_MEMORY_DUMP_AFTER_LAST,
+ QCA_WLAN_VENDOR_ATTR_MEMORY_DUMP_MAX =
+ QCA_WLAN_VENDOR_ATTR_MEMORY_DUMP_AFTER_LAST - 1,
+};
+
+/* Size of fw memory dump is estimated to be 327680 bytes */
+#define FW_MEM_DUMP_SIZE 327680
+#define FW_DRAM_LOCATION 0x00400000
+#define FW_MEM_DUMP_REQ_ID 1
+#define FW_MEM_DUMP_NUM_SEG 1
+#define MEMDUMP_COMPLETION_TIME_MS 5000
+
+int memdump_init(void);
+void memdump_deinit(void);
+int wlan_hdd_cfg80211_get_fw_mem_dump(struct wiphy *wiphy,
+ struct wireless_dev *wdev,
+ const void *data, int data_len);
+#else
+static inline int memdump_init(void)
+{
+ return -ENOTSUPP;
+}
+
+static inline void memdump_deinit(void)
+{
+}
+
+static inline int wlan_hdd_cfg80211_get_fw_mem_dump(struct wiphy *wiphy,
+ struct wireless_dev *wdev,
+ const void *data, int data_len)
+{
+ return -ENOTSUPP;
+}
+#endif
+
+#endif /* if !defined(WLAN_HDD_MEMDUMP_H)*/
diff --git a/core/hdd/inc/wlan_hdd_mib.h b/core/hdd/inc/wlan_hdd_mib.h
new file mode 100644
index 0000000..8fe44a8
--- /dev/null
+++ b/core/hdd/inc/wlan_hdd_mib.h
@@ -0,0 +1,190 @@
+/*
+ * Copyright (c) 2013-2014 The Linux Foundation. All rights reserved.
+ *
+ * Previously licensed under the ISC license by Qualcomm Atheros, Inc.
+ *
+ *
+ * Permission to use, copy, modify, and/or distribute this software for
+ * any purpose with or without fee is hereby granted, provided that the
+ * above copyright notice and this permission notice appear in all
+ * copies.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
+ * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE
+ * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
+ * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
+ * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
+ * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
+ * PERFORMANCE OF THIS SOFTWARE.
+ */
+
+/*
+ * This file was originally distributed by Qualcomm Atheros, Inc.
+ * under proprietary terms before Copyright ownership was assigned
+ * to the Linux Foundation.
+ */
+
+#if !defined(WLAN_HDD_MIB_h__)
+#define WLAN_HDD_MIB_h__
+
+#include <cdf_types.h>
+
+typedef enum {
+ eMib_dot11DesiredBssType_infrastructure = 1,
+ eMib_dot11DesiredBssType_independent = 2,
+ eMib_dot11DesiredBssType_infra_ap = 3,
+ eMib_dot11DesiredBssType_any = 4
+} eMib_dot11DesiredBssType;
+
+/** This is the maximum number of BSSIDs supported in the
+ dot11DesiredBssidList. All the code operates off of
+ this maximum BSSID list count. */
+#define MIB_DOT11_DESIRED_BSSID_LIST_MAX_COUNT 1
+
+typedef struct {
+ uint32_t cEntries;
+
+ struct cdf_mac_addr BSSIDs[MIB_DOT11_DESIRED_BSSID_LIST_MAX_COUNT];
+
+} sMib_dot11DesiredBssidList;
+
+/** This is the maximum number of SSIDs supported in the
+ dot11DesiredSsidList. All the code operates off of
+ this maximum SSID list count. */
+
+#define MIB_DOT11_DESIRED_SSID_LIST_MAX_COUNT 1
+
+#define MIB_DOT11_SSID_MAX_LENGTH 32
+
+typedef struct {
+ uint32_t ssidLength;
+ uint8_t ssid[MIB_DOT11_SSID_MAX_LENGTH];
+
+} sDot11Ssid;
+
+typedef struct {
+ uint32_t cEntries;
+
+ sDot11Ssid SSIDs[MIB_DOT11_DESIRED_SSID_LIST_MAX_COUNT];
+
+} sMib_dot11DesiredSsidList;
+
+typedef enum {
+ /* these are bitmasks.... */
+ eMib_dot11AutoConfigEnabled_None = 0U,
+ eMib_dot11AutoConfigEnabled_Phy = 0x00000001U,
+ eMib_dot11AutoConfigEnabled_Mac = 0x00000002U
+} eMib_dot11AutoConfigEnabled;
+
+#define MIB_DOT11_SUPPORTED_PHY_TYPES_MAX_COUNT 3
+
+typedef enum tagMib_dot11PhyType {
+ eMib_dot11PhyType_11b,
+ eMib_dot11PhyType_11a,
+ eMib_dot11PhyType_11g,
+ eMib_dot11PhyType_all
+} eMib_dot11PhyType;
+
+typedef struct tagMib_dot11SupportedPhyTypes {
+ uint32_t cEntries;
+ eMib_dot11PhyType phyTypes[MIB_DOT11_SUPPORTED_PHY_TYPES_MAX_COUNT];
+} sMib_dot11SupportedPhyTypes;
+
+typedef enum {
+ eMib_DevicePowerState_D0,
+ eMib_DevicePowerState_D1,
+ eMib_DevicePowerState_D2,
+ eMib_DevicePowerState_D3
+} eMib_DevicePowerState;
+
+typedef enum {
+ eMib_dot11NICPowerState_OFF = false,
+ eMib_dot11NICPowerState_ON = true
+} eMib_dot11NICPowerState;
+
+typedef enum {
+ eMib_dot11HardwarePHYState_OFF = false,
+ eMib_dot11HardwarePHYState_ON = true
+} eMib_dot11HardwarePHYState;
+
+typedef enum {
+ eMib_dot11PowerSavingLevel_None,
+ eMib_dot11PowerSavingLevel_MaxPS,
+ eMib_dot11PowerSavingLevel_FastPS,
+ eMib_dot11PowerSavingLevel_MaximumLevel
+} eMib_dot11PowerSavingLevel;
+
+#define MIB_DOT11_MAC_EXCLUSION_LIST_MAX_COUNT 4
+typedef struct {
+ uint32_t cEntries;
+
+ struct cdf_mac_addr macAddrs[MIB_DOT11_MAC_EXCLUSION_LIST_MAX_COUNT];
+
+} sMib_dot11MacExcludeList;
+
+#define MIB_DOT11_PRIVACY_EXEMPT_LIST_MAX_COUNT 32
+
+typedef enum {
+ eMib_dot11ExemptionAction_Always,
+ eMib_dot11ExemptionAction_OnKeyMapUnavailable
+} eMib_dot11ExemptAction;
+
+typedef enum {
+ eMib_dot11ExemptPacket_Unicast,
+ eMib_dot11ExemptPacket_Multicast,
+ eMib_dot11ExemptPacket_Both
+} eMib_dot11ExemptPacket;
+
+typedef struct {
+ uint16_t uEtherType;
+ eMib_dot11ExemptAction exemptAction;
+ eMib_dot11ExemptPacket exemptPacket;
+
+} sMib_dot11PrivacyExemption;
+
+typedef struct {
+ uint32_t cEntries;
+
+ sMib_dot11PrivacyExemption
+ privacyExemptList[MIB_DOT11_PRIVACY_EXEMPT_LIST_MAX_COUNT];
+
+} sMib_dot11PrivacyExemptionList;
+
+typedef struct sHddMib_s {
+ eMib_dot11DesiredBssType mibDot11DesiredBssType;
+
+ sMib_dot11DesiredBssidList mibDot11DesiredBssidList;
+
+ sMib_dot11DesiredSsidList mibDot11DesiredSsidList;
+
+ eMib_dot11AutoConfigEnabled mibDot11AutoConfigEnabled;
+
+ /* the device power state for the device (the D-state... you know D0, D1, D2, etc. */
+ eMib_DevicePowerState mibDevicePowerState;
+
+ /* dot11NICPowerState is really the on/off state of the PHY. This can be */
+ /* mamipulated through OIDs like a software control for radio on/off. */
+ eMib_dot11NICPowerState mibDot11NICPowerState;
+
+ /* Hardware PHY state is the on/off state of the hardware PHY. */
+ eMib_dot11HardwarePHYState mibDot11HardwarePHYState;
+
+ /* dot11 Power Saving level is the 802.11 power saving level/state for the 802.11 */
+ /* NIC. Typically this is mapped to 802.11 BMPS in some fashion. We are not going */
+ /* to disappoint; the Libra NIC maps these to different BMPS settings. */
+ eMib_dot11PowerSavingLevel mibDot11PowerSavingLevel;
+
+ sMib_dot11MacExcludeList mibDot11MacExcludeList;
+
+ sMib_dot11PrivacyExemptionList mibDot11PrivacyExemptionList;
+
+ sMib_dot11SupportedPhyTypes mibDot11SupportedPhyTypes;
+ eMib_dot11PhyType mibDot11CurrentPhyType;
+
+ bool dot11IbssJoinOnly;
+ bool HiddenNetworkEnabled;
+
+} sHddMib_t;
+
+#endif
diff --git a/core/hdd/inc/wlan_hdd_misc.h b/core/hdd/inc/wlan_hdd_misc.h
new file mode 100644
index 0000000..e0a0db2
--- /dev/null
+++ b/core/hdd/inc/wlan_hdd_misc.h
@@ -0,0 +1,39 @@
+/*
+ * Copyright (c) 2012-2014 The Linux Foundation. All rights reserved.
+ *
+ * Previously licensed under the ISC license by Qualcomm Atheros, Inc.
+ *
+ *
+ * Permission to use, copy, modify, and/or distribute this software for
+ * any purpose with or without fee is hereby granted, provided that the
+ * above copyright notice and this permission notice appear in all
+ * copies.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
+ * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE
+ * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
+ * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
+ * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
+ * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
+ * PERFORMANCE OF THIS SOFTWARE.
+ */
+
+/*
+ * This file was originally distributed by Qualcomm Atheros, Inc.
+ * under proprietary terms before Copyright ownership was assigned
+ * to the Linux Foundation.
+ */
+
+#ifndef WLAN_HDD_MISC_H
+#define WLAN_HDD_MISC_H
+
+#ifdef MSM_PLATFORM
+#define WLAN_INI_FILE "wlan/qca_cld/WCNSS_qcom_cfg.ini"
+#define WLAN_MAC_FILE "wlan/qca_cld/wlan_mac.bin"
+#else
+#define WLAN_INI_FILE "wlan/qcom_cfg.ini"
+#define WLAN_MAC_FILE "wlan/wlan_mac.bin"
+#endif /* MSM_PLATFORM */
+
+#endif /* WLAN_HDD_MISC_H */
diff --git a/core/hdd/inc/wlan_hdd_nan.h b/core/hdd/inc/wlan_hdd_nan.h
new file mode 100644
index 0000000..ac2f62f
--- /dev/null
+++ b/core/hdd/inc/wlan_hdd_nan.h
@@ -0,0 +1,59 @@
+/*
+ * Copyright (c) 2014-2015 The Linux Foundation. All rights reserved.
+ *
+ * Previously licensed under the ISC license by Qualcomm Atheros, Inc.
+ *
+ *
+ * Permission to use, copy, modify, and/or distribute this software for
+ * any purpose with or without fee is hereby granted, provided that the
+ * above copyright notice and this permission notice appear in all
+ * copies.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
+ * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE
+ * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
+ * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
+ * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
+ * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
+ * PERFORMANCE OF THIS SOFTWARE.
+ */
+
+/*
+ * This file was originally distributed by Qualcomm Atheros, Inc.
+ * under proprietary terms before Copyright ownership was assigned
+ * to the Linux Foundation.
+ */
+
+#ifndef __WLAN_HDD_NAN_H
+#define __WLAN_HDD_NAN_H
+
+/**
+ * DOC: wlan_hdd_nan.h
+ *
+ * WLAN Host Device Driver NAN API specification
+ */
+
+struct hdd_context_s;
+
+#ifdef WLAN_FEATURE_NAN
+struct wiphy;
+struct wireless_dev;
+
+int wlan_hdd_cfg80211_nan_request(struct wiphy *wiphy,
+ struct wireless_dev *wdev,
+ const void *data,
+ int data_len);
+
+bool wlan_hdd_nan_is_supported(void);
+void wlan_hdd_nan_init(struct hdd_context_s *hdd_ctx);
+#else
+static inline bool wlan_hdd_nan_is_supported(void)
+{
+ return false;
+}
+static inline void wlan_hdd_nan_init(struct hdd_context_s *hdd_ctx)
+{
+}
+#endif /* WLAN_FEATURE_NAN */
+#endif /* __WLAN_HDD_NAN_H */
diff --git a/core/hdd/inc/wlan_hdd_napi.h b/core/hdd/inc/wlan_hdd_napi.h
new file mode 100644
index 0000000..3c1683d
--- /dev/null
+++ b/core/hdd/inc/wlan_hdd_napi.h
@@ -0,0 +1,82 @@
+/*
+ * Copyright (c) 2015 The Linux Foundation. All rights reserved.
+ *
+ * Previously licensed under the ISC license by Qualcomm Atheros, Inc.
+ *
+ *
+ * Permission to use, copy, modify, and/or distribute this software for
+ * any purpose with or without fee is hereby granted, provided that the
+ * above copyright notice and this permission notice appear in all
+ * copies.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
+ * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE
+ * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
+ * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
+ * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
+ * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
+ * PERFORMANCE OF THIS SOFTWARE.
+ */
+
+/*
+ * This file was originally distributed by Qualcomm Atheros, Inc.
+ * under proprietary terms before Copyright ownership was assigned
+ * to the Linux Foundation.
+ */
+
+#ifndef __HDD_NAPI_H__
+#define __HDD_NAPI_H__
+
+#ifdef FEATURE_NAPI
+/**
+ * DOC: wlan_hdd_napi.h
+ *
+ * WLAN NAPI interface module headers
+ */
+
+/* CLD headers */
+#include "hif_napi.h"
+/* Linux headers */
+#include <linux/netdevice.h> /* net_device */
+
+#define HDD_NAPI_ANY (-1)
+
+int hdd_napi_enabled(int id);
+int hdd_napi_create(void);
+int hdd_napi_destroy(int force);
+
+int hdd_napi_stats(char *buf,
+ int max,
+ char *indp,
+ struct qca_napi_data *napid);
+
+/* the following triggers napi_enable/disable as required */
+int hdd_napi_event(enum qca_napi_event event, void *data);
+
+int hdd_napi_poll(struct napi_struct *napi, int budget);
+
+struct qca_napi_data *hdd_napi_get_all(void);
+
+#else /* ! defined(FEATURE_NAPI) */
+#include "hif_napi.h"
+/**
+ * Stub API
+ *
+ */
+
+#define HDD_NAPI_ANY (-1)
+
+static inline int hdd_napi_enabled(int id) { return 0; }
+static inline int hdd_napi_create(void) { return -EPERM; }
+static inline int hdd_napi_destroy(int force) { return 0; }
+static inline int hdd_napi_stats(char *buf, int max, char *indp,
+ struct qca_napi_data *napid)
+{ return 0; }
+static inline int hdd_napi_event(enum qca_napi_event event, void *data)
+{ return 0; }
+static inline struct qca_napi_data *hdd_napi_get_all(void) { return NULL; }
+
+#endif /* FEATURE_NAPI */
+
+#endif /* HDD_NAPI_H__ */
diff --git a/core/hdd/inc/wlan_hdd_oemdata.h b/core/hdd/inc/wlan_hdd_oemdata.h
new file mode 100644
index 0000000..9107dc3
--- /dev/null
+++ b/core/hdd/inc/wlan_hdd_oemdata.h
@@ -0,0 +1,172 @@
+/*
+ * Copyright (c) 2012-2015 The Linux Foundation. All rights reserved.
+ *
+ * Previously licensed under the ISC license by Qualcomm Atheros, Inc.
+ *
+ *
+ * Permission to use, copy, modify, and/or distribute this software for
+ * any purpose with or without fee is hereby granted, provided that the
+ * above copyright notice and this permission notice appear in all
+ * copies.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
+ * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE
+ * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
+ * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
+ * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
+ * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
+ * PERFORMANCE OF THIS SOFTWARE.
+ */
+
+/*
+ * This file was originally distributed by Qualcomm Atheros, Inc.
+ * under proprietary terms before Copyright ownership was assigned
+ * to the Linux Foundation.
+ */
+
+#ifdef FEATURE_OEM_DATA_SUPPORT
+
+/**
+ * DOC: wlan_hdd_oemdata.h
+ *
+ * Internal includes for the oem data
+ */
+
+#ifndef __WLAN_HDD_OEM_DATA_H__
+#define __WLAN_HDD_OEM_DATA_H__
+
+#ifndef OEM_DATA_REQ_SIZE
+#define OEM_DATA_REQ_SIZE 280
+#endif
+
+#ifndef OEM_DATA_RSP_SIZE
+#define OEM_DATA_RSP_SIZE 1724
+#endif
+
+#define OEM_APP_SIGNATURE_LEN 16
+#define OEM_APP_SIGNATURE_STR "QUALCOMM-OEM-APP"
+
+#define OEM_TARGET_SIGNATURE_LEN 8
+#define OEM_TARGET_SIGNATURE "QUALCOMM"
+
+#define OEM_CAP_MAX_NUM_CHANNELS 128
+
+/**
+ * typedef eOemErrorCode - OEM error codes
+ * @OEM_ERR_NULL_CONTEXT: %NULL context
+ * @OEM_ERR_APP_NOT_REGISTERED: OEM App is not registered
+ * @OEM_ERR_INVALID_SIGNATURE: Invalid signature
+ * @OEM_ERR_NULL_MESSAGE_HEADER: Invalid message header
+ * @OEM_ERR_INVALID_MESSAGE_TYPE: Invalid message type
+ * @OEM_ERR_INVALID_MESSAGE_LENGTH: Invalid length in message body
+ */
+typedef enum {
+ OEM_ERR_NULL_CONTEXT = 1,
+ OEM_ERR_APP_NOT_REGISTERED,
+ OEM_ERR_INVALID_SIGNATURE,
+ OEM_ERR_NULL_MESSAGE_HEADER,
+ OEM_ERR_INVALID_MESSAGE_TYPE,
+ OEM_ERR_INVALID_MESSAGE_LENGTH
+} eOemErrorCode;
+
+/**
+ * typedef tDriverVersion - Driver version identifier (w.x.y.z)
+ * @major: Version ID major number
+ * @minor: Version ID minor number
+ * @patch: Version ID patch number
+ * @build: Version ID build number
+ */
+typedef struct cdf_packed {
+ uint8_t major;
+ uint8_t minor;
+ uint8_t patch;
+ uint8_t build;
+} tDriverVersion;
+
+/**
+ * typedef t_iw_oem_data_cap - OEM Data Capabilities
+ * @oem_target_signature: Signature of chipset vendor, e.g. QUALCOMM
+ * @oem_target_type: Chip type
+ * @oem_fw_version: Firmware version
+ * @driver_version: Host software version
+ * @allowed_dwell_time_min: Channel dwell time - allowed minimum
+ * @allowed_dwell_time_max: Channel dwell time - allowed maximum
+ * @curr_dwell_time_min: Channel dwell time - current minimim
+ * @curr_dwell_time_max: Channel dwell time - current maximum
+ * @supported_bands: Supported bands, 2.4G or 5G Hz
+ * @num_channels: Num of channels IDs to follow
+ * @channel_list: List of channel IDs
+ */
+typedef struct cdf_packed {
+ uint8_t oem_target_signature[OEM_TARGET_SIGNATURE_LEN];
+ uint32_t oem_target_type;
+ uint32_t oem_fw_version;
+ tDriverVersion driver_version;
+ uint16_t allowed_dwell_time_min;
+ uint16_t allowed_dwell_time_max;
+ uint16_t curr_dwell_time_min;
+ uint16_t curr_dwell_time_max;
+ uint16_t supported_bands;
+ uint16_t num_channels;
+ uint8_t channel_list[OEM_CAP_MAX_NUM_CHANNELS];
+} t_iw_oem_data_cap;
+
+/**
+ * typedef tHddChannelInfo - Channel information
+ * @chan_id: channel id
+ * @reserved0: reserved for padding and future use
+ * @mhz: primary 20 MHz channel frequency in mhz
+ * @band_center_freq1: Center frequency 1 in MHz
+ * @band_center_freq2: Center frequency 2 in MHz, valid only for 11ac
+ * VHT 80+80 mode
+ * @info: channel info
+ * @reg_info_1: regulatory information field 1 which contains min power,
+ * max power, reg power and reg class id
+ * @reg_info_2: regulatory information field 2 which contains antennamax
+ */
+typedef struct cdf_packed {
+ uint32_t chan_id;
+ uint32_t reserved0;
+ uint32_t mhz;
+ uint32_t band_center_freq1;
+ uint32_t band_center_freq2;
+ uint32_t info;
+ uint32_t reg_info_1;
+ uint32_t reg_info_2;
+} tHddChannelInfo;
+
+/**
+ * typedef tPeerStatusInfo - Status information for a given peer
+ * @peer_mac_addr: peer mac address
+ * @peer_status: peer status: 1: CONNECTED, 2: DISCONNECTED
+ * @vdev_id: vdev_id for the peer mac
+ * @peer_capability: peer capability: 0: RTT/RTT2, 1: RTT3. Default is 0
+ * @reserved0: reserved0
+ * @peer_chan_info: channel info on which peer is connected
+ */
+typedef struct cdf_packed {
+ uint8_t peer_mac_addr[ETH_ALEN];
+ uint8_t peer_status;
+ uint8_t vdev_id;
+ uint32_t peer_capability;
+ uint32_t reserved0;
+ tHddChannelInfo peer_chan_info;
+} tPeerStatusInfo;
+
+void hdd_send_peer_status_ind_to_oem_app(struct cdf_mac_addr *peerMac,
+ uint8_t peerStatus,
+ uint8_t peerTimingMeasCap,
+ uint8_t sessionId,
+ tSirSmeChanInfo *chan_info);
+
+int iw_get_oem_data_cap(struct net_device *dev, struct iw_request_info *info,
+ union iwreq_data *wrqu, char *extra);
+
+int oem_activate_service(struct hdd_context_s *hdd_ctx);
+
+void hdd_send_oem_data_rsp_msg(int length, uint8_t *oemDataRsp);
+
+#endif /* __WLAN_HDD_OEM_DATA_H__ */
+
+#endif /* FEATURE_OEM_DATA_SUPPORT */
diff --git a/core/hdd/inc/wlan_hdd_p2p.h b/core/hdd/inc/wlan_hdd_p2p.h
new file mode 100644
index 0000000..b9ef344
--- /dev/null
+++ b/core/hdd/inc/wlan_hdd_p2p.h
@@ -0,0 +1,202 @@
+/*
+ * Copyright (c) 2012-2015 The Linux Foundation. All rights reserved.
+ *
+ * Previously licensed under the ISC license by Qualcomm Atheros, Inc.
+ *
+ *
+ * Permission to use, copy, modify, and/or distribute this software for
+ * any purpose with or without fee is hereby granted, provided that the
+ * above copyright notice and this permission notice appear in all
+ * copies.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
+ * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE
+ * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
+ * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
+ * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
+ * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
+ * PERFORMANCE OF THIS SOFTWARE.
+ */
+
+/*
+ * This file was originally distributed by Qualcomm Atheros, Inc.
+ * under proprietary terms before Copyright ownership was assigned
+ * to the Linux Foundation.
+ */
+
+#ifndef __P2P_H
+#define __P2P_H
+/**===========================================================================
+
+ \file wlan_hdd_p2p.h
+
+ \brief Linux HDD P2P include file
+
+ ==========================================================================*/
+#define ACTION_FRAME_TX_TIMEOUT 2000
+#define WAIT_CANCEL_REM_CHAN 1000
+#define WAIT_REM_CHAN_READY 1000
+#define WAIT_CHANGE_CHANNEL_FOR_OFFCHANNEL_TX 3000
+#define ESTIMATED_ROC_DUR_REQD_FOR_ACTION_TX 20
+#define COMPLETE_EVENT_PROPOGATE_TIME 10
+
+#ifdef QCA_WIFI_3_0_EMU
+#define ACTION_FRAME_DEFAULT_WAIT 500
+#else
+#define ACTION_FRAME_DEFAULT_WAIT 200
+#endif
+
+#define WLAN_HDD_GET_TYPE_FRM_FC(__fc__) (((__fc__) & 0x0F) >> 2)
+#define WLAN_HDD_GET_SUBTYPE_FRM_FC(__fc__) (((__fc__) & 0xF0) >> 4)
+#define WLAN_HDD_80211_FRM_DA_OFFSET 4
+#define P2P_WILDCARD_SSID_LEN 7
+#define P2P_WILDCARD_SSID "DIRECT-"
+
+#ifdef QCA_WIFI_3_0_EMU
+#define P2P_ROC_DURATION_MULTIPLIER_GO_PRESENT 2
+#define P2P_ROC_DURATION_MULTIPLIER_GO_ABSENT 3
+#else
+#define P2P_ROC_DURATION_MULTIPLIER_GO_PRESENT 2
+#define P2P_ROC_DURATION_MULTIPLIER_GO_ABSENT 5
+#endif
+
+#ifdef WLAN_FEATURE_11W
+#define WLAN_HDD_SET_WEP_FRM_FC(__fc__) ((__fc__) = ((__fc__) | 0x40))
+#endif /* WLAN_FEATURE_11W */
+
+#define HDD_P2P_MAX_ROC_DURATION 1000
+#define MAX_ROC_REQ_QUEUE_ENTRY 10
+
+enum hdd_rx_flags {
+ HDD_RX_FLAG_DECRYPTED = 1 << 0,
+ HDD_RX_FLAG_MMIC_STRIPPED = 1 << 1,
+ HDD_RX_FLAG_IV_STRIPPED = 1 << 2,
+};
+
+#define P2P_POWER_SAVE_TYPE_OPPORTUNISTIC (1 << 0)
+#define P2P_POWER_SAVE_TYPE_PERIODIC_NOA (1 << 1)
+#define P2P_POWER_SAVE_TYPE_SINGLE_NOA (1 << 2)
+
+#ifdef WLAN_FEATURE_P2P_DEBUG
+typedef enum { P2P_NOT_ACTIVE,
+ P2P_GO_NEG_PROCESS,
+ P2P_GO_NEG_COMPLETED,
+ P2P_CLIENT_CONNECTING_STATE_1,
+ P2P_GO_COMPLETED_STATE,
+ P2P_CLIENT_CONNECTED_STATE_1,
+ P2P_CLIENT_DISCONNECTED_STATE,
+ P2P_CLIENT_CONNECTING_STATE_2,
+ P2P_CLIENT_COMPLETED_STATE} tP2PConnectionStatus;
+
+extern tP2PConnectionStatus global_p2p_connection_status;
+#endif
+
+typedef struct p2p_app_setP2pPs {
+ uint8_t opp_ps;
+ uint32_t ctWindow;
+ uint8_t count;
+ uint32_t duration;
+ uint32_t interval;
+ uint32_t single_noa_duration;
+ uint8_t psSelection;
+} p2p_app_setP2pPs_t;
+
+int wlan_hdd_cfg80211_remain_on_channel(struct wiphy *wiphy,
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 6, 0))
+ struct wireless_dev *wdev,
+#else
+ struct net_device *dev,
+#endif
+ struct ieee80211_channel *chan,
+#if (LINUX_VERSION_CODE < KERNEL_VERSION(3, 8, 0))
+ enum nl80211_channel_type channel_type,
+#endif
+ unsigned int duration, u64 *cookie);
+
+int wlan_hdd_cfg80211_cancel_remain_on_channel(struct wiphy *wiphy,
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 6, 0))
+ struct wireless_dev *wdev,
+#else
+ struct net_device *dev,
+#endif
+ u64 cookie);
+
+int wlan_hdd_cfg80211_mgmt_tx_cancel_wait(struct wiphy *wiphy,
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 6, 0))
+ struct wireless_dev *wdev,
+#else
+ struct net_device *dev,
+#endif
+ u64 cookie);
+
+int hdd_set_p2p_ps(struct net_device *dev, void *msgData);
+int hdd_set_p2p_opps(struct net_device *dev, uint8_t *command);
+int hdd_set_p2p_noa(struct net_device *dev, uint8_t *command);
+
+void hdd_indicate_mgmt_frame(hdd_adapter_t *pAdapter,
+ uint32_t nFrameLength, uint8_t *pbFrames,
+ uint8_t frameType, uint32_t rxChan, int8_t rxRssi);
+
+void hdd_remain_chan_ready_handler(hdd_adapter_t *pAdapter,
+ uint32_t scan_id);
+void hdd_send_action_cnf(hdd_adapter_t *pAdapter, bool actionSendSuccess);
+int wlan_hdd_check_remain_on_channel(hdd_adapter_t *pAdapter);
+void wlan_hdd_cancel_existing_remain_on_channel(hdd_adapter_t *pAdapter);
+
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 14, 0))
+int wlan_hdd_mgmt_tx(struct wiphy *wiphy, struct wireless_dev *wdev,
+ struct cfg80211_mgmt_tx_params *params, u64 *cookie);
+#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 6, 0))
+int wlan_hdd_mgmt_tx(struct wiphy *wiphy, struct wireless_dev *wdev,
+ struct ieee80211_channel *chan, bool offchan,
+#if (LINUX_VERSION_CODE < KERNEL_VERSION(3, 8, 0))
+ enum nl80211_channel_type channel_type,
+ bool channel_type_valid,
+#endif
+ unsigned int wait,
+ const u8 *buf, size_t len, bool no_cck,
+ bool dont_wait_for_ack, u64 *cookie);
+#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 3, 0))
+int wlan_hdd_mgmt_tx(struct wiphy *wiphy, struct net_device *dev,
+ struct ieee80211_channel *chan, bool offchan,
+ enum nl80211_channel_type channel_type,
+ bool channel_type_valid, unsigned int wait,
+ const u8 *buf, size_t len, bool no_cck,
+ bool dont_wait_for_ack, u64 *cookie);
+#else
+int wlan_hdd_mgmt_tx(struct wiphy *wiphy, struct net_device *dev,
+ struct ieee80211_channel *chan, bool offchan,
+ enum nl80211_channel_type channel_type,
+ bool channel_type_valid, unsigned int wait,
+ const u8 *buf, size_t len, u64 *cookie);
+#endif
+
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 7, 0))
+struct wireless_dev *wlan_hdd_add_virtual_intf(struct wiphy *wiphy,
+ const char *name,
+ enum nl80211_iftype type,
+ u32 *flags,
+ struct vif_params *params);
+#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 6, 0))
+struct wireless_dev *wlan_hdd_add_virtual_intf(struct wiphy *wiphy, char *name,
+ enum nl80211_iftype type,
+ u32 *flags,
+ struct vif_params *params);
+#else
+struct net_device *wlan_hdd_add_virtual_intf(struct wiphy *wiphy, char *name,
+ enum nl80211_iftype type,
+ u32 *flags,
+ struct vif_params *params);
+#endif
+
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 6, 0))
+int wlan_hdd_del_virtual_intf(struct wiphy *wiphy, struct wireless_dev *wdev);
+#else
+int wlan_hdd_del_virtual_intf(struct wiphy *wiphy, struct net_device *dev);
+#endif
+
+void wlan_hdd_cleanup_remain_on_channel_ctx(hdd_adapter_t *pAdapter);
+
+void wlan_hdd_roc_request_dequeue(struct work_struct *work);
+#endif /* __P2P_H */
diff --git a/core/hdd/inc/wlan_hdd_power.h b/core/hdd/inc/wlan_hdd_power.h
new file mode 100644
index 0000000..c6157f0
--- /dev/null
+++ b/core/hdd/inc/wlan_hdd_power.h
@@ -0,0 +1,190 @@
+/*
+ * Copyright (c) 2012, 2014-2015 The Linux Foundation. All rights reserved.
+ *
+ * Previously licensed under the ISC license by Qualcomm Atheros, Inc.
+ *
+ *
+ * Permission to use, copy, modify, and/or distribute this software for
+ * any purpose with or without fee is hereby granted, provided that the
+ * above copyright notice and this permission notice appear in all
+ * copies.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
+ * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE
+ * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
+ * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
+ * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
+ * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
+ * PERFORMANCE OF THIS SOFTWARE.
+ */
+
+/*
+ * This file was originally distributed by Qualcomm Atheros, Inc.
+ * under proprietary terms before Copyright ownership was assigned
+ * to the Linux Foundation.
+ */
+
+#ifndef __WLAN_HDD_POWER_H
+#define __WLAN_HDD_POWER_H
+
+/**
+ * DOC: wlan_hdd_power.h
+ *
+ * HDD Power Management API
+ */
+
+#include "wlan_hdd_main.h"
+
+#ifdef WLAN_FEATURE_PACKET_FILTERING
+
+#define HDD_MAX_CMP_PER_PACKET_FILTER 5
+#define HDD_FILTER_IPV6_MC_UC 1
+#define HDD_FILTER_IPV6_MC 0
+#define HDD_FILTER_ID_IPV6_MC 10
+#define HDD_FILTER_ID_IPV6_UC 11
+
+#define HDD_IPV6_MC_CMP_DATA 0x33
+#define HDD_IPV6_UC_CMP_DATA 0x01
+#define HDD_IPV6_CMP_DATA_0 0x86
+#define HDD_IPV6_CMP_DATA_1 0xDD
+
+#define HDD_WLAN_MAC_ADDR_LEN 6
+#define HDD_MAX_NUM_MULTICAST_ADDRESS 10
+
+/**
+ * enum pkt_filter_protocol_layer - packet filter protocol layer
+ * @HDD_FILTER_PROTO_TYPE_INVALID: Invalid initial value
+ * @HDD_FILTER_PROTO_TYPE_MAC: MAC protocol
+ * @HDD_FILTER_PROTO_TYPE_ARP: ARP protocol
+ * @HDD_FILTER_PROTO_TYPE_IPV4: IP V4 protocol
+ * @HDD_FILTER_PROTO_TYPE_IPV6: IP V6 protocol
+ * @HDD_FILTER_PROTO_TYPE_UDP: UDP protocol
+ * @HDD_FILTER_PROTO_TYPE_INVALID: Max place holder value
+ */
+enum pkt_filter_protocol_layer {
+ HDD_FILTER_PROTO_TYPE_INVALID = 0,
+ HDD_FILTER_PROTO_TYPE_MAC = 1,
+ HDD_FILTER_PROTO_TYPE_ARP = 2,
+ HDD_FILTER_PROTO_TYPE_IPV4 = 3,
+ HDD_FILTER_PROTO_TYPE_IPV6 = 4,
+ HDD_FILTER_PROTO_TYPE_UDP = 5,
+ HDD_FILTER_PROTO_TYPE_MAX
+};
+
+/**
+ * enum pkt_filter_action - packet filter action
+ * @HDD_RCV_FILTER_INVALID: Invalid initial value
+ * @HDD_RCV_FILTER_SET: Packet filter set
+ * @HDD_RCV_FILTER_CLEAR: Packet filter clear
+ * @HDD_RCV_FILTER_MAX: Max place holder value
+ */
+enum pkt_filter_action {
+ HDD_RCV_FILTER_INVALID = 0,
+ HDD_RCV_FILTER_SET = 1,
+ HDD_RCV_FILTER_CLEAR = 2,
+ HDD_RCV_FILTER_MAX
+};
+
+/**
+ * enum pkt_filter_compare_flag - packet filter compare flag
+ * @HDD_FILTER_CMP_TYPE_INVALID: Invalid initial value
+ * @HDD_FILTER_CMP_TYPE_EQUAL: Compare if filter is equal
+ * @HDD_FILTER_CMP_TYPE_MASK_EQUAL: Compare if filter mask is equal
+ * @HDD_FILTER_CMP_TYPE_NOT_EQUAL: Compare if filter is not equal
+ * @HDD_FILTER_CMP_TYPE_MASK_NOT_EQUAL: Compare if filter mask is not equal
+ * @HDD_FILTER_CMP_TYPE_MAX: Max place holder value
+ */
+enum pkt_filter_compare_flag {
+ HDD_FILTER_CMP_TYPE_INVALID = 0,
+ HDD_FILTER_CMP_TYPE_EQUAL = 1,
+ HDD_FILTER_CMP_TYPE_MASK_EQUAL = 2,
+ HDD_FILTER_CMP_TYPE_NOT_EQUAL = 3,
+ HDD_FILTER_CMP_TYPE_MASK_NOT_EQUAL = 4,
+ HDD_FILTER_CMP_TYPE_MAX
+};
+
+/**
+ * struct pkt_filter_param_cfg - packet filter parameter config
+ * @protocol_layer: Protocol layer
+ * @compare_flag: Compare flag
+ * @data_fffset: Data offset
+ * @data_length: Data length
+ * @compare_data: Compare data
+ * @data_mask: Data mask
+ */
+struct pkt_filter_param_cfg {
+ uint8_t protocol_layer;
+ uint8_t compare_flag;
+ uint8_t data_offset;
+ uint8_t data_length;
+ uint8_t compare_data[SIR_MAX_FILTER_TEST_DATA_LEN];
+ uint8_t data_mask[SIR_MAX_FILTER_TEST_DATA_LEN];
+};
+
+/**
+ * struct pkt_filter_cfg - packet filter config received from user space
+ * @filter_action: Filter action
+ * @filter_id: Filter id
+ * @num_params: Number of parameters
+ * @params_data: Packet filter parameters detail
+ */
+struct pkt_filter_cfg {
+ uint8_t filter_action;
+ uint8_t filter_id;
+ uint8_t num_params;
+ struct pkt_filter_param_cfg params_data[HDD_MAX_CMP_PER_PACKET_FILTER];
+};
+
+#endif
+
+
+/* SSR shutdown & re-init functions */
+CDF_STATUS hdd_wlan_shutdown(void);
+CDF_STATUS hdd_wlan_re_init(void *hif_sc);
+
+void hdd_conf_mcastbcast_filter(hdd_context_t *pHddCtx, bool setfilter);
+CDF_STATUS hdd_conf_arp_offload(hdd_adapter_t *pAdapter, bool fenable);
+void hdd_conf_hostoffload(hdd_adapter_t *pAdapter, bool fenable);
+
+#ifdef WLAN_FEATURE_PACKET_FILTERING
+void wlan_hdd_set_mc_addr_list(hdd_adapter_t *pAdapter, uint8_t set);
+#else
+static inline void
+wlan_hdd_set_mc_addr_list(hdd_adapter_t *pAdapter, uint8_t set)
+{
+}
+#endif
+
+int wlan_hdd_cfg80211_suspend_wlan(struct wiphy *wiphy,
+ struct cfg80211_wowlan *wow);
+
+int wlan_hdd_cfg80211_resume_wlan(struct wiphy *wiphy);
+
+void hdd_ipv4_notifier_work_queue(struct work_struct *work);
+#ifdef WLAN_NS_OFFLOAD
+void hdd_ipv6_notifier_work_queue(struct work_struct *work);
+#endif
+
+int wlan_hdd_cfg80211_get_txpower(struct wiphy *wiphy,
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 8, 0)
+ struct wireless_dev *wdev,
+#endif
+ int *dbm);
+int wlan_hdd_cfg80211_set_txpower(struct wiphy *wiphy,
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 8, 0)
+ struct wireless_dev *wdev,
+#endif
+ enum nl80211_tx_power_setting type,
+ int dbm);
+int wlan_hdd_cfg80211_set_power_mgmt(struct wiphy *wiphy,
+ struct net_device *dev, bool mode,
+ int timeout);
+
+int wlan_hdd_ipv4_changed(struct notifier_block *nb,
+ unsigned long data, void *arg);
+
+int wlan_hdd_ipv6_changed(struct notifier_block *nb,
+ unsigned long data, void *arg);
+
+#endif /* __WLAN_HDD_POWER_H */
diff --git a/core/hdd/inc/wlan_hdd_softap_tx_rx.h b/core/hdd/inc/wlan_hdd_softap_tx_rx.h
new file mode 100644
index 0000000..2061ec7
--- /dev/null
+++ b/core/hdd/inc/wlan_hdd_softap_tx_rx.h
@@ -0,0 +1,94 @@
+/*
+ * Copyright (c) 2014-2015 The Linux Foundation. All rights reserved.
+ *
+ * Previously licensed under the ISC license by Qualcomm Atheros, Inc.
+ *
+ *
+ * Permission to use, copy, modify, and/or distribute this software for
+ * any purpose with or without fee is hereby granted, provided that the
+ * above copyright notice and this permission notice appear in all
+ * copies.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
+ * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE
+ * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
+ * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
+ * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
+ * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
+ * PERFORMANCE OF THIS SOFTWARE.
+ */
+
+/*
+ * This file was originally distributed by Qualcomm Atheros, Inc.
+ * under proprietary terms before Copyright ownership was assigned
+ * to the Linux Foundation.
+ */
+
+#if !defined(WLAN_HDD_SOFTAP_TX_RX_H)
+#define WLAN_HDD_SOFTAP_TX_RX_H
+
+/**
+ * DOC: wlan_hdd_softap_tx_rx.h
+ *
+ *Linux HDD SOFTAP Tx/RX APIs
+ */
+
+#include <wlan_hdd_hostapd.h>
+
+int hdd_softap_hard_start_xmit(struct sk_buff *skb,
+ struct net_device *dev);
+void hdd_softap_tx_timeout(struct net_device *dev);
+CDF_STATUS hdd_softap_init_tx_rx(hdd_adapter_t *pAdapter);
+CDF_STATUS hdd_softap_deinit_tx_rx(hdd_adapter_t *pAdapter);
+CDF_STATUS hdd_softap_init_tx_rx_sta(hdd_adapter_t *pAdapter,
+ uint8_t STAId,
+ struct cdf_mac_addr *pmacAddrSTA);
+CDF_STATUS hdd_softap_deinit_tx_rx_sta(hdd_adapter_t *pAdapter,
+ uint8_t STAId);
+CDF_STATUS hdd_softap_rx_packet_cbk(void *cds_context,
+ cdf_nbuf_t rxBufChain,
+ uint8_t staId);
+#ifdef IPA_OFFLOAD
+CDF_STATUS hdd_softap_rx_mul_packet_cbk(void *cds_context,
+ cdf_nbuf_t rx_buf_list, uint8_t staId);
+#endif /* IPA_OFFLOAD */
+
+CDF_STATUS hdd_softap_deregister_sta(hdd_adapter_t *pAdapter,
+ uint8_t staId);
+CDF_STATUS hdd_softap_register_sta(hdd_adapter_t *pAdapter,
+ bool fAuthRequired,
+ bool fPrivacyBit,
+ uint8_t staId,
+ uint8_t ucastSig,
+ uint8_t bcastSig,
+ struct cdf_mac_addr *pPeerMacAddress,
+ bool fWmmEnabled);
+CDF_STATUS hdd_softap_register_bc_sta(hdd_adapter_t *pAdapter,
+ bool fPrivacyBit);
+CDF_STATUS hdd_softap_deregister_bc_sta(hdd_adapter_t *pAdapter);
+CDF_STATUS hdd_softap_stop_bss(hdd_adapter_t *pHostapdAdapter);
+CDF_STATUS hdd_softap_change_sta_state(hdd_adapter_t *pAdapter,
+ struct cdf_mac_addr *pDestMacAddress,
+ enum ol_txrx_peer_state state);
+CDF_STATUS hdd_softap_get_sta_id(hdd_adapter_t *pAdapter,
+ struct cdf_mac_addr *pMacAddress,
+ uint8_t *staId);
+
+#ifdef QCA_LL_LEGACY_TX_FLOW_CONTROL
+void hdd_softap_tx_resume_timer_expired_handler(void *adapter_context);
+void hdd_softap_tx_resume_cb(void *adapter_context, bool tx_resume);
+#else
+static inline
+void hdd_softap_tx_resume_timer_expired_handler(void *adapter_context)
+{
+ return;
+}
+static inline
+void hdd_softap_tx_resume_cb(void *adapter_context, bool tx_resume)
+{
+ return;
+}
+#endif /* QCA_LL_LEGACY_TX_FLOW_CONTROL */
+
+#endif /* end #if !defined(WLAN_HDD_SOFTAP_TX_RX_H) */
diff --git a/core/hdd/inc/wlan_hdd_tdls.h b/core/hdd/inc/wlan_hdd_tdls.h
new file mode 100644
index 0000000..285bb78
--- /dev/null
+++ b/core/hdd/inc/wlan_hdd_tdls.h
@@ -0,0 +1,633 @@
+/*
+ * Copyright (c) 2012-2015 The Linux Foundation. All rights reserved.
+ *
+ * Previously licensed under the ISC license by Qualcomm Atheros, Inc.
+ *
+ *
+ * Permission to use, copy, modify, and/or distribute this software for
+ * any purpose with or without fee is hereby granted, provided that the
+ * above copyright notice and this permission notice appear in all
+ * copies.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
+ * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE
+ * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
+ * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
+ * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
+ * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
+ * PERFORMANCE OF THIS SOFTWARE.
+ */
+
+/*
+ * This file was originally distributed by Qualcomm Atheros, Inc.
+ * under proprietary terms before Copyright ownership was assigned
+ * to the Linux Foundation.
+ */
+
+#ifndef __HDD_TDLS_H
+#define __HDD_TDLS_H
+/**
+ * DOC: wlan_hdd_tdls.h
+ * WLAN Host Device Driver TDLS include file
+ */
+
+#ifdef FEATURE_WLAN_TDLS
+
+#define TDLS_SUB_DISCOVERY_PERIOD 100
+
+#define TDLS_MAX_DISCOVER_REQS_PER_TIMER 1
+
+#define TDLS_DISCOVERY_PERIOD 3600000
+
+#define TDLS_TX_STATS_PERIOD 3600000
+
+#define TDLS_IMPLICIT_TRIGGER_PKT_THRESHOLD 100
+
+#define TDLS_RX_IDLE_TIMEOUT 5000
+
+#define TDLS_RSSI_TRIGGER_HYSTERESIS 50
+
+/*
+ * Before UpdateTimer expires, we want to timeout discovery response
+ * should not be more than 2000.
+ */
+#define TDLS_DISCOVERY_TIMEOUT_BEFORE_UPDATE 1000
+
+#define TDLS_CTX_MAGIC 0x54444c53 /* "TDLS" */
+
+#define TDLS_MAX_SCAN_SCHEDULE 10
+#define TDLS_MAX_SCAN_REJECT 5
+#define TDLS_DELAY_SCAN_PER_CONNECTION 100
+#define TDLS_MAX_CONNECTED_PEERS_TO_ALLOW_SCAN 1
+
+#define TDLS_IS_CONNECTED(peer) \
+ ((eTDLS_LINK_CONNECTED == (peer)->link_status) || \
+ (eTDLS_LINK_TEARING == (peer)->link_status))
+
+/* Bit mask flag for tdls_option to FW */
+#define ENA_TDLS_OFFCHAN (1 << 0) /* TDLS Off Channel support */
+#define ENA_TDLS_BUFFER_STA (1 << 1) /* TDLS Buffer STA support */
+#define ENA_TDLS_SLEEP_STA (1 << 2) /* TDLS Sleep STA support */
+#define TDLS_SEC_OFFCHAN_OFFSET_0 0
+#define TDLS_SEC_OFFCHAN_OFFSET_40PLUS 40
+#define TDLS_SEC_OFFCHAN_OFFSET_40MINUS (-40)
+#define TDLS_SEC_OFFCHAN_OFFSET_80 80
+#define TDLS_SEC_OFFCHAN_OFFSET_160 160
+
+#define TDLS_PEER_LIST_SIZE 256
+
+#define EXTTDLS_EVENT_BUF_SIZE (4096)
+
+/**
+ * struct tdls_config_params_t - tdls config params
+ *
+ * @tdls: tdls
+ * @tx_period_t: tx period
+ * @tx_packet_n: tx packets number
+ * @discovery_tries_n: discovery tries
+ * @idle_packet_n: idle packet number
+ * @rssi_trigger_threshold: rssi trigger threshold
+ * @rssi_teardown_threshold: rssi tear down threshold
+ * @rssi_delta: rssi delta
+ */
+typedef struct {
+ uint32_t tdls;
+ uint32_t tx_period_t;
+ uint32_t tx_packet_n;
+ uint32_t discovery_tries_n;
+ uint32_t idle_packet_n;
+ int32_t rssi_trigger_threshold;
+ int32_t rssi_teardown_threshold;
+ int32_t rssi_delta;
+} tdls_config_params_t;
+
+/**
+ * struct tdls_scan_context_t - tdls scan context
+ *
+ * @wiphy: pointer to wiphy structure
+ * @dev: pointer to netdev
+ * @scan_request: scan request
+ * @magic: magic
+ * @attempt: attempt
+ * @reject: reject
+ * @tdls_scan_work: delayed tdls scan work
+ */
+typedef struct {
+ struct wiphy *wiphy;
+#if (LINUX_VERSION_CODE < KERNEL_VERSION(3, 6, 0))
+ struct net_device *dev;
+#endif
+ struct cfg80211_scan_request *scan_request;
+ int magic;
+ int attempt;
+ int reject;
+ struct delayed_work tdls_scan_work;
+} tdls_scan_context_t;
+
+/**
+ * enum eTDLSSupportMode - tdls support mode
+ *
+ * @eTDLS_SUPPORT_NOT_ENABLED: tdls support not enabled
+ * @eTDLS_SUPPORT_DISABLED: suppress implicit trigger and not
+ * respond to the peer
+ * @eTDLS_SUPPORT_EXPLICIT_TRIGGER_ONLY: suppress implicit trigger,
+ * but respond to the peer
+ * @eTDLS_SUPPORT_ENABLED: implicit trigger
+ */
+typedef enum {
+ eTDLS_SUPPORT_NOT_ENABLED = 0,
+ eTDLS_SUPPORT_DISABLED,
+ eTDLS_SUPPORT_EXPLICIT_TRIGGER_ONLY,
+ eTDLS_SUPPORT_ENABLED,
+} eTDLSSupportMode;
+
+/**
+ * enum tTDLSCapType - tdls capability type
+ *
+ * @eTDLS_CAP_NOT_SUPPORTED: tdls not supported
+ * @eTDLS_CAP_UNKNOWN: unknown capability
+ * @eTDLS_CAP_SUPPORTED: tdls capability supported
+ */
+typedef enum eTDLSCapType {
+ eTDLS_CAP_NOT_SUPPORTED = -1,
+ eTDLS_CAP_UNKNOWN = 0,
+ eTDLS_CAP_SUPPORTED = 1,
+} tTDLSCapType;
+
+/**
+ * enum tTDLSLinkStatus - tdls link status
+ *
+ * @eTDLS_LINK_IDLE: tdls link idle
+ * @eTDLS_LINK_DISCOVERING: tdls link discovering
+ * @eTDLS_LINK_DISCOVERED: tdls link discovered
+ * @eTDLS_LINK_CONNECTING: tdls link connecting
+ * @eTDLS_LINK_CONNECTED: tdls link connected
+ * @eTDLS_LINK_TEARING: tdls link tearing
+ */
+typedef enum eTDLSLinkStatus {
+ eTDLS_LINK_IDLE = 0,
+ eTDLS_LINK_DISCOVERING,
+ eTDLS_LINK_DISCOVERED,
+ eTDLS_LINK_CONNECTING,
+ eTDLS_LINK_CONNECTED,
+ eTDLS_LINK_TEARING,
+} tTDLSLinkStatus;
+
+/**
+ * enum tTDLSLinkReason - tdls link reason
+ *
+ * @eTDLS_LINK_SUCCESS: Success
+ * @eTDLS_LINK_UNSPECIFIED: Unspecified reason
+ * @eTDLS_LINK_NOT_SUPPORTED: Remote side doesn't support TDLS
+ * @eTDLS_LINK_UNSUPPORTED_BAND: Remote side doesn't support this band
+ * @eTDLS_LINK_NOT_BENEFICIAL: Going to AP is better than direct
+ * @eTDLS_LINK_DROPPED_BY_REMOTE: Remote side doesn't want it anymore
+ */
+typedef enum {
+ eTDLS_LINK_SUCCESS,
+ eTDLS_LINK_UNSPECIFIED = -1,
+ eTDLS_LINK_NOT_SUPPORTED = -2,
+ eTDLS_LINK_UNSUPPORTED_BAND = -3,
+ eTDLS_LINK_NOT_BENEFICIAL = -4,
+ eTDLS_LINK_DROPPED_BY_REMOTE = -5
+} tTDLSLinkReason;
+
+/**
+ * struct tdls_req_params_t - tdls request parameters
+ *
+ * @channel: channel hint, in channel number (NOT frequency)
+ * @global_operating_class: operating class to use
+ * @max_latency_ms: max latency that can be tolerated by apps
+ * @min_bandwidth_kbps: bandwidth required by apps, in kilo bits per second
+ */
+typedef struct {
+ int channel;
+ int global_operating_class;
+ int max_latency_ms;
+ int min_bandwidth_kbps;
+} tdls_req_params_t;
+
+/**
+ * enum tdls_state_t - tdls state
+ *
+ * @QCA_WIFI_HAL_TDLS_DISABLED: TDLS is not enabled, or is disabled now
+ * @QCA_WIFI_HAL_TDLS_ENABLED: TDLS is enabled, but not yet tried
+ * @QCA_WIFI_HAL_TDLS_ESTABLISHED: Direct link is established
+ * @QCA_WIFI_HAL_TDLS_ESTABLISHED_OFF_CHANNEL: Direct link established using MCC
+ * @QCA_WIFI_HAL_TDLS_DROPPED: Direct link was established, but is now dropped
+ * @QCA_WIFI_HAL_TDLS_FAILED: Direct link failed
+ */
+typedef enum {
+ QCA_WIFI_HAL_TDLS_DISABLED = 1,
+ QCA_WIFI_HAL_TDLS_ENABLED,
+ QCA_WIFI_HAL_TDLS_ESTABLISHED,
+ QCA_WIFI_HAL_TDLS_ESTABLISHED_OFF_CHANNEL,
+ QCA_WIFI_HAL_TDLS_DROPPED,
+ QCA_WIFI_HAL_TDLS_FAILED
+} tdls_state_t;
+
+typedef int (*cfg80211_exttdls_callback)(const uint8_t *mac,
+ uint32_t state,
+ int32_t reason, void *ctx);
+
+/**
+ * struct tdls_tx_tput_config_t - tdls tx throughput config
+ *
+ * @period: period
+ * @bytes: bytes
+ */
+typedef struct {
+ uint16_t period;
+ uint16_t bytes;
+} tdls_tx_tput_config_t;
+
+/**
+ * struct tdls_discovery_config_t - tdls discovery config
+ *
+ * @period: period
+ * @tries: number of tries
+ */
+typedef struct {
+ uint16_t period;
+ uint16_t tries;
+} tdls_discovery_config_t;
+
+/**
+ * struct tdls_rx_idle_config_t - tdls rx idle config
+ *
+ * @timeout: timeout
+ */
+typedef struct {
+ uint16_t timeout;
+} tdls_rx_idle_config_t;
+
+/**
+ * struct tdls_rssi_config_t - tdls rssi config
+ *
+ * @rssi_thres: rssi_thres
+ */
+typedef struct {
+ uint16_t rssi_thres;
+} tdls_rssi_config_t;
+
+struct _hddTdlsPeer_t;
+
+/**
+ * struct tdlsCtx_t - tdls context
+ *
+ * @peer_list: peer list
+ * @pAdapter: pointer to adapter
+ * @peerDiscoverTimer: peer discovery timer
+ * @peerDiscoveryTimeoutTimer: peer discovery timeout timer
+ * @threshold_config: threshold config
+ * @discovery_peer_cnt: discovery peer count
+ * @discovery_sent_cnt: discovery sent count
+ * @ap_rssi: ap rssi
+ * @curr_candidate: current candidate
+ * @implicit_setup: implicit setup work queue
+ * @magic: magic
+ *
+ */
+typedef struct {
+ struct list_head peer_list[TDLS_PEER_LIST_SIZE];
+ hdd_adapter_t *pAdapter;
+ cdf_mc_timer_t peerDiscoveryTimeoutTimer;
+ tdls_config_params_t threshold_config;
+ int32_t discovery_peer_cnt;
+ uint32_t discovery_sent_cnt;
+ int8_t ap_rssi;
+ struct _hddTdlsPeer_t *curr_candidate;
+ struct work_struct implicit_setup;
+ uint32_t magic;
+} tdlsCtx_t;
+
+/**
+ * struct hddTdlsPeer_t - tdls peer data
+ *
+ * @node: node
+ * @pHddTdlsCtx: pointer to tdls context
+ * @peerMac: peer mac address
+ * @staId: station identifier
+ * @rssi: rssi
+ * @tdls_support: tdls support
+ * @link_status: tdls link status
+ * @signature: signature
+ * @is_responder: is responder
+ * @discovery_processed: discovery processed flag
+ * @discovery_attempt: discovery attempt
+ * @tx_pkt: tx packet
+ * @rx_pkt: rx packet
+ * @uapsdQueues: uapsd queues
+ * @maxSp: max sp
+ * @isBufSta: is buffer sta
+ * @isOffChannelSupported: is offchannel supported flag
+ * @supported_channels_len: supported channels length
+ * @supported_channels: supported channels
+ * @supported_oper_classes_len: supported operation classes length
+ * @supported_oper_classes: supported operation classes
+ * @isForcedPeer: is forced peer
+ * @op_class_for_pref_off_chan: op class for preferred off channel
+ * @pref_off_chan_num: preferred off channel number
+ * @op_class_for_pref_off_chan_is_set: op class for preferred off channel set
+ * @reason: reason
+ * @state_change_notification: state change notification
+ */
+typedef struct _hddTdlsPeer_t {
+ struct list_head node;
+ tdlsCtx_t *pHddTdlsCtx;
+ tSirMacAddr peerMac;
+ uint16_t staId;
+ int8_t rssi;
+ tTDLSCapType tdls_support;
+ tTDLSLinkStatus link_status;
+ uint8_t signature;
+ uint8_t is_responder;
+ uint8_t discovery_processed;
+ uint16_t discovery_attempt;
+ uint16_t tx_pkt;
+ uint16_t rx_pkt;
+ uint8_t uapsdQueues;
+ uint8_t maxSp;
+ uint8_t isBufSta;
+ uint8_t isOffChannelSupported;
+ uint8_t supported_channels_len;
+ uint8_t supported_channels[SIR_MAC_MAX_SUPP_CHANNELS];
+ uint8_t supported_oper_classes_len;
+ uint8_t supported_oper_classes[SIR_MAC_MAX_SUPP_OPER_CLASSES];
+ bool isForcedPeer;
+ uint8_t op_class_for_pref_off_chan;
+ uint8_t pref_off_chan_num;
+ uint8_t op_class_for_pref_off_chan_is_set;
+ tTDLSLinkReason reason;
+ cfg80211_exttdls_callback state_change_notification;
+} hddTdlsPeer_t;
+
+/**
+ * struct tdlsConnInfo_t - tdls connection info
+ *
+ * @sessionId: Session ID
+ * @staId: TDLS peer station id
+ * @peerMac: peer mac address
+ */
+typedef struct {
+ uint8_t sessionId;
+ uint8_t staId;
+ struct cdf_mac_addr peerMac;
+} tdlsConnInfo_t;
+
+/**
+ * struct tdlsInfo_t - tdls info
+ *
+ * @vdev_id: vdev id
+ * @tdls_state: tdls state
+ * @notification_interval_ms: notification interval in ms
+ * @tx_discovery_threshold: tx discovery threshold
+ * @tx_teardown_threshold: tx teardown threshold
+ * @rssi_teardown_threshold: rx teardown threshold
+ * @rssi_delta: rssi delta
+ * @tdls_options: tdls options
+ * @peer_traffic_ind_window: peer traffic indication window
+ * @peer_traffic_response_timeout: peer traffic response timeout
+ * @puapsd_mask: puapsd mask
+ * @puapsd_inactivity_time: puapsd inactivity time
+ * @puapsd_rx_frame_threshold: puapsd rx frame threshold
+ */
+typedef struct {
+ uint32_t vdev_id;
+ uint32_t tdls_state;
+ uint32_t notification_interval_ms;
+ uint32_t tx_discovery_threshold;
+ uint32_t tx_teardown_threshold;
+ int32_t rssi_teardown_threshold;
+ int32_t rssi_delta;
+ uint32_t tdls_options;
+ uint32_t peer_traffic_ind_window;
+ uint32_t peer_traffic_response_timeout;
+ uint32_t puapsd_mask;
+ uint32_t puapsd_inactivity_time;
+ uint32_t puapsd_rx_frame_threshold;
+} tdlsInfo_t;
+
+int wlan_hdd_tdls_init(hdd_adapter_t *pAdapter);
+
+void wlan_hdd_tdls_exit(hdd_adapter_t *pAdapter);
+
+void wlan_hdd_tdls_extract_da(struct sk_buff *skb, uint8_t *mac);
+
+void wlan_hdd_tdls_extract_sa(struct sk_buff *skb, uint8_t *mac);
+
+int wlan_hdd_tdls_increment_pkt_count(hdd_adapter_t *pAdapter,
+ const uint8_t *mac, uint8_t tx);
+
+int wlan_hdd_tdls_set_sta_id(hdd_adapter_t *pAdapter, const uint8_t *mac,
+ uint8_t staId);
+
+hddTdlsPeer_t *wlan_hdd_tdls_find_peer(hdd_adapter_t *pAdapter,
+ const uint8_t *mac, bool mutexLock);
+
+hddTdlsPeer_t *wlan_hdd_tdls_find_all_peer(hdd_context_t *pHddCtx,
+ const uint8_t *mac);
+
+int wlan_hdd_tdls_get_link_establish_params(hdd_adapter_t *pAdapter,
+ const uint8_t *mac,
+ tCsrTdlsLinkEstablishParams *
+ tdlsLinkEstablishParams);
+hddTdlsPeer_t *wlan_hdd_tdls_get_peer(hdd_adapter_t *pAdapter,
+ const uint8_t *mac);
+
+int wlan_hdd_tdls_set_cap(hdd_adapter_t *pAdapter, const uint8_t *mac,
+ tTDLSCapType cap);
+
+void wlan_hdd_tdls_set_peer_link_status(hddTdlsPeer_t *curr_peer,
+ tTDLSLinkStatus status,
+ tTDLSLinkReason reason);
+void wlan_hdd_tdls_set_link_status(hdd_adapter_t *pAdapter,
+ const uint8_t *mac,
+ tTDLSLinkStatus linkStatus,
+ tTDLSLinkReason reason);
+
+int wlan_hdd_tdls_recv_discovery_resp(hdd_adapter_t *pAdapter,
+ const uint8_t *mac);
+
+int wlan_hdd_tdls_set_peer_caps(hdd_adapter_t *pAdapter,
+ const uint8_t *mac,
+ tCsrStaParams *StaParams,
+ bool isBufSta, bool isOffChannelSupported);
+
+int wlan_hdd_tdls_set_rssi(hdd_adapter_t *pAdapter, const uint8_t *mac,
+ int8_t rxRssi);
+
+int wlan_hdd_tdls_set_responder(hdd_adapter_t *pAdapter, const uint8_t *mac,
+ uint8_t responder);
+
+int wlan_hdd_tdls_set_signature(hdd_adapter_t *pAdapter, const uint8_t *mac,
+ uint8_t uSignature);
+
+int wlan_hdd_tdls_set_params(struct net_device *dev,
+ tdls_config_params_t *config);
+
+int wlan_hdd_tdls_reset_peer(hdd_adapter_t *pAdapter, const uint8_t *mac);
+
+uint16_t wlan_hdd_tdls_connected_peers(hdd_adapter_t *pAdapter);
+
+int wlan_hdd_tdls_get_all_peers(hdd_adapter_t *pAdapter, char *buf,
+ int buflen);
+
+void wlan_hdd_tdls_connection_callback(hdd_adapter_t *pAdapter);
+
+void wlan_hdd_tdls_disconnection_callback(hdd_adapter_t *pAdapter);
+
+void wlan_hdd_tdls_mgmt_completion_callback(hdd_adapter_t *pAdapter,
+ uint32_t statusCode);
+
+void wlan_hdd_tdls_tncrement_peer_count(hdd_adapter_t *pAdapter);
+
+void wlan_hdd_tdls_decrement_peer_count(hdd_adapter_t *pAdapter);
+
+hddTdlsPeer_t *wlan_hdd_tdls_is_progress(hdd_context_t *pHddCtx,
+ const uint8_t *mac, uint8_t skip_self);
+
+int wlan_hdd_tdls_copy_scan_context(hdd_context_t *pHddCtx,
+ struct wiphy *wiphy,
+#if (LINUX_VERSION_CODE < KERNEL_VERSION(3, 6, 0))
+ struct net_device *dev,
+#endif
+ struct cfg80211_scan_request *request);
+
+int wlan_hdd_tdls_scan_callback(hdd_adapter_t *pAdapter, struct wiphy *wiphy,
+#if (LINUX_VERSION_CODE < KERNEL_VERSION(3, 6, 0))
+ struct net_device *dev,
+#endif
+ struct cfg80211_scan_request *request);
+
+void wlan_hdd_tdls_scan_done_callback(hdd_adapter_t *pAdapter);
+
+void wlan_hdd_tdls_timer_restart(hdd_adapter_t *pAdapter,
+ cdf_mc_timer_t *timer,
+ uint32_t expirationTime);
+void wlan_hdd_tdls_indicate_teardown(hdd_adapter_t *pAdapter,
+ hddTdlsPeer_t *curr_peer,
+ uint16_t reason);
+
+void wlan_hdd_tdls_pre_setup_init_work(tdlsCtx_t *pHddTdlsCtx,
+ hddTdlsPeer_t *curr_candidate);
+
+int wlan_hdd_tdls_set_extctrl_param(hdd_adapter_t *pAdapter,
+ const uint8_t *mac,
+ uint32_t chan,
+ uint32_t max_latency,
+ uint32_t op_class, uint32_t min_bandwidth);
+int wlan_hdd_tdls_set_force_peer(hdd_adapter_t *pAdapter, const uint8_t *mac,
+ bool forcePeer);
+
+int wlan_hdd_tdls_extctrl_deconfig_peer(hdd_adapter_t *pAdapter,
+ const uint8_t *peer);
+int wlan_hdd_tdls_extctrl_config_peer(hdd_adapter_t *pAdapter,
+ const uint8_t *peer,
+ cfg80211_exttdls_callback callback,
+ uint32_t chan,
+ uint32_t max_latency,
+ uint32_t op_class,
+ uint32_t min_bandwidth);
+int wlan_hdd_tdls_get_status(hdd_adapter_t *pAdapter,
+ const uint8_t *mac, int32_t *state,
+ int32_t *reason);
+void wlan_hdd_tdls_get_wifi_hal_state(hddTdlsPeer_t *curr_peer,
+ int32_t *state, int32_t *reason);
+int wlan_hdd_set_callback(hddTdlsPeer_t *curr_peer,
+ cfg80211_exttdls_callback callback);
+void wlan_hdd_update_tdls_info(hdd_adapter_t *adapter, bool tdls_prohibited,
+ bool tdls_chan_swit_prohibited);
+
+int wlan_hdd_tdls_add_station(struct wiphy *wiphy,
+ struct net_device *dev, const uint8_t *mac,
+ bool update, tCsrStaParams *StaParams);
+
+int wlan_hdd_cfg80211_exttdls_enable(struct wiphy *wiphy,
+ struct wireless_dev *wdev,
+ const void *data,
+ int data_len);
+
+int wlan_hdd_cfg80211_exttdls_disable(struct wiphy *wiphy,
+ struct wireless_dev *wdev,
+ const void *data,
+ int data_len);
+
+int wlan_hdd_cfg80211_exttdls_get_status(struct wiphy *wiphy,
+ struct wireless_dev *wdev,
+ const void *data,
+ int data_len);
+
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 16, 0))
+int wlan_hdd_cfg80211_tdls_oper(struct wiphy *wiphy,
+ struct net_device *dev,
+ const uint8_t *peer,
+ enum nl80211_tdls_operation oper);
+#else
+int wlan_hdd_cfg80211_tdls_oper(struct wiphy *wiphy,
+ struct net_device *dev,
+ uint8_t *peer,
+ enum nl80211_tdls_operation oper);
+#endif
+
+#ifdef TDLS_MGMT_VERSION2
+int wlan_hdd_cfg80211_tdls_mgmt(struct wiphy *wiphy,
+ struct net_device *dev, u8 *peer,
+ u8 action_code, u8 dialog_token,
+ u16 status_code, u32 peer_capability,
+ const u8 *buf, size_t len);
+#else
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 17, 0))
+int wlan_hdd_cfg80211_tdls_mgmt(struct wiphy *wiphy,
+ struct net_device *dev, const uint8_t *peer,
+ uint8_t action_code, uint8_t dialog_token,
+ uint16_t status_code, uint32_t peer_capability,
+ bool initiator, const uint8_t *buf,
+ size_t len);
+#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 16, 0))
+int wlan_hdd_cfg80211_tdls_mgmt(struct wiphy *wiphy,
+ struct net_device *dev, const uint8_t *peer,
+ uint8_t action_code, uint8_t dialog_token,
+ uint16_t status_code, uint32_t peer_capability,
+ const uint8_t *buf, size_t len);
+#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 15, 0))
+int wlan_hdd_cfg80211_tdls_mgmt(struct wiphy *wiphy,
+ struct net_device *dev, uint8_t *peer,
+ uint8_t action_code, uint8_t dialog_token,
+ uint16_t status_code, uint32_t peer_capability,
+ const uint8_t *buf, size_t len);
+#else
+int wlan_hdd_cfg80211_tdls_mgmt(struct wiphy *wiphy,
+ struct net_device *dev, uint8_t *peer,
+ uint8_t action_code, uint8_t dialog_token,
+ uint16_t status_code, const uint8_t *buf,
+ size_t len);
+#endif
+#endif
+
+void hdd_tdls_notify_mode_change(hdd_adapter_t *adapter,
+ hdd_context_t *hddctx);
+void wlan_hdd_tdls_disable_offchan_and_teardown_links(hdd_context_t *hddctx);
+
+hddTdlsPeer_t *wlan_hdd_tdls_find_first_connected_peer(hdd_adapter_t *adapter);
+int hdd_set_tdls_offchannel(hdd_context_t *hdd_ctx, int offchannel);
+int hdd_set_tdls_secoffchanneloffset(hdd_context_t *hdd_ctx, int offchanoffset);
+int hdd_set_tdls_offchannelmode(hdd_adapter_t *adapter, int offchanmode);
+int hdd_set_tdls_scan_type(hdd_context_t *hdd_ctx, int val);
+
+#else
+static inline void hdd_tdls_notify_mode_change(hdd_adapter_t *adapter,
+ hdd_context_t *hddctx)
+{
+}
+static inline void
+wlan_hdd_tdls_disable_offchan_and_teardown_links(hdd_context_t *hddctx)
+{
+}
+static inline void wlan_hdd_tdls_exit(hdd_adapter_t *adapter)
+{
+}
+#endif /* End of FEATURE_WLAN_TDLS */
+
+#endif /* __HDD_TDLS_H */
diff --git a/core/hdd/inc/wlan_hdd_trace.h b/core/hdd/inc/wlan_hdd_trace.h
new file mode 100644
index 0000000..5220816
--- /dev/null
+++ b/core/hdd/inc/wlan_hdd_trace.h
@@ -0,0 +1,138 @@
+/*
+ * Copyright (c) 2014-2015 The Linux Foundation. All rights reserved.
+ *
+ * Previously licensed under the ISC license by Qualcomm Atheros, Inc.
+ *
+ *
+ * Permission to use, copy, modify, and/or distribute this software for
+ * any purpose with or without fee is hereby granted, provided that the
+ * above copyright notice and this permission notice appear in all
+ * copies.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
+ * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE
+ * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
+ * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
+ * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
+ * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
+ * PERFORMANCE OF THIS SOFTWARE.
+ */
+
+/*
+ * This file was originally distributed by Qualcomm Atheros, Inc.
+ * under proprietary terms before Copyright ownership was assigned
+ * to the Linux Foundation.
+ */
+
+#ifndef __WLAN_HDD_TRACE_H__
+#define __WLAN_HDD_TRACE_H__
+
+#include "mac_trace.h"
+
+#define NO_SESSION 0xFF
+
+#undef ENUMS
+#define ENUMS \
+ ENUM(TRACE_CODE_HDD_OPEN_REQUEST) \
+ ENUM(TRACE_CODE_HDD_STOP_REQUEST) \
+ ENUM(TRACE_CODE_HDD_TX_TIMEOUT) \
+ ENUM(TRACE_CODE_HDD_P2P_DEV_ADDR_IOCTL) \
+ ENUM(TRACE_CODE_HDD_SETSUSPENDMODE_IOCTL) \
+ ENUM(TRACE_CODE_HDD_SETROAMTRIGGER_IOCTL) \
+ ENUM(TRACE_CODE_HDD_GETROAMTRIGGER_IOCTL) \
+ ENUM(TRACE_CODE_HDD_SETROAMSCANPERIOD_IOCTL) \
+ ENUM(TRACE_CODE_HDD_GETROAMSCANPERIOD_IOCTL) \
+ ENUM(TRACE_CODE_HDD_SETROAMDELTA_IOCTL) \
+ ENUM(TRACE_CODE_HDD_GETROAMDELTA_IOCTL) \
+ ENUM(TRACE_CODE_HDD_GETBAND_IOCTL) \
+ ENUM(TRACE_CODE_HDD_GETCOUNTRYREV_IOCTL) \
+ ENUM(TRACE_CODE_HDD_SETROAMSCANCHANNELS_IOCTL) \
+ ENUM(TRACE_CODE_HDD_GETROAMSCANCHANNELS_IOCTL) \
+ ENUM(TRACE_CODE_HDD_HOSTAPD_OPEN_REQUEST) \
+ ENUM(TRACE_CODE_HDD_HOSTAPD_STOP_REQUEST) \
+ ENUM(TRACE_CODE_HDD_HOSTAPD_UNINIT_REQUEST) \
+ ENUM(TRACE_CODE_HDD_SOFTAP_TX_TIMEOUT) \
+ ENUM(TRACE_CODE_HDD_HOSTAPD_SET_MAC_ADDR) \
+ ENUM(TRACE_CODE_HDD_HOSTAPD_P2P_SET_NOA_IOCTL) \
+ ENUM(TRACE_CODE_HDD_HOSTAPD_P2P_SET_PS_IOCTL) \
+ ENUM(TRACE_CODE_HDD_HOSTAPD_SET_SAP_CHANNEL_LIST_IOCTL) \
+ ENUM(TRACE_CODE_HDD_ADD_VIRTUAL_INTF) \
+ ENUM(TRACE_CODE_HDD_DEL_VIRTUAL_INTF) \
+ ENUM(TRACE_CODE_HDD_CHANGE_VIRTUAL_INTF) \
+ ENUM(TRACE_CODE_HDD_CFG80211_START_AP) \
+ ENUM(TRACE_CODE_HDD_CFG80211_CHANGE_BEACON) \
+ ENUM(TRACE_CODE_HDD_CFG80211_STOP_AP) \
+ ENUM(TRACE_CODE_HDD_CFG80211_CHANGE_BSS) \
+ ENUM(TRACE_CODE_HDD_CFG80211_ADD_KEY) \
+ ENUM(TRACE_CODE_HDD_CFG80211_GET_KEY) \
+ ENUM(TRACE_CODE_HDD_CFG80211_SET_DEFAULT_KEY) \
+ ENUM(TRACE_CODE_HDD_CFG80211_CONNECT) \
+ ENUM(TRACE_CODE_HDD_CFG80211_DISCONNECT) \
+ ENUM(TRACE_CODE_HDD_CFG80211_JOIN_IBSS) \
+ ENUM(TRACE_CODE_HDD_CFG80211_LEAVE_IBSS) \
+ ENUM(TRACE_CODE_HDD_CFG80211_SET_WIPHY_PARAMS) \
+ ENUM(TRACE_CODE_HDD_CFG80211_SET_TXPOWER) \
+ ENUM(TRACE_CODE_HDD_CFG80211_GET_TXPOWER) \
+ ENUM(TRACE_CODE_HDD_CFG80211_SET_CHANNEL) \
+ ENUM(TRACE_CODE_HDD_CFG80211_ADD_BEACON) \
+ ENUM(TRACE_CODE_HDD_CFG80211_SET_BEACON) \
+ ENUM(TRACE_CODE_HDD_CFG80211_CHANGE_IFACE) \
+ ENUM(TRACE_CODE_HDD_CHANGE_STATION) \
+ ENUM(TRACE_CODE_HDD_CFG80211_UPDATE_BSS) \
+ ENUM(TRACE_CODE_HDD_CFG80211_SCAN) \
+ ENUM(TRACE_CODE_HDD_REMAIN_ON_CHANNEL) \
+ ENUM(TRACE_CODE_HDD_REMAINCHANREADYHANDLER) \
+ ENUM(TRACE_CODE_HDD_CFG80211_CANCEL_REMAIN_ON_CHANNEL) \
+ ENUM(TRACE_CODE_HDD_ACTION) \
+ ENUM(TRACE_CODE_HDD_MGMT_TX_CANCEL_WAIT) \
+ ENUM(TRACE_CODE_HDD_CFG80211_GET_STA) \
+ ENUM(TRACE_CODE_HDD_CFG80211_SET_POWER_MGMT) \
+ ENUM(TRACE_CODE_HDD_CFG80211_DEL_STA) \
+ ENUM(TRACE_CODE_HDD_CFG80211_ADD_STA) \
+ ENUM(TRACE_CODE_HDD_CFG80211_SET_PMKSA) \
+ ENUM(TRACE_CODE_HDD_CFG80211_UPDATE_FT_IES) \
+ ENUM(TRACE_CODE_HDD_CFG80211_TDLS_MGMT) \
+ ENUM(TRACE_CODE_HDD_CFG80211_TDLS_OPER) \
+ ENUM(TRACE_CODE_HDD_CFG80211_SET_REKEY_DATA) \
+ ENUM(TRACE_CODE_HDD_UNSUPPORTED_IOCTL) \
+ ENUM(TRACE_CODE_HDD_SETROAMSCANCHANNELMINTIME_IOCTL) \
+ ENUM(TRACE_CODE_HDD_GETROAMSCANCHANNELMINTIME_IOCTL) \
+ ENUM(TRACE_CODE_HDD_STORE_JOIN_REQ) \
+ ENUM(TRACE_CODE_HDD_CLEAR_JOIN_REQ) \
+ ENUM(TRACE_CODE_HDD_ISSUE_JOIN_REQ)
+
+enum {
+#undef ENUM
+#define ENUM(enum) enum,
+ ENUMS
+};
+
+/**
+ * hdd_trace_event_string() - Convert trace event to string
+ * @code: trace event enumeration to convert
+ *
+ * Return: string representation of the input enumeration
+ */
+static inline const char *hdd_trace_event_string(uint32_t code)
+{
+ switch (code) {
+ default:
+ return "UNKNOWN";
+ break;
+#undef ENUM
+#define ENUM(enum) CASE_RETURN_STRING(enum)
+ ENUMS
+ }
+}
+
+#undef ENUMS
+#undef ENUM
+
+#ifdef HDD_TRACE_RECORD
+void hdd_trace_init(void);
+#else
+static inline void hdd_trace_init(void) {}
+#endif
+
+#endif
diff --git a/core/hdd/inc/wlan_hdd_tx_rx.h b/core/hdd/inc/wlan_hdd_tx_rx.h
new file mode 100644
index 0000000..b4b29cc
--- /dev/null
+++ b/core/hdd/inc/wlan_hdd_tx_rx.h
@@ -0,0 +1,154 @@
+/*
+ * Copyright (c) 2013-2015 The Linux Foundation. All rights reserved.
+ *
+ * Previously licensed under the ISC license by Qualcomm Atheros, Inc.
+ *
+ *
+ * Permission to use, copy, modify, and/or distribute this software for
+ * any purpose with or without fee is hereby granted, provided that the
+ * above copyright notice and this permission notice appear in all
+ * copies.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
+ * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE
+ * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
+ * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
+ * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
+ * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
+ * PERFORMANCE OF THIS SOFTWARE.
+ */
+
+/*
+ * This file was originally distributed by Qualcomm Atheros, Inc.
+ * under proprietary terms before Copyright ownership was assigned
+ * to the Linux Foundation.
+ */
+
+#if !defined(WLAN_HDD_TX_RX_H)
+#define WLAN_HDD_TX_RX_H
+
+/**
+ *
+ * DOC: wlan_hdd_tx_rx.h
+ *
+ * Linux HDD Tx/RX APIs
+ */
+
+#include <wlan_hdd_includes.h>
+#include <cds_api.h>
+#include <linux/skbuff.h>
+#include "ol_txrx_osif_api.h"
+
+#define HDD_ETHERTYPE_802_1_X 0x888E
+#define HDD_ETHERTYPE_802_1_X_FRAME_OFFSET 12
+#define HDD_ETHERTYPE_802_1_X_SIZE 2
+#ifdef FEATURE_WLAN_WAPI
+#define HDD_ETHERTYPE_WAI 0x88b4
+#endif
+
+#define HDD_80211_HEADER_LEN 24
+#define HDD_80211_HEADER_QOS_CTL 2
+#define HDD_LLC_HDR_LEN 6
+#define HDD_FRAME_TYPE_MASK 0x0c
+#define HDD_FRAME_SUBTYPE_MASK 0xf0
+#define HDD_FRAME_TYPE_DATA 0x08
+#define HDD_FRAME_TYPE_MGMT 0x00
+#define HDD_FRAME_SUBTYPE_QOSDATA 0x80
+#define HDD_FRAME_SUBTYPE_DEAUTH 0xC0
+#define HDD_FRAME_SUBTYPE_DISASSOC 0xA0
+#define HDD_DEST_ADDR_OFFSET 6
+
+#define HDD_MAC_HDR_SIZE 6
+
+#define HDD_PSB_CFG_INVALID 0xFF
+#define HDD_PSB_CHANGED 0xFF
+#define SME_QOS_UAPSD_CFG_BK_CHANGED_MASK 0xF1
+#define SME_QOS_UAPSD_CFG_BE_CHANGED_MASK 0xF2
+#define SME_QOS_UAPSD_CFG_VI_CHANGED_MASK 0xF4
+#define SME_QOS_UAPSD_CFG_VO_CHANGED_MASK 0xF8
+
+#define HDD_ETH_HEADER_LEN 14
+
+int hdd_hard_start_xmit(struct sk_buff *skb, struct net_device *dev);
+void hdd_tx_timeout(struct net_device *dev);
+CDF_STATUS hdd_init_tx_rx(hdd_adapter_t *pAdapter);
+CDF_STATUS hdd_deinit_tx_rx(hdd_adapter_t *pAdapter);
+CDF_STATUS hdd_rx_packet_cbk(void *cds_context, cdf_nbuf_t rxBufChain,
+ uint8_t staId);
+
+#ifdef IPA_OFFLOAD
+CDF_STATUS hdd_rx_mul_packet_cbk(void *cds_context,
+ cdf_nbuf_t rx_buf_list, uint8_t staId);
+#endif /* IPA_OFFLOAD */
+
+CDF_STATUS hdd_ibss_get_sta_id(hdd_station_ctx_t *pHddStaCtx,
+ struct cdf_mac_addr *pMacAddress,
+ uint8_t *staId);
+
+#ifdef QCA_LL_LEGACY_TX_FLOW_CONTROL
+void hdd_tx_resume_cb(void *adapter_context, bool tx_resume);
+void hdd_tx_resume_timer_expired_handler(void *adapter_context);
+void hdd_register_tx_flow_control(hdd_adapter_t *adapter,
+ cdf_mc_timer_callback_t timer_callback,
+ ol_txrx_tx_flow_control_fp flowControl);
+void hdd_deregister_tx_flow_control(hdd_adapter_t *adapter);
+void hdd_get_tx_resource(hdd_adapter_t *adapter,
+ uint8_t STAId, uint16_t timer_value);
+
+#else
+static inline void hdd_tx_resume_cb(void *adapter_context, bool tx_resume)
+{
+ return;
+}
+static inline void hdd_tx_resume_timer_expired_handler(void *adapter_context)
+{
+ return;
+}
+static inline void hdd_register_tx_flow_control(hdd_adapter_t *adapter,
+ cdf_mc_timer_callback_t timer_callback,
+ ol_txrx_tx_flow_control_fp flowControl)
+{
+ return;
+}
+static inline void hdd_deregister_tx_flow_control(hdd_adapter_t *adapter)
+{
+ return;
+}
+static inline void hdd_get_tx_resource(hdd_adapter_t *adapter,
+ uint8_t STAId, uint16_t timer_value)
+{
+ return;
+}
+#endif /* QCA_LL_LEGACY_TX_FLOW_CONTROL */
+
+#ifdef FEATURE_WLAN_DIAG_SUPPORT
+/**
+ * wlan_hdd_log_eapol() - Function to check and extract EAPOL params
+ * @skb: skb data
+ * @event_type: One of enum wifi_connectivity_events to indicate Tx/Rx
+ *
+ * This function parses the input skb data to get the EAPOL params,if the
+ * packet is EAPOL and store it in the pointer passed as input
+ *
+ * Return: None
+ *
+ */
+void wlan_hdd_log_eapol(struct sk_buff *skb,
+ uint8_t event_type);
+#else
+static inline void wlan_hdd_log_eapol(struct sk_buff *skb,
+ uint8_t event_type)
+{
+
+}
+#endif /* FEATURE_WLAN_DIAG_SUPPORT */
+
+
+const char *hdd_reason_type_to_string(enum netif_reason_type reason);
+const char *hdd_action_type_to_string(enum netif_action_type action);
+void wlan_hdd_netif_queue_control(hdd_adapter_t *adapter,
+ enum netif_action_type action, enum netif_reason_type reason);
+
+
+#endif /* end #if !defined(WLAN_HDD_TX_RX_H) */
diff --git a/core/hdd/inc/wlan_hdd_wext.h b/core/hdd/inc/wlan_hdd_wext.h
new file mode 100644
index 0000000..de61e90
--- /dev/null
+++ b/core/hdd/inc/wlan_hdd_wext.h
@@ -0,0 +1,385 @@
+/*
+ * Copyright (c) 2012-2015 The Linux Foundation. All rights reserved.
+ *
+ * Previously licensed under the ISC license by Qualcomm Atheros, Inc.
+ *
+ *
+ * Permission to use, copy, modify, and/or distribute this software for
+ * any purpose with or without fee is hereby granted, provided that the
+ * above copyright notice and this permission notice appear in all
+ * copies.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
+ * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE
+ * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
+ * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
+ * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
+ * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
+ * PERFORMANCE OF THIS SOFTWARE.
+ */
+
+/*
+ * This file was originally distributed by Qualcomm Atheros, Inc.
+ * under proprietary terms before Copyright ownership was assigned
+ * to the Linux Foundation.
+ */
+
+#ifndef __WEXT_IW_H__
+#define __WEXT_IW_H__
+
+#include <linux/version.h>
+#include <linux/module.h>
+#include <linux/netdevice.h>
+#include <linux/wireless.h>
+#include <net/iw_handler.h>
+#include <linux/timer.h>
+#include "cdf_event.h"
+
+/*
+ * order of parameters in addTs private ioctl
+ */
+#define HDD_WLAN_WMM_PARAM_HANDLE 0
+#define HDD_WLAN_WMM_PARAM_TID 1
+#define HDD_WLAN_WMM_PARAM_DIRECTION 2
+#define HDD_WLAN_WMM_PARAM_APSD 3
+#define HDD_WLAN_WMM_PARAM_USER_PRIORITY 4
+#define HDD_WLAN_WMM_PARAM_NOMINAL_MSDU_SIZE 5
+#define HDD_WLAN_WMM_PARAM_MAXIMUM_MSDU_SIZE 6
+#define HDD_WLAN_WMM_PARAM_MINIMUM_DATA_RATE 7
+#define HDD_WLAN_WMM_PARAM_MEAN_DATA_RATE 8
+#define HDD_WLAN_WMM_PARAM_PEAK_DATA_RATE 9
+#define HDD_WLAN_WMM_PARAM_MAX_BURST_SIZE 10
+#define HDD_WLAN_WMM_PARAM_MINIMUM_PHY_RATE 11
+#define HDD_WLAN_WMM_PARAM_SURPLUS_BANDWIDTH_ALLOWANCE 12
+#define HDD_WLAN_WMM_PARAM_SERVICE_INTERVAL 13
+#define HDD_WLAN_WMM_PARAM_SUSPENSION_INTERVAL 14
+#define HDD_WLAN_WMM_PARAM_BURST_SIZE_DEFN 15
+#define HDD_WLAN_WMM_PARAM_ACK_POLICY 16
+#define HDD_WLAN_WMM_PARAM_INACTIVITY_INTERVAL 17
+#define HDD_WLAN_WMM_PARAM_MAX_SERVICE_INTERVAL 18
+#define HDD_WLAN_WMM_PARAM_COUNT 19
+
+#define MHZ 6
+
+#define WE_MAX_STR_LEN IW_PRIV_SIZE_MASK
+#define WLAN_HDD_UI_BAND_AUTO 0
+#define WLAN_HDD_UI_BAND_5_GHZ 1
+#define WLAN_HDD_UI_BAND_2_4_GHZ 2
+/* SETBAND x */
+/* 012345678 */
+#define WLAN_HDD_UI_SET_BAND_VALUE_OFFSET 8
+
+typedef enum {
+ HDD_WLAN_WMM_DIRECTION_UPSTREAM = 0,
+ HDD_WLAN_WMM_DIRECTION_DOWNSTREAM = 1,
+ HDD_WLAN_WMM_DIRECTION_BIDIRECTIONAL = 2,
+} hdd_wlan_wmm_direction_e;
+
+typedef enum {
+ HDD_WLAN_WMM_POWER_SAVE_LEGACY = 0,
+ HDD_WLAN_WMM_POWER_SAVE_UAPSD = 1,
+} hdd_wlan_wmm_power_save_e;
+
+typedef enum {
+ /* TSPEC/re-assoc done, async */
+ HDD_WLAN_WMM_STATUS_SETUP_SUCCESS = 0,
+ /* no need to setup TSPEC since ACM=0 and no UAPSD desired, sync + async */
+ HDD_WLAN_WMM_STATUS_SETUP_SUCCESS_NO_ACM_NO_UAPSD = 1,
+ /* no need to setup TSPEC since ACM=0 and UAPSD already exists, sync + async */
+ HDD_WLAN_WMM_STATUS_SETUP_SUCCESS_NO_ACM_UAPSD_EXISTING = 2,
+ /* TSPEC result pending, sync */
+ HDD_WLAN_WMM_STATUS_SETUP_PENDING = 3,
+ /* TSPEC/re-assoc failed, sync + async */
+ HDD_WLAN_WMM_STATUS_SETUP_FAILED = 4,
+ /* Request rejected due to invalid params, sync + async */
+ HDD_WLAN_WMM_STATUS_SETUP_FAILED_BAD_PARAM = 5,
+ /* TSPEC request rejected since AP!=QAP, sync */
+ HDD_WLAN_WMM_STATUS_SETUP_FAILED_NO_WMM = 6,
+
+ /* TSPEC modification/re-assoc successful, async */
+ HDD_WLAN_WMM_STATUS_MODIFY_SUCCESS = 7,
+ /* TSPEC modification a no-op since ACM=0 and no change in UAPSD, sync + async */
+ HDD_WLAN_WMM_STATUS_MODIFY_SUCCESS_NO_ACM_NO_UAPSD = 8,
+ /* TSPEC modification a no-op since ACM=0 and requested U-APSD already exists, sync + async */
+ HDD_WLAN_WMM_STATUS_MODIFY_SUCCESS_NO_ACM_UAPSD_EXISTING = 9,
+ /* TSPEC result pending, sync */
+ HDD_WLAN_WMM_STATUS_MODIFY_PENDING = 10,
+ /* TSPEC modification failed, prev TSPEC in effect, sync + async */
+ HDD_WLAN_WMM_STATUS_MODIFY_FAILED = 11,
+ /* TSPEC modification request rejected due to invalid params, sync + async */
+ HDD_WLAN_WMM_STATUS_MODIFY_FAILED_BAD_PARAM = 12,
+
+ /* TSPEC release successful, sync and also async */
+ HDD_WLAN_WMM_STATUS_RELEASE_SUCCESS = 13,
+ /* TSPEC release pending, sync */
+ HDD_WLAN_WMM_STATUS_RELEASE_PENDING = 14,
+ /* TSPEC release failed, sync + async */
+ HDD_WLAN_WMM_STATUS_RELEASE_FAILED = 15,
+ /* TSPEC release rejected due to invalid params, sync */
+ HDD_WLAN_WMM_STATUS_RELEASE_FAILED_BAD_PARAM = 16,
+ /* TSPEC modified due to the mux'ing of requests on ACs, async */
+
+ HDD_WLAN_WMM_STATUS_MODIFIED = 17,
+ /* TSPEC revoked by AP, async */
+ HDD_WLAN_WMM_STATUS_LOST = 18,
+ /* some internal failure like memory allocation failure, etc, sync */
+ HDD_WLAN_WMM_STATUS_INTERNAL_FAILURE = 19,
+
+ /* U-APSD failed during setup but OTA setup (whether TSPEC exchnage or */
+ /* re-assoc) was done so app should release this QoS, async */
+ HDD_WLAN_WMM_STATUS_SETUP_UAPSD_SET_FAILED = 20,
+ /* U-APSD failed during modify, but OTA setup (whether TSPEC exchnage or */
+ /* re-assoc) was done so app should release this QoS, async */
+ HDD_WLAN_WMM_STATUS_MODIFY_UAPSD_SET_FAILED = 21
+} hdd_wlan_wmm_status_e;
+
+/** TS Info Ack Policy */
+typedef enum {
+ HDD_WLAN_WMM_TS_INFO_ACK_POLICY_NORMAL_ACK = 0,
+ HDD_WLAN_WMM_TS_INFO_ACK_POLICY_HT_IMMEDIATE_BLOCK_ACK = 1,
+} hdd_wlan_wmm_ts_info_ack_policy_e;
+
+/** Maximum Length of WPA/RSN IE */
+#define MAX_WPA_RSN_IE_LEN 40
+
+/** Maximum Number of WEP KEYS */
+#define MAX_WEP_KEYS 4
+
+/** Ether Address Length */
+#define ETHER_ADDR_LEN 6
+
+/** Enable 11d */
+#define ENABLE_11D 1
+
+/** Disable 11d */
+#define DISABLE_11D 0
+
+/*
+ refer wpa.h in wpa supplicant code for REASON_MICHAEL_MIC_FAILURE
+
+ supplicant sets REASON_MICHAEL_MIC_FAILURE as the reason code when it sends the MLME deauth IOCTL
+ for TKIP counter measures
+ */
+#define HDD_REASON_MICHAEL_MIC_FAILURE 14
+
+/*
+ * These are for TLV fields in WPS IE
+ */
+#define HDD_WPS_UUID_LEN 16
+#define HDD_WPS_ELEM_VERSION 0x104a
+#define HDD_WPS_ELEM_REQUEST_TYPE 0x103a
+#define HDD_WPS_ELEM_CONFIG_METHODS 0x1008
+#define HDD_WPS_ELEM_UUID_E 0x1047
+#define HDD_WPS_ELEM_PRIMARY_DEVICE_TYPE 0x1054
+#define HDD_WPS_ELEM_RF_BANDS 0x103c
+#define HDD_WPS_ELEM_ASSOCIATION_STATE 0x1002
+#define HDD_WPS_ELEM_CONFIGURATION_ERROR 0x1009
+#define HDD_WPS_ELEM_DEVICE_PASSWORD_ID 0x1012
+
+#define HDD_WPA_ELEM_VENDOR_EXTENSION 0x1049
+
+#define HDD_WPS_MANUFACTURER_LEN 64
+#define HDD_WPS_MODEL_NAME_LEN 32
+#define HDD_WPS_MODEL_NUM_LEN 32
+#define HDD_WPS_SERIAL_NUM_LEN 32
+#define HDD_WPS_DEVICE_OUI_LEN 4
+#define HDD_WPS_DEVICE_NAME_LEN 32
+
+#define HDD_WPS_ELEM_WPS_STATE 0x1044
+#define HDD_WPS_ELEM_APSETUPLOCK 0x1057
+#define HDD_WPS_ELEM_SELECTEDREGISTRA 0x1041
+#define HDD_WPS_ELEM_RSP_TYPE 0x103B
+#define HDD_WPS_ELEM_MANUFACTURER 0x1021
+#define HDD_WPS_ELEM_MODEL_NAME 0x1023
+#define HDD_WPS_ELEM_MODEL_NUM 0x1024
+#define HDD_WPS_ELEM_SERIAL_NUM 0x1042
+#define HDD_WPS_ELEM_DEVICE_NAME 0x1011
+#define HDD_WPS_ELEM_REGISTRA_CONF_METHODS 0x1053
+
+#define HDD_RTSCTS_EN_MASK 0xF
+#define HDD_RTSCTS_ENABLE 1
+#define HDD_CTS_ENABLE 2
+
+#define WPS_OUI_TYPE "\x00\x50\xf2\x04"
+#define WPS_OUI_TYPE_SIZE 4
+
+#define SS_OUI_TYPE "\x00\x16\x32"
+#define SS_OUI_TYPE_SIZE 3
+
+#define P2P_OUI_TYPE "\x50\x6f\x9a\x09"
+#define P2P_OUI_TYPE_SIZE 4
+
+#define HS20_OUI_TYPE "\x50\x6f\x9a\x10"
+#define HS20_OUI_TYPE_SIZE 4
+
+#define OSEN_OUI_TYPE "\x50\x6f\x9a\x12"
+#define OSEN_OUI_TYPE_SIZE 4
+
+#ifdef WLAN_FEATURE_WFD
+#define WFD_OUI_TYPE "\x50\x6f\x9a\x0a"
+#define WFD_OUI_TYPE_SIZE 4
+#endif
+
+typedef enum {
+ eWEXT_WPS_OFF = 0,
+ eWEXT_WPS_ON = 1,
+} hdd_wps_mode_e;
+
+/*
+ * This structure contains the interface level (granularity)
+ * configuration information in support of wireless extensions.
+ */
+typedef struct hdd_wext_state_s {
+ /** The CSR "desired" Profile */
+ tCsrRoamProfile roamProfile;
+
+ /** BSSID to which connect request is received */
+ struct cdf_mac_addr req_bssId;
+
+ /** The association status code */
+ uint32_t statusCode;
+
+ /** wpa version WPA/WPA2/None*/
+ int32_t wpaVersion;
+
+ /**WPA or RSN IE*/
+ uint8_t WPARSNIE[MAX_WPA_RSN_IE_LEN];
+
+ /**gen IE */
+ tSirAddie genIE;
+
+ /**Additional IE for assoc */
+ tSirAddie assocAddIE;
+
+ /**auth key mgmt */
+ int32_t authKeyMgmt;
+
+ /* cdf event */
+ cdf_event_t hdd_cdf_event;
+
+ cdf_event_t scanevent;
+
+ /**Counter measure state, Started/Stopped*/
+ bool mTKIPCounterMeasures;
+
+ /**Completion Variable*/
+ struct completion completion_var;
+
+#ifdef FEATURE_WLAN_ESE
+ /* ESE state variables */
+ bool isESEConnection;
+ eCsrAuthType collectedAuthType; /* Collected from ALL SIOCSIWAUTH Ioctls. Will be negotiatedAuthType - in tCsrProfile */
+#endif
+} hdd_wext_state_t;
+
+typedef struct ccp_freq_chan_map_s {
+ /* List of frequencies */
+ uint32_t freq;
+ uint32_t chan;
+} hdd_freq_chan_map_t;
+
+/* Packet Types. */
+#define WLAN_KEEP_ALIVE_UNSOLICIT_ARP_RSP 2
+#define WLAN_KEEP_ALIVE_NULL_PKT 1
+
+/* Offload request. */
+typedef struct {
+ uint8_t packetType;
+ uint32_t timePeriod;
+ uint8_t hostIpv4Addr[4];
+ uint8_t destIpv4Addr[4];
+ uint8_t destMacAddr[ETH_ALEN];
+ uint8_t bssIdx;
+} tKeepAliveRequest, *tpKeepAliveRequest;
+
+#define wlan_hdd_get_wps_ie_ptr(ie, ie_len) \
+ wlan_hdd_get_vendor_oui_ie_ptr(WPS_OUI_TYPE, WPS_OUI_TYPE_SIZE, ie, ie_len)
+
+#define wlan_hdd_get_p2p_ie_ptr(ie, ie_len) \
+ wlan_hdd_get_vendor_oui_ie_ptr(P2P_OUI_TYPE, P2P_OUI_TYPE_SIZE, ie, ie_len)
+
+#ifdef WLAN_FEATURE_WFD
+#define wlan_hdd_get_wfd_ie_ptr(ie, ie_len) \
+ wlan_hdd_get_vendor_oui_ie_ptr(WFD_OUI_TYPE, WFD_OUI_TYPE_SIZE, ie, ie_len)
+#endif
+
+extern int hdd_unregister_wext(struct net_device *dev);
+extern int hdd_register_wext(struct net_device *dev);
+extern int hdd_wlan_get_freq(uint32_t chan, uint32_t *freq);
+extern int hdd_wlan_get_rts_threshold(hdd_adapter_t *pAdapter,
+ union iwreq_data *wrqu);
+extern int hdd_wlan_get_frag_threshold(hdd_adapter_t *pAdapter,
+ union iwreq_data *wrqu);
+extern void hdd_wlan_get_version(hdd_adapter_t *pAdapter,
+ union iwreq_data *wrqu, char *extra);
+
+extern void hdd_wlan_get_stats(hdd_adapter_t *pAdapter, uint16_t *length,
+ char *buffer, uint16_t buf_len);
+
+extern int iw_set_essid(struct net_device *dev,
+ struct iw_request_info *info,
+ union iwreq_data *wrqu, char *extra);
+
+extern int iw_get_essid(struct net_device *dev,
+ struct iw_request_info *info,
+ struct iw_point *dwrq, char *extra);
+
+extern int iw_set_ap_address(struct net_device *dev,
+ struct iw_request_info *info,
+ union iwreq_data *wrqu, char *extra);
+
+extern int iw_get_ap_address(struct net_device *dev,
+ struct iw_request_info *info,
+ union iwreq_data *wrqu, char *extra);
+
+extern int iw_set_auth(struct net_device *dev, struct iw_request_info *info,
+ union iwreq_data *wrqu, char *extra);
+
+extern int iw_get_auth(struct net_device *dev, struct iw_request_info *info,
+ union iwreq_data *wrqu, char *extra);
+
+extern int iw_set_var_ints_getnone(struct net_device *dev,
+ struct iw_request_info *info,
+ union iwreq_data *wrqu, char *extra);
+
+extern int iw_set_three_ints_getnone(struct net_device *dev,
+ struct iw_request_info *info,
+ union iwreq_data *wrqu, char *extra);
+
+extern int hdd_priv_get_data(struct iw_point *p_priv_data,
+ union iwreq_data *wrqu);
+
+extern void *mem_alloc_copy_from_user_helper(const void *wrqu_data, size_t len);
+
+extern CDF_STATUS wlan_hdd_get_linkspeed_for_peermac(hdd_adapter_t *pAdapter,
+ tSirMacAddr macAddress);
+void hdd_clear_roam_profile_ie(hdd_adapter_t *pAdapter);
+
+uint8_t *wlan_hdd_get_vendor_oui_ie_ptr(uint8_t *oui, uint8_t oui_size,
+ uint8_t *ie, int ie_len);
+
+CDF_STATUS wlan_hdd_get_class_astats(hdd_adapter_t *pAdapter);
+
+CDF_STATUS wlan_hdd_get_station_stats(hdd_adapter_t *pAdapter);
+
+CDF_STATUS wlan_hdd_get_rssi(hdd_adapter_t *pAdapter, int8_t *rssi_value);
+
+CDF_STATUS wlan_hdd_get_snr(hdd_adapter_t *pAdapter, int8_t *snr);
+
+#ifdef FEATURE_WLAN_TDLS
+CDF_STATUS iw_set_tdls_params(struct net_device *dev,
+ struct iw_request_info *info,
+ union iwreq_data *wrqu, char *extra, int nOffset);
+#endif
+
+void wlan_hdd_change_country_code_callback(void *pAdapter);
+
+int hdd_set_band(struct net_device *dev, u8 ui_band);
+int hdd_set_band_helper(struct net_device *dev, const char *command);
+int wlan_hdd_update_phymode(struct net_device *net, tHalHandle hal,
+ int new_phymode, hdd_context_t *phddctx);
+
+int wlan_hdd_get_temperature(hdd_adapter_t *pAdapter, int *temperature);
+int wlan_hdd_get_link_speed(hdd_adapter_t *sta_adapter, uint32_t *link_speed);
+#endif /* __WEXT_IW_H__ */
diff --git a/core/hdd/inc/wlan_hdd_wmm.h b/core/hdd/inc/wlan_hdd_wmm.h
new file mode 100644
index 0000000..864a1e7
--- /dev/null
+++ b/core/hdd/inc/wlan_hdd_wmm.h
@@ -0,0 +1,404 @@
+/*
+ * Copyright (c) 2011-2012,2014 The Linux Foundation. All rights reserved.
+ *
+ * Previously licensed under the ISC license by Qualcomm Atheros, Inc.
+ *
+ *
+ * Permission to use, copy, modify, and/or distribute this software for
+ * any purpose with or without fee is hereby granted, provided that the
+ * above copyright notice and this permission notice appear in all
+ * copies.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
+ * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE
+ * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
+ * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
+ * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
+ * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
+ * PERFORMANCE OF THIS SOFTWARE.
+ */
+
+/*
+ * This file was originally distributed by Qualcomm Atheros, Inc.
+ * under proprietary terms before Copyright ownership was assigned
+ * to the Linux Foundation.
+ */
+
+#ifndef _WLAN_HDD_WMM_H
+#define _WLAN_HDD_WMM_H
+
+/**
+ * DOC: HDD WMM
+ *
+ * This module (wlan_hdd_wmm.h interface + wlan_hdd_wmm.c implementation)
+ * houses all the logic for WMM in HDD.
+ *
+ * On the control path, it has the logic to setup QoS, modify QoS and delete
+ * QoS (QoS here refers to a TSPEC). The setup QoS comes in two flavors: an
+ * explicit application invoked and an internal HDD invoked. The implicit QoS
+ * is for applications that do NOT call the custom QCT WLAN OIDs for QoS but
+ * which DO mark their traffic for priortization. It also has logic to start,
+ * update and stop the U-APSD trigger frame generation. It also has logic to
+ * read WMM related config parameters from the registry.
+ *
+ * On the data path, it has the logic to figure out the WMM AC of an egress
+ * packet and when to signal TL to serve a particular AC queue. It also has the
+ * logic to retrieve a packet based on WMM priority in response to a fetch from
+ * TL.
+ *
+ * The remaining functions are utility functions for information hiding.
+ */
+
+/* Include files */
+#include <linux/workqueue.h>
+#include <linux/list.h>
+#include <wlan_hdd_main.h>
+#include <wlan_hdd_wext.h>
+#include <sme_qos_api.h>
+
+/*Maximum number of ACs */
+#define WLAN_MAX_AC 4
+
+
+/* Preprocessor Definitions and Constants */
+
+/* #define HDD_WMM_DEBUG 1 */
+
+#define HDD_WMM_CTX_MAGIC 0x574d4d58 /* "WMMX" */
+
+#define HDD_WMM_HANDLE_IMPLICIT 0xFFFFFFFF
+
+#define HDD_WLAN_INVALID_STA_ID 0xFF
+
+/* Type Declarations */
+
+/**
+ * enum hdd_wmm_classification: types of classification supported
+ */
+typedef enum hdd_wmm_classification {
+ HDD_WMM_CLASSIFICATION_DSCP = 0,
+ HDD_WMM_CLASSIFICATION_802_1Q = 1
+} hdd_wmm_classification_t;
+
+/**
+ * enum hdd_wmm_user_mode - WMM modes of operation
+ *
+ * @HDD_WMM_USER_MODE_AUTO: STA can associate with any AP, & HDD looks at
+ * the SME notification after association to find out if associated
+ * with QAP and acts accordingly
+ * @HDD_WMM_USER_MODE_QBSS_ONLY - SME will add the extra logic to make sure
+ * STA associates with a QAP only
+ * @HDD_WMM_USER_MODE_NO_QOS - SME will not join a QoS AP, unless the phy
+ * mode setting says "Auto". In that case, STA is free to join 11n AP.
+ * Although from HDD point of view, it will not be doing any packet
+ * classifications.
+ */
+typedef enum hdd_wmm_user_mode {
+ HDD_WMM_USER_MODE_AUTO = 0,
+ HDD_WMM_USER_MODE_QBSS_ONLY = 1,
+ HDD_WMM_USER_MODE_NO_QOS = 2,
+} hdd_wmm_user_mode_t;
+
+/* UAPSD Mask bits */
+/* (Bit0:VO; Bit1:VI; Bit2:BK; Bit3:BE all other bits are ignored) */
+#define HDD_AC_VO 0x1
+#define HDD_AC_VI 0x2
+#define HDD_AC_BK 0x4
+#define HDD_AC_BE 0x8
+
+/**
+ * struct hdd_wmm_qos_context - HDD WMM QoS Context
+ *
+ * This structure holds the context for a single flow which has either
+ * been confgured explicitly from userspace or implicitly via the
+ * Implicit QoS feature.
+ *
+ * @node: list node which can be used to put the context into a list
+ * of contexts
+ * @handle: identifer which uniquely identifies this context to userspace
+ * @qosFlowID: identifier which uniquely identifies this flow to SME
+ * @pAdapter: adapter upon which this flow was configured
+ * @acType: access category for this flow
+ * @lastStatus: the status of the last operation performed on this flow by SME
+ * @wmmAcSetupImplicitQos: work structure used for deferring implicit QoS work
+ * from softirq context to thread context
+ * @magic: magic number used to verify that this is a valid context when
+ * referenced anonymously
+ */
+typedef struct hdd_wmm_qos_context {
+ struct list_head node;
+ uint32_t handle;
+ uint32_t qosFlowId;
+ hdd_adapter_t *pAdapter;
+ sme_ac_enum_type acType;
+ hdd_wlan_wmm_status_e lastStatus;
+ struct work_struct wmmAcSetupImplicitQos;
+ uint32_t magic;
+ bool is_inactivity_timer_running;
+} hdd_wmm_qos_context_t;
+
+/**
+ * struct hdd_wmm_ac_status - WMM related per-AC state & status info
+ * @wmmAcAccessRequired - does the AP require access to this AC?
+ * @wmmAcAccessNeeded - does the worker thread need to acquire access to
+ * this AC?
+ * @wmmAcAccessPending - is implicit QoS negotiation currently taking place?
+ * @wmmAcAccessFailed - has implicit QoS negotiation already failed?
+ * @wmmAcAccessGranted - has implicit QoS negotiation already succeeded?
+ * @wmmAcAccessAllowed - is access to this AC allowed, either because we
+ * are not doing WMM, we are not doing implicit QoS, implict QoS has
+ * completed, or explicit QoS has completed?
+ * @wmmAcTspecValid - is the wmmAcTspecInfo valid?
+ * @wmmAcUapsdInfoValid - are the wmmAcUapsd* fields valid?
+ * @wmmAcTspecInfo - current (possibly aggregate) Tspec for this AC
+ * @wmmAcIsUapsdEnabled - is UAPSD enabled on this AC?
+ * @wmmAcUapsdServiceInterval - service interval for this AC
+ * @wmmAcUapsdSuspensionInterval - suspension interval for this AC
+ * @wmmAcUapsdDirection - direction for this AC
+ * @wmmInactivityTime - inactivity time for this AC
+ * @wmmPrevTrafficCnt - TX counter used for inactivity detection
+ * @wmmInactivityTimer - timer used for inactivity detection
+ */
+typedef struct hdd_wmm_ac_status {
+ bool wmmAcAccessRequired;
+ bool wmmAcAccessNeeded;
+ bool wmmAcAccessPending;
+ bool wmmAcAccessFailed;
+ bool wmmAcAccessGranted;
+ bool wmmAcAccessAllowed;
+ bool wmmAcTspecValid;
+ bool wmmAcUapsdInfoValid;
+ sme_QosWmmTspecInfo wmmAcTspecInfo;
+ bool wmmAcIsUapsdEnabled;
+ uint32_t wmmAcUapsdServiceInterval;
+ uint32_t wmmAcUapsdSuspensionInterval;
+ sme_QosWmmDirType wmmAcUapsdDirection;
+
+#ifdef FEATURE_WLAN_ESE
+ uint32_t wmmInactivityTime;
+ uint32_t wmmPrevTrafficCnt;
+ cdf_mc_timer_t wmmInactivityTimer;
+#endif
+
+} hdd_wmm_ac_status_t;
+
+/**
+ * struct hdd_wmm_status - WMM status maintained per-adapter
+ * @wmmContextList - list of WMM contexts active on the adapter
+ * @wmmLock - mutex used for exclusive access to this adapter's WMM status
+ * @wmmACStatus - per-AC WMM status
+ * @wmmQap - is this connected to a QoS-enabled AP?
+ * @wmmQosConnection - is this a QoS connection?
+ */
+typedef struct hdd_wmm_status {
+ struct list_head wmmContextList;
+ struct mutex wmmLock;
+ hdd_wmm_ac_status_t wmmAcStatus[WLAN_MAX_AC];
+ bool wmmQap;
+ bool wmmQosConnection;
+} hdd_wmm_status_t;
+
+extern const uint8_t hdd_qdisc_ac_to_tl_ac[];
+extern const uint8_t hdd_wmm_up_to_ac_map[];
+extern const uint8_t hdd_linux_up_to_ac_map[];
+
+#define WLAN_HDD_MAX_DSCP 0x3f
+
+/**
+ * hdd_wmmps_helper() - Function to set uapsd psb dynamically
+ *
+ * @pAdapter: [in] pointer to adapter structure
+ * @ptr: [in] pointer to command buffer
+ *
+ * Return: Zero on success, appropriate error on failure.
+ */
+int hdd_wmmps_helper(hdd_adapter_t *pAdapter, uint8_t *ptr);
+
+/**
+ * hdd_wmm_init() - initialize the WMM DSCP configuation
+ * @pAdapter : [in] pointer to Adapter context
+ *
+ * This function will initialize the WMM DSCP configuation of an
+ * adapter to an initial state. The configuration can later be
+ * overwritten via application APIs or via QoS Map sent OTA.
+ *
+ * Return: CDF_STATUS enumeration
+ */
+CDF_STATUS hdd_wmm_init(hdd_adapter_t *pAdapter);
+
+/**
+ * hdd_wmm_adapter_init() - initialize the WMM configuration of an adapter
+ * @pAdapter: [in] pointer to Adapter context
+ *
+ * This function will initialize the WMM configuation and status of an
+ * adapter to an initial state. The configuration can later be
+ * overwritten via application APIs
+ *
+ * Return: CDF_STATUS enumeration
+ */
+CDF_STATUS hdd_wmm_adapter_init(hdd_adapter_t *pAdapter);
+
+/**
+ * hdd_wmm_close() - WMM close function
+ * @pAdapter: [in] pointer to adapter context
+ *
+ * Function which will perform any necessary work to to clean up the
+ * WMM functionality prior to the kernel module unload.
+ *
+ * Return: CDF_STATUS enumeration
+ */
+CDF_STATUS hdd_wmm_adapter_close(hdd_adapter_t *pAdapter);
+
+/**
+ * hdd_wmm_select_queue() - Function which will classify the packet
+ * according to linux qdisc expectation.
+ *
+ * @dev: [in] pointer to net_device structure
+ * @skb: [in] pointer to os packet
+ *
+ * Return: Qdisc queue index
+ */
+uint16_t hdd_wmm_select_queue(struct net_device *dev, struct sk_buff *skb);
+
+/**
+ * hdd_hostapd_select_queue() - Function which will classify the packet
+ * according to linux qdisc expectation.
+ *
+ * @dev: [in] pointer to net_device structure
+ * @skb: [in] pointer to os packet
+ *
+ * Return: Qdisc queue index
+ */
+uint16_t hdd_hostapd_select_queue(struct net_device *dev, struct sk_buff *skb
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 13, 0))
+ , void *accel_priv
+#endif
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 14, 0))
+ , select_queue_fallback_t fallback
+#endif
+);
+
+/**
+ * hdd_wmm_acquire_access_required() - Function which will determine
+ * acquire admittance for a WMM AC is required or not based on psb configuration
+ * done in framework
+ *
+ * @pAdapter: [in] pointer to adapter structure
+ * @acType: [in] WMM AC type of OS packet
+ *
+ * Return: void
+ */
+void hdd_wmm_acquire_access_required(hdd_adapter_t *pAdapter,
+ sme_ac_enum_type acType);
+
+/**
+ * hdd_wmm_acquire_access() - Function which will attempt to acquire
+ * admittance for a WMM AC
+ *
+ * @pAdapter: [in] pointer to adapter context
+ * @acType: [in] WMM AC type of OS packet
+ * @pGranted: [out] pointer to bool flag when indicates if access
+ * has been granted or not
+ *
+ * Return: CDF_STATUS enumeration
+ */
+CDF_STATUS hdd_wmm_acquire_access(hdd_adapter_t *pAdapter,
+ sme_ac_enum_type acType, bool *pGranted);
+
+/**
+ * hdd_wmm_assoc() - Function which will handle the housekeeping
+ * required by WMM when association takes place
+ *
+ * @pAdapter: [in] pointer to adapter context
+ * @pRoamInfo: [in] pointer to roam information
+ * @eBssType: [in] type of BSS
+ *
+ * Return: CDF_STATUS enumeration
+ */
+CDF_STATUS hdd_wmm_assoc(hdd_adapter_t *pAdapter,
+ tCsrRoamInfo *pRoamInfo, eCsrRoamBssType eBssType);
+
+/**
+ * hdd_wmm_connect() - Function which will handle the housekeeping
+ * required by WMM when a connection is established
+ *
+ * @pAdapter : [in] pointer to adapter context
+ * @pRoamInfo: [in] pointer to roam information
+ * @eBssType : [in] type of BSS
+ *
+ * Return: CDF_STATUS enumeration
+ */
+CDF_STATUS hdd_wmm_connect(hdd_adapter_t *pAdapter,
+ tCsrRoamInfo *pRoamInfo, eCsrRoamBssType eBssType);
+
+/**
+ * hdd_wmm_get_uapsd_mask() - Function which will calculate the
+ * initial value of the UAPSD mask based upon the device configuration
+ *
+ * @pAdapter : [in] pointer to adapter context
+ * @pUapsdMask: [out] pointer to where the UAPSD Mask is to be stored
+ *
+ * Return: CDF_STATUS enumeration
+ */
+CDF_STATUS hdd_wmm_get_uapsd_mask(hdd_adapter_t *pAdapter,
+ uint8_t *pUapsdMask);
+
+/**
+ * hdd_wmm_is_active() - Function which will determine if WMM is
+ * active on the current connection
+ *
+ * @pAdapter: [in] pointer to adapter context
+ *
+ * Return: true if WMM is enabled, false if WMM is not enabled
+ */
+bool hdd_wmm_is_active(hdd_adapter_t *pAdapter);
+
+/**
+ * hdd_wmm_addts() - Function which will add a traffic spec at the
+ * request of an application
+ *
+ * @pAdapter : [in] pointer to adapter context
+ * @handle : [in] handle to uniquely identify a TS
+ * @pTspec : [in] pointer to the traffic spec
+ *
+ * Return: HDD_WLAN_WMM_STATUS_*
+ */
+hdd_wlan_wmm_status_e hdd_wmm_addts(hdd_adapter_t *pAdapter,
+ uint32_t handle,
+ sme_QosWmmTspecInfo *pTspec);
+
+/**
+ * hdd_wmm_delts() - Function which will delete a traffic spec at the
+ * request of an application
+ *
+ * @pAdapter: [in] pointer to adapter context
+ * @handle: [in] handle to uniquely identify a TS
+ *
+ * Return: HDD_WLAN_WMM_STATUS_*
+ */
+hdd_wlan_wmm_status_e hdd_wmm_delts(hdd_adapter_t *pAdapter, uint32_t handle);
+
+/**
+ * hdd_wmm_checkts() - Function which will return the status of a traffic
+ * spec at the request of an application
+ *
+ * @pAdapter: [in] pointer to adapter context
+ * @handle: [in] handle to uniquely identify a TS
+ *
+ * Return: HDD_WLAN_WMM_STATUS_*
+ */
+hdd_wlan_wmm_status_e hdd_wmm_checkts(hdd_adapter_t *pAdapter,
+ uint32_t handle);
+/**
+ * hdd_wmm_adapter_clear() - Function which will clear the WMM status
+ * for all the ACs
+ *
+ * @pAdapter: [in] pointer to Adapter context
+ *
+ * Return: CDF_STATUS enumeration
+ */
+CDF_STATUS hdd_wmm_adapter_clear(hdd_adapter_t *pAdapter);
+
+void wlan_hdd_process_peer_unauthorised_pause(hdd_adapter_t *adapter);
+#endif /* #ifndef _WLAN_HDD_WMM_H */
diff --git a/core/hdd/inc/wlan_hdd_wowl.h b/core/hdd/inc/wlan_hdd_wowl.h
new file mode 100644
index 0000000..3230f6a
--- /dev/null
+++ b/core/hdd/inc/wlan_hdd_wowl.h
@@ -0,0 +1,183 @@
+/*
+ * Copyright (c) 2013-2015 The Linux Foundation. All rights reserved.
+ *
+ * Previously licensed under the ISC license by Qualcomm Atheros, Inc.
+ *
+ *
+ * Permission to use, copy, modify, and/or distribute this software for
+ * any purpose with or without fee is hereby granted, provided that the
+ * above copyright notice and this permission notice appear in all
+ * copies.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
+ * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE
+ * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
+ * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
+ * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
+ * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
+ * PERFORMANCE OF THIS SOFTWARE.
+ */
+
+/*
+ * This file was originally distributed by Qualcomm Atheros, Inc.
+ * under proprietary terms before Copyright ownership was assigned
+ * to the Linux Foundation.
+ */
+
+#ifndef _WLAN_HDD_WOWL_H
+#define _WLAN_HDD_WOWL_H
+
+/**
+ * DOC: wlan_hdd_wowl
+ *
+ * This module houses all the logic for WOWL in HDD.
+ *
+ * It provides the following APIs
+ *
+ * - Ability to enable/disable following WoWL modes
+ * 1) Magic packet (MP) mode
+ * 2) Pattern Byte Matching (PBM) mode
+ * - Ability to add/remove patterns for PBM
+ *
+ * A Magic Packet is a packet that contains 6 0xFFs followed by 16
+ * contiguous copies of the receiving NIC's Ethernet address. There is
+ * no API to configure Magic Packet Pattern.
+ *
+ * Wakeup pattern (used for PBM) is defined as following:
+ * typedef struct
+ * {
+ * U8 PatternSize; // Non-Zero pattern size
+ * U8 PatternMaskSize; // Non-zero pattern mask size
+ * U8 PatternMask[PatternMaskSize]; // Pattern mask
+ * U8 Pattern[PatternSize]; // Pattern
+ * } hdd_wowl_ptrn_t;
+ *
+ * PatternSize and PatternMaskSize indicate size of the variable
+ * length Pattern and PatternMask. PatternMask indicates which bytes
+ * of an incoming packet should be compared with corresponding bytes
+ * in the pattern.
+ *
+ * Maximum allowed pattern size is 128 bytes. Maximum allowed
+ * PatternMaskSize is 16 bytes.
+ *
+ * Maximum number of patterns that can be configured is 8
+ *
+ * HDD will add following 2 commonly used patterns for PBM by default:
+ * 1) ARP Broadcast Pattern
+ * 2) Unicast Pattern
+ *
+ * However note that WoWL will not be enabled by default by HDD. WoWL
+ * needs to enabled explcitly by exercising the iwpriv command.
+ *
+ * HDD will expose an API that accepts patterns as Hex string in the
+ * following format:
+ * "PatternSize:PatternMaskSize:PatternMask:Pattern"
+ *
+ * Multiple patterns can be specified by deleimiting each pattern with
+ * the ';' token:
+ * "PatternSize1:PatternMaskSize1:PatternMask1:Pattern1;PatternSize2:..."
+ *
+ * Patterns can be configured dynamically via iwpriv cmd or statically
+ * via qcom_cfg.ini file
+ *
+ * PBM (when enabled) can perform filtering on unicast data or
+ * broadcast data or both. These configurations are part of factory
+ * defaults (cfg.dat) and the deafult behavior is to perform filtering
+ * on both unicast and data frames.
+ *
+ * MP filtering (when enabled) is performed ALWAYS on both unicast and
+ * broadcast data frames.
+ *
+ * Mangement frames are not subjected to WoWL filtering and are
+ * discarded when WoWL is enabled.
+ *
+ * Whenever a patern match succeeds, RX path is restored and packets
+ * (both management and data) will be pushed to the host from that
+ * point onwards. Therefore, exit from WoWL is implicit and happens
+ * automatically when the first packet match succeeds.
+ *
+ * WoWL works on top of BMPS. So when WoWL is requested, SME will
+ * attempt to put the device in BMPS mode (if not already in BMPS). If
+ * attempt to BMPS fails, request for WoWL will be rejected.
+ */
+
+#include <cdf_types.h>
+
+#define WOWL_PTRN_MAX_SIZE 146
+#define WOWL_PTRN_MASK_MAX_SIZE 19
+#define WOWL_MAX_PTRNS_ALLOWED CFG_MAX_WOW_FILTERS_MAX
+
+/**
+ * hdd_add_wowl_ptrn() - Function which will add the WoWL pattern to be
+ * used when PBM filtering is enabled
+ * @pAdapter: pointer to the adapter
+ * @ptrn: pointer to the pattern string to be added
+ *
+ * Return: false if any errors encountered, true otherwise
+ */
+bool hdd_add_wowl_ptrn(hdd_adapter_t *pAdapter, const char *ptrn);
+
+/**
+ * hdd_del_wowl_ptrn() - Function which will remove a WoWL pattern
+ * @pAdapter: pointer to the adapter
+ * @ptrn: pointer to the pattern string to be removed
+ *
+ * Return: false if any errors encountered, true otherwise
+ */
+bool hdd_del_wowl_ptrn(hdd_adapter_t *pAdapter, const char *ptrn);
+
+/**
+ * hdd_add_wowl_ptrn_debugfs() - Function which will add a WoW pattern
+ * sent from debugfs interface
+ * @pAdapter: pointer to the adapter
+ * @pattern_idx: index of the pattern to be added
+ * @pattern_offset: offset of the pattern in the frame payload
+ * @pattern_buf: pointer to the pattern hex string to be added
+ * @pattern_mask: pointer to the pattern mask hex string
+ *
+ * Return: false if any errors encountered, true otherwise
+ */
+bool hdd_add_wowl_ptrn_debugfs(hdd_adapter_t *pAdapter, uint8_t pattern_idx,
+ uint8_t pattern_offset, char *pattern_buf,
+ char *pattern_mask);
+
+/**
+ * hdd_del_wowl_ptrn_debugfs() - Function which will remove a WoW pattern
+ * sent from debugfs interface
+ * @pAdapter: pointer to the adapter
+ * @pattern_idx: index of the pattern to be removed
+ *
+ * Return: false if any errors encountered, true otherwise
+ */
+bool hdd_del_wowl_ptrn_debugfs(hdd_adapter_t *pAdapter, uint8_t pattern_idx);
+
+/**
+ * hdd_enter_wowl() - Function which will enable WoWL. At least one
+ * of MP and PBM must be enabled
+ * @pAdapter: pointer to the adapter
+ * @enable_mp: Whether to enable magic packet WoWL mode
+ * @enable_pbm: Whether to enable pattern byte matching WoWL mode
+ *
+ * Return: false if any errors encountered, true otherwise
+ */
+bool hdd_enter_wowl(hdd_adapter_t *pAdapter, bool enable_mp, bool enable_pbm);
+
+/**
+ * hdd_exit_wowl() - Function which will disable WoWL
+ * @pAdapter: pointer to the adapter
+ *
+ * Return: false if any errors encountered, true otherwise
+ */
+bool hdd_exit_wowl(hdd_adapter_t *pAdapter);
+
+/**
+ * hdd_init_wowl() - Init function which will initialize the WoWL module
+ * and perform any required initial configuration
+ * @pAdapter: pointer to the adapter
+ *
+ * Return: false if any errors encountered, true otherwise
+ */
+bool hdd_init_wowl(hdd_adapter_t *pAdapter);
+
+#endif /* #ifndef _WLAN_HDD_WOWL_H */