summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLinux Build Service Account <lnxbuild@localhost>2014-08-07 12:59:56 -0700
committerGerrit - the friendly Code Review server <code-review@localhost>2014-08-07 12:59:56 -0700
commitc04205e88a8d60a16cbbca85e2ddab11f2c7eceb (patch)
tree7d30d769f9f2aa5fa9ed1bd282c867c1b455caac
parentba67e6419efd7298ec71bfcdbecde8ed2fb43fc1 (diff)
parent5df7b6deb4ca1f737fa2e2056d33b010be906d78 (diff)
Merge "Release 1.0.0.161 QCACLD WLAN Driver"
-rw-r--r--CORE/CLD_TXRX/HTT/htt.h696
-rw-r--r--CORE/CLD_TXRX/HTT/htt_types.h30
-rw-r--r--CORE/HDD/inc/wlan_hdd_cfg.h12
-rw-r--r--CORE/HDD/inc/wlan_hdd_main.h12
-rw-r--r--CORE/HDD/src/wlan_hdd_assoc.c54
-rw-r--r--CORE/HDD/src/wlan_hdd_cfg.c7
-rw-r--r--CORE/HDD/src/wlan_hdd_cfg80211.c1199
-rwxr-xr-xCORE/HDD/src/wlan_hdd_main.c64
-rw-r--r--CORE/HDD/src/wlan_hdd_tdls.c17
-rw-r--r--CORE/HDD/src/wlan_hdd_wext.c91
-rw-r--r--CORE/MAC/inc/aniGlobal.h21
-rw-r--r--CORE/MAC/inc/qwlan_version.h4
-rw-r--r--CORE/MAC/inc/sirApi.h10
-rw-r--r--CORE/MAC/inc/sirMacProtDef.h163
-rw-r--r--CORE/MAC/src/cfg/cfgProcMsg.c4
-rw-r--r--CORE/MAC/src/pe/include/limApi.h3
-rw-r--r--CORE/MAC/src/pe/include/rrmGlobal.h1
-rw-r--r--CORE/MAC/src/pe/include/schGlobal.h6
-rw-r--r--CORE/MAC/src/pe/lim/limAIDmgmt.c3
-rw-r--r--CORE/MAC/src/pe/lim/limAdmitControl.c158
-rw-r--r--CORE/MAC/src/pe/lim/limApi.c71
-rw-r--r--CORE/MAC/src/pe/lim/limAssocUtils.c68
-rw-r--r--CORE/MAC/src/pe/lim/limIbssPeerMgmt.c96
-rw-r--r--CORE/MAC/src/pe/lim/limLogDump.c12
-rw-r--r--CORE/MAC/src/pe/lim/limP2P.c15
-rw-r--r--CORE/MAC/src/pe/lim/limProcessActionFrame.c10
-rw-r--r--CORE/MAC/src/pe/lim/limProcessAssocReqFrame.c18
-rw-r--r--CORE/MAC/src/pe/lim/limProcessAssocRspFrame.c3
-rw-r--r--CORE/MAC/src/pe/lim/limProcessAuthFrame.c9
-rw-r--r--CORE/MAC/src/pe/lim/limProcessCfgUpdates.c46
-rw-r--r--CORE/MAC/src/pe/lim/limProcessMessageQueue.c79
-rw-r--r--CORE/MAC/src/pe/lim/limProcessMlmReqMessages.c222
-rw-r--r--CORE/MAC/src/pe/lim/limProcessMlmRspMessages.c186
-rw-r--r--CORE/MAC/src/pe/lim/limProcessProbeReqFrame.c112
-rw-r--r--CORE/MAC/src/pe/lim/limProcessSmeReqMessages.c84
-rw-r--r--CORE/MAC/src/pe/lim/limProcessTdls.c184
-rw-r--r--CORE/MAC/src/pe/lim/limPropExtsUtils.c8
-rw-r--r--CORE/MAC/src/pe/lim/limScanResultUtils.c1
-rw-r--r--CORE/MAC/src/pe/lim/limSecurityUtils.c20
-rw-r--r--CORE/MAC/src/pe/lim/limSendManagementFrames.c85
-rw-r--r--CORE/MAC/src/pe/lim/limSendMessages.c16
-rw-r--r--CORE/MAC/src/pe/lim/limSendSmeRspMessages.c70
-rw-r--r--CORE/MAC/src/pe/lim/limSerDesUtils.c14
-rw-r--r--CORE/MAC/src/pe/lim/limSmeReqUtils.c6
-rw-r--r--CORE/MAC/src/pe/lim/limTimerUtils.c116
-rw-r--r--CORE/MAC/src/pe/lim/limTimerUtils.h3
-rw-r--r--CORE/MAC/src/pe/lim/limTypes.h4
-rw-r--r--CORE/MAC/src/pe/lim/limUtils.c54
-rw-r--r--CORE/MAC/src/pe/lim/limUtils.h4
-rw-r--r--CORE/MAC/src/pe/pmm/pmmApi.c148
-rw-r--r--CORE/MAC/src/pe/rrm/rrmApi.c8
-rw-r--r--CORE/MAC/src/pe/sch/schApi.c8
-rw-r--r--CORE/MAC/src/pe/sch/schBeaconGen.c12
-rw-r--r--CORE/MAC/src/pe/sch/schBeaconProcess.c1
-rw-r--r--CORE/SAP/src/sapFsm.c11
-rw-r--r--CORE/SERVICES/COMMON/ol_htt_tx_api.h1
-rw-r--r--CORE/SERVICES/WMA/wma.c218
-rw-r--r--CORE/SERVICES/WMA/wma.h1
-rw-r--r--CORE/SME/inc/csrApi.h6
-rw-r--r--CORE/SME/inc/csrInternal.h4
-rw-r--r--CORE/SME/inc/oemDataApi.h12
-rw-r--r--CORE/SME/inc/p2p_Api.h428
-rw-r--r--CORE/SME/inc/smeInside.h2
-rw-r--r--CORE/SME/inc/sme_Api.h28
-rw-r--r--CORE/SME/src/QoS/sme_Qos.c27
-rw-r--r--CORE/SME/src/ccm/ccmApi.c9
-rw-r--r--CORE/SME/src/csr/csrApiRoam.c154
-rw-r--r--CORE/SME/src/csr/csrApiScan.c26
-rw-r--r--CORE/SME/src/csr/csrInsideApi.h2
-rw-r--r--CORE/SME/src/csr/csrNeighborRoam.c2
-rw-r--r--CORE/SME/src/csr/csrTdlsProcess.c8
-rw-r--r--CORE/SME/src/csr/csrUtil.c1111
-rw-r--r--CORE/SME/src/oemData/oemDataApi.c62
-rw-r--r--CORE/SME/src/p2p/p2p_Api.c1847
-rw-r--r--CORE/SME/src/sme_common/sme_Api.c77
-rw-r--r--CORE/SYS/legacy/src/pal/src/palApiComm.c74
-rw-r--r--CORE/SYS/legacy/src/system/src/macInitApi.c2
-rw-r--r--CORE/WDA/inc/legacy/halMsgApi.h12
-rw-r--r--CORE/WDA/inc/legacy/palTypes.h5
-rw-r--r--CORE/WDA/inc/wlan_qct_wda.h1171
-rw-r--r--CORE/WDI/DP/src/wlan_qct_wdi_bd.c390
-rw-r--r--CORE/WDI/DP/src/wlan_qct_wdi_ds.c547
-rw-r--r--Kbuild10
-rwxr-xr-xfirmware_bin/WCNSS_qcom_cfg.ini3
84 files changed, 1246 insertions, 9352 deletions
diff --git a/CORE/CLD_TXRX/HTT/htt.h b/CORE/CLD_TXRX/HTT/htt.h
index c5cc56fbae05..9aa24b1f5e05 100644
--- a/CORE/CLD_TXRX/HTT/htt.h
+++ b/CORE/CLD_TXRX/HTT/htt.h
@@ -34,12 +34,8 @@
#ifndef _HTT_H_
#define _HTT_H_
-#if defined(ATH_TARGET)
-#include <osapi.h> /* A_UINT32 */
-#else
#include <a_types.h> /* A_UINT32 */
-#include <osapi_linux.h> /* PREPACK, POSTPACK */
-#endif
+#include <a_osapi.h> /* PREPACK, POSTPACK */
#ifdef ATHR_WIN_NWF
#pragma warning( disable:4214 ) //bit field types other than int
#endif
@@ -64,13 +60,15 @@
* 2.0 FW rx PPDU desc added to RX_IND message
* 2.1 Enable msdu_ext/frag_desc banking change for WIFI2.0
*----
- * 3.0 Remove HTT_H2T_MSG_TYPE_MGMT_TX messages
+ * 3.0 Remove HTT_H2T_MSG_TYPE_MGMT_TX message
* 3.1 Added HTT_T2H_MSG_TYPE_RX_IN_ORD_PADDR_IND message
* 3.2 Added HTT_H2T_MSG_TYPE_WDI_IPA_CFG,
* HTT_H2T_MSG_TYPE_WDI_IPA_OP_REQUEST messages
+ * 3.3 Added HTT_H2T_MSG_TYPE_AGGR_CFG_EX message
+ * 3.4 Added tx_compl_req flag in HTT tx descriptor
*/
#define HTT_CURRENT_VERSION_MAJOR 3
-#define HTT_CURRENT_VERSION_MINOR 2
+#define HTT_CURRENT_VERSION_MINOR 4
#define HTT_NUM_TX_FRAG_DESC 1024
@@ -79,11 +77,6 @@
#define HTT_CHECK_SET_VAL(field, val) \
A_ASSERT(!((val) & ~((field ## _M) >> (field ## _S))))
-#define HTT_INVALID_PEER 0xffff
-#define HTT_INVALID_VDEV 0xff
-#define HTT_NON_QOS_TID 16
-#define HTT_INVALID_TID 31
-
/*
* htt_dbg_stats_type -
* bit positions for each stats type within a stats type bitmask
@@ -104,17 +97,18 @@ enum htt_dbg_stats_type {
/*=== host -> target messages ===============================================*/
enum htt_h2t_msg_type {
- HTT_H2T_MSG_TYPE_VERSION_REQ = 0x0,
- HTT_H2T_MSG_TYPE_TX_FRM = 0x1,
- HTT_H2T_MSG_TYPE_RX_RING_CFG = 0x2,
- HTT_H2T_MSG_TYPE_STATS_REQ = 0x3,
- HTT_H2T_MSG_TYPE_SYNC = 0x4,
- HTT_H2T_MSG_TYPE_AGGR_CFG = 0x5,
+ HTT_H2T_MSG_TYPE_VERSION_REQ = 0x0,
+ HTT_H2T_MSG_TYPE_TX_FRM = 0x1,
+ HTT_H2T_MSG_TYPE_RX_RING_CFG = 0x2,
+ HTT_H2T_MSG_TYPE_STATS_REQ = 0x3,
+ HTT_H2T_MSG_TYPE_SYNC = 0x4,
+ HTT_H2T_MSG_TYPE_AGGR_CFG = 0x5,
HTT_H2T_MSG_TYPE_FRAG_DESC_BANK_CFG = 0x6,
DEPRECATED_HTT_H2T_MSG_TYPE_MGMT_TX = 0x7, /* no longer used */
HTT_H2T_MSG_TYPE_WDI_IPA_CFG = 0x8,
- HTT_H2T_MSG_TYPE_WDI_IPA_OP_REQ = 0x9,
- /* keep this last */
+ HTT_H2T_MSG_TYPE_WDI_IPA_OP_REQ = 0x9,
+ HTT_H2T_MSG_TYPE_AGGR_CFG_EX = 0xa, /* per vdev amsdu subfrm limit */
+ /* keep this last */
HTT_H2T_NUM_MSGS
};
@@ -150,24 +144,6 @@ enum htt_h2t_msg_type {
#define HTT_VER_REQ_BYTES 4
-/**
- * @brief General specification of the tx frame contents
- *
- * @details
- * for efficiency, the HTT packet type values correspond
- * to the bit positions of the WAL packet type values, so the
- * translation is a simple shift operation.
- */
-enum htt_pkt_type {
- htt_pkt_type_raw = 0,
- htt_pkt_type_native_wifi = 1,
- htt_pkt_type_ethernet = 2,
- htt_pkt_type_mgmt = 3,
-
- /* keep this last */
- htt_pkt_num_types
-};
-
/* TBDXXX: figure out a reasonable number */
#define HTT_HL_DATA_SVC_PIPE_DEPTH 24
#define HTT_LL_DATA_SVC_PIPE_DEPTH 64
@@ -251,10 +227,6 @@ PREPACK struct htt_tx_msdu_desc_t
#define HTT_TX_VDEV_ID_SHIFT 16
vdev_id: 6,
- #define HTT_TX_EXT_TID_DEFAULT 0
- #define HTT_TX_EXT_TID_NON_QOS_MCAST_BCAST 16
- #define HTT_TX_EXT_TID_MGMT 17
- #define HTT_TX_EXT_TID_INVALID 31
/* ext_tid -
* The extended traffic ID.
* If the TID is unknown, the extended TID is set to
@@ -281,18 +253,7 @@ PREPACK struct htt_tx_msdu_desc_t
*/
postponed: 1,
- /* more_in_batch -
- * This flag indicates that this frame is followed by other tx frames
- * that are in the process of being downloaded, and should arrive
- * in the target imminently.
- * This flag can be used by the target's tx scheduler to decide
- * whether to transmit the frame now, or to wait for the following
- * frames to arrive, to see if a more efficient (aggregate)
- * transmission can be formed once the subsequent frames arrive.
- * This flag only applies to HL systems, since in LL systems,
- * all tx descriptors are immediately downloaded.
- */
- more_in_batch: 1,
+ reserved_dword0_bits28: 1, /* unused */
/* cksum_offload -
* This flag indicates whether checksum offload is enabled or not
@@ -307,7 +268,28 @@ PREPACK struct htt_tx_msdu_desc_t
#define HTT_TX_L3_CKSUM_OFFLOAD 1
#define HTT_TX_L4_CKSUM_OFFLOAD 2
- reserved_dword0_bits31: 1; /* unused */
+ /* tx_comp_req -
+ * This flag indicates whether Tx Completion
+ * from fw is required or not.
+ * This flag is only relevant if tx completion is not
+ * universally enabled.
+ * For all LL systems, tx completion is mandatory,
+ * so this flag will be irrelevant.
+ * For HL systems tx completion is optional, but HL systems in which
+ * the bus throughput exceeds the WLAN throughput will
+ * probably want to always use tx completion, and thus
+ * would not check this flag.
+ * This flag is required when tx completions are not used universally,
+ * but are still required for certain tx frames for which
+ * an OTA delivery acknowledgment is needed by the host.
+ * In practice, this would be for HL systems in which the
+ * bus throughput is less than the WLAN throughput.
+ *
+ * 0x0 - Tx Completion Indication from Fw not required
+ * 0x1 - Tx Completion Indication from Fw is required
+ */
+ tx_compl_req: 1;
+
/* DWORD 1: MSDU length and ID */
#define HTT_TX_MSDU_LEN_DWORD 1
@@ -329,13 +311,23 @@ PREPACK struct htt_tx_msdu_desc_t
*/
A_UINT32 frags_desc_ptr;
- /* DWORD 3: peerid */
+ /* DWORD 3: peerid, chanfreq */
/*
* Peer ID : Target can use this value to know which peer-id packet
* destined to.
* It's intended to be specified by host in case of NAWDS.
*/
- A_UINT32 peerid;
+ A_UINT16 peerid;
+
+ /*
+ * Channel frequency: This identifies the desired channel
+ * frequency (in mhz) for tx frames. This is used by FW to help determine
+ * when it is safe to transmit or drop frames for off-channel
+ * operation. The default value of zero indicates to FW that the
+ * corresponding VDEV's home channel (if there is one) is the
+ * desired channel frequency.
+ */
+ A_UINT16 chanfreq;
/* Reason reserved is commented is increasing the htt structure size
* leads to some wierd issues. Contact Raj/Kyeyoon for more info
@@ -343,19 +335,6 @@ PREPACK struct htt_tx_msdu_desc_t
*/
} POSTPACK;
-/* decriptor information for Management frame*/
-#define HTT_MGMT_FRM_HDR_DOWNLOAD_LEN 32
-extern A_UINT32 mgmt_hdr_len;
-PREPACK struct htt_mgmt_tx_desc_t {
- A_UINT32 msg_type;
- A_UINT32 frag_paddr; /* DMAble address of the data */
- A_UINT32 desc_id; /* returned to host during completion
- * to free the meory*/
- A_UINT32 len; /* Fragment length */
- A_UINT32 vdev_id; /* virtual device ID*/
- A_UINT8 hdr[HTT_MGMT_FRM_HDR_DOWNLOAD_LEN]; /* frm header */
-} POSTPACK;
-
PREPACK struct htt_mgmt_tx_compl_ind {
A_UINT32 desc_id;
A_UINT32 status;
@@ -382,6 +361,13 @@ PREPACK struct htt_mgmt_tx_compl_ind {
#define HTT_TX_HDR_SIZE_ETHERNET 14
#define HTT_TX_HDR_SIZE_OUTER_HDR_MAX HTT_TX_HDR_SIZE_802_11_RAW
+A_COMPILE_TIME_ASSERT(
+ htt_encap_hdr_size_max_check_nwifi,
+ HTT_TX_HDR_SIZE_OUTER_HDR_MAX >= HTT_TX_HDR_SIZE_NATIVE_WIFI);
+A_COMPILE_TIME_ASSERT(
+ htt_encap_hdr_size_max_check_enet,
+ HTT_TX_HDR_SIZE_OUTER_HDR_MAX >= HTT_TX_HDR_SIZE_ETHERNET);
+
#define HTT_HL_TX_HDR_SIZE_IP 1600 /* also include payload */
#define HTT_LL_TX_HDR_SIZE_IP 16 /* up to the end of UDP header for IPv4 case */
@@ -433,16 +419,16 @@ PREPACK struct htt_mgmt_tx_compl_ind {
#define HTT_TX_DESC_POSTPONED_M 0x08000000
#define HTT_TX_DESC_POSTPONED_S 27
-#define HTT_TX_DESC_MORE_BATCH_OFFSET_BYTES 0
-#define HTT_TX_DESC_MORE_BATCH_OFFSET_DWORD 0
-#define HTT_TX_DESC_MORE_BATCH_M 0x10000000
-#define HTT_TX_DESC_MORE_BATCH_S 28
-
#define HTT_TX_DESC_CKSUM_OFFLOAD_OFFSET_BYTES 0
#define HTT_TX_DESC_CKSUM_OFFLOAD_OFFSET_DWORD 0
#define HTT_TX_DESC_CKSUM_OFFLOAD_M 0x60000000
#define HTT_TX_DESC_CKSUM_OFFLOAD_S 29
+#define HTT_TX_DESC_TX_COMP_OFFSET_BYTES 0
+#define HTT_TX_DESC_TX_COMP_OFFSET_DWORD 0
+#define HTT_TX_DESC_TX_COMP_M 0x80000000
+#define HTT_TX_DESC_TX_COMP_S 31
+
/* dword 1 */
#define HTT_TX_DESC_FRM_LEN_OFFSET_BYTES 4
#define HTT_TX_DESC_FRM_LEN_OFFSET_DWORD 1
@@ -538,6 +524,14 @@ PREPACK struct htt_mgmt_tx_compl_ind {
((_var) |= ((_val) << HTT_TX_DESC_CKSUM_OFFLOAD_S)); \
} while (0)
+#define HTT_TX_DESC_TX_COMP_GET(_var) \
+ (((_var) & HTT_TX_DESC_TX_COMP_M) >> HTT_TX_DESC_TX_COMP_S)
+#define HTT_TX_DESC_TX_COMP_SET(_var, _val) \
+ do { \
+ HTT_CHECK_SET_VAL(HTT_TX_DESC_TX_COMP, _val); \
+ ((_var) |= ((_val) << HTT_TX_DESC_TX_COMP_S)); \
+ } while (0)
+
/**
* @brief MAC DMA rx ring setup specification
* @details
@@ -1180,6 +1174,54 @@ PREPACK struct htt_mgmt_tx_compl_ind {
((_var) |= ((_val) << HTT_AGGR_CFG_MAX_NUM_AMSDU_SUBFRM_S)); \
} while (0)
+
+/**
+ * @brief host -> target HTT configure max amsdu info per vdev
+ *
+ * @details
+ * The HTT AGGR CFG EX tells the target to configure max_amsdu info per vdev
+ *
+ * |31 21|20 16|15 8|7 0|
+ * |-----------------------------------------------------------|
+ * | reserved | vdev id | max amsdu | msg type |
+ * |-----------------------------------------------------------|
+ * Header fields:
+ * - MSG_TYPE
+ * Bits 7:0
+ * Purpose: identifies this as a aggr cfg ex message
+ * Value: 0xa
+ * - MAX_NUM_AMSDU_SUBFRM
+ * Bits 15:8
+ * Purpose: max MSDUs per A-MSDU
+ * - VDEV_ID
+ * Bits 20:16
+ * Purpose: ID of the vdev to which this limit is applied
+ */
+#define HTT_AGGR_CFG_EX_MSG_SZ 4
+
+#define HTT_AGGR_CFG_EX_MAX_NUM_AMSDU_SUBFRM_M 0xff00
+#define HTT_AGGR_CFG_EX_MAX_NUM_AMSDU_SUBFRM_S 8
+#define HTT_AGGR_CFG_EX_VDEV_ID_M 0x1f0000
+#define HTT_AGGR_CFG_EX_VDEV_ID_S 16
+
+#define HTT_AGGR_CFG_EX_MAX_NUM_AMSDU_SUBFRM_GET(_var) \
+ (((_var) & HTT_AGGR_CFG_EX_MAX_NUM_AMSDU_SUBFRM_M) >> \
+ HTT_AGGR_CFG_EX_MAX_NUM_AMSDU_SUBFRM_S)
+#define HTT_AGGR_CFG_EX_MAX_NUM_AMSDU_SUBFRM_SET(_var, _val) \
+ do { \
+ HTT_CHECK_SET_VAL(HTT_AGGR_CFG_EX_MAX_NUM_AMSDU_SUBFRM, _val); \
+ ((_var) |= ((_val) << HTT_AGGR_CFG_EX_MAX_NUM_AMSDU_SUBFRM_S)); \
+ } while (0)
+
+#define HTT_AGGR_CFG_EX_VDEV_ID_GET(_var) \
+ (((_var) & HTT_AGGR_CFG_EX_VDEV_ID_M) >> \
+ HTT_AGGR_CFG_EX_VDEV_ID_S)
+#define HTT_AGGR_CFG_EX_VDEV_ID_SET(_var, _val) \
+ do { \
+ HTT_CHECK_SET_VAL(HTT_AGGR_CFG_EX_VDEV_ID, _val); \
+ ((_var) |= ((_val) << HTT_AGGR_CFG_EX_VDEV_ID_S)); \
+ } while (0)
+
/**
* @brief HTT WDI_IPA Config Message
*
@@ -1380,6 +1422,7 @@ enum htt_wdi_ipa_op_code {
HTT_WDI_IPA_OPCODE_TX_RESUME = 1,
HTT_WDI_IPA_OPCODE_RX_SUSPEND = 2,
HTT_WDI_IPA_OPCODE_RX_RESUME = 3,
+ HTT_WDI_IPA_OPCODE_DBG_STATS = 4,
/* keep this last */
HTT_WDI_IPA_OPCODE_MAX
};
@@ -1428,32 +1471,35 @@ PREPACK struct htt_wdi_ipa_op_request_t
((_var) |= ((_val) << HTT_WDI_IPA_OP_REQUEST_OP_CODE_S)); \
} while (0)
+
+
+
/*=== target -> host messages ===============================================*/
enum htt_t2h_msg_type {
- HTT_T2H_MSG_TYPE_VERSION_CONF = 0x0,
- HTT_T2H_MSG_TYPE_RX_IND = 0x1,
- HTT_T2H_MSG_TYPE_RX_FLUSH = 0x2,
- HTT_T2H_MSG_TYPE_PEER_MAP = 0x3,
- HTT_T2H_MSG_TYPE_PEER_UNMAP = 0x4,
- HTT_T2H_MSG_TYPE_RX_ADDBA = 0x5,
- HTT_T2H_MSG_TYPE_RX_DELBA = 0x6,
- HTT_T2H_MSG_TYPE_TX_COMPL_IND = 0x7,
- HTT_T2H_MSG_TYPE_PKTLOG = 0x8,
- HTT_T2H_MSG_TYPE_STATS_CONF = 0x9,
- HTT_T2H_MSG_TYPE_RX_FRAG_IND = 0xa,
- HTT_T2H_MSG_TYPE_SEC_IND = 0xb,
- HTT_T2H_MSG_TYPE_RC_UPDATE_IND = 0xc,
- HTT_T2H_MSG_TYPE_TX_INSPECT_IND = 0xd,
- HTT_T2H_MSG_TYPE_MGMT_TX_COMPL_IND= 0xe,
+ HTT_T2H_MSG_TYPE_VERSION_CONF = 0x0,
+ HTT_T2H_MSG_TYPE_RX_IND = 0x1,
+ HTT_T2H_MSG_TYPE_RX_FLUSH = 0x2,
+ HTT_T2H_MSG_TYPE_PEER_MAP = 0x3,
+ HTT_T2H_MSG_TYPE_PEER_UNMAP = 0x4,
+ HTT_T2H_MSG_TYPE_RX_ADDBA = 0x5,
+ HTT_T2H_MSG_TYPE_RX_DELBA = 0x6,
+ HTT_T2H_MSG_TYPE_TX_COMPL_IND = 0x7,
+ HTT_T2H_MSG_TYPE_PKTLOG = 0x8,
+ HTT_T2H_MSG_TYPE_STATS_CONF = 0x9,
+ HTT_T2H_MSG_TYPE_RX_FRAG_IND = 0xa,
+ HTT_T2H_MSG_TYPE_SEC_IND = 0xb,
+ DEPRECATED_HTT_T2H_MSG_TYPE_RC_UPDATE_IND = 0xc,
+ HTT_T2H_MSG_TYPE_TX_INSPECT_IND = 0xd,
+ HTT_T2H_MSG_TYPE_MGMT_TX_COMPL_IND = 0xe,
/* only used for HL, add HTT MSG for HTT CREDIT update */
- HTT_T2H_MSG_TYPE_TX_CREDIT_UPDATE_IND = 0xf,
- HTT_T2H_MSG_TYPE_RX_PN_IND = 0x10,
- HTT_T2H_MSG_TYPE_RX_OFFLOAD_DELIVER_IND = 0x11,
- HTT_T2H_MSG_TYPE_RX_IN_ORD_PADDR_IND = 0x12,
+ HTT_T2H_MSG_TYPE_TX_CREDIT_UPDATE_IND = 0xf,
+ HTT_T2H_MSG_TYPE_RX_PN_IND = 0x10,
+ HTT_T2H_MSG_TYPE_RX_OFFLOAD_DELIVER_IND = 0x11,
+ HTT_T2H_MSG_TYPE_RX_IN_ORD_PADDR_IND = 0x12,
/* 0x13 is reserved for RX_RING_LOW_IND (RX Full reordering related) */
- HTT_T2H_MSG_TYPE_WDI_IPA_OP_RESPONSE = 0x14,
+ HTT_T2H_MSG_TYPE_WDI_IPA_OP_RESPONSE = 0x14,
HTT_T2H_MSG_TYPE_TEST,
/* keep this last */
HTT_T2H_NUM_MSGS
@@ -1534,6 +1580,145 @@ enum htt_t2h_msg_type {
#define HTT_VER_CONF_BYTES 4
+
+/**
+ * @brief - target -> host HTT Rx In order indication message
+ *
+ * @details
+ *
+ * |31 24|23 |15|14|13|12|11|10|9|8|7|6|5|4 0|
+ * |----------------+-------------------+---------------------+---------------|
+ * | peer ID | | O| ext TID | msg type |
+ * |--------------------------------------------------------------------------|
+ * | MSDU count | Reserved | vdev id |
+ * |--------------------------------------------------------------------------|
+ * | MSDU 0 Bus address |
+ * |--------------------------------------------------------------------------|
+ * | Reserved | MSDU 0 FW Desc | MSDU 0 Length |
+ * |--------------------------------------------------------------------------|
+ * | MSDU 1 Bus address |
+ * |--------------------------------------------------------------------------|
+ * | Reserved | MSDU 1 FW Desc | MSDU 1 Length |
+ * |--------------------------------------------------------------------------|
+ */
+
+struct htt_rx_in_ord_paddr_ind_hdr_t
+{
+ A_UINT32 /* word 0 */
+ msg_type: 8,
+ ext_tid: 5,
+ offload: 1,
+ reserved_0: 2,
+ peer_id: 16;
+
+ A_UINT32 /* word 1 */
+ vap_id: 8,
+ reserved_1: 8,
+ msdu_cnt: 16;
+};
+
+struct htt_rx_in_ord_paddr_ind_msdu_t
+{
+ A_UINT32 dma_addr;
+ A_UINT32
+ length: 16,
+ fw_desc: 8,
+ reserved_1:8;
+};
+
+
+#define HTT_RX_IN_ORD_PADDR_IND_HDR_BYTES (sizeof(struct htt_rx_in_ord_paddr_ind_hdr_t))
+#define HTT_RX_IN_ORD_PADDR_IND_HDR_DWORDS (HTT_RX_IN_ORD_PADDR_IND_HDR_BYTES >> 2)
+#define HTT_RX_IN_ORD_PADDR_IND_MSDU_BYTE_OFFSET HTT_RX_IN_ORD_PADDR_IND_HDR_BYTES
+#define HTT_RX_IN_ORD_PADDR_IND_MSDU_DWORD_OFFSET HTT_RX_IN_ORD_PADDR_IND_HDR_DWORDS
+#define HTT_RX_IN_ORD_PADDR_IND_MSDU_BYTES (sizeof(struct htt_rx_in_ord_paddr_ind_msdu_t))
+#define HTT_RX_IN_ORD_PADDR_IND_MSDU_DWORDS (HTT_RX_IN_ORD_PADDR_IND_MSDU_BYTES >> 2)
+
+#define HTT_RX_IN_ORD_PADDR_IND_EXT_TID_M 0x00001f00
+#define HTT_RX_IN_ORD_PADDR_IND_EXT_TID_S 8
+#define HTT_RX_IN_ORD_PADDR_IND_OFFLOAD_M 0x00002000
+#define HTT_RX_IN_ORD_PADDR_IND_OFFLOAD_S 13
+#define HTT_RX_IN_ORD_PADDR_IND_PEER_ID_M 0xffff0000
+#define HTT_RX_IN_ORD_PADDR_IND_PEER_ID_S 16
+#define HTT_RX_IN_ORD_PADDR_IND_VAP_ID_M 0x000000ff
+#define HTT_RX_IN_ORD_PADDR_IND_VAP_ID_S 0
+#define HTT_RX_IN_ORD_PADDR_IND_MSDU_CNT_M 0xffff0000
+#define HTT_RX_IN_ORD_PADDR_IND_MSDU_CNT_S 16
+#define HTT_RX_IN_ORD_PADDR_IND_PADDR_M 0xffffffff
+#define HTT_RX_IN_ORD_PADDR_IND_PADDR_S 0
+#define HTT_RX_IN_ORD_PADDR_IND_FW_DESC_M 0x00ff0000
+#define HTT_RX_IN_ORD_PADDR_IND_FW_DESC_S 16
+#define HTT_RX_IN_ORD_PADDR_IND_MSDU_LEN_M 0x0000ffff
+#define HTT_RX_IN_ORD_PADDR_IND_MSDU_LEN_S 0
+
+
+#define HTT_RX_IN_ORD_PADDR_IND_EXT_TID_SET(word, value) \
+ do { \
+ HTT_CHECK_SET_VAL(HTT_RX_IN_ORD_PADDR_IND_EXT_TID, value); \
+ (word) |= (value) << HTT_RX_IN_ORD_PADDR_IND_EXT_TID_S; \
+ } while (0)
+#define HTT_RX_IN_ORD_PADDR_IND_EXT_TID_GET(word) \
+ (((word) & HTT_RX_IN_ORD_PADDR_IND_EXT_TID_M) >> HTT_RX_IN_ORD_PADDR_IND_EXT_TID_S)
+
+#define HTT_RX_IN_ORD_PADDR_IND_PEER_ID_SET(word, value) \
+ do { \
+ HTT_CHECK_SET_VAL(HTT_RX_IN_ORD_PADDR_IND_PEER_ID, value); \
+ (word) |= (value) << HTT_RX_IN_ORD_PADDR_IND_PEER_ID_S; \
+ } while (0)
+#define HTT_RX_IN_ORD_PADDR_IND_PEER_ID_GET(word) \
+ (((word) & HTT_RX_IN_ORD_PADDR_IND_PEER_ID_M) >> HTT_RX_IN_ORD_PADDR_IND_PEER_ID_S)
+
+#define HTT_RX_IN_ORD_PADDR_IND_VAP_ID_SET(word, value) \
+ do { \
+ HTT_CHECK_SET_VAL(HTT_RX_IN_ORD_PADDR_IND_VAP_ID, value); \
+ (word) |= (value) << HTT_RX_IN_ORD_PADDR_IND_VAP_ID_S; \
+ } while (0)
+#define HTT_RX_IN_ORD_PADDR_IND_VAP_ID_GET(word) \
+ (((word) & HTT_RX_IN_ORD_PADDR_IND_VAP_ID_M) >> HTT_RX_IN_ORD_PADDR_IND_VAP_ID_S)
+
+#define HTT_RX_IN_ORD_PADDR_IND_MSDU_CNT_SET(word, value) \
+ do { \
+ HTT_CHECK_SET_VAL(HTT_RX_IN_ORD_PADDR_IND_MSDU_CNT, value); \
+ (word) |= (value) << HTT_RX_IN_ORD_PADDR_IND_MSDU_CNT_S; \
+ } while (0)
+#define HTT_RX_IN_ORD_PADDR_IND_MSDU_CNT_GET(word) \
+ (((word) & HTT_RX_IN_ORD_PADDR_IND_MSDU_CNT_M) >> HTT_RX_IN_ORD_PADDR_IND_MSDU_CNT_S)
+
+#define HTT_RX_IN_ORD_PADDR_IND_PADDR_SET(word, value) \
+ do { \
+ HTT_CHECK_SET_VAL(HTT_RX_IN_ORD_PADDR_IND_PADDR, value); \
+ (word) |= (value) << HTT_RX_IN_ORD_PADDR_IND_PADDR_S; \
+ } while (0)
+#define HTT_RX_IN_ORD_PADDR_IND_PADDR_GET(word) \
+ (((word) & HTT_RX_IN_ORD_PADDR_IND_PADDR_M) >> HTT_RX_IN_ORD_PADDR_IND_PADDR_S)
+
+#define HTT_RX_IN_ORD_PADDR_IND_FW_DESC_SET(word, value) \
+ do { \
+ HTT_CHECK_SET_VAL(HTT_RX_IN_ORD_PADDR_IND_FW_DESC, value); \
+ (word) |= (value) << HTT_RX_IN_ORD_PADDR_IND_FW_DESC_S; \
+ } while (0)
+#define HTT_RX_IN_ORD_PADDR_IND_FW_DESC_GET(word) \
+ (((word) & HTT_RX_IN_ORD_PADDR_IND_FW_DESC_M) >> HTT_RX_IN_ORD_PADDR_IND_FW_DESC_S)
+
+#define HTT_RX_IN_ORD_PADDR_IND_MSDU_LEN_SET(word, value) \
+ do { \
+ HTT_CHECK_SET_VAL(HTT_RX_IN_ORD_PADDR_IND_MSDU_LEN, value); \
+ (word) |= (value) << HTT_RX_IN_ORD_PADDR_IND_MSDU_LEN_S; \
+ } while (0)
+#define HTT_RX_IN_ORD_PADDR_IND_MSDU_LEN_GET(word) \
+ (((word) & HTT_RX_IN_ORD_PADDR_IND_MSDU_LEN_M) >> HTT_RX_IN_ORD_PADDR_IND_MSDU_LEN_S)
+
+#define HTT_RX_IN_ORD_PADDR_IND_OFFLOAD_SET(word, value) \
+ do { \
+ HTT_CHECK_SET_VAL(HTT_RX_IN_ORD_IND_OFFLOAD, value); \
+ (word) |= (value) << HTT_RX_IN_ORD_IND_OFFLOAD_S; \
+ } while (0)
+#define HTT_RX_IN_ORD_PADDR_IND_OFFLOAD_GET(word) \
+ (((word) & HTT_RX_IN_ORD_PADDR_IND_OFFLOAD_M) >> HTT_RX_IN_ORD_PADDR_IND_OFFLOAD_S)
+
+
+/* definitions used within target -> host rx indication message */
+
PREPACK struct htt_rx_ind_hdr_prefix_t
{
A_UINT32 /* word 0 */
@@ -1658,6 +1843,10 @@ PREPACK struct htt_rx_ind_hdr_t
#define HTT_RX_IND_HDR_BYTES (sizeof(struct htt_rx_ind_hdr_t))
#define HTT_RX_IND_HDR_SIZE32 (HTT_RX_IND_HDR_BYTES >> 2)
+/* confirm that HTT_RX_IND_HDR_BYTES is a multiple of 4 */
+A_COMPILE_TIME_ASSERT(HTT_RX_IND_hdr_size_quantum,
+ (HTT_RX_IND_HDR_BYTES & 0x3) == 0);
+
/*
* HTT_RX_IND_FW_RX_PPDU_DESC_BYTE_OFFSET:
* the offset into the HTT rx indication message at which the
@@ -1683,132 +1872,6 @@ PREPACK struct htt_rx_ind_hdr_t
*/
#define HTT_RX_IND_FW_RX_DESC_BYTE_OFFSET HTT_RX_IND_HDR_BYTES
-/*@brief - target -> host HTT Rx In order indication message
- *
- * @details
- *
- * |31 24|23 |15|14|13|12|11|10|9|8|7|6|5|4 0|
- * |----------------+-------------------+---------------------+---------------|
- * | peer ID | | O| ext TID | msg type |
- * |--------------------------------------------------------------------------|
- * | MSDU count | Reserved | vdev id |
- * |--------------------------------------------------------------------------|
- * | MSDU 0 Bus address |
- * |--------------------------------------------------------------------------|
- * | Reserved | MSDU 0 FW Desc | MSDU 0 Length |
- * |--------------------------------------------------------------------------|
- * | MSDU 1 Bus address |
- * |--------------------------------------------------------------------------|
- * | Reserved | MSDU 1 FW Desc | MSDU 1 Length |
- * |--------------------------------------------------------------------------|
- */
-
-struct htt_rx_in_ord_paddr_ind_hdr_t
-{
- A_UINT32 /* word 0 */
- msg_type: 8,
- ext_tid: 5,
- reserved_0: 3,
- peer_id: 16;
-
- A_UINT32 /* word 1 */
- vap_id: 8,
- reserved_1: 8,
- msdu_cnt: 16;
-};
-
-struct htt_rx_in_ord_paddr_ind_msdu_t
-{
- A_UINT32 dma_addr;
- A_UINT32
- length: 16,
- fw_desc: 8,
- reserved_1:8;
-};
-
-#define HTT_RX_IN_ORD_PADDR_IND_HDR_BYTES (sizeof(struct htt_rx_in_ord_paddr_ind_hdr_t))
-#define HTT_RX_IN_ORD_PADDR_IND_HDR_DWORDS (HTT_RX_IN_ORD_PADDR_IND_HDR_BYTES >> 2)
-#define HTT_RX_IN_ORD_PADDR_IND_MSDU_BYTE_OFFSET HTT_RX_IN_ORD_PADDR_IND_HDR_BYTES
-#define HTT_RX_IN_ORD_PADDR_IND_MSDU_DWORD_OFFSET HTT_RX_IN_ORD_PADDR_IND_HDR_DWORDS
-#define HTT_RX_IN_ORD_PADDR_IND_MSDU_BYTES (sizeof(struct htt_rx_in_ord_paddr_ind_msdu_t))
-#define HTT_RX_IN_ORD_PADDR_IND_MSDU_DWORDS (HTT_RX_IN_ORD_PADDR_IND_MSDU_BYTES >> 2)
-
-#define HTT_RX_IN_ORD_PADDR_IND_EXT_TID_M 0x1f00
-#define HTT_RX_IN_ORD_PADDR_IND_EXT_TID_S 8
-#define HTT_RX_IN_ORD_PADDR_IND_PEER_ID_M 0xffff0000
-#define HTT_RX_IN_ORD_PADDR_IND_PEER_ID_S 16
-#define HTT_RX_IN_ORD_PADDR_IND_OFFLOAD_M 0x2000
-#define HTT_RX_IN_ORD_PADDR_IND_OFFLOAD_S 13
-#define HTT_RX_IN_ORD_PADDR_IND_VAP_ID_M 0xff
-#define HTT_RX_IN_ORD_PADDR_IND_VAP_ID_S 0
-#define HTT_RX_IN_ORD_PADDR_IND_MSDU_CNT_M 0xffff0000
-#define HTT_RX_IN_ORD_PADDR_IND_MSDU_CNT_S 16
-#define HTT_RX_IN_ORD_PADDR_IND_PADDR_M 0xffffffff
-#define HTT_RX_IN_ORD_PADDR_IND_PADDR_S 0
-#define HTT_RX_IN_ORD_PADDR_IND_FW_DESC_M 0x00ff0000
-#define HTT_RX_IN_ORD_PADDR_IND_FW_DESC_S 16
-#define HTT_RX_IN_ORD_PADDR_IND_MSDU_LEN_M 0x0000ffff
-#define HTT_RX_IN_ORD_PADDR_IND_MSDU_LEN_S 0
-
-#define HTT_RX_IN_ORD_PADDR_IND_EXT_TID_SET(word, value) \
- do { \
- HTT_CHECK_SET_VAL(HTT_RX_IN_ORD_PADDR_IND_EXT_TID, value); \
- (word) |= (value) << HTT_RX_IN_ORD_PADDR_IND_EXT_TID_S; \
- } while (0)
-#define HTT_RX_IN_ORD_PADDR_IND_EXT_TID_GET(word) \
- (((word) & HTT_RX_IN_ORD_PADDR_IND_EXT_TID_M) >> HTT_RX_IN_ORD_PADDR_IND_EXT_TID_S)
-
-#define HTT_RX_IN_ORD_PADDR_IND_PEER_ID_SET(word, value) \
- do { \
- HTT_CHECK_SET_VAL(HTT_RX_IN_ORD_PADDR_IND_PEER_ID, value); \
- (word) |= (value) << HTT_RX_IN_ORD_PADDR_IND_PEER_ID_S; \
- } while (0)
-#define HTT_RX_IN_ORD_PADDR_IND_PEER_ID_GET(word) \
- (((word) & HTT_RX_IN_ORD_PADDR_IND_PEER_ID_M) >> HTT_RX_IN_ORD_PADDR_IND_PEER_ID_S)
-
-#define HTT_RX_IN_ORD_PADDR_IND_VAP_ID_SET(word, value) \
- do { \
- HTT_CHECK_SET_VAL(HTT_RX_IN_ORD_PADDR_IND_VAP_ID, value); \
- (word) |= (value) << HTT_RX_IN_ORD_PADDR_IND_VAP_ID_S; \
- } while (0)
-#define HTT_RX_IN_ORD_PADDR_IND_VAP_ID_GET(word) \
- (((word) & HTT_RX_IN_ORD_PADDR_IND_VAP_ID_M) >> HTT_RX_IN_ORD_PADDR_IND_VAP_ID_S)
-
-#define HTT_RX_IN_ORD_PADDR_IND_MSDU_CNT_SET(word, value) \
- do { \
- HTT_CHECK_SET_VAL(HTT_RX_IN_ORD_PADDR_IND_MSDU_CNT, value); \
- (word) |= (value) << HTT_RX_IN_ORD_PADDR_IND_MSDU_CNT_S; \
- } while (0)
-#define HTT_RX_IN_ORD_PADDR_IND_MSDU_CNT_GET(word) \
- (((word) & HTT_RX_IN_ORD_PADDR_IND_MSDU_CNT_M) >> HTT_RX_IN_ORD_PADDR_IND_MSDU_CNT_S)
-#define HTT_RX_IN_ORD_PADDR_IND_PADDR_SET(word, value) \
- do { \
- HTT_CHECK_SET_VAL(HTT_RX_IN_ORD_PADDR_IND_PADDR, value); \
- (word) |= (value) << HTT_RX_IN_ORD_PADDR_IND_PADDR_S; \
- } while (0)
-#define HTT_RX_IN_ORD_PADDR_IND_PADDR_GET(word) \
- (((word) & HTT_RX_IN_ORD_PADDR_IND_PADDR_M) >> HTT_RX_IN_ORD_PADDR_IND_PADDR_S)
-#define HTT_RX_IN_ORD_PADDR_IND_FW_DESC_SET(word, value) \
- do { \
- HTT_CHECK_SET_VAL(HTT_RX_IN_ORD_PADDR_IND_FW_DESC, value); \
- (word) |= (value) << HTT_RX_IN_ORD_PADDR_IND_FW_DESC_S; \
- } while (0)
-#define HTT_RX_IN_ORD_PADDR_IND_FW_DESC_GET(word) \
- (((word) & HTT_RX_IN_ORD_PADDR_IND_FW_DESC_M) >> HTT_RX_IN_ORD_PADDR_IND_FW_DESC_S)
-#define HTT_RX_IN_ORD_PADDR_IND_MSDU_LEN_SET(word, value) \
- do { \
- HTT_CHECK_SET_VAL(HTT_RX_IN_ORD_PADDR_IND_MSDU_LEN, value); \
- (word) |= (value) << HTT_RX_IN_ORD_PADDR_IND_MSDU_LEN_S; \
- } while (0)
-#define HTT_RX_IN_ORD_PADDR_IND_MSDU_LEN_GET(word) \
- (((word) & HTT_RX_IN_ORD_PADDR_IND_MSDU_LEN_M) >> HTT_RX_IN_ORD_PADDR_IND_MSDU_LEN_S)
-#define HTT_RX_IN_ORD_PADDR_IND_OFFLOAD_SET(word, value) \
- do { \
- HTT_CHECK_SET_VAL(HTT_RX_IN_ORD_IND_OFFLOAD, value); \
- (word) |= (value) << HTT_RX_IN_ORD_IND_OFFLOAD_S; \
- } while (0)
-#define HTT_RX_IN_ORD_PADDR_IND_OFFLOAD_GET(word) \
- (((word) & HTT_RX_IN_ORD_PADDR_IND_OFFLOAD_M) >> HTT_RX_IN_ORD_PADDR_IND_OFFLOAD_S)
/**
* @brief target -> host rx indication message definition
@@ -1936,7 +1999,7 @@ struct htt_rx_in_ord_paddr_ind_msdu_t
* corresponding MPDU is actually present.
* This field is only valid if the FV bit is set.
* - REL_SEQ_NUM_START
- * Bits 5:0
+ * Bits 17:12
* Purpose: Indicate the start of a series of MPDUs to release.
* All MPDUs within this series are present and valid - the host
* need not check each sequence number within this range to see if
@@ -1946,7 +2009,7 @@ struct htt_rx_in_ord_paddr_ind_msdu_t
* The sequence number for the first MPDUs to check to release.
* The sequence number is masked by 0x3f.
* - REL_SEQ_NUM_END
- * Bits 11:6
+ * Bits 23:18
* Purpose: Indicate the end of a series of MPDUs to release.
* Value:
* The sequence number one larger than the sequence number of the
@@ -1956,6 +2019,12 @@ struct htt_rx_in_ord_paddr_ind_msdu_t
* need not check each sequence number within this range to see if
* the corresponding MPDU is actually present.
* This field is only valid if the RV bit is set.
+ * - NUM_MPDU_RANGES
+ * Bits 31:24
+ * Purpose: Indicate how many ranges of MPDUs are present.
+ * Each MPDU range consists of a series of contiguous MPDUs within the
+ * rx frame sequence which all have the same MPDU status.
+ * Value: 1-63 (typically a small number, like 1-3)
*
* Rx PPDU descriptor fields:
* - RSSI_CMB
@@ -2293,6 +2362,7 @@ struct htt_rx_in_ord_paddr_ind_msdu_t
#define HTT_RX_IND_FW_RX_DESC_BYTES_GET(word) \
(((word) & HTT_RX_IND_FW_RX_DESC_BYTES_M) >> HTT_RX_IND_FW_RX_DESC_BYTES_S)
+
#define HTT_RX_IND_FLUSH_SEQ_NUM_START_SET(word, value) \
do { \
HTT_CHECK_SET_VAL(HTT_RX_IND_FLUSH_SEQ_NUM_START, value); \
@@ -2576,7 +2646,6 @@ PREPACK struct hl_htt_rx_desc_base {
fragment:1,
key_id_oct:8,
resv1:6;
-
A_UINT32
pn_31_0;
union {
@@ -2992,7 +3061,7 @@ PREPACK struct hl_htt_rx_desc_base {
*
* |31 24|23 16|15 8|7 0|
* |-----------------------------------------------------------------------|
- * | peer ID | reserved | msg type |
+ * | peer ID | VDEV ID | msg type |
* |-----------------------------------------------------------------------|
*
* The following field definitions describe the format of the rx conn map
@@ -3001,7 +3070,7 @@ PREPACK struct hl_htt_rx_desc_base {
* Bits 7:0
* Purpose: identifies this as an rx conn map or conn unmap message
* Value: conn map -> 0x3, conn unmap -> 0x4
- * - VDEV_ID (conn map only)
+ * - VDEV_ID
* Bits 15:8
* Purpose: Indicates which virtual device the connection is associated
* with.
@@ -3058,6 +3127,9 @@ PREPACK struct hl_htt_rx_desc_base {
#define HTT_RX_PEER_UNMAP_PEER_ID_SET HTT_RX_PEER_MAP_PEER_ID_SET
#define HTT_RX_PEER_UNMAP_PEER_ID_GET HTT_RX_PEER_MAP_PEER_ID_GET
+#define HTT_RX_PEER_UNMAP_VDEV_ID_SET HTT_RX_PEER_MAP_VDEV_ID_SET
+#define HTT_RX_PEER_UNMAP_VDEV_ID_GET HTT_RX_PEER_MAP_VDEV_ID_GET
+
#define HTT_RX_PEER_UNMAP_BYTES 4
@@ -3266,13 +3338,15 @@ PREPACK struct hl_htt_rx_desc_base {
* The following diagram shows the format of the TX completion indication sent
* from the target to the host
*
- * |31 24|23 16| 15 |14 11|10 8|7 0|
+ * |31 25| 24|23 16| 15 |14 11|10 8|7 0|
* |-------------------------------------------------------------|
- * header: | reserved | num | t_i| tid |status| msg_type |
+ * header: | reserved |append| num | t_i| tid |status| msg_type |
* |-------------------------------------------------------------|
* payload: | MSDU1 ID | MSDU0 ID |
* |-------------------------------------------------------------|
* : MSDU3 ID : MSDU2 ID :
+ * |-------------------------------------------------------------|
+ * | struct htt_tx_compl_ind_append_retries |
* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
*
* The following field definitions describe the format of the TX completion
@@ -3299,6 +3373,11 @@ PREPACK struct hl_htt_rx_desc_base {
* Bits 23:16
* Purpose: the number of payload in this indication
* Value: 1 to 255
+ * - append
+ * Bits 24:24
+ * Purpose: append the struct htt_tx_compl_ind_append_retries which contains
+ * the number of tx retries for one MSDU at the end of this message
+ * Value: 0 indicates no appending; 1 indicates appending
* Payload fields:
* - hmsdu_id
* Bits 15:0
@@ -3307,13 +3386,15 @@ PREPACK struct hl_htt_rx_desc_base {
*/
#define HTT_TX_COMPL_IND_STATUS_S 8
-#define HTT_TX_COMPL_IND_STATUS_M 0x700
+#define HTT_TX_COMPL_IND_STATUS_M 0x00000700
#define HTT_TX_COMPL_IND_TID_S 11
-#define HTT_TX_COMPL_IND_TID_M 0x7800
+#define HTT_TX_COMPL_IND_TID_M 0x00007800
#define HTT_TX_COMPL_IND_TID_INV_S 15
-#define HTT_TX_COMPL_IND_TID_INV_M 0x8000
+#define HTT_TX_COMPL_IND_TID_INV_M 0x00008000
#define HTT_TX_COMPL_IND_NUM_S 16
-#define HTT_TX_COMPL_IND_NUM_M 0xff0000
+#define HTT_TX_COMPL_IND_NUM_M 0x00ff0000
+#define HTT_TX_COMPL_IND_APPEND_S 24
+#define HTT_TX_COMPL_IND_APPEND_M 0x01000000
#define HTT_TX_COMPL_IND_STATUS_SET(_info, _val) \
do { \
@@ -3344,6 +3425,13 @@ PREPACK struct hl_htt_rx_desc_base {
#define HTT_TX_COMPL_IND_TID_INV_GET(_info) \
(((_info) & HTT_TX_COMPL_IND_TID_INV_M) >> \
HTT_TX_COMPL_IND_TID_INV_S)
+#define HTT_TX_COMPL_IND_APPEND_SET(_info, _val) \
+ do { \
+ HTT_CHECK_SET_VAL(HTT_TX_COMPL_IND_APPEND, _val); \
+ ((_info) |= ((_val) << HTT_TX_COMPL_IND_APPEND_S)); \
+ } while (0)
+#define HTT_TX_COMPL_IND_APPEND_GET(_info) \
+ (((_info) & HTT_TX_COMPL_IND_APPEND_M) >> HTT_TX_COMPL_IND_APPEND_S)
#define HTT_TX_COMPL_CTXT_SZ sizeof(A_UINT16)
#define HTT_TX_COMPL_CTXT_NUM(_bytes) ((_bytes) >> 1)
@@ -3355,100 +3443,20 @@ PREPACK struct hl_htt_rx_desc_base {
#define HTT_TX_COMPL_IND_STAT_NO_ACK 2
#define HTT_TX_COMPL_IND_STAT_POSTPONE 3
+#define HTT_TX_COMPL_IND_APPEND_SET_MORE_RETRY(f) ((f) |= 0x1)
+#define HTT_TX_COMPL_IND_APPEND_CLR_MORE_RETRY(f) ((f) &= (~0x1))
+
PREPACK struct htt_tx_compl_ind_base {
A_UINT32 hdr;
A_UINT16 payload[1/*or more*/];
} POSTPACK;
-
-/**
- * @brief target -> host rate-control update indication message
- *
- * @details
- * The following diagram shows the format of the RC Update message
- * sent from the target to the host, while processing the tx-completion
- * of a transmitted PPDU.
- *
- * |31 24|23 16|15 8|7 0|
- * |-------------------------------------------------------------|
- * | peer ID | vdev ID | msg_type |
- * |-------------------------------------------------------------|
- * | MAC addr 3 | MAC addr 2 | MAC addr 1 | MAC addr 0 |
- * |-------------------------------------------------------------|
- * | reserved | num elems | MAC addr 5 | MAC addr 4 |
- * |-------------------------------------------------------------|
- * | : |
- * : HTT_RC_TX_DONE_PARAMS (DWORD-aligned) :
- * | : |
- * |-------------------------------------------------------------|
- * | : |
- * : HTT_RC_TX_DONE_PARAMS (DWORD-aligned) :
- * | : |
- * |-------------------------------------------------------------|
- * : :
- * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- *
- */
-
-typedef struct {
- A_UINT32 rate_code; /* rate code, bw, chain mask sgi */
- A_UINT32 rate_code_flags;
- A_UINT32 flags; /* Encodes information such as excessive
- retransmission, aggregate, some info
- from .11 frame control,
- STBC, LDPC, (SGI and Tx Chain Mask
- are encoded in ptx_rc->flags field),
- AMPDU truncation (BT/time based etc.),
- RTS/CTS attempt */
-
- A_UINT32 num_enqued; /* # of MPDUs (for non-AMPDU 1) for this rate */
- A_UINT32 num_retries; /* Total # of transmission attempt for this rate */
- A_UINT32 num_failed; /* # of failed MPDUs in A-MPDU, 0 otherwise */
- A_UINT32 ack_rssi; /* ACK RSSI: b'7..b'0 avg RSSI across all chain */
- A_UINT32 time_stamp ; /* ACK timestamp (helps determine age) */
- A_UINT32 is_probe; /* Valid if probing. Else, 0 */
-} HTT_RC_TX_DONE_PARAMS;
-
-#define HTT_RC_UPDATE_CTXT_SZ (sizeof(HTT_RC_TX_DONE_PARAMS)) /* bytes */
-#define HTT_RC_UPDATE_HDR_SZ (12) /* bytes */
-
-#define HTT_RC_UPDATE_MAC_ADDR_OFFSET (4) /* bytes */
-#define HTT_RC_UPDATE_MAC_ADDR_LENGTH IEEE80211_ADDR_LEN /* bytes */
-
-#define HTT_RC_UPDATE_VDEVID_S 8
-#define HTT_RC_UPDATE_VDEVID_M 0xff00
-#define HTT_RC_UPDATE_PEERID_S 16
-#define HTT_RC_UPDATE_PEERID_M 0xffff0000
-
-#define HTT_RC_UPDATE_NUM_ELEMS_S 16
-#define HTT_RC_UPDATE_NUM_ELEMS_M 0x00ff0000
-
-#define HTT_RC_UPDATE_VDEVID_SET(_info, _val) \
- do { \
- HTT_CHECK_SET_VAL(HTT_RC_UPDATE_VDEVID, _val); \
- ((_info) |= ((_val) << HTT_RC_UPDATE_VDEVID_S)); \
- } while (0)
-
-#define HTT_RC_UPDATE_VDEVID_GET(_info) \
- (((_info) & HTT_RC_UPDATE_VDEVID_M) >> HTT_RC_UPDATE_VDEVID_S)
-
-#define HTT_RC_UPDATE_PEERID_SET(_info, _val) \
- do { \
- HTT_CHECK_SET_VAL(HTT_RC_UPDATE_PEERID, _val); \
- ((_info) |= ((_val) << HTT_RC_UPDATE_PEERID_S)); \
- } while (0)
-
-#define HTT_RC_UPDATE_PEERID_GET(_info) \
- (((_info) & HTT_RC_UPDATE_PEERID_M) >> HTT_RC_UPDATE_PEERID_S)
-
-#define HTT_RC_UPDATE_NUM_ELEMS_SET(_info, _val) \
- do { \
- HTT_CHECK_SET_VAL(HTT_RC_UPDATE_NUM_ELEMS, _val); \
- ((_info) |= ((_val) << HTT_RC_UPDATE_NUM_ELEMS_S)); \
- } while (0)
-
-#define HTT_RC_UPDATE_NUM_ELEMS_GET(_info) \
- (((_info) & HTT_RC_UPDATE_NUM_ELEMS_M) >> HTT_RC_UPDATE_NUM_ELEMS_S)
+PREPACK struct htt_tx_compl_ind_append_retries {
+ A_UINT16 msdu_id;
+ A_UINT8 tx_retries;
+ A_UINT8 flag; /* Bit 0, 1: another append_retries struct is appended
+ 0: this is the last append_retries struct */
+} POSTPACK;
/**
@@ -3821,6 +3829,7 @@ enum htt_dbg_stats_status {
HTT_T2H_STATS_CONF_TLV_LENGTH_S)
#define HL_HTT_FW_RX_DESC_RSVD_SIZE 18
+#define HTT_MAX_AGGR 64
#define HTT_HL_MAX_AGGR 18
/**
@@ -3981,8 +3990,8 @@ PREPACK struct htt_tx_frag_desc_bank_cfg_t {
* Bits 8
* identifies whether credit delta is positive or negative
* Value:
- * - 0x0: credti delta is positive, rebalance in some buffers
- * - 0x1: credti delta is negative, rebalance out some buffers
+ * - 0x0: credit delta is positive, rebalance in some buffers
+ * - 0x1: credit delta is negative, rebalance out some buffers
* Bits 15:9
* - reserved
* - DELTA_COUNT
@@ -3990,9 +3999,6 @@ PREPACK struct htt_tx_frag_desc_bank_cfg_t {
* Purpose: Specify current htt credit delta absolute count
*/
-
-
-
#define HTT_TX_CREDIT_SIGN_BIT_M 0x00000100
#define HTT_TX_CREDIT_SIGN_BIT_S 8
#define HTT_TX_CREDIT_DELTA_ABS_M 0xffff0000
@@ -4023,7 +4029,6 @@ PREPACK struct htt_tx_frag_desc_bank_cfg_t {
#define HTT_TX_CREDIT_SIGN_BIT_POSITIVE 0x0
#define HTT_TX_CREDIT_SIGN_BIT_NEGATIVE 0x1
-#define DEBUG_DMA_DONE
/**
* @brief HTT WDI_IPA Operation Response Message
@@ -4035,7 +4040,13 @@ PREPACK struct htt_tx_frag_desc_bank_cfg_t {
* |----------------+----------------+----------------+----------------|
* | op_code | Rsvd | msg_type |
* |-------------------------------------------------------------------|
- *
+ * | Rsvd | Response len |
+ * |-------------------------------------------------------------------|
+ * | |
+ * | Response-type specific info |
+ * | |
+ * | |
+ * |-------------------------------------------------------------------|
* Header fields:
* - MSG_TYPE
* Bits 7:0
@@ -4045,22 +4056,34 @@ PREPACK struct htt_tx_frag_desc_bank_cfg_t {
* Bits 31:16
* Purpose: Identifies the operation target is responding to (e.g. TX suspend)
* value: = enum htt_wdi_ipa_op_code
+ * - RSP_LEN
+ * Bits 16:0
+ * Purpose: length for the response-type specific info
+ * value: = length in bytes for response-type specific info
+ * For example, if OP_CODE == HTT_WDI_IPA_OPCODE_DBG_STATS, the
+ * length value will be sizeof(struct wlan_wdi_ipa_dbg_stats_t).
*/
PREPACK struct htt_wdi_ipa_op_response_t
{
/* DWORD 0: flags and meta-data */
A_UINT32
- msg_type: 8, /* HTT_T2H_MSG_TYPE_WDI_IPA_OP_RESPONSE */
- reserved: 8,
- op_code: 16;
+ msg_type: 8, /* HTT_T2H_MSG_TYPE_WDI_IPA_OP_RESPONSE */
+ reserved1: 8,
+ op_code: 16;
+ A_UINT32
+ rsp_len: 16,
+ reserved2: 16;
} POSTPACK;
-#define HTT_WDI_IPA_OP_RESPONSE_SZ 4 /* bytes */
+#define HTT_WDI_IPA_OP_RESPONSE_SZ 8 /* bytes */
#define HTT_WDI_IPA_OP_RESPONSE_OP_CODE_M 0xffff0000
#define HTT_WDI_IPA_OP_RESPONSE_OP_CODE_S 16
+#define HTT_WDI_IPA_OP_RESPONSE_RSP_LEN_M 0x0000ffff
+#define HTT_WDI_IPA_OP_RESPONSE_RSP_LEN_S 0
+
#define HTT_WDI_IPA_OP_RESPONSE_OP_CODE_GET(_var) \
(((_var) & HTT_WDI_IPA_OP_RESPONSE_OP_CODE_M) >> HTT_WDI_IPA_OP_RESPONSE_OP_CODE_S)
#define HTT_WDI_IPA_OP_RESPONSE_OP_CODE_SET(_var, _val) \
@@ -4069,4 +4092,13 @@ PREPACK struct htt_wdi_ipa_op_response_t
((_var) |= ((_val) << HTT_WDI_IPA_OP_RESPONSE_OP_CODE_S)); \
} while (0)
+#define HTT_WDI_IPA_OP_RESPONSE_RSP_LEN_GET(_var) \
+ (((_var) & HTT_WDI_IPA_OP_RESPONSE_RSP_LEN_M) >> HTT_WDI_IPA_OP_RESPONSE_RSP_LEN_S)
+#define HTT_WDI_IPA_OP_RESPONSE_RSP_LEN_SET(_var, _val) \
+ do { \
+ HTT_CHECK_SET_VAL(HTT_WDI_IPA_OP_RESPONSE_RSP_LEN, _val); \
+ ((_var) |= ((_val) << HTT_WDI_IPA_OP_RESPONSE_RSP_LEN_S)); \
+ } while (0)
+
+
#endif
diff --git a/CORE/CLD_TXRX/HTT/htt_types.h b/CORE/CLD_TXRX/HTT/htt_types.h
index bdab0b533763..51fddfc3552a 100644
--- a/CORE/CLD_TXRX/HTT/htt_types.h
+++ b/CORE/CLD_TXRX/HTT/htt_types.h
@@ -39,6 +39,8 @@
#include <ol_ctrl_api.h> /* ol_pdev_handle */
#include <ol_txrx_api.h> /* ol_txrx_pdev_handle */
+#define DEBUG_DMA_DONE
+
#define HTT_TX_MUTEX_TYPE adf_os_spinlock_t
#ifdef QCA_TX_HTT2_SUPPORT
@@ -48,6 +50,34 @@
#endif
#endif /* QCA_TX_HTT2_SUPPORT */
+#define HTT_INVALID_PEER 0xffff
+#define HTT_INVALID_VDEV 0xff
+#define HTT_NON_QOS_TID 16
+#define HTT_INVALID_TID 31
+
+#define HTT_TX_EXT_TID_DEFAULT 0
+#define HTT_TX_EXT_TID_NON_QOS_MCAST_BCAST 16
+#define HTT_TX_EXT_TID_MGMT 17
+#define HTT_TX_EXT_TID_INVALID 31
+
+/**
+ * @brief General specification of the tx frame contents
+ *
+ * @details
+ * for efficiency, the HTT packet type values correspond
+ * to the bit positions of the WAL packet type values, so the
+ * translation is a simple shift operation.
+ */
+enum htt_pkt_type {
+ htt_pkt_type_raw = 0,
+ htt_pkt_type_native_wifi = 1,
+ htt_pkt_type_ethernet = 2,
+ htt_pkt_type_mgmt = 3,
+
+ /* keep this last */
+ htt_pkt_num_types
+};
+
struct htt_pdev_t;
struct htt_htc_pkt {
diff --git a/CORE/HDD/inc/wlan_hdd_cfg.h b/CORE/HDD/inc/wlan_hdd_cfg.h
index 1af28a67e521..bfb2cdd87e44 100644
--- a/CORE/HDD/inc/wlan_hdd_cfg.h
+++ b/CORE/HDD/inc/wlan_hdd_cfg.h
@@ -304,16 +304,6 @@ typedef enum
#define CFG_DOT11_MODE_DEFAULT eHDD_DOT11_MODE_11n
#endif
-#define CFG_SAP_DOT11_MODE_NAME "gSapDot11Mode"
-#define CFG_SAP_DOT11_MODE_MIN eHDD_DOT11_MODE_AUTO
-#ifdef WLAN_FEATURE_11AC
-#define CFG_SAP_DOT11_MODE_MAX eHDD_DOT11_MODE_11ac
-#define CFG_SAP_DOT11_MODE_DEFAULT eHDD_DOT11_MODE_11ac
-#else
-#define CFG_SAP_DOT11_MODE_MAX eHDD_DOT11_MODE_11b_ONLY
-#define CFG_SAP_DOT11_MODE_DEFAULT eHDD_DOT11_MODE_11n
-#endif
-
#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
@@ -3258,8 +3248,6 @@ typedef struct
v_BOOL_t debugP2pRemainOnChannel;
- eHddDot11Mode sapDot11Mode;
-
v_BOOL_t enablePacketLog;
#ifdef MSM_PLATFORM
v_U32_t busBandwidthHighThreshold;
diff --git a/CORE/HDD/inc/wlan_hdd_main.h b/CORE/HDD/inc/wlan_hdd_main.h
index dfce710187a8..2522285a0aa8 100644
--- a/CORE/HDD/inc/wlan_hdd_main.h
+++ b/CORE/HDD/inc/wlan_hdd_main.h
@@ -348,16 +348,6 @@ typedef struct hdd_tx_rx_stats_s
} hdd_tx_rx_stats_t;
-typedef struct hdd_chip_reset_stats_s
-{
- __u32 totalLogpResets;
- __u32 totalCMD53Failures;
- __u32 totalMutexReadFailures;
- __u32 totalMIFErrorFailures;
- __u32 totalFWHearbeatFailures;
- __u32 totalUnknownExceptions;
-} hdd_chip_reset_stats_t;
-
#ifdef WLAN_FEATURE_11W
typedef struct hdd_pmf_stats_s
{
@@ -375,7 +365,6 @@ typedef struct hdd_stats_s
tCsrGlobalClassDStatsInfo ClassD_stat;
tCsrPerStaStatsInfo perStaStats;
hdd_tx_rx_stats_t hddTxRxStats;
- hdd_chip_reset_stats_t hddChipResetStats;
#ifdef WLAN_FEATURE_11W
hdd_pmf_stats_t hddPmfStats;
#endif
@@ -1349,7 +1338,6 @@ struct hdd_context_s
v_U8_t no_of_open_sessions[VOS_MAX_NO_OF_MODE];
v_U8_t no_of_active_sessions[VOS_MAX_NO_OF_MODE];
- hdd_chip_reset_stats_t hddChipResetStats;
/* Number of times riva restarted */
v_U32_t hddRivaResetStats;
diff --git a/CORE/HDD/src/wlan_hdd_assoc.c b/CORE/HDD/src/wlan_hdd_assoc.c
index 78e66fbb1d25..4da1261cd401 100644
--- a/CORE/HDD/src/wlan_hdd_assoc.c
+++ b/CORE/HDD/src/wlan_hdd_assoc.c
@@ -2988,8 +2988,9 @@ static void iw_full_power_cbfn (void *pContext, eHalStatus status)
}
}
-eHalStatus hdd_smeRoamCallback( void *pContext, tCsrRoamInfo *pRoamInfo, tANI_U32 roamId,
- eRoamCmdStatus roamStatus, eCsrRoamResult roamResult )
+eHalStatus
+hdd_smeRoamCallback(void *pContext, tCsrRoamInfo *pRoamInfo, tANI_U32 roamId,
+ eRoamCmdStatus roamStatus, eCsrRoamResult roamResult)
{
eHalStatus halStatus = eHAL_STATUS_SUCCESS;
hdd_adapter_t *pAdapter = (hdd_adapter_t *)pContext;
@@ -3002,9 +3003,8 @@ eHalStatus hdd_smeRoamCallback( void *pContext, tCsrRoamInfo *pRoamInfo, tANI_U3
"CSR Callback: status= %d result= %d roamID=%d",
roamStatus, roamResult, roamId );
- /*Sanity check*/
- if ((NULL == pAdapter) || (WLAN_HDD_ADAPTER_MAGIC != pAdapter->magic))
- {
+ /* Sanity check */
+ if ((NULL == pAdapter) || (WLAN_HDD_ADAPTER_MAGIC != pAdapter->magic)) {
VOS_TRACE(VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_FATAL,
"invalid adapter or adapter has invalid magic");
return eHAL_STATUS_FAILURE;
@@ -3013,13 +3013,6 @@ eHalStatus hdd_smeRoamCallback( void *pContext, tCsrRoamInfo *pRoamInfo, tANI_U3
pWextState = WLAN_HDD_GET_WEXT_STATE_PTR(pAdapter);
pHddStaCtx = WLAN_HDD_GET_STATION_CTX_PTR(pAdapter);
- if ((NULL == pWextState) || (NULL == pHddStaCtx))
- {
- VOS_TRACE(VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_FATAL,
- "invalid WEXT state or HDD station context");
- return eHAL_STATUS_FAILURE;
- }
-
switch( roamStatus )
{
case eCSR_ROAM_SESSION_OPENED:
@@ -3873,32 +3866,29 @@ int iw_set_essid(struct net_device *dev,
}
if( SIR_MAC_MAX_SSID_LENGTH < wrqu->essid.length )
return -EINVAL;
+
pRoamProfile = &pWextState->roamProfile;
- if (pRoamProfile)
- {
- if ( hdd_connGetConnectedBssType( pHddStaCtx, &connectedBssType ) ||
- ( eMib_dot11DesiredBssType_independent == pHddStaCtx->conn_info.connDot11DesiredBssType ))
- {
- VOS_STATUS vosStatus;
- // need to issue a disconnect to CSR.
- INIT_COMPLETION(pAdapter->disconnect_comp_var);
- vosStatus = sme_RoamDisconnect( hHal, pAdapter->sessionId, eCSR_DISCONNECT_REASON_UNSPECIFIED );
+ if (hdd_connGetConnectedBssType(pHddStaCtx, &connectedBssType) ||
+ (eMib_dot11DesiredBssType_independent ==
+ pHddStaCtx->conn_info.connDot11DesiredBssType)) {
+ VOS_STATUS vosStatus;
- if (VOS_STATUS_SUCCESS == vosStatus) {
- rc = wait_for_completion_timeout(&pAdapter->disconnect_comp_var,
+ /* Need to issue a disconnect to CSR. */
+ INIT_COMPLETION(pAdapter->disconnect_comp_var);
+ vosStatus = sme_RoamDisconnect(hHal, pAdapter->sessionId,
+ eCSR_DISCONNECT_REASON_UNSPECIFIED);
+
+ if (VOS_STATUS_SUCCESS == vosStatus) {
+ rc = wait_for_completion_timeout(&pAdapter->disconnect_comp_var,
msecs_to_jiffies(WLAN_WAIT_TIME_DISCONNECT));
- if (!rc) {
- hddLog( LOGE, FL("Disconnect event timed out"));
- }
- }
+ if (!rc) {
+ hddLog( LOGE, FL("Disconnect event timed out"));
+ }
}
- }
- /** wpa_supplicant 0.8.x, wext driver uses */
- else
- {
+ } else {
return -EINVAL;
}
- /** wpa_supplicant 0.8.x, wext driver uses */
+
/** when cfg80211 defined, wpa_supplicant wext driver uses
zero-length, null-string ssid for force disconnection.
after disconnection (if previously connected) and cleaning ssid,
diff --git a/CORE/HDD/src/wlan_hdd_cfg.c b/CORE/HDD/src/wlan_hdd_cfg.c
index ebc47d559ba1..d94a84054ff7 100644
--- a/CORE/HDD/src/wlan_hdd_cfg.c
+++ b/CORE/HDD/src/wlan_hdd_cfg.c
@@ -3578,13 +3578,6 @@ REG_TABLE_ENTRY g_registry_table[] =
CFG_DEBUG_P2P_REMAIN_ON_CHANNEL_MIN,
CFG_DEBUG_P2P_REMAIN_ON_CHANNEL_MAX ),
- REG_VARIABLE( CFG_SAP_DOT11_MODE_NAME, WLAN_PARAM_Integer,
- hdd_config_t, sapDot11Mode,
- VAR_FLAGS_OPTIONAL | VAR_FLAGS_RANGE_CHECK,
- CFG_SAP_DOT11_MODE_DEFAULT,
- CFG_SAP_DOT11_MODE_MIN,
- CFG_SAP_DOT11_MODE_MAX ),
-
REG_VARIABLE( CFG_ENABLE_PACKET_LOG, WLAN_PARAM_Integer,
hdd_config_t, enablePacketLog,
VAR_FLAGS_OPTIONAL | VAR_FLAGS_RANGE_CHECK_ASSUME_DEFAULT,
diff --git a/CORE/HDD/src/wlan_hdd_cfg80211.c b/CORE/HDD/src/wlan_hdd_cfg80211.c
index b31dc0b3022b..a2f478f6a268 100644
--- a/CORE/HDD/src/wlan_hdd_cfg80211.c
+++ b/CORE/HDD/src/wlan_hdd_cfg80211.c
@@ -511,12 +511,15 @@ wlan_hdd_sta_ap_iface_limit[] = {
static const struct ieee80211_iface_limit
wlan_hdd_sta_p2p_iface_limit[] = {
{
- /* one reserved for dedicated P2PDEV usage */
+ /* One reserved for dedicated P2PDEV usage */
.max = 2,
.types = BIT(NL80211_IFTYPE_STATION)
},
{
- .max = 1,
+ /* Support for two identical (GO + GO or CLI + CLI)
+ * or dissimilar (GO + CLI) P2P interfaces
+ */
+ .max = 2,
.types = BIT(NL80211_IFTYPE_P2P_GO) |
BIT(NL80211_IFTYPE_P2P_CLIENT),
},
@@ -567,7 +570,7 @@ wlan_hdd_iface_combination[] = {
.limits = wlan_hdd_sta_p2p_iface_limit,
.num_different_channels = 2,
/* one interface reserved for P2PDEV dedicated usage */
- .max_interfaces = 3,
+ .max_interfaces = 4,
.n_limits = ARRAY_SIZE(wlan_hdd_sta_p2p_iface_limit),
.beacon_int_infra_match = true,
},
@@ -664,6 +667,14 @@ typedef enum
DATA_RATE_11AC_MAX_MCS_NA
} eDataRate11ACMaxMcs;
+/* SSID broadcast type */
+typedef enum eSSIDBcastType
+{
+ eBCAST_UNKNOWN = 0,
+ eBCAST_NORMAL = 1,
+ eBCAST_HIDDEN = 2,
+} tSSIDBcastType;
+
/* MCS Based VHT rate table */
/* MCS parameters with Nss = 1*/
static struct index_vht_data_rate_type supported_vht_mcs_rate_nss1[] =
@@ -4775,8 +4786,6 @@ static int wlan_hdd_cfg80211_start_bss(hdd_adapter_t *pHostapdAdapter,
tSmeConfigParams *psmeConfig;
v_BOOL_t MFPCapable = VOS_FALSE;
v_BOOL_t MFPRequired = VOS_FALSE;
- eHddDot11Mode sapDot11Mode =
- (WLAN_HDD_GET_CTX(pHostapdAdapter))->cfg_ini->sapDot11Mode;
u_int16_t prev_rsn_length = 0;
ENTER();
@@ -5201,9 +5210,9 @@ static int wlan_hdd_cfg80211_start_bss(hdd_adapter_t *pHostapdAdapter,
* Otherwise, leave whatever is set in hostapd (a OR b OR g OR n mode) */
if( ((pConfig->SapHw_mode == eSAP_DOT11_MODE_11n) ||
(pConfig->SapHw_mode == eSAP_DOT11_MODE_11n_ONLY)) &&
- (( sapDot11Mode == eHDD_DOT11_MODE_AUTO ) ||
- ( sapDot11Mode == eHDD_DOT11_MODE_11ac ) ||
- ( sapDot11Mode == eHDD_DOT11_MODE_11ac_ONLY )) )
+ (( (WLAN_HDD_GET_CTX(pHostapdAdapter))->cfg_ini->dot11Mode == eHDD_DOT11_MODE_AUTO ) ||
+ ( (WLAN_HDD_GET_CTX(pHostapdAdapter))->cfg_ini->dot11Mode == eHDD_DOT11_MODE_11ac ) ||
+ ( (WLAN_HDD_GET_CTX(pHostapdAdapter))->cfg_ini->dot11Mode == eHDD_DOT11_MODE_11ac_ONLY )) )
{
if ((WLAN_HDD_GET_CTX(pHostapdAdapter))->cfg_ini->dot11Mode == eHDD_DOT11_MODE_11ac_ONLY)
pConfig->SapHw_mode = eSAP_DOT11_MODE_11ac_ONLY;
@@ -5401,7 +5410,7 @@ static int wlan_hdd_cfg80211_add_beacon(struct wiphy *wiphy,
struct net_device *dev,
struct beacon_parameters *params)
{
- hdd_adapter_t *pAdapter = WLAN_HDD_GET_PRIV_PTR(dev);
+ hdd_adapter_t *pAdapter = WLAN_HDD_GET_PRIV_PTR(dev);
hdd_context_t *pHddCtx;
int status;
@@ -5410,15 +5419,13 @@ static int wlan_hdd_cfg80211_add_beacon(struct wiphy *wiphy,
MTRACE(vos_trace(VOS_MODULE_ID_HDD,
TRACE_CODE_HDD_CFG80211_ADD_BEACON,
pAdapter->sessionId, params->interval));
- hddLog(VOS_TRACE_LEVEL_INFO_HIGH, "device mode=%d",pAdapter->device_mode);
+ hddLog(LOG2, FL("Device mode=%d"), pAdapter->device_mode);
pHddCtx = WLAN_HDD_GET_CTX(pAdapter);
status = wlan_hdd_validate_context(pHddCtx);
- if (0 != status)
- {
- VOS_TRACE( VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_ERROR,
- "%s: HDD context is not valid", __func__);
+ if (0 != status) {
+ hddLog(LOGE, FL("HDD context is not valid"));
return status;
}
@@ -5427,16 +5434,13 @@ static int wlan_hdd_cfg80211_add_beacon(struct wiphy *wiphy,
return -EINVAL;
}
- if ( (pAdapter->device_mode == WLAN_HDD_SOFTAP)
- || (pAdapter->device_mode == WLAN_HDD_P2P_GO)
- )
- {
- beacon_data_t *old,*new;
+ if ((pAdapter->device_mode == WLAN_HDD_SOFTAP) ||
+ (pAdapter->device_mode == WLAN_HDD_P2P_GO)) {
+ beacon_data_t *old, *new;
old = pAdapter->sessionCtx.ap.beacon;
- if (old)
- {
+ if (old) {
hddLog(VOS_TRACE_LEVEL_WARN,
FL("already beacon info added to session(%d)"),
pAdapter->sessionId);
@@ -5444,18 +5448,15 @@ static int wlan_hdd_cfg80211_add_beacon(struct wiphy *wiphy,
}
status = wlan_hdd_cfg80211_alloc_new_beacon(pAdapter,&new,params);
-
- if(status != VOS_STATUS_SUCCESS)
- {
+ if (status != VOS_STATUS_SUCCESS) {
hddLog(VOS_TRACE_LEVEL_FATAL,
- "%s:Error!!! Allocating the new beacon",__func__);
+ FL("Error!!! Allocating the new beacon"));
return -EINVAL;
}
pAdapter->sessionCtx.ap.beacon = new;
status = wlan_hdd_cfg80211_start_bss(pAdapter, params);
-
if (0 != status) {
pAdapter->sessionCtx.ap.beacon = NULL;
kfree(new);
@@ -5480,46 +5481,39 @@ static int wlan_hdd_cfg80211_set_beacon(struct wiphy *wiphy,
MTRACE(vos_trace(VOS_MODULE_ID_HDD,
TRACE_CODE_HDD_CFG80211_SET_BEACON,
pAdapter->sessionId, pHddStaCtx->conn_info.authType));
- hddLog(VOS_TRACE_LEVEL_INFO, "%s: device_mode = %d",
- __func__,pAdapter->device_mode);
+ hddLog(LOG1, FL("Device_mode = %d"), pAdapter->device_mode);
pHddCtx = WLAN_HDD_GET_CTX(pAdapter);
status = wlan_hdd_validate_context(pHddCtx);
- if (0 != status)
- {
- VOS_TRACE( VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_ERROR,
- "%s: HDD context is not valid", __func__);
+ if (0 != status) {
+ hddLog(LOGE, FL("HDD context is not valid"));
return status;
}
- if ((pAdapter->device_mode == WLAN_HDD_SOFTAP)
- || (pAdapter->device_mode == WLAN_HDD_P2P_GO)
- )
- {
- beacon_data_t *old,*new;
+ if ((pAdapter->device_mode == WLAN_HDD_SOFTAP) ||
+ (pAdapter->device_mode == WLAN_HDD_P2P_GO)) {
+ beacon_data_t *old, *new;
old = pAdapter->sessionCtx.ap.beacon;
- if (!old)
- {
- VOS_TRACE( VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_ERROR,
- FL("session(%d) old and new heads points to NULL"),
- pAdapter->sessionId);
+ if (!old) {
+ hddLog(LOGE,
+ FL("session(%d) old and new heads points to NULL"),
+ pAdapter->sessionId);
return -ENOENT;
}
status = wlan_hdd_cfg80211_alloc_new_beacon(pAdapter,&new,params);
- if(status != VOS_STATUS_SUCCESS) {
+ if (status != VOS_STATUS_SUCCESS) {
hddLog(VOS_TRACE_LEVEL_FATAL,
- "%s: Error!!! Allocating the new beacon",__func__);
+ FL("Error!!! Allocating the new beacon"));
return -EINVAL;
- }
-
- pAdapter->sessionCtx.ap.beacon = new;
+ }
- status = wlan_hdd_cfg80211_start_bss(pAdapter, params);
+ pAdapter->sessionCtx.ap.beacon = new;
+ status = wlan_hdd_cfg80211_start_bss(pAdapter, params);
}
EXIT();
@@ -5545,6 +5539,8 @@ static int wlan_hdd_cfg80211_stop_ap (struct wiphy *wiphy,
beacon_data_t *old;
int ret;
unsigned long rc;
+ hdd_adapter_list_node_t *pAdapterNode = NULL;
+ hdd_adapter_list_node_t *pNext = NULL;
ENTER();
@@ -5564,32 +5560,33 @@ static int wlan_hdd_cfg80211_stop_ap (struct wiphy *wiphy,
return -EOPNOTSUPP;
}
- staAdapter = hdd_get_adapter(pAdapter->pHddCtx, WLAN_HDD_INFRA_STATION);
- if (NULL == staAdapter) {
- staAdapter = hdd_get_adapter(pAdapter->pHddCtx, WLAN_HDD_P2P_CLIENT);
- if (NULL == staAdapter) {
- hddLog(VOS_TRACE_LEVEL_INFO_HIGH,
- FL("HDD adapter context for STA/P2P-CLI is Null"));
- }
- }
-
- pScanInfo = &pAdapter->scan_info;
-
- hddLog(VOS_TRACE_LEVEL_INFO, FL("device_mode = %d"), pAdapter->device_mode);
+ hddLog(LOG1, FL("Device_mode = %d"), pAdapter->device_mode);
- if ((pScanInfo != NULL) && pScanInfo->mScanPending && staAdapter) {
-
- INIT_COMPLETION(pScanInfo->abortscan_event_var);
- hdd_abort_mac_scan(staAdapter->pHddCtx, pAdapter->sessionId,
- eCSR_SCAN_ABORT_DEFAULT);
- rc = wait_for_completion_timeout(
- &pScanInfo->abortscan_event_var,
- msecs_to_jiffies(WLAN_WAIT_TIME_ABORTSCAN));
- if (!rc) {
- hddLog(VOS_TRACE_LEVEL_ERROR,
- FL("Timeout occurred while waiting for abortscan"));
- VOS_ASSERT(pScanInfo->mScanPending);
+ status = hdd_get_front_adapter (pHddCtx, &pAdapterNode);
+ while (NULL != pAdapterNode && VOS_STATUS_SUCCESS == status) {
+ staAdapter = pAdapterNode->pAdapter;
+
+ if (WLAN_HDD_INFRA_STATION == staAdapter->device_mode ||
+ (WLAN_HDD_P2P_CLIENT == staAdapter->device_mode)) {
+ pScanInfo = &staAdapter->scan_info;
+
+ if (pScanInfo && pScanInfo->mScanPending) {
+ INIT_COMPLETION(pScanInfo->abortscan_event_var);
+ hdd_abort_mac_scan(staAdapter->pHddCtx, staAdapter->sessionId,
+ eCSR_SCAN_ABORT_DEFAULT);
+ rc = wait_for_completion_timeout(
+ &pScanInfo->abortscan_event_var,
+ msecs_to_jiffies(WLAN_WAIT_TIME_ABORTSCAN));
+ if (!rc) {
+ hddLog(LOGE,
+ FL("Timeout occurred while waiting for abortscan"));
+ VOS_ASSERT(pScanInfo->mScanPending);
+ }
+ }
}
+
+ status = hdd_get_next_adapter(pHddCtx, pAdapterNode, &pNext);
+ pAdapterNode = pNext;
}
hdd_hostapd_stop(dev);
@@ -5857,6 +5854,24 @@ static int __wlan_hdd_cfg80211_change_bss (struct wiphy *wiphy,
return ret;
}
+static int
+wlan_hdd_change_iface_to_adhoc(struct net_device *ndev,
+ tCsrRoamProfile *pRoamProfile,
+ enum nl80211_iftype type)
+{
+ hdd_adapter_t *pAdapter = WLAN_HDD_GET_PRIV_PTR(ndev);
+ hdd_context_t *pHddCtx = WLAN_HDD_GET_CTX(pAdapter);
+ hdd_config_t *pConfig = pHddCtx->cfg_ini;
+ struct wireless_dev *wdev = ndev->ieee80211_ptr;
+
+ pRoamProfile->BSSType = eCSR_BSS_TYPE_START_IBSS;
+ pRoamProfile->phyMode = hdd_cfg_xlate_to_csr_phy_mode(pConfig->dot11Mode);
+ pAdapter->device_mode = WLAN_HDD_IBSS;
+ wdev->iftype = type;
+
+ return 0;
+}
+
static int wlan_hdd_change_iface_to_sta_mode(struct net_device *ndev,
enum nl80211_iftype type)
{
@@ -5930,9 +5945,8 @@ static int __wlan_hdd_cfg80211_change_iface(struct wiphy *wiphy,
struct vif_params *params)
{
struct wireless_dev *wdev;
- hdd_adapter_t *pAdapter = WLAN_HDD_GET_PRIV_PTR( ndev );
+ hdd_adapter_t *pAdapter = WLAN_HDD_GET_PRIV_PTR(ndev);
hdd_context_t *pHddCtx;
- hdd_adapter_t *pP2pAdapter = NULL;
tCsrRoamProfile *pRoamProfile = NULL;
eCsrRoamBssType LastBSSType;
hdd_config_t *pConfig = NULL;
@@ -5948,12 +5962,10 @@ static int __wlan_hdd_cfg80211_change_iface(struct wiphy *wiphy,
ENTER();
- pHddCtx = WLAN_HDD_GET_CTX( pAdapter );
+ pHddCtx = WLAN_HDD_GET_CTX(pAdapter);
status = wlan_hdd_validate_context(pHddCtx);
- if (0 != status)
- {
- VOS_TRACE( VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_ERROR,
- "%s: HDD context is not valid", __func__);
+ if (0 != status) {
+ hddLog(LOGE, FL("HDD context is not valid"));
return status;
}
@@ -5961,8 +5973,8 @@ static int __wlan_hdd_cfg80211_change_iface(struct wiphy *wiphy,
TRACE_CODE_HDD_CFG80211_CHANGE_IFACE,
pAdapter->sessionId, type));
- hddLog(VOS_TRACE_LEVEL_INFO, "%s: device_mode = %d, IFTYPE = 0x%x",
- __func__, pAdapter->device_mode, type);
+ hddLog(VOS_TRACE_LEVEL_INFO, FL("Device_mode = %d, IFTYPE = 0x%x"),
+ pAdapter->device_mode, type);
if (vos_max_concurrent_connections_reached()) {
hddLog(VOS_TRACE_LEVEL_DEBUG, FL("Reached max concurrent connections"));
@@ -5976,348 +5988,291 @@ static int __wlan_hdd_cfg80211_change_iface(struct wiphy *wiphy,
if((NL80211_IFTYPE_P2P_CLIENT == type)||
(NL80211_IFTYPE_ADHOC == type)||
(NL80211_IFTYPE_AP == type)||
- (NL80211_IFTYPE_P2P_GO == type))
- {
+ (NL80211_IFTYPE_P2P_GO == type)) {
pHddCtx->isAmpAllowed = VOS_FALSE;
- // stop AMP traffic
+ /* Stop AMP traffic */
vstatus = WLANBAP_StopAmp();
- if (VOS_STATUS_SUCCESS != vstatus )
- {
+ if (VOS_STATUS_SUCCESS != vstatus) {
pHddCtx->isAmpAllowed = VOS_TRUE;
- hddLog(VOS_TRACE_LEVEL_FATAL,
- "%s: Failed to stop AMP", __func__);
+ hddLog(LOGP, FL("Failed to stop AMP"));
return -EINVAL;
}
}
-#endif //WLAN_BTAMP_FEATURE
- /* Reset the current device mode bit mask*/
+#endif /* WLAN_BTAMP_FEATURE */
+ /* Reset the current device mode bit mask */
wlan_hdd_clear_concurrency_mode(pHddCtx, pAdapter->device_mode);
- if( (pAdapter->device_mode == WLAN_HDD_INFRA_STATION)
- || (pAdapter->device_mode == WLAN_HDD_P2P_CLIENT)
- || (pAdapter->device_mode == WLAN_HDD_P2P_DEVICE)
- )
- {
+ if ((pAdapter->device_mode == WLAN_HDD_INFRA_STATION) ||
+ (pAdapter->device_mode == WLAN_HDD_P2P_CLIENT) ||
+ (pAdapter->device_mode == WLAN_HDD_P2P_DEVICE)) {
hdd_wext_state_t *pWextState = WLAN_HDD_GET_WEXT_STATE_PTR(pAdapter);
- if (!pWextState)
- {
- VOS_TRACE(VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_ERROR,
- "%s: pWextState is null", __func__);
- return -EINVAL;
- }
+
pRoamProfile = &pWextState->roamProfile;
LastBSSType = pRoamProfile->BSSType;
- switch (type)
- {
- case NL80211_IFTYPE_STATION:
- case NL80211_IFTYPE_P2P_CLIENT:
- vstatus = wlan_hdd_change_iface_to_sta_mode(ndev, type);
- if (vstatus != VOS_STATUS_SUCCESS)
- return -EINVAL;
+ switch (type) {
+ case NL80211_IFTYPE_STATION:
+ case NL80211_IFTYPE_P2P_CLIENT:
+ vstatus = wlan_hdd_change_iface_to_sta_mode(ndev, type);
+ if (vstatus != VOS_STATUS_SUCCESS)
+ return -EINVAL;
#ifdef QCA_LL_TX_FLOW_CT
- vos_timer_init(&pAdapter->tx_flow_control_timer,
- VOS_TIMER_TYPE_SW,
- hdd_tx_resume_timer_expired_handler,
- pAdapter);
- WLANTL_RegisterTXFlowControl(pHddCtx->pvosContext,
- hdd_tx_resume_cb,
- pAdapter->sessionId,
- (void *)pAdapter);
+ vos_timer_init(&pAdapter->tx_flow_control_timer,
+ VOS_TIMER_TYPE_SW,
+ hdd_tx_resume_timer_expired_handler,
+ pAdapter);
+ WLANTL_RegisterTXFlowControl(pHddCtx->pvosContext,
+ hdd_tx_resume_cb,
+ pAdapter->sessionId,
+ (void *)pAdapter);
#endif /* QCA_LL_TX_FLOW_CT */
- goto done;
+ goto done;
- case NL80211_IFTYPE_ADHOC:
- hddLog(VOS_TRACE_LEVEL_INFO,
- "%s: setting interface Type to ADHOC", __func__);
- pRoamProfile->BSSType = eCSR_BSS_TYPE_START_IBSS;
- pRoamProfile->phyMode =
- hdd_cfg_xlate_to_csr_phy_mode(pConfig->dot11Mode);
- pAdapter->device_mode = WLAN_HDD_IBSS;
- wdev->iftype = type;
- break;
+ case NL80211_IFTYPE_ADHOC:
+ hddLog(LOG1, FL("Setting interface Type to ADHOC"));
+ wlan_hdd_change_iface_to_adhoc(ndev, pRoamProfile, type);
+ break;
- case NL80211_IFTYPE_AP:
- case NL80211_IFTYPE_P2P_GO:
- {
- hddLog(VOS_TRACE_LEVEL_INFO_HIGH,
- "%s: setting interface Type to %s", __func__,
- (type == NL80211_IFTYPE_AP) ? "SoftAP" : "P2pGo");
+ case NL80211_IFTYPE_AP:
+ case NL80211_IFTYPE_P2P_GO:
+ {
+ hddLog(VOS_TRACE_LEVEL_INFO_HIGH,
+ FL("Setting interface Type to %s"),
+ (type == NL80211_IFTYPE_AP) ? "SoftAP" : "P2pGo");
- //Cancel any remain on channel for GO mode
- if (NL80211_IFTYPE_P2P_GO == type)
- {
- wlan_hdd_cancel_existing_remain_on_channel(pAdapter);
- }
- if (NL80211_IFTYPE_AP == type)
- {
- /* As Loading WLAN Driver one interface being created for p2p device
- * address. This will take one HW STA and the max number of clients
- * that can connect to softAP will be reduced by one. so while changing
- * the interface type to NL80211_IFTYPE_AP (SoftAP) remove p2p0
- * interface as it is not required in SoftAP mode.
- */
+ /* Cancel any remain on channel for GO mode */
+ if (NL80211_IFTYPE_P2P_GO == type) {
+ wlan_hdd_cancel_existing_remain_on_channel(pAdapter);
+ }
- // Get P2P Adapter
- pP2pAdapter = hdd_get_adapter(pHddCtx, WLAN_HDD_P2P_DEVICE);
+ if (NL80211_IFTYPE_AP == type) {
+ /* As Loading WLAN Driver one interface being created for
+ * p2p device address. This will take one HW STA and the
+ * max number of clients that can connect to softAP will be
+ * reduced by one. so while changing the interface type to
+ * NL80211_IFTYPE_AP (SoftAP) remove p2p0 interface as it is
+ * not required in SoftAP mode.
+ */
- if (pP2pAdapter)
- {
- hdd_stop_adapter(pHddCtx, pP2pAdapter, VOS_TRUE);
- hdd_deinit_adapter(pHddCtx, pP2pAdapter);
- hdd_close_adapter(pHddCtx, pP2pAdapter, VOS_TRUE);
- }
+ /* Get P2P Adapter */
+ hdd_adapter_t *pP2pAdapter = NULL;
+ pP2pAdapter = hdd_get_adapter(pHddCtx, WLAN_HDD_P2P_DEVICE);
+
+ if (pP2pAdapter) {
+ hdd_stop_adapter(pHddCtx, pP2pAdapter, VOS_TRUE);
+ hdd_deinit_adapter(pHddCtx, pP2pAdapter);
+ hdd_close_adapter(pHddCtx, pP2pAdapter, VOS_TRUE);
}
- hdd_stop_adapter( pHddCtx, pAdapter, VOS_TRUE );
+ }
+ hdd_stop_adapter(pHddCtx, pAdapter, VOS_TRUE);
- //De-init the adapter.
- hdd_deinit_adapter( pHddCtx, pAdapter );
- memset(&pAdapter->sessionCtx, 0, sizeof(pAdapter->sessionCtx));
- pAdapter->device_mode = (type == NL80211_IFTYPE_AP) ?
+ /* De-init the adapter */
+ hdd_deinit_adapter(pHddCtx, pAdapter);
+ memset(&pAdapter->sessionCtx, 0, sizeof(pAdapter->sessionCtx));
+ pAdapter->device_mode = (type == NL80211_IFTYPE_AP) ?
WLAN_HDD_SOFTAP : WLAN_HDD_P2P_GO;
- /*
- * If Powersave Offload is enabled
- * Fw will take care incase of concurrency
- */
- if(!pHddCtx->cfg_ini->enablePowersaveOffload)
- {
-
- //Disable BMPS and IMPS if enabled
- //before starting Go
- if(WLAN_HDD_P2P_GO == pAdapter->device_mode)
- {
- if(VOS_STATUS_E_FAILURE ==
- hdd_disable_bmps_imps(pHddCtx, WLAN_HDD_P2P_GO))
- {
- //Fail to Exit BMPS
+ /*
+ * If Powersave Offload is enabled
+ * Fw will take care incase of concurrency
+ */
+ if (!pHddCtx->cfg_ini->enablePowersaveOffload) {
+ /* Disable BMPS and IMPS if enabled before starting Go */
+ if (WLAN_HDD_P2P_GO == pAdapter->device_mode) {
+ if(VOS_STATUS_E_FAILURE ==
+ hdd_disable_bmps_imps(pHddCtx, WLAN_HDD_P2P_GO)) {
+ /* Fail to Exit BMPS */
VOS_ASSERT(0);
- }
}
}
+ }
- if ((WLAN_HDD_SOFTAP == pAdapter->device_mode) &&
- (pConfig->apRandomBssidEnabled))
- {
- /* To meet Android requirements create a randomized
- MAC address of the form 02:1A:11:Fx:xx:xx */
- get_random_bytes(&ndev->dev_addr[3], 3);
- ndev->dev_addr[0] = 0x02;
- ndev->dev_addr[1] = 0x1A;
- ndev->dev_addr[2] = 0x11;
- ndev->dev_addr[3] |= 0xF0;
- memcpy(pAdapter->macAddressCurrent.bytes, ndev->dev_addr,
- VOS_MAC_ADDR_SIZE);
- pr_info("wlan: Generated HotSpot BSSID " MAC_ADDRESS_STR"\n",
- MAC_ADDR_ARRAY(ndev->dev_addr));
- }
-
- hdd_set_ap_ops( pAdapter->dev );
+ if ((WLAN_HDD_SOFTAP == pAdapter->device_mode) &&
+ (pConfig->apRandomBssidEnabled)) {
+ /* To meet Android requirements create a randomized
+ MAC address of the form 02:1A:11:Fx:xx:xx */
+ get_random_bytes(&ndev->dev_addr[3], 3);
+ ndev->dev_addr[0] = 0x02;
+ ndev->dev_addr[1] = 0x1A;
+ ndev->dev_addr[2] = 0x11;
+ ndev->dev_addr[3] |= 0xF0;
+ memcpy(pAdapter->macAddressCurrent.bytes, ndev->dev_addr,
+ VOS_MAC_ADDR_SIZE);
+ pr_info("wlan: Generated HotSpot BSSID "MAC_ADDRESS_STR"\n",
+ MAC_ADDR_ARRAY(ndev->dev_addr));
+ }
- /* This is for only SAP mode where users can
- * control country through ini.
- * P2P GO follows station country code
- * acquired during the STA scanning. */
- if((NL80211_IFTYPE_AP == type) &&
- (memcmp(pConfig->apCntryCode, CFG_AP_COUNTRY_CODE_DEFAULT, 3) != 0))
- {
- VOS_TRACE(VOS_MODULE_ID_HDD,VOS_TRACE_LEVEL_INFO,
- "%s: setting country code from INI ", __func__);
- init_completion(&pAdapter->change_country_code);
- hstatus = sme_ChangeCountryCode(pHddCtx->hHal,
+ hdd_set_ap_ops(pAdapter->dev);
+
+ /* This is for only SAP mode where users can
+ * control country through ini.
+ * P2P GO follows station country code
+ * acquired during the STA scanning. */
+ if ((NL80211_IFTYPE_AP == type) &&
+ (memcmp(pConfig->apCntryCode,
+ CFG_AP_COUNTRY_CODE_DEFAULT, 3) != 0)) {
+ hddLog(LOG1, FL("Setting country code from INI"));
+ init_completion(&pAdapter->change_country_code);
+ hstatus = sme_ChangeCountryCode(pHddCtx->hHal,
(void *)(tSmeChangeCountryCallback)
wlan_hdd_change_country_code_cb,
pConfig->apCntryCode, pAdapter,
pHddCtx->pvosContext,
- eSIR_FALSE,
- eSIR_TRUE);
- if (eHAL_STATUS_SUCCESS == hstatus)
- {
- /* Wait for completion */
- rc = wait_for_completion_timeout(
- &pAdapter->change_country_code,
- msecs_to_jiffies(WLAN_WAIT_TIME_COUNTRY));
- if (!rc) {
- VOS_TRACE( VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_ERROR,
+ eSIR_FALSE, eSIR_TRUE);
+ if (eHAL_STATUS_SUCCESS == hstatus) {
+ /* Wait for completion */
+ rc = wait_for_completion_timeout(
+ &pAdapter->change_country_code,
+ msecs_to_jiffies(WLAN_WAIT_TIME_COUNTRY));
+ if (!rc) {
+ hddLog(LOGE,
FL("SME Timed out while setting country code"));
- }
- }
- else
- {
- VOS_TRACE( VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_ERROR,
- "%s: SME Change Country code failed",__func__);
- return -EINVAL;
}
- }
- vstatus = hdd_init_ap_mode(pAdapter);
- if (vstatus != VOS_STATUS_SUCCESS)
- {
- hddLog(VOS_TRACE_LEVEL_FATAL,
- "%s: Error initializing the ap mode", __func__);
+ } else {
+ hddLog(LOGE, FL("SME Change Country code failed"));
return -EINVAL;
}
- hdd_set_conparam(1);
+ }
+
+ vstatus = hdd_init_ap_mode(pAdapter);
+ if (vstatus != VOS_STATUS_SUCCESS) {
+ hddLog(LOGP, FL("Error initializing the ap mode"));
+ return -EINVAL;
+ }
+ hdd_set_conparam(1);
#ifdef QCA_LL_TX_FLOW_CT
- vos_timer_init(&pAdapter->tx_flow_control_timer,
+ vos_timer_init(&pAdapter->tx_flow_control_timer,
VOS_TIMER_TYPE_SW,
hdd_softap_tx_resume_timer_expired_handler,
pAdapter);
- WLANTL_RegisterTXFlowControl(pHddCtx->pvosContext,
+ WLANTL_RegisterTXFlowControl(pHddCtx->pvosContext,
hdd_softap_tx_resume_cb,
pAdapter->sessionId,
(void *)pAdapter);
#endif /* QCA_LL_TX_FLOW_CT */
- /*interface type changed update in wiphy structure*/
- if(wdev)
- {
- wdev->iftype = type;
- pHddCtx->change_iface = type;
- }
- else
- {
- hddLog(VOS_TRACE_LEVEL_ERROR,
- "%s: ERROR !!!! Wireless dev is NULL", __func__);
- return -EINVAL;
- }
- goto done;
+ /* Interface type changed update in wiphy structure */
+ if (wdev) {
+ wdev->iftype = type;
+ pHddCtx->change_iface = type;
+ } else {
+ hddLog(LOGE, FL("Wireless dev is NULL"));
+ return -EINVAL;
}
+ goto done;
+ }
- default:
- hddLog(VOS_TRACE_LEVEL_ERROR, "%s: Unsupported interface Type",
- __func__);
- return -EOPNOTSUPP;
+ default:
+ hddLog(LOGE, FL("Unsupported interface type (%d)"), type);
+ return -EOPNOTSUPP;
}
- }
- else if ( (pAdapter->device_mode == WLAN_HDD_SOFTAP)
- || (pAdapter->device_mode == WLAN_HDD_P2P_GO)
- )
- {
- switch(type)
- {
- case NL80211_IFTYPE_STATION:
- case NL80211_IFTYPE_P2P_CLIENT:
- case NL80211_IFTYPE_ADHOC:
- status = wlan_hdd_change_iface_to_sta_mode(ndev, type);
- if (status != VOS_STATUS_SUCCESS)
- return status;
+ } else if ((pAdapter->device_mode == WLAN_HDD_SOFTAP) ||
+ (pAdapter->device_mode == WLAN_HDD_P2P_GO)) {
+ switch (type) {
+ case NL80211_IFTYPE_STATION:
+ case NL80211_IFTYPE_P2P_CLIENT:
+ case NL80211_IFTYPE_ADHOC:
+ status = wlan_hdd_change_iface_to_sta_mode(ndev, type);
+ if (status != VOS_STATUS_SUCCESS)
+ return status;
#ifdef QCA_LL_TX_FLOW_CT
- if ((NL80211_IFTYPE_P2P_CLIENT == type) ||
- (NL80211_IFTYPE_STATION == type))
- {
- vos_timer_init(&pAdapter->tx_flow_control_timer,
+ if ((NL80211_IFTYPE_P2P_CLIENT == type) ||
+ (NL80211_IFTYPE_STATION == type)) {
+ vos_timer_init(&pAdapter->tx_flow_control_timer,
VOS_TIMER_TYPE_SW,
hdd_tx_resume_timer_expired_handler,
pAdapter);
- WLANTL_RegisterTXFlowControl(pHddCtx->pvosContext,
+ WLANTL_RegisterTXFlowControl(pHddCtx->pvosContext,
hdd_tx_resume_cb,
pAdapter->sessionId,
(void *)pAdapter);
- }
+ }
#endif /* QCA_LL_TX_FLOW_CT */
- // fw will take care if PS offload is enabled.
- if (pHddCtx->cfg_ini->enablePowersaveOffload)
- goto done;
- /* In case of JB, for P2P-GO, only change interface will be called,
- * This is the right place to enable back bmps_imps()
- */
- if (pHddCtx->hdd_wlan_suspended)
- {
+ /* FW will take care if PS offload is enabled. */
+ if (pHddCtx->cfg_ini->enablePowersaveOffload)
+ goto done;
+
+ if (pHddCtx->hdd_wlan_suspended) {
hdd_set_pwrparams(pHddCtx);
- }
- hdd_enable_bmps_imps(pHddCtx);
- goto done;
- case NL80211_IFTYPE_AP:
- case NL80211_IFTYPE_P2P_GO:
- /*TODO:Need to handle the below scenario*/
- wdev->iftype = type;
- pAdapter->device_mode = (type == NL80211_IFTYPE_AP) ?
- WLAN_HDD_SOFTAP : WLAN_HDD_P2P_GO;
+ }
+ hdd_enable_bmps_imps(pHddCtx);
+ goto done;
+
+ case NL80211_IFTYPE_AP:
+ case NL80211_IFTYPE_P2P_GO:
+ wdev->iftype = type;
+ pAdapter->device_mode = (type == NL80211_IFTYPE_AP) ?
+ WLAN_HDD_SOFTAP : WLAN_HDD_P2P_GO;
#ifdef QCA_LL_TX_FLOW_CT
- vos_timer_init(&pAdapter->tx_flow_control_timer,
+ vos_timer_init(&pAdapter->tx_flow_control_timer,
VOS_TIMER_TYPE_SW,
hdd_softap_tx_resume_timer_expired_handler,
pAdapter);
- WLANTL_RegisterTXFlowControl(pHddCtx->pvosContext,
+ WLANTL_RegisterTXFlowControl(pHddCtx->pvosContext,
hdd_softap_tx_resume_cb,
pAdapter->sessionId,
(void *)pAdapter);
#endif /* QCA_LL_TX_FLOW_CT */
- goto done;
+ goto done;
+
default:
- hddLog(VOS_TRACE_LEVEL_ERROR, "%s: Unsupported interface Type",
- __func__);
+ hddLog(LOGE, FL("Unsupported interface type(%d)"), type);
return -EOPNOTSUPP;
-
}
-
- }
- else
- {
- hddLog(VOS_TRACE_LEVEL_ERROR,"%s: unsupported device mode(%d)",
- __func__, pAdapter->device_mode);
+ } else {
+ hddLog(LOGE, FL("Unsupported device mode(%d)"), pAdapter->device_mode);
return -EOPNOTSUPP;
}
-
- if(pRoamProfile)
- {
- if ( LastBSSType != pRoamProfile->BSSType )
- {
- /*interface type changed update in wiphy structure*/
- wdev->iftype = type;
-
- /*the BSS mode changed, We need to issue disconnect
- if connected or in IBSS disconnect state*/
- if ( hdd_connGetConnectedBssType(
- WLAN_HDD_GET_STATION_CTX_PTR(pAdapter), &connectedBssType ) ||
- ( eCSR_BSS_TYPE_START_IBSS == LastBSSType ) )
- {
- /*need to issue a disconnect to CSR.*/
- INIT_COMPLETION(pAdapter->disconnect_comp_var);
- if( eHAL_STATUS_SUCCESS ==
- sme_RoamDisconnect( WLAN_HDD_GET_HAL_CTX(pAdapter),
- pAdapter->sessionId,
- eCSR_DISCONNECT_REASON_UNSPECIFIED ) )
- {
- rc = wait_for_completion_timeout(
- &pAdapter->disconnect_comp_var,
- msecs_to_jiffies(WLAN_WAIT_TIME_DISCONNECT));
- if (!rc) {
- hddLog(VOS_TRACE_LEVEL_ERROR,
- FL("wait on disconnect_comp_var failed"));
- }
-
- }
+ if (LastBSSType != pRoamProfile->BSSType) {
+ /* Interface type changed update in wiphy structure */
+ wdev->iftype = type;
+
+ /* The BSS mode changed, We need to issue disconnect
+ if connected or in IBSS disconnect state */
+ if (hdd_connGetConnectedBssType(
+ WLAN_HDD_GET_STATION_CTX_PTR(pAdapter), &connectedBssType) ||
+ (eCSR_BSS_TYPE_START_IBSS == LastBSSType)) {
+ /* Need to issue a disconnect to CSR.*/
+ INIT_COMPLETION(pAdapter->disconnect_comp_var);
+ if (eHAL_STATUS_SUCCESS ==
+ sme_RoamDisconnect(WLAN_HDD_GET_HAL_CTX(pAdapter),
+ pAdapter->sessionId,
+ eCSR_DISCONNECT_REASON_UNSPECIFIED)) {
+ rc = wait_for_completion_timeout(
+ &pAdapter->disconnect_comp_var,
+ msecs_to_jiffies(WLAN_WAIT_TIME_DISCONNECT));
+ if (!rc) {
+ hddLog(LOGE,
+ FL("Wait on disconnect_comp_var failed"));
+ }
}
}
}
done:
- /*set bitmask based on updated value*/
+ /* Set bitmask based on updated value */
wlan_hdd_set_concurrency_mode(pHddCtx, pAdapter->device_mode);
- /* Only STA mode support TM now
- * all other mode, TM feature should be disabled */
- if ( (pHddCtx->cfg_ini->thermalMitigationEnable) &&
- (~VOS_STA & pHddCtx->concurrency_mode) )
- {
+ /* Only STA mode support TM now
+ * all other mode, TM feature should be disabled */
+ if ((pHddCtx->cfg_ini->thermalMitigationEnable) &&
+ (~VOS_STA & pHddCtx->concurrency_mode)) {
hddDevTmLevelChangedHandler(pHddCtx->parent_dev, 0);
}
#ifdef WLAN_BTAMP_FEATURE
- if((NL80211_IFTYPE_STATION == type) && (pHddCtx->concurrency_mode <= 1) &&
- (pHddCtx->no_of_open_sessions[WLAN_HDD_INFRA_STATION] <=1))
- {
- //we are ok to do AMP
+ if ((NL80211_IFTYPE_STATION == type) && (pHddCtx->concurrency_mode <= 1) &&
+ (pHddCtx->no_of_open_sessions[WLAN_HDD_INFRA_STATION] <= 1)) {
+ /* We are ok to do AMP */
pHddCtx->isAmpAllowed = VOS_TRUE;
}
-#endif //WLAN_BTAMP_FEATURE
+#endif /* WLAN_BTAMP_FEATURE */
#ifdef WLAN_FEATURE_LPSS
vstatus = hdd_get_front_adapter(pHddCtx, &pAdapterNode);
@@ -6331,7 +6286,7 @@ done:
if (pDataAdapter->device_mode == WLAN_HDD_P2P_DEVICE)
break;
}
- vstatus = hdd_get_next_adapter ( pHddCtx, pAdapterNode, &pNext );
+ vstatus = hdd_get_next_adapter (pHddCtx, pAdapterNode, &pNext);
pAdapterNode = pNext;
}
@@ -7080,44 +7035,41 @@ static int __wlan_hdd_cfg80211_get_key(
MTRACE(vos_trace(VOS_MODULE_ID_HDD,
TRACE_CODE_HDD_CFG80211_GET_KEY,
pAdapter->sessionId, params.cipher));
- hddLog(VOS_TRACE_LEVEL_INFO, "%s: device_mode = %d",
- __func__,pAdapter->device_mode);
+ hddLog(VOS_TRACE_LEVEL_INFO, FL("Device_mode = %d"), pAdapter->device_mode);
memset(&params, 0, sizeof(params));
- if (CSR_MAX_NUM_KEY <= key_index)
- {
+ if (CSR_MAX_NUM_KEY <= key_index) {
hddLog(VOS_TRACE_LEVEL_ERROR, FL("invalid key index %d"), key_index);
return -EINVAL;
}
- switch(pRoamProfile->EncryptionType.encryptionType[0])
- {
- case eCSR_ENCRYPT_TYPE_NONE:
- params.cipher = IW_AUTH_CIPHER_NONE;
- break;
+ switch (pRoamProfile->EncryptionType.encryptionType[0]) {
+ case eCSR_ENCRYPT_TYPE_NONE:
+ params.cipher = IW_AUTH_CIPHER_NONE;
+ break;
- case eCSR_ENCRYPT_TYPE_WEP40_STATICKEY:
- case eCSR_ENCRYPT_TYPE_WEP40:
- params.cipher = WLAN_CIPHER_SUITE_WEP40;
- break;
+ case eCSR_ENCRYPT_TYPE_WEP40_STATICKEY:
+ case eCSR_ENCRYPT_TYPE_WEP40:
+ params.cipher = WLAN_CIPHER_SUITE_WEP40;
+ break;
- case eCSR_ENCRYPT_TYPE_WEP104_STATICKEY:
- case eCSR_ENCRYPT_TYPE_WEP104:
- params.cipher = WLAN_CIPHER_SUITE_WEP104;
- break;
+ case eCSR_ENCRYPT_TYPE_WEP104_STATICKEY:
+ case eCSR_ENCRYPT_TYPE_WEP104:
+ params.cipher = WLAN_CIPHER_SUITE_WEP104;
+ break;
- case eCSR_ENCRYPT_TYPE_TKIP:
- params.cipher = WLAN_CIPHER_SUITE_TKIP;
- break;
+ case eCSR_ENCRYPT_TYPE_TKIP:
+ params.cipher = WLAN_CIPHER_SUITE_TKIP;
+ break;
- case eCSR_ENCRYPT_TYPE_AES:
- params.cipher = WLAN_CIPHER_SUITE_AES_CMAC;
- break;
+ case eCSR_ENCRYPT_TYPE_AES:
+ params.cipher = WLAN_CIPHER_SUITE_AES_CMAC;
+ break;
- default:
- params.cipher = IW_AUTH_CIPHER_NONE;
- break;
+ default:
+ params.cipher = IW_AUTH_CIPHER_NONE;
+ break;
}
params.key_len = pRoamProfile->Keys.KeyLength[key_index];
@@ -7125,6 +7077,8 @@ static int __wlan_hdd_cfg80211_get_key(
params.seq = NULL;
params.key = &pRoamProfile->Keys.KeyMaterial[key_index][0];
callback(cookie, &params);
+
+ EXIT();
return 0;
}
@@ -7266,11 +7220,6 @@ static int wlan_hdd_cfg80211_key_mgmt_set_pmk(struct wiphy *wiphy,
pWextState = WLAN_HDD_GET_WEXT_STATE_PTR(pAdapter);
pHddStaCtx = WLAN_HDD_GET_STATION_CTX_PTR(pAdapter);
- if ((NULL == pWextState) || (NULL == pHddStaCtx)) {
- VOS_TRACE(VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_FATAL,
- "invalid Wext state or HDD context");
- return -EINVAL;
- }
if (pmk) {
tANI_U8 localPmk [SIR_ROAM_SCAN_PSK_SIZE];
if ((pWextState->authKeyMgmt & IW_AUTH_KEY_MGMT_802_1X)
@@ -7300,11 +7249,11 @@ static int __wlan_hdd_cfg80211_set_default_key( struct wiphy *wiphy,
u8 key_index,
bool unicast, bool multicast)
{
- hdd_adapter_t *pAdapter = WLAN_HDD_GET_PRIV_PTR( ndev );
+ hdd_adapter_t *pAdapter = WLAN_HDD_GET_PRIV_PTR(ndev);
+ hdd_wext_state_t *pWextState = WLAN_HDD_GET_WEXT_STATE_PTR(pAdapter);
+ hdd_station_ctx_t *pHddStaCtx = WLAN_HDD_GET_STATION_CTX_PTR(pAdapter);
+ hdd_context_t *pHddCtx;
int status;
- hdd_wext_state_t *pWextState;
- hdd_station_ctx_t *pHddStaCtx;
- hdd_context_t *pHddCtx;
ENTER();
@@ -7312,59 +7261,39 @@ static int __wlan_hdd_cfg80211_set_default_key( struct wiphy *wiphy,
TRACE_CODE_HDD_CFG80211_SET_DEFAULT_KEY,
pAdapter->sessionId, key_index));
- pWextState = WLAN_HDD_GET_WEXT_STATE_PTR(pAdapter);
- pHddStaCtx = WLAN_HDD_GET_STATION_CTX_PTR(pAdapter);
-
- if ((NULL == pWextState) || (NULL == pHddStaCtx))
- {
- VOS_TRACE(VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_FATAL,
- "invalid Wext state or HDD context");
- return -EINVAL;
- }
-
- hddLog(VOS_TRACE_LEVEL_INFO, "%s: device_mode = %d key_index = %d",
- __func__,pAdapter->device_mode, key_index);
-
- if (CSR_MAX_NUM_KEY <= key_index)
- {
- hddLog(VOS_TRACE_LEVEL_ERROR, "%s: Invalid key index %d", __func__,
- key_index);
+ hddLog(LOG1, FL("Device_mode = %d key_index = %d"),
+ pAdapter->device_mode, key_index);
+ if (CSR_MAX_NUM_KEY <= key_index) {
+ hddLog(LOGE, FL("Invalid key index %d"), key_index);
return -EINVAL;
}
pHddCtx = WLAN_HDD_GET_CTX(pAdapter);
status = wlan_hdd_validate_context(pHddCtx);
- if (0 != status)
- {
- VOS_TRACE( VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_ERROR,
- "%s: HDD context is not valid", __func__);
+ if (0 != status) {
+ hddLog(LOGE, FL("HDD context is not valid"));
return status;
}
- if ((pAdapter->device_mode == WLAN_HDD_INFRA_STATION)
- || (pAdapter->device_mode == WLAN_HDD_P2P_CLIENT)
- )
- {
- if ( (eCSR_ENCRYPT_TYPE_TKIP !=
+ if ((pAdapter->device_mode == WLAN_HDD_INFRA_STATION) ||
+ (pAdapter->device_mode == WLAN_HDD_P2P_CLIENT)) {
+ if ((eCSR_ENCRYPT_TYPE_TKIP !=
pHddStaCtx->conn_info.ucEncryptionType) &&
- (eCSR_ENCRYPT_TYPE_AES !=
- pHddStaCtx->conn_info.ucEncryptionType)
- )
- {
- /* if default key index is not same as previous one,
+ (eCSR_ENCRYPT_TYPE_AES !=
+ pHddStaCtx->conn_info.ucEncryptionType)) {
+ /* If default key index is not same as previous one,
* then update the default key index */
tCsrRoamSetKey setKey;
v_U32_t roamId= 0xFF;
tCsrKeys *Keys = &pWextState->roamProfile.Keys;
- hddLog(VOS_TRACE_LEVEL_INFO_HIGH, "%s: default tx key index %d",
- __func__, key_index);
+ hddLog(LOG2, FL("Default tx key index %d"), key_index);
Keys->defaultIndex = (u8)key_index;
- vos_mem_zero(&setKey,sizeof(tCsrRoamSetKey));
+ vos_mem_zero(&setKey, sizeof(tCsrRoamSetKey));
setKey.keyId = key_index;
setKey.keyLength = Keys->KeyLength[key_index];
@@ -7375,17 +7304,16 @@ static int __wlan_hdd_cfg80211_set_default_key( struct wiphy *wiphy,
setKey.keyDirection = eSIR_TX_RX;
vos_mem_copy(setKey.peerMac,
- &pHddStaCtx->conn_info.bssId[0],
- VOS_MAC_ADDR_SIZE);
+ &pHddStaCtx->conn_info.bssId[0], VOS_MAC_ADDR_SIZE);
if (Keys->KeyLength[key_index] == CSR_WEP40_KEY_LEN &&
pWextState->roamProfile.EncryptionType.encryptionType[0] ==
- eCSR_ENCRYPT_TYPE_WEP104)
- {
- /*In the case of dynamic wep supplicant hardcodes DWEP type to eCSR_ENCRYPT_TYPE_WEP104
- even though ap is configured for WEP-40 encryption. In this canse the key length
- is 5 but the encryption type is 104 hence checking the key langht(5) and encryption
- type(104) and switching encryption type to 40*/
+ eCSR_ENCRYPT_TYPE_WEP104) {
+ /* In the case of dynamic wep supplicant hardcodes DWEP type
+ * to eCSR_ENCRYPT_TYPE_WEP104 even though ap is configured for
+ * WEP-40 encryption. In this canse the key length is 5 but the
+ * encryption type is 104 hence checking the key langht(5) and
+ * encryption type(104) and switching encryption type to 40*/
pWextState->roamProfile.EncryptionType.encryptionType[0] =
eCSR_ENCRYPT_TYPE_WEP40;
pWextState->roamProfile.mcEncryptionType.encryptionType[0] =
@@ -7395,35 +7323,28 @@ static int __wlan_hdd_cfg80211_set_default_key( struct wiphy *wiphy,
setKey.encType =
pWextState->roamProfile.EncryptionType.encryptionType[0];
- /* issue set key request */
- status = sme_RoamSetKey( WLAN_HDD_GET_HAL_CTX(pAdapter),
- pAdapter->sessionId, &setKey, &roamId );
+ /* Issue set key request */
+ status = sme_RoamSetKey(WLAN_HDD_GET_HAL_CTX(pAdapter),
+ pAdapter->sessionId, &setKey, &roamId);
- if ( 0 != status )
- {
- hddLog(VOS_TRACE_LEVEL_ERROR,
- "%s: sme_RoamSetKey failed, returned %d", __func__,
- status);
+ if (0 != status) {
+ hddLog(LOGE, FL("sme_RoamSetKey failed, returned %d"), status);
return -EINVAL;
}
}
- }
-
- /* In SoftAp mode setting key direction for default mode */
- else if ( WLAN_HDD_SOFTAP == pAdapter->device_mode )
- {
- if ( (eCSR_ENCRYPT_TYPE_TKIP !=
+ } else if ( WLAN_HDD_SOFTAP == pAdapter->device_mode ) {
+ /* In SoftAp mode setting key direction for default mode */
+ if ((eCSR_ENCRYPT_TYPE_TKIP !=
pWextState->roamProfile.EncryptionType.encryptionType[0]) &&
(eCSR_ENCRYPT_TYPE_AES !=
- pWextState->roamProfile.EncryptionType.encryptionType[0])
- )
- {
- /* Saving key direction for default key index to TX default */
+ pWextState->roamProfile.EncryptionType.encryptionType[0])) {
+ /* Saving key direction for default key index to TX default */
hdd_ap_ctx_t *pAPCtx = WLAN_HDD_GET_AP_CTX_PTR(pAdapter);
pAPCtx->wepKey[key_index].keyDirection = eSIR_TX_DEFAULT;
}
}
+ EXIT();
return status;
}
@@ -7462,9 +7383,8 @@ static struct cfg80211_bss* wlan_hdd_cfg80211_inform_bss(
ENTER();
- if( NULL == pBssDesc )
- {
- hddLog(VOS_TRACE_LEVEL_FATAL, "%s: pBssDesc is NULL", __func__);
+ if (NULL == pBssDesc) {
+ hddLog(VOS_TRACE_LEVEL_FATAL, FL("pBssDesc is NULL"));
return bss;
}
@@ -7472,33 +7392,28 @@ static struct cfg80211_bss* wlan_hdd_cfg80211_inform_bss(
ie_length = GET_IE_LEN_IN_BSS_DESC( pBssDesc->length );
ie = ((ie_length != 0) ? (const char *)&pBssDesc->ieFields: NULL);
- if( NULL == ie )
- {
- hddLog(VOS_TRACE_LEVEL_FATAL, "%s: IE of BSS descriptor is NULL", __func__);
+ if (NULL == ie) {
+ hddLog(VOS_TRACE_LEVEL_FATAL, FL("IE of BSS descriptor is NULL"));
return bss;
}
- if (chan_no <= ARRAY_SIZE(hdd_channels_2_4_GHZ))
- {
+ if (chan_no <= ARRAY_SIZE(hdd_channels_2_4_GHZ)) {
freq = ieee80211_channel_to_frequency(chan_no, IEEE80211_BAND_2GHZ);
- }
- else
- {
+ } else {
freq = ieee80211_channel_to_frequency(chan_no, IEEE80211_BAND_5GHZ);
}
chan = __ieee80211_get_channel(wiphy, freq);
if (!chan) {
- hddLog(VOS_TRACE_LEVEL_ERROR, "%s chan pointer is NULL", __func__);
+ hddLog(LOGE, FL("chan pointer is NULL"));
return NULL;
}
bss = cfg80211_get_bss(wiphy, chan, pBssDesc->bssId,
&roamProfile->SSID.ssId[0], roamProfile->SSID.length,
WLAN_CAPABILITY_ESS, WLAN_CAPABILITY_ESS);
- if (bss == NULL)
- {
+ if (bss == NULL) {
rssi = (VOS_MIN ((pBssDesc->rssi + pBssDesc->sinr), 0))*100;
return (cfg80211_inform_bss(wiphy, chan, pBssDesc->bssId,
@@ -7506,9 +7421,7 @@ static struct cfg80211_bss* wlan_hdd_cfg80211_inform_bss(
pBssDesc->capabilityInfo,
pBssDesc->beaconInterval, ie, ie_length,
rssi, GFP_KERNEL ));
-}
- else
- {
+ } else {
return bss;
}
}
@@ -7533,12 +7446,12 @@ struct cfg80211_bss* wlan_hdd_cfg80211_update_bss_list(
ENTER();
if (NULL == pBssDesc) {
- hddLog(VOS_TRACE_LEVEL_ERROR, "%s: pBssDesc is NULL", __func__);
+ hddLog(LOGE, FL("pBssDesc is NULL"));
return bss;
}
if (NULL == pRoamInfo->pProfile) {
- hddLog(VOS_TRACE_LEVEL_ERROR, "%s: Roam profile is NULL", __func__);
+ hddLog(LOGE, FL("Roam profile is NULL"));
return bss;
}
@@ -7553,7 +7466,7 @@ struct cfg80211_bss* wlan_hdd_cfg80211_update_bss_list(
chan = __ieee80211_get_channel(wiphy, freq);
if (!chan) {
- hddLog(VOS_TRACE_LEVEL_ERROR, "%s chan pointer is NULL", __func__);
+ hddLog(LOGE, FL("chan pointer is NULL"));
return NULL;
}
@@ -7562,10 +7475,10 @@ struct cfg80211_bss* wlan_hdd_cfg80211_update_bss_list(
pRoamInfo->pProfile->SSIDs.SSIDList->SSID.length,
WLAN_CAPABILITY_ESS, WLAN_CAPABILITY_ESS);
if (bss == NULL) {
- hddLog(VOS_TRACE_LEVEL_ERROR, "%s BSS not present", __func__);
+ hddLog(LOGE, FL("BSS not present"));
} else {
- hddLog(VOS_TRACE_LEVEL_INFO, "%s cfg80211_unlink_bss called for BSSID "
- MAC_ADDRESS_STR, __func__, MAC_ADDR_ARRAY(pBssDesc->bssId));
+ hddLog(LOG1, FL("cfg80211_unlink_bss called for BSSID "
+ MAC_ADDRESS_STR), MAC_ADDR_ARRAY(pBssDesc->bssId));
cfg80211_unlink_bss(wiphy, bss);
}
return bss;
@@ -7615,27 +7528,14 @@ wlan_hdd_cfg80211_inform_bss_frame( hdd_adapter_t *pAdapter,
pHddCtx = WLAN_HDD_GET_CTX(pAdapter);
status = wlan_hdd_validate_context(pHddCtx);
- if (0 != status)
- {
- VOS_TRACE( VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_ERROR,
- "%s: HDD context is not valid", __func__);
+ if (0 != status) {
+ hddLog(LOGE, FL("HDD context is not valid"));
return NULL;
}
- /*bss_update is not allowed during wlan driver loading or unloading*/
- if ((pHddCtx->isLoadInProgress) ||
- (pHddCtx->isUnloadInProgress))
- {
- VOS_TRACE(VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_ERROR,
- "%s:Loading_unloading in Progress. Ignore!!!",__func__);
- return NULL;
- }
-
mgmt = kzalloc((sizeof (struct ieee80211_mgmt) + ie_length), GFP_KERNEL);
- if (!mgmt)
- {
- VOS_TRACE( VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_ERROR,
- "%s: memory allocation failed ", __func__);
+ if (!mgmt) {
+ hddLog(LOGE, FL("memory allocation failed"));
return NULL;
}
@@ -7672,77 +7572,74 @@ wlan_hdd_cfg80211_inform_bss_frame( hdd_adapter_t *pAdapter,
#endif
memcpy(mgmt->u.probe_resp.variable, ie, ie_length);
- if (bss_desc->fProbeRsp)
- {
+ if (bss_desc->fProbeRsp) {
mgmt->frame_control |=
(u16)(IEEE80211_FTYPE_MGMT | IEEE80211_STYPE_PROBE_RESP);
- }
- else
- {
+ } else {
mgmt->frame_control |=
(u16)(IEEE80211_FTYPE_MGMT | IEEE80211_STYPE_BEACON);
}
if (chan_no <= ARRAY_SIZE(hdd_channels_2_4_GHZ) &&
- (wiphy->bands[IEEE80211_BAND_2GHZ] != NULL))
- {
+ (wiphy->bands[IEEE80211_BAND_2GHZ] != NULL)) {
freq = ieee80211_channel_to_frequency(chan_no, IEEE80211_BAND_2GHZ);
- }
- else if ((chan_no > ARRAY_SIZE(hdd_channels_2_4_GHZ)) &&
- (wiphy->bands[IEEE80211_BAND_5GHZ] != NULL))
-
- {
+ } else if ((chan_no > ARRAY_SIZE(hdd_channels_2_4_GHZ)) &&
+ (wiphy->bands[IEEE80211_BAND_5GHZ] != NULL)) {
freq = ieee80211_channel_to_frequency(chan_no, IEEE80211_BAND_5GHZ);
- }
- else
- {
- VOS_TRACE( VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_ERROR,
- "%s: invalid chan_no %d", __func__, chan_no);
+ } else {
+ hddLog(LOGE, FL("Invalid chan_no %d"), chan_no);
kfree(mgmt);
return NULL;
}
+
chan = __ieee80211_get_channel(wiphy, freq);
- /*when the band is changed on the fly using the GUI, three things are done
- * 1. scan abort 2.flush scan results from cache 3.update the band with the new band user specified(refer to the hdd_setBand_helper function)
- * as part of the scan abort, message willbe queued to PE and we proceed with flushing and changinh the band.
- * pe will stop the scanning further and report back the results what ever it had till now by calling the call back function.
- * if the time between update band and scandone call back is sufficent enough the band change reflects in SME, SME validates the channels
- * and discards the channels correponding to previous band and calls back with zero bss results.
- * but if the time between band update and scan done callback is very small then band change will not reflect in SME and SME reports to HDD
- * all the channels correponding to previous band.this is due to race condition.but those channels are invalid to the new band and so
- * this function __ieee80211_get_channel will return NULL.Each time we report scan result with this pointer null warning kernel trace is printed.
- * if the scan results contain large number of APs continuosly kernel warning trace is printed and it will lead to apps watch dog bark.
+ /* When the band is changed on the fly using the GUI, three things are done
+ * 1. scan abort
+ * 2. flush scan results from cache
+ * 3. update the band with the new band user specified (refer to the
+ * hdd_setBand_helper function) as part of the scan abort, message will be
+ * queued to PE and we proceed with flushing and changinh the band.
+ * PE will stop the scanning further and report back the results what ever
+ * it had till now by calling the call back function.
+ * if the time between update band and scandone call back is sufficient
+ * enough the band change reflects in SME, SME validates the channels
+ * and discards the channels correponding to previous band and calls back
+ * with zero bss results. but if the time between band update and scan done
+ * callback is very small then band change will not reflect in SME and SME
+ * reports to HDD all the channels correponding to previous band.this is due
+ * to race condition.but those channels are invalid to the new band and so
+ * this function __ieee80211_get_channel will return NULL.Each time we
+ * report scan result with this pointer null warning kernel trace is printed.
+ * if the scan results contain large number of APs continuosly kernel
+ * warning trace is printed and it will lead to apps watch dog bark.
* So drop the bss and continue to next bss.
*/
- if(chan == NULL)
- {
- hddLog(VOS_TRACE_LEVEL_ERROR, "%s chan pointer is NULL", __func__);
+ if (chan == NULL) {
+ hddLog(LOGE, FL("chan pointer is NULL"));
kfree(mgmt);
return NULL;
}
- /*To keep the rssi icon of the connected AP in the scan window
- *and the rssi icon of the wireless networks in sync
- * */
- if (( eConnectionState_Associated ==
- pAdapter->sessionCtx.station.conn_info.connState ) &&
- ( VOS_TRUE == vos_mem_compare(bss_desc->bssId,
+
+ /* To keep the rssi icon of the connected AP in the scan window
+ * and the rssi icon of the wireless networks in sync
+ */
+ if ((eConnectionState_Associated ==
+ pAdapter->sessionCtx.station.conn_info.connState) &&
+ (VOS_TRUE == vos_mem_compare(bss_desc->bssId,
pAdapter->sessionCtx.station.conn_info.bssId,
VOS_MAC_ADDR_SIZE)) &&
- (pHddCtx->hdd_wlan_suspended == FALSE))
- {
- /* supplicant takes the signal strength in terms of mBm(100*dBm) */
+ (pHddCtx->hdd_wlan_suspended == FALSE)) {
+ /* Supplicant takes the signal strength in terms of mBm(100*dBm) */
rssi = (pAdapter->rssi * 100);
- }
- else
- {
- rssi = (VOS_MIN ((bss_desc->rssi + bss_desc->sinr), 0))*100;
+ } else {
+ rssi = (VOS_MIN ((bss_desc->rssi + bss_desc->sinr), 0)) * 100;
}
- hddLog(VOS_TRACE_LEVEL_INFO, "%s: BSSID:" MAC_ADDRESS_STR " Channel:%d RSSI:%d",
- __func__, MAC_ADDR_ARRAY(mgmt->bssid),chan->center_freq, (int)(rssi/100));
+ hddLog(LOG1, FL("BSSID: "MAC_ADDRESS_STR" Channel:%d RSSI:%d"),
+ MAC_ADDR_ARRAY(mgmt->bssid), chan->center_freq, (int)(rssi/100));
- bss_status = cfg80211_inform_bss_frame(wiphy, chan, mgmt,
- frame_len, rssi, GFP_KERNEL);
+ bss_status = cfg80211_inform_bss_frame(wiphy, chan, mgmt, frame_len, rssi,
+ GFP_KERNEL);
kfree(mgmt);
return bss_status;
}
@@ -7751,9 +7648,9 @@ wlan_hdd_cfg80211_inform_bss_frame( hdd_adapter_t *pAdapter,
* FUNCTION: wlan_hdd_cfg80211_update_bss_db
* This function is used to update the BSS data base of CFG8011
*/
-struct cfg80211_bss* wlan_hdd_cfg80211_update_bss_db( hdd_adapter_t *pAdapter,
- tCsrRoamInfo *pRoamInfo
- )
+struct cfg80211_bss*
+wlan_hdd_cfg80211_update_bss_db(hdd_adapter_t *pAdapter,
+ tCsrRoamInfo *pRoamInfo)
{
tCsrRoamConnectedProfile roamProfile;
tHalHandle hHal = WLAN_HDD_GET_HAL_CTX(pAdapter);
@@ -7764,24 +7661,19 @@ struct cfg80211_bss* wlan_hdd_cfg80211_update_bss_db( hdd_adapter_t *pAdapter,
memset(&roamProfile, 0, sizeof(tCsrRoamConnectedProfile));
sme_RoamGetConnectProfile(hHal, pAdapter->sessionId, &roamProfile);
- if (NULL != roamProfile.pBssDesc)
- {
+ if (NULL != roamProfile.pBssDesc) {
bss = wlan_hdd_cfg80211_inform_bss(pAdapter,
&roamProfile);
- if (NULL == bss)
- {
- hddLog(VOS_TRACE_LEVEL_INFO, "%s: cfg80211_inform_bss return NULL",
- __func__);
+ if (NULL == bss) {
+ hddLog(LOG1, FL("cfg80211_inform_bss return NULL"));
}
sme_RoamFreeConnectProfile(hHal, &roamProfile);
+ } else {
+ hddLog(LOGE, FL("roamProfile.pBssDesc is NULL"));
}
- else
- {
- hddLog(VOS_TRACE_LEVEL_ERROR, "%s: roamProfile.pBssDesc is NULL",
- __func__);
- }
+ EXIT();
return bss;
}
@@ -7798,6 +7690,7 @@ static int wlan_hdd_cfg80211_update_bss( struct wiphy *wiphy,
tScanResultHandle pResult;
struct cfg80211_bss *bss_status = NULL;
hdd_context_t *pHddCtx;
+ int ret;
ENTER();
@@ -7806,42 +7699,26 @@ static int wlan_hdd_cfg80211_update_bss( struct wiphy *wiphy,
NO_SESSION, pAdapter->sessionId));
pHddCtx = WLAN_HDD_GET_CTX(pAdapter);
-
- if (pHddCtx->isLogpInProgress)
- {
- VOS_TRACE(VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_FATAL,
- "%s:LOGP in Progress. Ignore!!!",__func__);
- return -EAGAIN;
- }
-
-
- /*bss_update is not allowed during wlan driver loading or unloading*/
- if ((pHddCtx->isLoadInProgress) ||
- (pHddCtx->isUnloadInProgress))
- {
- VOS_TRACE(VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_ERROR,
- "%s:Loading_unloading in Progress. Ignore!!!",__func__);
- return VOS_STATUS_E_PERM;
+ ret = wlan_hdd_validate_context(pHddCtx);
+ if (0 != ret) {
+ hddLog(LOGE, FL("HDD context is not valid"));
+ return ret;
}
-
/*
* start getting scan results and populate cgf80211 BSS database
*/
status = sme_ScanGetResult(hHal, pAdapter->sessionId, NULL, &pResult);
/* no scan results */
- if (NULL == pResult)
- {
- hddLog(VOS_TRACE_LEVEL_INFO, "%s: No scan result Status %d",
- __func__, status);
+ if (NULL == pResult) {
+ hddLog(LOG1, FL("No scan result Status %d"), status);
return status;
}
pScanResult = sme_ScanResultGetFirst(hHal, pResult);
- while (pScanResult)
- {
+ while (pScanResult) {
/*
* cfg80211_inform_bss() is not updating ie field of bss entry, if
* entry already exists in bss data base of cfg80211 for that
@@ -7854,16 +7731,12 @@ static int wlan_hdd_cfg80211_update_bss( struct wiphy *wiphy,
* */
bss_status = wlan_hdd_cfg80211_inform_bss_frame(pAdapter,
- &pScanResult->BssDescriptor);
+ &pScanResult->BssDescriptor);
- if (NULL == bss_status)
- {
- hddLog(VOS_TRACE_LEVEL_INFO,
- "%s: NULL returned by cfg80211_inform_bss", __func__);
- }
- else
- {
+ if (NULL == bss_status) {
+ hddLog(LOG1, FL("NULL returned by cfg80211_inform_bss_frame"));
+ } else {
cfg80211_put_bss(
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,9,0))
wiphy,
@@ -7876,6 +7749,7 @@ static int wlan_hdd_cfg80211_update_bss( struct wiphy *wiphy,
sme_ScanResultPurge(hHal, pResult);
+ EXIT();
return 0;
}
@@ -7909,20 +7783,18 @@ int wlan_hdd_cfg80211_pmksa_candidate_notify(
hdd_context_t *pHddCtx = (hdd_context_t*)pAdapter->pHddCtx;
ENTER();
- hddLog(VOS_TRACE_LEVEL_INFO, "%s is going to notify supplicant of:", __func__);
+ hddLog(LOG1, FL("is going to notify supplicant of:"));
- if( NULL == pRoamInfo )
- {
- hddLog(VOS_TRACE_LEVEL_FATAL, "%s: pRoamInfo is NULL", __func__);
+ if (NULL == pRoamInfo) {
+ hddLog(LOGP, FL("pRoamInfo is NULL"));
return -EINVAL;
}
- if (eANI_BOOLEAN_TRUE == hdd_is_okc_mode_enabled(pHddCtx))
- {
+ if (eANI_BOOLEAN_TRUE == hdd_is_okc_mode_enabled(pHddCtx)) {
hddLog(VOS_TRACE_LEVEL_INFO, MAC_ADDRESS_STR,
MAC_ADDR_ARRAY(pRoamInfo->bssid));
- cfg80211_pmksa_candidate_notify(dev, index,
- pRoamInfo->bssid, preauth, GFP_KERNEL);
+ cfg80211_pmksa_candidate_notify(dev, index, pRoamInfo->bssid,
+ preauth, GFP_KERNEL);
}
#endif /* FEATURE_WLAN_OKC */
return 0;
@@ -9687,7 +9559,7 @@ static int __wlan_hdd_cfg80211_connect( struct wiphy *wiphy,
}
#endif
if (vos_max_concurrent_connections_reached()) {
- hddLog(VOS_TRACE_LEVEL_DEBUG, FL("Reached max concurrent connections"));
+ hddLog(VOS_TRACE_LEVEL_ERROR, FL("Reached max concurrent connections"));
return -ECONNREFUSED;
}
@@ -10101,13 +9973,6 @@ static int __wlan_hdd_cfg80211_join_ibss(struct wiphy *wiphy,
return status;
}
- if (NULL == pWextState)
- {
- hddLog (VOS_TRACE_LEVEL_ERROR, "%s ERROR: Data Storage Corruption",
- __func__);
- return -EIO;
- }
-
if (vos_max_concurrent_connections_reached()) {
hddLog(VOS_TRACE_LEVEL_DEBUG, FL("Reached max concurrent connections"));
return -ECONNREFUSED;
@@ -10510,12 +10375,10 @@ static int __wlan_hdd_cfg80211_set_txpower(struct wiphy *wiphy,
MTRACE(vos_trace(VOS_MODULE_ID_HDD,
TRACE_CODE_HDD_CFG80211_SET_TXPOWER,
NO_SESSION, type ));
- status = wlan_hdd_validate_context(pHddCtx);
- if (0 != status)
- {
- VOS_TRACE( VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_ERROR,
- "%s: HDD context is not valid", __func__);
+ status = wlan_hdd_validate_context(pHddCtx);
+ if (0 != status) {
+ hddLog(LOGE, FL("HDD context is not valid"));
return status;
}
@@ -10523,39 +10386,35 @@ static int __wlan_hdd_cfg80211_set_txpower(struct wiphy *wiphy,
if (0 != ccmCfgSetInt(hHal, WNI_CFG_CURRENT_TX_POWER_LEVEL,
dbm, ccmCfgSetCallback,
- eANI_BOOLEAN_TRUE))
- {
- hddLog(VOS_TRACE_LEVEL_ERROR,
- "%s: ccmCfgSetInt failed for tx power %hu", __func__, dbm);
+ eANI_BOOLEAN_TRUE)) {
+ hddLog(LOGE, FL("ccmCfgSetInt failed for tx power %hu"), dbm);
return -EIO;
}
- hddLog(VOS_TRACE_LEVEL_INFO_MED, "%s: set tx power level %d dbm", __func__,
- dbm);
+ hddLog(VOS_TRACE_LEVEL_INFO_MED, FL("Set tx power level %d dbm"), dbm);
- switch(type)
- {
- case NL80211_TX_POWER_AUTOMATIC: /*automatically determine transmit power*/
- /* Fall through */
- case NL80211_TX_POWER_LIMITED: /*limit TX power by the mBm parameter*/
- if( sme_SetMaxTxPower(hHal, bssid, selfMac, dbm) != eHAL_STATUS_SUCCESS )
- {
- hddLog(VOS_TRACE_LEVEL_ERROR, "%s: Setting maximum tx power failed",
- __func__);
+ switch (type) {
+ /* Automatically determine transmit power */
+ case NL80211_TX_POWER_AUTOMATIC:
+ /* Fall through */
+ case NL80211_TX_POWER_LIMITED: /* Limit TX power by the mBm parameter */
+ if (sme_SetMaxTxPower(hHal, bssid, selfMac, dbm) != eHAL_STATUS_SUCCESS) {
+ hddLog(LOGE, FL("Setting maximum tx power failed"));
return -EIO;
- }
- break;
- case NL80211_TX_POWER_FIXED: /*fix TX power to the mBm parameter*/
- hddLog(VOS_TRACE_LEVEL_ERROR, "%s: NL80211_TX_POWER_FIXED not supported",
- __func__);
+ }
+ break;
+
+ case NL80211_TX_POWER_FIXED: /* Fix TX power to the mBm parameter */
+ hddLog(LOGE, FL("NL80211_TX_POWER_FIXED not supported"));
return -EOPNOTSUPP;
break;
+
default:
- hddLog(VOS_TRACE_LEVEL_ERROR, "%s: Invalid power setting type %d",
- __func__, type);
+ hddLog(LOGE, FL("Invalid power setting type %d"), type);
return -EIO;
}
+ EXIT();
return 0;
}
@@ -10563,11 +10422,7 @@ static int wlan_hdd_cfg80211_set_txpower(struct wiphy *wiphy,
#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,8,0)
struct wireless_dev *wdev,
#endif
-#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,35)
- enum tx_power_setting type,
-#else
enum nl80211_tx_power_setting type,
-#endif
int dbm)
{
int ret;
@@ -10576,11 +10431,7 @@ static int wlan_hdd_cfg80211_set_txpower(struct wiphy *wiphy,
#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,8,0)
wdev,
#endif
-#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,35)
- type,
-#else
type,
-#endif
dbm);
vos_ssr_unprotect(__func__);
@@ -10605,19 +10456,15 @@ static int wlan_hdd_cfg80211_get_txpower(struct wiphy *wiphy,
ENTER();
status = wlan_hdd_validate_context(pHddCtx);
-
- if (0 != status)
- {
- VOS_TRACE( VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_ERROR,
- "%s: HDD context is not valid", __func__);
+ if (0 != status) {
+ hddLog(LOGE, FL("HDD context is not valid"));
*dbm = 0;
return status;
}
pAdapter = hdd_get_adapter(pHddCtx, WLAN_HDD_INFRA_STATION);
- if (NULL == pAdapter)
- {
- hddLog(VOS_TRACE_LEVEL_FATAL, "%s: Not in station context " ,__func__);
+ if (NULL == pAdapter) {
+ hddLog(VOS_TRACE_LEVEL_FATAL, FL("pAdapter is NULL"));
return -ENOENT;
}
@@ -10628,6 +10475,7 @@ static int wlan_hdd_cfg80211_get_txpower(struct wiphy *wiphy,
return 0;
}
+
static int __wlan_hdd_cfg80211_get_station(struct wiphy *wiphy,
struct net_device *dev,
u8* mac, struct station_info *sinfo)
@@ -11272,9 +11120,8 @@ static int __wlan_hdd_cfg80211_del_station(struct wiphy *wiphy,
(!pAdapter->aStaInfo[i].isDeauthInProgress)) {
u8 *macAddr = pAdapter->aStaInfo[i].macAddrSTA.bytes;
hddLog(VOS_TRACE_LEVEL_INFO,
- "%s: Delete STA with MAC::"
- MAC_ADDRESS_STR,
- __func__, MAC_ADDR_ARRAY(macAddr));
+ FL("Delete STA with MAC::"MAC_ADDRESS_STR),
+ MAC_ADDR_ARRAY(macAddr));
vos_status = hdd_softap_sta_deauth(pAdapter, macAddr);
if (VOS_IS_STATUS_SUCCESS(vos_status))
pAdapter->aStaInfo[i].isDeauthInProgress = TRUE;
@@ -11284,43 +11131,36 @@ static int __wlan_hdd_cfg80211_del_station(struct wiphy *wiphy,
vos_status = hdd_softap_GetStaId(pAdapter,(v_MACADDR_t *)mac, &staId);
if (!VOS_IS_STATUS_SUCCESS(vos_status)) {
hddLog(VOS_TRACE_LEVEL_INFO,
- "%s: Skip this DEL STA as this is not used::"
- MAC_ADDRESS_STR,
- __func__, MAC_ADDR_ARRAY(mac));
+ FL("Skip DEL STA as this is not used::"MAC_ADDRESS_STR),
+ MAC_ADDR_ARRAY(mac));
return -ENOENT;
}
if (pAdapter->aStaInfo[staId].isDeauthInProgress == TRUE) {
hddLog(VOS_TRACE_LEVEL_INFO,
- "%s: Skip this DEL STA as deauth is in progress::"
- MAC_ADDRESS_STR,
- __func__, MAC_ADDR_ARRAY(mac));
+ FL("Skip DEL STA as deauth is in progress::"
+ MAC_ADDRESS_STR), MAC_ADDR_ARRAY(mac));
return -ENOENT;
}
pAdapter->aStaInfo[staId].isDeauthInProgress = TRUE;
hddLog(VOS_TRACE_LEVEL_INFO,
- "%s: Delete STA with MAC::"
- MAC_ADDRESS_STR,
- __func__,
- MAC_ADDR_ARRAY(mac));
+ FL("Delete STA with MAC::"MAC_ADDRESS_STR),
+ MAC_ADDR_ARRAY(mac));
vos_status = hdd_softap_sta_deauth(pAdapter, mac);
if (!VOS_IS_STATUS_SUCCESS(vos_status)) {
pAdapter->aStaInfo[staId].isDeauthInProgress = FALSE;
hddLog(VOS_TRACE_LEVEL_INFO,
- "%s: STA removal failed for ::"
- MAC_ADDRESS_STR,
- __func__,
- MAC_ADDR_ARRAY(mac));
+ FL("STA removal failed for ::"MAC_ADDRESS_STR),
+ MAC_ADDR_ARRAY(mac));
return -ENOENT;
}
}
}
EXIT();
-
return 0;
}
@@ -11842,7 +11682,7 @@ static int __wlan_hdd_cfg80211_sched_scan_start(struct wiphy *wiphy,
tpSirPNOScanReq pPnoRequest = NULL;
hdd_context_t *pHddCtx;
tHalHandle hHal;
- v_U32_t i, indx, num_ch, tempInterval;
+ v_U32_t i, indx, num_ch, tempInterval, j;
u8 valid_ch[WNI_CFG_VALID_CHANNEL_LIST_LEN] = {0};
u8 channels_allowed[WNI_CFG_VALID_CHANNEL_LIST_LEN] = {0};
v_U32_t num_channels_allowed = WNI_CFG_VALID_CHANNEL_LIST_LEN;
@@ -11998,6 +11838,24 @@ static int __wlan_hdd_cfg80211_sched_scan_start(struct wiphy *wiphy,
#endif
}
+ for (i = 0; i < request->n_ssids; i++) {
+ j = 0;
+ while (j < pPnoRequest->ucNetworksCount) {
+ if ((pPnoRequest->aNetworks[j].ssId.length ==
+ request->ssids[i].ssid_len) &&
+ (0 == memcmp(pPnoRequest->aNetworks[j].ssId.ssId,
+ request->ssids[i].ssid,
+ pPnoRequest->aNetworks[j].ssId.length))) {
+ pPnoRequest->aNetworks[j].bcastNetwType = eBCAST_HIDDEN;
+ break;
+ }
+ j++;
+ }
+ }
+ VOS_TRACE(VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_INFO,
+ "Number of hidden networks being Configured = %d",
+ request->n_ssids);
+
VOS_TRACE(VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_INFO,
"request->ie_len = %zu", request->ie_len);
if ((0 < request->ie_len) && (NULL != request->ie))
@@ -12209,7 +12067,7 @@ static int wlan_hdd_cfg80211_tdls_mgmt(struct wiphy *wiphy, struct net_device *d
hdd_adapter_t *pAdapter = WLAN_HDD_GET_PRIV_PTR(dev);
hdd_context_t *pHddCtx = wiphy_priv(wiphy);
- u8 peerMac[6];
+ u8 peerMac[VOS_MAC_ADDR_SIZE];
VOS_STATUS status;
int max_sta_failed = 0;
int responder;
@@ -13344,13 +13202,6 @@ static int __wlan_hdd_cfg80211_dump_survey(struct wiphy *wiphy,
ENTER();
- if (NULL == wiphy)
- {
- VOS_TRACE( VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_FATAL,
- "%s: wiphy is Null", __func__);
- return -ENODEV;
- }
-
pHddCtx = WLAN_HDD_GET_CTX(pAdapter);
status = wlan_hdd_validate_context(pHddCtx);
@@ -13462,18 +13313,6 @@ int __wlan_hdd_cfg80211_resume_wlan(struct wiphy *wiphy)
return result;
}
- if (pHddCtx->isLogpInProgress) {
- hddLog(VOS_TRACE_LEVEL_ERROR, FL("LOGP in Progress. Ignore!!!"));
- return -EAGAIN;
- }
-
- if ((pHddCtx->isLoadInProgress) ||
- (pHddCtx->isUnloadInProgress)) {
- hddLog(VOS_TRACE_LEVEL_ERROR,
- FL("Unloading/Loading in Progress. Ignore!!!"));
- return -EAGAIN;
- }
-
#ifdef CONFIG_CNSS
cnss_request_bus_bandwidth(CNSS_BUS_WIDTH_MEDIUM);
#endif
@@ -13498,15 +13337,14 @@ int __wlan_hdd_cfg80211_resume_wlan(struct wiphy *wiphy)
pHddCtx->isWiphySuspended = FALSE;
if (TRUE != pHddCtx->isSchedScanUpdatePending) {
spin_unlock(&pHddCtx->schedScan_lock);
- VOS_TRACE(VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_INFO,
- "%s: Return resume is not due to PNO indication", __func__);
+ hddLog(LOG1, FL("Return resume is not due to PNO indication"));
return 0;
}
/* Reset flag to avoid updatating cfg80211 data old results again */
pHddCtx->isSchedScanUpdatePending = FALSE;
spin_unlock(&pHddCtx->schedScan_lock);
- status = hdd_get_front_adapter (pHddCtx, &pAdapterNode);
+ status = hdd_get_front_adapter (pHddCtx, &pAdapterNode);
while (NULL != pAdapterNode && VOS_STATUS_SUCCESS == status) {
pAdapter = pAdapterNode->pAdapter;
@@ -13528,7 +13366,7 @@ int __wlan_hdd_cfg80211_resume_wlan(struct wiphy *wiphy)
return result;
}
- status = hdd_get_next_adapter ( pHddCtx, pAdapterNode, &pNext );
+ status = hdd_get_next_adapter (pHddCtx, pAdapterNode, &pNext);
pAdapterNode = pNext;
}
@@ -13575,17 +13413,10 @@ int __wlan_hdd_cfg80211_suspend_wlan(struct wiphy *wiphy,
ENTER();
rc = wlan_hdd_validate_context(pHddCtx);
if (0 != rc) {
- hddLog(VOS_TRACE_LEVEL_ERROR, FL("HDD context is not valid"));
+ hddLog(LOGE, FL("HDD context is not valid"));
return rc;
}
- if (pHddCtx->isLogpInProgress)
- {
- VOS_TRACE(VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_ERROR,
- "%s:LOGP in Progress. Ignore!!!", __func__);
- return -EAGAIN;
- }
-
/* If RADAR detection is in progress (HDD), prevent suspend. The flag
* "dfs_cac_block_tx" is set to TRUE when RADAR is found and stay TRUE until
* CAC is done for a SoftAP which is in started state.
@@ -13748,18 +13579,11 @@ int wlan_hdd_cfg80211_set_ap_channel_width(struct wiphy *wiphy,
tSmeConfigParams smeConfig;
bool cbModeChange;
- if (NULL == wiphy) {
- VOS_TRACE( VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_FATAL,
- "%s: wiphy is Null", __func__);
- return -ENODEV;
- }
-
pHddCtx = WLAN_HDD_GET_CTX(pAdapter);
status = wlan_hdd_validate_context(pHddCtx);
if (0 != status) {
- VOS_TRACE( VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_ERROR,
- "%s: HDD context is not valid", __func__);
+ hddLog(LOGE, FL("HDD context is not valid"));
return status;
}
@@ -13794,9 +13618,7 @@ int wlan_hdd_cfg80211_set_ap_channel_width(struct wiphy *wiphy,
break;
default:
- hddLog(VOS_TRACE_LEVEL_ERROR,
- "%s:Error!!! Invalid HT20/40 mode !",
- __func__);
+ hddLog(LOGE, FL("Error!!! Invalid HT20/40 mode !"));
return -EINVAL;
}
@@ -13806,16 +13628,15 @@ int wlan_hdd_cfg80211_set_ap_channel_width(struct wiphy *wiphy,
if (WLAN_HDD_SOFTAP != pAdapter->device_mode)
return 0;
- hddLog(VOS_TRACE_LEVEL_INFO, "%s: channel bonding changed to %d",
- __func__, smeConfig.csrConfig.channelBondingMode24GHz);
+ hddLog(LOG1, FL("Channel bonding changed to %d"),
+ smeConfig.csrConfig.channelBondingMode24GHz);
- /* change SAP ht2040 mode */
+ /* Change SAP ht2040 mode */
status = hdd_set_sap_ht2040_mode(pAdapter,
cfg80211_get_chandef_type(chandef));
if (status != VOS_STATUS_SUCCESS) {
- hddLog(VOS_TRACE_LEVEL_ERROR,
- "%s:Error!!! Cannot set SAP HT20/40 mode!",
- __func__);
+ hddLog(LOGE,
+ FL("Error!!! Cannot set SAP HT20/40 mode!"));
return -EINVAL;
}
diff --git a/CORE/HDD/src/wlan_hdd_main.c b/CORE/HDD/src/wlan_hdd_main.c
index ba11a3ded6ee..c2ad7262b1f1 100755
--- a/CORE/HDD/src/wlan_hdd_main.c
+++ b/CORE/HDD/src/wlan_hdd_main.c
@@ -851,25 +851,19 @@ int wlan_hdd_validate_context(hdd_context_t *pHddCtx)
{
ENTER();
- if (NULL == pHddCtx || NULL == pHddCtx->cfg_ini)
- {
- VOS_TRACE( VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_ERROR,
- "%s: HDD context is Null", __func__);
+ if (NULL == pHddCtx || NULL == pHddCtx->cfg_ini) {
+ hddLog(LOGE, FL("HDD context is Null"));
return -ENODEV;
}
- if (pHddCtx->isLogpInProgress)
- {
- VOS_TRACE(VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_ERROR,
- "%s: LOGP in Progress. Ignore!!!", __func__);
+ if (pHddCtx->isLogpInProgress) {
+ hddLog(LOGE, FL("LOGP in Progress. Ignore!!!"));
return -EAGAIN;
}
if ((pHddCtx->isLoadInProgress) ||
- (pHddCtx->isUnloadInProgress))
- {
- VOS_TRACE(VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_ERROR,
- "%s: Unloading/Loading in Progress. Ignore!!!", __func__);
+ (pHddCtx->isUnloadInProgress)) {
+ hddLog(LOGE, FL("Unloading/Loading in Progress. Ignore!!!"));
return -EAGAIN;
}
return 0;
@@ -898,12 +892,6 @@ void hdd_checkandupdate_phymode( hdd_context_t *pHddCtx)
}
pHddStaCtx = WLAN_HDD_GET_STATION_CTX_PTR(pAdapter);
- if (NULL == pHddStaCtx)
- {
- VOS_TRACE(VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_FATAL,
- "pHddStaCtx is null !!");
- return ;
- }
cfg_param = pHddCtx->cfg_ini;
if (NULL == cfg_param)
@@ -8251,32 +8239,26 @@ void hdd_deinit_adapter( hdd_context_t *pHddCtx, hdd_adapter_t *pAdapter )
EXIT();
}
-void hdd_cleanup_adapter( hdd_context_t *pHddCtx, hdd_adapter_t *pAdapter, tANI_U8 rtnl_held )
+void hdd_cleanup_adapter(hdd_context_t *pHddCtx, hdd_adapter_t *pAdapter,
+ tANI_U8 rtnl_held)
{
struct net_device *pWlanDev = NULL;
if (pAdapter)
pWlanDev = pAdapter->dev;
else {
- VOS_TRACE( VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_ERROR,
- "%s: HDD context is Null", __func__);
+ hddLog(LOGE, FL("pAdapter is Null"));
return;
}
#ifdef FEATURE_WLAN_BATCH_SCAN
- if ((pAdapter->device_mode == WLAN_HDD_INFRA_STATION)
- || (pAdapter->device_mode == WLAN_HDD_P2P_CLIENT)
- || (pAdapter->device_mode == WLAN_HDD_P2P_GO)
- || (pAdapter->device_mode == WLAN_HDD_P2P_DEVICE)
- )
- {
- if (pAdapter)
- {
- if (eHDD_BATCH_SCAN_STATE_STARTED == pAdapter->batchScanState)
- {
+ if ((pAdapter->device_mode == WLAN_HDD_INFRA_STATION) ||
+ (pAdapter->device_mode == WLAN_HDD_P2P_CLIENT) ||
+ (pAdapter->device_mode == WLAN_HDD_P2P_GO) ||
+ (pAdapter->device_mode == WLAN_HDD_P2P_DEVICE)) {
+ if (eHDD_BATCH_SCAN_STATE_STARTED == pAdapter->batchScanState) {
hdd_deinit_batch_scan(pAdapter);
- }
- }
+ }
}
#endif
@@ -8290,17 +8272,14 @@ void hdd_cleanup_adapter( hdd_context_t *pHddCtx, hdd_adapter_t *pAdapter, tANI_
*/
clear_bit(DEVICE_IFACE_OPENED, &pAdapter->event_flags);
- if(test_bit(NET_DEVICE_REGISTERED, &pAdapter->event_flags)) {
- if( rtnl_held )
- {
+ if (test_bit(NET_DEVICE_REGISTERED, &pAdapter->event_flags)) {
+ if (rtnl_held) {
unregister_netdevice(pWlanDev);
- }
- else
- {
+ } else {
unregister_netdev(pWlanDev);
}
- // note that the pAdapter is no longer valid at this point
- // since the memory has been reclaimed
+ /* Note that the pAdapter is no longer valid at this point
+ since the memory has been reclaimed */
}
}
@@ -12937,7 +12916,8 @@ void wlan_hdd_decr_active_session(hdd_context_t *pHddCtx, tVOS_CON_MODE mode)
case VOS_P2P_CLIENT_MODE:
case VOS_P2P_GO_MODE:
case VOS_STA_SAP_MODE:
- pHddCtx->no_of_active_sessions[mode]--;
+ if (pHddCtx->no_of_active_sessions[mode])
+ pHddCtx->no_of_active_sessions[mode]--;
break;
default:
break;
diff --git a/CORE/HDD/src/wlan_hdd_tdls.c b/CORE/HDD/src/wlan_hdd_tdls.c
index 6d2551035c66..7560d63cee89 100644
--- a/CORE/HDD/src/wlan_hdd_tdls.c
+++ b/CORE/HDD/src/wlan_hdd_tdls.c
@@ -2530,27 +2530,18 @@ void wlan_hdd_tdls_timer_restart(hdd_adapter_t *pAdapter,
{
hdd_station_ctx_t *pHddStaCtx = WLAN_HDD_GET_STATION_CTX_PTR(pAdapter);
- if (NULL == pHddStaCtx)
- {
- VOS_TRACE(VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_ERROR,
- FL("pHddStaCtx is NULL"));
- return;
- }
-
/* Check whether driver load unload is in progress */
- if(vos_is_load_unload_in_progress( VOS_MODULE_ID_VOSS, NULL))
- {
- VOS_TRACE(VOS_MODULE_ID_VOSS, VOS_TRACE_LEVEL_ERROR,
- "%s: Driver load/unload is in progress.", __func__);
+ if (vos_is_load_unload_in_progress(VOS_MODULE_ID_VOSS, NULL)) {
+ hddLog(LOGE, FL("Driver load/unload is in progress."));
return;
}
- if (hdd_connIsConnected(pHddStaCtx))
- {
+ if (hdd_connIsConnected(pHddStaCtx)) {
vos_timer_stop(timer);
vos_timer_start(timer, expirationTime);
}
}
+
void wlan_hdd_tdls_indicate_teardown(hdd_adapter_t *pAdapter,
hddTdlsPeer_t *curr_peer,
tANI_U16 reason)
diff --git a/CORE/HDD/src/wlan_hdd_wext.c b/CORE/HDD/src/wlan_hdd_wext.c
index e8972182c8b0..ab4810e0e811 100644
--- a/CORE/HDD/src/wlan_hdd_wext.c
+++ b/CORE/HDD/src/wlan_hdd_wext.c
@@ -247,7 +247,7 @@ static const hdd_freq_chan_map_t freq_chan_map[] = { {2412, 1}, {2417, 2},
#define WLAN_PRIV_SET_NONE_GET_INT (SIOCIWFIRSTPRIV + 1)
#define WE_GET_11D_STATE 1
#define WE_IBSS_STATUS 2
-#define WE_PMC_STATE 3
+
#define WE_GET_WLAN_DBG 4
#define WE_GET_MAX_ASSOC 6
#define WE_GET_WDI_DBG 7
@@ -1069,11 +1069,6 @@ VOS_STATUS wlan_hdd_get_snr(hdd_adapter_t *pAdapter, v_S7_t *snr)
}
pHddStaCtx = WLAN_HDD_GET_STATION_CTX_PTR(pAdapter);
- if (NULL == pHddStaCtx)
- {
- hddLog(VOS_TRACE_LEVEL_ERROR, FL("HDD STA context is not valid"));
- return VOS_STATUS_E_FAULT;
- }
init_completion(&context.completion);
context.pAdapter = pAdapter;
@@ -1297,18 +1292,12 @@ void hdd_StatisticsCB( void *pStats, void *pContext )
vos_mem_copy( &pStatsCache->perStaStats, pPerStaStats, sizeof( pStatsCache->perStaStats ) );
}
- if(pAdapter)
- {
+ if (pAdapter) {
pWextState = WLAN_HDD_GET_WEXT_STATE_PTR(pAdapter);
- if(pWextState)
- {
- vos_status = vos_event_set(&pWextState->vosevent);
- if (!VOS_IS_STATUS_SUCCESS(vos_status))
- {
- VOS_TRACE(VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_ERROR,
- "%s: vos_event_set failed", __func__);
- return;
- }
+ vos_status = vos_event_set(&pWextState->vosevent);
+ if (!VOS_IS_STATUS_SUCCESS(vos_status)) {
+ hddLog(LOGE, FL("vos_event_set failed"));
+ return;
}
}
}
@@ -1546,12 +1535,6 @@ static int iw_set_mode(struct net_device *dev,
}
pWextState = WLAN_HDD_GET_WEXT_STATE_PTR(pAdapter);
- if (pWextState == NULL)
- {
- hddLog(LOGE, "%s ERROR: Data Storage Corruption", __func__);
- return -EINVAL;
- }
-
wdev = dev->ieee80211_ptr;
pRoamProfile = &pWextState->roamProfile;
LastBSSType = pRoamProfile->BSSType;
@@ -1614,16 +1597,14 @@ static int iw_set_mode(struct net_device *dev,
}
-static int iw_get_mode(struct net_device *dev,
- struct iw_request_info *info,
- union iwreq_data *wrqu,
- char *extra)
+static int
+iw_get_mode(struct net_device *dev, struct iw_request_info *info,
+ union iwreq_data *wrqu, char *extra)
{
-
hdd_wext_state_t *pWextState;
hdd_adapter_t *pAdapter = WLAN_HDD_GET_PRIV_PTR(dev);
- hddLog(LOG1, "In %s", __func__);
+ ENTER();
if ((WLAN_HDD_GET_CTX(pAdapter))->isLogpInProgress) {
VOS_TRACE(VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_FATAL,
@@ -1632,32 +1613,25 @@ static int iw_get_mode(struct net_device *dev,
}
pWextState = WLAN_HDD_GET_WEXT_STATE_PTR(pAdapter);
- if (pWextState == NULL)
- {
- hddLog(LOGE, "%s ERROR: Data Storage Corruption", __func__);
- return -EINVAL;
- }
- switch (pWextState->roamProfile.BSSType)
- {
+ switch (pWextState->roamProfile.BSSType) {
case eCSR_BSS_TYPE_INFRASTRUCTURE:
- hddLog(LOG1, "%s returns IW_MODE_INFRA", __func__);
+ hddLog(LOG1, FL("returns IW_MODE_INFRA"));
wrqu->mode = IW_MODE_INFRA;
break;
case eCSR_BSS_TYPE_IBSS:
case eCSR_BSS_TYPE_START_IBSS:
- hddLog(LOG1, "%s returns IW_MODE_ADHOC", __func__);
+ hddLog(LOG1, FL("returns IW_MODE_ADHOC"));
wrqu->mode = IW_MODE_ADHOC;
break;
case eCSR_BSS_TYPE_ANY:
- hddLog(LOG1, "%s returns IW_MODE_AUTO", __func__);
- wrqu->mode = IW_MODE_AUTO;
- break;
default:
- hddLog(LOG1, "%s returns APMODE_UNKNOWN", __func__);
+ hddLog(LOG1, FL("returns IW_MODE_AUTO"));
+ wrqu->mode = IW_MODE_AUTO;
break;
}
+ EXIT();
return 0;
}
@@ -6059,12 +6033,6 @@ static int iw_setnone_getint(struct net_device *dev, struct iw_request_info *inf
VOS_TRACE(VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_INFO, "****Return IBSS Status*****");
break;
- case WE_PMC_STATE:
- {
- *value = pmcGetPmcState(hHal);
- VOS_TRACE(VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_INFO, ("PMC state=%d!!"),*value);
- break;
- }
case WE_GET_WLAN_DBG:
{
vos_trace_display();
@@ -6656,9 +6624,7 @@ static int iw_get_char_setnone(struct net_device *dev, struct iw_request_info *i
case WE_GET_STATS:
{
- hdd_context_t *pHddCtx = WLAN_HDD_GET_CTX(pAdapter);
hdd_tx_rx_stats_t *pStats = &pAdapter->hdd_stats.hddTxRxStats;
- hdd_chip_reset_stats_t *pResetStats = &pHddCtx->hddChipResetStats;
snprintf(extra, WE_MAX_STR_LEN,
"\nTransmit"
@@ -6676,8 +6642,6 @@ static int iw_get_char_setnone(struct net_device *dev, struct iw_request_info *i
"\n flushed BK %u, BE %u, VI %u, VO %u"
"\n\nReceive"
"\nchains %u, packets %u, dropped %u, delivered %u, refused %u"
- "\n\nResetsStats"
- "\n TotalLogp %u Cmd53 %u MutexRead %u MIF-Error %u FW-Heartbeat %u Others %u"
"\n",
pStats->txXmitCalled,
pStats->txXmitDropped,
@@ -6744,14 +6708,7 @@ static int iw_get_char_setnone(struct net_device *dev, struct iw_request_info *i
pStats->rxPackets,
pStats->rxDropped,
pStats->rxDelivered,
- pStats->rxRefused,
-
- pResetStats->totalLogpResets,
- pResetStats->totalCMD53Failures,
- pResetStats->totalMutexReadFailures,
- pResetStats->totalMIFErrorFailures,
- pResetStats->totalFWHearbeatFailures,
- pResetStats->totalUnknownExceptions
+ pStats->rxRefused
);
wrqu->data.length = strlen(extra)+1;
break;
@@ -6828,14 +6785,7 @@ static int iw_get_char_setnone(struct net_device *dev, struct iw_request_info *i
len += buf;
break;
}
- pHddStaCtx = WLAN_HDD_GET_STATION_CTX_PTR( useAdapter );
- if( !pHddStaCtx )
- {
- buf = scnprintf(extra + len, WE_MAX_STR_LEN - len,
- "\n pHddStaCtx is NULL");
- len += buf;
- break;
- }
+ pHddStaCtx = WLAN_HDD_GET_STATION_CTX_PTR(useAdapter);
tlState = smeGetTLSTAState(hHal, pHddStaCtx->conn_info.staId[0]);
@@ -10078,11 +10028,6 @@ static const struct iw_priv_args we_private_args[] = {
IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 1,
"getAdhocStatus" },
- { WE_PMC_STATE,
- 0,
- IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 1,
- "pmcState" },
-
{ WE_GET_WLAN_DBG,
0,
IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 1,
diff --git a/CORE/MAC/inc/aniGlobal.h b/CORE/MAC/inc/aniGlobal.h
index aa1bd5f41cf5..70eda75d5919 100644
--- a/CORE/MAC/inc/aniGlobal.h
+++ b/CORE/MAC/inc/aniGlobal.h
@@ -186,7 +186,6 @@ typedef struct sLimTimers
TX_TIMER gLimBackgroundScanTimer;
TX_TIMER gLimPreAuthClnupTimer;
- //TX_TIMER gLimAuthResponseTimer[HAL_NUM_STA];
// Association related timers
TX_TIMER gLimAssocFailureTimer;
@@ -418,18 +417,9 @@ typedef struct sAniSirLim
void* gpLimMlmSetKeysReq;
void* gpLimMlmRemoveKeyReq;
- //On STA: staid for self generated by HAL and sent as response to 'ADD STA' msg.
- //On AP: staid corresponding to BSS generated by HAL and sent as response to 'ADD BSS' msg.
- // tANI_U16 gLimStaid; // TO SUPPORT BT-AMP
-
////////////////////////////////////////// BSS RELATED END ///////////////////////////////////////////
////////////////////////////////////////// IBSS RELATED START ///////////////////////////////////////////
- // This indicates whether we've a partner
- // that is also transmitting Beacon frame
- // in IBSS
- //tANI_U8 gLimIbssActive; oct1 review
-
//This indicates whether this STA coalesced and adapter to peer's capabilities or not.
tANI_U8 gLimIbssCoalescingHappened;
@@ -456,9 +446,6 @@ typedef struct sAniSirLim
tANI_U16 gLimNumOfAniSTAs; // count of ANI peers
tANI_U16 gLimAssocStaLimit;
- /// This indicates number of RXed Beacons during HB period
- // tANI_U8 gLimRxedBeaconCntDuringHB;
-
// Heart-Beat interval value
tANI_U32 gLimHeartBeatCount;
@@ -671,9 +658,6 @@ typedef struct sAniSirLim
tANI_U8 gLimTDLSUapsdMask;
tANI_U8 gLimTDLSOffChannelEnabled;
#endif
-
-
-
////////////////////////////////////////// MISC RELATED END ///////////////////////////////////////////
////////////////////////////////////////// ASSOC RELATED START ///////////////////////////////////////////
@@ -692,10 +676,6 @@ typedef struct sAniSirLim
// being handled
tLimMlmAuthReq *gpLimMlmAuthReq;
- // Place holder for Join request that we're
- // currently attempting
- //tLimMlmJoinReq *gpLimMlmJoinReq;
-
// Reason code to determine the channel change context while sending
// WDA_CHNL_SWITCH_REQ message to HAL
tANI_U32 channelChangeReasonCode;
@@ -1045,7 +1025,6 @@ typedef struct sMacOpenParameters
typedef struct sHalMacStartParameters
{
// parametes for the Firmware
- //tHalFirmwareParameters FW;
tDriverType driverType;
} tHalMacStartParameters;
diff --git a/CORE/MAC/inc/qwlan_version.h b/CORE/MAC/inc/qwlan_version.h
index 2c43c23702f3..3aef267db70f 100644
--- a/CORE/MAC/inc/qwlan_version.h
+++ b/CORE/MAC/inc/qwlan_version.h
@@ -42,9 +42,9 @@ BRIEF DESCRIPTION:
#define QWLAN_VERSION_MINOR 0
#define QWLAN_VERSION_PATCH 0
#define QWLAN_VERSION_EXTRA ""
-#define QWLAN_VERSION_BUILD 160
+#define QWLAN_VERSION_BUILD 161
-#define QWLAN_VERSIONSTR "1.0.0.160"
+#define QWLAN_VERSIONSTR "1.0.0.161"
#ifdef QCA_WIFI_2_0
diff --git a/CORE/MAC/inc/sirApi.h b/CORE/MAC/inc/sirApi.h
index 89271984f731..b3de29820154 100644
--- a/CORE/MAC/inc/sirApi.h
+++ b/CORE/MAC/inc/sirApi.h
@@ -2415,16 +2415,6 @@ typedef struct sAniSummaryStatsInfo
tANI_U32 tx_byte_cnt; //The sum of the transmit-directed byte count, transmit-multicast byte count
//and transmit-broadcast byte count. HAL will sum TPE UC/MC/BCAST global counters
//to provide this.
-#if 0
- //providing the following stats, in case of wrap around for tx_byte_cnt
- tANI_U32 tx_unicast_lower_byte_cnt;
- tANI_U32 tx_unicast_upper_byte_cnt;
- tANI_U32 tx_multicast_lower_byte_cnt;
- tANI_U32 tx_multicast_upper_byte_cnt;
- tANI_U32 tx_broadcast_lower_byte_cnt;
- tANI_U32 tx_broadcast_upper_byte_cnt;
-#endif
-
}tAniSummaryStatsInfo, *tpAniSummaryStatsInfo;
typedef enum eTxRateInfo
diff --git a/CORE/MAC/inc/sirMacProtDef.h b/CORE/MAC/inc/sirMacProtDef.h
index 25db3b3e3730..b38fa656f6da 100644
--- a/CORE/MAC/inc/sirMacProtDef.h
+++ b/CORE/MAC/inc/sirMacProtDef.h
@@ -1295,7 +1295,6 @@ typedef __ani_attr_pre_packed struct sSirMacEdcaParamSetIE
tSirMacEdcaParamRecord acvo; // voice
} __ani_attr_packed tSirMacEdcaParamSetIE;
-#if 1
typedef __ani_attr_pre_packed struct sSirMacQoSParams
{
tANI_U8 count;
@@ -1303,7 +1302,6 @@ typedef __ani_attr_pre_packed struct sSirMacQoSParams
tANI_U8 CWmin[8];
tANI_U8 AIFS[8];
} __ani_attr_packed tSirMacQoSParams;
-#endif
typedef __ani_attr_pre_packed struct sSirMacQbssLoadIE
{
@@ -1959,57 +1957,6 @@ typedef __ani_attr_pre_packed struct _BARFrmStruct {
}__ani_attr_packed BARFrmType;
-#if 0
-// Typedef for HT Capability IE
-// Typedef for HT Capability Info Field
-#define SUPPORT_ADVANCE_CODING_1 1
-#define NOT_SUPPORT_ADVANCE_CODING_0 0
-#define SUPPORT_CHANNEL_WIDTH_SET_20_40_MHZ 1
-#define NOT_SUPPORT_CHANNEL_WIDTH_SET_20_MHZ_ONLY 0
-#define DO_NOT_SEND_MIMO_SEQ_STATIC_POWER_SAVE 0
-#define RTS_PRECEDE_MIMO_SEQ_DYN_POWER_SAVE 1
-#define MIMO_POWER_SAVE_NA 2
-#define NO_LIMIT_ON_MIMO_SEQ 3
-#define DEVICE_IS_ABLE_TO_RCVE_PPDU_WITH_GF_PREAMBLE 1
-#define DEVICE_NOT_ABLE_TO_RCVE_PPDU_WITH_GF_PREAMBLE 0
-#define SUPPORT_SHORT_GI_FOR_20_MHZ 1
-#define NOT_SUPPORT_SHORT_GI_FOR_20_MHZ 0
-#define SUPPORT_SHORT_GI_FOR_40_MHZ 1
-#define NOT_SUPPORT_SHORT_GI_FOR_40_MHZ 0
-#define TRANSMITTER_SUPPORT_STBC 1
-#define TRANSMITTER_NOT_SUPPORT_STBC 0
-#define RX_NOT_SUPPORT_STBC 0
-#define RX_SUPPORT_STBC_ONE_SPATIAL_STREAM 1
-#define RX_SUPPORT_STBC_ONE_AND_TWO_SPATIAL_STREAM 2
-#define RX_SUPPORT_STBC_ONE_TWO_THREE_SPATIAL_STREAM 3
-#define SUPPORT_DELAYED_BA 1
-#define NOT_SUPPORT_DELAYED_BA 0
-#define RECEIVER_MAX_A_MSDU_SIZE_7935 1
-#define RECEIVER_MAX_A_MSDU_SIZE_3839 0
-#define BSS_OR_DEVICE_ALLOW_USE_DSSS_CCK 1
-#define BSS_OR_DEVICE_NOT_ALLOW_USE_DSSS_CCK 0
-#define BSS_OR_DEVICE_SUPPORT_USE_PSMP 1
-#define BSS_OR_DEVICE_NOT_SUPPORT_USE_PSMP 0
-#define BSS_OR_DEVICE_SUPPORT_USE_STBC_CONTROL_FRAME 1
-#define BSS_OR_DEVICE_NOT_SUPPORT_USE_STBC_CONTROL_FRAME 0
-#define SUPPORT_L_SIG_TXOP_PROTECTION 1
-#define NOT_SUPPORT_L_SIG_TXOP_PROTECTION 0
-
-// Typedef for HT Parameters Info Field
-#define MAX_RX_AMPDU_FACTOR_0 0
-#define MAX_RX_AMPDU_FACTOR_1 1
-#define MAX_RX_AMPDU_FACTOR_2 2
-#define MAX_RX_AMPDU_FACTOR_3 3
-#define MPDU_DENSITY_NO_RESTRICTION 0
-#define MPDU_DENSITY_ONE_EIGHTH_USECOND 1
-#define MPDU_DENSITY_ONE_FOURTH_USECOND 2
-#define MPDU_DENSITY_ONE_HALF_USECOND 3
-#define MPDU_DENSITY_ONE_USECOND 4
-#define MPDU_DENSITY_TWO_USECOND 5
-#define MPDU_DENSITY_FOUR_USECOND 6
-#define MPDU_DENSITY_EIGHT_USECOND 7
-#endif
-
// Supported MCS set
#define SIZE_OF_SUPPORTED_MCS_SET 16
#define SIZE_OF_BASIC_MCS_SET 16
@@ -2018,116 +1965,6 @@ typedef __ani_attr_pre_packed struct _BARFrmStruct {
// This is not clear, Count 8 based from NV supported MCS count
#define VALID_MAX_MCS_INDEX 8
-#if 0
-// Typedef Extended HT Capability Info Field
-#define SUPPORT_PCO 1
-#define NOT_SUPPORT_PCO 0
-#define TRANSITION_TIME_0 0
-#define STA_DOES_NOT_PROVIDE_MCS_FEEDBACK 0
-#define RESERVE_VALUE_FOR_STA_MCS_FEEDBACK 1
-#define STA_PROVIDE_UNSOLICITED_MCS_FEEDBACK 2
-#define STA_PROVIDE_ON_MRQ_AND_UNSOLICITED_MCS_FEEDBACK 3
-
-// Typedef Transmit Beamforming Capability
-#define TX_BEAMFORMING_CAPABLE 1
-#define TX_BEAMFORMING_INCAPABLE 0
-#define CAPABLE_RECEIVE_STAGGERED_SOUNDING 1
-#define NOT_CAPABLE_RECEIVE_STAGGERED_SOUNDING 0
-#define CAPABLE_TRANSMIT_STAGGERED_SOUNDING 1
-#define NOT_CAPABLE_TRANSMIT_STAGGERED_SOUNDING 0
-#define CAPABLE_RECEIVE_ZLF 1
-#define NOT_CAPABLE_RECEIVE_ZLF 0
-#define CAPABLE_TRANSMIT_ZLF 1
-#define NOT_CAPABLE_TRANSMIT_ZLF 0
-#define CAPABLE_IMPLICIT_TXBF 1
-#define NOT_CAPABLE_IMPLICIT_TXBF 0
-#define INCAPABLE_CALIBRATION 0
-#define LIMITED_CALIBRATION_CANNOT_INITIATE 1
-#define LIMITED_CALIBRATION_CAN_INITIATE 2
-#define FULLT_CAPABLE_CALIBRATION 3
-#define CAPABLE_EXPLICIT_CSI_TXBF 1
-#define INCAPABLE_EXPLICIT_CSI_TXBF 0
-#define CAPABLE_EXPLICIT_UNCOMPRESSED_STEERING_MATRIX 1
-#define INCAPABLE_EXPLICIT_UNCOMPRESSED_STEERING_MATRIX 0
-#define INCAPABLE_EXPLICIT_BFCI_FEEDBACK 0
-#define CAPABLE_UNSOLICITED_BFCI_FEEDBACK 1
-#define CAPABLE_IMMEDIATE_BFCI_FEEDBACK 2
-#define CAPABLE_AGGREGATE_BFCI_FEEDBACK 4
-#define INCAPABLE_EXPLICIT_UNCOMPRESSED_STEERING_MATRIX_FEEDBAC 0
-#define CAPABLE_UNSOLICITED_UNCOMPRESSED_STEERING_MATRIX 1
-#define CAPABLE_IMMEDIATE_UNCOMPRESSED_STEERING_MATRIX 2
-#define CAPABLE_AGGREGATED_UNCOMPRESSED_STEERING_MATRIX 4
-#define INCAPABLE_EXPLICIT_COMPRESSED_STEERING_MATRIX_FEEDBAC 0
-#define CAPABLE_UNSOLICITED_COMPRESSED_STEERING_MATRIX 1
-#define CAPABLE_IMMEDIATE_COMPRESSED_STEERING_MATRIX 2
-#define CAPABLE_AGGREGATED_COMPRESSED_STEERING_MATRIX 4
-#define SUPPORT_CSI_BEAMFORMING_SINGLE_TX_ANTENNA_SOUNDING 0
-#define SUPPORT_CSI_BEAMFORMING_2_TX_ANTENNA_SOUNDING 1
-#define SUPPORT_CSI_BEAMFORMING_3_TX_ANTENNA_SOUNDING 2
-#define SUPPORT_CSI_BEAMFORMING_4_TX_ANTENNA_SOUNDING 3
-#define SUPPORT_UNCOMPRESSED_STEERING_MATRIX_1_TX_ANTENNA_SOUNDING 0
-#define SUPPORT_UNCOMPRESSED_STEERING_MATRIX_2_TX_ANTENNA_SOUNDING 1
-#define SUPPORT_UNCOMPRESSED_STEERING_MATRIX_3_TX_ANTENNA_SOUNDING 2
-#define SUPPORT_UNCOMPRESSED_STEERING_MATRIX_4_TX_ANTENNA_SOUNDING 3
-#define SUPPORT_COMPRESSED_STEERING_MATRIX_1_TX_ANTENNA_SOUNDING 0
-#define SUPPORT_COMPRESSED_STEERING_MATRIX_2_TX_ANTENNA_SOUNDING 1
-#define SUPPORT_COMPRESSED_STEERING_MATRIX_3_TX_ANTENNA_SOUNDING 2
-#define SUPPORT_COMPRESSED_STEERING_MATRIX_4_TX_ANTENNA_SOUNDING 3
-
-// Typedef Antenna Selection Capability
-#define CAPABLE_ANTENNA_SELECTION 1
-#define INCAPABLE_ANTENNA_SELECTION 0
-#define CAPABLE_EXPLICIT_CSI_FEEDBACK_BASED_TX_AS 1
-#define INCAPABLE_EXPLICIT_CSI_FEEDBACK_BASED_TX_AS 0
-#define CAPABLE_ANTENNA_INDICES_FEEDBACK_BASED_TX_AS 1
-#define INCAPABLE_ANTENNA_INDICES_FEEDBACK_BASED_TX_AS 0
-#define CAPABLE_EXPLICIT_CSI_FEEDBACK 1
-#define INCAPABLE_EXPLICIT_CSI_FEEDBACK 0
-#define CAPABLE_ANTENNA_INDICES_FEEDBACK_BASED_TX_AS 1
-#define INCAPABLE_ANTENNA_INDICES_FEEDBACK_BASED_TX_AS 0
-#define CAPABLE_RX_AS 1
-#define INCAPABLE_RX_AS 0
-#define CAPABLE_TRANSMIT_SOUNDING_PPDU 1
-#define INCAPABLE_TRANSMIT_SOUNDING_PPDU 0
-
-// Typedef Additional HT Infomation Elements
-#define CONTROL_CHANNEL_1 1
-
-#define OFFSET_NO_EXTENSION_CHANNEL_IS_PRESENT 0
-#define OFFSET_EXTENSION_CHANNEL_ABOVE_CONTROL_CHANNEL 1
-#define OFFSET_EXTENSION_CHANNEL_BELOW_CONTROL_CHANNEL 3
-#define USE_20_MHZ_CONTROL_CHANNEL 0
-#define USE_ANY_SUPPORTED_CHANNEL_WIDTH 1
-#define USE_RIFS_MODE_PROHIBITED 0
-#define USE_RIFS_MODE_PERMITTED 1
-#define CONTROLLED_ACCESS_NOT_ONLY_PSMP 0
-#define CONTROLLED_ACCESS_ONLY_PSMP 1
-#define SERVICE_INTERVAL_GRANULARITY_5MS 0
-#define SERVICE_INTERVAL_GRANULARITY_10MS 1
-#define SERVICE_INTERVAL_GRANULARITY_15MS 2
-#define SERVICE_INTERVAL_GRANULARITY_20MS 3
-#define SERVICE_INTERVAL_GRANULARITY_25MS 4
-#define SERVICE_INTERVAL_GRANULARITY_30MS 5
-#define SERVICE_INTERVAL_GRANULARITY_35MS 6
-#define SERVICE_INTERVAL_GRANULARITY_40MS 7
-
-#define OPERATION_MODE_PURE_NO_PROTECTION 0
-#define OPERATION_MODE_OPTIONAL_PROTECTION 1
-#define OPERATION_MODE_NO_LEGACY_STA_40MHZ_PROTECTED 2
-#define OPERATION_MODE_MIXED_PROTECTION 3
-
-#define DUAL_CTS_PROTECTION_IS_USED 1
-#define REGULAR_RTS_CTS_IS_USED 0
-#define SECONDARY_BEACON 1
-#define PRIMARY_BEACON 0
-#define LSIG_TXOP_PROTECTION_FULL_SUPPORT 1
-#define LSIG_TXOP_PROTECTION_NOT_FULL_SUPPORT 0
-#define PCO_IS_ACTIVATED_IN_BSS 1
-#define PCO_IS_NOT_ACTIVATED_IN_BSS 0
-#define PCO_PHASE_REQUEST_SWITCH_KEEP_TO_20MHZ 0
-#define PCO_PHASE_REQUEST_SWITCH_KEEP_TO_40MHZ 1
-#endif
-
//
// The following enums will be used to get the "current" HT Capabilities of
// the local STA in a generic fashion. In other words, the following enums
diff --git a/CORE/MAC/src/cfg/cfgProcMsg.c b/CORE/MAC/src/cfg/cfgProcMsg.c
index 5058a6c536b0..09d0080af722 100644
--- a/CORE/MAC/src/cfg/cfgProcMsg.c
+++ b/CORE/MAC/src/cfg/cfgProcMsg.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2011-2013 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2011-2014 The Linux Foundation. All rights reserved.
*
* Previously licensed under the ISC license by Qualcomm Atheros, Inc.
*
@@ -469,8 +469,6 @@ ProcSetReqInternal(tpAniSirGlobal pMac, tANI_U16 length, tANI_U32 *pParam, tANI_
tANI_U32 value, result;
PELOG1(cfgLog(pMac, LOGl, FL("Rcvd cfg set request %d bytes"), length);)
- //for (i=0; i<length/4; i++)
- // PELOG2(cfgLog(pMac, LOG2, FL("[%2d] 0x%08x"), i, pParam[i]);)
if (!pMac->cfg.gCfgStatus)
{
diff --git a/CORE/MAC/src/pe/include/limApi.h b/CORE/MAC/src/pe/include/limApi.h
index e81175ab3b3e..be415a16ef7f 100644
--- a/CORE/MAC/src/pe/include/limApi.h
+++ b/CORE/MAC/src/pe/include/limApi.h
@@ -179,9 +179,6 @@ extern void limPostStartLearnModeMsgToSch(tpAniSirGlobal pMac);
extern ePhyChanBondState limGet11ACPhyCBState(tpAniSirGlobal pMac, tANI_U8 channel, tANI_U8 htSecondaryChannelOffset, tANI_U8 CenterChan,tpPESession );
#endif
tANI_U8 limIsSystemInActiveState(tpAniSirGlobal pMac);
-#if 0 /* Currently, this function is not used but keep it around for when we do need it */
-tSirRetStatus limUpdateGlobalChannelBonding(tpAniSirGlobal pMac, tHalBitVal cbBit);
-#endif /* 0 */
void limHandleLowRssiInd(tpAniSirGlobal pMac);
void limHandleMissedBeaconInd(tpAniSirGlobal pMac, tpSirMsgQ pMsg);
diff --git a/CORE/MAC/src/pe/include/rrmGlobal.h b/CORE/MAC/src/pe/include/rrmGlobal.h
index e774964078eb..a1d9a666338b 100644
--- a/CORE/MAC/src/pe/include/rrmGlobal.h
+++ b/CORE/MAC/src/pe/include/rrmGlobal.h
@@ -211,7 +211,6 @@ typedef struct sRRMCaps
typedef struct sRrmPEContext
{
tANI_U8 rrmEnable;
- //tChannelList APchannelReport;
tANI_U32 startTSF[2]; //Used during scan/measurement to store the start TSF. this is not used directly in beacon reports.
//This value is stored into bssdescription and beacon report gets it from bss decsription.
tRRMCaps rrmEnabledCaps;
diff --git a/CORE/MAC/src/pe/include/schGlobal.h b/CORE/MAC/src/pe/include/schGlobal.h
index 956bdba5205a..1142e951190f 100644
--- a/CORE/MAC/src/pe/include/schGlobal.h
+++ b/CORE/MAC/src/pe/include/schGlobal.h
@@ -164,16 +164,10 @@ typedef struct sAniSirSch
tANI_U32 gSchBcnParseErrorCnt;
tANI_U32 gSchBcnIgnored;
- // tTmpInstBuffer TIB;
- // tANI_U16 gSchQuantum[8];
-
tANI_U32 numPoll, numData, numCorrupt;
tANI_U32 numBogusInt, numTxAct0;
#define SCH_MAX_NUM_SCH 21
- // tANI_U32 numSchHist[SCH_MAX_NUM_SCH];
- // tANI_U32 defaultTxop;
-
tANI_U32 lastBeaconLength;
tANI_U16 rrTimeout;
tANI_U32 pollPeriod;
diff --git a/CORE/MAC/src/pe/lim/limAIDmgmt.c b/CORE/MAC/src/pe/lim/limAIDmgmt.c
index 6a1f1b441159..25600cb1dce8 100644
--- a/CORE/MAC/src/pe/lim/limAIDmgmt.c
+++ b/CORE/MAC/src/pe/lim/limAIDmgmt.c
@@ -155,7 +155,6 @@ limAssignPeerIdx(tpAniSirGlobal pMac, tpPESession pSessionEntry)
if (pSessionEntry->freePeerIdxHead==0)
pSessionEntry->freePeerIdxTail=0;
pSessionEntry->gLimNumOfCurrentSTAs++;
- //PELOG2(limLog(pMac, LOG2,FL("Assign aid %d, numSta %d, head %d tail %d "),aid,pSessionEntry->gLimNumOfCurrentSTAs,pSessionEntry->freeAidHead,pSessionEntry->freeAidTail);)
return peerId;
}
@@ -200,6 +199,4 @@ limReleasePeerIdx(tpAniSirGlobal pMac, tANI_U16 peerIdx, tpPESession pSessionEnt
pSessionEntry->freePeerIdxTail=pSessionEntry->freePeerIdxHead=(tANI_U8)peerIdx;
}
pSessionEntry->gpLimPeerIdxpool[(tANI_U8)peerIdx]=0;
- //PELOG2(limLog(pMac, LOG2,FL("Release aid %d, numSta %d, head %d tail %d "),aid,pMac->lim.gLimNumOfCurrentSTAs,pMac->lim.freeAidHead,pMac->lim.freeAidTail);)
-
}
diff --git a/CORE/MAC/src/pe/lim/limAdmitControl.c b/CORE/MAC/src/pe/lim/limAdmitControl.c
index dbfce8dbfe66..40cd78311cec 100644
--- a/CORE/MAC/src/pe/lim/limAdmitControl.c
+++ b/CORE/MAC/src/pe/lim/limAdmitControl.c
@@ -78,10 +78,6 @@
static tSirRetStatus
limCalculateSvcInt(tpAniSirGlobal, tSirMacTspecIE *, tANI_U32 *);
-#if 0 //only EDCA is supported now
-static tSirRetStatus
-limValidateTspecHcca(tpAniSirGlobal, tSirMacTspecIE *);
-#endif
static tSirRetStatus
limValidateTspecEdca(tpAniSirGlobal, tSirMacTspecIE *, tpPESession);
static tSirRetStatus
@@ -154,132 +150,6 @@ limCalculateSvcInt(
return eSIR_FAILURE;
}
-#if 0 //only EDCA is supported now
-/** -------------------------------------------------------------
-\fn limValidateTspecHcca
-\brief validate the parameters in the hcca tspec
- mandatory fields are derived from 11e Annex I (Table I.1)
-\param tpAniSirGlobal pMac
-\param tSirMacTspecIE *pTspec
-\return eSirRetStatus - status
- -------------------------------------------------------------*/
-static tSirRetStatus
-limValidateTspecHcca(
- tpAniSirGlobal pMac,
- tSirMacTspecIE *pTspec)
-{
- tANI_U32 maxPhyRate, minPhyRate;
- tANI_U32 phyMode;
-
- tSirRetStatus retval = eSIR_SUCCESS;
- /* make sure a TSID is being requested */
- if (pTspec->tsinfo.traffic.tsid < SIR_MAC_HCCA_TSID_MIN)
- {
- limLog(pMac, LOGW, FL("tsid %d must be >%d)"),
- pTspec->tsinfo.traffic.tsid, SIR_MAC_HCCA_TSID_MIN);
- retval = eSIR_FAILURE;
- }
- /*
- * With Polaris, there is a limitation in that the tsid cannot be arbitary
- * but is based on the qid. Thus, we cannot have a tspec which requests
- * a tsid of 13 and userPrio of 7, the bottom three bits of the tsid must
- * correspond to the userPrio
- */
- if (pTspec->tsinfo.traffic.userPrio !=
- (pTspec->tsinfo.traffic.tsid - SIR_MAC_HCCA_TSID_MIN))
- {
- limLog(pMac, LOGE, FL("TSid=0x%x, userPrio=%d: is not allowed"),
- pTspec->tsinfo.traffic.tsid, pTspec->tsinfo.traffic.userPrio);
- retval = eSIR_FAILURE;
- }
- // an inactivity interval is mandatory
- if (pTspec->inactInterval == 0)
- {
- PELOGW(limLog(pMac, LOGW, FL("inactInterval unspecified!"));)
- retval = eSIR_FAILURE;
- }
- // surplus BW must be specified if a delay Bound is specified
- if ((pTspec->delayBound != 0) && (pTspec->surplusBw == 0))
- {
- limLog(pMac, LOGW, FL("delayBound %d, but surplusBw unspecified!"),
- pTspec->delayBound);
- retval = eSIR_FAILURE;
- }
- // minPhyRate must always be specified and cannot exceed maximum supported
- limGetPhyMode(pMac, &phyMode);
- //limGetAvailableBw(pMac, &maxPhyRate, &minPhyRate, pMac->dph.gDphPhyMode,
- // 1 /* bandwidth mult factor */);
- limGetAvailableBw(pMac, &maxPhyRate, &minPhyRate, phyMode,
- 1 /* bandwidth mult factor */);
- if ((pTspec->minPhyRate == 0)
- || (pTspec->minPhyRate > maxPhyRate)
- || (pTspec->minPhyRate < minPhyRate))
- {
- limLog(pMac, LOGW, FL("minPhyRate (%d) invalid"),
- pTspec->minPhyRate);
- retval = eSIR_FAILURE;
- }
- /* NOTE: we will require all Tspec's to specify a mean data rate (and so
- * also the min and peak data rates)
- */
- if ((pTspec->minDataRate == 0) ||
- (pTspec->meanDataRate == 0) ||
- (pTspec->peakDataRate == 0))
- {
- limLog(pMac, LOGW, FL("DataRate must be specified (min %d, mean %d, peak %d)"),
- pTspec->minDataRate, pTspec->meanDataRate, pTspec->peakDataRate);
- retval = eSIR_FAILURE;
- }
-
- // mean data rate can't be more than the min phy rate
- if (pTspec->meanDataRate > pTspec->minPhyRate)
- {
- limLog(pMac, LOGW, FL("Data rate (%d) is more than Phyrate %d"),
- pTspec->meanDataRate, pTspec->minPhyRate);
- return eSIR_FAILURE;
- }
-
- /* if the tspec specifies a service interval, we won't accept tspec's
- * with service interval less than our allowed minimum, also either both
- * min and max must be specified or neither should be specified (in which
- * case, HC determines the appropriate service interval
- */
- if ((pTspec->minSvcInterval != 0) || (pTspec->maxSvcInterval != 0))
- {
- // max < min is ridiculous
- if (pTspec->maxSvcInterval < pTspec->minSvcInterval)
- {
- limLog(pMac, LOGW, FL("maxSvcInt %d > minSvcInterval %d!!"),
- pTspec->maxSvcInterval, pTspec->minSvcInterval);
- retval = eSIR_FAILURE;
- }
- if (pTspec->maxSvcInterval < ADMIT_CONTROL_MIN_INTERVAL)
- {
- limLog(pMac, LOGW, FL("maxSvcInt %d must be >%d"),
- pTspec->maxSvcInterval, ADMIT_CONTROL_MIN_INTERVAL);
- retval = eSIR_FAILURE;
- }
- }
- else // min and max both unspecified
- {
- /* no service interval is specified, so make sure the parameters
- * needed to determine one are specified in the tspec
- * minPhyRate, meanDataRate and nomMsduSz are needed, only nomMsduSz
- * must be checked here since the other two are already validated
- */
- if (pTspec->nomMsduSz == 0)
- {
- PELOGW(limLog(pMac, LOGW, FL("No svcInt and no MsduSize specified"));)
- retval = eSIR_FAILURE;
- }
- }
-
- limLog(pMac, ADMIT_CONTROL_LOGLEVEL, FL("return status %d"), retval);
- return retval;
-}
-
-#endif //only edca is supported now.
-
/** -------------------------------------------------------------
\fn limValidateTspecEdca
\brief validate the parameters in the edca tspec
@@ -300,8 +170,6 @@ limValidateTspecEdca(
limGetPhyMode(pMac, &phyMode, psessionEntry);
- //limGetAvailableBw(pMac, &maxPhyRate, &minPhyRate, pMac->dph.gDphPhyMode,
- // 1 /* bandwidth mult factor */);
limGetAvailableBw(pMac, &maxPhyRate, &minPhyRate, phyMode,
1 /* bandwidth mult factor */);
// mandatory fields are derived from 11e Annex I (Table I.1)
@@ -343,11 +211,6 @@ limValidateTspec(
break;
case SIR_MAC_ACCESSPOLICY_HCCA:
-#if 0 //Not supported right now.
- if ((retval = limValidateTspecHcca(pMac, pTspec)) != eSIR_SUCCESS)
- PELOGW(limLog(pMac, LOGW, FL("HCCA tspec invalid"));)
- break;
-#endif
case SIR_MAC_ACCESSPOLICY_BOTH:
// TBD: should we support hybrid tspec as well?? for now, just fall through
default:
@@ -476,11 +339,9 @@ limAdmitPolicyOversubscription(
// determine total bandwidth used so far
limGetPhyMode(pMac, &phyMode, psessionEntry);
- //limComputeMeanBwUsed(pMac, &usedbw, pMac->dph.gDphPhyMode, pTspecInfo);
limComputeMeanBwUsed(pMac, &usedbw, phyMode, pTspecInfo, psessionEntry);
// determine how much bandwidth is available based on the current phy mode
- //limGetAvailableBw(pMac, &totalbw, &minbw, pMac->dph.gDphPhyMode, pAdmitPolicy->bw_factor);
limGetAvailableBw(pMac, &totalbw, &minbw, phyMode, pAdmitPolicy->bw_factor);
if (usedbw > totalbw) // this can't possibly happen
@@ -557,13 +418,6 @@ void limTspecDelete(tpAniSirGlobal pMac, tpLimTspecInfo pInfo)
limLog(pMac, ADMIT_CONTROL_LOGLEVEL, FL("delete tspec %p"), pInfo);
pInfo->inuse = 0;
- // clear the hcca/parameterized queue indicator
-#if 0
- if ((pInfo->tspec.tsinfo.traffic.direction == SIR_MAC_DIRECTION_UPLINK) ||
- (pInfo->tspec.tsinfo.traffic.direction == SIR_MAC_DIRECTION_BIDIR))
- queue[pInfo->staid][pInfo->tspec.tsinfo.traffic.userPrio][SCH_UL_QUEUE].ts = 0;
-#endif
-
return;
}
@@ -774,11 +628,6 @@ tSirRetStatus limTspecAdd(
* polls where the qos control field must contain the tsid specified in the
* tspec.
*/
-#if 0
- if ((pTspec->tsinfo.traffic.direction == SIR_MAC_DIRECTION_UPLINK) ||
- (pTspec->tsinfo.traffic.direction == SIR_MAC_DIRECTION_BIDIR))
- queue[staid][pTspec->tsinfo.traffic.userPrio][SCH_UL_QUEUE].ts = 1;
-#endif
pTspecList->inuse = 1;
*ppInfo = pTspecList;
limLog(pMac, ADMIT_CONTROL_LOGLEVEL, FL("added entry for HCCA AccessPolicy"));
@@ -819,12 +668,6 @@ limValidateAccessPolicy(
case SIR_MAC_ACCESSPOLICY_HCCA:
case SIR_MAC_ACCESSPOLICY_BOTH:
-#if 0 //only EDCA supported for now.
- // TBD: check wsm doesn't support the hybrid access policy
- if (pSta->wsmEnabled || pSta->lleEnabled)
- retval = eSIR_SUCCESS;
- break;
-#endif //only EDCA supported for now.
default:
PELOGE(limLog(pMac, LOGE, FL("Invalid accessPolicy %d"), accessPolicy);)
break;
@@ -1262,7 +1105,6 @@ void limProcessHalAddTsRsp(tpAniSirGlobal pMac, tpSirMsgQ limMsg)
// 090803: Add the SME Session ID
limSendDeltsReqActionFrame(pMac, peerMacAddr, rspReqd, &pAddTsRspMsg->tspec.tsinfo, &pAddTsRspMsg->tspec,
- //psessionEntry->smeSessionId);
psessionEntry);
// Delete TSPEC
diff --git a/CORE/MAC/src/pe/lim/limApi.c b/CORE/MAC/src/pe/lim/limApi.c
index 2d5d18efc45a..d4b756349d9a 100644
--- a/CORE/MAC/src/pe/lim/limApi.c
+++ b/CORE/MAC/src/pe/lim/limApi.c
@@ -126,7 +126,6 @@ static void __limInitScanVars(tpAniSirGlobal pMac)
/* Fill in default values */
pMac->lim.gLimTriggerBackgroundScanDuringQuietBss = 0;
-
// abort scan is used to abort an on-going scan
pMac->lim.abortScan = 0;
vos_mem_set(&pMac->lim.scanChnInfo, sizeof(tLimScanChnInfo), 0);
@@ -141,7 +140,6 @@ static void __limInitScanVars(tpAniSirGlobal pMac)
static void __limInitBssVars(tpAniSirGlobal pMac)
{
-
vos_mem_set((void*)pMac->lim.gpSession,
sizeof(*pMac->lim.gpSession)*pMac->lim.maxBssId, 0);
@@ -191,8 +189,6 @@ static void __limInitStatsVars(tpAniSirGlobal pMac)
#endif
}
-
-
static void __limInitStates(tpAniSirGlobal pMac)
{
// Counts Heartbeat failures
@@ -242,8 +238,6 @@ static void __limInitStates(tpAniSirGlobal pMac)
static void __limInitVars(tpAniSirGlobal pMac)
{
-
-
// Place holder for Measurement Req/Rsp/Ind related info
// WDS info
@@ -299,7 +293,6 @@ static void __limInitVars(tpAniSirGlobal pMac)
static void __limInitAssocVars(tpAniSirGlobal pMac)
{
tANI_U32 val;
-
if(wlan_cfgGetInt(pMac, WNI_CFG_ASSOC_STA_LIMIT, &val) != eSIR_SUCCESS)
{
limLog( pMac, LOGP, FL( "cfg get assoc sta limit failed" ));
@@ -839,14 +832,6 @@ tSirRetStatus peOpen(tpAniSirGlobal pMac, tMacOpenParameters *pMacOpenParam)
return eSIR_FAILURE;
}
-#if 0
- pMac->lim.gpLimAIDpool = vos_mem_malloc(sizeof(*pMac->lim.gpLimAIDpool) * (WNI_CFG_ASSOC_STA_LIMIT_STAMAX+1));
- if (NULL == pMac->lim.gpLimAIDpool)
- {
- PELOGE(limLog(pMac, LOGE, FL("memory allocate failed!"));)
- return eSIR_FAILURE;
- }
-#endif
pMac->lim.gpSession = vos_mem_malloc(sizeof(tPESession)* pMac->lim.maxBssId);
if (NULL == pMac->lim.gpSession)
{
@@ -856,22 +841,6 @@ tSirRetStatus peOpen(tpAniSirGlobal pMac, tMacOpenParameters *pMacOpenParam)
vos_mem_set(pMac->lim.gpSession, sizeof(tPESession)*pMac->lim.maxBssId, 0);
-
- /*
- pMac->dph.dphHashTable.pHashTable = vos_mem_malloc(sizeof(tpDphHashNode)*pMac->lim.maxStation);
- if (NULL == pMac->dph.dphHashTable.pHashTable)
- {
- PELOGE(limLog(pMac, LOGE, FL("memory allocate failed!"));)
- return eSIR_FAILURE;
- }
-
- pMac->dph.dphHashTable.pDphNodeArray = vos_mem_malloc(sizeof(tDphHashNode)*pMac->lim.maxStation);
- if (NULL == pMac->dph.dphHashTable.pDphNodeArray)
- {
- PELOGE(limLog(pMac, LOGE, FL("memory allocate failed!"));)
- return eSIR_FAILURE;
- }
- */
pMac->pmm.gPmmTim.pTim = vos_mem_malloc(sizeof(tANI_U8)*pMac->lim.maxStation);
if (NULL == pMac->pmm.gPmmTim.pTim)
{
@@ -924,19 +893,9 @@ tSirRetStatus peClose(tpAniSirGlobal pMac)
}
vos_mem_free(pMac->lim.limTimers.gpLimCnfWaitTimer);
pMac->lim.limTimers.gpLimCnfWaitTimer = NULL;
-#if 0
- vos_mem_free(pMac->lim.gpLimAIDpool);
- pMac->lim.gpLimAIDpool = NULL;
-#endif
vos_mem_free(pMac->lim.gpSession);
pMac->lim.gpSession = NULL;
- /*
- vos_mem_free(pMac->dph.dphHashTable.pHashTable);
- pMac->dph.dphHashTable.pHashTable = NULL;
- vos_mem_free(pMac->dph.dphHashTable.pDphNodeArray);
- pMac->dph.dphHashTable.pDphNodeArray = NULL;
- */
vos_mem_free(pMac->pmm.gPmmTim.pTim);
pMac->pmm.gPmmTim.pTim = NULL;
if( !VOS_IS_STATUS_SUCCESS( vos_lock_destroy( &pMac->lim.lkPeGlobalLock ) ) )
@@ -1396,14 +1355,6 @@ limReceivedHBHandler(tpAniSirGlobal pMac, tANI_U8 channelId, tpPESession psessio
-#if 0
-void limResetHBPktCount(tpPESession psessionEntry)
-{
- psessionEntry->LimRxedBeaconCntDuringHB = 0;
-}
-#endif
-
-
/*
* limProcessWdsInfo()
*
@@ -1864,22 +1815,6 @@ tSirRetStatus limUpdateShortSlot(tpAniSirGlobal pMac, tpSirProbeRespBeacon pBeac
----------------------------------------------------------------- */
void limHandleLowRssiInd(tpAniSirGlobal pMac)
{
-#if 0 //RSSI related indications will now go to TL and not PE
- if ( (pMac->pmm.gPmmState == ePMM_STATE_BMPS_SLEEP) ||
- (pMac->pmm.gPmmState == ePMM_STATE_UAPSD_SLEEP)||
- (pMac->pmm.gPmmState == ePMM_STATE_WOWLAN) )
- {
- PELOG1(limLog(pMac, LOG1, FL("Sending LOW_RSSI_IND to SME "));)
- limSendSmeRsp(pMac, eWNI_SME_LOW_RSSI_IND, eSIR_SME_SUCCESS, 0, 0);
- }
- else
- {
- limLog(pMac, LOGE,
- FL("Received SIR_HAL_LOW_RSSI_IND while in incorrect state: %d"),
- pMac->pmm.gPmmState);
- }
- return;
-#endif
}
/** -----------------------------------------------------------------
@@ -2166,12 +2101,6 @@ tMgmtFrmDropReason limIsPktCandidateForDrop(tpAniSirGlobal pMac, tANI_U8 *pRxPac
framelen = WDA_GET_RX_PAYLOAD_LEN(pRxPacketInfo);
pBody = WDA_GET_RX_MPDU_DATA(pRxPacketInfo);
-#if 0
- //Allow the mgmt frames to be queued if STA not in IBSS mode.
- if (pMac->lim.gLimSystemRole != eLIM_STA_IN_IBSS_ROLE)
- return eMGMT_DROP_NO_DROP;
-#endif
-
//Drop INFRA Beacons and Probe Responses in IBSS Mode
if( (subType == SIR_MAC_MGMT_BEACON) ||
(subType == SIR_MAC_MGMT_PROBE_RSP))
diff --git a/CORE/MAC/src/pe/lim/limAssocUtils.c b/CORE/MAC/src/pe/lim/limAssocUtils.c
index 2d5533700265..c46418268129 100644
--- a/CORE/MAC/src/pe/lim/limAssocUtils.c
+++ b/CORE/MAC/src/pe/lim/limAssocUtils.c
@@ -168,15 +168,6 @@ limCompareCapabilities(tpAniSirGlobal pMac,
return false;
}
-#if 0 //See CR24696 for analysis
- // Compare privacy capability
- if (pAssocReq->capabilityInfo.privacy != pLocalCapabs->privacy)
- {
- // AP does not support privacy
- return false;
- }
-#endif
-
// Compare short preamble capability
if (pAssocReq->capabilityInfo.shortPreamble &&
(pAssocReq->capabilityInfo.shortPreamble !=
@@ -184,10 +175,6 @@ limCompareCapabilities(tpAniSirGlobal pMac,
{
// Allowing a STA requesting short preamble while
// AP does not support it
-#if 0
- // AP does not support short preamable
- return false;
-#endif
}
@@ -282,22 +269,6 @@ limCheckRxBasicRates(tpAniSirGlobal pMac, tSirMacRateSet rxRateSet,tpPESession p
return false;
}
-
- #if 0
- if (wlan_cfgGetStr(pMac, WNI_CFG_OPERATIONAL_RATE_SET,
- (tANI_U8 *) &pRateSet->rate,
- (tANI_U32 *) &cfgLen) != eSIR_SUCCESS)
- {
- /// Could not get Operational rateset from CFG. Log error.
- limLog(pMac, LOGP, FL("could not retrieve Operational rateset"));
-
- // Free up memory allocated for rateset
- vos_mem_free((tANI_U8 *) pRateSet);
-
- return false;
- }
- #endif //TO SUPPORT BT-AMP
-
/* Copy operational rate set from session Entry */
vos_mem_copy(pRateSet->rate, (psessionEntry->rateSet.rate),
psessionEntry->rateSet.numRates);
@@ -2068,22 +2039,8 @@ limPopulateMatchingRateSet(tpAniSirGlobal pMac,
isArate=0;
- // limGetPhyMode(pMac, &phyMode);
limGetPhyMode(pMac, &phyMode, psessionEntry);
- // get own rate set
- // val = WNI_CFG_OPERATIONAL_RATE_SET_LEN;
- #if 0
- if (wlan_cfgGetStr(pMac, WNI_CFG_OPERATIONAL_RATE_SET,
- (tANI_U8 *) &tempRateSet.rate,
- &val) != eSIR_SUCCESS)
- {
- /// Could not get rateset from CFG. Log error.
- limLog(pMac, LOGP, FL("could not retrieve rateset"));
- }
-
- #endif // TO SUPPORT BT-AMP
-
/* copy operational rate set from psessionEntry */
vos_mem_copy((tempRateSet.rate), (psessionEntry->rateSet.rate),
psessionEntry->rateSet.numRates);
@@ -2091,14 +2048,6 @@ limPopulateMatchingRateSet(tpAniSirGlobal pMac,
if (phyMode == WNI_CFG_PHY_MODE_11G)
{
-
- #if 0
- // get own extended rate set
- val = WNI_CFG_EXTENDED_OPERATIONAL_RATE_SET_LEN;
- if (wlan_cfgGetStr(pMac, WNI_CFG_EXTENDED_OPERATIONAL_RATE_SET,
- (tANI_U8 *) &tempRateSet2.rate,
- &val) != eSIR_SUCCESS)
- #endif
vos_mem_copy((tempRateSet2.rate), (psessionEntry->extRateSet.rate),
psessionEntry->extRateSet.numRates);
tempRateSet2.numRates = (tANI_U8) psessionEntry->extRateSet.numRates;
@@ -2337,12 +2286,6 @@ limAddSta(
tLimIbssPeerNode *pPeerNode; /* for IBSS mode */
tDot11fIEVHTCaps vht_caps; /* for IBSS mode */
tANI_U8 *p2pIe = NULL;
- #if 0
- retCode = wlan_cfgGetStr(pMac, WNI_CFG_STA_ID, staMac, &cfg);
- if (retCode != eSIR_SUCCESS)
- limLog(pMac, LOGP, FL("could not retrieve STA MAC"));
- #endif //To SUPPORT BT-AMP
-
sirCopyMacAddr(staMac,psessionEntry->selfMacAddr);
@@ -2815,15 +2758,6 @@ limDelSta(
// get STA index from DPH
//
-#if 0
- /* Since we have not created any STA, no need to send msg to delete
- * STA to HAL */
- if (psessionEntry->limSmeState == eLIM_SME_JOIN_FAILURE_STATE) {
- pDelStaParams->staIdx = 1; /* TODO : This is workaround. Need to find right STA Index before sending to HAL */
- //return retCode;
- }
-#endif
-
#ifdef FEATURE_WLAN_TDLS
if( ((eLIM_STA_ROLE == GET_LIM_SYSTEM_ROLE(psessionEntry)) && (pStaDs->staType != STA_ENTRY_TDLS_PEER)) ||(eLIM_BT_AMP_STA_ROLE == GET_LIM_SYSTEM_ROLE(psessionEntry)) )
#else
@@ -4595,8 +4529,6 @@ tSirRetStatus limStaSendAddBssPreAssoc( tpAniSirGlobal pMac, tANI_U8 updateEntry
#endif
// Set a new state for MLME
-
- //pMac->lim.gLimMlmState = eLIM_MLM_WT_ADD_BSS_RSP_PREASSOC_STATE;
psessionEntry->limMlmState = eLIM_MLM_WT_ADD_BSS_RSP_PREASSOC_STATE;
MTRACE(macTrace(pMac, TRACE_CODE_MLM_STATE, psessionEntry->peSessionId, psessionEntry->limMlmState));
diff --git a/CORE/MAC/src/pe/lim/limIbssPeerMgmt.c b/CORE/MAC/src/pe/lim/limIbssPeerMgmt.c
index 0c0e0271f856..3500058193b2 100644
--- a/CORE/MAC/src/pe/lim/limIbssPeerMgmt.c
+++ b/CORE/MAC/src/pe/lim/limIbssPeerMgmt.c
@@ -236,9 +236,6 @@ ibss_peer_collect(
else
pPeer->extendedRates.numRates = 0;
- // TBD copy EDCA parameters
- // pPeer->edcaParams;
-
pPeer->next = NULL;
} /*** end ibss_peer_collect() ***/
@@ -334,7 +331,6 @@ ibss_sta_caps_update(
if (! pStaDs->wmeEnabled)
{
pStaDs->wmeEnabled = 1;
- //dphSetACM(pMac, pStaDs);
}
return;
}
@@ -567,18 +563,9 @@ ibss_bss_add(
sirCopyMacAddr(pHdr->bssId,psessionEntry->bssId);
-#if 0
- if (wlan_cfgGetInt(pMac, WNI_CFG_BEACON_INTERVAL, &cfg) != eSIR_SUCCESS)
- limLog(pMac, LOGP, FL("Can't read beacon interval"));
-#endif //TO SUPPORT BT-AMP
/* Copy beacon interval from sessionTable */
cfg = psessionEntry->beaconParams.beaconInterval;
if (cfg != pBeacon->beaconInterval)
- #if 0
- if (cfgSetInt(pMac, WNI_CFG_BEACON_INTERVAL, pBeacon->beaconInterval)
- != eSIR_SUCCESS)
- limLog(pMac, LOGP, FL("Can't update beacon interval"));
- #endif//TO SUPPORT BT-AMP
psessionEntry->beaconParams.beaconInterval = pBeacon->beaconInterval;
/* This function ibss_bss_add (and hence the below code) is only called during ibss coalescing. We need to
@@ -595,14 +582,6 @@ ibss_bss_add(
(tANI_U8 *) &pBeacon->supportedRates,
pBeacon->supportedRates.numRates);
- #if 0
- if (cfgSetStr(pMac, WNI_CFG_OPERATIONAL_RATE_SET,
- (tANI_U8 *) &pMac->lim.gpLimStartBssReq->operationalRateSet.rate,
- pMac->lim.gpLimStartBssReq->operationalRateSet.numRates)
- != eSIR_SUCCESS)
- limLog(pMac, LOGP, FL("could not update OperRateset at CFG"));
- #endif //TO SUPPORT BT-AMP
-
/**
* WNI_CFG_EXTENDED_OPERATIONAL_RATE_SET CFG needs to be reset, when
* there is no extended rate IE present in beacon. This is especially important when
@@ -645,13 +624,6 @@ ibss_bss_add(
mlmStartReq.dualCTSProtection = pMac->lim.gHTDualCTSProtection;
mlmStartReq.txChannelWidthSet = psessionEntry->htRecommendedTxWidthSet;
- #if 0
- if (wlan_cfgGetInt(pMac, WNI_CFG_CURRENT_CHANNEL, &cfg) != eSIR_SUCCESS)
- limLog(pMac, LOGP, FL("CurrentChannel CFG get fialed!"));
- #endif
-
- //mlmStartReq.channelNumber = (tSirMacChanNum) cfg;
-
/* reading the channel num from session Table */
mlmStartReq.channelNumber = psessionEntry->currentOperChannel;
@@ -720,7 +692,6 @@ void
limIbssInit(
tpAniSirGlobal pMac)
{
- //pMac->lim.gLimIbssActive = 0;
pMac->lim.gLimIbssCoalescingHappened = 0;
pMac->lim.gLimIbssPeerList = NULL;
pMac->lim.gLimNumIbssPeers = 0;
@@ -830,72 +801,6 @@ limIbssDelete(
ibss_coalesce_free(pMac);
} /*** end limIbssDelete() ***/
-/** Commenting this Code as from no where it is being invoked */
-#if 0
-/**
- * limIbssPeerDelete
- *
- *FUNCTION:
- * This may be called on a STA in IBSS to delete a peer
- * from the list.
- *
- *LOGIC:
- *
- *ASSUMPTIONS:
- *
- *NOTE:
- *
- * @param pMac - Pointer to Global MAC structure
- * @param peerMacAddr - MAC address of the peer STA that
- * need to be deleted from peer list.
- *
- * @return None
- */
-
-void
-limIbssPeerDelete(tpAniSirGlobal pMac, tSirMacAddr macAddr)
-{
- tLimIbssPeerNode *pPrevNode, *pTempNode;
-
- pTempNode = pPrevNode = pMac->lim.gLimIbssPeerList;
-
- if (pTempNode == NULL)
- return;
-
- while (pTempNode != NULL)
- {
- if (vos_mem_compare((tANI_U8 *) macAddr,
- (tANI_U8 *) &pTempNode->peerMacAddr,
- sizeof(tSirMacAddr)) )
- {
- // Found node to be deleted
- if (pMac->lim.gLimIbssPeerList == pTempNode) /** First Node to be deleted*/
- pMac->lim.gLimIbssPeerList = pTempNode->next;
- else
- pPrevNode->next = pTempNode->next;
-
- if(pTempNode->beacon)
- {
- vos_mem_free(pTempNode->beacon);
- pTempNode->beacon = NULL;
- }
- vos_mem_free(pTempNode);
- pMac->lim.gLimNumIbssPeers--;
- return;
- }
-
- pPrevNode = pTempNode;
- pTempNode = pTempNode->next;
- }
-
- // Should not be here
- PELOGE(limLog(pMac, LOGE, FL("peer not found in the list, addr= "));)
- limPrintMacAddr(pMac, macAddr, LOGE);
-} /*** end limIbssPeerDelete() ***/
-
-#endif
-
-
/** -------------------------------------------------------------
\fn limIbssSetProtection
\brief Decides all the protection related information.
@@ -1670,7 +1575,6 @@ void limIbssHeartBeatHandle(tpAniSirGlobal pMac,tpPESession psessionEntry)
* limReactivateTimer() calls.
*
******/
- //limReactivateTimer(pMac, eLIM_HEART_BEAT_TIMER, psessionEntry);
limReactivateHeartBeatTimer(pMac, psessionEntry);
return;
}
diff --git a/CORE/MAC/src/pe/lim/limLogDump.c b/CORE/MAC/src/pe/lim/limLogDump.c
index 51ea71c41151..b68bddf2c183 100644
--- a/CORE/MAC/src/pe/lim/limLogDump.c
+++ b/CORE/MAC/src/pe/lim/limLogDump.c
@@ -1664,18 +1664,6 @@ static char *
dump_lim_enable_quietIE( tpAniSirGlobal pMac, tANI_U32 arg1, tANI_U32 arg2, tANI_U32 arg3, tANI_U32 arg4, char *p)
{
(void) arg2; (void) arg3; (void) arg4;
-#if 0
- if (arg1)
- {
- pMac->lim.gLimSpecMgmt.fQuietEnabled = eANI_BOOLEAN_TRUE;
- p += log_sprintf(pMac, p, "QuietIE enabled\n");
- }
- else
- {
- pMac->lim.gLimSpecMgmt.fQuietEnabled = eANI_BOOLEAN_FALSE;
- p += log_sprintf(pMac, p, "QuietIE disabled\n");
- }
-#endif
return p;
}
diff --git a/CORE/MAC/src/pe/lim/limP2P.c b/CORE/MAC/src/pe/lim/limP2P.c
index fedcd1074f51..5139da8ade52 100644
--- a/CORE/MAC/src/pe/lim/limP2P.c
+++ b/CORE/MAC/src/pe/lim/limP2P.c
@@ -185,9 +185,6 @@ int limProcessRemainOnChnlReq(tpAniSirGlobal pMac, tANI_U32 *pMsg)
tANI_U8 i;
tpPESession psessionEntry;
#endif
-#ifdef WLAN_FEATURE_P2P_INTERNAL
- tpPESession pP2pSession;
-#endif
tSirRemainOnChnReq *MsgBuff = (tSirRemainOnChnReq *)pMsg;
pMac->lim.gpLimRemainOnChanReq = MsgBuff;
@@ -244,14 +241,6 @@ int limProcessRemainOnChnlReq(tpAniSirGlobal pMac, tANI_U32 *pMsg)
goto error;
}
-#ifdef WLAN_FEATURE_P2P_INTERNAL
- //Session is needed to send probe rsp
- if(eSIR_SUCCESS != limCreateSessionForRemainOnChn(pMac, &pP2pSession))
- {
- limLog( pMac, LOGE, "Unable to create session");
- goto error;
- }
-#endif
if ((limSetLinkState(pMac, MsgBuff->isProbeRequestAllowed?
eSIR_LINK_LISTEN_STATE:eSIR_LINK_SEND_ACTION_STATE,
@@ -1212,7 +1201,7 @@ send_frame1:
{
halstatus = halTxFrame( pMac, pPacket, (tANI_U16)nBytes,
HAL_TXRX_FRM_802_11_MGMT, ANI_TXDIR_TODS,
- 7,/*SMAC_SWBD_TX_TID_MGMT_HIGH */ limTxComplete, pFrame,
+ 7, limTxComplete, pFrame,
txFlag, smeSessionId );
if (!pMbMsg->noack)
@@ -1227,7 +1216,7 @@ send_frame1:
pMac->lim.mgmtFrameSessionId = pMbMsg->sessionId;
halstatus = halTxFrameWithTxComplete( pMac, pPacket, (tANI_U16)nBytes,
HAL_TXRX_FRM_802_11_MGMT, ANI_TXDIR_TODS,
- 7,/*SMAC_SWBD_TX_TID_MGMT_HIGH */ limTxComplete, pFrame,
+ 7, limTxComplete, pFrame,
limP2PActionCnf, txFlag, smeSessionId, false );
if ( ! HAL_STATUS_SUCCESS ( halstatus ) )
diff --git a/CORE/MAC/src/pe/lim/limProcessActionFrame.c b/CORE/MAC/src/pe/lim/limProcessActionFrame.c
index 0f17cd205f0c..f83cde3be830 100644
--- a/CORE/MAC/src/pe/lim/limProcessActionFrame.c
+++ b/CORE/MAC/src/pe/lim/limProcessActionFrame.c
@@ -312,15 +312,6 @@ __limProcessChannelSwitchActionFrame(tpAniSirGlobal pMac, tANI_U8 *pRxPacketInfo
(tANI_U8 *) &pHdr->sa,
sizeof(tSirMacAddr)))
{
- #if 0
- if (wlan_cfgGetInt(pMac, WNI_CFG_BEACON_INTERVAL, &val) != eSIR_SUCCESS)
- {
- vos_mem_free(pChannelSwitchFrame);
- limLog(pMac, LOGP, FL("could not retrieve Beacon interval"));
- return;
- }
- #endif// TO SUPPORT BT-AMP
-
/* copy the beacon interval from psessionEntry*/
val = psessionEntry->beaconParams.beaconInterval;
@@ -2562,7 +2553,6 @@ limProcessActionFrame(tpAniSirGlobal pMac, tANI_U8 *pRxPacketInfo,tpPESession ps
case SIR_MAC_TDLS_DIS_RSP:
{
#ifdef FEATURE_WLAN_TDLS_INTERNAL
- //LIM_LOG_TDLS(printk("Public Action TDLS Discovery RSP ..")) ;
limProcessTdlsPublicActionFrame(pMac, (tANI_U32*)pRxPacketInfo, psessionEntry) ;
#else
tpSirMacMgmtHdr pHdr;
diff --git a/CORE/MAC/src/pe/lim/limProcessAssocReqFrame.c b/CORE/MAC/src/pe/lim/limProcessAssocReqFrame.c
index 0b09aedcc00a..4f8404ef1701 100644
--- a/CORE/MAC/src/pe/lim/limProcessAssocReqFrame.c
+++ b/CORE/MAC/src/pe/lim/limProcessAssocReqFrame.c
@@ -516,7 +516,6 @@ limProcessAssocReqFrame(tpAniSirGlobal pMac, tANI_U8 *pRxPacketInfo,
goto error;
}
- //if (pMac->dph.gDphPhyMode == WNI_CFG_PHY_MODE_11G)
if (phyMode == WNI_CFG_PHY_MODE_11G)
{
@@ -620,19 +619,6 @@ limProcessAssocReqFrame(tpAniSirGlobal pMac, tANI_U8 *pRxPacketInfo,
//11.15.2 Support of DSSS/CCK in 40 MHz
//the AP shall refuse association requests from an HT STA that has the DSSS/CCK
//Mode in 40 MHz subfield set to 1;
-
- //FIXME_BTAMP_AP : Need to be enabled
- /*
- if ( !pMac->lim.gHTDsssCckRate40MHzSupport && pAssocReq->HTCaps.dsssCckMode40MHz )
- {
- statusCode = eSIR_MAC_DSSS_CCK_RATE_NOT_SUPPORT_STATUS;
- limLog( pMac, LOGW, FL( "AP DSSS/CCK is disabled; "
- "STA rejected." ) );
- // Reject association
- limSendAssocRspMgmtFrame( pMac, statusCode, 1, pHdr->sa, subType, 0,psessionEntry);
- goto error;
- }
- */
}
} // End if on HT caps turned on in lim.
@@ -973,7 +959,6 @@ limProcessAssocReqFrame(tpAniSirGlobal pMac, tANI_U8 *pRxPacketInfo,
// check if sta is allowed per QoS AC rules
- //if (pMac->dph.gDphQosEnabled || pMac->dph.gDphWmeEnabled)
limGetWmeMode(psessionEntry, &wmeMode);
if ((qosMode == eHAL_SET) || (wmeMode == eHAL_SET))
{
@@ -1241,7 +1226,6 @@ if (limPopulateMatchingRateSet(pMac,
pStaDs->wmeEnabled = eANI_BOOLEAN_FALSE;
pStaDs->wsmEnabled = eANI_BOOLEAN_FALSE;
limGetWmeMode(psessionEntry, &wmeMode);
- //if ((! pStaDs->lleEnabled) && assoc.wmeInfoPresent && pMac->dph.gDphWmeEnabled)
if ((! pStaDs->lleEnabled) && pAssocReq->wmeInfoPresent && (wmeMode == eHAL_SET))
{
pStaDs->wmeEnabled = eANI_BOOLEAN_TRUE;
@@ -1291,7 +1275,6 @@ if (limPopulateMatchingRateSet(pMac,
pStaDs->qos.capability.qosInfo.maxSpLen = pAssocReq->WMMInfoStation.max_sp_length;
}
}
- //if (assoc.wsmCapablePresent && pMac->dph.gDphWsmEnabled)
if (pAssocReq->wsmCapablePresent && (wsmMode == eHAL_SET))
pStaDs->wsmEnabled = eANI_BOOLEAN_TRUE;
@@ -1485,7 +1468,6 @@ void limSendMlmAssocInd(tpAniSirGlobal pMac, tpDphHashNode pStaDs, tpPESession p
tANI_U8 subType;
tANI_U8 *wpsIe = NULL;
tANI_U32 tmp;
-// tANI_U16 statusCode;
tANI_U16 i, j=0;
// Get a copy of the already parsed Assoc Request
diff --git a/CORE/MAC/src/pe/lim/limProcessAssocRspFrame.c b/CORE/MAC/src/pe/lim/limProcessAssocRspFrame.c
index 79b43f0c40ce..4fab65bdd988 100644
--- a/CORE/MAC/src/pe/lim/limProcessAssocRspFrame.c
+++ b/CORE/MAC/src/pe/lim/limProcessAssocRspFrame.c
@@ -82,7 +82,6 @@ void limUpdateAssocStaDatas(tpAniSirGlobal pMac, tpDphHashNode pStaDs, tpSirAsso
tANI_U32 prop;
tANI_U32 phyMode;
tANI_U32 val;
- //tpSirBoardCapabilities pBoardCaps;
tANI_BOOLEAN qosMode;
tANI_U16 rxHighestRate = 0;
@@ -103,7 +102,6 @@ void limUpdateAssocStaDatas(tpAniSirGlobal pMac, tpDphHashNode pStaDs, tpSirAsso
}
}
- //pMac->lim.gLimMlmState = eLIM_MLM_LINK_ESTABLISHED_STATE;
pStaDs->mlmStaContext.authType = psessionEntry->limCurrentAuthType;
// Add capabilities information, rates and AID
@@ -186,7 +184,6 @@ void limUpdateAssocStaDatas(tpAniSirGlobal pMac, tpDphHashNode pStaDs, tpSirAsso
pStaDs->lleEnabled = 0;
// update TSID to UP mapping
- //if (pMac->lim.gLimQosEnabled)
if (qosMode) {
if (pAssocRsp->edcaPresent) {
tSirRetStatus status;
diff --git a/CORE/MAC/src/pe/lim/limProcessAuthFrame.c b/CORE/MAC/src/pe/lim/limProcessAuthFrame.c
index 3667812d02d9..08ffbfcf82db 100644
--- a/CORE/MAC/src/pe/lim/limProcessAuthFrame.c
+++ b/CORE/MAC/src/pe/lim/limProcessAuthFrame.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2011-2013 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2011-2014 The Linux Foundation. All rights reserved.
*
* Previously licensed under the ISC license by Qualcomm Atheros, Inc.
*
@@ -144,7 +144,6 @@ limProcessAuthFrame(tpAniSirGlobal pMac, tANI_U8 *pRxPacketInfo, tpPESession pse
encrAuthFrame[LIM_ENCR_AUTH_BODY_LEN],
plainBody[256];
tANI_U16 frameLen;
- //tANI_U32 authRspTimeout, maxNumPreAuth, val;
tANI_U32 maxNumPreAuth, val;
tSirMacAuthFrameBody *pRxAuthFrameBody, rxAuthFrame, authFrame;
tpSirMacMgmtHdr pHdr;
@@ -157,10 +156,8 @@ limProcessAuthFrame(tpAniSirGlobal pMac, tANI_U8 *pRxPacketInfo, tpPESession pse
tANI_U8 challengeTextArray[SIR_MAC_AUTH_CHALLENGE_LENGTH];
tpDphHashNode pStaDs = NULL;
tANI_U16 assocId = 0;
- /* Added For BT -AMP support */
- // Get pointer to Authentication frame header and body
-
+ // Get pointer to Authentication frame header and body
pHdr = WDA_GET_RX_MAC_HEADER(pRxPacketInfo);
frameLen = WDA_GET_RX_PAYLOAD_LEN(pRxPacketInfo);
@@ -195,8 +192,6 @@ limProcessAuthFrame(tpAniSirGlobal pMac, tANI_U8 *pRxPacketInfo, tpPESession pse
pBody = WDA_GET_RX_MPDU_DATA(pRxPacketInfo);
- //PELOG3(sirDumpBuf(pMac, SIR_LIM_MODULE_ID, LOG3, (tANI_U8*)pBd, ((tpHalBufDesc) pBd)->mpduDataOffset + frameLen);)
-
//Restore default failure timeout
if (VOS_P2P_CLIENT_MODE == psessionEntry->pePersona && psessionEntry->defaultAuthFailureTimeout)
{
diff --git a/CORE/MAC/src/pe/lim/limProcessCfgUpdates.c b/CORE/MAC/src/pe/lim/limProcessCfgUpdates.c
index 2b8864f48a10..43cbb1269eab 100644
--- a/CORE/MAC/src/pe/lim/limProcessCfgUpdates.c
+++ b/CORE/MAC/src/pe/lim/limProcessCfgUpdates.c
@@ -51,42 +51,6 @@
static void limUpdateConfig(tpAniSirGlobal pMac,tpPESession psessionEntry);
-#if 0
-/**
- * limGetCfgIdOfDefaultKeyid()
- *
- *FUNCTION:
- * This function is called to get CFG ID of default key id
- *
- *PARAMS:
- *
- *LOGIC:
- *
- *ASSUMPTIONS:
- * NA
- *
- *NOTE:
- * NA
- *
- * @param dkid - Value of default key id
- * @return dkCfgId - CFG ID of key corresponding to default key Id
- */
-
-static tANI_U32
-limGetCfgIdOfDefaultKeyid(tANI_U32 dkid)
-{
- if (dkid == WNI_CFG_WEP_DEFAULT_KEYID_0)
- return WNI_CFG_WEP_DEFAULT_KEY_1;
- else if (dkid == WNI_CFG_WEP_DEFAULT_KEYID_1)
- return WNI_CFG_WEP_DEFAULT_KEY_2;
- else if (dkid == WNI_CFG_WEP_DEFAULT_KEYID_2)
- return WNI_CFG_WEP_DEFAULT_KEY_3;
- else // dkid == WNI_CFG_WEP_DEFAULT_KEYID_3
- return WNI_CFG_WEP_DEFAULT_KEY_4;
-} /*** end limGetCfgIdOfDefaultKeyid() ***/
-#endif
-
-
/**
* limSetDefaultKeyIdAndKeys()
*
@@ -317,12 +281,8 @@ limHandleCFGparamUpdate(tpAniSirGlobal pMac, tANI_U32 cfgId)
limLog(pMac, LOGP,
FL("Unable to retrieve excludeUnencr from CFG"));
}
-#if 0
- halSetSpExclUndecrypted(pMac, (tHalBitVal) val);
-#else
limLog(pMac, LOGE,
FL("Unsupported CFG: WNI_CFG_EXCLUDE_UNENCRYPTED"));
-#endif
break;
@@ -613,8 +573,6 @@ limHandleCFGparamUpdate(tpAniSirGlobal pMac, tANI_U32 cfgId)
PELOGE(limLog(pMac, LOGE, FL("could not retrieve Dot11 Mode CFG"));)
break;
}
- /* TODO */
- //psessionEntry->dot11mode = val1; //// un comment this line ...FORBUILD -TEMPFIX.. HOW TO GET sessionEntry?????
break;
case WNI_CFG_ADDBA_REQ_DECLINE:
if(wlan_cfgGetInt(pMac, WNI_CFG_ADDBA_REQ_DECLINE, &val1) != eSIR_SUCCESS) {
@@ -766,10 +724,6 @@ limUpdateConfig(tpAniSirGlobal pMac,tpPESession psessionEntry)
{
tANI_U32 val;
- #if 0
- if (wlan_cfgGetStr(pMac, WNI_CFG_STA_ID, pMac->lim.gLimMyMacAddr, &len) != eSIR_SUCCESS)
- limLog(pMac, LOGP, FL("cfg get sta id failed"));
- #endif //To SUPPORT BT-AMP
sirCopyMacAddr(pMac->lim.gLimMyMacAddr,psessionEntry->selfMacAddr);
if (wlan_cfgGetInt(pMac, WNI_CFG_SHORT_PREAMBLE, &val) != eSIR_SUCCESS)
diff --git a/CORE/MAC/src/pe/lim/limProcessMessageQueue.c b/CORE/MAC/src/pe/lim/limProcessMessageQueue.c
index 287511773064..d26dea8088f1 100644
--- a/CORE/MAC/src/pe/lim/limProcessMessageQueue.c
+++ b/CORE/MAC/src/pe/lim/limProcessMessageQueue.c
@@ -594,30 +594,8 @@ limHandle80211Frames(tpAniSirGlobal pMac, tpSirMsgQ limMsg, tANI_U8 *pDeferMsg)
#if defined(FEATURE_WLAN_ESE) && !defined(FEATURE_WLAN_ESE_UPLOAD)
if (fc.type == SIR_MAC_DATA_FRAME && isFrmFt)
{
-#if 0 // ESE TBD Need to PORT
- tpSirMacDot3Hdr pDataFrmHdr;
-
- pDataFrmHdr = (tpSirMacDot3Hdr)((tANI_U8 *)pBD+ WLANHAL_RX_BD_GET_MPDU_H_OFFSET(pBD));
- if((psessionEntry = peFindSessionByBssid(pMac,pDataFrmHdr->sa,&sessionId))== NULL)
- {
- limLog( pMac, LOGE, FL("Session not found for Frm type %d, subtype %d, SA: "), fc.type, fc.subType);
- limPrintMacAddr(pMac, pDataFrmHdr->sa, LOGE);
- limPktFree(pMac, HAL_TXRX_FRM_802_11_MGMT, pBD, limMsg->bodyptr);
- return;
- }
-
- if (!psessionEntry->isESEconnection)
- {
- limLog( pMac, LOGE, FL("LIM received Type %d, Subtype %d in Non ESE connection"),
- fc.type, fc.subType);
- limPktFree(pMac, HAL_TXRX_FRM_802_11_MGMT, pBD, limMsg->bodyptr);
- return;
- }
- limLog( pMac, LOGE, FL("Processing IAPP Frm from SA:"));
- limPrintMacAddr(pMac, pDataFrmHdr->sa, LOGE);
-#else
- printk("%s: Need to port handling of IAPP frames to PRIMA for ESE", __func__);
-#endif
+ limLog(pMac, LOGE,
+ FL("Need to port handling of IAPP frames to QCACLD for ESE"));
} else
#endif
/* Added For BT-AMP Support */
@@ -696,19 +674,6 @@ limHandle80211Frames(tpAniSirGlobal pMac, tpSirMsgQ limMsg, tANI_U8 *pDeferMsg)
/* Chance of crashing : to be done BT-AMP ........happens when broadcast probe req is received */
-#if 0
- if (psessionEntry->limSystemRole == eLIM_UNKNOWN_ROLE) {
- limLog( pMac, LOGW, FL( "gLimSystemRole is %d. Exiting..." ),psessionEntry->limSystemRole );
- limPktFree(pMac, HAL_TXRX_FRM_802_11_MGMT, pRxPacketInfo, (void *) limMsg->bodyptr);
-
-#ifdef WLAN_DEBUG
- pMac->lim.numProtErr++;
-#endif
- return;
- }
- #endif //HACK to continue scanning
-
-
#ifdef WLAN_DEBUG
pMac->lim.numMAC[fc.type][fc.subType]++;
#endif
@@ -717,15 +682,6 @@ limHandle80211Frames(tpAniSirGlobal pMac, tpSirMsgQ limMsg, tANI_U8 *pDeferMsg)
{
case SIR_MAC_MGMT_FRAME:
{
- #if 0 //TBD-RAJESH fix this
- if (limIsReassocInProgress( pMac,psessionEntry) && (fc.subType != SIR_MAC_MGMT_DISASSOC) &&
- (fc.subType != SIR_MAC_MGMT_DEAUTH) && (fc.subType != SIR_MAC_MGMT_REASSOC_RSP))
- {
- limLog(pMac, LOGE, FL("Frame with Type - %d, Subtype - %d received in ReAssoc Wait state, dropping..."),
- fc.type, fc.subType);
- return;
- }
- #endif //HACK to continue scanning
// Received Management frame
switch (fc.subType)
{
@@ -1710,22 +1666,6 @@ limProcessMessages(tpAniSirGlobal pMac, tpSirMsgQ limMsg)
* normal processing
*/
- #if 0
- PELOG1(limLog(pMac, LOG1, FL("Heartbeat timeout, SME %d, MLME %d, #bcn %d"),
- pMac->lim.gLimSmeState, pMac->lim.gLimMlmState,
- pMac->lim.gLimRxedBeaconCntDuringHB);)
-
- if(pMac->lim.gLimSystemRole == eLIM_STA_IN_IBSS_ROLE)
- limIbssHeartBeatHandle(pMac); //HeartBeat for peers.
- else
- /**
- * Heartbeat failure occurred on STA
- * This is handled by LMM sub module.
- */
- limHandleHeartBeatFailure(pMac);
-
- break;
- #endif //TO SUPPORT BT-AMP
if(pMac->psOffloadEnabled)
{
/* Powersave Offload Case */
@@ -1849,11 +1789,6 @@ limProcessMessages(tpAniSirGlobal pMac, tpSirMsgQ limMsg)
limHandleUpdateOlbcCache(pMac);
break;
-#if 0
- case SIR_LIM_WPS_OVERLAP_TIMEOUT:
- limProcessWPSOverlapTimeout(pMac);
- break;
-#endif
#ifdef FEATURE_WLAN_TDLS
#ifdef QCA_WIFI_2_0
@@ -1888,11 +1823,6 @@ limProcessMessages(tpAniSirGlobal pMac, tpSirMsgQ limMsg)
VOS_TRACE(VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_ERROR,
("Discovery Rsp timer expires ")) ;
-#if 0 // TDLS_hklee: D13 no need to open Addr2 unknown data packet
- /* restore RXP filters */
- limSetLinkState(pMac, eSIR_LINK_FINISH_TDLS_DISCOVERY_STATE,
- psessionEntry->bssId) ;
-#endif
limSendSmeTdlsDisRsp(pMac, eSIR_SUCCESS,
eWNI_SME_TDLS_DISCOVERY_START_RSP) ;
break ;
@@ -2315,9 +2245,8 @@ void limProcessNormalHddMsg(tpAniSirGlobal pMac, tSirMsgQ *pLimMsg, tANI_U8 fRsp
}
/* limInsystemInscanState() refers the psessionEntry, how to get session Entry????*/
- if (((pMac->lim.gLimAddtsSent) || (limIsSystemInScanState(pMac)) /*||
- (LIM_IS_RADAR_DETECTED(pMac))*/) && fDeferMsg)
- {
+ if (((pMac->lim.gLimAddtsSent) || (limIsSystemInScanState(pMac))) &&
+ fDeferMsg) {
// System is in DFS (Learn) mode or awaiting addts response
// or if radar is detected, Defer processsing this message
if (limDeferMsg(pMac, pLimMsg) != TX_SUCCESS)
diff --git a/CORE/MAC/src/pe/lim/limProcessMlmReqMessages.c b/CORE/MAC/src/pe/lim/limProcessMlmReqMessages.c
index 86556aaeccbf..8ffb3719585e 100644
--- a/CORE/MAC/src/pe/lim/limProcessMlmReqMessages.c
+++ b/CORE/MAC/src/pe/lim/limProcessMlmReqMessages.c
@@ -51,7 +51,6 @@
#include "limSendMessages.h"
#include "pmmApi.h"
#include "limSendMessages.h"
-//#include "limSessionUtils.h"
#include "limSessionUtils.h"
#ifdef WLAN_FEATURE_VOWIFI_11R
#include <limFT.h>
@@ -546,24 +545,6 @@ void limContinuePostChannelScan(tpAniSirGlobal pMac)
tANI_U32 val1 = 0;
val = SYS_MS_TO_TICKS(val);
- //TODO: consider sessions.
-#if 0
- // If a background was triggered via Quiet BSS,
- // then we need to adjust the MIN and MAX channel
- // timer's accordingly to the Quiet duration that
- // was specified
- if( eLIM_QUIET_RUNNING == pMac->lim.gLimSpecMgmt.quietState &&
- pMac->lim.gLimTriggerBackgroundScanDuringQuietBss )
- {
- // gLimQuietDuration is already cached in units of
- // system ticks. No conversion is reqd...
- val1 = pMac->lim.gLimSpecMgmt.quietDuration;
- }
- else
- {
- val1 = SYS_MS_TO_TICKS(pMac->lim.gpLimMlmScanReq->maxChannelTime);
- }
-#endif
//Pick the longer stay time
val = (val > val1) ? val : val1;
MTRACE(macTrace(pMac, TRACE_CODE_TIMER_ACTIVATE, NO_SESSION, eLIM_MAX_CHANNEL_TIMER));
@@ -600,7 +581,6 @@ void limContinuePostChannelScan(tpAniSirGlobal pMac)
//This will instruct HAL to set it to any previous valid channel.
peSetResumeChannel(pMac, 0, 0);
limSendHalFinishScanReq( pMac, eLIM_HAL_FINISH_SCAN_WAIT_STATE );
- //limCompleteMlmScan(pMac, eSIR_SME_HAL_SCAN_INIT_FAILED);
}
else
{
@@ -1362,13 +1342,6 @@ limRestorePreScanState(tpAniSirGlobal pMac)
}
}
- /**
- * clean up message queue.
- * If SME messages, redirect to deferred queue.
- * The rest will be discarded.
- */
- //limCleanupMsgQ(pMac);
-
pMac->lim.gLimSystemInScanLearnMode = 0;
PELOG1(limLog(pMac, LOG1, FL("Scan ended, took %d tu"), (tx_time_get() - pMac->lim.scanStartTime));)
} /*** limRestorePreScanState() ***/
@@ -1748,11 +1721,6 @@ limMlmAddBss (
pAddBssParams->extSetStaKeyParamValid = 0;
#endif
- //
- // FIXME_GEN4
- // A global counter (dialog token) is required to keep track of
- // all PE <-> HAL communication(s)
- //
msgQ.type = WDA_ADD_BSS_REQ;
msgQ.reserved = 0;
msgQ.bodyptr = pAddBssParams;
@@ -1825,65 +1793,6 @@ limProcessMlmStartReq(tpAniSirGlobal pMac, tANI_U32 *pMsgBuf)
mlmStartCnf.resultCode = eSIR_SME_BSS_ALREADY_STARTED_OR_JOINED;
goto end;
}
-
- #if 0
- if (cfgSetInt(pMac, WNI_CFG_CURRENT_CHANNEL, pMlmStartReq->channelNumber)!= eSIR_SUCCESS)
- limLog(pMac, LOGP, FL("could not set CURRENT_CHANNEL at CFG"));
-
- pMac->lim.gLimCurrentChannelId = pMlmStartReq->channelNumber;
- #endif //TO SUPPORT BT-AMP
-
-
- // Update SSID at CFG database
- #if 0
- if (cfgSetStr(pMac, WNI_CFG_SSID, (tANI_U8 *) &pMlmStartReq->ssId.ssId, pMlmStartReq->ssId.length)
- != eSIR_SUCCESS)
- limLog(pMac, LOGP, FL("could not update SSID at CFG"));
- #endif //To SUPPORT BT-AMP
-
-
- // pMac->lim.gLimCurrentSSID.length = pMlmStartReq->ssId.length;
-
- #if 0
- if (cfgSetStr(pMac, WNI_CFG_OPERATIONAL_RATE_SET,
- (tANI_U8 *) &pMac->lim.gpLimStartBssReq->operationalRateSet.rate,
- pMac->lim.gpLimStartBssReq->operationalRateSet.numRates)
- != eSIR_SUCCESS)
- limLog(pMac, LOGP, FL("could not update Operational Rateset at CFG"));
- #endif //TO SUPPORT BT-AMP
-
-
-
-#if 0 // Periodic timer for remove WPS PBC proble response entry in PE is disbaled now.
- if (psessionEntry->limSystemRole == eLIM_AP_ROLE)
- {
- if(pMac->lim.limTimers.gLimWPSOverlapTimerObj.isTimerCreated == eANI_BOOLEAN_FALSE)
- {
- if (tx_timer_create(&pMac->lim.limTimers.gLimWPSOverlapTimerObj.gLimWPSOverlapTimer,
- "PS OVERLAP Timer",
- limWPSOverlapTimerHandler,
- SIR_LIM_WPS_OVERLAP_TIMEOUT, // expiration_input
- SYS_MS_TO_TICKS(LIM_WPS_OVERLAP_TIMER_MS), // initial_ticks
- SYS_MS_TO_TICKS(LIM_WPS_OVERLAP_TIMER_MS), // reschedule_ticks
- TX_AUTO_ACTIVATE /* TX_NO_ACTIVATE*/) != TX_SUCCESS)
- {
- limLog(pMac, LOGP, FL("failed to create WPS overlap Timer"));
- }
-
- pMac->lim.limTimers.gLimWPSOverlapTimerObj.sessionId = pMlmStartReq->sessionId;
- pMac->lim.limTimers.gLimWPSOverlapTimerObj.isTimerCreated = eANI_BOOLEAN_TRUE;
- limLog(pMac, LOGE, FL("Create WPS overlap Timer, session=%d"), pMlmStartReq->sessionId);
-
- if (tx_timer_activate(&pMac->lim.limTimers.gLimWPSOverlapTimerObj.gLimWPSOverlapTimer) != TX_SUCCESS)
- {
- limLog(pMac, LOGP, FL("tx_timer_activate failed"));
- }
- }
- }
-#endif
-
-
-
mlmStartCnf.resultCode = limMlmAddBss(pMac, pMlmStartReq,psessionEntry);
end:
@@ -2002,7 +1911,7 @@ limProcessMlmScanReq(tpAniSirGlobal pMac, tANI_U32 *pMsgBuf)
if (pMac->lim.gpLimMlmScanReq->scanType == eSIR_ACTIVE_SCAN)
pMac->lim.gLimMlmState = eLIM_MLM_WT_PROBE_RESP_STATE;
- else // eSIR_PASSIVE_SCAN
+ else
pMac->lim.gLimMlmState = eLIM_MLM_PASSIVE_SCAN_STATE;
MTRACE(macTrace(pMac, TRACE_CODE_MLM_STATE, NO_SESSION, pMac->lim.gLimMlmState));
@@ -2056,8 +1965,6 @@ limProcessMlmScanReq(tpAniSirGlobal pMac, tANI_U32 *pMsgBuf)
pMac->lim.gLimMlmState, ((tLimMlmScanReq *) pMsgBuf)->channelList.numChannels);
limPrintMlmState(pMac, LOGW, pMac->lim.gLimMlmState);
- /// Free up buffer allocated for
- /// pMac->lim.gLimMlmScanReq
vos_mem_free(pMsgBuf);
/// Return Scan confirm with INVALID_PARAMETERS
@@ -2198,9 +2105,6 @@ limProcessMlmPostJoinSuspendLink(tpAniSirGlobal pMac, eHalStatus status, tANI_U3
goto error;
}
- /** Derive channel from BSS description and store it in the CFG */
- // chanNum = pMac->lim.gpLimMlmJoinReq->bssDescription.channelId;
-
chanNum = psessionEntry->currentOperChannel;
secChanOffset = psessionEntry->htSecondaryChannelOffset;
//store the channel switch sessionEntry in the lim global var
@@ -2279,11 +2183,6 @@ limProcessMlmJoinReq(tpAniSirGlobal pMac, tANI_U32 *pMsgBuf)
(SIR_MAC_GET_ESS( ((tpLimMlmJoinReq) pMsgBuf)->bssDescription.capabilityInfo) !=
SIR_MAC_GET_IBSS( ((tpLimMlmJoinReq) pMsgBuf)->bssDescription.capabilityInfo)))
{
- #if 0
- if (pMac->lim.gpLimMlmJoinReq)
- vos_mem_free(pMac->lim.gpLimMlmJoinReq);
- #endif //TO SUPPORT BT-AMP , review 23sep
-
/// Hold onto Join request parameters
psessionEntry->pLimMlmJoinReq =(tpLimMlmJoinReq) pMsgBuf;
@@ -2533,8 +2432,6 @@ end:
mlmAuthCnf.authType = pMac->lim.gpLimMlmAuthReq->authType;
mlmAuthCnf.sessionId = sessionId;
- /// Free up buffer allocated
- /// for pMac->lim.gLimMlmAuthReq
vos_mem_free( pMac->lim.gpLimMlmAuthReq);
pMac->lim.gpLimMlmAuthReq = NULL;
limLog(pMac,LOG1,"SessionId:%d LimPostSme LIM_MLM_AUTH_CNF ",
@@ -2569,7 +2466,6 @@ limProcessMlmAssocReq(tpAniSirGlobal pMac, tANI_U32 *pMsgBuf)
tLimMlmAssocReq *pMlmAssocReq;
tLimMlmAssocCnf mlmAssocCnf;
tpPESession psessionEntry;
- // tANI_U8 sessionId;
if(pMsgBuf == NULL)
{
@@ -2747,9 +2643,6 @@ limProcessMlmReassocReq(tpAniSirGlobal pMac, tANI_U32 *pMsgBuf)
psessionEntry->limMlmState = eLIM_MLM_WT_REASSOC_RSP_STATE;
MTRACE(macTrace(pMac, TRACE_CODE_MLM_STATE, psessionEntry->peSessionId, psessionEntry->limMlmState));
- /* Copy Global Reassoc ID*/
- // sirCopyMacAddr(psessionEntry->reassocbssId,pMac->lim.gLimReAssocBssId);
-
/**
* Derive channel from BSS description and
* store it at CFG.
@@ -2758,15 +2651,10 @@ limProcessMlmReassocReq(tpAniSirGlobal pMac, tANI_U32 *pMsgBuf)
chanNum = psessionEntry->limReassocChannelId;
secChannelOffset = psessionEntry->reAssocHtSecondaryChannelOffset;
- /* To Support BT-AMP .. read channel number from psessionEntry*/
- //chanNum = psessionEntry->currentOperChannel;
-
// Apply previously set configuration at HW
limApplyConfiguration(pMac,psessionEntry);
//store the channel switch sessionEntry in the lim global var
- /* We have already saved the ReAssocreq Pointer abobe */
- //psessionEntry->pLimReAssocReq = (void *)pMlmReassocReq;
psessionEntry->channelChangeReasonCode = LIM_SWITCH_CHANNEL_REASSOC;
/** Switch channel to the new Operating channel for Reassoc*/
@@ -2823,11 +2711,6 @@ limProcessMlmDisassocReqNtf(tpAniSirGlobal pMac, eHalStatus suspendStatus, tANI_
if(eHAL_STATUS_SUCCESS != suspendStatus)
{
PELOGE(limLog(pMac, LOGE,FL("Suspend Status is not success %X"), suspendStatus);)
-#if 0
- //It can ignore the status and proceed with the disassoc processing.
- mlmDisassocCnf.resultCode = eSIR_SME_REFUSED;
- goto end;
-#endif
}
pMlmDisassocReq = (tLimMlmDisassocReq *) pMsgBuf;
@@ -2913,7 +2796,6 @@ limProcessMlmDisassocReqNtf(tpAniSirGlobal pMac, eHalStatus suspendStatus, tANI_
goto end;
}
- //pStaDs->mlmStaContext.rxPurgeReq = 1;
pStaDs->mlmStaContext.disassocReason = (tSirMacReasonCodes)
pMlmDisassocReq->reasonCode;
pStaDs->mlmStaContext.cleanupTrigger = pMlmDisassocReq->disassocTrigger;
@@ -3096,13 +2978,8 @@ void limProcessDisassocAckTimeout(tpAniSirGlobal pMac)
static void
limProcessMlmDisassocReq(tpAniSirGlobal pMac, tANI_U32 *pMsgBuf)
{
-// tANI_U16 aid;
-// tSirMacAddr currentBssId;
-// tpDphHashNode pStaDs;
tLimMlmDisassocReq *pMlmDisassocReq;
-// tLimMlmDisassocCnf mlmDisassocCnf;
tpPESession psessionEntry;
-// extern tANI_BOOLEAN sendDisassocFrame;
if(pMsgBuf == NULL)
{
@@ -3142,11 +3019,6 @@ limProcessMlmDeauthReqNtf(tpAniSirGlobal pMac, eHalStatus suspendStatus, tANI_U3
if(eHAL_STATUS_SUCCESS != suspendStatus)
{
PELOGE(limLog(pMac, LOGE,FL("Suspend Status is not success %X"), suspendStatus);)
-#if 0
- //It can ignore the status and proceed with the disassoc processing.
- mlmDisassocCnf.resultCode = eSIR_SME_REFUSED;
- goto end;
-#endif
}
pMlmDeauthReq = (tLimMlmDeauthReq *) pMsgBuf;
@@ -3384,12 +3256,7 @@ void limProcessDeauthAckTimeout(tpAniSirGlobal pMac)
static void
limProcessMlmDeauthReq(tpAniSirGlobal pMac, tANI_U32 *pMsgBuf)
{
-// tANI_U16 aid;
-// tSirMacAddr currentBssId;
-// tpDphHashNode pStaDs;
-// struct tLimPreAuthNode *pAuthNode;
tLimMlmDeauthReq *pMlmDeauthReq;
-// tLimMlmDeauthCnf mlmDeauthCnf;
tpPESession psessionEntry;
if(pMsgBuf == NULL)
@@ -3766,7 +3633,6 @@ limProcessMinChannelTimeout(tpAniSirGlobal pMac)
//if the min Channel is maintained per session, then use the below seesionEntry
//priority - LOW/might not be needed
- //TBD-RAJESH HOW TO GET sessionEntry?????
tpPESession psessionEntry;
if((psessionEntry = peFindSessionBySessionId(pMac, pMac->lim.limTimers.gLimMinChannelTimer.sessionId))== NULL)
@@ -3951,12 +3817,6 @@ limProcessPeriodicProbeReqTimer(tpAniSirGlobal pMac)
* present in the saved MLM
*/
- /*
- * PELOGE(limLog(pMac, LOGW, FL("sending ProbeReq number %d,"
- * " for SSID %s on channel: %d"),
- * i, pLimMlmScanReq->ssId[i].ssId,
- * channelNum);)
- */
status = limSendProbeReqMgmtFrame( pMac, &pLimMlmScanReq->ssId[i],
pLimMlmScanReq->bssId, channelNum, pMac->lim.gSelfMacAddr,
pLimMlmScanReq->dot11mode, pLimMlmScanReq->uIEFieldLen,
@@ -4760,86 +4620,6 @@ void limProcessMlmDelBAReq( tpAniSirGlobal pMac,
tSirRetStatus
limSMPowerSaveStateInd(tpAniSirGlobal pMac, tSirMacHTMIMOPowerSaveState state)
{
-#if 0
- tSirRetStatus retStatus = eSIR_SUCCESS;
-#if 0
- tANI_U32 cfgVal1;
- tANI_U16 cfgVal2;
- tSirMacHTCapabilityInfo *pHTCapabilityInfo;
- tpDphHashNode pSta = NULL;
-
- tpPESession psessionEntry = &pMac->lim.gpSession[0]; //TBD-RAJESH HOW TO GET sessionEntry?????
- /** Verify the Mode of operation */
- if (pMac->lim.gLimSystemRole != eSYSTEM_STA_ROLE) {
- PELOGE(limLog(pMac, LOGE, FL("Got PMC indication when System not in the STA Role"));)
- return eSIR_FAILURE;
- }
-
- if ((pMac->lim.gHTMIMOPSState == state) || (state == eSIR_HT_MIMO_PS_NA )) {
- PELOGE(limLog(pMac, LOGE, FL("Got Indication when already in the same mode or State passed is NA:%d "), state);)
- return eSIR_FAILURE;
- }
-
- if (!pMac->lim.htCapability){
- PELOGW(limLog(pMac, LOGW, FL(" Not in 11n or HT capable mode"));)
- return eSIR_FAILURE;
- }
-
- /** Update the CFG about the default MimoPS State */
- if (wlan_cfgGetInt(pMac, WNI_CFG_HT_CAP_INFO, &cfgVal1) != eSIR_SUCCESS) {
- limLog(pMac, LOGP, FL("could not retrieve HT Cap CFG "));
- return eSIR_FAILURE;
- }
-
- cfgVal2 = (tANI_U16)cfgVal1;
- pHTCapabilityInfo = (tSirMacHTCapabilityInfo *) &cfgVal2;
- pHTCapabilityInfo->mimoPowerSave = state;
-
- if(cfgSetInt(pMac, WNI_CFG_HT_CAP_INFO, *(tANI_U16*)pHTCapabilityInfo) != eSIR_SUCCESS) {
- limLog(pMac, LOGP, FL("could not update HT Cap Info CFG"));
- return eSIR_FAILURE;
- }
-
- PELOG2(limLog(pMac, LOG2, FL(" The HT Capability for Mimo Pwr is updated to State: %u "),state);)
- if (pMac->lim.gLimSmeState != eLIM_SME_LINK_EST_STATE) {
- PELOG2(limLog(pMac, LOG2,FL(" The STA is not in the Connected/Link Est Sme_State: %d "), pMac->lim.gLimSmeState);)
- /** Update in the LIM the MIMO PS state of the SELF */
- pMac->lim.gHTMIMOPSState = state;
- return eSIR_SUCCESS;
- }
-
- pSta = dphGetHashEntry(pMac, DPH_STA_HASH_INDEX_PEER, &psessionEntry->dph.dphHashTable);
- if (!pSta->mlmStaContext.htCapability) {
- limLog( pMac, LOGE,FL( "limSendSMPowerState: Peer is not HT Capable " ));
- return eSIR_FAILURE;
- }
-
- if (isEnteringMimoPS(pMac->lim.gHTMIMOPSState, state)) {
- tSirMacAddr macAddr;
- /** Obtain the AP's Mac Address */
- vos_mem_copy((tANI_U8 *)macAddr, psessionEntry->bssId, sizeof(tSirMacAddr));
- /** Send Action Frame with the corresponding mode */
- retStatus = limSendSMPowerStateFrame(pMac, macAddr, state);
- if (retStatus != eSIR_SUCCESS) {
- PELOGE(limLog(pMac, LOGE, "Update SM POWER: Sending Action Frame has failed");)
- return retStatus;
- }
- }
-
- /** Update MlmState about the SetMimoPS State */
- pMac->lim.gLimPrevMlmState = pMac->lim.gLimMlmState;
- pMac->lim.gLimMlmState = eLIM_MLM_WT_SET_MIMOPS_STATE;
- MTRACE(macTrace(pMac, TRACE_CODE_MLM_STATE, 0, pMac->lim.gLimMlmState));
-
- /** Update the HAL and s/w mac about the mode to be set */
- retStatus = limPostSMStateUpdate( pMac,psessionEntry->staId, state);
-
- PELOG2(limLog(pMac, LOG2, " Updated the New SMPS State");)
- /** Update in the LIM the MIMO PS state of the SELF */
- pMac->lim.gHTMIMOPSState = state;
-#endif
- return retStatus;
-#endif
return eSIR_SUCCESS;
}
diff --git a/CORE/MAC/src/pe/lim/limProcessMlmRspMessages.c b/CORE/MAC/src/pe/lim/limProcessMlmRspMessages.c
index ab24006052c1..6b7d46261067 100644
--- a/CORE/MAC/src/pe/lim/limProcessMlmRspMessages.c
+++ b/CORE/MAC/src/pe/lim/limProcessMlmRspMessages.c
@@ -489,7 +489,6 @@ limProcessMlmJoinCnf(tpAniSirGlobal pMac, tANI_U32 *pMsgBuf)
PELOG1(limLog(pMac, LOG1, FL("***SessionId:%d Joined ESS ***"),
pLimMlmJoinCnf->sessionId);)
//Setup hardware upfront
- //Done: 7-27-2009. JIM_FIX_ME sessionize the following function
if(limStaSendAddBssPreAssoc( pMac, false, psessionEntry) == eSIR_SUCCESS)
return;
else
@@ -533,7 +532,6 @@ limProcessMlmAuthCnf(tpAniSirGlobal pMac, tANI_U32 *pMsgBuf)
tLimMlmAuthCnf *pMlmAuthCnf;
tpPESession psessionEntry;
tANI_U32 teleBcnEn = 0;
-// tANI_U8 sessionId;
if(pMsgBuf == NULL)
{
@@ -1148,8 +1146,6 @@ limFillAssocIndParams(tpAniSirGlobal pMac, tpLimMlmAssocInd pAssocInd,
pSirSmeAssocInd->aid = pAssocInd->aid;
// Fill in bssId
vos_mem_copy(pSirSmeAssocInd->bssId, psessionEntry->bssId, sizeof(tSirMacAddr));
- // Fill in staId
- //pSirSmeAssocInd->staId = psessionEntry->staId;
// Fill in authType
pSirSmeAssocInd->authType = pAssocInd->authType;
// Fill in ssId
@@ -2031,13 +2027,6 @@ void limProcessMlmDelBssRsp( tpAniSirGlobal pMac, tpSirMsgQ limMsgQ,tpPESession
//we need to process the deferred message since the initiating req. there might be nested request.
//in the case of nested request the new request initiated from the response will take care of resetting
//the deffered flag.
- // tpPESession psessionEntry;
- // tpDeleteBssParams pDeleteBssParams =( tpDeleteBssParams)limMsgQ->bodyptr;
- // if((psessionEntry = peFindSessionBySessionId(pMac,pDeleteBssParams->sessionId)) == NULL)
- // {
- // limLog( pMac, LOGE, FL( "Session deos not exist with given sessionId" ));
- // return;
- // }
SET_LIM_PROCESS_DEFD_MESGS(pMac, true);
pMac->sys.gSysFrameCount[SIR_MAC_MGMT_FRAME][SIR_MAC_MGMT_DEAUTH] = 0;
@@ -2190,13 +2179,6 @@ void limProcessBtAmpApMlmDelBssRsp( tpAniSirGlobal pMac, tpSirMsgQ limMsgQ,tpPES
* to occupy the medium during non channel occupancy period. So resume the transmission after
* HAL gives back the response.
*/
-#if 0 //TODO: How to handle this per session
- if (LIM_IS_RADAR_DETECTED(pMac))
- {
- limFrameTransmissionControl(pMac, eLIM_TX_BSS_BUT_BEACON, eLIM_RESUME_TX);
- LIM_SET_RADAR_DETECTED(pMac, eANI_BOOLEAN_FALSE);
- }
-#endif
dphHashTableClassInit(pMac, &psessionEntry->dph.dphHashTable);//TBD-RAJESH is it needed ?
limDeletePreAuthList(pMac);
//Initialize number of associated stations during cleanup
@@ -2496,7 +2478,6 @@ limProcessApMlmAddBssRsp( tpAniSirGlobal pMac, tpSirMsgQ limMsgQ)
tLimMlmStartCnf mlmStartCnf;
tANI_U32 val;
tpPESession psessionEntry;
-// tANI_U8 sessionId;
#ifdef QCA_WIFI_2_0
tANI_U8 isWepEnabled = FALSE;
#endif
@@ -2682,8 +2663,6 @@ limProcessIbssMlmAddBssRsp( tpAniSirGlobal pMac, tpSirMsgQ limMsgQ ,tpPESession
psessionEntry->limSystemRole = eLIM_STA_IN_IBSS_ROLE;
psessionEntry->statypeForBss = STA_ENTRY_SELF;
schEdcaProfileUpdate(pMac, psessionEntry);
- //TBD-RAJESH limInitPreauthList should re removed for IBSS also ?????
- //limInitPreAuthList(pMac);
if (0 == psessionEntry->freePeerIdxHead)
limInitPeerIdxpool(pMac,psessionEntry);
@@ -2787,8 +2766,6 @@ limProcessStaMlmAddBssRspPreAssoc( tpAniSirGlobal pMac, tpSirMsgQ limMsgQ, tpPES
limLog(pMac, LOGP,
FL("could not retrieve AuthFailureTimeout value"));
}
- // SUNIT_FIX_ME: Set BOTH? Assume not. Please verify here and below.
- //pMac->lim.gLimMlmState = eLIM_MLM_JOINED_STATE;
psessionEntry->limMlmState = eLIM_MLM_JOINED_STATE;
MTRACE(macTrace(pMac, TRACE_CODE_MLM_STATE, psessionEntry->peSessionId, eLIM_MLM_JOINED_STATE));
pMlmAuthReq->sessionId = psessionEntry->peSessionId;
@@ -2937,9 +2914,6 @@ limProcessStaMlmAddBssRspFT(tpAniSirGlobal pMac, tpSirMsgQ limMsgQ, tpPESession
vos_mem_copy((tANI_U8 *) pAddStaParams->bssId,
psessionEntry->bssId, sizeof(tSirMacAddr));
- // Update this when we get reassoc rsp , with success.
- // pAddStaParams->assocId = psessionEntry->limAID;
-
pAddStaParams->staType = STA_ENTRY_SELF;
pAddStaParams->status = eHAL_STATUS_SUCCESS;
pAddStaParams->respReqd = 1;
@@ -3102,7 +3076,6 @@ limProcessStaMlmAddBssRsp( tpAniSirGlobal pMac, tpSirMsgQ limMsgQ,tpPESession ps
if(eLIM_MLM_WT_ADD_BSS_RSP_PREASSOC_STATE == psessionEntry->limMlmState)
{
- //Done: 7-28-2009. JIM_FIX_ME: sessionize the following function
limLog(pMac,LOG1,"SessionId:%d limProcessStaMlmAddBssRspPreAssoc",
psessionEntry->peSessionId);
limProcessStaMlmAddBssRspPreAssoc(pMac, limMsgQ, psessionEntry);
@@ -3446,9 +3419,6 @@ void limProcessMlmSetBssKeyRsp( tpAniSirGlobal pMac, tpSirMsgQ limMsgQ )
// TODO & FIXME_GEN4
// Need to inspect tSirMsgQ.reserved for a valid Dialog token!
//
- // Validate SME/LIM state - Read the above "ASSUMPTIONS"
- //if( eLIM_SME_LINK_EST_STATE == pMac->lim.gLimSmeState )
- //{
// Validate MLME state
if( eLIM_MLM_WT_SET_BSS_KEY_STATE != psessionEntry->limMlmState &&
eLIM_MLM_WT_SET_STA_BCASTKEY_STATE != psessionEntry->limMlmState )
@@ -4038,7 +4008,6 @@ void limProcessStartScanRsp(tpAniSirGlobal pMac, void *body)
//This will instruct HAL to set it to any previous valid channel.
peSetResumeChannel(pMac, 0, 0);
limSendHalFinishScanReq( pMac, eLIM_HAL_FINISH_SCAN_WAIT_STATE );
- //limCompleteMlmScan(pMac, eSIR_SME_HAL_SCAN_INIT_FAILED);
}
else
{
@@ -4383,7 +4352,6 @@ void limProcessMlmDelBACnf( tpAniSirGlobal pMac,
tpLimMlmDelBACnf pMlmDelBACnf;
tpDphHashNode pSta;
tANI_U16 aid;
-// tANI_U8 sessionId;
tLimBAState curBaState;
tpPESession psessionEntry;
@@ -4546,54 +4514,6 @@ returnAfterCleanup:
void
limProcessSetMimoRsp(tpAniSirGlobal pMac, tpSirMsgQ limMsg)
{
-#if 0
- tSirRetStatus retStatus;
- tpSetMIMOPS pMIMO_PSParams;
-
-
- do {
-
- pMIMO_PSParams = (tpSetMIMOPS)limMsg->bodyptr;
- if( NULL == pMIMO_PSParams ) {
- PELOGE(limLog(pMac, LOGE, "Received the WDA_SET_MIMOPS_RSP with NULL as the PS param");)
- return;
- }
-
- /** If Updation of the HAL Fail's*/
- if (pMIMO_PSParams->status != eSIR_SUCCESS) {
- limLog(pMac, LOGP, FL("Update HAL / SW Mac for MIMO State has Failed"));
- break;
- }
-
- if ((pMac->lim.gLimSystemRole != eSYSTEM_STA_ROLE) ||
- (pMac->lim.gLimSmeState != eLIM_SME_LINK_EST_STATE) )
- break;
-
- pMac->lim.gLimMlmState = pMac->lim.gLimPrevMlmState;
- MTRACE(macTrace(pMac, TRACE_CODE_MLM_STATE, 0, pMac->lim.gLimMlmState));
-
- /** In the Case of Exiting out of the Powersave (changing from Dynamic/Static mode to SM Enabled)
- * send the action Frame to Peer to update the PS State of the STA , for the case of Entering PowerSave
- * the Action Frame is being sent at first before setting the internal structures
- */
- if (!isEnteringMimoPS(pMac->lim.gHTMIMOPSState, pMIMO_PSParams->htMIMOPSState)) {
- tSirMacAddr macAddr;
-
- /** Obtain the AP's Mac Address */
- vos_mem_copy((tANI_U8 *)macAddr, pMac->lim.gLimBssid, sizeof(tSirMacAddr));
-
- /** Send Action Frame with the corresponding mode */
- retStatus = limSendSMPowerStateFrame(pMac, macAddr, pMIMO_PSParams->htMIMOPSState);
- if (retStatus != eSIR_SUCCESS) {
- PELOGE(limLog(pMac, LOGE, FL("Sending Action Frame has failed"));)
- break;
- }
- }
- PELOG1(limLog(pMac, LOG1, FL("The Setting up of LimGlobals is successful for MIMOPS"));)
- }while(0);
-
- vos_mem_free((void *) pMIMO_PSParams);
-#endif
}
/**
* @function : limHandleDelBssInReAssocContext
@@ -4882,112 +4802,6 @@ Error:
limPostSmeMessage(pMac, LIM_MLM_REASSOC_CNF, (tANI_U32 *) &mlmReassocCnf);
}
-#if 0
- static void
-limProcessSmeAssocCnfNew(tpAniSirGlobal pMac, tANI_U32 msgType, tANI_U32 *pMsgBuf)
-{
- tSirSmeAssocCnf assocCnf;
- tpDphHashNode pStaDs;
- tpPESession psessionEntry;
- tANI_U8 sessionId;
-
- if(pMsgBuf == NULL)
- {
- limLog(pMac, LOGE, FL("pMsgBuf is NULL "));
- goto end;
- }
- if ((limAssocCnfSerDes(pMac, &assocCnf, (tANI_U8 *) pMsgBuf) == eSIR_FAILURE) ||
- !__limIsSmeAssocCnfValid(&assocCnf))
- {
- limLog(pMac, LOGE, FL("Received invalid SME_RE(ASSOC)_CNF message "));
- goto end;
- }
- if((psessionEntry = peFindSessionByBssid(pMac, assocCnf.bssId, &sessionId))== NULL)
- {
- limLog(pMac, LOGE, FL("session does not exist for given bssId"));
- goto end;
- }
- if ( ((psessionEntry->limSystemRole != eLIM_AP_ROLE) && (psessionEntry->limSystemRole != eLIM_BT_AMP_AP_ROLE)) ||
- ((psessionEntry->limSmeState != eLIM_SME_NORMAL_STATE) && (psessionEntry->limSmeState != eLIM_SME_NORMAL_CHANNEL_SCAN_STATE)))
- {
- limLog(pMac, LOGE, FL("Received unexpected message %X in state %X, in role %X"),
- msgType, psessionEntry->limSmeState , psessionEntry->limSystemRole);
- goto end;
- }
- pStaDs = dphGetHashEntry(pMac, assocCnf.aid, &psessionEntry->dph.dphHashTable);
- if (pStaDs == NULL)
- {
- limLog(pMac, LOG1,
- FL("Received invalid message %X due to no STA context, for aid %d, peer "),
- msgType, assocCnf.aid);
- limPrintMacAddr(pMac, assocCnf.peerMacAddr, LOG1);
- /*
- ** send a DISASSOC_IND message to WSM to make sure
- ** the state in WSM and LIM is the same
- **/
- limSendSmeDisassocNtf( pMac, assocCnf.peerMacAddr, eSIR_SME_STA_NOT_ASSOCIATED,
- eLIM_PEER_ENTITY_DISASSOC, assocCnf.aid,psessionEntry->smeSessionId,psessionEntry->transactionId,psessionEntry);
- goto end;
- }
- if ((pStaDs &&
- (( !vos_mem_compare((tANI_U8 *) pStaDs->staAddr,
- (tANI_U8 *) assocCnf.peerMacAddr,
- sizeof(tSirMacAddr)) ) ||
- (pStaDs->mlmStaContext.mlmState != eLIM_MLM_WT_ASSOC_CNF_STATE) ||
- ((pStaDs->mlmStaContext.subType == LIM_ASSOC) &&
- (msgType != eWNI_SME_ASSOC_CNF)) ||
- ((pStaDs->mlmStaContext.subType == LIM_REASSOC) &&
- (msgType != eWNI_SME_REASSOC_CNF)))))
- {
- limLog(pMac, LOG1,
- FL("Received invalid message %X due to peerMacAddr mismatched or not in eLIM_MLM_WT_ASSOC_CNF_STATE state, for aid %d, peer "),
- msgType, assocCnf.aid);
- limPrintMacAddr(pMac, assocCnf.peerMacAddr, LOG1);
- goto end;
- }
- /*
- ** Deactivate/delet CNF_WAIT timer since ASSOC_CNF
- ** has been received
- **/
- limLog(pMac, LOG1, FL("Received SME_ASSOC_CNF. Delete Timer"));
- limDeactivateAndChangePerStaIdTimer(pMac, eLIM_CNF_WAIT_TIMER, pStaDs->assocId);
- if (assocCnf.statusCode == eSIR_SME_SUCCESS)
- {
- /* In BTAMP-AP, PE already finished the WDA_ADD_STA sequence
- * when it had received Assoc Request frame. Now, PE just needs to send
- * Association Response frame to the requesting BTAMP-STA.
- */
- pStaDs->mlmStaContext.mlmState = eLIM_MLM_LINK_ESTABLISHED_STATE;
- limLog(pMac, LOG1, FL("sending Assoc Rsp frame to STA (assoc id=%d) "), pStaDs->assocId);
- limSendAssocRspMgmtFrame( pMac, eSIR_SUCCESS, pStaDs->assocId, pStaDs->staAddr,
- pStaDs->mlmStaContext.subType, pStaDs, psessionEntry);
- goto end;
- } // (assocCnf.statusCode == eSIR_SME_SUCCESS)
- else
- {
- // SME_ASSOC_CNF status is non-success, so STA is not allowed to be associated
- limRejectAssociation(pMac, pStaDs->staAddr,
- pStaDs->mlmStaContext.subType,
- true, pStaDs->mlmStaContext.authType,
- pStaDs->assocId, true,
- assocCnf.statusCode, psessionEntry);
- return;
- }
-end:
- if ( psessionEntry->parsedAssocReq[pStaDs->assocId] != NULL )
- {
- if ( ((tpSirAssocReq)(psessionEntry->parsedAssocReq[pStaDs->assocId]))->assocReqFrame)
- {
- vos_mem_free(((tpSirAssocReq)(psessionEntry->parsedAssocReq[pStaDs->assocId]))->assocReqFrame);
- ((tpSirAssocReq)(psessionEntry->parsedAssocReq[pStaDs->assocId]))->assocReqFrame = NULL;
- }
-
- vos_mem_free(psessionEntry->parsedAssocReq[pStaDs->assocId]);
- psessionEntry->parsedAssocReq[pStaDs->assocId] = NULL;
- }
-} /*** end __limProcessSmeAssocCnfNew() ***/
-#endif
-
void
limSendBeaconInd(tpAniSirGlobal pMac, tpPESession psessionEntry){
tBeaconGenParams *pBeaconGenParams = NULL;
diff --git a/CORE/MAC/src/pe/lim/limProcessProbeReqFrame.c b/CORE/MAC/src/pe/lim/limProcessProbeReqFrame.c
index ff03fe53bb08..c3e9dc412922 100644
--- a/CORE/MAC/src/pe/lim/limProcessProbeReqFrame.c
+++ b/CORE/MAC/src/pe/lim/limProcessProbeReqFrame.c
@@ -51,10 +51,6 @@
#endif
#include "limSession.h"
-#ifdef WLAN_FEATURE_P2P_INTERNAL
-void limSendP2PProbeResponse(tpAniSirGlobal pMac, tANI_U8 *pBd,
- tpPESession psessionEntry);
-#endif
void
limSendSmeProbeReqInd(tpAniSirGlobal pMac,
@@ -269,62 +265,7 @@ static void limUpdatePBCSessionEntry(tpAniSirGlobal pMac,
pbc = pbc->next;
}
}
-#if 0
-/**
- * limWPSPBCTimeout
- *
- *FUNCTION:
- * This function is called when WPS PBC enrtries clean up timer is expired
- *
- *LOGIC:
- * This function remove all the entryies that more than 120 second old
- *
- *ASSUMPTIONS:
- *
- *
- *NOTE:
- *
- * @param pMac Pointer to Global MAC structure
- * @param psessionEntry A pointer to station PE session
- *
- * @return None
- */
-
-void limWPSPBCTimeout(tpAniSirGlobal pMac, tpPESession psessionEntry)
-{
- tANI_TIMESTAMP curTime;
- tSirWPSPBCSession *pbc, *prev = NULL;
-
- curTime = (tANI_TIMESTAMP)(palGetTickCount(pMac->hHdd) / PAL_TICKS_PER_SECOND);
-
- PELOG3(limLog(pMac, LOG3, FL("WPS PBC cleanup timeout curTime=%d"), curTime);)
-
- prev = psessionEntry->pAPWPSPBCSession;
- if(prev)
- pbc = prev->next;
- else
- return;
-
- while (pbc) {
- if (curTime > pbc->timestamp + SIR_WPS_PBC_WALK_TIME) {
- prev->next = NULL;
- limRemoveTimeoutPBCsessions(pMac, pbc);
- break;
- }
- prev = pbc;
- pbc = pbc->next;
- }
- if(prev)
- {
- if (curTime > prev->timestamp + SIR_WPS_PBC_WALK_TIME) {
- psessionEntry->pAPWPSPBCSession = NULL;
- limRemoveTimeoutPBCsessions(pMac, prev);
- }
- }
-
-}
-#endif
/**
* limWPSPBCClose
*
@@ -610,7 +551,6 @@ limProcessProbeReqFrame(tpAniSirGlobal pMac, tANI_U8 *pRxPacketInfo,tpPESession
if(psessionEntry->ssidHidden)
/*We are returning from here as probe request contains the broadcast SSID.
So no need to send the probe resp*/
- //ssId.length = 0;
return;
limSendProbeRspMgmtFrame(pMac, pHdr->sa, &ssId, DPH_USE_MGMT_STAID,
DPH_NON_KEEPALIVE_FRAME, psessionEntry,
@@ -674,9 +614,6 @@ limIndicateProbeReqToHDD(tpAniSirGlobal pMac, tANI_U8 *pBd,
(tANI_U8*)pHdr, (frameLen + sizeof(tSirMacMgmtHdr)),
psessionEntry->smeSessionId, WDA_GET_RX_CH(pBd),
psessionEntry, 0);
-#ifdef WLAN_FEATURE_P2P_INTERNAL
- limSendP2PProbeResponse(pMac, pBd, psessionEntry);
-#endif
} /*** end limIndicateProbeReqToHDD() ***/
/**
@@ -707,9 +644,6 @@ limProcessProbeReqFrame_multiple_BSS(tpAniSirGlobal pMac, tANI_U8 *pBd, tpPESes
if (psessionEntry != NULL)
{
if ((eLIM_AP_ROLE == psessionEntry->limSystemRole)
-#ifdef WLAN_FEATURE_P2P_INTERNAL
- || (psessionEntry->limSystemRole == eLIM_P2P_DEVICE_ROLE)
-#endif
)
{
limIndicateProbeReqToHDD(pMac, pBd, psessionEntry);
@@ -724,9 +658,6 @@ limProcessProbeReqFrame_multiple_BSS(tpAniSirGlobal pMac, tANI_U8 *pBd, tpPESes
if ( (psessionEntry != NULL) )
{
if ((eLIM_AP_ROLE == psessionEntry->limSystemRole)
-#ifdef WLAN_FEATURE_P2P_INTERNAL
- || (psessionEntry->limSystemRole == eLIM_P2P_DEVICE_ROLE)
-#endif
)
{
limIndicateProbeReqToHDD(pMac, pBd, psessionEntry);
@@ -809,46 +740,3 @@ limSendSmeProbeReqInd(tpAniSirGlobal pMac,
}
} /*** end limSendSmeProbeReqInd() ***/
-#ifdef WLAN_FEATURE_P2P_INTERNAL
-void limSendP2PProbeResponse(tpAniSirGlobal pMac, tANI_U8 *pBd,
- tpPESession psessionEntry)
-{
- tAniSSID ssId = { P2P_WILDCARD_SSID_LEN, P2P_WILDCARD_SSID };
- tANI_U8 *pBody;
- tpSirMacMgmtHdr pHdr;
- tANI_U32 frameLen;
- tSirProbeReq probeReq;
-
- pHdr = WDA_GET_RX_MAC_HEADER(pBd);
- // Get pointer to Probe Request frame body
- pBody = WDA_GET_RX_MPDU_DATA(pBd);
-
- if( (pBody[0] == 0) && (pBody[1] == ssId.length) &&
- (vos_mem_compare(ssId.ssId, pBody + 2,
- ssId.length)))
- {
- // Parse Probe Request frame
- frameLen = WDA_GET_RX_PAYLOAD_LEN(pBd);
- if (eSIR_FAILURE == sirConvertProbeReqFrame2Struct(pMac, pBody, frameLen, &probeReq))
- {
- PELOGW(limLog(pMac, LOGW, FL("Parse error ProbeRequest, length=%d, SA is:"), frameLen);)
- limPrintMacAddr(pMac, pHdr->sa, LOGW);
- pMac->sys.probeError++;
- return;
- }
-
- if (psessionEntry->pePersona == VOS_P2P_GO_MODE)
- {
- ssId.length = psessionEntry->ssId.length;
- vos_mem_copy(ssId.ssId, psessionEntry->ssId.ssId,psessionEntry->ssId.length);
- limSendProbeRspMgmtFrame(pMac, pHdr->sa, &ssId, DPH_USE_MGMT_STAID, DPH_NON_KEEPALIVE_FRAME,
- psessionEntry, probeReq.p2pIePresent );
- }
- else
- {
- limSendProbeRspMgmtFrame(pMac, pHdr->sa, &ssId, DPH_USE_MGMT_STAID, DPH_NON_KEEPALIVE_FRAME,
- psessionEntry, probeReq.p2pIePresent );
- }
- }
-}
-#endif //#ifdef WLAN_FEATURE_P2P_INTERNAL
diff --git a/CORE/MAC/src/pe/lim/limProcessSmeReqMessages.c b/CORE/MAC/src/pe/lim/limProcessSmeReqMessages.c
index 1d63dd12f4c2..6c067fd3305c 100644
--- a/CORE/MAC/src/pe/lim/limProcessSmeReqMessages.c
+++ b/CORE/MAC/src/pe/lim/limProcessSmeReqMessages.c
@@ -567,11 +567,6 @@ __limHandleSmeStartBssRequest(tpAniSirGlobal pMac, tANI_U32 *pMsgBuf)
retCode = eSIR_SME_INVALID_PARAMETERS;
goto free;
}
-#if 0
- PELOG3(limLog(pMac, LOG3,
- FL("Parsed START_BSS_REQ fields are bssType=%d, channelId=%d"),
- pMac->lim.gpLimStartBssReq->bssType, pMac->lim.gpLimStartBssReq->channelId);)
-#endif
/* This is the place where PE is going to create a session.
* If session is not existed, then create a new session */
@@ -926,11 +921,6 @@ __limHandleSmeStartBssRequest(tpAniSirGlobal pMac, tANI_U32 *pMsgBuf)
|| (pMlmStartReq->bssType == eSIR_INFRA_AP_MODE)
)
{
- //len = sizeof(tSirMacAddr);
- //retStatus = wlan_cfgGetStr(pMac, WNI_CFG_STA_ID, (tANI_U8 *) pMlmStartReq->bssId, &len);
- //if (retStatus != eSIR_SUCCESS)
- //limLog(pMac, LOGP, FL("could not retrive BSSID, retStatus=%d"), retStatus);
-
/* Copy the BSSId from sessionTable to mlmStartReq struct */
sirCopyMacAddr(pMlmStartReq->bssId,psessionEntry->bssId);
}
@@ -1006,7 +996,6 @@ __limHandleSmeStartBssRequest(tpAniSirGlobal pMac, tANI_U32 *pMsgBuf)
pMlmStartReq->dualCTSProtection = pMac->lim.gHTDualCTSProtection; // Unused
pMlmStartReq->txChannelWidthSet = psessionEntry->htRecommendedTxWidthSet;
- /* sep26 review */
psessionEntry->limRFBand = limGetRFBand(channelNumber);
// Initialize 11h Enable Flag
@@ -1764,8 +1753,6 @@ __limProcessSmeJoinReq(tpAniSirGlobal pMac, tANI_U32 *pMsgBuf)
goto end;
}
- //pMac->lim.gpLimJoinReq = pSmeJoinReq; TO SUPPORT BT-AMP, review os sep 23
-
/* check for the existence of start BSS session */
#ifdef FIXME_GEN6
if(pSmeJoinReq->bsstype == eSIR_BTAMP_AP_MODE)
@@ -1852,7 +1839,6 @@ __limProcessSmeJoinReq(tpAniSirGlobal pMac, tANI_U32 *pMsgBuf)
sizeof(psessionEntry->htConfig));
/* Copying of bssId is already done, while creating session */
- //sirCopyMacAddr(psessionEntry->bssId,pSmeJoinReq->bssId);
sirCopyMacAddr(psessionEntry->selfMacAddr,pSmeJoinReq->selfMacAddr);
psessionEntry->bssType = pSmeJoinReq->bsstype;
@@ -2396,9 +2382,10 @@ __limProcessSmeReassocReq(tpAniSirGlobal pMac, tANI_U32 *pMsgBuf)
#endif
{
+ /* Copy the SSID from session entry to local variable */
psessionEntry->limReassocSSID.length = pReassocReq->ssId.length;
- vos_mem_copy( psessionEntry->limReassocSSID.ssId,
- pReassocReq->ssId.ssId, psessionEntry->limReassocSSID.length);
+ vos_mem_copy(psessionEntry->limReassocSSID.ssId,
+ pReassocReq->ssId.ssId, psessionEntry->limReassocSSID.length);
}
@@ -3494,15 +3481,6 @@ void limProcessSmeGetAssocSTAsInfo(tpAniSirGlobal pMac, tANI_U32 *pMsgBuf)
switch (getAssocSTAsReq.modId)
{
-/**
- case VOS_MODULE_ID_HAL:
- wdaPostCtrlMsg( pMac, &msgQ );
- return;
-
- case VOS_MODULE_ID_TL:
- Post msg TL
- return;
-*/
case VOS_MODULE_ID_PE:
default:
break;
@@ -3884,7 +3862,6 @@ void limProcessSmeDelBssRsp(
(void) body;
SET_LIM_PROCESS_DEFD_MESGS(pMac, true);
- //TBD: get the sessionEntry
limIbssDelete(pMac,psessionEntry);
dphHashTableClassInit(pMac, &psessionEntry->dph.dphHashTable);
limDeletePreAuthList(pMac);
@@ -4474,8 +4451,6 @@ __limProcessSmeGetStatisticsRequest(tpAniSirGlobal pMac, tANI_U32 *pMsgBuf)
pPEStatsReq = (tpAniGetPEStatsReq) pMsgBuf;
- //pPEStatsReq->msgType should be eWNI_SME_GET_STATISTICS_REQ
-
msgQ.type = WDA_GET_STATISTICS_REQ;
msgQ.reserved = 0;
@@ -5513,15 +5488,6 @@ static tSirRetStatus limProcessSmeDisStartReq(tpAniSirGlobal pMac,
* and save Dis Req info for future reference.
*/
-#if 0 // TDLS_hklee: D13 no need to open Addr2 unknown data packet
- /*
- * send message to HAL to set RXP filters to receieve frame on
- * direct link..
- */
- //limSetLinkState(pMac, eSIR_LINK_TDLS_DISCOVERY_STATE,
- // psessionEntry->bssId) ;
-#endif
-
/* save dis request message for matching dialog token */
vos_mem_copy((tANI_U8 *) &pMac->lim.gLimTdlsDisReq,
(tANI_U8 *) disReq, sizeof(tSirTdlsDisReq));
@@ -5576,7 +5542,6 @@ eHalStatus limProcessSmeLinkStartReq(tpAniSirGlobal pMac, tANI_U32 *pMsgBuf)
/* get all discovery request parameters */
tSirTdlsSetupReq *setupReq = (tSirTdlsSetupReq *) pMsgBuf ;
tLimTdlsLinkSetupInfo *linkSetupInfo;
- //tLimTdlsLinkSetupPeer *setupPeer;
tpPESession psessionEntry;
tANI_U8 sessionId;
eHalStatus status;
@@ -5617,7 +5582,6 @@ eHalStatus limProcessSmeLinkStartReq(tpAniSirGlobal pMac, tANI_U32 *pMsgBuf)
*/
/* create node for Link setup */
linkSetupInfo = &pMac->lim.gLimTdlsLinkSetupInfo ;
- //setupPeer = NULL ;
status = limTdlsPrepareSetupReqFrame(pMac, linkSetupInfo, setupReq->dialog,
setupReq->peerMac, psessionEntry) ;
@@ -5625,49 +5589,7 @@ eHalStatus limProcessSmeLinkStartReq(tpAniSirGlobal pMac, tANI_U32 *pMsgBuf)
/* in case of success, eWNI_SME_TDLS_LINK_START_RSP is sent back to SME later when
TDLS setup cnf TX complete is successful. */
return eSIR_SUCCESS;
-#if 0
- /*
- * we allocate the TDLS setup Peer Memory here, we will free'd this
- * memory after teardown, if the link is successfully setup or
- * free this memory if any timeout is happen in link setup procedure
- */
- setupPeer = vos_mem_malloc(sizeof( tLimTdlsLinkSetupPeer ));
- if ( NULL == setupPeer )
- {
- limLog( pMac, LOGP,
- FL( "Unable to allocate memory during ADD_STA" ));
- VOS_ASSERT(0) ;
- return eSIR_MEM_ALLOC_FAILED;
- }
- setupPeer->dialog = setupReq->dialog ;
- setupPeer->tdls_prev_link_state = setupPeer->tdls_link_state ;
- setupPeer->tdls_link_state = TDLS_LINK_SETUP_START_STATE ;
- /* TDLS_sessionize: remember sessionId for future */
- setupPeer->tdls_sessionId = psessionEntry->peSessionId;
- setupPeer->tdls_bIsResponder = 1;
-
- /*
- * we only populate peer MAC, so it can assit us to find the
- * TDLS peer after response/or after response timeout
- */
- vos_mem_copy(setupPeer->peerMac, setupReq->peerMac,
- sizeof(tSirMacAddr)) ;
- /* format TDLS discovery request frame and transmit it */
- limSendTdlsLinkSetupReqFrame(pMac, setupReq->peerMac,
- setupReq->dialog, psessionEntry, NULL, 0) ;
-
- limStartTdlsTimer(pMac, psessionEntry->peSessionId,
- &setupPeer->gLimTdlsLinkSetupRspTimeoutTimer,
- (tANI_U32)setupPeer->peerMac, WNI_CFG_TDLS_LINK_SETUP_RSP_TIMEOUT,
- SIR_LIM_TDLS_LINK_SETUP_RSP_TIMEOUT) ;
- /* update setup peer list */
- setupPeer->next = linkSetupInfo->tdlsLinkSetupList ;
- linkSetupInfo->tdlsLinkSetupList = setupPeer ;
- /* in case of success, eWNI_SME_TDLS_LINK_START_RSP is sent back to SME later when
- TDLS setup cnf TX complete is successful. --> see limTdlsSetupCnfTxComplete() */
- return eSIR_SUCCESS ;
-#endif
lim_tdls_link_start_error:
/* in case of error, return immediately to SME */
limSendSmeTdlsLinkStartRsp(pMac, eSIR_FAILURE, setupReq->peerMac,
diff --git a/CORE/MAC/src/pe/lim/limProcessTdls.c b/CORE/MAC/src/pe/lim/limProcessTdls.c
index 5f55c8117844..379f749c752d 100644
--- a/CORE/MAC/src/pe/lim/limProcessTdls.c
+++ b/CORE/MAC/src/pe/lim/limProcessTdls.c
@@ -332,21 +332,6 @@ const tANI_U8* limTraceTdlsActionString( tANI_U8 tdlsActionCode )
return (const tANI_U8*)"UNKNOWN";
}
#endif
-#if 0
-static void printMacAddr(tSirMacAddr macAddr)
-{
- int i = 0 ;
- VOS_TRACE(VOS_MODULE_ID_PE, VOS_TRACE_LEVEL_ERROR, (" Mac Addr: "));
-
- for(i = 0 ; i < 6; i++)
- {
- VOS_TRACE(VOS_MODULE_ID_PE, VOS_TRACE_LEVEL_ERROR,
- (" %02x "), macAddr[i]);
- }
- VOS_TRACE(VOS_MODULE_ID_PE, VOS_TRACE_LEVEL_ERROR, (""));
- return ;
-}
-#endif
/*
* initialize TDLS setup list and related data structures.
*/
@@ -388,57 +373,6 @@ void limTdlsSetNegativeBehavior(tpAniSirGlobal pMac, tANI_U8 value, tANI_BOOLEAN
value, on, pMac->lim.gLimTdlsNegativeBehavior));
}
#endif
-#if 0
-/*
- * This function is used for creating TDLS public Action frame to
- * transmit on Direct link
- */
-static void limPreparesActionFrameHdr(tpAniSirGlobal pMac, tANI_U8 *pFrame,
- tANI_U8 type, tANI_U8 subType,
- tANI_U8 *link_iden )
-{
- tpSirMacMgmtHdr pMacHdr ;
- tANI_U8 *bssid = link_iden ;
-#if 0
- tANI_U8 *staMac = (tANI_U8 *)(bssid + sizeof(tSirMacAddr)) ;
- tANI_U8 *peerMac = (tANI_U8 *) (staMac + sizeof(tSirMacAddr)) ;
-#else
- tANI_U8 *peerMac = (tANI_U8 *) (bssid + sizeof(tSirMacAddr)) ;
- tANI_U8 *staMac = (tANI_U8 *)(peerMac + sizeof(tSirMacAddr)) ;
-#endif
- tANI_U8 toDs = ANI_TXDIR_IBSS ;
-
- pMacHdr = (tpSirMacMgmtHdr) (pFrame);
-
- /*
- * prepare 802.11 header
- */
- pMacHdr->fc.protVer = SIR_MAC_PROTOCOL_VERSION;
- pMacHdr->fc.type = type ;
- pMacHdr->fc.subType = subType ;
- /*
- * TL is not setting up below fields, so we are doing it here
- */
- pMacHdr->fc.toDS = toDs ;
- pMacHdr->fc.powerMgmt = 0 ;
-
-
- vos_mem_copy( (tANI_U8 *) pMacHdr->da, peerMac, sizeof( tSirMacAddr ));
- vos_mem_copy( (tANI_U8 *) pMacHdr->sa,
- staMac, sizeof( tSirMacAddr ));
-
- vos_mem_copy( (tANI_U8 *) pMacHdr->bssId,
- bssid, sizeof( tSirMacAddr ));
-
- LIM_LOG_TDLS(VOS_TRACE(VOS_MODULE_ID_PE, VOS_TRACE_LEVEL_WARN, ("Preparing TDLS action frame\n%02x:%02x:%02x:%02x:%02x:%02x/%02x:%02x:%02x:%02x:%02x:%02x/%02x:%02x:%02x:%02x:%02x:%02x"),
- pMacHdr->da[0], pMacHdr->da[1], pMacHdr->da[2], pMacHdr->da[3], pMacHdr->da[4], pMacHdr->da[5],
- pMacHdr->sa[0], pMacHdr->sa[1], pMacHdr->sa[2], pMacHdr->sa[3], pMacHdr->sa[4], pMacHdr->sa[5],
- pMacHdr->bssId[0], pMacHdr->bssId[1], pMacHdr->bssId[2],
- pMacHdr->bssId[3], pMacHdr->bssId[4], pMacHdr->bssId[5]));
-
- return ;
-}
-#endif
/*
* prepare TDLS frame header, it includes
* | | | |
@@ -503,10 +437,6 @@ static tANI_U32 limPrepareTdlsFrameHeader(tpAniSirGlobal pMac, tANI_U8* pFrame,
pMacHdr->addr2[0], pMacHdr->addr2[1], pMacHdr->addr2[2], pMacHdr->addr2[3], pMacHdr->addr2[4], pMacHdr->addr2[5],
pMacHdr->addr3[0], pMacHdr->addr3[1], pMacHdr->addr3[2], pMacHdr->addr3[3], pMacHdr->addr3[4], pMacHdr->addr3[5]));
- //printMacAddr(pMacHdr->bssId) ;
- //printMacAddr(pMacHdr->sa) ;
- //printMacAddr(pMacHdr->da) ;
-
if (IS_QOS_ENABLED(psessionEntry))
{
pMacHdr->qosControl.tid = tid;
@@ -817,7 +747,6 @@ eHalStatus limTdlsDisRspTxComplete(tpAniSirGlobal pMac,
("TX complete Success for Dis RSP"));
status = eHAL_STATUS_SUCCESS ;
}
- //pMac->hal.pCBackFnTxComp = NULL ;
return status ;
}
@@ -872,7 +801,6 @@ eHalStatus limTdlsSetupCnfTxComplete(tpAniSirGlobal pMac,
("TX complete Success for setup CNF"));
status = eHAL_STATUS_SUCCESS ;
}
- //pMac->hal.pCBackFnTxComp = NULL ;
return status ;
}
#endif
@@ -888,9 +816,7 @@ eHalStatus limTdlsTeardownTxComplete(tpAniSirGlobal pMac,
tpDphHashNode pStaDs = NULL ;
tLimTdlsLinkSetupPeer *peerInfo = 0 ;
tpPESession psessionEntry = NULL ;
- //tANI_U16 msgType = 0 ;
- //tSirMacAddr peerMac = {0} ;
/* find peer by looking into the list by expected state */
limTdlsFindSetupPeerByState(pMac,
TDLS_LINK_TEARDOWN_START_STATE, &peerInfo) ;
@@ -907,9 +833,6 @@ eHalStatus limTdlsTeardownTxComplete(tpAniSirGlobal pMac,
("teardown peer Mac = " MAC_ADDRESS_STR),
MAC_ADDR_ARRAY((peerInfo)->peerMac));
-
- //pMac->hal.pCBackFnTxComp = NULL ;
-
psessionEntry = peFindSessionBySessionId(pMac, (peerInfo)->tdls_sessionId);
if(NULL == psessionEntry)
@@ -977,16 +900,6 @@ eHalStatus limTdlsTeardownTxComplete(tpAniSirGlobal pMac,
eWNI_SME_TDLS_TEARDOWN_IND) ;
}
-
-#if 0
- /* if previous state is link restart, then restart link setup again */
- if(TDLS_LINK_SETUP_RESTART_STATE == (peerInfo)->tdls_prev_link_state)
- {
- tLimTdlsLinkSetupInfo *setupInfo = &pMac->lim.gLimTdlsLinkSetupInfo ;
- limTdlsPrepareSetupReqFrame(pMac, setupInfo, 37,
- peerMac, psessionEntry) ;
- }
-#endif
status = eHAL_STATUS_SUCCESS ;
return status ;
}
@@ -1014,8 +927,6 @@ static void PopulateDot11fTdlsHtVhtCap(tpAniSirGlobal pMac, uint32 selfDot11Mode
else
{
//Placeholder to support different channel bonding mode of TDLS than AP.
- //wlan_cfgGetInt(pMac,WNI_CFG_TDLS_CHANNEL_BONDING_MODE,&tdlsChannelBondingMode);
- //htCap->supportedChannelWidthSet = tdlsChannelBondingMode ? 1 : 0;
htCap->supportedChannelWidthSet = 1; // hardcode it to max
}
}
@@ -1177,11 +1088,6 @@ static tSirRetStatus limSendTdlsDisRspFrame(tpAniSirGlobal pMac,
/* Make public Action Frame */
-#if 0
- limPreparesActionFrameHdr(pMac, pFrame, SIR_MAC_MGMT_FRAME,
- SIR_MAC_MGMT_ACTION,
- LINK_IDEN_ADDR_OFFSET(tdlsDisRsp)) ;
-#endif
limPopulateMacHeader( pMac, pFrame, SIR_MAC_MGMT_FRAME,
SIR_MAC_MGMT_ACTION, peerMac, psessionEntry->selfMacAddr);
@@ -1221,19 +1127,6 @@ static tSirRetStatus limSendTdlsDisRspFrame(tpAniSirGlobal pMac,
"Discovery Request (0x%08x)."), status );
}
-#if 0
- if(pMac->hal.pCBackFnTxComp == NULL)
- {
- pMac->hal.pCBackFnTxComp = (tpCBackFnTxComp)limTdlsDisRspTxComplete;
-
- if(TX_SUCCESS != tx_timer_activate(&pMac->hal.txCompTimer))
- {
- status = eHAL_STATUS_FAILURE;
- return status;
-
- }
- }
-#endif
VOS_TRACE(VOS_MODULE_ID_PE, VOS_TRACE_LEVEL_INFO,
("transmitting Discovery response on direct link")) ;
@@ -1686,23 +1579,6 @@ tSirRetStatus limSendTdlsTeardownFrame(tpAniSirGlobal pMac,
limLog( pMac, LOGW, FL("There were warnings while packing TDLS "
"Teardown Request (0x%08x)."), status );
}
-#if 0
- if(pMac->hal.pCBackFnTxComp == NULL)
- {
- pMac->hal.pCBackFnTxComp = (tpCBackFnTxComp)limTdlsTeardownTxComplete;
- if(TX_SUCCESS != tx_timer_activate(&pMac->hal.txCompTimer))
- {
- status = eHAL_STATUS_FAILURE;
- return status;
-
- }
- }
- else
- {
- VOS_ASSERT(0) ;
- return status ;
- }
-#endif
if( addIeLen != 0 )
{
@@ -1978,7 +1854,6 @@ static tSirRetStatus limSendTdlsSetupRspFrame(tpAniSirGlobal pMac,
halstatus = halTxFrameWithTxComplete( pMac, pPacket, ( tANI_U16 ) nBytes,
HAL_TXRX_FRM_802_11_DATA,
ANI_TXDIR_TODS,
- //ANI_TXDIR_IBSS,
TID_AC_BK,
limTxComplete, pFrame,
limMgmtTXComplete,
@@ -1988,7 +1863,6 @@ static tSirRetStatus limSendTdlsSetupRspFrame(tpAniSirGlobal pMac,
halstatus = halTxFrameWithTxComplete( pMac, pPacket, ( tANI_U16 ) nBytes,
HAL_TXRX_FRM_802_11_DATA,
ANI_TXDIR_TODS,
- //ANI_TXDIR_IBSS,
TID_AC_BK,
limTxComplete, pFrame,
limMgmtTXComplete,
@@ -2046,14 +1920,8 @@ tSirRetStatus limSendTdlsLinkSetupCnfFrame(tpAniSirGlobal pMac,
tdlsSetupCnf.Action.action = SIR_MAC_TDLS_SETUP_CNF ;
tdlsSetupCnf.DialogToken.token = dialog ;
-#if 1
PopulateDot11fLinkIden( pMac, psessionEntry, &tdlsSetupCnf.LinkIdentifier,
peerMac, TDLS_INITIATOR) ;
-#else
- vos_mem_copy( (tANI_U8 *)&tdlsSetupCnf.LinkIdentifier,
- (tANI_U8 *)&setupRsp->LinkIdentifier, sizeof(tDot11fIELinkIdentifier)) ;
-#endif
-
/*
* TODO: we need to see if we have to support conditions where we have
* EDCA parameter info element is needed a) if we need different QOS
@@ -2171,23 +2039,6 @@ tSirRetStatus limSendTdlsLinkSetupCnfFrame(tpAniSirGlobal pMac,
limLog( pMac, LOGW, FL("There were warnings while packing TDLS "
"Discovery Request (0x%08x)."), status );
}
-#if 0
- if(pMac->hal.pCBackFnTxComp == NULL)
- {
- pMac->hal.pCBackFnTxComp = (tpCBackFnTxComp)limTdlsSetupCnfTxComplete;
- if(TX_SUCCESS != tx_timer_activate(&pMac->hal.txCompTimer))
- {
- status = eHAL_STATUS_FAILURE;
- return status;
-
- }
- }
- else
- {
- VOS_ASSERT(0) ;
- return status ;
- }
-#endif
//Copy the additional IE.
//TODO : addIe is added at the end of the frame. This means it doesnt
//follow the order. This should be ok, but we should consider changing this
@@ -2626,7 +2477,6 @@ limTdlsPopulateMatchingRateSet(tpAniSirGlobal pMac,
isArate=0;
tempRateSet2.numRates = 0;
- // limGetPhyMode(pMac, &phyMode);
limGetPhyMode(pMac, &phyMode, NULL);
// get own rate set
@@ -2799,7 +2649,6 @@ limTdlsPopulateMatchingRateSet(tpAniSirGlobal pMac,
static void limTdlsUpdateHashNodeInfo(tpAniSirGlobal pMac, tDphHashNode *pStaDs,
tSirTdlsAddStaReq *pTdlsAddStaReq, tpPESession psessionEntry)
{
- //tDot11fIEHTCaps *htCaps = &setupPeerInfo->tdlsPeerHTCaps ;
tDot11fIEHTCaps htCap, *htCaps;
tDot11fIEVHTCaps *pVhtCaps = NULL;
tDot11fIEVHTCaps *pVhtCaps_txbf = NULL;
@@ -2864,7 +2713,6 @@ static void limTdlsUpdateHashNodeInfo(tpAniSirGlobal pMac, tDphHashNode *pStaDs,
pStaDs->vhtLdpcCapable = pVhtCaps->ldpcCodingCap;
pStaDs->vhtBeamFormerCapable = 0;
- // TODO , is it necessary , Sunil???
pMac->lim.gLimTdlsLinkMode = TDLS_LINK_MODE_AC;
pVhtCaps_txbf = (tDot11fIEVHTCaps *)(&pTdlsAddStaReq->vhtCap);
pVhtCaps_txbf->suBeamformeeCap = 0;
@@ -3121,7 +2969,6 @@ static tSirRetStatus limProcessTdlsDisReqFrame(tpAniSirGlobal pMac,
("no Session entry for TDLS session (bssid "MAC_ADDR_ARRAY")"),
MAC_ADDR_ARRAY(tdlsDisReq.LinkIdentifier.bssid));
- //VOS_ASSERT(0) ;
return eSIR_FAILURE;
}
@@ -3327,7 +3174,6 @@ static tSirRetStatus limProcessTdlsSetupReqFrame(tpAniSirGlobal pMac,
MAC_ADDRESS_STR")"),
MAC_ADDR_ARRAY(tdlsSetupReq.LinkIdentifier.bssid));
- //VOS_ASSERT(0) ;
return eSIR_FAILURE ;
}
/* TODO: we don;t need this check now, varify BSSID */
@@ -3374,7 +3220,6 @@ static tSirRetStatus limProcessTdlsSetupReqFrame(tpAniSirGlobal pMac,
("Link is already setup with this peer" )) ;
VOS_TRACE(VOS_MODULE_ID_PE, VOS_TRACE_LEVEL_ERROR,
("state = %d"), tmpSetupPeer->tdls_link_state) ;
- //return eSIR_FAILURE ;
if(tmpSetupPeer == NULL)
{
@@ -3426,7 +3271,7 @@ static tSirRetStatus limProcessTdlsSetupReqFrame(tpAniSirGlobal pMac,
break ;
}
-#if 1
+
case TDLS_LINK_SETUP_DONE_STATE:
{
tpDphHashNode pStaDs = NULL ;
@@ -3438,12 +3283,6 @@ static tSirRetStatus limProcessTdlsSetupReqFrame(tpAniSirGlobal pMac,
tmpSetupPeer->tdls_prev_link_state = previousState ;
tmpSetupPeer->tdls_link_state = currentState ;
setupPeer = tmpSetupPeer ;
-#if 0
- /* Send Teardown to this Peer and Initiate new TDLS Setup */
- limSendTdlsTeardownFrame(pMac,
- &tdlsSetupReq.LinkIdentifier.InitStaAddr[0],
- eSIR_MAC_TDLS_TEARDOWN_UNSPEC_REASON, psessionEntry) ;
-#else
/* tdls_hklee: send message to HAL before it is deleted, cause */
limTdlsLinkTeardown(pMac, (setupPeer)->peerMac) ;
@@ -3464,8 +3303,6 @@ static tSirRetStatus limProcessTdlsSetupReqFrame(tpAniSirGlobal pMac,
/* remove node from setup list */
limTdlsDelLinkPeer(pMac, (setupPeer)->peerMac) ;
}
-#endif
- //setupPeer->tdls_prev_link_state = TDLS_LINK_SETUP_RESTART_STATE;
tdlsStateStatus = TDLS_LINK_IDLE_STATE ;
break ;
@@ -3477,7 +3314,6 @@ static tSirRetStatus limProcessTdlsSetupReqFrame(tpAniSirGlobal pMac,
("link Setup is Recieved in unknown state" )) ;
break ;
}
-#endif
}
if(tdlsStateStatus == TDLS_LINK_SETUP_START_STATE)
return eSIR_FAILURE ;
@@ -3499,8 +3335,6 @@ static tSirRetStatus limProcessTdlsSetupReqFrame(tpAniSirGlobal pMac,
}
setupPeer->dialog = tdlsSetupReq.DialogToken.token ;
- //setupPeer->tdls_prev_link_state = setupPeer->tdls_link_state ;
- //setupPeer->tdls_link_state = TDLS_LINK_SETUP_WAIT_STATE ;
setupPeer->tdls_prev_link_state = previousState ;
setupPeer->tdls_link_state = currentState ;
/* TDLS_sessionize: remember sessionId for future */
@@ -3544,8 +3378,6 @@ static tSirRetStatus limProcessTdlsSetupReqFrame(tpAniSirGlobal pMac,
else
{
setupPeer->dialog = tdlsSetupReq.DialogToken.token ;
- //setupPeer->tdls_prev_link_state = setupPeer->tdls_link_state ;
- //setupPeer->tdls_link_state = TDLS_LINK_SETUP_WAIT_STATE ;
setupPeer->tdls_prev_link_state = previousState ;
setupPeer->tdls_link_state = currentState ;
/* TDLS_sessionize: remember sessionId for future */
@@ -3621,7 +3453,6 @@ static tSirRetStatus limProcessTdlsSetupRspFrame(tpAniSirGlobal pMac,
MAC_ADDRESS_STR")"),
MAC_ADDR_ARRAY(tdlsSetupRsp.LinkIdentifier.bssid));
- //VOS_ASSERT(0) ;
return eSIR_FAILURE;
}
@@ -3748,7 +3579,6 @@ static tSirRetStatus limProcessTdlsSetupCnfFrame(tpAniSirGlobal pMac,
MAC_ADDRESS_STR")"),
MAC_ADDR_ARRAY(tdlsSetupCnf.LinkIdentifier.bssid));
- //VOS_ASSERT(0) ;
return eSIR_FAILURE;
}
@@ -3971,7 +3801,6 @@ static tSirRetStatus limProcessTdlsTeardownFrame(tpAniSirGlobal pMac,
MAC_ADDRESS_STR")"),
MAC_ADDR_ARRAY(tdlsTeardown.LinkIdentifier.bssid));
- //VOS_ASSERT(0) ;
return eSIR_FAILURE;
}
@@ -3994,8 +3823,6 @@ static tSirRetStatus limProcessTdlsTeardownFrame(tpAniSirGlobal pMac,
if(NULL == setupPeer)
{
- //ignore
- //VOS_ASSERT(0) ;
limLog( pMac, LOGE, FL("Teardown from unknown peer. --> ignored") );
return eSIR_FAILURE ;
@@ -4072,7 +3899,6 @@ void limProcessTdlsFrame(tpAniSirGlobal pMac, tANI_U32 *pBd)
tANI_U8 action = (pBody + pOffset + PAYLOAD_TYPE_TDLS_SIZE)[1] ;
tANI_U32 frameLen = WDA_GET_RX_PAYLOAD_LEN(pBd) ;
tANI_U8 *tdlsFrameBody = (pBody + pOffset + PAYLOAD_TYPE_TDLS_SIZE) ;
- //tANI_S8 rssi = (tANI_S8)SIR_MAC_BD_TO_RSSI_DB(pBd);
if(category != SIR_MAC_ACTION_TDLS)
{
@@ -4409,16 +4235,10 @@ static tSirRetStatus limTdlsLinkEstablish(tpAniSirGlobal pMac, tSirMacAddr peerM
tdlsPtiTemplate.Category.category = SIR_MAC_ACTION_TDLS;
tdlsPtiTemplate.Action.action = SIR_MAC_TDLS_PEER_TRAFFIC_IND;
tdlsPtiTemplate.DialogToken.token = 0 ; /* filled by firmware at the time of transmission */
-#if 1
/* CHECK_PTI_LINK_IDENTIFIER_INITIATOR_ADDRESS: initator address should be TDLS link setup's initiator address,
then below code makes such an way */
PopulateDot11fLinkIden( pMac, psessionEntry, &tdlsPtiTemplate.LinkIdentifier,
peerMac, !setupPeer->tdls_bIsResponder) ;
-#else
- /* below code will make PTI's linkIdentifier's initiator address be selfAddr */
- PopulateDot11fLinkIden( pMac, psessionEntry, &tdlsPtiTemplate.LinkIdentifier,
- peerMac, TDLS_INITIATOR) ;
-#endif
/* PUBufferStatus will be filled by firmware at the time of transmission */
tdlsPtiTemplate.PUBufferStatus.present = 1;
@@ -4765,7 +4585,6 @@ static eHalStatus limSendSmeTdlsDelPeerInd(tpAniSirGlobal pMac,
mmhMsg.bodyptr = peerInd ;
- //peerInd->statusCode = status ;
mmhMsg.bodyval = 0;
limSysProcessMmhMsgApi(pMac, &mmhMsg, ePROT);
return eSIR_SUCCESS ;
@@ -5098,7 +4917,6 @@ void PopulateDot11fLinkIden(tpAniSirGlobal pMac, tpPESession psessionEntry,
tDot11fIELinkIdentifier *linkIden,
tSirMacAddr peerMac, tANI_U8 reqType)
{
- //tANI_U32 size = sizeof(tSirMacAddr) ;
tANI_U8 *initStaAddr = NULL ;
tANI_U8 *respStaAddr = NULL ;
diff --git a/CORE/MAC/src/pe/lim/limPropExtsUtils.c b/CORE/MAC/src/pe/lim/limPropExtsUtils.c
index a077224fd115..52ee4967380d 100644
--- a/CORE/MAC/src/pe/lim/limPropExtsUtils.c
+++ b/CORE/MAC/src/pe/lim/limPropExtsUtils.c
@@ -181,14 +181,6 @@ limExtractApCapability(tpAniSirGlobal pMac, tANI_U8 *pIE, tANI_U16 ieLen,
}
#endif
if (pBeaconStruct->powerConstraintPresent)
-#if 0
- //Remove this check. This function is expected to return localPowerConsraints
- //and it should just do that. Check for 11h enabled or not can be done at the caller
-#if defined WLAN_FEATURE_VOWIFI
- && ( pMac->lim.gLim11hEnable
- || pMac->rrm.rrmPEContext.rrmEnable
-#endif
-#endif
{
#if defined WLAN_FEATURE_VOWIFI
*localConstraint -= pBeaconStruct->localPowerConstraint.localPowerConstraints;
diff --git a/CORE/MAC/src/pe/lim/limScanResultUtils.c b/CORE/MAC/src/pe/lim/limScanResultUtils.c
index 7a7435cd7c50..69789ffdbcfa 100644
--- a/CORE/MAC/src/pe/lim/limScanResultUtils.c
+++ b/CORE/MAC/src/pe/lim/limScanResultUtils.c
@@ -296,7 +296,6 @@ limCollectBssDescription(tpAniSirGlobal pMac,
/*set channel number in beacon in case it is not present*/
pBPR->channelNumber = pBssDescr->channelId;
- //sirDumpBuf( pMac, SIR_LIM_MODULE_ID, LOGW, (tANI_U8 *) pBssDescr, pBssDescr->length + 2 );
limLog( pMac, LOG3,
FL("Collected BSS Description for Channel(%1d), length(%u), aniIndicator(%d), IE Fields(%u)"),
pBssDescr->channelId,
diff --git a/CORE/MAC/src/pe/lim/limSecurityUtils.c b/CORE/MAC/src/pe/lim/limSecurityUtils.c
index 9cd9567c0c2b..8f8c10f78114 100644
--- a/CORE/MAC/src/pe/lim/limSecurityUtils.c
+++ b/CORE/MAC/src/pe/lim/limSecurityUtils.c
@@ -924,11 +924,6 @@ tANI_U32 val = 0;
SET_LIM_PROCESS_DEFD_MESGS(pMac, false);
msgQ.type = WDA_SET_BSSKEY_REQ;
- //
- // FIXME_GEN4
- // A global counter (dialog token) is required to keep track of
- // all PE <-> HAL communication(s)
- //
msgQ.reserved = 0;
msgQ.bodyptr = pSetBssKeyParams;
msgQ.bodyval = 0;
@@ -1097,11 +1092,6 @@ void limSendSetStaKeyReq( tpAniSirGlobal pMac,
pSetStaKeyParams->sendRsp = sendRsp;
- //
- // FIXME_GEN4
- // A global counter (dialog token) is required to keep track of
- // all PE <-> HAL communication(s)
- //
msgQ.reserved = 0;
msgQ.bodyptr = pSetStaKeyParams;
msgQ.bodyval = 0;
@@ -1174,11 +1164,6 @@ tSirRetStatus retCode;
pRemoveBssKeyParams->sessionId = psessionEntry->peSessionId;
msgQ.type = WDA_REMOVE_BSSKEY_REQ;
- //
- // FIXME_GEN4
- // A global counter (dialog token) is required to keep track of
- // all PE <-> HAL communication(s)
- //
msgQ.reserved = 0;
msgQ.bodyptr = pRemoveBssKeyParams;
msgQ.bodyval = 0;
@@ -1272,11 +1257,6 @@ tSirRetStatus retCode;
SET_LIM_PROCESS_DEFD_MESGS(pMac, false);
msgQ.type = WDA_REMOVE_STAKEY_REQ;
- //
- // FIXME_GEN4
- // A global counter (dialog token) is required to keep track of
- // all PE <-> HAL communication(s)
- //
msgQ.reserved = 0;
msgQ.bodyptr = pRemoveStaKeyParams;
msgQ.bodyval = 0;
diff --git a/CORE/MAC/src/pe/lim/limSendManagementFrames.c b/CORE/MAC/src/pe/lim/limSendManagementFrames.c
index 244472a14745..c32acd7a005c 100644
--- a/CORE/MAC/src/pe/lim/limSendManagementFrames.c
+++ b/CORE/MAC/src/pe/lim/limSendManagementFrames.c
@@ -614,7 +614,7 @@ limSendProbeReqMgmtFrame(tpAniSirGlobal pMac,
halstatus = halTxFrame( pMac, pPacket, ( tANI_U16 ) sizeof(tSirMacMgmtHdr) + nPayload,
HAL_TXRX_FRM_802_11_MGMT,
ANI_TXDIR_TODS,
- 7,//SMAC_SWBD_TX_TID_MGMT_HIGH,
+ 7,
limTxComplete, pFrame, txFlag, smeSessionId );
if ( ! HAL_STATUS_SUCCESS ( halstatus ) )
{
@@ -1053,7 +1053,7 @@ limSendProbeRspMgmtFrame(tpAniSirGlobal pMac,
( tANI_U16 ) nBytes,
HAL_TXRX_FRM_802_11_MGMT,
ANI_TXDIR_TODS,
- 7,//SMAC_SWBD_TX_TID_MGMT_LOW,
+ 7,
limTxComplete, pFrame, txFlag, smeSessionId );
if ( ! HAL_STATUS_SUCCESS ( halstatus ) )
{
@@ -1306,7 +1306,7 @@ limSendAddtsReqActionFrame(tpAniSirGlobal pMac,
halstatus = halTxFrame( pMac, pPacket, ( tANI_U16 ) nBytes,
HAL_TXRX_FRM_802_11_MGMT,
ANI_TXDIR_TODS,
- 7,//SMAC_SWBD_TX_TID_MGMT_HIGH,
+ 7,
limTxComplete, pFrame, txFlag, smeSessionId );
MTRACE(vos_trace(VOS_MODULE_ID_PE, TRACE_CODE_TX_COMPLETE,
psessionEntry->peSessionId, halstatus));
@@ -1410,16 +1410,6 @@ limSendAssocRspMgmtFrame(tpAniSirGlobal pMac,
if ( ( ! pSta->aniPeer ) || ( ! PROP_CAPABILITY_GET( 11EQOS, pSta->propCapability ) ) )
{
PopulateDot11fEDCAParamSet( pMac, &frm.EDCAParamSet, psessionEntry);
-
-// FramesToDo:...
-// if ( fAddTS )
-// {
-// tANI_U8 *pAf = pBody;
-// *pAf++ = SIR_MAC_QOS_ACTION_EID;
-// tANI_U32 tlen;
-// status = sirAddtsRspFill(pMac, pAf, statusCode, &pSta->qos.addts, NULL,
-// &tlen, bufLen - frameLen);
-// } // End if on Add TS.
}
} // End if on .11e enabled in 'pSta'.
} // End if on QOS Mode on.
@@ -1668,7 +1658,7 @@ limSendAssocRspMgmtFrame(tpAniSirGlobal pMac,
halstatus = halTxFrame( pMac, pPacket, ( tANI_U16 ) nBytes,
HAL_TXRX_FRM_802_11_MGMT,
ANI_TXDIR_TODS,
- 7,//SMAC_SWBD_TX_TID_MGMT_HIGH,
+ 7,
limTxComplete, pFrame, txFlag, smeSessionId );
MTRACE(vos_trace(VOS_MODULE_ID_PE, TRACE_CODE_TX_COMPLETE,
psessionEntry->peSessionId, halstatus));
@@ -1943,7 +1933,7 @@ limSendAddtsRspActionFrame(tpAniSirGlobal pMac,
halstatus = halTxFrame( pMac, pPacket, ( tANI_U16 ) nBytes,
HAL_TXRX_FRM_802_11_MGMT,
ANI_TXDIR_TODS,
- 7,//SMAC_SWBD_TX_TID_MGMT_HIGH,
+ 7,
limTxComplete, pFrame, txFlag, smeSessionId );
MTRACE(vos_trace(VOS_MODULE_ID_PE, TRACE_CODE_TX_COMPLETE,
psessionEntry->peSessionId, halstatus));
@@ -2120,7 +2110,7 @@ limSendDeltsReqActionFrame(tpAniSirGlobal pMac,
halstatus = halTxFrame( pMac, pPacket, ( tANI_U16 ) nBytes,
HAL_TXRX_FRM_802_11_MGMT,
ANI_TXDIR_TODS,
- 7,//SMAC_SWBD_TX_TID_MGMT_HIGH,
+ 7,
limTxComplete, pFrame, txFlag, smeSessionId );
MTRACE(vos_trace(VOS_MODULE_ID_PE, TRACE_CODE_TX_COMPLETE,
psessionEntry->peSessionId, halstatus));
@@ -2492,13 +2482,10 @@ limSendAssocReqMgmtFrame(tpAniSirGlobal pMac,
PELOG1(limLog( pMac, LOG1, FL("*** Sending Association Request length %d"
"to "),
nBytes );)
- // limPrintMacAddr( pMac, bssid, LOG1 );
-
- if( psessionEntry->assocReq != NULL )
- {
- vos_mem_free(psessionEntry->assocReq);
- psessionEntry->assocReq = NULL;
- }
+ if (psessionEntry->assocReq != NULL) {
+ vos_mem_free(psessionEntry->assocReq);
+ psessionEntry->assocReq = NULL;
+ }
if( nAddIELen )
{
@@ -2540,7 +2527,7 @@ limSendAssocReqMgmtFrame(tpAniSirGlobal pMac,
halstatus = halTxFrame( pMac, pPacket, ( tANI_U16 ) (sizeof(tSirMacMgmtHdr) + nPayload),
HAL_TXRX_FRM_802_11_MGMT,
ANI_TXDIR_TODS,
- 7,//SMAC_SWBD_TX_TID_MGMT_HIGH,
+ 7,
limTxComplete, pFrame, txFlag, smeSessionId );
MTRACE(vos_trace(VOS_MODULE_ID_PE, TRACE_CODE_TX_COMPLETE,
psessionEntry->peSessionId, halstatus));
@@ -2999,7 +2986,7 @@ limSendReassocReqWithFTIEsMgmtFrame(tpAniSirGlobal pMac,
halstatus = halTxFrame( pMac, pPacket, ( tANI_U16 ) (nBytes + ft_ies_length),
HAL_TXRX_FRM_802_11_MGMT,
ANI_TXDIR_TODS,
- 7,//SMAC_SWBD_TX_TID_MGMT_HIGH,
+ 7,
limTxComplete, pFrame, txFlag, smeSessionId );
MTRACE(vos_trace(VOS_MODULE_ID_PE, TRACE_CODE_TX_COMPLETE,
psessionEntry->peSessionId, halstatus));
@@ -3378,7 +3365,7 @@ limSendReassocReqMgmtFrame(tpAniSirGlobal pMac,
halstatus = halTxFrame( pMac, pPacket, ( tANI_U16 ) (sizeof(tSirMacMgmtHdr) + nPayload),
HAL_TXRX_FRM_802_11_MGMT,
ANI_TXDIR_TODS,
- 7,//SMAC_SWBD_TX_TID_MGMT_HIGH,
+ 7,
limTxComplete, pFrame, txFlag, smeSessionId );
MTRACE(vos_trace(VOS_MODULE_ID_PE, TRACE_CODE_TX_COMPLETE,
psessionEntry->peSessionId, halstatus));
@@ -3720,7 +3707,7 @@ limSendAuthMgmtFrame(tpAniSirGlobal pMac,
halstatus = halTxFrame( pMac, pPacket, ( tANI_U16 ) frameLen,
HAL_TXRX_FRM_802_11_MGMT,
ANI_TXDIR_TODS,
- 7,//SMAC_SWBD_TX_TID_MGMT_HIGH,
+ 7,
limTxComplete, pFrame, txFlag, smeSessionId );
MTRACE(vos_trace(VOS_MODULE_ID_PE, TRACE_CODE_TX_COMPLETE,
psessionEntry->peSessionId, halstatus));
@@ -4061,7 +4048,7 @@ limSendDisassocMgmtFrame(tpAniSirGlobal pMac,
halstatus = halTxFrameWithTxComplete( pMac, pPacket, ( tANI_U16 ) nBytes,
HAL_TXRX_FRM_802_11_MGMT,
ANI_TXDIR_TODS,
- 7,//SMAC_SWBD_TX_TID_MGMT_HIGH,
+ 7,
limTxComplete, pFrame, limDisassocTxCompleteCnf,
txFlag, smeSessionId, false );
MTRACE(vos_trace(VOS_MODULE_ID_PE, TRACE_CODE_TX_COMPLETE,
@@ -4094,7 +4081,7 @@ limSendDisassocMgmtFrame(tpAniSirGlobal pMac,
halstatus = halTxFrame( pMac, pPacket, ( tANI_U16 ) nBytes,
HAL_TXRX_FRM_802_11_MGMT,
ANI_TXDIR_TODS,
- 7,//SMAC_SWBD_TX_TID_MGMT_HIGH,
+ 7,
limTxComplete, pFrame, txFlag, smeSessionId );
MTRACE(vos_trace(VOS_MODULE_ID_PE, TRACE_CODE_TX_COMPLETE,
psessionEntry->peSessionId, halstatus));
@@ -4257,7 +4244,7 @@ limSendDeauthMgmtFrame(tpAniSirGlobal pMac,
halstatus = halTxFrameWithTxComplete( pMac, pPacket, ( tANI_U16 ) nBytes,
HAL_TXRX_FRM_802_11_MGMT,
ANI_TXDIR_TODS,
- 7,//SMAC_SWBD_TX_TID_MGMT_HIGH,
+ 7,
limTxComplete, pFrame, limDeauthTxCompleteCnf, txFlag,
smeSessionId, false );
MTRACE(vos_trace(VOS_MODULE_ID_PE, TRACE_CODE_TX_COMPLETE,
@@ -4306,7 +4293,7 @@ limSendDeauthMgmtFrame(tpAniSirGlobal pMac,
halstatus = halTxFrame( pMac, pPacket, ( tANI_U16 ) nBytes,
HAL_TXRX_FRM_802_11_MGMT,
ANI_TXDIR_IBSS,
- 7,//SMAC_SWBD_TX_TID_MGMT_HIGH,
+ 7,
limTxComplete, pFrame, txFlag, smeSessionId );
}
else
@@ -4316,7 +4303,7 @@ limSendDeauthMgmtFrame(tpAniSirGlobal pMac,
halstatus = halTxFrame( pMac, pPacket, ( tANI_U16 ) nBytes,
HAL_TXRX_FRM_802_11_MGMT,
ANI_TXDIR_TODS,
- 7,//SMAC_SWBD_TX_TID_MGMT_HIGH,
+ 7,
limTxComplete, pFrame, txFlag, smeSessionId );
#ifdef FEATURE_WLAN_TDLS
}
@@ -4467,7 +4454,7 @@ limSendMeasReportFrame(tpAniSirGlobal pMac,
halstatus = halTxFrame( pMac, pPacket, ( tANI_U16 ) nBytes,
HAL_TXRX_FRM_802_11_MGMT,
ANI_TXDIR_TODS,
- 7,//SMAC_SWBD_TX_TID_MGMT_HIGH,
+ 7,
limTxComplete, pFrame, 0 );
MTRACE(vos_trace(VOS_MODULE_ID_PE, TRACE_CODE_TX_COMPLETE,
((psessionEntry)? psessionEntry->peSessionId : NO_SESSION),
@@ -4588,7 +4575,7 @@ limSendTpcRequestFrame(tpAniSirGlobal pMac,
halstatus = halTxFrame( pMac, pPacket, ( tANI_U16 ) nBytes,
HAL_TXRX_FRM_802_11_MGMT,
ANI_TXDIR_TODS,
- 7,//SMAC_SWBD_TX_TID_MGMT_HIGH,
+ 7,
limTxComplete, pFrame, 0 );
MTRACE(vos_trace(VOS_MODULE_ID_PE, TRACE_CODE_TX_COMPLETE,
((psessionEntry)? psessionEntry->peSessionId : NO_SESSION),
@@ -4638,10 +4625,6 @@ limSendTpcReportFrame(tpAniSirGlobal pMac,
frm.Action.action = SIR_MAC_ACTION_TPC_REPORT_ID;
frm.DialogToken.token = pTpcReqFrame->actionHeader.dialogToken;
- // FramesToDo: On the Gen4_TVM branch, there was a comment:
- // "misplaced this function, need to replace:
- // txPower = halGetRateToPwrValue(pMac, staid,
- // pMac->lim.gLimCurrentChannelId, 0);
frm.TPCReport.tx_power = 0;
frm.TPCReport.link_margin = 0;
frm.TPCReport.present = 1;
@@ -4717,7 +4700,7 @@ limSendTpcReportFrame(tpAniSirGlobal pMac,
halstatus = halTxFrame( pMac, pPacket, ( tANI_U16 ) nBytes,
HAL_TXRX_FRM_802_11_MGMT,
ANI_TXDIR_TODS,
- 7,//SMAC_SWBD_TX_TID_MGMT_HIGH,
+ 7,
limTxComplete, pFrame, 0 );
MTRACE(vos_trace(VOS_MODULE_ID_PE, TRACE_CODE_TX_COMPLETE,
((psessionEntry)? psessionEntry->peSessionId : NO_SESSION),
@@ -4869,7 +4852,7 @@ limSendChannelSwitchMgmtFrame(tpAniSirGlobal pMac,
halstatus = halTxFrame( pMac, pPacket, ( tANI_U16 ) nBytes,
HAL_TXRX_FRM_802_11_MGMT,
ANI_TXDIR_TODS,
- 7,//SMAC_SWBD_TX_TID_MGMT_HIGH,
+ 7,
limTxComplete, pFrame, txFlag, smeSessionId );
MTRACE(vos_trace(VOS_MODULE_ID_PE, TRACE_CODE_TX_COMPLETE,
psessionEntry->peSessionId, halstatus));
@@ -4998,7 +4981,7 @@ limSendVHTOpmodeNotificationFrame(tpAniSirGlobal pMac,
halstatus = halTxFrame( pMac, pPacket, ( tANI_U16 ) nBytes,
HAL_TXRX_FRM_802_11_MGMT,
ANI_TXDIR_TODS,
- 7,//SMAC_SWBD_TX_TID_MGMT_HIGH,
+ 7,
limTxComplete, pFrame, txFlag, smeSessionId );
MTRACE(vos_trace(VOS_MODULE_ID_PE, TRACE_CODE_TX_COMPLETE,
psessionEntry->peSessionId, halstatus));
@@ -5146,7 +5129,7 @@ limSendVHTChannelSwitchMgmtFrame(tpAniSirGlobal pMac,
halstatus = halTxFrame( pMac, pPacket, ( tANI_U16 ) nBytes,
HAL_TXRX_FRM_802_11_MGMT,
ANI_TXDIR_TODS,
- 7,//SMAC_SWBD_TX_TID_MGMT_HIGH,
+ 7,
limTxComplete, pFrame, txFlag, smeSessionId );
MTRACE(vos_trace(VOS_MODULE_ID_PE, TRACE_CODE_TX_COMPLETE,
psessionEntry->peSessionId, halstatus));
@@ -5334,7 +5317,7 @@ tSirRetStatus limSendAddBAReq( tpAniSirGlobal pMac,
(tANI_U16) frameLen,
HAL_TXRX_FRM_802_11_MGMT,
ANI_TXDIR_TODS,
- 7,//SMAC_SWBD_TX_TID_MGMT_HIGH,
+ 7,
limTxComplete,
pAddBAReqBuffer, txFlag, smeSessionId);
MTRACE(vos_trace(VOS_MODULE_ID_PE, TRACE_CODE_TX_COMPLETE,
@@ -5536,7 +5519,7 @@ tSirRetStatus limSendAddBARsp( tpAniSirGlobal pMac,
(tANI_U16) frameLen,
HAL_TXRX_FRM_802_11_MGMT,
ANI_TXDIR_TODS,
- 7,//SMAC_SWBD_TX_TID_MGMT_HIGH,
+ 7,
limTxComplete,
pAddBARspBuffer, txFlag, smeSessionId);
MTRACE(vos_trace(VOS_MODULE_ID_PE, TRACE_CODE_TX_COMPLETE,
@@ -5591,7 +5574,6 @@ tSirRetStatus limSendDelBAInd( tpAniSirGlobal pMac,
{
tDot11fDelBAInd frmDelBAInd;
tANI_U8 *pDelBAIndBuffer = NULL;
- //tANI_U32 val;
tpSirMacMgmtHdr pMacHdr;
tANI_U32 frameLen = 0, nStatus, nPayload;
tSirRetStatus statusCode;
@@ -5725,7 +5707,7 @@ tSirRetStatus limSendDelBAInd( tpAniSirGlobal pMac,
(tANI_U16) frameLen,
HAL_TXRX_FRM_802_11_MGMT,
ANI_TXDIR_TODS,
- 7,//SMAC_SWBD_TX_TID_MGMT_HIGH,
+ 7,
limTxComplete,
pDelBAIndBuffer, txFlag, smeSessionId);
MTRACE(vos_trace(VOS_MODULE_ID_PE, TRACE_CODE_TX_COMPLETE,
@@ -5896,7 +5878,7 @@ limSendNeighborReportRequestFrame(tpAniSirGlobal pMac,
(tANI_U16) nBytes,
HAL_TXRX_FRM_802_11_MGMT,
ANI_TXDIR_TODS,
- 7,//SMAC_SWBD_TX_TID_MGMT_HIGH,
+ 7,
limTxComplete,
pFrame, txFlag, smeSessionId);
MTRACE(vos_trace(VOS_MODULE_ID_PE, TRACE_CODE_TX_COMPLETE,
@@ -6069,7 +6051,7 @@ limSendLinkReportActionFrame(tpAniSirGlobal pMac,
(tANI_U16) nBytes,
HAL_TXRX_FRM_802_11_MGMT,
ANI_TXDIR_TODS,
- 7,//SMAC_SWBD_TX_TID_MGMT_HIGH,
+ 7,
limTxComplete,
pFrame, txFlag, smeSessionId);
MTRACE(vos_trace(VOS_MODULE_ID_PE, TRACE_CODE_TX_COMPLETE,
@@ -6265,7 +6247,7 @@ limSendRadioMeasureReportActionFrame(tpAniSirGlobal pMac,
(tANI_U16) nBytes,
HAL_TXRX_FRM_802_11_MGMT,
ANI_TXDIR_TODS,
- 7,//SMAC_SWBD_TX_TID_MGMT_HIGH,
+ 7,
limTxComplete,
pFrame, txFlag, smeSessionId);
MTRACE(vos_trace(VOS_MODULE_ID_PE, TRACE_CODE_TX_COMPLETE,
@@ -6426,7 +6408,7 @@ tSirRetStatus limSendSaQueryRequestFrame( tpAniSirGlobal pMac, tANI_U8 *transId,
(tANI_U16) nBytes,
HAL_TXRX_FRM_802_11_MGMT,
ANI_TXDIR_TODS,
- 7,//SMAC_SWBD_TX_TID_MGMT_HIGH,
+ 7,
limTxComplete,
pFrame, txFlag, smeSessionId);
if ( eHAL_STATUS_SUCCESS != halstatus )
@@ -6579,7 +6561,7 @@ tSirMacAddr peer,tpPESession psessionEntry)
(tANI_U16) nBytes,
HAL_TXRX_FRM_802_11_MGMT,
ANI_TXDIR_TODS,
- 7,//SMAC_SWBD_TX_TID_MGMT_HIGH,
+ 7,
limTxComplete,
pFrame, txFlag, smeSessionId );
MTRACE(vos_trace(VOS_MODULE_ID_PE, TRACE_CODE_TX_COMPLETE,
@@ -6600,4 +6582,3 @@ returnAfterError:
return nSirStatus;
} // End limSendSaQueryResponseFrame
#endif
-
diff --git a/CORE/MAC/src/pe/lim/limSendMessages.c b/CORE/MAC/src/pe/lim/limSendMessages.c
index aa124efcfc62..df4895de5c35 100644
--- a/CORE/MAC/src/pe/lim/limSendMessages.c
+++ b/CORE/MAC/src/pe/lim/limSendMessages.c
@@ -482,22 +482,6 @@ tSirRetStatus limSendEdcaParams(tpAniSirGlobal pMac, tSirMacEdcaParamRecord *pUp
\param tSirLinkState state
\return None
-----------------------------------------------------------*/
- //Original code with out anu's change
-#if 0
-tSirRetStatus limSetLinkState(tpAniSirGlobal pMac, tSirLinkState state,tSirMacAddr bssId)
-{
- tSirMsgQ msg;
- tSirRetStatus retCode;
- msg.type = WDA_SET_LINK_STATE;
- msg.bodyval = (tANI_U32) state;
- msg.bodyptr = NULL;
- MTRACE(macTraceMsgTx(pMac, 0, msg.type));
- retCode = wdaPostCtrlMsg(pMac, &msg);
- if (retCode != eSIR_SUCCESS)
- limLog(pMac, LOGP, FL("Posting link state %d failed, reason = %x "), retCode);
- return retCode;
-}
-#endif //0
tSirRetStatus limSetLinkState(tpAniSirGlobal pMac, tSirLinkState state,tSirMacAddr bssId,
tSirMacAddr selfMacAddr, tpSetLinkStateCallback callback,
void *callbackArg)
diff --git a/CORE/MAC/src/pe/lim/limSendSmeRspMessages.c b/CORE/MAC/src/pe/lim/limSendSmeRspMessages.c
index 254677e6367a..c29120472dbe 100644
--- a/CORE/MAC/src/pe/lim/limSendSmeRspMessages.c
+++ b/CORE/MAC/src/pe/lim/limSendSmeRspMessages.c
@@ -707,14 +707,7 @@ limSendSmeStartBssRsp(tpAniSirGlobal pMac,
limGetPhyMode(pMac, (tANI_U32 *)&pSirSmeRsp->bssDescription.nwType, psessionEntry);
-#if 0
- if (wlan_cfgGetInt(pMac, WNI_CFG_CURRENT_CHANNEL, &len) != eSIR_SUCCESS)
- limLog(pMac, LOGP, FL("could not retrieve CURRENT_CHANNEL from CFG"));
-
-#endif// TO SUPPORT BT-AMP
-
pSirSmeRsp->bssDescription.channelId = psessionEntry->currentOperChannel;
-
pSirSmeRsp->bssDescription.aniIndicator = 1;
curLen = psessionEntry->schBeaconOffsetBegin - ieOffset;
@@ -1398,45 +1391,6 @@ limSendSmeAuthRsp(tpAniSirGlobal pMac,
tpPESession psessionEntry,tANI_U8 smesessionId,
tANI_U16 smetransactionId)
{
-#if 0
- tSirMsgQ mmhMsg;
- tSirSmeAuthRsp *pSirSmeAuthRsp;
-
- pSirSmeAuthRsp = vos_mem_malloc(sizeof(tSirSmeAuthRsp));
- if (NULL == pSirSmeAuthRsp)
- {
- // Log error
- limLog(pMac, LOGP,
- FL("call to AllocateMemory failed for eWNI_SME_AUTH_RSP"));
-
- return;
- }
-
-
-
- if(psessionEntry != NULL)
- {
- vos_mem_copy( (tANI_U8 *) pSirSmeAuthRsp->peerMacAddr,
- (tANI_U8 *) peerMacAddr, sizeof(tSirMacAddr));
- pSirSmeAuthRsp->authType = authType;
-
- }
-
- pSirSmeAuthRsp->messageType = eWNI_SME_AUTH_RSP;
- pSirSmeAuthRsp->length = sizeof(tSirSmeAuthRsp);
- pSirSmeAuthRsp->statusCode = statusCode;
- pSirSmeAuthRsp->protStatusCode = protStatusCode;
-
- /* Update SME session and transaction Id*/
- pSirSmeAuthRsp->sessionId = smesessionId;
- pSirSmeAuthRsp->transactionId = smetransactionId;
-
- mmhMsg.type = eWNI_SME_AUTH_RSP;
- mmhMsg.bodyptr = pSirSmeAuthRsp;
- mmhMsg.bodyval = 0;
- MTRACE(macTraceMsgTx(pMac, 0, mmhMsg.type));
- limSysProcessMmhMsgApi(pMac, &mmhMsg, ePROT);
-#endif
} /*** end limSendSmeAuthRsp() ***/
@@ -2316,28 +2270,6 @@ limSendSmeRemoveKeyRsp(tpAniSirGlobal pMac,
void
limSendSmePromiscuousModeRsp(tpAniSirGlobal pMac)
{
-#if 0
- tSirMsgQ mmhMsg;
- tSirMbMsg *pMbMsg;
-
- pMbMsg = vos_mem_malloc(sizeof(tSirMbMsg));
- if ( NULL == pMbMsg )
- {
- // Log error
- limLog(pMac, LOGP, FL("call to AllocateMemory failed"));
-
- return;
- }
-
- pMbMsg->type = eWNI_SME_PROMISCUOUS_MODE_RSP;
- pMbMsg->msgLen = 4;
-
- mmhMsg.type = eWNI_SME_PROMISCUOUS_MODE_RSP;
- mmhMsg.bodyptr = pMbMsg;
- mmhMsg.bodyval = 0;
- MTRACE(macTraceMsgTx(pMac, 0, mmhMsg.type));
- limSysProcessMmhMsgApi(pMac, &mmhMsg, ePROT);
-#endif
} /*** end limSendSmePromiscuousModeRsp() ***/
@@ -2457,7 +2389,6 @@ limSendSmeAddtsRsp(tpAniSirGlobal pMac, tANI_U8 rspReqd, tANI_U32 status, tpPESe
rsp->messageType = eWNI_SME_ADDTS_RSP;
rsp->rc = status;
rsp->rsp.status = (enum eSirMacStatusCodes) status;
- //vos_mem_copy( (tANI_U8 *) &rsp->rsp.tspec, (tANI_U8 *) &addts->tspec, sizeof(addts->tspec));
rsp->rsp.tspec = tspec;
/* Update SME session Id and transcation Id */
rsp->sessionId = smesessionId;
@@ -2890,7 +2821,6 @@ limSendSmeIBSSPeerInd(
}
mmhMsg.type = msgType;
-// mmhMsg.bodyval = (tANI_U32) pNewPeerInd;
mmhMsg.bodyptr = pNewPeerInd;
MTRACE(macTraceMsgTx(pMac, sessionId, mmhMsg.type));
limSysProcessMmhMsgApi(pMac, &mmhMsg, ePROT);
diff --git a/CORE/MAC/src/pe/lim/limSerDesUtils.c b/CORE/MAC/src/pe/lim/limSerDesUtils.c
index c9f0a6f23654..ec8cb0ab7458 100644
--- a/CORE/MAC/src/pe/lim/limSerDesUtils.c
+++ b/CORE/MAC/src/pe/lim/limSerDesUtils.c
@@ -1916,16 +1916,6 @@ limSetContextReqSerDes(tpAniSirGlobal pMac, tpSirSmeSetContextReq pSetContextReq
if (limCheckRemainingLength(pMac, len) == eSIR_FAILURE)
return eSIR_FAILURE;
-
-// pSetContextReq->qosInfoPresent = limGetU32(pBuf);
-// pBuf += sizeof(tAniBool);
-
-// if (pSetContextReq->qosInfoPresent)
-// {
-// len = limGetQosInfo(&pSetContextReq->qos, pBuf);
-// pBuf += len;
-// }
-
pSetContextReq->keyMaterial.length = limGetU16(pBuf);
pBuf += sizeof(tANI_U16);
len -= sizeof(tANI_U16);
@@ -2269,10 +2259,6 @@ limDeauthReqSerDes(tpAniSirGlobal pMac, tSirSmeDeauthReq *pDeauthReq, tANI_U8 *p
} /*** end limDisassocReqSerDes() ***/
-
-
-
-
/**
* limStatSerDes()
*
diff --git a/CORE/MAC/src/pe/lim/limSmeReqUtils.c b/CORE/MAC/src/pe/lim/limSmeReqUtils.c
index 0eadbbddee29..42ebaf93f632 100644
--- a/CORE/MAC/src/pe/lim/limSmeReqUtils.c
+++ b/CORE/MAC/src/pe/lim/limSmeReqUtils.c
@@ -301,9 +301,6 @@ limSetRSNieWPAiefromSmeStartBSSReqMessage(tpAniSirGlobal pMac,
// Check validity of RSN IE
if ((pRSNie->rsnIEdata[0] == SIR_MAC_RSN_EID) &&
-#if 0 // Comparison always false
- (pRSNie->rsnIEdata[1] > SIR_MAC_RSN_IE_MAX_LENGTH) ||
-#endif
(pRSNie->rsnIEdata[1] < SIR_MAC_RSN_IE_MIN_LENGTH))
{
limLog(pMac, LOGE, FL("RSN IE len %d not [%d,%d]"),
@@ -354,9 +351,6 @@ limSetRSNieWPAiefromSmeStartBSSReqMessage(tpAniSirGlobal pMac,
val = sirReadU32((tANI_U8 *) &pRSNie->rsnIEdata[wpaIndex + 2]);
if ((pRSNie->rsnIEdata[wpaIndex] == SIR_MAC_WPA_EID) &&
-#if 0 // Comparison always false
- (pRSNie->rsnIEdata[wpaIndex + 1] > SIR_MAC_WPA_IE_MAX_LENGTH) ||
-#endif
((pRSNie->rsnIEdata[wpaIndex + 1] < SIR_MAC_WPA_IE_MIN_LENGTH) ||
(SIR_MAC_WPA_OUI != val)))
{
diff --git a/CORE/MAC/src/pe/lim/limTimerUtils.c b/CORE/MAC/src/pe/lim/limTimerUtils.c
index 8e25b751d9cf..0c6ac73f99c7 100644
--- a/CORE/MAC/src/pe/lim/limTimerUtils.c
+++ b/CORE/MAC/src/pe/lim/limTimerUtils.c
@@ -1063,46 +1063,24 @@ limDeactivateAndChangeTimer(tpAniSirGlobal pMac, tANI_U32 timerId)
FL("Unable to deactivate min channel timer"));
}
-#if 0
- // If a background was triggered via Quiet BSS,
- // then we need to adjust the MIN and MAX channel
- // timer's accordingly to the Quiet duration that
- // was specified
- if( eLIM_QUIET_RUNNING == pMac->lim.gLimSpecMgmt.quietState &&
- pMac->lim.gLimTriggerBackgroundScanDuringQuietBss )
- {
- // gLimQuietDuration is already cached in units of
- // system ticks. No conversion is reqd...
- val = pMac->lim.gLimSpecMgmt.quietDuration;
- }
- else
- {
-#endif
- if(pMac->lim.gpLimMlmScanReq)
- {
- val = SYS_MS_TO_TICKS(pMac->lim.gpLimMlmScanReq->minChannelTime);
- if (pMac->btc.btcScanCompromise)
- {
- if (pMac->lim.gpLimMlmScanReq->minChannelTimeBtc)
- {
- val = SYS_MS_TO_TICKS(pMac->lim.gpLimMlmScanReq->minChannelTimeBtc);
- limLog(pMac, LOG1, FL("Using BTC Min Active Scan time"));
- }
- else
- {
- limLog(pMac, LOGE, FL("BTC Active Scan Min Time is Not Set"));
- }
+ if (pMac->lim.gpLimMlmScanReq) {
+ val =
+ SYS_MS_TO_TICKS(pMac->lim.gpLimMlmScanReq->minChannelTime);
+ if (pMac->btc.btcScanCompromise) {
+ if (pMac->lim.gpLimMlmScanReq->minChannelTimeBtc) {
+ val = SYS_MS_TO_TICKS(
+ pMac->lim.gpLimMlmScanReq->minChannelTimeBtc);
+ limLog(pMac, LOG1,
+ FL("Using BTC Min Active Scan time"));
+ } else {
+ limLog(pMac, LOGE,
+ FL("BTC Active Scan Min Time is Not Set"));
}
}
- else
- {
- limLog(pMac, LOGE, FL(" gpLimMlmScanReq is NULL "));
- //No need to change min timer. This is not a scan
- break;
- }
-#if 0
+ } else {
+ limLog(pMac, LOGE, FL("gpLimMlmScanReq is NULL"));
+ break;
}
-#endif
if (tx_timer_change(&pMac->lim.limTimers.gLimMinChannelTimer,
val, 0) != TX_SUCCESS)
@@ -1162,43 +1140,24 @@ limDeactivateAndChangeTimer(tpAniSirGlobal pMac, tANI_U32 timerId)
// was specified
if (pMac->lim.gLimSystemRole != eLIM_AP_ROLE)
{
-#if 0
-
- if( eLIM_QUIET_RUNNING == pMac->lim.gLimSpecMgmt.quietState &&
- pMac->lim.gLimTriggerBackgroundScanDuringQuietBss )
- {
- // gLimQuietDuration is already cached in units of
- // system ticks. No conversion is reqd...
- val = pMac->lim.gLimSpecMgmt.quietDuration;
- }
- else
- {
-#endif
- if(pMac->lim.gpLimMlmScanReq)
- {
- val = SYS_MS_TO_TICKS(pMac->lim.gpLimMlmScanReq->maxChannelTime);
- if (pMac->btc.btcScanCompromise)
- {
- if (pMac->lim.gpLimMlmScanReq->maxChannelTimeBtc)
- {
- val = SYS_MS_TO_TICKS(pMac->lim.gpLimMlmScanReq->maxChannelTimeBtc);
- limLog(pMac, LOG1, FL("Using BTC Max Active Scan time"));
- }
- else
- {
- limLog(pMac, LOGE, FL("BTC Active Scan Max Time is Not Set"));
- }
+ if (pMac->lim.gpLimMlmScanReq) {
+ val = SYS_MS_TO_TICKS(
+ pMac->lim.gpLimMlmScanReq->maxChannelTime);
+ if (pMac->btc.btcScanCompromise) {
+ if (pMac->lim.gpLimMlmScanReq->maxChannelTimeBtc) {
+ val = SYS_MS_TO_TICKS(
+ pMac->lim.gpLimMlmScanReq->maxChannelTimeBtc);
+ limLog(pMac, LOG1,
+ FL("Using BTC Max Active Scan time"));
+ } else {
+ limLog(pMac, LOGE,
+ FL("BTC Active Scan Max Time is Not Set"));
}
}
- else
- {
- limLog(pMac, LOGE, FL(" gpLimMlmScanReq is NULL "));
- //No need to change max timer. This is not a scan
- break;
- }
-#if 0
+ } else {
+ limLog(pMac, LOGE, FL("gpLimMlmScanReq is NULL"));
+ break;
}
-#endif
}
if (tx_timer_change(&pMac->lim.limTimers.gLimMaxChannelTimer,
@@ -2241,21 +2200,6 @@ limQuietBssTimerHandler(void *pMacGlobal, tANI_U32 param)
FL("Post SIR_LIM_QUIET_BSS_TIMEOUT msg. "));)
limPostMsgApi(pMac, &msg);
}
-#if 0
-void
-limWPSOverlapTimerHandler(void *pMacGlobal, tANI_U32 param)
-{
- tSirMsgQ msg;
- tpAniSirGlobal pMac = (tpAniSirGlobal)pMacGlobal;
-
- msg.type = SIR_LIM_WPS_OVERLAP_TIMEOUT;
- msg.bodyval = (tANI_U32)param;
- msg.bodyptr = NULL;
- PELOG1(limLog(pMac, LOG1,
- FL("Post SIR_LIM_WPS_OVERLAP_TIMEOUT msg. "));)
- limPostMsgApi(pMac, &msg);
-}
-#endif
#ifdef WLAN_ACTIVEMODE_OFFLOAD_FEATURE
/* ACTIVE_MODE_HB_OFFLOAD */
diff --git a/CORE/MAC/src/pe/lim/limTimerUtils.h b/CORE/MAC/src/pe/lim/limTimerUtils.h
index c0eaf51f8f1b..266a68fc5554 100644
--- a/CORE/MAC/src/pe/lim/limTimerUtils.h
+++ b/CORE/MAC/src/pe/lim/limTimerUtils.h
@@ -134,9 +134,6 @@ void limCBScanDurationTimerHandler(void *, tANI_U32);
*/
v_UINT_t limActivateHearBeatTimer(tpAniSirGlobal pMac, tpPESession psessionEntry);
-#if 0
-void limWPSOverlapTimerHandler(void *pMacGlobal, tANI_U32 param);
-#endif
#ifdef WLAN_ACTIVEMODE_OFFLOAD_FEATURE
void limMissedBeaconInActiveMode(void *pMacGlobal, tpPESession psessionEntry);
#endif
diff --git a/CORE/MAC/src/pe/lim/limTypes.h b/CORE/MAC/src/pe/lim/limTypes.h
index 31cc1d96d6b3..0816410ca0f1 100644
--- a/CORE/MAC/src/pe/lim/limTypes.h
+++ b/CORE/MAC/src/pe/lim/limTypes.h
@@ -840,10 +840,6 @@ tSirRetStatus limSendAddBARsp( tpAniSirGlobal pMac,
tSirRetStatus limSendDelBAInd( tpAniSirGlobal pMac,
tpLimMlmDelBAReq pMlmDelBAReq ,tpPESession psessionEntry);
-#if 0
-tSirRetStatus limSendSMPowerStateFrame( tpAniSirGlobal pMac,
- tSirMacAddr peer, tSirMacHTMIMOPowerSaveState State );
-#endif
void limProcessMlmHalAddBARsp( tpAniSirGlobal pMac,
tpSirMsgQ limMsgQ );
diff --git a/CORE/MAC/src/pe/lim/limUtils.c b/CORE/MAC/src/pe/lim/limUtils.c
index e865437fb420..3285446cb6b0 100644
--- a/CORE/MAC/src/pe/lim/limUtils.c
+++ b/CORE/MAC/src/pe/lim/limUtils.c
@@ -70,7 +70,6 @@
* this information. */
static tAniBool glimTriggerBackgroundScanDuringQuietBss_Status = eSIR_TRUE;
-//#define LIM_MAX_ACTIVE_SESSIONS 3 //defined temporarily for BT-AMP SUPPORT
#define SUCCESS 1 //defined temporarily for BT-AMP
#define MAX_BA_WINDOW_SIZE_FOR_CISCO 25
@@ -1051,8 +1050,6 @@ limCleanupMlm(tpAniSirGlobal pMac)
tx_timer_delete(&pAuthNode->timer);
}
-
-
// Deactivate and delete Hash Miss throttle timer
tx_timer_deactivate(&pMac->lim.limTimers.gLimSendDisassocFrameThresholdTimer);
tx_timer_delete(&pMac->lim.limTimers.gLimSendDisassocFrameThresholdTimer);
@@ -1062,17 +1059,6 @@ limCleanupMlm(tpAniSirGlobal pMac)
tx_timer_deactivate(&pMac->lim.limTimers.gLimPreAuthClnupTimer);
tx_timer_delete(&pMac->lim.limTimers.gLimPreAuthClnupTimer);
-#if 0 // The WPS PBC clean up timer is disabled
- if (pMac->lim.gLimSystemRole == eLIM_AP_ROLE)
- {
- if(pMac->lim.limTimers.gLimWPSOverlapTimerObj.isTimerCreated == eANI_BOOLEAN_TRUE)
- {
- tx_timer_deactivate(&pMac->lim.limTimers.gLimWPSOverlapTimerObj.gLimWPSOverlapTimer);
- tx_timer_delete(&pMac->lim.limTimers.gLimWPSOverlapTimerObj.gLimWPSOverlapTimer);
- pMac->lim.limTimers.gLimWPSOverlapTimerObj.isTimerCreated = eANI_BOOLEAN_FALSE;
- }
- }
-#endif
#ifdef WLAN_FEATURE_VOWIFI_11R
// Deactivate and delete FT Preauth response timer
tx_timer_deactivate(&pMac->lim.limTimers.gLimFTPreAuthRspTimer);
@@ -2904,8 +2890,6 @@ void limCancelDot11hQuiet(tpAniSirGlobal pMac, tpPESession psessionEntry)
*/
void limProcessQuietTimeout(tpAniSirGlobal pMac)
{
- //fetch the sessionEntry based on the sessionId
- //priority - MEDIUM
tpPESession psessionEntry;
if((psessionEntry = peFindSessionBySessionId(pMac, pMac->lim.limTimers.gLimQuietTimer.sessionId))== NULL)
@@ -3110,31 +3094,6 @@ void limProcessQuietBssTimeout( tpAniSirGlobal pMac )
*
* @return None
*/
-#if 0
-void limProcessWPSOverlapTimeout(tpAniSirGlobal pMac)
-{
-
- tpPESession psessionEntry;
- tANI_U32 sessionId;
-
- if (tx_timer_activate(&pMac->lim.limTimers.gLimWPSOverlapTimerObj.gLimWPSOverlapTimer) != TX_SUCCESS)
- {
- limLog(pMac, LOGP, FL("tx_timer_activate failed"));
- }
-
- sessionId = pMac->lim.limTimers.gLimWPSOverlapTimerObj.sessionId;
-
- PELOGE(limLog(pMac, LOGE, FL("WPS overlap timeout, sessionId=%d"), sessionId);)
-
- if((psessionEntry = peFindSessionBySessionId(pMac, sessionId)) == NULL)
- {
- PELOGE(limLog(pMac, LOGP,FL("Session Does not exist for given sessionID"));)
- return;
- }
-
- limWPSPBCTimeout(pMac, psessionEntry);
-}
-#endif
/**----------------------------------------------
\fn limStartQuietTimer
@@ -3290,7 +3249,6 @@ void limSwitchChannelCback(tpAniSirGlobal pMac, eHalStatus status,
pSirSmeSwitchChInd->length = sizeof(tSirSmeSwitchChannelInd);
pSirSmeSwitchChInd->newChannelId = psessionEntry->gLimChannelSwitch.primaryChannel;
pSirSmeSwitchChInd->sessionId = psessionEntry->smeSessionId;
- //BSS ID
vos_mem_copy( pSirSmeSwitchChInd->bssId, psessionEntry->bssId, sizeof(tSirMacAddr));
mmhMsg.bodyptr = pSirSmeSwitchChInd;
mmhMsg.bodyval = 0;
@@ -6284,11 +6242,6 @@ tSirMsgQ msgQ;
// Post WDA_ADDBA_REQ to HAL.
msgQ.type = WDA_ADDBA_REQ;
- //
- // FIXME_AMPDU
- // A global counter (dialog token) is required to keep track of
- // all PE <-> HAL communication(s)
- //
msgQ.reserved = 0;
msgQ.bodyptr = pAddBAParams;
msgQ.bodyval = 0;
@@ -6377,11 +6330,6 @@ tSirMsgQ msgQ;
// Post WDA_DELBA_IND to HAL.
msgQ.type = WDA_DELBA_IND;
- //
- // FIXME:
- // A global counter (dialog token) is required to keep track of
- // all PE <-> HAL communication(s)
- //
msgQ.reserved = 0;
msgQ.bodyptr = pDelBAParams;
msgQ.bodyval = 0;
@@ -7235,9 +7183,7 @@ tANI_U8 limGetCurrentOperatingChannel(tpAniSirGlobal pMac)
void limProcessAddStaRsp(tpAniSirGlobal pMac,tpSirMsgQ limMsgQ)
{
-
tpPESession psessionEntry;
-// tANI_U8 sessionId;
tpAddStaParams pAddStaParams;
pAddStaParams = (tpAddStaParams)limMsgQ->bodyptr;
diff --git a/CORE/MAC/src/pe/lim/limUtils.h b/CORE/MAC/src/pe/lim/limUtils.h
index 9efda6fffce5..107ab9d70c6b 100644
--- a/CORE/MAC/src/pe/lim/limUtils.h
+++ b/CORE/MAC/src/pe/lim/limUtils.h
@@ -205,10 +205,6 @@ void limUpdateChannelSwitch(tpAniSirGlobal, tpSirProbeRespBeacon, tpPESession ps
void limProcessQuietTimeout(tpAniSirGlobal);
void limProcessQuietBssTimeout(tpAniSirGlobal);
-#if 0
-void limProcessWPSOverlapTimeout(tpAniSirGlobal pMac);
-#endif
-
void limStartQuietTimer(tpAniSirGlobal pMac, tANI_U8 sessionId);
void limSwitchPrimaryChannel(tpAniSirGlobal, tANI_U8,tpPESession);
void limSwitchPrimarySecondaryChannel(tpAniSirGlobal, tpPESession, tANI_U8, ePhyChanBondState);
diff --git a/CORE/MAC/src/pe/pmm/pmmApi.c b/CORE/MAC/src/pe/pmm/pmmApi.c
index fa663f52b705..59faacfe941e 100644
--- a/CORE/MAC/src/pe/pmm/pmmApi.c
+++ b/CORE/MAC/src/pe/pmm/pmmApi.c
@@ -475,19 +475,6 @@ void pmmInitBmpsPwrSave(tpAniSirGlobal pMac)
* Heartbeat timer not running is an indication that PE have detected a
* loss of link. In this case, reject BMPS request.
*/
- /* TODO : We need to have a better check. This check is not valid */
-#if 0
- if ( (pMac->sys.gSysEnableLinkMonitorMode) && (pMac->lim.limTimers.gLimHeartBeatTimer.pMac) )
- {
- if(VOS_TRUE != tx_timer_running(&pMac->lim.limTimers.gLimHeartBeatTimer))
- {
- PELOGE(pmmLog(pMac, LOGE,
- FL("Reject BMPS_REQ because HeartBeatTimer is not running. "));)
- respStatus = eSIR_SME_BMPS_REQ_FAILED;
- goto failure;
- }
- }
-#endif
//If the following function returns SUCCESS, then PMM will wait for an explicit
//response message from softmac.
@@ -992,7 +979,6 @@ void pmmMissedBeaconHandler(tpAniSirGlobal pMac)
* actual timer has expired. This is done to make sure that there exists one
* common entry and exit points
*/
- //limResetHBPktCount(pMac); // 090805: Where did this come from?
limResetHBPktCount(psessionEntry); // 090805: This is what it SHOULD be. If we even need it.
pmmSendMessageToLim(pMac, SIR_LIM_HEART_BEAT_TIMEOUT);
}
@@ -1350,31 +1336,6 @@ pmmPostMessage(tpAniSirGlobal pMac, tpSirMsgQ pMsg)
void pmmUpdatePwrSaveStats(tpAniSirGlobal pMac)
{
-/*
- tANI_U64 TimeAwake = 0;
-
- pMac->pmm.BmpsSleepTimeStamp = vos_timer_get_system_ticks();
-
- if (pMac->pmm.BmpsWakeupTimeStamp)
- TimeAwake = (pMac->pmm.BmpsSleepTimeStamp - pMac->pmm.BmpsWakeupTimeStamp) /10;
- else
- TimeAwake = 0; // very first time
-
- if (TimeAwake > pMac->pmm.BmpsmaxTimeAwake)
- {
- pMac->pmm.BmpsmaxTimeAwake = TimeAwake;
- }
-
- if ((!pMac->pmm.BmpsminTimeAwake) || (TimeAwake < pMac->pmm.BmpsminTimeAwake))
- {
- pMac->pmm.BmpsminTimeAwake = TimeAwake;
- }
-
- pMac->pmm.BmpsavgTimeAwake = ( ( (pMac->pmm.BmpsavgTimeAwake * pMac->pmm.BmpscntSleep) + TimeAwake ) / (pMac->pmm.BmpscntSleep + 1) );
-
- pMac->pmm.BmpscntSleep++;
- return;
-*/
}
@@ -1397,28 +1358,6 @@ void pmmUpdatePwrSaveStats(tpAniSirGlobal pMac)
void pmmUpdateWakeupStats(tpAniSirGlobal pMac)
{
-/*
-
- tANI_U64 SleepTime = 0;
-
- pMac->pmm.BmpsWakeupTimeStamp = vos_timer_get_system_ticks();
- SleepTime = (pMac->pmm.BmpsWakeupTimeStamp - pMac->pmm.BmpsSleepTimeStamp) / 10;
-
- if (SleepTime > pMac->pmm.BmpsmaxSleepTime)
- {
- pMac->pmm.BmpsmaxSleepTime = SleepTime;
- }
-
- if ((!pMac->pmm.BmpsminSleepTime) || (SleepTime < pMac->pmm.BmpsminSleepTime))
- {
- pMac->pmm.BmpsminSleepTime = SleepTime;
- }
-
- pMac->pmm.BmpsavgSleepTime = ( ( (pMac->pmm.BmpsavgSleepTime * pMac->pmm.BmpscntAwake) + SleepTime ) / (pMac->pmm.BmpscntAwake + 1) );
-
- pMac->pmm.BmpscntAwake++;
- return;
-*/
}
// --------------------------------------------------------------------
@@ -1441,7 +1380,6 @@ void pmmUpdateWakeupStats(tpAniSirGlobal pMac)
*/
void pmmEnterImpsRequestHandler (tpAniSirGlobal pMac)
{
-
tSirResultCodes resultCode = eSIR_SME_SUCCESS;
tSirRetStatus retStatus = eSIR_SUCCESS;
tPmmState origState = pMac->pmm.gPmmState;
@@ -2147,17 +2085,6 @@ void pmmEnterWowlRequestHandler(tpAniSirGlobal pMac, tpSirMsgQ pMsg)
}
pMac->pmm.sessionId = peSessionId;
-// Need to fix it ASAP - TBH
-#if 0
- if (pMac->lim.gLimSmeState != eLIM_SME_LINK_EST_STATE)
- {
- pmmLog(pMac, LOGE, FL("Rcvd PMC_ENTER_WOWL_REQ when station is not associated "));
- limSendSmeRsp(pMac, eWNI_PMC_ENTER_WOWL_RSP, eSIR_SME_STA_NOT_ASSOCIATED, 0, 0);
- goto end;
- }
-#endif
-
-
if ((pMac->pmm.gPmmState != ePMM_STATE_BMPS_SLEEP) && (pMac->pmm.gPmmState != ePMM_STATE_WOWLAN))
{
pmmLog(pMac, LOGE, FL("Rcvd PMC_ENTER_WOWL_REQ in invalid Power Save state "));
@@ -2760,36 +2687,6 @@ tSirRetStatus pmmUapsdSendChangePwrSaveMsg (tpAniSirGlobal pMac, tANI_U8 mode)
void pmmImpsUpdatePwrSaveStats(tpAniSirGlobal pMac)
{
-/*
- tANI_U64 TimeAwake = 0;
-
- pMac->pmm.ImpsSleepTimeStamp = vos_timer_get_system_ticks();
-
- if (pMac->pmm.ImpsWakeupTimeStamp)
- {
- TimeAwake = (pMac->pmm.ImpsSleepTimeStamp - pMac->pmm.ImpsWakeupTimeStamp) / 10 ;
- }
- else
- {
- TimeAwake = 0;
- }
-
- if (TimeAwake > pMac->pmm.ImpsMaxTimeAwake)
- {
- pMac->pmm.ImpsMaxTimeAwake = TimeAwake;
- }
-
- if ((!pMac->pmm.ImpsMinTimeAwake) || (TimeAwake < pMac->pmm.ImpsMinTimeAwake))
- {
- pMac->pmm.ImpsMinTimeAwake = TimeAwake;
- }
-
- pMac->pmm.ImpsAvgTimeAwake = ((pMac->pmm.ImpsAvgTimeAwake * pMac->pmm.ImpsCntSleep) + TimeAwake) / (pMac->pmm.ImpsCntSleep + 1);
-
- (pMac->pmm.ImpsCntSleep)++;
-
- return;
-*/
}
@@ -2814,29 +2711,6 @@ void pmmImpsUpdatePwrSaveStats(tpAniSirGlobal pMac)
void pmmImpsUpdateWakeupStats (tpAniSirGlobal pMac)
{
-/*
- tANI_U64 SleepTime = 0;
-
- pMac->pmm.ImpsWakeupTimeStamp = vos_timer_get_system_ticks();
-
- SleepTime = (pMac->pmm.ImpsWakeupTimeStamp - pMac->pmm.ImpsSleepTimeStamp) / 10;
-
- if (SleepTime > pMac->pmm.ImpsMaxSleepTime)
- {
- pMac->pmm.ImpsMaxSleepTime = SleepTime;
- }
-
- if ((!pMac->pmm.ImpsMinSleepTime) || (SleepTime < pMac->pmm.ImpsMinSleepTime))
- {
- pMac->pmm.ImpsMinSleepTime = SleepTime;
- }
-
- pMac->pmm.ImpsAvgSleepTime = ( ( (pMac->pmm.ImpsAvgSleepTime * pMac->pmm.ImpsCntAwake) + SleepTime) / (pMac->pmm.ImpsCntAwake + 1));
-
- (pMac->pmm.ImpsCntAwake)++;
-
- return;
-*/
}
// Collects number of times error occurred while going to sleep mode
@@ -2936,28 +2810,6 @@ void pmmBmpsUpdateReqInInvalidRoleCnt(tpAniSirGlobal pMac)
return;
}
-#if 0
-// Update the sleep statistics
-void pmmUpdateDroppedPktStats(tpAniSirGlobal pMac)
-{
- switch (pMac->pmm.gPmmState)
- {
- case ePMM_STATE_BMPS_SLEEP:
- pmmBmpsUpdatePktDropStats(pMac);
- break;
-
- case ePMM_STATE_IMPS_SLEEP:
- pmmImpsUpdatePktDropStats(pMac);
- break;
-
- default:
- break;
- }
- return;
-
-}
-#endif
-
// Resets PMM state ePMM_STATE_READY
void pmmResetPmmState(tpAniSirGlobal pMac)
{
diff --git a/CORE/MAC/src/pe/rrm/rrmApi.c b/CORE/MAC/src/pe/rrm/rrmApi.c
index a914254167e2..271802d0682e 100644
--- a/CORE/MAC/src/pe/rrm/rrmApi.c
+++ b/CORE/MAC/src/pe/rrm/rrmApi.c
@@ -1134,9 +1134,6 @@ end:
void
rrmUpdateStartTSF ( tpAniSirGlobal pMac, tANI_U32 startTSF[2] )
{
-#if 0 //defined WLAN_VOWIFI_DEBUG
- limLog( pMac, LOGE, "Update Start TSF = %d %d", startTSF[0], startTSF[1] );
-#endif
pMac->rrm.rrmPEContext.startTSF[0] = startTSF[0];
pMac->rrm.rrmPEContext.startTSF[1] = startTSF[1];
}
@@ -1159,9 +1156,6 @@ rrmUpdateStartTSF ( tpAniSirGlobal pMac, tANI_U32 startTSF[2] )
void
rrmGetStartTSF ( tpAniSirGlobal pMac, tANI_U32 *pStartTSF )
{
-#if 0 //defined WLAN_VOWIFI_DEBUG
- limLog( pMac, LOGE, "Get the start TSF, TSF = %d %d ", pMac->rrm.rrmPEContext.startTSF[0], pMac->rrm.rrmPEContext.startTSF[1] );
-#endif
pStartTSF[0] = pMac->rrm.rrmPEContext.startTSF[0];
pStartTSF[1] = pMac->rrm.rrmPEContext.startTSF[1];
@@ -1271,8 +1265,6 @@ rrmInitialize(tpAniSirGlobal pMac)
pRRMCaps->BeaconTable = 1;
pRRMCaps->APChanReport = 1;
- //pRRMCaps->TCMCapability = 1;
- //pRRMCaps->triggeredTCM = 1;
pRRMCaps->operatingChanMax = 3;
pRRMCaps->nonOperatingChanMax = 3;
diff --git a/CORE/MAC/src/pe/sch/schApi.c b/CORE/MAC/src/pe/sch/schApi.c
index 4593aaf87aad..b05c952b9547 100644
--- a/CORE/MAC/src/pe/sch/schApi.c
+++ b/CORE/MAC/src/pe/sch/schApi.c
@@ -287,8 +287,6 @@ tSirRetStatus schSendBeaconReq( tpAniSirGlobal pMac, tANI_U8 *beaconPayload, tAN
msgQ.reserved = 0;
// Fill in tSendbeaconParams members
- /* Knock off all pMac global addresses */
- // limGetBssid( pMac, beaconParams->bssId);
vos_mem_copy(beaconParams->bssId, psessionEntry->bssId, sizeof(psessionEntry->bssId));
if (eLIM_STA_IN_IBSS_ROLE == psessionEntry->limSystemRole)
@@ -487,12 +485,6 @@ tANI_U32 limSendProbeRspTemplateToHal(tpAniSirGlobal pMac,tpPESession psessionEn
}
else
{
- /*
- PELOGE(sirDumpBuf(pMac, SIR_LIM_MODULE_ID, LOGE,
- pFrame2Hal,
- nBytes);)
- */
-
sirCopyMacAddr( pprobeRespParams->bssId, psessionEntry->bssId);
pprobeRespParams->pProbeRespTemplate = pFrame2Hal;
pprobeRespParams->probeRespTemplateLen = nBytes;
diff --git a/CORE/MAC/src/pe/sch/schBeaconGen.c b/CORE/MAC/src/pe/sch/schBeaconGen.c
index 844d6cb402be..e87d7f6b257f 100644
--- a/CORE/MAC/src/pe/sch/schBeaconGen.c
+++ b/CORE/MAC/src/pe/sch/schBeaconGen.c
@@ -230,10 +230,6 @@ tSirRetStatus schSetFixedBeaconFields(tpAniSirGlobal pMac,tpPESession psessionEn
for (i=0; i<6; i++)
mac->da[i] = 0xff;
- /* Knocking out Global pMac update */
- /* limGetMyMacAddr(pMac, mac->sa); */
- /* limGetBssid(pMac, mac->bssId); */
-
vos_mem_copy(mac->sa, psessionEntry->selfMacAddr, sizeof(psessionEntry->selfMacAddr));
vos_mem_copy(mac->bssId, psessionEntry->bssId, sizeof (psessionEntry->bssId));
@@ -616,13 +612,7 @@ void limUpdateProbeRspTemplateIeBitmapBeacon2(tpAniSirGlobal pMac,
vos_mem_copy((void *)&prb_rsp->RSNOpaque, (void *)&beacon2->RSNOpaque,
sizeof(beacon2->RSNOpaque));
}
-/*
- // BSS load
- if(beacon2->QBSSLoad.present)
- {
- SetProbeRspIeBitmap(DefProbeRspIeBitmap,SIR_MAC_QBSS_LOAD_EID);
- }
-*/
+
/* EDCA Parameter set */
if(beacon2->EDCAParamSet.present)
{
diff --git a/CORE/MAC/src/pe/sch/schBeaconProcess.c b/CORE/MAC/src/pe/sch/schBeaconProcess.c
index b4bbd210e82a..d1b03b881d89 100644
--- a/CORE/MAC/src/pe/sch/schBeaconProcess.c
+++ b/CORE/MAC/src/pe/sch/schBeaconProcess.c
@@ -831,7 +831,6 @@ tSirRetStatus schBeaconEdcaProcess(tpAniSirGlobal pMac, tSirMacEdcaParamSetIE *e
psessionEntry->gLimEdcaParams[EDCA_AC_BK] = edca->acbk;
psessionEntry->gLimEdcaParams[EDCA_AC_VI] = edca->acvi;
psessionEntry->gLimEdcaParams[EDCA_AC_VO] = edca->acvo;
-//log: LOG_WLAN_QOS_EDCA_C
#ifdef FEATURE_WLAN_DIAG_SUPPORT
WLAN_VOS_DIAG_LOG_ALLOC(log_ptr, vos_log_qos_edca_pkt_type, LOG_WLAN_QOS_EDCA_C);
if(log_ptr)
diff --git a/CORE/SAP/src/sapFsm.c b/CORE/SAP/src/sapFsm.c
index c3ee0bd8ebd4..eec80fa78487 100644
--- a/CORE/SAP/src/sapFsm.c
+++ b/CORE/SAP/src/sapFsm.c
@@ -1230,6 +1230,11 @@ sapDfsIsChannelInNolList(ptSapContext sapContext, v_U8_t channelNumber,
if (j < numChannels &&
i < pMac->sap.SapDfsInfo.numCurrentRegDomainDfsChannels)
{
+ if (numChannels > MAX_BONDED_CHANNELS) {
+ VOS_TRACE(VOS_MODULE_ID_SAP, VOS_TRACE_LEVEL_WARN,
+ FL( "numChannels > MAX_BONDED_CHANNELS so resetting"));
+ numChannels = MAX_BONDED_CHANNELS;
+ }
sapMarkDfsChannels(sapContext,
channels,
numChannels,
@@ -3579,6 +3584,12 @@ v_U8_t sapIndicateRadar(ptSapContext sapContext, tSirSmeDfsEventInd *dfs_event)
sapGet5GHzChannelList(sapContext);
+ if (dfs_event->chan_list.nchannels > SIR_DFS_MAX_20M_SUB_CH) {
+ VOS_TRACE(VOS_MODULE_ID_SAP, VOS_TRACE_LEVEL_WARN,
+ FL("nchannels >SIR_DFS_MAX_20M_SUB_CH so resetting"));
+ dfs_event->chan_list.nchannels = SIR_DFS_MAX_20M_SUB_CH;
+ }
+
sapMarkDfsChannels(sapContext, dfs_event->chan_list.channels,
dfs_event->chan_list.nchannels, vos_get_monotonic_boottime());
diff --git a/CORE/SERVICES/COMMON/ol_htt_tx_api.h b/CORE/SERVICES/COMMON/ol_htt_tx_api.h
index 03d816831094..323c71d0b2fa 100644
--- a/CORE/SERVICES/COMMON/ol_htt_tx_api.h
+++ b/CORE/SERVICES/COMMON/ol_htt_tx_api.h
@@ -45,6 +45,7 @@
#include <htt.h> /* needed by inline functions */
#include <adf_net_types.h>
#include <ol_htt_api.h> /* htt_pdev_handle */
+#include <htt_types.h>
/*================ meta-info about tx MSDUs =================================*/
diff --git a/CORE/SERVICES/WMA/wma.c b/CORE/SERVICES/WMA/wma.c
index a0678c08d8c9..611e4ee8defb 100644
--- a/CORE/SERVICES/WMA/wma.c
+++ b/CORE/SERVICES/WMA/wma.c
@@ -6111,15 +6111,16 @@ static ol_txrx_vdev_handle wma_vdev_attach(tp_wma_handle wma_handle,
} else {
WMA_LOGE("Failed to get value of HT_CAP, TX STBC unchanged");
}
- /* Initialize roaming offload state */
- if ((self_sta_req->type == WMI_VDEV_TYPE_STA) &&
- (self_sta_req->subType == 0)) {
- wma_handle->roam_offload_vdev_id = (A_UINT32) self_sta_req->sessionId;
- wma_handle->roam_offload_enabled = TRUE;
- wmi_unified_vdev_set_param_send(wma_handle->wmi_handle, wma_handle->roam_offload_vdev_id,
- WMI_VDEV_PARAM_ROAM_FW_OFFLOAD,
- (WMI_ROAM_FW_OFFLOAD_ENABLE_FLAG|WMI_ROAM_BMISS_FINAL_SCAN_ENABLE_FLAG));
- }
+ /* Initialize roaming offload state */
+ if ((self_sta_req->type == WMI_VDEV_TYPE_STA) &&
+ (self_sta_req->subType == 0)) {
+ wma_handle->roam_offload_enabled = TRUE;
+ wmi_unified_vdev_set_param_send(wma_handle->wmi_handle,
+ self_sta_req->sessionId,
+ WMI_VDEV_PARAM_ROAM_FW_OFFLOAD,
+ (WMI_ROAM_FW_OFFLOAD_ENABLE_FLAG |
+ WMI_ROAM_BMISS_FINAL_SCAN_ENABLE_FLAG));
+ }
if (wlan_cfgGetInt(mac, WNI_CFG_ENABLE_MCC_ADAPTIVE_SCHED,
&cfg_val) == eSIR_SUCCESS) {
@@ -7169,9 +7170,10 @@ VOS_STATUS wma_roam_scan_fill_self_caps(tp_wma_handle wma_handle,
* Returns :
*/
VOS_STATUS wma_roam_scan_offload_mode(tp_wma_handle wma_handle,
- wmi_start_scan_cmd_fixed_param *scan_cmd_fp,
- tSirRoamOffloadScanReq *roam_req,
- u_int32_t mode)
+ wmi_start_scan_cmd_fixed_param *scan_cmd_fp,
+ tSirRoamOffloadScanReq *roam_req,
+ u_int32_t mode,
+ u_int32_t vdev_id)
{
VOS_STATUS vos_status = VOS_STATUS_SUCCESS;
wmi_buf_t buf = NULL;
@@ -7240,7 +7242,7 @@ VOS_STATUS wma_roam_scan_offload_mode(tp_wma_handle wma_handle,
WMITLV_GET_STRUCT_TLVLEN(wmi_roam_scan_mode_fixed_param));
roam_scan_mode_fp->roam_scan_mode = mode;
- roam_scan_mode_fp->vdev_id = wma_handle->roam_offload_vdev_id;
+ roam_scan_mode_fp->vdev_id = vdev_id;
/* Fill in scan parameters suitable for roaming scan */
buf_ptr += sizeof(wmi_roam_scan_mode_fixed_param);
vos_mem_copy(buf_ptr, scan_cmd_fp, sizeof(wmi_start_scan_cmd_fixed_param));
@@ -7381,7 +7383,9 @@ error:
* Returns :
*/
VOS_STATUS wma_roam_scan_offload_rssi_thresh(tp_wma_handle wma_handle,
- A_INT32 rssi_thresh, A_INT32 rssi_thresh_diff)
+ A_INT32 rssi_thresh,
+ A_INT32 rssi_thresh_diff,
+ u_int32_t vdev_id)
{
VOS_STATUS vos_status = VOS_STATUS_SUCCESS;
wmi_buf_t buf = NULL;
@@ -7405,7 +7409,7 @@ VOS_STATUS wma_roam_scan_offload_rssi_thresh(tp_wma_handle wma_handle,
WMITLV_GET_STRUCT_TLVLEN(
wmi_roam_scan_rssi_threshold_fixed_param));
/* fill in threshold values */
- rssi_threshold_fp->vdev_id = wma_handle->roam_offload_vdev_id;
+ rssi_threshold_fp->vdev_id = vdev_id;
rssi_threshold_fp->roam_scan_rssi_thresh = rssi_thresh & 0x000000ff;
rssi_threshold_fp->roam_rssi_thresh_diff = rssi_thresh_diff & 0x000000ff;
@@ -7433,7 +7437,9 @@ error:
* Returns :
*/
VOS_STATUS wma_roam_scan_offload_scan_period(tp_wma_handle wma_handle,
- A_UINT32 scan_period, A_UINT32 scan_age)
+ A_UINT32 scan_period,
+ A_UINT32 scan_age,
+ u_int32_t vdev_id)
{
VOS_STATUS vos_status = VOS_STATUS_SUCCESS;
wmi_buf_t buf = NULL;
@@ -7457,7 +7463,7 @@ VOS_STATUS wma_roam_scan_offload_scan_period(tp_wma_handle wma_handle,
WMITLV_GET_STRUCT_TLVLEN(
wmi_roam_scan_period_fixed_param));
/* fill in scan period values */
- scan_period_fp->vdev_id = wma_handle->roam_offload_vdev_id;
+ scan_period_fp->vdev_id = vdev_id;
scan_period_fp->roam_scan_period = scan_period; /* 20 seconds */
scan_period_fp->roam_scan_age = scan_age;
@@ -7484,7 +7490,9 @@ error:
* Returns :
*/
VOS_STATUS wma_roam_scan_offload_rssi_change(tp_wma_handle wma_handle,
- A_INT32 rssi_change_thresh, A_UINT32 bcn_rssi_weight)
+ A_INT32 rssi_change_thresh,
+ A_UINT32 bcn_rssi_weight,
+ u_int32_t vdev_id)
{
VOS_STATUS vos_status = VOS_STATUS_SUCCESS;
wmi_buf_t buf = NULL;
@@ -7508,7 +7516,7 @@ VOS_STATUS wma_roam_scan_offload_rssi_change(tp_wma_handle wma_handle,
WMITLV_GET_STRUCT_TLVLEN(
wmi_roam_scan_rssi_change_threshold_fixed_param));
/* fill in rssi change threshold (hysteresis) values */
- rssi_change_fp->vdev_id = wma_handle->roam_offload_vdev_id;
+ rssi_change_fp->vdev_id = vdev_id;
rssi_change_fp->roam_scan_rssi_change_thresh = rssi_change_thresh;
rssi_change_fp->bcn_rssi_weight = bcn_rssi_weight;
@@ -7536,7 +7544,10 @@ error:
* Returns :
*/
VOS_STATUS wma_roam_scan_offload_chan_list(tp_wma_handle wma_handle,
- u_int8_t chan_count, u_int8_t *chan_list, u_int8_t list_type)
+ u_int8_t chan_count,
+ u_int8_t *chan_list,
+ u_int8_t list_type,
+ u_int32_t vdev_id)
{
VOS_STATUS vos_status = VOS_STATUS_SUCCESS;
wmi_buf_t buf = NULL;
@@ -7566,7 +7577,7 @@ VOS_STATUS wma_roam_scan_offload_chan_list(tp_wma_handle wma_handle,
WMITLV_SET_HDR(&chan_list_fp->tlv_header,
WMITLV_TAG_STRUC_wmi_roam_chan_list_fixed_param,
WMITLV_GET_STRUCT_TLVLEN(wmi_roam_chan_list_fixed_param));
- chan_list_fp->vdev_id = wma_handle->roam_offload_vdev_id;
+ chan_list_fp->vdev_id = vdev_id;
chan_list_fp->num_chan = chan_count;
if (chan_count > 0 && list_type == CHANNEL_LIST_STATIC) {
/* external app is controlling channel list */
@@ -7893,7 +7904,8 @@ v_VOID_t wma_roam_scan_fill_scan_params(tp_wma_handle wma_handle,
* Returns :
*/
VOS_STATUS wma_roam_scan_offload_ap_profile(tp_wma_handle wma_handle,
- wmi_ap_profile *ap_profile_p)
+ wmi_ap_profile *ap_profile_p,
+ u_int32_t vdev_id)
{
VOS_STATUS vos_status = VOS_STATUS_SUCCESS;
wmi_buf_t buf = NULL;
@@ -7918,7 +7930,7 @@ VOS_STATUS wma_roam_scan_offload_ap_profile(tp_wma_handle wma_handle,
WMITLV_GET_STRUCT_TLVLEN(
wmi_roam_ap_profile_fixed_param));
/* fill in threshold values */
- roam_ap_profile_fp->vdev_id = wma_handle->roam_offload_vdev_id;
+ roam_ap_profile_fp->vdev_id = vdev_id;
roam_ap_profile_fp->id = 0;
buf_ptr += sizeof(wmi_roam_ap_profile_fixed_param);
@@ -7945,22 +7957,28 @@ error:
}
VOS_STATUS wma_roam_scan_bmiss_cnt(tp_wma_handle wma_handle,
- A_INT32 first_bcnt, A_UINT32 final_bcnt)
+ A_INT32 first_bcnt,
+ A_UINT32 final_bcnt,
+ u_int32_t vdev_id)
{
int status = 0;
WMA_LOGI("%s: first_bcnt=%d, final_bcnt=%d", __func__, first_bcnt, final_bcnt);
- status = wmi_unified_vdev_set_param_send(wma_handle->wmi_handle, wma_handle->roam_offload_vdev_id,
- WMI_VDEV_PARAM_BMISS_FIRST_BCNT, first_bcnt);
+ status = wmi_unified_vdev_set_param_send(wma_handle->wmi_handle,
+ vdev_id,
+ WMI_VDEV_PARAM_BMISS_FIRST_BCNT,
+ first_bcnt);
if (status != EOK) {
WMA_LOGE("wmi_unified_vdev_set_param_send WMI_VDEV_PARAM_BMISS_FIRST_BCNT returned Error %d",
status);
return VOS_STATUS_E_FAILURE;
}
- status = wmi_unified_vdev_set_param_send(wma_handle->wmi_handle, wma_handle->roam_offload_vdev_id,
- WMI_VDEV_PARAM_BMISS_FINAL_BCNT, final_bcnt);
+ status = wmi_unified_vdev_set_param_send(wma_handle->wmi_handle,
+ vdev_id,
+ WMI_VDEV_PARAM_BMISS_FINAL_BCNT,
+ final_bcnt);
if (status != EOK) {
WMA_LOGE("wmi_unified_vdev_set_param_send WMI_VDEV_PARAM_BMISS_FINAL_BCNT returned Error %d",
status);
@@ -7979,7 +7997,8 @@ VOS_STATUS wma_roam_scan_bmiss_cnt(tp_wma_handle wma_handle,
* Args :
* Returns :
*/
-VOS_STATUS wma_roam_scan_offload_init_connect(tp_wma_handle wma_handle)
+VOS_STATUS wma_roam_scan_offload_init_connect(tp_wma_handle wma_handle,
+ u_int32_t vdev_id)
{
VOS_STATUS vos_status;
tpAniSirGlobal pMac = (tpAniSirGlobal)vos_get_context(VOS_MODULE_ID_PE,
@@ -7994,23 +8013,34 @@ VOS_STATUS wma_roam_scan_offload_init_connect(tp_wma_handle wma_handle)
* triggered before association completes
*/
vos_status = wma_roam_scan_bmiss_cnt(wma_handle,
- WMA_ROAM_BMISS_FIRST_BCNT_DEFAULT, WMA_ROAM_BMISS_FINAL_BCNT_DEFAULT);
+ WMA_ROAM_BMISS_FIRST_BCNT_DEFAULT,
+ WMA_ROAM_BMISS_FINAL_BCNT_DEFAULT,
+ vdev_id);
/* rssi_thresh = 10 is low enough */
- vos_status = wma_roam_scan_offload_rssi_thresh(wma_handle, WMA_ROAM_LOW_RSSI_TRIGGER_VERYLOW,
- pMac->roam.configParam.neighborRoamConfig.nOpportunisticThresholdDiff);
+ vos_status = wma_roam_scan_offload_rssi_thresh(wma_handle,
+ WMA_ROAM_LOW_RSSI_TRIGGER_VERYLOW,
+ pMac->roam.configParam.neighborRoamConfig.nOpportunisticThresholdDiff,
+ vdev_id);
vos_status = wma_roam_scan_offload_scan_period(wma_handle,
- WMA_ROAM_OPP_SCAN_PERIOD_DEFAULT, WMA_ROAM_OPP_SCAN_AGING_PERIOD_DEFAULT);
+ WMA_ROAM_OPP_SCAN_PERIOD_DEFAULT,
+ WMA_ROAM_OPP_SCAN_AGING_PERIOD_DEFAULT,
+ vdev_id);
vos_status = wma_roam_scan_offload_rssi_change(wma_handle,
- pMac->roam.configParam.neighborRoamConfig.nRoamRescanRssiDiff,
- WMA_ROAM_BEACON_WEIGHT_DEFAULT);
+ pMac->roam.configParam.neighborRoamConfig.nRoamRescanRssiDiff,
+ WMA_ROAM_BEACON_WEIGHT_DEFAULT,
+ vdev_id);
wma_roam_scan_fill_ap_profile(wma_handle, pMac, NULL, &ap_profile);
- vos_status = wma_roam_scan_offload_ap_profile(wma_handle, &ap_profile);
+ vos_status = wma_roam_scan_offload_ap_profile(wma_handle, &ap_profile,
+ vdev_id);
wma_roam_scan_fill_scan_params(wma_handle, pMac, NULL, &scan_params);
- vos_status = wma_roam_scan_offload_mode(wma_handle, &scan_params, NULL,
- WMI_ROAM_SCAN_MODE_PERIODIC);
+ vos_status = wma_roam_scan_offload_mode(wma_handle,
+ &scan_params,
+ NULL,
+ WMI_ROAM_SCAN_MODE_PERIODIC,
+ vdev_id);
return vos_status;
}
@@ -8019,7 +8049,8 @@ VOS_STATUS wma_roam_scan_offload_init_connect(tp_wma_handle wma_handle)
* Args :
* Returns :
*/
-VOS_STATUS wma_roam_scan_offload_end_connect(tp_wma_handle wma_handle)
+VOS_STATUS wma_roam_scan_offload_end_connect(tp_wma_handle wma_handle,
+ u_int32_t vdev_id)
{
VOS_STATUS vos_status;
tpAniSirGlobal pMac = (tpAniSirGlobal)vos_get_context(VOS_MODULE_ID_PE,
@@ -8036,14 +8067,18 @@ VOS_STATUS wma_roam_scan_offload_end_connect(tp_wma_handle wma_handle)
if (wma_handle->roam_offload_enabled) {
wma_roam_scan_fill_scan_params(wma_handle, pMac, NULL, &scan_params);
- vos_status = wma_roam_scan_offload_mode(wma_handle, &scan_params, NULL,
- WMI_ROAM_SCAN_MODE_NONE);
+ vos_status = wma_roam_scan_offload_mode(wma_handle,
+ &scan_params,
+ NULL,
+ WMI_ROAM_SCAN_MODE_NONE,
+ vdev_id);
}
return VOS_STATUS_SUCCESS;
}
VOS_STATUS wma_roam_scan_offload_command(tp_wma_handle wma_handle,
- u_int32_t command)
+ u_int32_t command,
+ u_int32_t vdev_id)
{
VOS_STATUS vos_status;
wmi_roam_scan_cmd_fixed_param *cmd_fp;
@@ -8065,7 +8100,7 @@ VOS_STATUS wma_roam_scan_offload_command(tp_wma_handle wma_handle,
WMITLV_SET_HDR(&cmd_fp->tlv_header,
WMITLV_TAG_STRUC_wmi_roam_scan_cmd_fixed_param,
WMITLV_GET_STRUCT_TLVLEN(wmi_roam_scan_cmd_fixed_param));
- cmd_fp->vdev_id = wma_handle->roam_offload_vdev_id;
+ cmd_fp->vdev_id = vdev_id;
cmd_fp->command_arg = command;
status = wmi_unified_cmd_send(wma_handle->wmi_handle, buf,
@@ -8131,13 +8166,15 @@ VOS_STATUS wma_process_roam_scan_req(tp_wma_handle wma_handle,
wma_handle->suitable_ap_hb_failure = FALSE;
vos_status = wma_roam_scan_offload_rssi_thresh(wma_handle,
- (roam_req->LookupThreshold - WMA_NOISE_FLOOR_DBM_DEFAULT),
- roam_req->OpportunisticScanThresholdDiff);
+ (roam_req->LookupThreshold - WMA_NOISE_FLOOR_DBM_DEFAULT),
+ roam_req->OpportunisticScanThresholdDiff,
+ roam_req->sessionId);
if (vos_status != VOS_STATUS_SUCCESS) {
break;
}
vos_status = wma_roam_scan_bmiss_cnt(wma_handle,
- roam_req->RoamBmissFirstBcnt, roam_req->RoamBmissFinalBcnt);
+ roam_req->RoamBmissFirstBcnt, roam_req->RoamBmissFinalBcnt,
+ roam_req->sessionId);
if (vos_status != VOS_STATUS_SUCCESS) {
break;
}
@@ -8147,8 +8184,9 @@ VOS_STATUS wma_process_roam_scan_req(tp_wma_handle wma_handle,
*/
if (roam_req->EmptyRefreshScanPeriod > 0) {
vos_status = wma_roam_scan_offload_scan_period(wma_handle,
- roam_req->EmptyRefreshScanPeriod,
- roam_req->EmptyRefreshScanPeriod * 3);
+ roam_req->EmptyRefreshScanPeriod,
+ roam_req->EmptyRefreshScanPeriod * 3,
+ roam_req->sessionId);
if (vos_status != VOS_STATUS_SUCCESS) {
break;
}
@@ -8168,35 +8206,41 @@ VOS_STATUS wma_process_roam_scan_req(tp_wma_handle wma_handle,
* 2 times the current beacon's rssi.
*/
vos_status = wma_roam_scan_offload_rssi_change(wma_handle,
- roam_req->RoamRescanRssiDiff,
- roam_req->RoamBeaconRssiWeight);
+ roam_req->RoamRescanRssiDiff,
+ roam_req->RoamBeaconRssiWeight,
+ roam_req->sessionId);
if (vos_status != VOS_STATUS_SUCCESS) {
break;
}
wma_roam_scan_fill_ap_profile(wma_handle, pMac, roam_req, &ap_profile);
vos_status = wma_roam_scan_offload_ap_profile(wma_handle,
- &ap_profile);
+ &ap_profile,
+ roam_req->sessionId);
if (vos_status != VOS_STATUS_SUCCESS) {
break;
}
vos_status = wma_roam_scan_offload_chan_list(wma_handle,
- roam_req->ConnectedNetwork.ChannelCount,
- &roam_req->ConnectedNetwork.ChannelCache[0],
- roam_req->ChannelCacheType);
+ roam_req->ConnectedNetwork.ChannelCount,
+ &roam_req->ConnectedNetwork.ChannelCache[0],
+ roam_req->ChannelCacheType,
+ roam_req->sessionId);
if (vos_status != VOS_STATUS_SUCCESS) {
break;
}
wma_roam_scan_fill_scan_params(wma_handle, pMac, roam_req, &scan_params);
- vos_status = wma_roam_scan_offload_mode(wma_handle, &scan_params,
- roam_req, mode);
+ vos_status = wma_roam_scan_offload_mode(wma_handle,
+ &scan_params,
+ roam_req,
+ mode,
+ roam_req->sessionId);
break;
case ROAM_SCAN_OFFLOAD_STOP:
wma_handle->suitable_ap_hb_failure = FALSE;
- wma_roam_scan_offload_end_connect(wma_handle);
+ wma_roam_scan_offload_end_connect(wma_handle, roam_req->sessionId);
if (roam_req->StartScanReason == REASON_OS_REQUESTED_ROAMING_NOW) {
vos_msg_t vosMsg;
tSirRoamOffloadScanRsp *scan_offload_rsp;
@@ -8228,7 +8272,8 @@ VOS_STATUS wma_process_roam_scan_req(tp_wma_handle wma_handle,
* It will continue automatically on next trigger.
*/
vos_status = wma_roam_scan_offload_command(wma_handle,
- WMI_ROAM_SCAN_STOP_CMD);
+ WMI_ROAM_SCAN_STOP_CMD,
+ roam_req->sessionId);
break;
case ROAM_SCAN_OFFLOAD_RESTART:
@@ -8241,7 +8286,7 @@ VOS_STATUS wma_process_roam_scan_req(tp_wma_handle wma_handle,
&& wma_handle->suitable_ap_hb_failure) {
WMA_LOGE("%s: Sending heartbeat failure after preauth failures",
__func__);
- wma_beacon_miss_handler(wma_handle, wma_handle->roam_offload_vdev_id);
+ wma_beacon_miss_handler(wma_handle, roam_req->sessionId);
wma_handle->suitable_ap_hb_failure = FALSE;
}
break;
@@ -8249,8 +8294,11 @@ VOS_STATUS wma_process_roam_scan_req(tp_wma_handle wma_handle,
case ROAM_SCAN_OFFLOAD_UPDATE_CFG:
wma_handle->suitable_ap_hb_failure = FALSE;
wma_roam_scan_fill_scan_params(wma_handle, pMac, roam_req, &scan_params);
- vos_status = wma_roam_scan_offload_mode(wma_handle, &scan_params,
- roam_req, WMI_ROAM_SCAN_MODE_NONE);
+ vos_status = wma_roam_scan_offload_mode(wma_handle,
+ &scan_params,
+ roam_req,
+ WMI_ROAM_SCAN_MODE_NONE,
+ roam_req->sessionId);
if (vos_status != VOS_STATUS_SUCCESS) {
break;
}
@@ -8260,7 +8308,8 @@ VOS_STATUS wma_process_roam_scan_req(tp_wma_handle wma_handle,
}
vos_status = wma_roam_scan_bmiss_cnt(wma_handle,
- roam_req->RoamBmissFirstBcnt, roam_req->RoamBmissFinalBcnt);
+ roam_req->RoamBmissFirstBcnt, roam_req->RoamBmissFinalBcnt,
+ roam_req->sessionId);
if (vos_status != VOS_STATUS_SUCCESS) {
break;
}
@@ -8269,24 +8318,27 @@ VOS_STATUS wma_process_roam_scan_req(tp_wma_handle wma_handle,
* Runtime (after association) changes to rssi thresholds and other parameters.
*/
vos_status = wma_roam_scan_offload_chan_list(wma_handle,
- roam_req->ConnectedNetwork.ChannelCount,
- &roam_req->ConnectedNetwork.ChannelCache[0],
- roam_req->ChannelCacheType);
+ roam_req->ConnectedNetwork.ChannelCount,
+ &roam_req->ConnectedNetwork.ChannelCache[0],
+ roam_req->ChannelCacheType,
+ roam_req->sessionId);
if (vos_status != VOS_STATUS_SUCCESS) {
break;
}
vos_status = wma_roam_scan_offload_rssi_thresh(wma_handle,
- (roam_req->LookupThreshold - WMA_NOISE_FLOOR_DBM_DEFAULT),
- roam_req->OpportunisticScanThresholdDiff);
+ (roam_req->LookupThreshold - WMA_NOISE_FLOOR_DBM_DEFAULT),
+ roam_req->OpportunisticScanThresholdDiff,
+ roam_req->sessionId);
if (vos_status != VOS_STATUS_SUCCESS) {
break;
}
if (roam_req->EmptyRefreshScanPeriod > 0) {
vos_status = wma_roam_scan_offload_scan_period(wma_handle,
- roam_req->EmptyRefreshScanPeriod,
- roam_req->EmptyRefreshScanPeriod * 3);
+ roam_req->EmptyRefreshScanPeriod,
+ roam_req->EmptyRefreshScanPeriod * 3,
+ roam_req->sessionId);
if (vos_status != VOS_STATUS_SUCCESS) {
break;
}
@@ -8302,22 +8354,28 @@ VOS_STATUS wma_process_roam_scan_req(tp_wma_handle wma_handle,
}
vos_status = wma_roam_scan_offload_rssi_change(wma_handle,
- roam_req->RoamRescanRssiDiff,
- roam_req->RoamBeaconRssiWeight);
+ roam_req->RoamRescanRssiDiff,
+ roam_req->RoamBeaconRssiWeight,
+ roam_req->sessionId);
if (vos_status != VOS_STATUS_SUCCESS) {
break;
}
wma_roam_scan_fill_ap_profile(wma_handle, pMac, roam_req, &ap_profile);
vos_status = wma_roam_scan_offload_ap_profile(wma_handle,
- &ap_profile);
+ &ap_profile,
+ roam_req->sessionId);
if (vos_status != VOS_STATUS_SUCCESS) {
break;
}
wma_roam_scan_fill_scan_params(wma_handle, pMac, roam_req, &scan_params);
- vos_status = wma_roam_scan_offload_mode(wma_handle, &scan_params,
- roam_req, mode);
+ vos_status = wma_roam_scan_offload_mode(
+ wma_handle,
+ &scan_params,
+ roam_req,
+ mode,
+ roam_req->sessionId);
break;
@@ -12896,7 +12954,7 @@ static void wma_add_sta_req_sta_mode(tp_wma_handle wma, tpAddStaParams params)
wma_vdev_set_bss_params(wma, params->smesessionId, iface->beaconInterval,
iface->dtimPeriod, iface->shortSlotTimeSupported,
iface->llbCoexist, maxTxPower);
- wma_roam_scan_offload_init_connect(wma);
+ wma_roam_scan_offload_init_connect(wma, params->smesessionId);
params->csaOffloadEnable = 0;
if (WMI_SERVICE_IS_ENABLED(wma->wmi_service_bitmap,
@@ -13655,7 +13713,7 @@ if(iface->roam_synch_in_progress)
return;
}
#endif
- wma_roam_scan_offload_end_connect(wma);
+ wma_roam_scan_offload_end_connect(wma, params->smesessionId);
#ifdef WLAN_FEATURE_ROAM_OFFLOAD
send_del_sta_rsp:
#endif
@@ -13950,6 +14008,14 @@ static void wma_set_tx_power(WMA_HANDLE handle,
vos_mem_free(tx_pwr_params);
return;
}
+
+ if (!(wma_handle->interfaces[vdev_id].vdev_up)) {
+ WMA_LOGE("%s: vdev id %d is not up for %pM", __func__, vdev_id,
+ tx_pwr_params->bssId);
+ vos_mem_free(tx_pwr_params);
+ return;
+ }
+
if (tx_pwr_params->power == 0) {
/* set to default. Since the app does not care the tx power
* we keep the previous setting */
diff --git a/CORE/SERVICES/WMA/wma.h b/CORE/SERVICES/WMA/wma.h
index de908f578488..fbe7e53fda98 100644
--- a/CORE/SERVICES/WMA/wma.h
+++ b/CORE/SERVICES/WMA/wma.h
@@ -649,7 +649,6 @@ typedef struct {
void* pGetRssiReq;
v_S7_t first_rssi;
t_thermal_mgmt thermal_mgmt_info;
- u_int32_t roam_offload_vdev_id;
v_BOOL_t roam_offload_enabled;
t_wma_roam_preauth_chan_state_t roam_preauth_scan_state;
u_int32_t roam_preauth_scan_id;
diff --git a/CORE/SME/inc/csrApi.h b/CORE/SME/inc/csrApi.h
index 43e4deddba57..2aed57d778f9 100644
--- a/CORE/SME/inc/csrApi.h
+++ b/CORE/SME/inc/csrApi.h
@@ -616,12 +616,10 @@ typedef enum
eCSR_ROAM_RESULT_TEARDOWN_TDLS_PEER_IND,
eCSR_ROAM_RESULT_DELETE_ALL_TDLS_PEER_IND,
eCSR_ROAM_RESULT_LINK_ESTABLISH_REQ_RSP,
-#ifdef QCA_WIFI_2_0
eCSR_ROAM_RESULT_TDLS_SHOULD_DISCOVER,
eCSR_ROAM_RESULT_TDLS_SHOULD_TEARDOWN,
eCSR_ROAM_RESULT_TDLS_SHOULD_PEER_DISCONNECTED,
#endif
-#endif
eCSR_ROAM_RESULT_DFS_RADAR_FOUND_IND,
eCSR_ROAM_RESULT_CHANNEL_CHANGE_SUCCESS,
@@ -1539,21 +1537,17 @@ typedef void * tScanResultHandle;
#define CSR_INVALID_SCANRESULT_HANDLE (NULL)
#ifdef WLAN_FEATURE_ROAM_SCAN_OFFLOAD
-#ifndef QCA_WIFI_ISOC
typedef enum
{
REASSOC = 0,
FASTREASSOC = 1
}handoff_src;
-#endif
typedef struct tagCsrHandoffRequest
{
tCsrBssid bssid;
tANI_U8 channel;
-#ifndef QCA_WIFI_ISOC
tANI_U8 src; /* To check if its a REASSOC or a FASTREASSOC IOCTL */
-#endif
}tCsrHandoffRequest;
#endif
diff --git a/CORE/SME/inc/csrInternal.h b/CORE/SME/inc/csrInternal.h
index 62cd46e31faa..44036818851c 100644
--- a/CORE/SME/inc/csrInternal.h
+++ b/CORE/SME/inc/csrInternal.h
@@ -764,10 +764,6 @@ typedef struct tagCsrScanStruct
tANI_S8 currentCountryRSSI; // RSSI for current country code
tANI_BOOLEAN f11dInfoApplied;
tANI_BOOLEAN fCancelIdleScan;
-#ifdef FEATURE_WLAN_WAPI
-// tANI_U16 NumBkidCandidate;
-// tBkidCandidateInfo BkidCandidateInfo[CSR_MAX_BKID_ALLOWED]; /* Move this as part of SessionEntry */
-#endif /* FEATURE_WLAN_WAPI */
tANI_U8 numBGScanChannel; //number of valid channels in the bgScanChannelList
tANI_U8 bgScanChannelList[WNI_CFG_BG_SCAN_CHANNEL_LIST_LEN];
//the ChannelInfo member is not used in this structure.
diff --git a/CORE/SME/inc/oemDataApi.h b/CORE/SME/inc/oemDataApi.h
index b3f98365edb3..2945848dc173 100644
--- a/CORE/SME/inc/oemDataApi.h
+++ b/CORE/SME/inc/oemDataApi.h
@@ -43,25 +43,15 @@
#include "csrLinkList.h"
#ifndef OEM_DATA_REQ_SIZE
-#ifdef QCA_WIFI_2_0
#define OEM_DATA_REQ_SIZE 280
-#else
-#define OEM_DATA_REQ_SIZE 134
-#endif
#endif
#ifndef OEM_DATA_RSP_SIZE
-#ifdef QCA_WIFI_2_0
#define OEM_DATA_RSP_SIZE 1724
-#else
-#define OEM_DATA_RSP_SIZE 1968
-#endif
#endif
-#ifdef QCA_WIFI_2_0
/* message subtype for internal purpose */
#define OEM_MESSAGE_SUBTYPE_INTERNAL 0xdeadbeef
-#endif
/*************************************************************************************************************
OEM DATA REQ/RSP - DATA STRUCTURES
@@ -142,7 +132,6 @@ eHalStatus sme_HandleOemDataRsp(tHalHandle hHal, tANI_U8*);
-------------------------------------------------------------------------------*/
eHalStatus oemData_IsOemDataReqAllowed(tHalHandle hHal);
-#ifdef QCA_WIFI_2_0
/* ---------------------------------------------------------------------------
\fn send_oem_data_rsp_msg
\brief This function sends oem data response message to registered
@@ -150,7 +139,6 @@ eHalStatus oemData_IsOemDataReqAllowed(tHalHandle hHal);
\return None
--------------------------------------------------------------------------*/
void send_oem_data_rsp_msg(int length, tANI_U8 *oemDataRsp);
-#endif /* QCA_WIFI_2_0 */
#endif //_OEM_DATA_API_H__
diff --git a/CORE/SME/inc/p2p_Api.h b/CORE/SME/inc/p2p_Api.h
index e94293512415..37cfbc0e4f26 100644
--- a/CORE/SME/inc/p2p_Api.h
+++ b/CORE/SME/inc/p2p_Api.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2011-2012 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2011-2012, 2014 The Linux Foundation. All rights reserved.
*
* Previously licensed under the ISC license by Qualcomm Atheros, Inc.
*
@@ -72,322 +72,6 @@ typedef struct sRemainOnChn{
#define P2P_PERIODIC_NOA 2
#define P2P_SINGLE_NOA 4
-#ifdef WLAN_FEATURE_P2P_INTERNAL
-
-#define MAX_SOCIAL_CHANNELS 3
-#define P2P_OPERATING_CHANNEL 6
-#define P2P_MAX_GROUP_LIMIT 5
-#define P2P_MAC_ADDRESS_LEN 6
-#define MAX_LISTEN_SEARCH_CYCLE 3
-#define P2P_LISTEN_TIMEOUT_AUTO 500 //0.5 sec
-#define P2P_LISTEN_TIMEOUT_HIGH 200 //0.4 sec
-#define P2P_LISTEN_TIMEOUT 1000 //1 sec
-#define P2P_REMAIN_ON_CHAN_TIMEOUT 300
-#define P2P_REMAIN_ON_CHAN_TIMEOUT_HIGH 1000
-#define P2P_REMAIN_ON_CHAN_TIMEOUT_LOW 100
-#define ACTION_FRAME_RETRY_TIMEOUT 50
-#define P2P_COUNTRY_CODE_LEN 3
-
-/* Wi-Fi Direct Device Discovery Type */
-typedef enum ep2pDiscoverType {
- /** Driver must perform device discovery only using the scan phase*/
- WFD_DISCOVER_TYPE_SCAN_ONLY = 1,
- /** Driver must perform device discovery only using the find phase*/
- WFD_DISCOVER_TYPE_FIND_ONLY = 2,
- /** Driver can use either use scan phase or find phase to discovery
- P2P devices. In our case Driver uses scan phase */
- WFD_DISCOVER_TYPE_AUTO = 3,
- /*Scan only social channel*/
- WFD_DISCOVER_SCAN_ONLY_SOCIAL_CHN,
- /** If it is set, driver must perform a complete discovery,
- If it is false, it can do partial discovery.*/
- WFD_DISCOVER_TYPE_FORCED = 0x80000000
-} ep2pDiscoverType, *ePp2pDiscoverType;
-
-//bit mask for what to discover
-#define QCWLAN_P2P_DISCOVER_DEVICE 0x1
-#define QCWLAN_P2P_DISCOVER_GO 0x2
-#define QCWLAN_P2P_DISCOVER_ANY 0x8
-
-#define P2P_DISCOVER_SCAN_ONLY(t) ( (WFD_DISCOVER_TYPE_SCAN_ONLY == (t)) \
- || (WFD_DISCOVER_SCAN_ONLY_SOCIAL_CHN == (t)) )
-
-/* Scan Type */
-typedef enum ep2pScanType {
- P2P_SCAN_TYPE_ACTIVE = 1, /** device should perform active scans for the scan phase of device discovery */
- P2P_SCAN_TYPE_PASSIVE = 2, /** device should perform passive scanning for the scan phase of device discovery */
- P2P_SCAN_TYPE_AUTO = 3 /** The selection of the scan type is upto the driver */
-} ep2pScanType, * ePp2pScanType;
-
-/** Listen State Discoverability */
-typedef enum ep2pListenStateDiscoverability {
- P2P_DEVICE_NOT_DISCOVERABLE, /** Wi-Fi Direct Device Port must not make itself discoverable */
- P2P_DEVICE_AUTO_AVAILABILITY, /** Wi-Fi Direct Device Port must periodically put itself in the listen state to become discoverable*/
- P2P_DEVICE_HIGH_AVAILABILITY /** Wi-Fi Direct Device Port must be frequently put itself in the listen state
- to increase the speed and reliability of remote devices discovering it */
-} ep2pListenStateDiscoverability, * ePp2pListenStateDiscoverability;
-
-typedef enum ep2pOperatingMode {
- OPERATION_MODE_INVALID,
- OPERATION_MODE_P2P_DEVICE,
- OPERATION_MODE_P2P_GROUP_OWNER,
- OPERATION_MODE_P2P_CLIENT
-}ep2pOperatingMode;
-
-typedef struct _tp2pDiscoverDeviceFilter{
- tSirMacAddr DeviceID;
- v_UCHAR_t ucBitmask;
- tSirMacSSid GroupSSID;
-} tp2pDiscoverDeviceFilter;
-
-typedef struct _tp2pDiscoverRequest {
- ep2pDiscoverType discoverType;
- ep2pScanType scanType;
- tANI_U32 uDiscoverTimeout;
- tANI_U32 uNumDeviceFilters;
- tp2pDiscoverDeviceFilter *pDeviceFilters;
- tANI_BOOLEAN bForceScanLegacyNetworks;
- tANI_U32 uNumOfLegacySSIDs;
- tANI_U8 *pLegacySSIDs;
- tANI_U32 uIELen;
- tANI_U8 *pIEField;
-} tP2PDiscoverRequest;
-
-typedef enum _eP2PDiscoverStatus {
- eP2P_DISCOVER_SUCCESS,
- eP2P_DISCOVER_FAILURE,
- eP2P_DISCOVER_ABORT,
- eP2P_DIRECTED_DISCOVER
-} eP2PDiscoverStatus;
-
-typedef eHalStatus (*p2pDiscoverCompleteCallback)(tHalHandle hHal, void *pContext, eP2PDiscoverStatus discoverStatus);
-
-typedef struct sP2PGroupId {
- tANI_U8 present;
- tANI_U8 deviceAddress[6];
- tANI_U8 num_ssid;
- tANI_U8 ssid[32];
-} tP2PGroupId;
-
-typedef struct sP2PGroupBssid {
- tANI_U8 present;
- tANI_U8 P2PGroupBssid[6];
-} tP2PGroupBssid;
-
-typedef struct sP2PChannel {
- tANI_U8 present;
- tANI_U8 countryString[P2P_COUNTRY_CODE_LEN];
- tANI_U8 regulatoryClass;
- tANI_U8 channel;
-} tP2P_OperatingChannel, tP2P_ListenChannel;
-
-/** Structure contains parameters required for Wi-Fi Direct Device functionality such as device discovery, Group Owner Negotiation */
-typedef enum P2PFrameType {
- eP2P_INVALID_FRM,
- eP2P_PROBE_REQ,
- eP2P_PROBE_RSP,
- eP2P_GONEGO_REQ,
- eP2P_GONEGO_RES,
- eP2P_GONEGO_CNF,
- eP2P_PROVISION_DISCOVERY_REQUEST,
- eP2P_PROVISION_DISCOVERY_RESPONSE,
- eP2P_BEACON,
- eP2P_GROUP_ID,
- eP2P_ASSOC_REQ,
- eP2P_INVITATION_REQ,
- eP2P_INVITATION_RSP,
- eP2P_DEVICE_DISCOVERY_REQ,
- eP2P_DEVICE_DISCOVERY_RSP,
-} eP2PFrameType;
-
-typedef enum P2PRequest {
- eWFD_DISCOVER_REQUEST,
- eWFD_DEVICE_ID,
- eWFD_DEVICE_CAPABILITY,
- eWFD_GROUP_OWNER_CAPABILITY,
- eWFD_DEVICE_INFO,
- eWFD_SECONDARY_DEVICE_TYPE_LIST,
- eWFD_ADDITIONAL_IE,
- eWFD_GROUP_ID,
- eWFD_SEND_GO_NEGOTIATION_REQUEST,
- eWFD_SEND_GO_NEGOTIATION_RESPONSE,
- eWFD_SEND_GO_NEGOTIATION_CONFIRMATION,
- eWFD_SEND_PROVISION_DISCOVERY_REQUEST,
- eWFD_SEND_PROVISION_DISCOVERY_RESPONSE,
- eWFD_SEND_INVITATION_REQUEST,
- eWFD_SEND_INVITATION_RESPONSE,
- eWFD_OPERATING_CHANNEL,
- eWFD_LISTEN_CHANNEL
-} eP2PRequest;
-
-typedef struct _p2p_device_capability_config {
- tANI_BOOLEAN bServiceDiscoveryEnabled;
- tANI_BOOLEAN bClientDiscoverabilityEnabled;
- tANI_BOOLEAN bConcurrentOperationSupported;
- tANI_BOOLEAN bInfrastructureManagementEnabled;
- tANI_BOOLEAN bDeviceLimitReached;
- tANI_BOOLEAN bInvitationProcedureEnabled;
- tANI_U32 WPSVersionsEnabled;
-} tp2p_device_capability_config;
-
-typedef struct _p2p_group_owner_capability_config {
- tANI_BOOLEAN bPersistentGroupEnabled;
- tANI_BOOLEAN bIntraBSSDistributionSupported;
- tANI_BOOLEAN bCrossConnectionSupported;
- tANI_BOOLEAN bPersistentReconnectSupported;
- tANI_BOOLEAN bGroupFormationEnabled;
- tANI_U32 uMaximumGroupLimit;
-} tp2p_group_owner_capability_config;
-
-typedef struct _tP2P_ProvDiscoveryReq {
- tANI_U8 dialogToken;
- tANI_U8 PeerDeviceAddress[P2P_MAC_ADDRESS_LEN];
- tANI_U32 uSendTimeout;
- tANI_U8 GroupCapability;
- tP2PGroupId GroupId;
- tANI_BOOLEAN bUseGroupID;
- tANI_U32 uIELength;
- tANI_U8 *IEdata;
-} tP2P_ProvDiscoveryReq;
-
-typedef struct _tP2P_ProvDiscoveryRes {
- tANI_U8 dialogToken;
- tANI_U8 ReceiverDeviceAddress[P2P_MAC_ADDRESS_LEN];
- tANI_U32 uSendTimeout;
- tANI_U32 uIELength;
- tANI_U8 *IEdata;
-} tP2P_ProvDiscoveryRes;
-
-typedef struct p2p_go_request {
- tANI_U8 dialogToken;
- tANI_U8 peerDeviceAddress[P2P_MAC_ADDRESS_LEN];
- tANI_U32 uSendTimeout;
- tANI_U8 GoIntent;
- tANI_U32 GoTimeout;
- tANI_U32 ClientTimeout;
- tANI_U8 IntendedInterfaceAddress[P2P_MAC_ADDRESS_LEN];
- tANI_U8 GroupCapability;
- tANI_U32 uIELength;
- tANI_U8 *IEdata;
-} tP2P_go_request;
-
-typedef struct p2p_go_confirm {
- tANI_U8 peerDeviceAddress[P2P_MAC_ADDRESS_LEN];
- tANI_U8 dialog_token;
- tANI_U32 uSendTimeout;
- tANI_U8 status;
- tANI_U8 GroupCapability;
- tP2PGroupId GroupId;
- tANI_BOOLEAN bUsedGroupId;
- tANI_U32 uIELength;
- tANI_U8 *IEdata;
-} tP2P_go_confirm;
-
-typedef struct p2p_go_response {
- tANI_U8 peerDeviceAddress[P2P_MAC_ADDRESS_LEN];
- tANI_U8 dialog_token;
- tANI_U32 uSendTimeout;
- tANI_U8 status;
- tANI_U8 GoIntent;
- tANI_U32 GoTimeout;
- tANI_U32 ClientTimeout;
- tANI_U8 IntendedInterfaceAddress[P2P_MAC_ADDRESS_LEN];
- tANI_U8 GroupCapability;
- tP2PGroupId GroupId;
- tANI_BOOLEAN bUsedGroupId;
- tANI_U32 uIELength;
- tANI_U8 *IEdata;
-} tP2P_go_response;
-
-//Invitation Req parameters
-typedef struct p2p_invitation_request {
- tANI_U8 DialogToken;
- tANI_U8 PeerDeviceAddress[P2P_MAC_ADDRESS_LEN];
- tANI_U32 uSendTimeout;
- tANI_U32 GoTimeout;
- tANI_U32 ClientTimeout;
- tANI_U8 InvitationFlags;
- tP2PGroupBssid GroupBSSID;
- tP2P_OperatingChannel OperatingChannel;
- tP2PGroupId GroupID;
- tANI_U32 uIELength;
- tANI_U8 *IEdata;
-} tP2P_invitation_request;
-
-
-//Invitation Response parameters
-typedef struct p2p_invitation_response {
- tANI_U8 ReceiverDeviceAddress[P2P_MAC_ADDRESS_LEN];
- tANI_U8 DialogToken;
- void* RequestContext;
- tANI_U32 uSendTimeout;
- tANI_U8 status;
- tANI_U32 GoTimeout;
- tANI_U32 ClientTimeout;
- tP2PGroupBssid GroupBSSID;
- tP2P_OperatingChannel OperatingChannel;
- tANI_U32 uIELength;
- tANI_U8 *IEdata;
-} tP2P_invitation_response;
-
-typedef enum eOUISubType {
- eOUI_P2P_GONEGO_REQ,
- eOUI_P2P_GONEGO_RES,
- eOUI_P2P_GONEGO_CNF,
- eOUI_P2P_INVITATION_REQ,
- eOUI_P2P_INVITATION_RES,
- eOUI_P2P_DEVICE_DISCOVERABILITY_REQ,
- eOUI_P2P_DEVICE_DISCOVERABILITY_RES,
- eOUI_P2P_PROVISION_DISCOVERY_REQ,
- eOUI_P2P_PROVISION_DISCOVERY_RES,
- eOUI_P2P_INVALID
-}eOUISubType;
-
-typedef enum _eP2PPort {
- eP2PPortDevice,
- eP2PPortGroupOwner,
- eP2PPortClient
-} eP2PPort;
-
-typedef enum eListenDiscoverableState {
- eStateDisabled,
- eStateEnabled,
-
-}eListenDiscoverableState;
-
-typedef enum P2PRemainOnChnReason
-{
- eP2PRemainOnChnReasonUnknown,
- eP2PRemainOnChnReasonDiscovery, //Part of the discovery (search and listen)
- eP2PRemainOnChnReasonSendFrame, //Found peer and before sending request frame
- eP2PRemainOnChnReasonListen, //In listen-only mode
-}eP2PRemainOnChnReason;
-
-typedef struct sGroupFormationReq {
- tCsrBssid deviceAddress;
- tANI_U8 targetListenChannel;
- tANI_U8 persistent_group;
- tANI_U8 group_limit; /* may be internal */
- tANI_U8 GO_config_timeout;
- tANI_U8 CL_config_timeout;
- tANI_U8 GO_intent;
- tANI_U16 devicePasswdId;
- tSirMacAddr groupBssid;
- tSirMacSSid groupSsid;
-}tGroupFormationReq;
-
-typedef struct tP2PConfigParam
-{
- v_U32_t P2POperatingChannel;
- v_U32_t P2PListenChannel;
- v_U32_t P2PPSSelection;
- v_U32_t P2POpPSCTWindow;
- v_U32_t P2PNoADuration;
- v_U32_t P2PNoACount;
- v_U32_t P2PNoAInterval;
-}tP2PConfigParam;
-
-#endif
typedef struct sp2pContext
{
@@ -398,80 +82,6 @@ typedef struct sp2pContext
tANI_U8 probeReqForwarding;
tANI_U8 *probeRspIe;
tANI_U32 probeRspIeLength;
-#ifdef WLAN_FEATURE_P2P_INTERNAL
- tANI_U8 numClients;
- tANI_U32 maxGroupLimit;
- ep2pOperatingMode operatingmode;
- tANI_U8 state;
- tANI_U8 socialChannel[MAX_SOCIAL_CHANNELS];
- tANI_U8 currentSearchIndex;
- tANI_U8 listenIndex;
- tANI_U8 dialogToken;
- tANI_U8 receivedDialogToken;
- eOUISubType actionFrameOUI;
- eP2PFrameType actionFrameType;
- tANI_BOOLEAN actionFrameTimeout;
- tANI_U8 *pSentActionFrame;
- tANI_U32 ActionFrameLen;
- tANI_U32 ActionFrameSendTimeout;
- eListenDiscoverableState listenDiscoverableState;
- vos_timer_t listenTimerHandler;
- vos_timer_t WPSRegistrarCheckTimerHandler;
- tANI_U32 WPSRegistrarSet;
- tANI_U8 bWaitForWPSReady;
- tANI_U8 bInGroupFormation;
- vos_timer_t discoverTimer;
- vos_timer_t retryActionFrameTimer;
- vos_timer_t actionFrameTimer;
- tPalTimerHandle nextActionFrameTimer;
- tANI_U8 peerMacAddress[P2P_MAC_ADDRESS_LEN];
- tANI_U8 selfMacAddress[P2P_MAC_ADDRESS_LEN];
- tANI_U8 ReceiverDeviceAddress[P2P_MAC_ADDRESS_LEN];
- tANI_U8 listen_search_cycle;
- ep2pDiscoverType discoverType;
- ep2pScanType scanType;
- tANI_U32 uDiscoverTimeout;
- tp2pDiscoverDeviceFilter *directedDiscoveryFilter;
- tANI_U32 uNumDeviceFilters;
- //Number of deviceFilter directedDiscoveryFilter holds
- tANI_U32 uNumDeviceFilterAllocated;
- tGroupFormationReq formationReq;
- tANI_U8 GroupFormationPending;
- tANI_BOOLEAN PeerFound;
- tANI_BOOLEAN directedDiscovery;
- tANI_U32 listenDuration;
- tANI_U32 expire_time;
- p2pDiscoverCompleteCallback p2pDiscoverCBFunc;
- void *pContext;
- tANI_BOOLEAN bForceScanLegacyNetworks;
- tANI_U8 *DiscoverReqIeField;
- tANI_U32 DiscoverReqIeLength;
- tANI_U8 *GoNegoReqIeField;
- tANI_U32 GoNegoReqIeLength;
- tANI_U8 *GoNegoResIeField;
- tANI_U32 GoNegoResIeLength;
- tANI_U8 *GoNegoCnfIeField;
- tANI_U32 GoNegoCnfIeLength;
- tANI_U8 *ProvDiscReqIeField;
- tANI_U32 ProvDiscReqIeLength;
- tANI_U8 *ProvDiscResIeField;
- tANI_U32 ProvDiscResIeLength;
- tANI_U8 *InvitationReqIeField;
- tANI_U32 InvitationReqIeLength;
- tANI_U8 *InvitationResIeField;
- tANI_U32 InvitationResIeLength;
- tANI_U32 DiscoverableCfg;
- vos_spin_lock_t lState;
- tANI_U8 *pNextActionFrm;
- tANI_U32 nNextFrmLen;
- tANI_U32 nNextFrameTimeOut;
- eP2PFrameType NextActionFrameType;
- tANI_U8 ssid[32];
- v_U32_t P2PListenChannel;
- v_U32_t P2POperatingChannel;
- tP2pPsConfig pNoA;
- tANI_U8 OriginalGroupCapability;
-#endif
} tp2pContext, *tPp2pContext;
eHalStatus sme_RemainOnChannel( tHalHandle hHal, tANI_U8 sessionId,
@@ -490,51 +100,15 @@ eHalStatus sme_p2pOpen( tHalHandle hHal );
eHalStatus p2pStop( tHalHandle hHal );
eHalStatus sme_p2pClose( tHalHandle hHal );
eHalStatus sme_p2pSetPs( tHalHandle hHal, tP2pPsConfig * data );
-#ifdef WLAN_FEATURE_P2P_INTERNAL
-eHalStatus p2pRemainOnChannel( tHalHandle hHal, tANI_U8 sessionId,
- tANI_U8 channel, tANI_U32 duration,
- remainOnChanCallback callback, void *pContext,
- tANI_U8 isP2PProbeReqAllowed,
- eP2PRemainOnChnReason reason);
-#else
eHalStatus p2pRemainOnChannel( tHalHandle hHal, tANI_U8 sessionId,
tANI_U8 channel, tANI_U32 duration,
remainOnChanCallback callback,
void *pContext,
tANI_U8 isP2PProbeReqAllowed);
-#endif
eHalStatus p2pSendAction( tHalHandle hHal, tANI_U8 sessionId,
const tANI_U8 *pBuf, tANI_U32 len,
tANI_U16 wait, tANI_BOOLEAN noack);
eHalStatus p2pCancelRemainOnChannel( tHalHandle hHal, tANI_U8 sessionId );
eHalStatus p2pSetPs( tHalHandle hHal, tP2pPsConfig *pNoA );
tSirRFBand GetRFBand(tANI_U8 channel);
-#ifdef WLAN_FEATURE_P2P_INTERNAL
-eHalStatus p2pRemainOnChannelCallback(tHalHandle halHandle, void *pContext, eHalStatus scan_status);
-eHalStatus P2P_DiscoverRequest(tHalHandle hHal, tANI_U8 SessionID, tP2PDiscoverRequest *pDiscoverRequest,
- p2pDiscoverCompleteCallback callback, void *pContext);
-tANI_U8 p2pGetDialogToken(tHalHandle hHal, tANI_U8 SessionID, eP2PFrameType actionFrameType);
-eHalStatus P2P_ListenStateDiscoverable(tHalHandle hHal, tANI_U8 sessionId, ep2pListenStateDiscoverability listenState);
-eHalStatus p2pCreateSendActionFrame(tHalHandle hHal, tANI_U8 SessionID,
- void *p2pactionframe, eP2PFrameType actionFrameType, tANI_U32 timeout);
-eHalStatus p2pScanRequest(tp2pContext *p2pContext, p2pDiscoverCompleteCallback callback, void *pContext);
-void p2pActionFrameTimerHandler(void *pContext);
-void p2pListenDiscoverTimerHandler(void *pContext);
-void p2pDiscoverTimerHandler(void *pContext);
-void p2pRetryActionFrameTimerHandler(void *pContext);
-eHalStatus p2pGrpFormationRemainOnChanRspCallback(tHalHandle halHandle, void *pContext, tANI_U32 scanId, eCsrScanStatus scan_status);
-eHalStatus p2pChangeDefaultConfigParam(tHalHandle hHal, tP2PConfigParam *pParam);
-eHalStatus p2pGetConfigParam(tHalHandle hHal, tP2PConfigParam *pParam);
-eHalStatus p2pPS(tHalHandle hHal, tANI_U8 sessionId);
-eHalStatus p2pCloseSession(tHalHandle hHal, tANI_U8 SessionID);
-eHalStatus p2pSetSessionId(tHalHandle hHal, tANI_U8 SessionID, tANI_U8 SmeSessionId);
-tANI_BOOLEAN p2pIsOperatingChannEqualListenChann(tHalHandle hHal, tANI_U8 SessionID);
-eHalStatus p2pGetListenChannel(tHalHandle hHal, tANI_U8 SessionID, tANI_U8 *channel);
-eHalStatus p2pSetListenChannel(tHalHandle hHal, tANI_U8 SessionID, tANI_U8 channel);
-eHalStatus p2pStopDiscovery(tHalHandle hHal, tANI_U8 SessionID);
-tANI_U8 getP2PSessionIdFromSMESessionId(tHalHandle hHal, tANI_U8 SessionID);
-void p2pCallDiscoverCallback(tp2pContext *p2pContext, eP2PDiscoverStatus statusCode);
-eHalStatus p2pGetResultFilter(tp2pContext *pP2pContext,
- tCsrScanResultFilter *pFilter);
-#endif//INTERNAL
#endif //__P2P_API_H__
diff --git a/CORE/SME/inc/smeInside.h b/CORE/SME/inc/smeInside.h
index a55264b65287..319f032dfe72 100644
--- a/CORE/SME/inc/smeInside.h
+++ b/CORE/SME/inc/smeInside.h
@@ -181,8 +181,6 @@ typedef struct s_tdls_cmd
tTdlsDisReqCmdinfo tdlsDisReqCmdInfo ;
tTdlsLinkSetupReqCmdinfo tdlsLinkSetupReqCmdInfo ;
tTdlsLinkTeardownCmdinfo tdlsLinkTeardownCmdInfo ;
- //tEnterPeerUAPSDInfo enterUapsdInfo ;
- //tExitPeerUAPSDinfo exitUapsdInfo ;
#endif
tTdlsLinkEstablishCmdInfo tdlsLinkEstablishCmdInfo;
tTdlsSendMgmtCmdInfo tdlsSendMgmtCmdInfo;
diff --git a/CORE/SME/inc/sme_Api.h b/CORE/SME/inc/sme_Api.h
index 6140d07a867a..b7bc0127a5c3 100644
--- a/CORE/SME/inc/sme_Api.h
+++ b/CORE/SME/inc/sme_Api.h
@@ -80,7 +80,6 @@
//Macro to disable split scan
#define SME_DISABLE_SPLIT_SCAN 255
-#ifdef QCA_WIFI_2_0
#define SME_2_4_GHZ_MAX_FREQ 3000
#define SME_MODE_11A 0 /* 11a mode */
#define SME_MODE_11G 1 /* 11b/g mode */
@@ -100,7 +99,6 @@
(psme_channel)->reg_info_1 &= 0xff00ffff; \
(psme_channel)->reg_info_1 |= ((val & 0xff) << 16); \
} while(0)
-#endif
/*--------------------------------------------------------------------------
Type declarations
@@ -118,9 +116,6 @@ typedef struct _smeConfigParams
#if defined FEATURE_WLAN_ESE
tANI_U8 isEseIniFeatureEnabled;
#endif
-#if defined WLAN_FEATURE_P2P_INTERNAL
- tP2PConfigParam p2pConfig;
-#endif
#if defined (WLAN_FEATURE_VOWIFI_11R) || defined (FEATURE_WLAN_ESE) || defined(FEATURE_WLAN_LFR)
tANI_U8 isFastTransitionEnabled;
tANI_U8 RoamRssiDiff;
@@ -144,7 +139,6 @@ typedef enum
eSME_ROAM_TRIGGER_MAX
} tSmeFastRoamTrigger;
-#ifdef QCA_WIFI_2_0
typedef PACKED_PRE struct PACKED_POST
{
/* channel id */
@@ -204,7 +198,6 @@ typedef struct _smeTdlsPeerStateParams
tSmeTdlsPeerCapParams peerCap;
} tSmeTdlsPeerStateParams;
#endif /* FEATURE_WLAN_TDLS */
-#endif /* QCA_WIFI_2_0 */
/* Thermal Mitigation*/
@@ -2449,23 +2442,6 @@ tANI_U16 sme_ChnToFreq(tANI_U8 chanNum);
tANI_BOOLEAN sme_IsChannelValid(tHalHandle hHal, tANI_U8 channel);
-#if defined WLAN_FEATURE_P2P_INTERNAL
-
-eHalStatus sme_p2pResetSession(tHalHandle hHal, tANI_U8 HDDSessionId);
-
-/* ---------------------------------------------------------------------------
- \fn sme_p2pFlushDeviceList
- \brief Remove cached P2P result from scan results
- \param hHal - The handle returned by macOpen.
- \param HDDSessionId - HDD's sessionId. Currently unused.
- \return eHalStatus
- ---------------------------------------------------------------------------*/
-eHalStatus sme_p2pFlushDeviceList(tHalHandle hHal, tANI_U8 HDDSessionId);
-
-eHalStatus sme_p2pGetResultFilter(tHalHandle hHal, tANI_U8 HDDSessionId,
- tCsrScanResultFilter *pFilter);
-
-#endif //#if defined WLAN_FEATURE_P2P_INTERNAL
/* ---------------------------------------------------------------------------
\fn sme_SetMaxTxPower
\brief Used to set the Maximum Transmit Power dynamically. Note: this
@@ -3663,7 +3639,6 @@ eHalStatus sme_SetHT2040Mode(tHalHandle hHal, tANI_U8 sessionId, tANI_U8 channel
eHalStatus sme_SetPhyCBMode24G(tHalHandle hHal, ePhyChanBondState phyCBMode);
#endif
-#ifdef QCA_WIFI_2_0
eHalStatus sme_getChannelInfo(tHalHandle hHal, tANI_U8 chanId,
tSmeChannelInfo *chanInfo);
#ifdef FEATURE_WLAN_TDLS
@@ -3672,7 +3647,6 @@ eHalStatus sme_UpdateFwTdlsState(tHalHandle hHal, void *psmeTdlsParams,
eHalStatus sme_UpdateTdlsPeerState(tHalHandle hHal,
tSmeTdlsPeerStateParams *pPeerStateParams);
#endif /* FEATURE_WLAN_TDLS */
-#endif /* QCA_WIFI_2_0 */
#ifdef FEATURE_WLAN_CH_AVOID
/* ---------------------------------------------------------------------------
@@ -3740,7 +3714,6 @@ eHalStatus sme_RoamStartBeaconReq( tHalHandle hHal,
eHalStatus sme_RoamCsaIeRequest(tHalHandle hHal, tCsrBssid bssid,
tANI_U8 targetChannel, tANI_U8 csaIeReqd);
-#ifndef QCA_WIFI_ISOC
/* ---------------------------------------------------------------------------
\fn sme_InitThermalInfo
\brief SME API to initialize the thermal mitigation parameters
@@ -3776,7 +3749,6 @@ eHalStatus sme_TxpowerLimit( tHalHandle hHal, tSirTxPowerLimit *psmetx);
-------------------------------------------------------------------------*/
eHalStatus sme_GetLinkSpeed(tHalHandle hHal,tSirLinkSpeedInfo *lsReq,void *plsContext,
void (*pCallbackfn)(tSirLinkSpeedInfo *indParam, void *pContext) );
-#endif
/*----------------------------------------------------------------------------
\fn sme_ModifyAddIE
diff --git a/CORE/SME/src/QoS/sme_Qos.c b/CORE/SME/src/QoS/sme_Qos.c
index 8d7f2266f537..d629876f3b72 100644
--- a/CORE/SME/src/QoS/sme_Qos.c
+++ b/CORE/SME/src/QoS/sme_Qos.c
@@ -1460,7 +1460,6 @@ sme_QosStatusType sme_QosInternalSetupReq(tpAniSirGlobal pMac,
"but should not be set yet",
__func__, __LINE__,
sessionId, ac, pACInfo->tspec_mask_status);
- //ASSERT
VOS_ASSERT(0);
vos_mem_free(pentry);
return SME_QOS_STATUS_SETUP_FAILURE_RSP;
@@ -1575,7 +1574,6 @@ sme_QosStatusType sme_QosInternalSetupReq(tpAniSirGlobal pMac,
"state = %d",
__func__, __LINE__,
ac, pACInfo->curr_state);
- //ASSERT
VOS_ASSERT(0);
// unable to service the request
// nothing is pending so vote powersave back on
@@ -1714,7 +1712,6 @@ sme_QosStatusType sme_QosInternalSetupReq(tpAniSirGlobal pMac,
"%s: %d: no flows running for ac = %d while in state = %d",
__func__, __LINE__,
ac, pACInfo->curr_state );
- //ASSERT
VOS_ASSERT(0);
// unable to service the request
// nothing is pending so vote powersave back on
@@ -2828,7 +2825,6 @@ sme_QosStatusType sme_QosInternalReleaseReq(tpAniSirGlobal pMac,
"%s: %d: release request in unexpected state = %d",
__func__, __LINE__,
pACInfo->curr_state );
- //ASSERT
VOS_ASSERT(0);
// unable to service the request
// nothing is pending so vote powersave back on
@@ -4285,7 +4281,6 @@ eHalStatus sme_QosProcessDelTsInd(tpAniSirGlobal pMac, void *pMsgBuf)
"%s: %d: no match found for ac = %d",
__func__, __LINE__,
search_key.key.ac_type);
- //ASSERT
VOS_ASSERT(0);
return eHAL_STATUS_FAILURE;
}
@@ -4365,7 +4360,6 @@ eHalStatus sme_QosProcessAssocCompleteEv(tpAniSirGlobal pMac, v_U8_t sessionId,
pSession->ac_info[SME_QOS_EDCA_AC_BK].curr_state,
pSession->ac_info[SME_QOS_EDCA_AC_VI].curr_state,
pSession->ac_info[SME_QOS_EDCA_AC_VO].curr_state);
- //ASSERT
VOS_ASSERT(0);
return status;
}
@@ -4398,7 +4392,6 @@ eHalStatus sme_QosProcessAssocCompleteEv(tpAniSirGlobal pMac, v_U8_t sessionId,
"%s: %d: On session %d AC %d is in wrong state %d",
__func__, __LINE__,
sessionId, ac, pACInfo->curr_state);
- //ASSERT
VOS_ASSERT(0);
break;
}
@@ -4512,7 +4505,6 @@ eHalStatus sme_QosProcessReassocReqEv(tpAniSirGlobal pMac, v_U8_t sessionId, voi
"%s: %d: On session %d AC %d is in wrong state %d",
__func__, __LINE__,
sessionId, ac, pACInfo->curr_state);
- //ASSERT
VOS_ASSERT(0);
break;
}
@@ -4682,7 +4674,6 @@ eHalStatus sme_QosProcessReassocSuccessEv(tpAniSirGlobal pMac, v_U8_t sessionId,
"%s: %d: no match found for ac = %d",
__func__, __LINE__,
search_key.key.ac_type);
- //ASSERT
VOS_ASSERT(0);
return eHAL_STATUS_FAILURE;
}
@@ -4705,7 +4696,6 @@ eHalStatus sme_QosProcessReassocSuccessEv(tpAniSirGlobal pMac, v_U8_t sessionId,
"%s: %d: On session %d AC %d is in wrong state %d",
__func__, __LINE__,
sessionId, ac, pACInfo->curr_state);
- //ASSERT
VOS_ASSERT(0);
break;
}
@@ -4773,7 +4763,6 @@ eHalStatus sme_QosProcessReassocFailureEv(tpAniSirGlobal pMac, v_U8_t sessionId,
"%s: %d: On session %d AC %d is in wrong state %d",
__func__, __LINE__,
sessionId, ac, pACInfo->curr_state);
- //ASSERT
VOS_ASSERT(0);
break;
}
@@ -4832,7 +4821,6 @@ eHalStatus sme_QosProcessHandoffAssocReqEv(tpAniSirGlobal pMac, v_U8_t sessionId
"%s: %d: On session %d AC %d is in wrong state %d",
__func__, __LINE__,
sessionId, ac, pACInfo->curr_state);
- //ASSERT
VOS_ASSERT(0);
break;
}
@@ -4916,7 +4904,6 @@ eHalStatus sme_QosProcessHandoffSuccessEv(tpAniSirGlobal pMac, v_U8_t sessionId,
"%s: %d: On session %d AC %d is in wrong state %d",
__func__, __LINE__,
sessionId, ac, pACInfo->curr_state);
- //ASSERT
VOS_ASSERT(0);
break;
}
@@ -4974,7 +4961,6 @@ eHalStatus sme_QosProcessHandoffFailureEv(tpAniSirGlobal pMac, v_U8_t sessionId,
"%s: %d: On session %d AC %d is in wrong state %d",
__func__, __LINE__,
sessionId, ac, pACInfo->curr_state);
- //ASSERT
VOS_ASSERT(0);
break;
}
@@ -5174,7 +5160,6 @@ eHalStatus sme_QosProcessPreauthSuccessInd(tpAniSirGlobal pMac,
"%s: %d: On session %d AC %d is in wrong state %d",
__func__, __LINE__,
sessionId, ac, pACInfo->curr_state);
- //ASSERT
VOS_ASSERT(0);
break;
}
@@ -5301,7 +5286,6 @@ eHalStatus sme_QosProcessAddTsFailureRsp(tpAniSirGlobal pMac,
tspec_pending = pACInfo->tspec_pending;
if(!tspec_pending)
{
- //ASSERT
VOS_TRACE(VOS_MODULE_ID_SME, VOS_TRACE_LEVEL_ERROR,
"%s: %d: On session %d an AddTS is not pending on AC %d",
__func__, __LINE__,
@@ -5321,7 +5305,6 @@ eHalStatus sme_QosProcessAddTsFailureRsp(tpAniSirGlobal pMac,
"%s: %d: On session %d no match found for ac = %d",
__func__, __LINE__,
sessionId, search_key.key.ac_type);
- //ASSERT
VOS_ASSERT(0);
return eHAL_STATUS_FAILURE;
}
@@ -5625,7 +5608,6 @@ eHalStatus sme_QosProcessAddTsSuccessRsp(tpAniSirGlobal pMac,
"%s: %d: On session %d no match found for ac %d",
__func__, __LINE__,
sessionId, search_key.key.ac_type);
- //ASSERT
VOS_ASSERT(0);
return eHAL_STATUS_FAILURE;
}
@@ -6589,7 +6571,6 @@ static eHalStatus sme_QosProcessBufferedCmd(v_U8_t sessionId)
"%s: %d: On session %d unknown cmd = %d",
__func__, __LINE__,
sessionId, pcmd->cmdInfo.command);
- //ASSERT
VOS_ASSERT(0);
break;
}
@@ -6723,7 +6704,6 @@ eHalStatus sme_QosSetupFnp(tpAniSirGlobal pMac, tListElem *pEntry)
VOS_TRACE(VOS_MODULE_ID_SME, VOS_TRACE_LEVEL_ERROR,
"%s: %d: Entry is NULL",
__func__, __LINE__);
- //ASSERT
VOS_ASSERT(0);
return eHAL_STATUS_FAILURE;
}
@@ -6768,7 +6748,6 @@ eHalStatus sme_QosModificationNotifyFnp(tpAniSirGlobal pMac, tListElem *pEntry)
VOS_TRACE(VOS_MODULE_ID_SME, VOS_TRACE_LEVEL_ERROR,
"%s: %d: Entry is NULL",
__func__, __LINE__);
- //ASSERT
VOS_ASSERT(0);
return eHAL_STATUS_FAILURE;
}
@@ -6860,7 +6839,6 @@ eHalStatus sme_QosDelTsIndFnp(tpAniSirGlobal pMac, tListElem *pEntry)
VOS_TRACE(VOS_MODULE_ID_SME, VOS_TRACE_LEVEL_ERROR,
"%s: %d: Entry is NULL",
__func__, __LINE__);
- //ASSERT
VOS_ASSERT(0);
return eHAL_STATUS_FAILURE;
}
@@ -6915,7 +6893,6 @@ eHalStatus sme_QosReassocSuccessEvFnp(tpAniSirGlobal pMac, tListElem *pEntry)
VOS_TRACE(VOS_MODULE_ID_SME, VOS_TRACE_LEVEL_ERROR,
"%s: %d: Entry is NULL",
__func__, __LINE__);
- //ASSERT
VOS_ASSERT(0);
return eHAL_STATUS_FAILURE;
}
@@ -7083,7 +7060,6 @@ eHalStatus sme_QosAddTsFailureFnp(tpAniSirGlobal pMac, tListElem *pEntry)
VOS_TRACE(VOS_MODULE_ID_SME, VOS_TRACE_LEVEL_ERROR,
"%s: %d: Entry is NULL",
__func__, __LINE__);
- //ASSERT
VOS_ASSERT(0);
return eHAL_STATUS_FAILURE;
}
@@ -7179,7 +7155,6 @@ eHalStatus sme_QosAddTsSuccessFnp(tpAniSirGlobal pMac, tListElem *pEntry)
VOS_TRACE(VOS_MODULE_ID_SME, VOS_TRACE_LEVEL_ERROR,
"%s: %d: Entry is NULL",
__func__, __LINE__);
- //ASSERT
VOS_ASSERT(0);
return eHAL_STATUS_FAILURE;
}
@@ -7476,7 +7451,6 @@ void sme_QosPmcFullPowerCallback(void *callbackContext, eHalStatus status)
VOS_TRACE(VOS_MODULE_ID_SME, VOS_TRACE_LEVEL_ERROR,
"%s: %d: PMC failed to put the chip in Full power",
__func__, __LINE__);
- //ASSERT
VOS_ASSERT(0);
}
}
@@ -7494,7 +7468,6 @@ void sme_QosPmcOffloadFullPowerCallback(void *callbackContext, tANI_U32 sessionI
VOS_TRACE(VOS_MODULE_ID_SME, VOS_TRACE_LEVEL_ERROR,
"%s: %d: PMC failed to put the chip in Full power",
__func__, __LINE__);
- //ASSERT
VOS_ASSERT(0);
}
}
diff --git a/CORE/SME/src/ccm/ccmApi.c b/CORE/SME/src/ccm/ccmApi.c
index bef54fc92031..c37605bdc7d8 100644
--- a/CORE/SME/src/ccm/ccmApi.c
+++ b/CORE/SME/src/ccm/ccmApi.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2013-2014 The Linux Foundation. All rights reserved.
*
* Previously licensed under the ISC license by Qualcomm Atheros, Inc.
*
@@ -435,13 +435,6 @@ void ccmCfgCnfMsgHandler(tHalHandle hHal, void *m)
tANI_U32 result, cfgId ;
tCfgReq *req, *old ;
-#if 0
- if (pMac->ccm.state != eCCM_STARTED)
- {
- return ;
- }
-#endif
-
result = pal_be32_to_cpu(msg->data[0]);
cfgId = pal_be32_to_cpu(msg->data[1]);
diff --git a/CORE/SME/src/csr/csrApiRoam.c b/CORE/SME/src/csr/csrApiRoam.c
index b4435cc152f0..7da1867f2b94 100644
--- a/CORE/SME/src/csr/csrApiRoam.c
+++ b/CORE/SME/src/csr/csrApiRoam.c
@@ -252,7 +252,6 @@ static eHalStatus csrRoamStartWds( tpAniSirGlobal pMac, tANI_U32 sessionId, tCsr
static void csrInitSession( tpAniSirGlobal pMac, tANI_U32 sessionId );
static eHalStatus csrRoamIssueSetKeyCommand( tpAniSirGlobal pMac, tANI_U32 sessionId,
tCsrRoamSetKey *pSetKey, tANI_U32 roamId );
-//static eHalStatus csrRoamProcessStopBss( tpAniSirGlobal pMac, tSmeCmd *pCommand );
static eHalStatus csrRoamGetQosInfoFromBss(tpAniSirGlobal pMac, tSirBssDescription *pBssDesc);
void csrRoamReissueRoamCommand(tpAniSirGlobal pMac);
#ifdef FEATURE_WLAN_BTAMP_UT_RF
@@ -369,15 +368,6 @@ eHalStatus csrSetRegInfo(tHalHandle hHal, tANI_U8 *apCntryCode)
* 2 character Country code should be used
* 3rd charater is optional for indoor/outdoor setting */
cntryCodeLength = WNI_CFG_COUNTRY_CODE_LEN;
-/*
- cntryCodeLength = strlen(apCntryCode);
-
- if (cntryCodeLength > WNI_CFG_COUNTRY_CODE_LEN)
- {
- smsLog( pMac, LOGW, FL(" Invalid Country Code Length") );
- return eHAL_STATUS_FAILURE;
- }
-*/
status = csrGetRegulatoryDomainForCountry(pMac, apCntryCode, &regId,
COUNTRY_USER);
if (status != eHAL_STATUS_SUCCESS)
@@ -3993,12 +3983,6 @@ eHalStatus csrRoamSetBssConfigCfg(tpAniSirGlobal pMac, tANI_U32 sessionId, tCsrR
csrSetQosToCfg( pMac, sessionId, pBssConfig->qosType );
//SSID
csrSetCfgSsid(pMac, &pBssConfig->SSID );
- //fragment threshold
- //ccmCfgSetInt(pMac, WNI_CFG_FRAGMENTATION_THRESHOLD, csrGetFragThresh(pMac), NULL, eANI_BOOLEAN_FALSE);
- //RTS threshold
- //ccmCfgSetInt(pMac, WNI_CFG_RTS_THRESHOLD, csrGetRTSThresh(pMac), NULL, eANI_BOOLEAN_FALSE);
-
- //ccmCfgSetInt(pMac, WNI_CFG_DOT11_MODE, csrTranslateToWNICfgDot11Mode(pMac, pBssConfig->uCfgDot11Mode), NULL, eANI_BOOLEAN_FALSE);
//Auth type
ccmCfgSetInt(pMac, WNI_CFG_AUTHENTICATION_TYPE, pBssConfig->authType, NULL, eANI_BOOLEAN_FALSE);
@@ -4010,9 +3994,6 @@ eHalStatus csrRoamSetBssConfigCfg(tpAniSirGlobal pMac, tANI_U32 sessionId, tCsrR
ccmCfgSetInt(pMac, WNI_CFG_11D_ENABLED,
((pBssConfig->f11hSupport) ? pBssConfig->f11hSupport : pProfile->ieee80211d),
NULL, eANI_BOOLEAN_FALSE);
- /*//11h
- ccmCfgSetInt(pMac, WNI_CFG_11H_ENABLED, pMac->roam.configParam.Is11hSupportEnabled, NULL, eANI_BOOLEAN_FALSE);
- */
ccmCfgSetInt(pMac, WNI_CFG_LOCAL_POWER_CONSTRAINT, pBssConfig->uPowerLimit, NULL, eANI_BOOLEAN_FALSE);
//CB
@@ -4790,11 +4771,7 @@ eHalStatus csrRoamProcessCommand( tpAniSirGlobal pMac, tSmeCmd *pCommand )
break;
case eCsrSmeIssuedDisassocForHandoff:
//Not to free pMac->roam.pCurRoamProfile (via csrFreeRoamProfile) because it is needed after disconnect
-#if 0 // TODO : Confirm this change
- status = csrRoamProcessDisassociate( pMac, pCommand, FALSE );
-#else
status = csrRoamProcessDisassocDeauth( pMac, pCommand, TRUE, FALSE );
-#endif
break;
case eCsrForcedDisassocMICFailure:
@@ -5942,11 +5919,9 @@ static tANI_BOOLEAN csrRoamProcessResults( tpAniSirGlobal pMac, tSmeCmd *pComman
if( CSR_IS_ENC_TYPE_STATIC( pProfile->negotiatedUCEncryptionType ) && !CSR_IS_INFRA_AP( pSession->pCurRoamProfile ))
{
// Issue the set Context request to LIM to establish the Broadcast STA context for the Ibss.
-#if defined (QCA_WIFI_2_0) && !defined (QCA_WIFI_ISOC)
// In Rome IBSS case, dummy key installation will break
// proper BSS key installation, so skip it.
if (!CSR_IS_IBSS( pSession->pCurRoamProfile ))
-#endif
{
csrRoamIssueSetContextReq( pMac, sessionId,
pProfile->negotiatedMCEncryptionType,
@@ -6787,7 +6762,6 @@ eHalStatus csrRoamIssueReassoc(tpAniSirGlobal pMac, tANI_U32 sessionId, tCsrRoam
eHalStatus csrRoamEnqueuePreauth(tpAniSirGlobal pMac, tANI_U32 sessionId, tpSirBssDescription pBssDescription,
eCsrRoamReason reason, tANI_BOOLEAN fImmediate)
-// , eCsrRoamReason reason, tANI_U32 roamId, tANI_BOOLEAN fImediate)
{
eHalStatus status = eHAL_STATUS_SUCCESS;
tSmeCmd *pCommand;
@@ -7348,17 +7322,6 @@ eHalStatus csrRoamProcessDisassocDeauth( tpAniSirGlobal pMac, tSmeCmd *pCommand,
return (status);
}
-/* This is been removed from latest code base */
-/*
-static eHalStatus csrRoamProcessStopBss( tpAniSirGlobal pMac, tSmeCmd *pCommand )
-{
- eHalStatus status;
- tANI_U32 sessionId = pCommand->sessionId;
- csrRoamStateChange( pMac, eCSR_ROAMING_STATE_JOINING );
- status = csrRoamIssueStopBss( pMac, sessionId, eCSR_ROAM_SUBSTATE_STOP_BSS_REQ );
- return ( status );
-}
-*/
eHalStatus csrRoamIssueDisassociateCmd( tpAniSirGlobal pMac, tANI_U32 sessionId, eCsrRoamDisconnectReason reason )
{
@@ -8189,19 +8152,11 @@ static void csrRoamRoamingStateAuthRspProcessor( tpAniSirGlobal pMac, tSirSmeAut
{
//No one is sending eWNI_SME_AUTH_REQ to PE.
smsLog(pMac, LOGW, FL("is no-op"));
- if ( eSIR_SME_SUCCESS == pSmeAuthRsp->statusCode )
- {
- smsLog( pMac, LOGW, "CSR SmeAuthReq Successful" );
- // Successfully authenticated with a new Bss. Attempt to stop the current Bss and
- // join the new one...
- /***pBssDesc = profGetRoamingBssDesc( pAdapter, &pHddProfile );
- roamStopNetwork( pAdapter, &pBssDesc->SirBssDescription );***/
- }
- else {
- smsLog( pMac, LOGW, "CSR SmeAuthReq failed with statusCode= 0x%08X [%d]", pSmeAuthRsp->statusCode, pSmeAuthRsp->statusCode );
- /***profHandleLostLinkAfterReset(pAdapter);
- // In the event the authenticate fails, let the roam processor attempt to join something else...
- roamRoam( pAdapter );***/
+ if (eSIR_SME_SUCCESS == pSmeAuthRsp->statusCode) {
+ smsLog(pMac, LOGW, "CSR SmeAuthReq Successful");
+ } else {
+ smsLog(pMac, LOGW, "CSR SmeAuthReq failed with statusCode= 0x%08X [%d]",
+ pSmeAuthRsp->statusCode, pSmeAuthRsp->statusCode);
}
}
@@ -10959,7 +10914,7 @@ void csrRoamCompletion(tpAniSirGlobal pMac, tANI_U32 sessionId, tCsrRoamInfo *pR
eRoamCmdStatus roamStatus = csrGetRoamCompleteStatus(pMac, sessionId);
tANI_U32 roamId = 0;
tCsrRoamSession *pSession = CSR_GET_SESSION( pMac, sessionId );
- /* To silence the KW tool Null chaeck is added */
+
if(!pSession)
{
smsLog(pMac, LOGE, FL(" session %d not found "), sessionId);
@@ -11002,7 +10957,7 @@ eHalStatus csrRoamLostLink( tpAniSirGlobal pMac, tANI_U32 sessionId, tANI_U32 ty
tCsrRoamInfo roamInfo;
tANI_BOOLEAN fToRoam;
tCsrRoamSession *pSession = CSR_GET_SESSION( pMac, sessionId );
- /* To silence the KW tool Null chaeck is added */
+
if(!pSession)
{
smsLog(pMac, LOGE, FL(" session %d not found "), sessionId);
@@ -14112,7 +14067,7 @@ eHalStatus csrSendMBDisassocCnfMsg( tpAniSirGlobal pMac, tpSirSmeDisassocInd pDi
vos_mem_free(pMsg);
break;
}
-//To test reconn
+
vos_mem_copy(pMsg->bssId, pDisassocInd->bssId, sizeof(pMsg->peerMacAddr));
status = eHAL_STATUS_SUCCESS;
if(!HAL_STATUS_SUCCESS(status))
@@ -14120,7 +14075,7 @@ eHalStatus csrSendMBDisassocCnfMsg( tpAniSirGlobal pMac, tpSirSmeDisassocInd pDi
vos_mem_free(pMsg);
break;
}
-//To test reconn ends
+
status = palSendMBMessage( pMac->hHdd, pMsg );
} while( 0 );
return( status );
@@ -14634,29 +14589,7 @@ eHalStatus csrSendMBStopBssReqMsg( tpAniSirGlobal pMac, tANI_U32 sessionId )
msgLen = sizeof(tANI_U16) + sizeof(tANI_U16) + 1 + sizeof(tANI_U16) + sizeof(tSirResultCodes) + sizeof(tSirMacAddr);
pMsg->length = pal_cpu_to_be16(msgLen);
status = palSendMBMessage( pMac->hHdd, pMsg );
-#if 0
- pMsg = vos_mem_malloc(sizeof(tSirSmeStopBssReq));
- if ( NULL == pMsg ) return eHAL_STATUS_FAILURE;
- vos_mem_set(pMsg, sizeof( tSirSmeStopBssReq ), 0);
- pMsg->messageType = pal_cpu_to_be16((tANI_U16)eWNI_SME_STOP_BSS_REQ);
- pMsg->reasonCode = 0;
- // bssid
- // if BSSType is WDS sta, use selfmacAddr as bssid, else use bssid in connectedProfile
- if( CSR_IS_CONN_WDS_STA(&pSession->connectedProfile) )
- {
- pbBssid = (tANI_U8 *)&pSession->selfMacAddr;
- }
- else
- {
- pbBssid = (tANI_U8 *)&pSession->connectedProfile.bssid;
- }
- vos_mem_copy(&pMsg->bssId, pbBssid, sizeof(tSirMacAddr));
- pMsg->transactionId = 0;
- pMsg->sessionId = (tANI_U8)sessionId;
- pMsg->length = pal_cpu_to_be16((tANI_U16)sizeof( tSirSmeStopBssReq ));
- status = palSendMBMessage( pMac->hHdd, pMsg );
-#endif
- } while( 0 );
+ } while( 0 );
return( status );
}
@@ -15147,7 +15080,6 @@ static void csrInitSession( tpAniSirGlobal pMac, tANI_U32 sessionId )
pSession->callback = NULL;
pSession->pContext = NULL;
pSession->connectState = eCSR_ASSOC_STATE_TYPE_NOT_CONNECTED;
- // TODO : Confirm pMac->roam.fReadyForPowerSave = eANI_BOOLEAN_FALSE;
csrFreeRoamProfile( pMac, sessionId );
csrRoamFreeConnectProfile(pMac, &pSession->connectedProfile);
csrRoamFreeConnectedInfo( pMac, &pSession->connectedInfo );
@@ -15320,19 +15252,6 @@ void csrRoamTlStatsTimerHandler(void *pv)
smsLog(pMac, LOG1, FL(" TL stat timer is no-op. It needs to support multiple stations"));
-#if 0
- // TODO Persession .???
- //req TL for stats
- if(WLANTL_GetStatistics(pMac->roam.gVosContext, &tlStats, pMac->roam.connectedInfo.staId))
- {
- smsLog(pMac, LOGE, FL("csrRoamTlStatsTimerHandler:couldn't get the stats from TL"));
- }
- else
- {
- //save in SME
- csrRoamSaveStatsFromTl(pMac, tlStats);
- }
-#endif
if(!pMac->roam.tlStatsReqInfo.timerRunning)
{
if(pMac->roam.tlStatsReqInfo.periodicity)
@@ -15425,24 +15344,11 @@ void csrRoamPeStatsTimerHandler(void *pv)
void csrRoamStatsClientTimerHandler(void *pv)
{
tCsrStatsClientReqInfo *pStaEntry = (tCsrStatsClientReqInfo *)pv;
- if(VOS_TIMER_STATE_STOPPED == vos_timer_getCurrentState(&pStaEntry->timer))
- {
-#if 0
- // TODO Stats fix for multisession
- //start the timer
- vosStatus = vos_timer_start( &pStaEntry->timer, pStaEntry->periodicity );
-
- if ( !VOS_IS_STATUS_SUCCESS( vosStatus ) )
- {
- smsLog(pStaEntry->pMac, LOGE, FL("csrGetStatistics:cannot start StatsClient timer"));
- }
-#endif
+ if (VOS_TIMER_STATE_STOPPED ==
+ vos_timer_getCurrentState(&pStaEntry->timer)) {
+ VOS_TRACE(VOS_MODULE_ID_SME, VOS_TRACE_LEVEL_INFO,
+ FL("roam stats client timer is stopped"));
}
-#if 0
- //send up the stats report
- csrRoamReportStatistics(pStaEntry->pMac, pStaEntry->statsMask, pStaEntry->callback,
- pStaEntry->staId, pStaEntry->pContext);
-#endif
}
@@ -15778,8 +15684,7 @@ VOS_STATUS csrRoamVccTriggerRssiIndCallback(tHalHandle hHal,
{
tpAniSirGlobal pMac = PMAC_STRUCT( context );
eCsrRoamLinkQualityInd newVccLinkQuality;
- // TODO : Session info unavailable
- tANI_U32 sessionId = 0;
+ tANI_U32 sessionId = 0;
VOS_STATUS status = VOS_STATUS_SUCCESS;
/*-------------------------------------------------------------------------
Link quality is currently binary based on OBIWAN recommended triggers
@@ -17255,8 +17160,7 @@ eHalStatus csrIsFullPowerNeeded( tpAniSirGlobal pMac, tSmeCmd *pCommand,
tRequestFullPowerReason reason = eSME_REASON_OTHER;
tPmcState pmcState;
eHalStatus status = eHAL_STATUS_SUCCESS;
- // TODO : Session info unavailable
- tANI_U32 sessionId = 0;
+ tANI_U32 sessionId = 0;
if( pfNeedPower )
{
*pfNeedPower = eANI_BOOLEAN_FALSE;
@@ -17336,30 +17240,6 @@ eHalStatus csrIsFullPowerNeeded( tpAniSirGlobal pMac, tSmeCmd *pCommand,
if( pEntry )
{
pScanResult = GET_BASE_ADDR(pEntry, tCsrScanResult, Link);
-#if 0
- // TODO : Session Specific info pConnectBssDesc
- if( csrIsBssIdEqual( pMac, &pScanResult->Result.BssDescriptor, pMac->roam.pConnectBssDesc ) &&
- csrIsSsidEqual( pMac, pMac->roam.pConnectBssDesc,
- &pScanResult->Result.BssDescriptor, (tDot11fBeaconIEs *)( pScanResult->Result.pvIes ) ) )
- {
- // Check to see if the Auth type has changed in the Profile. If so, we don't want to Reassociate
- // with Authenticating first. To force this, stop the current association (Disassociate) and
- // then re 'Join' the AP, wihch will force an Authentication (with the new Auth type) followed by
- // a new Association.
- if(csrIsSameProfile(pMac, &pMac->roam.connectedProfile, pProfile))
- {
- if(csrRoamIsSameProfileKeys(pMac, &pMac->roam.connectedProfile, pProfile))
- {
- //Done, eventually, the command reaches eCsrReassocToSelfNoCapChange;
- //No need for full power
- //Set the flag so the code later can avoid to do the above
- //check again.
- pCommand->u.roamCmd.fReassocToSelfNoCapChange = eANI_BOOLEAN_TRUE;
- break;
- }
- }
- }
-#endif
}
}
//If we are here, full power is needed
@@ -18163,9 +18043,7 @@ eHalStatus csrHandoffRequest(tpAniSirGlobal pMac,
pMsg->msgLen = (tANI_U16)sizeof(tAniHandoffReq);
pMsg->sessionId = sessionId;
pMsg->channel = pHandoffInfo->channel;
-#ifndef QCA_WIFI_ISOC
pMsg->handoff_src = pHandoffInfo->src;
-#endif
vos_mem_copy(pMsg->bssid,
pHandoffInfo->bssid,
6);
diff --git a/CORE/SME/src/csr/csrApiScan.c b/CORE/SME/src/csr/csrApiScan.c
index de2ae2484535..02851a750b31 100644
--- a/CORE/SME/src/csr/csrApiScan.c
+++ b/CORE/SME/src/csr/csrApiScan.c
@@ -89,10 +89,8 @@ RSSI *cannot* be more than 0xFF or less than 0 for meaningful WLAN operation
#define MAX_ACTIVE_SCAN_FOR_ONE_CHANNEL 140
#define MIN_ACTIVE_SCAN_FOR_ONE_CHANNEL 120
-#ifndef QCA_WIFI_ISOC
#define MAX_ACTIVE_SCAN_FOR_ONE_CHANNEL_FASTREASSOC 30
#define MIN_ACTIVE_SCAN_FOR_ONE_CHANNEL_FASTREASSOC 20
-#endif
#define CSR_SCAN_OVERALL_SCORE( rssi ) \
(( rssi < CSR_SCAN_MAX_SCORE_VAL ) \
@@ -3361,6 +3359,10 @@ csrScanSaveBssDescription(tpAniSirGlobal pMac,
{
vos_mem_set(pCsrBssDescription, cbAllocated, 0);
pCsrBssDescription->AgingCount = (tANI_S32)pMac->roam.configParam.agingCount;
+ smsLog(pMac, LOGW,
+ FL(" Set Aging Count = %d for BSS "MAC_ADDRESS_STR" "),
+ pCsrBssDescription->AgingCount,
+ MAC_ADDR_ARRAY(pCsrBssDescription->Result.BssDescriptor.bssId));
vos_mem_copy(&pCsrBssDescription->Result.BssDescriptor, pBSSDescription, cbBSSDesc);
#if defined(VOSS_ENSBALED)
if ( NULL != pCsrBssDescription->Result.pvIes)
@@ -4821,6 +4823,10 @@ tCsrScanResult *csrScanSaveBssDescriptionToInterimList( tpAniSirGlobal pMac,
{
vos_mem_set(pCsrBssDescription, cbAllocated, 0);
pCsrBssDescription->AgingCount = (tANI_S32)pMac->roam.configParam.agingCount;
+ smsLog(pMac, LOGW,
+ FL(" Set Aging Count = %d for BSS "MAC_ADDRESS_STR" "),
+ pCsrBssDescription->AgingCount,
+ MAC_ADDR_ARRAY(pCsrBssDescription->Result.BssDescriptor.bssId));
vos_mem_copy(&pCsrBssDescription->Result.BssDescriptor, pBSSDescription, cbBSSDesc );
//Save SSID separately for later use
if( pIes->SSID.present && !csrIsNULLSSID(pIes->SSID.ssid, pIes->SSID.num_ssid) )
@@ -5555,6 +5561,10 @@ tANI_BOOLEAN csrScanAgeOutBss(tpAniSirGlobal pMac, tCsrScanResult *pResult)
{
//Reset the counter so that aging out of connected BSS won't hapeen too soon
pResult->AgingCount = (tANI_S32)pMac->roam.configParam.agingCount;
+ smsLog(pMac, LOGW,
+ FL(" Connected BSS, Set Aging Count=%d for BSS "MAC_ADDRESS_STR" "),
+ pResult->AgingCount,
+ MAC_ADDR_ARRAY(pResult->Result.BssDescriptor.bssId));
pResult->Result.BssDescriptor.nReceivedTime = (tANI_TIMESTAMP)palGetTickCount(pMac->hHdd);
return (fRet);
@@ -5611,6 +5621,10 @@ eHalStatus csrScanAgeResults(tpAniSirGlobal pMac, tSmeGetScanChnRsp *pScanChnInf
else
{
pResult->AgingCount--;
+ smsLog(pMac, LOGW,
+ FL("Decremented AgingCount=%d for BSS "MAC_ADDRESS_STR""),
+ pResult->AgingCount,
+ MAC_ADDR_ARRAY(pResult->Result.BssDescriptor.bssId));
}
}
pEntry = tmpEntry;
@@ -6634,7 +6648,6 @@ static void csrStaApConcTimerHandler(void *pv)
//Modify callers parameters in case of concurrency
scanReq.scanType = eSIR_ACTIVE_SCAN;
//Use concurrency values for min/maxChnTime.
- //We know csrIsAnySessionConnected(pMac) returns TRUE here
csrSetDefaultScanTiming(pMac, scanReq.scanType, &scanReq);
status = csrScanCopyRequest(pMac, &pSendScanCmd->u.scanCmd.u.scanRequest, &scanReq);
@@ -6965,9 +6978,8 @@ eHalStatus csrScanTriggerIdleScan(tpAniSirGlobal pMac, tANI_U32 *pTimeInterval)
return status;
}
- if((pMac->scan.fScanEnable) && (eANI_BOOLEAN_FALSE == pMac->scan.fCancelIdleScan)
- /*&& pMac->roam.configParam.impsSleepTime*/)
- {
+ if((pMac->scan.fScanEnable) &&
+ (eANI_BOOLEAN_FALSE == pMac->scan.fCancelIdleScan)) {
//Stop get result timer because idle scan gets scan result out of PE
csrScanStopGetResultTimer(pMac);
if(pTimeInterval)
@@ -7494,7 +7506,7 @@ eHalStatus csrScanForSSID(tpAniSirGlobal pMac, tANI_U32 sessionId, tCsrRoamProfi
/* For one channel be good enpugh time to receive beacon atleast */
if( 1 == pProfile->ChannelInfo.numOfChannels )
{
-#if !defined(QCA_WIFI_ISOC) && defined (WLAN_FEATURE_ROAM_SCAN_OFFLOAD)
+#if defined (WLAN_FEATURE_ROAM_SCAN_OFFLOAD)
if (pNeighborRoamInfo->handoffReqInfo.src == FASTREASSOC) {
pScanCmd->u.scanCmd.u.scanRequest.maxChnTime =
MAX_ACTIVE_SCAN_FOR_ONE_CHANNEL_FASTREASSOC;
diff --git a/CORE/SME/src/csr/csrInsideApi.h b/CORE/SME/src/csr/csrInsideApi.h
index 7124ba4c1403..585f9da694be 100644
--- a/CORE/SME/src/csr/csrInsideApi.h
+++ b/CORE/SME/src/csr/csrInsideApi.h
@@ -219,7 +219,7 @@ tANI_BOOLEAN csrScanComplete( tpAniSirGlobal pMac, tSirSmeScanRsp *pScanRsp );
void csrReleaseCommandRoam(tpAniSirGlobal pMac, tSmeCmd *pCommand);
void csrReleaseCommandScan(tpAniSirGlobal pMac, tSmeCmd *pCommand);
void csrReleaseCommandWmStatusChange(tpAniSirGlobal pMac, tSmeCmd *pCommand);
-//pIes2 can be NULL
+
tANI_BOOLEAN csrIsDuplicateBssDescription( tpAniSirGlobal pMac, tSirBssDescription *pSirBssDesc1,
tSirBssDescription *pSirBssDesc2, tDot11fBeaconIEs *pIes2, tANI_BOOLEAN fForced );
eHalStatus csrRoamSaveConnectedBssDesc( tpAniSirGlobal pMac, tANI_U32 sessionId, tSirBssDescription *pBssDesc );
diff --git a/CORE/SME/src/csr/csrNeighborRoam.c b/CORE/SME/src/csr/csrNeighborRoam.c
index 91fb2e3a29bc..919a455193fc 100644
--- a/CORE/SME/src/csr/csrNeighborRoam.c
+++ b/CORE/SME/src/csr/csrNeighborRoam.c
@@ -5978,9 +5978,7 @@ eHalStatus csrNeighborRoamHandoffReqHdlr(tpAniSirGlobal pMac, void* pMsg)
{
pNeighborRoamInfo->handoffReqInfo.channel = pHandoffReqInfo->channel;
-#ifndef QCA_WIFI_ISOC
pNeighborRoamInfo->handoffReqInfo.src = pHandoffReqInfo->handoff_src;
-#endif
vos_mem_copy(pNeighborRoamInfo->handoffReqInfo.bssid,
pHandoffReqInfo->bssid,
6);
diff --git a/CORE/SME/src/csr/csrTdlsProcess.c b/CORE/SME/src/csr/csrTdlsProcess.c
index 44bb1dab7843..167ac7d6bea0 100644
--- a/CORE/SME/src/csr/csrTdlsProcess.c
+++ b/CORE/SME/src/csr/csrTdlsProcess.c
@@ -1135,12 +1135,6 @@ eHalStatus tdlsMsgProcessor(tpAniSirGlobal pMac, v_U16_t msgType,
case eWNI_SME_TDLS_LINK_ESTABLISH_RSP:
{
tSirTdlsLinkEstablishReqRsp *linkEstablishReqRsp = (tSirTdlsLinkEstablishReqRsp *) pMsgBuf ;
-#if 0
- vos_mem_copy(&roamInfo.peerMac, delStaRsp->peerMac,
- sizeof(tSirMacAddr)) ;
- roamInfo.staId = delStaRsp->staId ;
- roamInfo.statusCode = delStaRsp->statusCode ;
-#endif
csrRoamCallCallback(pMac, linkEstablishReqRsp->sessionId, &roamInfo, 0,
eCSR_ROAM_TDLS_STATUS_UPDATE,
eCSR_ROAM_RESULT_LINK_ESTABLISH_REQ_RSP);
@@ -1294,7 +1288,6 @@ eHalStatus tdlsMsgProcessor(tpAniSirGlobal pMac, v_U16_t msgType,
}
#endif
-#ifdef QCA_WIFI_2_0
case eWNI_SME_TDLS_SHOULD_DISCOVER:
{
tSirTdlsEventNotify *tevent = (tSirTdlsEventNotify *) pMsgBuf;
@@ -1343,7 +1336,6 @@ eHalStatus tdlsMsgProcessor(tpAniSirGlobal pMac, v_U16_t msgType,
eCSR_ROAM_RESULT_TDLS_SHOULD_PEER_DISCONNECTED);
break;
}
-#endif
default:
{
break ;
diff --git a/CORE/SME/src/csr/csrUtil.c b/CORE/SME/src/csr/csrUtil.c
index 873e1f8f8ef7..812c8e709483 100644
--- a/CORE/SME/src/csr/csrUtil.c
+++ b/CORE/SME/src/csr/csrUtil.c
@@ -345,820 +345,6 @@ static tCsrIELenInfo gCsrIELengthTable[] = {
/* 255 */ { SIR_MAC_ANI_WORKAROUND_EID_MIN, SIR_MAC_ANI_WORKAROUND_EID_MAX }
};
-#if 0
-//Don't not insert entry into the table, put it to the end. If you have to insert, make sure it is also
-//reflected in eCsrCountryIndex
-static tCsrCountryInfo gCsrCountryInfo[eCSR_NUM_COUNTRY_INDEX] =
-{
- {REG_DOMAIN_FCC, {'U', 'S', ' '}}, //USA/******The "US" MUST be at index 0*******/
- {REG_DOMAIN_WORLD, {'A', 'D', ' '}}, //ANDORRA
- {REG_DOMAIN_WORLD, {'A', 'E', ' '}}, //UAE
- {REG_DOMAIN_WORLD, {'A', 'F', ' '}}, //AFGHANISTAN
- {REG_DOMAIN_WORLD, {'A', 'G', ' '}}, //ANTIGUA AND BARBUDA
- {REG_DOMAIN_WORLD, {'A', 'I', ' '}}, //ANGUILLA
- {REG_DOMAIN_HI_5GHZ, {'A', 'L', ' '}}, //ALBANIA
- {REG_DOMAIN_WORLD, {'A', 'M', ' '}}, //ARMENIA
- {REG_DOMAIN_WORLD, {'A', 'N', ' '}}, //NETHERLANDS ANTILLES
- {REG_DOMAIN_WORLD, {'A', 'O', ' '}}, //ANGOLA
- {REG_DOMAIN_WORLD, {'A', 'Q', ' '}}, //ANTARCTICA
- {REG_DOMAIN_HI_5GHZ, {'A', 'R', ' '}}, //ARGENTINA
- {REG_DOMAIN_FCC, {'A', 'S', ' '}}, //AMERICAN SOMOA
- {REG_DOMAIN_ETSI, {'A', 'T', ' '}}, //AUSTRIA
- {REG_DOMAIN_ETSI, {'A', 'U', ' '}}, //AUSTRALIA
- {REG_DOMAIN_WORLD, {'A', 'W', ' '}}, //ARUBA
- {REG_DOMAIN_WORLD, {'A', 'X', ' '}}, //ALAND ISLANDS
- {REG_DOMAIN_WORLD, {'A', 'Z', ' '}}, //AZERBAIJAN
- {REG_DOMAIN_WORLD, {'B', 'A', ' '}}, //BOSNIA AND HERZEGOVINA
- {REG_DOMAIN_WORLD, {'B', 'B', ' '}}, //BARBADOS
- {REG_DOMAIN_WORLD, {'B', 'D', ' '}}, //BANGLADESH
- {REG_DOMAIN_ETSI, {'B', 'E', ' '}}, //BELGIUM
- {REG_DOMAIN_WORLD, {'B', 'F', ' '}}, //BURKINA FASO
- {REG_DOMAIN_HI_5GHZ, {'B', 'G', ' '}}, //BULGARIA
- {REG_DOMAIN_WORLD, {'B', 'H', ' '}}, //BAHRAIN
- {REG_DOMAIN_WORLD, {'B', 'I', ' '}}, //BURUNDI
- {REG_DOMAIN_WORLD, {'B', 'J', ' '}}, //BENIN
- {REG_DOMAIN_WORLD, {'B', 'L', ' '}}, //SAINT BARTHELEMY
- {REG_DOMAIN_ETSI, {'B', 'M', ' '}}, //BERMUDA
- {REG_DOMAIN_WORLD, {'B', 'N', ' '}}, //BRUNEI DARUSSALAM
- {REG_DOMAIN_WORLD, {'B', 'O', ' '}}, //BOLIVIA
- {REG_DOMAIN_WORLD, {'B', 'R', ' '}}, //BRAZIL
- {REG_DOMAIN_WORLD, {'B', 'S', ' '}}, //BAHAMAS
- {REG_DOMAIN_WORLD, {'B', 'T', ' '}}, //BHUTAN
- {REG_DOMAIN_WORLD, {'B', 'V', ' '}}, //BOUVET ISLAND
- {REG_DOMAIN_WORLD, {'B', 'W', ' '}}, //BOTSWANA
- {REG_DOMAIN_WORLD, {'B', 'Y', ' '}}, //BELARUS
- {REG_DOMAIN_WORLD, {'B', 'Z', ' '}}, //BELIZE
- {REG_DOMAIN_FCC, {'C', 'A', ' '}}, //CANADA
- {REG_DOMAIN_WORLD, {'C', 'C', ' '}}, //COCOS (KEELING) ISLANDS
- {REG_DOMAIN_WORLD, {'C', 'D', ' '}}, //CONGO, THE DEMOCRATIC REPUBLIC OF THE
- {REG_DOMAIN_WORLD, {'C', 'F', ' '}}, //CENTRAL AFRICAN REPUBLIC
- {REG_DOMAIN_WORLD, {'C', 'G', ' '}}, //CONGO
- {REG_DOMAIN_ETSI, {'C', 'H', ' '}}, //SWITZERLAND
- {REG_DOMAIN_WORLD, {'C', 'I', ' '}}, //COTE D'IVOIRE
- {REG_DOMAIN_WORLD, {'C', 'K', ' '}}, //COOK ISLANDS
- {REG_DOMAIN_WORLD, {'C', 'L', ' '}}, //CHILE
- {REG_DOMAIN_WORLD, {'C', 'M', ' '}}, //CAMEROON
- {REG_DOMAIN_HI_5GHZ, {'C', 'N', ' '}}, //CHINA
- {REG_DOMAIN_WORLD, {'C', 'O', ' '}}, //COLOMBIA
- {REG_DOMAIN_WORLD, {'C', 'R', ' '}}, //COSTA RICA
- {REG_DOMAIN_WORLD, {'C', 'U', ' '}}, //CUBA
- {REG_DOMAIN_WORLD, {'C', 'V', ' '}}, //CAPE VERDE
- {REG_DOMAIN_WORLD, {'C', 'X', ' '}}, //CHRISTMAS ISLAND
- {REG_DOMAIN_WORLD, {'C', 'Y', ' '}}, //CYPRUS
- {REG_DOMAIN_HI_5GHZ, {'C', 'Z', ' '}}, //CZECH REPUBLIC
- {REG_DOMAIN_ETSI, {'D', 'E', ' '}}, //GERMANY
- {REG_DOMAIN_WORLD, {'D', 'J', ' '}}, //DJIBOUTI
- {REG_DOMAIN_ETSI, {'D', 'K', ' '}}, //DENMARK
- {REG_DOMAIN_WORLD, {'D', 'M', ' '}}, //DOMINICA
- {REG_DOMAIN_WORLD, {'D', 'O', ' '}}, //DOMINICAN REPUBLIC
- {REG_DOMAIN_WORLD, {'D', 'Z', ' '}}, //ALGERIA
- {REG_DOMAIN_WORLD, {'E', 'C', ' '}}, //ECUADOR
- {REG_DOMAIN_HI_5GHZ, {'E', 'E', ' '}}, //ESTONIA
- {REG_DOMAIN_WORLD, {'E', 'G', ' '}}, //EGYPT
- {REG_DOMAIN_WORLD, {'E', 'H', ' '}}, //WESTERN SAHARA
- {REG_DOMAIN_WORLD, {'E', 'R', ' '}}, //ERITREA
- {REG_DOMAIN_ETSI, {'E', 'S', ' '}}, //SPAIN
- {REG_DOMAIN_WORLD, {'E', 'T', ' '}}, //ETHIOPIA
- {REG_DOMAIN_WORLD, {'F', 'I', ' '}}, //FINLAND
- {REG_DOMAIN_WORLD, {'F', 'J', ' '}}, //FIJI
- {REG_DOMAIN_WORLD, {'F', 'K', ' '}}, //FALKLAND ISLANDS (MALVINAS)
- {REG_DOMAIN_WORLD, {'F', 'M', ' '}}, //MICRONESIA, FEDERATED STATES OF
- {REG_DOMAIN_WORLD, {'F', 'O', ' '}}, //FAROE ISLANDS
- {REG_DOMAIN_ETSI, {'F', 'R', ' '}}, //FRANCE
- {REG_DOMAIN_WORLD, {'G', 'A', ' '}}, //GABON
- {REG_DOMAIN_ETSI, {'G', 'B', ' '}}, //UNITED KINGDOM
- {REG_DOMAIN_WORLD, {'G', 'D', ' '}}, //GRENADA
- {REG_DOMAIN_HI_5GHZ, {'G', 'E', ' '}}, //GEORGIA
- {REG_DOMAIN_WORLD, {'G', 'F', ' '}}, //FRENCH GUIANA
- {REG_DOMAIN_ETSI, {'G', 'G', ' '}}, //GUERNSEY
- {REG_DOMAIN_WORLD, {'G', 'H', ' '}}, //GHANA
- {REG_DOMAIN_WORLD, {'G', 'I', ' '}}, //GIBRALTAR
- {REG_DOMAIN_WORLD, {'G', 'L', ' '}}, //GREENLAND
- {REG_DOMAIN_WORLD, {'G', 'M', ' '}}, //GAMBIA
- {REG_DOMAIN_WORLD, {'G', 'N', ' '}}, //GUINEA
- {REG_DOMAIN_WORLD, {'G', 'P', ' '}}, //GUADELOUPE
- {REG_DOMAIN_WORLD, {'G', 'Q', ' '}}, //EQUATORIAL GUINEA
- {REG_DOMAIN_ETSI, {'G', 'R', ' '}}, //GREECE
- {REG_DOMAIN_WORLD, {'G', 'S', ' '}}, //SOUTH GEORGIA AND THE SOUTH SANDWICH ISLANDS
- {REG_DOMAIN_WORLD, {'G', 'T', ' '}}, //GUATEMALA
- {REG_DOMAIN_WORLD, {'G', 'U', ' '}}, //GUAM
- {REG_DOMAIN_WORLD, {'G', 'W', ' '}}, //GUINEA-BISSAU
- {REG_DOMAIN_WORLD, {'G', 'Y', ' '}}, //GUYANA
- {REG_DOMAIN_WORLD, {'H', 'K', ' '}}, //HONGKONG
- {REG_DOMAIN_WORLD, {'H', 'M', ' '}}, //HEARD ISLAND AND MCDONALD ISLANDS
- {REG_DOMAIN_WORLD, {'H', 'N', ' '}}, //HONDURAS
- {REG_DOMAIN_HI_5GHZ, {'H', 'R', ' '}}, //CROATIA
- {REG_DOMAIN_WORLD, {'H', 'T', ' '}}, //HAITI
- {REG_DOMAIN_HI_5GHZ, {'H', 'U', ' '}}, //HUNGARY
- {REG_DOMAIN_APAC, {'I', 'D', ' '}}, //INDONESIA
- {REG_DOMAIN_ETSI, {'I', 'E', ' '}}, //IRELAND
- {REG_DOMAIN_WORLD, {'I', 'L', ' '}}, //ISREAL
- {REG_DOMAIN_ETSI, {'I', 'M', ' '}}, //ISLE OF MAN
- {REG_DOMAIN_WORLD, {'I', 'N', ' '}}, //INDIA
- {REG_DOMAIN_ETSI, {'I', 'O', ' '}}, //BRITISH INDIAN OCEAN TERRITORY
- {REG_DOMAIN_WORLD, {'I', 'Q', ' '}}, //IRAQ
- {REG_DOMAIN_WORLD, {'I', 'R', ' '}}, //IRAN, ISLAMIC REPUBLIC OF
- {REG_DOMAIN_WORLD, {'I', 'S', ' '}}, //ICELAND
- {REG_DOMAIN_ETSI, {'I', 'T', ' '}}, //ITALY
- {REG_DOMAIN_ETSI, {'J', 'E', ' '}}, //JERSEY
- {REG_DOMAIN_WORLD, {'J', 'M', ' '}}, //JAMAICA
- {REG_DOMAIN_WORLD, {'J', 'O', ' '}}, //JORDAN
- {REG_DOMAIN_JAPAN, {'J', 'P', ' '}}, //JAPAN
- {REG_DOMAIN_WORLD, {'K', 'E', ' '}}, //KENYA
- {REG_DOMAIN_WORLD, {'K', 'G', ' '}}, //KYRGYZSTAN
- {REG_DOMAIN_WORLD, {'K', 'H', ' '}}, //CAMBODIA
- {REG_DOMAIN_WORLD, {'K', 'I', ' '}}, //KIRIBATI
- {REG_DOMAIN_WORLD, {'K', 'M', ' '}}, //COMOROS
- {REG_DOMAIN_WORLD, {'K', 'N', ' '}}, //SAINT KITTS AND NEVIS
- {REG_DOMAIN_KOREA, {'K', 'P', ' '}}, //KOREA, DEMOCRATIC PEOPLE'S REPUBLIC OF
- {REG_DOMAIN_KOREA, {'K', 'R', ' '}}, //KOREA, REPUBLIC OF
- {REG_DOMAIN_WORLD, {'K', 'W', ' '}}, //KUWAIT
- {REG_DOMAIN_WORLD, {'K', 'Y', ' '}}, //CAYMAN ISLANDS
- {REG_DOMAIN_WORLD, {'K', 'Z', ' '}}, //KAZAKHSTAN
- {REG_DOMAIN_WORLD, {'L', 'A', ' '}}, //LAO PEOPLE'S DEMOCRATIC REPUBLIC
- {REG_DOMAIN_WORLD, {'L', 'B', ' '}}, //LEBANON
- {REG_DOMAIN_WORLD, {'L', 'C', ' '}}, //SAINT LUCIA
- {REG_DOMAIN_ETSI, {'L', 'I', ' '}}, //LIECHTENSTEIN
- {REG_DOMAIN_WORLD, {'L', 'K', ' '}}, //SRI LANKA
- {REG_DOMAIN_WORLD, {'L', 'R', ' '}}, //LIBERIA
- {REG_DOMAIN_WORLD, {'L', 'S', ' '}}, //LESOTHO
- {REG_DOMAIN_HI_5GHZ, {'L', 'T', ' '}}, //LITHUANIA
- {REG_DOMAIN_ETSI, {'L', 'U', ' '}}, //LUXEMBOURG
- {REG_DOMAIN_HI_5GHZ, {'L', 'V', ' '}}, //LATVIA
- {REG_DOMAIN_WORLD, {'L', 'Y', ' '}}, //LIBYAN ARAB JAMAHIRIYA
- {REG_DOMAIN_WORLD, {'M', 'A', ' '}}, //MOROCCO
- {REG_DOMAIN_ETSI, {'M', 'C', ' '}}, //MONACO
- {REG_DOMAIN_WORLD, {'M', 'D', ' '}}, //MOLDOVA, REPUBLIC OF
- {REG_DOMAIN_WORLD, {'M', 'E', ' '}}, //MONTENEGRO
- {REG_DOMAIN_WORLD, {'M', 'G', ' '}}, //MADAGASCAR
- {REG_DOMAIN_WORLD, {'M', 'H', ' '}}, //MARSHALL ISLANDS
- {REG_DOMAIN_WORLD, {'M', 'K', ' '}}, //MACEDONIA, THE FORMER YUGOSLAV REPUBLIC OF
- {REG_DOMAIN_WORLD, {'M', 'L', ' '}}, //MALI
- {REG_DOMAIN_WORLD, {'M', 'M', ' '}}, //MYANMAR
- {REG_DOMAIN_HI_5GHZ, {'M', 'N', ' '}}, //MONGOLIA
- {REG_DOMAIN_WORLD, {'M', 'O', ' '}}, //MACAO
- {REG_DOMAIN_WORLD, {'M', 'P', ' '}}, //NORTHERN MARIANA ISLANDS
- {REG_DOMAIN_WORLD, {'M', 'Q', ' '}}, //MARTINIQUE
- {REG_DOMAIN_WORLD, {'M', 'R', ' '}}, //MAURITANIA
- {REG_DOMAIN_WORLD, {'M', 'S', ' '}}, //MONTSERRAT
- {REG_DOMAIN_WORLD, {'M', 'T', ' '}}, //MALTA
- {REG_DOMAIN_WORLD, {'M', 'U', ' '}}, //MAURITIUS
- {REG_DOMAIN_WORLD, {'M', 'V', ' '}}, //MALDIVES
- {REG_DOMAIN_WORLD, {'M', 'W', ' '}}, //MALAWI
- {REG_DOMAIN_WORLD, {'M', 'X', ' '}}, //MEXICO
- {REG_DOMAIN_HI_5GHZ, {'M', 'Y', ' '}}, //MALAYSIA
- {REG_DOMAIN_WORLD, {'M', 'Z', ' '}}, //MOZAMBIQUE
- {REG_DOMAIN_WORLD, {'N', 'A', ' '}}, //NAMIBIA
- {REG_DOMAIN_WORLD, {'N', 'C', ' '}}, //NEW CALEDONIA
- {REG_DOMAIN_WORLD, {'N', 'E', ' '}}, //NIGER
- {REG_DOMAIN_WORLD, {'N', 'F', ' '}}, //NORFOLD ISLAND
- {REG_DOMAIN_WORLD, {'N', 'G', ' '}}, //NIGERIA
- {REG_DOMAIN_WORLD, {'N', 'I', ' '}}, //NICARAGUA
- {REG_DOMAIN_ETSI, {'N', 'L', ' '}}, //NETHERLANDS
- {REG_DOMAIN_WORLD, {'N', 'O', ' '}}, //NORWAY
- {REG_DOMAIN_WORLD, {'N', 'P', ' '}}, //NEPAL
- {REG_DOMAIN_WORLD, {'N', 'R', ' '}}, //NAURU
- {REG_DOMAIN_WORLD, {'N', 'U', ' '}}, //NIUE
- {REG_DOMAIN_ETSI, {'N', 'Z', ' '}}, //NEW ZEALAND
- {REG_DOMAIN_WORLD, {'O', 'M', ' '}}, //OMAN
- {REG_DOMAIN_WORLD, {'P', 'A', ' '}}, //PANAMA
- {REG_DOMAIN_WORLD, {'P', 'E', ' '}}, //PERU
- {REG_DOMAIN_WORLD, {'P', 'F', ' '}}, //FRENCH POLYNESIA
- {REG_DOMAIN_WORLD, {'P', 'G', ' '}}, //PAPUA NEW GUINEA
- {REG_DOMAIN_WORLD, {'P', 'H', ' '}}, //PHILIPPINES
- {REG_DOMAIN_WORLD, {'P', 'K', ' '}}, //PAKISTAN
- {REG_DOMAIN_WORLD, {'P', 'L', ' '}}, //POLAND
- {REG_DOMAIN_WORLD, {'P', 'M', ' '}}, //SAINT PIERRE AND MIQUELON
- {REG_DOMAIN_WORLD, {'P', 'N', ' '}}, //PITCAIRN
- {REG_DOMAIN_FCC, {'P', 'R', ' '}}, //PUERTO RICO
- {REG_DOMAIN_WORLD, {'P', 'S', ' '}}, //PALESTINIAN TERRITORY, OCCUPIED
- {REG_DOMAIN_ETSI, {'P', 'T', ' '}}, //PORTUGAL
- {REG_DOMAIN_WORLD, {'P', 'W', ' '}}, //PALAU
- {REG_DOMAIN_WORLD, {'P', 'Y', ' '}}, //PARAGUAY
- {REG_DOMAIN_WORLD, {'Q', 'A', ' '}}, //QATAR
- {REG_DOMAIN_WORLD, {'R', 'E', ' '}}, //REUNION
- {REG_DOMAIN_HI_5GHZ, {'R', 'O', ' '}}, //ROMANIA
- {REG_DOMAIN_HI_5GHZ, {'R', 'S', ' '}}, //SERBIA
- {REG_DOMAIN_WORLD, {'R', 'U', ' '}}, //RUSSIA
- {REG_DOMAIN_WORLD, {'R', 'W', ' '}}, //RWANDA
- {REG_DOMAIN_WORLD, {'S', 'A', ' '}}, //SAUDI ARABIA
- {REG_DOMAIN_WORLD, {'S', 'B', ' '}}, //SOLOMON ISLANDS
- {REG_DOMAIN_ETSI, {'S', 'C', ' '}}, //SEYCHELLES
- {REG_DOMAIN_WORLD, {'S', 'D', ' '}}, //SUDAN
- {REG_DOMAIN_ETSI, {'S', 'E', ' '}}, //SWEDEN
- {REG_DOMAIN_APAC, {'S', 'G', ' '}}, //SINGAPORE
- {REG_DOMAIN_WORLD, {'S', 'H', ' '}}, //SAINT HELENA
- {REG_DOMAIN_HI_5GHZ, {'S', 'I', ' '}}, //SLOVENNIA
- {REG_DOMAIN_WORLD, {'S', 'J', ' '}}, //SVALBARD AND JAN MAYEN
- {REG_DOMAIN_HI_5GHZ, {'S', 'K', ' '}}, //SLOVAKIA
- {REG_DOMAIN_WORLD, {'S', 'L', ' '}}, //SIERRA LEONE
- {REG_DOMAIN_WORLD, {'S', 'M', ' '}}, //SAN MARINO
- {REG_DOMAIN_WORLD, {'S', 'N', ' '}}, //SENEGAL
- {REG_DOMAIN_WORLD, {'S', 'O', ' '}}, //SOMALIA
- {REG_DOMAIN_WORLD, {'S', 'R', ' '}}, //SURINAME
- {REG_DOMAIN_WORLD, {'S', 'T', ' '}}, //SAO TOME AND PRINCIPE
- {REG_DOMAIN_WORLD, {'S', 'V', ' '}}, //EL SALVADOR
- {REG_DOMAIN_WORLD, {'S', 'Y', ' '}}, //SYRIAN ARAB REPUBLIC
- {REG_DOMAIN_WORLD, {'S', 'Z', ' '}}, //SWAZILAND
- {REG_DOMAIN_WORLD, {'T', 'C', ' '}}, //TURKS AND CAICOS ISLANDS
- {REG_DOMAIN_WORLD, {'T', 'D', ' '}}, //CHAD
- {REG_DOMAIN_WORLD, {'T', 'F', ' '}}, //FRENCH SOUTHERN TERRITORIES
- {REG_DOMAIN_WORLD, {'T', 'G', ' '}}, //TOGO
- {REG_DOMAIN_WORLD, {'T', 'H', ' '}}, //THAILAND
- {REG_DOMAIN_WORLD, {'T', 'J', ' '}}, //TAJIKISTAN
- {REG_DOMAIN_WORLD, {'T', 'K', ' '}}, //TOKELAU
- {REG_DOMAIN_WORLD, {'T', 'L', ' '}}, //TIMOR-LESTE
- {REG_DOMAIN_WORLD, {'T', 'M', ' '}}, //TURKMENISTAN
- {REG_DOMAIN_WORLD, {'T', 'N', ' '}}, //TUNISIA
- {REG_DOMAIN_WORLD, {'T', 'O', ' '}}, //TONGA
- {REG_DOMAIN_WORLD, {'T', 'R', ' '}}, //TURKEY
- {REG_DOMAIN_WORLD, {'T', 'T', ' '}}, //TRINIDAD AND TOBAGO
- {REG_DOMAIN_WORLD, {'T', 'V', ' '}}, //TUVALU
- {REG_DOMAIN_HI_5GHZ, {'T', 'W', ' '}}, //TAIWAN, PROVINCE OF CHINA
- {REG_DOMAIN_WORLD, {'T', 'Z', ' '}}, //TANZANIA, UNITED REPUBLIC OF
- {REG_DOMAIN_HI_5GHZ, {'U', 'A', ' '}}, //UKRAINE
- {REG_DOMAIN_WORLD, {'U', 'G', ' '}}, //UGANDA
- {REG_DOMAIN_FCC, {'U', 'M', ' '}}, //UNITED STATES MINOR OUTLYING ISLANDS
- {REG_DOMAIN_WORLD, {'U', 'Y', ' '}}, //URUGUAY
- {REG_DOMAIN_HI_5GHZ, {'U', 'Z', ' '}}, //UZBEKISTAN
- {REG_DOMAIN_ETSI, {'V', 'A', ' '}}, //HOLY SEE (VATICAN CITY STATE)
- {REG_DOMAIN_WORLD, {'V', 'C', ' '}}, //SAINT VINCENT AND THE GRENADINES
- {REG_DOMAIN_HI_5GHZ, {'V', 'E', ' '}}, //VENEZUELA
- {REG_DOMAIN_ETSI, {'V', 'G', ' '}}, //VIRGIN ISLANDS, BRITISH
- {REG_DOMAIN_FCC, {'V', 'I', ' '}}, //VIRGIN ISLANDS, US
- {REG_DOMAIN_WORLD, {'V', 'N', ' '}}, //VIET NAM
- {REG_DOMAIN_WORLD, {'V', 'U', ' '}}, //VANUATU
- {REG_DOMAIN_WORLD, {'W', 'F', ' '}}, //WALLIS AND FUTUNA
- {REG_DOMAIN_WORLD, {'W', 'S', ' '}}, //SOMOA
- {REG_DOMAIN_WORLD, {'Y', 'E', ' '}}, //YEMEN
- {REG_DOMAIN_WORLD, {'Y', 'T', ' '}}, //MAYOTTE
- {REG_DOMAIN_WORLD, {'Z', 'A', ' '}}, //SOUTH AFRICA
- {REG_DOMAIN_WORLD, {'Z', 'M', ' '}}, //ZAMBIA
- {REG_DOMAIN_WORLD, {'Z', 'W', ' '}}, //ZIMBABWE
-
- {REG_DOMAIN_KOREA, {'K', '1', ' '}}, //Korea alternate 1
- {REG_DOMAIN_KOREA, {'K', '2', ' '}}, //Korea alternate 2
- {REG_DOMAIN_KOREA, {'K', '3', ' '}}, //Korea alternate 3
- {REG_DOMAIN_KOREA, {'K', '4', ' '}}, //Korea alternate 4
-};
-
-
-//The channels listed here doesn't mean they are valid channels for certain domain. They are here only to present
-//whether they should be passive scanned.
-tCsrDomainChnInfo gCsrDomainChnInfo[NUM_REG_DOMAINS] =
-{
- //REG_DOMAIN_FCC
- {
- REG_DOMAIN_FCC,
- 45, //Num channels
- //Channels
- {
- //5GHz
- //5180 - 5240
- {36, eSIR_ACTIVE_SCAN},
- {40, eSIR_ACTIVE_SCAN},
- {44, eSIR_ACTIVE_SCAN},
- {48, eSIR_ACTIVE_SCAN},
- //5250 to 5350
- {52, eSIR_PASSIVE_SCAN},
- {56, eSIR_PASSIVE_SCAN},
- {60, eSIR_PASSIVE_SCAN},
- {64, eSIR_PASSIVE_SCAN},
- //5470 to 5725
- {100, eSIR_PASSIVE_SCAN},
- {104, eSIR_PASSIVE_SCAN},
- {108, eSIR_PASSIVE_SCAN},
- {112, eSIR_PASSIVE_SCAN},
- {116, eSIR_PASSIVE_SCAN},
- {120, eSIR_PASSIVE_SCAN},
- {124, eSIR_PASSIVE_SCAN},
- {128, eSIR_PASSIVE_SCAN},
- {132, eSIR_PASSIVE_SCAN},
- {136, eSIR_PASSIVE_SCAN},
- {140, eSIR_PASSIVE_SCAN},
- //5745 - 5825
- {149, eSIR_ACTIVE_SCAN},
- {153, eSIR_ACTIVE_SCAN},
- {157, eSIR_ACTIVE_SCAN},
- {161, eSIR_ACTIVE_SCAN},
- {165, eSIR_ACTIVE_SCAN},
- //4.9GHz
- //4920 - 5080
- {240, eSIR_ACTIVE_SCAN},
- {244, eSIR_ACTIVE_SCAN},
- {248, eSIR_ACTIVE_SCAN},
- {252, eSIR_ACTIVE_SCAN},
- {208, eSIR_ACTIVE_SCAN},
- {212, eSIR_ACTIVE_SCAN},
- {216, eSIR_ACTIVE_SCAN},
- //2,4GHz
- {1, eSIR_ACTIVE_SCAN},
- {2, eSIR_ACTIVE_SCAN},
- {3, eSIR_ACTIVE_SCAN},
- {4, eSIR_ACTIVE_SCAN},
- {5, eSIR_ACTIVE_SCAN},
- {6, eSIR_ACTIVE_SCAN},
- {7, eSIR_ACTIVE_SCAN},
- {8, eSIR_ACTIVE_SCAN},
- {9, eSIR_ACTIVE_SCAN},
- {10, eSIR_ACTIVE_SCAN},
- {11, eSIR_ACTIVE_SCAN},
- {12, eSIR_ACTIVE_SCAN},
- {13, eSIR_ACTIVE_SCAN},
- {14, eSIR_ACTIVE_SCAN},
- }
- },
- //REG_DOMAIN_ETSI
- {
- REG_DOMAIN_ETSI,
- 45, //Num channels
- //Channels
- {
- //5GHz
- //5180 - 5240
- {36, eSIR_ACTIVE_SCAN},
- {40, eSIR_ACTIVE_SCAN},
- {44, eSIR_ACTIVE_SCAN},
- {48, eSIR_ACTIVE_SCAN},
- //5250 to 5350
- {52, eSIR_PASSIVE_SCAN},
- {56, eSIR_PASSIVE_SCAN},
- {60, eSIR_PASSIVE_SCAN},
- {64, eSIR_PASSIVE_SCAN},
- //5470 to 5725
- {100, eSIR_PASSIVE_SCAN},
- {104, eSIR_PASSIVE_SCAN},
- {108, eSIR_PASSIVE_SCAN},
- {112, eSIR_PASSIVE_SCAN},
- {116, eSIR_PASSIVE_SCAN},
- {120, eSIR_PASSIVE_SCAN},
- {124, eSIR_PASSIVE_SCAN},
- {128, eSIR_PASSIVE_SCAN},
- {132, eSIR_PASSIVE_SCAN},
- {136, eSIR_PASSIVE_SCAN},
- {140, eSIR_PASSIVE_SCAN},
- //5745 - 5825
- {149, eSIR_ACTIVE_SCAN},
- {153, eSIR_ACTIVE_SCAN},
- {157, eSIR_ACTIVE_SCAN},
- {161, eSIR_ACTIVE_SCAN},
- {165, eSIR_ACTIVE_SCAN},
- //4.9GHz
- //4920 - 5080
- {240, eSIR_ACTIVE_SCAN},
- {244, eSIR_ACTIVE_SCAN},
- {248, eSIR_ACTIVE_SCAN},
- {252, eSIR_ACTIVE_SCAN},
- {208, eSIR_ACTIVE_SCAN},
- {212, eSIR_ACTIVE_SCAN},
- {216, eSIR_ACTIVE_SCAN},
- //2,4GHz
- {1, eSIR_ACTIVE_SCAN},
- {2, eSIR_ACTIVE_SCAN},
- {3, eSIR_ACTIVE_SCAN},
- {4, eSIR_ACTIVE_SCAN},
- {5, eSIR_ACTIVE_SCAN},
- {6, eSIR_ACTIVE_SCAN},
- {7, eSIR_ACTIVE_SCAN},
- {8, eSIR_ACTIVE_SCAN},
- {9, eSIR_ACTIVE_SCAN},
- {10, eSIR_ACTIVE_SCAN},
- {11, eSIR_ACTIVE_SCAN},
- {12, eSIR_ACTIVE_SCAN},
- {13, eSIR_ACTIVE_SCAN},
- {14, eSIR_ACTIVE_SCAN},
- }
- },
- //REG_DOMAIN_JAPAN
- {
- REG_DOMAIN_JAPAN,
- 45, //Num channels
- //Channels
- {
- //5GHz
- //5180 - 5240
- {36, eSIR_ACTIVE_SCAN},
- {40, eSIR_ACTIVE_SCAN},
- {44, eSIR_ACTIVE_SCAN},
- {48, eSIR_ACTIVE_SCAN},
- //5250 to 5350
- {52, eSIR_PASSIVE_SCAN},
- {56, eSIR_PASSIVE_SCAN},
- {60, eSIR_PASSIVE_SCAN},
- {64, eSIR_PASSIVE_SCAN},
- //5470 to 5725
- {100, eSIR_PASSIVE_SCAN},
- {104, eSIR_PASSIVE_SCAN},
- {108, eSIR_PASSIVE_SCAN},
- {112, eSIR_PASSIVE_SCAN},
- {116, eSIR_PASSIVE_SCAN},
- {120, eSIR_PASSIVE_SCAN},
- {124, eSIR_PASSIVE_SCAN},
- {128, eSIR_PASSIVE_SCAN},
- {132, eSIR_PASSIVE_SCAN},
- {136, eSIR_PASSIVE_SCAN},
- {140, eSIR_PASSIVE_SCAN},
- //5745 - 5825
- {149, eSIR_ACTIVE_SCAN},
- {153, eSIR_ACTIVE_SCAN},
- {157, eSIR_ACTIVE_SCAN},
- {161, eSIR_ACTIVE_SCAN},
- {165, eSIR_ACTIVE_SCAN},
- //4.9GHz
- //4920 - 5080
- {240, eSIR_ACTIVE_SCAN},
- {244, eSIR_ACTIVE_SCAN},
- {248, eSIR_ACTIVE_SCAN},
- {252, eSIR_ACTIVE_SCAN},
- {208, eSIR_ACTIVE_SCAN},
- {212, eSIR_ACTIVE_SCAN},
- {216, eSIR_ACTIVE_SCAN},
- //2,4GHz
- {1, eSIR_ACTIVE_SCAN},
- {2, eSIR_ACTIVE_SCAN},
- {3, eSIR_ACTIVE_SCAN},
- {4, eSIR_ACTIVE_SCAN},
- {5, eSIR_ACTIVE_SCAN},
- {6, eSIR_ACTIVE_SCAN},
- {7, eSIR_ACTIVE_SCAN},
- {8, eSIR_ACTIVE_SCAN},
- {9, eSIR_ACTIVE_SCAN},
- {10, eSIR_ACTIVE_SCAN},
- {11, eSIR_ACTIVE_SCAN},
- {12, eSIR_ACTIVE_SCAN},
- {13, eSIR_ACTIVE_SCAN},
- {14, eSIR_ACTIVE_SCAN},
- }
- },
- //REG_DOMAIN_WORLD
- {
- REG_DOMAIN_WORLD,
- 45, //Num channels
- //Channels
- {
- //5GHz
- //5180 - 5240
- {36, eSIR_ACTIVE_SCAN},
- {40, eSIR_ACTIVE_SCAN},
- {44, eSIR_ACTIVE_SCAN},
- {48, eSIR_ACTIVE_SCAN},
- //5250 to 5350
- {52, eSIR_ACTIVE_SCAN},
- {56, eSIR_ACTIVE_SCAN},
- {60, eSIR_ACTIVE_SCAN},
- {64, eSIR_ACTIVE_SCAN},
- //5470 to 5725
- {100, eSIR_ACTIVE_SCAN},
- {104, eSIR_ACTIVE_SCAN},
- {108, eSIR_ACTIVE_SCAN},
- {112, eSIR_ACTIVE_SCAN},
- {116, eSIR_ACTIVE_SCAN},
- {120, eSIR_ACTIVE_SCAN},
- {124, eSIR_ACTIVE_SCAN},
- {128, eSIR_ACTIVE_SCAN},
- {132, eSIR_ACTIVE_SCAN},
- {136, eSIR_ACTIVE_SCAN},
- {140, eSIR_ACTIVE_SCAN},
- //5745 - 5825
- {149, eSIR_ACTIVE_SCAN},
- {153, eSIR_ACTIVE_SCAN},
- {157, eSIR_ACTIVE_SCAN},
- {161, eSIR_ACTIVE_SCAN},
- {165, eSIR_ACTIVE_SCAN},
- //4.9GHz
- //4920 - 5080
- {240, eSIR_ACTIVE_SCAN},
- {244, eSIR_ACTIVE_SCAN},
- {248, eSIR_ACTIVE_SCAN},
- {252, eSIR_ACTIVE_SCAN},
- {208, eSIR_ACTIVE_SCAN},
- {212, eSIR_ACTIVE_SCAN},
- {216, eSIR_ACTIVE_SCAN},
- //2,4GHz
- {1, eSIR_ACTIVE_SCAN},
- {2, eSIR_ACTIVE_SCAN},
- {3, eSIR_ACTIVE_SCAN},
- {4, eSIR_ACTIVE_SCAN},
- {5, eSIR_ACTIVE_SCAN},
- {6, eSIR_ACTIVE_SCAN},
- {7, eSIR_ACTIVE_SCAN},
- {8, eSIR_ACTIVE_SCAN},
- {9, eSIR_ACTIVE_SCAN},
- {10, eSIR_ACTIVE_SCAN},
- {11, eSIR_ACTIVE_SCAN},
- {12, eSIR_ACTIVE_SCAN},
- {13, eSIR_ACTIVE_SCAN},
- {14, eSIR_ACTIVE_SCAN},
- }
- },
- //REG_DOMAIN_N_AMER_EXC_FCC
- {
- REG_DOMAIN_N_AMER_EXC_FCC,
- 45, //Num channels
- //Channels
- {
- //5GHz
- //5180 - 5240
- {36, eSIR_ACTIVE_SCAN},
- {40, eSIR_ACTIVE_SCAN},
- {44, eSIR_ACTIVE_SCAN},
- {48, eSIR_ACTIVE_SCAN},
- //5250 to 5350
- {52, eSIR_PASSIVE_SCAN},
- {56, eSIR_PASSIVE_SCAN},
- {60, eSIR_PASSIVE_SCAN},
- {64, eSIR_PASSIVE_SCAN},
- //5470 to 5725
- {100, eSIR_ACTIVE_SCAN},
- {104, eSIR_ACTIVE_SCAN},
- {108, eSIR_ACTIVE_SCAN},
- {112, eSIR_ACTIVE_SCAN},
- {116, eSIR_ACTIVE_SCAN},
- {120, eSIR_ACTIVE_SCAN},
- {124, eSIR_ACTIVE_SCAN},
- {128, eSIR_ACTIVE_SCAN},
- {132, eSIR_ACTIVE_SCAN},
- {136, eSIR_ACTIVE_SCAN},
- {140, eSIR_ACTIVE_SCAN},
- //5745 - 5825
- {149, eSIR_ACTIVE_SCAN},
- {153, eSIR_ACTIVE_SCAN},
- {157, eSIR_ACTIVE_SCAN},
- {161, eSIR_ACTIVE_SCAN},
- {165, eSIR_ACTIVE_SCAN},
- //4.9GHz
- //4920 - 5080
- {240, eSIR_ACTIVE_SCAN},
- {244, eSIR_ACTIVE_SCAN},
- {248, eSIR_ACTIVE_SCAN},
- {252, eSIR_ACTIVE_SCAN},
- {208, eSIR_ACTIVE_SCAN},
- {212, eSIR_ACTIVE_SCAN},
- {216, eSIR_ACTIVE_SCAN},
- //2,4GHz
- {1, eSIR_ACTIVE_SCAN},
- {2, eSIR_ACTIVE_SCAN},
- {3, eSIR_ACTIVE_SCAN},
- {4, eSIR_ACTIVE_SCAN},
- {5, eSIR_ACTIVE_SCAN},
- {6, eSIR_ACTIVE_SCAN},
- {7, eSIR_ACTIVE_SCAN},
- {8, eSIR_ACTIVE_SCAN},
- {9, eSIR_ACTIVE_SCAN},
- {10, eSIR_ACTIVE_SCAN},
- {11, eSIR_ACTIVE_SCAN},
- {12, eSIR_ACTIVE_SCAN},
- {13, eSIR_ACTIVE_SCAN},
- {14, eSIR_ACTIVE_SCAN},
- }
- },
- //REG_DOMAIN_APAC
- {
- REG_DOMAIN_APAC,
- 45, //Num channels
- //Channels
- {
- //5GHz
- //5180 - 5240
- {36, eSIR_ACTIVE_SCAN},
- {40, eSIR_ACTIVE_SCAN},
- {44, eSIR_ACTIVE_SCAN},
- {48, eSIR_ACTIVE_SCAN},
- //5250 to 5350
- {52, eSIR_PASSIVE_SCAN},
- {56, eSIR_PASSIVE_SCAN},
- {60, eSIR_PASSIVE_SCAN},
- {64, eSIR_PASSIVE_SCAN},
- //5470 to 5725
- {100, eSIR_ACTIVE_SCAN},
- {104, eSIR_ACTIVE_SCAN},
- {108, eSIR_ACTIVE_SCAN},
- {112, eSIR_ACTIVE_SCAN},
- {116, eSIR_ACTIVE_SCAN},
- {120, eSIR_ACTIVE_SCAN},
- {124, eSIR_ACTIVE_SCAN},
- {128, eSIR_ACTIVE_SCAN},
- {132, eSIR_ACTIVE_SCAN},
- {136, eSIR_ACTIVE_SCAN},
- {140, eSIR_ACTIVE_SCAN},
- //5745 - 5825
- {149, eSIR_ACTIVE_SCAN},
- {153, eSIR_ACTIVE_SCAN},
- {157, eSIR_ACTIVE_SCAN},
- {161, eSIR_ACTIVE_SCAN},
- {165, eSIR_ACTIVE_SCAN},
- //4.9GHz
- //4920 - 5080
- {240, eSIR_ACTIVE_SCAN},
- {244, eSIR_ACTIVE_SCAN},
- {248, eSIR_ACTIVE_SCAN},
- {252, eSIR_ACTIVE_SCAN},
- {208, eSIR_ACTIVE_SCAN},
- {212, eSIR_ACTIVE_SCAN},
- {216, eSIR_ACTIVE_SCAN},
- //2,4GHz
- {1, eSIR_ACTIVE_SCAN},
- {2, eSIR_ACTIVE_SCAN},
- {3, eSIR_ACTIVE_SCAN},
- {4, eSIR_ACTIVE_SCAN},
- {5, eSIR_ACTIVE_SCAN},
- {6, eSIR_ACTIVE_SCAN},
- {7, eSIR_ACTIVE_SCAN},
- {8, eSIR_ACTIVE_SCAN},
- {9, eSIR_ACTIVE_SCAN},
- {10, eSIR_ACTIVE_SCAN},
- {11, eSIR_ACTIVE_SCAN},
- {12, eSIR_ACTIVE_SCAN},
- {13, eSIR_ACTIVE_SCAN},
- {14, eSIR_ACTIVE_SCAN},
- }
- },
- //REG_DOMAIN_KOREA
- {
- REG_DOMAIN_KOREA,
- 45, //Num channels
- //Channels
- {
- //5GHz
- //5180 - 5240
- {36, eSIR_ACTIVE_SCAN},
- {40, eSIR_ACTIVE_SCAN},
- {44, eSIR_ACTIVE_SCAN},
- {48, eSIR_ACTIVE_SCAN},
- //5250 to 5350
- {52, eSIR_PASSIVE_SCAN},
- {56, eSIR_PASSIVE_SCAN},
- {60, eSIR_PASSIVE_SCAN},
- {64, eSIR_PASSIVE_SCAN},
- //5470 to 5725
- {100, eSIR_PASSIVE_SCAN},
- {104, eSIR_PASSIVE_SCAN},
- {108, eSIR_PASSIVE_SCAN},
- {112, eSIR_PASSIVE_SCAN},
- {116, eSIR_PASSIVE_SCAN},
- {120, eSIR_PASSIVE_SCAN},
- {124, eSIR_PASSIVE_SCAN},
- {128, eSIR_PASSIVE_SCAN},
- {132, eSIR_PASSIVE_SCAN},
- {136, eSIR_PASSIVE_SCAN},
- {140, eSIR_PASSIVE_SCAN},
- //5745 - 5825
- {149, eSIR_ACTIVE_SCAN},
- {153, eSIR_ACTIVE_SCAN},
- {157, eSIR_ACTIVE_SCAN},
- {161, eSIR_ACTIVE_SCAN},
- {165, eSIR_ACTIVE_SCAN},
- //4.9GHz
- //4920 - 5080
- {240, eSIR_ACTIVE_SCAN},
- {244, eSIR_ACTIVE_SCAN},
- {248, eSIR_ACTIVE_SCAN},
- {252, eSIR_ACTIVE_SCAN},
- {208, eSIR_ACTIVE_SCAN},
- {212, eSIR_ACTIVE_SCAN},
- {216, eSIR_ACTIVE_SCAN},
- //2,4GHz
- {1, eSIR_ACTIVE_SCAN},
- {2, eSIR_ACTIVE_SCAN},
- {3, eSIR_ACTIVE_SCAN},
- {4, eSIR_ACTIVE_SCAN},
- {5, eSIR_ACTIVE_SCAN},
- {6, eSIR_ACTIVE_SCAN},
- {7, eSIR_ACTIVE_SCAN},
- {8, eSIR_ACTIVE_SCAN},
- {9, eSIR_ACTIVE_SCAN},
- {10, eSIR_ACTIVE_SCAN},
- {11, eSIR_ACTIVE_SCAN},
- {12, eSIR_ACTIVE_SCAN},
- {13, eSIR_ACTIVE_SCAN},
- {14, eSIR_ACTIVE_SCAN},
- }
- },
- //REG_DOMAIN_HI_5GHZ
- {
- REG_DOMAIN_HI_5GHZ,
- 45, //Num channels
- //Channels
- {
- //5GHz
- //5180 - 5240
- {36, eSIR_ACTIVE_SCAN},
- {40, eSIR_ACTIVE_SCAN},
- {44, eSIR_ACTIVE_SCAN},
- {48, eSIR_ACTIVE_SCAN},
- //5250 to 5350
- {52, eSIR_ACTIVE_SCAN},
- {56, eSIR_ACTIVE_SCAN},
- {60, eSIR_ACTIVE_SCAN},
- {64, eSIR_ACTIVE_SCAN},
- //5470 to 5725
- {100, eSIR_ACTIVE_SCAN},
- {104, eSIR_ACTIVE_SCAN},
- {108, eSIR_ACTIVE_SCAN},
- {112, eSIR_ACTIVE_SCAN},
- {116, eSIR_ACTIVE_SCAN},
- {120, eSIR_ACTIVE_SCAN},
- {124, eSIR_ACTIVE_SCAN},
- {128, eSIR_ACTIVE_SCAN},
- {132, eSIR_ACTIVE_SCAN},
- {136, eSIR_ACTIVE_SCAN},
- {140, eSIR_ACTIVE_SCAN},
- //5745 - 5825
- {149, eSIR_ACTIVE_SCAN},
- {153, eSIR_ACTIVE_SCAN},
- {157, eSIR_ACTIVE_SCAN},
- {161, eSIR_ACTIVE_SCAN},
- {165, eSIR_ACTIVE_SCAN},
- //4.9GHz
- //4920 - 5080
- {240, eSIR_ACTIVE_SCAN},
- {244, eSIR_ACTIVE_SCAN},
- {248, eSIR_ACTIVE_SCAN},
- {252, eSIR_ACTIVE_SCAN},
- {208, eSIR_ACTIVE_SCAN},
- {212, eSIR_ACTIVE_SCAN},
- {216, eSIR_ACTIVE_SCAN},
- //2,4GHz
- {1, eSIR_ACTIVE_SCAN},
- {2, eSIR_ACTIVE_SCAN},
- {3, eSIR_ACTIVE_SCAN},
- {4, eSIR_ACTIVE_SCAN},
- {5, eSIR_ACTIVE_SCAN},
- {6, eSIR_ACTIVE_SCAN},
- {7, eSIR_ACTIVE_SCAN},
- {8, eSIR_ACTIVE_SCAN},
- {9, eSIR_ACTIVE_SCAN},
- {10, eSIR_ACTIVE_SCAN},
- {11, eSIR_ACTIVE_SCAN},
- {12, eSIR_ACTIVE_SCAN},
- {13, eSIR_ACTIVE_SCAN},
- {14, eSIR_ACTIVE_SCAN},
- }
- },
- //REG_DOMAIN_NO_5GHZ
- {
- REG_DOMAIN_NO_5GHZ,
- 45, //Num channels
- //Channels
- {
- //5GHz
- //5180 - 5240
- {36, eSIR_ACTIVE_SCAN},
- {40, eSIR_ACTIVE_SCAN},
- {44, eSIR_ACTIVE_SCAN},
- {48, eSIR_ACTIVE_SCAN},
- //5250 to 5350
- {52, eSIR_ACTIVE_SCAN},
- {56, eSIR_ACTIVE_SCAN},
- {60, eSIR_ACTIVE_SCAN},
- {64, eSIR_ACTIVE_SCAN},
- //5470 to 5725
- {100, eSIR_ACTIVE_SCAN},
- {104, eSIR_ACTIVE_SCAN},
- {108, eSIR_ACTIVE_SCAN},
- {112, eSIR_ACTIVE_SCAN},
- {116, eSIR_ACTIVE_SCAN},
- {120, eSIR_ACTIVE_SCAN},
- {124, eSIR_ACTIVE_SCAN},
- {128, eSIR_ACTIVE_SCAN},
- {132, eSIR_ACTIVE_SCAN},
- {136, eSIR_ACTIVE_SCAN},
- {140, eSIR_ACTIVE_SCAN},
- //5745 - 5825
- {149, eSIR_ACTIVE_SCAN},
- {153, eSIR_ACTIVE_SCAN},
- {157, eSIR_ACTIVE_SCAN},
- {161, eSIR_ACTIVE_SCAN},
- {165, eSIR_ACTIVE_SCAN},
- //4.9GHz
- //4920 - 5080
- {240, eSIR_ACTIVE_SCAN},
- {244, eSIR_ACTIVE_SCAN},
- {248, eSIR_ACTIVE_SCAN},
- {252, eSIR_ACTIVE_SCAN},
- {208, eSIR_ACTIVE_SCAN},
- {212, eSIR_ACTIVE_SCAN},
- {216, eSIR_ACTIVE_SCAN},
- //2,4GHz
- {1, eSIR_ACTIVE_SCAN},
- {2, eSIR_ACTIVE_SCAN},
- {3, eSIR_ACTIVE_SCAN},
- {4, eSIR_ACTIVE_SCAN},
- {5, eSIR_ACTIVE_SCAN},
- {6, eSIR_ACTIVE_SCAN},
- {7, eSIR_ACTIVE_SCAN},
- {8, eSIR_ACTIVE_SCAN},
- {9, eSIR_ACTIVE_SCAN},
- {10, eSIR_ACTIVE_SCAN},
- {11, eSIR_ACTIVE_SCAN},
- {12, eSIR_ACTIVE_SCAN},
- {13, eSIR_ACTIVE_SCAN},
- {14, eSIR_ACTIVE_SCAN},
- }
- },
-};
-#endif
-
extern const tRfChannelProps rfChannels[NUM_RF_CHANNELS];
////////////////////////////////////////////////////////////////////////
@@ -2988,19 +2174,8 @@ csrIsconcurrentsessionValid(tpAniSirGlobal pMac,tANI_U32 cursessionId,
switch (currBssPersona)
{
case VOS_STA_MODE:
-#ifndef QCA_WIFI_2_0
- if(pMac->roam.roamSession[sessionId].pCurRoamProfile &&
- (pMac->roam.roamSession[sessionId].pCurRoamProfile->csrPersona
- == VOS_STA_MODE)) //check for P2P client mode
- {
- smsLog(pMac, LOGE, FL(" ****STA mode already exists ****"));
- return eHAL_STATUS_FAILURE;
- }
- break;
-#else
smsLog(pMac, LOG1, FL(" **** STA session ****"));
return eHAL_STATUS_SUCCESS;
-#endif
case VOS_STA_SAP_MODE:
#ifndef WLAN_FEATURE_MBSSID
@@ -3070,11 +2245,9 @@ csrIsconcurrentsessionValid(tpAniSirGlobal pMac,tANI_U32 cursessionId,
return eHAL_STATUS_FAILURE;
}
break;
-#ifdef QCA_WIFI_2_0
case VOS_P2P_CLIENT_MODE:
smsLog(pMac, LOG1, FL(" **** P2P-Client session ****"));
return eHAL_STATUS_SUCCESS;
-#endif
default :
smsLog(pMac, LOGE, FL("***Persona not handled = %d*****"),currBssPersona);
break;
@@ -3217,13 +2390,8 @@ eHalStatus csrValidateMCCBeaconInterval(tpAniSirGlobal pMac, tANI_U8 channelId,
if (pMac->roam.roamSession[sessionId].bssParams.operationChn
!= channelId )
{
-#ifndef QCA_WIFI_2_0
- smsLog(pMac, LOGE, FL("***MCC is not enabled for SAP +STA****"));
- return eHAL_STATUS_FAILURE;
-#else
smsLog(pMac, LOGE, FL("*** MCC with SAP+STA sessions ****"));
return eHAL_STATUS_SUCCESS;
-#endif
}
}
else if (pMac->roam.roamSession[sessionId].bssParams.bssPersona
@@ -3534,62 +2702,6 @@ static tANI_BOOLEAN csrMatchWPAOUIIndex( tpAniSirGlobal pMac, tANI_U8 AllCyphers
}
-#if 0
-static tANI_BOOLEAN csrIsRSNUnicastNone( tpAniSirGlobal pMac, tANI_U8 AllCyphers[][CSR_RSN_OUI_SIZE],
- tANI_U8 cAllCyphers,
- tANI_U8 Oui[] )
-{
- return( csrIsOuiMatch( pMac, AllCyphers, cAllCyphers, csrRSNOui00, Oui ) );
-}
-
-static tANI_BOOLEAN csrIsRSNMulticastWep( tpAniSirGlobal pMac, tANI_U8 AllCyphers[][CSR_RSN_OUI_SIZE],
- tANI_U8 cAllCyphers,
- tANI_U8 Oui[] )
-{
- tANI_BOOLEAN fYes = FALSE;
-
- // Check Wep 104 first, if fails, then check Wep40.
- fYes = csrIsOuiMatch( pMac, AllCyphers, cAllCyphers, csrRSNOui05, Oui );
-
- if ( !fYes )
- {
- // if not Wep-104, check Wep-40
- fYes = csrIsOuiMatch( pMac, AllCyphers, cAllCyphers, csrRSNOui01, Oui );
- }
-
- return( fYes );
-}
-
-
-static tANI_BOOLEAN csrIsRSNUnicastTkip( tpAniSirGlobal pMac, tANI_U8 AllCyphers[][CSR_RSN_OUI_SIZE],
- tANI_U8 cAllCyphers,
- tANI_U8 Oui[] )
-{
- return( csrIsOuiMatch( pMac, AllCyphers, cAllCyphers, csrRSNOui02, Oui ) );
-}
-
-
-static tANI_BOOLEAN csrIsRSNMulticastTkip( tpAniSirGlobal pMac, tANI_U8 AllCyphers[][CSR_RSN_OUI_SIZE],
- tANI_U8 cAllCyphers,
- tANI_U8 Oui[] )
-{
- return( csrIsOuiMatch( pMac, AllCyphers, cAllCyphers, csrRSNOui02, Oui ) );
-}
-
-static tANI_BOOLEAN csrIsRSNUnicastAes( tpAniSirGlobal pMac, tANI_U8 AllCyphers[][CSR_RSN_OUI_SIZE],
- tANI_U8 cAllCyphers,
- tANI_U8 Oui[] )
-{
- return( csrIsOuiMatch( pMac, AllCyphers, cAllCyphers, csrRSNOui04, Oui ) );
-}
-
-static tANI_BOOLEAN csrIsRSNMulticastAes( tpAniSirGlobal pMac, tANI_U8 AllCyphers[][CSR_RSN_OUI_SIZE],
- tANI_U8 cAllCyphers,
- tANI_U8 Oui[] )
-{
- return( csrIsOuiMatch( pMac, AllCyphers, cAllCyphers, csrRSNOui04, Oui ) );
-}
-#endif
#ifdef FEATURE_WLAN_WAPI
static tANI_BOOLEAN csrIsAuthWapiCert( tpAniSirGlobal pMac, tANI_U8 AllSuites[][CSR_WAPI_OUI_SIZE],
tANI_U8 cAllSuites,
@@ -3700,64 +2812,6 @@ static tANI_BOOLEAN csrIsAuthWpaPsk( tpAniSirGlobal pMac, tANI_U8 AllSuites[][CS
{
return( csrIsOuiMatch( pMac, AllSuites, cAllSuites, csrWpaOui[02], Oui ) );
}
-#if 0
-static tANI_BOOLEAN csrIsUnicastNone( tpAniSirGlobal pMac, tANI_U8 AllCyphers[][CSR_WPA_OUI_SIZE],
- tANI_U8 cAllCyphers,
- tANI_U8 Oui[] )
-{
- return( csrIsOuiMatch( pMac, AllCyphers, cAllCyphers, csrWpaOui00, Oui ) );
-}
-
-static tANI_BOOLEAN csrIsUnicastTkip( tpAniSirGlobal pMac, tANI_U8 AllCyphers[][CSR_WPA_OUI_SIZE],
- tANI_U8 cAllCyphers,
- tANI_U8 Oui[] )
-{
- return( csrIsOuiMatch( pMac, AllCyphers, cAllCyphers, csrWpaOui02, Oui ) );
-}
-
-static tANI_BOOLEAN csrIsUnicastAes( tpAniSirGlobal pMac, tANI_U8 AllCyphers[][CSR_WPA_OUI_SIZE],
- tANI_U8 cAllCyphers,
- tANI_U8 Oui[] )
-{
- return( csrIsOuiMatch( pMac, AllCyphers, cAllCyphers, csrWpaOui04, Oui ) );
-}
-
-
-static tANI_BOOLEAN csrIsMulticastWep( tpAniSirGlobal pMac, tANI_U8 AllCyphers[][CSR_WPA_OUI_SIZE],
- tANI_U8 cAllCyphers,
- tANI_U8 Oui[] )
-{
- tANI_BOOLEAN fYes = FALSE;
-
- // Check Wep 104 first, if fails, then check Wep40.
- fYes = csrIsOuiMatch( pMac, AllCyphers, cAllCyphers, csrWpaOui05, Oui );
-
- if ( !fYes )
- {
- // if not Wep-104, check Wep-40
- fYes = csrIsOuiMatch( pMac, AllCyphers, cAllCyphers, csrWpaOui01, Oui );
- }
-
- return( fYes );
-}
-
-
-static tANI_BOOLEAN csrIsMulticastTkip( tpAniSirGlobal pMac, tANI_U8 AllCyphers[][CSR_WPA_OUI_SIZE],
- tANI_U8 cAllCyphers,
- tANI_U8 Oui[] )
-{
- return( csrIsOuiMatch( pMac, AllCyphers, cAllCyphers, csrWpaOui02, Oui ) );
-}
-
-
-static tANI_BOOLEAN csrIsMulticastAes( tpAniSirGlobal pMac, tANI_U8 AllCyphers[][CSR_WPA_OUI_SIZE],
- tANI_U8 cAllCyphers,
- tANI_U8 Oui[] )
-{
- return( csrIsOuiMatch( pMac, AllCyphers, cAllCyphers, csrWpaOui04, Oui ) );
-}
-
-#endif
tANI_U8 csrGetOUIIndexFromCipher( eCsrEncryptionType enType )
{
@@ -6396,25 +5450,6 @@ tSirResultCodes csrGetDeAuthRspStatusCode( tSirSmeDeauthRsp *pSmeRsp )
return( ( tSirResultCodes )ret );
}
-#if 0
-tSirScanType csrGetScanType(tANI_U8 chnId, eRegDomainId domainId, tANI_U8 *countryCode)
-{
- tSirScanType scanType = eSIR_PASSIVE_SCAN;
- tANI_U8 cc = 0;
-
- while (cc++ < gCsrDomainChnInfo[domainId].numChannels)
- {
- if(chnId == gCsrDomainChnInfo[domainId].chnInfo[cc].chnId)
- {
- scanType = gCsrDomainChnInfo[domainId].chnInfo[cc].scanType;
- break;
- }
- }
-
- return (scanType);
-}
-#endif
-
tSirScanType csrGetScanType(tpAniSirGlobal pMac, tANI_U8 chnId)
{
tSirScanType scanType = eSIR_PASSIVE_SCAN;
@@ -6722,111 +5757,6 @@ tANI_BOOLEAN csrMatchCountryCode( tpAniSirGlobal pMac, tANI_U8 *pCountry, tDot11
return (fRet);
}
-#if 0
-eHalStatus csrSetCountryDomainMapping(tpAniSirGlobal pMac, tCsrCountryDomainMapping *pCountryDomainMapping)
-{
- eHalStatus status = eHAL_STATUS_INVALID_PARAMETER;
- tANI_U32 i, j;
- tANI_BOOLEAN fDomainChanged = eANI_BOOLEAN_FALSE;
- tANI_U8 countryCode[WNI_CFG_COUNTRY_CODE_LEN];
-
- i = WNI_CFG_COUNTRY_CODE_LEN;
- //Get the currently used country code
- status = ccmCfgGetStr(pMac, WNI_CFG_COUNTRY_CODE, countryCode, &i);
- if(HAL_STATUS_SUCCESS(status))
- {
- if(pCountryDomainMapping && pCountryDomainMapping->numEntry)
- {
- for(i = 0; i < pCountryDomainMapping->numEntry; i++)
- {
- for(j = 0; j < eCSR_NUM_COUNTRY_INDEX; j++)
- {
- if (vos_mem_compare(gCsrCountryInfo[j].countryCode,
- pCountryDomainMapping->pCountryInfo[i].countryCode,
- 2))
- {
- if(gCsrCountryInfo[j].domainId != pCountryDomainMapping->pCountryInfo[i].domainId)
- {
- gCsrCountryInfo[j].domainId = pCountryDomainMapping->pCountryInfo[i].domainId;
- //Check whether it matches the currently used country code
- //If matching, need to update base on the new domain setting.
- if (vos_mem_compare(countryCode,
- pCountryDomainMapping->pCountryInfo[i].countryCode,
- 2))
- {
- fDomainChanged = eANI_BOOLEAN_TRUE;
- }
- }
- break;
- }
- }
- }
- status = eHAL_STATUS_SUCCESS;
- if(fDomainChanged)
- {
- tCsrChannel *pChannelList;
-
- if(pMac->scan.f11dInfoApplied)
- {
- //11d info already applied. Let's reapply with the new domain setting
- if(pMac->scan.channels11d.numChannels)
- {
- pChannelList = &pMac->scan.channels11d;
- }
- else
- {
- pChannelList = &pMac->scan.base20MHzChannels;
- }
- }
- else
- {
- //no 11d so we use the base channelist from EEPROM
- pChannelList = &pMac->scan.base20MHzChannels;
- }
- //set the new domain's scan requirement to CFG
- csrSetCfgScanControlList(pMac, countryCode, pChannelList);
- }
- }
- }
-
- return (status);
-}
-
-eHalStatus csrSetDomainScanSetting(tpAniSirGlobal pMac, tCsrDomainFreqInfo *pDomainFreqInfo)
-{
- eHalStatus status = eHAL_STATUS_INVALID_PARAMETER;
- tANI_U32 i, j;
- tANI_U16 freq;
-
- if(pDomainFreqInfo && pDomainFreqInfo->numEntry && (pDomainFreqInfo->domainId < NUM_REG_DOMAINS))
- {
- tCsrDomainChnInfo *pDomainChnInfo = &gCsrDomainChnInfo[pDomainFreqInfo->domainId];
-
- for(j = 0; j < pDomainChnInfo->numChannels; j++)
- {
- if(HAL_STATUS_SUCCESS(halPhyChIdToFreqConversion(pDomainChnInfo->chnInfo[j].chnId, &freq)))
- {
- for(i = 0; i < pDomainFreqInfo->numEntry; i++)
- {
- if((pDomainFreqInfo->pCsrScanFreqInfo[i].nStartFreq <= freq) &&
- (freq <= pDomainFreqInfo->pCsrScanFreqInfo[i].nEndFreq))
- {
- pDomainChnInfo->chnInfo[j].scanType = pDomainFreqInfo->pCsrScanFreqInfo[i].scanType;
- break;
- }
- }
- }
- else
- {
- smsLog(pMac, LOGW, " Failed to get frequency of channel %d", pDomainChnInfo->chnInfo[j].chnId);
- }
- }
- status = eHAL_STATUS_SUCCESS;
- }
-
- return (status);
-}
-#endif
eHalStatus csrGetModifyProfileFields(tpAniSirGlobal pMac, tANI_U32 sessionId,
tCsrRoamModifyProfileFields *pModifyProfileFields)
@@ -6857,47 +5787,6 @@ eHalStatus csrSetModifyProfileFields(tpAniSirGlobal pMac, tANI_U32 sessionId,
}
-#if 0
-/* ---------------------------------------------------------------------------
- \fn csrGetSupportedCountryCode
- \brief this function is to get a list of the country code current being supported
- \param pBuf - Caller allocated buffer with at least 3 bytes, upon success return,
- this has the country code list. 3 bytes for each country code. This may be NULL if
- caller wants to know the needed bytes.
- \param pbLen - Caller allocated, as input, it indicates the length of pBuf. Upon success return,
- this contains the length of the data in pBuf
- \return eHalStatus
- -------------------------------------------------------------------------------*/
-eHalStatus csrGetSupportedCountryCode(tpAniSirGlobal pMac, tANI_U8 *pBuf, tANI_U32 *pbLen)
-{
- tANI_U32 numOfCountry = sizeof( gCsrCountryInfo ) / sizeof( gCsrCountryInfo[0] );
- tANI_U32 numBytes = 0;
- eHalStatus status = eHAL_STATUS_INVALID_PARAMETER;
-
- if( pbLen )
- {
- numBytes = *pbLen;
- //Consider it ok, at least we can return the number of bytes needed;
- *pbLen = numOfCountry * WNI_CFG_COUNTRY_CODE_LEN;
- status = eHAL_STATUS_SUCCESS;
- if( pBuf && ( numBytes >= *pbLen ) )
- {
- //The ugly part starts.
- //We may need to alter the data structure and find a way to make this faster.
- tANI_U32 i;
-
- for ( i = 0; i < numOfCountry; i++ )
- {
- vos_mem_copy(pBuf + ( i * WNI_CFG_COUNTRY_CODE_LEN ),
- gCsrCountryInfo[i].countryCode,
- WNI_CFG_COUNTRY_CODE_LEN);
- }
- }
- }
-
- return ( status );
-}
-#endif
/* ---------------------------------------------------------------------------
\fn csrGetSupportedCountryCode
diff --git a/CORE/SME/src/oemData/oemDataApi.c b/CORE/SME/src/oemData/oemDataApi.c
index 71d7df6dbfea..5ccf6a4e5491 100644
--- a/CORE/SME/src/oemData/oemDataApi.c
+++ b/CORE/SME/src/oemData/oemDataApi.c
@@ -110,10 +110,6 @@ eHalStatus oemData_OemDataReqClose(tHalHandle hHal)
-------------------------------------------------------------------------------*/
void oemData_ReleaseOemDataReqCommand(tpAniSirGlobal pMac, tSmeCmd *pOemDataCmd, eOemDataReqStatus oemDataReqStatus)
{
-#ifndef QCA_WIFI_2_0
- //Do the callback
- pOemDataCmd->u.oemDataCmd.callback(pMac, pOemDataCmd->u.oemDataCmd.pContext, pOemDataCmd->u.oemDataCmd.oemDataReqID, oemDataReqStatus);
-#endif
//First take this command out of the active list
if(csrLLRemoveEntry(&pMac->sme.smeCmdActiveList, &pOemDataCmd->Link, LL_ACCESS_LOCK))
@@ -293,9 +289,7 @@ eHalStatus sme_HandleOemDataRsp(tHalHandle hHal, tANI_U8* pMsg)
tListElem *pEntry = NULL;
tSmeCmd *pCommand = NULL;
tSirOemDataRsp* pOemDataRsp = NULL;
-#ifdef QCA_WIFI_2_0
tANI_U32 *msgSubType;
-#endif
pMac = PMAC_STRUCT(hHal);
@@ -310,61 +304,6 @@ eHalStatus sme_HandleOemDataRsp(tHalHandle hHal, tANI_U8* pMsg)
break;
}
-#ifndef QCA_WIFI_2_0
- pEntry = csrLLPeekHead( &pMac->sme.smeCmdActiveList, LL_ACCESS_LOCK );
- if(pEntry)
- {
- pCommand = GET_BASE_ADDR( pEntry, tSmeCmd, Link );
- if(eSmeCommandOemDataReq == pCommand->command)
- {
- pOemDataRsp = (tSirOemDataRsp*)pMsg;
-
- //make sure to acquire the lock before modifying the data
- status = sme_AcquireGlobalLock(&pMac->sme);
- if(!HAL_STATUS_SUCCESS(status))
- {
- break;
- }
-
- if(pMac->oemData.pOemDataRsp != NULL)
- {
- vos_mem_free(pMac->oemData.pOemDataRsp);
- }
- pMac->oemData.pOemDataRsp = (tOemDataRsp*)vos_mem_malloc(sizeof(tOemDataRsp));
-
- if(pMac->oemData.pOemDataRsp == NULL)
- {
- sme_ReleaseGlobalLock(&pMac->sme);
- smsLog(pMac, LOGE, "in %s vos_mem_malloc failed for pMac->oemData.pOemDataRsp", __func__);
- status = eHAL_STATUS_FAILURE;
- break;
- }
-
- smsLog(pMac, LOGE, "Before memory copy");
- vos_mem_copy((v_VOID_t*)(pMac->oemData.pOemDataRsp),
- (v_VOID_t*)(&pOemDataRsp->oemDataRsp),
- sizeof(tOemDataRsp));
- smsLog(pMac, LOGE, "after memory copy");
- sme_ReleaseGlobalLock(&pMac->sme);
- }
- else
- {
- smsLog(pMac, LOGE, "in %s eWNI_SME_OEM_DATA_RSP Received but NO REQs are ACTIVE ...",
- __func__);
- status = eHAL_STATUS_FAILURE;
- break;
- }
- }
- else
- {
- smsLog(pMac, LOGE, "in %s eWNI_SME_OEM_DATA_RSP Received but NO commands are ACTIVE ...", __func__);
- status = eHAL_STATUS_FAILURE;
- break;
- }
-
- oemData_ReleaseOemDataReqCommand(pMac, pCommand, eHAL_STATUS_SUCCESS);
- pMac->oemData.oemDataReqActive = eANI_BOOLEAN_FALSE;
-#else /* QCA_WIFI_2_0 */
/* In this case, there can be multiple OEM Data Responses for one
* OEM Data request, SME does not peek into data response so SME
* can not know which response is the last one. So SME clears active
@@ -403,7 +342,6 @@ eHalStatus sme_HandleOemDataRsp(tHalHandle hHal, tANI_U8* pMsg)
VOS_TRACE(VOS_MODULE_ID_SME, VOS_TRACE_LEVEL_INFO,
"%s: received internal oem data resp, msgSubType (0x%x)",
__func__, *msgSubType);
-#endif /* QCA_WIFI_2_0 */
} while(0);
return status;
diff --git a/CORE/SME/src/p2p/p2p_Api.c b/CORE/SME/src/p2p/p2p_Api.c
index b73d8dc6ea8e..566c9d337e65 100644
--- a/CORE/SME/src/p2p/p2p_Api.c
+++ b/CORE/SME/src/p2p/p2p_Api.c
@@ -36,17 +36,6 @@
#include "limApi.h"
#include "cfgApi.h"
-#ifdef WLAN_FEATURE_P2P_INTERNAL
-#include "p2p_ie.h"
-#include "p2pFsm.h"
-
-extern tp2pie gP2PIe;
-
-static eHalStatus p2pSendActionFrame(tpAniSirGlobal pMac, tANI_U8 SessionID, eP2PFrameType actionFrameType);
-static eHalStatus p2pListenStateDiscoverableCallback(tHalHandle halHandle, void *pContext, eHalStatus retStatus);
-static eHalStatus p2pRemainOnChannelReadyCallback(tHalHandle halHandle, void *pContext, eHalStatus scan_status);
-static tANI_BOOLEAN p2pIsGOportEnabled(tpAniSirGlobal pMac);
-#endif
eHalStatus p2pProcessNoAReq(tpAniSirGlobal pMac, tSmeCmd *pNoACmd);
/*------------------------------------------------------------------
@@ -68,36 +57,14 @@ eHalStatus p2pProcessRemainOnChannelCmd(tpAniSirGlobal pMac, tSmeCmd *p2pRemaino
return eHAL_STATUS_FAILURE;
}
-#ifdef WLAN_FEATURE_P2P_INTERNAL
- tANI_U8 P2PsessionId = getP2PSessionIdFromSMESessionId(pMac, p2pRemainonChn->sessionId);
- tp2pContext *p2pContext = &pMac->p2pContext[P2PsessionId];
- tANI_U32 ieLen = 0;
-#endif
-#ifdef WLAN_FEATURE_P2P_INTERNAL
- if( !pSession->sessionActive || (CSR_SESSION_ID_INVALID == P2PsessionId))
- {
- smsLog(pMac, LOGE, FL(" session %d (P2P session %d) is invalid or listen is disabled "),
- p2pRemainonChn->sessionId, P2PsessionId);
- return eHAL_STATUS_FAILURE;
- }
-#else
if(!pSession->sessionActive)
{
smsLog(pMac, LOGE, FL(" session %d is invalid or listen is disabled "),
p2pRemainonChn->sessionId);
return eHAL_STATUS_FAILURE;
}
-#endif
-#ifdef WLAN_FEATURE_P2P_INTERNAL
- P2P_GetIE(p2pContext,
- p2pContext->sessionId, eP2P_PROBE_RSP,
- &p2pContext->probeRspIe, &ieLen);
- p2pContext->probeRspIeLength = ieLen;
- len = sizeof(tSirRemainOnChnReq) + ieLen;
-#else
len = sizeof(tSirRemainOnChnReq) + pMac->p2pContext.probeRspIeLength;
-#endif
if( len > 0xFFFF )
{
@@ -122,18 +89,9 @@ eHalStatus p2pProcessRemainOnChannelCmd(tpAniSirGlobal pMac, tSmeCmd *p2pRemaino
pMsg->duration = p2pRemainonChn->u.remainChlCmd.duration;
pMsg->sessionId = p2pRemainonChn->sessionId;
pMsg->isProbeRequestAllowed = p2pRemainonChn->u.remainChlCmd.isP2PProbeReqAllowed;
-#ifdef WLAN_FEATURE_P2P_INTERNAL
- pMsg->sessionId = pSession->sessionId;
- if( p2pContext->probeRspIeLength )
- {
- vos_mem_copy((void *)pMsg->probeRspIe, (void *)p2pContext->probeRspIe,
- p2pContext->probeRspIeLength);
- }
-#else
if( pMac->p2pContext.probeRspIeLength )
vos_mem_copy((void *)pMsg->probeRspIe, (void *)pMac->p2pContext.probeRspIe,
pMac->p2pContext.probeRspIeLength);
-#endif
status = palSendMBMessage(pMac->hHdd, pMsg);
}
@@ -203,33 +161,8 @@ eHalStatus sme_mgmtFrmInd( tHalHandle hHal, tpSirSmeMgmtFrameInd pSmeMgmtFrm)
eHalStatus status = eHAL_STATUS_SUCCESS;
tCsrRoamInfo pRoamInfo = {0};
tANI_U8 i;
-#ifndef WLAN_FEATURE_P2P_INTERNAL
tANI_U32 SessionId = pSmeMgmtFrm->sessionId;
-#endif
-
-#ifdef WLAN_FEATURE_P2P_INTERNAL
- //For now, only action frames are needed.
- if(SIR_MAC_MGMT_ACTION == pSmeMgmtFrm->frameType)
- {
- pRoamInfo.nFrameLength = pSmeMgmtFrm->mesgLen - sizeof(tSirSmeMgmtFrameInd);
- pRoamInfo.pbFrames = pSmeMgmtFrm->frameBuf;
- pRoamInfo.frameType = pSmeMgmtFrm->frameType;
- pRoamInfo.rxChan = pSmeMgmtFrm->rxChan;
- pRoamInfo.rxRssi = pSmeMgmtFrm->rxRssi;
-
- //Somehow we don't get the right sessionId.
- for(i = 0; i < CSR_ROAM_SESSION_MAX; i++)
- {
- if( CSR_IS_SESSION_VALID( pMac, i ) )
- {
- status = eHAL_STATUS_SUCCESS;
- /* forward the mgmt frame to all active sessions*/
- csrRoamCallCallback(pMac, i, &pRoamInfo, 0, eCSR_ROAM_INDICATE_MGMT_FRAME, 0);
- }
- }
- }
-#else
pRoamInfo.nFrameLength = pSmeMgmtFrm->mesgLen - sizeof(tSirSmeMgmtFrameInd);
pRoamInfo.pbFrames = pSmeMgmtFrm->frameBuf;
pRoamInfo.frameType = pSmeMgmtFrm->frameType;
@@ -249,7 +182,6 @@ eHalStatus sme_mgmtFrmInd( tHalHandle hHal, tpSirSmeMgmtFrameInd pSmeMgmtFrm)
/* forward the mgmt frame to HDD */
csrRoamCallCallback(pMac, SessionId, &pRoamInfo, 0, eCSR_ROAM_INDICATE_MGMT_FRAME, 0);
-#endif
return status;
}
@@ -268,16 +200,6 @@ eHalStatus sme_remainOnChnReady( tHalHandle hHal, tANI_U8* pMsg)
tListElem *pEntry = NULL;
tSmeCmd *pCommand = NULL;
tCsrRoamInfo RoamInfo;
-#ifdef WLAN_FEATURE_P2P_INTERNAL
- tSirSmeRsp *pRsp = (tSirSmeRsp *)pMsg;
- //pRsp->sessionId is SME's session index
- tANI_U8 P2PSessionID = getP2PSessionIdFromSMESessionId(pMac, pRsp->sessionId);
-
- if(CSR_SESSION_ID_INVALID == P2PSessionID)
- {
- return eHAL_STATUS_FAILURE;
- }
-#endif
if (pMac->fP2pListenOffload)
pEntry = csrLLPeekHead(&pMac->sme.smeScanCmdActiveList, LL_ACCESS_LOCK);
@@ -290,17 +212,10 @@ eHalStatus sme_remainOnChnReady( tHalHandle hHal, tANI_U8* pMsg)
if( eSmeCommandRemainOnChannel == pCommand->command )
{
-#ifdef WLAN_FEATURE_P2P_INTERNAL
- if (pMac->p2pContext[P2PSessionID].PeerFound)
- {
- p2pRemainOnChannelReadyCallback(pMac, &pMac->p2pContext[P2PSessionID], eHAL_STATUS_SUCCESS);
- }
-#else
/* forward the indication to HDD */
RoamInfo.pRemainCtx = pCommand->u.remainChlCmd.callbackCtx;
csrRoamCallCallback(pMac, ((tSirSmeRsp*)pMsg)->sessionId, &RoamInfo,
0, eCSR_ROAM_REMAIN_CHAN_READY, 0);
-#endif
}
}
@@ -315,281 +230,16 @@ eHalStatus sme_sendActionCnf( tHalHandle hHal, tANI_U8* pMsg)
tCsrRoamInfo RoamInfo;
tSirSmeRsp* pSmeRsp = (tSirSmeRsp*)pMsg;
-#ifdef WLAN_FEATURE_P2P_INTERNAL
- tSirResultCodes rspStatus = pSmeRsp->statusCode;
- tANI_U8 HDDsessionId = getP2PSessionIdFromSMESessionId(pMac, pSmeRsp->sessionId);
- tANI_U8 *pBuf = NULL;
- tp2pContext *pP2pContext;
-
- if(CSR_SESSION_ID_INVALID == HDDsessionId)
- {
- VOS_TRACE(VOS_MODULE_ID_SME, VOS_TRACE_LEVEL_ERROR,
- " %s fail to get HDD sessionID (SMESessionID %d)", __func__, pSmeRsp->sessionId);
- return eHAL_STATUS_INVALID_PARAMETER;
- }
-
- pP2pContext = &pMac->p2pContext[HDDsessionId];
-
- VOS_TRACE(VOS_MODULE_ID_SME, VOS_TRACE_LEVEL_INFO, "%s status %d Action Frame %d actionFrameTimeout %d",
- __func__, pSmeRsp->statusCode, pP2pContext->actionFrameType
- , pP2pContext->actionFrameTimeout);
- vos_mem_zero(&RoamInfo, sizeof(tCsrRoamInfo));
-
- if (pSmeRsp->statusCode != eSIR_SME_SUCCESS && !pP2pContext->actionFrameTimeout
- && pP2pContext->pSentActionFrame)
- {
- VOS_TRACE(VOS_MODULE_ID_SME, VOS_TRACE_LEVEL_INFO, "%s Action frame:Ack not received. Retransmitting", __func__);
-
- if(NULL == pP2pContext->pNextActionFrm)
- {
- status = vos_timer_start(&pP2pContext->retryActionFrameTimer, ACTION_FRAME_RETRY_TIMEOUT);
- if (!VOS_IS_STATUS_SUCCESS(status))
- {
- smsLog(pMac, LOGE, " %s fail to start retryActionFrameTimerHandler",
- __func__, pP2pContext->NextActionFrameType);
- }
- return status;
- }
- //In case if there is new frame to send, finish the current frame
- else
- {
- smsLog(pMac, LOGE, " %s send next action frame type %d Last frame status (%d)",
- __func__, rspStatus);
- //Force it to be success
- rspStatus = eSIR_SME_SUCCESS;
- }
- }
-
- if (pP2pContext->actionFrameTimer)
- {
- vos_timer_stop(&pP2pContext->actionFrameTimer);
- status = eHAL_STATUS_SUCCESS;
- }
-
- if (pP2pContext->retryActionFrameTimer)
- {
- vos_timer_stop(&pP2pContext->retryActionFrameTimer);
- status = eHAL_STATUS_SUCCESS;
- }
-
- if(pP2pContext->pSentActionFrame)
- {
- csrRoamCallCallback((tpAniSirGlobal)pP2pContext->hHal,
- pP2pContext->SMEsessionId, &RoamInfo, 0,
- eCSR_ROAM_SEND_ACTION_CNF,
- ((rspStatus == eSIR_SME_SUCCESS) ?
- eCSR_ROAM_RESULT_NONE: eCSR_ROAM_RESULT_SEND_ACTION_FAIL));
- }
-
- if(VOS_IS_STATUS_SUCCESS(vos_spin_lock_acquire(&pP2pContext->lState)))
- {
- if(pP2pContext->pSentActionFrame)
- {
- pBuf = pP2pContext->pSentActionFrame;
- pP2pContext->pSentActionFrame = NULL;
- }
- vos_spin_lock_release(&pP2pContext->lState);
-
- if(NULL != pBuf)
- {
- vos_mem_free(pBuf);
- pBuf = NULL;
- }
- else
- {
- VOS_TRACE(VOS_MODULE_ID_SME, VOS_TRACE_LEVEL_WARN, "%s pSentActionFrame is null ", __func__);
- }
- if(pP2pContext->pNextActionFrm)
- {
- //need to send the next action frame
- pP2pContext->pSentActionFrame = pP2pContext->pNextActionFrm;
- pP2pContext->ActionFrameLen = pP2pContext->nNextFrmLen;
- pP2pContext->actionFrameType = pP2pContext->NextActionFrameType;
- pP2pContext->pNextActionFrm = NULL;
- pP2pContext->ActionFrameSendTimeout = pP2pContext->nNextFrameTimeOut;
- }
- }
- else
- {
- VOS_TRACE(VOS_MODULE_ID_SME, VOS_TRACE_LEVEL_ERROR, "%s cannot get lock1", __func__);
- }
-
- if(NULL != pP2pContext->pSentActionFrame)
- {
- VOS_TRACE(VOS_MODULE_ID_SME, VOS_TRACE_LEVEL_INFO, " sending next frame %d type",
- pP2pContext->NextActionFrameType);
- status = vos_timer_start(&pP2pContext->actionFrameTimer, pP2pContext->ActionFrameSendTimeout);
- if (!VOS_IS_STATUS_SUCCESS(status))
- {
- smsLog(pMac, LOGE, FL(" %s fail to start timer status %d"), __func__, status);
- //Without the timer we cannot continue
- csrRoamCallCallback((tpAniSirGlobal)pP2pContext->hHal,
- pP2pContext->SMEsessionId, &RoamInfo, 0,
- eCSR_ROAM_SEND_ACTION_CNF,
- eCSR_ROAM_RESULT_SEND_ACTION_FAIL);
- vos_spin_lock_acquire(&pP2pContext->lState);
- pBuf = pP2pContext->pSentActionFrame;
- pP2pContext->pSentActionFrame = NULL;
- vos_spin_lock_release(&pP2pContext->lState);
- vos_mem_free(pBuf);
- pBuf = NULL;
- p2pFsm(pP2pContext, eP2P_TRIGGER_DISCONNECTED);
- return status;
- }
- status = p2pSendActionFrame(pMac, pP2pContext->sessionId, pP2pContext->actionFrameType);
- if(!HAL_STATUS_SUCCESS(status))
- {
- VOS_TRACE(VOS_MODULE_ID_SME, VOS_TRACE_LEVEL_ERROR, " sending next frame %d type",
- pP2pContext->NextActionFrameType);
- status = vos_timer_start(&pP2pContext->retryActionFrameTimer, ACTION_FRAME_RETRY_TIMEOUT);
- if (!VOS_IS_STATUS_SUCCESS(status))
- {
- smsLog(pMac, LOGE, " %s fail to start retryActionFrameTimerHandler", __func__);
- }
- }
- }
- else
- {
- p2pFsm(pP2pContext, eP2P_TRIGGER_DISCONNECTED);
- }
-
-#else
/* forward the indication to HDD */
//RoamInfo can be passed as NULL....todo
csrRoamCallCallback(pMac, pSmeRsp->sessionId, &RoamInfo, 0,
eCSR_ROAM_SEND_ACTION_CNF,
(pSmeRsp->statusCode == eSIR_SME_SUCCESS) ? 0:
eCSR_ROAM_RESULT_SEND_ACTION_FAIL);
-#endif
return status;
}
-#ifdef WLAN_FEATURE_P2P_INTERNAL
-void p2pResetContext(tp2pContext *pP2pContext)
-{
- if(NULL != pP2pContext)
- {
- tpAniSirGlobal pMac = PMAC_STRUCT(pP2pContext->hHal);
- int i;
-
- //When it is resetting a GO or client session, we
- //need to reset the group capability back to the original one
- if( (OPERATION_MODE_P2P_GROUP_OWNER == pP2pContext->operatingmode) ||
- (OPERATION_MODE_P2P_CLIENT == pP2pContext->operatingmode) )
- {
- for( i = 0; i < MAX_NO_OF_P2P_SESSIONS; i++ )
- {
- if(OPERATION_MODE_P2P_DEVICE == pMac->p2pContext[i].operatingmode)
- {
- gP2PIe[i].p2pCapabilityAttrib.groupCapability = pMac->p2pContext[i].OriginalGroupCapability;
- }
- }
- }
-
- pP2pContext->state = eP2P_STATE_DISCONNECTED;
- pP2pContext->currentSearchIndex = 0;
- pP2pContext->listenIndex = 1;
-
- pP2pContext->actionFrameType = eP2P_INVALID_FRM;
-
- pP2pContext->dialogToken = 0;
- pP2pContext->PeerFound = FALSE;
- pP2pContext->GroupFormationPending = FALSE;
- pP2pContext->directedDiscovery = FALSE;
- pP2pContext->listenDiscoverableState = eStateDisabled;
-
-
- if(pP2pContext->pSentActionFrame)
- {
- vos_mem_free(pP2pContext->pSentActionFrame);
- pP2pContext->pSentActionFrame = NULL;
- }
- if(pP2pContext->pNextActionFrm)
- {
- vos_mem_free(pP2pContext->pSentActionFrame);
- pP2pContext->pSentActionFrame = NULL;
- }
- if( pP2pContext->probeRspIe )
- {
- vos_mem_free(pP2pContext->probeRspIe);
- pP2pContext->probeRspIe = NULL;
- pP2pContext->probeRspIeLength = 0;
- }
-
- if( pP2pContext->DiscoverReqIeField )
- {
- vos_mem_free(pP2pContext->DiscoverReqIeField);
- pP2pContext->DiscoverReqIeField = NULL;
- pP2pContext->DiscoverReqIeLength = 0;
- }
-
- if( pP2pContext->GoNegoCnfIeField )
- {
- vos_mem_free(pP2pContext->GoNegoCnfIeField);
- pP2pContext->GoNegoCnfIeField = NULL;
- pP2pContext->GoNegoCnfIeLength = 0;
- }
-
- if( pP2pContext->GoNegoReqIeField )
- {
- vos_mem_free(pP2pContext->GoNegoReqIeField);
- pP2pContext->GoNegoReqIeField = NULL;
- pP2pContext->GoNegoReqIeLength = 0;
- }
-
- if( pP2pContext->GoNegoResIeField )
- {
- vos_mem_free(pP2pContext->GoNegoResIeField);
- pP2pContext->GoNegoResIeField = NULL;
- pP2pContext->GoNegoResIeLength = 0;
- }
-
- if( pP2pContext->ProvDiscReqIeField )
- {
- vos_mem_free(pP2pContext->ProvDiscReqIeField);
- pP2pContext->ProvDiscReqIeField = NULL;
- pP2pContext->ProvDiscReqIeLength = 0;
- }
-
- if( pP2pContext->ProvDiscResIeField )
- {
- vos_mem_free(pP2pContext->ProvDiscResIeField);
- pP2pContext->ProvDiscResIeLength = 0;
- pP2pContext->ProvDiscResIeField = NULL;
- }
-
- if (pP2pContext->actionFrameTimer)
- {
- vos_timer_stop(&pP2pContext->actionFrameTimer);
- }
-
- if (pP2pContext->discoverTimer)
- {
- vos_timer_stop(&pP2pContext->discoverTimer);
- }
-
- if (pP2pContext->listenTimerHandler)
- {
- vos_timer_stop(&pP2pContext->listenTimerHandler);
- }
-
- if (pP2pContext->WPSRegistrarCheckTimerHandler)
- {
- vos_timer_stop(&pP2pContext->WPSRegistrarCheckTimerHandler);
- }
-
- if (pP2pContext->directedDiscoveryFilter)
- {
- pP2pContext->uNumDeviceFilterAllocated = 0;
- vos_mem_free(pP2pContext->directedDiscoveryFilter);
- pP2pContext->directedDiscoveryFilter = NULL;
- }
-
- vos_mem_zero(pP2pContext->peerMacAddress, P2P_MAC_ADDRESS_LEN);
- }
-}
-#endif
eHalStatus sme_p2pOpen( tHalHandle hHal )
@@ -597,57 +247,8 @@ eHalStatus sme_p2pOpen( tHalHandle hHal )
tpAniSirGlobal pMac = PMAC_STRUCT(hHal);
eHalStatus status = eHAL_STATUS_SUCCESS;
-#ifdef WLAN_FEATURE_P2P_INTERNAL
- int i;
- tp2pContext *pP2pContext;
-
- for ( i=0; i < MAX_NO_OF_P2P_SESSIONS; i++ )
- {
- pP2pContext = &pMac->p2pContext[i];
- pP2pContext->hHal = hHal;
-
- pP2pContext->socialChannel[0] = 1;
- pP2pContext->socialChannel[1] = 6;
- pP2pContext->socialChannel[2] = 11;
-
- vos_spin_lock_init(&pP2pContext->lState);
-
- p2pResetContext(pP2pContext);
-
- status = vos_timer_init(&pP2pContext->actionFrameTimer, VOS_TIMER_TYPE_SW, p2pActionFrameTimerHandler, pP2pContext);
- if (!VOS_IS_STATUS_SUCCESS(status))
- {
- smsLog(pMac, LOGE, " %s fail to alloc actionFrame timer for session %d", __func__, i);
- break;
- }
- status = vos_timer_init(&pP2pContext->listenTimerHandler, VOS_TIMER_TYPE_SW,
- p2pListenDiscoverTimerHandler, pP2pContext);
- if (!VOS_IS_STATUS_SUCCESS(status))
- {
- smsLog(pMac, LOGE, " %s fail to alloc listen timer for session %d", __func__, i);
- break;
- }
- status = vos_timer_init(&pP2pContext->discoverTimer, VOS_TIMER_TYPE_SW, p2pDiscoverTimerHandler, pP2pContext);
- if (!VOS_IS_STATUS_SUCCESS(status))
- {
- smsLog(pMac, LOGE, " %s fail to alloc discover timer for session %d", __func__, i);
- break;
- }
-
- status = vos_timer_init(&pP2pContext->retryActionFrameTimer, VOS_TIMER_TYPE_SW,
- p2pRetryActionFrameTimerHandler, pP2pContext);
- if (!VOS_IS_STATUS_SUCCESS(status))
- {
- smsLog(pMac, LOGE, " %s fail to alloc retryActionFrameTimerHandler timer for session %d", __func__, i);
- break;
- }
-
- p2pCreateDefaultIEs(hHal, i);
- }
-#else
//If static structure is too big, Need to change this function to allocate memory dynamically
vos_mem_zero(&pMac->p2pContext, sizeof( tp2pContext ));
-#endif
if(!HAL_STATUS_SUCCESS(status))
{
@@ -662,14 +263,6 @@ eHalStatus p2pStop( tHalHandle hHal )
{
tpAniSirGlobal pMac = PMAC_STRUCT(hHal);
-#ifdef WLAN_FEATURE_P2P_INTERNAL
- int i;
-
- for ( i = 0; i < MAX_NO_OF_P2P_SESSIONS; i++ )
- {
- p2pCloseSession(pMac, i);
- }
-#else
if( pMac->p2pContext.probeRspIe )
{
vos_mem_free(pMac->p2pContext.probeRspIe);
@@ -677,7 +270,6 @@ eHalStatus p2pStop( tHalHandle hHal )
}
pMac->p2pContext.probeRspIeLength = 0;
-#endif
return eHAL_STATUS_SUCCESS;
}
@@ -687,43 +279,6 @@ eHalStatus sme_p2pClose( tHalHandle hHal )
{
tpAniSirGlobal pMac = PMAC_STRUCT(hHal);
-#ifdef WLAN_FEATURE_P2P_INTERNAL
- tp2pContext *pContext;
- int i;
-
- p2pStop(hHal);
-
- for ( i = 0; i < MAX_NO_OF_P2P_SESSIONS; i++ )
- {
- p2pCloseSession(pMac, i);
- pContext = &pMac->p2pContext[i];
- if (pContext->actionFrameTimer)
- {
- vos_timer_destroy(&pContext->actionFrameTimer);
- pContext->actionFrameTimer = NULL;
- }
-
- if (pContext->discoverTimer)
- {
- vos_timer_destroy(&pContext->discoverTimer);
- pContext->discoverTimer = NULL;
- }
-
- if (pContext->listenTimerHandler)
- {
- vos_timer_destroy(&pContext->listenTimerHandler);
- pContext->listenTimerHandler = NULL;
- }
-
- if (pContext->WPSRegistrarCheckTimerHandler)
- {
- vos_timer_destroy(&pContext->WPSRegistrarCheckTimerHandler);
- pContext->WPSRegistrarCheckTimerHandler = NULL;
- }
-
- vos_spin_lock_destroy(&pContext->lState);
- }
-#else
if( pMac->p2pContext.probeRspIe )
{
vos_mem_free(pMac->p2pContext.probeRspIe);
@@ -731,7 +286,6 @@ eHalStatus sme_p2pClose( tHalHandle hHal )
}
pMac->p2pContext.probeRspIeLength = 0;
-#endif
return eHAL_STATUS_SUCCESS;
}
@@ -767,9 +321,6 @@ eHalStatus p2pRemainOnChannel(tHalHandle hHal, tANI_U8 sessionId,
tANI_U8 channel, tANI_U32 duration,
remainOnChanCallback callback,
void *pContext, tANI_U8 isP2PProbeReqAllowed
-#ifdef WLAN_FEATURE_P2P_INTERNAL
- , eP2PRemainOnChnReason reason
-#endif
)
{
eHalStatus status = eHAL_STATUS_SUCCESS;
@@ -804,11 +355,7 @@ eHalStatus p2pRemainOnChannel(tHalHandle hHal, tANI_U8 sessionId,
pRemainChlCmd->u.remainChlCmd.callbackCtx = pContext;
//Put it at the head of the Q if we just finish finding the peer and ready to send a frame
-#ifdef WLAN_FEATURE_P2P_INTERNAL
- smePushCommand(pMac, pRemainChlCmd, (eP2PRemainOnChnReasonSendFrame == reason));
-#else
csrQueueSmeCommand(pMac, pRemainChlCmd, eANI_BOOLEAN_FALSE);
-#endif
} while(0);
smsLog(pMac, LOGW, "exiting function %s", __func__);
@@ -892,1400 +439,6 @@ eHalStatus p2pSetPs(tHalHandle hHal, tP2pPsConfig *pNoA)
return status;
}
-#ifdef WLAN_FEATURE_P2P_INTERNAL
-eHalStatus p2pGetConfigParam(tHalHandle hHal, tP2PConfigParam *pParam)
-{
- eHalStatus status = eHAL_STATUS_INVALID_PARAMETER;
- tpAniSirGlobal pMac = PMAC_STRUCT(hHal);
-
- if(pParam)
- {
- pParam->P2PListenChannel = pMac->p2pContext[0].P2PListenChannel;
- pParam->P2POperatingChannel = pMac->p2pContext[0].P2POperatingChannel;
- pParam->P2POpPSCTWindow = pMac->p2pContext[0].pNoA.ctWindow;
- pParam->P2PPSSelection = pMac->p2pContext[0].pNoA.psSelection;
- pParam->P2POpPSCTWindow = pMac->p2pContext[0].pNoA.ctWindow;
- pParam->P2PNoADuration = pMac->p2pContext[0].pNoA.duration;
- pParam->P2PNoACount = pMac->p2pContext[0].pNoA.count;
- pParam->P2PNoAInterval = pMac->p2pContext[0].pNoA.interval;
-
- status = eHAL_STATUS_SUCCESS;
- }
-
- return (status);
-}
-
-eHalStatus p2pChangeDefaultConfigParam(tHalHandle hHal, tP2PConfigParam *pParam)
-{
- eHalStatus status = eHAL_STATUS_SUCCESS;
- tpAniSirGlobal pMac = PMAC_STRUCT(hHal);
-
- int i;
- tANI_U8 pBuf[P2P_COUNTRY_CODE_LEN];
- tANI_U8 uBufLen = P2P_COUNTRY_CODE_LEN;
- tP2P_OperatingChannel p2pChannel;
-
- status = sme_GetCountryCode( pMac, pBuf, &uBufLen );
- if ( !HAL_STATUS_SUCCESS( status ) )
- {
- status = eHAL_STATUS_FAILURE;
- VOS_TRACE(VOS_MODULE_ID_SME, VOS_TRACE_LEVEL_ERROR, "%s Cannot get the country code", __func__);
- }
-
- vos_mem_copy(p2pChannel.countryString, pBuf, sizeof(pBuf));
- p2pChannel.regulatoryClass = 0x51;
-
- if(pParam)
- {
- for ( i=0; i < MAX_NO_OF_P2P_SESSIONS; i++ )
- {
- if (pParam->P2PListenChannel == 1 || pParam->P2PListenChannel == 6
- || pParam->P2PListenChannel == 11)
- {
- pMac->p2pContext[i].P2PListenChannel = pParam->P2PListenChannel;
- }
- else
- {
- pMac->p2pContext[i].P2PListenChannel = P2P_OPERATING_CHANNEL;
- VOS_TRACE(VOS_MODULE_ID_SME, VOS_TRACE_LEVEL_INFO_HIGH,
- "Invalid P2P Listen Channel in config. Switch to default Listen Channel %d",
- __func__, P2P_OPERATING_CHANNEL);
- }
-
- if(csrRoamIsChannelValid(pMac, pParam->P2POperatingChannel))
- {
- pMac->p2pContext[i].P2POperatingChannel = pParam->P2POperatingChannel;
- }
- else
- {
- pMac->p2pContext[i].P2POperatingChannel = P2P_OPERATING_CHANNEL;
- VOS_TRACE(VOS_MODULE_ID_SME, VOS_TRACE_LEVEL_INFO_HIGH,
- "Invalid P2P Operating Channel in config. Switch to default Channel %d",
- __func__, P2P_OPERATING_CHANNEL);
- }
- pMac->p2pContext[i].pNoA.ctWindow = pParam->P2POpPSCTWindow;
- pMac->p2pContext[i].pNoA.psSelection = pParam->P2PPSSelection;
- pMac->p2pContext[i].pNoA.ctWindow = pParam->P2POpPSCTWindow;
- pMac->p2pContext[i].pNoA.duration = pParam->P2PNoADuration;
- pMac->p2pContext[i].pNoA.count = pParam->P2PNoACount;
- pMac->p2pContext[i].pNoA.interval = pParam->P2PNoAInterval;
-
- p2pChannel.channel = pMac->p2pContext[i].P2POperatingChannel;
- P2P_UpdateIE(pMac, i, eWFD_OPERATING_CHANNEL, &p2pChannel, 1);
- p2pChannel.channel = pMac->p2pContext[i].P2PListenChannel;
- P2P_UpdateIE(pMac, i, eWFD_LISTEN_CHANNEL, &p2pChannel, 1);
- }
- }
-
- return status;
-}
-
-eHalStatus p2pPS(tHalHandle hHal, tANI_U8 sessionId)
-{
- eHalStatus status = eHAL_STATUS_SUCCESS;
- tpAniSirGlobal pMac = PMAC_STRUCT(hHal);
- tP2pPsConfig pNoA;
-
- /* call set in context */
- pNoA.psSelection = pMac->p2pContext[sessionId].pNoA.psSelection;
- pNoA.sessionid = sessionId;
-
- if (pMac->p2pContext[sessionId].pNoA.psSelection == P2P_CLEAR_POWERSAVE)
- {
- return status;
- }
-
- if (pMac->p2pContext[sessionId].pNoA.psSelection == P2P_OPPORTUNISTIC_PS)
- {
- pNoA.opp_ps = TRUE;
- pNoA.ctWindow = pMac->p2pContext[sessionId].pNoA.ctWindow;
- pNoA.count = 0;
- pNoA.duration = 0;
- pNoA.interval = 0;
- pNoA.single_noa_duration = 0;
- }
- else if (pMac->p2pContext[sessionId].pNoA.psSelection == P2P_PERIODIC_NOA)
- {
- pNoA.opp_ps = 0;
- pNoA.ctWindow = 0;
- pNoA.count = pMac->p2pContext[sessionId].pNoA.count;
- pNoA.duration = pMac->p2pContext[sessionId].pNoA.duration;
- pNoA.interval = pMac->p2pContext[sessionId].pNoA.interval;
- pNoA.single_noa_duration = 0;
- }
- else if(pMac->p2pContext[sessionId].pNoA.psSelection == P2P_SINGLE_NOA)
- {
- pNoA.opp_ps = 0;
- pNoA.ctWindow = 0;
- pNoA.count = 0;
- pNoA.duration = 0;
- pNoA.interval = 0;
- pNoA.single_noa_duration = pMac->p2pContext[sessionId].pNoA.duration;
- }
-
- VOS_TRACE(VOS_MODULE_ID_SME, VOS_TRACE_LEVEL_INFO_MED,
- " %s HDDSession %d set NoA parameters. Selection %d, opp_ps %d, ctWindow %d, count %d, "
- "duration %d, interval %d single NoA duration %d",
- __func__, sessionId, pMac->p2pContext[sessionId].pNoA.psSelection,
- pNoA.opp_ps, pNoA.ctWindow, pNoA.count, pNoA.duration,
- pNoA.interval, pNoA.single_noa_duration );
-
- status = sme_p2pSetPs(pMac, &pNoA);
- if(!HAL_STATUS_SUCCESS(status))
- {
- smsLog(pMac, LOGE, FL(" sme_p2pSetPs fail with status %d"), status);
- return status;
- }
-
- return status;
-}
-
-void P2P_UpdateMacHdr(tHalHandle hHal, tANI_U8 SessionID, tANI_U8 *pBuf)
-{
- tpAniSirGlobal pMac = PMAC_STRUCT(hHal);
- tSirMacMgmtHdr *macHdr = (tSirMacMgmtHdr *)pBuf;
-
- macHdr->fc.protVer = 0;
- macHdr->fc.type = 0;
- macHdr->fc.subType = 13;
- macHdr->durationLo = 0;
- macHdr->durationHi = 0;
- vos_mem_copy(macHdr->da, pMac->p2pContext[SessionID].peerMacAddress,
- P2P_MAC_ADDRESS_LEN);
- vos_mem_copy(macHdr->sa, pMac->p2pContext[SessionID].selfMacAddress,
- P2P_MAC_ADDRESS_LEN);
- vos_mem_copy(macHdr->bssId, pMac->p2pContext[SessionID].peerMacAddress,
- P2P_MAC_ADDRESS_LEN);
-
- return;
-}
-
-static eHalStatus p2pRemainOnChannelReadyCallback(tHalHandle halHandle,
- void *pContext,
- eHalStatus scan_status)
-{
- eHalStatus status = eHAL_STATUS_SUCCESS;
- tp2pContext *p2pContext = (tp2pContext*) pContext;
-
- VOS_TRACE(VOS_MODULE_ID_SME, VOS_TRACE_LEVEL_INFO, "%s GroupFormationPending %d PeerFound %d",
- __func__, p2pContext->GroupFormationPending, p2pContext->PeerFound);
-
- if (p2pContext->PeerFound)
- {
- p2pContext->PeerFound = FALSE;
-
- VOS_TRACE(VOS_MODULE_ID_SME, VOS_TRACE_LEVEL_INFO, "%s Sending actionframe", __func__);
- if (p2pContext->pSentActionFrame)
- {
- VOS_TRACE(VOS_MODULE_ID_SME, VOS_TRACE_LEVEL_ERROR, "%s calling p2pSendAction", __func__);
- p2pSendAction(halHandle, p2pContext->SMEsessionId, (tANI_U8 *)p2pContext->pSentActionFrame, p2pContext->ActionFrameLen);
- }
- }
-
- return status;
-}
-
-eHalStatus p2pGrpFormationRemainOnChanRspCallback(tHalHandle halHandle, void *pContext, tANI_U32 scanId, eCsrScanStatus scan_status)
-{
- return eHAL_STATUS_SUCCESS;
-}
-
-tANI_U8 p2pGetDialogToken(tHalHandle hHal, tANI_U8 SessionID, eP2PFrameType actionFrameType)
-{
- tANI_U8 dialogToken = 0;
-
- dialogToken = (tANI_U8) vos_timer_get_system_ticks();
-
- return(dialogToken);
-}
-
-void p2pRetryActionFrameTimerHandler(void *pContext)
-{
- tp2pContext *p2pContext = (tp2pContext*) pContext;
- eHalStatus status = eHAL_STATUS_SUCCESS;
- tpAniSirGlobal pMac = PMAC_STRUCT( p2pContext->hHal );
-
- p2pContext->PeerFound = TRUE;
- smsLog( pMac, LOGE, "%s Calling remain on channel ", __func__);
- status = p2pRemainOnChannel( pMac, p2pContext->SMEsessionId, p2pContext->P2PListenChannel/*pScanResult->BssDescriptor.channelId*/, P2P_REMAIN_ON_CHAN_TIMEOUT_LOW,
- NULL, NULL, TRUE, eP2PRemainOnChnReasonSendFrame);
- if(status != eHAL_STATUS_SUCCESS)
- {
- smsLog( pMac, LOGE, "%s remain on channel failed", __func__);
- }
-
- return;
-}
-
-void p2pActionFrameTimerHandler(void *pContext)
-{
- tp2pContext *p2pContext = (tp2pContext*) pContext;
- eHalStatus status = eHAL_STATUS_SUCCESS;
- tANI_U8 *pBuf = NULL, *pNextBuf = NULL;
- tCsrRoamInfo roamInfo;
-
-
- if(p2pContext->pSentActionFrame)
- {
- vos_mem_zero(&roamInfo, sizeof(tCsrRoamInfo));
- csrRoamCallCallback((tpAniSirGlobal)p2pContext->hHal, p2pContext->SMEsessionId, &roamInfo, 0,
- eCSR_ROAM_SEND_ACTION_CNF,
- eCSR_ROAM_RESULT_SEND_ACTION_FAIL);
- }
-
- if(VOS_IS_STATUS_SUCCESS(vos_spin_lock_acquire(&p2pContext->lState)))
- {
- if(p2pContext->pSentActionFrame)
- {
- VOS_TRACE(VOS_MODULE_ID_SME, VOS_TRACE_LEVEL_WARN,
- " %s actionframe timeout type %d", __func__, p2pContext->actionFrameType);
- pBuf = p2pContext->pSentActionFrame;
- p2pContext->pSentActionFrame = NULL;
- }
- if(p2pContext->pNextActionFrm)
- {
- VOS_TRACE(VOS_MODULE_ID_SME, VOS_TRACE_LEVEL_WARN,
- " %s next actionframe timeout type %d", __func__, p2pContext->NextActionFrameType);
- pNextBuf = p2pContext->pNextActionFrm;
- p2pContext->pNextActionFrm = NULL;
- }
- vos_spin_lock_release(&p2pContext->lState);
-
- if(pBuf)
- {
- vos_mem_free(pBuf);
- }
- if(pNextBuf)
- {
- //Inform the failure of the next frame.
- p2pContext->pSentActionFrame = pNextBuf;
- p2pContext->ActionFrameLen = p2pContext->nNextFrmLen;
- p2pContext->actionFrameType = p2pContext->NextActionFrameType;
- vos_mem_zero(&roamInfo, sizeof(tCsrRoamInfo));
- csrRoamCallCallback((tpAniSirGlobal)p2pContext->hHal, p2pContext->SMEsessionId, &roamInfo, 0,
- eCSR_ROAM_SEND_ACTION_CNF,
- eCSR_ROAM_RESULT_SEND_ACTION_FAIL);
- p2pContext->pSentActionFrame = NULL;
- vos_mem_free(pNextBuf);
- }
- }
- status = p2pFsm(p2pContext, eP2P_TRIGGER_DISCONNECTED);
- p2pContext->actionFrameTimeout = TRUE;
- VOS_TRACE(VOS_MODULE_ID_SME, VOS_TRACE_LEVEL_INFO, "%s timedout", __func__);
-
- return;
-}
-
-
-eHalStatus p2pCreateActionFrame(tpAniSirGlobal pMac, tANI_U8 SessionID, void *p2pactionframe,
- eP2PFrameType actionFrameType, tANI_U8 **ppFrm)
-{
- eHalStatus status = eHAL_STATUS_SUCCESS;
- tANI_U32 len = 0;
- tANI_U32 nActionFrmlen = 0, pendingFrameLen;
- tANI_U8 *pActionFrm = NULL;
- tANI_U8 *pBuf = NULL, *pLocal = NULL;
- eP2PFrameType pendingActionFrameType;
- tp2pContext *pP2pContext = &pMac->p2pContext[SessionID];
-
- if(NULL == ppFrm)
- {
- smsLog(pMac, LOGE, FL(" invalid parameters"));
- return eHAL_STATUS_FAILURE;
- }
-
- csrScanAbortMacScan(pMac, SessionID, eCSR_SCAN_ABORT_DEFAULT);
-
- switch (actionFrameType)
- {
- case eP2P_GONEGO_REQ:
- status = P2P_UpdateIE(pMac, SessionID, eWFD_SEND_GO_NEGOTIATION_REQUEST, p2pactionframe, len);
- break;
-
- case eP2P_GONEGO_RES:
- status = P2P_UpdateIE(pMac, SessionID, eWFD_SEND_GO_NEGOTIATION_RESPONSE, p2pactionframe, len);
- break;
-
- case eP2P_GONEGO_CNF:
- status = P2P_UpdateIE(pMac, SessionID, eWFD_SEND_GO_NEGOTIATION_CONFIRMATION, p2pactionframe, len);
- break;
-
- case eP2P_PROVISION_DISCOVERY_REQUEST:
- status = P2P_UpdateIE(pMac, SessionID, eWFD_SEND_PROVISION_DISCOVERY_REQUEST, p2pactionframe, len);
- break;
-
- case eP2P_PROVISION_DISCOVERY_RESPONSE:
- status = P2P_UpdateIE(pMac, SessionID, eWFD_SEND_PROVISION_DISCOVERY_RESPONSE, p2pactionframe, len);
- break;
-
- case eP2P_INVITATION_REQ:
- status = P2P_UpdateIE(pMac, SessionID, eWFD_SEND_INVITATION_REQUEST, p2pactionframe, len);
- break;
-
- case eP2P_INVITATION_RSP:
- status = P2P_UpdateIE(pMac, SessionID, eWFD_SEND_INVITATION_RESPONSE, p2pactionframe, len);
- break;
- default:
- return status;
- }
-
- status = P2P_GetActionFrame(pMac, SessionID, actionFrameType, &pActionFrm, &nActionFrmlen);
- if(!HAL_STATUS_SUCCESS(status))
- {
- smsLog(pMac, LOGE, FL(" P2P_GetActionFrame fail with status %d"), status);
- return status;
- }
-
- P2P_UpdateMacHdr(pMac, SessionID, pActionFrm);
-
- pBuf = (tANI_U8 *)vos_mem_malloc( nActionFrmlen);
- if (NULL == pBuf)
- {
- smsLog(pMac, LOGE, FL(" fail to allocate memory"));
- if (pActionFrm)
- vos_mem_free(pActionFrm);
- return eHAL_STATUS_FAILURE;
- }
-
- vos_mem_copy(pBuf, pActionFrm, nActionFrmlen);
- vos_mem_free(pActionFrm);
-
- if( !VOS_IS_STATUS_SUCCESS(vos_spin_lock_acquire(&pP2pContext->lState)))
- {
- smsLog(pMac, LOGE, FL(" fail to acquire spinlock"));
- vos_mem_free(pBuf);
- return eHAL_STATUS_FAILURE;
- }
-
- if(NULL != pP2pContext->pSentActionFrame)
- {
- //If there is one pending frame already. Drop that one and save the new one
- pLocal = pP2pContext->pNextActionFrm;
- pendingActionFrameType = pP2pContext->NextActionFrameType;
- pendingFrameLen = pP2pContext->nNextFrmLen;
- pP2pContext->pNextActionFrm = pBuf;
- pP2pContext->nNextFrmLen = nActionFrmlen;
- pP2pContext->NextActionFrameType = actionFrameType;
- *ppFrm = NULL;
- }
- else
- {
- pP2pContext->pSentActionFrame = pBuf;
- pP2pContext->ActionFrameLen = nActionFrmlen;
- pP2pContext->actionFrameType = actionFrameType;
- *ppFrm = pBuf;
- }
- vos_spin_lock_release(&pP2pContext->lState);
-
- if(NULL != pLocal)
- {
- smsLog(pMac, LOGE, FL(" Drop a waiting action frame 0x%x, type %d lenth %d"),
- pLocal, pendingActionFrameType, pendingFrameLen);
- vos_mem_free(pLocal);
- }
-
- return status;
-}
-
-
-extern eHalStatus p2pGetSSID(tANI_U8 *ssId, tANI_U32 *ssIdLen, tANI_U8 SessionID);
-
-static eHalStatus p2pSendActionFrame(tpAniSirGlobal pMac, tANI_U8 HDDSessionID, eP2PFrameType actionFrameType)
-{
- tCsrScanResultFilter filter;
- eHalStatus status = eHAL_STATUS_SUCCESS;
- tScanResultHandle hScanResult = NULL;
- tCsrScanResultInfo *pScanResult = NULL;
- tANI_U8 ssId[SIR_MAC_MAX_SSID_LENGTH];
- tANI_U32 ssIdLen = 0;
- tp2pContext *pP2pContext = &pMac->p2pContext[HDDSessionID];
-
- pP2pContext->GroupFormationPending = TRUE;
- if (actionFrameType == eP2P_GONEGO_REQ || actionFrameType == eP2P_PROVISION_DISCOVERY_REQUEST
- || actionFrameType == eP2P_INVITATION_REQ)
- {
- vos_mem_zero(&filter, sizeof(filter));
- filter.BSSIDs.numOfBSSIDs = 1;
- filter.BSSIDs.bssid = &pP2pContext->peerMacAddress;
- filter.bWPSAssociation = TRUE;
- filter.BSSType = eCSR_BSS_TYPE_ANY;
-
- status = csrScanGetResult(pMac, &filter, &hScanResult);
-
- if (hScanResult)
- {
- pScanResult = csrScanResultGetFirst(pMac, hScanResult );
- if(pScanResult)
- {
-
- VOS_TRACE(VOS_MODULE_ID_SME, VOS_TRACE_LEVEL_INFO_MED, "%s found match on channel %d",
- __func__, pScanResult->BssDescriptor.channelId);
- pP2pContext->formationReq.targetListenChannel = pScanResult->BssDescriptor.channelId;
- if(pP2pContext->P2PListenChannel != pScanResult->BssDescriptor.channelId)
- {
- VOS_TRACE(VOS_MODULE_ID_SME, VOS_TRACE_LEVEL_INFO_MED,
- "%s adapt listen channel to %d",
- __func__, pScanResult->BssDescriptor.channelId);
- p2pSetListenChannel(pMac, pP2pContext->sessionId, pScanResult->BssDescriptor.channelId);
- }
- vos_mem_copy(pP2pContext->formationReq.deviceAddress,
- pScanResult->BssDescriptor.bssId,
- P2P_MAC_ADDRESS_LEN);
- }
- csrScanResultPurge(pMac, hScanResult);
- }
- else
- {
- vos_mem_zero(&filter, sizeof(filter));
- filter.bWPSAssociation = TRUE;
- filter.BSSType = eCSR_BSS_TYPE_ANY;
- filter.SSIDs.SSIDList =( tCsrSSIDInfo *)vos_mem_malloc(sizeof(tCsrSSIDInfo));
- if ( NULL == filter.SSIDs.SSIDList )
- {
- smsLog( pMac, LOGP, FL("memory allocation failed for SSIDList") );
- pP2pContext->GroupFormationPending = FALSE;
- return eHAL_STATUS_FAILURE;
- }
- vos_mem_zero( filter.SSIDs.SSIDList, sizeof(tCsrSSIDInfo) );
- p2pGetSSID(ssId, &ssIdLen, HDDSessionID);
-
- if (ssIdLen)
- {
- filter.SSIDs.SSIDList->SSID.length = ssIdLen;
- vos_mem_copy(&filter.SSIDs.SSIDList[0].SSID.ssId, &ssId, ssIdLen);
- filter.SSIDs.numOfSSIDs = 1;
- status = csrScanGetResult(pMac, &filter, &hScanResult);
- if (hScanResult)
- {
- pScanResult = csrScanResultGetFirst(pMac, hScanResult );
- pP2pContext->formationReq.targetListenChannel = pScanResult->BssDescriptor.channelId;
- vos_mem_copy(pP2pContext->formationReq.deviceAddress,
- pScanResult->BssDescriptor.bssId,
- P2P_MAC_ADDRESS_LEN);
- csrScanResultPurge(pMac, hScanResult);
- }
- else
- {
- VOS_TRACE(VOS_MODULE_ID_SME, VOS_TRACE_LEVEL_INFO, "%s not found match", __func__);
- pP2pContext->formationReq.targetListenChannel = 0;
- vos_mem_copy(pP2pContext->formationReq.deviceAddress, pP2pContext->peerMacAddress,
- P2P_MAC_ADDRESS_LEN);
- status = eHAL_STATUS_SUCCESS;
- }
- vos_mem_free(filter.SSIDs.SSIDList);
- }
- else
- {
- VOS_TRACE(VOS_MODULE_ID_SME, VOS_TRACE_LEVEL_INFO, "%s not found match", __func__);
- pP2pContext->formationReq.targetListenChannel = 0;
- vos_mem_copy(pP2pContext->formationReq.deviceAddress,
- pP2pContext->peerMacAddress, P2P_MAC_ADDRESS_LEN);
- status = eHAL_STATUS_SUCCESS;
- }
- }
- sme_CancelRemainOnChannel(pMac, pP2pContext->SMEsessionId );
- p2pFsm(pP2pContext, eP2P_TRIGGER_GROUP_FORMATION);
- VOS_TRACE(VOS_MODULE_ID_SME, VOS_TRACE_LEVEL_INFO, " %s send action frame %d timeout %d",
- __func__, actionFrameType, pP2pContext->ActionFrameSendTimeout);
- }
- else
- {
- pP2pContext->PeerFound = TRUE;
-
- status = p2pSendAction(pMac, pP2pContext->SMEsessionId, (tANI_U8 *)pP2pContext->pSentActionFrame,
- pP2pContext->ActionFrameLen);
- if(status != eHAL_STATUS_SUCCESS)
- {
- VOS_TRACE(VOS_MODULE_ID_SME, VOS_TRACE_LEVEL_ERROR,
- "%s p2pSendAction failed to send frame type %d", __func__, actionFrameType);
- pP2pContext->GroupFormationPending = FALSE;
- return status;
- }
-
- if ( actionFrameType == eP2P_GONEGO_RES )
- {
- VOS_TRACE(VOS_MODULE_ID_SME, VOS_TRACE_LEVEL_INFO, "%s Calling p2pRemainOnChannel with duration"
- "%d on channel %d", __func__, P2P_REMAIN_ON_CHAN_TIMEOUT, pP2pContext->P2PListenChannel);
-
- if(p2pRemainOnChannel( pMac, pP2pContext->SMEsessionId,
- pP2pContext->P2PListenChannel, P2P_REMAIN_ON_CHAN_TIMEOUT_LOW,
- NULL, NULL, TRUE, eP2PRemainOnChnReasonSendFrame))
- {
- VOS_TRACE(VOS_MODULE_ID_SME, VOS_TRACE_LEVEL_ERROR, "%s remain on channel failed", __func__);
- }
- }
- }
-
- return(status);
-}
-
-
-#define WLAN_P2P_DEF_ACTION_FRM_TIMEOUT_VALUE 1000 //1s
-
-eHalStatus p2pCreateSendActionFrame(tHalHandle hHal, tANI_U8 HDDSessionID,
- void *p2pactionframe, eP2PFrameType actionFrameType, tANI_U32 timeout)
-{
- eHalStatus status = eHAL_STATUS_SUCCESS;
- tpAniSirGlobal pMac = PMAC_STRUCT(hHal);
- tANI_U8 *pBuf = NULL;
- tp2pContext *pP2pContext = &pMac->p2pContext[HDDSessionID];
-
- status = p2pCreateActionFrame(pMac, HDDSessionID, p2pactionframe, actionFrameType, &pBuf);
- if(!HAL_STATUS_SUCCESS(status))
- {
- smsLog(pMac, LOGE, FL(" fail to create action frame"));
- return status;
- }
-
- VOS_TRACE(VOS_MODULE_ID_SME, VOS_TRACE_LEVEL_INFO, " %s send action frame %d timeout %d",
- __func__, actionFrameType, timeout);
-
- if(NULL != pBuf)
- {
- if (timeout)
- {
- pP2pContext->ActionFrameSendTimeout = timeout;
- }
- else
- {
- pP2pContext->ActionFrameSendTimeout = WLAN_P2P_DEF_ACTION_FRM_TIMEOUT_VALUE;
- }
-
- status = vos_timer_start(&pP2pContext->actionFrameTimer,
- pP2pContext->ActionFrameSendTimeout);
- if (!VOS_IS_STATUS_SUCCESS(status))
- {
- tCsrRoamInfo RoamInfo;
-
- vos_mem_zero(&RoamInfo, sizeof(tCsrRoamInfo));
- smsLog(pMac, LOGE, FL(" %s fail to start timer status %d"), __func__, status);
- //Without the timer we cannot continue
- csrRoamCallCallback((tpAniSirGlobal)pP2pContext->hHal,
- pP2pContext->SMEsessionId, &RoamInfo, 0,
- eCSR_ROAM_SEND_ACTION_CNF,
- eCSR_ROAM_RESULT_SEND_ACTION_FAIL);
- vos_spin_lock_acquire(&pP2pContext->lState);
- pBuf = pP2pContext->pSentActionFrame;
- pP2pContext->pSentActionFrame = NULL;
- vos_spin_lock_release(&pP2pContext->lState);
- vos_mem_free(pBuf);
- pBuf = NULL;
- p2pFsm(pP2pContext, eP2P_TRIGGER_DISCONNECTED);
- return status;
- }
- //We can send this frame now
- status = p2pSendActionFrame(pMac, HDDSessionID, actionFrameType);
- if(!HAL_STATUS_SUCCESS(status))
- {
- smsLog(pMac, LOGE, FL(" fail to send action frame status %d"), status);
- }
- //Let them retry
- pP2pContext->actionFrameTimeout = FALSE;
- }
- else
- {
- //An action frame is pedning at lower layer
- smsLog(pMac, LOGW, FL(" An action frame is pending while trying to send frametype %d"), actionFrameType);
- if (timeout)
- {
- pP2pContext->nNextFrameTimeOut = timeout;
- }
- else
- {
- pP2pContext->nNextFrameTimeOut = WLAN_P2P_DEF_ACTION_FRM_TIMEOUT_VALUE;
- }
- }
-
- return status;
-}
-
-
-void p2pListenDiscoverTimerHandlerCB(void *pContext)
-{
-}
-
-void p2pListenDiscoverTimerHandler(void *pContext)
-{
- tp2pContext *p2pContext = (tp2pContext*) pContext;
- eHalStatus status = eHAL_STATUS_SUCCESS;
-
- if( (eP2P_STATE_DISCONNECTED == p2pContext->state) &&
- (eStateDisabled != p2pContext->listenDiscoverableState) )
- {
- VOS_TRACE(VOS_MODULE_ID_SME, VOS_TRACE_LEVEL_INFO, "%s Calling RemainOnChannel with duration %d on channel %d",
- __func__, p2pContext->listenDuration, p2pContext->P2PListenChannel);
- status = p2pRemainOnChannel( p2pContext->hHal, p2pContext->SMEsessionId, p2pContext->P2PListenChannel, p2pContext->listenDuration,
- p2pListenStateDiscoverableCallback, p2pContext, TRUE, eP2PRemainOnChnReasonListen);
- }
- else
- {
- smsLog(((tpAniSirGlobal)p2pContext->hHal), LOGW, FL(" cannot call p2pRemainOnChannel state %d"), p2pContext->state);
- }
-
- return;
-}
-
-
-static eHalStatus p2pListenStateDiscoverableCallback(tHalHandle halHandle, void *pContext, eHalStatus retStatus)
-{
- eHalStatus status = eHAL_STATUS_SUCCESS;
- tpAniSirGlobal pMac = PMAC_STRUCT(halHandle);
- tp2pContext *p2pContext = (tp2pContext*) pContext;
-
- if( (eP2P_STATE_DISCONNECTED == p2pContext->state) &&
- (eStateDisabled != p2pContext->listenDiscoverableState) &&
- (NULL == p2pContext->p2pDiscoverCBFunc) )
- {
- VOS_TRACE(VOS_MODULE_ID_SME, VOS_TRACE_LEVEL_INFO, "%s restart listen timer expire time %d",
- __func__, p2pContext->expire_time);
- //We can restart the listening
- status = vos_timer_start(&p2pContext->listenTimerHandler, (p2pContext->expire_time)/PAL_TIMER_TO_MS_UNIT);
- if (!VOS_IS_STATUS_SUCCESS(status))
- {
- VOS_ASSERT(status);
- return status;
- }
- }
- else
- {
- VOS_TRACE(VOS_MODULE_ID_SME, VOS_TRACE_LEVEL_INFO, "%s not restart listen timer state (%d)",
- __func__, p2pContext->state);
- }
-
- return status;
-}
-
-
-eHalStatus P2P_ListenStateDiscoverable(tHalHandle hHal, tANI_U8 sessionId,
- ep2pListenStateDiscoverability listenState)
-{
- eHalStatus status = eHAL_STATUS_SUCCESS;
- tpAniSirGlobal pMac = PMAC_STRUCT(hHal);
-
- switch (listenState)
- {
- case P2P_DEVICE_NOT_DISCOVERABLE:
- VOS_TRACE(VOS_MODULE_ID_SME, VOS_TRACE_LEVEL_INFO, "%s P2P_NOT_DISCOVERABLE", __func__);
- pMac->p2pContext[sessionId].listenDiscoverableState = eStateDisabled;
- pMac->p2pContext[sessionId].DiscoverableCfg = listenState;
- if (pMac->p2pContext[sessionId].state == eP2P_STATE_DISCONNECTED)
- {
- sme_CancelRemainOnChannel(hHal, sessionId );
-
- if (pMac->p2pContext[sessionId].listenTimerHandler)
- {
- vos_timer_stop(&pMac->p2pContext[sessionId].listenTimerHandler);
- status = eHAL_STATUS_SUCCESS;
- VOS_TRACE(VOS_MODULE_ID_SME, VOS_TRACE_LEVEL_INFO, "%s Timer Stop status %d",
- __func__, status);
- }
- }
- else
- {
- VOS_TRACE(VOS_MODULE_ID_SME, VOS_TRACE_LEVEL_INFO_MED, "%s P2P_NOT_DISCOVERABLE not in right state (%d)",
- __func__, pMac->p2pContext[sessionId].state);
- }
- break;
-
- case P2P_DEVICE_AUTO_AVAILABILITY:
- VOS_TRACE(VOS_MODULE_ID_SME, VOS_TRACE_LEVEL_INFO, "%s P2P_AUTO_AVAILABILITY",__func__);
- pMac->p2pContext[sessionId].listenDiscoverableState = eStateEnabled;
- pMac->p2pContext[sessionId].DiscoverableCfg = listenState;
- pMac->p2pContext[sessionId].expire_time = P2P_LISTEN_TIMEOUT_AUTO * PAL_TIMER_TO_MS_UNIT;
- pMac->p2pContext[sessionId].listenDuration = P2P_LISTEN_TIMEOUT;
- if (pMac->p2pContext[sessionId].state == eP2P_STATE_DISCONNECTED)
- {
- VOS_TRACE(VOS_MODULE_ID_SME, VOS_TRACE_LEVEL_INFO, "%s Calling RemainOnChannel with diration %d on channel %d",
- __func__, pMac->p2pContext[sessionId].listenDuration, pMac->p2pContext[sessionId].P2PListenChannel);
- p2pRemainOnChannel( pMac, pMac->p2pContext[sessionId].SMEsessionId, pMac->p2pContext[sessionId].P2PListenChannel,
- pMac->p2pContext[sessionId].listenDuration, p2pListenStateDiscoverableCallback,
- &pMac->p2pContext[sessionId], TRUE, eP2PRemainOnChnReasonListen);
- }
- else
- {
- VOS_TRACE(VOS_MODULE_ID_SME, VOS_TRACE_LEVEL_INFO_MED, "%s P2P_AUTO_DISCOVERABLE not in right state (%d)",
- __func__, pMac->p2pContext[sessionId].state);
- }
- break;
-
- case P2P_DEVICE_HIGH_AVAILABILITY:
- VOS_TRACE(VOS_MODULE_ID_SME, VOS_TRACE_LEVEL_INFO, "%s P2P_HIGH_AVAILABILITY",__func__);
- pMac->p2pContext[sessionId].listenDiscoverableState = eStateEnabled;
- pMac->p2pContext[sessionId].DiscoverableCfg = listenState;
- pMac->p2pContext[sessionId].expire_time = P2P_REMAIN_ON_CHAN_TIMEOUT_LOW * PAL_TIMER_TO_MS_UNIT;
- pMac->p2pContext[sessionId].listenDuration = P2P_LISTEN_TIMEOUT_HIGH;
- if (pMac->p2pContext[sessionId].state == eP2P_STATE_DISCONNECTED)
- {
- VOS_TRACE(VOS_MODULE_ID_SME, VOS_TRACE_LEVEL_INFO, "%s Calling RemainOnChannel with duration %d on channel %d",
- __func__, pMac->p2pContext[sessionId].listenDuration, pMac->p2pContext[sessionId].P2PListenChannel);
- p2pRemainOnChannel( pMac, pMac->p2pContext[sessionId].SMEsessionId, pMac->p2pContext[sessionId].P2PListenChannel,
- pMac->p2pContext[sessionId].listenDuration, p2pListenStateDiscoverableCallback,
- &pMac->p2pContext[sessionId], TRUE, eP2PRemainOnChnReasonListen);
- }
- else
- {
- VOS_TRACE(VOS_MODULE_ID_SME, VOS_TRACE_LEVEL_INFO_MED, "%s P2P_HIGH_DISCOVERABLE not in right state (%d)",
- __func__, pMac->p2pContext[sessionId].state);
- }
- break;
-
- case 234: //Not to use this as it enabling GO to be concurrent with P2P device P2P_DEVICE_HIGH_AVAILABILITY:
- VOS_TRACE(VOS_MODULE_ID_SME, VOS_TRACE_LEVEL_INFO, "%s P2P_HIGH_AVAILABILITY",__func__);
- pMac->p2pContext[sessionId].listenDiscoverableState = eStateEnabled;
- pMac->p2pContext[sessionId].DiscoverableCfg = listenState;
-
- if ((pMac->p2pContext[sessionId].P2POperatingChannel != pMac->p2pContext[sessionId].P2PListenChannel)
- && p2pIsGOportEnabled(pMac))
- {
- pMac->p2pContext[sessionId].expire_time = P2P_LISTEN_TIMEOUT_HIGH * PAL_TIMER_TO_MS_UNIT * 5;
- pMac->p2pContext[sessionId].listenDuration = P2P_REMAIN_ON_CHAN_TIMEOUT_LOW;
- }
- else
- {
- pMac->p2pContext[sessionId].expire_time = P2P_LISTEN_TIMEOUT_HIGH * PAL_TIMER_TO_MS_UNIT;
- pMac->p2pContext[sessionId].listenDuration = P2P_LISTEN_TIMEOUT;
- }
-
- if (pMac->p2pContext[sessionId].state == eP2P_STATE_DISCONNECTED)
- {
- VOS_TRACE(VOS_MODULE_ID_SME, VOS_TRACE_LEVEL_INFO, "%s Calling RemainOnChannel with duration %d on channel %d",
- __func__, pMac->p2pContext[sessionId].listenDuration, pMac->p2pContext[sessionId].P2PListenChannel);
- p2pRemainOnChannel( pMac, pMac->p2pContext[sessionId].SMEsessionId, pMac->p2pContext[sessionId].P2PListenChannel,
- pMac->p2pContext[sessionId].listenDuration, p2pListenStateDiscoverableCallback,
- &pMac->p2pContext[sessionId], TRUE, eP2PRemainOnChnReasonListen);
- }
-
- break;
-
- default:
- VOS_TRACE(VOS_MODULE_ID_SME, VOS_TRACE_LEVEL_ERROR,
- "%s Unknown listen setting",__func__, listenState);
- break;
- }
-
- return( status );
-}
-
-
-void p2pCallDiscoverCallback(tp2pContext *p2pContext, eP2PDiscoverStatus statusCode)
-{
- if (p2pContext->p2pDiscoverCBFunc)
- {
- p2pDiscoverCompleteCallback pcallback = p2pContext->p2pDiscoverCBFunc;
- p2pContext->p2pDiscoverCBFunc = NULL;
- pcallback(p2pContext->hHal, p2pContext->pContext, statusCode);
- }
- p2pContext->directedDiscovery = FALSE;
-}
-
-
-void p2pDiscoverTimerHandler(void *pContext)
-{
- tp2pContext *p2pContext = (tp2pContext*) pContext;
- eHalStatus status = eHAL_STATUS_SUCCESS;
-
- VOS_TRACE(VOS_MODULE_ID_SME, VOS_TRACE_LEVEL_INFO_MED, "%s enter", __func__);
- p2pCallDiscoverCallback(p2pContext,
- (p2pContext->directedDiscovery) ? eP2P_DIRECTED_DISCOVER : eP2P_DISCOVER_SUCCESS);
-
- status = p2pFsm(p2pContext, eP2P_TRIGGER_DISCONNECTED);
-
- return;
-}
-
-
-
-eHalStatus p2pGetResultFilter(tp2pContext *pP2pContext,
- tCsrScanResultFilter *pFilter)
-{
- eHalStatus status = eHAL_STATUS_SUCCESS;
- v_U32_t uNumDeviceFilters;
- tp2pDiscoverDeviceFilter *directedDiscoveryFilter;
- int i;
- tCsrBssid *bssid = NULL;
-
- do
- {
- if( (NULL != pP2pContext) && (NULL != pFilter) )
- {
- vos_mem_zero(pFilter, sizeof(tCsrScanResultFilter));
- uNumDeviceFilters = pP2pContext->uNumDeviceFilters;
- directedDiscoveryFilter = pP2pContext->directedDiscoveryFilter;
- for(i = 0; i < uNumDeviceFilters; i++)
- {
- if (directedDiscoveryFilter->ucBitmask & DISCOVERY_FILTER_BITMASK_DEVICE)
- {
- pFilter->BSSIDs.numOfBSSIDs++;
- }
-
- if ((directedDiscoveryFilter->ucBitmask != QCWLAN_P2P_DISCOVER_ANY)
- && (directedDiscoveryFilter->ucBitmask & DISCOVERY_FILTER_BITMASK_GO))
- {
- //Matching Device ID and GroupSSID
- pFilter->BSSIDs.numOfBSSIDs++;
- if(directedDiscoveryFilter->GroupSSID.length)
- {
- pFilter->SSIDs.numOfSSIDs++;
- }
- }
- directedDiscoveryFilter += sizeof(tp2pDiscoverDeviceFilter);
- }
-
- directedDiscoveryFilter = pP2pContext->directedDiscoveryFilter;
- if (pFilter->BSSIDs.numOfBSSIDs)
- {
- bssid = ( tCsrBssid *) vos_mem_malloc(
- sizeof( tCsrBssid ) * pFilter->BSSIDs.numOfBSSIDs );
- if (NULL == bssid)
- {
- VOS_TRACE(VOS_MODULE_ID_SME, VOS_TRACE_LEVEL_ERROR,
- " %s fail to allocate bssid", __func__);
- status = eHAL_STATUS_RESOURCES;
- break;
- }
-
- pFilter->BSSIDs.bssid = bssid;
-
- for (i = 0; i < uNumDeviceFilters; i++)
- {
- vos_mem_copy(bssid, directedDiscoveryFilter->DeviceID,
- P2P_MAC_ADDRESS_LEN);
- bssid += sizeof(tCsrBssid);
- directedDiscoveryFilter += sizeof(tp2pDiscoverDeviceFilter);
- }
- }
-
- directedDiscoveryFilter = pP2pContext->directedDiscoveryFilter;
- if (pFilter->SSIDs.numOfSSIDs)
- {
- pFilter->SSIDs.SSIDList = (tCsrSSIDInfo *)vos_mem_malloc(
- sizeof( *pFilter->SSIDs.SSIDList ) * pFilter->SSIDs.numOfSSIDs );
- if (NULL == pFilter->SSIDs.SSIDList)
- {
- VOS_TRACE(VOS_MODULE_ID_SME, VOS_TRACE_LEVEL_ERROR,
- " %s fail to allocate bssid", __func__);
- status = eHAL_STATUS_RESOURCES;
- break;
- }
-
- if ( pFilter->SSIDs.SSIDList )
- {
- for ( i = 0; i < uNumDeviceFilters; i++ )
- {
- if (directedDiscoveryFilter->ucBitmask == DISCOVERY_FILTER_BITMASK_GO)
- {
- if(directedDiscoveryFilter->GroupSSID.length)
- {
- pFilter->SSIDs.SSIDList[i].SSID.length = directedDiscoveryFilter->GroupSSID.length;
- vos_mem_copy( pFilter->SSIDs.SSIDList[i].SSID.ssId,
- directedDiscoveryFilter->GroupSSID.ssId,
- directedDiscoveryFilter->GroupSSID.length );
- }
- }
- directedDiscoveryFilter += sizeof(tp2pDiscoverDeviceFilter);
- }
- }
- }
- }
-
- pFilter->p2pResult = TRUE;
- pFilter->bWPSAssociation = TRUE;
- pFilter->BSSType = eCSR_BSS_TYPE_ANY;
- } while(0);
-
- if(!HAL_STATUS_SUCCESS(status))
- {
- if(pFilter->SSIDs.SSIDList)
- {
- vos_mem_free(pFilter->SSIDs.SSIDList);
- pFilter->SSIDs.SSIDList = NULL;
- }
- if( pFilter->BSSIDs.bssid )
- {
- vos_mem_free(pFilter->BSSIDs.bssid);
- pFilter->BSSIDs.bssid = NULL;
- }
- }
-
- return status;
-}
-
-
-/*
- @breif Function calls P2P_Fsm function to initiate the P2P Discover process
-
- @param[in] hHal - Handle to MAC structure.
- [in] sessionID - Session ID returned by sme_OpenSession
- [in] pDiscoverRequest - pointer to the tp2pDiscoverRequest structure
- whose parameters are filled in the HDD.
- [in] callback - HDD callback function to be called when Discover
- is complete
- [in] pContext - a pointer passed in for the callback
-
- @return eHAL_STATUS_FAILURE - If success.
- eHAL_STATUS_SUCCESS - If failure.
-*/
-eHalStatus P2P_DiscoverRequest(tHalHandle hHal,
- tANI_U8 SessionID,
- tP2PDiscoverRequest *pDiscoverRequest,
- p2pDiscoverCompleteCallback callback,
- void *pContext)
-{
- eHalStatus status = eHAL_STATUS_FAILURE;
- tpAniSirGlobal pMac = PMAC_STRUCT(hHal);
- tScanResultHandle hScanResult = NULL;
- tCsrScanResultFilter filter;
- tANI_U32 uNumDeviceFilters;
- tp2pDiscoverDeviceFilter *pDeviceFilters;
- tANI_U32 i = 0;
- tp2pContext *pP2pContext = &pMac->p2pContext[SessionID];
- tCsrBssid *bssid = NULL;
- tp2pDiscoverDeviceFilter discoverFilter;
- tANI_BOOLEAN fDirect = FALSE;
-
- if (pDiscoverRequest == NULL)
- {
- return status;
- }
-
- pP2pContext->discoverType = pDiscoverRequest->discoverType;
- pP2pContext->scanType = pDiscoverRequest->scanType;
- pP2pContext->uDiscoverTimeout = pDiscoverRequest->uDiscoverTimeout;
-
- if (pP2pContext->DiscoverReqIeField)
- {
- vos_mem_free(pP2pContext->DiscoverReqIeField);
- pP2pContext->DiscoverReqIeLength = 0;
- pP2pContext->DiscoverReqIeField = NULL;
- }
-
- if (pDiscoverRequest->uIELen)
- {
- pP2pContext->DiscoverReqIeField = (tANI_U8 *)vos_mem_malloc(pDiscoverRequest->uIELen);
- vos_mem_copy((tANI_U8 *)pP2pContext->DiscoverReqIeField,
- pDiscoverRequest->pIEField, pDiscoverRequest->uIELen);
- pP2pContext->DiscoverReqIeLength = pDiscoverRequest->uIELen;
- }
- else
- {
- pP2pContext->DiscoverReqIeLength = 0;
- }
-
- vos_mem_zero(&filter, sizeof(filter));
-
- do
- {
- if (pDiscoverRequest->uNumDeviceFilters)
- {
- VOS_TRACE(VOS_MODULE_ID_SME, VOS_TRACE_LEVEL_INFO, "%s directed", __func__);
- fDirect = TRUE;
- uNumDeviceFilters = pDiscoverRequest->uNumDeviceFilters;
-
- pP2pContext->uDiscoverTimeout = pP2pContext->uDiscoverTimeout;
- pP2pContext->uNumDeviceFilters = pDiscoverRequest->uNumDeviceFilters;
- if(pP2pContext->uNumDeviceFilterAllocated < pDiscoverRequest->uNumDeviceFilters)
- {
- if(pP2pContext->directedDiscoveryFilter)
- {
- pP2pContext->uNumDeviceFilterAllocated = 0;
- vos_mem_free(pP2pContext->directedDiscoveryFilter);
- pP2pContext->directedDiscoveryFilter = NULL;
- }
- pP2pContext->directedDiscoveryFilter = (tp2pDiscoverDeviceFilter *)
- vos_mem_malloc(sizeof(tp2pDiscoverDeviceFilter) * uNumDeviceFilters);
- if (NULL == pP2pContext->directedDiscoveryFilter)
- {
- VOS_TRACE(VOS_MODULE_ID_SME, VOS_TRACE_LEVEL_ERROR,
- "%s fail to allocate memory for discoverFilter", __func__);
- status = eHAL_STATUS_RESOURCES;
- break;
- }
- pP2pContext->uNumDeviceFilterAllocated = uNumDeviceFilters;
- }
-
- pDeviceFilters = pDiscoverRequest->pDeviceFilters;
- if(NULL != pDeviceFilters)
- {
- vos_mem_copy (pP2pContext->directedDiscoveryFilter, pDeviceFilters,
- sizeof(tp2pDiscoverDeviceFilter) * uNumDeviceFilters);
-
- if(!HAL_STATUS_SUCCESS(status = p2pGetResultFilter(pP2pContext, &filter)))
- {
- VOS_TRACE(VOS_MODULE_ID_SME, VOS_TRACE_LEVEL_ERROR,
- "%s fail to create filter", __func__);
- break;
- }
- }//if(NULL != pDeviceFilters)
-
- status = csrScanGetResult(pMac, &filter, &hScanResult);
- if (hScanResult)
- {
- VOS_TRACE(VOS_MODULE_ID_SME, VOS_TRACE_LEVEL_ERROR,
- "%s calling p2pDiscoverCompleteCallback", __func__);
- if (callback)
- {
- callback(hHal, pContext, eP2P_DIRECTED_DISCOVER);
-
- }
- status = eHAL_STATUS_SUCCESS;
- break;
- }
- else
- {
- VOS_TRACE(VOS_MODULE_ID_SME, VOS_TRACE_LEVEL_ERROR,
- "%s Directed find did not find BSSID in cache", __func__);
- pP2pContext->formationReq.targetListenChannel = 0;
- if (pDiscoverRequest->uNumDeviceFilters == 1 && filter.BSSIDs.numOfBSSIDs == 1)
- {
- vos_mem_copy(&pP2pContext->formationReq.deviceAddress,
- pDiscoverRequest->pDeviceFilters->DeviceID,
- P2P_MAC_ADDRESS_LEN);
- }
- }
- }
-
- pP2pContext->p2pDiscoverCBFunc = callback;
- pP2pContext->pContext = pContext;
- pP2pContext->directedDiscovery = fDirect;
- if(!pP2pContext->GroupFormationPending)
- {
- p2pFsm(&pMac->p2pContext[SessionID], eP2P_TRIGGER_DEVICE_MODE_DEVICE);
- }
- else
- {
- VOS_TRACE(VOS_MODULE_ID_SME, VOS_TRACE_LEVEL_INFO_MED,
- "%s while group formation", __func__);
- }
-
- pP2pContext->uDiscoverTimeout = pDiscoverRequest->uDiscoverTimeout;
- VOS_TRACE(VOS_MODULE_ID_SME, VOS_TRACE_LEVEL_INFO_MED, "%s Start discover", __func__);
- status = vos_timer_start(&pP2pContext->discoverTimer,
- pP2pContext->uDiscoverTimeout);
- if (!VOS_IS_STATUS_SUCCESS(status))
- {
- VOS_TRACE(VOS_MODULE_ID_SME, VOS_TRACE_LEVEL_ERROR,
- "%s failt to start discover timer", __func__);
- pP2pContext->p2pDiscoverCBFunc = NULL;
- pP2pContext->pContext = NULL;
- if(callback)
- {
- callback(pMac, pContext, eP2P_DISCOVER_FAILURE);
- }
- }
- }while(0);
-
- if(filter.SSIDs.SSIDList)
- {
- vos_mem_free(filter.SSIDs.SSIDList);
- }
- if( hScanResult )
- {
- sme_ScanResultPurge( pMac, hScanResult );
- }
- if( filter.BSSIDs.bssid )
- {
- vos_mem_free(filter.BSSIDs.bssid);
- }
-
- return status;
-}
-
-eHalStatus p2pScanRequest(tp2pContext *p2pContext, p2pDiscoverCompleteCallback callback, void *pContext)
-{
- tCsrScanRequest scanRequest;
- v_U32_t scanId = 0;
- tANI_U32 len = 0;
- tCsrSSIDInfo wcSSID = { {P2P_WILDCARD_SSID_LEN, P2P_WILDCARD_SSID}, 0, 0 };
- tANI_U8 Channel;
- eHalStatus status = eHAL_STATUS_SUCCESS;
- tP2P_OperatingChannel p2pOperatingChannel;
- tpAniSirGlobal pMac = PMAC_STRUCT(p2pContext->hHal);
- tANI_U8 *p2pIe = NULL;
- tANI_U32 p2pIeLen;
-
- vos_mem_zero( &scanRequest, sizeof(scanRequest));
-
- P2P_GetOperatingChannel(p2pContext->hHal, p2pContext->sessionId, &p2pOperatingChannel);
- Channel = p2pOperatingChannel.channel;
-
- if (Channel)
- {
- scanRequest.ChannelInfo.numOfChannels = 1;
- scanRequest.ChannelInfo.ChannelList = &Channel;
- VOS_TRACE(VOS_MODULE_ID_SME, VOS_TRACE_LEVEL_ERROR, "%s Scan on channel %d p2pContext->sessionId %d",
- __func__, Channel, p2pContext->sessionId);
- }
- else
- {
- getChannelInfo(p2pContext, &scanRequest.ChannelInfo, WFD_DISCOVER_TYPE_AUTO);
- VOS_TRACE(VOS_MODULE_ID_SME, VOS_TRACE_LEVEL_ERROR, "%s Scan on all channels",
- __func__);
- }
-
- /* set the scan type to active */
- scanRequest.scanType = eSIR_ACTIVE_SCAN;
-
- vos_mem_set(scanRequest.bssid, sizeof( tCsrBssid ), 0xff);
-
- scanRequest.requestType = eCSR_SCAN_P2P_FIND_PEER;
- /* set min and max channel time to zero */
- scanRequest.minChnTime = 30;
- scanRequest.maxChnTime = 100;
-
- /* set BSSType to default type */
- scanRequest.BSSType = eCSR_BSS_TYPE_ANY;
-
- scanRequest.SSIDs.numOfSSIDs = 1;
- scanRequest.SSIDs.SSIDList = &wcSSID;
- scanRequest.p2pSearch = VOS_FALSE;
-
- P2P_GetIE(p2pContext, p2pContext->sessionId, eP2P_GROUP_ID, &p2pIe, &p2pIeLen);
- vos_mem_copy(scanRequest.bssid, ((tP2PGroupId *)p2pIe)->deviceAddress,
- P2P_MAC_ADDRESS_LEN);
-
- P2P_GetIE(p2pContext, p2pContext->sessionId, eP2P_PROBE_REQ, &scanRequest.pIEField, &len);
-
- scanRequest.uIEFieldLen = len;
-
- status = csrScanRequest( p2pContext->hHal, p2pContext->SMEsessionId, &scanRequest, &scanId, callback, pContext );
-
- if(scanRequest.pIEField)
- {
- vos_mem_free(scanRequest.pIEField);
- }
-
- if(p2pIe)
- {
- vos_mem_free(p2pIe);
- }
- return status;
-}
-
-tANI_U8 getP2PSessionIdFromSMESessionId(tHalHandle hHal, tANI_U8 SessionID)
-{
- tpAniSirGlobal pMac = PMAC_STRUCT(hHal);
- tANI_U8 num_session;
-
- for (num_session = 0; num_session < MAX_NO_OF_P2P_SESSIONS; num_session++)
- {
- if(SessionID == pMac->p2pContext[num_session].SMEsessionId)
- {
- return pMac->p2pContext[num_session].sessionId;
- }
- }
-
- return CSR_SESSION_ID_INVALID;
-}
-
-
-/* SessionID is HDD session id, not SME sessionId*/
-eHalStatus p2pCloseSession(tHalHandle hHal, tANI_U8 SessionID)
-{
- tpAniSirGlobal pMac = PMAC_STRUCT(hHal);
- tp2pContext *pContext = &pMac->p2pContext[SessionID];
-
- pContext->SMEsessionId = CSR_SESSION_ID_INVALID;
- p2pResetContext(pContext);
-
- return eHAL_STATUS_SUCCESS;
-}
-
-
-eHalStatus p2pSetSessionId(tHalHandle hHal, tANI_U8 SessionID, tANI_U8 SmeSessionId)
-{
- tpAniSirGlobal pMac = PMAC_STRUCT(hHal);
-
- pMac->p2pContext[SessionID].sessionId = SessionID;
- pMac->p2pContext[SessionID].SMEsessionId = SmeSessionId;
-
- return eHAL_STATUS_SUCCESS;
-}
-
-static tANI_BOOLEAN p2pIsGOportEnabled(tpAniSirGlobal pMac)
-{
-
- tANI_U8 num_session = 0;
-
- for (num_session = 0; num_session < MAX_NO_OF_P2P_SESSIONS ; num_session++)
- {
- if (pMac->p2pContext[num_session].operatingmode == OPERATION_MODE_P2P_GROUP_OWNER)
- {
- return eANI_BOOLEAN_TRUE;
- }
- }
-
- return eANI_BOOLEAN_FALSE;
-}
-
-tANI_BOOLEAN p2pIsOperatingChannEqualListenChann(tHalHandle hHal, tANI_U8 SessionID)
-{
- tpAniSirGlobal pMac = PMAC_STRUCT(hHal);
-
- if(pMac->p2pContext[SessionID].P2POperatingChannel == pMac->p2pContext[SessionID].P2PListenChannel)
- {
- return eANI_BOOLEAN_TRUE;
- }
-
- return eANI_BOOLEAN_FALSE;
-}
-
-eHalStatus p2pGetListenChannel(tHalHandle hHal, tANI_U8 SessionID, tANI_U8 *channel)
-{
- tpAniSirGlobal pMac = PMAC_STRUCT(hHal);
-
- *channel = pMac->p2pContext[SessionID].P2PListenChannel;
-
- return eHAL_STATUS_SUCCESS;
-}
-
-eHalStatus p2pSetListenChannel(tHalHandle hHal, tANI_U8 SessionID, tANI_U8 channel)
-{
- tpAniSirGlobal pMac = PMAC_STRUCT(hHal);
- tP2P_OperatingChannel p2pListenChannel;
- eHalStatus status = eHAL_STATUS_SUCCESS;
-
- if(csrRoamIsChannelValid(pMac, channel))
- {
- pMac->p2pContext[SessionID].P2PListenChannel = channel;
- p2pGetListenChannelAttrib(pMac, pMac->p2pContext[SessionID].sessionId, &p2pListenChannel);
- p2pListenChannel.channel = channel;
- p2pUpdateListenChannelAttrib(pMac, pMac->p2pContext[SessionID].sessionId, &p2pListenChannel);
- }
- else
- {
- VOS_TRACE(VOS_MODULE_ID_SME, VOS_TRACE_LEVEL_ERROR,
- " %s fail with invalid channel %d", __func__, channel);
- status = eHAL_STATUS_INVALID_PARAMETER;
- }
-
- return status;
-}
-
-
-
-eHalStatus p2pStopDiscovery(tHalHandle hHal, tANI_U8 SessionID)
-{
- tpAniSirGlobal pMac = PMAC_STRUCT(hHal);
- eHalStatus status = eHAL_STATUS_SUCCESS;
-
- status = vos_timer_stop(&pMac->p2pContext[SessionID].discoverTimer);
- if (status != eHAL_STATUS_SUCCESS)
- {
- VOS_TRACE(VOS_MODULE_ID_SME, VOS_TRACE_LEVEL_ERROR, "%s Timer Stop status %d", __func__, status);
- return status;
- }
-
- VOS_TRACE(VOS_MODULE_ID_SME, VOS_TRACE_LEVEL_INFO, "%s Timer Stop status %d", __func__, status);
- p2pCallDiscoverCallback(&pMac->p2pContext[SessionID], eP2P_DIRECTED_DISCOVER);
-
- status = p2pFsm( &pMac->p2pContext[SessionID], eP2P_TRIGGER_DISCONNECTED );
-
- return status;
-}
-
-//Purge P2P device/GO from the list
-eHalStatus p2pPurgeDeviceList(tpAniSirGlobal pMac, tDblLinkList *pList)
-{
- eHalStatus status = eHAL_STATUS_SUCCESS;
- tListElem *pEntry, *pNext;
- tCsrScanResult *pBssResult;
- tDot11fBeaconIEs *pIes;
-
- csrLLLock(pList);
-
- pEntry = csrLLPeekHead(pList, LL_ACCESS_NOLOCK);
- while( NULL != pEntry )
- {
- pNext = csrLLNext(pList, pEntry, LL_ACCESS_NOLOCK);
- pBssResult = GET_BASE_ADDR( pEntry, tCsrScanResult, Link );
- pIes = NULL;
- if(!HAL_STATUS_SUCCESS(csrGetParsedBssDescriptionIEs(pMac, &pBssResult->Result.BssDescriptor, &pIes)))
- {
- VOS_TRACE(VOS_MODULE_ID_SME, VOS_TRACE_LEVEL_ERROR,
- " %s fail to parse IEs. pEntry (0x%X)",
- __func__, pEntry);
- pEntry = pNext;
- continue;
- }
- if( pIes->P2PBeaconProbeRes.present )
- {
- //Found a P2P BSS
- if(csrLLRemoveEntry(pList, pEntry, LL_ACCESS_NOLOCK) )
- {
- csrFreeScanResultEntry( pMac, pBssResult );
- }
- }
- vos_mem_free(pIes);
- pEntry = pNext;
- }
-
- csrLLUnlock(pList);
-
- return (status);
-}
-
-
-eHalStatus sme_p2pFlushDeviceList(tHalHandle hHal, tANI_U8 HDDSessionId)
-{
- eHalStatus status = eHAL_STATUS_FAILURE;
- tpAniSirGlobal pMac = PMAC_STRUCT( hHal );
-
- smsLog(pMac, LOG2, FL("enter"));
- status = sme_AcquireGlobalLock( &pMac->sme );
- if ( HAL_STATUS_SUCCESS( status ) )
- {
- status = p2pPurgeDeviceList(pMac, &pMac->scan.scanResultList);
- sme_ReleaseGlobalLock( &pMac->sme );
- }
-
- return (status);
-}
-
-
-eHalStatus sme_p2pResetSession(tHalHandle hHal, tANI_U8 HDDSessionId)
-{
- eHalStatus status = eHAL_STATUS_FAILURE;
- tpAniSirGlobal pMac = PMAC_STRUCT( hHal );
-
- smsLog(pMac, LOG2, FL("enter"));
- status = sme_AcquireGlobalLock( &pMac->sme );
- if ( HAL_STATUS_SUCCESS( status ) )
- {
- if(MAX_NO_OF_P2P_SESSIONS > HDDSessionId)
- {
- p2pResetContext(&pMac->p2pContext[HDDSessionId]);
- status = eHAL_STATUS_SUCCESS;
- }
- sme_ReleaseGlobalLock( &pMac->sme );
- }
-
- return (status);
-}
-
-
-
-eHalStatus sme_p2pGetResultFilter(tHalHandle hHal, tANI_U8 HDDSessionId,
- tCsrScanResultFilter *pFilter)
-{
- eHalStatus status = eHAL_STATUS_FAILURE;
- tpAniSirGlobal pMac = PMAC_STRUCT( hHal );
-
- status = sme_AcquireGlobalLock( &pMac->sme );
- if ( HAL_STATUS_SUCCESS( status ) )
- {
- if(MAX_NO_OF_P2P_SESSIONS > HDDSessionId)
- {
- status = p2pGetResultFilter(&pMac->p2pContext[HDDSessionId], pFilter);
- }
- sme_ReleaseGlobalLock( &pMac->sme );
- }
-
- return status;
-}
-
-
-
-#endif //WLAN_FEATURE_P2P_INTERNAL
eHalStatus p2pProcessNoAReq(tpAniSirGlobal pMac, tSmeCmd *pNoACmd)
{
diff --git a/CORE/SME/src/sme_common/sme_Api.c b/CORE/SME/src/sme_common/sme_Api.c
index cd83dded76c4..ecd52436694e 100644
--- a/CORE/SME/src/sme_common/sme_Api.c
+++ b/CORE/SME/src/sme_common/sme_Api.c
@@ -1602,14 +1602,6 @@ eHalStatus sme_UpdateConfig(tHalHandle hHal, tpSmeConfigParams pSmeConfigParams)
smsLog( pMac, LOGE, "csrChangeDefaultConfigParam failed with status=%d",
status );
}
-#if defined WLAN_FEATURE_P2P_INTERNAL
- status = p2pChangeDefaultConfigParam(pMac, &pSmeConfigParams->p2pConfig);
-
- if ( ! HAL_STATUS_SUCCESS( status ) ) {
- smsLog( pMac, LOGE, "p2pChangeDefaultConfigParam failed with status=%d",
- status );
- }
-#endif
#if defined WLAN_FEATURE_VOWIFI
status = rrmChangeDefaultConfigParam(hHal, &pSmeConfigParams->rrmConfig);
@@ -2543,11 +2535,9 @@ eHalStatus sme_ProcessMsg(tHalHandle hHal, vos_msg_t* pMsg)
case eWNI_SME_TDLS_DEL_ALL_PEER_IND:
case eWNI_SME_MGMT_FRM_TX_COMPLETION_IND:
case eWNI_SME_TDLS_LINK_ESTABLISH_RSP:
-#ifdef QCA_WIFI_2_0
case eWNI_SME_TDLS_SHOULD_DISCOVER:
case eWNI_SME_TDLS_SHOULD_TEARDOWN:
case eWNI_SME_TDLS_PEER_DISCONNECTED:
-#endif
#ifdef FEATURE_WLAN_TDLS_INTERNAL
case eWNI_SME_TDLS_DISCOVERY_START_RSP:
case eWNI_SME_TDLS_DISCOVERY_START_IND:
@@ -2998,24 +2988,12 @@ eHalStatus sme_Close(tHalHandle hHal)
#ifdef FEATURE_WLAN_LFR
tANI_BOOLEAN csrIsScanAllowed(tpAniSirGlobal pMac)
{
-#if 0
- switch(pMac->roam.neighborRoamInfo.neighborRoamState) {
- case eCSR_NEIGHBOR_ROAM_STATE_REPORT_SCAN:
- case eCSR_NEIGHBOR_ROAM_STATE_PREAUTHENTICATING:
- case eCSR_NEIGHBOR_ROAM_STATE_PREAUTH_DONE:
- case eCSR_NEIGHBOR_ROAM_STATE_REASSOCIATING:
- return eANI_BOOLEAN_FALSE;
- default:
- return eANI_BOOLEAN_TRUE;
- }
-#else
/*
* TODO: always return TRUE for now until
* we figure out why we could be stuck in
* one of the roaming states forever.
*/
return eANI_BOOLEAN_TRUE;
-#endif
}
#endif
/* ---------------------------------------------------------------------------
@@ -4171,15 +4149,6 @@ eHalStatus sme_GetConfigParam(tHalHandle hHal, tSmeConfigParams *pParam)
sme_ReleaseGlobalLock( &pMac->sme );
return status;
}
-#if defined WLAN_FEATURE_P2P_INTERNAL
- status = p2pGetConfigParam(pMac, &pParam->p2pConfig);
- if (status != eHAL_STATUS_SUCCESS)
- {
- smsLog( pMac, LOGE, "%s p2pGetConfigParam failed", __func__);
- sme_ReleaseGlobalLock( &pMac->sme );
- return status;
- }
-#endif
pParam->fScanOffload = pMac->fScanOffload;
pParam->fP2pListenOffload = pMac->fP2pListenOffload;
pParam->max_intf_count = pMac->sme.max_intf_count;
@@ -7294,9 +7263,6 @@ eHalStatus sme_RemainOnChannel(tHalHandle hHal, tANI_U8 sessionId,
{
status = p2pRemainOnChannel (hHal, sessionId, channel, duration, callback, pContext,
isP2PProbeReqAllowed
-#ifdef WLAN_FEATURE_P2P_INTERNAL
- , eP2PRemainOnChnReasonUnknown
-#endif
);
sme_ReleaseGlobalLock( &pMac->sme );
}
@@ -8879,7 +8845,6 @@ eHalStatus sme_SetMaxTxPower(tHalHandle hHal, tSirMacAddr pBssid,
\param dBm power to set
\- return eHalStatus
---------------------------------------------------------------------------*/
-#if defined (QCA_WIFI_2_0) && !defined (QCA_WIFI_ISOC)
eHalStatus sme_SetTxPower(tHalHandle hHal, v_U8_t sessionId,
tSirMacAddr pBSSId,
tVOS_CON_MODE dev_mode, int dBm)
@@ -8924,34 +8889,6 @@ eHalStatus sme_SetTxPower(tHalHandle hHal, v_U8_t sessionId,
return eHAL_STATUS_SUCCESS;
}
-#else
-eHalStatus sme_SetTxPower(tHalHandle hHal, v_U8_t sessionId,
- tSirMacAddr pBSSId,
- tVOS_CON_MODE dev_mode, int mW)
-{
-
- eHalStatus status = eHAL_STATUS_FAILURE;
- tpAniSirGlobal pMac = PMAC_STRUCT( hHal );
-
- MTRACE(vos_trace(VOS_MODULE_ID_SME,
- TRACE_CODE_SME_RX_HDD_SET_TXPOW, NO_SESSION, 0));
- smsLog(pMac, LOG1, FL("set tx power %dmW"), mW);
-
- if (mW < 0 || mW > 0xff) {
- VOS_TRACE(VOS_MODULE_ID_SME, VOS_TRACE_LEVEL_ERROR,
- "%s: error, invalid mW = %d", __func__, mW);
- return eHAL_STATUS_FAILURE;
- }
-
- status = sme_AcquireGlobalLock(&pMac->sme);
- if (HAL_STATUS_SUCCESS(status))
- {
- status = csrSetTxPower(pMac, sessionId, (v_U8_t)mW);
- sme_ReleaseGlobalLock(&pMac->sme);
- }
- return status;
-}
-#endif
/* ---------------------------------------------------------------------------
@@ -11056,7 +10993,6 @@ void sme_SetTdlsPowerSaveProhibited(tHalHandle hHal, tANI_U32 sessionId, v_BOOL_
return;
}
-#ifdef QCA_WIFI_2_0
/* ---------------------------------------------------------------------------
\fn sme_UpdateFwTdlsState
@@ -11281,7 +11217,6 @@ eHalStatus sme_GetLinkSpeed(tHalHandle hHal, tSirLinkSpeedInfo *lsReq, void *pls
}
return(status);
}
-#endif /* QCA_WIFI_2_0 */
#endif /* FEATURE_WLAN_TDLS */
/* ---------------------------------------------------------------------------
\fn sme_IsPmcBmps
@@ -12569,14 +12504,6 @@ eHalStatus sme_SendRateUpdateInd(tHalHandle hHal,
eHalStatus status;
vos_msg_t msg;
-#ifdef QCA_WIFI_ISOC
- /* For discrete solution, i.e., Rome the bit 28, 29 and 30 are used to
- * optionally carry NSS info: 100 for 1x1, 101 for 2x2, 111 for 3x3.
- * For Pronto we need to zero out bits 28 - 30 */
- rateUpdateParams->mcastDataRate24GHz &= ~0x70000000;
- rateUpdateParams->reliableMcastDataRate &= ~0x70000000;
- rateUpdateParams->mcastDataRate5GHz &= ~0x70000000;
-#endif
if (rateUpdateParams->mcastDataRate24GHz ==
HT20_SHORT_GI_MCS7_RATE)
@@ -12609,7 +12536,6 @@ eHalStatus sme_SendRateUpdateInd(tHalHandle hHal,
return status;
}
-#ifdef QCA_WIFI_2_0
eHalStatus sme_getChannelInfo(tHalHandle hHal, tANI_U8 chanId,
tSmeChannelInfo *chanInfo)
{
@@ -12660,7 +12586,6 @@ eHalStatus sme_getChannelInfo(tHalHandle hHal, tANI_U8 chanId,
}
return status;
}
-#endif /* QCA_WIFI_2_0 */
#ifdef FEATURE_WLAN_AUTO_SHUTDOWN
/* ---------------------------------------------------------------------------
@@ -12968,7 +12893,6 @@ eHalStatus sme_RoamCsaIeRequest(tHalHandle hHal, tCsrBssid bssid,
return (status);
}
-#ifndef QCA_WIFI_ISOC
/* ---------------------------------------------------------------------------
\fn sme_InitThermalInfo
\brief SME API to initialize the thermal mitigation parameters
@@ -13112,7 +13036,6 @@ eHalStatus sme_TxpowerLimit(tHalHandle hHal, tSirTxPowerLimit *psmetx)
}
return(status);
}
-#endif /* #ifndef QCA_WIFI_ISOC */
eHalStatus sme_UpdateConnectDebug(tHalHandle hHal, tANI_U32 set_value)
{
diff --git a/CORE/SYS/legacy/src/pal/src/palApiComm.c b/CORE/SYS/legacy/src/pal/src/palApiComm.c
index cce7c34aac95..146a45fbb290 100644
--- a/CORE/SYS/legacy/src/pal/src/palApiComm.c
+++ b/CORE/SYS/legacy/src/pal/src/palApiComm.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2012-2013 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2012-2014 The Linux Foundation. All rights reserved.
*
* Previously licensed under the ISC license by Qualcomm Atheros, Inc.
*
@@ -31,9 +31,7 @@
#include <sirParams.h> // needed for tSirMbMsg
#include "wlan_qct_wda.h"
-#ifdef QCA_WIFI_2_0
#include "adf_nbuf.h"
-#endif
#ifndef FEATURE_WLAN_PAL_MEM_DISABLE
@@ -98,47 +96,6 @@ tANI_BOOLEAN palEqualMemory( tHddHandle hHdd, void *pMemory1, void *pMemory2, tA
}
#endif
-#ifndef QCA_WIFI_2_0
-eHalStatus palPktAlloc(tHddHandle hHdd, eFrameType frmType, tANI_U16 size, void **data, void **ppPacket)
-{
- eHalStatus halStatus = eHAL_STATUS_FAILURE;
- VOS_STATUS vosStatus;
-
- vos_pkt_t *pVosPacket;
-
- do
- {
- // we are only handling the 802_11_MGMT frame type for PE/LIM. All other frame types should be
- // ported to use the VOSS APIs directly and should not be using this palPktAlloc API.
- VOS_ASSERT( HAL_TXRX_FRM_802_11_MGMT == frmType );
-
- if ( HAL_TXRX_FRM_802_11_MGMT != frmType ) break;
-
- // allocate one 802_11_MGMT VOS packet, zero the packet and fail the call if nothing is available.
- // if we cannot get this vos packet, fail.
- vosStatus = vos_pkt_get_packet( &pVosPacket, VOS_PKT_TYPE_TX_802_11_MGMT, size, 1, VOS_TRUE, NULL, NULL );
- if ( !VOS_IS_STATUS_SUCCESS( vosStatus ) ) break;
-
- // Reserve the space at the head of the packet for the caller. If we cannot reserve the space
- // then we have to fail (return the packet to voss first!)
- vosStatus = vos_pkt_reserve_head( pVosPacket, data, size );
- if ( !VOS_IS_STATUS_SUCCESS( vosStatus ) )
- {
- vos_pkt_return_packet( pVosPacket );
- break;
- }
-
- // Everything went well if we get here. Return the packet pointer to the caller and indicate
- // success to the caller.
- *ppPacket = (void *)pVosPacket;
-
- halStatus = eHAL_STATUS_SUCCESS;
-
- } while( 0 );
-
- return( halStatus );
-}
-#else
#define TX_PKT_MIN_HEADROOM 64
eHalStatus palPktAlloc(tHddHandle hHdd, eFrameType frmType, tANI_U16 size,
void **data, void **ppPacket)
@@ -160,40 +117,11 @@ eHalStatus palPktAlloc(tHddHandle hHdd, eFrameType frmType, tANI_U16 size,
return halStatus;
}
-#endif
-
-#ifndef QCA_WIFI_2_0
-void palPktFree( tHddHandle hHdd, eFrameType frmType, void* buf, void *pPacket)
-{
- vos_pkt_t *pVosPacket = (vos_pkt_t *)pPacket;
- VOS_STATUS vosStatus;
-
- do
- {
- VOS_ASSERT( pVosPacket );
-
- if ( !pVosPacket ) break;
-
- // we are only handling the 802_11_MGMT frame type for PE/LIM. All other frame types should be
- // ported to use the VOSS APIs directly and should not be using this palPktAlloc API.
- VOS_ASSERT( HAL_TXRX_FRM_802_11_MGMT == frmType );
- if ( HAL_TXRX_FRM_802_11_MGMT != frmType ) break;
-
- // return the vos packet to Voss. Nothing to do if this fails since the palPktFree does not
- // have a return code.
- vosStatus = vos_pkt_return_packet( pVosPacket );
- VOS_ASSERT( VOS_IS_STATUS_SUCCESS( vosStatus ) );
- } while( 0 );
-
- return;
-}
-#else
void palPktFree( tHddHandle hHdd, eFrameType frmType, void* buf, void *pPacket)
{
adf_nbuf_free((adf_nbuf_t)pPacket);
}
-#endif
tANI_U32 palGetTickCount(tHddHandle hHdd)
{
diff --git a/CORE/SYS/legacy/src/system/src/macInitApi.c b/CORE/SYS/legacy/src/system/src/macInitApi.c
index a8431a0882da..30cd55e5fe3f 100644
--- a/CORE/SYS/legacy/src/system/src/macInitApi.c
+++ b/CORE/SYS/legacy/src/system/src/macInitApi.c
@@ -237,10 +237,8 @@ tSirRetStatus macOpen(tHalHandle *pHalHandle, tHddHandle hHdd, tMacOpenParameter
pMac->psOffloadEnabled = FALSE;
}
-#ifdef QCA_WIFI_2_0
/* FW: 0 to 2047 and Host: 2048 to 4095 */
pMac->mgmtSeqNum = WLAN_HOST_SEQ_NUM_MIN-1;
-#endif /* QCA_WIFI_2_0 */
return peOpen(pMac, pMacOpenParms);
}
diff --git a/CORE/WDA/inc/legacy/halMsgApi.h b/CORE/WDA/inc/legacy/halMsgApi.h
index c6d39f8bb47a..ffaaf68aa239 100644
--- a/CORE/WDA/inc/legacy/halMsgApi.h
+++ b/CORE/WDA/inc/legacy/halMsgApi.h
@@ -730,18 +730,10 @@ typedef struct {
#ifdef FEATURE_OEM_DATA_SUPPORT
#ifndef OEM_DATA_REQ_SIZE
-#ifdef QCA_WIFI_2_0
#define OEM_DATA_REQ_SIZE 280
-#else
-#define OEM_DATA_REQ_SIZE 134
-#endif
#endif
#ifndef OEM_DATA_RSP_SIZE
-#ifdef QCA_WIFI_2_0
#define OEM_DATA_RSP_SIZE 1724
-#else
-#define OEM_DATA_RSP_SIZE 1968
-#endif
#endif
typedef struct
@@ -1418,7 +1410,6 @@ typedef struct sAddStaSelfParams
}tAddStaSelfParams, *tpAddStaSelfParams;
#ifdef FEATURE_WLAN_TDLS
-#ifdef QCA_WIFI_2_0
#define HAL_TDLS_MAX_SUPP_CHANNELS 128
#define HAL_TDLS_MAX_SUPP_OPER_CLASSES 32
@@ -1446,7 +1437,6 @@ typedef struct sTdlsPeerStateParams
tANI_U32 peerState;
tTdlsPeerCapParams peerCap;
}tTdlsPeerStateParams;
-#endif /* QCA_WIFI_2_0 */
#endif /* FEATURE_WLAN_TDLS */
typedef struct sAbortScanParams
@@ -1493,13 +1483,11 @@ typedef struct sTdlsLinkEstablishParams
tANI_U32 status;
}tTdlsLinkEstablishParams, *tpTdlsLinkEstablishParams;
-#ifdef QCA_WIFI_2_0
typedef struct tHalHiddenSsidVdevRestart
{
tANI_U8 ssidHidden;
tANI_U8 sessionId;
}tHalHiddenSsidVdevRestart,*tpHalHiddenSsidVdevRestart;
-#endif /* QCA_WIFI_2_0 */
static inline void halGetTxTSFtimer(tpAniSirGlobal pMac,
tSirMacTimeStamp *pTime)
diff --git a/CORE/WDA/inc/legacy/palTypes.h b/CORE/WDA/inc/legacy/palTypes.h
index 1a81740ca970..baf1a4203ed2 100644
--- a/CORE/WDA/inc/legacy/palTypes.h
+++ b/CORE/WDA/inc/legacy/palTypes.h
@@ -71,11 +71,6 @@
#error "more than one ANI_BUS_TYPE_xxx is defined for this build"
#endif
-#elif !( defined( ANI_BUS_TYPE_PCIe ) || defined(ANI_BUS_TYPE_PCI) \
- || defined( ANI_BUS_TYPE_PLATFORM ) || defined(QCA_WIFI_2_0))
-
-#error "NONE of the ANI_BUS_TYPE_xxx are defined for this build"
-
#endif
diff --git a/CORE/WDA/inc/wlan_qct_wda.h b/CORE/WDA/inc/wlan_qct_wda.h
index 8961ea322dba..00eec1cd1ea9 100644
--- a/CORE/WDA/inc/wlan_qct_wda.h
+++ b/CORE/WDA/inc/wlan_qct_wda.h
@@ -69,13 +69,9 @@ when who what, where, why
#include "aniGlobal.h"
-#ifdef QCA_WIFI_2_0
#include "wma_api.h"
#include "wma_stub.h"
#include "i_vos_packet.h"
-#else
-#include "wlan_qct_wdi_ds.h"
-#endif
/* Add Include */
@@ -133,7 +129,6 @@ typedef enum
eWDA_AUTH_TYPE_UNKNOWN = eCSR_AUTH_TYPE_FAILED,
}WDA_AuthType;
-#ifdef QCA_WIFI_2_0
#ifdef FEATURE_WLAN_TDLS
typedef enum
{
@@ -142,7 +137,6 @@ typedef enum
WDA_TDLS_PEER_STATE_TEARDOWN,
} WDA_TdlsPeerState;
#endif /* FEATURE_WLAN_TDLS */
-#endif /* QCA_WIFI_2_0 */
/*--------------------------------------------------------------------------
Utilities
@@ -150,7 +144,6 @@ typedef enum
#define WDA_TLI_CEIL( _a, _b) (( 0 != (_a)%(_b))? (_a)/(_b) + 1: (_a)/(_b))
-#ifdef QCA_WIFI_2_0
#define IS_MCC_SUPPORTED 1
#define IS_FEATURE_SUPPORTED_BY_FW(feat_enum_value) wma_getFwWlanFeatCaps(feat_enum_value)
@@ -173,36 +166,6 @@ typedef enum
#define IS_ADVANCE_TDLS_ENABLE 0
#endif
-#else /* #ifdef QCA_WIFI_2_0 */
-
-/*
- * Check the version number and find if MCC feature is supported or not
- */
-#define IS_MCC_SUPPORTED (WDA_IsWcnssWlanReportedVersionGreaterThanOrEqual( 0, 1, 1, 0))
-#define IS_FEATURE_SUPPORTED_BY_FW(featEnumValue) (!!WDA_getFwWlanFeatCaps(featEnumValue))
-
-#ifdef WLAN_ACTIVEMODE_OFFLOAD_FEATURE
-#define IS_ACTIVEMODE_OFFLOAD_FEATURE_ENABLE ((WDA_getFwWlanFeatCaps(WLANACTIVE_OFFLOAD)) & (WDI_getHostWlanFeatCaps(WLANACTIVE_OFFLOAD)))
-#else
-#define IS_ACTIVEMODE_OFFLOAD_FEATURE_ENABLE 0
-#endif
-
-#ifdef WLAN_FEATURE_ROAM_SCAN_OFFLOAD
-#define IS_ROAM_SCAN_OFFLOAD_FEATURE_ENABLE ((WDI_getHostWlanFeatCaps(WLAN_ROAM_SCAN_OFFLOAD)) & (WDA_getFwWlanFeatCaps(WLAN_ROAM_SCAN_OFFLOAD)))
-#else
-#define IS_ROAM_SCAN_OFFLOAD_FEATURE_ENABLE 0
-#endif
-
-/* Check if heartbeat offload is enabled */
-#define IS_IBSS_HEARTBEAT_OFFLOAD_FEATURE_ENABLE ((WDI_getHostWlanFeatCaps(IBSS_HEARTBEAT_OFFLOAD)) & (WDA_getFwWlanFeatCaps(IBSS_HEARTBEAT_OFFLOAD)))
-
-#ifdef FEATURE_WLAN_TDLS
-#define IS_ADVANCE_TDLS_ENABLE ((WDI_getHostWlanFeatCaps(ADVANCE_TDLS)) & (WDA_getFwWlanFeatCaps(ADVANCE_TDLS)))
-#else
-#define IS_ADVANCE_TDLS_ENABLE 0
-#endif
-
-#endif /* #ifdef QCA_WIFI_2_0 */
/*--------------------------------------------------------------------------
Definitions for Data path APIs
@@ -327,22 +290,6 @@ typedef enum
/*--------------------------------------------------------------------------
Functions
--------------------------------------------------------------------------*/
-#ifndef QCA_WIFI_2_0
-/* For data client */
-typedef VOS_STATUS (*WDA_DS_TxCompleteCallback) ( v_PVOID_t pContext, vos_pkt_t *pFrameDataBuff, VOS_STATUS txStatus );
-typedef VOS_STATUS (*WDA_DS_RxPacketCallback) ( v_PVOID_t pContext, vos_pkt_t *pFrameDataBuff );
-typedef v_U32_t (*WDA_DS_TxPacketCallback) ( v_PVOID_t pContext,
- vos_pkt_t **ppFrameDataBuff,
- v_U32_t uSize,
- v_U8_t uFlowMask,
- v_BOOL_t *pbUrgent );
-typedef VOS_STATUS (*WDA_DS_ResourceCB) ( v_PVOID_t pContext, v_U32_t uCount );
-
-/* For management client */
-typedef VOS_STATUS (*WDA_DS_TxCompleteCb)( v_PVOID_t pContext, wpt_packet *pFrame );
-typedef VOS_STATUS (*WDA_DS_RxCompleteCb)( v_PVOID_t pContext, wpt_packet *pFrame );
-typedef VOS_STATUS (*WDA_DS_TxFlowControlCb)( v_PVOID_t pContext, v_U8_t acMask );
-#endif
typedef void (*pWDATxRxCompFunc)( v_PVOID_t pContext, void *pData,
v_BOOL_t bFreeData );
@@ -409,14 +356,6 @@ typedef struct
tSirMacAddr macBSSID; /*BSSID of the network */
tSirMacAddr macSTASelf; /*Self STA MAC*/
-#ifndef QCA_WIFI_2_0
- /* TX channel mask for flow control */
- v_U8_t uTxFlowMask;
- /* TL's TX resource callback */
- WDA_DS_ResourceCB pfnTxResourceCB;
- /* TL's TX complete callback */
- WDA_DS_TxCompleteCallback pfnTxCompleteCallback;
-#endif
tWdaStaInfo wdaStaInfo[WDA_MAX_STA];
@@ -468,14 +407,12 @@ typedef struct
v_PVOID_t wdaWdiApiMsgParam; /* WDI API paramter tracking */
} tWDA_ReqParams;
-#ifdef QCA_WIFI_2_0
typedef struct {
v_UINT_t param_id;
v_UINT_t param_value;
v_UINT_t param_vdev_id;
v_UINT_t param_vp_dev;
} wda_cli_set_cmd_t;
-#endif
/*
* FUNCTION: WDA_MgmtDSTxPacket
@@ -500,25 +437,15 @@ VOS_STATUS WDA_TxPacket(void *pWDA,
* open WDA context
*/
-#ifndef QCA_WIFI_ISOC
VOS_STATUS WDA_open(v_PVOID_t pVosContext, v_PVOID_t pOSContext,
wda_tgt_cfg_cb pTgtUpdCB,
wda_dfs_radar_indication_cb radar_ind_cb,
tMacOpenParameters *pMacParams ) ;
-#else
-VOS_STATUS WDA_open(v_PVOID_t pVosContext, v_PVOID_t pOSContext,
- wda_tgt_cfg_cb pTgtUpdCB, tMacOpenParameters *pMacParams ) ;
-#endif
-#ifdef QCA_WIFI_2_0
#define WDA_start wma_start
#define WDA_MapChannel wma_map_channel
-#ifdef QCA_WIFI_ISOC
-#define WDA_NVDownload_Start wma_nv_download_start
-#else
#define WDA_NVDownload_Start(x) ({ VOS_STATUS_SUCCESS; })
-#endif
#define WDA_preStart wma_pre_start
#define WDA_stop wma_stop
@@ -527,107 +454,9 @@ VOS_STATUS WDA_open(v_PVOID_t pVosContext, v_PVOID_t pOSContext,
#define WDA_setNeedShutdown wma_setneedshutdown
#define WDA_needShutdown wma_needshutdown
#define WDA_McProcessMsg wma_mc_process_msg
-#else /* #ifdef QCA_WIFI_2_0 */
-
-/*
- * FUNCTION: WDA_preStart
- * Trigger DAL-AL to start CFG download
- */
-VOS_STATUS WDA_start(v_PVOID_t pVosContext) ;
-
-VOS_STATUS WDA_NVDownload_Start(v_PVOID_t pVosContext);
-
-/*
- * FUNCTION: WDA_preStart
- * Trigger WDA to start CFG download
- */
-VOS_STATUS WDA_preStart(v_PVOID_t pVosContext) ;
-/*
- * FUNCTION: WDA_stop
- * stop WDA
- */
-VOS_STATUS WDA_stop(v_PVOID_t pVosContext,tANI_U8 reason);
-
-/*
- * FUNCTION: WDA_close
- * close WDA context
- */
-VOS_STATUS WDA_close(v_PVOID_t pVosContext);
-/*
- * FUNCTION: WDA_shutdown
- * Shutdown will not close the control transport, added by SSR
- */
-VOS_STATUS WDA_shutdown(v_PVOID_t pVosContext, wpt_boolean closeTransport);
-
-/*
- * FUNCTION: WDA_setNeedShutdown
- * WDA stop failed or WDA NV Download failed
- */
-void WDA_setNeedShutdown(v_PVOID_t pVosContext);
-/*
- * FUNCTION: WDA_needShutdown
- * WDA requires a shutdown rather than a close
- */
-v_BOOL_t WDA_needShutdown(v_PVOID_t pVosContext);
-
-/*
- * FUNCTION: WDA_McProcessMsg
- * DAL-AL message processing entry function
- */
-
-VOS_STATUS WDA_McProcessMsg( v_CONTEXT_t pVosContext, vos_msg_t *pMsg ) ;
-
-/* -----------------------------------------------------------------
- * WDA data path API's
- * ----------------------------------------------------------------*/
-/*
- * FUNCTION: WDA_MgmtDSRegister
- * Send Message back to PE
- */
-
-VOS_STATUS WDA_MgmtDSRegister(tWDA_CbContext *pWDA,
- WDA_DS_TxCompleteCb WDA_TxCompleteCallback,
- WDA_DS_RxCompleteCb WDA_RxCompleteCallback,
- WDA_DS_TxFlowControlCb WDA_TxFlowCtrlCallback
- ) ;
-
-/*
- * FUNCTION: WDA_PostMsgApi
- * API fpr PE to post Message to WDA
- */
-VOS_STATUS WDA_PostMsgApi(tpAniSirGlobal pMac, tSirMsgQ *pMsg) ;
-
-/* ---------------------------------------------------------
- * FUNCTION: wdaGetGlobalSystemRole()
- *
- * Get the global HAL system role.
- * ---------------------------------------------------------
- */
-tBssSystemRole wdaGetGlobalSystemRole(tpAniSirGlobal pMac);
-
-tANI_U8 WDA_MapChannel(tANI_U8);
-
-/* maximum wait time for WDA complete event (correct value has to be derived)
- * for now giving the value 1000 ms */
-#define WDA_WDI_COMPLETION_TIME_OUT 30000 /* in ms */
-
-#define WDA_TL_TX_FRAME_TIMEOUT 10000 /* in msec a very high upper limit of 5,000 msec */
-#define WDA_TL_SUSPEND_TIMEOUT 2000 /* in ms unit */
-
-/*Tag used by WDA to mark a timed out frame*/
-#define WDA_TL_TX_MGMT_TIMED_OUT 0xDEAD
-
-#define WDA_TL_TX_SUSPEND_SUCCESS 0
-#define WDA_TL_TX_SUSPEND_FAILURE 1
-
-// FIXME Temporary value for R33D integaration
-//#define WDA_TL_TX_FRAME_TIMEOUT 20000 /* in msec a very high upper limit */
-
-#endif /* #ifdef QCA_WIFI_2_0 */
#define DPU_FEEDBACK_UNPROTECTED_ERROR 0x0F
-#ifdef QCA_WIFI_2_0
#define WDA_GET_RX_MAC_HEADER(pRxMeta) \
(tpSirMacMgmtHdr)(((t_packetmeta *)pRxMeta)->mpdu_hdr_ptr)
@@ -693,240 +522,6 @@ tANI_U8 WDA_MapChannel(tANI_U8);
#define WDA_GET_RX_RFBAND(pRxMeta) 0
-#else /* #ifdef QCA_WIFI_2_0 */
-
-/* ---------------------------------------------------------------------------
-
- RX Meta info access for Integrated SOC
- RX BD header access for NON Integrated SOC
-
- These MACRO are for RX frames that are on flat buffers
-
- ---------------------------------------------------------------------------*/
-
-/* WDA_GET_RX_MAC_HEADER *****************************************************/
-# define WDA_GET_RX_MAC_HEADER(pRxMeta) \
- (tpSirMacMgmtHdr)( ((WDI_DS_RxMetaInfoType *)(pRxMeta))->mpduHeaderPtr )
-
-/* WDA_GET_RX_MPDUHEADER3A ****************************************************/
-# define WDA_GET_RX_MPDUHEADER3A(pRxMeta) \
- (tpSirMacDataHdr3a)( ((WDI_DS_RxMetaInfoType *)(pRxMeta))->mpduHeaderPtr )
-
-/* WDA_GET_RX_MPDU_HEADER_LEN *************************************************/
-# define WDA_GET_RX_MPDU_HEADER_LEN(pRxMeta) \
- ( ((WDI_DS_RxMetaInfoType *)(pRxMeta))->mpduHeaderLength )
-
-/* WDA_GET_RX_MPDU_LEN ********************************************************/
-# define WDA_GET_RX_MPDU_LEN(pRxMeta) \
- ( ((WDI_DS_RxMetaInfoType *)(pRxMeta))->mpduLength )
-
-/* WDA_GET_RX_PAYLOAD_LEN ****************************************************/
-# define WDA_GET_RX_PAYLOAD_LEN(pRxMeta) \
- ( WDA_GET_RX_MPDU_LEN(pRxMeta) - WDA_GET_RX_MPDU_HEADER_LEN(pRxMeta) )
-
-/* WDA_GET_RX_MAC_RATE_IDX ***************************************************/
-# define WDA_GET_RX_MAC_RATE_IDX(pRxMeta) \
- ( ((WDI_DS_RxMetaInfoType *)(pRxMeta))->rateIndex )
-
-/* WDA_GET_RX_MPDU_DATA ******************************************************/
-# define WDA_GET_RX_MPDU_DATA(pRxMeta) \
- ( ((WDI_DS_RxMetaInfoType *)(pRxMeta))->mpduDataPtr )
-
-/* WDA_GET_RX_MPDU_DATA_OFFSET ***********************************************/
-// For Integrated SOC: When UMAC receive the packet. BD is already stripped off.
-// Data offset is the MPDU header length
-# define WDA_GET_RX_MPDU_DATA_OFFSET(pRxMeta) WDA_GET_RX_MPDU_HEADER_LEN(pRxMeta)
-
-/* WDA_GET_RX_MPDU_HEADER_OFFSET *********************************************/
-// For Integrated SOC: We UMAC receive the frame,
-// BD is gone and MAC header at offset 0
-# define WDA_GET_RX_MPDU_HEADER_OFFSET(pRxMeta) 0
-
-/* WDA_GET_RX_UNKNOWN_UCAST **************************************************/
-# define WDA_GET_RX_UNKNOWN_UCAST(pRxMeta) \
- ( ((WDI_DS_RxMetaInfoType *)(pRxMeta))->unknownUcastPkt )
-
-/* WDA_GET_RX_TID ************************************************************/
-# define WDA_GET_RX_TID(pRxMeta) ( ((WDI_DS_RxMetaInfoType *)(pRxMeta))->tid )
-
-/* WDA_GET_RX_STAID **********************************************************/
-# define WDA_GET_RX_STAID(pRxMeta) (((WDI_DS_RxMetaInfoType*)(pRxMeta))->staId)
-
-/* WDA_GET_RX_ADDR3_IDX ******************************************************/
-# define WDA_GET_RX_ADDR3_IDX(pRxMeta) (((WDI_DS_RxMetaInfoType*)(pRxMeta))->addr3Idx)
-
-/* WDA_GET_RX_CH *************************************************************/
-# define WDA_GET_RX_CH(pRxMeta) (((WDI_DS_RxMetaInfoType*)(pRxMeta))->rxChannel)
-
-/* WDA_GET_RX_RFBAND *********************************************************/
-# define WDA_GET_RX_RFBAND(pRxMeta) (((WDI_DS_RxMetaInfoType*)(pRxMeta))->rfBand)
-
-/* WDA_GET_RX_DPUSIG *********************************************************/
-# define WDA_GET_RX_DPUSIG(pRxMeta) (((WDI_DS_RxMetaInfoType*)(pRxMeta))->dpuSig)
-
-/* WDA_IS_RX_BCAST ***********************************************************/
-# define WDA_IS_RX_BCAST(pRxMeta) \
- ( (1 == ((WDI_DS_RxMetaInfoType*)(pRxMeta))->bcast) ? VOS_TRUE : VOS_FALSE )
-
-/* WDA_GET_RX_FT_DONE ********************************************************/
-# define WDA_GET_RX_FT_DONE(pRxMeta) (((WDI_DS_RxMetaInfoType*)(pRxMeta))->ft)
-
-/* WDA_GET_RX_DPU_FEEDBACK **************************************************/
-# define WDA_GET_RX_DPU_FEEDBACK(pRxMeta) \
- (((WDI_DS_RxMetaInfoType*)(pRxMeta))->dpuFeedback)
-
-/* WDA_GET_RX_ASF ************************************************************/
-# define WDA_GET_RX_ASF(pRxMeta) (((WDI_DS_RxMetaInfoType*)(pRxMeta))->amsdu_asf)
-
-/* WDA_GET_RX_AEF ************************************************************/
-# define WDA_GET_RX_AEF(pRxMeta) (((WDI_DS_RxMetaInfoType*)(pRxMeta))->amsdu_aef)
-
-/* WDA_GET_RX_ESF ************************************************************/
-# define WDA_GET_RX_ESF(pRxMeta) (((WDI_DS_RxMetaInfoType*)(pRxMeta))->amsdu_esf)
-
-/* WDA_GET_RX_BEACON_SENT ****************************************************/
-# define WDA_GET_RX_BEACON_SENT(pRxMeta) \
- (((WDI_DS_RxMetaInfoType*)(pRxMeta))->bsf)
-
-/* WDA_GET_RX_TSF_LATER *****************************************************/
-# define WDA_GET_RX_TSF_LATER(pRxMeta) (((WDI_DS_RxMetaInfoType*)(pRxMeta))->rtsf)
-
-/* WDA_GET_RX_TYPE ***********************************************************/
-# define WDA_GET_RX_TYPE(pRxMeta) (((WDI_DS_RxMetaInfoType*)(pRxMeta))->type)
-
-/* WDA_GET_RX_SUBTYPE ********************************************************/
-# define WDA_GET_RX_SUBTYPE(pRxMeta) (((WDI_DS_RxMetaInfoType*)(pRxMeta))->subtype)
-
-/* WDA_GET_RX_TYPE_SUBTYPE ****************************************************/
-# define WDA_GET_RX_TYPE_SUBTYPE(pRxMeta) \
- ((WDA_GET_RX_TYPE(pRxMeta)<<4)|WDA_GET_RX_SUBTYPE(pRxMeta))
-
-/* WDA_GET_RX_REORDER_OPCODE : For MSDU reorder *******************************/
-# define WDA_GET_RX_REORDER_OPCODE(pRxMeta) \
- (((WDI_DS_RxMetaInfoType*)(pRxMeta))->ampdu_reorderOpcode)
-
-/* WDA_GET_RX_REORDER_SLOT_IDX : For MSDU reorder ****************************/
-# define WDA_GET_RX_REORDER_SLOT_IDX(pRxMeta) \
- (((WDI_DS_RxMetaInfoType*)(pRxMeta))->ampdu_reorderSlotIdx)
-
-/* WDA_GET_RX_REORDER_FWD_IDX : For MSDU reorder *****************************/
-# define WDA_GET_RX_REORDER_FWD_IDX(pRxMeta) \
- (((WDI_DS_RxMetaInfoType*)(pRxMeta))->ampdu_reorderFwdIdx)
-
-/* WDA_GET_RX_REORDER_CUR_PKT_SEQ_NO : Fro MSDU reorder **********************/
-# define WDA_GET_RX_REORDER_CUR_PKT_SEQ_NO(pRxMeta) \
- (((WDI_DS_RxMetaInfoType*)(pRxMeta))->currentPktSeqNo)
-
-/* WDA_IS_RX_LLC_PRESENT *****************************************************/
-# define WDA_IS_RX_LLC_PRESENT(pRxMeta) \
- ( (0 == ((WDI_DS_RxMetaInfoType*)(pRxMeta))->llcr) ? VOS_TRUE : VOS_FALSE )
-
-#define WLANWDA_HO_IS_AN_AMPDU 0x4000
-#define WLANWDA_HO_LAST_MPDU_OF_AMPDU 0x400
-
-/* WDA_IS_RX_AN_AMPDU ********************************************************/
-# define WDA_IS_RX_AN_AMPDU(pRxMeta) \
- ( ((WDI_DS_RxMetaInfoType*)(pRxMeta))->rxpFlags & WLANWDA_HO_IS_AN_AMPDU )
-
-/* WDA_IS_RX_LAST_MPDU *******************************************************/
-# define WDA_IS_RX_LAST_MPDU(pRxMeta) \
- ( ((WDI_DS_RxMetaInfoType*)(pRxMeta))->rxpFlags & WLANWDA_HO_LAST_MPDU_OF_AMPDU )
-
-/* WDA_GET_RX_TIMESTAMP *****************************************************/
-# define WDA_GET_RX_TIMESTAMP(pRxMeta) (((WDI_DS_RxMetaInfoType*)(pRxMeta))->mclkRxTimestamp)
-
-/* WDA_IS_RX_IN_SCAN *********************************************************/
-# define WDA_IS_RX_IN_SCAN(pRxMeta) (((WDI_DS_RxMetaInfoType*)(pRxMeta))->scan)
-#ifdef WLAN_FEATURE_ROAM_SCAN_OFFLOAD
-/* WDA_GET_OFFLOADSCANLEARN **************************************************/
-# define WDA_GET_OFFLOADSCANLEARN(pRxMeta) (((WDI_DS_RxMetaInfoType*)(pRxMeta))->offloadScanLearn)
-/* WDA_GET_ROAMCANDIDATEIND **************************************************/
-# define WDA_GET_ROAMCANDIDATEIND(pRxMeta) (((WDI_DS_RxMetaInfoType*)(pRxMeta))->roamCandidateInd)
-# define WDA_GET_SESSIONID(pRxMeta) \
- (((WDI_DS_RxMetaInfoType*)(pRxMeta))->sessionId)
-#endif
-/* WDA_GET_RX_RSSI_DB ********************************************************/
-// Volans RF
-# define WDA_RSSI_OFFSET 100
-# define WDA_GET_RSSI0_DB(rssi0) (rssi0 - WDA_RSSI_OFFSET)
-# define WDA_GET_RSSI1_DB(rssi0) (0 - WDA_RSSI_OFFSET)
-# define WDA_MAX_OF_TWO(val1, val2) ( ((val1) > (val2)) ? (val1) : (val2))
-# define WDA_GET_RSSI_DB(rssi0) \
- WDA_MAX_OF_TWO(WDA_GET_RSSI0_DB(rssi0), WDA_GET_RSSI1_DB(rssi0))
-# define WDA_GET_RX_RSSI_DB(pRxMeta) \
- WDA_GET_RSSI_DB((((WDI_DS_RxMetaInfoType*)(pRxMeta))->rssi0))
-
-/* WDA_GET_RX_SNR ************************************************************/
-# define WDA_GET_RX_SNR(pRxMeta) (((WDI_DS_RxMetaInfoType*)(pRxMeta))->snr)
-
-/* WDA_IS_RX_FC **************************************************************/
-// Flow control frames
-/* FIXME WDA should provide the meta info which indicates FC frame
- In the meantime, use hardcoded FALSE, since we don't support FC yet */
-# define WDA_IS_RX_FC(pRxMeta) (((WDI_DS_RxMetaInfoType*)(pRxMeta))->fc)
-
-/* WDA_GET_RX_FC_VALID_STA_MASK **********************************************/
-# define WDA_GET_RX_FC_VALID_STA_MASK(pRxMeta) \
- (((WDI_DS_RxMetaInfoType*)(pRxMeta))->fcSTAValidMask)
-
-/* WDA_GET_RX_FC_PWRSAVE_STA_MASK ********************************************/
-# define WDA_GET_RX_FC_PWRSAVE_STA_MASK(pRxMeta) \
- (((WDI_DS_RxMetaInfoType*)(pRxMeta))->fcSTAPwrSaveStateMask)
-
-/* WDA_GET_RX_FC_STA_THRD_IND_MASK ********************************************/
-# define WDA_GET_RX_FC_STA_THRD_IND_MASK(pRxMeta) \
- (((WDI_DS_RxMetaInfoType*)(pRxMeta))->fcSTAThreshIndMask)
-
-/* WDA_GET_RX_FC_FORCED_STA_TX_DISABLED_BITMAP ********************************************/
-# define WDA_GET_RX_FC_STA_TX_DISABLED_BITMAP(pRxMeta) \
- (((WDI_DS_RxMetaInfoType*)(pRxMeta))->fcStaTxDisabledBitmap)
-
-/* WDA_GET_RX_FC_STA_TXQ_LEN *************************************************/
-# define WDA_GET_RX_FC_STA_TXQ_LEN(pRxMeta, staId) \
- (((WDI_DS_RxMetaInfoType*)(pRxMeta))->fcSTATxQLen[(staId)])
-
-/* WDA_GET_RX_FC_STA_CUR_TXRATE **********************************************/
-# define WDA_GET_RX_FC_STA_CUR_TXRATE(pRxMeta, staId) \
- (((WDI_DS_RxMetaInfoType*)(pRxMeta))->fcSTACurTxRate[(staId)])
-
-/* WDA_GET_RX_REPLAY_COUNT ***************************************************/
-# define WDA_GET_RX_REPLAY_COUNT(pRxMeta) \
- (((WDI_DS_RxMetaInfoType*)(pRxMeta))->replayCount)
-
-/* WDA_GETRSSI0 ***************************************************************/
-# define WDA_GETRSSI0(pRxMeta) (((WDI_DS_RxMetaInfoType*)(pRxMeta))->rssi0)
-
-/* WDA_GETRSSI1 ***************************************************************/
-# define WDA_GETRSSI1(pRxMeta) (((WDI_DS_RxMetaInfoType*)(pRxMeta))->rssi1)
-
-/* WDA_GET_RX_RMF *****************************************************/
-#ifdef WLAN_FEATURE_11W
-# define WDA_GET_RX_RMF(pRxMeta) (((WDI_DS_RxMetaInfoType*)(pRxMeta))->rmf)
-#endif
-
-/* --------------------------------------------------------------------*/
-
-uint8 WDA_IsWcnssWlanCompiledVersionGreaterThanOrEqual(uint8 major, uint8 minor, uint8 version, uint8 revision);
-uint8 WDA_IsWcnssWlanReportedVersionGreaterThanOrEqual(uint8 major, uint8 minor, uint8 version, uint8 revision);
-
-
-VOS_STATUS WDA_GetWcnssWlanCompiledVersion(v_PVOID_t pvosGCtx,
- tSirVersionType *pVersion);
-VOS_STATUS WDA_GetWcnssWlanReportedVersion(v_PVOID_t pvosGCtx,
- tSirVersionType *pVersion);
-VOS_STATUS WDA_GetWcnssSoftwareVersion(v_PVOID_t pvosGCtx,
- tANI_U8 *pVersion,
- tANI_U32 versionBufferSize);
-VOS_STATUS WDA_GetWcnssHardwareVersion(v_PVOID_t pvosGCtx,
- tANI_U8 *pVersion,
- tANI_U32 versionBufferSize);
-
-VOS_STATUS WDA_SetUapsdAcParamsReq(v_PVOID_t , v_U8_t , tUapsdInfo *);
-VOS_STATUS WDA_ClearUapsdAcParamsReq(v_PVOID_t , v_U8_t , wpt_uint8 );
-VOS_STATUS WDA_SetRSSIThresholdsReq(tpAniSirGlobal , tSirRSSIThresholds *);
-// Just declare the function extern here and save some time.
-extern tSirRetStatus halMmhForwardMBmsg(void*, tSirMbMsg*);
-#endif /* #ifdef QCA_WIFI_2_0 */
tSirRetStatus uMacPostCtrlMsg(void* pSirGlobal, tSirMbMsg* pMb);
@@ -940,13 +535,8 @@ tSirRetStatus uMacPostCtrlMsg(void* pSirGlobal, tSirMbMsg* pMb);
# define WDA_MAX_OF_TWO(val1, val2) ( ((val1) > (val2)) ? (val1) : (val2))
# define WDA_GET_RSSI_DB(rssi0) \
WDA_MAX_OF_TWO(WDA_GET_RSSI0_DB(rssi0), WDA_GET_RSSI1_DB(rssi0))
-#ifdef QCA_WIFI_2_0
#define WDA_GET_RX_RSSI_DB(pRxMeta) \
(((t_packetmeta *)pRxMeta)->rssi)
-#else
-# define WDA_GET_RX_RSSI_DB(pRxMeta) \
- WDA_GET_RSSI_DB((((WDI_DS_RxMetaInfoType*)(pRxMeta))->rssi0))
-#endif
//WDA Messages to HAL messages Mapping
#if 0
@@ -1259,9 +849,7 @@ tSirRetStatus uMacPostCtrlMsg(void* pSirGlobal, tSirMbMsg* pMb);
#define WDA_DHCP_START_IND SIR_HAL_DHCP_START_IND
#define WDA_DHCP_STOP_IND SIR_HAL_DHCP_STOP_IND
-#ifdef QCA_WIFI_2_0
#define WDA_HIDDEN_SSID_VDEV_RESTART SIR_HAL_HIDE_SSID_VDEV_RESTART
-#endif /* QCA_WIFI_2_0 */
#ifdef WLAN_FEATURE_GTK_OFFLOAD
#define WDA_GTK_OFFLOAD_REQ SIR_HAL_GTK_OFFLOAD_REQ
@@ -1294,10 +882,8 @@ tSirRetStatus uMacPostCtrlMsg(void* pSirGlobal, tSirMbMsg* pMb);
#define WDA_RX_SCAN_EVENT SIR_HAL_RX_SCAN_EVENT
#define WDA_IBSS_PEER_INACTIVITY_IND SIR_HAL_IBSS_PEER_INACTIVITY_IND
-#ifdef QCA_WIFI_2_0
#define WDA_CLI_SET_CMD SIR_HAL_CLI_SET_CMD
#define WDA_CLI_GET_CMD SIR_HAL_CLI_GET_CMD
-#endif
#ifdef FEATURE_WLAN_SCAN_PNO
#define WDA_SME_SCAN_CACHE_UPDATED SIR_HAL_SME_SCAN_CACHE_UPDATED
#endif
@@ -1335,7 +921,6 @@ tSirRetStatus uMacPostCtrlMsg(void* pSirGlobal, tSirMbMsg* pMb);
#define WDA_TRIGGER_BATCH_SCAN_RESULT_IND SIR_HAL_TRIGGER_BATCH_SCAN_RESULT_IND
#endif
-#ifdef QCA_WIFI_2_0
#ifdef FEATURE_WLAN_TDLS
#define WDA_UPDATE_FW_TDLS_STATE SIR_HAL_UPDATE_FW_TDLS_STATE
#define WDA_UPDATE_TDLS_PEER_STATE SIR_HAL_UPDATE_TDLS_PEER_STATE
@@ -1343,7 +928,6 @@ tSirRetStatus uMacPostCtrlMsg(void* pSirGlobal, tSirMbMsg* pMb);
#define WDA_TDLS_SHOULD_TEARDOWN SIR_HAL_TDLS_SHOULD_TEARDOWN
#define WDA_TDLS_PEER_DISCONNECTED SIR_HAL_TDLS_PEER_DISCONNECTED
#endif
-#endif
#define WDA_SET_SAP_INTRABSS_DIS SIR_HAL_SET_SAP_INTRABSS_DIS
/* Message to Indicate Radar Presence on SAP Channel */
@@ -1429,7 +1013,6 @@ tSirRetStatus wdaPostCtrlMsg(tpAniSirGlobal pMac, tSirMsgQ *pMsg);
(sessionid),\
(tdlsflag)) )
-#ifdef QCA_WIFI_2_0
#define WDA_SetRegDomain WMA_SetRegDomain
#define WDA_SetHTConfig wma_set_htconfig
@@ -1454,55 +1037,6 @@ static inline void WDA_UpdateLinkCapacity(v_PVOID_t pvosGCtx, v_U8_t staId,
}
-#else
-
-eHalStatus WDA_SetRegDomain(void * clientCtxt, v_REGDOMAIN_t regId,
- tAniBool sendRegHint);
-
-static inline int WDA_SetHTConfig(tANI_U8 sessionId, tANI_U16 htCapab,
- int value)
-{
- return 0;
-}
-
-static inline VOS_STATUS WDA_SetIdlePsConfig(void *wda_handle, tANI_U32 idle_ps)
-{
- return VOS_STATUS_SUCCESS;
-}
-
-static inline VOS_STATUS WDA_notify_modem_power_state(void *wda_handle, tANI_U32 value)
-{
- return VOS_STATUS_SUCCESS;
-}
-/* -----------------------------------------------------------------
- WDA data path API's for TL
- -------------------------------------------------------------------*/
-
-v_BOOL_t WDA_IsHwFrameTxTranslationCapable(v_PVOID_t pVosGCtx,
- tANI_U8 staIdx);
-
-# define WDA_EnableUapsdAcParams(vosGCtx, staId, uapsdInfo) \
- WDA_SetUapsdAcParamsReq(vosGCtx, staId, uapsdInfo)
-
-# define WDA_DisableUapsdAcParams(vosGCtx, staId, ac) \
- WDA_ClearUapsdAcParamsReq(vosGCtx, staId, ac)
-
-# define WDA_SetRSSIThresholds(pMac, pThresholds) \
- WDA_SetRSSIThresholdsReq(pMac, pThresholds)
-
-#define WDA_UpdateRssiBmps(pvosGCtx, staId, rssi) \
- WLANTL_UpdateRssiBmps(pvosGCtx, staId, rssi)
-
-#define WDA_UpdateSnrBmps(pvosGCtx, staId, rssi) \
- WLANTL_UpdateSnrBmps(pvosGCtx, staId, snr)
-
-#define WDA_GetSnr(staId, snr) \
- WLANTL_GetSnr(staId, snr)
-
-#define WDA_UpdateLinkCapacity(pvosGCtx, staId, linkCapacity) \
- WLANTL_UpdateLinkCapacity(pvosGCtx, staId, linkCapacity)
-
-#endif /* #ifdef QCA_WIFI_2_0 */
/*==========================================================================
FUNCTION WDA_DS_PeekRxPacketInfo
@@ -1539,7 +1073,6 @@ WDA_DS_PeekRxPacketInfo
v_BOOL_t bSwap
);
-#ifdef QCA_WIFI_2_0
#define WDA_HALDumpCmdReq WMA_HALDumpCmdReq
@@ -1558,710 +1091,6 @@ WDA_DS_PeekRxPacketInfo
#define WDA_SetEnableSSR(enable_ssr) (void)enable_ssr
void WDA_TxAbort(v_U8_t vdev_id);
-#else /* #ifdef QCA_WIFI_2_0 */
-
-#ifdef WLAN_PERF
-/*==========================================================================
- FUNCTION WDA_TLI_FastHwFwdDataFrame
-
- DESCRIPTION
- For NON integrated SOC, this function is called by TL.
-
- Fast path function to quickly forward a data frame if HAL determines BD
- signature computed here matches the signature inside current VOSS packet.
- If there is a match, HAL and TL fills in the swapped packet length into
- BD header and DxE header, respectively. Otherwise, packet goes back to
- normal (slow) path and a new BD signature would be tagged into BD in this
- VOSS packet later by the WLANHAL_FillTxBd() function.
-
- TODO For integrated SOC, this function does nothing yet. Pima SLM/HAL
- should provide the equivelant functionality.
-
- DEPENDENCIES
-
- PARAMETERS
-
- IN
- pvosGCtx VOS context
- vosDataBuff Ptr to VOSS packet
- pMetaInfo For getting frame's TID
- pStaInfo For checking STA type
-
- OUT
- pvosStatus returned status
- puFastFwdOK Flag to indicate whether frame could be fast forwarded
-
- RETURN VALUE
- No return.
-
- SIDE EFFECTS
-
-============================================================================*/
-void WDA_TLI_FastHwFwdDataFrame
-(
- v_PVOID_t pvosGCtx,
- vos_pkt_t* vosDataBuff,
- VOS_STATUS* pvosStatus,
- v_U32_t* puFastFwdOK,
- WLANTL_MetaInfoType* pMetaInfo,
- WLAN_STADescType* pStaInfo
-);
-#endif /* WLAN_PERF */
-
-/*==========================================================================
- FUNCTION WDA_DS_Register
-
- DESCRIPTION
- Register TL client to WDA. This function registers TL RX/TX functions
- to WDI by calling WDI_DS_Register.
-
-
- For NON integrated SOC, this function calls WLANBAL_RegTlCbFunctions
- to register TL's RX/TX functions to BAL
-
- TODO
- For Prima, pfnResourceCB gets called in WDTS_OOResourceNotification.
- The uCount parameter is AC mask. It should be redefined to use the
- same resource callback function.
-
- DEPENDENCIES
-
- PARAMETERS
-
- IN
- pvosGCtx VOS context
- pfnTxCompleteCallback TX complete callback upon TX completion
- pfnRxPacketCallback RX callback
- pfnResourceCB gets called when updating TX PDU number
- uResTheshold minimum TX PDU size for a packet
- pCallbackContext WDI calls callback function with it
- VOS global context pointer
- OUT
- uAvailableTxBuf available TX PDU numbder.
- BAL returns it for NON integrated SOC
-
- RETURN VALUE
- VOS_STATUS_E_FAULT: pointer is NULL and other errors
- VOS_STATUS_SUCCESS: Everything is good :)
-
- SIDE EFFECTS
-
-============================================================================*/
-VOS_STATUS
-WDA_DS_Register
-(
- v_PVOID_t pvosGCtx,
- WDA_DS_TxCompleteCallback pfnTxCompleteCallback,
- WDA_DS_RxPacketCallback pfnRxPacketCallback,
- WDA_DS_TxPacketCallback pfnTxPacketCallback,
- WDA_DS_ResourceCB pfnResourceCB,
- v_U32_t uResTheshold,
- v_PVOID_t pCallbackContext,
- v_U32_t *uAvailableTxBuf
-);
-
-/*==========================================================================
- FUNCTION WDA_DS_StartXmit
-
- DESCRIPTION
- Serialize TX transmit reques to TX thread.
-
- TODO This sends TX transmit request to TL. It should send to WDI for
- abstraction.
-
- For NON integrated SOC, this function calls WLANBAL_StartXmit
-
- DEPENDENCIES
-
- PARAMETERS
-
- IN
- pvosGCtx VOS context
-
- RETURN VALUE
- VOS_STATUS_E_FAULT: pointer is NULL and other errors
- VOS_STATUS_SUCCESS: Everything is good :)
-
- SIDE EFFECTS
-
-============================================================================*/
-VOS_STATUS
-WDA_DS_StartXmit
-(
- v_PVOID_t pvosGCtx
-);
-
-/*==========================================================================
- FUNCTION WDA_DS_FinishULA
-
- DESCRIPTION
- Serialize Finish Upper Level Authentication reques to TX thread.
-
- DEPENDENCIES
-
- PARAMETERS
-
- IN
- callbackRoutine routine to be called in TX thread
- callbackContext user data for the above routine
-
- RETURN VALUE
- please see vos_tx_mq_serialize
-
- SIDE EFFECTS
-
-============================================================================*/
-VOS_STATUS
-WDA_DS_FinishULA
-(
- void (*callbackRoutine) (void *callbackContext),
- void *callbackContext
-);
-
-/*==========================================================================
- FUNCTION WDA_DS_BuildTxPacketInfo
-
- DESCRIPTION
- Build TX meta info for integrated SOC.
-
- Same function calls HAL for reserve BD header space into VOS packet and
- HAL function to fill it.
-
- DEPENDENCIES
-
- PARAMETERS
-
- IN
- pvosGCtx VOS context
- vosDataBuff vos data buffer
- pvDestMacAddr destination MAC address ponter
- ucDisableFrmXtl Is frame xtl disabled?
- ucQosEnabled Is QoS enabled?
- ucWDSEnabled Is WDS enabled?
- extraHeadSpace Extra head bytes. If it's not 0 due to 4 bytes align
- of BD header.
- typeSubtype typeSubtype from MAC header or TX metainfo/BD
- pAddr2 address 2
- uTid tid
- txFlag
- timeStamp
- ucIsEapol
- ucUP
-
- OUT
- *pusPktLen Packet length
-
- RETURN VALUE
- VOS_STATUS_E_FAULT: pointer is NULL and other errors
- VOS_STATUS_SUCCESS: Everything is good :)
-
- SIDE EFFECTS
-
-============================================================================*/
-VOS_STATUS
-WDA_DS_BuildTxPacketInfo
-(
- v_PVOID_t pvosGCtx,
- vos_pkt_t* vosDataBuff,
- v_MACADDR_t* pvDestMacAddr,
- v_U8_t ucDisableFrmXtl,
- v_U16_t* pusPktLen,
- v_U8_t ucQosEnabled,
- v_U8_t ucWDSEnabled,
- v_U8_t extraHeadSpace,
- v_U8_t typeSubtype,
- v_PVOID_t pAddr2,
- v_U8_t uTid,
- v_U8_t txFlag,
- v_U32_t timeStamp,
- v_U8_t ucIsEapol,
- v_U8_t ucUP
-);
-
-/*==========================================================================
- FUNCTION WDA_DS_TrimRxPacketInfo
-
- DESCRIPTION
- Trim/Remove RX BD header for NON integrated SOC.
- It does nothing for integrated SOC.
-
- DEPENDENCIES
-
- PARAMETERS
-
- IN
- vosDataBuff vos data buffer
-
- RETURN VALUE
- VOS_STATUS_E_FAULT: pointer is NULL and other errors
- VOS_STATUS_SUCCESS: Everything is good :)
-
- SIDE EFFECTS
-
-============================================================================*/
-VOS_STATUS
-WDA_DS_TrimRxPacketInfo
-(
- vos_pkt_t *vosDataBuff
-);
-
-/*==========================================================================
- FUNCTION WDA_DS_GetTxResources
-
- DESCRIPTION
- It does return hardcoded value for Prima. It should bigger number than 0.
- Returning 0 will put TL in out-of-resource condition for TX.
-
- Return current PDU resources from BAL for NON integrated SOC.
-
- DEPENDENCIES
-
- PARAMETERS
-
- IN
- vosDataBuff vos data buffer
-
- OUT
- puResCount available PDU number for TX
-
- RETURN VALUE
- VOS_STATUS_E_FAULT: pointer is NULL and other errors
- VOS_STATUS_SUCCESS: Everything is good :)
-
- SIDE EFFECTS
-
-============================================================================*/
-VOS_STATUS
-WDA_DS_GetTxResources
-(
- v_PVOID_t pvosGCtx,
- v_U32_t* puResCount
-);
-
-/*==========================================================================
- FUNCTION WDA_DS_GetRssi
-
- DESCRIPTION
- Get RSSI
-
- TODO It returns hardcoded value in the meantime since WDA/WDI does nothing
- support it yet for Prima.
-
- DEPENDENCIES
-
- PARAMETERS
-
- IN
- vosDataBuff vos data buffer
-
- OUT
- puRssi RSSI
-
- RETURN VALUE
- VOS_STATUS_E_FAULT: pointer is NULL and other errors
- VOS_STATUS_SUCCESS: Everything is good :)
-
- SIDE EFFECTS
-
-============================================================================*/
-VOS_STATUS
-WDA_DS_GetRssi
-(
- v_PVOID_t pvosGCtx,
- v_S7_t* puRssi
-);
-
-/*==========================================================================
- FUNCTION WDA_DS_RxAmsduBdFix
-
- DESCRIPTION
- For backward compatability with Libra/Volans. Need to call HAL function
- for HW BD bug fix
-
- It does nothing for integrated SOC.
-
- DEPENDENCIES
-
- PARAMETERS
-
- IN
- pvosGCtx VOS context
- pvBDHeader BD header pointer
-
- OUT
-
- RETURN VALUE
- VOS_STATUS_E_FAULT: pointer is NULL and other errors
- VOS_STATUS_SUCCESS: Everything is good :)
-
- SIDE EFFECTS
-
-============================================================================*/
-VOS_STATUS
-WDA_DS_RxAmsduBdFix
-(
- v_PVOID_t pvosGCtx,
- v_PVOID_t pvBDHeader
-);
-
-/*==========================================================================
- FUNCTION WDA_DS_GetFrameTypeSubType
-
- DESCRIPTION
- Get typeSubtype from the packet. The BD header should have this.
- But some reason, Libra/Volans read it from 802.11 header and save it
- back to BD header. So for NON integrated SOC, this function does
- the same.
-
- For integrated SOC, WDI does the same, not TL.
- It does return typeSubtype from RX meta info for integrated SOC.
-
- DEPENDENCIES
-
- PARAMETERS
-
- IN
- pvosGCtx VOS context
- vosDataBuff vos data buffer
- pRxHeader RX meta info or BD header pointer
-
- OUT
- ucTypeSubtype typeSubtype
-
- RETURN VALUE
- VOS_STATUS_E_FAULT: pointer is NULL and other errors
- VOS_STATUS_SUCCESS: Everything is good :)
-
- SIDE EFFECTS
-
-============================================================================*/
-VOS_STATUS
-WDA_DS_GetFrameTypeSubType
-(
- v_PVOID_t pvosGCtx,
- vos_pkt_t *vosDataBuff,
- v_PVOID_t pRxHeader,
- v_U8_t *ucTypeSubtype
-);
-
-/*==========================================================================
- FUNCTION WDA_DS_GetReplayCounter
-
- DESCRIPTION
- Return replay counter from BD header or RX meta info
-
- DEPENDENCIES
-
- PARAMETERS
-
- IN
- pRxHeader RX meta info or BD header pointer
-
- OUT
-
- RETURN VALUE
- Replay Counter
-
- SIDE EFFECTS
-
-============================================================================*/
-v_U64_t
-WDA_DS_GetReplayCounter
-(
- v_PVOID_t pRxHeader
-);
-
-/*==========================================================================
- FUNCTION WDA_DS_GetReplayCounter
-
- DESCRIPTION
- HO support. Set RSSI threshold via HAL function for NON integrated SOC
-
- TODO
- Same function should be provided by WDA/WDI for Prima.
-
- DEPENDENCIES
-
- PARAMETERS
-
- IN
- pMac MAC global pointer
- pThresholds pointer of threshold structure to set.
-
- OUT
-
- RETURN VALUE
- VOS_STATUS_E_FAULT: pointer is NULL and other errors
- VOS_STATUS_SUCCESS: Everything is good :)
-
- SIDE EFFECTS
-
-============================================================================*/
-VOS_STATUS
-WDA_DS_SetRSSIThresholds
-(
- tpAniSirGlobal pMac,
- tpSirRSSIThresholds pThresholds
-);
-
-/*==========================================================================
- FUNCTION WDA_DS_TxFrames
-
- DESCRIPTION
- Pull packets from TL and push them to WDI. It gets invoked upon
- WDA_DS_TX_START_XMIT.
-
- This function is equivelant of WLANSSC_Transmit in Libra/Volans.
-
- TODO
- This function should be implemented and moved in WDI.
-
- DEPENDENCIES
-
- PARAMETERS
-
- IN
- pvosGCtx VOS context
-
- OUT
-
- RETURN VALUE
- VOS_STATUS_E_FAULT: pointer is NULL and other errors
- VOS_STATUS_SUCCESS: Everything is good :)
-
- SIDE EFFECTS
-
-============================================================================*/
-VOS_STATUS
-WDA_DS_TxFrames
-(
- v_PVOID_t pvosGCtx
-);
-
-/*==========================================================================
- FUNCTION WDA_DS_TxFlowControlCallback
-
- DESCRIPTION
- Invoked by WDI to control TX flow.
-
- DEPENDENCIES
-
- PARAMETERS
-
- IN
- pvosGCtx VOS context
- uFlowMask TX channel mask for flow control
- Defined in WDA_TXFlowEnumType
-
- OUT
-
- RETURN VALUE
-
- SIDE EFFECTS
-
-============================================================================*/
-v_VOID_t
-WDA_DS_TxFlowControlCallback
-(
- v_PVOID_t pvosGCtx,
- v_U8_t uFlowMask
-);
-
-/*==========================================================================
- FUNCTION WDA_DS_GetTxFlowMask
-
- DESCRIPTION
- return TX flow mask control value
-
- DEPENDENCIES
-
- PARAMETERS
-
- IN
- pvosGCtx VOS context
-
- OUT
- uFlowMask TX channel mask for flow control
- Defined in WDA_TXFlowEnumType
-
- RETURN VALUE
- VOS_STATUS_E_INVAL: pointer is NULL and other errors
- VOS_STATUS_SUCCESS: Everything is good :)
-
- SIDE EFFECTS
-
-============================================================================*/
-VOS_STATUS
-WDA_DS_GetTxFlowMask
-(
- v_PVOID_t pvosGCtx,
- v_U8_t* puFlowMask
-);
-
-/*==========================================================================
- FUNCTION WDA_HALDumpCmdReq
-
- DESCRIPTION
- Send Dump commandsto WDI
-
- DEPENDENCIES
-
- PARAMETERS
-
- IN
- pMac MAC global pointer
- cmd Hal dump command
- arg1 Dump command argument 1
- arg2 Dump command argument 2
- arg3 Dump command argument 3
- arg4 Dump command argument 4
-
- OUT
- pBuffer Dump command Response buffer
-
- RETURN VALUE
- VOS_STATUS_E_FAULT: pointer is NULL and other errors
- VOS_STATUS_SUCCESS: Everything is good :)
-
- SIDE EFFECTS
-
-============================================================================*/
-VOS_STATUS WDA_HALDumpCmdReq(tpAniSirGlobal pMac,tANI_U32 cmd,
- tANI_U32 arg1, tANI_U32 arg2, tANI_U32 arg3,
- tANI_U32 arg4, tANI_U8 *pBuffer);
-
-/*==========================================================================
- FUNCTION WDA_featureCapsExchange
-
- DESCRIPTION
- WDA API to invoke capability exchange between host and FW
-
- DEPENDENCIES
-
- PARAMETERS
-
- IN
- pVosContext VOS context
-
- OUT
- NONE
-
- RETURN VALUE
- NONE
-
- SIDE EFFECTS
-============================================================================*/
-void WDA_featureCapsExchange(v_PVOID_t pVosContext);
-
-void WDA_disableCapablityFeature(tANI_U8 feature_index);
-/*==========================================================================
- FUNCTION WDA_getHostWlanFeatCaps
-
- DESCRIPTION
- Wrapper for WDI API, that will return if the feature (enum value).passed
- to this API is supported or not in Host
-
- DEPENDENCIES
-
- PARAMETERS
-
- IN
- featEnumValue enum value for the feature as in placeHolderInCapBitmap in wlan_hal_msg.h.
-
- OUT
- NONE
-
- RETURN VALUE
- 0 - implies feature is NOT Supported
- any non zero value - implies feature is SUPPORTED
-
- SIDE EFFECTS
-============================================================================*/
-tANI_U8 WDA_getHostWlanFeatCaps(tANI_U8 featEnumValue);
-
-/*==========================================================================
- FUNCTION WDA_getFwWlanFeatCaps
-
- DESCRIPTION
- Wrapper for WDI API, that will return if the feature (enum value).passed
- to this API is supported or not in FW
-
- DEPENDENCIES
-
- PARAMETERS
-
- IN
- featEnumValue enum value for the feature as in placeHolderInCapBitmap in wlan_hal_msg.h.
-
- OUT
- NONE
-
- RETURN VALUE
- 0 - implies feature is NOT Supported
- any non zero value - implies feature is SUPPORTED
-
- SIDE EFFECTS
-============================================================================*/
-tANI_U8 WDA_getFwWlanFeatCaps(tANI_U8 featEnumValue);
-
-/*==========================================================================
- FUNCTION WDA_TransportChannelDebug
-
- DESCRIPTION
- Display Transport Channel debugging information
- User may request to display DXE channel snapshot
- Or if host driver detects any abnormal stcuk may display
-
- PARAMETERS
- pMac : upper MAC context pointer
- displaySnapshot : Display DXE snapshot option
- enableStallDetect : Enable stall detect feature
- This feature will take effect to data performance
- Not integrate till fully verification
-
- RETURN VALUE
- NONE
-
-===========================================================================*/
-void WDA_TransportChannelDebug
-(
- tpAniSirGlobal pMac,
- v_BOOL_t displaySnapshot,
- v_BOOL_t toggleStallDetect
-);
-
-/*==========================================================================
- FUNCTION WDA_TrafficStatsTimerActivate
-
- DESCRIPTION
- API to activate/deactivate Traffic Stats timer. Traffic stats timer is only needed during MCC
- PARAMETERS
- activate : Activate or not
-
- RETURN VALUE
- NONE
-
-===========================================================================*/
-void WDA_TrafficStatsTimerActivate(wpt_boolean activate);
-
-/*==========================================================================
- FUNCTION WDA_SetEnableSSR
-
- DESCRIPTION
- API to enable/disable SSR on WDI timeout
-
- PARAMETERS
- enableSSR : enable/disable SSR
-
- RETURN VALUE
- NONE
-
-===========================================================================*/
-void WDA_SetEnableSSR(v_BOOL_t enableSSR);
-static inline void WDA_TxAbort(v_U8_t vdev_id)
-{
-}
-#endif /* #ifdef QCA_WIFI_2_0 */
/* Powersave Offload Changes */
typedef struct sUapsd_Params
diff --git a/CORE/WDI/DP/src/wlan_qct_wdi_bd.c b/CORE/WDI/DP/src/wlan_qct_wdi_bd.c
deleted file mode 100644
index 914cc40bffda..000000000000
--- a/CORE/WDI/DP/src/wlan_qct_wdi_bd.c
+++ /dev/null
@@ -1,390 +0,0 @@
-/*
- * 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.
- */
-
-/**=========================================================================
- *
- * \file wlan_qct_dti_bd.c
- *
- * \brief Datapath utilities file.
- *
- * WLAN Device Abstraction layer External API for Dataservice
- * DESCRIPTION
- * This file contains the external API implemntation exposed by the
- * wlan device abstarction layer module.
- *
- */
-
-#include "wlan_qct_wdi.h"
-#include "wlan_qct_wdi_ds.h"
-#include "wlan_qct_wdi_ds_i.h"
-#include "wlan_qct_wdi_dts.h"
-#include "wlan_qct_wdi_dp.h"
-#include "wlan_qct_pal_type.h"
-#include "wlan_qct_pal_status.h"
-#include "wlan_qct_pal_api.h"
-#include "wlan_qct_pal_packet.h"
-
-
-
-/*==========================================================================
- *
- FUNCTION WDI_DS_PrepareBDHeader
-
- DESCRIPTION
- function for preparing BD header before HAL processing.
-
- PARAMETERS
-
- IN
-palPacket: PAL packet pointer
-
-
-RETURN VALUE
-No return.
-
-SIDE EFFECTS
-
-============================================================================*/
-void
-WDI_DS_PrepareBDHeader (wpt_packet* palPacket,
- wpt_uint8 ucDisableHWFrmXtl, wpt_uint8 alignment)
-{
- void* pvBDHeader;
- wpt_uint8 ucHeaderOffset;
- wpt_uint8 ucHeaderLen;
- wpt_uint8 ucQosEnabled;
- wpt_uint8 ucWDSEnabled;
- wpt_uint32 ucMpduLen;
- wpt_uint32 ucPktLen;
- WDI_DS_TxMetaInfoType *pTxMetadata;
-
-
- /* Extract reuqired information from Metadata */
- pvBDHeader = WPAL_PACKET_GET_BD_POINTER(palPacket);
- pTxMetadata = WDI_DS_ExtractTxMetaData(palPacket);
- ucQosEnabled = pTxMetadata->qosEnabled;
- ucWDSEnabled = pTxMetadata->fenableWDS;
-
- WPAL_PACKET_SET_BD_LENGTH(palPacket, WDI_TX_BD_HEADER_SIZE);
-
- /*---------------------------------------------------------------------
- Fill MPDU info fields:
- - MPDU data start offset
- - MPDU header start offset
- - MPDU header length
- - MPDU length - this is a 16b field - needs swapping
- --------------------------------------------------------------------*/
-
- if ( ucDisableHWFrmXtl ) {
- ucHeaderOffset = WDI_TX_BD_HEADER_SIZE;
- ucHeaderLen = WDI_802_11_HEADER_LEN;
- if ( 0 != ucQosEnabled ) {
- ucHeaderLen += WDI_802_11_HEADER_QOS_CTL;
- }
- if ( 0 != ucWDSEnabled) {
- ucHeaderLen += WDI_802_11_HEADER_ADDR4_LEN;
- }
- } else {
- ucHeaderOffset = WDI_TX_BD_HEADER_SIZE+WDI_802_11_MAX_HEADER_LEN;
- ucHeaderLen = WDI_802_3_HEADER_LEN;
- }
-
- WDI_TX_BD_SET_MPDU_HEADER_LEN( pvBDHeader, ucHeaderLen);
- WDI_TX_BD_SET_MPDU_HEADER_OFFSET( pvBDHeader, ucHeaderOffset);
- WDI_TX_BD_SET_MPDU_DATA_OFFSET( pvBDHeader,
- ucHeaderOffset + ucHeaderLen + alignment);
-
- // pkt length from PAL API. Need to change in case of HW FT used
- ucPktLen = wpalPacketGetLength( palPacket ); // This includes BD length
- /** This is the length (in number of bytes) of the entire MPDU
- (header and data). Note that the length INCLUDES FCS field. */
- ucMpduLen = ucPktLen - WPAL_PACKET_GET_BD_LENGTH( palPacket );
- WDI_TX_BD_SET_MPDU_LEN( pvBDHeader, ucMpduLen );
-
- DTI_TRACE( DTI_TRACE_LEVEL_INFO,
- "WLAN DTI: VALUES ARE HLen=%x Hoff=%x doff=%x len=%x ex=%d",
- ucHeaderLen, ucHeaderOffset,
- (ucHeaderOffset + ucHeaderLen + alignment),
- pTxMetadata->fPktlen, alignment);
-
-}/* WDI_DS_PrepareBDHeader */
-
-/*==========================================================================
- *
- FUNCTIONS WDI_DS_MemPoolXXX
-
- DESCRIPTION
- APIs for managing the BD header memory pool
- PARAMETERS
-
- IN
-WDI_DS_BdMemPoolType: Memory pool pointer
-
-
-
-============================================================================*/
-
-/*
- * Create a memory pool which is DMA capabale
- */
-WDI_Status WDI_DS_MemPoolCreate(WDI_DS_BdMemPoolType *memPool, wpt_uint8 chunkSize,
- wpt_uint8 numChunks)
-{
- wpt_uint8 staLoop;
-
- //Allocate all the max size and align them to a double word boundary. The first 8 bytes are control bytes.
- memPool->numChunks = 0;
- memPool->chunkSize = chunkSize + 16 - (chunkSize%8);
- memPool->pVirtBaseAddress = wpalDmaMemoryAllocate((numChunks * memPool->chunkSize),
- &(memPool->pPhysBaseAddress));
-
- if( memPool->pVirtBaseAddress == 0)
- return WDI_STATUS_E_FAILURE;
-
- memPool->AllocationBitmap = (wpt_uint32*)wpalMemoryAllocate( (numChunks/32 + 1) * sizeof(wpt_uint32));
- if( NULL == memPool->AllocationBitmap)
- return WDI_STATUS_E_FAILURE;
- wpalMemoryZero(memPool->AllocationBitmap, (numChunks/32+1)*sizeof(wpt_uint32));
-
- //Initialize resource infor per STA
- for(staLoop = 0; staLoop < WDI_DS_MAX_STA_ID; staLoop++)
- {
- memPool->numChunkSTA[staLoop].STAIndex = 0xFF;
- memPool->numChunkSTA[staLoop].numChunkReservedBySTA = 0;
- memPool->numChunkSTA[staLoop].validIdx = 0;
- }
-
- return WDI_STATUS_SUCCESS;
-}
-
-/*
- * Destroy the memory pool
- */
-void WDI_DS_MemPoolDestroy(WDI_DS_BdMemPoolType *memPool)
-{
- //Allocate all the max size.
- wpalDmaMemoryFree(memPool->pVirtBaseAddress);
- wpalMemoryFree(memPool->AllocationBitmap);
- wpalMemoryZero(memPool, sizeof(*memPool));
-}
-/*
- * Allocate chunk memory
- */
-WPT_STATIC WPT_INLINE int find_leading_zero_and_setbit(wpt_uint32 *bitmap, wpt_uint32 maxNumPool)
-{
- wpt_uint32 i,j, word;
- int ret_val = -1;
-
- for(i=0; i < (maxNumPool/32 + 1); i++){
- j = 0;
- word = bitmap[i];
- for(j=0; j< 32; j++){
- if((word & 1) == 0) {
- bitmap[i] |= (1 << j);
- return((i<<5) + j);
- }
- word >>= 1;
- }
- }
- return ret_val;
-}
-
-void *WDI_DS_MemPoolAlloc(WDI_DS_BdMemPoolType *memPool, void **pPhysAddress,
- WDI_ResPoolType wdiResPool)
-{
- wpt_uint32 index;
- void *pVirtAddress;
- wpt_uint32 maxNumPool;
- switch(wdiResPool)
- {
- case WDI_MGMT_POOL_ID:
- maxNumPool = WDI_DS_HI_PRI_RES_NUM;
- break;
- case WDI_DATA_POOL_ID:
- maxNumPool = WDI_DS_LO_PRI_RES_NUM;
- break;
- default:
- return NULL;
- }
-
- if(maxNumPool == memPool->numChunks)
- {
- return NULL;
- }
- //Find the leading 0 in the allocation bitmap
-
- if((index = find_leading_zero_and_setbit(memPool->AllocationBitmap, maxNumPool)) == -EPERM)
- {
- //DbgBreakPoint();
- DTI_TRACE( DTI_TRACE_LEVEL_INFO, "WDI_DS_MemPoolAlloc: index:%d(NULL), numChunks:%d",
- index, memPool->numChunks );
- return NULL;
- }
- memPool->numChunks++;
- // The first 8 bytes are reserved for internal use for control bits and hash.
- pVirtAddress = (wpt_uint8 *)memPool->pVirtBaseAddress + (memPool->chunkSize * index) + 8;
- *pPhysAddress = (wpt_uint8 *)memPool->pPhysBaseAddress + (memPool->chunkSize * index) + 8;
-
- DTI_TRACE( DTI_TRACE_LEVEL_INFO, "WDI_DS_MemPoolAlloc: index:%d, numChunks:%d", index, memPool->numChunks );
-
- return pVirtAddress;
-
-}
-
-/*
- * Free chunk memory
- */
-void WDI_DS_MemPoolFree(WDI_DS_BdMemPoolType *memPool, void *pVirtAddress, void *pPhysAddress)
-{
- wpt_uint32 index =
- ((wpt_uint8 *)pVirtAddress - (wpt_uint8 *)memPool->pVirtBaseAddress - 8)/memPool->chunkSize;
- wpt_uint32 word = memPool->AllocationBitmap[index/32];
- word &= ~(1<<(index%32));
- memPool->AllocationBitmap[index/32] = word;
- memPool->numChunks--;
-
- //DbgPrint( "WDI_DS_MemPoolFree: index:%d, numChunks:%d", index, memPool->numChunks );
-}
-
-
-/**
- @brief Returns the available number of resources (BD headers)
- available for TX
-
- @param pMemPool: pointer to the BD memory pool
-
- @see
- @return Result of the function call
-*/
-wpt_uint32 WDI_DS_GetAvailableResCount(WDI_DS_BdMemPoolType *pMemPool)
-{
- return pMemPool->numChunks;
-}
-
-/**
- @brief WDI_DS_MemPoolAddSTA
- Add NEW STA into mempool
-
- @param pMemPool: pointer to the BD memory pool
- @param staId STA ID
-
- @see
- @return Result of the function call
-*/
-WDI_Status WDI_DS_MemPoolAddSTA(WDI_DS_BdMemPoolType *memPool, wpt_uint8 staIndex)
-{
- if(memPool->numChunkSTA[staIndex].STAIndex != 0xFF)
- {
- /* Already using this slot? Do nothing */
- return WDI_STATUS_SUCCESS;
- }
-
- memPool->numChunkSTA[staIndex].STAIndex = staIndex;
- memPool->numChunkSTA[staIndex].numChunkReservedBySTA = 0;
- memPool->numChunkSTA[staIndex].validIdx = 1;
- return WDI_STATUS_SUCCESS;
-}
-
-/**
- @brief WDI_DS_MemPoolAddSTA
- Remove STA from mempool
-
- @param pMemPool: pointer to the BD memory pool
- @param staId STA ID
-
- @see
- @return Result of the function call
-*/
-WDI_Status WDI_DS_MemPoolDelSTA(WDI_DS_BdMemPoolType *memPool, wpt_uint8 staIndex)
-{
- if(memPool->numChunkSTA[staIndex].STAIndex == 0xFF)
- {
- /* Empty this slot? error, bad argument */
- return WDI_STATUS_E_FAILURE;
- }
-
- memPool->numChunkSTA[staIndex].STAIndex = 0xFF;
- memPool->numChunkSTA[staIndex].numChunkReservedBySTA = 0;
- memPool->numChunkSTA[staIndex].validIdx = 0;
- return WDI_STATUS_SUCCESS;
-}
-
-/**
- @brief Returns the reserved number of resources (BD headers) per STA
- available for TX
-
- @param pMemPool: pointer to the BD memory pool
- @param staId STA ID
- @see
- @return Result of the function call
-*/
-wpt_uint32 WDI_DS_MemPoolGetRsvdResCountPerSTA(WDI_DS_BdMemPoolType *pMemPool, wpt_uint8 staId)
-{
- return pMemPool->numChunkSTA[staId].numChunkReservedBySTA;
-}
-
-/**
- @brief Increase reserved TX resource count by specific STA
-
- @param pMemPool: pointer to the BD memory pool
- @param staId STA ID
- @see
- @return Result of the function call
-*/
-void WDI_DS_MemPoolIncreaseReserveCount(WDI_DS_BdMemPoolType *memPool, wpt_uint8 staId)
-{
-
- if((memPool->numChunkSTA[staId].validIdx) && (staId < WDI_DS_MAX_STA_ID))
- {
- memPool->numChunkSTA[staId].numChunkReservedBySTA++;
- }
- return;
-}
-
-/**
- @brief Decrease reserved TX resource count by specific STA
-
- @param pMemPool: pointer to the BD memory pool
- @param staId STA ID
- @see
- @return Result of the function call
-*/
-void WDI_DS_MemPoolDecreaseReserveCount(WDI_DS_BdMemPoolType *memPool, wpt_uint8 staId)
-{
- if(0 == memPool->numChunkSTA[staId].numChunkReservedBySTA)
- {
- DTI_TRACE( DTI_TRACE_LEVEL_ERROR,
- "SAT %d reserved resource count cannot be smaller than 0", staId );
- return;
- }
-
- if((memPool->numChunkSTA[staId].validIdx) && (staId < WDI_DS_MAX_STA_ID))
- {
- memPool->numChunkSTA[staId].numChunkReservedBySTA--;
- }
- return;
-}
diff --git a/CORE/WDI/DP/src/wlan_qct_wdi_ds.c b/CORE/WDI/DP/src/wlan_qct_wdi_ds.c
deleted file mode 100644
index 9189ca23bfc5..000000000000
--- a/CORE/WDI/DP/src/wlan_qct_wdi_ds.c
+++ /dev/null
@@ -1,547 +0,0 @@
-/*
- * Copyright (c) 2013 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.
- */
-
-/**=========================================================================
- *
- * \file wlan_qct_wdi_ds.c
- *
- * \brief define Dataservice API
- *
- * WLAN Device Abstraction layer External API for Dataservice
- * DESCRIPTION
- * This file contains the external API implemntation exposed by the
- * wlan device abstarction layer module.
- *
- */
-
-
-#include "wlan_qct_wdi.h"
-#include "wlan_qct_wdi_i.h"
-#include "wlan_qct_wdi_ds.h"
-#include "wlan_qct_wdi_ds_i.h"
-#include "wlan_qct_wdi_dts.h"
-#include "wlan_qct_wdi_dp.h"
-#include "wlan_qct_wdi_sta.h"
-
-
-
-
-/* DAL registration function.
- * Parameters:
- * pContext:Cookie that should be passed back to the caller along
- * with the callback.
- * pfnTxCompleteCallback:Callback function that is to be invoked to return
- * packets which have been transmitted.
- * pfnRxPacketCallback:Callback function that is to be invoked to deliver
- * packets which have been received
- * pfnTxFlowControlCallback:Callback function that is to be invoked to
- * indicate/clear congestion.
- *
- * Return Value: SUCCESS Completed successfully.
- * FAILURE_XXX Request was rejected due XXX Reason.
- *
- */
-WDI_Status WDI_DS_Register( void *pContext,
- WDI_DS_TxCompleteCallback pfnTxCompleteCallback,
- WDI_DS_RxPacketCallback pfnRxPacketCallback,
- WDI_DS_TxFlowControlCallback pfnTxFlowControlCallback,
- void *pCallbackContext)
-{
- WDI_DS_ClientDataType *pClientData;
- wpt_uint8 bssLoop;
-
- // Do Sanity checks
- if (NULL == pContext ||
- NULL == pCallbackContext ||
- NULL == pfnTxCompleteCallback ||
- NULL == pfnRxPacketCallback ||
- NULL == pfnTxFlowControlCallback) {
- return WDI_STATUS_E_FAILURE;
- }
-
- pClientData = (WDI_DS_ClientDataType *)WDI_DS_GetDatapathContext(pContext);
- if (NULL == pClientData)
- {
- return WDI_STATUS_MEM_FAILURE;
- }
-
- // Store callbacks in client structure
- pClientData->pcontext = pContext;
- pClientData->receiveFrameCB = pfnRxPacketCallback;
- pClientData->txCompleteCB = pfnTxCompleteCallback;
- pClientData->txResourceCB = pfnTxFlowControlCallback;
- pClientData->pCallbackContext = pCallbackContext;
-
- for(bssLoop = 0; bssLoop < WDI_DS_MAX_SUPPORTED_BSS; bssLoop++)
- {
- pClientData->staIdxPerBssIdxTable[bssLoop].isUsed = 0;
- pClientData->staIdxPerBssIdxTable[bssLoop].bssIdx = WDI_DS_INDEX_INVALID;
- pClientData->staIdxPerBssIdxTable[bssLoop].staIdx = WDI_DS_INDEX_INVALID;
- }
- return WDI_STATUS_SUCCESS;
-}
-
-
-
-/* DAL Transmit function.
- * Parameters:
- * pContext:Cookie that should be passed back to the caller along with the callback.
- * pFrame:Refernce to PAL frame.
- * more: Does the invokee have more than one packet pending?
- * Return Value: SUCCESS Completed successfully.
- * FAILURE_XXX Request was rejected due XXX Reason.
- *
- */
-
-
-WDI_Status WDI_DS_TxPacket(void *pContext,
- wpt_packet *pFrame,
- wpt_boolean more)
-{
- WDI_DS_ClientDataType *pClientData;
- wpt_uint8 ucSwFrameTXXlation;
- wpt_uint8 ucUP;
- wpt_uint8 ucTypeSubtype;
- wpt_uint8 alignment;
- wpt_uint32 ucTxFlag;
- wpt_uint8 ucProtMgmtFrame;
- wpt_uint8* pSTAMACAddress;
- wpt_uint8* pAddr2MACAddress;
- WDI_DS_TxMetaInfoType *pTxMetadata;
- void *physBDHeader, *pvBDHeader;
- wpt_uint8 ucType;
- WDI_DS_BdMemPoolType *pMemPool;
- wpt_uint8 ucBdPoolType;
- wpt_uint8 staId;
- WDI_Status wdiStatus;
-
- // Do Sanity checks
- if (NULL == pContext)
- {
- return WDI_STATUS_E_FAILURE;
- }
-
- pClientData = (WDI_DS_ClientDataType *) WDI_DS_GetDatapathContext(pContext);
- if (NULL == pClientData || pClientData->suspend)
- {
- return WDI_STATUS_E_FAILURE;
- }
-
- // extract metadata from PAL packet
- pTxMetadata = WDI_DS_ExtractTxMetaData(pFrame);
- ucSwFrameTXXlation = pTxMetadata->fdisableFrmXlt;
- ucTypeSubtype = pTxMetadata->typeSubtype;
- ucUP = pTxMetadata->fUP;
- ucTxFlag = pTxMetadata->txFlags;
- ucProtMgmtFrame = pTxMetadata->fProtMgmtFrame;
- pSTAMACAddress = &(pTxMetadata->fSTAMACAddress[0]);
- pAddr2MACAddress = &(pTxMetadata->addr2MACAddress[0]);
-
- /*------------------------------------------------------------------------
- Get type and subtype of the frame first
- ------------------------------------------------------------------------*/
- ucType = (ucTypeSubtype & WDI_FRAME_TYPE_MASK) >> WDI_FRAME_TYPE_OFFSET;
- switch(ucType)
- {
- case WDI_MAC_DATA_FRAME:
-#ifdef FEATURE_WLAN_TDLS
- /* I utilizes TDLS mgmt frame always sent at BD_RATE2. (See limProcessTdls.c)
- Assumption here is data frame sent by WDA_TxPacket() <- HalTxFrame/HalTxFrameWithComplete()
- should take managment path. As of today, only TDLS feature has special data frame
- which needs to be treated as mgmt.
- */
- if((!pTxMetadata->isEapol) &&
- ((pTxMetadata->txFlags & WDI_USE_BD_RATE2_FOR_MANAGEMENT_FRAME) != WDI_USE_BD_RATE2_FOR_MANAGEMENT_FRAME))
-#else
- if(!pTxMetadata->isEapol)
-#endif
- {
- pMemPool = &(pClientData->dataMemPool);
- ucBdPoolType = WDI_DATA_POOL_ID;
- break;
- }
- // intentional fall-through to handle eapol packet as mgmt
- case WDI_MAC_MGMT_FRAME:
- pMemPool = &(pClientData->mgmtMemPool);
- ucBdPoolType = WDI_MGMT_POOL_ID;
- break;
- default:
- return WDI_STATUS_E_FAILURE;
- }
-
- // Allocate BD header from pool
- pvBDHeader = WDI_DS_MemPoolAlloc(pMemPool, &physBDHeader, ucBdPoolType);
- if(NULL == pvBDHeader)
- return WDI_STATUS_E_FAILURE;
-
- WDI_SetBDPointers(pFrame, pvBDHeader, physBDHeader);
-
- alignment = 0;
- WDI_DS_PrepareBDHeader(pFrame, ucSwFrameTXXlation, alignment);
-
- wdiStatus = WDI_FillTxBd(pContext, ucTypeSubtype, pSTAMACAddress, pAddr2MACAddress,
- &ucUP, 1, pvBDHeader, ucTxFlag /* No ACK */, ucProtMgmtFrame, 0, &staId);
-
- if(WDI_STATUS_SUCCESS != wdiStatus)
- {
- WDI_DS_MemPoolFree(pMemPool, pvBDHeader, physBDHeader);
- return wdiStatus;
- }
-
- pTxMetadata->staIdx = staId;
-
- // Send packet to transport layer.
- if(eWLAN_PAL_STATUS_SUCCESS !=WDTS_TxPacket(pContext, pFrame)){
- WDI_DS_MemPoolFree(pMemPool, pvBDHeader, physBDHeader);
- return WDI_STATUS_E_FAILURE;
- }
-
- /* resource count only for data packet */
- // EAPOL packet doesn't use data mem pool if being treated as higher priority
-#ifdef FEATURE_WLAN_TDLS
- /* I utilizes TDLS mgmt frame always sent at BD_RATE2. (See limProcessTdls.c)
- Assumption here is data frame sent by WDA_TxPacket() <- HalTxFrame/HalTxFrameWithComplete()
- should take managment path. As of today, only TDLS feature has special data frame
- which needs to be treated as mgmt.
- */
- if((WDI_MAC_DATA_FRAME == ucType) && (!pTxMetadata->isEapol) && ((pTxMetadata->txFlags & WDI_USE_BD_RATE2_FOR_MANAGEMENT_FRAME) != WDI_USE_BD_RATE2_FOR_MANAGEMENT_FRAME))
-#else
- if(WDI_MAC_DATA_FRAME == ucType && (!pTxMetadata->isEapol))
-#endif
- {
- WDI_DS_MemPoolIncreaseReserveCount(pMemPool, staId);
- }
- return WDI_STATUS_SUCCESS;
-}
-
-
-/* DAL Transmit Complete function.
- * Parameters:
- * pContext:Cookie that should be passed back to the caller along with the callback.
- * ucTxResReq:TX resource number required by TL
- * Return Value: SUCCESS Completed successfully.
- * FAILURE_XXX Request was rejected due XXX Reason.
- *
- */
-
-
-WDI_Status WDI_DS_TxComplete(void *pContext, wpt_uint32 ucTxResReq)
-{
- // Do Sanity checks
- if(NULL == pContext)
- return WDI_STATUS_E_FAILURE;
-
- // Send notification to transport layer.
- if(eWLAN_PAL_STATUS_SUCCESS !=WDTS_CompleteTx(pContext, ucTxResReq))
- {
- return WDI_STATUS_E_FAILURE;
- }
-
- return WDI_STATUS_SUCCESS;
-}
-
-/* DAL Suspend Transmit function.
- * Parameters:
- * pContext:Cookie that should be passed back to the caller along with the callback.
- * Return Value: SUCCESS Completed successfully.
- * FAILURE_XXX Request was rejected due XXX Reason.
- *
- */
-
-
-WDI_Status WDI_DS_TxSuspend(void *pContext)
-{
- WDI_DS_ClientDataType *pClientData =
- (WDI_DS_ClientDataType *) WDI_DS_GetDatapathContext(pContext);
- pClientData->suspend = 1;
-
- return WDI_STATUS_SUCCESS;
-
-}
-
-
-/* DAL Resume Transmit function.
- * Parameters:
- * pContext:Cookie that should be passed back to the caller along with the callback.
- * Return Value: SUCCESS Completed successfully.
- * FAILURE_XXX Request was rejected due XXX Reason.
- *
- */
-
-
-WDI_Status WDI_DS_TxResume(void *pContext)
-{
- WDI_DS_ClientDataType *pClientData =
- (WDI_DS_ClientDataType *) WDI_DS_GetDatapathContext(pContext);
-
- pClientData->suspend = 0;
-
- return WDI_STATUS_SUCCESS;
-}
-
-/* DAL Get Available Resource Count.
- * This is the number of free descririptor in DXE
- * Parameters:
- * pContext:Cookie that should be passed back to the caller along with the callback.
- * wdiResPool: - identifier of resource pool
- * Return Value: number of resources available
- * This is the number of free descririptor in DXE
- *
- */
-
-wpt_uint32 WDI_GetAvailableResCount(void *pContext,WDI_ResPoolType wdiResPool)
-{
- WDI_DS_ClientDataType *pClientData =
- (WDI_DS_ClientDataType *) WDI_DS_GetDatapathContext(pContext);
-
- switch(wdiResPool)
- {
- case WDI_MGMT_POOL_ID:
- return (WDI_DS_HI_PRI_RES_NUM - 2*WDI_DS_GetAvailableResCount(&pClientData->mgmtMemPool));
- case WDI_DATA_POOL_ID:
- return WDTS_GetFreeTxDataResNumber(pContext);
- default:
- return 0;
- }
-}
-
-/* DAL Get resrved Resource Count per STA.
- * Parameters:
- * pContext:Cookie that should be passed back to the caller along with the callback.
- * wdiResPool: - identifier of resource pool
- * staId: STA ID
- * Return Value: number of resources reserved per STA
- *
- */
-wpt_uint32 WDI_DS_GetReservedResCountPerSTA(void *pContext,WDI_ResPoolType wdiResPool, wpt_uint8 staId)
-{
- WDI_DS_ClientDataType *pClientData =
- (WDI_DS_ClientDataType *) WDI_DS_GetDatapathContext(pContext);
- switch(wdiResPool)
- {
- case WDI_MGMT_POOL_ID:
- return WDI_DS_MemPoolGetRsvdResCountPerSTA(&pClientData->mgmtMemPool, staId);
- case WDI_DATA_POOL_ID:
- return WDI_DS_MemPoolGetRsvdResCountPerSTA(&pClientData->dataMemPool, staId);
- default:
- return 0;
- }
-}
-
-/* DAL STA info add into memPool.
- * Parameters:
- * pContext:Cookie that should be passed back to the caller along with the callback.
- * staId: STA ID
- * Return Value: number of resources reserved per STA
- *
- */
-WDI_Status WDI_DS_AddSTAMemPool(void *pContext, wpt_uint8 staIndex)
-{
- WDI_Status status = WDI_STATUS_SUCCESS;
- WDI_DS_ClientDataType *pClientData =
- (WDI_DS_ClientDataType *) WDI_DS_GetDatapathContext(pContext);
-
- status = WDI_DS_MemPoolAddSTA(&pClientData->mgmtMemPool, staIndex);
- if(WDI_STATUS_SUCCESS != status)
- {
- /* Add STA into MGMT memPool Fail */
- return status;
- }
-
- status = WDI_DS_MemPoolAddSTA(&pClientData->dataMemPool, staIndex);
- if(WDI_STATUS_SUCCESS != status)
- {
- /* Add STA into DATA memPool Fail */
- return status;
- }
-
- return WDI_STATUS_SUCCESS;
-}
-
-/* DAL STA info del from memPool.
- * Parameters:
- * pContext:Cookie that should be passed back to the caller along with the callback.
- * staId: STA ID
- * Return Value: number of resources reserved per STA
- *
- */
-WDI_Status WDI_DS_DelSTAMemPool(void *pContext, wpt_uint8 staIndex)
-{
- WDI_Status status = WDI_STATUS_SUCCESS;
- WDI_DS_ClientDataType *pClientData =
- (WDI_DS_ClientDataType *) WDI_DS_GetDatapathContext(pContext);
-
- status = WDI_DS_MemPoolDelSTA(&pClientData->mgmtMemPool, staIndex);
- if(WDI_STATUS_SUCCESS != status)
- {
- /* Del STA from MGMT memPool Fail */
- return status;
- }
- status = WDI_DS_MemPoolDelSTA(&pClientData->dataMemPool, staIndex);
- if(WDI_STATUS_SUCCESS != status)
- {
- /* Del STA from DATA memPool Fail */
- return status;
- }
- return WDI_STATUS_SUCCESS;
-}
-
-/* DAL Set STA index associated with BSS index.
- * Parameters:
- * pContext:Cookie that should be passed back to the caller along with the callback.
- * bssIdx: BSS index
- * staId: STA index associated with BSS index
- * Return Status: Found empty slot
- *
- */
-WDI_Status WDI_DS_SetStaIdxPerBssIdx(void *pContext, wpt_uint8 bssIdx, wpt_uint8 staIdx)
-{
- WDI_DS_ClientDataType *pClientData;
- wpt_uint8 bssLoop;
-
- pClientData = (WDI_DS_ClientDataType *)WDI_DS_GetDatapathContext(pContext);
- for (bssLoop = 0; bssLoop < WDI_DS_MAX_SUPPORTED_BSS; bssLoop++)
- {
- if ((pClientData->staIdxPerBssIdxTable[bssLoop].isUsed) &&
- (bssIdx == pClientData->staIdxPerBssIdxTable[bssLoop].bssIdx) &&
- (staIdx == pClientData->staIdxPerBssIdxTable[bssLoop].staIdx))
- {
- return WDI_STATUS_SUCCESS;
- }
-
- if (0 == pClientData->staIdxPerBssIdxTable[bssLoop].isUsed)
- {
- pClientData->staIdxPerBssIdxTable[bssLoop].bssIdx = bssIdx;
- pClientData->staIdxPerBssIdxTable[bssLoop].staIdx = staIdx;
- pClientData->staIdxPerBssIdxTable[bssLoop].isUsed = 1;
- return WDI_STATUS_SUCCESS;
- }
- }
-
- /* Could not find empty slot */
- return WDI_STATUS_E_FAILURE;
-}
-
-/* DAL Get STA index associated with BSS index.
- * Parameters:
- * pContext:Cookie that should be passed back to the caller along with the callback.
- * bssIdx: BSS index
- * staId: STA index associated with BSS index
- * Return Status: Found empty slot
- *
- */
-WDI_Status WDI_DS_GetStaIdxFromBssIdx(void *pContext, wpt_uint8 bssIdx, wpt_uint8 *staIdx)
-{
- WDI_DS_ClientDataType *pClientData;
- wpt_uint8 bssLoop;
-
- pClientData = (WDI_DS_ClientDataType *)WDI_DS_GetDatapathContext(pContext);
- for(bssLoop = 0; bssLoop < WDI_DS_MAX_SUPPORTED_BSS; bssLoop++)
- {
- if(bssIdx == pClientData->staIdxPerBssIdxTable[bssLoop].bssIdx)
- {
- /* Found BSS index from slot */
- *staIdx = pClientData->staIdxPerBssIdxTable[bssLoop].staIdx;
- return WDI_STATUS_SUCCESS;
- }
- }
-
- /* Could not find associated STA index with BSS index */
- return WDI_STATUS_E_FAILURE;
-}
-
-/* DAL Clear STA index associated with BSS index.
- * Parameters:
- * pContext:Cookie that should be passed back to the caller along with the callback.
- * bssIdx: BSS index
- * staId: STA index associated with BSS index
- * Return Status: Found empty slot
- *
- */
-WDI_Status WDI_DS_ClearStaIdxPerBssIdx(void *pContext, wpt_uint8 bssIdx, wpt_uint8 staIdx)
-{
- WDI_DS_ClientDataType *pClientData;
- wpt_uint8 bssLoop;
-
- pClientData = (WDI_DS_ClientDataType *)WDI_DS_GetDatapathContext(pContext);
- for(bssLoop = 0; bssLoop < WDI_DS_MAX_SUPPORTED_BSS; bssLoop++)
- {
- if((bssIdx == pClientData->staIdxPerBssIdxTable[bssLoop].bssIdx) &&
- (staIdx == pClientData->staIdxPerBssIdxTable[bssLoop].staIdx))
- {
- pClientData->staIdxPerBssIdxTable[bssLoop].bssIdx = WDI_DS_INDEX_INVALID;
- pClientData->staIdxPerBssIdxTable[bssLoop].staIdx = WDI_DS_INDEX_INVALID;
- pClientData->staIdxPerBssIdxTable[bssLoop].isUsed = 0;
- return WDI_STATUS_SUCCESS;
- }
- }
-
- /* Could not find associated STA index with BSS index */
- return WDI_STATUS_E_FAILURE;
-}
-
-/* @brief: WDI_DS_GetTrafficStats
- * This function should be invoked to fetch the current stats
- * Parameters:
- * pStats:Pointer to the collected stats
- * len: length of buffer pointed to by pStats
- * Return Status: None
- */
-void WDI_DS_GetTrafficStats(WDI_TrafficStatsType** pStats, wpt_uint32 *len)
-{
- return WDTS_GetTrafficStats(pStats, len);
-}
-
-/* @brief: WDI_DS_DeactivateTrafficStats
- * This function should be invoked to deactivate traffic stats collection
- * Parameters: None
- * Return Status: None
- */
-void WDI_DS_DeactivateTrafficStats(void)
-{
- return WDTS_DeactivateTrafficStats();
-}
-
-/* @brief: WDI_DS_ActivateTrafficStats
- * This function should be invoked to activate traffic stats collection
- * Parameters: None
- * Return Status: None
- */
-void WDI_DS_ActivateTrafficStats(void)
-{
- return WDTS_ActivateTrafficStats();
-}
-
-/* @brief: WDI_DS_ClearTrafficStats
- * This function should be invoked to clear all past stats
- * Parameters: None
- * Return Status: None
- */
-void WDI_DS_ClearTrafficStats(void)
-{
- return WDTS_ClearTrafficStats();
-}
diff --git a/Kbuild b/Kbuild
index 8c6828dd7bbc..9705a23ba5f3 100644
--- a/Kbuild
+++ b/Kbuild
@@ -857,10 +857,6 @@ WDI_CP_INC := -I$(WLAN_ROOT)/$(WDI_DIR)/CP/inc/
WDI_DP_INC := -I$(WLAN_ROOT)/$(WDI_DIR)/DP/inc/
-WDI_DP_SRC_DIR := $(WDI_DIR)/DP/src
-WDI_DP_OBJS := $(WDI_DP_SRC_DIR)/wlan_qct_wdi_bd.o \
- $(WDI_DP_SRC_DIR)/wlan_qct_wdi_ds.o
-
WDI_TRP_INC := -I$(WLAN_ROOT)/$(WDI_DIR)/TRP/CTS/inc/ \
-I$(WLAN_ROOT)/$(WDI_DIR)/TRP/DTS/inc/
@@ -876,12 +872,6 @@ WDI_INC := $(WDI_CP_INC) \
WDI_OBJS := $(WDI_WPAL_OBJS)
-ifeq ($(CONFIG_QCA_WIFI_2_0), 0)
-WDI_OBJS += $(WDI_CP_OBJS) \
- $(WDI_DP_OBJS)
-endif
-
-
WCNSS_INC := -I$(WLAN_ROOT)/wcnss/inc
LINUX_INC := -Iinclude/linux
diff --git a/firmware_bin/WCNSS_qcom_cfg.ini b/firmware_bin/WCNSS_qcom_cfg.ini
index 939097c3c8df..eebb1cdd9480 100755
--- a/firmware_bin/WCNSS_qcom_cfg.ini
+++ b/firmware_bin/WCNSS_qcom_cfg.ini
@@ -582,6 +582,9 @@ gReorderOffloadSupported=1
# 0 to disable, 1 to enable
gEnableLpassSupport=0
+# Whether userspace country code setting shld have priority
+gCountryCodePriority=1
+
END
# Note: Configuration parser would not read anything past the END marker