summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLinux Build Service Account <lnxbuild@localhost>2013-10-30 16:13:33 -0700
committerGerrit - the friendly Code Review server <code-review@localhost>2013-10-30 16:13:33 -0700
commitafa425f1d64b28581c8980afeed253d092e4b9f9 (patch)
tree7486843405ab5595ba8513db573f68af89d704f2
parent0cca7365cf2fe6a2d9d5286e3362615b41a61039 (diff)
parent559c42a6e5b7f2d966741c67bdb8efd121c092ba (diff)
Merge "Merge remote-tracking branch 'origin/caf/caf-wlan/master'"
-rw-r--r--Android.mk12
-rw-r--r--CORE/CLD_TXRX/TLSHIM/tl_shim.c353
-rw-r--r--CORE/CLD_TXRX/TLSHIM/tl_shim.h21
-rw-r--r--CORE/CLD_TXRX/TXRX/ol_rx.c2
-rw-r--r--CORE/CLD_TXRX/TXRX/ol_tx_classify.c27
-rw-r--r--CORE/CLD_TXRX/TXRX/ol_tx_classify.h27
-rw-r--r--CORE/CLD_TXRX/TXRX/ol_tx_desc.c19
-rw-r--r--CORE/CLD_TXRX/TXRX/ol_tx_send.c317
-rw-r--r--CORE/CLD_TXRX/TXRX/ol_txrx.c45
-rw-r--r--CORE/CLD_TXRX/TXRX/ol_txrx_types.h48
-rw-r--r--CORE/HDD/inc/wlan_hdd_cfg.h40
-rw-r--r--CORE/HDD/inc/wlan_hdd_main.h14
-rw-r--r--CORE/HDD/inc/wlan_hdd_oemdata.h66
-rw-r--r--CORE/HDD/inc/wlan_hdd_tgt_cfg.h1
-rw-r--r--CORE/HDD/src/wlan_hdd_cfg.c101
-rw-r--r--CORE/HDD/src/wlan_hdd_cfg80211.c4
-rw-r--r--CORE/HDD/src/wlan_hdd_early_suspend.c36
-rw-r--r--CORE/HDD/src/wlan_hdd_main.c47
-rw-r--r--CORE/HDD/src/wlan_hdd_oemdata.c663
-rw-r--r--CORE/HDD/src/wlan_hdd_p2p.c1
-rw-r--r--CORE/HDD/src/wlan_hdd_softap_tx_rx.c1
-rw-r--r--CORE/HDD/src/wlan_hdd_tx_rx.c1
-rw-r--r--CORE/HDD/src/wlan_hdd_wext.c60
-rw-r--r--CORE/MAC/inc/sirApi.h466
-rw-r--r--CORE/MAC/src/include/dphGlobal.h4
-rw-r--r--CORE/MAC/src/pe/include/limAdmitControl.h6
-rw-r--r--CORE/MAC/src/pe/include/limGlobal.h8
-rw-r--r--CORE/MAC/src/pe/include/limSession.h2
-rw-r--r--CORE/MAC/src/pe/lim/limAdmitControl.c17
-rw-r--r--CORE/MAC/src/pe/lim/limAssocUtils.c83
-rw-r--r--CORE/MAC/src/pe/lim/limFT.c220
-rw-r--r--CORE/MAC/src/pe/lim/limIbssPeerMgmt.c4
-rw-r--r--CORE/MAC/src/pe/lim/limLogDump.c286
-rw-r--r--CORE/MAC/src/pe/lim/limProcessActionFrame.c11
-rw-r--r--CORE/MAC/src/pe/lim/limProcessAssocRspFrame.c8
-rw-r--r--CORE/MAC/src/pe/lim/limProcessMessageQueue.c12
-rw-r--r--CORE/MAC/src/pe/lim/limProcessMlmReqMessages.c21
-rw-r--r--CORE/MAC/src/pe/lim/limProcessMlmRspMessages.c5
-rw-r--r--CORE/MAC/src/pe/lim/limProcessSmeReqMessages.c1
-rw-r--r--CORE/MAC/src/pe/lim/limRoamingAlgo.c52
-rw-r--r--CORE/MAC/src/pe/lim/limSendManagementFrames.c1
-rw-r--r--CORE/MAC/src/pe/lim/limSendSmeRspMessages.c384
-rw-r--r--CORE/MAC/src/pe/lim/limSerDesUtils.c15
-rw-r--r--CORE/SAP/src/sapChSelect.c16
-rw-r--r--CORE/SERVICES/BMI/ol_fw.c2
-rw-r--r--CORE/SERVICES/COMMON/_ieee80211_common.h16
-rw-r--r--CORE/SERVICES/COMMON/adf/adf_nbuf.c2
-rw-r--r--CORE/SERVICES/COMMON/dbglog_host.h3
-rw-r--r--CORE/SERVICES/COMMON/ol_txrx_ctrl_api.h107
-rw-r--r--CORE/SERVICES/COMMON/wlan_defs.h5
-rw-r--r--CORE/SERVICES/COMMON/wlan_tgt_def_config.h27
-rw-r--r--CORE/SERVICES/COMMON/wma_api.h2
-rw-r--r--CORE/SERVICES/COMMON/wmi_services.h21
-rw-r--r--CORE/SERVICES/COMMON/wmi_tlv_defs.h184
-rw-r--r--CORE/SERVICES/COMMON/wmi_unified.h636
-rw-r--r--CORE/SERVICES/COMMON/wmi_version.h2
-rw-r--r--CORE/SERVICES/HIF/PCIe/hif_pci.c10
-rw-r--r--CORE/SERVICES/HIF/PCIe/if_pci.c21
-rw-r--r--CORE/SERVICES/HIF/ath_procfs.c91
-rw-r--r--CORE/SERVICES/WMA/inc/legacy/halMsgApi.h16
-rw-r--r--CORE/SERVICES/WMA/regdomain.c227
-rw-r--r--CORE/SERVICES/WMA/regdomain.h84
-rw-r--r--CORE/SERVICES/WMA/regdomain_common.h1374
-rw-r--r--CORE/SERVICES/WMA/wma.c1797
-rw-r--r--CORE/SERVICES/WMA/wma.h92
-rw-r--r--CORE/SERVICES/WMA/wma_isoc.c33
-rw-r--r--CORE/SERVICES/WMA/wma_stub.h4
-rw-r--r--CORE/SME/inc/csrApi.h1
-rw-r--r--CORE/SME/inc/csrInternal.h1
-rw-r--r--CORE/SME/inc/oemDataApi.h18
-rw-r--r--CORE/SME/inc/sme_Api.h51
-rw-r--r--CORE/SME/src/csr/csrApiRoam.c2278
-rw-r--r--CORE/SME/src/csr/csrApiScan.c707
-rw-r--r--CORE/SME/src/csr/csrUtil.c16
-rw-r--r--CORE/SME/src/oemData/oemDataApi.c28
-rw-r--r--CORE/SME/src/sme_common/sme_Api.c81
-rw-r--r--CORE/SVC/external/wlan_nlink_common.h3
-rw-r--r--CORE/SVC/inc/wlan_ptt_sock_svc.h6
-rw-r--r--CORE/SYS/legacy/src/utils/src/parserApi.c13
-rw-r--r--CORE/TL/inc/wlan_qct_tl.h3
-rw-r--r--CORE/UTILS/FWLOG/dbglog_host.c106
-rw-r--r--CORE/VOSS/inc/i_vos_packet.h3
-rw-r--r--CORE/VOSS/inc/vos_utils.h1
-rw-r--r--CORE/VOSS/src/vos_api.c13
-rw-r--r--CORE/VOSS/src/vos_nvitem.c24
-rw-r--r--CORE/VOSS/src/vos_utils.c16
-rw-r--r--CORE/WDA/inc/legacy/halMsgApi.h97
-rw-r--r--CORE/WDA/inc/wlan_qct_wda.h287
-rw-r--r--CORE/WDI/CP/inc/wlan_qct_wdi.h9
-rwxr-xr-x[-rw-r--r--]Kbuild6
-rw-r--r--Makefile6
-rw-r--r--firmware_bin/WCNSS_qcom_cfg.ini19
-rw-r--r--tools/athdiag/athdiag.c250
-rw-r--r--tools/fwdebuglog/Android.mk12
-rw-r--r--tools/fwdebuglog/Makefile9
-rw-r--r--tools/fwdebuglog/cld-fwlog-netlink.c282
-rw-r--r--tools/fwdebuglog/parser.c2268
-rw-r--r--wcnss/inc/wlan_hal_msg.h8
98 files changed, 11708 insertions, 3198 deletions
diff --git a/Android.mk b/Android.mk
index 4c7fc03b978f..b611ae74c870 100644
--- a/Android.mk
+++ b/Android.mk
@@ -49,12 +49,12 @@ KBUILD_OPTIONS += $(WLAN_SELECT)
KBUILD_OPTIONS += $(WLAN_ISOC_SELECT)
include $(CLEAR_VARS)
-LOCAL_MODULE := $(WLAN_CHIPSET)_wlan.ko
-LOCAL_MODULE_KBUILD_NAME := wlan.ko
-LOCAL_MODULE_TAGS := debug
-LOCAL_MODULE_DEBUG_ENABLE := true
-LOCAL_MODULE_PATH := $(TARGET_OUT)/lib/modules/$(WLAN_CHIPSET)
-include $(DLKM_DIR)/AndroidKernelModule.mk
+#LOCAL_MODULE := proprietary_$(WLAN_CHIPSET)_wlan.ko
+#LOCAL_MODULE_KBUILD_NAME := wlan.ko
+#LOCAL_MODULE_TAGS := debug
+#LOCAL_MODULE_DEBUG_ENABLE := true
+#LOCAL_MODULE_PATH := $(TARGET_OUT)/lib/modules/$(WLAN_CHIPSET)
+#include $(DLKM_DIR)/AndroidKernelModule.mk
###########################################################
# Create Symbolic link
diff --git a/CORE/CLD_TXRX/TLSHIM/tl_shim.c b/CORE/CLD_TXRX/TLSHIM/tl_shim.c
index aa4581b2324e..d3b05fe5a169 100644
--- a/CORE/CLD_TXRX/TLSHIM/tl_shim.c
+++ b/CORE/CLD_TXRX/TLSHIM/tl_shim.c
@@ -55,9 +55,254 @@
VOS_TRACE( VOS_MODULE_ID_TL, VOS_TRACE_LEVEL_ERROR, ## args)
#define TLSHIM_LOGP(args...) \
VOS_TRACE( VOS_MODULE_ID_TL, VOS_TRACE_LEVEL_FATAL, ## args)
+
+#ifdef FEATURE_WLAN_CCX
+
/************************/
-/* Internal Func */
+/* Internal defines */
/************************/
+#define SIZEOF_80211_HDR (sizeof(struct ieee80211_frame))
+#define LLC_SNAP_SIZE 8
+
+/* Cisco Aironet SNAP hdr */
+static u_int8_t AIRONET_SNAP_HEADER[] = {0xAA, 0xAA, 0x03, 0x00, 0x40,
+ 0x96, 0x00, 0x00 };
+
+/*
+ * @brief: Creates vos_pkt_t for IAPP packet and routes them to PE/LIM.
+ * @detail: This function will be executed by new deferred task. It calls
+ * in the function to process and route IAPP frame. After IAPP
+ * has been processed, it will free the passed adb_nbuf_t pointer.
+ * This function will run in non interrupt context
+ * @param: ptr_work - pointer to work struct containing passed parameters
+ * from calling function.
+ */
+void
+tlshim_mgmt_over_data_rx_handler(struct work_struct *ptr_work)
+{
+ struct deferred_iapp_work *ptr_my_work
+ = container_of(ptr_work, struct deferred_iapp_work, deferred_work);
+ pVosContextType pVosGCtx = ptr_my_work->pVosGCtx;
+ u_int8_t *data = adf_nbuf_data(ptr_my_work->nbuf);
+ u_int32_t data_len = adf_nbuf_len(ptr_my_work->nbuf);
+ struct ol_txrx_vdev_t *vdev = ptr_my_work->vdev;
+
+ /*
+ * data : is a either data starting from snap hdr or 802.11 frame
+ * data_len : length of above data
+ */
+
+ struct txrx_tl_shim_ctx *tl_shim = vos_get_context(VOS_MODULE_ID_TL,
+ pVosGCtx);
+ vos_pkt_t *rx_pkt;
+ adf_nbuf_t wbuf;
+ struct ieee80211_frame *wh;
+
+ if (!tl_shim->mgmt_rx) {
+ TLSHIM_LOGE("Not registered for Mgmt rx, dropping the frame");
+ /* this buffer is used now, free it */
+ adf_nbuf_free(ptr_my_work->nbuf);
+ /* set inUse to false, so that next IAPP frame can be processed */
+ ptr_my_work->inUse = false;
+ return;
+ }
+
+ /*
+ * allocate rx_packet: this will be used for encapsulating a
+ * sk_buff which then is passed to peHandleMgmtFrame(ptr fn)
+ * along with vos_ctx.
+ */
+ rx_pkt = vos_mem_malloc(sizeof(*rx_pkt));
+ if (!rx_pkt) {
+ TLSHIM_LOGE("Failed to allocate rx packet");
+ /* this buffer is used now, free it */
+ adf_nbuf_free(ptr_my_work->nbuf);
+ /* set inUse to false, so that next IAPP frame can be processed */
+ ptr_my_work->inUse = false;
+ return;
+ }
+
+ vos_mem_zero(rx_pkt, sizeof(*rx_pkt));
+
+ /*
+ * TODO: also check if following is used for IAPP
+ * if yes, find out how to populate this
+ * rx_pkt->pkt_meta.channel = 0;
+ */
+ rx_pkt->pkt_meta.snr = rx_pkt->pkt_meta.rssi = 0;
+
+ rx_pkt->pkt_meta.timestamp = (u_int32_t) jiffies;
+ rx_pkt->pkt_meta.mpdu_hdr_len = SIZEOF_80211_HDR;
+
+ /*
+ * mpdu len and data len will be different for native and non native
+ * format
+ */
+ if (vdev->pdev->frame_format == wlan_frm_fmt_native_wifi) {
+ rx_pkt->pkt_meta.mpdu_len = data_len;
+ rx_pkt->pkt_meta.mpdu_data_len = data_len -
+ rx_pkt->pkt_meta.mpdu_hdr_len;
+ }
+ else {
+ rx_pkt->pkt_meta.mpdu_len = data_len +
+ rx_pkt->pkt_meta.mpdu_hdr_len - ETHERNET_HDR_LEN;
+ rx_pkt->pkt_meta.mpdu_data_len = data_len - ETHERNET_HDR_LEN;
+ }
+
+ /* allocate a sk_buff with enough memory for 802.11 IAPP frame */
+ wbuf = adf_nbuf_alloc(NULL, roundup(rx_pkt->pkt_meta.mpdu_len, 4),
+ 0, 4, FALSE);
+ if (!wbuf) {
+ TLSHIM_LOGE("Failed to allocate wbuf for mgmt rx");
+ vos_mem_free(rx_pkt);
+ /* this buffer is used now, free it */
+ adf_nbuf_free(ptr_my_work->nbuf);
+ /* set inUse to false, so that next IAPP frame can be processed */
+ ptr_my_work->inUse = false;
+ return;
+ }
+
+ adf_nbuf_put_tail(wbuf, data_len);
+ adf_nbuf_set_protocol(wbuf, ETH_P_SNAP);
+
+ /* wh will contain 802.11 frame, it will be encpsulated inside sk_buff */
+ wh = (struct ieee80211_frame *) adf_nbuf_data(wbuf);
+
+ /* set mpdu hdr pointre to data of sk_buff */
+ rx_pkt->pkt_meta.mpdu_hdr_ptr = adf_nbuf_data(wbuf);
+ /* set mpdu data pointer to appropriate offset from hdr */
+ rx_pkt->pkt_meta.mpdu_data_ptr = rx_pkt->pkt_meta.mpdu_hdr_ptr +
+ rx_pkt->pkt_meta.mpdu_hdr_len;
+ /* encapsulate newly allocated sk_buff in rx_pkt */
+ rx_pkt->pkt_buf = wbuf;
+
+ if (vdev->pdev->frame_format == wlan_frm_fmt_native_wifi) {
+ /* if native wifi: copy full frame */
+ adf_os_mem_copy(wh, data, data_len);
+ }
+ else {
+ /*
+ * if not native wifi populate: copy just part after 802.11 hdr
+ * i.e. part starting from snap header
+ */
+ tpCcxIappHdr iapp_hdr_ptr = (tpCcxIappHdr)&data[ETHERNET_HDR_LEN];
+ u_int8_t *snap_hdr_ptr = &(((u_int8_t*)wh)[SIZEOF_80211_HDR]);
+ tpSirMacFrameCtl ptr_80211_FC = (tpSirMacFrameCtl)&wh->i_fc;
+ ptr_80211_FC->protVer = SIR_MAC_PROTOCOL_VERSION;
+ ptr_80211_FC->type = SIR_MAC_DATA_FRAME;
+ ptr_80211_FC->subType = SIR_MAC_DATA_QOS_DATA;
+ ptr_80211_FC->toDS = 0;
+ ptr_80211_FC->fromDS = 1;
+ ptr_80211_FC->moreFrag = 0;
+ ptr_80211_FC->retry = 0;
+ ptr_80211_FC->powerMgmt = 0;
+ ptr_80211_FC->moreData = 0;
+ ptr_80211_FC->wep = 0;
+ ptr_80211_FC->order = 0;
+
+ wh->i_dur[0] = 0;
+ wh->i_dur[1] = 0;
+
+ adf_os_mem_copy(&wh->i_addr1, &iapp_hdr_ptr->DestMac[0],
+ ETHERNET_ADDR_LEN);
+ adf_os_mem_copy(&wh->i_addr2, &iapp_hdr_ptr->SrcMac[0],
+ ETHERNET_ADDR_LEN);
+ adf_os_mem_copy(&wh->i_addr3, &vdev->last_real_peer->mac_addr.raw[0],
+ ETHERNET_ADDR_LEN);
+
+ wh->i_seq[0] = 0;
+ wh->i_seq[1] = 0;
+
+ adf_os_mem_copy( snap_hdr_ptr, &data[ETHERNET_HDR_LEN],
+ data_len - ETHERNET_HDR_LEN);
+ }
+
+ tl_shim->mgmt_rx(pVosGCtx, rx_pkt);
+ /* this buffer is used now, free it */
+ adf_nbuf_free(ptr_my_work->nbuf);
+ /* set inUse to false, so that next IAPP frame can be processed */
+ ptr_my_work->inUse = false;
+}
+
+/*
+ * @brief: This function creates the deferred task and schedules it. this is
+ * still in interrrupt context. The deferred task is created to run
+ * in non interrut context as a memory allocation of vos_pkt_t is
+ * needed and memory allocation should not be done in interrupt
+ * context.
+ * @param - pVosGCtx - vos context
+ * @param - data - data containing ieee80211 IAPP frame
+ * @param - data_len - data len containing ieee80211 IAPP frame
+ * @param - vdev - virtual device
+ */
+void
+tlshim_mgmt_over_data_rx_handler_non_interrupt_ctx(pVosContextType pVosGCtx,
+ adf_nbuf_t nbuf, struct ol_txrx_vdev_t *vdev)
+{
+ struct txrx_tl_shim_ctx *tl_shim = vos_get_context(VOS_MODULE_ID_TL,
+ pVosGCtx);
+
+ /*
+ * if there is already a deferred IAPP processing, do not start
+ * another. Instead drop it as IAPP frames are not critical and
+ * can be dropped without any disruptive effects.
+ */
+ if(tl_shim->iapp_work.inUse == false) {
+ tl_shim->iapp_work.pVosGCtx = pVosGCtx;
+ tl_shim->iapp_work.nbuf = nbuf;
+ tl_shim->iapp_work.vdev = vdev;
+ tl_shim->iapp_work.inUse = true;
+ schedule_work(&(tl_shim->iapp_work.deferred_work));
+ return;
+ }
+
+ /* Previous IAPP frame is not yet processed, drop this frame */
+ TLSHIM_LOGE("Dropping IAPP frame because previous is yet unprocessed");
+ /*
+ * TODO: If needed this can changed to have queue rather
+ * than drop frame
+ */
+ adf_nbuf_free(nbuf);
+ return;
+}
+
+/*
+ * @brief: This checks if frame is IAPP and if yes routes them to PE/LIM
+ * @param - pVosGCtx - vos context
+ * @param - msdu - frame
+ * @param - sta_id - station ID
+ */
+bool
+tlshim_check_n_process_iapp_frame (pVosContextType pVosGCtx,
+ adf_nbuf_t msdu, u_int16_t sta_id)
+{
+ u_int8_t *data = adf_nbuf_data(msdu);
+ u_int8_t offset_snap_header;
+ struct ol_txrx_pdev_t *pdev = pVosGCtx->pdev_txrx_ctx;
+ struct ol_txrx_peer_t *peer =
+ ol_txrx_peer_find_by_local_id(pVosGCtx->pdev_txrx_ctx, sta_id);
+ struct ol_txrx_vdev_t *vdev = peer->vdev;
+
+ /* frame format is natve wifi */
+ if(pdev->frame_format == wlan_frm_fmt_native_wifi)
+ offset_snap_header = SIZEOF_80211_HDR;
+ else
+ offset_snap_header = ETHERNET_HDR_LEN;
+
+ if(vos_mem_compare( &data[offset_snap_header],
+ &AIRONET_SNAP_HEADER[0], LLC_SNAP_SIZE) == VOS_TRUE) {
+ /* process IAPP frames */
+ tlshim_mgmt_over_data_rx_handler_non_interrupt_ctx(pVosGCtx,
+ msdu, vdev);
+ /* if returned true: the packet will not be passed to upper layer */
+ return true;
+ }
+
+ /* if returned false the packet will be handled by the upper layer */
+ return false;
+}
+
+#endif /* FEATURE_WLAN_CCX */
#ifdef QCA_WIFI_ISOC
static void tlshim_mgmt_rx_dxe_handler(void *context, adf_nbuf_t buflist)
@@ -144,8 +389,8 @@ next_nbuf:
/*AR9888/AR6320 noise floor approx value*/
#define TLSHIM_TGT_NOISE_FLOOR_DBM (-96)
-static int tlshim_mgmt_rx_wmi_handler(void *context, u_int8_t *data,
- u_int32_t data_len)
+static int tlshim_mgmt_rx_process(void *context, u_int8_t *data,
+ u_int32_t data_len, bool saved_beacon)
{
void *vos_ctx = vos_get_global_context(VOS_MODULE_ID_TL, NULL);
struct txrx_tl_shim_ctx *tl_shim = vos_get_context(VOS_MODULE_ID_TL,
@@ -156,6 +401,7 @@ static int tlshim_mgmt_rx_wmi_handler(void *context, u_int8_t *data,
vos_pkt_t *rx_pkt;
adf_nbuf_t wbuf;
struct ieee80211_frame *wh;
+ u_int8_t mgt_type, mgt_subtype;
param_tlvs = (WMI_MGMT_RX_EVENTID_param_tlvs *) data;
if (!param_tlvs) {
@@ -196,6 +442,13 @@ static int tlshim_mgmt_rx_wmi_handler(void *context, u_int8_t *data,
rx_pkt->pkt_meta.mpdu_data_len = hdr->buf_len -
rx_pkt->pkt_meta.mpdu_hdr_len;
+ /*
+ * saved_beacon means this beacon is a duplicate of one
+ * sent earlier. roamCandidateInd flag is used to indicate to
+ * PE that roam scan finished and a better candidate AP
+ * was found.
+ */
+ rx_pkt->pkt_meta.roamCandidateInd = saved_beacon ? 1 : 0;
/* Why not just use rx_event->hdr.buf_len? */
wbuf = adf_nbuf_alloc(NULL,
roundup(hdr->buf_len, 4),
@@ -245,9 +498,49 @@ static int tlshim_mgmt_rx_wmi_handler(void *context, u_int8_t *data,
return 0;
}
+ /* If it is a beacon/probe response, save it for future use */
+ mgt_type = (wh)->i_fc[0] & IEEE80211_FC0_TYPE_MASK;
+ mgt_subtype = (wh)->i_fc[0] & IEEE80211_FC0_SUBTYPE_MASK;
+
+ if (mgt_type == IEEE80211_FC0_TYPE_MGT &&
+ (mgt_subtype == IEEE80211_FC0_SUBTYPE_BEACON || mgt_subtype == IEEE80211_FC0_SUBTYPE_PROBE_RESP))
+ {
+ /* remember this beacon to be used later for better_ap event */
+ if (tl_shim->last_beacon_data) {
+ vos_mem_free(tl_shim->last_beacon_data);
+ tl_shim->last_beacon_data = NULL;
+ tl_shim->last_beacon_len = 0;
+ }
+ if((tl_shim->last_beacon_data = vos_mem_malloc(data_len))) {
+ vos_mem_copy(tl_shim->last_beacon_data, data, data_len);
+ tl_shim->last_beacon_len = data_len;
+ }
+ }
return tl_shim->mgmt_rx(vos_ctx, rx_pkt);
}
+
+static int tlshim_mgmt_rx_wmi_handler(void *context, u_int8_t *data,
+ u_int32_t data_len)
+{
+ return (tlshim_mgmt_rx_process(context, data, data_len, FALSE));
+}
#endif
+/*
+ * tlshim_mgmt_roam_event_ind() is called from WMA layer when
+ * BETTER_AP_FOUND event is received from roam engine.
+ */
+int tlshim_mgmt_roam_event_ind(void *context)
+{
+ void *vos_ctx = vos_get_global_context(VOS_MODULE_ID_TL, NULL);
+ struct txrx_tl_shim_ctx *tl_shim = vos_get_context(VOS_MODULE_ID_TL,
+ vos_ctx);
+ VOS_STATUS ret = VOS_STATUS_SUCCESS;
+ if (tl_shim->last_beacon_data && tl_shim->last_beacon_len)
+ {
+ ret = tlshim_mgmt_rx_process(context, tl_shim->last_beacon_data, tl_shim->last_beacon_len, TRUE);
+ }
+ return ret;
+}
static void tl_shim_flush_rx_frames(void *vos_ctx,
struct txrx_tl_shim_ctx *tl_shim,
@@ -341,10 +634,28 @@ static void tlshim_data_rx_handler(void *context, u_int16_t staid,
buf = rx_buf_list;
while (buf) {
next_buf = adf_nbuf_queue_next(buf);
- ret = sta_info->data_rx(vos_ctx, buf, staid);
- if (ret != VOS_STATUS_SUCCESS)
- adf_nbuf_free(buf);
- buf = next_buf;
+
+#ifdef FEATURE_WLAN_CCX
+ /*
+ * in case following returns true, a defered task was created
+ * inside function, which does following:
+ * 1) create vos packet
+ * 2) send to PE/LIM
+ * 3) free the involved sk_buff
+ */
+ if(tlshim_check_n_process_iapp_frame(vos_ctx, buf, staid)) {
+ buf = next_buf;
+ continue;
+ }
+#endif
+ /*
+ * above returned false, the packet was not IAPP.
+ * process normally
+ */
+ ret = sta_info->data_rx(vos_ctx, buf, staid);
+ if (ret != VOS_STATUS_SUCCESS)
+ adf_nbuf_free(buf);
+ buf = next_buf;
}
} else /* This should not happen if sta_info->registered is true */
goto drop_rx_buf;
@@ -421,6 +732,10 @@ adf_nbuf_t WLANTL_SendSTA_DataFrame(void *vos_ctx, u_int8_t sta_id,
ENTER();
+ if (vos_is_load_unload_in_progress(VOS_MODULE_ID_TL, NULL)) {
+ TLSHIM_LOGP("%s: Driver load/unload in progress", __func__);
+ return skb;
+ }
/*
* TODO: How sta_id is created and used for IBSS mode?.
*/
@@ -447,6 +762,10 @@ adf_nbuf_t WLANTL_SendSTA_DataFrame(void *vos_ctx, u_int8_t sta_id,
adf_nbuf_map_single(adf_ctx, skb, ADF_OS_DMA_TO_DEVICE);
+ if ((tl_shim->ip_checksum_offload) && (skb->protocol == htons(ETH_P_IP))
+ && (skb->ip_summed == CHECKSUM_PARTIAL))
+ skb->ip_summed = CHECKSUM_COMPLETE;
+
/* Terminate the (single-element) list of tx frames */
skb->next = NULL;
ret = tl_shim->tx(peer->vdev, skb);
@@ -884,11 +1203,15 @@ VOS_STATUS WLANTL_Close(void *vos_ctx)
{
struct txrx_tl_shim_ctx *tl_shim;
- ENTER();
- tl_shim = vos_get_context(VOS_MODULE_ID_TL, vos_ctx);
- wdi_in_pdev_detach(((pVosContextType) vos_ctx)->pdev_txrx_ctx, 1);
- vos_free_context(vos_ctx, VOS_MODULE_ID_TL, tl_shim);
- return VOS_STATUS_SUCCESS;
+ ENTER();
+ tl_shim = vos_get_context(VOS_MODULE_ID_TL, vos_ctx);
+ wdi_in_pdev_detach(((pVosContextType) vos_ctx)->pdev_txrx_ctx, 1);
+ // Delete beacon buffer hanging off tl_shim
+ if (tl_shim->last_beacon_data) {
+ vos_mem_free(tl_shim->last_beacon_data);
+ }
+ vos_free_context(vos_ctx, VOS_MODULE_ID_TL, tl_shim);
+ return VOS_STATUS_SUCCESS;
}
/*
@@ -926,12 +1249,16 @@ VOS_STATUS WLANTL_Open(void *vos_ctx, WLANTL_ConfigInfoType *tl_cfg)
}
INIT_WORK(&tl_shim->cache_flush_work, tl_shim_cache_flush_work);
-
+#ifdef FEATURE_WLAN_CCX
+ INIT_WORK(&(tl_shim->iapp_work.deferred_work),
+ tlshim_mgmt_over_data_rx_handler);
+#endif
/*
* TODO: Allocate memory for tx callback for maximum supported
* vdevs to maintain tx callbacks per vdev.
*/
+ tl_shim->ip_checksum_offload = tl_cfg->ip_checksum_offload;
return status;
}
diff --git a/CORE/CLD_TXRX/TLSHIM/tl_shim.h b/CORE/CLD_TXRX/TLSHIM/tl_shim.h
index 38389b64a848..d7d2dfc11e1d 100644
--- a/CORE/CLD_TXRX/TLSHIM/tl_shim.h
+++ b/CORE/CLD_TXRX/TLSHIM/tl_shim.h
@@ -28,6 +28,16 @@
#ifndef TXRX_TL_SHIM_H
#define TXRX_TL_SHIM_H
+#ifdef FEATURE_WLAN_CCX
+typedef struct deferred_iapp_work {
+ pVosContextType pVosGCtx;
+ adf_nbuf_t nbuf;
+ struct ol_txrx_vdev_t *vdev;
+ bool inUse;
+ struct work_struct deferred_work;
+} deferred_iapp_work;
+#endif
+
struct tlshim_buf {
struct list_head list;
adf_nbuf_t buf;
@@ -49,6 +59,17 @@ struct txrx_tl_shim_ctx {
struct tlshim_sta_info sta_info[WLAN_MAX_STA_COUNT];
adf_os_spinlock_t bufq_lock;
struct work_struct cache_flush_work;
+
+#ifdef FEATURE_WLAN_CCX
+ /*
+ * work structures to defer IAPP processing to
+ * non interrupt context
+ */
+struct deferred_iapp_work iapp_work;
+#endif
+ v_BOOL_t ip_checksum_offload;
+ u_int8_t *last_beacon_data;
+ u_int32_t last_beacon_len;
};
/*
diff --git a/CORE/CLD_TXRX/TXRX/ol_rx.c b/CORE/CLD_TXRX/TXRX/ol_rx.c
index f953b027ab77..300e6d8a151e 100644
--- a/CORE/CLD_TXRX/TXRX/ol_rx.c
+++ b/CORE/CLD_TXRX/TXRX/ol_rx.c
@@ -457,7 +457,7 @@ ol_rx_sec_ind_handler(
if (sec_type != htt_sec_type_wapi) {
adf_os_mem_set(peer->tids_last_pn_valid, 0x00, OL_TXRX_NUM_EXT_TIDS);
- } else {
+ } else if (sec_index == txrx_sec_mcast) {
for (i = 0; i < OL_TXRX_NUM_EXT_TIDS; i++) {
/*
* Setting PN valid bit for WAPI sec_type,
diff --git a/CORE/CLD_TXRX/TXRX/ol_tx_classify.c b/CORE/CLD_TXRX/TXRX/ol_tx_classify.c
index f70e326b3b4f..56b691c9fb8c 100644
--- a/CORE/CLD_TXRX/TXRX/ol_tx_classify.c
+++ b/CORE/CLD_TXRX/TXRX/ol_tx_classify.c
@@ -44,7 +44,6 @@
#include <enet.h> /* ETHERTYPE_VLAN, etc. */
#include <ieee80211_common.h> /* ieee80211_frame */
-
/*
* In theory, this tx classify code could be used on the host or in the target.
* Thus, this code uses generic OS primitives, that can be aliased to either
@@ -263,32 +262,6 @@ ol_tx_tid(
return tid;
}
-static A_UINT8 *
-ol_tx_dest_addr_find(
- struct ol_txrx_pdev_t *pdev,
- adf_nbuf_t tx_nbuf)
-{
- A_UINT8 *hdr_ptr;
- void *datap = adf_nbuf_data(tx_nbuf);
-
- if (pdev->frame_format == wlan_frm_fmt_raw) {
- /* adjust hdr_ptr to RA */
- struct ieee80211_frame *wh = (struct ieee80211_frame *)datap;
- hdr_ptr = wh->i_addr1;
- } else if (pdev->frame_format == wlan_frm_fmt_native_wifi) {
- /* adjust hdr_ptr to RA */
- struct ieee80211_frame *wh = (struct ieee80211_frame *)datap;
- hdr_ptr = wh->i_addr1;
- } else if (pdev->frame_format == wlan_frm_fmt_802_3) {
- hdr_ptr = datap;
- } else {
- adf_os_print("Invalid standard frame type: %d\n", pdev->frame_format);
- adf_os_assert(0);
- hdr_ptr = NULL;
- }
- return hdr_ptr;
-}
-
struct ol_tx_frms_queue_t *
ol_tx_classify(
struct ol_txrx_vdev_t *vdev,
diff --git a/CORE/CLD_TXRX/TXRX/ol_tx_classify.h b/CORE/CLD_TXRX/TXRX/ol_tx_classify.h
index 768cf796f22a..958c5c5f33d6 100644
--- a/CORE/CLD_TXRX/TXRX/ol_tx_classify.h
+++ b/CORE/CLD_TXRX/TXRX/ol_tx_classify.h
@@ -35,6 +35,33 @@
#include <adf_nbuf.h> /* adf_nbuf_t */
#include <ol_txrx_types.h> /* ol_txrx_vdev_t, etc. */
+static inline u_int8_t *
+ol_tx_dest_addr_find(
+ struct ol_txrx_pdev_t *pdev,
+ adf_nbuf_t tx_nbuf)
+{
+ u_int8_t *hdr_ptr;
+ void *datap = adf_nbuf_data(tx_nbuf);
+
+ if (pdev->frame_format == wlan_frm_fmt_raw) {
+ /* adjust hdr_ptr to RA */
+ struct ieee80211_frame *wh = (struct ieee80211_frame *)datap;
+ hdr_ptr = wh->i_addr1;
+ } else if (pdev->frame_format == wlan_frm_fmt_native_wifi) {
+ /* adjust hdr_ptr to RA */
+ struct ieee80211_frame *wh = (struct ieee80211_frame *)datap;
+ hdr_ptr = wh->i_addr1;
+ } else if (pdev->frame_format == wlan_frm_fmt_802_3) {
+ hdr_ptr = datap;
+ } else {
+ adf_os_print("Invalid standard frame type: %d\n",
+ pdev->frame_format);
+ adf_os_assert(0);
+ hdr_ptr = NULL;
+ }
+ return hdr_ptr;
+}
+
#if defined(CONFIG_HL_SUPPORT)
/**
diff --git a/CORE/CLD_TXRX/TXRX/ol_tx_desc.c b/CORE/CLD_TXRX/TXRX/ol_tx_desc.c
index 90635a182c93..3bd802602aee 100644
--- a/CORE/CLD_TXRX/TXRX/ol_tx_desc.c
+++ b/CORE/CLD_TXRX/TXRX/ol_tx_desc.c
@@ -29,6 +29,9 @@
#include <adf_nbuf.h> /* adf_nbuf_t, etc. */
#include <adf_os_util.h> /* adf_os_assert */
#include <adf_os_lock.h> /* adf_os_spinlock */
+#ifdef QCA_COMPUTE_TX_DELAY
+#include <adf_os_time.h> /* adf_os_ticks */
+#endif
#include <queue.h> /* TAILQ */
#include <ol_htt_tx_api.h> /* htt_tx_desc_id */
@@ -38,7 +41,18 @@
#include <ol_txrx_internal.h>
#ifdef QCA_SUPPORT_SW_TXRX_ENCAP
#include <ol_txrx_encap.h> /* OL_TX_RESTORE_HDR, etc*/
-#endif
+#endif
+
+#ifdef QCA_COMPUTE_TX_DELAY
+static inline void
+OL_TX_TIMESTAMP_SET(struct ol_tx_desc_t *tx_desc)
+{
+ tx_desc->entry_timestamp_ticks = adf_os_ticks();
+}
+#else
+#define OL_TX_TIMESTAMP_SET(tx_desc) /* no-op */
+#endif
+
static inline struct ol_tx_desc_t *
ol_tx_desc_alloc(struct ol_txrx_pdev_t *pdev)
{
@@ -51,6 +65,8 @@ ol_tx_desc_alloc(struct ol_txrx_pdev_t *pdev)
}
adf_os_spin_unlock_bh(&pdev->tx_mutex);
+ OL_TX_TIMESTAMP_SET(tx_desc);
+
return tx_desc;
}
@@ -62,6 +78,7 @@ ol_tx_desc_alloc_hl(struct ol_txrx_pdev_t *pdev)
tx_desc = ol_tx_desc_alloc(pdev);
if (!tx_desc) return NULL;
+
adf_os_atomic_dec(&pdev->tx_queue.rsrc_cnt);
return tx_desc;
diff --git a/CORE/CLD_TXRX/TXRX/ol_tx_send.c b/CORE/CLD_TXRX/TXRX/ol_tx_send.c
index 8c7a32d85b1c..edc38496e209 100644
--- a/CORE/CLD_TXRX/TXRX/ol_tx_send.c
+++ b/CORE/CLD_TXRX/TXRX/ol_tx_send.c
@@ -27,9 +27,16 @@
#include <adf_os_atomic.h> /* adf_os_atomic_inc, etc. */
#include <adf_os_lock.h> /* adf_os_spinlock */
+#include <adf_os_time.h> /* adf_os_ticks, etc. */
#include <adf_nbuf.h> /* adf_nbuf_t */
+#include <adf_net_types.h> /* ADF_NBUF_TX_EXT_TID_INVALID */
#include <queue.h> /* TAILQ */
+#ifdef QCA_COMPUTE_TX_DELAY
+#include <ieee80211.h> /* ieee80211_frame, etc. */
+#include <enet.h> /* ethernet_hdr_t, etc. */
+#include <ipv6_defs.h> /* IPV6_TRAFFIC_CLASS */
+#endif
#include <ol_txrx_api.h> /* ol_txrx_vdev_handle, etc. */
#include <ol_htt_tx_api.h> /* htt_tx_compl_desc_id */
@@ -38,6 +45,9 @@
#include <ol_ctrl_txrx_api.h>
#include <ol_txrx_types.h> /* ol_txrx_vdev_t, etc */
#include <ol_tx_desc.h> /* ol_tx_desc_find, ol_tx_desc_frame_free */
+#ifdef QCA_COMPUTE_TX_DELAY
+#include <ol_tx_classify.h> /* ol_tx_dest_addr_find */
+#endif
#include <ol_txrx_internal.h> /* OL_TX_DESC_NO_REFS, etc. */
#include <ol_osif_txrx_api.h>
#include <ol_tx.h> /* ol_tx_reinject */
@@ -312,6 +322,19 @@ ol_tx_target_credit_update(struct ol_txrx_pdev_t *pdev, int credit_delta)
adf_os_atomic_add(credit_delta, &pdev->target_tx_credit);
}
+#ifdef QCA_COMPUTE_TX_DELAY
+
+static void
+ol_tx_delay_compute(
+ struct ol_txrx_pdev_t *pdev,
+ enum htt_tx_status status,
+ u_int16_t *desc_ids,
+ int num_msdus);
+#define OL_TX_DELAY_COMPUTE ol_tx_delay_compute
+#else
+#define OL_TX_DELAY_COMPUTE(pdev, status, desc_ids, num_msdus) /* no-op */
+#endif /* QCA_COMPUTE_TX_DELAY */
+
#ifndef OL_TX_RESTORE_HDR
#define OL_TX_RESTORE_HDR(__tx_desc, __msdu)
#endif
@@ -442,6 +465,8 @@ ol_tx_completion_handler(
ol_tx_desc_list tx_descs;
TAILQ_INIT(&tx_descs);
+ OL_TX_DELAY_COMPUTE(pdev, status, desc_ids, num_msdus);
+
for (i = 0; i < num_msdus; i++) {
tx_desc_id = desc_ids[i];
tx_desc = &td_array[tx_desc_id].tx_desc;
@@ -603,3 +628,295 @@ ol_tx_inspect_handler(
}
}
+#ifdef QCA_COMPUTE_TX_DELAY
+
+void
+ol_tx_set_compute_interval(
+ ol_txrx_pdev_handle pdev,
+ u_int32_t interval)
+{
+ pdev->tx_delay.avg_period_ticks = adf_os_msecs_to_ticks(interval);
+}
+
+void
+ol_tx_packet_count(
+ ol_txrx_pdev_handle pdev,
+ u_int16_t *out_packet_count,
+ u_int16_t *out_packet_loss_count,
+ int category)
+{
+ *out_packet_count = pdev->packet_count[category];
+ *out_packet_loss_count = pdev->packet_loss_count[category];
+ pdev->packet_count[category] = 0;
+ pdev->packet_loss_count[category] = 0;
+}
+
+u_int32_t
+ol_tx_delay_avg(u_int64_t sum, u_int32_t num)
+{
+ u_int32_t sum32;
+ int shift = 0;
+ /*
+ * To avoid doing a 64-bit divide, shift the sum down until it is
+ * no more than 32 bits (and shift the denominator to match).
+ */
+ while ((sum >> 32) != 0) {
+ sum >>= 1;
+ shift++;
+ }
+ sum32 = (u_int32_t) sum;
+ num >>= shift;
+ return (sum32 + (num >> 1)) / num; /* round to nearest */
+}
+
+void
+ol_tx_delay(
+ ol_txrx_pdev_handle pdev,
+ u_int32_t *queue_delay_microsec,
+ u_int32_t *tx_delay_microsec,
+ int category)
+{
+ int index;
+ u_int32_t avg_delay_ticks;
+ struct ol_tx_delay_data *data;
+
+ adf_os_assert(category >= 0 && category < QCA_TX_DELAY_NUM_CATEGORIES);
+
+ adf_os_spin_lock_bh(&pdev->tx_delay.mutex);
+ index = 1 - pdev->tx_delay.cats[category].in_progress_idx;
+
+ data = &pdev->tx_delay.cats[category].copies[index];
+
+ if (data->avgs.transmit_num > 0) {
+ avg_delay_ticks = ol_tx_delay_avg(
+ data->avgs.transmit_sum_ticks, data->avgs.transmit_num);
+ *tx_delay_microsec = adf_os_ticks_to_msecs(avg_delay_ticks * 1000);
+ } else {
+ /*
+ * This case should only happen if there's a query
+ * within 5 sec after the first tx data frame.
+ */
+ *tx_delay_microsec = 0;
+ }
+ if (data->avgs.queue_num > 0) {
+ avg_delay_ticks = ol_tx_delay_avg(
+ data->avgs.queue_sum_ticks, data->avgs.queue_num);
+ *queue_delay_microsec = adf_os_ticks_to_msecs(avg_delay_ticks * 1000);
+ } else {
+ /*
+ * This case should only happen if there's a query
+ * within 5 sec after the first tx data frame.
+ */
+ *queue_delay_microsec = 0;
+ }
+
+ adf_os_spin_unlock_bh(&pdev->tx_delay.mutex);
+}
+
+void
+ol_tx_delay_hist(
+ ol_txrx_pdev_handle pdev,
+ u_int16_t *report_bin_values,
+ int category)
+{
+ int index, i, j;
+ struct ol_tx_delay_data *data;
+
+ adf_os_assert(category >= 0 && category < QCA_TX_DELAY_NUM_CATEGORIES);
+
+ adf_os_spin_lock_bh(&pdev->tx_delay.mutex);
+ index = 1 - pdev->tx_delay.cats[category].in_progress_idx;
+
+ data = &pdev->tx_delay.cats[category].copies[index];
+
+ for (i = 0, j = 0; i < QCA_TX_DELAY_HIST_REPORT_BINS-1; i++) {
+ u_int16_t internal_bin_sum = 0;
+ while (j < (1 << i)) {
+ internal_bin_sum += data->hist_bins_queue[j++];
+ }
+ report_bin_values[i] = internal_bin_sum;
+ }
+ report_bin_values[i] = data->hist_bins_queue[j]; /* overflow */
+
+ adf_os_spin_unlock_bh(&pdev->tx_delay.mutex);
+}
+
+#ifdef QCA_COMPUTE_TX_DELAY_PER_TID
+static u_int8_t
+ol_tx_delay_tid_from_l3_hdr(
+ struct ol_txrx_pdev_t *pdev,
+ adf_nbuf_t msdu,
+ struct ol_tx_desc_t *tx_desc)
+{
+ u_int16_t ethertype;
+ u_int8_t *dest_addr, *l3_hdr;
+ int is_mgmt, is_mcast;
+ int l2_hdr_size;
+
+ dest_addr = ol_tx_dest_addr_find(pdev, msdu);
+ if (NULL == dest_addr) {
+ return ADF_NBUF_TX_EXT_TID_INVALID;
+ }
+ is_mcast = IEEE80211_IS_MULTICAST(dest_addr);
+ is_mgmt = tx_desc->pkt_type >= OL_TXRX_MGMT_TYPE_BASE;
+ if (is_mgmt) {
+ return (is_mcast) ?
+ OL_TX_NUM_TIDS + OL_TX_VDEV_DEFAULT_MGMT :
+ HTT_TX_EXT_TID_MGMT;
+ }
+ if (is_mcast) {
+ return OL_TX_NUM_TIDS + OL_TX_VDEV_MCAST_BCAST;
+ }
+ if (pdev->frame_format == wlan_frm_fmt_802_3) {
+ struct ethernet_hdr_t *enet_hdr;
+ enet_hdr = (struct ethernet_hdr_t *) adf_nbuf_data(msdu);
+ l2_hdr_size = sizeof(struct ethernet_hdr_t);
+ ethertype = (enet_hdr->ethertype[0] << 8) | enet_hdr->ethertype[1];
+ if (!IS_ETHERTYPE(ethertype)) {
+ struct llc_snap_hdr_t *llc_hdr;
+ llc_hdr = (struct llc_snap_hdr_t *)
+ (adf_nbuf_data(msdu) + l2_hdr_size);
+ l2_hdr_size += sizeof(struct llc_snap_hdr_t);
+ ethertype = (llc_hdr->ethertype[0] << 8) | llc_hdr->ethertype[1];
+ }
+ } else {
+ struct llc_snap_hdr_t *llc_hdr;
+ l2_hdr_size = sizeof(struct ieee80211_frame);
+ llc_hdr = (struct llc_snap_hdr_t *) (adf_nbuf_data(msdu)
+ + l2_hdr_size);
+ l2_hdr_size += sizeof(struct llc_snap_hdr_t);
+ ethertype = (llc_hdr->ethertype[0] << 8) | llc_hdr->ethertype[1];
+ }
+ l3_hdr = adf_nbuf_data(msdu) + l2_hdr_size;
+ if (ETHERTYPE_IPV4 == ethertype) {
+ return (((struct ipv4_hdr_t *) l3_hdr)->tos >> 5) & 0x7;
+ } else if (ETHERTYPE_IPV6 == ethertype) {
+ return (IPV6_TRAFFIC_CLASS((struct ipv6_hdr_t *) l3_hdr) >> 5) & 0x7;
+ } else {
+ return ADF_NBUF_TX_EXT_TID_INVALID;
+ }
+}
+#endif
+
+static int
+ol_tx_delay_category(struct ol_txrx_pdev_t *pdev, u_int16_t msdu_id)
+{
+#ifdef QCA_COMPUTE_TX_DELAY_PER_TID
+ struct ol_tx_desc_t *tx_desc = &pdev->tx_desc.array[msdu_id].tx_desc;
+ u_int8_t tid;
+
+ adf_nbuf_t msdu = tx_desc->netbuf;
+ tid = adf_nbuf_get_tid(msdu);
+ if (tid == ADF_NBUF_TX_EXT_TID_INVALID) {
+ tid = ol_tx_delay_tid_from_l3_hdr(pdev, msdu, tx_desc);
+ if (tid == ADF_NBUF_TX_EXT_TID_INVALID) {
+ /* TID could not be determined (this is not an IP frame?) */
+ return -1;
+ }
+ }
+ return tid;
+#else
+ return 0;
+#endif
+}
+
+static inline int
+ol_tx_delay_hist_bin(struct ol_txrx_pdev_t *pdev, u_int32_t delay_ticks)
+{
+ int bin;
+ /*
+ * For speed, multiply and shift to approximate a divide. This causes
+ * a small error, but the approximation error should be much less
+ * than the other uncertainties in the tx delay computation.
+ */
+ bin = (delay_ticks * pdev->tx_delay.hist_internal_bin_width_mult) >>
+ pdev->tx_delay.hist_internal_bin_width_shift;
+ if (bin >= QCA_TX_DELAY_HIST_INTERNAL_BINS) {
+ bin = QCA_TX_DELAY_HIST_INTERNAL_BINS - 1;
+ }
+ return bin;
+}
+
+static void
+ol_tx_delay_compute(
+ struct ol_txrx_pdev_t *pdev,
+ enum htt_tx_status status,
+ u_int16_t *desc_ids,
+ int num_msdus)
+{
+ int i, index, cat;
+ u_int32_t now_ticks = adf_os_ticks();
+ u_int32_t tx_delay_transmit_ticks, tx_delay_queue_ticks;
+ u_int32_t avg_time_ticks;
+ struct ol_tx_delay_data *data;
+
+ adf_os_assert(num_msdus > 0);
+
+ /*
+ * keep static counters for total packet and lost packets
+ * reset them in ol_tx_delay(), function used to fetch the stats
+ */
+
+ cat = ol_tx_delay_category(pdev, desc_ids[0]);
+ if (cat == -1)
+ return;
+
+ pdev->packet_count[cat] = pdev->packet_count[cat] + num_msdus;
+ if (status != htt_tx_status_ok) {
+ for (i = 0; i < num_msdus; i++) {
+ cat = ol_tx_delay_category(pdev, desc_ids[i]);
+ pdev->packet_loss_count[cat]++;
+ }
+ return;
+ }
+
+ /* since we may switch the ping-pong index, provide mutex w. readers */
+ adf_os_spin_lock_bh(&pdev->tx_delay.mutex);
+ index = pdev->tx_delay.cats[cat].in_progress_idx;
+
+ data = &pdev->tx_delay.cats[cat].copies[index];
+
+ if (pdev->tx_delay.tx_compl_timestamp_ticks != 0) {
+ tx_delay_transmit_ticks =
+ now_ticks - pdev->tx_delay.tx_compl_timestamp_ticks;
+ /*
+ * We'd like to account for the number of MSDUs that were
+ * transmitted together, but we don't know this. All we know
+ * is the number of MSDUs that were acked together.
+ * Since the frame error rate is small, this is nearly the same as
+ * the number of frames transmitted together.
+ */
+ data->avgs.transmit_sum_ticks += tx_delay_transmit_ticks;
+ data->avgs.transmit_num += num_msdus;
+ }
+ pdev->tx_delay.tx_compl_timestamp_ticks = now_ticks;
+
+ for (i = 0; i < num_msdus; i++) {
+ u_int16_t id = desc_ids[i];
+ struct ol_tx_desc_t *tx_desc = &pdev->tx_desc.array[id].tx_desc;
+ int bin;
+
+ tx_delay_queue_ticks = now_ticks - tx_desc->entry_timestamp_ticks;
+
+ data->avgs.queue_sum_ticks += tx_delay_queue_ticks;
+ data->avgs.queue_num++;
+ bin = ol_tx_delay_hist_bin(pdev, tx_delay_queue_ticks);
+ data->hist_bins_queue[bin]++;
+ }
+
+ /* check if it's time to start a new average */
+ avg_time_ticks =
+ now_ticks - pdev->tx_delay.cats[cat].avg_start_time_ticks;
+ if (avg_time_ticks > pdev->tx_delay.avg_period_ticks) {
+ pdev->tx_delay.cats[cat].avg_start_time_ticks = now_ticks;
+ index = 1 - index;
+ pdev->tx_delay.cats[cat].in_progress_idx = index;
+ adf_os_mem_zero(
+ &pdev->tx_delay.cats[cat].copies[index],
+ sizeof(pdev->tx_delay.cats[cat].copies[index]));
+ }
+
+ adf_os_spin_unlock_bh(&pdev->tx_delay.mutex);
+}
+
+#endif /* QCA_COMPUTE_TX_DELAY */
diff --git a/CORE/CLD_TXRX/TXRX/ol_txrx.c b/CORE/CLD_TXRX/TXRX/ol_txrx.c
index 7a18e3921fc8..56ca9ecb9607 100644
--- a/CORE/CLD_TXRX/TXRX/ol_txrx.c
+++ b/CORE/CLD_TXRX/TXRX/ol_txrx.c
@@ -560,6 +560,47 @@ ol_txrx_pdev_attach(
OL_TXRX_LOCAL_PEER_ID_POOL_INIT(pdev);
+#ifdef QCA_COMPUTE_TX_DELAY
+ adf_os_mem_zero(&pdev->tx_delay, sizeof(pdev->tx_delay));
+ adf_os_spinlock_init(&pdev->tx_delay.mutex);
+
+ /* initialize compute interval with 5 seconds (CCX default) */
+ pdev->tx_delay.avg_period_ticks = adf_os_msecs_to_ticks(5000);
+ {
+ u_int32_t bin_width_1000ticks;
+ bin_width_1000ticks = adf_os_msecs_to_ticks(
+ QCA_TX_DELAY_HIST_INTERNAL_BIN_WIDTH_MS * 1000);
+ /*
+ * Compute a factor and shift that together are equal to the
+ * inverse of the bin_width time, so that rather than dividing
+ * by the bin width time, approximately the same result can be
+ * obtained much more efficiently by a multiply + shift.
+ * multiply_factor >> shift = 1 / bin_width_time, so
+ * multiply_factor = (1 << shift) / bin_width_time.
+ *
+ * Pick the shift semi-arbitrarily.
+ * If we knew statically what the bin_width would be, we could
+ * choose a shift that minimizes the error.
+ * Since the bin_width is determined dynamically, simply use a
+ * shift that is about half of the u_int32_t size. This should
+ * result in a relatively large multiplier value, which minimizes
+ * the error from rounding the multiplier to an integer.
+ * The rounding error only becomes significant if the tick units
+ * are on the order of 1 microsecond. In most systems, it is
+ * expected that the tick units will be relatively low-resolution,
+ * on the order of 1 millisecond. In such systems the rounding
+ * error is negligible.
+ * It would be more accurate to dynamically try out different
+ * shifts and choose the one that results in the smallest rounding
+ * error, but that extra level of fidelity is not needed.
+ */
+ pdev->tx_delay.hist_internal_bin_width_shift = 16;
+ pdev->tx_delay.hist_internal_bin_width_mult =
+ ((1 << pdev->tx_delay.hist_internal_bin_width_shift) *
+ 1000 + (bin_width_1000ticks >> 1)) / bin_width_1000ticks;
+ }
+#endif /* QCA_COMPUTE_TX_DELAY */
+
return pdev; /* success */
fail8:
@@ -685,6 +726,10 @@ ol_txrx_pdev_detach(ol_txrx_pdev_handle pdev, int force)
#endif
OL_TXRX_LOCAL_PEER_ID_CLEANUP(pdev);
+#ifdef QCA_COMPUTE_TX_DELAY
+ adf_os_spinlock_destroy(&pdev->tx_delay.mutex);
+#endif
+
adf_os_mem_free(pdev);
}
diff --git a/CORE/CLD_TXRX/TXRX/ol_txrx_types.h b/CORE/CLD_TXRX/TXRX/ol_txrx_types.h
index de71b38577eb..07b56e0eb085 100644
--- a/CORE/CLD_TXRX/TXRX/ol_txrx_types.h
+++ b/CORE/CLD_TXRX/TXRX/ol_txrx_types.h
@@ -129,6 +129,9 @@ struct ol_tx_desc_t {
adf_os_atomic_t ref_cnt;
enum htt_tx_status status;
+#ifdef QCA_COMPUTE_TX_DELAY
+ u_int32_t entry_timestamp_ticks;
+#endif
/*
* Allow tx descriptors to be stored in (doubly-linked) lists.
* This is mainly used for HL tx queuing and scheduling, but is
@@ -275,6 +278,26 @@ typedef struct ol_tx_sched_t *ol_tx_sched_handle;
#define ol_txrx_local_peer_id_t u_int8_t /* default */
#endif
+#ifdef QCA_COMPUTE_TX_DELAY
+/*
+ * Delay histogram bins: 16 bins of 10 ms each to count delays
+ * from 0-160 ms, plus one overflow bin for delays > 160 ms.
+ */
+#define QCA_TX_DELAY_HIST_INTERNAL_BINS 17
+#define QCA_TX_DELAY_HIST_INTERNAL_BIN_WIDTH_MS 10
+
+struct ol_tx_delay_data {
+ struct {
+ u_int64_t transmit_sum_ticks;
+ u_int64_t queue_sum_ticks;
+ u_int32_t transmit_num;
+ u_int32_t queue_num;
+ } avgs;
+ u_int16_t hist_bins_queue[QCA_TX_DELAY_HIST_INTERNAL_BINS];
+};
+
+#endif /* QCA_COMPUTE_TX_DELAY */
+
/*
* As depicted in the diagram below, the pdev contains an array of
* NUM_EXT_TID ol_tx_active_queues_in_tid_t elements.
@@ -587,6 +610,31 @@ struct ol_txrx_pdev_t {
ol_txrx_peer_handle map[OL_TXRX_NUM_LOCAL_PEER_IDS];
} local_peer_ids;
#endif
+
+#ifdef QCA_COMPUTE_TX_DELAY
+#ifdef QCA_COMPUTE_TX_DELAY_PER_TID
+#define QCA_TX_DELAY_NUM_CATEGORIES \
+ (OL_TX_NUM_TIDS + OL_TX_VDEV_NUM_QUEUES)
+#else
+#define QCA_TX_DELAY_NUM_CATEGORIES 1
+#endif
+ struct {
+ adf_os_spinlock_t mutex;
+ struct {
+ struct ol_tx_delay_data copies[2/*ping-pong updating*/];
+ int in_progress_idx;
+ u_int32_t avg_start_time_ticks;
+ } cats[QCA_TX_DELAY_NUM_CATEGORIES];
+ u_int32_t tx_compl_timestamp_ticks;
+ u_int32_t avg_period_ticks;
+ u_int32_t hist_internal_bin_width_mult;
+ u_int32_t hist_internal_bin_width_shift;
+ } tx_delay;
+
+ u_int16_t packet_count[QCA_TX_DELAY_NUM_CATEGORIES];
+ u_int16_t packet_loss_count[QCA_TX_DELAY_NUM_CATEGORIES];
+
+#endif /* QCA_COMPUTE_TX_DELAY */
};
struct ol_txrx_vdev_t {
diff --git a/CORE/HDD/inc/wlan_hdd_cfg.h b/CORE/HDD/inc/wlan_hdd_cfg.h
index df033dc034b5..e0c799942b2b 100644
--- a/CORE/HDD/inc/wlan_hdd_cfg.h
+++ b/CORE/HDD/inc/wlan_hdd_cfg.h
@@ -1297,6 +1297,11 @@ typedef enum
#define CFG_VHT_ENABLE_2x2_CAP_FEATURE_MAX ( 1 )
#define CFG_VHT_ENABLE_2x2_CAP_FEATURE_DEFAULT ( 0 )
+#define CFG_VHT_ENABLE_MU_BFORMEE_CAP_FEATURE "gEnableMuBformee"
+#define CFG_VHT_ENABLE_MU_BFORMEE_CAP_FEATURE_MIN ( 0 )
+#define CFG_VHT_ENABLE_MU_BFORMEE_CAP_FEATURE_MAX ( 1 )
+#define CFG_VHT_ENABLE_MU_BFORMEE_CAP_FEATURE_DEFAULT ( 0 )
+
#endif
#define CFG_REPORT_MAX_LINK_SPEED "gReportMaxLinkSpeed"
@@ -1571,6 +1576,16 @@ typedef enum
#define CFG_ENABLE_RX_STBC_MAX ( 1 )
#define CFG_ENABLE_RX_STBC_DEFAULT ( 1 )
+#define CFG_ENABLE_TX_STBC "gEnableTXSTBC"
+#define CFG_ENABLE_TX_STBC_MIN ( 0 )
+#define CFG_ENABLE_TX_STBC_MAX ( 1 )
+#define CFG_ENABLE_TX_STBC_DEFAULT ( 0 )
+
+#define CFG_ENABLE_RX_LDPC "gEnableRXLDPC"
+#define CFG_ENABLE_RX_LDPC_MIN ( 0 )
+#define CFG_ENABLE_RX_LDPC_MAX ( 1 )
+#define CFG_ENABLE_RX_LDPC_DEFAULT ( 0 )
+
/*
* Enable/Disable vsta based on MAX Assoc limit
* defined in WCNSS_qcom_cfg.ini.
@@ -1748,6 +1763,11 @@ typedef enum
#define CFG_ENABLE_TCP_CHKSUM_OFFLOAD_MIN ( 0 )
#define CFG_ENABLE_TCP_CHKSUM_OFFLOAD_DEFAULT ( 0 )
+#define CFG_ENABLE_IP_CHKSUM_OFFLOAD "gEnableIPChecksumOffload"
+#define CFG_ENABLE_IP_CHKSUM_OFFLOAD_DISABLE ( 0 )
+#define CFG_ENABLE_IP_CHKSUM_OFFLOAD_ENABLE ( 1 )
+#define CFG_ENABLE_IP_CHKSUM_OFFLOAD_DEFAULT ( CFG_ENABLE_IP_CHKSUM_OFFLOAD_DISABLE )
+
/*
* Power Save Offload
*/
@@ -1780,6 +1800,18 @@ typedef enum
#define CFG_P2P_LISTEN_OFFLOAD_ENABLE ( 1 )
#define CFG_P2P_LISTEN_OFFLOAD_DEFAULT ( CFG_P2P_LISTEN_OFFLOAD_DISABLE )
+#ifdef WLAN_FEATURE_11AC
+//Macro to handle maximum receive AMPDU size configuration
+#define CFG_VHT_AMPDU_LEN_EXPONENT_NAME "gVhtAmpduLenExponent"
+#define CFG_VHT_AMPDU_LEN_EXPONENT_MIN ( 0 )
+#define CFG_VHT_AMPDU_LEN_EXPONENT_MAX ( 7 )
+#define CFG_VHT_AMPDU_LEN_EXPONENT_DEFAULT ( 3 )
+
+#define CFG_VHT_MPDU_LEN_NAME "gVhtMpduLen"
+#define CFG_VHT_MPDU_LEN_MIN ( 0 )
+#define CFG_VHT_MPDU_LEN_MAX ( 2 )
+#define CFG_VHT_MPDU_LEN_DEFAULT ( 0 )
+#endif
/*---------------------------------------------------------------------------
Type declarations
@@ -2116,6 +2148,7 @@ typedef struct
v_U8_t vhtTxMCS2x2;
v_BOOL_t enable2x2;
v_BOOL_t enableVhtFor24GHzBand;
+ v_BOOL_t enableMuBformee;
#endif
v_U8_t enableModulatedDTIM;
v_U32_t fEnableMCAddrList;
@@ -2125,6 +2158,8 @@ typedef struct
v_U16_t configMccParam;
v_U32_t numBuffAdvert;
v_BOOL_t enableRxSTBC;
+ v_BOOL_t enableTxSTBC;
+ v_BOOL_t enableRxLDPC;
#ifdef FEATURE_WLAN_TDLS
v_BOOL_t fEnableTDLSSupport;
v_BOOL_t fEnableTDLSImplicitTrigger;
@@ -2159,10 +2194,15 @@ typedef struct
char listOfNon11acCountryCode[128];
v_U8_t fScanOffload;
v_BOOL_t enableTCPChkSumOffld;
+ v_BOOL_t enableIPChecksumOffload;
v_BOOL_t enablePowersaveOffload;
v_BOOL_t enablefwprint;
v_BOOL_t enablefwlog;
v_BOOL_t fP2pListenOffload;
+#ifdef WLAN_FEATURE_11AC
+ v_U8_t fVhtAmpduLenExponent;
+ v_U32_t vhtMpduLen;
+#endif
} hdd_config_t;
/*---------------------------------------------------------------------------
Function declarations and documenation
diff --git a/CORE/HDD/inc/wlan_hdd_main.h b/CORE/HDD/inc/wlan_hdd_main.h
index d9a5295fb945..3883033f987c 100644
--- a/CORE/HDD/inc/wlan_hdd_main.h
+++ b/CORE/HDD/inc/wlan_hdd_main.h
@@ -909,6 +909,16 @@ struct hdd_context_s
/** ptt Process ID*/
v_SINT_t ptt_pid;
+#ifdef FEATURE_OEM_DATA_SUPPORT
+#ifdef QCA_WIFI_2_0
+ /* OEM App registered or not */
+ v_BOOL_t oem_app_registered;
+
+ /* OEM App Process ID */
+ v_SINT_t oem_pid;
+#endif
+#endif
+
v_U8_t change_iface;
/** Concurrency Parameters*/
@@ -970,6 +980,10 @@ struct hdd_context_s
v_U8_t configuredMcastBcastFilter;
v_U8_t sus_res_mcastbcast_filter;
+#ifdef QCA_WIFI_2_0
+ v_U32_t target_type;
+ v_U32_t target_fw_version;
+#endif
};
diff --git a/CORE/HDD/inc/wlan_hdd_oemdata.h b/CORE/HDD/inc/wlan_hdd_oemdata.h
index d493a1ce6b20..b17d40eb59a9 100644
--- a/CORE/HDD/inc/wlan_hdd_oemdata.h
+++ b/CORE/HDD/inc/wlan_hdd_oemdata.h
@@ -44,12 +44,78 @@
#define __WLAN_HDD_OEM_DATA_H__
#ifndef OEM_DATA_REQ_SIZE
+#ifdef QCA_WIFI_2_0
+#define OEM_DATA_REQ_SIZE 276
+#else
#define OEM_DATA_REQ_SIZE 134
#endif
+#endif
#ifndef OEM_DATA_RSP_SIZE
+#ifdef QCA_WIFI_2_0
+#define OEM_DATA_RSP_SIZE 1720
+#else
#define OEM_DATA_RSP_SIZE 1968
#endif
+#endif
+
+#ifdef QCA_WIFI_2_0
+#define OEM_APP_SIGNATURE_LEN 16
+#define OEM_APP_SIGNATURE_STR "QUALCOMM-OEM-APP"
+
+#define OEM_TARGET_SIGNATURE_LEN 8
+#define OEM_TARGET_SIGNATURE "QUALCOMM"
+
+typedef enum
+{
+ /* Error null context */
+ OEM_ERR_NULL_CONTEXT = 1,
+
+ /* OEM App is not registered */
+ OEM_ERR_APP_NOT_REGISTERED,
+
+ /* Inavalid signature */
+ OEM_ERR_INVALID_SIGNATURE,
+
+ /* Invalid message type */
+ OEM_ERR_NULL_MESSAGE_HEADER,
+
+ /* Invalid message type */
+ OEM_ERR_INVALID_MESSAGE_TYPE,
+
+ /* Invalid length in message body */
+ OEM_ERR_INVALID_MESSAGE_LENGTH
+} eOemErrorCode;
+
+int oem_activate_service(void *pAdapter);
+
+int iw_get_oem_data_cap(struct net_device *dev, struct iw_request_info *info,
+ union iwreq_data *wrqu, char *extra);
+
+typedef struct sDriverVersion
+{
+ tANI_U8 major;
+ tANI_U8 minor;
+ tANI_U8 patch;
+ tANI_U8 build;
+} tDriverVersion;
+
+struct iw_oem_data_cap
+{
+ /* Signature of chipset vendor, e.g. QUALCOMM */
+ tANI_U8 oem_target_signature[OEM_TARGET_SIGNATURE_LEN];
+ tANI_U32 oem_target_type; /* Chip type */
+ tANI_U32 oem_fw_version; /* FW version */
+ tDriverVersion driver_version; /* CLD version */
+ tANI_U16 allowed_dwell_time_min; /* Channel dwell time - allowed min */
+ tANI_U16 allowed_dwell_time_max; /* Channel dwell time - allowed max */
+ tANI_U16 curr_dwell_time_min; /* Channel dwell time - current min */
+ tANI_U16 curr_dwell_time_max; /* Channel dwell time - current max */
+ tANI_U8 supported_bands; /* 2.4G or 5G Hz */
+ tANI_U8 num_channels; /* Num of channels IDs to follow */
+ tANI_U8 *channel_list; /* List of channel IDs */
+};
+#endif /* QCA_WIFI_2_0 */
struct iw_oem_data_req
{
diff --git a/CORE/HDD/inc/wlan_hdd_tgt_cfg.h b/CORE/HDD/inc/wlan_hdd_tgt_cfg.h
index da0578cf4652..1d15b2d8b76e 100644
--- a/CORE/HDD/inc/wlan_hdd_tgt_cfg.h
+++ b/CORE/HDD/inc/wlan_hdd_tgt_cfg.h
@@ -71,6 +71,7 @@ struct hdd_tgt_vht_cap {
#endif
struct hdd_tgt_cfg {
+ u_int32_t target_fw_version;
u_int8_t band_cap;
u_int8_t alpha2[3];
v_MACADDR_t hw_macaddr;
diff --git a/CORE/HDD/src/wlan_hdd_cfg.c b/CORE/HDD/src/wlan_hdd_cfg.c
index 0303b0aaa9fb..fd66807f951f 100644
--- a/CORE/HDD/src/wlan_hdd_cfg.c
+++ b/CORE/HDD/src/wlan_hdd_cfg.c
@@ -1996,6 +1996,12 @@ REG_VARIABLE( CFG_ENABLE_VHT_FOR_24GHZ_NAME, WLAN_PARAM_Integer,
CFG_ENABLE_VHT_FOR_24GHZ_DEFAULT,
CFG_ENABLE_VHT_FOR_24GHZ_MIN,
CFG_ENABLE_VHT_FOR_24GHZ_MAX),
+REG_VARIABLE( CFG_VHT_ENABLE_MU_BFORMEE_CAP_FEATURE, WLAN_PARAM_Integer,
+ hdd_config_t, enableMuBformee,
+ VAR_FLAGS_OPTIONAL | VAR_FLAGS_RANGE_CHECK_ASSUME_DEFAULT,
+ CFG_VHT_ENABLE_MU_BFORMEE_CAP_FEATURE_DEFAULT,
+ CFG_VHT_ENABLE_MU_BFORMEE_CAP_FEATURE_MIN,
+ CFG_VHT_ENABLE_MU_BFORMEE_CAP_FEATURE_MAX ),
#endif
REG_VARIABLE( CFG_ENABLE_FIRST_SCAN_2G_ONLY_NAME, WLAN_PARAM_Integer,
@@ -2038,6 +2044,20 @@ REG_VARIABLE( CFG_ENABLE_RX_STBC, WLAN_PARAM_Integer,
CFG_ENABLE_RX_STBC_DEFAULT,
CFG_ENABLE_RX_STBC_MIN,
CFG_ENABLE_RX_STBC_MAX ),
+REG_VARIABLE( CFG_ENABLE_TX_STBC, WLAN_PARAM_Integer,
+ hdd_config_t, enableTxSTBC,
+ VAR_FLAGS_OPTIONAL | VAR_FLAGS_RANGE_CHECK_ASSUME_DEFAULT,
+ CFG_ENABLE_TX_STBC_DEFAULT,
+ CFG_ENABLE_TX_STBC_MIN,
+ CFG_ENABLE_TX_STBC_MAX ),
+
+REG_VARIABLE( CFG_ENABLE_RX_LDPC, WLAN_PARAM_Integer,
+ hdd_config_t, enableRxLDPC,
+ VAR_FLAGS_OPTIONAL | VAR_FLAGS_RANGE_CHECK_ASSUME_DEFAULT,
+ CFG_ENABLE_RX_LDPC_DEFAULT,
+ CFG_ENABLE_RX_LDPC_MIN,
+ CFG_ENABLE_RX_LDPC_MAX ),
+
#ifdef FEATURE_WLAN_TDLS
REG_VARIABLE( CFG_TDLS_SUPPORT_ENABLE, WLAN_PARAM_Integer,
hdd_config_t, fEnableTDLSSupport,
@@ -2255,6 +2275,13 @@ REG_VARIABLE( CFG_ENABLE_TCP_CHKSUM_OFFLOAD, WLAN_PARAM_Integer,
CFG_ENABLE_TCP_CHKSUM_OFFLOAD_MIN,
CFG_ENABLE_TCP_CHKSUM_OFFLOAD_MAX),
+REG_VARIABLE( CFG_ENABLE_IP_CHKSUM_OFFLOAD, WLAN_PARAM_Integer,
+ hdd_config_t, enableIPChecksumOffload,
+ VAR_FLAGS_OPTIONAL,
+ CFG_ENABLE_IP_CHKSUM_OFFLOAD_DEFAULT,
+ CFG_ENABLE_IP_CHKSUM_OFFLOAD_DISABLE,
+ CFG_ENABLE_IP_CHKSUM_OFFLOAD_ENABLE ),
+
REG_VARIABLE( CFG_POWERSAVE_OFFLOAD_NAME, WLAN_PARAM_Integer,
hdd_config_t, enablePowersaveOffload,
VAR_FLAGS_OPTIONAL | VAR_FLAGS_RANGE_CHECK_ASSUME_DEFAULT,
@@ -2282,6 +2309,23 @@ REG_VARIABLE( CFG_P2P_LISTEN_OFFLOAD_NAME, WLAN_PARAM_Integer,
CFG_P2P_LISTEN_OFFLOAD_DEFAULT,
CFG_P2P_LISTEN_OFFLOAD_DISABLE,
CFG_P2P_LISTEN_OFFLOAD_ENABLE ),
+
+#ifdef WLAN_FEATURE_11AC
+REG_VARIABLE( CFG_VHT_AMPDU_LEN_EXPONENT_NAME, WLAN_PARAM_Integer,
+ hdd_config_t, fVhtAmpduLenExponent,
+ VAR_FLAGS_OPTIONAL | VAR_FLAGS_RANGE_CHECK ,
+ CFG_VHT_AMPDU_LEN_EXPONENT_DEFAULT,
+ CFG_VHT_AMPDU_LEN_EXPONENT_MIN,
+ CFG_VHT_AMPDU_LEN_EXPONENT_MAX),
+
+REG_VARIABLE( CFG_VHT_MPDU_LEN_NAME, WLAN_PARAM_Integer,
+ hdd_config_t, vhtMpduLen,
+ VAR_FLAGS_OPTIONAL | VAR_FLAGS_RANGE_CHECK ,
+ CFG_VHT_MPDU_LEN_DEFAULT,
+ CFG_VHT_MPDU_LEN_MIN,
+ CFG_VHT_MPDU_LEN_MAX),
+#endif
+
};
/*
@@ -3748,6 +3792,44 @@ v_BOOL_t hdd_update_config_dat( hdd_context_t *pHddCtx )
fStatus = FALSE;
hddLog(LOGE, "Could not pass on WNI_CFG_VHT_TX_MCS_MAP to CCM\n");
}
+
+ // Hardware is capable of doing 128K AMPDU in 11AC mode
+ if(ccmCfgSetInt(pHddCtx->hHal, WNI_CFG_VHT_AMPDU_LEN_EXPONENT,
+ pConfig->fVhtAmpduLenExponent, NULL,
+ eANI_BOOLEAN_FALSE)
+ == eHAL_STATUS_FAILURE)
+ {
+ fStatus = FALSE;
+ hddLog(LOGE, "Could not pass on WNI_CFG_VHT_AMPDU_LEN_EXPONENT to CCM\n");
+ }
+
+ /* Change MU Bformee only when TxBF is enabled */
+ if (pConfig->enableTxBF)
+ {
+ ccmCfgGetInt(pHddCtx->hHal, WNI_CFG_VHT_MU_BEAMFORMEE_CAP,
+ &temp);
+
+ if(temp != pConfig->enableMuBformee)
+ {
+ if(ccmCfgSetInt(pHddCtx->hHal,
+ WNI_CFG_VHT_MU_BEAMFORMEE_CAP,
+ pConfig->enableMuBformee, NULL,
+ eANI_BOOLEAN_FALSE) ==eHAL_STATUS_FAILURE)
+ {
+ fStatus = FALSE;
+ hddLog(LOGE, "Could not pass on\
+ WNI_CFG_VHT_MU_BEAMFORMEE_CAP to CCM\n");
+ }
+ }
+ }
+ if(ccmCfgSetInt(pHddCtx->hHal, WNI_CFG_VHT_MAX_MPDU_LENGTH,
+ pConfig->vhtMpduLen, NULL,
+ eANI_BOOLEAN_FALSE)
+ == eHAL_STATUS_FAILURE)
+ {
+ fStatus = FALSE;
+ hddLog(LOGE, "Could not pass on WNI_CFG_VHT_MAX_MPDU_LENGTH to CCM\n");
+ }
}
}
#endif
@@ -3771,6 +3853,8 @@ v_BOOL_t hdd_update_config_dat( hdd_context_t *pHddCtx )
val16 = (tANI_U16)val;
phtCapInfo = (tSirMacHTCapabilityInfo *)&val16;
phtCapInfo->rxSTBC = pConfig->enableRxSTBC;
+ phtCapInfo->txSTBC = pConfig->enableTxSTBC;
+ phtCapInfo->advCodingCap = pConfig->enableRxLDPC;
if(ccmCfgSetInt(pHddCtx->hHal, WNI_CFG_HT_CAP_INFO,
*(tANI_U16 *)phtCapInfo, NULL, eANI_BOOLEAN_FALSE)
@@ -3788,6 +3872,22 @@ v_BOOL_t hdd_update_config_dat( hdd_context_t *pHddCtx )
hddLog(LOGE, "Could not pass on WNI_CFG_VHT_RXSTBC to CCM\n");
}
+ if(ccmCfgSetInt(pHddCtx->hHal, WNI_CFG_VHT_TXSTBC,
+ pConfig->enableTxSTBC, NULL, eANI_BOOLEAN_FALSE)
+ ==eHAL_STATUS_FAILURE)
+ {
+ fStatus = FALSE;
+ hddLog(LOGE, "Could not pass on WNI_CFG_VHT_TXSTBC to CCM\n");
+ }
+
+ if(ccmCfgSetInt(pHddCtx->hHal, WNI_CFG_VHT_LDPC_CODING_CAP,
+ pConfig->enableRxLDPC, NULL, eANI_BOOLEAN_FALSE)
+ ==eHAL_STATUS_FAILURE)
+ {
+ fStatus = FALSE;
+ hddLog(LOGE, "Could not pass on WNI_CFG_VHT_LDPC_CODING_CAP to CCM\n");
+ }
+
#ifdef WLAN_SOFTAP_VSTA_FEATURE
if(pConfig->fEnableVSTASupport)
{
@@ -3936,6 +4036,7 @@ VOS_STATUS hdd_set_sme_config( hdd_context_t *pHddCtx )
smeConfig.csrConfig.txBFCsnValue = pConfig->txBFCsnValue;
smeConfig.csrConfig.enable2x2 = pConfig->enable2x2;
smeConfig.csrConfig.enableVhtFor24GHz = pConfig->enableVhtFor24GHzBand;
+ smeConfig.csrConfig.enableMuBformee = pConfig->enableMuBformee;
#endif
smeConfig.csrConfig.AdHocChannel5G = pConfig->AdHocChannel5G;
smeConfig.csrConfig.AdHocChannel24 = pConfig->AdHocChannel24G;
diff --git a/CORE/HDD/src/wlan_hdd_cfg80211.c b/CORE/HDD/src/wlan_hdd_cfg80211.c
index 1c86dff9a5d7..0983312a1cba 100644
--- a/CORE/HDD/src/wlan_hdd_cfg80211.c
+++ b/CORE/HDD/src/wlan_hdd_cfg80211.c
@@ -3145,7 +3145,9 @@ static int wlan_hdd_cfg80211_add_key( struct wiphy *wiphy,
v_U32_t roamId= 0xFF;
v_CONTEXT_t pVosContext = (WLAN_HDD_GET_CTX(pAdapter))->pvosContext;
hdd_hostapd_state_t *pHostapdState;
+#ifndef QCA_WIFI_2_0
VOS_STATUS vos_status;
+#endif
eHalStatus halStatus;
ENTER();
@@ -3362,6 +3364,7 @@ static int wlan_hdd_cfg80211_add_key( struct wiphy *wiphy,
setKey.peerMac[4], setKey.peerMac[5],
setKey.keyDirection);
+#ifndef QCA_WIFI_2_0
vos_status = wlan_hdd_check_ula_done(pAdapter);
if ( vos_status != VOS_STATUS_SUCCESS )
@@ -3375,6 +3378,7 @@ static int wlan_hdd_cfg80211_add_key( struct wiphy *wiphy,
return -EINVAL;
}
+#endif
#ifdef WLAN_FEATURE_VOWIFI_11R
/* The supplicant may attempt to set the PTK once pre-authentication
diff --git a/CORE/HDD/src/wlan_hdd_early_suspend.c b/CORE/HDD/src/wlan_hdd_early_suspend.c
index c1afdd11ca94..e78159c108a0 100644
--- a/CORE/HDD/src/wlan_hdd_early_suspend.c
+++ b/CORE/HDD/src/wlan_hdd_early_suspend.c
@@ -1093,47 +1093,13 @@ void hdd_suspend_wlan(void)
}
}
-#ifndef QCA_WIFI_2_0
- /*Suspend notification sent down to driver*/
- hdd_conf_suspend_ind(pHddCtx, pAdapter);
-#endif
-
-#ifdef WLAN_FEATURE_GTK_OFFLOAD
- if ((WLAN_HDD_INFRA_STATION == pAdapter->device_mode) ||
- (WLAN_HDD_P2P_CLIENT == pAdapter->device_mode))
- {
- eHalStatus ret;
- hdd_station_ctx_t *pHddStaCtx = WLAN_HDD_GET_STATION_CTX_PTR(pAdapter);
- if ((eConnectionState_Associated == pHddStaCtx->conn_info.connState) &&
- (GTK_OFFLOAD_ENABLE == pHddStaCtx->gtkOffloadReqParams.ulFlags ))
- {
- tSirGtkOffloadParams hddGtkOffloadReqParams;
- vos_mem_copy(&hddGtkOffloadReqParams,
- &pHddStaCtx->gtkOffloadReqParams,
- sizeof (tSirGtkOffloadParams));
-
- ret = sme_SetGTKOffload(WLAN_HDD_GET_HAL_CTX(pAdapter),
- &hddGtkOffloadReqParams, pAdapter->sessionId);
- if (eHAL_STATUS_SUCCESS != ret)
- {
- VOS_TRACE(VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_ERROR,
- "%s: sme_SetGTKOffload failed, returned %d",
- __func__, ret);
- }
-
- VOS_TRACE(VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_INFO,
- "%s: sme_SetGTKOffload successfull", __func__);
- }
- }
-#endif
-
#ifdef QCA_WIFI_2_0
send_suspend_ind:
+#endif
/* Keep this suspend indication at the end (before processing next adaptor)
* for discrete. This indication is considered as trigger point to start
* WOW (if wow is enabled). */
hdd_conf_suspend_ind(pHddCtx, pAdapter);
-#endif
status = hdd_get_next_adapter ( pHddCtx, pAdapterNode, &pNext );
pAdapterNode = pNext;
diff --git a/CORE/HDD/src/wlan_hdd_main.c b/CORE/HDD/src/wlan_hdd_main.c
index b4b10619de05..7da603398066 100644
--- a/CORE/HDD/src/wlan_hdd_main.c
+++ b/CORE/HDD/src/wlan_hdd_main.c
@@ -2085,6 +2085,17 @@ static void hdd_update_tgt_vht_cap(hdd_context_t *hdd_ctx,
if (pconfig->enableTxBF && !cfg->vht_su_bformee)
pconfig->enableTxBF = cfg->vht_su_bformee;
+ status = ccmCfgSetInt(hdd_ctx->hHal,
+ WNI_CFG_VHT_SU_BEAMFORMEE_CAP,
+ pconfig->enableTxBF, NULL,
+ eANI_BOOLEAN_FALSE);
+
+ if (status == eHAL_STATUS_FAILURE) {
+ VOS_TRACE(VOS_MODULE_ID_VOSS, VOS_TRACE_LEVEL_FATAL,
+ "%s: could not set VHT SU BEAMFORMEE CAP",
+ __func__);
+ }
+
/* Get VHT MU Beamformer cap */
status = ccmCfgGetInt(hdd_ctx->hHal, WNI_CFG_VHT_MU_BEAMFORMER_CAP,
&value);
@@ -2146,8 +2157,15 @@ static void hdd_update_tgt_vht_cap(hdd_context_t *hdd_ctx,
value = 0;
}
- /* set VHT MAX AMPDU Len exp */
- if (value && !cfg->vht_max_ampdu_len_exp) {
+ /*
+ * VHT max AMPDU len exp:
+ * override if user configured value is too high
+ * that the target cannot support.
+ * Even though Rome publish ampdu_len=7, it can
+ * only support 4 because of some h/w bug.
+ */
+
+ if (value > cfg->vht_max_ampdu_len_exp) {
status = ccmCfgSetInt(hdd_ctx->hHal,
WNI_CFG_VHT_AMPDU_LEN_EXPONENT,
cfg->vht_max_ampdu_len_exp, NULL,
@@ -2206,6 +2224,8 @@ void hdd_update_tgt_cfg(void *context, void *param)
MAC_ADDR_ARRAY(hdd_ctx->cfg_ini->intfMacAddr[0].bytes));
}
+ hdd_ctx->target_fw_version = cfg->target_fw_version;
+
hdd_update_tgt_services(hdd_ctx, &cfg->services);
hdd_update_tgt_ht_cap(hdd_ctx, &cfg->ht_cap);
@@ -3216,12 +3236,14 @@ static hdd_adapter_t* hdd_alloc_station_adapter( hdd_context_t *pHddCtx, tSirMac
pWlanDev->watchdog_timeo = HDD_TX_TIMEOUT;
pWlanDev->hard_header_len += LIBRA_HW_NEEDED_HEADROOM;
- if (pHddCtx->cfg_ini->enableTCPChkSumOffld) {
+ if (pHddCtx->cfg_ini->enableIPChecksumOffload)
+ pWlanDev->features |= NETIF_F_HW_CSUM;
+ else if (pHddCtx->cfg_ini->enableTCPChkSumOffld)
pWlanDev->features |= NETIF_F_IP_CSUM | NETIF_F_IPV6_CSUM;
+
#if defined (QCA_WIFI_2_0) && !defined (QCA_WIFI_ISOC)
- pWlanDev->features |= NETIF_F_RXCSUM;
+ pWlanDev->features |= NETIF_F_RXCSUM;
#endif
- }
hdd_set_station_ops( pAdapter->dev );
@@ -5556,6 +5578,9 @@ int hdd_wlan_startup(struct device *dev, v_VOID_t *hif_sc)
#else
hif_init_adf_ctx(adf_ctx, hif_sc);
((VosContextType*)pVosContext)->pHIFContext = hif_sc;
+
+ /* store target type and target version info in hdd ctx */
+ pHddCtx->target_type = ((struct ol_softc *)hif_sc)->target_type;
#endif
((VosContextType*)(pVosContext))->adf_ctx = adf_ctx;
#endif /* QCA_WIFI_2_0 */
@@ -5987,6 +6012,18 @@ register_wiphy:
goto err_nl_srv;
}
+#ifdef FEATURE_OEM_DATA_SUPPORT
+#ifdef QCA_WIFI_2_0
+ //Initialize the OEM service
+ if (oem_activate_service(pHddCtx) != 0)
+ {
+ hddLog(VOS_TRACE_LEVEL_FATAL,
+ "%s: oem_activate_service failed", __func__);
+ goto err_nl_srv;
+ }
+#endif
+#endif
+
#ifdef PTT_SOCK_SVC_ENABLE
//Initialize the PTT service
if(ptt_sock_activate_svc(pHddCtx) != 0)
diff --git a/CORE/HDD/src/wlan_hdd_oemdata.c b/CORE/HDD/src/wlan_hdd_oemdata.c
index 3eb0e01d5af2..7ab47b9e02e9 100644
--- a/CORE/HDD/src/wlan_hdd_oemdata.c
+++ b/CORE/HDD/src/wlan_hdd_oemdata.c
@@ -45,6 +45,12 @@
#include <linux/wireless.h>
#include <wlan_hdd_includes.h>
#include <net/arp.h>
+#include "qwlan_version.h"
+
+#ifdef QCA_WIFI_2_0
+static struct hdd_context_s *pHddCtx;
+#endif /* QCA_WIFI_2_0 */
+
/*---------------------------------------------------------------------------------------------
@@ -158,9 +164,9 @@ int iw_get_oem_data_rsp(
return eHAL_STATUS_SUCCESS;
}
-/**--------------------------------------------------------------------------------------------
+/**---------------------------------------------------------------------------
- \brief iw_set_oem_data_req() -
+ \brief iw_set_oem_data_req()
This function sets the oem data req configuration. This invokes
the respective sme oem data req functionality. Function for
@@ -229,5 +235,658 @@ int iw_set_oem_data_req(
return status;
}
+#ifdef QCA_WIFI_2_0
+
+/* Forward declaration */
+static int oem_msg_callback(struct sk_buff *skb);
+
+/**---------------------------------------------------------------------------
+
+ \brief iw_get_oem_data_cap()
+
+ This function gets the capability information for OEM Data Request
+ and Response.
+
+ \param - dev - Pointer to the net device
+ - info - Pointer to the iw_oem_data_cap
+ - wrqu - Pointer to the iwreq data
+ - extra - Pointer to the data
+
+ \return - 0 for success, non zero for failure
+
+----------------------------------------------------------------------------*/
+int iw_get_oem_data_cap(
+ struct net_device *dev,
+ struct iw_request_info *info,
+ union iwreq_data *wrqu,
+ char *extra)
+{
+ eHalStatus status = eHAL_STATUS_SUCCESS;
+ struct iw_oem_data_cap oemDataCap;
+ struct iw_oem_data_cap *pHddOemDataCap;
+ hdd_adapter_t *pAdapter = (netdev_priv(dev));
+ hdd_context_t *pHddContext;
+ hdd_config_t *pConfig;
+
+ if (!pAdapter)
+ {
+ VOS_TRACE(VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_ERROR,
+ "%s:Invalid context, pAdapter is null", __func__);
+ return -EINVAL;
+ }
+
+ pHddContext = WLAN_HDD_GET_CTX(pAdapter);
+ if (!pHddContext)
+ {
+ VOS_TRACE(VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_ERROR,
+ "%s:Invalid context, HDD context is null", __func__);
+ return -EINVAL;
+ }
+
+ if (pHddContext->isLogpInProgress)
+ {
+ VOS_TRACE(VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_ERROR,
+ "%s:LOGP in Progress. Ignore!!!", __func__);
+ return -EBUSY;
+ }
+
+ pConfig = pHddContext->cfg_ini;
+ if (!pConfig)
+ {
+ VOS_TRACE(VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_ERROR,
+ "%s:HDD configuration is null", __func__);
+ return -ENOENT;
+ }
+
+ do
+ {
+ strlcpy(oemDataCap.oem_target_signature, OEM_TARGET_SIGNATURE,
+ OEM_TARGET_SIGNATURE_LEN);
+ oemDataCap.oem_target_type = pHddContext->target_type;
+ oemDataCap.oem_fw_version = pHddContext->target_fw_version;
+ oemDataCap.driver_version.major = QWLAN_VERSION_MAJOR;
+ oemDataCap.driver_version.minor = QWLAN_VERSION_MINOR;
+ oemDataCap.driver_version.patch = QWLAN_VERSION_PATCH;
+ oemDataCap.driver_version.build = QWLAN_VERSION_BUILD;
+ oemDataCap.allowed_dwell_time_min = pConfig->nNeighborScanMinChanTime;
+ oemDataCap.allowed_dwell_time_max = pConfig->nNeighborScanMaxChanTime;
+ oemDataCap.curr_dwell_time_min =
+ sme_getNeighborScanMinChanTime(pHddContext->hHal);
+ oemDataCap.curr_dwell_time_max =
+ sme_getNeighborScanMaxChanTime(pHddContext->hHal);
+ oemDataCap.supported_bands = pConfig->nBandCapability;
+
+ status = sme_getValidChannelList(pHddContext->hHal,
+ &oemDataCap.num_channels,
+ &oemDataCap.channel_list);
+ if (eHAL_STATUS_SUCCESS == status)
+ {
+ VOS_TRACE(VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_ERROR,
+ "%s:failed to get valid channel list", __func__);
+ return -ENOENT;
+ }
+
+ pHddOemDataCap = (struct iw_oem_data_cap *)(extra);
+ vos_mem_copy(pHddOemDataCap, &oemDataCap,
+ sizeof(struct iw_oem_data_cap));
+ } while(0);
+
+ return status;
+}
+
+/**---------------------------------------------------------------------------
+
+ \brief send_oem_reg_rsp_nlink_msg() - send oem registration response
+
+ This function sends oem message to registetred application process
+
+ \param -
+ - none
+
+ \return - none
+
+ --------------------------------------------------------------------------*/
+void send_oem_reg_rsp_nlink_msg(void)
+{
+ struct sk_buff *skb;
+ struct nlmsghdr *nlh;
+ tAniMsgHdr *aniHdr;
+ tANI_U8 *buf;
+ tANI_U8 *numInterfaces;
+ tANI_U8 *deviceMode;
+ tANI_U8 *vdevId;
+ hdd_adapter_list_node_t *pAdapterNode = NULL;
+ hdd_adapter_list_node_t *pNext = NULL;
+ hdd_adapter_t *pAdapter = NULL;
+ VOS_STATUS status = 0;
+
+ /* OEM message is always to a specific process and cannot be a broadcast */
+ if (pHddCtx->oem_pid == 0)
+ {
+ VOS_TRACE(VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_ERROR,
+ "%s: invalid dest pid", __func__);
+ return;
+ }
+
+ skb = alloc_skb(NLMSG_SPACE(WLAN_NL_MAX_PAYLOAD), GFP_KERNEL);
+ if (skb == NULL)
+ {
+ VOS_TRACE(VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_ERROR,
+ "%s: alloc_skb failed", __func__);
+ return;
+ }
+
+ nlh = (struct nlmsghdr *)skb->data;
+ nlh->nlmsg_pid = 0; /* from kernel */
+ nlh->nlmsg_flags = 0;
+ nlh->nlmsg_seq = 0;
+ nlh->nlmsg_type = WLAN_NL_MSG_OEM;
+ aniHdr = NLMSG_DATA(nlh);
+ aniHdr->type = ANI_MSG_APP_REG_RSP;
+
+ /* Fill message body:
+ * First byte will be number of interfaces, followed by
+ * two bytes for each interfaces
+ * - one byte for device mode
+ * - one byte for vdev id
+ */
+ buf = (char *) ((char *)aniHdr + sizeof(tAniMsgHdr));
+ numInterfaces = buf++;
+ *numInterfaces = 0;
+
+ /* Iterate through each of the adapters and fill device mode and vdev id */
+ status = hdd_get_front_adapter(pHddCtx, &pAdapterNode);
+ while ((VOS_STATUS_SUCCESS == status) && pAdapterNode)
+ {
+ pAdapter = pAdapterNode->pAdapter;
+ if (pAdapter)
+ {
+ deviceMode = buf++;
+ vdevId = buf++;
+ *deviceMode = pAdapter->device_mode;
+ *vdevId = pAdapter->sessionId;
+ (*numInterfaces)++;
+ VOS_TRACE(VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_INFO,
+ "%s: numInterfaces: %d, deviceMode: %d, vdevId: %d",
+ __func__, *numInterfaces, *deviceMode, *vdevId);
+ }
+ status = hdd_get_next_adapter(pHddCtx, pAdapterNode, &pNext);
+ pAdapterNode = pNext;
+ }
+
+ aniHdr->length = sizeof(tANI_U8) + (*numInterfaces) * 2 * sizeof(tANI_U8);
+ nlh->nlmsg_len = NLMSG_LENGTH((sizeof(tAniMsgHdr) + aniHdr->length));
+
+ skb_put(skb, NLMSG_SPACE((sizeof(tAniMsgHdr) + aniHdr->length)));
+
+ VOS_TRACE(VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_INFO,
+ "%s: sending App Reg Response length (%d) to process pid (%d)",
+ __func__, aniHdr->length, pHddCtx->oem_pid);
+
+ (void)nl_srv_ucast(skb, pHddCtx->oem_pid);
+
+ return;
+}
+
+/**---------------------------------------------------------------------------
+
+ \brief send_oem_err_rsp_nlink_msg() - send oem error response
+
+ This function sends error response to oem app
+
+ \param -
+ - app_pid - PID of oem application process
+
+ \return - none
+
+ --------------------------------------------------------------------------*/
+void send_oem_err_rsp_nlink_msg(v_SINT_t app_pid, tANI_U8 error_code)
+{
+ struct sk_buff *skb;
+ struct nlmsghdr *nlh;
+ tAniMsgHdr *aniHdr;
+ tANI_U8 *buf;
+
+ skb = alloc_skb(NLMSG_SPACE(WLAN_NL_MAX_PAYLOAD), GFP_KERNEL);
+ if (skb == NULL)
+ {
+ VOS_TRACE(VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_ERROR,
+ "%s: alloc_skb failed", __func__);
+ return;
+ }
+
+ nlh = (struct nlmsghdr *)skb->data;
+ nlh->nlmsg_pid = 0; /* from kernel */
+ nlh->nlmsg_flags = 0;
+ nlh->nlmsg_seq = 0;
+ nlh->nlmsg_type = WLAN_NL_MSG_OEM;
+ aniHdr = NLMSG_DATA(nlh);
+ aniHdr->type = ANI_MSG_OEM_ERROR;
+ aniHdr->length = sizeof(tANI_U8);
+ nlh->nlmsg_len = NLMSG_LENGTH(sizeof(tAniMsgHdr) + aniHdr->length);
+
+ /* message body will contain one byte of error code */
+ buf = (char *) ((char *) aniHdr + sizeof(tAniMsgHdr));
+ *buf = error_code;
+
+ skb_put(skb, NLMSG_SPACE(sizeof(tAniMsgHdr)));
+
+ VOS_TRACE(VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_INFO,
+ "%s: sending oem error response to process pid (%d)",
+ __func__, app_pid);
+
+ (void)nl_srv_ucast(skb, app_pid);
+
+ return;
+}
+
+/**---------------------------------------------------------------------------
+
+ \brief send_oem_data_rsp_msg() - send oem data response
+
+ This function sends oem data rsp message to registetred application process
+ over the netlink socket.
+
+ \param -
+ - oemDataRsp - Pointer to OEM Data Response struct
+
+ \return - 0 for success, non zero for failure
+
+ --------------------------------------------------------------------------*/
+void send_oem_data_rsp_msg(int length, tANI_U8 *oemDataRsp)
+{
+ struct sk_buff *skb;
+ struct nlmsghdr *nlh;
+ tAniMsgHdr *aniHdr;
+ tANI_U8 *oemData;
+
+ /* OEM message is always to a specific process and cannot be a broadcast */
+ if (pHddCtx->oem_pid == 0)
+ {
+ VOS_TRACE(VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_ERROR,
+ "%s: invalid dest pid", __func__);
+ return;
+ }
+
+ if (length > OEM_DATA_RSP_SIZE)
+ {
+ VOS_TRACE(VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_ERROR,
+ "%s: invalid length of Oem Data response", __func__);
+ return;
+ }
+
+ skb = alloc_skb(NLMSG_SPACE(sizeof(struct nlmsghdr) + OEM_DATA_RSP_SIZE),
+ GFP_KERNEL);
+ if (skb == NULL)
+ {
+ VOS_TRACE(VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_ERROR,
+ "%s: alloc_skb failed", __func__);
+ return;
+ }
+
+ nlh = (struct nlmsghdr *)skb->data;
+ nlh->nlmsg_pid = 0; /* from kernel */
+ nlh->nlmsg_flags = 0;
+ nlh->nlmsg_seq = 0;
+ nlh->nlmsg_type = WLAN_NL_MSG_OEM;
+ aniHdr = NLMSG_DATA(nlh);
+ aniHdr->type = ANI_MSG_OEM_DATA_RSP;
+
+ aniHdr->length = length;
+ nlh->nlmsg_len = NLMSG_LENGTH((sizeof(tAniMsgHdr) + aniHdr->length));
+ oemData = (tANI_U8 *) ((char *)aniHdr + sizeof(tAniMsgHdr));
+ vos_mem_copy(oemData, oemDataRsp, length);
+
+ skb_put(skb, NLMSG_SPACE((sizeof(tAniMsgHdr) + aniHdr->length)));
+
+ VOS_TRACE(VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_INFO,
+ "%s: sending Oem Data Response of len (%d) to process pid (%d)",
+ __func__, length, pHddCtx->oem_pid);
+
+ (void)nl_srv_ucast(skb, pHddCtx->oem_pid);
+
+ return;
+}
+
+/**---------------------------------------------------------------------------
+
+ \brief oem_process_data_req_msg() - process oem data request
+
+ This function sends oem message to SME
+
+ \param -
+ - oemDataLen - Length to OEM Data buffer
+ - oemData - Pointer to OEM Data buffer
+
+ \return - 0 for success, non zero for failure
+
+ --------------------------------------------------------------------------*/
+int oem_process_data_req_msg(int oemDataLen, char *oemData)
+{
+ hdd_adapter_t *pAdapter = NULL;
+ tOemDataReqConfig oemDataReqConfig;
+ tANI_U32 oemDataReqID = 0;
+ eHalStatus status = eHAL_STATUS_SUCCESS;
+
+ /* for now, STA interface only */
+ pAdapter = hdd_get_adapter(pHddCtx, WLAN_HDD_INFRA_STATION);
+ if (!pAdapter)
+ {
+ VOS_TRACE(VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_ERROR,
+ "%s: No adapter for STA mode", __func__);
+ return eHAL_STATUS_FAILURE;
+ }
+
+ if (!oemData)
+ {
+ hddLog(LOGE, "in %s oemData is NULL\n", __func__);
+ return eHAL_STATUS_FAILURE;
+ }
+
+ vos_mem_zero(&oemDataReqConfig, sizeof(tOemDataReqConfig));
+
+ vos_mem_copy((&oemDataReqConfig)->oemDataReq, oemData, oemDataLen);
+
+ status = sme_OemDataReq(pHddCtx->hHal,
+ pAdapter->sessionId,
+ &oemDataReqConfig,
+ &oemDataReqID,
+ &hdd_OemDataReqCallback,
+ pAdapter->dev);
+ return status;
+}
+
+/**---------------------------------------------------------------------------
+
+ \brief oem_process_channel_info_req_msg() - process oem channel_info request
+
+ This function responds with channel info to oem process
+
+ \param -
+ - numOfChannels - number of channels
+ - chanList - channel list
+
+ \return - 0 for success, non zero for failure
+
+ --------------------------------------------------------------------------*/
+int oem_process_channel_info_req_msg(int numOfChannels, char *chanList)
+{
+ struct sk_buff *skb;
+ struct nlmsghdr *nlh;
+ tAniMsgHdr *aniHdr;
+ tSmeChannelInfo *pChanInfo;
+ tSmeChannelInfo chanInfo;
+ tANI_U8 chanId;
+ eHalStatus status = eHAL_STATUS_FAILURE;
+ int i;
+ tANI_U8 *buf;
+
+ /* OEM message is always to a specific process and cannot be a broadcast */
+ if (pHddCtx->oem_pid == 0)
+ {
+ VOS_TRACE(VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_ERROR,
+ "%s: invalid dest pid", __func__);
+ return -1;
+ }
+
+ skb = alloc_skb(NLMSG_SPACE(sizeof(struct nlmsghdr) + sizeof(tANI_U8) +
+ numOfChannels * sizeof(tSmeChannelInfo)), GFP_KERNEL);
+ if (skb == NULL)
+ {
+ VOS_TRACE(VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_ERROR,
+ "%s: alloc_skb failed", __func__);
+ return -1;
+ }
+
+ nlh = (struct nlmsghdr *)skb->data;
+ nlh->nlmsg_pid = 0; /* from kernel */
+ nlh->nlmsg_flags = 0;
+ nlh->nlmsg_seq = 0;
+ nlh->nlmsg_type = WLAN_NL_MSG_OEM;
+ aniHdr = NLMSG_DATA(nlh);
+ aniHdr->type = ANI_MSG_CHANNEL_INFO_RSP;
+
+ aniHdr->length = sizeof(tANI_U8) + numOfChannels * sizeof(tSmeChannelInfo);
+ nlh->nlmsg_len = NLMSG_LENGTH((sizeof(tAniMsgHdr) + aniHdr->length));
+
+ /* First byte of message body will have num of channels */
+ buf = (char *) ((char *)aniHdr + sizeof(tAniMsgHdr));
+ *buf++ = numOfChannels;
+
+ /* Next follows channel info struct for each channel id.
+ * If chan id is wrong or SME returns failure for a channel
+ * then fill in 0 in channel info for that particular channel
+ */
+ for (i = 0 ; i < numOfChannels; i++)
+ {
+ pChanInfo = (tSmeChannelInfo *) ((char *) buf +
+ i * sizeof(tSmeChannelInfo));
+
+ chanId = chanList[i];
+ status = sme_getChannelInfo(pHddCtx->hHal, chanId, &chanInfo);
+ if (eHAL_STATUS_SUCCESS != status)
+ {
+ /* channel info is not returned, fill in zeros in channel
+ * info struct
+ */
+ VOS_TRACE(VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_INFO,
+ "%s: sme_getChannelInfo failed for chan (%d), return info 0",
+ __func__, chanId);
+ chanInfo.chan_id = chanId;
+ chanInfo.mhz = 0;
+ chanInfo.band_center_freq1 = 0;
+ chanInfo.band_center_freq2 = 0;
+ chanInfo.info = 0;
+ chanInfo.reg_info_1 = 0;
+ chanInfo.reg_info_2 = 0;
+ }
+ vos_mem_copy(pChanInfo, &chanInfo, sizeof(tSmeChannelInfo));
+ }
+
+ skb_put(skb, NLMSG_SPACE((sizeof(tAniMsgHdr) + aniHdr->length)));
+
+ VOS_TRACE(VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_INFO,
+ "%s: sending channel info resp for num channels (%d) to pid (%d)",
+ __func__, numOfChannels, pHddCtx->oem_pid);
+
+ (void)nl_srv_ucast(skb, pHddCtx->oem_pid);
+
+ return 0;
+}
+
+/**---------------------------------------------------------------------------
+
+ \brief oem_activate_service() - Activate oem message handler
+
+ This function registers a handler to receive netlink message from
+ an OEM application process.
+
+ \param -
+ - pAdapter - ponter to HDD adapter
+
+ \return - 0 for success, non zero for failure
+
+ --------------------------------------------------------------------------*/
+int oem_activate_service(void *pAdapter)
+{
+ pHddCtx = (struct hdd_context_s*) pAdapter;
+
+ /* Register the msg handler for msgs addressed to WLAN_NL_MSG_OEM */
+ nl_srv_register(WLAN_NL_MSG_OEM, oem_msg_callback);
+ return 0;
+}
+
+/*
+ * Callback function invoked by Netlink service for all netlink
+ * messages (from user space) addressed to WLAN_NL_MSG_OEM
+ */
+/**---------------------------------------------------------------------------
+
+ \brief oem_msg_callback() - callback invoked by netlink service
+
+ This function gets invoked by netlink service when a message
+ is received from user space addressed to WLAN_NL_MSG_OEM
+
+ \param -
+ - skb - skb with netlink message
+
+ \return - 0 for success, non zero for failure
+
+ --------------------------------------------------------------------------*/
+int oem_msg_callback(struct sk_buff *skb)
+{
+ struct nlmsghdr *nlh;
+ tAniMsgHdr *msg_hdr;
+ char *sign_str = NULL;
+ nlh = (struct nlmsghdr *)skb->data;
+
+ if (!nlh)
+ {
+ VOS_TRACE(VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_ERROR,
+ "%s: Netlink header null", __func__);
+ return -1;
+ }
+
+ if (!pHddCtx)
+ {
+ VOS_TRACE(VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_ERROR,
+ "%s: HDD context null", __func__);
+ send_oem_err_rsp_nlink_msg(nlh->nlmsg_pid, OEM_ERR_NULL_CONTEXT);
+ return -1;
+ }
+
+ if (pHddCtx->isLogpInProgress)
+ {
+ VOS_TRACE(VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_ERROR,
+ "%s:LOGP in Progress. Ignore!!!", __func__);
+ return -EBUSY;
+ }
+
+ msg_hdr = NLMSG_DATA(nlh);
+
+ if (!msg_hdr)
+ {
+ VOS_TRACE(VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_ERROR,
+ "%s: Message header null", __func__);
+ send_oem_err_rsp_nlink_msg(nlh->nlmsg_pid, OEM_ERR_NULL_MESSAGE_HEADER);
+ return -1;
+ }
+
+ if (nlh->nlmsg_len < NLMSG_LENGTH(sizeof(tAniMsgHdr) + msg_hdr->length))
+ {
+ VOS_TRACE(VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_ERROR,
+ "%s: Invalid nl msg len, nlh->nlmsg_len (%d), msg_hdr->len (%d)",
+ __func__, nlh->nlmsg_len, msg_hdr->length);
+ send_oem_err_rsp_nlink_msg(nlh->nlmsg_pid, OEM_ERR_INVALID_MESSAGE_LENGTH);
+ return -1;
+ }
+
+ switch (msg_hdr->type)
+ {
+ case ANI_MSG_APP_REG_REQ:
+ /* Registration request is only allowed for Qualcomm Application */
+ VOS_TRACE(VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_INFO,
+ "%s: Received App Req Req from App process pid(%d), len(%d)",
+ __func__, nlh->nlmsg_pid, msg_hdr->length);
+
+ sign_str = (char *)((char *)msg_hdr + sizeof(tAniMsgHdr));
+ if ((OEM_APP_SIGNATURE_LEN == msg_hdr->length) &&
+ (0 == strncmp(sign_str, OEM_APP_SIGNATURE_STR,
+ OEM_APP_SIGNATURE_LEN)))
+ {
+ VOS_TRACE(VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_ERROR,
+ "%s: Received App Req Req from App process pid(%d)",
+ __func__, nlh->nlmsg_pid);
+
+ pHddCtx->oem_app_registered = TRUE;
+ pHddCtx->oem_pid = nlh->nlmsg_pid;
+ send_oem_reg_rsp_nlink_msg();
+ }
+ else
+ {
+ VOS_TRACE(VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_ERROR,
+ "%s: Invalid signature in App Reg Request from pid(%d)",
+ __func__, nlh->nlmsg_pid);
+ send_oem_err_rsp_nlink_msg(nlh->nlmsg_pid,
+ OEM_ERR_INVALID_SIGNATURE);
+ return -1;
+ }
+ break;
+
+ case ANI_MSG_OEM_DATA_REQ:
+ VOS_TRACE(VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_INFO,
+ "%s: Received Oem Data Request length(%d) from pid: %d",
+ __func__, msg_hdr->length, nlh->nlmsg_pid);
+
+ if ((!pHddCtx->oem_app_registered) ||
+ (nlh->nlmsg_pid != pHddCtx->oem_pid))
+ {
+ /* either oem app is not registered yet or pid is different */
+ VOS_TRACE(VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_ERROR,
+ "%s: OEM DataReq: app not regsitered(%d) or incorrect pid(%d)",
+ __func__, pHddCtx->oem_app_registered, nlh->nlmsg_pid);
+ send_oem_err_rsp_nlink_msg(nlh->nlmsg_pid,
+ OEM_ERR_APP_NOT_REGISTERED);
+ return -1;
+ }
+
+ if ((!msg_hdr->length) ||
+ (OEM_DATA_REQ_SIZE < msg_hdr->length))
+ {
+ VOS_TRACE(VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_ERROR,
+ "%s: Invalid length (%d) in Oem Data Request",
+ __func__, msg_hdr->length);
+ send_oem_err_rsp_nlink_msg(nlh->nlmsg_pid,
+ OEM_ERR_INVALID_MESSAGE_LENGTH);
+ return -1;
+ }
+ oem_process_data_req_msg(msg_hdr->length,
+ (char *) ((char *)msg_hdr +
+ sizeof(tAniMsgHdr)));
+ break;
+
+ case ANI_MSG_CHANNEL_INFO_REQ:
+ VOS_TRACE(VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_INFO,
+ "%s: Received channel info request, num channel(%d) from pid: %d",
+ __func__, msg_hdr->length, nlh->nlmsg_pid);
+
+ if ((!pHddCtx->oem_app_registered) ||
+ (nlh->nlmsg_pid != pHddCtx->oem_pid))
+ {
+ /* either oem app is not registered yet or pid is different */
+ VOS_TRACE(VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_ERROR,
+ "%s: Chan InfoReq: app not regsitered(%d) or incorrect pid(%d)",
+ __func__, pHddCtx->oem_app_registered, nlh->nlmsg_pid);
+ send_oem_err_rsp_nlink_msg(nlh->nlmsg_pid,
+ OEM_ERR_APP_NOT_REGISTERED);
+ return -1;
+ }
+
+ /* message length contains list of channel ids */
+ if ((!msg_hdr->length) ||
+ (WNI_CFG_VALID_CHANNEL_LIST_LEN < msg_hdr->length))
+ {
+ VOS_TRACE(VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_ERROR,
+ "%s: Invalid length (%d) in channel info request",
+ __func__, msg_hdr->length);
+ send_oem_err_rsp_nlink_msg(nlh->nlmsg_pid,
+ OEM_ERR_INVALID_MESSAGE_LENGTH);
+ return -1;
+ }
+ oem_process_channel_info_req_msg(msg_hdr->length,
+ (char *)((char*)msg_hdr + sizeof(tAniMsgHdr)));
+ break;
+
+ default:
+ VOS_TRACE(VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_ERROR,
+ "%s: Received Invalid message type (%d), length (%d)",
+ __func__, msg_hdr->type, msg_hdr->length);
+ send_oem_err_rsp_nlink_msg(nlh->nlmsg_pid,
+ OEM_ERR_INVALID_MESSAGE_TYPE);
+ return -1;
+ }
+ return 0;
+}
+#endif /* QCA_WIFI_2_0 */
#endif
diff --git a/CORE/HDD/src/wlan_hdd_p2p.c b/CORE/HDD/src/wlan_hdd_p2p.c
index 30945770fb14..34c8a5622231 100644
--- a/CORE/HDD/src/wlan_hdd_p2p.c
+++ b/CORE/HDD/src/wlan_hdd_p2p.c
@@ -1206,6 +1206,7 @@ int wlan_hdd_add_virtual_intf( struct wiphy *wiphy, char *name,
/*Allow addition multiple interface for WLAN_HDD_P2P_CLIENT session type*/
if (WLAN_HDD_P2P_CLIENT != wlan_hdd_get_session_type(type) &&
+ WLAN_HDD_INFRA_STATION != wlan_hdd_get_session_type(type) &&
hdd_get_adapter(pHddCtx, wlan_hdd_get_session_type(type)) != NULL)
{
hddLog(VOS_TRACE_LEVEL_ERROR,"%s: Interface type %d already exists. Two"
diff --git a/CORE/HDD/src/wlan_hdd_softap_tx_rx.c b/CORE/HDD/src/wlan_hdd_softap_tx_rx.c
index bc273223ab8d..d489bbbc6368 100644
--- a/CORE/HDD/src/wlan_hdd_softap_tx_rx.c
+++ b/CORE/HDD/src/wlan_hdd_softap_tx_rx.c
@@ -1430,7 +1430,6 @@ VOS_STATUS hdd_softap_rx_packet_cbk(v_VOID_t *vosContext,
"%s: send one packet to kernel \n", __func__);
skb->protocol = eth_type_trans(skb, skb->dev);
- skb->ip_summed = CHECKSUM_NONE;
#ifdef WLAN_OPEN_SOURCE
#ifdef WLAN_FEATURE_HOLD_RX_WAKELOCK
wake_lock_timeout(&pHddCtx->rx_wake_lock, msecs_to_jiffies(HDD_WAKE_LOCK_DURATION));
diff --git a/CORE/HDD/src/wlan_hdd_tx_rx.c b/CORE/HDD/src/wlan_hdd_tx_rx.c
index 5fc381e4190d..1cfb6a270eca 100644
--- a/CORE/HDD/src/wlan_hdd_tx_rx.c
+++ b/CORE/HDD/src/wlan_hdd_tx_rx.c
@@ -1730,7 +1730,6 @@ VOS_STATUS hdd_rx_packet_cbk(v_VOID_t *vosContext,
skb->dev = pAdapter->dev;
skb->protocol = eth_type_trans(skb, skb->dev);
- skb->ip_summed = CHECKSUM_NONE;
++pAdapter->hdd_stats.hddTxRxStats.rxPackets;
++pAdapter->stats.rx_packets;
pAdapter->stats.rx_bytes += skb->len;
diff --git a/CORE/HDD/src/wlan_hdd_wext.c b/CORE/HDD/src/wlan_hdd_wext.c
index 914498824d54..8a515076e401 100644
--- a/CORE/HDD/src/wlan_hdd_wext.c
+++ b/CORE/HDD/src/wlan_hdd_wext.c
@@ -199,6 +199,7 @@ static const hdd_freq_chan_map_t freq_chan_map[] = { {2412, 1}, {2417, 2},
#define WE_SET_TXRX_FWSTATS 38
#define WE_SET_VHT_RATE 39
#define WE_DBGLOG_REPORT_ENABLE 40
+#define WE_TXRX_FWSTATS_RESET 41
#endif
/* Private ioctls and their sub-ioctls */
@@ -366,6 +367,10 @@ static const hdd_freq_chan_map_t freq_chan_map[] = { {2412, 1}, {2417, 2},
/* Private ioctl to trigger reassociation */
#define WLAN_SET_POWER_PARAMS (SIOCIWFIRSTPRIV + 29)
+#ifdef FEATURE_OEM_DATA_SUPPORT
+/* Private ioctl to get capability information for OEM Data Request/Response */
+#define WLAN_PRIV_GET_OEM_DATA_CAP (SIOCIWFIRSTPRIV + 30)
+#endif
#define WLAN_GET_LINK_SPEED (SIOCIWFIRSTPRIV + 31)
#define WLAN_STATS_INVALID 0
@@ -2440,7 +2445,6 @@ static int iw_get_linkspeed(struct net_device *dev,
return 0;
}
-
/*
* Support for the RSSI & RSSI-APPROX private commands
* Per the WiFi framework the response must be of the form
@@ -3875,6 +3879,7 @@ static int iw_setint_getnone(struct net_device *dev, struct iw_request_info *inf
hdd_adapter_t *pAdapter = WLAN_HDD_GET_PRIV_PTR(dev);
tHalHandle hHal = WLAN_HDD_GET_HAL_CTX(pAdapter);
hdd_wext_state_t *pWextState = WLAN_HDD_GET_WEXT_STATE_PTR(pAdapter);
+ tSmeConfigParams smeConfig;
int *value = (int *)extra;
int sub_cmd = value[0];
int set_value = value[1];
@@ -3897,15 +3902,16 @@ static int iw_setint_getnone(struct net_device *dev, struct iw_request_info *inf
{
case WE_SET_11D_STATE:
{
- tSmeConfigParams smeConfig;
if((ENABLE_11D == set_value) || (DISABLE_11D == set_value)) {
- sme_GetConfigParam(hHal,&smeConfig);
+ sme_GetConfigParam(hHal, &smeConfig);
smeConfig.csrConfig.Is11dSupportEnabled = (v_BOOL_t)set_value;
- VOS_TRACE(VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_INFO, ("11D state=%ld!!\n"),smeConfig.csrConfig.Is11dSupportEnabled);
+ VOS_TRACE(VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_INFO,
+ ("11D state=%ld!!\n"),
+ smeConfig.csrConfig.Is11dSupportEnabled);
- sme_UpdateConfig(hHal,&smeConfig);
+ sme_UpdateConfig(hHal, &smeConfig);
}
else {
return -EINVAL;
@@ -4335,7 +4341,6 @@ static int iw_setint_getnone(struct net_device *dev, struct iw_request_info *inf
case WE_SET_CHWIDTH:
{
- tSmeConfigParams smeconfig;
bool chwidth;
hdd_context_t *phddctx = WLAN_HDD_GET_CTX(pAdapter);
/*updating channel bonding only on 5Ghz*/
@@ -4350,15 +4355,15 @@ static int iw_setint_getnone(struct net_device *dev, struct iw_request_info *inf
phddctx->cfg_ini->nChannelBondingMode5GHz)))
chwidth = true;
- sme_GetConfigParam(hHal, &smeconfig);
+ sme_GetConfigParam(hHal, &smeConfig);
switch (set_value) {
case eHT_CHANNEL_WIDTH_20MHZ:
- smeconfig.csrConfig.channelBondingMode5GHz =
+ smeConfig.csrConfig.channelBondingMode5GHz =
WNI_CFG_CHANNEL_BONDING_MODE_DISABLE;
break;
case eHT_CHANNEL_WIDTH_40MHZ:
if (chwidth)
- smeconfig.csrConfig.channelBondingMode5GHz =
+ smeConfig.csrConfig.channelBondingMode5GHz =
phddctx->cfg_ini->nChannelBondingMode5GHz;
else
return -EINVAL;
@@ -4366,7 +4371,7 @@ static int iw_setint_getnone(struct net_device *dev, struct iw_request_info *inf
break;
case eHT_CHANNEL_WIDTH_80MHZ:
if (chwidth)
- smeconfig.csrConfig.channelBondingMode5GHz =
+ smeConfig.csrConfig.channelBondingMode5GHz =
phddctx->cfg_ini->nChannelBondingMode5GHz;
else
return -EINVAL;
@@ -4381,7 +4386,7 @@ static int iw_setint_getnone(struct net_device *dev, struct iw_request_info *inf
(int)WMI_VDEV_PARAM_CHWIDTH,
set_value, VDEV_CMD);
if (!ret)
- sme_UpdateConfig(hHal, &smeconfig);
+ sme_UpdateConfig(hHal, &smeConfig);
break;
}
@@ -4621,6 +4626,15 @@ static int iw_setint_getnone(struct net_device *dev, struct iw_request_info *inf
set_value, VDEV_CMD);
break;
}
+
+ case WE_TXRX_FWSTATS_RESET:
+ {
+ hddLog(LOG1, "WE_TXRX_FWSTATS_RESET val %d", set_value);
+ ret = process_wma_set_command((int)pAdapter->sessionId,
+ (int)WMA_VDEV_TXRX_FWSTATS_RESET_CMDID,
+ set_value, VDEV_CMD);
+ break;
+ }
#endif
default:
{
@@ -6512,7 +6526,6 @@ static int iw_set_keepalive_params(struct net_device *dev, struct iw_request_inf
break;
case WLAN_KEEP_ALIVE_UNSOLICIT_ARP_RSP:
-#ifdef QCA_WIFI_ISOC
hddLog(VOS_TRACE_LEVEL_INFO_HIGH, "%s: Keep Alive Request: Tx UnSolicited ARP RSP\n",
__func__);
@@ -6529,11 +6542,6 @@ static int iw_set_keepalive_params(struct net_device *dev, struct iw_request_inf
pRequest->destMacAddr[2], pRequest->destMacAddr[3],
pRequest->destMacAddr[4], pRequest->destMacAddr[5]);
break;
-#else
- hddLog(VOS_TRACE_LEVEL_ERROR, "UnSolicited ARP response type not"
- "supported");
- return -EINVAL;
-#endif
}
/* Execute keep alive request. The reason that we can copy the request information
@@ -7608,6 +7616,9 @@ static const iw_handler we_private[] = {
[WLAN_PRIV_SET_MCBC_FILTER - SIOCIWFIRSTPRIV] = iw_set_dynamic_mcbc_filter,
[WLAN_PRIV_CLEAR_MCBC_FILTER - SIOCIWFIRSTPRIV] = iw_clear_dynamic_mcbc_filter,
[WLAN_SET_POWER_PARAMS - SIOCIWFIRSTPRIV] = iw_set_power_params_priv,
+#ifdef FEATURE_OEM_DATA_SUPPORT
+ [WLAN_PRIV_GET_OEM_DATA_CAP - SIOCIWFIRSTPRIV] = iw_get_oem_data_cap,
+#endif
[WLAN_GET_LINK_SPEED - SIOCIWFIRSTPRIV] = iw_get_linkspeed,
};
@@ -7823,6 +7834,11 @@ static const struct iw_priv_args we_private_args[] = {
IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 1,
0,
"txrx_fw_stats" },
+
+ { WE_TXRX_FWSTATS_RESET,
+ IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 1,
+ 0,
+ "txrx_fw_st_rst" },
#endif
{ WLAN_PRIV_SET_NONE_GET_INT,
@@ -8283,7 +8299,7 @@ static const struct iw_priv_args we_private_args[] = {
{
WLAN_SET_KEEPALIVE_PARAMS,
- IW_PRIV_TYPE_BYTE | sizeof(tKeepAliveRequest),
+ IW_PRIV_TYPE_BYTE | WE_MAX_STR_LEN,
0,
"setKeepAlive" },
#ifdef WLAN_FEATURE_PACKET_FILTERING
@@ -8321,11 +8337,17 @@ static const struct iw_priv_args we_private_args[] = {
IW_PRIV_TYPE_CHAR| WE_MAX_STR_LEN,
0,
"setpowerparams" },
+#ifdef FEATURE_OEM_DATA_SUPPORT
+ {
+ WLAN_PRIV_GET_OEM_DATA_CAP,
+ 0,
+ IW_PRIV_TYPE_BYTE | sizeof(struct iw_oem_data_cap),
+ "getOemDataCap" },
+#endif
{
WLAN_GET_LINK_SPEED,
IW_PRIV_TYPE_CHAR | 18,
IW_PRIV_TYPE_CHAR | 3, "getLinkSpeed" },
-
};
diff --git a/CORE/MAC/inc/sirApi.h b/CORE/MAC/inc/sirApi.h
index 53359683494a..0bb1f64d65de 100644
--- a/CORE/MAC/inc/sirApi.h
+++ b/CORE/MAC/inc/sirApi.h
@@ -129,14 +129,14 @@ enum eSirHostMsgTypes
SIR_HAL_SHUTDOWN_REQ,
SIR_HAL_SHUTDOWN_CNF,
SIR_HAL_RESET_REQ,
- SIR_HAL_RADIO_ON_OFF_IND,
+ SIR_HAL_RADIO_ON_OFF_IND,
SIR_HAL_RESET_CNF,
SIR_WRITE_TO_TD,
SIR_HAL_HDD_ADDBA_REQ, // MAC -> HDD
- SIR_HAL_HDD_ADDBA_RSP, // HDD -> HAL
+ SIR_HAL_HDD_ADDBA_RSP, // HDD -> HAL
SIR_HAL_DELETEBA_IND, // MAC -> HDD
SIR_HAL_BA_FAIL_IND, // HDD -> MAC
- SIR_TL_HAL_FLUSH_AC_REQ,
+ SIR_TL_HAL_FLUSH_AC_REQ,
SIR_HAL_TL_FLUSH_AC_RSP
};
@@ -321,11 +321,11 @@ typedef enum eSirResultCodes
#ifdef WLAN_FEATURE_PACKET_FILTERING
eSIR_SME_PC_FILTER_MATCH_COUNT_REQ_FAILED,
#endif // WLAN_FEATURE_PACKET_FILTERING
-
+
#ifdef WLAN_FEATURE_GTK_OFFLOAD
eSIR_SME_GTK_OFFLOAD_GETINFO_REQ_FAILED,
#endif // WLAN_FEATURE_GTK_OFFLOAD
- eSIR_DONOT_USE_RESULT_CODE = SIR_MAX_ENUM_SIZE
+ eSIR_DONOT_USE_RESULT_CODE = SIR_MAX_ENUM_SIZE
} tSirResultCodes;
/* each station added has a rate mode which specifies the sta attributes */
@@ -479,10 +479,10 @@ typedef struct sSirSmeRsp
typedef struct sSirSmeStartReq
{
tANI_U16 messageType; // eWNI_SME_START_REQ
- tANI_U16 length;
+ tANI_U16 length;
tANI_U8 sessionId; //Added for BT-AMP Support
tANI_U16 transcationId; //Added for BT-AMP Support
- tSirMacAddr bssId; //Added For BT-AMP Support
+ tSirMacAddr bssId; //Added For BT-AMP Support
tANI_U32 roamingAtPolaris;
tANI_U32 sendNewBssInd;
} tSirSmeStartReq, *tpSirSmeStartReq;
@@ -492,7 +492,7 @@ typedef struct sSirSmeReadyReq
{
tANI_U16 messageType; // eWNI_SME_SYS_READY_IND
tANI_U16 length;
- tANI_U16 transactionId;
+ tANI_U16 transactionId;
} tSirSmeReadyReq, *tpSirSmeReadyReq;
/// Definition for response message to previously issued start request
@@ -501,7 +501,7 @@ typedef struct sSirSmeStartRsp
tANI_U16 messageType; // eWNI_SME_START_RSP
tANI_U16 length;
tSirResultCodes statusCode;
- tANI_U16 transactionId;
+ tANI_U16 transactionId;
} tSirSmeStartRsp, *tpSirSmeStartRsp;
@@ -622,7 +622,7 @@ typedef struct sSirSmeStartBssReq
tSirMacSSid ssId;
tANI_U8 channelId;
ePhyChanBondState cbMode;
-
+
tANI_U8 privacy;
tANI_U8 apUapsdEnable;
tANI_U8 ssidHidden;
@@ -681,7 +681,7 @@ typedef struct sSirBssDescription
#endif
#ifdef FEATURE_WLAN_CCX
tANI_U16 QBSSLoad_present;
- tANI_U16 QBSSLoad_avail;
+ tANI_U16 QBSSLoad_avail;
#endif
// Please keep the structure 4 bytes aligned above the ieFields
@@ -692,7 +692,7 @@ typedef struct sSirBssDescription
tANI_U32 WscIeLen;
tANI_U8 WscIeProbeRsp[WSCIE_PROBE_RSP_LEN];
tANI_U8 reservedPadding4;
-
+
tANI_U32 ieFields[1];
} tSirBssDescription, *tpSirBssDescription;
@@ -708,7 +708,7 @@ typedef struct sSirSmeStartBssRsp
tSirResultCodes statusCode;
tSirBssType bssType;//Add new type for WDS mode
tANI_U16 beaconInterval;//Beacon Interval for both type
- tANI_U32 staId;//Staion ID for Self
+ tANI_U32 staId;//Staion ID for Self
tSirBssDescription bssDescription;//Peer BSS description
} tSirSmeStartBssRsp, *tpSirSmeStartBssRsp;
@@ -762,7 +762,7 @@ typedef enum eSirLinkTrafficCheck
#define SIR_BG_SCAN_RETURN_CACHED_RESULTS 0x0
#define SIR_BG_SCAN_PURGE_RESUTLS 0x80
#define SIR_BG_SCAN_RETURN_FRESH_RESULTS 0x01
-#define SIR_SCAN_MAX_NUM_SSID 0x09
+#define SIR_SCAN_MAX_NUM_SSID 0x09
#define SIR_BG_SCAN_RETURN_LFR_CACHED_RESULTS 0x02
#define SIR_BG_SCAN_PURGE_LFR_RESULTS 0x40
@@ -789,7 +789,7 @@ typedef struct sSirSmeScanReq
/**
* maxChannelTime.
* 0x0 - Invalid. In case of active scan.
- * In case of passive scan, MAX( maxChannelTime, WNI_CFG_PASSIVE_MAXIMUM_CHANNEL_TIME) is used.
+ * In case of passive scan, MAX( maxChannelTime, WNI_CFG_PASSIVE_MAXIMUM_CHANNEL_TIME) is used.
*
*/
tANI_U32 maxChannelTime;
@@ -832,7 +832,7 @@ typedef struct sSirSmeScanReq
/* backgroundScanMode can take following values:
* 0x0 - agressive scan
- * 0x1 - normal scan where HAL will check for link traffic
+ * 0x1 - normal scan where HAL will check for link traffic
* prior to proceeding with the scan
*/
tSirBackgroundScanMode backgroundScanMode;
@@ -841,11 +841,11 @@ typedef struct sSirSmeScanReq
/* Number of SSIDs to scan */
tANI_U8 numSsid;
-
+
//channelList has to be the last member of this structure. Check tSirChannelList for the reason.
/* This MUST be the last field of the structure */
-
-
+
+
tANI_BOOLEAN p2pSearch;
tANI_U16 uIEFieldLen;
tANI_U16 uIEFieldOffset;
@@ -855,7 +855,7 @@ typedef struct sSirSmeScanReq
/*-----------------------------
tSirSmeScanReq....
-----------------------------
- uIEFiledLen
+ uIEFiledLen
-----------------------------
uIEFiledOffset ----+
----------------------------- |
@@ -866,7 +866,7 @@ typedef struct sSirSmeScanReq
This can be zero, if |
numChannel is zero. |
----------------------------- <--+
- ... variable size uIEFiled
+ ... variable size uIEFiled
up to uIEFieldLen (can be 0)
-----------------------------*/
} tSirSmeScanReq, *tpSirSmeScanReq;
@@ -889,11 +889,19 @@ typedef struct sSirSmeScanChanReq
#ifdef FEATURE_OEM_DATA_SUPPORT
#ifndef OEM_DATA_REQ_SIZE
+#ifdef QCA_WIFI_2_0
+#define OEM_DATA_REQ_SIZE 276
+#else
#define OEM_DATA_REQ_SIZE 134
#endif
+#endif
#ifndef OEM_DATA_RSP_SIZE
+#ifdef QCA_WIFI_2_0
+#define OEM_DATA_RSP_SIZE 1720
+#else
#define OEM_DATA_RSP_SIZE 1968
#endif
+#endif
typedef struct sSirOemDataReq
{
@@ -908,7 +916,7 @@ typedef struct sSirOemDataRsp
tANI_U16 length;
tANI_U8 oemDataRsp[OEM_DATA_RSP_SIZE];
} tSirOemDataRsp, *tpSirOemDataRsp;
-
+
#endif //FEATURE_OEM_DATA_SUPPORT
/// Definition for response message to previously issued scan request
@@ -916,9 +924,9 @@ typedef struct sSirSmeScanRsp
{
tANI_U16 messageType; // eWNI_SME_SCAN_RSP
tANI_U16 length;
- tANI_U8 sessionId;
+ tANI_U8 sessionId;
tSirResultCodes statusCode;
- tANI_U16 transcationId;
+ tANI_U16 transcationId;
tSirBssDescription bssDescription[1];
} tSirSmeScanRsp, *tpSirSmeScanRsp;
@@ -979,9 +987,9 @@ typedef struct sJoinReassocInfo
/// Definition for join request
/// ---> MAC
-/// WARNING! If you add a field in JOIN REQ.
-/// Make sure to add it in REASSOC REQ
-/// The Serdes function is the same and its
+/// WARNING! If you add a field in JOIN REQ.
+/// Make sure to add it in REASSOC REQ
+/// The Serdes function is the same and its
/// shared with REASSOC. So if we add a field
// here and dont add it in REASSOC REQ. It will BREAK!!! REASSOC.
typedef struct sSirSmeJoinReq
@@ -989,11 +997,11 @@ typedef struct sSirSmeJoinReq
tANI_U16 messageType; // eWNI_SME_JOIN_REQ
tANI_U16 length;
tANI_U8 sessionId;
- tANI_U16 transactionId;
+ tANI_U16 transactionId;
tSirMacSSid ssId;
tSirMacAddr selfMacAddr; // self Mac address
tSirBssType bsstype; // add new type for BT -AMP STA and AP Modules
- tANI_U8 dot11mode; // to support BT-AMP
+ tANI_U8 dot11mode; // to support BT-AMP
tVOS_CON_MODE staPersona; //Persona
ePhyChanBondState cbMode; // Pass CB mode value in Join.
@@ -1010,15 +1018,15 @@ typedef struct sSirSmeJoinReq
tSirRSNie rsnIE; // RSN IE to be sent in
// (Re) Association Request
#ifdef FEATURE_WLAN_CCX
- tSirCCKMie cckmIE; // CCMK IE to be included as handler for join and reassoc is
+ tSirCCKMie cckmIE; // CCMK IE to be included as handler for join and reassoc is
// the same. The join will never carry cckm, but will be set to
- // 0.
+ // 0.
#endif
tSirAddie addIEScan; // Additional IE to be sent in
// (unicast) Probe Request at the time of join
- tSirAddie addIEAssoc; // Additional IE to be sent in
+ tSirAddie addIEAssoc; // Additional IE to be sent in
// (Re) Association Request
tAniEdType UCEncryptionType;
@@ -1036,7 +1044,7 @@ typedef struct sSirSmeJoinReq
tAniBool isCCXconnection;
tCCXTspecInfo ccxTspecInfo;
#endif
-
+
#if defined WLAN_FEATURE_VOWIFI_11R || defined FEATURE_WLAN_CCX || defined(FEATURE_WLAN_LFR)
tAniBool isFastTransitionEnabled;
#endif
@@ -1049,6 +1057,7 @@ typedef struct sSirSmeJoinReq
#ifdef WLAN_FEATURE_11AC
tANI_U8 txBFIniFeatureEnabled;
tANI_U8 txBFCsnValue;
+ tANI_U8 txMuBformee;
#endif
tAniTitanCBNeighborInfo cbNeighbors;
@@ -1082,7 +1091,7 @@ typedef struct sSirSmeJoinRsp
#endif
tANI_U32 staId;//Station ID for peer
- /*The DPU signatures will be sent eventually to TL to help it determine the
+ /*The DPU signatures will be sent eventually to TL to help it determine the
association to which a packet belongs to*/
/*Unicast DPU signature*/
tANI_U8 ucastSig;
@@ -1097,7 +1106,7 @@ typedef struct sSirSmeJoinRsp
typedef struct sSirSmeAuthInd
{
tANI_U16 messageType; // eWNI_SME_AUTH_IND
- tANI_U16 length;
+ tANI_U16 length;
tANI_U8 sessionId;
tSirMacAddr bssId; // Self BSSID
tSirMacAddr peerMacAddr;
@@ -1127,7 +1136,7 @@ typedef struct sSirSmeAssocInd
tANI_U16 staId; // Station ID for peer
tANI_U8 uniSig; // DPU signature for unicast packets
tANI_U8 bcastSig; // DPU signature for broadcast packets
- tAniAuthType authType;
+ tAniAuthType authType;
tAniSSID ssId; // SSID used by STA to associate
tSirRSNie rsnIE;// RSN IE received from peer
tSirAddie addIE;// Additional IE received from peer, which possibly include WSC IE and/or P2P IE
@@ -1177,7 +1186,7 @@ typedef struct sSirSmeReassocInd
tSirRSNie rsnIE; // RSN IE received from peer
tSirAddie addIE; // Additional IE received from peer
-
+
// powerCap & supportedChannels are present only when
// spectrumMgtIndicator flag is set
tAniBool spectrumMgtIndicator;
@@ -1343,7 +1352,7 @@ typedef struct sAniSecurityStat
typedef struct sAniTxRxCounters
{
tANI_U32 txFrames; // Incremented for every packet tx
- tANI_U32 rxFrames;
+ tANI_U32 rxFrames;
tANI_U32 nRcvBytes;
tANI_U32 nXmitBytes;
}tAniTxRxCounters, *tpAniTxRxCounters;
@@ -1371,7 +1380,7 @@ typedef struct sAniSecStats
tAni64BitCounters wpiReplays;
tAni64BitCounters wpiMicError;
#endif
-}tAniSecStats, *tpAniSecStats;
+}tAniSecStats, *tpAniSecStats;
#define SIR_MAX_RX_CHAINS 3
@@ -1430,13 +1439,13 @@ typedef struct sAniStaStatStruct
//Multicast frames and bytes.
tAniTxRxStats mcStats;
- tANI_U32 currentTxRate;
+ tANI_U32 currentTxRate;
tANI_U32 currentRxRate; //Rate in 100Kbps
tANI_U32 maxTxRate;
tANI_U32 maxRxRate;
- tANI_S8 rssi[SIR_MAX_RX_CHAINS];
+ tANI_S8 rssi[SIR_MAX_RX_CHAINS];
tAniSecStats securityStats;
@@ -1471,7 +1480,7 @@ typedef struct sAniGlobalStatStruct
tAniTxRxStats mcStats;
tAniTxRxStats bcStats;
-
+
}tAniGlobalStatStruct,*tpAniGlobalStatStruct;
typedef enum sPacketType
@@ -1556,7 +1565,7 @@ typedef struct sSirSmeDisassocInd
tANI_U8 sessionId; // Session Identifier
tANI_U16 transactionId; // Transaction Identifier with PE
tSirResultCodes statusCode;
- tSirMacAddr bssId;
+ tSirMacAddr bssId;
tSirMacAddr peerMacAddr;
tAniStaStatStruct perStaStats; // STA stats
tANI_U16 staId;
@@ -1570,7 +1579,7 @@ typedef struct sSirSmeDisassocCnf
tANI_U16 messageType; // eWNI_SME_DISASSOC_CNF
tANI_U16 length;
tSirResultCodes statusCode;
- tSirMacAddr bssId;
+ tSirMacAddr bssId;
tSirMacAddr peerMacAddr;
} tSirSmeDisassocCnf, *tpSirSmeDisassocCnf;
@@ -2052,8 +2061,8 @@ typedef enum
}ePEStatsMask;
/*
- * tpAniGetPEStatsReq is tied to
- * for SME ==> PE eWNI_SME_GET_STATISTICS_REQ msgId and
+ * tpAniGetPEStatsReq is tied to
+ * for SME ==> PE eWNI_SME_GET_STATISTICS_REQ msgId and
* for PE ==> HAL SIR_HAL_GET_STATISTICS_REQ msgId
*/
typedef struct sAniGetPEStatsReq
@@ -2066,8 +2075,8 @@ typedef struct sAniGetPEStatsReq
} tAniGetPEStatsReq, *tpAniGetPEStatsReq;
/*
- * tpAniGetPEStatsRsp is tied to
- * for PE ==> SME eWNI_SME_GET_STATISTICS_RSP msgId and
+ * tpAniGetPEStatsRsp is tied to
+ * for PE ==> SME eWNI_SME_GET_STATISTICS_RSP msgId and
* for HAL ==> PE SIR_HAL_GET_STATISTICS_RSP msgId
*/
typedef struct sAniGetPEStatsRsp
@@ -2081,10 +2090,10 @@ typedef struct sAniGetPEStatsRsp
tANI_U32 statsMask; // categories of stats requested. look at ePEStatsMask
/**********************************************************************************************
//void *pStatsBuf;
- The Stats buffer starts here and can be an aggregate of more than one statistics
- structure depending on statsMask.The void pointer "pStatsBuf" is commented out
- intentionally and the src code that uses this structure should take that into account.
-**********************************************************************************************/
+ The Stats buffer starts here and can be an aggregate of more than one statistics
+ structure depending on statsMask.The void pointer "pStatsBuf" is commented out
+ intentionally and the src code that uses this structure should take that into account.
+**********************************************************************************************/
} tAniGetPEStatsRsp, *tpAniGetPEStatsRsp;
typedef struct sAniGetRssiReq
@@ -2093,11 +2102,11 @@ typedef struct sAniGetRssiReq
tANI_U16 msgType; // message type is same as the request type
tANI_U16 msgLen; // length of the entire request
tANI_U8 sessionId;
- tANI_U8 staId;
+ tANI_U8 staId;
void *rssiCallback;
void *pDevContext; //device context
void *pVosContext; //voss context
-
+
} tAniGetRssiReq, *tpAniGetRssiReq;
#if defined WLAN_FEATURE_VOWIFI_11R || defined FEATURE_WLAN_CCX || defined(FEATURE_WLAN_LFR)
@@ -2125,35 +2134,35 @@ typedef struct sAniChangeCountryCodeReq
void *changeCCCallback;
void *pDevContext; //device context
void *pVosContext; //voss context
-
+
} tAniChangeCountryCodeReq, *tpAniChangeCountryCodeReq;
typedef struct sAniSummaryStatsInfo
{
tANI_U32 retry_cnt[4]; //Total number of packets(per AC) that were successfully transmitted with retries
- tANI_U32 multiple_retry_cnt[4];//The number of MSDU packets and MMPDU frames per AC that the 802.11
+ tANI_U32 multiple_retry_cnt[4];//The number of MSDU packets and MMPDU frames per AC that the 802.11
// station successfully transmitted after more than one retransmission attempt
- tANI_U32 tx_frm_cnt[4]; //Total number of packets(per AC) that were successfully transmitted
- //(with and without retries, including multi-cast, broadcast)
+ tANI_U32 tx_frm_cnt[4]; //Total number of packets(per AC) that were successfully transmitted
+ //(with and without retries, including multi-cast, broadcast)
//tANI_U32 tx_fail_cnt;
//tANI_U32 num_rx_frm_crc_err; //Total number of received frames with CRC Error
//tANI_U32 num_rx_frm_crc_ok; //Total number of successfully received frames with out CRC Error
- tANI_U32 rx_frm_cnt; //Total number of packets that were successfully received
- //(after appropriate filter rules including multi-cast, broadcast)
+ tANI_U32 rx_frm_cnt; //Total number of packets that were successfully received
+ //(after appropriate filter rules including multi-cast, broadcast)
tANI_U32 frm_dup_cnt; //Total number of duplicate frames received successfully
tANI_U32 fail_cnt[4]; //Total number packets(per AC) failed to transmit
tANI_U32 rts_fail_cnt; //Total number of RTS/CTS sequence failures for transmission of a packet
tANI_U32 ack_fail_cnt; //Total number packets failed transmit because of no ACK from the remote entity
- tANI_U32 rts_succ_cnt; //Total number of RTS/CTS sequence success for transmission of a packet
- tANI_U32 rx_discard_cnt; //The sum of the receive error count and dropped-receive-buffer error count.
+ tANI_U32 rts_succ_cnt; //Total number of RTS/CTS sequence success for transmission of a packet
+ tANI_U32 rx_discard_cnt; //The sum of the receive error count and dropped-receive-buffer error count.
//HAL will provide this as a sum of (FCS error) + (Fail get BD/PDU in HW)
tANI_U32 rx_error_cnt; //The receive error count. HAL will provide the RxP FCS error global counter.
- 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
+ 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
+#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;
@@ -2178,24 +2187,24 @@ typedef enum eTxRateInfo
typedef struct sAniGlobalClassAStatsInfo
{
- tANI_U32 rx_frag_cnt; //The number of MPDU frames received by the 802.11 station for MSDU packets
+ tANI_U32 rx_frag_cnt; //The number of MPDU frames received by the 802.11 station for MSDU packets
//or MMPDU frames
- tANI_U32 promiscuous_rx_frag_cnt; //The number of MPDU frames received by the 802.11 station for MSDU packets
+ tANI_U32 promiscuous_rx_frag_cnt; //The number of MPDU frames received by the 802.11 station for MSDU packets
//or MMPDU frames when a promiscuous packet filter was enabled
//tANI_U32 rx_fcs_err; //The number of MPDU frames that the 802.11 station received with FCS errors
- tANI_U32 rx_input_sensitivity; //The receiver input sensitivity referenced to a FER of 8% at an MPDU length
- //of 1024 bytes at the antenna connector. Each element of the array shall correspond
+ tANI_U32 rx_input_sensitivity; //The receiver input sensitivity referenced to a FER of 8% at an MPDU length
+ //of 1024 bytes at the antenna connector. Each element of the array shall correspond
//to a supported rate and the order shall be the same as the supporteRates parameter.
- tANI_U32 max_pwr; //The maximum transmit power in dBm upto one decimal.
- //for eg: if it is 10.5dBm, the value would be 105
+ tANI_U32 max_pwr; //The maximum transmit power in dBm upto one decimal.
+ //for eg: if it is 10.5dBm, the value would be 105
//tANI_U32 default_pwr; //The nominal transmit level used after normal power on sequence
- tANI_U32 sync_fail_cnt; //Number of times the receiver failed to synchronize with the incoming signal
- //after detecting the sync in the preamble of the transmitted PLCP protocol data unit.
- tANI_U32 tx_rate; //Legacy transmit rate, in units of
- //500 kbit/sec, for the most
- //recently transmitted frame
+ tANI_U32 sync_fail_cnt; //Number of times the receiver failed to synchronize with the incoming signal
+ //after detecting the sync in the preamble of the transmitted PLCP protocol data unit.
+ tANI_U32 tx_rate; //Legacy transmit rate, in units of
+ //500 kbit/sec, for the most
+ //recently transmitted frame
tANI_U32 mcs_index; //mcs index for HT20 and HT40 rates
- tANI_U32 tx_rate_flags; //to differentiate between HT20 and
+ tANI_U32 tx_rate_flags; //to differentiate between HT20 and
//HT40 rates; short and long guard interval
}tAniGlobalClassAStatsInfo, *tpAniGlobalClassAStatsInfo;
@@ -2203,29 +2212,29 @@ typedef struct sAniGlobalClassAStatsInfo
typedef struct sAniGlobalSecurityStats
{
- tANI_U32 rx_wep_unencrypted_frm_cnt; //The number of unencrypted received MPDU frames that the MAC layer discarded when
- //the IEEE 802.11 dot11ExcludeUnencrypted management information base (MIB) object
+ tANI_U32 rx_wep_unencrypted_frm_cnt; //The number of unencrypted received MPDU frames that the MAC layer discarded when
+ //the IEEE 802.11 dot11ExcludeUnencrypted management information base (MIB) object
//is enabled
- tANI_U32 rx_mic_fail_cnt; //The number of received MSDU packets that that the 802.11 station discarded
+ tANI_U32 rx_mic_fail_cnt; //The number of received MSDU packets that that the 802.11 station discarded
//because of MIC failures
- tANI_U32 tkip_icv_err; //The number of encrypted MPDU frames that the 802.11 station failed to decrypt
+ tANI_U32 tkip_icv_err; //The number of encrypted MPDU frames that the 802.11 station failed to decrypt
//because of a TKIP ICV error
- tANI_U32 aes_ccmp_format_err; //The number of received MPDU frames that the 802.11 discarded because of an
+ tANI_U32 aes_ccmp_format_err; //The number of received MPDU frames that the 802.11 discarded because of an
//invalid AES-CCMP format
- tANI_U32 aes_ccmp_replay_cnt; //The number of received MPDU frames that the 802.11 station discarded because of
+ tANI_U32 aes_ccmp_replay_cnt; //The number of received MPDU frames that the 802.11 station discarded because of
//the AES-CCMP replay protection procedure
- tANI_U32 aes_ccmp_decrpt_err; //The number of received MPDU frames that the 802.11 station discarded because of
+ tANI_U32 aes_ccmp_decrpt_err; //The number of received MPDU frames that the 802.11 station discarded because of
//errors detected by the AES-CCMP decryption algorithm
- tANI_U32 wep_undecryptable_cnt; //The number of encrypted MPDU frames received for which a WEP decryption key was
+ tANI_U32 wep_undecryptable_cnt; //The number of encrypted MPDU frames received for which a WEP decryption key was
//not available on the 802.11 station
- tANI_U32 wep_icv_err; //The number of encrypted MPDU frames that the 802.11 station failed to decrypt
+ tANI_U32 wep_icv_err; //The number of encrypted MPDU frames that the 802.11 station failed to decrypt
//because of a WEP ICV error
- tANI_U32 rx_decrypt_succ_cnt; //The number of received encrypted packets that the 802.11 station successfully
+ tANI_U32 rx_decrypt_succ_cnt; //The number of received encrypted packets that the 802.11 station successfully
//decrypted
tANI_U32 rx_decrypt_fail_cnt; //The number of encrypted packets that the 802.11 station failed to decrypt
}tAniGlobalSecurityStats, *tpAniGlobalSecurityStats;
-
+
typedef struct sAniGlobalClassBStatsInfo
{
tAniGlobalSecurityStats ucStats;
@@ -2234,27 +2243,27 @@ typedef struct sAniGlobalClassBStatsInfo
typedef struct sAniGlobalClassCStatsInfo
{
- tANI_U32 rx_amsdu_cnt; //This counter shall be incremented for a received A-MSDU frame with the stations
- //MAC address in the address 1 field or an A-MSDU frame with a group address in the
+ tANI_U32 rx_amsdu_cnt; //This counter shall be incremented for a received A-MSDU frame with the stations
+ //MAC address in the address 1 field or an A-MSDU frame with a group address in the
//address 1 field
tANI_U32 rx_ampdu_cnt; //This counter shall be incremented when the MAC receives an AMPDU from the PHY
- tANI_U32 tx_20_frm_cnt; //This counter shall be incremented when a Frame is transmitted only on the
+ tANI_U32 tx_20_frm_cnt; //This counter shall be incremented when a Frame is transmitted only on the
//primary channel
tANI_U32 rx_20_frm_cnt; //This counter shall be incremented when a Frame is received only on the primary channel
- tANI_U32 rx_mpdu_in_ampdu_cnt; //This counter shall be incremented by the number of MPDUs received in the A-MPDU
+ tANI_U32 rx_mpdu_in_ampdu_cnt; //This counter shall be incremented by the number of MPDUs received in the A-MPDU
//when an A-MPDU is received
- tANI_U32 ampdu_delimiter_crc_err;//This counter shall be incremented when an MPDU delimiter has a CRC error when this
- //is the first CRC error in the received AMPDU or when the previous delimiter has been
+ tANI_U32 ampdu_delimiter_crc_err;//This counter shall be incremented when an MPDU delimiter has a CRC error when this
+ //is the first CRC error in the received AMPDU or when the previous delimiter has been
//decoded correctly
}tAniGlobalClassCStatsInfo, *tpAniGlobalClassCStatsInfo;
typedef struct sAniPerStaStatsInfo
{
- tANI_U32 tx_frag_cnt[4]; //The number of MPDU frames that the 802.11 station transmitted and acknowledged
+ tANI_U32 tx_frag_cnt[4]; //The number of MPDU frames that the 802.11 station transmitted and acknowledged
//through a received 802.11 ACK frame
- tANI_U32 tx_ampdu_cnt; //This counter shall be incremented when an A-MPDU is transmitted
- tANI_U32 tx_mpdu_in_ampdu_cnt; //This counter shall increment by the number of MPDUs in the AMPDU when an A-MPDU
+ tANI_U32 tx_ampdu_cnt; //This counter shall be incremented when an A-MPDU is transmitted
+ tANI_U32 tx_mpdu_in_ampdu_cnt; //This counter shall increment by the number of MPDUs in the AMPDU when an A-MPDU
//is transmitted
}tAniPerStaStatsInfo, *tpAniPerStaStatsInfo;
@@ -2312,7 +2321,7 @@ typedef struct sSirRSSINotification
tANI_U32 bRssiThres1NegCross : 1;
tANI_U32 bRssiThres1PosCross : 1;
#endif
-
+
}tSirRSSINotification, *tpSirRSSINotification;
@@ -2437,8 +2446,8 @@ typedef struct sSirAddtsRsp
{
tANI_U16 messageType; // eWNI_SME_ADDTS_RSP
tANI_U16 length;
- tANI_U8 sessionId; // sme sessionId Added for BT-AMP support
- tANI_U16 transactionId; //sme transaction Id Added for BT-AMP Support
+ tANI_U8 sessionId; // sme sessionId Added for BT-AMP support
+ tANI_U16 transactionId; //sme transaction Id Added for BT-AMP Support
tANI_U32 rc; // return code
tSirAddtsRspInfo rsp;
} tSirAddtsRsp, *tpSirAddtsRsp;
@@ -2460,8 +2469,8 @@ typedef struct sSirDeltsRsp
{
tANI_U16 messageType; // eWNI_SME_DELTS_RSP
tANI_U16 length;
- tANI_U8 sessionId; // sme sessionId Added for BT-AMP support
- tANI_U16 transactionId; //sme transaction Id Added for BT-AMP Support
+ tANI_U8 sessionId; // sme sessionId Added for BT-AMP support
+ tANI_U16 transactionId; //sme transaction Id Added for BT-AMP Support
tANI_U32 rc;
tANI_U16 aid; // use 0 if macAddr is being specified
tANI_U8 macAddr[6]; // only on AP to specify the STA
@@ -2541,10 +2550,10 @@ typedef struct sSirGetTxPowerRsp
typedef tANI_U32 tSirMacNoise[3];
-typedef struct sSirGetNoiseRsp
+typedef struct sSirGetNoiseRsp
{
tANI_U16 messageType;
- tANI_U16 length;
+ tANI_U16 length;
tSirMacNoise noise;
} tSirGetNoiseRsp, *tpSirGetNoiseRsp;
@@ -2556,9 +2565,9 @@ typedef struct sSirGetNoiseRsp
typedef struct sSirPowerSaveCfg
{
tANI_U16 listenInterval;
-
- /* Number of consecutive missed beacons before
- * hardware generates an interrupt to wake up
+
+ /* Number of consecutive missed beacons before
+ * hardware generates an interrupt to wake up
* the host. In units of listen interval.
*/
tANI_U32 HeartBeatCount;
@@ -2569,35 +2578,35 @@ typedef struct sSirPowerSaveCfg
*/
tANI_U32 nthBeaconFilter;
- /* Maximum number of PS-Poll send before
+ /* Maximum number of PS-Poll send before
* firmware sends data null with PM set to 0.
*/
- tANI_U32 maxPsPoll;
+ tANI_U32 maxPsPoll;
- /* If the average RSSI value falls below the
- * minRssiThreshold, then FW will send an
- * interrupt to wake up the host.
+ /* If the average RSSI value falls below the
+ * minRssiThreshold, then FW will send an
+ * interrupt to wake up the host.
*/
- tANI_U32 minRssiThreshold;
+ tANI_U32 minRssiThreshold;
- /* Number of beacons for which firmware will
+ /* Number of beacons for which firmware will
* collect the RSSI values and compute the average.
*/
- tANI_U8 numBeaconPerRssiAverage;
+ tANI_U8 numBeaconPerRssiAverage;
/* FW collects the RSSI stats for this period
- * in BMPS mode.
+ * in BMPS mode.
*/
tANI_U8 rssiFilterPeriod;
// Enabling/disabling broadcast frame filter feature
- tANI_U8 broadcastFrameFilter;
+ tANI_U8 broadcastFrameFilter;
// Enabling/disabling the ignore DTIM feature
tANI_U8 ignoreDtim;
/* The following configuration parameters are kept
- * in order to be backward compatible for Gen5.
+ * in order to be backward compatible for Gen5.
* These will NOT be used for Gen6 Libra chip
*/
tBeaconForwarding beaconFwd;
@@ -2606,12 +2615,12 @@ typedef struct sSirPowerSaveCfg
tANI_U8 fPSPoll;
// Enabling/disabling Beacon Early Termination feature
- tANI_U8 fEnableBeaconEarlyTermination;
- tANI_U8 bcnEarlyTermWakeInterval;
+ tANI_U8 fEnableBeaconEarlyTermination;
+ tANI_U8 bcnEarlyTermWakeInterval;
}tSirPowerSaveCfg, *tpSirPowerSaveCfg;
-/* Reason code for requesting Full Power. This reason code is used by
+/* Reason code for requesting Full Power. This reason code is used by
any module requesting full power from PMC and also by PE when it
sends the eWNI_PMC_EXIT_BMPS_IND to PMC*/
typedef enum eRequestFullPowerReason
@@ -2629,7 +2638,7 @@ typedef enum eRequestFullPowerReason
#ifdef FEATURE_WLAN_TDLS
eSME_FULL_PWR_NEEDED_BY_TDLS_PEER_SETUP, /* TDLS peer setup*/
#endif
- eSME_REASON_OTHER /* No specific reason. General reason code */
+ eSME_REASON_OTHER /* No specific reason. General reason code */
} tRequestFullPowerReason, tExitBmpsReason;
@@ -2673,7 +2682,7 @@ typedef struct sSmeDelBAPeerInd
// Message Type
tANI_U16 mesgType;
- tSirMacAddr bssId;//BSSID
+ tSirMacAddr bssId;//BSSID
// Message Length
tANI_U16 mesgLen;
@@ -2699,7 +2708,7 @@ typedef struct sSmeIbssPeerInd
tSirMacAddr peerAddr;
tANI_U16 staId;
- /*The DPU signatures will be sent eventually to TL to help it determine the
+ /*The DPU signatures will be sent eventually to TL to help it determine the
association to which a packet belongs to*/
/*Unicast DPU signature*/
tANI_U8 ucastSig;
@@ -2736,7 +2745,7 @@ typedef struct sLimScanChnInfo
typedef struct sSirSmeGetAssocSTAsReq
{
tANI_U16 messageType; // eWNI_SME_GET_ASSOC_STAS_REQ
- tANI_U16 length;
+ tANI_U16 length;
tSirMacAddr bssId; // BSSID
tANI_U16 modId;
void *pUsrContext;
@@ -2747,8 +2756,8 @@ typedef struct sSirSmeGetAssocSTAsReq
typedef struct sSmeMaxAssocInd
{
tANI_U16 mesgType; // eWNI_SME_MAX_ASSOC_EXCEEDED
- tANI_U16 mesgLen;
- tANI_U8 sessionId;
+ tANI_U16 mesgLen;
+ tANI_U8 sessionId;
tSirMacAddr peerMac; // the new peer that got rejected due to softap max assoc limit reached
} tSmeMaxAssocInd, *tpSmeMaxAssocInd;
@@ -2917,7 +2926,7 @@ typedef __ani_attr_pre_packed struct sSirBoardCapabilities
#define SIR_WOWL_BCAST_PATTERN_MAX_SIZE 128
#define SIR_WOWL_BCAST_MAX_NUM_PATTERNS 16
-// SME -> PE -> HAL - This is to add WOWL BCAST wake-up pattern.
+// SME -> PE -> HAL - This is to add WOWL BCAST wake-up pattern.
// SME/HDD maintains the list of the BCAST wake-up patterns.
// This is a pass through message for PE
typedef struct sSirWowlAddBcastPtrn
@@ -2925,7 +2934,7 @@ typedef struct sSirWowlAddBcastPtrn
tANI_U8 ucPatternId; // Pattern ID
// Pattern byte offset from beginning of the 802.11 packet to start of the
// wake-up pattern
- tANI_U8 ucPatternByteOffset;
+ tANI_U8 ucPatternByteOffset;
tANI_U8 ucPatternSize; // Non-Zero Pattern size
tANI_U8 ucPattern[SIR_WOWL_BCAST_PATTERN_MAX_SIZE]; // Pattern
tANI_U8 ucPatternMaskSize; // Non-zero pattern mask size
@@ -2938,7 +2947,7 @@ typedef struct sSirWowlAddBcastPtrn
} tSirWowlAddBcastPtrn, *tpSirWowlAddBcastPtrn;
-// SME -> PE -> HAL - This is to delete WOWL BCAST wake-up pattern.
+// SME -> PE -> HAL - This is to delete WOWL BCAST wake-up pattern.
// SME/HDD maintains the list of the BCAST wake-up patterns.
// This is a pass through message for PE
typedef struct sSirWowlDelBcastPtrn
@@ -2949,19 +2958,19 @@ typedef struct sSirWowlDelBcastPtrn
}tSirWowlDelBcastPtrn, *tpSirWowlDelBcastPtrn;
-// SME->PE: Enter WOWLAN parameters
+// SME->PE: Enter WOWLAN parameters
typedef struct sSirSmeWowlEnterParams
{
tANI_U8 sessionId;
/* Enables/disables magic packet filtering */
- tANI_U8 ucMagicPktEnable;
+ tANI_U8 ucMagicPktEnable;
/* Magic pattern */
tSirMacAddr magicPtrn;
/* Enables/disables packet pattern filtering */
- tANI_U8 ucPatternFilteringEnable;
+ tANI_U8 ucPatternFilteringEnable;
#ifdef WLAN_WAKEUP_EVENTS
/* This configuration directs the WoW packet filtering to look for EAP-ID
@@ -2991,62 +3000,62 @@ typedef struct sSirSmeWowlEnterParams
} tSirSmeWowlEnterParams, *tpSirSmeWowlEnterParams;
-// PE<->HAL: Enter WOWLAN parameters
+// PE<->HAL: Enter WOWLAN parameters
typedef struct sSirHalWowlEnterParams
{
tANI_U8 sessionId;
/* Enables/disables magic packet filtering */
- tANI_U8 ucMagicPktEnable;
+ tANI_U8 ucMagicPktEnable;
/* Magic pattern */
tSirMacAddr magicPtrn;
- /* Enables/disables packet pattern filtering in firmware.
- Enabling this flag enables broadcast pattern matching
- in Firmware. If unicast pattern matching is also desired,
- ucUcastPatternFilteringEnable flag must be set tot true
- as well
+ /* Enables/disables packet pattern filtering in firmware.
+ Enabling this flag enables broadcast pattern matching
+ in Firmware. If unicast pattern matching is also desired,
+ ucUcastPatternFilteringEnable flag must be set tot true
+ as well
*/
tANI_U8 ucPatternFilteringEnable;
- /* Enables/disables unicast packet pattern filtering.
- This flag specifies whether we want to do pattern match
- on unicast packets as well and not just broadcast packets.
- This flag has no effect if the ucPatternFilteringEnable
+ /* Enables/disables unicast packet pattern filtering.
+ This flag specifies whether we want to do pattern match
+ on unicast packets as well and not just broadcast packets.
+ This flag has no effect if the ucPatternFilteringEnable
(main controlling flag) is set to false
*/
- tANI_U8 ucUcastPatternFilteringEnable;
+ tANI_U8 ucUcastPatternFilteringEnable;
- /* This configuration is valid only when magicPktEnable=1.
- * It requests hardware to wake up when it receives the
+ /* This configuration is valid only when magicPktEnable=1.
+ * It requests hardware to wake up when it receives the
* Channel Switch Action Frame.
*/
tANI_U8 ucWowChnlSwitchRcv;
- /* This configuration is valid only when magicPktEnable=1.
- * It requests hardware to wake up when it receives the
- * Deauthentication Frame.
+ /* This configuration is valid only when magicPktEnable=1.
+ * It requests hardware to wake up when it receives the
+ * Deauthentication Frame.
*/
tANI_U8 ucWowDeauthRcv;
- /* This configuration is valid only when magicPktEnable=1.
- * It requests hardware to wake up when it receives the
- * Disassociation Frame.
+ /* This configuration is valid only when magicPktEnable=1.
+ * It requests hardware to wake up when it receives the
+ * Disassociation Frame.
*/
tANI_U8 ucWowDisassocRcv;
- /* This configuration is valid only when magicPktEnable=1.
+ /* This configuration is valid only when magicPktEnable=1.
* It requests hardware to wake up when it has missed
* consecutive beacons. This is a hardware register
- * configuration (NOT a firmware configuration).
+ * configuration (NOT a firmware configuration).
*/
tANI_U8 ucWowMaxMissedBeacons;
- /* This configuration is valid only when magicPktEnable=1.
+ /* This configuration is valid only when magicPktEnable=1.
* This is a timeout value in units of microsec. It requests
* hardware to unconditionally wake up after it has stayed
- * in WoWLAN mode for some time. Set 0 to disable this feature.
+ * in WoWLAN mode for some time. Set 0 to disable this feature.
*/
tANI_U8 ucWowMaxSleepUsec;
@@ -3075,8 +3084,8 @@ typedef struct sSirHalWowlEnterParams
#endif // WLAN_WAKEUP_EVENTS
/* Status code to be filled by HAL when it sends
- * SIR_HAL_WOWL_ENTER_RSP to PE.
- */
+ * SIR_HAL_WOWL_ENTER_RSP to PE.
+ */
eHalStatus status;
/*BSSID to find the current session
@@ -3091,14 +3100,14 @@ typedef struct sSirSmeWowlExitParams
} tSirSmeWowlExitParams, *tpSirSmeWowlExitParams;
-// PE<->HAL: Exit WOWLAN parameters
+// PE<->HAL: Exit WOWLAN parameters
typedef struct sSirHalWowlExitParams
{
tANI_U8 sessionId;
/* Status code to be filled by HAL when it sends
- * SIR_HAL_WOWL_EXIT_RSP to PE.
- */
+ * SIR_HAL_WOWL_EXIT_RSP to PE.
+ */
eHalStatus status;
/*BSSIDX to find the current session
@@ -3142,7 +3151,7 @@ typedef struct sSirText {
typedef struct sSirWPSProbeRspIE {
v_U32_t FieldPresent;
v_U32_t Version; // Version. 0x10 = version 1.0, 0x11 = etc.
- v_U32_t wpsState; // 1 = unconfigured, 2 = configured.
+ v_U32_t wpsState; // 1 = unconfigured, 2 = configured.
v_BOOL_t APSetupLocked; // Must be included if value is TRUE
v_BOOL_t SelectedRegistra; //BOOL: indicates if the user has recently activated a Registrar to add an Enrollee.
v_U16_t DevicePasswordID; // Device Password ID
@@ -3173,7 +3182,7 @@ typedef struct sSirWPSProbeRspIE {
typedef struct sSirWPSBeaconIE {
v_U32_t FieldPresent;
v_U32_t Version; // Version. 0x10 = version 1.0, 0x11 = etc.
- v_U32_t wpsState; // 1 = unconfigured, 2 = configured.
+ v_U32_t wpsState; // 1 = unconfigured, 2 = configured.
v_BOOL_t APSetupLocked; // Must be included if value is TRUE
v_BOOL_t SelectedRegistra; //BOOL: indicates if the user has recently activated a Registrar to add an Enrollee.
v_U16_t DevicePasswordID; // Device Password ID
@@ -3209,7 +3218,7 @@ typedef struct sSirUpdateAPWPSIEsReq
typedef struct sSirUpdateParams
{
- tANI_U16 messageType;
+ tANI_U16 messageType;
tANI_U16 length;
tANI_U8 sessionId; // Session ID
tANI_U8 ssidHidden; // Hide SSID
@@ -3218,7 +3227,7 @@ typedef struct sSirUpdateParams
//Beacon Interval
typedef struct sSirChangeBIParams
{
- tANI_U16 messageType;
+ tANI_U16 messageType;
tANI_U16 length;
tANI_U16 beaconInterval; // Beacon Interval
tSirMacAddr bssId;
@@ -3265,15 +3274,15 @@ typedef struct sSirSmeProbeReqInd
typedef struct sSirUpdateAPWPARSNIEsReq
{
tANI_U16 messageType; // eWNI_SME_SET_APWPARSNIEs_REQ
- tANI_U16 length;
+ tANI_U16 length;
tANI_U16 transactionId; //Transaction ID for cmd
tSirMacAddr bssId; // BSSID
- tANI_U8 sessionId; //Session ID
+ tANI_U8 sessionId; //Session ID
tSirRSNie APWPARSNIEs;
} tSirUpdateAPWPARSNIEsReq, *tpSirUpdateAPWPARSNIEsReq;
-// SME -> HAL - This is the host offload request.
+// SME -> HAL - This is the host offload request.
#define SIR_IPV4_ARP_REPLY_OFFLOAD 0
#define SIR_IPV6_NEIGHBOR_DISCOVERY_OFFLOAD 1
#define SIR_IPV6_NS_OFFLOAD 2
@@ -3326,7 +3335,7 @@ typedef struct sSirKeepAliveReq
{
v_U8_t packetType;
v_U32_t timePeriod;
- tSirIpv4Addr hostIpv4Addr;
+ tSirIpv4Addr hostIpv4Addr;
tSirIpv4Addr destIpv4Addr;
tSirMacAddr destMacAddr;
tSirMacAddr bssId;
@@ -3367,9 +3376,9 @@ typedef struct sSirSmeDelStaSelfRsp
tSirMacAddr selfMacAddr;
}tSirSmeDelStaSelfRsp, *tpSirSmeDelStaSelfRsp;
-/* Coex Indication defines -
- should match WLAN_COEX_IND_DATA_SIZE
- should match WLAN_COEX_IND_TYPE_DISABLE_HB_MONITOR
+/* Coex Indication defines -
+ should match WLAN_COEX_IND_DATA_SIZE
+ should match WLAN_COEX_IND_TYPE_DISABLE_HB_MONITOR
should match WLAN_COEX_IND_TYPE_ENABLE_HB_MONITOR */
#define SIR_COEX_IND_DATA_SIZE (4)
#define SIR_COEX_IND_TYPE_DISABLE_HB_MONITOR (0)
@@ -3449,7 +3458,7 @@ typedef struct sSirWlanSetRxpFilters
// PNO Messages
//
-// Set PNO
+// Set PNO
#define SIR_PNO_MAX_NETW_CHANNELS 26
#define SIR_PNO_MAX_NETW_CHANNELS_EX 60
#define SIR_PNO_MAX_SUPP_NETWORKS 16
@@ -3460,7 +3469,7 @@ typedef struct sSirWlanSetRxpFilters
#endif
/*size based of dot11 declaration without extra IEs as we will not carry those for PNO*/
-#define SIR_PNO_MAX_PB_REQ_SIZE 450
+#define SIR_PNO_MAX_PB_REQ_SIZE 450
#define SIR_PNO_24G_DEFAULT_CH 1
#define SIR_PNO_5G_DEFAULT_CH 36
@@ -3482,48 +3491,48 @@ typedef enum
SIR_PNO_MODE_IMMEDIATE,
SIR_PNO_MODE_ON_SUSPEND,
SIR_PNO_MODE_ON_RESUME,
- SIR_PNO_MODE_MAX
+ SIR_PNO_MODE_MAX
} eSirPNOMode;
-typedef struct
+typedef struct
{
tSirMacSSid ssId;
- tANI_U32 authentication;
- tANI_U32 encryption;
- tANI_U32 bcastNetwType;
+ tANI_U32 authentication;
+ tANI_U32 encryption;
+ tANI_U32 bcastNetwType;
tANI_U8 ucChannelCount;
tANI_U8 aChannels[SIR_PNO_MAX_NETW_CHANNELS_EX];
tANI_U8 rssiThreshold;
-} tSirNetworkType;
+} tSirNetworkType;
-typedef struct
+typedef struct
{
- tANI_U32 uTimerValue;
- tANI_U32 uTimerRepeat;
-}tSirScanTimer;
+ tANI_U32 uTimerValue;
+ tANI_U32 uTimerRepeat;
+}tSirScanTimer;
typedef struct
{
- tANI_U8 ucScanTimersCount;
- tSirScanTimer aTimerValues[SIR_PNO_MAX_SCAN_TIMERS];
+ tANI_U8 ucScanTimersCount;
+ tSirScanTimer aTimerValues[SIR_PNO_MAX_SCAN_TIMERS];
} tSirScanTimersType;
typedef struct sSirPNOScanReq
{
tANI_U8 enable;
eSirPNOMode modePNO;
- tANI_U8 ucNetworksCount;
+ tANI_U8 ucNetworksCount;
tSirNetworkType aNetworks[SIR_PNO_MAX_SUPP_NETWORKS];
tSirScanTimersType scanTimers;
#ifdef FEATURE_WLAN_PNO_OFFLOAD
tANI_U8 sessionId;
#endif
-
+
/*added by SME*/
- tANI_U16 us24GProbeTemplateLen;
+ tANI_U16 us24GProbeTemplateLen;
tANI_U8 p24GProbeTemplate[SIR_PNO_MAX_PB_REQ_SIZE];
- tANI_U16 us5GProbeTemplateLen;
- tANI_U8 p5GProbeTemplate[SIR_PNO_MAX_PB_REQ_SIZE];
+ tANI_U16 us5GProbeTemplateLen;
+ tANI_U8 p5GProbeTemplate[SIR_PNO_MAX_PB_REQ_SIZE];
} tSirPNOScanReq, *tpSirPNOScanReq;
#ifdef WLAN_FEATURE_ROAM_SCAN_OFFLOAD
@@ -3570,6 +3579,7 @@ typedef struct sSirRoamOffloadScanReq
and firmware.*/
tSirRoamNetworkType ConnectedNetwork;
tSirMobilityDomainInfo MDID;
+ tANI_U8 sessionId;
} tSirRoamOffloadScanReq, *tpSirRoamOffloadScanReq;
#endif
@@ -3579,22 +3589,22 @@ typedef struct sSirSetRSSIFilterReq
} tSirSetRSSIFilterReq, *tpSirSetRSSIFilterReq;
-// Update Scan Params
+// Update Scan Params
typedef struct {
- tANI_U8 b11dEnabled;
+ tANI_U8 b11dEnabled;
tANI_U8 b11dResolved;
- tANI_U8 ucChannelCount;
- tANI_U8 aChannels[SIR_PNO_MAX_NETW_CHANNELS_EX];
- tANI_U16 usPassiveMinChTime;
- tANI_U16 usPassiveMaxChTime;
- tANI_U16 usActiveMinChTime;
- tANI_U16 usActiveMaxChTime;
- tANI_U8 ucCBState;
+ tANI_U8 ucChannelCount;
+ tANI_U8 aChannels[SIR_PNO_MAX_NETW_CHANNELS_EX];
+ tANI_U16 usPassiveMinChTime;
+ tANI_U16 usPassiveMaxChTime;
+ tANI_U16 usActiveMinChTime;
+ tANI_U16 usActiveMaxChTime;
+ tANI_U8 ucCBState;
} tSirUpdateScanParams, * tpSirUpdateScanParams;
// Preferred Network Found Indication
typedef struct
-{
+{
tANI_U16 mesgType;
tANI_U16 mesgLen;
/* Network that was found with the highest RSSI*/
@@ -3616,20 +3626,20 @@ typedef struct
typedef enum
{
eSIR_IGNORE_DTIM = 1,
- eSIR_LISTEN_INTERVAL = 2,
- eSIR_MCAST_BCAST_FILTER = 3,
- eSIR_ENABLE_BET = 4,
- eSIR_BET_INTERVAL = 5
+ eSIR_LISTEN_INTERVAL = 2,
+ eSIR_MCAST_BCAST_FILTER = 3,
+ eSIR_ENABLE_BET = 4,
+ eSIR_BET_INTERVAL = 5
}tPowerParamType;
//Power Parameters Value s
-typedef struct
+typedef struct
{
/* Ignore DTIM */
tANI_U32 uIgnoreDTIM;
/* DTIM Period */
- tANI_U32 uDTIMPeriod;
+ tANI_U32 uDTIMPeriod;
/* Listen Interval */
tANI_U32 uListenInterval;
@@ -3641,7 +3651,7 @@ typedef struct
tANI_U32 uEnableBET;
/* Beacon Early Termination Interval */
- tANI_U32 uBETInterval;
+ tANI_U32 uBETInterval;
/* MAX LI for modulated DTIM */
tANI_U32 uMaxLIModulatedDTIM;
@@ -3664,8 +3674,8 @@ typedef struct sSirTxPerTrackingParam
#define SIR_MAC_ADDR_LEN 6
#define SIR_MAX_FILTER_TEST_DATA_LEN 8
#define SIR_MAX_NUM_MULTICAST_ADDRESS 240
-#define SIR_MAX_NUM_FILTERS 20
-#define SIR_MAX_NUM_TESTS_PER_FILTER 10
+#define SIR_MAX_NUM_FILTERS 20
+#define SIR_MAX_NUM_TESTS_PER_FILTER 10
//
// Receive Filter Parameters
@@ -3678,7 +3688,7 @@ typedef enum
SIR_RCV_FILTER_TYPE_MAX_ENUM_SIZE
}eSirReceivePacketFilterType;
-typedef enum
+typedef enum
{
SIR_FILTER_HDR_TYPE_INVALID,
SIR_FILTER_HDR_TYPE_MAC,
@@ -3689,7 +3699,7 @@ typedef enum
SIR_FILTER_HDR_TYPE_MAX
}eSirRcvPktFltProtocolType;
-typedef enum
+typedef enum
{
SIR_FILTER_CMP_TYPE_INVALID,
SIR_FILTER_CMP_TYPE_EQUAL,
@@ -3704,20 +3714,20 @@ typedef struct sSirRcvPktFilterFieldParams
eSirRcvPktFltProtocolType protocolLayer;
eSirRcvPktFltCmpFlagType cmpFlag;
/* Length of the data to compare */
- tANI_U16 dataLength;
+ tANI_U16 dataLength;
/* from start of the respective frame header */
- tANI_U8 dataOffset;
+ tANI_U8 dataOffset;
/* Reserved field */
- tANI_U8 reserved;
+ tANI_U8 reserved;
/* Data to compare */
tANI_U8 compareData[SIR_MAX_FILTER_TEST_DATA_LEN];
/* Mask to be applied on the received packet data before compare */
- tANI_U8 dataMask[SIR_MAX_FILTER_TEST_DATA_LEN];
+ tANI_U8 dataMask[SIR_MAX_FILTER_TEST_DATA_LEN];
}tSirRcvPktFilterFieldParams, *tpSirRcvPktFilterFieldParams;
typedef struct sSirRcvPktFilterCfg
{
- tANI_U8 filterId;
+ tANI_U8 filterId;
eSirReceivePacketFilterType filterType;
tANI_U32 numFieldParams;
tANI_U32 coalesceTime;
@@ -3739,7 +3749,7 @@ typedef struct sSirRcvFltPktMatchRsp
{
tANI_U16 mesgType;
tANI_U16 mesgLen;
-
+
/* Success or Failure */
tANI_U32 status;
tSirRcvFltPktMatchCnt filterMatchCnt[SIR_MAX_NUM_FILTERS];
@@ -3787,7 +3797,7 @@ typedef struct sAniBtAmpLogLinkReq
tANI_U16 msgLen; // length of the entire request
tANI_U8 sessionId; //sme Session Id
void *btampHandle; //AMP context
-
+
} tAniBtAmpLogLinkReq, *tpAniBtAmpLogLinkReq;
#ifdef WLAN_FEATURE_GTK_OFFLOAD
@@ -3797,7 +3807,7 @@ typedef struct sAniBtAmpLogLinkReq
typedef struct
{
tANI_U32 ulFlags; /* optional flags */
- tANI_U8 aKCK[16]; /* Key confirmation key */
+ tANI_U8 aKCK[16]; /* Key confirmation key */
tANI_U8 aKEK[16]; /* key encryption key */
tANI_U64 ullKeyReplayCounter; /* replay counter */
tSirMacAddr bssId;
@@ -3822,10 +3832,10 @@ typedef struct
#ifdef WLAN_WAKEUP_EVENTS
/*---------------------------------------------------------------------------
- tSirWakeReasonInd
+ tSirWakeReasonInd
---------------------------------------------------------------------------*/
typedef struct
-{
+{
tANI_U16 mesgType;
tANI_U16 mesgLen;
tANI_U32 ulReason; /* see tWakeReasonType */
@@ -3835,12 +3845,12 @@ typedef struct
will be less than the actual length */
tANI_U32 ulActualDataLen; /* actual length of data */
tANI_U8 aDataStart[1]; /* variable length start of data (length == storedDataLen)
- see specific wake type */
+ see specific wake type */
} tSirWakeReasonInd, *tpSirWakeReasonInd;
#endif // WLAN_WAKEUP_EVENTS
/*---------------------------------------------------------------------------
- sAniSetTmLevelReq
+ sAniSetTmLevelReq
---------------------------------------------------------------------------*/
typedef struct sAniSetTmLevelReq
{
@@ -4100,9 +4110,9 @@ typedef struct sSirTdlsLinkEstablishInd
tANI_U8 ptiTemplateLen;
tANI_U8 ptiTemplateBuf[64];
tANI_U8 extCapability[8];
-/* This will be part of PTI template when sent by PE
+/* This will be part of PTI template when sent by PE
tANI_U8 linkIdentifier[20];
-*/
+*/
} tSirTdlsLinkEstablishInd, *tpSirTdlsLinkEstablishInd;
typedef struct sSirTdlsLinkTeardownInd
diff --git a/CORE/MAC/src/include/dphGlobal.h b/CORE/MAC/src/include/dphGlobal.h
index 60fae8d80e1d..1d5fb46b0398 100644
--- a/CORE/MAC/src/include/dphGlobal.h
+++ b/CORE/MAC/src/include/dphGlobal.h
@@ -498,7 +498,7 @@ typedef struct sDphHashNode
// Maximum Rx A-MPDU factor
- tANI_U8 htMaxRxAMpduFactor:2;
+ tANI_U8 htMaxRxAMpduFactor:3;
//
@@ -512,7 +512,7 @@ typedef struct sDphHashNode
tANI_U8 htSupportedChannelWidthSet:1;
tANI_U8 htSecondaryChannelOffset:2;
- tANI_U8 rsvd1:3;
+ tANI_U8 rsvd1:2;
///////////////////////////////////////////////////////////////////////
diff --git a/CORE/MAC/src/pe/include/limAdmitControl.h b/CORE/MAC/src/pe/include/limAdmitControl.h
index e9c3f0014697..e1ea2e0b1e72 100644
--- a/CORE/MAC/src/pe/include/limAdmitControl.h
+++ b/CORE/MAC/src/pe/include/limAdmitControl.h
@@ -96,8 +96,12 @@ limUpdateAdmitPolicy(
tpAniSirGlobal pMac);
tSirRetStatus limAdmitControlInit(tpAniSirGlobal pMac);
-
+#ifdef FEATURE_WLAN_CCX
+tSirRetStatus limSendHalMsgAddTs(tpAniSirGlobal pMac, tANI_U16 staIdx, tANI_U8 tspecIdx, tSirMacTspecIE tspecIE, tANI_U8 sessionId, tANI_U16 tsm_interval);
+#else
tSirRetStatus limSendHalMsgAddTs(tpAniSirGlobal pMac, tANI_U16 staIdx, tANI_U8 tspecIdx, tSirMacTspecIE tspecIE, tANI_U8 sessionId);
+#endif
+
tSirRetStatus limSendHalMsgDelTs(tpAniSirGlobal pMac, tANI_U16 staIdx, tANI_U8 tspecIdx, tSirDeltsReqInfo delts, tANI_U8 sessionId);
void limProcessHalAddTsRsp(tpAniSirGlobal pMac, tpSirMsgQ limMsg);
diff --git a/CORE/MAC/src/pe/include/limGlobal.h b/CORE/MAC/src/pe/include/limGlobal.h
index 33e4cef1a258..28163fa62255 100644
--- a/CORE/MAC/src/pe/include/limGlobal.h
+++ b/CORE/MAC/src/pe/include/limGlobal.h
@@ -328,11 +328,19 @@ struct tLimScanResultNode
#ifdef FEATURE_OEM_DATA_SUPPORT
#ifndef OEM_DATA_REQ_SIZE
+#ifdef QCA_WIFI_2_0
+#define OEM_DATA_REQ_SIZE 276
+#else
#define OEM_DATA_REQ_SIZE 134
#endif
+#endif
#ifndef OEM_DATA_RSP_SIZE
+#ifdef QCA_WIFI_2_0
+#define OEM_DATA_RSP_SIZE 1720
+#else
#define OEM_DATA_RSP_SIZE 1968
#endif
+#endif
// OEM Data related structure definitions
typedef struct sLimMlmOemDataReq
diff --git a/CORE/MAC/src/pe/include/limSession.h b/CORE/MAC/src/pe/include/limSession.h
index 91a3f60800f2..89148a800c84 100644
--- a/CORE/MAC/src/pe/include/limSession.h
+++ b/CORE/MAC/src/pe/include/limSession.h
@@ -327,6 +327,7 @@ typedef struct sPESession // Added to Support BT-AMP
tANI_U8 apCenterChan;
tANI_U8 apChanWidth;
tANI_U8 txBFIniFeatureEnabled;
+ tANI_U8 txMuBformee;
#endif
tANI_U8 spectrumMgtEnabled;
/* *********************11H related*****************************/
@@ -339,6 +340,7 @@ typedef struct sPESession // Added to Support BT-AMP
/*Flag to Track Status/Indicate HBFailure on this session */
tANI_BOOLEAN LimHBFailureStatus;
tANI_U32 gLimPhyMode;
+ tANI_U8 amsduSupportedInBA;
tANI_U8 txLdpcIniFeatureEnabled;
/**
diff --git a/CORE/MAC/src/pe/lim/limAdmitControl.c b/CORE/MAC/src/pe/lim/limAdmitControl.c
index 4ed6d531a562..1eecd32e8cd1 100644
--- a/CORE/MAC/src/pe/lim/limAdmitControl.c
+++ b/CORE/MAC/src/pe/lim/limAdmitControl.c
@@ -1071,9 +1071,19 @@ tSirRetStatus limUpdateAdmitPolicy(tpAniSirGlobal pMac)
\param tSirMacTspecIE tspecIE
\param tSirTclasInfo *tclasInfo
\param tANI_U8 tclasProc
+\param tANI_U16 tsm_interval
\return eSirRetStatus - status
-------------------------------------------------------------*/
-
+#ifdef FEATURE_WLAN_CCX
+tSirRetStatus
+limSendHalMsgAddTs(
+ tpAniSirGlobal pMac,
+ tANI_U16 staIdx,
+ tANI_U8 tspecIdx,
+ tSirMacTspecIE tspecIE,
+ tANI_U8 sessionId,
+ tANI_U16 tsm_interval)
+#else
tSirRetStatus
limSendHalMsgAddTs(
tpAniSirGlobal pMac,
@@ -1081,6 +1091,7 @@ limSendHalMsgAddTs(
tANI_U8 tspecIdx,
tSirMacTspecIE tspecIE,
tANI_U8 sessionId)
+#endif
{
tSirMsgQ msg;
tpAddTsParams pAddTsParam;
@@ -1097,6 +1108,10 @@ limSendHalMsgAddTs(
palCopyMemory(pMac->hHdd, &pAddTsParam->tspec, &tspecIE, sizeof(tSirMacTspecIE));
pAddTsParam->sessionId = sessionId;
+#ifdef FEATURE_WLAN_CCX
+ pAddTsParam->tsm_interval = tsm_interval;
+#endif
+
msg.type = WDA_ADD_TS_REQ;
msg.bodyptr = pAddTsParam;
msg.bodyval = 0;
diff --git a/CORE/MAC/src/pe/lim/limAssocUtils.c b/CORE/MAC/src/pe/lim/limAssocUtils.c
index 6833d85e5478..5a09675ecce7 100644
--- a/CORE/MAC/src/pe/lim/limAssocUtils.c
+++ b/CORE/MAC/src/pe/lim/limAssocUtils.c
@@ -2550,6 +2550,8 @@ limAddStaSelf(tpAniSirGlobal pMac,tANI_U16 staIdx, tANI_U8 updateSta, tpPESessio
tSirRetStatus retCode = eSIR_SUCCESS;
tSirMacAddr staMac;
tANI_U32 listenInterval = WNI_CFG_LISTEN_INTERVAL_STADEF;
+ tANI_U32 ampduLenExponent = 0;
+
/*This self Sta dot 11 mode comes from the cfg and the expectation here is
* that cfg carries the systemwide capability that device under
* consideration can support. This capability gets plumbed into the cfg
@@ -2658,6 +2660,18 @@ limAddStaSelf(tpAniSirGlobal pMac,tANI_U16 staIdx, tANI_U8 updateSta, tpPESessio
limLog( pMac, LOG1, FL("VHT WIDTH SET %d"),pAddStaParams->vhtTxChannelWidthSet);
}
pAddStaParams->vhtTxBFCapable = psessionEntry->txBFIniFeatureEnabled;
+
+ // In 11ac mode, the hardware is capable of supporting 128K AMPDU size
+ if ( IS_DOT11_MODE_VHT(selfStaDot11Mode) )
+ {
+ if(wlan_cfgGetInt(pMac, WNI_CFG_VHT_AMPDU_LEN_EXPONENT, &ampduLenExponent)
+ != eSIR_SUCCESS)
+ {
+ limLog(pMac, LOGP, FL("Couldn't get WNI_CFG_VHT_AMPDU_LEN_EXPONENT"));
+ }
+ pAddStaParams->maxAmpduSize = (tANI_U8)ampduLenExponent;
+ }
+ pAddStaParams->vhtTxMUBformeeCapable = psessionEntry->txMuBformee;
#endif
/* For Self STA get the LDPC capability from session i.e config.ini*/
@@ -3324,22 +3338,33 @@ tSirRetStatus limStaSendAddBss( tpAniSirGlobal pMac, tpSirAssocRsp pAssocRsp,
pAddBssParams->staContext.htCapable = 1;
pAddBssParams->staContext.greenFieldCapable = ( tANI_U8 )pAssocRsp->HTCaps.greenField;
pAddBssParams->staContext.lsigTxopProtection = ( tANI_U8 )pAssocRsp->HTCaps.lsigTXOPProtection;
+#ifdef WLAN_FEATURE_11AC
+ if (psessionEntry->vhtCapability && pBeaconStruct->VHTCaps.present)
+ {
+ pAddBssParams->staContext.vhtCapable = 1;
+ if ((pAssocRsp->VHTCaps.suBeamFormerCap ||
+ pAssocRsp->VHTCaps.muBeamformerCap) &&
+ psessionEntry->txBFIniFeatureEnabled)
+ {
+ pAddBssParams->staContext.vhtTxBFCapable = 1;
+ }
+
+ if (pAssocRsp->VHTCaps.muBeamformerCap &&
+ psessionEntry->txMuBformee )
+ {
+ pAddBssParams->staContext.vhtTxMUBformeeCapable = 1;
+ }
+ }
+#endif
+
if( (pAssocRsp->HTCaps.supportedChannelWidthSet) &&
(chanWidthSupp) )
{
pAddBssParams->staContext.txChannelWidthSet = ( tANI_U8 )pAssocRsp->HTInfo.recommendedTxWidthSet;
-
#ifdef WLAN_FEATURE_11AC
- if (psessionEntry->vhtCapability && ( pBeaconStruct->VHTCaps.present ))
+ if (pAddBssParams->staContext.vhtCapable)
{
- pAddBssParams->staContext.vhtCapable = 1;
pAddBssParams->staContext.vhtTxChannelWidthSet = pAssocRsp->VHTOperation.chanWidth; //pMac->lim.apChanWidth;
- if ( (pAssocRsp->VHTCaps.suBeamFormerCap ||
- pAssocRsp->VHTCaps.muBeamformerCap) &&
- psessionEntry->txBFIniFeatureEnabled )
- {
- pAddBssParams->staContext.vhtTxBFCapable = 1;
- }
}
#endif
}
@@ -3379,9 +3404,9 @@ tSirRetStatus limStaSendAddBss( tpAniSirGlobal pMac, tpSirAssocRsp pAssocRsp,
(tANI_U8 *)&pAssocRsp->HTCaps + sizeof(tANI_U8),
sizeof(pAddBssParams->staContext.ht_caps));
- //If WMM IE or 802.11E IE is not present and AP is HT AP then enable WMM
- if ((psessionEntry->limWmeEnabled && (pAssocRsp->wmeEdcaPresent || pAddBssParams->htCapable)) ||
- (psessionEntry->limQosEnabled && (pAssocRsp->edcaPresent || pAddBssParams->htCapable)))
+ //If WMM IE or 802.11E IE is present then enable WMM
+ if ((psessionEntry->limWmeEnabled && pAssocRsp->wmeEdcaPresent) ||
+ (psessionEntry->limQosEnabled && pAssocRsp->edcaPresent))
pAddBssParams->staContext.wmmEnabled = 1;
else
pAddBssParams->staContext.wmmEnabled = 0;
@@ -3629,23 +3654,35 @@ tSirRetStatus limStaSendAddBssPreAssoc( tpAniSirGlobal pMac, tANI_U8 updateEntry
pAddBssParams->staContext.htCapable = 1;
pAddBssParams->staContext.greenFieldCapable = ( tANI_U8 ) pBeaconStruct->HTCaps.greenField;
pAddBssParams->staContext.lsigTxopProtection = ( tANI_U8 ) pBeaconStruct->HTCaps.lsigTXOPProtection;
+#ifdef WLAN_FEATURE_11AC
+ if (psessionEntry->vhtCapability && pBeaconStruct->VHTCaps.present)
+ {
+ pAddBssParams->staContext.vhtCapable = 1;
+ if ((pBeaconStruct->VHTCaps.suBeamFormerCap ||
+ pBeaconStruct->VHTCaps.muBeamformerCap) &&
+ psessionEntry->txBFIniFeatureEnabled )
+ {
+ pAddBssParams->staContext.vhtTxBFCapable = 1;
+ }
+
+ if ( pBeaconStruct->VHTCaps.muBeamformerCap &&
+ psessionEntry->txMuBformee )
+ {
+ pAddBssParams->staContext.vhtTxMUBformeeCapable = 1;
+ }
+ }
+#endif
if( (pBeaconStruct->HTCaps.supportedChannelWidthSet) &&
(chanWidthSupp) )
{
pAddBssParams->staContext.txChannelWidthSet = ( tANI_U8 )pBeaconStruct->HTInfo.recommendedTxWidthSet;
- #ifdef WLAN_FEATURE_11AC
- if (psessionEntry->vhtCapability && ( pBeaconStruct->VHTCaps.present ))
+#ifdef WLAN_FEATURE_11AC
+ if (pAddBssParams->staContext.vhtCapable)
{
- pAddBssParams->staContext.vhtCapable = 1;
- pAddBssParams->staContext.vhtTxChannelWidthSet = pBeaconStruct->VHTOperation.chanWidth;
- if ((pBeaconStruct->VHTCaps.suBeamFormerCap ||
- pBeaconStruct->VHTCaps.muBeamformerCap) &&
- psessionEntry->txBFIniFeatureEnabled )
- {
- pAddBssParams->staContext.vhtTxBFCapable = 1;
- }
+ pAddBssParams->staContext.vhtTxChannelWidthSet =
+ pBeaconStruct->VHTOperation.chanWidth;
}
- #endif
+#endif
}
else
{
diff --git a/CORE/MAC/src/pe/lim/limFT.c b/CORE/MAC/src/pe/lim/limFT.c
index ca206b2f9add..c611571473f8 100644
--- a/CORE/MAC/src/pe/lim/limFT.c
+++ b/CORE/MAC/src/pe/lim/limFT.c
@@ -27,13 +27,13 @@
#ifdef WLAN_FEATURE_VOWIFI_11R
/**=========================================================================
-
- \brief implementation for PE 11r VoWiFi FT Protocol
-
+
+ \brief implementation for PE 11r VoWiFi FT Protocol
+
Copyright 2008 (c) Qualcomm Technologies, Inc. All Rights Reserved.
-
+
Qualcomm Technologies Confidential and Proprietary.
-
+
========================================================================*/
/* $Header$ */
@@ -59,7 +59,7 @@
#define LIM_FT_RIC_DESCRIPTOR_MAX_VAR_DATA_LEN 255
/*--------------------------------------------------------------------------
- Initialize the FT variables.
+ Initialize the FT variables.
------------------------------------------------------------------------*/
void limFTOpen(tpAniSirGlobal pMac)
{
@@ -68,15 +68,15 @@ void limFTOpen(tpAniSirGlobal pMac)
}
/*--------------------------------------------------------------------------
- Cleanup FT variables.
+ Cleanup FT variables.
------------------------------------------------------------------------*/
void limFTCleanup(tpAniSirGlobal pMac)
{
- if (pMac->ft.ftPEContext.pFTPreAuthReq)
+ if (pMac->ft.ftPEContext.pFTPreAuthReq)
{
#if defined WLAN_FEATURE_VOWIFI_11R_DEBUG
PELOGE(limLog( pMac, LOGE, "%s: Freeing pFTPreAuthReq= %p",
- __func__, pMac->ft.ftPEContext.pFTPreAuthReq);)
+ __func__, pMac->ft.ftPEContext.pFTPreAuthReq);)
#endif
if (pMac->ft.ftPEContext.pFTPreAuthReq->pbssDescription)
{
@@ -93,7 +93,7 @@ void limFTCleanup(tpAniSirGlobal pMac)
{
#if defined WLAN_FEATURE_VOWIFI_11R_DEBUG
PELOGE(limLog( pMac, LOGE, "%s: Setting psavedsessionEntry= %p to NULL",
- __func__, pMac->ft.ftPEContext.psavedsessionEntry);)
+ __func__, pMac->ft.ftPEContext.psavedsessionEntry);)
#endif
pMac->ft.ftPEContext.psavedsessionEntry = NULL;
}
@@ -111,7 +111,7 @@ void limFTCleanup(tpAniSirGlobal pMac)
pMac->ft.ftPEContext.pftSessionEntry = NULL;
#if defined WLAN_FEATURE_VOWIFI_11R_DEBUG
PELOGE(limLog( pMac, LOGE, "%s: Setting psavedsessionEntry= %p to NULL",
- __func__, pMac->ft.ftPEContext.psavedsessionEntry);)
+ __func__, pMac->ft.ftPEContext.psavedsessionEntry);)
#endif
}
@@ -127,20 +127,20 @@ void limFTCleanup(tpAniSirGlobal pMac)
pMac->ft.ftPEContext.pAddStaReq = NULL;
}
- pMac->ft.ftPEContext.ftPreAuthStatus = eSIR_SUCCESS;
+ pMac->ft.ftPEContext.ftPreAuthStatus = eSIR_SUCCESS;
}
/*--------------------------------------------------------------------------
- Init FT variables.
+ Init FT variables.
------------------------------------------------------------------------*/
void limFTInit(tpAniSirGlobal pMac)
{
- if (pMac->ft.ftPEContext.pFTPreAuthReq)
+ if (pMac->ft.ftPEContext.pFTPreAuthReq)
{
#if defined WLAN_FEATURE_VOWIFI_11R_DEBUG
PELOGE(limLog( pMac, LOGE, "%s: Freeing pFTPreAuthReq= %p",
- __func__, pMac->ft.ftPEContext.pFTPreAuthReq);)
+ __func__, pMac->ft.ftPEContext.pFTPreAuthReq);)
#endif
if (pMac->ft.ftPEContext.pFTPreAuthReq->pbssDescription)
{
@@ -158,7 +158,7 @@ void limFTInit(tpAniSirGlobal pMac)
{
#if defined WLAN_FEATURE_VOWIFI_11R_DEBUG
PELOGE(limLog( pMac, LOGE, "%s: Setting psavedsessionEntry= %p to NULL",
- __func__, pMac->ft.ftPEContext.psavedsessionEntry);)
+ __func__, pMac->ft.ftPEContext.psavedsessionEntry);)
#endif
pMac->ft.ftPEContext.psavedsessionEntry = NULL;
}
@@ -170,7 +170,7 @@ void limFTInit(tpAniSirGlobal pMac)
/* Cannot delete sessions across associations */
#if defined WLAN_FEATURE_VOWIFI_11R_DEBUG
PELOGE(limLog( pMac, LOGE, "%s: Deleting session = %p ",
- __func__, pMac->ft.ftPEContext.pftSessionEntry);)
+ __func__, pMac->ft.ftPEContext.pftSessionEntry);)
#endif
pMac->ft.ftPEContext.pftSessionEntry = NULL;
}
@@ -179,7 +179,7 @@ void limFTInit(tpAniSirGlobal pMac)
{
#if defined WLAN_FEATURE_VOWIFI_11R_DEBUG
PELOGE(limLog( pMac, LOGE, "%s: Freeing AddBssReq = %p ",
- __func__, pMac->ft.ftPEContext.pAddBssReq);)
+ __func__, pMac->ft.ftPEContext.pAddBssReq);)
#endif
vos_mem_free(pMac->ft.ftPEContext.pAddBssReq);
pMac->ft.ftPEContext.pAddBssReq = NULL;
@@ -190,18 +190,18 @@ void limFTInit(tpAniSirGlobal pMac)
{
#if defined WLAN_FEATURE_VOWIFI_11R_DEBUG
PELOGE(limLog( pMac, LOGE, "%s: Freeing AddStaReq = %p ",
- __func__, pMac->ft.ftPEContext.pAddStaReq);)
+ __func__, pMac->ft.ftPEContext.pAddStaReq);)
#endif
vos_mem_free(pMac->ft.ftPEContext.pAddStaReq);
pMac->ft.ftPEContext.pAddStaReq = NULL;
}
- pMac->ft.ftPEContext.ftPreAuthStatus = eSIR_SUCCESS;
+ pMac->ft.ftPEContext.ftPreAuthStatus = eSIR_SUCCESS;
}
/*------------------------------------------------------------------
- *
+ *
* This is the handler after suspending the link.
* We suspend the link and then now proceed to switch channel.
*
@@ -209,9 +209,9 @@ void limFTInit(tpAniSirGlobal pMac)
void FTPreAuthSuspendLinkHandler(tpAniSirGlobal pMac, eHalStatus status, tANI_U32 *data)
{
tpPESession psessionEntry;
-
+
// The link is suspended of not ?
- if (status != eHAL_STATUS_SUCCESS)
+ if (status != eHAL_STATUS_SUCCESS)
{
PELOGE(limLog( pMac, LOGE, "%s: Returning ", __func__);)
// Post the FT Pre Auth Response to SME
@@ -225,7 +225,7 @@ void FTPreAuthSuspendLinkHandler(tpAniSirGlobal pMac, eHalStatus status, tANI_U3
// Perform some sanity check before proceeding.
if ((pMac->ft.ftPEContext.pFTPreAuthReq) && psessionEntry)
{
- limChangeChannelWithCallback(pMac,
+ limChangeChannelWithCallback(pMac,
pMac->ft.ftPEContext.pFTPreAuthReq->preAuthchannelNum,
limPerformFTPreAuth, NULL, psessionEntry);
return;
@@ -268,7 +268,7 @@ int limProcessFTPreAuthReq(tpAniSirGlobal pMac, tpSirMsgQ pMsg)
#endif
// Get the current session entry
- psessionEntry = peFindSessionByBssid(pMac,
+ psessionEntry = peFindSessionByBssid(pMac,
pMac->ft.ftPEContext.pFTPreAuthReq->currbssId, &sessionId);
if (psessionEntry == NULL)
{
@@ -277,20 +277,20 @@ int limProcessFTPreAuthReq(tpAniSirGlobal pMac, tpSirMsgQ pMsg)
limPrintMacAddr( pMac, pMac->ft.ftPEContext.pFTPreAuthReq->currbssId, LOGE );
// Post the FT Pre Auth Response to SME
limPostFTPreAuthRsp(pMac, eSIR_FAILURE, NULL, 0, NULL);
- pMac->ft.ftPEContext.pFTPreAuthReq = NULL;
+ pMac->ft.ftPEContext.pFTPreAuthReq = NULL;
return TRUE;
}
// Dont need to suspend if APs are in same channel
- if (psessionEntry->currentOperChannel != pMac->ft.ftPEContext.pFTPreAuthReq->preAuthchannelNum)
+ if (psessionEntry->currentOperChannel != pMac->ft.ftPEContext.pFTPreAuthReq->preAuthchannelNum)
{
// Need to suspend link only if the channels are different
PELOG2(limLog(pMac,LOG2,"%s: Performing pre-auth on different"
" channel (session %p)", __func__, psessionEntry);)
- limSuspendLink(pMac, eSIR_CHECK_ROAMING_SCAN, FTPreAuthSuspendLinkHandler,
- (tANI_U32 *)psessionEntry);
+ limSuspendLink(pMac, eSIR_CHECK_ROAMING_SCAN, FTPreAuthSuspendLinkHandler,
+ (tANI_U32 *)psessionEntry);
}
- else
+ else
{
PELOG2(limLog(pMac,LOG2,"%s: Performing pre-auth on same"
" channel (session %p)", __func__, psessionEntry);)
@@ -302,10 +302,10 @@ int limProcessFTPreAuthReq(tpAniSirGlobal pMac, tpSirMsgQ pMsg)
}
/*------------------------------------------------------------------
- * Send the Auth1
+ * Send the Auth1
* Receive back Auth2
*------------------------------------------------------------------*/
-void limPerformFTPreAuth(tpAniSirGlobal pMac, eHalStatus status, tANI_U32 *data,
+void limPerformFTPreAuth(tpAniSirGlobal pMac, eHalStatus status, tANI_U32 *data,
tpPESession psessionEntry)
{
tSirMacAuthFrameBody authFrame;
@@ -313,13 +313,13 @@ void limPerformFTPreAuth(tpAniSirGlobal pMac, eHalStatus status, tANI_U32 *data,
if (psessionEntry->is11Rconnection)
{
// Only 11r assoc has FT IEs.
- if (pMac->ft.ftPEContext.pFTPreAuthReq->ft_ies == NULL)
+ if (pMac->ft.ftPEContext.pFTPreAuthReq->ft_ies == NULL)
{
PELOGE(limLog( pMac, LOGE, "%s: FTIEs for Auth Req Seq 1 is absent");)
return;
}
}
- if (status != eHAL_STATUS_SUCCESS)
+ if (status != eHAL_STATUS_SUCCESS)
{
PELOGE(limLog( pMac, LOGE, "%s: Change channel not successful for FT pre-auth");)
return;
@@ -335,7 +335,7 @@ void limPerformFTPreAuth(tpAniSirGlobal pMac, eHalStatus status, tANI_U32 *data,
if (psessionEntry->is11Rconnection)
{
- // Now we are on the right channel and need to send out Auth1 and
+ // Now we are on the right channel and need to send out Auth1 and
// receive Auth2.
authFrame.authAlgoNumber = eSIR_FT_AUTH; // Set the auth type to FT
}
@@ -344,7 +344,7 @@ void limPerformFTPreAuth(tpAniSirGlobal pMac, eHalStatus status, tANI_U32 *data,
{
// Will need to make isCCXconnection a enum may be for further
// improvements to this to match this algorithm number
- authFrame.authAlgoNumber = eSIR_OPEN_SYSTEM; // For now if its CCX and 11r FT.
+ authFrame.authAlgoNumber = eSIR_OPEN_SYSTEM; // For now if its CCX and 11r FT.
}
#endif
authFrame.authTransactionSeqNumber = SIR_MAC_AUTH_FRAME_1;
@@ -379,8 +379,8 @@ MTRACE(macTrace(pMac, TRACE_CODE_TIMER_ACTIVATE, psessionEntry->peSessionId, eLI
* The newly created ft Session entry is passed to this function
*
*------------------------------------------------------------------*/
-tSirRetStatus limFTPrepareAddBssReq( tpAniSirGlobal pMac,
- tANI_U8 updateEntry, tpPESession pftSessionEntry,
+tSirRetStatus limFTPrepareAddBssReq( tpAniSirGlobal pMac,
+ tANI_U8 updateEntry, tpPESession pftSessionEntry,
tpSirBssDescription bssDescription )
{
tpAddBssParams pAddBssParams = NULL;
@@ -388,7 +388,7 @@ tSirRetStatus limFTPrepareAddBssReq( tpAniSirGlobal pMac,
tANI_U8 chanWidthSupp = 0;
tSchBeaconStruct *pBeaconStruct;
- if(eHAL_STATUS_SUCCESS != palAllocateMemory(pMac->hHdd,
+ if(eHAL_STATUS_SUCCESS != palAllocateMemory(pMac->hHdd,
(void **)&pBeaconStruct, sizeof(tSchBeaconStruct)))
{
limLog(pMac, LOGE, FL("Unable to PAL allocate memory for creating ADD_BSS") );
@@ -404,7 +404,7 @@ tSirRetStatus limFTPrepareAddBssReq( tpAniSirGlobal pMac,
FL( "Unable to PAL allocate memory for creating ADD_BSS" ));
return (eSIR_MEM_ALLOC_FAILED);
}
-
+
palZeroMemory( pMac->hHdd, (tANI_U8 *) pAddBssParams, sizeof( tAddBssParams ));
@@ -426,10 +426,10 @@ tSirRetStatus limFTPrepareAddBssReq( tpAniSirGlobal pMac,
pAddBssParams->operMode = BSS_OPERATIONAL_MODE_STA;
pAddBssParams->beaconInterval = bssDescription->beaconInterval;
-
+
pAddBssParams->dtimPeriod = pBeaconStruct->tim.dtimPeriod;
pAddBssParams->updateBss = updateEntry;
-
+ pAddBssParams->reassocReq = true;
pAddBssParams->cfParamSet.cfpCount = pBeaconStruct->cfParamSet.cfpCount;
pAddBssParams->cfParamSet.cfpPeriod = pBeaconStruct->cfParamSet.cfpPeriod;
@@ -442,8 +442,8 @@ tSirRetStatus limFTPrepareAddBssReq( tpAniSirGlobal pMac,
pBeaconStruct->supportedRates.rate, pBeaconStruct->supportedRates.numRates );
pAddBssParams->nwType = bssDescription->nwType;
-
- pAddBssParams->shortSlotTimeSupported = (tANI_U8)pBeaconStruct->capabilityInfo.shortSlotTime;
+
+ pAddBssParams->shortSlotTimeSupported = (tANI_U8)pBeaconStruct->capabilityInfo.shortSlotTime;
pAddBssParams->llaCoexist = (tANI_U8) pftSessionEntry->beaconParams.llaCoexist;
pAddBssParams->llbCoexist = (tANI_U8) pftSessionEntry->beaconParams.llbCoexist;
pAddBssParams->llgCoexist = (tANI_U8) pftSessionEntry->beaconParams.llgCoexist;
@@ -516,7 +516,7 @@ tSirRetStatus limFTPrepareAddBssReq( tpAniSirGlobal pMac,
else
{
pAddBssParams->staContext.txChannelWidthSet = WNI_CFG_CHANNEL_BONDING_MODE_DISABLE;
- }
+ }
pAddBssParams->staContext.mimoPS = (tSirMacHTMIMOPowerSaveState)pBeaconStruct->HTCaps.mimoPowerSave;
pAddBssParams->staContext.delBASupport = ( tANI_U8 ) pBeaconStruct->HTCaps.delayedBA;
pAddBssParams->staContext.maxAmsduSize = ( tANI_U8 ) pBeaconStruct->HTCaps.maximalAMSDUsize;
@@ -525,7 +525,7 @@ tSirRetStatus limFTPrepareAddBssReq( tpAniSirGlobal pMac,
pAddBssParams->staContext.fShortGI20Mhz = (tANI_U8)pBeaconStruct->HTCaps.shortGI20MHz;
pAddBssParams->staContext.fShortGI40Mhz = (tANI_U8)pBeaconStruct->HTCaps.shortGI40MHz;
pAddBssParams->staContext.maxAmpduSize= pBeaconStruct->HTCaps.maxRxAMPDUFactor;
-
+
if( pBeaconStruct->HTInfo.present )
pAddBssParams->staContext.rifsMode = pBeaconStruct->HTInfo.rifsMode;
}
@@ -533,16 +533,16 @@ tSirRetStatus limFTPrepareAddBssReq( tpAniSirGlobal pMac,
if ((pftSessionEntry->limWmeEnabled && pBeaconStruct->wmeEdcaPresent) ||
(pftSessionEntry->limQosEnabled && pBeaconStruct->edcaPresent))
pAddBssParams->staContext.wmmEnabled = 1;
- else
+ else
pAddBssParams->staContext.wmmEnabled = 0;
//Update the rates
#ifdef WLAN_FEATURE_11AC
- limPopulateOwnRateSet(pMac, &pAddBssParams->staContext.supportedRates,
- pBeaconStruct->HTCaps.supportedMCSSet,
+ limPopulateOwnRateSet(pMac, &pAddBssParams->staContext.supportedRates,
+ pBeaconStruct->HTCaps.supportedMCSSet,
false,pftSessionEntry,&pBeaconStruct->VHTCaps);
#else
- limPopulateOwnRateSet(pMac, &pAddBssParams->staContext.supportedRates,
+ limPopulateOwnRateSet(pMac, &pAddBssParams->staContext.supportedRates,
beaconStruct.HTCaps.supportedMCSSet, false,pftSessionEntry);
#endif
limFillSupportedRatesInfo(pMac, NULL, &pAddBssParams->staContext.supportedRates,pftSessionEntry);
@@ -559,7 +559,7 @@ tSirRetStatus limFTPrepareAddBssReq( tpAniSirGlobal pMac,
pAddBssParams->staContext.staTCParams[i].rxBApolicy = eBA_POLICY_IMMEDIATE;
}
-#if defined WLAN_FEATURE_VOWIFI
+#if defined WLAN_FEATURE_VOWIFI
pAddBssParams->maxTxPower = pftSessionEntry->maxTxPower;
#endif
@@ -568,13 +568,13 @@ tSirRetStatus limFTPrepareAddBssReq( tpAniSirGlobal pMac,
pAddBssParams->staContext.sessionId = pftSessionEntry->peSessionId;
pAddBssParams->sessionId = pftSessionEntry->peSessionId;
-
+
// Set a new state for MLME
pftSessionEntry->limMlmState = eLIM_MLM_WT_ADD_BSS_RSP_FT_REASSOC_STATE;
MTRACE(macTrace(pMac, TRACE_CODE_MLM_STATE, pftSessionEntry->peSessionId, eLIM_MLM_WT_ADD_BSS_RSP_FT_REASSOC_STATE));
pAddBssParams->halPersona=(tANI_U8)pftSessionEntry->pePersona; //pass on the session persona to hal
-
+
pMac->ft.ftPEContext.pAddBssReq = pAddBssParams;
#if defined WLAN_FEATURE_VOWIFI_11R_DEBUG
@@ -587,7 +587,7 @@ tSirRetStatus limFTPrepareAddBssReq( tpAniSirGlobal pMac,
/*------------------------------------------------------------------
*
- * Setup the new session for the pre-auth AP.
+ * Setup the new session for the pre-auth AP.
* Return the newly created session entry.
*
*------------------------------------------------------------------*/
@@ -600,7 +600,7 @@ tpPESession limFillFTSession(tpAniSirGlobal pMac,
tPowerdBm regMax;
tSchBeaconStruct *pBeaconStruct;
- if(eHAL_STATUS_SUCCESS != palAllocateMemory(pMac->hHdd,
+ if(eHAL_STATUS_SUCCESS != palAllocateMemory(pMac->hHdd,
(void **)&pBeaconStruct, sizeof(tSchBeaconStruct)))
{
limLog(pMac, LOGE, FL("Unable to PAL allocate memory for creating limFillFTSession") );
@@ -608,7 +608,7 @@ tpPESession limFillFTSession(tpAniSirGlobal pMac,
}
-
+
/* Retrieve the session that has already been created and update the entry */
pftSessionEntry = pMac->ft.ftPEContext.pftSessionEntry;
#if defined WLAN_FEATURE_VOWIFI_11R_DEBUG || defined FEATURE_WLAN_CCX || defined(FEATURE_WLAN_LFR)
@@ -624,9 +624,9 @@ tpPESession limFillFTSession(tpAniSirGlobal pMac,
pftSessionEntry->lim11hEnable = psessionEntry->lim11hEnable;
// Fields to be filled later
- pftSessionEntry->pLimJoinReq = NULL;
- pftSessionEntry->smeSessionId = 0;
- pftSessionEntry->transactionId = 0;
+ pftSessionEntry->pLimJoinReq = NULL;
+ pftSessionEntry->smeSessionId = 0;
+ pftSessionEntry->transactionId = 0;
limExtractApCapabilities( pMac,
(tANI_U8 *) pbssDescription->ieFields,
@@ -638,7 +638,7 @@ tpPESession limFillFTSession(tpAniSirGlobal pMac,
pBeaconStruct->supportedRates.rate, pBeaconStruct->supportedRates.numRates );
pftSessionEntry->extRateSet.numRates = pBeaconStruct->extendedRates.numRates;
- palCopyMemory(pMac->hHdd, pftSessionEntry->extRateSet.rate,
+ palCopyMemory(pMac->hHdd, pftSessionEntry->extRateSet.rate,
pBeaconStruct->extendedRates.rate, pftSessionEntry->extRateSet.numRates);
@@ -664,8 +664,8 @@ tpPESession limFillFTSession(tpAniSirGlobal pMac,
/* Copy The channel Id to the session Table */
pftSessionEntry->limReassocChannelId = pbssDescription->channelId;
pftSessionEntry->currentOperChannel = pbssDescription->channelId;
-
-
+
+
if (pftSessionEntry->bssType == eSIR_INFRASTRUCTURE_MODE)
{
pftSessionEntry->limSystemRole = eLIM_STA_ROLE;
@@ -675,11 +675,11 @@ tpPESession limFillFTSession(tpAniSirGlobal pMac,
pftSessionEntry->limSystemRole = eLIM_BT_AMP_STA_ROLE;
}
else
- {
+ {
/* Throw an error and return and make sure to delete the session.*/
limLog(pMac, LOGE, FL("Invalid bss type"));
- }
-
+ }
+
pftSessionEntry->limCurrentBssCaps = pbssDescription->capabilityInfo;
pftSessionEntry->limReassocBssCaps = pbssDescription->capabilityInfo;
if( pMac->roam.configParam.shortSlotTime &&
@@ -688,9 +688,9 @@ tpPESession limFillFTSession(tpAniSirGlobal pMac,
pftSessionEntry->shortSlotTimeSupported = TRUE;
}
- regMax = cfgGetRegulatoryMaxTransmitPower( pMac, pftSessionEntry->currentOperChannel );
+ regMax = cfgGetRegulatoryMaxTransmitPower( pMac, pftSessionEntry->currentOperChannel );
localPowerConstraint = regMax;
- limExtractApCapability( pMac, (tANI_U8 *) pbssDescription->ieFields,
+ limExtractApCapability( pMac, (tANI_U8 *) pbssDescription->ieFields,
limGetIElenFromBssDescription(pbssDescription),
&pftSessionEntry->limCurrentBssQosCaps,
&pftSessionEntry->limCurrentBssPropCap,
@@ -727,7 +727,7 @@ tpPESession limFillFTSession(tpAniSirGlobal pMac,
/*------------------------------------------------------------------
*
- * Setup the session and the add bss req for the pre-auth AP.
+ * Setup the session and the add bss req for the pre-auth AP.
*
*------------------------------------------------------------------*/
void limFTSetupAuthSession(tpAniSirGlobal pMac, tpPESession psessionEntry)
@@ -748,16 +748,16 @@ void limFTSetupAuthSession(tpAniSirGlobal pMac, tpPESession psessionEntry)
#endif
#ifdef FEATURE_WLAN_LFR
- pftSessionEntry->isFastRoamIniFeatureEnabled = psessionEntry->isFastRoamIniFeatureEnabled;
+ pftSessionEntry->isFastRoamIniFeatureEnabled = psessionEntry->isFastRoamIniFeatureEnabled;
#endif
- limFTPrepareAddBssReq( pMac, FALSE, pftSessionEntry,
+ limFTPrepareAddBssReq( pMac, FALSE, pftSessionEntry,
pMac->ft.ftPEContext.pFTPreAuthReq->pbssDescription );
pMac->ft.ftPEContext.pftSessionEntry = pftSessionEntry;
}
}
/*------------------------------------------------------------------
- * Resume Link Call Back
+ * Resume Link Call Back
*------------------------------------------------------------------*/
void limFTProcessPreAuthResult(tpAniSirGlobal pMac, eHalStatus status, tANI_U32 *data)
{
@@ -778,18 +778,18 @@ void limFTProcessPreAuthResult(tpAniSirGlobal pMac, eHalStatus status, tANI_U32
}
/*------------------------------------------------------------------
- * Resume Link Call Back
+ * Resume Link Call Back
*------------------------------------------------------------------*/
-void limPerformPostFTPreAuthAndChannelChange(tpAniSirGlobal pMac, eHalStatus status, tANI_U32 *data,
+void limPerformPostFTPreAuthAndChannelChange(tpAniSirGlobal pMac, eHalStatus status, tANI_U32 *data,
tpPESession psessionEntry)
{
- //Set the resume channel to Any valid channel (invalid).
+ //Set the resume channel to Any valid channel (invalid).
//This will instruct HAL to set it to any previous valid channel.
peSetResumeChannel(pMac, 0, 0);
limResumeLink(pMac, limFTProcessPreAuthResult, (tANI_U32 *)psessionEntry);
}
-tSirRetStatus limCreateRICBlockAckIE(tpAniSirGlobal pMac, tANI_U8 tid, tCfgTrafficClass *pTrafficClass,
+tSirRetStatus limCreateRICBlockAckIE(tpAniSirGlobal pMac, tANI_U8 tid, tCfgTrafficClass *pTrafficClass,
tANI_U8 *ric_ies, tANI_U32 *ieLength)
{
/* BlockACK + RIC is not supported now, TODO later to support this */
@@ -845,18 +845,18 @@ tSirRetStatus limFTFillRICBlockAckInfo(tpAniSirGlobal pMac, tANI_U8 *ric_ies, tA
tpPESession psessionEntry = pMac->ft.ftPEContext.psavedsessionEntry;
tANI_U32 offset = 0, ieLength = 0;
tSirRetStatus status = eSIR_SUCCESS;
-
+
// First, extract the DPH entry
pSta = dphLookupHashEntry( pMac, pMac->ft.ftPEContext.pFTPreAuthReq->currbssId, &aid, &psessionEntry->dph.dphHashTable);
if( NULL == pSta )
{
PELOGE(limLog( pMac, LOGE,
FL( "STA context not found for saved session's BSSID %02x:%02x:%02x:%02x:%02x:%02x" ),
- pMac->ft.ftPEContext.pFTPreAuthReq->currbssId[0],
- pMac->ft.ftPEContext.pFTPreAuthReq->currbssId[1],
- pMac->ft.ftPEContext.pFTPreAuthReq->currbssId[2],
- pMac->ft.ftPEContext.pFTPreAuthReq->currbssId[3],
- pMac->ft.ftPEContext.pFTPreAuthReq->currbssId[4],
+ pMac->ft.ftPEContext.pFTPreAuthReq->currbssId[0],
+ pMac->ft.ftPEContext.pFTPreAuthReq->currbssId[1],
+ pMac->ft.ftPEContext.pFTPreAuthReq->currbssId[2],
+ pMac->ft.ftPEContext.pFTPreAuthReq->currbssId[3],
+ pMac->ft.ftPEContext.pFTPreAuthReq->currbssId[4],
pMac->ft.ftPEContext.pFTPreAuthReq->currbssId[5] );)
return eSIR_FAILURE;
}
@@ -900,7 +900,7 @@ void limPostFTPreAuthRsp(tpAniSirGlobal pMac, tSirRetStatus status,
{
tpSirFTPreAuthRsp pFTPreAuthRsp;
tSirMsgQ mmhMsg;
- tANI_U16 rspLen = sizeof(tSirFTPreAuthRsp);
+ tANI_U16 rspLen = sizeof(tSirFTPreAuthRsp);
// TODO: RIC Support
//tSirRetStatus sirStatus = eSIR_SUCCESS;
@@ -915,7 +915,7 @@ void limPostFTPreAuthRsp(tpAniSirGlobal pMac, tSirRetStatus status,
#if defined WLAN_FEATURE_VOWIFI_11R_DEBUG
PELOGE(limLog( pMac, LOG1, "%s: Auth Rsp = %p", pFTPreAuthRsp);)
#endif
-
+
palZeroMemory(pMac, (tANI_U8*)pFTPreAuthRsp, rspLen);
pFTPreAuthRsp->messageType = eWNI_SME_FT_PRE_AUTH_RSP;
pFTPreAuthRsp->length = (tANI_U16) rspLen;
@@ -925,24 +925,24 @@ void limPostFTPreAuthRsp(tpAniSirGlobal pMac, tSirRetStatus status,
// The bssid of the AP we are sending Auth1 to.
if (pMac->ft.ftPEContext.pFTPreAuthReq)
- sirCopyMacAddr(pFTPreAuthRsp->preAuthbssId,
+ sirCopyMacAddr(pFTPreAuthRsp->preAuthbssId,
pMac->ft.ftPEContext.pFTPreAuthReq->preAuthbssId);
-
+
// Attach the auth response now back to SME
pFTPreAuthRsp->ft_ies_length = 0;
if ((auth_rsp != NULL) && (auth_rsp_length < MAX_FTIE_SIZE))
{
// Only 11r assoc has FT IEs.
- vos_mem_copy(pFTPreAuthRsp->ft_ies, auth_rsp, auth_rsp_length);
+ vos_mem_copy(pFTPreAuthRsp->ft_ies, auth_rsp, auth_rsp_length);
pFTPreAuthRsp->ft_ies_length = auth_rsp_length;
}
-
+
#ifdef WLAN_FEATURE_VOWIFI_11R
if ((psessionEntry) && (psessionEntry->is11Rconnection))
{
/* TODO: RIC SUPPORT Fill in the Block Ack RIC IEs in the preAuthRsp */
/*
- sirStatus = limFTFillRICBlockAckInfo(pMac, pFTPreAuthRsp->ric_ies,
+ sirStatus = limFTFillRICBlockAckInfo(pMac, pFTPreAuthRsp->ric_ies,
(tANI_U32 *)&pFTPreAuthRsp->ric_ies_length);
if (eSIR_SUCCESS != sirStatus)
{
@@ -951,7 +951,7 @@ void limPostFTPreAuthRsp(tpAniSirGlobal pMac, tSirRetStatus status,
*/
}
#endif
-
+
mmhMsg.type = pFTPreAuthRsp->messageType;
mmhMsg.bodyptr = pFTPreAuthRsp;
mmhMsg.bodyval = 0;
@@ -967,7 +967,7 @@ void limPostFTPreAuthRsp(tpAniSirGlobal pMac, tSirRetStatus status,
* Send the FT Pre Auth Response to SME when ever we have a status
* ready to be sent to SME
*
- * SME will be the one to send it up to the supplicant to receive
+ * SME will be the one to send it up to the supplicant to receive
* FTIEs which will be required for Reassoc Req.
*
*------------------------------------------------------------------*/
@@ -981,15 +981,15 @@ void limHandleFTPreAuthRsp(tpAniSirGlobal pMac, tSirRetStatus status,
tpSirBssDescription pbssDescription;
// Save the status of pre-auth
- pMac->ft.ftPEContext.ftPreAuthStatus = status;
+ pMac->ft.ftPEContext.ftPreAuthStatus = status;
- // Save the auth rsp, so we can send it to
- // SME once we resume link.
- pMac->ft.ftPEContext.saved_auth_rsp_length = 0;
+ // Save the auth rsp, so we can send it to
+ // SME once we resume link.
+ pMac->ft.ftPEContext.saved_auth_rsp_length = 0;
if ((auth_rsp != NULL) && (auth_rsp_length < MAX_FTIE_SIZE))
{
vos_mem_copy(pMac->ft.ftPEContext.saved_auth_rsp,
- auth_rsp, auth_rsp_length);
+ auth_rsp, auth_rsp_length);
pMac->ft.ftPEContext.saved_auth_rsp_length = auth_rsp_length;
}
@@ -1033,14 +1033,14 @@ void limHandleFTPreAuthRsp(tpAniSirGlobal pMac, tSirRetStatus status,
limPrintMacAddr(pMac, psessionEntry->limReAssocbssId, LOGE);
}
- if (psessionEntry->currentOperChannel !=
- pMac->ft.ftPEContext.pFTPreAuthReq->preAuthchannelNum)
+ if (psessionEntry->currentOperChannel !=
+ pMac->ft.ftPEContext.pFTPreAuthReq->preAuthchannelNum)
{
// Need to move to the original AP channel
- limChangeChannelWithCallback(pMac, psessionEntry->currentOperChannel,
+ limChangeChannelWithCallback(pMac, psessionEntry->currentOperChannel,
limPerformPostFTPreAuthAndChannelChange, NULL, psessionEntry);
}
- else
+ else
{
#ifdef WLAN_FEATURE_VOWIFI_11R_DEBUG
PELOGE(limLog( pMac, LOGE, "Pre auth on same channel as connected AP channel %d",
@@ -1208,7 +1208,7 @@ void limProcessFTPreauthRspTimeout(tpAniSirGlobal pMac)
// We have failed pre auth. We need to resume link and get back on
// home channel.
- if((psessionEntry = peFindSessionBySessionId(pMac, pMac->lim.limTimers.gLimFTPreAuthRspTimer.sessionId))== NULL)
+ if((psessionEntry = peFindSessionBySessionId(pMac, pMac->lim.limTimers.gLimFTPreAuthRspTimer.sessionId))== NULL)
{
limLog(pMac, LOGE, FL("Session Does not exist for given sessionID"));
return;
@@ -1303,7 +1303,7 @@ limProcessFTAggrQosReq(tpAniSirGlobal pMac, tANI_U32 *pMsgBuf )
tpAggrAddTsParams pAggrAddTsParam;
tpPESession psessionEntry = NULL;
tpLimTspecInfo tspecInfo;
- tANI_U8 ac;
+ tANI_U8 ac;
tpDphHashNode pSta;
tANI_U16 aid;
tANI_U8 sessionId;
@@ -1342,16 +1342,16 @@ limProcessFTAggrQosReq(tpAniSirGlobal pMac, tANI_U32 *pMsgBuf )
for( i = 0; i < HAL_QOS_NUM_AC_MAX; i++ )
{
- if (aggrQosReq->aggrInfo.tspecIdx & (1<<i))
+ if (aggrQosReq->aggrInfo.tspecIdx & (1<<i))
{
tSirMacTspecIE *pTspec = &aggrQosReq->aggrInfo.aggrAddTsInfo[i].tspec;
/* Since AddTS response was successful, check for the PSB flag
- * and directional flag inside the TS Info field.
- * An AC is trigger enabled AC if the PSB subfield is set to 1
+ * and directional flag inside the TS Info field.
+ * An AC is trigger enabled AC if the PSB subfield is set to 1
* in the uplink direction.
- * An AC is delivery enabled AC if the PSB subfield is set to 1
+ * An AC is delivery enabled AC if the PSB subfield is set to 1
* in the downlink direction.
- * An AC is trigger and delivery enabled AC if the PSB subfield
+ * An AC is trigger and delivery enabled AC if the PSB subfield
* is set to 1 in the bi-direction field.
*/
if(!pMac->psOffloadEnabled)
@@ -1425,11 +1425,11 @@ limProcessFTAggrQosReq(tpAniSirGlobal pMac, tANI_U32 *pMsgBuf )
limSetActiveEdcaParams(pMac, psessionEntry->gLimEdcaParams, psessionEntry);
- if (pSta->aniPeer == eANI_BOOLEAN_TRUE)
+ if (pSta->aniPeer == eANI_BOOLEAN_TRUE)
{
limSendEdcaParams(pMac, psessionEntry->gLimEdcaParamsActive, pSta->bssId, eANI_BOOLEAN_TRUE);
}
- else
+ else
{
limSendEdcaParams(pMac, psessionEntry->gLimEdcaParamsActive, pSta->bssId, eANI_BOOLEAN_FALSE);
}
@@ -1593,14 +1593,14 @@ int limisFastTransitionRequired(tpAniSirGlobal pMac, int sessionId)
{
// If ccx or 11r connection is found we need to return TRUE
if((pMac->lim.gpSession[sessionId].bssType == eSIR_INFRASTRUCTURE_MODE) &&
- (((pMac->lim.gpSession[sessionId].is11Rconnection)
+ (((pMac->lim.gpSession[sessionId].is11Rconnection)
#ifdef FEATURE_WLAN_CCX
|| (pMac->lim.gpSession[sessionId].isCCXconnection)
#endif
#ifdef FEATURE_WLAN_LFR
|| (pMac->lim.gpSession[sessionId].isFastRoamIniFeatureEnabled)
#endif
- )&&
+ )&&
pMac->lim.gpSession[sessionId].isFastTransitionEnabled))
{
// Make sure we have 11r/CCX and FT enabled only then we need
diff --git a/CORE/MAC/src/pe/lim/limIbssPeerMgmt.c b/CORE/MAC/src/pe/lim/limIbssPeerMgmt.c
index ffab18b79e45..9f95dccea238 100644
--- a/CORE/MAC/src/pe/lim/limIbssPeerMgmt.c
+++ b/CORE/MAC/src/pe/lim/limIbssPeerMgmt.c
@@ -276,6 +276,10 @@ ibss_sta_caps_update(
if ( pPeerNode->vhtCapable )
{
pStaDs->vhtSupportedChannelWidthSet = pPeerNode->vhtSupportedChannelWidthSet;
+
+ // If in 11AC mode and if session requires 11AC mode, consider peer's
+ // max AMPDU length factor
+ pStaDs->htMaxRxAMpduFactor = pPeerNode->VHTCaps.maxAMPDULenExp;
}
}
#endif
diff --git a/CORE/MAC/src/pe/lim/limLogDump.c b/CORE/MAC/src/pe/lim/limLogDump.c
index cbb3a47630a6..1b7f1c83c374 100644
--- a/CORE/MAC/src/pe/lim/limLogDump.c
+++ b/CORE/MAC/src/pe/lim/limLogDump.c
@@ -28,7 +28,7 @@
/*============================================================================
limLogDump.c
-Implements the dump commands specific to the lim module.
+Implements the dump commands specific to the lim module.
Copyright (c) 2007 Qualcomm Technologies, Inc.
All Rights Reserved.
@@ -301,16 +301,16 @@ char *dumpLim( tpAniSirGlobal pMac, char *p, tANI_U32 sessionId)
char *triggerBeaconGen( tpAniSirGlobal pMac, char *p )
{
tSirMsgQ mesg = { (tANI_U16) SIR_LIM_BEACON_GEN_IND, (tANI_U16) 0, (tANI_U32) 0 };
-
+
pMac->lim.gLimSmeState = eLIM_SME_NORMAL_STATE;
MTRACE(macTrace(pMac, TRACE_CODE_SME_STATE, NO_SESSION, pMac->lim.gLimSmeState));
pMac->lim.gLimSystemRole = eLIM_AP_ROLE;
-
+
p += log_sprintf( pMac, p,
"Posted SIR_LIM_BEACON_GEN_IND with result = %s\n",
(eSIR_SUCCESS == limPostMsgApi( pMac, &mesg ))?
"Success": "Failure" );
-
+
return p;
}
@@ -376,7 +376,15 @@ static char *sendSmeScanReq(tpAniSirGlobal pMac, char *p)
pScanReq->scanType = eSIR_ACTIVE_SCAN;
pScanReq->returnAfterFirstMatch = 0;
pScanReq->returnUniqueResults = 0;
- pScanReq->returnFreshResults = SIR_BG_SCAN_PURGE_RESUTLS|SIR_BG_SCAN_RETURN_FRESH_RESULTS;
+ /* Original code:
+ * pScanReq->returnFreshResults = SIR_BG_SCAN_PURGE_RESUTLS|SIR_BG_SCAN_RETURN_FRESH_RESULTS;
+ *
+ * Do not purge while starting a scan. Rome firmware sends results of
+ * roaming scan as normal entries. They land up in this scan cache.
+ * We should not lose those entries.
+ * This cached should be purged after filling in a query.
+ */
+ pScanReq->returnFreshResults = SIR_BG_SCAN_RETURN_FRESH_RESULTS;
pScanReq->channelList.numChannels = 1;
pScanReq->channelList.channelNumber[0] = 6;
pScanReq->uIEFieldLen = 0;
@@ -451,7 +459,7 @@ static char *sendSmeDisAssocReq(tpAniSirGlobal pMac, char *p,tANI_U32 arg1 ,tANI
pDisAssocReq->sessionId = 0;
- pDisAssocReq->transactionId = 0;
+ pDisAssocReq->transactionId = 0;
msg.type = eWNI_SME_DISASSOC_REQ;
msg.bodyptr = pDisAssocReq;
@@ -473,7 +481,7 @@ static char *sendSmeStartBssReq(tpAniSirGlobal pMac, char *p,tANI_U32 arg1)
tSirNwType nwType;
p += log_sprintf( pMac,p, "sendSmeStartBssReq: Preparing eWNI_SME_START_BSS_REQ message\n");
-
+
if(arg1 > 2)
{
p += log_sprintf( pMac,p,"Invalid Argument1 \n");
@@ -488,19 +496,19 @@ static char *sendSmeStartBssReq(tpAniSirGlobal pMac, char *p,tANI_U32 arg1)
pStartBssReq->messageType = eWNI_SME_START_BSS_REQ;
pStartBssReq->length = 29; // 0x1d
-
- if(arg1 == 0) //BTAMP STATION
+
+ if(arg1 == 0) //BTAMP STATION
{
pStartBssReq->bssType = eSIR_BTAMP_STA_MODE;
pStartBssReq->ssId.length = 5;
- palCopyMemory(pMac->hHdd, (void *) &pStartBssReq->ssId.ssId, (void *)"BTSTA", 5);
+ palCopyMemory(pMac->hHdd, (void *) &pStartBssReq->ssId.ssId, (void *)"BTSTA", 5);
}
- else if(arg1 == 1) //BTAMP AP
+ else if(arg1 == 1) //BTAMP AP
{
pStartBssReq->bssType = eSIR_BTAMP_AP_MODE;
pStartBssReq->ssId.length = 4;
- palCopyMemory(pMac->hHdd, (void *) &pStartBssReq->ssId.ssId, (void *)"BTAP", 4);
+ palCopyMemory(pMac->hHdd, (void *) &pStartBssReq->ssId.ssId, (void *)"BTAP", 4);
}
else //IBSS
{
@@ -528,7 +536,7 @@ static char *sendSmeStartBssReq(tpAniSirGlobal pMac, char *p,tANI_U32 arg1)
palCopyMemory( pMac->hHdd, pBuf, (tANI_U8 *)&nwType, sizeof(tSirNwType) );
pBuf += sizeof(tSirNwType);
- /* ---- To be filled by LIM later ----
+ /* ---- To be filled by LIM later ----
pStartBssReq->operationalRateSet
pStartBssReq->extendedRateSet
pStartBssReq->dot11mode
@@ -536,7 +544,7 @@ static char *sendSmeStartBssReq(tpAniSirGlobal pMac, char *p,tANI_U32 arg1)
pStartBssReq->selfMacAddr
pStartBssReq->beaconInterval
pStartBssReq->sessionId = 0;
- pStartBssReq->transactionId = 0;
+ pStartBssReq->transactionId = 0;
* ------------------------------------ */
msg.type = eWNI_SME_START_BSS_REQ;
@@ -573,11 +581,11 @@ static char *sendSmeStopBssReq(tpAniSirGlobal pMac, char *p, tANI_U32 sessionId)
pStopBssReq->messageType = eWNI_SME_STOP_BSS_REQ;
msgLen += sizeof(tANI_U32); // msgType + length
-
+
pStopBssReq->reasonCode = eSIR_SME_SUCCESS;
msgLen += sizeof(tSirResultCodes);
- palCopyMemory(pMac->hHdd, (void *) &pStopBssReq->bssId, (void *)psessionEntry->bssId, 6);
+ palCopyMemory(pMac->hHdd, (void *) &pStopBssReq->bssId, (void *)psessionEntry->bssId, 6);
msgLen += sizeof(tSirMacAddr);
pStopBssReq->sessionId = (tANI_U8)sessionId;
@@ -605,36 +613,36 @@ static char *sendSmeJoinReq(tpAniSirGlobal pMac, char *p)
tANI_U16 msgLen = 307;
tANI_U8 msgDump[307] = {
- 0x06, 0x12, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x01, 0x00,
- 0xDE, 0xAD, 0xBA, 0xEF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x64, 0x00, 0x21, 0x04, 0x02, 0x00, 0x00,
- 0x00, 0x01, 0x1E, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x18,
- 0x00, 0x00, 0x00, 0xA8, 0x85, 0x4F, 0x7A, 0x00, 0x06, 0x41,
- 0x6E, 0x69, 0x4E, 0x65, 0x74, 0x01, 0x04, 0x82, 0x84, 0x8B,
- 0x96, 0x03, 0x01, 0x06, 0x07, 0x06, 0x55, 0x53, 0x49, 0x01,
- 0x0E, 0x1E, 0x2A, 0x01, 0x00, 0x32, 0x08, 0x0C, 0x12, 0x18,
- 0x24, 0x30, 0x48, 0x60, 0x6C, 0x2D, 0x1A, 0xEE, 0x11, 0x03,
- 0xFF, 0xFF, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x3D, 0x16, 0x06, 0x07, 0x11, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xDD, 0x18, 0x00,
- 0x50, 0xF2, 0x02, 0x01, 0x01, 0x01, 0x00, 0x03, 0xA4, 0x00,
- 0x00, 0x27, 0xA4, 0x00, 0x00, 0x42, 0x43, 0x5E, 0x00, 0x62,
- 0x32, 0x2F, 0x00, 0xDD, 0x14, 0x00, 0x0A, 0xF5, 0x00, 0x03,
- 0x01, 0x03, 0x05, 0x0A, 0x02, 0x80, 0xC0, 0x12, 0x06, 0xFF,
- 0xFF, 0xFF, 0xFF, 0xB6, 0x0D, 0xDD, 0x6E, 0x00, 0x50, 0xF2,
- 0x04, 0x10, 0x4A, 0x00, 0x01, 0x10, 0x10, 0x44, 0x00, 0x01,
- 0x01, 0x10, 0x3B, 0x00, 0x01, 0x03, 0x10, 0x47, 0x00, 0x10,
- 0xDB, 0xC6, 0x77, 0x28, 0xB9, 0xF3, 0xD8, 0x58, 0x86, 0xFF,
- 0xFC, 0x6B, 0xB6, 0xB9, 0x27, 0x79, 0x10, 0x21, 0x00, 0x08,
- 0x51, 0x75, 0x61, 0x6C, 0x63, 0x6F, 0x6D, 0x6D, 0x10, 0x23,
+ 0x06, 0x12, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x01, 0x00,
+ 0xDE, 0xAD, 0xBA, 0xEF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x64, 0x00, 0x21, 0x04, 0x02, 0x00, 0x00,
+ 0x00, 0x01, 0x1E, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x18,
+ 0x00, 0x00, 0x00, 0xA8, 0x85, 0x4F, 0x7A, 0x00, 0x06, 0x41,
+ 0x6E, 0x69, 0x4E, 0x65, 0x74, 0x01, 0x04, 0x82, 0x84, 0x8B,
+ 0x96, 0x03, 0x01, 0x06, 0x07, 0x06, 0x55, 0x53, 0x49, 0x01,
+ 0x0E, 0x1E, 0x2A, 0x01, 0x00, 0x32, 0x08, 0x0C, 0x12, 0x18,
+ 0x24, 0x30, 0x48, 0x60, 0x6C, 0x2D, 0x1A, 0xEE, 0x11, 0x03,
+ 0xFF, 0xFF, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x3D, 0x16, 0x06, 0x07, 0x11, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xDD, 0x18, 0x00,
+ 0x50, 0xF2, 0x02, 0x01, 0x01, 0x01, 0x00, 0x03, 0xA4, 0x00,
+ 0x00, 0x27, 0xA4, 0x00, 0x00, 0x42, 0x43, 0x5E, 0x00, 0x62,
+ 0x32, 0x2F, 0x00, 0xDD, 0x14, 0x00, 0x0A, 0xF5, 0x00, 0x03,
+ 0x01, 0x03, 0x05, 0x0A, 0x02, 0x80, 0xC0, 0x12, 0x06, 0xFF,
+ 0xFF, 0xFF, 0xFF, 0xB6, 0x0D, 0xDD, 0x6E, 0x00, 0x50, 0xF2,
+ 0x04, 0x10, 0x4A, 0x00, 0x01, 0x10, 0x10, 0x44, 0x00, 0x01,
+ 0x01, 0x10, 0x3B, 0x00, 0x01, 0x03, 0x10, 0x47, 0x00, 0x10,
+ 0xDB, 0xC6, 0x77, 0x28, 0xB9, 0xF3, 0xD8, 0x58, 0x86, 0xFF,
+ 0xFC, 0x6B, 0xB6, 0xB9, 0x27, 0x79, 0x10, 0x21, 0x00, 0x08,
+ 0x51, 0x75, 0x61, 0x6C, 0x63, 0x6F, 0x6D, 0x6D, 0x10, 0x23,
0x00, 0x07, 0x57, 0x46, 0x52, 0x34, 0x30, 0x33, 0x31, 0x10,
- 0x24, 0x00, 0x06, 0x4D, 0x4E, 0x31, 0x32, 0x33, 0x34, 0x10,
- 0x42, 0x00, 0x06, 0x53, 0x4E, 0x31, 0x32, 0x33, 0x34, 0x10,
- 0x54, 0x00, 0x08, 0x00, 0x06, 0x00, 0x50, 0xF2, 0x04, 0x00,
- 0x01, 0x10, 0x11, 0x00, 0x06, 0x31, 0x31, 0x6E, 0x2D, 0x41,
+ 0x24, 0x00, 0x06, 0x4D, 0x4E, 0x31, 0x32, 0x33, 0x34, 0x10,
+ 0x42, 0x00, 0x06, 0x53, 0x4E, 0x31, 0x32, 0x33, 0x34, 0x10,
+ 0x54, 0x00, 0x08, 0x00, 0x06, 0x00, 0x50, 0xF2, 0x04, 0x00,
+ 0x01, 0x10, 0x11, 0x00, 0x06, 0x31, 0x31, 0x6E, 0x2D, 0x41,
0x50, 0x10, 0x08, 0x00, 0x02, 0x01, 0x8E
};
@@ -658,7 +666,7 @@ static char *sendSmeJoinReq(tpAniSirGlobal pMac, char *p)
static char *printSessionInfo(tpAniSirGlobal pMac, char *p)
{
- tpPESession psessionEntry = &pMac->lim.gpSession[0];
+ tpPESession psessionEntry = &pMac->lim.gpSession[0];
tANI_U8 i;
p += log_sprintf( pMac, p, "Dump PE Session \n");
@@ -667,16 +675,16 @@ static char *printSessionInfo(tpAniSirGlobal pMac, char *p)
{
if( pMac->lim.gpSession[i].valid )
{
- psessionEntry = &pMac->lim.gpSession[i];
+ psessionEntry = &pMac->lim.gpSession[i];
p += log_sprintf( pMac,p, "*****************************************\n");
- p += log_sprintf( pMac,p, " PE Session [%d] \n", i);
+ p += log_sprintf( pMac,p, " PE Session [%d] \n", i);
p += log_sprintf( pMac,p, "available: %d \n", psessionEntry->available);
- p += log_sprintf( pMac,p, "peSessionId: %d, smeSessionId: %d, transactionId: %d \n",
+ p += log_sprintf( pMac,p, "peSessionId: %d, smeSessionId: %d, transactionId: %d \n",
psessionEntry->peSessionId, psessionEntry->smeSessionId, psessionEntry->smeSessionId);
- p += log_sprintf( pMac,p, "bssId: %02X:%02X:%02X:%02X:%02X:%02X \n",
+ p += log_sprintf( pMac,p, "bssId: %02X:%02X:%02X:%02X:%02X:%02X \n",
psessionEntry->bssId[0], psessionEntry->bssId[1], psessionEntry->bssId[2],
psessionEntry->bssId[3], psessionEntry->bssId[4], psessionEntry->bssId[5]);
- p += log_sprintf( pMac,p, "selfMacAddr: %02X:%02X:%02X:%02X:%02X:%02X \n",
+ p += log_sprintf( pMac,p, "selfMacAddr: %02X:%02X:%02X:%02X:%02X:%02X \n",
psessionEntry->selfMacAddr[0], psessionEntry->selfMacAddr[1], psessionEntry->selfMacAddr[2],
psessionEntry->selfMacAddr[3], psessionEntry->selfMacAddr[4], psessionEntry->selfMacAddr[5]);
p += log_sprintf( pMac,p, "bssIdx: %d \n", psessionEntry->bssIdx);
@@ -698,7 +706,7 @@ static char *printSessionInfo(tpAniSirGlobal pMac, char *p)
p += log_sprintf( pMac,p, "limCurrentBssPropCap: %d \n", psessionEntry->limCurrentBssPropCap);
p += log_sprintf( pMac,p, "limSentCapsChangeNtf: %d \n", psessionEntry->limSentCapsChangeNtf);
p += log_sprintf( pMac,p, "LimAID: %d \n", psessionEntry->limAID);
- p += log_sprintf( pMac,p, "ReassocbssId: %02X:%02X:%02X:%02X:%02X:%02X \n",
+ p += log_sprintf( pMac,p, "ReassocbssId: %02X:%02X:%02X:%02X:%02X:%02X \n",
psessionEntry->limReAssocbssId[0], psessionEntry->limReAssocbssId[1], psessionEntry->limReAssocbssId[2],
psessionEntry->limReAssocbssId[3], psessionEntry->limReAssocbssId[4], psessionEntry->limReAssocbssId[5]);
p += log_sprintf( pMac,p, "limReassocChannelId: %d \n", psessionEntry->limReassocChannelId);
@@ -724,7 +732,7 @@ static char *
limDumpEdcaParams(tpAniSirGlobal pMac, char *p)
{
tANI_U8 i = 0;
- tpPESession psessionEntry = &pMac->lim.gpSession[0]; //TBD-RAJESH HOW TO GET sessionEntry?????
+ tpPESession psessionEntry = &pMac->lim.gpSession[0]; //TBD-RAJESH HOW TO GET sessionEntry?????
p += log_sprintf( pMac,p, "EDCA parameter set count = %d\n", psessionEntry->gLimEdcaParamSetCount);
p += log_sprintf( pMac,p, "Broadcast parameters\n");
p += log_sprintf( pMac,p, "AC\tACI\tACM\tAIFSN\tCWMax\tCWMin\tTxopLimit\t\n");
@@ -840,11 +848,11 @@ static char* limDumpDphTableSummary(tpAniSirGlobal pMac,char *p)
pMac->lim.gpSession[j].dph.dphHashTable.pDphNodeArray[i].staAddr[4],
pMac->lim.gpSession[j].dph.dphHashTable.pDphNodeArray[i].staAddr[5]);
}
- }
- }
+ }
+ }
}
return p;
-}
+}
// add the specified tspec to the tspec list
static char* limDumpTsecTable( tpAniSirGlobal pMac, char* p)
@@ -1100,7 +1108,7 @@ dump_lim_del_sta( tpAniSirGlobal pMac, tANI_U32 arg1, tANI_U32 arg2, tANI_U32 ar
p += log_sprintf( pMac,p, "Could not find station with assocId = %d\n", arg1);
return p;
}
-
+
if (pStaDs->mlmStaContext.mlmState != eLIM_MLM_LINK_ESTABLISHED_STATE)
{
p += log_sprintf( pMac,p, "received Disassoc frame from peer that is in state %X \n", pStaDs->mlmStaContext.mlmState);
@@ -1369,17 +1377,17 @@ dump_lim_AddBA_DeclineStat( tpAniSirGlobal pMac, tANI_U32 arg1, tANI_U32 arg2, t
if (arg1 > 1) {
log_sprintf( pMac,p, "%s:Invalid Value is entered for Enable/Disable \n", __func__ );
arg1 &= 1;
- }
-
+ }
+
val = pMac->lim.gAddBA_Declined;
-
+
if (arg2 > 7) {
log_sprintf( pMac,p, "%s:Invalid Value is entered for Tid \n", __func__ );
Tid = arg2 & 0x7;
} else
Tid = arg2;
-
-
+
+
if ( Enable)
val |= Enable << Tid;
else
@@ -1427,7 +1435,7 @@ static char* dump_lim_update_cb_Mode(tpAniSirGlobal pMac, tANI_U32 arg1, tANI_U3
psessionEntry->htRecommendedTxWidthSet = psessionEntry->htSupportedChannelWidthSet;
psessionEntry->htSecondaryChannelOffset = arg2;
- if(eSIR_SUCCESS != cfgSetInt(pMac, WNI_CFG_CHANNEL_BONDING_MODE,
+ if(eSIR_SUCCESS != cfgSetInt(pMac, WNI_CFG_CHANNEL_BONDING_MODE,
arg2 ? WNI_CFG_CHANNEL_BONDING_MODE_ENABLE : WNI_CFG_CHANNEL_BONDING_MODE_DISABLE))
p += log_sprintf(pMac,p, "cfgSetInt failed for WNI_CFG_CHANNEL_BONDING_MODE\n");
@@ -1447,7 +1455,7 @@ static char* dump_lim_abort_scan(tpAniSirGlobal pMac, tANI_U32 arg1, tANI_U32 ar
(void) arg1; (void) arg2; (void) arg3; (void) arg4;
//csrScanAbortMacScan(pMac);
return p;
-
+
}
static char* dump_lim_start_stop_bg_scan(tpAniSirGlobal pMac, tANI_U32 arg1, tANI_U32 arg2, tANI_U32 arg3, tANI_U32 arg4, char *p)
@@ -1481,10 +1489,10 @@ static char* dump_lim_start_stop_bg_scan(tpAniSirGlobal pMac, tANI_U32 arg1, tAN
pMac->lim.gLimForceBackgroundScanDisable = true;
}
return p;
-
+
}
-static char*
+static char*
dump_lim_get_pe_statistics(tpAniSirGlobal pMac, tANI_U32 arg1, tANI_U32 arg2, tANI_U32 arg3, tANI_U32 arg4, char *p)
{
eHalStatus status = eHAL_STATUS_SUCCESS;
@@ -1493,9 +1501,9 @@ dump_lim_get_pe_statistics(tpAniSirGlobal pMac, tANI_U32 arg1, tANI_U32 arg2, tA
(void) arg2; (void) arg3; (void) arg4;
-
+
switch(arg1)
- {
+ {
case 1:
statsMask = PE_SUMMARY_STATS_INFO;
break;
@@ -1514,7 +1522,7 @@ dump_lim_get_pe_statistics(tpAniSirGlobal pMac, tANI_U32 arg1, tANI_U32 arg2, tA
default:
return p;
}
-
+
if( eHAL_STATUS_SUCCESS != (status = palAllocateMemory (pMac->hHdd, (void**) &pReq, sizeof(tAniGetPEStatsReq))))
{
@@ -1523,16 +1531,16 @@ dump_lim_get_pe_statistics(tpAniSirGlobal pMac, tANI_U32 arg1, tANI_U32 arg2, tA
}
palZeroMemory( pMac, pReq, sizeof(*pReq));
-
+
pReq->msgType = eWNI_SME_GET_STATISTICS_REQ;
pReq->statsMask = statsMask;
pReq->staId = (tANI_U16)arg2;
pMac->lim.gLimRspReqd = eANI_BOOLEAN_TRUE;
limPostSmeMessage(pMac, eWNI_SME_GET_STATISTICS_REQ, (tANI_U32 *) pReq);
-
+
return p;
-
+
}
extern char* setLOGLevel( tpAniSirGlobal pMac, char *p, tANI_U32 module, tANI_U32 level );
@@ -1570,7 +1578,7 @@ static char *
dump_lim_send_join_req( tpAniSirGlobal pMac, tANI_U32 arg1, tANI_U32 arg2, tANI_U32 arg3, tANI_U32 arg4, char *p)
{
(void) arg1; (void) arg2; (void) arg3; (void) arg4;
- p = sendSmeJoinReq(pMac, p);
+ p = sendSmeJoinReq(pMac, p);
return p;
}
@@ -1699,7 +1707,7 @@ static char *finishScan(tpAniSirGlobal pMac, char *p)
msg.type = SIR_LIM_MIN_CHANNEL_TIMEOUT;
msg.bodyval = 0;
msg.bodyptr = NULL;
-
+
limPostMsgApi(pMac, &msg);
return p;
}
@@ -1785,10 +1793,10 @@ dump_lim_send_rrm_action( tpAniSirGlobal pMac, tANI_U32 arg1, tANI_U32 arg2, tAN
/* send two reports with incapable bit set */
pRRMReport[0].type = 6;
pRRMReport[1].type = 7;
- limSendRadioMeasureReportActionFrame( pMac, 1, 2, &pRRMReport[0], psessionEntry->bssId, psessionEntry );
- break;
+ limSendRadioMeasureReportActionFrame( pMac, 1, 2, &pRRMReport[0], psessionEntry->bssId, psessionEntry );
+ break;
case 1:
- for ( i = 0 ; i < num ; i++ )
+ for ( i = 0 ; i < num ; i++ )
{
pRRMReport[i].type = 5;
if ( i == 3 )
@@ -1805,7 +1813,7 @@ dump_lim_send_rrm_action( tpAniSirGlobal pMac, tANI_U32 arg1, tANI_U32 arg2, tAN
pRRMReport[i].report.beaconReport.rcpi = 40;
pRRMReport[i].report.beaconReport.bssid[0] = 0x00;
- pRRMReport[i].report.beaconReport.bssid[1] = 0xAA;
+ pRRMReport[i].report.beaconReport.bssid[1] = 0xAA;
pRRMReport[i].report.beaconReport.bssid[2] = 0xBB;
pRRMReport[i].report.beaconReport.bssid[3] = 0xCC;
pRRMReport[i].report.beaconReport.bssid[4] = 0x00;
@@ -1825,7 +1833,7 @@ dump_lim_send_rrm_action( tpAniSirGlobal pMac, tANI_U32 arg1, tANI_U32 arg2, tAN
}
}
- limSendRadioMeasureReportActionFrame( pMac, 1, num, &pRRMReport[0], psessionEntry->bssId, psessionEntry );
+ limSendRadioMeasureReportActionFrame( pMac, 1, num, &pRRMReport[0], psessionEntry->bssId, psessionEntry );
break;
case 2:
//send Neighbor request.
@@ -1851,7 +1859,7 @@ dump_lim_send_rrm_action( tpAniSirGlobal pMac, tANI_U32 arg1, tANI_U32 arg2, tAN
link.txAntenna = 1;
link.rcpi = 9;
link.rsni = 3;
- limSendLinkReportActionFrame( pMac, &link, psessionEntry->bssId, psessionEntry );
+ limSendLinkReportActionFrame( pMac, &link, psessionEntry->bssId, psessionEntry );
}
break;
default:
@@ -1860,7 +1868,7 @@ dump_lim_send_rrm_action( tpAniSirGlobal pMac, tANI_U32 arg1, tANI_U32 arg2, tAN
done:
vos_mem_free(pRRMReport);
- return p;
+ return p;
}
static char *
@@ -1881,17 +1889,17 @@ dump_lim_unpack_rrm_action( tpAniSirGlobal pMac, tANI_U32 arg1, tANI_U32 arg2, t
tANI_U8 pBody[][100] = {
{
/*Beacon Request 0*/
- 0x05, 0x00, 0x01, 0x00, 0x00,
+ 0x05, 0x00, 0x01, 0x00, 0x00,
//Measurement request IE
- 0x26, 0x25, 0x01, 0x00,
+ 0x26, 0x25, 0x01, 0x00,
//Beacon request type
0x05,
//Beacon request starts here
0x0C, 0x01, 0x30, 0x00, 0x14, 0x00, 0x01,
//BSSID
- 0xFF, 0xFF, 0xFF, 0xFF, 0xff, 0xFF,
+ 0xFF, 0xFF, 0xFF, 0xFF, 0xff, 0xFF,
//SSID
- 0x00, 0x05, 0x57, 0x69, 0x46, 0x69, 0x31,
+ 0x00, 0x05, 0x57, 0x69, 0x46, 0x69, 0x31,
//Reporting Condition
0x01, 0x02, 0x00, 0x00,
//Reporting Detail
@@ -1901,15 +1909,15 @@ dump_lim_unpack_rrm_action( tpAniSirGlobal pMac, tANI_U32 arg1, tANI_U32 arg2, t
},
{
/*Beacon Request 1*/
- 0x05, 0x00, 0x01, 0x00, 0x00,
+ 0x05, 0x00, 0x01, 0x00, 0x00,
//Measurement request IE
- 0x26, 0x28, 0x01, 0x00,
+ 0x26, 0x28, 0x01, 0x00,
//Beacon request type
0x05,
//Beacon request starts here
0x0C, 0xFF, 0x30, 0x00, 0x14, 0x00, 0x01,
//BSSID
- 0xFF, 0xFF, 0xFF, 0xFF, 0xff, 0xFF,
+ 0xFF, 0xFF, 0xFF, 0xFF, 0xff, 0xFF,
//SSID
/* 0x00, 0x08, 0x35, 0x36, 0x37, 0x38, 0x39, 0x40, 0x41, 0x42, */
//Reporting Condition
@@ -1919,23 +1927,23 @@ dump_lim_unpack_rrm_action( tpAniSirGlobal pMac, tANI_U32 arg1, tANI_U32 arg2, t
//Request IE
0x0A, 0x05, 0x00, 0x30, 0x46, 0x36, 0xDD,
//AP channel report
- 0x33, 0x03, 0x0C, 0x01, 0x06,
- 0x33, 0x03, 0x0C, 0x24, 0x30,
+ 0x33, 0x03, 0x0C, 0x01, 0x06,
+ 0x33, 0x03, 0x0C, 0x24, 0x30,
},
{
/*Beacon Request 2*/
- 0x05, 0x00, 0x01, 0x00, 0x00,
+ 0x05, 0x00, 0x01, 0x00, 0x00,
//Measurement request IE
- 0x26, 0x1E, 0x01, 0x00,
+ 0x26, 0x1E, 0x01, 0x00,
//Beacon request type
0x05,
//Beacon request starts here
0x0C, 0x00, 0x30, 0x00, 0x14, 0x00, 0x02,
//BSSID
- 0xFF, 0xFF, 0xFF, 0xFF, 0xff, 0xFF,
+ 0xFF, 0xFF, 0xFF, 0xFF, 0xff, 0xFF,
//SSID
- 0x00, 0x05, 0x57, 0x69, 0x46, 0x69, 0x31,
- //0x00, 0x08, 0x41, 0x53, 0x54, 0x2D, 0x57, 0x41, 0x50, 0x49,
+ 0x00, 0x05, 0x57, 0x69, 0x46, 0x69, 0x31,
+ //0x00, 0x08, 0x41, 0x53, 0x54, 0x2D, 0x57, 0x41, 0x50, 0x49,
//Reporting Condition
0x01, 0x02, 0x00, 0x00,
//Reporting Detail
@@ -1944,17 +1952,17 @@ dump_lim_unpack_rrm_action( tpAniSirGlobal pMac, tANI_U32 arg1, tANI_U32 arg2, t
},
{
/*Beacon Request 3*/
- 0x05, 0x00, 0x01, 0x00, 0x00,
+ 0x05, 0x00, 0x01, 0x00, 0x00,
//Measurement request IE
- 0x26, 0x25, 0x01, 0x00,
+ 0x26, 0x25, 0x01, 0x00,
//Beacon request type
0x05,
//Beacon request starts here
0x0C, 0x01, 0x30, 0x00, 0x69, 0x00, 0x00,
//BSSID
- 0xFF, 0xFF, 0xFF, 0xFF, 0xff, 0xFF,
+ 0xFF, 0xFF, 0xFF, 0xFF, 0xff, 0xFF,
//SSID
- 0x00, 0x05, 0x57, 0x69, 0x46, 0x69, 0x31,
+ 0x00, 0x05, 0x57, 0x69, 0x46, 0x69, 0x31,
//Reporting Condition
0x01, 0x02, 0x00, 0x00,
//Reporting Detail
@@ -1964,15 +1972,15 @@ dump_lim_unpack_rrm_action( tpAniSirGlobal pMac, tANI_U32 arg1, tANI_U32 arg2, t
},
{
/*Neighbor report*/
- 0x05, 0x05, 0x01,
+ 0x05, 0x05, 0x01,
//Measurement request IE
- 0x34, 0x17,
+ 0x34, 0x17,
//BSSID
- 0xFF, 0xFF, 0xFF, 0xFF, 0xff, 0xFF,
+ 0xFF, 0xFF, 0xFF, 0xFF, 0xff, 0xFF,
//BSSID INFOo
0xED, 0x01, 0x00, 0x00,
//Reg class, channel, Phy type
- 0x20, 0x01, 0x02,
+ 0x20, 0x01, 0x02,
//TSF Info
0x01, 0x04, 0x02, 0x00, 0x60, 0x00,
//Condensed country
@@ -1984,7 +1992,7 @@ dump_lim_unpack_rrm_action( tpAniSirGlobal pMac, tANI_U32 arg1, tANI_U32 arg2, t
//Txpower used
0x00,
//Max Tx Power
- 0x00
+ 0x00
}
};
@@ -2041,7 +2049,7 @@ dump_lim_unpack_rrm_action( tpAniSirGlobal pMac, tANI_U32 arg1, tANI_U32 arg2, t
case 6:
{
tPowerdBm localConstraint = (tPowerdBm) arg3;
- tPowerdBm maxTxPower = cfgGetRegulatoryMaxTransmitPower( pMac, psessionEntry->currentOperChannel );
+ tPowerdBm maxTxPower = cfgGetRegulatoryMaxTransmitPower( pMac, psessionEntry->currentOperChannel );
maxTxPower = VOS_MIN( maxTxPower, maxTxPower-localConstraint );
if( maxTxPower != psessionEntry->maxTxPower )
{
@@ -2054,14 +2062,14 @@ dump_lim_unpack_rrm_action( tpAniSirGlobal pMac, tANI_U32 arg1, tANI_U32 arg2, t
p += log_sprintf( pMac, p, "Invalid option" );
break;
}
- return p;
+ return p;
}
#endif
#ifdef WLAN_FEATURE_NEIGHBOR_ROAMING
#ifdef RSSI_HACK
-/* This dump command is needed to set the RSSI values in TL while testing handoff. Handoff code was tested
- * using this dump command. Whatever the value gives as the first parameter will be considered as the average
+/* This dump command is needed to set the RSSI values in TL while testing handoff. Handoff code was tested
+ * using this dump command. Whatever the value gives as the first parameter will be considered as the average
* RSSI by TL and invokes corresponding callback registered by the clients */
extern int dumpCmdRSSI;
static char *
@@ -2116,42 +2124,42 @@ dump_lim_ft_event( tpAniSirGlobal pMac, tANI_U32 arg1, tANI_U32 arg2, tANI_U32 a
pftPreAuthReq->messageType = eWNI_SME_FT_PRE_AUTH_REQ;
pftPreAuthReq->length = auth_req_len + sizeof(Profile.pBssDesc->length) +
Profile.pBssDesc->length;
- pftPreAuthReq->preAuthchannelNum = 6;
+ pftPreAuthReq->preAuthchannelNum = 6;
- palCopyMemory(pMac->hHdd, (void *) &pftPreAuthReq->currbssId,
- (void *)psessionEntry->bssId, 6);
- palCopyMemory(pMac->hHdd, (void *) &pftPreAuthReq->preAuthbssId,
- (void *)macAddr, 6);
+ palCopyMemory(pMac->hHdd, (void *) &pftPreAuthReq->currbssId,
+ (void *)psessionEntry->bssId, 6);
+ palCopyMemory(pMac->hHdd, (void *) &pftPreAuthReq->preAuthbssId,
+ (void *)macAddr, 6);
pftPreAuthReq->ft_ies_length = (tANI_U16)pMac->ft.ftSmeContext.auth_ft_ies_length;
// Also setup the mac address in sme context.
palCopyMemory(pMac->hHdd, pMac->ft.ftSmeContext.preAuthbssId, macAddr, 6);
- vos_mem_copy(pftPreAuthReq->ft_ies, pMac->ft.ftSmeContext.auth_ft_ies,
+ vos_mem_copy(pftPreAuthReq->ft_ies, pMac->ft.ftSmeContext.auth_ft_ies,
pMac->ft.ftSmeContext.auth_ft_ies_length);
vos_mem_copy(Profile.pBssDesc->bssId, macAddr, 6);
p += log_sprintf( pMac,p, "\n ----- LIM Debug Information ----- \n");
- p += log_sprintf( pMac, p, "%s: length = %d\n", __func__,
+ p += log_sprintf( pMac, p, "%s: length = %d\n", __func__,
(int)pMac->ft.ftSmeContext.auth_ft_ies_length);
- p += log_sprintf( pMac, p, "%s: length = %02x\n", __func__,
+ p += log_sprintf( pMac, p, "%s: length = %02x\n", __func__,
(int)pMac->ft.ftSmeContext.auth_ft_ies[0]);
- p += log_sprintf( pMac, p, "%s: Auth Req %02x %02x %02x\n",
+ p += log_sprintf( pMac, p, "%s: Auth Req %02x %02x %02x\n",
__func__, pftPreAuthReq->ft_ies[0],
pftPreAuthReq->ft_ies[1], pftPreAuthReq->ft_ies[2]);
- p += log_sprintf( pMac, p, "%s: Session %02x %02x %02x\n", __func__,
+ p += log_sprintf( pMac, p, "%s: Session %02x %02x %02x\n", __func__,
psessionEntry->bssId[0],
psessionEntry->bssId[1], psessionEntry->bssId[2]);
- p += log_sprintf( pMac, p, "%s: Session %02x %02x %02x %p\n", __func__,
+ p += log_sprintf( pMac, p, "%s: Session %02x %02x %02x %p\n", __func__,
pftPreAuthReq->currbssId[0],
- pftPreAuthReq->currbssId[1],
+ pftPreAuthReq->currbssId[1],
pftPreAuthReq->currbssId[2], pftPreAuthReq);
Profile.pBssDesc->channelId = (tANI_U8)arg3;
- vos_mem_copy((void *)pftPreAuthReq->pbssDescription, (void *)Profile.pBssDesc,
- Profile.pBssDesc->length);
+ vos_mem_copy((void *)pftPreAuthReq->pbssDescription, (void *)Profile.pBssDesc,
+ Profile.pBssDesc->length);
msg.type = eWNI_SME_FT_PRE_AUTH_REQ;
msg.bodyptr = pftPreAuthReq;
@@ -2165,7 +2173,7 @@ dump_lim_ft_event( tpAniSirGlobal pMac, tANI_U32 arg1, tANI_U32 arg2, tANI_U32 a
default:
break;
}
- return p;
+ return p;
}
#endif
static char *
@@ -2193,7 +2201,7 @@ dump_lim_channel_switch_announcement( tpAniSirGlobal pMac, tANI_U32 arg1, tANI_U
psessionEntry->gLimChannelSwitch.primaryChannel = nNewChannel;
schSetFixedBeaconFields(pMac, psessionEntry);
- limSendBeaconInd(pMac, psessionEntry);
+ limSendBeaconInd(pMac, psessionEntry);
return p;
}
@@ -2212,16 +2220,16 @@ dump_lim_vht_opmode_notification(tpAniSirGlobal pMac, tANI_U32 arg1,tANI_U32 arg
p,"Session does not exist usage: 366 <0> sessionid channel \n");
return p;
}
-
+
limSendVHTOpmodeNotificationFrame(pMac, peer, nMode,psessionEntry);
-
+
psessionEntry->gLimOperatingMode.present = 1;
psessionEntry->gLimOperatingMode.chanWidth = nMode;
psessionEntry->gLimOperatingMode.rxNSS = 0;
psessionEntry->gLimOperatingMode.rxNSSType = 0;
schSetFixedBeaconFields(pMac, psessionEntry);
- limSendBeaconInd(pMac, psessionEntry);
+ limSendBeaconInd(pMac, psessionEntry);
return p;
}
@@ -2252,9 +2260,9 @@ dump_lim_vht_channel_switch_notification(tpAniSirGlobal pMac, tANI_U32 arg1,tANI
psessionEntry->gLimWiderBWChannelSwitch.newChanWidth = nChanWidth;
psessionEntry->gLimWiderBWChannelSwitch.newCenterChanFreq0 = limGetCenterChannel(pMac,nNewChannel,(ncbMode+1),nChanWidth);
psessionEntry->gLimWiderBWChannelSwitch.newCenterChanFreq1 = 0;
-
+
schSetFixedBeaconFields(pMac, psessionEntry);
- limSendBeaconInd(pMac, psessionEntry);
+ limSendBeaconInd(pMac, psessionEntry);
return p;
}
@@ -2278,7 +2286,7 @@ dump_lim_cancel_channel_switch_announcement( tpAniSirGlobal pMac, tANI_U32 arg1,
psessionEntry->gLimChannelSwitch.primaryChannel = 0;
schSetFixedBeaconFields(pMac, psessionEntry);
- limSendBeaconInd(pMac, psessionEntry);
+ limSendBeaconInd(pMac, psessionEntry);
return p;
}
@@ -2288,9 +2296,9 @@ static char *
dump_lim_mcc_policy_maker(tpAniSirGlobal pMac, tANI_U32 arg1,tANI_U32 arg2,tANI_U32 arg3, tANI_U32 arg4, char *p)
{
VOS_TRACE(VOS_MODULE_ID_PE, VOS_TRACE_LEVEL_FATAL, "dump_lim_mcc_policy_maker arg = %d",arg1);
-
+
if(arg1 == 0) //Disable feature completely
- {
+ {
WDA_TrafficStatsTimerActivate(FALSE);
if (ccmCfgSetInt(pMac, WNI_CFG_ENABLE_MCC_ADAPTIVE_SCHED, FALSE,
NULL, eANI_BOOLEAN_FALSE)==eHAL_STATUS_FAILURE)
@@ -2299,15 +2307,15 @@ dump_lim_mcc_policy_maker(tpAniSirGlobal pMac, tANI_U32 arg1,tANI_U32 arg2,tANI_
}
}
else if(arg1 == 1) //Enable feature
- {
+ {
if (ccmCfgSetInt(pMac, WNI_CFG_ENABLE_MCC_ADAPTIVE_SCHED, TRUE,
NULL, eANI_BOOLEAN_FALSE)==eHAL_STATUS_FAILURE)
{
limLog( pMac, LOGE, FL("Could not set WNI_CFG_ENABLE_MCC_ADAPTIVE_SCHED"));
- }
+ }
}
else if(arg1 == 2) //Enable feature and activate periodic timer
- {
+ {
if (ccmCfgSetInt(pMac, WNI_CFG_ENABLE_MCC_ADAPTIVE_SCHED, TRUE,
NULL, eANI_BOOLEAN_FALSE)==eHAL_STATUS_FAILURE)
{
@@ -2387,12 +2395,12 @@ static tDumpFuncEntry limMenuDumpTable[] = {
{308, "PE:LIM: dump all 11H related data", dump_lim_dot11h_stats},
{309, "PE:LIM: dump to enable Measurement on AP", dump_lim_enable_measurement},
{310, "PE:LIM: dump to enable QuietIE on AP", dump_lim_enable_quietIE},
- {311, "PE:LIM: disable/enable scan 1(disable)", dump_lim_disable_enable_scan},
+ {311, "PE:LIM: disable/enable scan 1(disable)", dump_lim_disable_enable_scan},
{320, "PE.LIM: send sme scan request", dump_lim_scan_req_send},
/*FIXME_GEN6*/
- /* This dump command is more of generic dump cmd and hence it should
+ /* This dump command is more of generic dump cmd and hence it should
* be moved to logDump.c
*/
{321, "PE:LIM: Set Log Level <VOS Module> <VOS Log Level>", dump_lim_update_log_level},
@@ -2424,7 +2432,7 @@ static tDumpFuncEntry limMenuDumpTable[] = {
{355, "PE.LIM: send sme start BSS request", dump_lim_send_start_bss_req},
{356, "PE.LIM: dump pesession info ", dump_lim_session_print},
{357, "PE.LIM: send DisAssocRequest", dump_lim_send_disassoc_req},
- {358, "PE.LIM: send sme stop bss request <session ID>", dump_lim_stop_bss_req},
+ {358, "PE.LIM: send sme stop bss request <session ID>", dump_lim_stop_bss_req},
{359, "PE.LIM: send sme join request", dump_lim_send_join_req},
#if defined WLAN_FEATURE_VOWIFI
{360, "PE.LIM: send an RRM action frame", dump_lim_send_rrm_action},
@@ -2455,7 +2463,7 @@ static tDumpFuncEntry limMenuDumpTable[] = {
void limDumpInit(tpAniSirGlobal pMac)
{
- logDumpRegisterTable( pMac, &limMenuDumpTable[0],
+ logDumpRegisterTable( pMac, &limMenuDumpTable[0],
sizeof(limMenuDumpTable)/sizeof(limMenuDumpTable[0]) );
}
diff --git a/CORE/MAC/src/pe/lim/limProcessActionFrame.c b/CORE/MAC/src/pe/lim/limProcessActionFrame.c
index 545bc3076398..17270d2fc161 100644
--- a/CORE/MAC/src/pe/lim/limProcessActionFrame.c
+++ b/CORE/MAC/src/pe/lim/limProcessActionFrame.c
@@ -58,7 +58,7 @@
#endif
#include "limSessionUtils.h"
-#if defined FEATURE_WLAN_CCX
+#ifdef FEATURE_WLAN_CCX
#include "ccxApi.h"
#endif
#include "wlan_qct_wda.h"
@@ -593,8 +593,7 @@ __limProcessAddTsRsp(tpAniSirGlobal pMac, tANI_U8 *pRxPacketInfo,tpPESession pse
return;
}
#ifdef FEATURE_WLAN_CCX
- if (addts.tsmPresent)
- {
+ if (addts.tsmPresent) {
limLog(pMac, LOGW, "TSM IE Present");
psessionEntry->ccxContext.tsm.tid = addts.tspec.tsinfo.traffic.userPrio;
vos_mem_copy(&psessionEntry->ccxContext.tsm.tsmInfo,
@@ -700,7 +699,11 @@ __limProcessAddTsRsp(tpAniSirGlobal pMac, tANI_U8 *pRxPacketInfo,tpPESession pse
((upToAc(addts.tspec.tsinfo.traffic.userPrio) < MAX_NUM_AC) &&
(psessionEntry->gLimEdcaParams[upToAc(addts.tspec.tsinfo.traffic.userPrio)].aci.acm)))
{
+#ifdef FEATURE_WLAN_CCX
+ retval = limSendHalMsgAddTs(pMac, pSta->staIndex, tspecInfo->idx, addts.tspec, psessionEntry->peSessionId, addts.tsmIE.msmt_interval);
+#else
retval = limSendHalMsgAddTs(pMac, pSta->staIndex, tspecInfo->idx, addts.tspec, psessionEntry->peSessionId);
+#endif
if(eSIR_SUCCESS != retval)
{
limAdmitControlDeleteTS(pMac, pSta->assocId, &addts.tspec.tsinfo, NULL, &tspecInfo->idx);
@@ -1297,6 +1300,8 @@ __limProcessAddBAReq( tpAniSirGlobal pMac, tANI_U8 *pRxPacketInfo,tpPESession ps
PELOG2(sirDumpBuf( pMac, SIR_DBG_MODULE_ID, LOG2, pBody, frameLen );)
}
+ psessionEntry->amsduSupportedInBA = frmAddBAReq.AddBAParameterSet.amsduSupported;
+
pSta = dphLookupHashEntry( pMac, pHdr->sa, &aid, &psessionEntry->dph.dphHashTable );
if( pSta == NULL )
{
diff --git a/CORE/MAC/src/pe/lim/limProcessAssocRspFrame.c b/CORE/MAC/src/pe/lim/limProcessAssocRspFrame.c
index cf01c6e4fb25..5197df933cbc 100644
--- a/CORE/MAC/src/pe/lim/limProcessAssocRspFrame.c
+++ b/CORE/MAC/src/pe/lim/limProcessAssocRspFrame.c
@@ -145,6 +145,14 @@ void limUpdateAssocStaDatas(tpAniSirGlobal pMac, tpDphHashNode pStaDs, tpSirAsso
{
pStaDs->mlmStaContext.vhtCapability = pAssocRsp->VHTCaps.present;
}
+
+ // If 11ac is supported and if the peer is sending VHT capabilities,
+ // then htMaxRxAMpduFactor should be overloaded with VHT maxAMPDULenExp
+ if (pAssocRsp->VHTCaps.present)
+ {
+ pStaDs->htMaxRxAMpduFactor = pAssocRsp->VHTCaps.maxAMPDULenExp;
+ }
+
if (limPopulateOwnRateSet(pMac, &pStaDs->supportedRates,
pAssocRsp->HTCaps.supportedMCSSet,
false,psessionEntry , &pAssocRsp->VHTCaps) != eSIR_SUCCESS)
diff --git a/CORE/MAC/src/pe/lim/limProcessMessageQueue.c b/CORE/MAC/src/pe/lim/limProcessMessageQueue.c
index 8c0374b294d4..0a45557ef58f 100644
--- a/CORE/MAC/src/pe/lim/limProcessMessageQueue.c
+++ b/CORE/MAC/src/pe/lim/limProcessMessageQueue.c
@@ -1002,13 +1002,16 @@ void limOemDataRspHandleResumeLinkRsp(tpAniSirGlobal pMac, eHalStatus status, tA
void limProcessOemDataRsp(tpAniSirGlobal pMac, tANI_U32* body)
{
- eHalStatus status = eHAL_STATUS_SUCCESS;
tpLimMlmOemDataRsp mlmOemDataRsp = NULL;
+#ifndef QCA_WIFI_2_0
+ eHalStatus status = eHAL_STATUS_SUCCESS;
tpStartOemDataRsp oemDataRsp = NULL;
+#endif
//Process all the messages for the lim queue
SET_LIM_PROCESS_DEFD_MESGS(pMac, true);
+#ifndef QCA_WIFI_2_0
oemDataRsp = (tpStartOemDataRsp)(body);
status = palAllocateMemory(pMac->hHdd, (void**)(&mlmOemDataRsp), sizeof(tLimMlmOemDataRsp));
@@ -1026,6 +1029,13 @@ void limProcessOemDataRsp(tpAniSirGlobal pMac, tANI_U32* body)
palFreeMemory(pMac->hHdd, (void*)(oemDataRsp));
limResumeLink(pMac, limOemDataRspHandleResumeLinkRsp, (tANI_U32*)mlmOemDataRsp);
+#else
+ mlmOemDataRsp = (tpLimMlmOemDataRsp) body;
+
+ PELOG1(limLog(pMac, LOG1, FL("%s: sending oem data response msg to sme"),
+ __func__);)
+ limPostSmeMessage(pMac, LIM_MLM_OEM_DATA_CNF, (tANI_U32*)(mlmOemDataRsp));
+#endif
return;
}
diff --git a/CORE/MAC/src/pe/lim/limProcessMlmReqMessages.c b/CORE/MAC/src/pe/lim/limProcessMlmReqMessages.c
index 2ce6ae59bde3..357a94b17714 100644
--- a/CORE/MAC/src/pe/lim/limProcessMlmReqMessages.c
+++ b/CORE/MAC/src/pe/lim/limProcessMlmReqMessages.c
@@ -1384,8 +1384,9 @@ mlm_add_sta(
{
tANI_U32 val;
int i;
-
+ tANI_U32 selfStaDot11Mode = 0;
+ wlan_cfgGetInt(pMac, WNI_CFG_DOT11_MODE, &selfStaDot11Mode);
pSta->staType = STA_ENTRY_SELF; // Identifying self
palCopyMemory( pMac->hHdd, pSta->bssId, pBssid, sizeof( tSirMacAddr ));
@@ -1407,7 +1408,7 @@ mlm_add_sta(
pSta->uAPSD = 0;
pSta->maxSPLen = 0;
pSta->us32MaxAmpduDuration = 0;
- pSta->maxAmpduSize = 0; // 0: 8k, 1: 16k,2: 32k,3: 64k
+ pSta->maxAmpduSize = 0; // 0: 8k, 1: 16k,2: 32k,3: 64k, 4:128k
/* For Self STA get the LDPC capability from config.ini*/
@@ -1436,6 +1437,16 @@ mlm_add_sta(
{
pSta->vhtCapable = VOS_TRUE;
pSta->vhtTxBFCapable = psessionEntry->txBFIniFeatureEnabled;
+ pSta->vhtTxMUBformeeCapable = psessionEntry->txMuBformee;
+ }
+
+ // Since this is Self-STA, need to populate Self MAX_AMPDU_SIZE capabilities
+ if( IS_DOT11_MODE_VHT(selfStaDot11Mode) )
+ {
+ val = 0; // Default 8K AMPDU size
+ if( eSIR_SUCCESS != wlan_cfgGetInt( pMac, WNI_CFG_VHT_AMPDU_LEN_EXPONENT, &val ))
+ limLog(pMac, LOGE, FL("Couldn't get WNI_CFG_VHT_AMPDU_LEN_EXPONENT"));
+ pSta->maxAmpduSize = (tANI_U8) val;
}
#endif
#ifdef WLAN_FEATURE_11AC
@@ -1920,10 +1931,16 @@ static void limProcessMlmOemDataReq(tpAniSirGlobal pMac, tANI_U32 *pMsgBuf)
pMac->lim.gLimPrevMlmState = pMac->lim.gLimMlmState;
+#ifdef QCA_WIFI_2_0
+ PELOG2(limLog(pMac, LOG2,
+ FL("%s: Calling limSendHalOemDataReq"), __func__);)
+ limSendHalOemDataReq(pMac);
+#else
MTRACE(macTrace(pMac, TRACE_CODE_MLM_STATE, NO_SESSION, pMac->lim.gLimMlmState));
//Now request for link suspension
limSuspendLink(pMac, eSIR_CHECK_LINK_TRAFFIC_BEFORE_SCAN, limSetOemDataReqMode, NULL);
+#endif
}
else
{
diff --git a/CORE/MAC/src/pe/lim/limProcessMlmRspMessages.c b/CORE/MAC/src/pe/lim/limProcessMlmRspMessages.c
index 9231fa161741..95fa6b395637 100644
--- a/CORE/MAC/src/pe/lim/limProcessMlmRspMessages.c
+++ b/CORE/MAC/src/pe/lim/limProcessMlmRspMessages.c
@@ -60,6 +60,7 @@
#include <limFT.h>
#endif
#include "wlan_qct_wda.h"
+#include "vos_utils.h"
static void limHandleSmeJoinResult(tpAniSirGlobal, tSirResultCodes, tANI_U16,tpPESession);
static void limHandleSmeReaasocResult(tpAniSirGlobal, tSirResultCodes, tANI_U16, tpPESession);
@@ -4912,6 +4913,10 @@ void limProcessRxScanEvent(tpAniSirGlobal pMac, void *buf)
FL(" NULL pointer of gpLimRemainOnChanReq"));
}
}
+ else
+ {
+ limAddScanChannelInfo(pMac, vos_freq_to_chan(pScanEvent->chanFreq));
+ }
break;
case SCAN_EVENT_BSS_CHANNEL:
case SCAN_EVENT_DEQUEUED:
diff --git a/CORE/MAC/src/pe/lim/limProcessSmeReqMessages.c b/CORE/MAC/src/pe/lim/limProcessSmeReqMessages.c
index ce724fc27f0b..80e8a0280714 100644
--- a/CORE/MAC/src/pe/lim/limProcessSmeReqMessages.c
+++ b/CORE/MAC/src/pe/lim/limProcessSmeReqMessages.c
@@ -1699,6 +1699,7 @@ __limProcessSmeJoinReq(tpAniSirGlobal pMac, tANI_U32 *pMsgBuf)
if (psessionEntry->vhtCapability )
{
psessionEntry->txBFIniFeatureEnabled = pSmeJoinReq->txBFIniFeatureEnabled;
+ psessionEntry->txMuBformee = pSmeJoinReq->txMuBformee;
VOS_TRACE(VOS_MODULE_ID_PE, VOS_TRACE_LEVEL_INFO_MED,
"***__limProcessSmeJoinReq: txBFIniFeatureEnabled=%d****",
diff --git a/CORE/MAC/src/pe/lim/limRoamingAlgo.c b/CORE/MAC/src/pe/lim/limRoamingAlgo.c
index e3e34a481abc..f91abf33b720 100644
--- a/CORE/MAC/src/pe/lim/limRoamingAlgo.c
+++ b/CORE/MAC/src/pe/lim/limRoamingAlgo.c
@@ -47,15 +47,15 @@
/** ----------------------------------------------------------------------
-\fn limSelectsBackgroundScanMode()
-\brief This function is called by limIsBackgroundScanAllowed().
-\ Here LIM decides whether we shall enforce this background
-\ scan or let HAL decide whether to proceed with the background
+\fn limSelectsBackgroundScanMode()
+\brief This function is called by limIsBackgroundScanAllowed().
+\ Here LIM decides whether we shall enforce this background
+\ scan or let HAL decide whether to proceed with the background
\ scan as HAL sees fits. LIM shall enforce background scan if:
\ 1) station is not in link established state
\ 2) station is in link established state, but there has been
\ max number of consecutive background scan failure.
-\
+\
\param tpAniSirGlobal pMac
\return none
\ ------------------------------------------------------------------------- */
@@ -68,7 +68,7 @@ tSirBackgroundScanMode limSelectsBackgroundScanMode(tpAniSirGlobal pMac)
limLog(pMac, LOGP, FL("Fail to get WNI_CFG_MAX_CONSECUTIVE_BACKGROUND_SCAN_FAILURE value"));
return eSIR_NORMAL_BACKGROUND_SCAN;
}
-
+
if (cfgVal == 0)
return eSIR_NORMAL_BACKGROUND_SCAN;
@@ -92,7 +92,7 @@ tSirBackgroundScanMode limSelectsBackgroundScanMode(tpAniSirGlobal pMac)
/** -----------------------------------------------------------
\fn limIsBackgroundScanAllowed
\brief This function determines if background scan should be
-\ allowed. It is called by limTriggerBackgroundScan().
+\ allowed. It is called by limTriggerBackgroundScan().
\param tpAniSirGlobal pMac
\return none
\ ------------------------------------------------------------- */
@@ -135,10 +135,10 @@ static tANI_U8 limIsBackgroundScanAllowed(tpAniSirGlobal pMac)
\ when there is an exisiting link with an AP.
\ SME_SCAN_REQ is issued to SME state machine with Active
\ scanning is performed on one channel at a time.
-\
+\
\ Assumptions:
-\ Valid channel list at CFG is either populated by Roaming
-\ algorithm upon determining/selecting a regulatory domain
+\ Valid channel list at CFG is either populated by Roaming
+\ algorithm upon determining/selecting a regulatory domain
\ or by default has all 36 possible channels.
\
\param tpAniSirGlobal pMac
@@ -183,7 +183,7 @@ void limTriggerBackgroundScan(tpAniSirGlobal pMac)
smeScanReq.bssType = eSIR_INFRASTRUCTURE_MODE;
palCopyMemory( pMac->hHdd, (tANI_U8 *) smeScanReq.bssId,
(tANI_U8 *) &bcAddr, sizeof(tSirMacAddr));
-
+
if (wlan_cfgGetStr(pMac, WNI_CFG_SSID,
(tANI_U8 *) (smeScanReq.ssId[0].ssId),
(tANI_U32 *) &ssidLen) != eSIR_SUCCESS)
@@ -218,16 +218,20 @@ void limTriggerBackgroundScan(tpAniSirGlobal pMac)
smeScanReq.returnAfterFirstMatch = 0;
smeScanReq.returnUniqueResults = 1;
- //At the first channel scan, clear the cached results
+ //At the first channel scan, clear the cached results
if(pMac->lim.gLimBackgroundScanChannelId == 0)
{
- smeScanReq.returnFreshResults = SIR_BG_SCAN_PURGE_RESUTLS|SIR_BG_SCAN_RETURN_FRESH_RESULTS;
+ /*
+ * Do not purge while starting a scan. Rome firmware sends results
+ * of roaming scan into this cache.
+ */
+ smeScanReq.returnFreshResults = SIR_BG_SCAN_RETURN_FRESH_RESULTS;
}
else
{
smeScanReq.returnFreshResults = SIR_BG_SCAN_RETURN_FRESH_RESULTS;
}
-
+
smeScanReq.channelList.numChannels = 1;
if (pMac->lim.gLimBackgroundScanChannelId >= len)
@@ -237,7 +241,7 @@ void limTriggerBackgroundScan(tpAniSirGlobal pMac)
PELOGE(limLog(pMac, LOGE, FL("Skipping Background Scan since the channel list is exhausted."));)
PELOGE(limLog(pMac, LOGE, FL("SME should send WNI_CFG_BACKGROUND_SCAN_PERIOD indication to start the background scan again."));)
- /* Stop the BG scan timer here. SME should send WNI_CFG_BACKGROUND_SCAN_PERIOD
+ /* Stop the BG scan timer here. SME should send WNI_CFG_BACKGROUND_SCAN_PERIOD
* indication to start the background scan again.
*/
if (TX_TIMER_VALID(pMac->lim.limTimers.gLimBackgroundScanTimer))
@@ -263,17 +267,17 @@ void limTriggerBackgroundScan(tpAniSirGlobal pMac)
smeScanReq.uIEFieldLen = 0;
smeScanReq.uIEFieldOffset = sizeof(tSirSmeScanReq);
-
+
backgroundScan = limSelectsBackgroundScanMode(pMac);
PELOG1(limLog(pMac, LOG1, FL("Performing (mode %d) Background Scan "), backgroundScan);)
smeScanReq.backgroundScanMode = backgroundScan;
-
+
//determine whether to send the results or not, If so, notify the BG scan results to SME
if (pMac->lim.gLimBackgroundScanChannelId >= len)
{
pMac->lim.gLimReportBackgroundScanResults = TRUE;
}
-
+
limPostSmeMessage(pMac,
eWNI_SME_SCAN_REQ,
(tANI_U32 *) &smeScanReq);
@@ -282,8 +286,8 @@ void limTriggerBackgroundScan(tpAniSirGlobal pMac)
/** ----------------------------------------------------------------------
\fn limAbortBackgroundScan
-\brief This function aborts background scan and send scan
-\ response to SME.
+\brief This function aborts background scan and send scan
+\ response to SME.
\param tpAniSirGlobal pMac
\return none
\ ------------------------------------------------------------------------- */
@@ -291,12 +295,12 @@ void limAbortBackgroundScan(tpAniSirGlobal pMac)
{
tANI_U16 scanRspLen = 8;
- if(pMac->lim.gLimBackgroundScanTerminate == FALSE)
+ if(pMac->lim.gLimBackgroundScanTerminate == FALSE)
{
limLog(pMac, LOGE, FL("Abort Background Scan "));
if (TX_TIMER_VALID(pMac->lim.limTimers.gLimBackgroundScanTimer))
{
- limDeactivateAndChangeTimer(pMac, eLIM_BACKGROUND_SCAN_TIMER);
+ limDeactivateAndChangeTimer(pMac, eLIM_BACKGROUND_SCAN_TIMER);
}
pMac->lim.gLimBackgroundScanTerminate = TRUE;
@@ -310,11 +314,11 @@ void limAbortBackgroundScan(tpAniSirGlobal pMac)
pMac->lim.gLimSmeScanResultLength -
sizeof(tSirBssDescription);
limSendSmeScanRsp(pMac, scanRspLen, eSIR_SME_SUCCESS, 0, 0);
- }
+ }
}
// reset background scan variables
- pMac->lim.gLimBackgroundScanChannelId = 0;
+ pMac->lim.gLimBackgroundScanChannelId = 0;
return;
}
diff --git a/CORE/MAC/src/pe/lim/limSendManagementFrames.c b/CORE/MAC/src/pe/lim/limSendManagementFrames.c
index feede11fa620..b5daa153f5c6 100644
--- a/CORE/MAC/src/pe/lim/limSendManagementFrames.c
+++ b/CORE/MAC/src/pe/lim/limSendManagementFrames.c
@@ -5114,6 +5114,7 @@ tSirRetStatus limSendAddBARsp( tpAniSirGlobal pMac,
frmAddBARsp.AddBAParameterSet.tid = pMlmAddBARsp->baTID;
frmAddBARsp.AddBAParameterSet.policy = pMlmAddBARsp->baPolicy;
frmAddBARsp.AddBAParameterSet.bufferSize = pMlmAddBARsp->baBufferSize;
+ frmAddBARsp.AddBAParameterSet.amsduSupported = psessionEntry->amsduSupportedInBA;
// BA timeout
// 0 - indicates no BA timeout
diff --git a/CORE/MAC/src/pe/lim/limSendSmeRspMessages.c b/CORE/MAC/src/pe/lim/limSendSmeRspMessages.c
index caecbf2bfb33..1d71f2013a28 100644
--- a/CORE/MAC/src/pe/lim/limSendSmeRspMessages.c
+++ b/CORE/MAC/src/pe/lim/limSendSmeRspMessages.c
@@ -104,7 +104,7 @@ limSendSmeRsp(tpAniSirGlobal pMac, tANI_U16 msgType,
return;
}
-
+
pSirSmeRsp->messageType = msgType;
pSirSmeRsp->length = sizeof(tSirSmeRsp);
pSirSmeRsp->statusCode = resultCode;
@@ -119,7 +119,7 @@ limSendSmeRsp(tpAniSirGlobal pMac, tANI_U16 msgType,
mmhMsg.bodyval = 0;
MTRACE(macTraceMsgTx(pMac, smesessionId , mmhMsg.type));
-#ifdef FEATURE_WLAN_DIAG_SUPPORT_LIM //FEATURE_WLAN_DIAG_SUPPORT
+#ifdef FEATURE_WLAN_DIAG_SUPPORT_LIM //FEATURE_WLAN_DIAG_SUPPORT
{
tpPESession psessionEntry = peGetValidPowerSaveSession(pMac);
switch(msgType)
@@ -132,7 +132,7 @@ limSendSmeRsp(tpAniSirGlobal pMac, tANI_U16 msgType,
break;
case eWNI_PMC_ENTER_IMPS_RSP:
limDiagEventReport(pMac, WLAN_PE_DIAG_ENTER_IMPS_RSP_EVENT, psessionEntry, (tANI_U16)resultCode, 0);
- break;
+ break;
case eWNI_PMC_EXIT_IMPS_RSP:
limDiagEventReport(pMac, WLAN_PE_DIAG_EXIT_IMPS_RSP_EVENT, psessionEntry, (tANI_U16)resultCode, 0);
break;
@@ -147,17 +147,17 @@ limSendSmeRsp(tpAniSirGlobal pMac, tANI_U16 msgType,
break;
case eWNI_SME_STOP_BSS_RSP:
limDiagEventReport(pMac, WLAN_PE_DIAG_STOP_BSS_RSP_EVENT, NULL, (tANI_U16)resultCode, 0);
- break;
+ break;
case eWNI_PMC_ENTER_WOWL_RSP:
limDiagEventReport(pMac, WLAN_PE_DIAG_ENTER_WOWL_RSP_EVENT, psessionEntry, (tANI_U16)resultCode, 0);
break;
case eWNI_PMC_EXIT_WOWL_RSP:
limDiagEventReport(pMac, WLAN_PE_DIAG_EXIT_WOWL_RSP_EVENT, psessionEntry, (tANI_U16)resultCode, 0);
- break;
- }
- }
+ break;
+ }
+ }
#endif //FEATURE_WLAN_DIAG_SUPPORT
-
+
limSysProcessMmhMsgApi(pMac, &mmhMsg, ePROT);
} /*** end limSendSmeRsp() ***/
@@ -180,13 +180,13 @@ limSendSmeRsp(tpAniSirGlobal pMac, tANI_U16 msgType,
* NA
*
* @param pMac Pointer to Global MAC structure
- * @param status Resume link status
+ * @param status Resume link status
* @param ctx context passed while calling resmune link.
* (join response to be sent)
*
* @return None
*/
-static void limSendSmeJoinReassocRspAfterResume( tpAniSirGlobal pMac,
+static void limSendSmeJoinReassocRspAfterResume( tpAniSirGlobal pMac,
eHalStatus status, tANI_U32 *ctx)
{
tSirMsgQ mmhMsg;
@@ -235,7 +235,7 @@ limSendSmeJoinReassocRsp(tpAniSirGlobal pMac, tANI_U16 msgType,
tANI_U32 rspLen;
tpDphHashNode pStaDs = NULL;
-#ifdef FEATURE_WLAN_DIAG_SUPPORT_LIM //FEATURE_WLAN_DIAG_SUPPORT
+#ifdef FEATURE_WLAN_DIAG_SUPPORT_LIM //FEATURE_WLAN_DIAG_SUPPORT
if (msgType == eWNI_SME_REASSOC_RSP)
limDiagEventReport(pMac, WLAN_PE_DIAG_REASSOC_RSP_EVENT, psessionEntry, (tANI_U16)resultCode, 0);
else
@@ -249,7 +249,7 @@ limSendSmeJoinReassocRsp(tpAniSirGlobal pMac, tANI_U16 msgType,
if(psessionEntry == NULL)
{
- rspLen = sizeof(tSirSmeJoinRsp);
+ rspLen = sizeof(tSirSmeJoinRsp);
if( eHAL_STATUS_SUCCESS != palAllocateMemory( pMac->hHdd, (void **)&pSirSmeJoinRsp, rspLen))
{
@@ -257,10 +257,10 @@ limSendSmeJoinReassocRsp(tpAniSirGlobal pMac, tANI_U16 msgType,
limLog(pMac, LOGP, FL("call to palAllocateMemory failed for JOIN/REASSOC_RSP"));
return;
}
-
+
palZeroMemory(pMac, (tANI_U8*)pSirSmeJoinRsp, rspLen);
-
-
+
+
pSirSmeJoinRsp->beaconLength = 0;
pSirSmeJoinRsp->assocReqLength = 0;
pSirSmeJoinRsp->assocRspLength = 0;
@@ -268,16 +268,16 @@ limSendSmeJoinReassocRsp(tpAniSirGlobal pMac, tANI_U16 msgType,
else
{
- rspLen = psessionEntry->assocReqLen + psessionEntry->assocRspLen +
- psessionEntry->bcnLen +
+ rspLen = psessionEntry->assocReqLen + psessionEntry->assocRspLen +
+ psessionEntry->bcnLen +
#ifdef WLAN_FEATURE_VOWIFI_11R
psessionEntry->RICDataLen +
#endif
-#ifdef FEATURE_WLAN_CCX
- psessionEntry->tspecLen +
-#endif
+#ifdef FEATURE_WLAN_CCX
+ psessionEntry->tspecLen +
+#endif
sizeof(tSirSmeJoinRsp) - sizeof(tANI_U8) ;
-
+
if( eHAL_STATUS_SUCCESS != palAllocateMemory( pMac->hHdd, (void **)&pSirSmeJoinRsp, rspLen))
{
/// Buffer not available. Log error
@@ -311,10 +311,10 @@ limSendSmeJoinReassocRsp(tpAniSirGlobal pMac, tANI_U16 msgType,
#ifdef WLAN_FEATURE_VOWIFI_11R
pSirSmeJoinRsp->parsedRicRspLen = 0;
#endif
-#ifdef FEATURE_WLAN_CCX
+#ifdef FEATURE_WLAN_CCX
pSirSmeJoinRsp->tspecIeLen = 0;
#endif
-
+
if(resultCode == eSIR_SME_SUCCESS)
{
@@ -328,7 +328,7 @@ limSendSmeJoinReassocRsp(tpAniSirGlobal pMac, tANI_U16 msgType,
PELOG1(limLog(pMac, LOG1, FL("Beacon=%d"), psessionEntry->bcnLen);)
#endif
}
-
+
if(psessionEntry->assocReq != NULL)
{
pSirSmeJoinRsp->assocReqLength = psessionEntry->assocReqLen;
@@ -345,7 +345,7 @@ limSendSmeJoinReassocRsp(tpAniSirGlobal pMac, tANI_U16 msgType,
palCopyMemory(pMac->hHdd, pSirSmeJoinRsp->frames + psessionEntry->bcnLen + psessionEntry->assocReqLen, psessionEntry->assocRsp, pSirSmeJoinRsp->assocRspLength);
palFreeMemory(pMac->hHdd, psessionEntry->assocRsp);
psessionEntry->assocRsp = NULL;
- }
+ }
#ifdef WLAN_FEATURE_VOWIFI_11R
if(psessionEntry->ricData != NULL)
{
@@ -356,7 +356,7 @@ limSendSmeJoinReassocRsp(tpAniSirGlobal pMac, tANI_U16 msgType,
PELOG1(limLog(pMac, LOG1, FL("RicLength=%d"), pSirSmeJoinRsp->parsedRicRspLen);)
}
#endif
-#ifdef FEATURE_WLAN_CCX
+#ifdef FEATURE_WLAN_CCX
if(psessionEntry->tspecIes != NULL)
{
pSirSmeJoinRsp->tspecIeLen = psessionEntry->tspecLen;
@@ -365,7 +365,7 @@ limSendSmeJoinReassocRsp(tpAniSirGlobal pMac, tANI_U16 msgType,
psessionEntry->tspecIes = NULL;
PELOG1(limLog(pMac, LOG1, FL("CCX-TspecLen=%d"), psessionEntry->tspecLen);)
}
-#endif
+#endif
pSirSmeJoinRsp->aid = psessionEntry->limAID;
#ifdef WLAN_FEATURE_VOWIFI_11R_DEBUG
PELOG1(limLog(pMac, LOG1, FL("AssocRsp=%d"), psessionEntry->assocRspLen);)
@@ -400,29 +400,29 @@ limSendSmeJoinReassocRsp(tpAniSirGlobal pMac, tANI_U16 msgType,
pSirSmeJoinRsp->length = (tANI_U16) rspLen;
pSirSmeJoinRsp->statusCode = resultCode;
pSirSmeJoinRsp->protStatusCode = protStatusCode;
-
+
/* Update SME session ID and transaction Id */
pSirSmeJoinRsp->sessionId = smesessionId;
pSirSmeJoinRsp->transactionId = smetransactionId;
-
+
if(IS_MCC_SUPPORTED && limIsLinkSuspended( pMac ) )
{
if( psessionEntry && psessionEntry->limSmeState == eLIM_SME_LINK_EST_STATE )
{
-
+
#ifdef WLAN_FEATURE_11AC
if (psessionEntry->vhtCapability)
{
ePhyChanBondState htSecondaryChannelOffset;
/*Get 11ac cbState from 11n cbState*/
- htSecondaryChannelOffset = limGet11ACPhyCBState(pMac,
+ htSecondaryChannelOffset = limGet11ACPhyCBState(pMac,
psessionEntry->currentOperChannel,
psessionEntry->htSecondaryChannelOffset,
psessionEntry->apCenterChan,
psessionEntry);
peSetResumeChannel( pMac, psessionEntry->currentOperChannel, htSecondaryChannelOffset);
}
- else
+ else
#endif
peSetResumeChannel( pMac, psessionEntry->currentOperChannel, psessionEntry->htSecondaryChannelOffset);
}
@@ -430,7 +430,7 @@ limSendSmeJoinReassocRsp(tpAniSirGlobal pMac, tANI_U16 msgType,
{
peSetResumeChannel( pMac, 0, 0);
}
- limResumeLink( pMac, limSendSmeJoinReassocRspAfterResume,
+ limResumeLink( pMac, limSendSmeJoinReassocRspAfterResume,
(tANI_U32*) pSirSmeJoinRsp );
}
else
@@ -487,7 +487,7 @@ limSendSmeStartBssRsp(tpAniSirGlobal pMac,
if(psessionEntry == NULL)
{
-
+
if( eHAL_STATUS_SUCCESS != palAllocateMemory( pMac->hHdd, (void **)&pSirSmeRsp, size))
{
/// Buffer not available. Log error
@@ -495,7 +495,7 @@ limSendSmeStartBssRsp(tpAniSirGlobal pMac,
return;
}
palZeroMemory(pMac, (tANI_U8*)pSirSmeRsp, size);
-
+
}
else
{
@@ -519,7 +519,7 @@ limSendSmeStartBssRsp(tpAniSirGlobal pMac,
{
sirCopyMacAddr(pSirSmeRsp->bssDescription.bssId, psessionEntry->bssId);
-
+
/* Read beacon interval from session */
pSirSmeRsp->bssDescription.beaconInterval = (tANI_U16) psessionEntry->beaconParams.beaconInterval;
pSirSmeRsp->bssType = psessionEntry->bssType;
@@ -533,9 +533,9 @@ limSendSmeStartBssRsp(tpAniSirGlobal pMac,
#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
-
+
+#endif// TO SUPPORT BT-AMP
+
pSirSmeRsp->bssDescription.channelId = psessionEntry->currentOperChannel;
pSirSmeRsp->bssDescription.aniIndicator = 1;
@@ -558,9 +558,9 @@ limSendSmeStartBssRsp(tpAniSirGlobal pMac,
size += ieLen - sizeof(tANI_U32);
}
-
-
+
+
}
pSirSmeRsp->messageType = msgType;
@@ -571,8 +571,8 @@ limSendSmeStartBssRsp(tpAniSirGlobal pMac,
pSirSmeRsp->transactionId = smetransactionId;
pSirSmeRsp->statusCode = resultCode;
if(psessionEntry != NULL )
- pSirSmeRsp->staId = psessionEntry->staId; //else it will be always zero smeRsp StaID = 0
-
+ pSirSmeRsp->staId = psessionEntry->staId; //else it will be always zero smeRsp StaID = 0
+
mmhMsg.type = msgType;
mmhMsg.bodyptr = pSirSmeRsp;
@@ -585,7 +585,7 @@ limSendSmeStartBssRsp(tpAniSirGlobal pMac,
{
MTRACE(macTraceMsgTx(pMac, psessionEntry->peSessionId, mmhMsg.type));
}
-#ifdef FEATURE_WLAN_DIAG_SUPPORT_LIM //FEATURE_WLAN_DIAG_SUPPORT
+#ifdef FEATURE_WLAN_DIAG_SUPPORT_LIM //FEATURE_WLAN_DIAG_SUPPORT
limDiagEventReport(pMac, WLAN_PE_DIAG_START_BSS_RSP_EVENT, psessionEntry, (tANI_U16)resultCode, 0);
#endif //FEATURE_WLAN_DIAG_SUPPORT
@@ -754,6 +754,8 @@ limSendSmeScanRsp(tpAniSirGlobal pMac, tANI_U16 length,
limSysProcessMmhMsgApi(pMac, &mmhMsg, ePROT);
PELOG2(limLog(pMac, LOG2, FL("statusCode : eSIR_SME_SUCCESS"));)
}
+ // Discard previously cached scan results
+ limReInitScanResults(pMac);
return;
@@ -890,6 +892,80 @@ limSendSmeLfrScanRsp(tpAniSirGlobal pMac, tANI_U16 length,
} //while(ptemp)
} //for (i = 0; i < LIM_MAX_NUM_OF_SCAN_RESULTS; i++)
+ /* Repeat for normal scan cache */
+ if (pMac->roam.roamSession[smesessionId].connectedProfile.SSID.length != 0) {
+ tSirMacSSid *pSsid = &pMac->roam.roamSession[smesessionId].connectedProfile.SSID;
+ for (i = 0; i < LIM_MAX_NUM_OF_SCAN_RESULTS; i++)
+ {
+ ptemp = pMac->lim.gLimCachedScanHashTable[i];
+ while(ptemp)
+ {
+ if(palEqualMemory(pMac->hHdd, (tANI_U8* ) ptemp->bssDescription.ieFields+1,
+ (tANI_U8 *) &pSsid->length,
+ (tANI_U8) (pSsid->length + 1)))
+ {
+ pbBuf = ((tANI_U8 *)pSirSmeScanRsp) + msgLen;
+ if(0 == bssCount)
+ {
+ msgLen = sizeof(tSirSmeScanRsp) -
+ sizeof(tSirBssDescription) +
+ ptemp->bssDescription.length +
+ sizeof(ptemp->bssDescription.length);
+ pDesc = pSirSmeScanRsp->bssDescription;
+ }
+ else
+ {
+ msgLen += ptemp->bssDescription.length +
+ sizeof(ptemp->bssDescription.length);
+ pDesc = (tSirBssDescription *)pbBuf;
+ }
+ if ( (allocLength < msgLen) ||
+ (LIM_MAX_NUM_OF_SCAN_RESULTS_REPORTED <= bssCount++) )
+ {
+ pSirSmeScanRsp->statusCode =
+ eSIR_SME_MORE_SCAN_RESULTS_FOLLOW;
+ pSirSmeScanRsp->messageType = eWNI_SME_SCAN_RSP;
+ pSirSmeScanRsp->length = curMsgLen;
+ mmhMsg.bodyptr = pSirSmeScanRsp;
+ mmhMsg.bodyval = 0;
+ MTRACE(macTraceMsgTx(pMac, NO_SESSION, mmhMsg.type));
+ limSysProcessMmhMsgApi(pMac, &mmhMsg, ePROT);
+ if (eHAL_STATUS_SUCCESS != palAllocateMemory(pMac->hHdd,
+ (void **)&pSirSmeScanRsp,
+ allocLength))
+ {
+ // Log error
+ limLog(pMac, LOGP,
+ FL("call to palAllocateMemory failed for eWNI_SME_SCAN_RSP\n"));
+ return;
+ }
+ msgLen = sizeof(tSirSmeScanRsp) -
+ sizeof(tSirBssDescription) +
+ ptemp->bssDescription.length +
+ sizeof(ptemp->bssDescription.length);
+ pDesc = pSirSmeScanRsp->bssDescription;
+ bssCount = 1;
+ }
+ curMsgLen = msgLen;
+
+ PELOG2(limLog(pMac, LOG2, FL("ScanRsp : msgLen %d, bssDescr Len=%d\n"),
+ msgLen, ptemp->bssDescription.length);)
+ pDesc->length
+ = ptemp->bssDescription.length;
+ palCopyMemory( pMac->hHdd, (tANI_U8 *) &pDesc->bssId,
+ (tANI_U8 *) &ptemp->bssDescription.bssId,
+ ptemp->bssDescription.length);
+
+ PELOG2(limLog(pMac, LOG2, FL("BssId "));
+ limPrintMacAddr(pMac, ptemp->bssDescription.bssId, LOG2);)
+
+ pSirSmeScanRsp->sessionId = smesessionId;
+ pSirSmeScanRsp->transcationId = smetranscationId;
+ }
+ ptemp = ptemp->next;
+ } //while(ptemp)
+ } //for (i = 0; i < LIM_MAX_NUM_OF_SCAN_RESULTS; i++)
+ }
if (0 == bssCount)
{
limPostSmeScanRspMessage(pMac, length, resultCode, smesessionId, smetranscationId);
@@ -917,6 +993,8 @@ limSendSmeLfrScanRsp(tpAniSirGlobal pMac, tANI_U16 length,
limSysProcessMmhMsgApi(pMac, &mmhMsg, ePROT);
PELOG2(limLog(pMac, LOG2, FL("statusCode : eSIR_SME_SUCCESS\n"));)
}
+ // Discard previously cached scan results
+ limReInitLfrScanResults(pMac);
return;
@@ -941,7 +1019,7 @@ limSendSmeLfrScanRsp(tpAniSirGlobal pMac, tANI_U16 length,
*/
void
-limPostSmeScanRspMessage(tpAniSirGlobal pMac,
+limPostSmeScanRspMessage(tpAniSirGlobal pMac,
tANI_U16 length,
tSirResultCodes resultCode,tANI_U8 smesessionId, tANI_U16 smetransactionId)
{
@@ -972,13 +1050,13 @@ limPostSmeScanRspMessage(tpAniSirGlobal pMac,
/*Update SME session Id and transaction Id */
pSirSmeScanRsp->sessionId = smesessionId;
pSirSmeScanRsp->transcationId = smetransactionId;
-
+
mmhMsg.type = eWNI_SME_SCAN_RSP;
mmhMsg.bodyptr = pSirSmeScanRsp;
mmhMsg.bodyval = 0;
MTRACE(macTraceMsgTx(pMac, NO_SESSION, mmhMsg.type));
-#ifdef FEATURE_WLAN_DIAG_SUPPORT_LIM //FEATURE_WLAN_DIAG_SUPPORT
+#ifdef FEATURE_WLAN_DIAG_SUPPORT_LIM //FEATURE_WLAN_DIAG_SUPPORT
limDiagEventReport(pMac, WLAN_PE_DIAG_SCAN_RSP_EVENT, NULL, (tANI_U16)resultCode, 0);
#endif //FEATURE_WLAN_DIAG_SUPPORT
@@ -1022,7 +1100,7 @@ void limSendSmeOemDataRsp(tpAniSirGlobal pMac, tANI_U32* pMsgBuf, tSirResultCode
tLimMlmOemDataRsp* pMlmOemDataRsp=NULL;
tANI_U16 msgLength;
-
+
//get the pointer to the mlm message
pMlmOemDataRsp = (tLimMlmOemDataRsp*)(pMsgBuf);
@@ -1106,24 +1184,24 @@ limSendSmeAuthRsp(tpAniSirGlobal pMac,
return;
}
-
+
if(psessionEntry != NULL)
{
palCopyMemory( pMac->hHdd, (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;
+ pSirSmeAuthRsp->transactionId = smetransactionId;
mmhMsg.type = eWNI_SME_AUTH_RSP;
mmhMsg.bodyptr = pSirSmeAuthRsp;
@@ -1191,7 +1269,7 @@ limSendSmeDisassocNtf(tpAniSirGlobal pMac,
tSirSmeDisassocRsp *pSirSmeDisassocRsp;
tSirSmeDisassocInd *pSirSmeDisassocInd;
tANI_U32 *pMsg;
-
+
switch (disassocTrigger)
{
case eLIM_PEER_ENTITY_DISASSOC:
@@ -1223,7 +1301,7 @@ limSendSmeDisassocNtf(tpAniSirGlobal pMac,
limCopyU16(pBuf, smetransactionId);
pBuf += sizeof(tANI_U16);
- //statusCode
+ //statusCode
limCopyU32(pBuf, reasonCode);
pBuf += sizeof(tSirResultCodes);
@@ -1235,8 +1313,8 @@ limSendSmeDisassocNtf(tpAniSirGlobal pMac,
//for sta, it is always 1, IBSS is handled at halInitSta
-
-#ifdef FEATURE_WLAN_DIAG_SUPPORT_LIM //FEATURE_WLAN_DIAG_SUPPORT
+
+#ifdef FEATURE_WLAN_DIAG_SUPPORT_LIM //FEATURE_WLAN_DIAG_SUPPORT
limDiagEventReport(pMac, WLAN_PE_DIAG_DISASSOC_RSP_EVENT,
psessionEntry, (tANI_U16)reasonCode, 0);
#endif
@@ -1260,7 +1338,7 @@ limSendSmeDisassocNtf(tpAniSirGlobal pMac,
pSirSmeDisassocInd->messageType = eWNI_SME_DISASSOC_IND;
pSirSmeDisassocInd->length = sizeof(tSirSmeDisassocInd);
-
+
/* Update SME session Id and Transaction Id */
pSirSmeDisassocInd->sessionId = smesessionId;
pSirSmeDisassocInd->transactionId = smetransactionId;
@@ -1276,7 +1354,7 @@ limSendSmeDisassocNtf(tpAniSirGlobal pMac,
palCopyMemory( pMac->hHdd, pBuf, peerMacAddr, sizeof(tSirMacAddr));
-#ifdef FEATURE_WLAN_DIAG_SUPPORT_LIM //FEATURE_WLAN_DIAG_SUPPORT
+#ifdef FEATURE_WLAN_DIAG_SUPPORT_LIM //FEATURE_WLAN_DIAG_SUPPORT
limDiagEventReport(pMac, WLAN_PE_DIAG_DISASSOC_IND_EVENT,
psessionEntry, (tANI_U16)reasonCode, 0);
#endif
@@ -1291,7 +1369,7 @@ limSendSmeDisassocNtf(tpAniSirGlobal pMac,
{
peDeleteSession(pMac,psessionEntry);
}
-
+
limSendSmeDisassocDeauthNtf( pMac, eHAL_STATUS_SUCCESS,
(tANI_U32*) pMsg );
} /*** end limSendSmeDisassocNtf() ***/
@@ -1299,14 +1377,14 @@ limSendSmeDisassocNtf(tpAniSirGlobal pMac,
/** -----------------------------------------------------------------
\brief limSendSmeDisassocInd() - sends SME_DISASSOC_IND
-
- After receiving disassociation frame from peer entity, this
+
+ After receiving disassociation frame from peer entity, this
function sends a eWNI_SME_DISASSOC_IND to SME with a specific
- reason code.
-
+ reason code.
+
\param pMac - global mac structure
- \param pStaDs - station dph hash node
- \return none
+ \param pStaDs - station dph hash node
+ \return none
\sa
----------------------------------------------------------------- */
void
@@ -1328,41 +1406,41 @@ limSendSmeDisassocInd(tpAniSirGlobal pMac, tpDphHashNode pStaDs,tpPESession pses
pSirSmeDisassocInd->transactionId = psessionEntry->transactionId;
pSirSmeDisassocInd->statusCode = pStaDs->mlmStaContext.disassocReason;
pSirSmeDisassocInd->reasonCode = pStaDs->mlmStaContext.disassocReason;
-
+
palCopyMemory( pMac->hHdd, pSirSmeDisassocInd->bssId , psessionEntry->bssId , sizeof(tSirMacAddr));
-
+
palCopyMemory( pMac->hHdd, pSirSmeDisassocInd->peerMacAddr , pStaDs->staAddr, sizeof(tSirMacAddr));
pSirSmeDisassocInd->staId = pStaDs->staIndex;
-
+
mmhMsg.type = eWNI_SME_DISASSOC_IND;
mmhMsg.bodyptr = pSirSmeDisassocInd;
mmhMsg.bodyval = 0;
MTRACE(macTraceMsgTx(pMac, psessionEntry->peSessionId, mmhMsg.type));
-#ifdef FEATURE_WLAN_DIAG_SUPPORT_LIM //FEATURE_WLAN_DIAG_SUPPORT
- limDiagEventReport(pMac, WLAN_PE_DIAG_DISASSOC_IND_EVENT, psessionEntry, 0, (tANI_U16)pStaDs->mlmStaContext.disassocReason);
+#ifdef FEATURE_WLAN_DIAG_SUPPORT_LIM //FEATURE_WLAN_DIAG_SUPPORT
+ limDiagEventReport(pMac, WLAN_PE_DIAG_DISASSOC_IND_EVENT, psessionEntry, 0, (tANI_U16)pStaDs->mlmStaContext.disassocReason);
#endif //FEATURE_WLAN_DIAG_SUPPORT
limSysProcessMmhMsgApi(pMac, &mmhMsg, ePROT);
-
+
} /*** end limSendSmeDisassocInd() ***/
/** -----------------------------------------------------------------
\brief limSendSmeDeauthInd() - sends SME_DEAUTH_IND
-
- After receiving deauthentication frame from peer entity, this
+
+ After receiving deauthentication frame from peer entity, this
function sends a eWNI_SME_DEAUTH_IND to SME with a specific
- reason code.
-
+ reason code.
+
\param pMac - global mac structure
- \param pStaDs - station dph hash node
- \return none
+ \param pStaDs - station dph hash node
+ \return none
\sa
----------------------------------------------------------------- */
void
-limSendSmeDeauthInd(tpAniSirGlobal pMac, tpDphHashNode pStaDs, tpPESession psessionEntry)
+limSendSmeDeauthInd(tpAniSirGlobal pMac, tpDphHashNode pStaDs, tpPESession psessionEntry)
{
tSirMsgQ mmhMsg;
tSirSmeDeauthInd *pSirSmeDeauthInd;
@@ -1401,7 +1479,7 @@ limSendSmeDeauthInd(tpAniSirGlobal pMac, tpDphHashNode pStaDs, tpPESession psess
mmhMsg.bodyval = 0;
MTRACE(macTraceMsgTx(pMac, psessionEntry->peSessionId, mmhMsg.type));
-#ifdef FEATURE_WLAN_DIAG_SUPPORT_LIM //FEATURE_WLAN_DIAG_SUPPORT
+#ifdef FEATURE_WLAN_DIAG_SUPPORT_LIM //FEATURE_WLAN_DIAG_SUPPORT
limDiagEventReport(pMac, WLAN_PE_DIAG_DEAUTH_IND_EVENT, psessionEntry, 0, pStaDs->mlmStaContext.cleanupTrigger);
#endif //FEATURE_WLAN_DIAG_SUPPORT
@@ -1603,12 +1681,12 @@ limSendSmeDeauthNtf(tpAniSirGlobal pMac, tSirMacAddr peerMacAddr, tSirResultCode
tANI_U8 sessionId;
tANI_U32 *pMsg;
- psessionEntry = peFindSessionByBssid(pMac,peerMacAddr,&sessionId);
+ psessionEntry = peFindSessionByBssid(pMac,peerMacAddr,&sessionId);
switch (deauthTrigger)
{
case eLIM_PEER_ENTITY_DEAUTH:
return;
-
+
case eLIM_HOST_DEAUTH:
/**
* Deauthentication response to host triggered
@@ -1627,12 +1705,12 @@ limSendSmeDeauthNtf(tpAniSirGlobal pMac, tSirMacAddr peerMacAddr, tSirResultCode
pSirSmeDeauthRsp->length = sizeof(tSirSmeDeauthRsp);
pSirSmeDeauthRsp->statusCode = reasonCode;
pSirSmeDeauthRsp->sessionId = smesessionId;
- pSirSmeDeauthRsp->transactionId = smetransactionId;
+ pSirSmeDeauthRsp->transactionId = smetransactionId;
pBuf = (tANI_U8 *) pSirSmeDeauthRsp->peerMacAddr;
palCopyMemory( pMac->hHdd, pBuf, peerMacAddr, sizeof(tSirMacAddr));
-#ifdef FEATURE_WLAN_DIAG_SUPPORT_LIM //FEATURE_WLAN_DIAG_SUPPORT
+#ifdef FEATURE_WLAN_DIAG_SUPPORT_LIM //FEATURE_WLAN_DIAG_SUPPORT
limDiagEventReport(pMac, WLAN_PE_DIAG_DEAUTH_RSP_EVENT,
psessionEntry, 0, (tANI_U16)reasonCode);
#endif
@@ -1678,7 +1756,7 @@ limSendSmeDeauthNtf(tpAniSirGlobal pMac, tSirMacAddr peerMacAddr, tSirResultCode
//peerMacAddr
palCopyMemory( pMac->hHdd, pSirSmeDeauthInd->peerMacAddr, peerMacAddr, sizeof(tSirMacAddr));
-#ifdef FEATURE_WLAN_DIAG_SUPPORT_LIM //FEATURE_WLAN_DIAG_SUPPORT
+#ifdef FEATURE_WLAN_DIAG_SUPPORT_LIM //FEATURE_WLAN_DIAG_SUPPORT
limDiagEventReport(pMac, WLAN_PE_DIAG_DEAUTH_IND_EVENT,
psessionEntry, 0, (tANI_U16)reasonCode);
#endif //FEATURE_WLAN_DIAG_SUPPORT
@@ -1686,12 +1764,12 @@ limSendSmeDeauthNtf(tpAniSirGlobal pMac, tSirMacAddr peerMacAddr, tSirResultCode
break;
}
-
+
/*Delete the PE session created */
if(psessionEntry != NULL)
{
peDeleteSession(pMac,psessionEntry);
- }
+ }
limSendSmeDisassocDeauthNtf( pMac, eHAL_STATUS_SUCCESS,
(tANI_U32*) pMsg );
@@ -1861,10 +1939,10 @@ limSendSmeSetContextRsp(tpAniSirGlobal pMac,
MTRACE(macTraceMsgTx(pMac, psessionEntry->peSessionId, mmhMsg.type));
}
-#ifdef FEATURE_WLAN_DIAG_SUPPORT_LIM //FEATURE_WLAN_DIAG_SUPPORT
+#ifdef FEATURE_WLAN_DIAG_SUPPORT_LIM //FEATURE_WLAN_DIAG_SUPPORT
limDiagEventReport(pMac, WLAN_PE_DIAG_SETCONTEXT_RSP_EVENT, psessionEntry, (tANI_U16)resultCode, 0);
#endif //FEATURE_WLAN_DIAG_SUPPORT
-
+
limSysProcessMmhMsgApi(pMac, &mmhMsg, ePROT);
} /*** end limSendSmeSetContextRsp() ***/
@@ -1914,7 +1992,7 @@ limSendSmeRemoveKeyRsp(tpAniSirGlobal pMac,
return;
}
-
+
if(psessionEntry != NULL)
{
@@ -1923,15 +2001,15 @@ limSendSmeRemoveKeyRsp(tpAniSirGlobal pMac,
pBuf += sizeof(tSirMacAddr);
limCopyU32(pBuf, resultCode);
}
-
+
pSirSmeRemoveKeyRsp->messageType = eWNI_SME_REMOVEKEY_RSP;
pSirSmeRemoveKeyRsp->length = sizeof(tSirSmeRemoveKeyRsp);
pSirSmeRemoveKeyRsp->statusCode = resultCode;
-
+
/* Update SME session and transaction Id*/
pSirSmeRemoveKeyRsp->sessionId = smesessionId;
- pSirSmeRemoveKeyRsp->transactionId = smetransactionId;
-
+ pSirSmeRemoveKeyRsp->transactionId = smetransactionId;
+
mmhMsg.type = eWNI_SME_REMOVEKEY_RSP;
mmhMsg.bodyptr = pSirSmeRemoveKeyRsp;
mmhMsg.bodyval = 0;
@@ -2080,9 +2158,9 @@ limSendSmeNeighborBssInd(tpAniSirGlobal pMac,
} /*** end limSendSmeNeighborBssInd() ***/
/** -----------------------------------------------------------------
- \brief limSendSmeAddtsRsp() - sends SME ADDTS RSP
- \ This function sends a eWNI_SME_ADDTS_RSP to SME.
- \ SME only looks at rc and tspec field.
+ \brief limSendSmeAddtsRsp() - sends SME ADDTS RSP
+ \ This function sends a eWNI_SME_ADDTS_RSP to SME.
+ \ SME only looks at rc and tspec field.
\param pMac - global mac structure
\param rspReqd - is SmeAddTsRsp required
\param status - status code of SME_ADD_TS_RSP
@@ -2090,8 +2168,8 @@ limSendSmeNeighborBssInd(tpAniSirGlobal pMac,
\sa
----------------------------------------------------------------- */
void
-limSendSmeAddtsRsp(tpAniSirGlobal pMac, tANI_U8 rspReqd, tANI_U32 status, tpPESession psessionEntry,
- tSirMacTspecIE tspec, tANI_U8 smesessionId, tANI_U16 smetransactionId)
+limSendSmeAddtsRsp(tpAniSirGlobal pMac, tANI_U8 rspReqd, tANI_U32 status, tpPESession psessionEntry,
+ tSirMacTspecIE tspec, tANI_U8 smesessionId, tANI_U16 smetransactionId)
{
tpSirAddtsRsp rsp;
tSirMsgQ mmhMsg;
@@ -2109,13 +2187,13 @@ 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;
- //palCopyMemory( pMac->hHdd, (tANI_U8 *) &rsp->rsp.tspec, (tANI_U8 *) &addts->tspec, sizeof(addts->tspec));
+ //palCopyMemory( pMac->hHdd, (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;
rsp->transactionId = smetransactionId;
-
+
mmhMsg.type = eWNI_SME_ADDTS_RSP;
mmhMsg.bodyptr = rsp;
mmhMsg.bodyval = 0;
@@ -2127,10 +2205,10 @@ limSendSmeAddtsRsp(tpAniSirGlobal pMac, tANI_U8 rspReqd, tANI_U32 status, tpPESe
{
MTRACE(macTraceMsgTx(pMac, psessionEntry->peSessionId, mmhMsg.type));
}
-#ifdef FEATURE_WLAN_DIAG_SUPPORT_LIM //FEATURE_WLAN_DIAG_SUPPORT
+#ifdef FEATURE_WLAN_DIAG_SUPPORT_LIM //FEATURE_WLAN_DIAG_SUPPORT
limDiagEventReport(pMac, WLAN_PE_DIAG_ADDTS_RSP_EVENT, psessionEntry, 0, 0);
#endif //FEATURE_WLAN_DIAG_SUPPORT
-
+
limSysProcessMmhMsgApi(pMac, &mmhMsg, ePROT);
return;
}
@@ -2186,16 +2264,16 @@ limSendSmeDeltsRsp(tpAniSirGlobal pMac, tpSirDeltsReq delts, tANI_U32 status,tpP
return;
}
palZeroMemory( pMac->hHdd, (tANI_U8 *) rsp, sizeof(*rsp));
-
+
if(psessionEntry != NULL)
{
-
+
rsp->aid = delts->aid;
palCopyMemory( pMac->hHdd, (tANI_U8 *) &rsp->macAddr[0], (tANI_U8 *) &delts->macAddr[0], 6);
palCopyMemory( pMac->hHdd, (tANI_U8 *) &rsp->rsp, (tANI_U8 *) &delts->req, sizeof(tSirDeltsReqInfo));
- }
+ }
+
-
rsp->messageType = eWNI_SME_DELTS_RSP;
rsp->rc = status;
@@ -2214,10 +2292,10 @@ limSendSmeDeltsRsp(tpAniSirGlobal pMac, tpSirDeltsReq delts, tANI_U32 status,tpP
{
MTRACE(macTraceMsgTx(pMac, psessionEntry->peSessionId, mmhMsg.type));
}
-#ifdef FEATURE_WLAN_DIAG_SUPPORT_LIM //FEATURE_WLAN_DIAG_SUPPORT
+#ifdef FEATURE_WLAN_DIAG_SUPPORT_LIM //FEATURE_WLAN_DIAG_SUPPORT
limDiagEventReport(pMac, WLAN_PE_DIAG_DELTS_RSP_EVENT, psessionEntry, (tANI_U16)status, 0);
#endif //FEATURE_WLAN_DIAG_SUPPORT
-
+
limSysProcessMmhMsgApi(pMac, &mmhMsg, ePROT);
}
@@ -2254,7 +2332,7 @@ limSendSmeDeltsInd(tpAniSirGlobal pMac, tpSirDeltsReqInfo delts, tANI_U16 aid,tp
mmhMsg.bodyptr = rsp;
mmhMsg.bodyval = 0;
MTRACE(macTraceMsgTx(pMac, psessionEntry->peSessionId, mmhMsg.type));
-#ifdef FEATURE_WLAN_DIAG_SUPPORT_LIM //FEATURE_WLAN_DIAG_SUPPORT
+#ifdef FEATURE_WLAN_DIAG_SUPPORT_LIM //FEATURE_WLAN_DIAG_SUPPORT
limDiagEventReport(pMac, WLAN_PE_DIAG_DELTS_IND_EVENT, psessionEntry, 0, 0);
#endif //FEATURE_WLAN_DIAG_SUPPORT
@@ -2280,9 +2358,9 @@ limSendSmeDeltsInd(tpAniSirGlobal pMac, tpSirDeltsReqInfo delts, tANI_U16 aid,tp
* NA
*
* @param pMac Pointer to Global MAC structure
- * @param p80211Stats Statistics sent in response
+ * @param p80211Stats Statistics sent in response
* @param resultCode TODO:
- *
+ *
*
* @return none
*/
@@ -2306,18 +2384,18 @@ limSendSmeStatsRsp(tpAniSirGlobal pMac, tANI_U16 msgType, void* stats)
break;
case WDA_STAT_SUMM_RSP:
mmhMsg.type = eWNI_SME_STAT_SUMM_RSP;
- break;
+ break;
default:
mmhMsg.type = msgType; //Response from within PE
break;
}
- pMsgHdr->messageType = mmhMsg.type;
+ pMsgHdr->messageType = mmhMsg.type;
mmhMsg.bodyptr = stats;
mmhMsg.bodyval = 0;
MTRACE(macTraceMsgTx(pMac, NO_SESSION, mmhMsg.type));
- limSysProcessMmhMsgApi(pMac, &mmhMsg, ePROT);
+ limSysProcessMmhMsgApi(pMac, &mmhMsg, ePROT);
return;
@@ -2342,9 +2420,9 @@ limSendSmeStatsRsp(tpAniSirGlobal pMac, tANI_U16 msgType, void* stats)
* NA
*
* @param pMac Pointer to Global MAC structure
- * @param p80211Stats Statistics sent in response
+ * @param p80211Stats Statistics sent in response
* @param resultCode TODO:
- *
+ *
*
* @return none
*/
@@ -2366,9 +2444,9 @@ limSendSmePEStatisticsRsp(tpAniSirGlobal pMac, tANI_U16 msgType, void* stats)
//Fill the Session Id
pPeStats->sessionId = pPeSessionEntry->smeSessionId;
}
-
+
pPeStats->msgType = eWNI_SME_GET_STATISTICS_RSP;
-
+
//msgType should be WDA_GET_STATISTICS_RSP
mmhMsg.type = eWNI_SME_GET_STATISTICS_RSP;
@@ -2376,7 +2454,7 @@ limSendSmePEStatisticsRsp(tpAniSirGlobal pMac, tANI_U16 msgType, void* stats)
mmhMsg.bodyptr = stats;
mmhMsg.bodyval = 0;
MTRACE(macTraceMsgTx(pMac, NO_SESSION, mmhMsg.type));
- limSysProcessMmhMsgApi(pMac, &mmhMsg, ePROT);
+ limSysProcessMmhMsgApi(pMac, &mmhMsg, ePROT);
return;
@@ -2448,24 +2526,24 @@ void
limSendSmeIBSSPeerInd(
tpAniSirGlobal pMac,
tSirMacAddr peerMacAddr,
- tANI_U16 staIndex,
+ tANI_U16 staIndex,
tANI_U8 ucastIdx,
tANI_U8 bcastIdx,
- tANI_U8 *beacon,
- tANI_U16 beaconLen,
+ tANI_U8 *beacon,
+ tANI_U16 beaconLen,
tANI_U16 msgType,
tANI_U8 sessionId)
{
tSirMsgQ mmhMsg;
tSmeIbssPeerInd *pNewPeerInd;
-
+
if(eHAL_STATUS_SUCCESS !=
palAllocateMemory(pMac->hHdd,(void * *) &pNewPeerInd,(sizeof(tSmeIbssPeerInd) + beaconLen)))
{
PELOGE(limLog(pMac, LOGE, FL("Failed to allocate memory"));)
return;
}
-
+
palZeroMemory(pMac->hHdd, (void *) pNewPeerInd, (sizeof(tSmeIbssPeerInd) + beaconLen));
palCopyMemory( pMac->hHdd, (tANI_U8 *) pNewPeerInd->peerAddr,
@@ -2487,19 +2565,19 @@ limSendSmeIBSSPeerInd(
mmhMsg.bodyptr = pNewPeerInd;
MTRACE(macTraceMsgTx(pMac, sessionId, mmhMsg.type));
limSysProcessMmhMsgApi(pMac, &mmhMsg, ePROT);
-
+
}
/** -----------------------------------------------------------------
\brief limSendExitBmpsInd() - sends exit bmps indication
-
+
This function sends a eWNI_PMC_EXIT_BMPS_IND with a specific reason
- code to SME. This will trigger SME to get out of BMPS mode.
-
+ code to SME. This will trigger SME to get out of BMPS mode.
+
\param pMac - global mac structure
\param reasonCode - reason for which PE wish to exit BMPS
- \return none
+ \return none
\sa
----------------------------------------------------------------- */
void limSendExitBmpsInd(tpAniSirGlobal pMac, tExitBmpsReason reasonCode,
@@ -2508,7 +2586,7 @@ void limSendExitBmpsInd(tpAniSirGlobal pMac, tExitBmpsReason reasonCode,
tSirMsgQ mmhMsg;
tANI_U16 msgLen = 0;
tpSirSmeExitBmpsInd pExitBmpsInd;
-
+
msgLen = sizeof(tSirSmeExitBmpsInd);
if( eHAL_STATUS_SUCCESS != palAllocateMemory( pMac->hHdd, (void **)&pExitBmpsInd, msgLen ))
{
@@ -2526,13 +2604,13 @@ void limSendExitBmpsInd(tpAniSirGlobal pMac, tExitBmpsReason reasonCode,
mmhMsg.type = eWNI_PMC_EXIT_BMPS_IND;
mmhMsg.bodyptr = pExitBmpsInd;
mmhMsg.bodyval = 0;
-
+
PELOG1(limLog(pMac, LOG1, FL("Sending eWNI_PMC_EXIT_BMPS_IND to SME. "));)
MTRACE(macTraceMsgTx(pMac, NO_SESSION, mmhMsg.type));
-#ifdef FEATURE_WLAN_DIAG_SUPPORT_LIM //FEATURE_WLAN_DIAG_SUPPORT
+#ifdef FEATURE_WLAN_DIAG_SUPPORT_LIM //FEATURE_WLAN_DIAG_SUPPORT
limDiagEventReport(pMac, WLAN_PE_DIAG_EXIT_BMPS_IND_EVENT, peGetValidPowerSaveSession(pMac), 0, (tANI_U16)reasonCode);
#endif //FEATURE_WLAN_DIAG_SUPPORT
-
+
limSysProcessMmhMsgApi(pMac, &mmhMsg, ePROT);
return;
@@ -2544,10 +2622,10 @@ void limSendExitBmpsInd(tpAniSirGlobal pMac, tExitBmpsReason reasonCode,
/*--------------------------------------------------------------------------
\brief peDeleteSession() - Handle the Delete BSS Response from HAL.
-
+
\param pMac - pointer to global adapter context
\param sessionId - Message pointer.
-
+
\sa
--------------------------------------------------------------------------*/
@@ -2563,22 +2641,22 @@ void limHandleDeleteBssRsp(tpAniSirGlobal pMac,tpSirMsgQ MsgQ)
if (psessionEntry->limSystemRole == eLIM_STA_IN_IBSS_ROLE)
{
limIbssDelBssRsp(pMac, MsgQ->bodyptr,psessionEntry);
- }
+ }
else if(psessionEntry->limSystemRole == eLIM_UNKNOWN_ROLE)
{
limProcessSmeDelBssRsp(pMac, MsgQ->bodyval,psessionEntry);
}
-
+
else
limProcessMlmDelBssRsp(pMac,MsgQ,psessionEntry);
-
+
}
#ifdef WLAN_FEATURE_VOWIFI_11R
/** -----------------------------------------------------------------
- \brief limSendSmeAggrQosRsp() - sends SME FT AGGR QOS RSP
- \ This function sends a eWNI_SME_FT_AGGR_QOS_RSP to SME.
- \ SME only looks at rc and tspec field.
+ \brief limSendSmeAggrQosRsp() - sends SME FT AGGR QOS RSP
+ \ This function sends a eWNI_SME_FT_AGGR_QOS_RSP to SME.
+ \ SME only looks at rc and tspec field.
\param pMac - global mac structure
\param rspReqd - is SmeAddTsRsp required
\param status - status code of eWNI_SME_FT_AGGR_QOS_RSP
@@ -2586,7 +2664,7 @@ void limHandleDeleteBssRsp(tpAniSirGlobal pMac,tpSirMsgQ MsgQ)
\sa
----------------------------------------------------------------- */
void
-limSendSmeAggrQosRsp(tpAniSirGlobal pMac, tpSirAggrQosRsp aggrQosRsp,
+limSendSmeAggrQosRsp(tpAniSirGlobal pMac, tpSirAggrQosRsp aggrQosRsp,
tANI_U8 smesessionId)
{
tSirMsgQ mmhMsg;
@@ -2602,13 +2680,13 @@ limSendSmeAggrQosRsp(tpAniSirGlobal pMac, tpSirAggrQosRsp aggrQosRsp,
#endif
/** -----------------------------------------------------------------
- \brief limSendSmePreChannelSwitchInd() - sends an indication to SME
+ \brief limSendSmePreChannelSwitchInd() - sends an indication to SME
before switching channels for spectrum manangement.
-
+
This function sends a eWNI_SME_PRE_SWITCH_CHL_IND to SME.
-
+
\param pMac - global mac structure
- \return none
+ \return none
\sa
----------------------------------------------------------------- */
void
@@ -2642,13 +2720,13 @@ limSendSmePreChannelSwitchInd(tpAniSirGlobal pMac, tpPESession psessionEntry)
}
/** -----------------------------------------------------------------
- \brief limSendSmePostChannelSwitchInd() - sends an indication to SME
+ \brief limSendSmePostChannelSwitchInd() - sends an indication to SME
after channel switch for spectrum manangement is complete.
-
+
This function sends a eWNI_SME_POST_SWITCH_CHL_IND to SME.
-
+
\param pMac - global mac structure
- \return none
+ \return none
\sa
----------------------------------------------------------------- */
void
@@ -2676,12 +2754,12 @@ void limSendSmeMaxAssocExceededNtf(tpAniSirGlobal pMac, tSirMacAddr peerMacAddr,
{
PELOGE(limLog(pMac, LOGE, FL("Failed to allocate memory"));)
return;
- }
+ }
palZeroMemory(pMac->hHdd, (void *) pSmeMaxAssocInd, sizeof(tSmeMaxAssocInd));
palCopyMemory( pMac->hHdd, (tANI_U8 *)pSmeMaxAssocInd->peerMac,
(tANI_U8 *)peerMacAddr, sizeof(tSirMacAddr));
pSmeMaxAssocInd->mesgType = eWNI_SME_MAX_ASSOC_EXCEEDED;
- pSmeMaxAssocInd->mesgLen = sizeof(tSmeMaxAssocInd);
+ pSmeMaxAssocInd->mesgLen = sizeof(tSmeMaxAssocInd);
pSmeMaxAssocInd->sessionId = smesessionId;
mmhMsg.type = pSmeMaxAssocInd->mesgType;
mmhMsg.bodyptr = pSmeMaxAssocInd;
diff --git a/CORE/MAC/src/pe/lim/limSerDesUtils.c b/CORE/MAC/src/pe/lim/limSerDesUtils.c
index 083ca5239dd0..51d925a48234 100644
--- a/CORE/MAC/src/pe/lim/limSerDesUtils.c
+++ b/CORE/MAC/src/pe/lim/limSerDesUtils.c
@@ -713,16 +713,22 @@ limStartBssReqSerDes(tpAniSirGlobal pMac, tpSirSmeStartBssReq pStartBssReq, tANI
len -= pStartBssReq->operationalRateSet.numRates;
// Extract extendedRateSet
+ pStartBssReq->extendedRateSet.numRates = *pBuf++;
+ len--;
if ((pStartBssReq->nwType == eSIR_11G_NW_TYPE) ||
(pStartBssReq->nwType == eSIR_11N_NW_TYPE ))
{
- pStartBssReq->extendedRateSet.numRates = *pBuf++;
- len--;
palCopyMemory( pMac->hHdd, pStartBssReq->extendedRateSet.rate,
pBuf, pStartBssReq->extendedRateSet.numRates);
pBuf += pStartBssReq->extendedRateSet.numRates;
len -= pStartBssReq->extendedRateSet.numRates;
}
+ else
+ {
+ pBuf += pStartBssReq->extendedRateSet.numRates;
+ len -= pStartBssReq->extendedRateSet.numRates;
+ pStartBssReq->extendedRateSet.numRates = 0;
+ }
palCopyMemory(pMac->hHdd, &(pStartBssReq->htConfig), pBuf,
sizeof(tSirHTConfig));
@@ -1151,6 +1157,11 @@ limJoinReqSerDes(tpAniSirGlobal pMac, tpSirSmeJoinReq pJoinReq, tANI_U8 *pBuf)
if (limCheckRemainingLength(pMac, len) == eSIR_FAILURE)
return eSIR_FAILURE;
+ //MuBformee
+ pJoinReq->txMuBformee= *pBuf++;
+ len--;
+ if (limCheckRemainingLength(pMac, len) == eSIR_FAILURE)
+ return eSIR_FAILURE;
// Extract Titan CB Neighbor BSS info
pJoinReq->cbNeighbors.cbBssFoundPri = *pBuf;
diff --git a/CORE/SAP/src/sapChSelect.c b/CORE/SAP/src/sapChSelect.c
index 0e434bbc0e7a..cb44a4e5ba41 100644
--- a/CORE/SAP/src/sapChSelect.c
+++ b/CORE/SAP/src/sapChSelect.c
@@ -1068,19 +1068,30 @@ void sapSortChlWeight(tSapChSelSpectInfo *pSpectInfoParams)
IN
pSpectInfoParams: Spectrum Info params
+ startChannelNum: Allowed start channel number
+ endChannelNum: Allowed end channel number
RETURN VALUE
v_U8_t : Success - Bit mask
SIDE EFFECTS
============================================================================*/
-v_U8_t sapComputeNonOverlapChannel(tSapChSelSpectInfo* pSpectInfoParams)
+v_U8_t sapComputeNonOverlapChannel(tSapChSelSpectInfo* pSpectInfoParams,
+ v_U32_t startChannelNum, v_U32_t endChannelNum)
{
v_U8_t nonOverlap = 0;
tSapSpectChInfo *pSpectCh = NULL;
v_U8_t chn_num = 0;
pSpectCh = pSpectInfoParams->pSpectCh;
for (chn_num = 0; chn_num < (pSpectInfoParams->numSpectChans); chn_num++) {
+
+ if (startChannelNum > pSpectCh->chNum || endChannelNum < pSpectCh->chNum)
+ {
+ // Channel is not in allowed range
+ pSpectCh++;
+ continue;
+ }
+
if(pSpectCh->chNum == CHANNEL_1 || pSpectCh->chNum == CHANNEL_6 || pSpectCh->chNum == CHANNEL_11)
{
switch(pSpectCh->chNum)
@@ -1164,7 +1175,8 @@ v_U8_t sapSelectChannel(tHalHandle halHandle, ptSapContext pSapCtx, tScanResult
// Calculating the Non overlapping Channel Availability */
if(operatingBand == RF_SUBBAND_2_4_GHZ)
- nonOverlap = sapComputeNonOverlapChannel(pSpectInfoParams);
+ nonOverlap = sapComputeNonOverlapChannel(pSpectInfoParams, startChannelNum,
+ endChannelNum);
/*Loop till get the best channel in the given range */
for(count=0; count < pSpectInfoParams->numSpectChans ; count++)
diff --git a/CORE/SERVICES/BMI/ol_fw.c b/CORE/SERVICES/BMI/ol_fw.c
index c5ed54886949..25f6728ba541 100644
--- a/CORE/SERVICES/BMI/ol_fw.c
+++ b/CORE/SERVICES/BMI/ol_fw.c
@@ -721,7 +721,7 @@ int ol_download_firmware(struct ol_softc *scn)
address = BMI_SEGMENTED_WRITE_ADDR;
printk("%s: Using 0x%x for the remainder of init\n", __func__, address);
- if ( ((scn->target_version != AR6320_REV1_VERSION) || (scn->target_version != AR6320_REV1_1_VERSION)) && scn->enablesinglebinary == FALSE ) {
+ if ( scn->enablesinglebinary == FALSE ) {
status = ol_transfer_bin_file(scn, ATH_OTP_FILE,
address, TRUE);
if (status == EOK) {
diff --git a/CORE/SERVICES/COMMON/_ieee80211_common.h b/CORE/SERVICES/COMMON/_ieee80211_common.h
index 2cdab9bfd5fd..805fc5670587 100644
--- a/CORE/SERVICES/COMMON/_ieee80211_common.h
+++ b/CORE/SERVICES/COMMON/_ieee80211_common.h
@@ -235,6 +235,22 @@ enum ieee80211_scanmode {
#define IEEE80211_CHAN_ST \
(IEEE80211_CHAN_108A | IEEE80211_CHAN_STURBO)
+#define IEEE80211_IS_CHAN_11AC_2G(_c) \
+ (IEEE80211_IS_CHAN_2GHZ((_c)) && IEEE80211_IS_CHAN_VHT((_c)))
+#define IEEE80211_CHAN_11AC_VHT20_2G \
+ (IEEE80211_CHAN_2GHZ | IEEE80211_CHAN_VHT20)
+#define IEEE80211_CHAN_11AC_VHT40_2G \
+ (IEEE80211_CHAN_2GHZ | IEEE80211_CHAN_VHT40PLUS | IEEE80211_CHAN_VHT40MINUS)
+#define IEEE80211_CHAN_11AC_VHT80_2G \
+ (IEEE80211_CHAN_2GHZ | IEEE80211_CHAN_VHT80)
+
+#define IEEE80211_IS_CHAN_11AC_VHT20_2G(_c) \
+ (((_c)->ic_flags & IEEE80211_CHAN_11AC_VHT20_2G) == IEEE80211_CHAN_11AC_VHT20_2G)
+#define IEEE80211_IS_CHAN_11AC_VHT40_2G(_c) \
+ (((_c)->ic_flags & IEEE80211_CHAN_11AC_VHT40_2G) != 0)
+#define IEEE80211_IS_CHAN_11AC_VHT80_2G(_c) \
+ (((_c)->ic_flags & IEEE80211_CHAN_11AC_VHT80_2G) == IEEE80211_CHAN_11AC_VHT80_2G)
+
#define IEEE80211_CHAN_11NG_HT20 \
(IEEE80211_CHAN_2GHZ | IEEE80211_CHAN_HT20)
#define IEEE80211_CHAN_11NA_HT20 \
diff --git a/CORE/SERVICES/COMMON/adf/adf_nbuf.c b/CORE/SERVICES/COMMON/adf/adf_nbuf.c
index 1efbf3002c50..139725c0a2ec 100644
--- a/CORE/SERVICES/COMMON/adf/adf_nbuf.c
+++ b/CORE/SERVICES/COMMON/adf/adf_nbuf.c
@@ -334,6 +334,8 @@ __adf_nbuf_get_tx_cksum(struct sk_buff *skb)
/* XXX ADF and Linux checksum don't map with 1-to-1. This is not 100%
* correct. */
return ADF_NBUF_TX_CKSUM_TCP_UDP;
+ case CHECKSUM_COMPLETE:
+ return ADF_NBUF_TX_CKSUM_TCP_UDP_IP;
default:
return ADF_NBUF_TX_CKSUM_NONE;
}
diff --git a/CORE/SERVICES/COMMON/dbglog_host.h b/CORE/SERVICES/COMMON/dbglog_host.h
index c4bdfb712510..72fa54191d81 100644
--- a/CORE/SERVICES/COMMON/dbglog_host.h
+++ b/CORE/SERVICES/COMMON/dbglog_host.h
@@ -38,10 +38,13 @@ extern "C" {
#define MAX_DBG_MSGS 256
+#define CLD_NETLINK_USER 17
+
typedef enum {
DBGLOG_PROCESS_DEFAULT = 0,
DBGLOG_PROCESS_PRINT_RAW, /* print them in debug view */
DBGLOG_PROCESS_POOL_RAW, /* user buffer pool to save them */
+ DBGLOG_PROCESS_NET_RAW, /* user buffer pool to save them */
DBGLOG_PROCESS_MAX,
} dbglog_process_t;
diff --git a/CORE/SERVICES/COMMON/ol_txrx_ctrl_api.h b/CORE/SERVICES/COMMON/ol_txrx_ctrl_api.h
index bcfd53050b3c..a982759b6faa 100644
--- a/CORE/SERVICES/COMMON/ol_txrx_ctrl_api.h
+++ b/CORE/SERVICES/COMMON/ol_txrx_ctrl_api.h
@@ -832,4 +832,111 @@ u_int16_t ol_txrx_local_peer_id(ol_txrx_peer_handle peer);
#define ol_txrx_local_peer_id(peer) OL_TXRX_INVALID_LOCAL_PEER_ID
#endif
+#ifdef QCA_COMPUTE_TX_DELAY
+/**
+ * @brief updates the compute interval period for TSM stats.
+ * @details
+ * @param interval - interval for stats computation
+ */
+void
+ol_tx_set_compute_interval(
+ ol_txrx_pdev_handle pdev,
+ u_int32_t interval);
+
+/**
+ * @brief Return the uplink (transmitted) packet count and loss count.
+ * @details
+ * This function will be called for getting uplink packet count and
+ * loss count for given stream (access category) a regular interval.
+ * This also resets the counters hence, the value returned is packets
+ * counted in last 5(default) second interval. These counter are
+ * incremented per access category in ol_tx_completion_handler()
+ *
+ * @param category - access category of interest
+ * @param out_packet_count - number of packets transmitted
+ * @param out_packet_loss_count - number of packets lost
+ */
+void
+ol_tx_packet_count(
+ ol_txrx_pdev_handle pdev,
+ u_int16_t *out_packet_count,
+ u_int16_t *out_packet_loss_count,
+ int category);
+#endif
+
+/**
+ * @brief Return the average delays for tx frames.
+ * @details
+ * Return the average of the total time tx frames spend within the driver
+ * and the average time tx frames take to be transmitted.
+ * These averages are computed over a 5 second time interval.
+ * These averages are computed separately for separate access categories,
+ * if the QCA_COMPUTE_TX_DELAY_PER_AC flag is set.
+ *
+ * @param pdev - the data physical device instance
+ * @param queue_delay_microsec - average time tx frms spend in the WLAN driver
+ * @param tx_delay_microsec - average time for frames to be transmitted
+ * @param category - category (TID) of interest
+ */
+#ifdef QCA_COMPUTE_TX_DELAY
+void
+ol_tx_delay(
+ ol_txrx_pdev_handle pdev,
+ u_int32_t *queue_delay_microsec,
+ u_int32_t *tx_delay_microsec,
+ int category);
+#else
+static inline void
+ol_tx_delay(
+ ol_txrx_pdev_handle pdev,
+ u_int32_t *queue_delay_microsec,
+ u_int32_t *tx_delay_microsec,
+ int category)
+{
+ /* no-op version if QCA_COMPUTE_TX_DELAY is not set */
+ *queue_delay_microsec = *tx_delay_microsec = 0;
+}
+#endif
+
+/*
+ * Bins used for reporting delay histogram:
+ * bin 0: 0 - 10 ms delay
+ * bin 1: 10 - 20 ms delay
+ * bin 2: 20 - 40 ms delay
+ * bin 3: 40 - 80 ms delay
+ * bin 4: 80 - 160 ms delay
+ * bin 5: > 160 ms delay
+ */
+#define QCA_TX_DELAY_HIST_REPORT_BINS 6
+/**
+ * @brief Provide a histogram of tx queuing delays.
+ * @details
+ * Return a histogram showing the number of tx frames of the specified
+ * category for each of the delay levels in the histogram bin spacings
+ * listed above.
+ * These histograms are computed over a 5 second time interval.
+ * These histograms are computed separately for separate access categories,
+ * if the QCA_COMPUTE_TX_DELAY_PER_AC flag is set.
+ *
+ * @param pdev - the data physical device instance
+ * @param bin_values - an array of QCA_TX_DELAY_HIST_REPORT_BINS elements
+ * This array gets filled in with the histogram bin counts.
+ * @param category - category (TID) of interest
+ */
+#ifdef QCA_COMPUTE_TX_DELAY
+void
+ol_tx_delay_hist(ol_txrx_pdev_handle pdev, u_int16_t *bin_values,
+ int category);
+#else
+static inline void
+ol_tx_delay_hist(ol_txrx_pdev_handle pdev, u_int16_t *bin_values,
+ int category)
+{
+ /* no-op version if QCA_COMPUTE_TX_DELAY is not set */
+ adf_os_assert(bin_values);
+ adf_os_mem_zero(
+ bin_values, QCA_TX_DELAY_HIST_REPORT_BINS * sizeof(*bin_values));
+}
+#endif
+
#endif /* _OL_TXRX_CTRL_API__H_ */
diff --git a/CORE/SERVICES/COMMON/wlan_defs.h b/CORE/SERVICES/COMMON/wlan_defs.h
index d3987c6a0277..70d1ee986680 100644
--- a/CORE/SERVICES/COMMON/wlan_defs.h
+++ b/CORE/SERVICES/COMMON/wlan_defs.h
@@ -101,7 +101,6 @@ typedef enum {
((mode) == MODE_11NG_HT40))
#define IS_MODE_11GONLY(mode) ((mode) == MODE_11GONLY)
-
enum {
REGDMN_MODE_11A = 0x00001, /* 11a channels */
REGDMN_MODE_TURBO = 0x00002, /* 11a turbo-only channels */
@@ -123,6 +122,9 @@ enum {
REGDMN_MODE_11AC_VHT40PLUS = 0x40000, /* 5Ghz, VHT40 + channels */
REGDMN_MODE_11AC_VHT40MINUS = 0x80000, /* 5Ghz VHT40 - channels */
REGDMN_MODE_11AC_VHT80 = 0x100000, /* 5Ghz, VHT80 channels */
+ REGDMN_MODE_11AC_VHT20_2G = 0x200000, /* 2Ghz, VHT20 */
+ REGDMN_MODE_11AC_VHT40_2G = 0x400000, /* 2Ghz, VHT40 */
+ REGDMN_MODE_11AC_VHT80_2G = 0x800000, /* 2Ghz, VHT80 */
};
#define REGDMN_MODE_ALL (0xFFFFFFFF) /* REGDMN_MODE_ALL is defined out of the enum
@@ -438,5 +440,4 @@ struct wlan_dbg_stats {
struct wlan_dbg_peer_stats peer;
};
-
#endif /* __WLANDEFS_H__ */
diff --git a/CORE/SERVICES/COMMON/wlan_tgt_def_config.h b/CORE/SERVICES/COMMON/wlan_tgt_def_config.h
index d26f65516bad..ddc4980c5bd7 100644
--- a/CORE/SERVICES/COMMON/wlan_tgt_def_config.h
+++ b/CORE/SERVICES/COMMON/wlan_tgt_def_config.h
@@ -35,8 +35,8 @@
/*
* default limit of 8 VAPs per device.
*/
-/* Rome PRD support 5 vdevs */
-#define CFG_TGT_NUM_VDEV 4
+/* Rome PRD support 3 vdevs */
+#define CFG_TGT_NUM_VDEV 3
/*
* We would need 1 AST entry per peer. Scale it by a factor of 2 to minimize hash collisions.
@@ -74,12 +74,29 @@
* reorder buffering, PN checking need to be done in target. This determines
* maximum number of peers suported by target in offload mode
*/
-#define CFG_TGT_NUM_OFFLOAD_PEERS (CFG_TGT_NUM_PEERS + CFG_TGT_NUM_VDEV)
+
+/*
+ * The current firmware implementation requires the number of offload peers
+ * should be (number of vdevs + 1).
+
+ * The reason for this is the firmware clubbed the self peer and offload peer
+ * in the same pool. So if the firmware wanted to support n vdevs then the
+ * number of offload peer must be n+1 of which n buffers will be used for
+ * self peer and the remaining 1 is used for offload peer to support chatter
+ * mode for single STA.
+
+ * Technically the macro should be 1 however the current firmware requires n+1.
+
+ * TODO: This MACRO need to be modified in the future, if the firmware modified
+ * to allocate buffers for self peer and offload peer independently.
+ */
+
+#define CFG_TGT_NUM_OFFLOAD_PEERS (CFG_TGT_NUM_VDEV+1)
/*
* Number of reorder buffers used in offload mode
*/
-#define CFG_TGT_NUM_OFFLOAD_REORDER_BUFFS 8
+#define CFG_TGT_NUM_OFFLOAD_REORDER_BUFFS 4
/*
* keys per peer node
@@ -149,7 +166,7 @@
#define CFG_TGT_DEFAULT_TX_DBG_LOG_SIZE 1024 /* bytes */
/* target based fragment timeout and MPDU duplicate detection */
-#define CFG_TGT_DEFAULT_RX_SKIP_DEFRAG_TIMEOUT_DUP_DETECTION_CHECK 1
+#define CFG_TGT_DEFAULT_RX_SKIP_DEFRAG_TIMEOUT_DUP_DETECTION_CHECK 0
/* Default VoW configuration
*/
diff --git a/CORE/SERVICES/COMMON/wma_api.h b/CORE/SERVICES/COMMON/wma_api.h
index edfcfdb37df1..a88533e3f01a 100644
--- a/CORE/SERVICES/COMMON/wma_api.h
+++ b/CORE/SERVICES/COMMON/wma_api.h
@@ -109,6 +109,8 @@ VOS_STATUS wma_wait_for_ready_event(WMA_HANDLE handle);
int wma_cli_get_command(void *wmapvosContext, int vdev_id,
int param_id, int vpdev);
eHalStatus wma_set_htconfig(tANI_U8 vdev_id, tANI_U16 ht_capab, int value);
+eHalStatus WMA_SetCountryCode(v_VOID_t *client_ctx, tANI_U8 *countrycode);
+eHalStatus WMA_SetRegDomain(void * clientCtxt, v_REGDOMAIN_t regId);
#ifndef QCA_WIFI_ISOC
int wma_suspend_target(WMA_HANDLE handle, int disable_target_intr);
diff --git a/CORE/SERVICES/COMMON/wmi_services.h b/CORE/SERVICES/COMMON/wmi_services.h
index 4ca997614d8e..bf9da5e3b87e 100644
--- a/CORE/SERVICES/COMMON/wmi_services.h
+++ b/CORE/SERVICES/COMMON/wmi_services.h
@@ -26,10 +26,10 @@
*/
/**
- * This file defines WMI services bitmap and the set of WMI services .
- * defines macrso to set/clear/get different service bits from the bitmap.
+ * This file defines WMI services bitmap and the set of WMI services .
+ * defines macrso to set/clear/get different service bits from the bitmap.
* the service bitmap is sent up to the host via WMI_READY command.
- *
+ *
*/
#ifndef _WMI_SERVICES_H_
@@ -79,6 +79,13 @@ typedef enum {
WMI_SERVICE_AP_PS_DETECT_OUT_OF_SYNC, /* detect out-of-sync sleeping stations */
WMI_SERVICE_EARLY_RX, /* adaptive early-rx feature */
WMI_SERVICE_STA_SMPS, /* STA MIMO-PS */
+ WMI_SERVICE_FWTEST, /* Firmware test service */
+ WMI_SERVICE_STA_WMMAC, /* STA WMMAC */
+ WMI_SERVICE_TDLS, /* TDLS support */
+ WMI_SERVICE_BURST, /* SIFS spaced burst support */
+ WMI_SERVICE_MCC_BCN_INTERVAL_CHANGE, /* Dynamic beaocn interval change for SAP/P2p GO in MCC scenario */
+ WMI_SERVICE_ADAPTIVE_OCS, /* Service to support adaptive off-channel scheduler */
+ WMI_SERVICE_BA_SSN_SUPPORT, /* target will provide Sequence number for the peer/tid combo */
WMI_MAX_SERVICE=64 /* max service */
} WMI_SERVICE;
@@ -90,15 +97,15 @@ typedef enum {
*/
#define WMI_SERVICE_ENABLE(pwmi_svc_bmap,svc_id) \
( (pwmi_svc_bmap)[(svc_id)/(sizeof(A_UINT32))] |= \
- (1 << ((svc_id)%(sizeof(A_UINT32)))) )
+ (1 << ((svc_id)%(sizeof(A_UINT32)))) )
#define WMI_SERVICE_DISABLE(pwmi_svc_bmap,svc_id) \
( (pwmi_svc_bmap)[(svc_id)/(sizeof(A_UINT32))] &= \
- ( ~(1 << ((svc_id)%(sizeof(A_UINT32)))) ) )
-
+ ( ~(1 << ((svc_id)%(sizeof(A_UINT32)))) ) )
+
#define WMI_SERVICE_IS_ENABLED(pwmi_svc_bmap,svc_id) \
( ((pwmi_svc_bmap)[(svc_id)/(sizeof(A_UINT32))] & \
- (1 << ((svc_id)%(sizeof(A_UINT32)))) ) != 0)
+ (1 << ((svc_id)%(sizeof(A_UINT32)))) ) != 0)
#ifdef __cplusplus
}
diff --git a/CORE/SERVICES/COMMON/wmi_tlv_defs.h b/CORE/SERVICES/COMMON/wmi_tlv_defs.h
index 57205a264f6a..0c95b0659235 100644
--- a/CORE/SERVICES/COMMON/wmi_tlv_defs.h
+++ b/CORE/SERVICES/COMMON/wmi_tlv_defs.h
@@ -355,7 +355,30 @@ typedef enum {
WMITLV_TAG_STRUC_wmi_nlo_event,
WMITLV_TAG_STRUC_wmi_chatter_query_reply_event_fixed_param,
WMITLV_TAG_STRUC_wmi_upload_h_hdr,
- WMITLV_TAG_STRUC_wmi_capture_h_event_hdr
+ WMITLV_TAG_STRUC_wmi_capture_h_event_hdr,
+ WMITLV_TAG_STRUC_WMI_VDEV_WNM_SLEEPMODE_CMD_fixed_param,
+ WMITLV_TAG_STRUC_wmi_vdev_wmm_addts_cmd_fixed_param,
+ WMITLV_TAG_STRUC_wmi_vdev_wmm_delts_cmd_fixed_param,
+ WMITLV_TAG_STRUC_wmi_vdev_set_wmm_params_cmd_fixed_param,
+ WMITLV_TAG_STRUC_wmi_tdls_set_state_cmd_fixed_param,
+ WMITLV_TAG_STRUC_wmi_tdls_peer_update_cmd_fixed_param,
+ WMITLV_TAG_STRUC_wmi_tdls_peer_event_fixed_param,
+ WMITLV_TAG_STRUC_wmi_tdls_peer_capabilities,
+ WMITLV_TAG_STRUC_wmi_vdev_mcc_set_tbtt_mode_cmd_fixed_param,
+ WMITLV_TAG_STRUC_wmi_roam_chan_list_fixed_param,
+ WMITLV_TAG_STRUC_wmi_vdev_mcc_bcn_intvl_change_event_fixed_param,
+ WMITLV_TAG_STRUC_wmi_resmgr_adaptive_ocs_disable_cmd_fixed_param,
+ WMITLV_TAG_STRUC_wmi_resmgr_set_chan_time_quota_cmd_fixed_param,
+ WMITLV_TAG_STRUC_wmi_resmgr_set_chan_latency_cmd_fixed_param,
+ WMITLV_TAG_STRUC_wmi_ba_req_ssn_cmd_fixed_param,
+ WMITLV_TAG_STRUC_wmi_ba_rsp_ssn_event_fixed_param,
+ WMITLV_TAG_STRUC_wmi_sta_smps_force_mode_cmd_fixed_param,
+ WMITLV_TAG_STRUC_WMI_SET_MCASTBCAST_FILTER_CMD_fixed_param,
+ WMITLV_TAG_STRUC_wmi_p2p_set_oppps_cmd_fixed_param,
+ WMITLV_TAG_STRUC_wmi_p2p_set_noa_cmd_fixed_param,
+ WMITLV_TAG_STRUC_wmi_ba_req_ssn_cmd_sub_struct_param,
+ WMITLV_TAG_STRUC_wmi_ba_req_ssn_event_sub_struct_param,
+ WMITLV_TAG_STRUC_wmi_sta_smps_param_cmd_fixed_param,
} WMITLV_TAG_ID;
/*
@@ -463,8 +486,24 @@ typedef enum {
OP(WMI_CHATTER_DELETE_COALESCING_FILTER_CMDID) \
OP(WMI_CHATTER_COALESCING_QUERY_CMDID) \
OP(WMI_TXBF_CMDID) \
- OP(WMI_DBGLOG_CFG_CMDID)
-
+ OP(WMI_DBGLOG_CFG_CMDID) \
+ OP(WMI_VDEV_WNM_SLEEPMODE_CMDID) \
+ OP(WMI_VDEV_WMM_ADDTS_CMDID) \
+ OP(WMI_VDEV_WMM_DELTS_CMDID) \
+ OP(WMI_VDEV_SET_WMM_PARAMS_CMDID) \
+ OP(WMI_TDLS_SET_STATE_CMDID) \
+ OP(WMI_TDLS_PEER_UPDATE_CMDID) \
+ OP(WMI_FWTEST_VDEV_MCC_SET_TBTT_MODE_CMDID) \
+ OP(WMI_ROAM_CHAN_LIST) \
+ OP(WMI_RESMGR_ADAPTIVE_OCS_DISABLE_CMDID)\
+ OP(WMI_RESMGR_SET_CHAN_TIME_QUOTA_CMDID) \
+ OP(WMI_RESMGR_SET_CHAN_LATENCY_CMDID) \
+ OP(WMI_BA_REQ_SSN_CMDID) \
+ OP(WMI_STA_SMPS_FORCE_MODE_CMDID) \
+ OP(WMI_SET_MCASTBCAST_FILTER_CMDID) \
+ OP(WMI_P2P_SET_OPPPS_PARAM_CMDID) \
+ OP(WMI_FWTEST_P2P_SET_NOA_PARAM_CMDID) \
+ OP(WMI_STA_SMPS_PARAM_CMDID)
/*
* IMPORTANT: Please add _ALL_ WMI Events Here.
* Otherwise, these WMI TLV Functions will be process them.
@@ -508,7 +547,10 @@ typedef enum {
OP(WMI_NLO_SCAN_COMPLETE_EVENTID) \
OP(WMI_CHATTER_PC_QUERY_EVENTID) \
OP(WMI_UPLOADH_EVENTID) \
- OP(WMI_CAPTUREH_EVENTID)
+ OP(WMI_CAPTUREH_EVENTID) \
+ OP(WMI_TDLS_PEER_EVENTID) \
+ OP(WMI_VDEV_MCC_BCN_INTERVAL_CHANGE_REQ_EVENTID) \
+ OP(WMI_BA_RSP_SSN_EVENTID)
/* TLV definitions of WMI commands */
@@ -580,6 +622,12 @@ WMITLV_CREATE_PARAM_STRUC(WMI_PEER_TID_ADDBA_CMDID);
WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_STRUC_wmi_peer_tid_delba_cmd_fixed_param, wmi_peer_tid_delba_cmd_fixed_param, fixed_param, WMITLV_SIZE_FIX)
WMITLV_CREATE_PARAM_STRUC(WMI_PEER_TID_DELBA_CMDID);
+/* Peer Req Add BA Ssn for staId/tid pair Cmd */
+#define WMITLV_TABLE_WMI_BA_REQ_SSN_CMDID(id,op,buf,len) \
+ WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_STRUC_wmi_ba_req_ssn_cmd_fixed_param, wmi_ba_req_ssn_cmd_fixed_param, fixed_param, WMITLV_SIZE_FIX) \
+ WMITLV_ELEM(id,op,buf,len,WMITLV_TAG_ARRAY_STRUC, wmi_ba_req_ssn, ba_req_ssn_list, WMITLV_SIZE_VAR)
+
+WMITLV_CREATE_PARAM_STRUC(WMI_BA_REQ_SSN_CMDID);
/* PDEV FTM integration Cmd */
#define WMITLV_TABLE_WMI_PDEV_FTM_INTG_CMDID(id,op,buf,len) \
@@ -606,9 +654,11 @@ WMITLV_CREATE_PARAM_STRUC(WMI_WOW_ENABLE_CMDID);
WMITLV_CREATE_PARAM_STRUC(WMI_RMV_BCN_FILTER_CMDID);
+/** Service bit WMI_SERVICE_ROAM_OFFLOAD for Roaming feature */
/* Roam scan mode Cmd */
#define WMITLV_TABLE_WMI_ROAM_SCAN_MODE(id,op,buf,len) \
- WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_STRUC_wmi_roam_scan_mode_fixed_param, wmi_roam_scan_mode_fixed_param, fixed_param, WMITLV_SIZE_FIX)
+ WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_STRUC_wmi_roam_scan_mode_fixed_param, wmi_roam_scan_mode_fixed_param, fixed_param, WMITLV_SIZE_FIX) \
+ WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_STRUC_wmi_start_scan_cmd_fixed_param, wmi_start_scan_cmd_fixed_param, scan_params, WMITLV_SIZE_FIX)
WMITLV_CREATE_PARAM_STRUC(WMI_ROAM_SCAN_MODE);
@@ -629,6 +679,12 @@ WMITLV_CREATE_PARAM_STRUC(WMI_ROAM_SCAN_PERIOD);
WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_STRUC_wmi_roam_scan_rssi_change_threshold_fixed_param, wmi_roam_scan_rssi_change_threshold_fixed_param, fixed_param, WMITLV_SIZE_FIX)
WMITLV_CREATE_PARAM_STRUC(WMI_ROAM_SCAN_RSSI_CHANGE_THRESHOLD);
+/* Roam Scan Channel list Cmd */
+#define WMITLV_TABLE_WMI_ROAM_CHAN_LIST(id,op,buf,len) \
+ WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_STRUC_wmi_roam_chan_list_fixed_param, wmi_roam_chan_list_fixed_param, fixed_param, WMITLV_SIZE_FIX) \
+ WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_ARRAY_UINT32, A_UINT32, channel_list, WMITLV_SIZE_VAR)
+
+WMITLV_CREATE_PARAM_STRUC(WMI_ROAM_CHAN_LIST);
/* Start scan Cmd */
#define WMITLV_TABLE_WMI_START_SCAN_CMDID(id,op,buf,len) \
@@ -644,6 +700,10 @@ WMITLV_CREATE_PARAM_STRUC(WMI_START_SCAN_CMDID);
#define WMITLV_TABLE_WMI_P2P_SET_VENDOR_IE_DATA_CMDID(id,op,buf,len) \
WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_STRUC_wmi_p2p_set_vendor_ie_data_cmd_fixed_param, wmi_p2p_set_vendor_ie_data_cmd_fixed_param, fixed_param, WMITLV_SIZE_FIX)
WMITLV_CREATE_PARAM_STRUC(WMI_P2P_SET_VENDOR_IE_DATA_CMDID);
+/* P2P set OppPS parameters Cmd */
+#define WMITLV_TABLE_WMI_P2P_SET_OPPPS_PARAM_CMDID(id,op,buf,len) \
+ WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_STRUC_wmi_p2p_set_oppps_cmd_fixed_param, wmi_p2p_set_oppps_cmd_fixed_param, fixed_param, WMITLV_SIZE_FIX)
+WMITLV_CREATE_PARAM_STRUC(WMI_P2P_SET_OPPPS_PARAM_CMDID);
/* Pdev set channel Cmd */
#define WMITLV_TABLE_WMI_PDEV_SET_CHANNEL_CMDID(id,op,buf,len) \
@@ -730,6 +790,11 @@ WMITLV_CREATE_PARAM_STRUC(WMI_BCN_TMPL_CMDID);
WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_ARRAY_BYTE, A_UINT8, key_data, WMITLV_SIZE_VAR)
WMITLV_CREATE_PARAM_STRUC(WMI_VDEV_INSTALL_KEY_CMDID);
+/* VDEV WNM SLEEP MODE Cmd */
+#define WMITLV_TABLE_WMI_VDEV_WNM_SLEEPMODE_CMDID(id,op,buf,len) \
+ WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_STRUC_WMI_VDEV_WNM_SLEEPMODE_CMD_fixed_param, WMI_VDEV_WNM_SLEEPMODE_CMD_fixed_param, fixed_param, WMITLV_SIZE_FIX)
+
+WMITLV_CREATE_PARAM_STRUC(WMI_VDEV_WNM_SLEEPMODE_CMDID);
/* Peer Assoc Cmd */
#define WMITLV_TABLE_WMI_PEER_ASSOC_CMDID(id,op,buf,len) \
@@ -800,17 +865,12 @@ WMITLV_CREATE_PARAM_STRUC(WMI_WOW_ENABLE_DISABLE_WAKE_EVENT_CMDID);
/* RTT measurement request Cmd */
#define WMITLV_TABLE_WMI_RTT_MEASREQ_CMDID(id,op,buf,len) \
- WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_STRUC_wmi_rtt_measreq_head, wmi_rtt_measreq_head, fixed_param, WMITLV_SIZE_FIX) \
- WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_STRUC_wmi_channel, wmi_channel, channel, WMITLV_SIZE_FIX) \
- WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_ARRAY_STRUC, wmi_rtt_measreq_body, body, WMITLV_SIZE_VAR)
-
+ WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_ARRAY_BYTE, A_UINT8, data, WMITLV_SIZE_VAR)
WMITLV_CREATE_PARAM_STRUC(WMI_RTT_MEASREQ_CMDID);
/* RTT TSF Cmd */
#define WMITLV_TABLE_WMI_RTT_TSF_CMDID(id,op,buf,len) \
- WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_STRUC_wmi_rtt_tsf_cmd_fixed_param, wmi_rtt_tsf_cmd_fixed_param, fixed_param, WMITLV_SIZE_FIX) \
- WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_STRUC_wmi_channel, wmi_channel, channel, WMITLV_SIZE_FIX)
-
+ WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_ARRAY_BYTE, A_UINT8, data, WMITLV_SIZE_VAR)
WMITLV_CREATE_PARAM_STRUC(WMI_RTT_TSF_CMDID);
/* Spectral scan configure Cmd */
@@ -878,11 +938,25 @@ WMITLV_CREATE_PARAM_STRUC(WMI_VDEV_SET_KEEPALIVE_CMDID);
#define WMITLV_TABLE_WMI_VDEV_GET_KEEPALIVE_CMDID(id,op,buf,len) \
WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_STRUC_wmi_vdev_get_keepalive_cmd_fixed_param, wmi_vdev_get_keepalive_cmd_fixed_param, fixed_param, WMITLV_SIZE_FIX)
WMITLV_CREATE_PARAM_STRUC(WMI_VDEV_GET_KEEPALIVE_CMDID);
+/*FWTEST Set TBTT mode Cmd*/
+#define WMITLV_TABLE_WMI_FWTEST_VDEV_MCC_SET_TBTT_MODE_CMDID(id,op,buf,len) \
+ WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_STRUC_wmi_vdev_mcc_set_tbtt_mode_cmd_fixed_param, wmi_vdev_mcc_set_tbtt_mode_cmd_fixed_param, fixed_param, WMITLV_SIZE_FIX)
+WMITLV_CREATE_PARAM_STRUC(WMI_FWTEST_VDEV_MCC_SET_TBTT_MODE_CMDID);
+
+/* FWTEST set NoA parameters Cmd */
+#define WMITLV_TABLE_WMI_FWTEST_P2P_SET_NOA_PARAM_CMDID(id,op,buf,len) \
+ WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_STRUC_wmi_p2p_set_noa_cmd_fixed_param, wmi_p2p_set_noa_cmd_fixed_param, fixed_param, WMITLV_SIZE_FIX) \
+ WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_ARRAY_STRUC, wmi_p2p_noa_descriptor, noa_descriptor, WMITLV_SIZE_VAR)
+WMITLV_CREATE_PARAM_STRUC(WMI_FWTEST_P2P_SET_NOA_PARAM_CMDID);
/* Force Fw Hang Cmd */
#define WMITLV_TABLE_WMI_FORCE_FW_HANG_CMDID(id,op,buf,len) \
WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_STRUC_WMI_FORCE_FW_HANG_CMD_fixed_param, WMI_FORCE_FW_HANG_CMD_fixed_param, fixed_param, WMITLV_SIZE_FIX)
WMITLV_CREATE_PARAM_STRUC(WMI_FORCE_FW_HANG_CMDID);
+/* Set Mcast address Cmd */
+#define WMITLV_TABLE_WMI_SET_MCASTBCAST_FILTER_CMDID(id,op,buf,len) \
+ WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_STRUC_WMI_SET_MCASTBCAST_FILTER_CMD_fixed_param, WMI_SET_MCASTBCAST_FILTER_CMD_fixed_param, fixed_param, WMITLV_SIZE_FIX)
+WMITLV_CREATE_PARAM_STRUC(WMI_SET_MCASTBCAST_FILTER_CMDID);
/* GPIO config Cmd */
#define WMITLV_TABLE_WMI_GPIO_CONFIG_CMDID(id,op,buf,len) \
@@ -1144,6 +1218,71 @@ WMITLV_CREATE_PARAM_STRUC(WMI_TXBF_CMDID);
WMITLV_CREATE_PARAM_STRUC(WMI_DBGLOG_CFG_CMDID);
+#define WMITLV_TABLE_WMI_VDEV_WMM_ADDTS_CMDID(id,op,buf,len) \
+ WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_STRUC_wmi_vdev_wmm_addts_cmd_fixed_param, wmi_vdev_wmm_addts_cmd_fixed_param, fixed_param, WMITLV_SIZE_FIX)
+
+WMITLV_CREATE_PARAM_STRUC(WMI_VDEV_WMM_ADDTS_CMDID);
+
+#define WMITLV_TABLE_WMI_VDEV_WMM_DELTS_CMDID(id,op,buf,len) \
+ WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_STRUC_wmi_vdev_wmm_delts_cmd_fixed_param, wmi_vdev_wmm_delts_cmd_fixed_param, fixed_param, WMITLV_SIZE_FIX)
+
+WMITLV_CREATE_PARAM_STRUC(WMI_VDEV_WMM_DELTS_CMDID);
+
+#define WMITLV_TABLE_WMI_VDEV_SET_WMM_PARAMS_CMDID(id,op,buf,len) \
+ WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_STRUC_wmi_vdev_set_wmm_params_cmd_fixed_param, wmi_vdev_set_wmm_params_cmd_fixed_param, fixed_param, WMITLV_SIZE_FIX)
+
+WMITLV_CREATE_PARAM_STRUC(WMI_VDEV_SET_WMM_PARAMS_CMDID);
+
+/* TDLS Enable/Disable Cmd */
+#define WMITLV_TABLE_WMI_TDLS_SET_STATE_CMDID(id,op,buf,len) \
+ WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_STRUC_wmi_tdls_set_state_cmd_fixed_param, \
+ wmi_tdls_set_state_cmd_fixed_param, fixed_param, WMITLV_SIZE_FIX)
+
+WMITLV_CREATE_PARAM_STRUC(WMI_TDLS_SET_STATE_CMDID);
+
+/* TDLS Peer Update Cmd */
+#define WMITLV_TABLE_WMI_TDLS_PEER_UPDATE_CMDID(id,op,buf,len) \
+ WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_STRUC_wmi_tdls_peer_update_cmd_fixed_param, wmi_tdls_peer_update_cmd_fixed_param, fixed_param, WMITLV_SIZE_FIX) \
+ WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_STRUC_wmi_tdls_peer_capabilities, wmi_tdls_peer_capabilities, peer_caps, WMITLV_SIZE_FIX)
+
+WMITLV_CREATE_PARAM_STRUC(WMI_TDLS_PEER_UPDATE_CMDID);
+
+/* Resmgr Disable Adaptive OCS CMD */
+#define WMITLV_TABLE_WMI_RESMGR_ADAPTIVE_OCS_DISABLE_CMDID(id,op,buf,len) \
+ WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_STRUC_wmi_resmgr_adaptive_ocs_disable_cmd_fixed_param, \
+ wmi_resmgr_adaptive_ocs_disable_cmd_fixed_param, fixed_param, WMITLV_SIZE_FIX)
+
+WMITLV_CREATE_PARAM_STRUC(WMI_RESMGR_ADAPTIVE_OCS_DISABLE_CMDID);
+
+/* Resmgr Set Channel Time Quota CMD */
+#define WMITLV_TABLE_WMI_RESMGR_SET_CHAN_TIME_QUOTA_CMDID(id,op,buf,len) \
+ WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_STRUC_wmi_resmgr_set_chan_time_quota_cmd_fixed_param, \
+ wmi_resmgr_set_chan_time_quota_cmd_fixed_param, fixed_param, WMITLV_SIZE_FIX) \
+ WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_ARRAY_BYTE, A_UINT8, data, WMITLV_SIZE_VAR)
+
+WMITLV_CREATE_PARAM_STRUC(WMI_RESMGR_SET_CHAN_TIME_QUOTA_CMDID);
+
+/* Resmgr Set Channel Latency CMD */
+#define WMITLV_TABLE_WMI_RESMGR_SET_CHAN_LATENCY_CMDID(id,op,buf,len) \
+ WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_STRUC_wmi_resmgr_set_chan_latency_cmd_fixed_param, \
+ wmi_resmgr_set_chan_latency_cmd_fixed_param, fixed_param, WMITLV_SIZE_FIX) \
+ WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_ARRAY_BYTE, A_UINT8, data, WMITLV_SIZE_VAR)
+
+WMITLV_CREATE_PARAM_STRUC(WMI_RESMGR_SET_CHAN_LATENCY_CMDID);
+
+/* STA SMPS Force Mode CMD */
+#define WMITLV_TABLE_WMI_STA_SMPS_FORCE_MODE_CMDID(id,op,buf,len) \
+ WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_STRUC_wmi_sta_smps_force_mode_cmd_fixed_param, \
+ wmi_sta_smps_force_mode_cmd_fixed_param, fixed_param, WMITLV_SIZE_FIX)
+
+WMITLV_CREATE_PARAM_STRUC(WMI_STA_SMPS_FORCE_MODE_CMDID);
+
+/* STA SMPS Param CMD */
+#define WMITLV_TABLE_WMI_STA_SMPS_PARAM_CMDID(id,op,buf,len) \
+ WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_STRUC_wmi_sta_smps_param_cmd_fixed_param, \
+ wmi_sta_smps_param_cmd_fixed_param, fixed_param, WMITLV_SIZE_FIX)
+
+WMITLV_CREATE_PARAM_STRUC(WMI_STA_SMPS_PARAM_CMDID);
/************************** TLV definitions of WMI events *******************************/
@@ -1224,6 +1363,12 @@ WMITLV_CREATE_PARAM_STRUC(WMI_TX_DELBA_COMPLETE_EVENTID);
WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_STRUC_wmi_tx_addba_complete_event_fixed_param, wmi_tx_addba_complete_event_fixed_param, fixed_param, WMITLV_SIZE_FIX)
WMITLV_CREATE_PARAM_STRUC(WMI_TX_ADDBA_COMPLETE_EVENTID);
+/* ADD BA Req ssn Event */
+#define WMITLV_TABLE_WMI_BA_RSP_SSN_EVENTID(id,op,buf,len) \
+ WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_STRUC_wmi_ba_rsp_ssn_event_fixed_param, wmi_ba_rsp_ssn_event_fixed_param, fixed_param, WMITLV_SIZE_FIX) \
+ WMITLV_ELEM(id, op, buf, len, WMITLV_TAG_ARRAY_STRUC, wmi_ba_event_ssn, ba_event_ssn_list, WMITLV_SIZE_VAR)
+
+WMITLV_CREATE_PARAM_STRUC(WMI_BA_RSP_SSN_EVENTID);
/* Roam Event */
#define WMITLV_TABLE_WMI_ROAM_EVENTID(id,op,buf,len) \
WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_STRUC_wmi_roam_event_fixed_param, wmi_roam_event_fixed_param, fixed_param, WMITLV_SIZE_FIX)
@@ -1240,9 +1385,8 @@ WMITLV_CREATE_PARAM_STRUC(WMI_ROAM_EVENTID);
WMITLV_CREATE_PARAM_STRUC(WMI_WOW_WAKEUP_HOST_EVENTID);
/* RTT error report Event */
-#define WMITLV_TABLE_WMI_RTT_ERROR_REPORT_EVENTID(id,op,buf,len) \
- WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_STRUC_wmi_rtt_event_header, wmi_rtt_event_hdr, rtt_hdr, WMITLV_SIZE_FIX) \
- WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_STRUC_wmi_rtt_error_report_event_fixed_param, wmi_rtt_error_report_event_fixed_param, fixed_param, WMITLV_SIZE_FIX)
+#define WMITLV_TABLE_WMI_RTT_ERROR_REPORT_EVENTID(id,op,buf,len) \
+ WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_ARRAY_BYTE, A_UINT8, data, WMITLV_SIZE_VAR)
WMITLV_CREATE_PARAM_STRUC(WMI_RTT_ERROR_REPORT_EVENTID);
/* Echo Event */
@@ -1306,7 +1450,6 @@ WMITLV_CREATE_PARAM_STRUC(WMI_DEBUG_PRINT_EVENTID);
/* RTT measurement report Event */
#define WMITLV_TABLE_WMI_RTT_MEASUREMENT_REPORT_EVENTID(id,op,buf,len) \
- WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_STRUC_wmi_rtt_event_header, wmi_rtt_event_hdr, rtt_hdr, WMITLV_SIZE_FIX) \
WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_ARRAY_BYTE, A_UINT8, data, WMITLV_SIZE_VAR)
WMITLV_CREATE_PARAM_STRUC(WMI_RTT_MEASUREMENT_REPORT_EVENTID);
@@ -1366,6 +1509,15 @@ WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_ARRAY_BYTE, A_UINT8, bufp, WMITLV_SIZE_VAR
#define WMITLV_TABLE_WMI_CAPTUREH_EVENTID(id,op,buf,len) \
WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_STRUC_wmi_capture_h_event_hdr, wmi_capture_h_event_hdr, fixed_param, WMITLV_SIZE_FIX)
WMITLV_CREATE_PARAM_STRUC(WMI_CAPTUREH_EVENTID);
+/* TDLS Peer Update event */
+#define WMITLV_TABLE_WMI_TDLS_PEER_EVENTID(id,op,buf,len) \
+WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_STRUC_wmi_tdls_peer_event_fixed_param, wmi_tdls_peer_event_fixed_param, fixed_param, WMITLV_SIZE_FIX)
+ WMITLV_CREATE_PARAM_STRUC(WMI_TDLS_PEER_EVENTID);
+
+/* VDEV MCC Beacon Interval Change Request Event */
+#define WMITLV_TABLE_WMI_VDEV_MCC_BCN_INTERVAL_CHANGE_REQ_EVENTID(id,op,buf,len) \
+ WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_STRUC_wmi_vdev_mcc_bcn_intvl_change_event_fixed_param, wmi_vdev_mcc_bcn_intvl_change_event_fixed_param, fixed_param, WMITLV_SIZE_FIX)
+WMITLV_CREATE_PARAM_STRUC(WMI_VDEV_MCC_BCN_INTERVAL_CHANGE_REQ_EVENTID);
#ifdef __cplusplus
}
diff --git a/CORE/SERVICES/COMMON/wmi_unified.h b/CORE/SERVICES/COMMON/wmi_unified.h
index 0442cc6aa096..9969323b5d60 100644
--- a/CORE/SERVICES/COMMON/wmi_unified.h
+++ b/CORE/SERVICES/COMMON/wmi_unified.h
@@ -162,6 +162,9 @@ typedef enum {
WMI_GRP_MISC,
WMI_GRP_GPIO,
WMI_GRP_FWTEST,
+ WMI_GRP_TDLS,
+ WMI_GRP_RESMGR,
+ WMI_GRP_STA_SMPS,
} WMI_GRP_ID;
#define WMI_CMD_GRP_START_ID(grp_id) (((grp_id) << 12) | 0x1)
@@ -248,6 +251,7 @@ typedef enum {
WMI_VDEV_WNM_SLEEPMODE_CMDID,
WMI_VDEV_WMM_ADDTS_CMDID,
WMI_VDEV_WMM_DELTS_CMDID,
+ WMI_VDEV_SET_WMM_PARAMS_CMDID,
/* peer specific commands */
@@ -329,6 +333,8 @@ typedef enum {
WMI_ROAM_SCAN_RSSI_CHANGE_THRESHOLD,
/** set roam AP profile */
WMI_ROAM_AP_PROFILE,
+ /** set channel list for roam scans */
+ WMI_ROAM_CHAN_LIST,
/** offload scan specific commands */
/** set offload scan AP profile */
@@ -358,6 +364,8 @@ typedef enum {
WMI_P2P_DISC_OFFLOAD_APPIE_CMDID,
/** set the BSSID/device name pattern of p2p find offload */
WMI_P2P_DISC_OFFLOAD_PATTERN_CMDID,
+ /** set OppPS related parameters **/
+ WMI_P2P_SET_OPPPS_PARAM_CMDID,
/** AP power save specific config */
/** set AP power save specific param */
@@ -452,6 +460,8 @@ typedef enum {
/** Configure the Keep Alive Parameters */
WMI_STA_KEEPALIVE_CMDID,
+ /* Request ssn from target for a sta/tid pair */
+ WMI_BA_REQ_SSN_CMDID,
/* misc command group */
/** echo command mainly used for testing */
WMI_ECHO_CMDID=WMI_CMD_GRP_START_ID(WMI_GRP_MISC),
@@ -477,6 +487,8 @@ typedef enum {
WMI_VDEV_GET_KEEPALIVE_CMDID,
/* For fw recovery test command */
WMI_FORCE_FW_HANG_CMDID,
+ /* Set Mcast/Bdcast filter */
+ WMI_SET_MCASTBCAST_FILTER_CMDID,
/* GPIO Configuration */
WMI_GPIO_CONFIG_CMDID=WMI_CMD_GRP_START_ID(WMI_GRP_GPIO),
@@ -487,6 +499,30 @@ typedef enum {
/* FWTEST Commands */
WMI_FWTEST_VDEV_MCC_SET_TBTT_MODE_CMDID=WMI_CMD_GRP_START_ID(WMI_GRP_FWTEST),
+ /** set NoA descs **/
+ WMI_FWTEST_P2P_SET_NOA_PARAM_CMDID,
+
+ /** TDLS Configuration */
+ /** enable/disable TDLS */
+ WMI_TDLS_SET_STATE_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_TDLS),
+ /** set tdls peer state */
+ WMI_TDLS_PEER_UPDATE_CMDID,
+
+ /** Resmgr Configuration */
+ /** Adaptive OCS is enabled by default in the FW. This command is used to
+ * disable FW based adaptive OCS.
+ */
+ WMI_RESMGR_ADAPTIVE_OCS_DISABLE_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_RESMGR),
+ /** set the requested channel time quota for the home channels */
+ WMI_RESMGR_SET_CHAN_TIME_QUOTA_CMDID,
+ /** set the requested latency for the home channels */
+ WMI_RESMGR_SET_CHAN_LATENCY_CMDID,
+
+ /** STA SMPS Configuration */
+ /** force SMPS mode */
+ WMI_STA_SMPS_FORCE_MODE_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_STA_SMPS),
+ /** set SMPS parameters */
+ WMI_STA_SMPS_PARAM_CMDID,
} WMI_CMD_ID;
typedef enum {
@@ -519,6 +555,11 @@ typedef enum {
* peer unicast and per vdev multicast)
* operation has completed */
WMI_VDEV_INSTALL_KEY_COMPLETE_EVENTID,
+ /* NOTE: WMI_VDEV_MCC_BCN_INTERVAL_CHANGE_REQ_EVENTID would be deprecated. Please
+ don't use this for any new implementations */
+ /* Firmware requests dynamic change to a specific beacon interval for a specific vdev ID in MCC scenario.
+ This request is valid only for vdevs operating in soft AP or P2P GO mode */
+ WMI_VDEV_MCC_BCN_INTERVAL_CHANGE_REQ_EVENTID,
/* peer specific events */
/** FW reauet to kick out the station for reasons like inactivity,lack of response ..etc */
@@ -543,6 +584,8 @@ typedef enum {
*WMI_PEER_TID_ADDBA_CMDID(initiator) */
WMI_TX_ADDBA_COMPLETE_EVENTID,
+ /* Seq num returned from hw for a sta/tid pair */
+ WMI_BA_RSP_SSN_EVENTID,
/** Roam event to trigger roaming on host */
WMI_ROAM_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_ROAM),
@@ -574,7 +617,7 @@ typedef enum {
/** GTK offload stautus event requested by host */
WMI_GTK_OFFLOAD_STATUS_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_GTK_OFL),
-
+
/** GTK offload failed to rekey event */
WMI_GTK_REKEY_FAIL_EVENTID,
/* CSA IE received event */
@@ -629,8 +672,17 @@ typedef enum {
* to indicate captured H info to host
*/
WMI_CAPTUREH_EVENTID,
+ /* TDLS Event */
+ WMI_TDLS_PEER_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_TDLS),
} WMI_EVT_ID;
+#define WMI_OEM_DATA_REQ_CMDID WMI_RTT_MEASREQ_CMDID
+#define WMI_OEM_DATA_RSP_EVENTID WMI_RTT_MEASUREMENT_REPORT_EVENTID
+#define WMI_OEM_DATA_ERROR_REPORT_EVENTID WMI_RTT_ERROR_REPORT_EVENTID
+#define WMI_OEM_DATA_RSP_EVENTID_param_tlvs \
+ WMI_RTT_MEASUREMENT_REPORT_EVENTID_param_tlvs
+#define WMI_OEM_DATA_ERROR_REPORT_EVENTID_param_tlvs \
+ WMI_RTT_ERROR_REPORT_EVENTID_param_tlvs
#define WMI_CHAN_LIST_TAG 0x1
#define WMI_SSID_LIST_TAG 0x2
@@ -844,6 +896,20 @@ typedef struct {
*/
} wmi_service_ready_event_fixed_param;
+#ifdef ROME_LTE_COEX_FREQ_AVOID
+typedef struct {
+ A_UINT32 start_freq; //start frequency, not channel center freq
+ A_UINT32 end_freq;//end frequency
+}avoid_freq_range_desc;
+
+typedef struct {
+ //bad channel range count, multi range is allowed, 0 means all channel clear
+ A_UINT32 num_freq_ranges;
+ //multi range with num_freq_ranges, LTE advance multi carrier, CDMA,etc
+ avoid_freq_range_desc avd_freq_range[0];
+}wmi_wlan_avoid_freq_ranges_event;
+#endif
+
/** status consists of upper 16 bits fo A_STATUS status and lower 16 bits of module ID that retuned status */
#define WLAN_INIT_STATUS_SUCCESS 0x0
#define WLAN_INIT_STATUS_GEN_FAILED 0x1
@@ -1065,6 +1131,23 @@ typedef struct {
*/
A_UINT32 max_frag_entries;
+ /**
+ * @brief num_tdls_vdevs - Max. number of vdevs that can support TDLS
+ * @brief num_msdu_desc - Number of vdev that can support beacon offload
+ */
+
+ A_UINT32 num_tdls_vdevs; /* number of vdevs allowed to do tdls */
+
+ /**
+ * @brief num_tdls_conn_table_entries - Number of peers tracked by tdls vdev
+ * @details
+ * Each TDLS enabled vdev can track outgoing transmits/rssi/rates to/of
+ * peers in a connection tracking table for possible TDLS link creation
+ * or deletion. This controls the number of tracked peers per vdev.
+ */
+ A_UINT32 num_tdls_conn_table_entries; /* number of peers to track per TDLS vdev */
+ A_UINT32 beacon_tx_offload_max_vdev;
+ A_UINT32 num_multicast_filter_entries;
} wmi_resource_config;
@@ -1390,7 +1473,7 @@ typedef struct {
* descriptor up to the host.
*/
/* ATH_MAX_ANTENNA value (4) can't be changed without breaking the compatibility */
-#define ATH_MAX_ANTENNA 4 /* To support 4 chains */
+#define ATH_MAX_ANTENNA 4 /* To support beelinear, which is up to 4 chains */
typedef struct {
A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_mgmt_rx_hdr */
/** channel on which this frame is received. */
@@ -2026,6 +2109,10 @@ typedef enum {
WMI_PDEV_PARAM_POWER_GATING_SLEEP,
/** Enable/Disable Rfkill */
WMI_PDEV_PARAM_RFKILL_ENABLE,
+ /** Set Bursting DUR */
+ WMI_PDEV_PARAM_BURST_DUR,
+ /** Set Bursting ENABLE */
+ WMI_PDEV_PARAM_BURST_ENABLE,
} WMI_PDEV_PARAM;
typedef enum {
@@ -2294,11 +2381,6 @@ typedef struct {
A_UINT32 no_ack;
} wmi_wmm_params;
-enum wmm_ac_downgrade_policy {
- WMM_AC_DOWNGRADE_DEPRIO,
- WMM_AC_DOWNGRADE_DROP,
-};
-
typedef struct {
A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_set_wmm_params_cmd_fixed_param */
A_UINT32 reserved0; /** placeholder for pdev_id of future multiple MAC products. Init. to 0. */
@@ -2355,6 +2437,8 @@ typedef struct {
/** number of peer stats event structures (wmi_peer_stats) 0 or max peers */
A_UINT32 num_peer_stats;
A_UINT32 num_bcnflt_stats;
+ /** number of chan stats event structures (wmi_chan_stats) 0 to MAX MCC CHANS */
+ A_UINT32 num_chan_stats;
/* This TLV is followed by another TLV of array of bytes
* A_UINT8 data[];
* This data array contains
@@ -2362,6 +2446,7 @@ typedef struct {
* num_vdev_stats * size of(struct wmi_vdev_stats)
* num_peer_stats * size of(struct wmi_peer_stats)
* num_bcnflt_stats * size_of()
+ * num_chan_stats * size of(struct wmi_chan_stats)
*
*/
} wmi_stats_event_fixed_param;
@@ -2439,6 +2524,19 @@ typedef struct {
} wmi_peer_stats;
typedef struct {
+ /** Primary channel freq of the channel for which stats are sent */
+ A_UINT32 chan_mhz;
+ /** Time spent on the channel */
+ A_UINT32 sampling_period_us;
+ /** Aggregate duration over a sampling period for which channel activity was observed */
+ A_UINT32 rx_clear_count;
+ /** Accumalation of the TX PPDU duration over a sampling period */
+ A_UINT32 tx_duration_us;
+ /** Accumalation of the RX PPDU duration over a sampling period */
+ A_UINT32 rx_duration_us;
+} wmi_chan_stats;
+
+typedef struct {
A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_create_cmd_fixed_param */
/** unique id identifying the VDEV, generated by the caller */
A_UINT32 vdev_id;
@@ -2789,6 +2887,8 @@ typedef enum {
/* set the count of snr value for calculation in snr monitor */
WMI_VDEV_PARAM_SNR_NUM_FOR_CAL,
+ /** Roaming offload */
+ WMI_VDEV_PARAM_ROAM_FW_OFFLOAD,
} WMI_VDEV_PARAM;
enum wmi_pkt_type {
@@ -3089,6 +3189,20 @@ typedef struct {
* (see enum wmi_sta_ps_param_uapsd)
*/
WMI_STA_PS_PARAM_UAPSD = 4,
+ /**
+ * Number of PS-Poll to send before STA wakes up in QPower Mode
+ */
+ WMI_STA_PS_PARAM_QPOWER_PSPOLL_COUNT = 5,
+
+ /**
+ * Enable QPower
+ */
+ WMI_STA_PS_ENABLE_QPOWER = 6,
+
+ /**
+ * Disable QPower
+ */
+ WMI_STA_PS_DISABLE_QPOWER = 7,
};
typedef struct {
@@ -3571,6 +3685,21 @@ typedef struct {
/* set group membership status */
#define WMI_PEER_MEMBERSHIP 0x7
#define WMI_PEER_USERPOS 0x8
+/*
+ * A critical high-level protocol is being used with this peer. Target
+ * should take appropriate measures (if possible) to ensure more
+ * reliable link with minimal latency. This *may* include modifying the
+ * station power save policy, enabling more RX chains, increased
+ * priority of channel scheduling, etc.
+ *
+ * NOTE: This parameter should only be considered a hint as specific
+ * behavior will depend on many factors including current network load
+ * and vdev/peer configuration.
+ *
+ * For STA VDEV this peer corresponds to the AP's BSS peer.
+ * For AP VDEV this peer corresponds to the remote peer STA.
+ */
+#define WMI_PEER_CRIT_PROTO_HINT_ENABLED 0x9
/** mimo ps values for the parameter WMI_PEER_MIMO_PS_STATE */
#define WMI_PEER_MIMO_PS_NONE 0x0
@@ -3652,6 +3781,7 @@ typedef struct {
#define WMI_RC_HT_FLAG 0x08 /* HT */
#define WMI_RC_RTSCTS_FLAG 0x10 /* RTS-CTS */
#define WMI_RC_TX_STBC_FLAG 0x20 /* TX STBC */
+#define WMI_RC_TX_STBC_FLAG_S 5 /* TX STBC */
#define WMI_RC_RX_STBC_FLAG 0xC0 /* RX STBC ,2 bits */
#define WMI_RC_RX_STBC_FLAG_S 6 /* RX STBC ,2 bits */
#define WMI_RC_WEP_TKIP_FLAG 0x100 /* WEP/TKIP encryption */
@@ -3881,6 +4011,7 @@ typedef struct{
typedef struct {
A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_scan_mode_fixed_param */
A_UINT32 roam_scan_mode;
+ A_UINT32 vdev_id;
} wmi_roam_scan_mode_fixed_param;
#define WMI_ROAM_SCAN_MODE_NONE 0x0
@@ -3899,6 +4030,8 @@ typedef struct {
A_UINT32 vdev_id;
/** roam scan rssi threshold */
A_UINT32 roam_scan_rssi_thresh;
+ /** When using Hw generated beacon RSSI interrupts */
+ A_UINT32 roam_rssi_thresh_diff;
} wmi_roam_scan_rssi_threshold_fixed_param;
/**
@@ -3911,6 +4044,8 @@ typedef struct {
A_UINT32 vdev_id;
/** roam scan period value */
A_UINT32 roam_scan_period;
+ /** Aging for Roam scans */
+ A_UINT32 roam_scan_age;
} wmi_roam_scan_period_fixed_param;
/**
@@ -3925,8 +4060,30 @@ typedef struct {
A_UINT32 vdev_id;
/** roam scan rssi change threshold value */
A_UINT32 roam_scan_rssi_change_thresh;
+ /** When using Hw generated beacon RSSI interrupts */
+ A_UINT32 bcn_rssi_weight;
} wmi_roam_scan_rssi_change_threshold_fixed_param;
+#define WMI_ROAM_SCAN_CHAN_LIST_TYPE_NONE 0x1
+#define WMI_ROAM_SCAN_CHAN_LIST_TYPE_STATIC 0x2
+#define WMI_ROAM_SCAN_CHAN_LIST_TYPE_DYNAMIC 0x3
+/**
+ * TLV for roaming channel list
+ */
+typedef struct {
+ A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_chan_list_fixed_param */
+ /** unique id identifying the VDEV, generated by the caller */
+ A_UINT32 vdev_id;
+ /** WMI_CHAN_LIST_TAG */
+ A_UINT32 chan_list_type;
+ /** # if channels to scan */
+ A_UINT32 num_chan;
+/**
+ * TLV (tag length value ) parameters follow the wmi_roam_chan_list
+ * structure. The TLV's are:
+ * A_UINT32 channel_list[];
+ **/
+} wmi_roam_chan_list_fixed_param;
/** Authentication modes */
enum {
@@ -4228,6 +4385,39 @@ typedef struct {
*/
}wmi_p2p_disc_offload_config_cmd;
+/*----P2P OppPS definition ----*/
+typedef struct {
+ /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_p2p_set_oppps_cmd_fixed_param */
+ A_UINT32 tlv_header;
+ /* unique id identifying the VDEV, generated by the caller */
+ A_UINT32 vdev_id;
+ /* OppPS attributes */
+ /** Bit 0: Indicate enable/disable of OppPS
+ * Bits 7-1: Ctwindow in TUs
+ * Bits 31-8: Reserved
+ */
+ A_UINT32 oppps_attr;
+} wmi_p2p_set_oppps_cmd_fixed_param;
+
+#define WMI_UNIFIED_OPPPS_ATTR_ENALBED 0x1
+#define WMI_UNIFIED_OPPPS_ATTR_ENALBED_S 0
+
+#define WMI_UNIFIED_OPPPS_ATTR_IS_ENABLED(hdr) \
+ WMI_F_MS((hdr)->oppps_attr, WMI_UNIFIED_OPPPS_ATTR_ENALBED)
+
+#define WMI_UNIFIED_OPPPS_ATTR_ENABLED_SET(hdr) \
+ WMI_F_RMW((hdr)->oppps_attr, 0x1, \
+ WMI_UNIFIED_OPPPS_ATTR_ENALBED);
+
+#define WMI_UNIFIED_OPPPS_ATTR_CTWIN 0xfe
+#define WMI_UNIFIED_OPPPS_ATTR_CTWIN_S 1
+
+#define WMI_UNIFIED_OPPPS_ATTR_CTWIN_GET(hdr) \
+ WMI_F_MS((hdr)->oppps_attr, WMI_UNIFIED_OPPPS_ATTR_CTWIN)
+
+#define WMI_UNIFIED_OPPPS_ATTR_CTWIN_SET(hdr, v) \
+ WMI_F_RMW((hdr)->oppps_attr, (v) & 0x7f, \
+ WMI_UNIFIED_OPPPS_ATTR_CTWIN);
/*----RTT Report event definition ----*/
typedef enum {
RTT_COMMAND_HEADER_ERROR = 0, //rtt cmd header parsing error --terminate
@@ -4768,6 +4958,74 @@ typedef struct {
/** Event status */
A_UINT32 status;
} wmi_tx_delba_complete_event_fixed_param;
+/*
+ * Structure to request sequence numbers for a given
+ * peer station on different TIDs. The TIDs are
+ * indicated in the tidBitMap, tid 0 would
+ * be represented by LSB bit 0. tid 1 would be
+ * represented by LSB bit 1 etc.
+ * The target will retrieve the current sequence
+ * numbers for the peer on all the TIDs requested
+ * and send back a response in a WMI event.
+ */
+typedef struct
+{
+ A_UINT32 tlv_header; /* TLV tag and len; tag equals
+ WMITLV_TAG_STRUC_wmi_ba_req_ssn_cmd_sub_struct_param */
+ wmi_mac_addr peer_macaddr;
+ A_UINT32 tidBitmap;
+} wmi_ba_req_ssn;
+
+typedef struct {
+ A_UINT32 tlv_header; /* TLV tag and len; tag equals
+ WMITLV_TAG_STRUC_wmi_ba_req_ssn_cmd_fixed_param */
+ /** unique id identifying the VDEV, generated by the caller */
+ A_UINT32 vdev_id;
+ /** Number of requested SSN In the TLV wmi_ba_req_ssn[] */
+ A_UINT32 num_ba_req_ssn;
+/* Following this struc are the TLV's:
+ * wmi_ba_req_ssn ba_req_ssn_list; All peer and tidBitMap for which the ssn is requested
+ */
+} wmi_ba_req_ssn_cmd_fixed_param;
+
+/*
+ * Max transmit categories
+ *
+ * Note: In future if we need to increase WMI_MAX_TC definition
+ * It would break the compatibility for WMI_BA_RSP_SSN_EVENTID.
+ */
+#define WMI_MAX_TC 8
+
+/*
+ * Structure to send response sequence numbers
+ * for a give peer and tidmap.
+ */
+typedef struct
+{
+ A_UINT32 tlv_header; /* TLV tag and len; tag equals
+ WMITLV_TAG_STRUC_wmi_ba_req_ssn_event_sub_struct_param */
+ wmi_mac_addr peer_macaddr;
+ /* A boolean to indicate if ssn is present */
+ A_UINT32 ssn_present_for_tid[WMI_MAX_TC];
+ /* The ssn from target, valid only if
+ * ssn_present_for_tid[tidn] equals 1
+ */
+ A_UINT32 ssn_for_tid[WMI_MAX_TC];
+} wmi_ba_event_ssn;
+
+typedef struct {
+ A_UINT32 tlv_header; /* TLV tag and len; tag equals
+ WMITLV_TAG_STRUC_wmi_ba_rsp_ssn_event_fixed_param */
+ /** unique id identifying the VDEV, generated by the caller */
+ A_UINT32 vdev_id;
+ /** Event status, success or failure of the overall operation */
+ A_UINT32 status;
+ /** Number of requested SSN In the TLV wmi_ba_req_ssn[] */
+ A_UINT32 num_ba_event_ssn;
+/* Following this struc are the TLV's:
+ * wmi_ba_event_ssn ba_event_ssn_list; All peer and tidBitMap for which the ssn is requested
+ */
+} wmi_ba_rsp_ssn_event_fixed_param;
typedef struct {
A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_install_key_complete_event_fixed_param */
@@ -4834,12 +5092,19 @@ typedef struct wmi_nlo_auth_param
A_UINT32 valid;
A_UINT32 auth_type;
} wmi_nlo_auth_param;
+/* NOTE: wmi_nlo_rssi_param structure can't be changed without breaking the compatibility */
+typedef struct wmi_nlo_rssi_param
+{
+ A_UINT32 valid;
+ A_INT32 rssi;
+} wmi_nlo_rssi_param;
typedef struct nlo_configured_parameters {
A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_nlo_configured_parameters */
wmi_nlo_ssid_param ssid;
wmi_nlo_enc_param enc_type;
wmi_nlo_auth_param auth_type;
+ wmi_nlo_rssi_param rssi_cond;
} nlo_configured_parameters;
typedef struct wmi_nlo_config {
@@ -4873,9 +5138,9 @@ typedef struct wmi_nlo_event
#define GTK_OFFLOAD_OPCODE_MASK 0xFF000000
/** Enable GTK offload, and provided parameters KEK,KCK and replay counter values */
#define GTK_OFFLOAD_ENABLE_OPCODE 0x01000000
-/** Disable GTK offload */
+/** Disable GTK offload */
#define GTK_OFFLOAD_DISABLE_OPCODE 0x02000000
-/** Read GTK offload parameters, generates WMI_GTK_OFFLOAD_STATUS_EVENT */
+/** Read GTK offload parameters, generates WMI_GTK_OFFLOAD_STATUS_EVENT */
#define GTK_OFFLOAD_REQUEST_STATUS_OPCODE 0x04000000
enum wmi_chatter_mode {
/* Chatter enter/exit happens
@@ -5031,9 +5296,11 @@ typedef struct {
} WMI_STA_KEEPALIVE_CMD_fixed_param;
typedef struct {
+ A_UINT32 tlv_header;
A_UINT32 vdev_id;
- A_UINT32 action; /* time interval in seconds */
-} WMI_STA_WNMSLEEP_CMD;
+ A_UINT32 action;
+} WMI_VDEV_WNM_SLEEPMODE_CMD_fixed_param;
+typedef WMI_VDEV_WNM_SLEEPMODE_CMD_fixed_param WMI_STA_WNMSLEEP_CMD;
typedef struct {
A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_set_keepalive_cmd_fixed_param */
@@ -5055,10 +5322,26 @@ typedef struct {
} wmi_vdev_get_keepalive_event_fixed_param;
typedef struct {
+ A_UINT32 tlv_header;
A_UINT32 vdev_id;
A_UINT32 mcc_tbttmode;
wmi_mac_addr mcc_bssid;
-} wmi_vdev_mcc_set_tbtt_mode_cmd;
+} wmi_vdev_mcc_set_tbtt_mode_cmd_fixed_param;
+
+typedef struct {
+ /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_p2p_set_noa_cmd_fixed_param */
+ A_UINT32 tlv_header;
+ /* unique id identifying the VDEV, generated by the caller */
+ A_UINT32 vdev_id;
+ /* enable/disable NoA */
+ A_UINT32 enable;
+ /** number of NoA desc. In the TLV noa_descriptor[] */
+ A_UINT32 num_noa;
+ /**
+ * TLV (tag length value ) paramerters follow the pattern structure.
+ * TLV contain NoA desc with num of num_noa
+ */
+} wmi_p2p_set_noa_cmd_fixed_param;
typedef enum {
RECOVERY_SIM_ASSERT = 0x01,
@@ -5075,6 +5358,15 @@ typedef struct {
A_UINT32 type; /*0:unused 1: ASSERT, 2: not respond detect command,3: simulate ep-full(),4:...*/
A_UINT32 delay_time_ms; /*0xffffffff means the simulate will delay for random time (0 ~0xffffffff ms)*/
}WMI_FORCE_FW_HANG_CMD_fixed_param;
+#define WMI_MCAST_FILTER_SET 1
+#define WMI_MCAST_FILTER_DELETE 2
+typedef struct {
+ A_UINT32 tlv_header;
+ A_UINT32 vdev_id;
+ A_UINT32 index;
+ A_UINT32 action;
+ wmi_mac_addr mcastbdcastaddr;
+} WMI_SET_MCASTBCAST_FILTER_CMD_fixed_param;
/* GPIO Command and Event data structures */
@@ -5211,20 +5503,44 @@ typedef struct {
/** Reserved for future use */
A_UINT32 reserved0;
} wmi_gtk_rekey_fail_event_fixed_param;
+enum wmm_ac_downgrade_policy {
+ WMM_AC_DOWNGRADE_DEPRIO,
+ WMM_AC_DOWNGRADE_DROP,
+ WMM_AC_DOWNGRADE_INVALID,
+};
+
+typedef struct {
+ A_UINT32 tlv_header;
+ A_UINT32 cwmin;
+ A_UINT32 cwmax;
+ A_UINT32 aifs;
+ A_UINT32 txoplimit;
+ A_UINT32 acm;
+ A_UINT32 no_ack;
+} wmi_wmm_vparams;
+
+typedef struct {
+ A_UINT32 tlv_header;
+ A_UINT32 vdev_id;
+ wmi_wmm_vparams wmm_params[4]; /* 0 be, 1 bk, 2 vi, 3 vo */
+} wmi_vdev_set_wmm_params_cmd_fixed_param;
typedef struct
{
+ A_UINT32 tlv_header;
A_UINT32 vdev_id;
- A_UINT32 ts_ac; /* Raw number 0~3, fro AC0~AC3 */
- A_UINT32 medium_time; /* per second unit, the Admitted time granted */
-} wmi_vdev_wmm_addts_cmd;
+ A_UINT32 ac;
+ A_UINT32 medium_time_us; /* per second unit, the Admitted time granted, unit in micro seconds */
+ A_UINT32 downgrade_type;
+} wmi_vdev_wmm_addts_cmd_fixed_param;
typedef struct
{
+ A_UINT32 tlv_header;
A_UINT32 vdev_id;
- A_UINT32 ts_ac; /* Raw number 0~3, fro AC0~AC3 */
-} wmi_vdev_wmm_delts_cmd;
+ A_UINT32 ac;
+} wmi_vdev_wmm_delts_cmd_fixed_param;
typedef struct {
A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_dfs_enable_cmd_fixed_param */
@@ -5237,6 +5553,292 @@ typedef struct {
/** Reserved for future use */
A_UINT32 reserved0;
} wmi_pdev_dfs_disable_cmd_fixed_param;
+/** TDLS COMMANDS */
+
+/* WMI_TDLS_SET_STATE_CMDID */
+/* TDLS State */
+enum wmi_tdls_state {
+ /** TDLS disable */
+ WMI_TDLS_DISABLE,
+ /** TDLS enabled - no firmware connection tracking/notifications */
+ WMI_TDLS_ENABLE_PASSIVE,
+ /** TDLS enabled - with firmware connection tracking/notifications */
+ WMI_TDLS_ENABLE_ACTIVE,
+};
+
+/* TDLS Options */
+#define WMI_TDLS_OFFCHAN_EN (1 << 0) /** TDLS Off Channel support */
+#define WMI_TDLS_BUFFER_STA_EN (1 << 1) /** TDLS Buffer STA support */
+#define WMI_TDLS_SLEEP_STA_EN (1 << 2) /** TDLS Sleep STA support (not currently supported) */
+
+typedef struct {
+ /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_tdls_set_state_cmd_fixed_param */
+ A_UINT32 tlv_header;
+ /** unique id identifying the VDEV */
+ A_UINT32 vdev_id;
+ /** Enable/Disable TDLS (wmi_tdls_state) */
+ A_UINT32 state;
+ /** Duration (in ms) over which to calculate tx threshold and rate values */
+ A_UINT32 notification_interval_ms;
+ /** bytes per second value OVER which notify/suggest TDLS Discovery:
+ * if current tx bps counter / notification interval >= threshold
+ * then a notification will be sent to host to advise TDLS Discovery */
+ A_UINT32 tx_discovery_threshold;
+ /** bytes per second value UNDER which notify/suggest TDLS Teardown:
+ * if current tx bps counter / notification interval < threshold
+ * then a notification will be sent to host to advise TDLS Tear down */
+ A_UINT32 tx_teardown_threshold;
+ /** Absolute RSSI value over which notify/suggest TDLS Teardown */
+ A_UINT32 rssi_teardown_threshold;
+ /** RSSI delta vs AP RSSI value over which to trigger a teardown */
+ A_UINT32 rssi_delta;
+ /** TDLS Option Control
+ * Off-Channel, Buffer STA, (later)Sleep STA support */
+ A_UINT32 tdls_options;
+} wmi_tdls_set_state_cmd_fixed_param;
+
+/* WMI_TDLS_PEER_UPDATE_CMDID */
+
+enum wmi_tdls_peer_state {
+ /** tx peer TDLS link setup now starting, traffic to DA should be
+ * paused (except TDLS frames) until state is moved to CONNECTED (or
+ * TEARDOWN on setup failure) */
+ WMI_TDLS_PEER_STATE_PEERING,
+ /** tx peer TDLS link established, running (all traffic to DA unpaused) */
+ WMI_TDLS_PEER_STATE_CONNECTED,
+ /** tx peer TDLS link tear down started (link paused, any frames
+ * queued for DA will be requeued back through the AP)*/
+ WMI_TDLS_PEER_STATE_TEARDOWN,
+};
+
+/* NB: These defines are fixed, and cannot be changed without breaking WMI compatibility */
+#define WMI_TDLS_MAX_SUPP_CHANNELS 128
+#define WMI_TDLS_MAX_SUPP_OPER_CLASSES 32
+typedef struct {
+ /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_tdls_peer_capabilities */
+ A_UINT32 tlv_header;
+ /* Peer's QoS Info - for U-APSD */
+ /* AC FLAGS - accessed through macros below */
+ /* Ack, SP, More Data Ack - accessed through macros below */
+ A_UINT32 peer_qos;
+ /*TDLS Peer's U-APSD Buffer STA Support*/
+ A_UINT32 buff_sta_support;
+ /*TDLS off channel related params */
+ A_UINT32 off_chan_support;
+ A_UINT32 peer_curr_operclass;
+ A_UINT32 self_curr_operclass;
+ A_UINT32 peer_chan_len;
+ A_UINT8 peer_chan[WMI_TDLS_MAX_SUPP_CHANNELS];
+ A_UINT32 peer_operclass_len;
+ A_UINT8 peer_operclass[WMI_TDLS_MAX_SUPP_OPER_CLASSES];
+} wmi_tdls_peer_capabilities;
+
+#define WMI_TDLS_QOS_VO_FLAG 0
+#define WMI_TDLS_QOS_VI_FLAG 1
+#define WMI_TDLS_QOS_BK_FLAG 2
+#define WMI_TDLS_QOS_BE_FLAG 3
+#define WMI_TDLS_QOS_ACK_FLAG 4
+#define WMI_TDLS_QOS_SP_FLAG 5
+#define WMI_TDLS_QOS_MOREDATA_FLAG 7
+
+#define WMI_TDLS_SET_QOS_FLAG(ppeer_caps,flag) do { \
+ (ppeer_caps)->peer_qos |= (1 << flag); \
+ } while(0)
+#define WMI_TDLS_GET_QOS_FLAG(ppeer_caps,flag) \
+ (((ppeer_caps)->peer_qos & (1 << flag)) >> flag)
+
+#define WMI_SET_TDLS_VO_UAPSD(ppeer_caps) \
+ WMI_TDLS_SET_QOS_FLAG(ppeer_caps, WMI_TDLS_QOS_VO_FLAG)
+#define WMI_GET_TDLS_VO_UAPSD(ppeer_caps) \
+ WMI_TDLS_GET_QOS_FLAG(ppeer_caps, WMI_TDLS_QOS_VO_FLAG)
+#define WMI_SET_TDLS_VI_UAPSD(ppeer_caps) \
+ WMI_TDLS_SET_QOS_FLAG(ppeer_caps, WMI_TDLS_QOS_VI_FLAG)
+#define WMI_GET_TDLS_VI_UAPSD(ppeer_caps) \
+ WMI_TDLS_GET_QOS_FLAG(ppeer_caps, WMI_TDLS_QOS_VI_FLAG)
+#define WMI_SET_TDLS_BK_UAPSD(ppeer_caps) \
+ WMI_TDLS_SET_QOS_FLAG(ppeer_caps, WMI_TDLS_QOS_BK_FLAG)
+#define WMI_GET_TDLS_BK_UAPSD(ppeer_caps) \
+ WMI_TDLS_GET_QOS_FLAG(ppeer_caps, WMI_TDLS_QOS_BK_FLAG)
+#define WMI_SET_TDLS_BE_UAPSD(ppeer_caps) \
+ WMI_TDLS_SET_QOS_FLAG(ppeer_caps, WMI_TDLS_QOS_BE_FLAG)
+#define WMI_GET_TDLS_BE_UAPSD(ppeer_caps) \
+ WMI_TDLS_GET_QOS_FLAG(ppeer_caps, WMI_TDLS_QOS_BE_FLAG)
+#define WMI_SET_TDLS_ACK_UAPSD(ppeer_caps) \
+ WMI_TDLS_SET_QOS_FLAG(ppeer_caps, WMI_TDLS_QOS_ACK_FLAG)
+#define WMI_GET_TDLS_ACK_UAPSD(ppeer_caps) \
+ WMI_TDLS_GET_QOS_FLAG(ppeer_caps, WMI_TDLS_QOS_ACK_FLAG)
+/* SP has 2 bits */
+#define WMI_SET_TDLS_SP_UAPSD(ppeer_caps,val) do { \
+ (ppeer_caps)->peer_qos |= (((val)&0x3) << WMI_TDLS_QOS_SP_FLAG); \
+ } while(0)
+#define WMI_GET_TDLS_SP_UAPSD(ppeer_caps) \
+ (((ppeer_caps)->peer_qos & (0x3 << WMI_TDLS_QOS_SP_FLAG)) >> WMI_TDLS_QOS_SP_FLAG)
+
+#define WMI_SET_TDLS_MORE_DATA_ACK_UAPSD(ppeer_caps) \
+ WMI_TDLS_SET_QOS_FLAG(ppeer_caps, WMI_TDLS_QOS_MOREDATA_FLAG)
+#define WMI_GET_TDLS_MORE_DATA_ACK_UAPSD(ppeer_caps) \
+ WMI_TDLS_GET_QOS_FLAG(ppeer_caps, WMI_TDLS_QOS_MOREDATA_FLAG)
+
+
+typedef struct {
+ /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_tdls_peer_update_cmd_fixed_param */
+ A_UINT32 tlv_header;
+ /** unique id identifying the VDEV */
+ A_UINT32 vdev_id;
+ /** peer MAC address */
+ wmi_mac_addr peer_macaddr;
+ /** new TDLS state for peer (wmi_tdls_peer_state) */
+ A_UINT32 peer_state;
+ /* The TLV for wmi_tdls_peer_capabilities will follow.
+ * wmi_tdls_peer_capabilities peer_caps;
+ */
+} wmi_tdls_peer_update_cmd_fixed_param;
+
+/** TDLS EVENTS */
+enum wmi_tdls_peer_notification {
+ /** tdls discovery recommended for peer (based
+ * on tx bytes per second > tx_discover threshold) */
+ WMI_TDLS_SHOULD_DISCOVER,
+ /** tdls link tear down recommended for peer
+ * due to tx bytes per second below tx_teardown_threshold
+ * NB: this notification sent once */
+ WMI_TDLS_SHOULD_TEARDOWN,
+ /** tx peer TDLS link tear down complete */
+ WMI_TDLS_PEER_DISCONNECTED,
+};
+
+enum wmi_tdls_peer_reason {
+ /** tdls teardown recommended due to low transmits */
+ WMI_TDLS_TEARDOWN_REASON_TX,
+ /** tdls link tear down recommended due to poor RSSI */
+ WMI_TDLS_TEARDOWN_REASON_RSSI,
+ /** tdls link tear down recommended due to offchannel scan */
+ WMI_TDLS_TEARDOWN_REASON_SCAN,
+ /** tdls peer disconnected due to peer deletion */
+ WMI_TDLS_DISCONNECTED_REASON_PEER_DELETE,
+};
+
+/* WMI_TDLS_PEER_EVENTID */
+typedef struct {
+ /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_tdls_peer_event_fixed_param */
+ A_UINT32 tlv_header;
+ /** peer MAC address */
+ wmi_mac_addr peer_macaddr;
+ /** TDLS peer status (wmi_tdls_peer_notification)*/
+ A_UINT32 peer_status;
+ /** TDLS peer reason (wmi_tdls_peer_reason) */
+ A_UINT32 peer_reason;
+ /** unique id identifying the VDEV */
+ A_UINT32 vdev_id;
+} wmi_tdls_peer_event_fixed_param;
+
+/* NOTE: wmi_vdev_mcc_bcn_intvl_change_event_fixed_param would be deprecated. Please
+ don't use this for any new implementations */
+typedef struct {
+ A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_mcc_bcn_intvl_change_event_fixed_param */
+ /** unique id identifying the VDEV, generated by the caller */
+ A_UINT32 vdev_id;
+ /* New beacon interval to be used for the specified VDEV suggested by firmware */
+ A_UINT32 new_bcn_intvl;
+} wmi_vdev_mcc_bcn_intvl_change_event_fixed_param;
+
+/* WMI_RESMGR_ADAPTIVE_OCS_DISABLE_CMDID */
+typedef struct {
+ /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_resmgr_adaptive_ocs_disable_cmd_fixed_param */
+ A_UINT32 tlv_header;
+ A_UINT32 reserved0;
+} wmi_resmgr_adaptive_ocs_disable_cmd_fixed_param;
+
+/* WMI_RESMGR_SET_CHAN_TIME_QUOTA_CMDID */
+typedef struct {
+ /* Frequency of the channel for which the quota is set */
+ A_UINT32 chan_mhz;
+ /* Requested channel time quota expressed as percentage */
+ A_UINT32 channel_time_quota;
+} wmi_resmgr_chan_time_quota;
+
+typedef struct {
+ /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_resmgr_set_chan_time_quota_cmd_fixed_param */
+ A_UINT32 tlv_header;
+ /** number of channel time quota command structures
+ * (wmi_resmgr_chan_time_quota) 1 or 2
+ */
+ A_UINT32 num_chans;
+/* This TLV is followed by another TLV of array of bytes
+ * A_UINT8 data[];
+ * This data array contains
+ * num_chans * size of(struct wmi_resmgr_chan_time_quota)
+ */
+} wmi_resmgr_set_chan_time_quota_cmd_fixed_param;
+
+/* WMI_RESMGR_SET_CHAN_LATENCY_CMDID */
+typedef struct {
+ /* Frequency of the channel for which the latency is set */
+ A_UINT32 chan_mhz;
+ /* Requested channel latency in milliseconds */
+ A_UINT32 latency;
+} wmi_resmgr_chan_latency;
+
+typedef struct {
+ /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_resmgr_set_chan_latency_cmd_fixed_param */
+ A_UINT32 tlv_header;
+ /** number of channel latency command structures
+ * (wmi_resmgr_chan_latency) 1 or 2
+ */
+ A_UINT32 num_chans;
+/* This TLV is followed by another TLV of array of bytes
+ * A_UINT8 data[];
+ * This data array contains
+ * num_chans * size of(struct wmi_resmgr_chan_latency)
+ */
+} wmi_resmgr_set_chan_latency_cmd_fixed_param;
+
+/* WMI_STA_SMPS_FORCE_MODE_CMDID */
+
+/** STA SMPS Forced Mode */
+typedef enum {
+ WMI_SMPS_FORCED_MODE_NONE = 0,
+ WMI_SMPS_FORCED_MODE_DISABLED,
+ WMI_SMPS_FORCED_MODE_STATIC,
+ WMI_SMPS_FORCED_MODE_DYNAMIC
+} wmi_sta_smps_forced_mode;
+
+typedef struct {
+ /** TLV tag and len; tag equals
+ * WMITLV_TAG_STRUC_wmi_sta_smps_force_mode_cmd_fixed_param */
+ A_UINT32 tlv_header;
+ /** Unique id identifying the VDEV */
+ A_UINT32 vdev_id;
+ /** The mode of SMPS that is to be forced in the FW. */
+ A_UINT32 forced_mode;
+} wmi_sta_smps_force_mode_cmd_fixed_param;
+
+/** WMI_STA_SMPS_PARAM_CMDID */
+typedef enum {
+ /** RSSI threshold to enter Dynamic SMPS mode from inactive mode */
+ WMI_STA_SMPS_PARAM_UPPER_RSSI_THRESH = 0,
+ /** RSSI threshold to enter Stalled-D-SMPS mode from D-SMPS mode or
+ * to enter D-SMPS mode from Stalled-D-SMPS mode */
+ WMI_STA_SMPS_PARAM_STALL_RSSI_THRESH = 1,
+ /** RSSI threshold to disable SMPS modes */
+ WMI_STA_SMPS_PARAM_LOWER_RSSI_THRESH = 2,
+ /** Upper threshold for beacon-RSSI. Used to reduce RX chainmask. */
+ WMI_STA_SMPS_PARAM_UPPER_BRSSI_THRESH = 3,
+ /** Lower threshold for beacon-RSSI. Used to increase RX chainmask. */
+ WMI_STA_SMPS_PARAM_LOWER_BRSSI_THRESH = 4
+} wmi_sta_smps_param;
+
+typedef struct {
+ /** TLV tag and len; tag equals
+ * WMITLV_TAG_STRUC_wmi_sta_smps_param_cmd_fixed_param */
+ A_UINT32 tlv_header;
+ /** Unique id identifying the VDEV */
+ A_UINT32 vdev_id;
+ /** SMPS parameter (see wmi_sta_smps_param) */
+ A_UINT32 param;
+ /** Value of SMPS parameter */
+ A_UINT32 value;
+} wmi_sta_smps_param_cmd_fixed_param;
#ifdef __cplusplus
}
diff --git a/CORE/SERVICES/COMMON/wmi_version.h b/CORE/SERVICES/COMMON/wmi_version.h
index dc3773410d19..ef8b4f7ac988 100644
--- a/CORE/SERVICES/COMMON/wmi_version.h
+++ b/CORE/SERVICES/COMMON/wmi_version.h
@@ -36,7 +36,7 @@
#define __WMI_VER_MINOR_ 0
/** WMI revision number has to be incremented when there is a
* change that may or may not break compatibility. */
-#define __WMI_REVISION_ 0
+#define __WMI_REVISION_ 12
/** The Version Namespace should not be normally changed. Only
* host and firmware of the same WMI namespace will work
diff --git a/CORE/SERVICES/HIF/PCIe/hif_pci.c b/CORE/SERVICES/HIF/PCIe/hif_pci.c
index 217d47ba1b36..485ce8837a41 100644
--- a/CORE/SERVICES/HIF/PCIe/hif_pci.c
+++ b/CORE/SERVICES/HIF/PCIe/hif_pci.c
@@ -2130,10 +2130,16 @@ HIF_PCIDeviceProbed(hif_handle_t hif_hdl)
AR_DEBUG_PRINTF(ATH_DEBUG_INFO, ("ath: HIF_PCIDeviceProbed get chip id val (%d)\n", rv));
goto done;
}
- if (CHIP_ID_VERSION_GET(chip_id) == 0xD && ((CHIP_ID_REVISION_GET(chip_id) == 0x0) || (CHIP_ID_REVISION_GET(chip_id) == 0x1))) {
+ if (CHIP_ID_VERSION_GET(chip_id) == 0xD) {
/* for ROME 1.0, 3 banks are switched to IRAM */
AR_DEBUG_PRINTF(ATH_DEBUG_WARN, ("chip ver=0x%x, chip rev=0x%x\n", CHIP_ID_VERSION_GET(chip_id), CHIP_ID_REVISION_GET(chip_id)));
- banks_switched = 3;
+ if (CHIP_ID_REVISION_GET(chip_id) == 0x0) {
+ /* for ROME 1.0, 3 banks are switched to IRAM */
+ banks_switched = 3 ;
+ } else if (CHIP_ID_REVISION_GET(chip_id) == 0x1) {
+ /* for ROME 1.1, 2 banks are switched to IRAM */
+ banks_switched = 2 ;
+ }
}
ealloc_value |= ((banks_switched << HI_EARLY_ALLOC_IRAM_BANKS_SHIFT) & HI_EARLY_ALLOC_IRAM_BANKS_MASK);
}
diff --git a/CORE/SERVICES/HIF/PCIe/if_pci.c b/CORE/SERVICES/HIF/PCIe/if_pci.c
index 127c5cae36cc..5a63f151b500 100644
--- a/CORE/SERVICES/HIF/PCIe/if_pci.c
+++ b/CORE/SERVICES/HIF/PCIe/if_pci.c
@@ -555,15 +555,15 @@ again:
}
#ifndef REMOVE_PKT_LOG
-#ifndef QCA_WIFI_FTM
- /*
- * pktlog initialization
- */
- ol_pl_sethandle(&ol_sc->pdev_txrx_handle->pl_dev, ol_sc);
+ if (vos_get_conparam() != VOS_FTM_MODE) {
+ /*
+ * pktlog initialization
+ */
+ ol_pl_sethandle(&ol_sc->pdev_txrx_handle->pl_dev, ol_sc);
- if (pktlogmod_init(ol_sc))
- printk(KERN_ERR "%s: pktlogmod_init failed\n", __func__);
-#endif
+ if (pktlogmod_init(ol_sc))
+ printk(KERN_ERR "%s: pktlogmod_init failed\n", __func__);
+ }
#endif
#ifdef WLAN_BTAMP_FEATURE
@@ -847,9 +847,8 @@ hif_pci_remove(struct pci_dev *pdev)
scn = sc->ol_sc;
#ifndef REMOVE_PKT_LOG
-#ifndef QCA_WIFI_FTM
- pktlogmod_exit(scn);
-#endif
+ if (vos_get_conparam() != VOS_FTM_MODE)
+ pktlogmod_exit(scn);
#endif
__hdd_wlan_exit();
diff --git a/CORE/SERVICES/HIF/ath_procfs.c b/CORE/SERVICES/HIF/ath_procfs.c
index 26c4d7a37656..e827c7a5c65c 100644
--- a/CORE/SERVICES/HIF/ath_procfs.c
+++ b/CORE/SERVICES/HIF/ath_procfs.c
@@ -43,12 +43,10 @@
*/
static struct proc_dir_entry *proc_file, *proc_dir;
-static ssize_t
-ath_procfs_diag_read(char *buffer, char **buffer_location,
- off_t offset, int count,
- int *eof, void *data)
+static ssize_t ath_procfs_diag_read(struct file *file, char __user *buf,
+ size_t count, loff_t *pos)
{
- struct hif_pci_softc *scn = (struct hif_pci_softc *)data;
+ struct hif_pci_softc *scn;
int rv;
A_UINT8 *read_buffer = NULL;
@@ -58,22 +56,25 @@ ath_procfs_diag_read(char *buffer, char **buffer_location,
return -EINVAL;
}
- pr_debug("rd buff 0x%p cnt %d off 0x%x data %p\n",
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,10,0))
+ scn = (struct hif_pci_softc *)PDE_DATA(file_inode(file));
+#else
+ scn = (struct hif_pci_softc *)(PDE(file->f_path.dentry->d_inode)->data);
+#endif
+ pr_debug("rd buff 0x%p cnt %d offset 0x%x buf 0x%p\n",
read_buffer,count,
- (int)offset, data);
- if ((count == 4) && (((A_UINT32)offset & 3) == 0)) {
+ (int)*pos, buf);
+
+ if ((count == 4) && ((((A_UINT32)(*pos)) & 3) == 0)) {
/* reading a word? */
- rv = HIFDiagReadAccess(scn->ol_sc->hif_hdl,
- (A_UINT32)offset,
- (A_UINT32 *)read_buffer);
+ rv = HIFDiagReadAccess(scn->ol_sc->hif_hdl, (A_UINT32)(*pos),
+ (A_UINT32 *)read_buffer);
} else {
- rv = HIFDiagReadMem(scn->ol_sc->hif_hdl,
- (A_UINT32)offset,
- (A_UINT8 *)read_buffer,
- count);
+ rv = HIFDiagReadMem(scn->ol_sc->hif_hdl, (A_UINT32)(*pos),
+ (A_UINT8 *)read_buffer, count);
}
- if(copy_to_user(buffer, read_buffer, count)) {
+ if(copy_to_user(buf, read_buffer, count)) {
vos_mem_free(read_buffer);
return -EFAULT;
} else
@@ -86,42 +87,41 @@ ath_procfs_diag_read(char *buffer, char **buffer_location,
}
}
-static int
-ath_procfs_diag_write(struct file *file, const char *buffer,
- unsigned long count, void *data)
+static ssize_t ath_procfs_diag_write(struct file *file, const char __user *buf,
+ size_t count, loff_t *pos)
{
- struct hif_pci_softc *scn = (struct hif_pci_softc *)data;
+ struct hif_pci_softc *scn;
int rv;
- A_UINT32 *addbuff = (A_UINT32 *)buffer;
- A_UINT32 addr = *addbuff;
- A_UINT8 *write_buffer = NULL, *fbuf = NULL;
+ A_UINT8 *write_buffer = NULL;
write_buffer = (A_UINT8 *)vos_mem_malloc(count);
if (NULL == write_buffer) {
pr_debug("%s: vos_mem_alloc failed\n", __func__);
return -EINVAL;
}
- if(copy_from_user(write_buffer, buffer, count))
+ if(copy_from_user(write_buffer, buf, count))
return -EFAULT;
- fbuf = write_buffer;
- write_buffer += sizeof(A_UINT32);
- count -= sizeof(A_UINT32);
- pr_debug("wr buff 0x%p addr 0x%x len %lu data %p\n",
- write_buffer, addr, count, data);
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,10,0))
+ scn = (struct hif_pci_softc *)PDE_DATA(file_inode(file));
+#else
+ scn = (struct hif_pci_softc *)(PDE(file->f_path.dentry->d_inode)->data);
+#endif
+ pr_debug("wr buff 0x%p buf 0x%p cnt %d offset 0x%x value 0x%x\n",
+ write_buffer, buf, (int)count,
+ (int)*pos, *((A_UINT32 *)write_buffer));
- if ((count == 4) && ((addr & 3) == 0)) {
- /*reading a word?*/
+ if ((count == 4) && ((((A_UINT32)(*pos)) & 3) == 0)) {
+ /* reading a word? */
A_UINT32 value = *((A_UINT32 *)write_buffer);
rv = HIFDiagWriteAccess(scn->ol_sc->hif_hdl,
- (A_UINT32)(*addbuff), value);
+ (A_UINT32)(*pos), value);
} else {
- rv = HIFDiagWriteMem(scn->ol_sc->hif_hdl,
- (A_UINT32)(*addbuff),
+ rv = HIFDiagWriteMem(scn->ol_sc->hif_hdl, (A_UINT32)(*pos),
(A_UINT8 *)write_buffer, count);
}
- vos_mem_free(fbuf);
+ vos_mem_free(write_buffer);
if (rv == 0) {
return count;
} else {
@@ -129,6 +129,11 @@ ath_procfs_diag_write(struct file *file, const char *buffer,
}
}
+static const struct file_operations athdiag_fops = {
+ .read = ath_procfs_diag_read,
+ .write = ath_procfs_diag_write,
+};
+
/**
*This function is called when the module is loaded
*
@@ -143,8 +148,9 @@ int athdiag_procfs_init(struct hif_pci_softc *scn)
return -ENOMEM;
}
- /* create the /proc file */
- proc_file = create_proc_entry(PROCFS_NAME, 0666, proc_dir);
+ proc_file = proc_create_data(PROCFS_NAME,
+ S_IALLUGO, proc_dir,
+ &athdiag_fops, (void *)scn);
if (proc_file == NULL) {
remove_proc_entry(PROCFS_NAME, proc_dir);
pr_debug("Error: Could not initialize /proc/%s\n",
@@ -152,17 +158,6 @@ int athdiag_procfs_init(struct hif_pci_softc *scn)
return -ENOMEM;
}
- proc_file->read_proc = ath_procfs_diag_read;
- proc_file->write_proc = ath_procfs_diag_write;
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,31)
- proc_file->owner = THIS_MODULE;
-#endif
- proc_file->mode = S_IFREG | S_IRUGO;
- proc_file->uid = 0;
- proc_file->gid = 0;
- proc_file->size = 37;
- proc_file->data = (void *)scn;
-
pr_debug("/proc/%s/%s created\n", PROCFS_DIR, PROCFS_NAME);
return 0; /* everything is ok */
}
diff --git a/CORE/SERVICES/WMA/inc/legacy/halMsgApi.h b/CORE/SERVICES/WMA/inc/legacy/halMsgApi.h
index 9b56c2ac1290..79d2d491a33a 100644
--- a/CORE/SERVICES/WMA/inc/legacy/halMsgApi.h
+++ b/CORE/SERVICES/WMA/inc/legacy/halMsgApi.h
@@ -189,7 +189,7 @@ typedef struct
// FIXME
//Add these fields to message
tANI_U8 us32MaxAmpduDuration; //in units of 32 us.
- tANI_U8 maxAmpduSize; // 0 : 8k , 1 : 16k, 2 : 32k, 3 : 64k
+ tANI_U8 maxAmpduSize; // 0 : 8k , 1 : 16k, 2 : 32k, 3 : 64k, 4 : 128k
tANI_U8 maxAmpduDensity; // 3 : 0~7 : 2^(11nAMPDUdensity -4)
tANI_U8 maxAmsduSize; // 1 : 3839 bytes, 0 : 7935 bytes
@@ -284,6 +284,7 @@ typedef struct
tANI_U8 vhtCapable;
tANI_U8 vhtTxChannelWidthSet;
tANI_U8 vhtTxBFCapable;
+ tANI_U8 vhtTxMUBformeeCapable;
#endif
tANI_U8 htLdpcCapable;
@@ -679,11 +680,19 @@ typedef struct {
#ifdef FEATURE_OEM_DATA_SUPPORT
#ifndef OEM_DATA_REQ_SIZE
+#ifdef QCA_WIFI_2_0
+#define OEM_DATA_REQ_SIZE 276
+#else
#define OEM_DATA_REQ_SIZE 134
#endif
+#endif
#ifndef OEM_DATA_RSP_SIZE
+#ifdef QCA_WIFI_2_0
+#define OEM_DATA_RSP_SIZE 1720
+#else
#define OEM_DATA_RSP_SIZE 1968
#endif
+#endif
typedef struct
{
@@ -960,7 +969,10 @@ typedef struct
tANI_U16 tspecIdx; //TSPEC handler uniquely identifying a TSPEC for a STA in a BSS
tSirMacTspecIE tspec;
eHalStatus status;
- tANI_U8 sessionId; //PE session id for PE<->HAL interface
+ tANI_U8 sessionId; //PE session id for PE<->HAL interface
+#ifdef FEATURE_WLAN_CCX
+ tANI_U16 tsm_interval; // TSM interval period passed from lim to wma
+#endif
} tAddTsParams, *tpAddTsParams;
typedef struct
diff --git a/CORE/SERVICES/WMA/regdomain.c b/CORE/SERVICES/WMA/regdomain.c
index 8d88c4cc1aa4..452392eba2a0 100644
--- a/CORE/SERVICES/WMA/regdomain.c
+++ b/CORE/SERVICES/WMA/regdomain.c
@@ -68,19 +68,22 @@
#include <adf_os_types.h>
#include "regdomain.h"
#include "regdomain_common.h"
+#include "wma.h"
#define N(a) (sizeof(a)/sizeof(a[0]))
+
/*
* By default, the regdomain tables reference the common tables
* from regdomain_common.h. These default tables can be replaced
* by calls to populate_regdomain_tables functions.
*/
-
HAL_REG_DMN_TABLES ol_regdmn_Rdt = {
ahCmnRegDomainPairs, /* regDomainPairs */
ahCmnAllCountries, /* allCountries */
+ ahCmnRegDomains, /* allRegDomains */
N(ahCmnRegDomainPairs), /* regDomainPairsCt */
N(ahCmnAllCountries), /* allCountriesCt */
+ N(ahCmnRegDomains), /* allRegDomainCt */
};
static u_int16_t get_eeprom_rd(u_int16_t rd)
@@ -165,6 +168,17 @@ static const REG_DMN_PAIR_MAPPING *get_regdmn_pair(u_int16_t reg_dmn)
return NULL;
}
+static const REG_DOMAIN *get_regdmn(u_int16_t reg_dmn)
+{
+ int32_t i;
+
+ for (i = 0; i < ol_regdmn_Rdt.regDomainsCt; i++) {
+ if (ol_regdmn_Rdt.regDomains[i].regDmnEnum == reg_dmn)
+ return &ol_regdmn_Rdt.regDomains[i];
+ }
+ return NULL;
+}
+
static const COUNTRY_CODE_TO_ENUM_RD *get_country_from_rd(u_int16_t regdmn)
{
int32_t i;
@@ -227,3 +241,214 @@ int32_t regdmn_get_country_alpha2(u_int16_t rd, u_int8_t *alpha2)
return 0;
}
+
+/*
+ * Returns regulatory domain for given country string
+ */
+int32_t regdmn_get_regdmn_for_country(u_int8_t *alpha2)
+{
+ u_int8_t i;
+
+ for (i = 0; i < ol_regdmn_Rdt.allCountriesCt; i++) {
+ if ((ol_regdmn_Rdt.allCountries[i].isoName[0] == alpha2[0]) &&
+ (ol_regdmn_Rdt.allCountries[i].isoName[1] == alpha2[1]))
+ return ol_regdmn_Rdt.allCountries[i].regDmnEnum;
+ }
+ return -1;
+}
+
+/*
+ * Test to see if the bitmask array is all zeros
+ */
+static bool
+isChanBitMaskZero(const u_int64_t *bitmask)
+{
+ int i;
+
+ for (i = 0; i < BMLEN; i++) {
+ if (bitmask[i] != 0)
+ return false;
+ }
+ return true;
+}
+
+/*
+ * Return the mask of available modes based on the hardware
+ * capabilities and the specified country code and reg domain.
+ */
+u_int32_t regdmn_getwmodesnreg(u_int32_t modesAvail,
+ const COUNTRY_CODE_TO_ENUM_RD *country,
+ const REG_DOMAIN *rd5GHz)
+{
+
+ /* Check country regulations for allowed modes */
+ if ((modesAvail & (REGDMN_MODE_11A_TURBO|REGDMN_MODE_TURBO)) &&
+ (!country->allow11aTurbo))
+ modesAvail &= ~(REGDMN_MODE_11A_TURBO | REGDMN_MODE_TURBO);
+
+ if ((modesAvail & REGDMN_MODE_11G_TURBO) &&
+ (!country->allow11gTurbo))
+ modesAvail &= ~REGDMN_MODE_11G_TURBO;
+
+ if ((modesAvail & REGDMN_MODE_11G) &&
+ (!country->allow11g))
+ modesAvail &= ~REGDMN_MODE_11G;
+
+ if ((modesAvail & REGDMN_MODE_11A) &&
+ (isChanBitMaskZero(rd5GHz->chan11a)))
+ modesAvail &= ~REGDMN_MODE_11A;
+
+ if ((modesAvail & REGDMN_MODE_11NG_HT20) &&
+ (!country->allow11ng20))
+ modesAvail &= ~REGDMN_MODE_11NG_HT20;
+
+ if ((modesAvail & REGDMN_MODE_11NA_HT20) &&
+ (!country->allow11na20))
+ modesAvail &= ~REGDMN_MODE_11NA_HT20;
+
+ if ((modesAvail & REGDMN_MODE_11NG_HT40PLUS) &&
+ (!country->allow11ng40))
+ modesAvail &= ~REGDMN_MODE_11NG_HT40PLUS;
+
+ if ((modesAvail & REGDMN_MODE_11NG_HT40MINUS) &&
+ (!country->allow11ng40))
+ modesAvail &= ~REGDMN_MODE_11NG_HT40MINUS;
+
+ if ((modesAvail & REGDMN_MODE_11NA_HT40PLUS) &&
+ (!country->allow11na40))
+ modesAvail &= ~REGDMN_MODE_11NA_HT40PLUS;
+
+ if ((modesAvail & REGDMN_MODE_11NA_HT40MINUS) &&
+ (!country->allow11na40))
+ modesAvail &= ~REGDMN_MODE_11NA_HT40MINUS;
+
+ if ((modesAvail & REGDMN_MODE_11AC_VHT20) &&
+ (!country->allow11na20))
+ modesAvail &= ~REGDMN_MODE_11AC_VHT20;
+
+ if ((modesAvail & REGDMN_MODE_11AC_VHT40PLUS) &&
+ (!country->allow11na40))
+ modesAvail &= ~REGDMN_MODE_11AC_VHT40PLUS;
+
+ if ((modesAvail & REGDMN_MODE_11AC_VHT40MINUS) &&
+ (!country->allow11na40))
+ modesAvail &= ~REGDMN_MODE_11AC_VHT40MINUS;
+
+ if ((modesAvail & REGDMN_MODE_11AC_VHT80) &&
+ (!country->allow11na80))
+ modesAvail &= ~REGDMN_MODE_11AC_VHT80;
+
+ if ((modesAvail & REGDMN_MODE_11AC_VHT20_2G) &&
+ (!country->allow11ng20))
+ modesAvail &= ~REGDMN_MODE_11AC_VHT20_2G;
+
+ return modesAvail;
+}
+
+void regdmn_get_ctl_info(u_int32_t regdmn, u_int32_t modesAvail, u_int32_t modeSelect)
+{
+ const REG_DMN_PAIR_MAPPING *regpair = NULL;
+ const REG_DOMAIN *regdomain2G = NULL;
+ const REG_DOMAIN *regdomain5G = NULL;
+ int8_t ctl_2g, ctl_5g, ctl;
+ const REG_DOMAIN *rd = NULL;
+ const struct cmode *cm;
+ u_int16_t country_code;
+ const COUNTRY_CODE_TO_ENUM_RD *country;
+
+ country_code = regdmn_get_default_country(regdmn);
+ if (country_code == CTRY_DEFAULT && regdmn == CTRY_DEFAULT)
+ country_code = CTRY_UNITED_STATES;
+
+ country = find_country(country_code);
+ if (country != NULL)
+ regdmn = country->regDmnEnum;
+
+ /* get regulatory domain pair */
+ regpair = get_regdmn_pair(regdmn);
+ if (!regpair) {
+ adf_os_print(KERN_ERR "Failed to get regdmn pair");
+ return;
+ }
+
+ regdomain2G = get_regdmn(regpair->regDmn2GHz);
+ if (!regdomain2G) {
+ adf_os_print(KERN_ERR "Failed to get regdmn 2G");
+ return;
+ }
+
+ regdomain5G = get_regdmn(regpair->regDmn5GHz);
+ if (!regdomain5G) {
+ adf_os_print(KERN_ERR "Failed to get regdmn 5G");
+ return;
+ }
+
+ /* find first nible of CTL */
+ ctl_2g = regdomain2G->conformance_test_limit;
+ ctl_5g = regdomain5G->conformance_test_limit;
+
+ /* find second nible of CTL */
+ if (country != NULL)
+ modesAvail = regdmn_getwmodesnreg(modesAvail, country, regdomain5G);
+
+ for (cm = modes; cm < &modes[N(modes)]; cm++) {
+
+ if ((cm->mode & modeSelect) == 0)
+ continue;
+
+ if ((cm->mode & modesAvail) == 0)
+ continue;
+
+ switch (cm->mode) {
+ case REGDMN_MODE_TURBO:
+ rd = regdomain5G;
+ ctl = rd->conformance_test_limit | CTL_TURBO;
+ break;
+ case REGDMN_MODE_11A:
+ case REGDMN_MODE_11NA_HT20:
+ case REGDMN_MODE_11NA_HT40PLUS:
+ case REGDMN_MODE_11NA_HT40MINUS:
+ case REGDMN_MODE_11AC_VHT20:
+ case REGDMN_MODE_11AC_VHT40PLUS:
+ case REGDMN_MODE_11AC_VHT40MINUS:
+ case REGDMN_MODE_11AC_VHT80:
+ rd = regdomain5G;
+ ctl = rd->conformance_test_limit;
+ break;
+ case REGDMN_MODE_11B:
+ rd = regdomain2G;
+ ctl = rd->conformance_test_limit | CTL_11B;
+ break;
+ case REGDMN_MODE_11G:
+ case REGDMN_MODE_11NG_HT20:
+ case REGDMN_MODE_11NG_HT40PLUS:
+ case REGDMN_MODE_11NG_HT40MINUS:
+ case REGDMN_MODE_11AC_VHT20_2G:
+ case REGDMN_MODE_11AC_VHT40_2G:
+ case REGDMN_MODE_11AC_VHT80_2G:
+ rd = regdomain2G;
+ ctl = rd->conformance_test_limit | CTL_11G;
+ break;
+ case REGDMN_MODE_11G_TURBO:
+ rd = regdomain2G;
+ ctl = rd->conformance_test_limit | CTL_108G;
+ break;
+ case REGDMN_MODE_11A_TURBO:
+ rd = regdomain5G;
+ ctl = rd->conformance_test_limit | CTL_108G;
+ break;
+ default:
+ adf_os_print(KERN_ERR "%s: Unkonwn HAL mode 0x%x\n",
+ __func__, cm->mode);
+ continue;
+ }
+
+ if (rd == regdomain2G)
+ ctl_2g = ctl;
+
+ if (rd == regdomain5G)
+ ctl_5g = ctl;
+ }
+ wma_send_regdomain_info(regdmn, regpair->regDmn2GHz,
+ regpair->regDmn5GHz, ctl_2g, ctl_5g);
+}
diff --git a/CORE/SERVICES/WMA/regdomain.h b/CORE/SERVICES/WMA/regdomain.h
index 1a11c2a706ac..e7e9354f17f8 100644
--- a/CORE/SERVICES/WMA/regdomain.h
+++ b/CORE/SERVICES/WMA/regdomain.h
@@ -121,6 +121,86 @@ enum {
#define PSCAN_DEFER 0x7FFFFFFFFFFFFFFFULL
#define IS_ECM_CHAN 0x8000000000000000ULL
+
+/* define in ah_eeprom.h */
+#define SD_NO_CTL 0xf0
+#define NO_CTL 0xff
+#define CTL_MODE_M 0x0f
+#define CTL_11A 0
+#define CTL_11B 1
+#define CTL_11G 2
+#define CTL_TURBO 3
+#define CTL_108G 4
+#define CTL_2GHT20 5
+#define CTL_5GHT20 6
+#define CTL_2GHT40 7
+#define CTL_5GHT40 8
+#define CTL_5GVHT80 9
+
+#ifndef ATH_NO_5G_SUPPORT
+ #define REGDMN_MODE_11A_TURBO REGDMN_MODE_108A
+ #define CHAN_11A_BMZERO BMZERO,
+ #define CHAN_11A_BM(_a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l) \
+ BM(_a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l),
+#else
+ /* remove 11a channel info if 11a is not supported */
+ #define CHAN_11A_BMZERO
+ #define CHAN_11A_BM(_a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l)
+#endif
+#ifndef ATH_REMOVE_2G_TURBO_RD_TABLE
+ #define REGDMN_MODE_11G_TURBO REGDMN_MODE_108G
+ #define CHAN_TURBO_G_BMZERO BMZERO,
+ #define CHAN_TURBO_G_BM(_a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l) \
+ BM(_a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l),
+#else
+ /* remove turbo-g channel info if turbo-g is not supported */
+ #define CHAN_TURBO_G(a, b)
+ #define CHAN_TURBO_G_BMZERO
+ #define CHAN_TURBO_G_BM(_a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l)
+#endif
+
+#define BMLEN 2 /* Use 2 64 bit uint for channel bitmask
+ NB: Must agree with macro below (BM) */
+#define BMZERO {(u_int64_t) 0, (u_int64_t) 0} /* BMLEN zeros */
+
+#ifndef SUPPRESS_SHIFT_WARNING
+#define SUPPRESS_SHIFT_WARNING
+#endif
+
+/* Suppress MS warning "C4293: 'operator' : shift count negative or too big,
+ * undefined behavior"
+ * This is safe below because the the operand is properly range-checked, but
+ * the compiler can't reason that out before it spits the warning.
+ * Using suppress, so the warning can still be enabled globally to catch other
+ * incorrect uses.
+ */
+#define BM(_fa, _fb, _fc, _fd, _fe, _ff, _fg, _fh, _fi, _fj, _fk, _fl) \
+ SUPPRESS_SHIFT_WARNING \
+ {((((_fa >= 0) && (_fa < 64)) ? (((u_int64_t) 1) << _fa) : (u_int64_t) 0) | \
+ (((_fb >= 0) && (_fb < 64)) ? (((u_int64_t) 1) << _fb) : (u_int64_t) 0) | \
+ (((_fc >= 0) && (_fc < 64)) ? (((u_int64_t) 1) << _fc) : (u_int64_t) 0) | \
+ (((_fd >= 0) && (_fd < 64)) ? (((u_int64_t) 1) << _fd) : (u_int64_t) 0) | \
+ (((_fe >= 0) && (_fe < 64)) ? (((u_int64_t) 1) << _fe) : (u_int64_t) 0) | \
+ (((_ff >= 0) && (_ff < 64)) ? (((u_int64_t) 1) << _ff) : (u_int64_t) 0) | \
+ (((_fg >= 0) && (_fg < 64)) ? (((u_int64_t) 1) << _fg) : (u_int64_t) 0) | \
+ (((_fh >= 0) && (_fh < 64)) ? (((u_int64_t) 1) << _fh) : (u_int64_t) 0) | \
+ (((_fi >= 0) && (_fi < 64)) ? (((u_int64_t) 1) << _fi) : (u_int64_t) 0) | \
+ (((_fj >= 0) && (_fj < 64)) ? (((u_int64_t) 1) << _fj) : (u_int64_t) 0) | \
+ (((_fk >= 0) && (_fk < 64)) ? (((u_int64_t) 1) << _fk) : (u_int64_t) 0) | \
+ (((_fl >= 0) && (_fl < 64)) ? (((u_int64_t) 1) << _fl) : (u_int64_t) 0) ) \
+ ,(((((_fa > 63) && (_fa < 128)) ? (((u_int64_t) 1) << (_fa - 64)) : (u_int64_t) 0) | \
+ (((_fb > 63) && (_fb < 128)) ? (((u_int64_t) 1) << (_fb - 64)) : (u_int64_t) 0) | \
+ (((_fc > 63) && (_fc < 128)) ? (((u_int64_t) 1) << (_fc - 64)) : (u_int64_t) 0) | \
+ (((_fd > 63) && (_fd < 128)) ? (((u_int64_t) 1) << (_fd - 64)) : (u_int64_t) 0) | \
+ (((_fe > 63) && (_fe < 128)) ? (((u_int64_t) 1) << (_fe - 64)) : (u_int64_t) 0) | \
+ (((_ff > 63) && (_ff < 128)) ? (((u_int64_t) 1) << (_ff - 64)) : (u_int64_t) 0) | \
+ (((_fg > 63) && (_fg < 128)) ? (((u_int64_t) 1) << (_fg - 64)) : (u_int64_t) 0) | \
+ (((_fh > 63) && (_fh < 128)) ? (((u_int64_t) 1) << (_fh - 64)) : (u_int64_t) 0) | \
+ (((_fi > 63) && (_fi < 128)) ? (((u_int64_t) 1) << (_fi - 64)) : (u_int64_t) 0) | \
+ (((_fj > 63) && (_fj < 128)) ? (((u_int64_t) 1) << (_fj - 64)) : (u_int64_t) 0) | \
+ (((_fk > 63) && (_fk < 128)) ? (((u_int64_t) 1) << (_fk - 64)) : (u_int64_t) 0) | \
+ (((_fl > 63) && (_fl < 128)) ? (((u_int64_t) 1) << (_fl - 64)) : (u_int64_t) 0)))}
+
/*
* THE following table is the mapping of regdomain pairs specified by
* an 8 bit regdomain value to the individual unitary reg domains
@@ -191,6 +271,7 @@ typedef struct reg_domain {
u_int64_t chan11b[BMLEN];/* 128 bit bitmask for channel/band selection */
u_int64_t chan11g[BMLEN];/* 128 bit bitmask for channel/band selection */
+ u_int64_t chan11g_turbo[BMLEN];
} REG_DOMAIN;
struct cmode {
@@ -234,9 +315,12 @@ typedef struct ath_hal_reg_dmn_tables {
const REG_DMN_PAIR_MAPPING *regDomainPairs;
/* allCountries: Master list of freq. bands (flags, settings) */
const COUNTRY_CODE_TO_ENUM_RD *allCountries;
+ /* regDomains: Array of supported reg domains */
+ const REG_DOMAIN *regDomains;
u_int16_t regDomainPairsCt; /* Num reg domain pair entries */
u_int16_t allCountriesCt; /* Num country entries */
+ u_int16_t regDomainsCt; /* Num reg domain entries */
} HAL_REG_DMN_TABLES;
/*
diff --git a/CORE/SERVICES/WMA/regdomain_common.h b/CORE/SERVICES/WMA/regdomain_common.h
index 2403213edbe4..1d07759dc7f7 100644
--- a/CORE/SERVICES/WMA/regdomain_common.h
+++ b/CORE/SERVICES/WMA/regdomain_common.h
@@ -76,222 +76,229 @@
* frequency bitmasks and flags set.
*/
+#include "_ieee80211_common.h"
+#include <a_types.h>
+#include "wlan_defs.h"
enum EnumRd {
- /*
- * The following regulatory domain definitions are
- * found in the EEPROM. Each regulatory domain
- * can operate in either a 5GHz or 2.4GHz wireless mode or
- * both 5GHz and 2.4GHz wireless modes.
- * In general, the value holds no special
- * meaning and is used to decode into either specific
- * 2.4GHz or 5GHz wireless mode for that particular
- * regulatory domain.
- */
- NO_ENUMRD = 0x00,
- NULL1_WORLD = 0x03, /* For 11b-only countries (no 11a allowed) */
- NULL1_ETSIB = 0x07, /* Israel */
- NULL1_ETSIC = 0x08,
- FCC1_FCCA = 0x10, /* USA */
- FCC1_WORLD = 0x11, /* Hong Kong */
- FCC4_FCCA = 0x12, /* USA - Public Safety */
- FCC5_FCCA = 0x13, /* US with no DFS (UNII-1 + UNII-3 Only)*/
- FCC6_FCCA = 0x14, /* Canada for AP only*/
-
- FCC2_FCCA = 0x20, /* Canada */
- FCC2_WORLD = 0x21, /* Australia & HK */
- FCC2_ETSIC = 0x22,
- FCC6_WORLD = 0x23, /* Australia for AP only*/
- FRANCE_RES = 0x31, /* Legacy France for OEM */
- FCC3_FCCA = 0x3A, /* USA & Canada w/5470 band, 11h, DFS enabled */
- FCC3_WORLD = 0x3B, /* USA & Canada w/5470 band, 11h, DFS enabled */
- FCC3_ETSIC = 0x3F, /* New Zealand, DFS enabled */
-
- ETSI1_WORLD = 0x37,
- ETSI3_ETSIA = 0x32, /* France (optional) */
- ETSI2_WORLD = 0x35, /* Hungary & others */
- ETSI3_WORLD = 0x36, /* France & others */
- ETSI4_WORLD = 0x30,
- ETSI4_ETSIC = 0x38,
- ETSI5_WORLD = 0x39,
- ETSI6_WORLD = 0x34, /* Bulgaria */
- ETSI8_WORLD = 0x3D, /* Russia */
- ETSI9_WORLD = 0x3E, /* Ukraine */
- ETSI_RESERVED = 0x33, /* Reserved (Do not used) */
-
- MKK1_MKKA = 0x40, /* Japan (JP1) */
- MKK1_MKKB = 0x41, /* Japan (JP0) */
- APL4_WORLD = 0x42, /* Singapore and Morocco */
- MKK2_MKKA = 0x43, /* Japan with 4.9G channels */
- APL_RESERVED = 0x44, /* Reserved (Do not used) */
- APL2_WORLD = 0x45, /* Korea */
- APL2_APLC = 0x46,
- APL3_WORLD = 0x47,
- MKK1_FCCA = 0x48, /* Japan (JP1-1) */
- APL2_APLD = 0x49, /* Korea with 2.3G channels */
- MKK1_MKKA1 = 0x4A, /* Japan (JE1) */
- MKK1_MKKA2 = 0x4B, /* Japan (JE2) */
- MKK1_MKKC = 0x4C, /* Japan (MKK1_MKKA,except Ch14) */
- APL2_FCCA = 0x4D, /* Mobile customer */
-
- APL3_FCCA = 0x50,
- APL1_WORLD = 0x52, /* Latin America */
- APL1_FCCA = 0x53,
- APL1_APLA = 0x54,
- APL1_ETSIC = 0x55,
- APL2_ETSIC = 0x56, /* Venezuela */
- APL5_WORLD = 0x58, /* Chile */
- APL6_WORLD = 0x5B, /* Singapore */
- APL7_FCCA = 0x5C, /* Taiwan 5.47 Band */
- APL8_WORLD = 0x5D, /* Malaysia 5GHz */
- APL9_WORLD = 0x5E, /* Korea 5GHz, Before 11/2007. Now used only by APs */
- APL10_WORLD = 0x5F, /* Korea 5GHz, After 11/2007. For STAs only */
-
- /*
- * World mode SKUs
- */
- WOR0_WORLD = 0x60, /* World0 (WO0 SKU) */
- WOR1_WORLD = 0x61, /* World1 (WO1 SKU) */
- WOR2_WORLD = 0x62, /* World2 (WO2 SKU) */
- WOR3_WORLD = 0x63, /* World3 (WO3 SKU) */
- WOR4_WORLD = 0x64, /* World4 (WO4 SKU) */
- WOR5_ETSIC = 0x65, /* World5 (WO5 SKU) */
-
- WOR01_WORLD = 0x66, /* World0-1 (WW0-1 SKU) */
- WOR02_WORLD = 0x67, /* World0-2 (WW0-2 SKU) */
- EU1_WORLD = 0x68, /* Same as World0-2 (WW0-2 SKU), except active scan ch1-13. No ch14 */
-
- WOR9_WORLD = 0x69, /* World9 (WO9 SKU) */
- WORA_WORLD = 0x6A, /* WorldA (WOA SKU) */
- WORB_WORLD = 0x6B, /* WorldB (WOB SKU) */
- WORC_WORLD = 0x6C, /* WorldC (WOC SKU) */
-
- MKK3_MKKB = 0x80, /* Japan UNI-1 even + MKKB */
- MKK3_MKKA2 = 0x81, /* Japan UNI-1 even + MKKA2 */
- MKK3_MKKC = 0x82, /* Japan UNI-1 even + MKKC */
-
- MKK4_MKKB = 0x83, /* Japan UNI-1 even + UNI-2 + MKKB */
- MKK4_MKKA2 = 0x84, /* Japan UNI-1 even + UNI-2 + MKKA2 */
- MKK4_MKKC = 0x85, /* Japan UNI-1 even + UNI-2 + MKKC */
-
- MKK5_MKKB = 0x86, /* Japan UNI-1 even + UNI-2 + mid-band + MKKB */
- MKK5_MKKA2 = 0x87, /* Japan UNI-1 even + UNI-2 + mid-band + MKKA2 */
- MKK5_MKKC = 0x88, /* Japan UNI-1 even + UNI-2 + mid-band + MKKC */
-
- MKK6_MKKB = 0x89, /* Japan UNI-1 even + UNI-1 odd MKKB */
- MKK6_MKKA2 = 0x8A, /* Japan UNI-1 even + UNI-1 odd + MKKA2 */
- MKK6_MKKC = 0x8B, /* Japan UNI-1 even + UNI-1 odd + MKKC */
-
- MKK7_MKKB = 0x8C, /* Japan UNI-1 even + UNI-1 odd + UNI-2 + MKKB */
- MKK7_MKKA2 = 0x8D, /* Japan UNI-1 even + UNI-1 odd + UNI-2 + MKKA2 */
- MKK7_MKKC = 0x8E, /* Japan UNI-1 even + UNI-1 odd + UNI-2 + MKKC */
-
- MKK8_MKKB = 0x8F, /* Japan UNI-1 even + UNI-1 odd + UNI-2 + mid-band + MKKB */
- MKK8_MKKA2 = 0x90, /* Japan UNI-1 even + UNI-1 odd + UNI-2 + mid-band + MKKA2 */
- MKK8_MKKC = 0x91, /* Japan UNI-1 even + UNI-1 odd + UNI-2 + mid-band + MKKC */
-
- MKK14_MKKA1 = 0x92, /* Japan UNI-1 even + UNI-1 odd + 4.9GHz + MKKA1 */
- MKK15_MKKA1 = 0x93, /* Japan UNI-1 even + UNI-1 odd + UNI-2 + 4.9GHz + MKKA1 */
-
- MKK10_FCCA = 0xD0, /* Japan UNI-1 even + UNI-2 + 4.9GHz + FCCA */
- MKK10_MKKA1 = 0xD1, /* Japan UNI-1 even + UNI-2 + 4.9GHz + MKKA1 */
- MKK10_MKKC = 0xD2, /* Japan UNI-1 even + UNI-2 + 4.9GHz + MKKC */
- MKK10_MKKA2 = 0xD3, /* Japan UNI-1 even + UNI-2 + 4.9GHz + MKKA2 */
-
- MKK11_MKKA = 0xD4, /* Japan UNI-1 even + UNI-2 + mid-band + 4.9GHz + MKKA */
- MKK11_FCCA = 0xD5, /* Japan UNI-1 even + UNI-2 + mid-band + 4.9GHz + FCCA */
- MKK11_MKKA1 = 0xD6, /* Japan UNI-1 even + UNI-2 + mid-band + 4.9GHz + MKKA1 */
- MKK11_MKKC = 0xD7, /* Japan UNI-1 even + UNI-2 + mid-band + 4.9GHz + MKKC */
- MKK11_MKKA2 = 0xD8, /* Japan UNI-1 even + UNI-2 + mid-band + 4.9GHz + MKKA2 */
-
- MKK12_MKKA = 0xD9, /* Japan UNI-1 even + UNI-1 odd + UNI-2 + mid-band + 4.9GHz + MKKA */
- MKK12_FCCA = 0xDA, /* Japan UNI-1 even + UNI-1 odd + UNI-2 + mid-band + 4.9GHz + FCCA */
- MKK12_MKKA1 = 0xDB, /* Japan UNI-1 even + UNI-1 odd + UNI-2 + mid-band + 4.9GHz + MKKA1 */
- MKK12_MKKC = 0xDC, /* Japan UNI-1 even + UNI-1 odd + UNI-2 + mid-band + 4.9GHz + MKKC */
- MKK12_MKKA2 = 0xDD, /* Japan UNI-1 even + UNI-1 odd + UNI-2 + mid-band + 4.9GHz + MKKA2 */
-
- MKK13_MKKB = 0xDE, /* Japan UNI-1 even + UNI-1 odd + UNI-2 + mid-band + MKKB + All passive + no adhoc */
-
- /* Following definitions are used only by s/w to map old
- * Japan SKUs.
- */
- MKK3_MKKA = 0xF0, /* Japan UNI-1 even + MKKA */
- MKK3_MKKA1 = 0xF1, /* Japan UNI-1 even + MKKA1 */
- MKK3_FCCA = 0xF2, /* Japan UNI-1 even + FCCA */
- MKK4_MKKA = 0xF3, /* Japan UNI-1 even + UNI-2 + MKKA */
- MKK4_MKKA1 = 0xF4, /* Japan UNI-1 even + UNI-2 + MKKA1 */
- MKK4_FCCA = 0xF5, /* Japan UNI-1 even + UNI-2 + FCCA */
- MKK9_MKKA = 0xF6, /* Japan UNI-1 even + 4.9GHz */
- MKK10_MKKA = 0xF7, /* Japan UNI-1 even + UNI-2 + 4.9GHz */
- MKK6_MKKA1 = 0xF8, /* Japan UNI-1 even + UNI-1 odd + UNI-2 + MKKA1 */
- MKK6_FCCA = 0xF9, /* Japan UNI-1 even + UNI-1 odd + UNI-2 + FCCA */
- MKK7_MKKA1 = 0xFA, /* Japan UNI-1 even + UNI-1 odd + UNI-2 + MKKA1 */
- MKK7_FCCA = 0xFB, /* Japan UNI-1 even + UNI-1 odd + UNI-2 + FCCA */
- MKK9_FCCA = 0xFC, /* Japan UNI-1 even + 4.9GHz + FCCA */
- MKK9_MKKA1 = 0xFD, /* Japan UNI-1 even + 4.9GHz + MKKA1 */
- MKK9_MKKC = 0xFE, /* Japan UNI-1 even + 4.9GHz + MKKC */
- MKK9_MKKA2 = 0xFF, /* Japan UNI-1 even + 4.9GHz + MKKA2 */
-
- /*
- * Regulator domains ending in a number (e.g. APL1,
- * MK1, ETSI4, etc) apply to 5GHz channel and power
- * information. Regulator domains ending in a letter
- * (e.g. APLA, FCCA, etc) apply to 2.4GHz channel and
- * power information.
- */
- APL1 = 0x0150, /* LAT & Asia */
- APL2 = 0x0250, /* LAT & Asia */
- APL3 = 0x0350, /* Taiwan */
- APL4 = 0x0450, /* Jordan */
- APL5 = 0x0550, /* Chile */
- APL6 = 0x0650, /* Singapore */
- APL7 = 0x0750, /* Taiwan, disable ch52 */
- APL8 = 0x0850, /* Malaysia */
- APL9 = 0x0950, /* Korea. Before 11/2007. Now used only by APs */
- APL10 = 0x1050, /* Korea. After 11/2007. For STAs only */
-
- ETSI1 = 0x0130, /* Europe & others */
- ETSI2 = 0x0230, /* Europe & others */
- ETSI3 = 0x0330, /* Europe & others */
- ETSI4 = 0x0430, /* Europe & others */
- ETSI5 = 0x0530, /* Europe & others */
- ETSI6 = 0x0630, /* Europe & others */
- ETSI8 = 0x0830, /* Russia */
- ETSI9 = 0x0930, /* Ukraine */
- ETSIA = 0x0A30, /* France */
- ETSIB = 0x0B30, /* Israel */
- ETSIC = 0x0C30, /* Latin America */
-
- FCC1 = 0x0110, /* US & others */
- FCC2 = 0x0120, /* Canada, Australia & New Zealand */
- FCC3 = 0x0160, /* US w/new middle band & DFS */
- FCC4 = 0x0165, /* US Public Safety */
- FCC5 = 0x0510,
- FCC6 = 0x0610, /* Canada & Australia */
- FCCA = 0x0A10,
-
- APLD = 0x0D50, /* South Korea */
-
- MKK1 = 0x0140, /* Japan (UNI-1 odd)*/
- MKK2 = 0x0240, /* Japan (4.9 GHz + UNI-1 odd) */
- MKK3 = 0x0340, /* Japan (UNI-1 even) */
- MKK4 = 0x0440, /* Japan (UNI-1 even + UNI-2) */
- MKK5 = 0x0540, /* Japan (UNI-1 even + UNI-2 + mid-band) */
- MKK6 = 0x0640, /* Japan (UNI-1 odd + UNI-1 even) */
- MKK7 = 0x0740, /* Japan (UNI-1 odd + UNI-1 even + UNI-2 */
- MKK8 = 0x0840, /* Japan (UNI-1 odd + UNI-1 even + UNI-2 + mid-band) */
- MKK9 = 0x0940, /* Japan (UNI-1 even + 4.9 GHZ) */
- MKK10 = 0x0B40, /* Japan (UNI-1 even + UNI-2 + 4.9 GHZ) */
- MKK11 = 0x1140, /* Japan (UNI-1 even + UNI-2 + 4.9 GHZ) */
- MKK12 = 0x1240, /* Japan (UNI-1 even + UNI-2 + 4.9 GHZ) */
- MKK13 = 0x0C40, /* Same as MKK8 but all passive and no adhoc 11a */
- MKK14 = 0x1440, /* Japan UNI-1 even + UNI-1 odd + 4.9GHz */
- MKK15 = 0x1540, /* Japan UNI-1 even + UNI-1 odd + UNI-2 + 4.9GHz */
- MKKA = 0x0A40, /* Japan */
- MKKC = 0x0A50,
-
- NULL1 = 0x0198,
- WORLD = 0x0199,
- DEBUG_REG_DMN = 0x01ff,
+ /*
+ * The following regulatory domain definitions are
+ * found in the EEPROM. Each regulatory domain
+ * can operate in either a 5GHz or 2.4GHz wireless mode or
+ * both 5GHz and 2.4GHz wireless modes.
+ * In general, the value holds no special
+ * meaning and is used to decode into either specific
+ * 2.4GHz or 5GHz wireless mode for that particular
+ * regulatory domain.
+ */
+ NO_ENUMRD = 0x00,
+ NULL1_WORLD = 0x03, /* For 11b-only countries (no 11a allowed) */
+ NULL1_ETSIB = 0x07, /* Israel */
+ NULL1_ETSIC = 0x08,
+ FCC1_FCCA = 0x10, /* USA */
+ FCC1_WORLD = 0x11, /* Hong Kong */
+ FCC4_FCCA = 0x12, /* USA - Public Safety */
+ FCC5_FCCA = 0x13, /* US with no DFS (UNII-1 + UNII-3 Only)*/
+ FCC6_FCCA = 0x14, /* Canada for AP only*/
+
+ FCC2_FCCA = 0x20, /* Canada */
+ FCC2_WORLD = 0x21, /* Australia & HK */
+ FCC2_ETSIC = 0x22,
+ FCC6_WORLD = 0x23, /* Australia for AP only*/
+ FRANCE_RES = 0x31, /* Legacy France for OEM */
+ FCC3_FCCA = 0x3A, /* USA & Canada w/5470 band, 11h, DFS enabled */
+ FCC3_WORLD = 0x3B, /* USA & Canada w/5470 band, 11h, DFS enabled */
+ FCC3_ETSIC = 0x3F, /* New Zealand, DFS enabled */
+
+ ETSI1_WORLD = 0x37,
+ ETSI3_ETSIA = 0x32, /* France (optional) */
+ ETSI2_WORLD = 0x35, /* Hungary & others */
+ ETSI3_WORLD = 0x36, /* France & others */
+ ETSI4_WORLD = 0x30,
+ ETSI4_ETSIC = 0x38,
+ ETSI5_WORLD = 0x39,
+ ETSI6_WORLD = 0x34, /* Bulgaria */
+ ETSI8_WORLD = 0x3D, /* Russia */
+ ETSI9_WORLD = 0x3E, /* Ukraine */
+ ETSI_RESERVED = 0x33, /* Reserved (Do not used) */
+
+ MKK1_MKKA = 0x40, /* Japan (JP1) */
+ MKK1_MKKB = 0x41, /* Japan (JP0) */
+ APL4_WORLD = 0x42, /* Singapore and Morocco */
+ MKK2_MKKA = 0x43, /* Japan with 4.9G channels */
+ APL_RESERVED = 0x44, /* Reserved (Do not used) */
+ APL2_WORLD = 0x45, /* Korea */
+ APL2_APLC = 0x46,
+ APL3_WORLD = 0x47,
+ MKK1_FCCA = 0x48, /* Japan (JP1-1) */
+ APL2_APLD = 0x49, /* Korea with 2.3G channels */
+ MKK1_MKKA1 = 0x4A, /* Japan (JE1) */
+ MKK1_MKKA2 = 0x4B, /* Japan (JE2) */
+ MKK1_MKKC = 0x4C, /* Japan (MKK1_MKKA,except Ch14) */
+ APL2_FCCA = 0x4D, /* Mobile customer */
+ APL11_FCCA = 0x4F, /* Specific AP Customer 5GHz, For APs Only */
+
+ APL3_FCCA = 0x50,
+ APL12_WORLD = 0x51,
+ APL1_WORLD = 0x52, /* Latin America */
+ APL1_FCCA = 0x53,
+ APL1_APLA = 0x54,
+ APL1_ETSIC = 0x55,
+ APL2_ETSIC = 0x56, /* Venezuela */
+ APL5_WORLD = 0x58, /* Chile */
+ APL6_WORLD = 0x5B, /* Singapore */
+ APL7_FCCA = 0x5C, /* Taiwan 5.47 Band */
+ APL8_WORLD = 0x5D, /* Malaysia 5GHz */
+ APL9_WORLD = 0x5E, /* Korea 5GHz, Before 11/2007. Now used only by APs */
+ APL10_WORLD = 0x5F, /* Korea 5GHz, After 11/2007. For STAs only */
+
+ /*
+ * World mode SKUs
+ */
+ WOR0_WORLD = 0x60, /* World0 (WO0 SKU) */
+ WOR1_WORLD = 0x61, /* World1 (WO1 SKU) */
+ WOR2_WORLD = 0x62, /* World2 (WO2 SKU) */
+ WOR3_WORLD = 0x63, /* World3 (WO3 SKU) */
+ WOR4_WORLD = 0x64, /* World4 (WO4 SKU) */
+ WOR5_ETSIC = 0x65, /* World5 (WO5 SKU) */
+
+ WOR01_WORLD = 0x66, /* World0-1 (WW0-1 SKU) */
+ WOR02_WORLD = 0x67, /* World0-2 (WW0-2 SKU) */
+ EU1_WORLD = 0x68, /* Same as World0-2 (WW0-2 SKU), except active scan ch1-13. No ch14 */
+
+ WOR9_WORLD = 0x69, /* World9 (WO9 SKU) */
+ WORA_WORLD = 0x6A, /* WorldA (WOA SKU) */
+ WORB_WORLD = 0x6B, /* WorldB (WOB SKU) */
+ WORC_WORLD = 0x6C, /* WorldC (WOC SKU) */
+
+ MKK3_MKKB = 0x80, /* Japan UNI-1 even + MKKB */
+ MKK3_MKKA2 = 0x81, /* Japan UNI-1 even + MKKA2 */
+ MKK3_MKKC = 0x82, /* Japan UNI-1 even + MKKC */
+
+ MKK4_MKKB = 0x83, /* Japan UNI-1 even + UNI-2 + MKKB */
+ MKK4_MKKA2 = 0x84, /* Japan UNI-1 even + UNI-2 + MKKA2 */
+ MKK4_MKKC = 0x85, /* Japan UNI-1 even + UNI-2 + MKKC */
+
+ MKK5_MKKB = 0x86, /* Japan UNI-1 even + UNI-2 + mid-band + MKKB */
+ MKK5_MKKA2 = 0x87, /* Japan UNI-1 even + UNI-2 + mid-band + MKKA2 */
+ MKK5_MKKC = 0x88, /* Japan UNI-1 even + UNI-2 + mid-band + MKKC */
+
+ MKK6_MKKB = 0x89, /* Japan UNI-1 even + UNI-1 odd MKKB */
+ MKK6_MKKA2 = 0x8A, /* Japan UNI-1 even + UNI-1 odd + MKKA2 */
+ MKK6_MKKC = 0x8B, /* Japan UNI-1 even + UNI-1 odd + MKKC */
+
+ MKK7_MKKB = 0x8C, /* Japan UNI-1 even + UNI-1 odd + UNI-2 + MKKB */
+ MKK7_MKKA2 = 0x8D, /* Japan UNI-1 even + UNI-1 odd + UNI-2 + MKKA2 */
+ MKK7_MKKC = 0x8E, /* Japan UNI-1 even + UNI-1 odd + UNI-2 + MKKC */
+
+ MKK8_MKKB = 0x8F, /* Japan UNI-1 even + UNI-1 odd + UNI-2 + mid-band + MKKB */
+ MKK8_MKKA2 = 0x90, /* Japan UNI-1 even + UNI-1 odd + UNI-2 + mid-band + MKKA2 */
+ MKK8_MKKC = 0x91, /* Japan UNI-1 even + UNI-1 odd + UNI-2 + mid-band + MKKC */
+
+ MKK14_MKKA1 = 0x92, /* Japan UNI-1 even + UNI-1 odd + 4.9GHz + MKKA1 */
+ MKK15_MKKA1 = 0x93, /* Japan UNI-1 even + UNI-1 odd + UNI-2 + 4.9GHz + MKKA1 */
+
+ MKK10_FCCA = 0xD0, /* Japan UNI-1 even + UNI-2 + 4.9GHz + FCCA */
+ MKK10_MKKA1 = 0xD1, /* Japan UNI-1 even + UNI-2 + 4.9GHz + MKKA1 */
+ MKK10_MKKC = 0xD2, /* Japan UNI-1 even + UNI-2 + 4.9GHz + MKKC */
+ MKK10_MKKA2 = 0xD3, /* Japan UNI-1 even + UNI-2 + 4.9GHz + MKKA2 */
+
+ MKK11_MKKA = 0xD4, /* Japan UNI-1 even + UNI-2 + mid-band + 4.9GHz + MKKA */
+ MKK11_FCCA = 0xD5, /* Japan UNI-1 even + UNI-2 + mid-band + 4.9GHz + FCCA */
+ MKK11_MKKA1 = 0xD6, /* Japan UNI-1 even + UNI-2 + mid-band + 4.9GHz + MKKA1 */
+ MKK11_MKKC = 0xD7, /* Japan UNI-1 even + UNI-2 + mid-band + 4.9GHz + MKKC */
+ MKK11_MKKA2 = 0xD8, /* Japan UNI-1 even + UNI-2 + mid-band + 4.9GHz + MKKA2 */
+
+ MKK12_MKKA = 0xD9, /* Japan UNI-1 even + UNI-1 odd + UNI-2 + mid-band + 4.9GHz + MKKA */
+ MKK12_FCCA = 0xDA, /* Japan UNI-1 even + UNI-1 odd + UNI-2 + mid-band + 4.9GHz + FCCA */
+ MKK12_MKKA1 = 0xDB, /* Japan UNI-1 even + UNI-1 odd + UNI-2 + mid-band + 4.9GHz + MKKA1 */
+ MKK12_MKKC = 0xDC, /* Japan UNI-1 even + UNI-1 odd + UNI-2 + mid-band + 4.9GHz + MKKC */
+ MKK12_MKKA2 = 0xDD, /* Japan UNI-1 even + UNI-1 odd + UNI-2 + mid-band + 4.9GHz + MKKA2 */
+
+ MKK13_MKKB = 0xDE, /* Japan UNI-1 even + UNI-1 odd + UNI-2 + mid-band + MKKB + All passive + no adhoc */
+
+ /* Following definitions are used only by s/w to map old
+ * Japan SKUs.
+ */
+ MKK3_MKKA = 0xF0, /* Japan UNI-1 even + MKKA */
+ MKK3_MKKA1 = 0xF1, /* Japan UNI-1 even + MKKA1 */
+ MKK3_FCCA = 0xF2, /* Japan UNI-1 even + FCCA */
+ MKK4_MKKA = 0xF3, /* Japan UNI-1 even + UNI-2 + MKKA */
+ MKK4_MKKA1 = 0xF4, /* Japan UNI-1 even + UNI-2 + MKKA1 */
+ MKK4_FCCA = 0xF5, /* Japan UNI-1 even + UNI-2 + FCCA */
+ MKK9_MKKA = 0xF6, /* Japan UNI-1 even + 4.9GHz */
+ MKK10_MKKA = 0xF7, /* Japan UNI-1 even + UNI-2 + 4.9GHz */
+ MKK6_MKKA1 = 0xF8, /* Japan UNI-1 even + UNI-1 odd + UNI-2 + MKKA1 */
+ MKK6_FCCA = 0xF9, /* Japan UNI-1 even + UNI-1 odd + UNI-2 + FCCA */
+ MKK7_MKKA1 = 0xFA, /* Japan UNI-1 even + UNI-1 odd + UNI-2 + MKKA1 */
+ MKK7_FCCA = 0xFB, /* Japan UNI-1 even + UNI-1 odd + UNI-2 + FCCA */
+ MKK9_FCCA = 0xFC, /* Japan UNI-1 even + 4.9GHz + FCCA */
+ MKK9_MKKA1 = 0xFD, /* Japan UNI-1 even + 4.9GHz + MKKA1 */
+ MKK9_MKKC = 0xFE, /* Japan UNI-1 even + 4.9GHz + MKKC */
+ MKK9_MKKA2 = 0xFF, /* Japan UNI-1 even + 4.9GHz + MKKA2 */
+
+ /*
+ * Regulator domains ending in a number (e.g. APL1,
+ * MK1, ETSI4, etc) apply to 5GHz channel and power
+ * information. Regulator domains ending in a letter
+ * (e.g. APLA, FCCA, etc) apply to 2.4GHz channel and
+ * power information.
+ */
+ APL1 = 0x0150, /* LAT & Asia */
+ APL2 = 0x0250, /* LAT & Asia */
+ APL3 = 0x0350, /* Taiwan */
+ APL4 = 0x0450, /* Jordan */
+ APL5 = 0x0550, /* Chile */
+ APL6 = 0x0650, /* Singapore */
+ APL7 = 0x0750, /* Taiwan, disable ch52 */
+ APL8 = 0x0850, /* Malaysia */
+ APL9 = 0x0950, /* Korea. Before 11/2007. Now used only by APs */
+ APL10 = 0x1050, /* Korea. After 11/2007. For STAs only */
+ APL11 = 0x1150, /* Specific AP Customer 5GHz, For APs Only */
+ APL12 = 0x1160, /* Kenya */
+
+ ETSI1 = 0x0130, /* Europe & others */
+ ETSI2 = 0x0230, /* Europe & others */
+ ETSI3 = 0x0330, /* Europe & others */
+ ETSI4 = 0x0430, /* Europe & others */
+ ETSI5 = 0x0530, /* Europe & others */
+ ETSI6 = 0x0630, /* Europe & others */
+ ETSI8 = 0x0830, /* Russia */
+ ETSI9 = 0x0930, /* Ukraine */
+ ETSIA = 0x0A30, /* France */
+ ETSIB = 0x0B30, /* Israel */
+ ETSIC = 0x0C30, /* Latin America */
+
+ FCC1 = 0x0110, /* US & others */
+ FCC2 = 0x0120, /* Canada, Australia & New Zealand */
+ FCC3 = 0x0160, /* US w/new middle band & DFS */
+ FCC4 = 0x0165, /* US Public Safety */
+ FCC5 = 0x0510,
+ FCC6 = 0x0610, /* Canada & Australia */
+ FCCA = 0x0A10,
+
+ APLD = 0x0D50, /* South Korea */
+
+ MKK1 = 0x0140, /* Japan (UNI-1 odd)*/
+ MKK2 = 0x0240, /* Japan (4.9 GHz + UNI-1 odd) */
+ MKK3 = 0x0340, /* Japan (UNI-1 even) */
+ MKK4 = 0x0440, /* Japan (UNI-1 even + UNI-2) */
+ MKK5 = 0x0540, /* Japan (UNI-1 even + UNI-2 + mid-band) */
+ MKK6 = 0x0640, /* Japan (UNI-1 odd + UNI-1 even) */
+ MKK7 = 0x0740, /* Japan (UNI-1 odd + UNI-1 even + UNI-2 */
+ MKK8 = 0x0840, /* Japan (UNI-1 odd + UNI-1 even + UNI-2 + mid-band) */
+ MKK9 = 0x0940, /* Japan (UNI-1 even + 4.9 GHZ) */
+ MKK10 = 0x0B40, /* Japan (UNI-1 even + UNI-2 + 4.9 GHZ) */
+ MKK11 = 0x1140, /* Japan (UNI-1 even + UNI-2 + 4.9 GHZ) */
+ MKK12 = 0x1240, /* Japan (UNI-1 even + UNI-2 + 4.9 GHZ) */
+ MKK13 = 0x0C40, /* Same as MKK8 but all passive and no adhoc 11a */
+ MKK14 = 0x1440, /* Japan UNI-1 even + UNI-1 odd + 4.9GHz */
+ MKK15 = 0x1540, /* Japan UNI-1 even + UNI-1 odd + UNI-2 + 4.9GHz */
+ MKKA = 0x0A40, /* Japan */
+ MKKC = 0x0A50,
+
+ NULL1 = 0x0198,
+ WORLD = 0x0199,
+ DEBUG_REG_DMN = 0x01ff,
};
enum { /* conformance test limits */
@@ -685,95 +692,105 @@ enum {
* 5GHz 11A channel tags
*/
enum {
- F1_4915_4925,
- F2_4915_4925,
- F1_4935_4945,
- F2_4935_4945,
- F1_4920_4980,
- F2_4920_4980,
- F1_4942_4987,
- F1_4945_4985,
- F1_4950_4980,
- F1_5035_5040,
- F2_5035_5040,
- F1_5040_5040,
- F1_5040_5080,
- F2_5040_5080,
- F1_5055_5055,
- F2_5055_5055,
-
- F1_5120_5240,
-
- F1_5170_5230,
- F2_5170_5230,
-
- F1_5180_5240,
- F2_5180_5240,
- F3_5180_5240,
- F4_5180_5240,
- F5_5180_5240,
- F6_5180_5240,
- F7_5180_5240,
- F8_5180_5240,
- F9_5180_5240,
- F10_5180_5240,
-
- F1_5240_5280,
-
- F1_5260_5280,
-
- F1_5260_5320,
- F2_5260_5320,
- F3_5260_5320,
- F4_5260_5320,
- F5_5260_5320,
- F6_5260_5320,
- F7_5260_5320,
-
- F1_5260_5700,
-
- F1_5280_5320,
-
- F1_5500_5580,
- F2_5500_5580,
-
- F1_5500_5620,
+ F1_4912_4947,
+ F1_4915_4925,
+ F2_4915_4925,
+ F1_4935_4945,
+ F2_4935_4945,
+ F1_4920_4980,
+ F2_4920_4980,
+ F1_4942_4987,
+ F1_4945_4985,
+ F1_4950_4980,
+ F1_5032_5057,
+ F1_5035_5040,
+ F2_5035_5040,
+ F1_5035_5045,
+ F1_5040_5040,
+ F1_5040_5080,
+ F2_5040_5080,
+ F1_5055_5055,
+ F2_5055_5055,
+
+ F1_5120_5240,
+
+ F1_5170_5230,
+ F2_5170_5230,
+
+ F1_5180_5240,
+ F2_5180_5240,
+ F3_5180_5240,
+ F4_5180_5240,
+ F5_5180_5240,
+ F6_5180_5240,
+ F7_5180_5240,
+ F8_5180_5240,
+ F9_5180_5240,
+ F10_5180_5240,
+
+ F1_5240_5280,
+
+ F1_5260_5280,
+
+ F1_5260_5320,
+ F2_5260_5320,
+ F3_5260_5320,
+ F4_5260_5320,
+ F5_5260_5320,
+ F6_5260_5320,
+ F7_5260_5320,
+
+ F1_5260_5700,
+
+ F1_5280_5320,
+ F2_5280_5320,
+ F1_5500_5560,
+
+ F1_5500_5580,
+ F2_5500_5580,
+
+ F1_5500_5620,
F1_5500_5660,
- F1_5500_5720,
- F2_5500_5700,
- F3_5500_5700,
- F4_5500_5700,
- F5_5500_5700,
- F6_5500_5700,
+ F1_5500_5720,
+ F2_5500_5700,
+ F3_5500_5700,
+ F4_5500_5700,
+ F5_5500_5700,
+ F6_5500_5700,
+
+ F1_5660_5700,
+ F2_5660_5720,
+ F3_5660_5720,
- F1_5660_5700,
- F2_5660_5700,
- F3_5660_5700,
+ F1_5745_5765,
- F1_5745_5805,
- F2_5745_5805,
- F3_5745_5805,
+ F1_5745_5805,
+ F2_5745_5805,
+ F3_5745_5805,
F4_5745_5805,
- F1_5745_5825,
- F2_5745_5825,
- F3_5745_5825,
- F4_5745_5825,
- F5_5745_5825,
- F6_5745_5825,
- F7_5745_5825,
+ F1_5745_5825,
+ F2_5745_5825,
+ F3_5745_5825,
+ F4_5745_5825,
+ F5_5745_5825,
+ F6_5745_5825,
+ F7_5745_5825,
F8_5745_5825,
-
- W1_4920_4980,
- W1_5040_5080,
- W1_5170_5230,
- W1_5180_5240,
- W1_5260_5320,
- W1_5745_5825,
- W1_5500_5700,
- A_DEMO_ALL_CHANNELS
+ F9_5745_5825,
+
+ F1_5845_5865,
+
+ W1_4920_4980,
+ W1_5040_5080,
+ W1_5170_5230,
+ W1_5180_5240,
+ W1_5260_5320,
+ W1_5745_5825,
+ W1_5500_5700,
+ A_DEMO_ALL_CHANNELS
};
static const REG_DMN_FREQ_BAND regDmn5GhzFreq[] = {
@@ -1049,3 +1066,768 @@ static const COMMON_MODE_POWER common_mode_pwrtbl[] = {
{ 5725, 5825, 20 }, /* Singapore */
{ 5825, 5850, 23 } /* Korea */
};
+
+/*
+ * 5GHz Turbo (dynamic & static) tags
+ */
+
+enum {
+ T1_5130_5650,
+ T1_5150_5670,
+
+ T1_5200_5200,
+ T2_5200_5200,
+ T3_5200_5200,
+ T4_5200_5200,
+ T5_5200_5200,
+ T6_5200_5200,
+ T7_5200_5200,
+ T8_5200_5200,
+
+ T1_5200_5280,
+ T2_5200_5280,
+ T3_5200_5280,
+ T4_5200_5280,
+ T5_5200_5280,
+ T6_5200_5280,
+
+ T1_5200_5240,
+ T1_5210_5210,
+ T2_5210_5210,
+ T3_5210_5210,
+ T4_5210_5210,
+ T5_5210_5210,
+ T6_5210_5210,
+ T7_5210_5210,
+ T8_5210_5210,
+ T9_5210_5210,
+ T10_5210_5210,
+ T1_5240_5240,
+
+ T1_5210_5250,
+ T1_5210_5290,
+ T2_5210_5290,
+ T3_5210_5290,
+
+ T1_5280_5280,
+ T2_5280_5280,
+ T1_5290_5290,
+ T2_5290_5290,
+ T3_5290_5290,
+ T1_5250_5290,
+ T2_5250_5290,
+ T3_5250_5290,
+ T4_5250_5290,
+
+ T1_5540_5660,
+ T2_5540_5660,
+ T3_5540_5660,
+ T1_5760_5800,
+ T2_5760_5800,
+ T3_5760_5800,
+ T4_5760_5800,
+ T5_5760_5800,
+ T6_5760_5800,
+ T7_5760_5800,
+
+ T1_5765_5805,
+ T2_5765_5805,
+ T3_5765_5805,
+ T4_5765_5805,
+ T5_5765_5805,
+ T6_5765_5805,
+ T7_5765_5805,
+ T8_5765_5805,
+ T9_5765_5805,
+
+ WT1_5210_5250,
+ WT1_5290_5290,
+ WT1_5540_5660,
+ WT1_5760_5800,
+};
+
+/*
+ * 2GHz Dynamic turbo tags
+ */
+#ifndef ATH_REMOVE_2G_TURBO_RD_TABLE
+enum {
+ T1_2312_2372,
+ T1_2437_2437,
+ T2_2437_2437,
+ T3_2437_2437,
+ T1_2512_2732
+};
+
+static const REG_DMN_FREQ_BAND regDmn2Ghz11gTurboFreq[] = {
+ { 2312, 2372, 5, 6, 40, 40, NO_DFS, NO_PSCAN, 0}, /* T1_2312_2372 */
+ { 2437, 2437, 5, 6, 40, 40, NO_DFS, NO_PSCAN, 0}, /* T1_2437_2437 */
+ { 2437, 2437, 20, 6, 40, 40, NO_DFS, NO_PSCAN, 0}, /* T2_2437_2437 */
+ { 2437, 2437, 18, 6, 40, 40, NO_DFS, PSCAN_WWR, 0}, /* T3_2437_2437 */
+ { 2512, 2732, 5, 6, 40, 40, NO_DFS, NO_PSCAN, 0}, /* T1_2512_2732 */
+};
+#endif /* ATH_REMOVE_2G_TURBO_RD_TABLE */
+
+static const REG_DOMAIN ahCmnRegDomains[] = {
+
+ {DEBUG_REG_DMN, FCC, DFS_FCC3, NO_PSCAN, NO_REQ,
+ CHAN_11A_BM(A_DEMO_ALL_CHANNELS, F6_5745_5825,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1)
+ CHAN_11A_BM(T1_5130_5650, T1_5150_5670, F6_5745_5825,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1)
+ CHAN_11A_BM(T1_5200_5240, T1_5280_5280, T1_5540_5660, T1_5765_5805,
+ -1, -1, -1, -1, -1, -1, -1, -1)
+ BM(F1_2312_2372, F1_2412_2472, F1_2484_2484, F1_2512_2732,
+ -1, -1, -1, -1, -1, -1, -1, -1),
+ BM(G_DEMO_ALMOST_ALL_CHANNELS,
+ G1_2484_2484, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1),
+ CHAN_TURBO_G_BM(T1_2312_2372, T1_2437_2437, T1_2512_2732,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1)
+ },
+
+ {APL1, FCC, NO_DFS, NO_PSCAN, NO_REQ,
+ BM(F4_5745_5825, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1),
+ BM(T2_5760_5800, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1),
+ BM(T1_5765_5805, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1),
+ BMZERO,
+ BMZERO,
+ CHAN_TURBO_G_BMZERO
+ },
+
+ {APL2, FCC, NO_DFS, NO_PSCAN, NO_REQ,
+ BM(F1_5745_5805, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1),
+ BM(T1_5760_5800, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1),
+ BM(T2_5765_5805, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1),
+ BMZERO,
+ BMZERO,
+ CHAN_TURBO_G_BMZERO
+ },
+
+ {APL3, FCC, DFS_FCC3, PSCAN_FCC, NO_REQ,
+ BM(F1_5280_5320, F6_5745_5825, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1),
+ BM(T1_5290_5290, T1_5760_5800, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1),
+ BM(T1_5765_5805, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1),
+ BMZERO,
+ BMZERO,
+ CHAN_TURBO_G_BMZERO
+ },
+
+ {APL4, FCC, NO_DFS, NO_PSCAN, NO_REQ,
+ BM(F5_5180_5240, F9_5745_5825, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1),
+ BM(T1_5210_5210, T3_5760_5800, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1),
+ BM(T1_5200_5200, T3_5765_5805, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1),
+ BMZERO,
+ BMZERO,
+ CHAN_TURBO_G_BMZERO
+ },
+
+ {APL5, FCC, NO_DFS, NO_PSCAN, NO_REQ,
+ BM(F2_5745_5825, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1),
+ BM(T4_5760_5800, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1),
+ BM(T4_5765_5805, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1),
+ BMZERO,
+ BMZERO,
+ CHAN_TURBO_G_BMZERO
+ },
+
+ {APL6, ETSI, DFS_ETSI, PSCAN_FCC_T | PSCAN_FCC , NO_REQ,
+ BM(F9_5180_5240, F2_5260_5320, F3_5745_5825, -1, -1, -1, -1, -1, -1, -1, -1, -1),
+ BM(T2_5210_5210, T1_5250_5290, T1_5760_5800, -1, -1, -1, -1, -1, -1, -1, -1, -1),
+ BM(T1_5200_5280, T5_5765_5805, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1),
+ BMZERO,
+ BMZERO,
+ CHAN_TURBO_G_BMZERO
+ },
+
+ {APL7, FCC, DFS_FCC3 | DFS_ETSI, PSCAN_FCC | PSCAN_ETSI , NO_REQ,
+ BM(F2_5280_5320, F2_5500_5580, F3_5660_5720, F7_5745_5825, -1, -1, -1, -1, -1, -1, -1, -1),
+ BM(T3_5290_5290, T5_5760_5800, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1),
+ BM(T1_5540_5660, T6_5765_5805, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1),
+ BMZERO,
+ BMZERO,
+ CHAN_TURBO_G_BMZERO
+ },
+
+ {APL8, ETSI, NO_DFS, NO_PSCAN, DISALLOW_ADHOC_11A|DISALLOW_ADHOC_11A_TURB,
+ BM(F6_5260_5320, F4_5745_5825, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1),
+ BM(T2_5290_5290, T2_5760_5800, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1),
+ BM(T1_5280_5280, T1_5765_5805, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1),
+ BMZERO,
+ BMZERO,
+ CHAN_TURBO_G_BMZERO
+ },
+
+ {APL9, ETSI, DFS_ETSI, PSCAN_ETSI, DISALLOW_ADHOC_11A|DISALLOW_ADHOC_11A_TURB,
+ BM(F9_5180_5240, F2_5260_5320, F1_5500_5620, F3_5745_5805, -1, -1, -1, -1, -1, -1, -1, -1),
+ BM(T3_5290_5290, T5_5760_5800, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1),
+ BM(T1_5540_5660, T6_5765_5805, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1),
+ BMZERO,
+ BMZERO,
+ CHAN_TURBO_G_BMZERO
+ },
+
+ {APL10, ETSI, DFS_ETSI, PSCAN_ETSI , DISALLOW_ADHOC_11A|DISALLOW_ADHOC_11A_TURB,
+ BM(F9_5180_5240, F2_5260_5320, F5_5500_5700, F3_5745_5805, -1, -1, -1, -1, -1, -1, -1, -1),
+ BM(T3_5290_5290, T5_5760_5800, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1),
+ BM(T1_5540_5660, T6_5765_5805, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1),
+ BMZERO,
+ BMZERO,
+ CHAN_TURBO_G_BMZERO
+ },
+
+ {APL11, ETSI, DFS_ETSI, PSCAN_ETSI , DISALLOW_ADHOC_11A|DISALLOW_ADHOC_11A_TURB,
+ BM(F9_5180_5240, F2_5260_5320, F5_5500_5700, F7_5745_5825, F1_5845_5865, -1, -1, -1, -1, -1, -1, -1),
+ BM(T3_5290_5290, T5_5760_5800, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1),
+ BM(T1_5540_5660, T6_5765_5805, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1),
+ BMZERO,
+ BMZERO,
+ CHAN_TURBO_G_BMZERO
+ },
+
+ {APL12, ETSI, DFS_ETSI, PSCAN_ETSI, DISALLOW_ADHOC_11A|DISALLOW_ADHOC_11A_TURB,
+ BM(F5_5180_5240, F1_5500_5560, F1_5745_5765, -1, -1, -1, -1, -1, -1, -1, -1, -1),
+ BM(T2_5760_5800, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1),
+ BM(T1_5765_5805, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1),
+ BMZERO,
+ BMZERO,
+ CHAN_TURBO_G_BMZERO
+ },
+
+ {ETSI1, ETSI, DFS_ETSI, PSCAN_ETSI, DISALLOW_ADHOC_11A | DISALLOW_ADHOC_11A_TURB,
+ BM(F2_5180_5240, F2_5260_5320, F2_5500_5700, -1, -1, -1, -1, -1, -1, -1, -1, -1),
+ BM(T1_5210_5290, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1),
+ BM(T2_5200_5280, T2_5540_5660, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1),
+ BMZERO,
+ BMZERO,
+ CHAN_TURBO_G_BMZERO
+ },
+
+ {ETSI2, ETSI, DFS_ETSI, PSCAN_ETSI, DISALLOW_ADHOC_11A | DISALLOW_ADHOC_11A_TURB,
+ BM(F3_5180_5240, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1),
+ BM(T3_5210_5210, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1),
+ BM(T2_5200_5200, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1),
+ BMZERO,
+ BMZERO,
+ CHAN_TURBO_G_BMZERO
+ },
+
+ {ETSI3, ETSI, DFS_ETSI, PSCAN_ETSI, DISALLOW_ADHOC_11A | DISALLOW_ADHOC_11A_TURB,
+ BM(F4_5180_5240, F2_5260_5320, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1),
+ BM(T1_5210_5290, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1),
+ BM(T2_5200_5280, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1),
+ BMZERO,
+ BMZERO,
+ CHAN_TURBO_G_BMZERO
+ },
+
+ {ETSI4, ETSI, DFS_ETSI, PSCAN_ETSI, DISALLOW_ADHOC_11A | DISALLOW_ADHOC_11A_TURB,
+ BM(F3_5180_5240, F1_5260_5320, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1),
+ BM(T2_5210_5290, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1),
+ BM(T3_5200_5280, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1),
+ BMZERO,
+ BMZERO,
+ CHAN_TURBO_G_BMZERO
+ },
+
+ {ETSI5, ETSI, DFS_ETSI, PSCAN_ETSI, DISALLOW_ADHOC_11A | DISALLOW_ADHOC_11A_TURB,
+ BM(F1_5180_5240, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1),
+ BM(T4_5210_5210, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1),
+ BM(T3_5200_5200, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1),
+ BMZERO,
+ BMZERO,
+ CHAN_TURBO_G_BMZERO
+ },
+
+ {ETSI6, ETSI, DFS_ETSI, PSCAN_ETSI, DISALLOW_ADHOC_11A | DISALLOW_ADHOC_11A_TURB,
+ BM(F5_5180_5240, F1_5260_5280, F3_5500_5700, -1, -1, -1, -1, -1, -1, -1, -1, -1),
+ BM(T1_5210_5250, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1),
+ BM(T4_5200_5280, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1),
+ BMZERO,
+ BMZERO,
+ CHAN_TURBO_G_BMZERO
+ },
+
+ {ETSI8, ETSI, DFS_ETSI, PSCAN_ETSI, DISALLOW_ADHOC_11A | DISALLOW_ADHOC_11A_TURB,
+ BM(F4_5180_5240, F2_5260_5320, F1_5660_5700, F4_5745_5825, -1, -1, -1, -1, -1, -1, -1, -1),
+ BM(T1_5210_5290, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1),
+ BM(T2_5200_5280, T2_5540_5660, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1),
+ BMZERO,
+ BMZERO,
+ BMZERO
+ },
+
+ {ETSI9, ETSI, DFS_ETSI, PSCAN_ETSI, DISALLOW_ADHOC_11A | DISALLOW_ADHOC_11A_TURB,
+ BM(F4_5180_5240, F2_5260_5320, F1_5500_5660, F8_5745_5825, -1, -1, -1, -1, -1, -1, -1, -1),
+ BM(T1_5210_5290, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1),
+ BM(T2_5200_5280, T2_5540_5660, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1),
+ BMZERO,
+ BMZERO,
+ BMZERO
+ },
+
+ {FCC1, FCC, NO_DFS, NO_PSCAN, NO_REQ,
+ BM(F2_5180_5240, F4_5260_5320, F5_5745_5825, -1, -1, -1, -1, -1, -1, -1, -1, -1),
+ BM(T6_5210_5210, T2_5250_5290, T6_5760_5800, -1, -1, -1, -1, -1, -1, -1, -1, -1),
+ BM(T1_5200_5240, T2_5280_5280, T7_5765_5805, -1, -1, -1, -1, -1, -1, -1, -1, -1),
+ BMZERO,
+ BMZERO,
+ CHAN_TURBO_G_BMZERO
+ },
+
+ {FCC2, FCC, NO_DFS, NO_PSCAN, NO_REQ,
+ BM(F6_5180_5240, F5_5260_5320, F6_5745_5825, -1, -1, -1, -1, -1, -1, -1, -1, -1),
+ BM(T7_5210_5210, T3_5250_5290, T2_5760_5800, -1, -1, -1, -1, -1, -1, -1, -1, -1),
+ BM(T7_5200_5200, T1_5240_5240, T2_5280_5280, T1_5765_5805, -1, -1, -1, -1, -1, -1, -1, -1),
+ BMZERO,
+ BMZERO,
+ CHAN_TURBO_G_BMZERO
+ },
+
+ {FCC3, FCC, DFS_FCC3, PSCAN_FCC | PSCAN_FCC_T, NO_REQ,
+ BM(F2_5180_5240, F3_5260_5320, F1_5500_5720, F5_5745_5825, -1, -1, -1, -1, -1, -1, -1, -1),
+ BM(T6_5210_5210, T2_5760_5800, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1),
+ BM(T4_5200_5200, T8_5765_5805, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1),
+ BMZERO,
+ BMZERO,
+ CHAN_TURBO_G_BMZERO
+ },
+ /*
+
+ Bug Fix: EV 98583 Public Safety channel
+ Exclude the following channel in FCC Public safety domain
+ Uni-1: 5180, 5200, 5220, 5240
+ Uni-2: 5260, 5280, 5300, 5320
+ Uni-3: 5745, 5765, 5785, 5805, 5825
+ */
+ {FCC4, FCC, DFS_FCC3, PSCAN_FCC | PSCAN_FCC_T, NO_REQ,
+ BM(F1_4942_4987, F1_4945_4985, F1_4950_4980, -1, -1, -1, -1, -1, -1, -1, -1, -1),
+ BM(T8_5210_5210, T4_5250_5290, T7_5760_5800, -1, -1, -1, -1, -1, -1, -1, -1, -1),
+ BM(T1_5200_5240, T1_5280_5280, T9_5765_5805, -1, -1, -1, -1, -1, -1, -1, -1, -1),
+ BMZERO,
+ BMZERO,
+ CHAN_TURBO_G_BMZERO
+ },
+
+ {FCC5, FCC, NO_DFS, NO_PSCAN, NO_REQ,
+ BM(F2_5180_5240, F6_5745_5825, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1),
+ BM(T6_5210_5210, T2_5760_5800, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1),
+ BM(T8_5200_5200, T7_5765_5805, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1),
+ BMZERO,
+ BMZERO,
+ CHAN_TURBO_G_BMZERO
+ },
+
+ {FCC6, FCC, DFS_FCC3, PSCAN_FCC, NO_REQ,
+ BM(F8_5180_5240, F5_5260_5320, F1_5500_5580, F2_5660_5720, F6_5745_5825, -1, -1, -1, -1, -1, -1, -1),
+ BM(T7_5210_5210, T3_5250_5290, T2_5760_5800, -1, -1, -1, -1, -1, -1, -1, -1, -1),
+ BM(T7_5200_5200, T1_5240_5240, T2_5280_5280, T1_5765_5805, -1, -1, -1, -1, -1, -1, -1, -1),
+ BMZERO,
+ BMZERO,
+ CHAN_TURBO_G_BMZERO
+ },
+
+ {MKK1, MKK, DFS_MKK4, PSCAN_MKK1 | PSCAN_MKK3, DISALLOW_ADHOC_11A_TURB,
+ BM(F1_5170_5230, F10_5180_5240, F7_5260_5320, F4_5500_5700, -1, -1, -1, -1, -1, -1, -1, -1),
+ BM(T7_5210_5210, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1),
+ BM(T5_5200_5200, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1),
+ BMZERO,
+ BMZERO,
+ CHAN_TURBO_G_BMZERO
+ },
+
+ {MKK2, MKK, DFS_MKK4, PSCAN_MKK2 | PSCAN_MKK3, DISALLOW_ADHOC_11A_TURB,
+ BM(F2_4915_4925, F2_4935_4945, F1_4920_4980, F1_5035_5040, F2_5055_5055, F1_5040_5080, F1_5170_5230, F10_5180_5240, -1, -1, -1, -1),
+ BM(T7_5210_5210, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1),
+ BM(T5_5200_5200, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1),
+ BMZERO,
+ BMZERO,
+ CHAN_TURBO_G_BMZERO
+ },
+
+ /* UNI-1 even */
+ {MKK3, MKK, NO_DFS, PSCAN_MKK3, DISALLOW_ADHOC_11A_TURB,
+ BM(F4_5180_5240, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1),
+ BM(T9_5210_5210, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1),
+ BM(T1_5200_5200, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1),
+ BMZERO,
+ BMZERO,
+ CHAN_TURBO_G_BMZERO
+ },
+
+ /* UNI-1 even + UNI-2 */
+ {MKK4, MKK, DFS_MKK4, PSCAN_MKK3, DISALLOW_ADHOC_11A_TURB,
+ BM(F4_5180_5240, F2_5260_5320, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1),
+ BM(T10_5210_5210, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1),
+ BM(T6_5200_5200, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1),
+ BMZERO,
+ BMZERO,
+ CHAN_TURBO_G_BMZERO
+ },
+
+ /* UNI-1 even + UNI-2 + mid-band */
+ {MKK5, MKK, DFS_MKK4, PSCAN_MKK3, DISALLOW_ADHOC_11A_TURB,
+ BM(F4_5180_5240, F2_5260_5320, F6_5500_5700, -1, -1, -1, -1, -1, -1, -1, -1, -1),
+ BM(T3_5210_5290, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1),
+ BM(T5_5200_5280, T3_5540_5660, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1),
+ BMZERO,
+ BMZERO,
+ CHAN_TURBO_G_BMZERO
+ },
+
+ /* UNI-1 odd + even */
+ {MKK6, MKK, NO_DFS, PSCAN_MKK1, DISALLOW_ADHOC_11A_TURB,
+ BM(F2_5170_5230, F4_5180_5240, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1),
+ BM(T3_5210_5210, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1),
+ BM(T6_5200_5200, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1),
+ BMZERO,
+ BMZERO,
+ CHAN_TURBO_G_BMZERO
+ },
+
+ /* UNI-1 odd + UNI-1 even + UNI-2 */
+ {MKK7, MKK, DFS_MKK4, PSCAN_MKK1 | PSCAN_MKK3 , DISALLOW_ADHOC_11A_TURB,
+ BM(F2_5170_5230, F4_5180_5240, F2_5260_5320, -1, -1, -1, -1, -1, -1, -1, -1, -1),
+ BM(T3_5210_5290, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1),
+ BM(T5_5200_5280, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1),
+ BMZERO,
+ BMZERO,
+ CHAN_TURBO_G_BMZERO
+ },
+
+ /* UNI-1 odd + UNI-1 even + UNI-2 + mid-band */
+ {MKK8, MKK, DFS_MKK4, PSCAN_MKK1 | PSCAN_MKK3 , DISALLOW_ADHOC_11A_TURB,
+ BM(F2_5170_5230, F4_5180_5240, F2_5260_5320, F6_5500_5700, -1, -1, -1, -1, -1, -1, -1, -1),
+ BM(T3_5210_5290, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1),
+ BM(T5_5200_5280, T3_5540_5660, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1),
+ BMZERO,
+ BMZERO,
+ CHAN_TURBO_G_BMZERO
+ },
+
+ /* UNI-1 even + 4.9 GHZ */
+ {MKK9, MKK, NO_DFS, PSCAN_MKK2 | PSCAN_MKK3, DISALLOW_ADHOC_11A_TURB,
+ BM(F1_4912_4947, F1_5032_5057, F1_4915_4925, F1_4935_4945, F2_4920_4980, F1_5035_5045, F1_5055_5055, F2_5040_5080, F4_5180_5240, -1, -1, -1),
+ BM(T9_5210_5210, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1),
+ BM(T1_5200_5200, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1),
+ BMZERO,
+ BMZERO,
+ CHAN_TURBO_G_BMZERO
+ },
+
+ /* UNI-1 even + UNI-2 + 4.9 GHZ */
+ {MKK10, MKK, DFS_MKK4, PSCAN_MKK2 | PSCAN_MKK3, DISALLOW_ADHOC_11A_TURB,
+ BM(F1_4912_4947, F1_5032_5057, F1_4915_4925, F1_4935_4945, F2_4920_4980, F1_5035_5045, F1_5055_5055, F2_5040_5080, F4_5180_5240, F2_5260_5320, -1, -1),
+ BM(T3_5210_5290, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1),
+ BM(T1_5200_5280, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1),
+ BMZERO,
+ BMZERO,
+ CHAN_TURBO_G_BMZERO
+ },
+
+ /* Japan UNI-1 even + UNI-2 + mid-band + 4.9GHz */
+ {MKK11, MKK, DFS_MKK4, PSCAN_MKK3, DISALLOW_ADHOC_11A_TURB,
+ BM(F1_4912_4947, F1_5032_5057, F1_4915_4925, F1_4935_4945, F2_4920_4980, F1_5035_5045, F1_5055_5055, F2_5040_5080, F4_5180_5240, F2_5260_5320, F6_5500_5700, -1),
+ BM(T3_5210_5290, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1),
+ BM(T1_5200_5280, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1),
+ BMZERO,
+ BMZERO,
+ CHAN_TURBO_G_BMZERO
+ },
+
+ /* Japan UNI-1 even + UNI-1 odd + UNI-2 + mid-band + 4.9GHz */
+ {MKK12, MKK, DFS_MKK4, PSCAN_MKK1 | PSCAN_MKK3, DISALLOW_ADHOC_11A_TURB,
+ BM(F1_4915_4925, F1_4935_4945, F2_4920_4980, F1_5040_5040, F1_5055_5055, F2_5040_5080, F2_5170_5230, F4_5180_5240, F2_5260_5320, F6_5500_5700, -1, -1),
+ BM(T3_5210_5290, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1),
+ BM(T1_5200_5280, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1),
+ BMZERO,
+ BMZERO,
+ CHAN_TURBO_G_BMZERO
+ },
+
+ /* UNI-1 odd + UNI-1 even + UNI-2 + mid-band */
+ {MKK13, MKK, DFS_MKK4, PSCAN_MKK1 | PSCAN_MKK3 , DISALLOW_ADHOC_11A | DISALLOW_ADHOC_11A_TURB,
+ BM(F2_5170_5230, F7_5180_5240, F2_5260_5320, F6_5500_5700, -1, -1, -1, -1, -1, -1, -1, -1),
+ BMZERO,
+ BMZERO,
+ BMZERO,
+ BMZERO,
+ CHAN_TURBO_G_BMZERO
+ },
+
+ /* UNI-1 odd + UNI-1 even + 4.9GHz */
+ {MKK14, MKK, DFS_MKK4, PSCAN_MKK1, DISALLOW_ADHOC_11A_TURB,
+ BM(F1_4915_4925, F1_4935_4945, F2_4920_4980, F1_5040_5040, F2_5040_5080, F1_5055_5055, F2_5170_5230, F4_5180_5240, -1, -1, -1, -1),
+ BMZERO,
+ BMZERO,
+ BMZERO,
+ BMZERO,
+ CHAN_TURBO_G_BMZERO
+ },
+
+ /* UNI-1 odd + UNI-1 even + UNI-2 + 4.9GHz */
+ {MKK15, MKK, DFS_MKK4, PSCAN_MKK1 | PSCAN_MKK3, DISALLOW_ADHOC_11A_TURB,
+ BM(F1_4915_4925, F1_4935_4945, F2_4920_4980, F1_5040_5040, F2_5040_5080, F1_5055_5055, F2_5170_5230, F4_5180_5240, F2_5260_5320, -1, -1, -1),
+ BMZERO,
+ BMZERO,
+ BMZERO,
+ BMZERO,
+ CHAN_TURBO_G_BMZERO
+ },
+
+ /*=== 2 GHz ===*/
+
+ /* Defined here to use when 2G channels are authorised for country K2 */
+ {APLD, NO_CTL, NO_DFS, NO_PSCAN, NO_REQ,
+ CHAN_11A_BMZERO
+ CHAN_11A_BMZERO
+ CHAN_11A_BMZERO
+ BM(F2_2312_2372, F4_2412_2472, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1),
+ BM(G2_2312_2372,G4_2412_2472, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1),
+ CHAN_TURBO_G_BMZERO
+ },
+
+ {ETSIA, NO_CTL, NO_DFS, PSCAN_ETSIA, DISALLOW_ADHOC_11A | DISALLOW_ADHOC_11A_TURB,
+ CHAN_11A_BMZERO
+ CHAN_11A_BMZERO
+ CHAN_11A_BMZERO
+ BM(F1_2457_2472, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1),
+ BM(G1_2457_2472, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1),
+ CHAN_TURBO_G_BM(T2_2437_2437, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1)
+ },
+
+ {ETSIB, ETSI, NO_DFS, PSCAN_ETSIB, DISALLOW_ADHOC_11A | DISALLOW_ADHOC_11A_TURB,
+ CHAN_11A_BMZERO
+ CHAN_11A_BMZERO
+ CHAN_11A_BMZERO
+ BM(F1_2432_2442, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1),
+ BM(G1_2432_2442, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1),
+ CHAN_TURBO_G_BM(T2_2437_2437, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1)
+ },
+
+ {ETSIC, ETSI, NO_DFS, PSCAN_ETSIC, DISALLOW_ADHOC_11A | DISALLOW_ADHOC_11A_TURB,
+ CHAN_11A_BMZERO
+ CHAN_11A_BMZERO
+ CHAN_11A_BMZERO
+ BM(F3_2412_2472, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1),
+ BM(G3_2412_2472, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1),
+ CHAN_TURBO_G_BM(T2_2437_2437, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1)
+ },
+
+ {FCCA, FCC, NO_DFS, NO_PSCAN, NO_REQ,
+ CHAN_11A_BMZERO
+ CHAN_11A_BMZERO
+ CHAN_11A_BMZERO
+ BM(F1_2412_2462, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1),
+ BM(G1_2412_2462, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1),
+ CHAN_TURBO_G_BM(T2_2437_2437, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1)
+ },
+
+ {MKKA, MKK, NO_DFS, PSCAN_MKKA | PSCAN_MKKA_G | PSCAN_MKKA1 | PSCAN_MKKA1_G | PSCAN_MKKA2 | PSCAN_MKKA2_G, DISALLOW_ADHOC_11A_TURB,
+ CHAN_11A_BMZERO
+ CHAN_11A_BMZERO
+ CHAN_11A_BMZERO
+ BM(F2_2412_2462, F1_2467_2472, F2_2484_2484,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1),
+ BM(G2_2412_2472, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1),
+ CHAN_TURBO_G_BM(T2_2437_2437, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1)
+ },
+
+ {MKKC, MKK, NO_DFS, NO_PSCAN, NO_REQ,
+ CHAN_11A_BMZERO
+ CHAN_11A_BMZERO
+ CHAN_11A_BMZERO
+ BM(F2_2412_2472, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1),
+ BM(G2_2412_2472, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1),
+ CHAN_TURBO_G_BM(T2_2437_2437, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1)
+ },
+
+ {WORLD, ETSI, NO_DFS, NO_PSCAN, NO_REQ,
+ CHAN_11A_BMZERO
+ CHAN_11A_BMZERO
+ CHAN_11A_BMZERO
+ BM(F4_2412_2472, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1),
+ BM(G4_2412_2472, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1),
+ CHAN_TURBO_G_BM(T2_2437_2437, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1)
+ },
+
+ {WOR0_WORLD, NO_CTL, DFS_FCC3 | DFS_ETSI, PSCAN_WWR, ADHOC_PER_11D,
+ CHAN_11A_BM(W1_5260_5320, W1_5180_5240, W1_5745_5825, W1_5500_5700,
+ -1, -1, -1, -1, -1, -1, -1, -1)
+ CHAN_11A_BM(WT1_5210_5250, WT1_5290_5290, WT1_5760_5800,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1)
+ CHAN_11A_BMZERO
+ BM(W1_2412_2412, W1_2437_2442, W1_2462_2462, W1_2472_2472, W1_2417_2432,
+ W1_2447_2457, W1_2467_2467, W1_2484_2484, -1, -1, -1, -1),
+ BM(WG1_2412_2472, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1),
+ CHAN_TURBO_G_BM(T3_2437_2437, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1)
+ },
+
+ {WOR01_WORLD, NO_CTL, DFS_FCC3 | DFS_ETSI, PSCAN_WWR, ADHOC_PER_11D,
+ CHAN_11A_BM(W1_5260_5320, W1_5180_5240, W1_5170_5230, W1_5745_5825,
+ W1_5500_5700, -1, -1, -1, -1, -1, -1, -1)
+ CHAN_11A_BM(WT1_5210_5250, WT1_5290_5290, WT1_5760_5800,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1)
+ CHAN_11A_BMZERO
+ BM(W1_2412_2412, W1_2437_2442, W1_2462_2462, W1_2417_2432, W1_2447_2457,
+ -1, -1, -1, -1, -1, -1, -1),
+ BM(WG1_2412_2462, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1),
+ CHAN_TURBO_G_BM(T3_2437_2437, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1)
+ },
+
+ {WOR02_WORLD, NO_CTL, DFS_FCC3 | DFS_ETSI, PSCAN_WWR, ADHOC_PER_11D,
+ CHAN_11A_BM(W1_5260_5320, W1_5180_5240, W1_5170_5230, W1_5745_5825,
+ W1_5500_5700, -1, -1, -1, -1, -1, -1, -1)
+ CHAN_11A_BM(WT1_5210_5250, WT1_5290_5290, WT1_5760_5800,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1)
+ CHAN_11A_BMZERO
+ BM(W1_2412_2412, W1_2437_2442, W1_2462_2462, W1_2472_2472, W1_2417_2432,
+ W1_2447_2457, W1_2467_2467, -1, -1, -1, -1, -1),
+ BM(WG1_2412_2472, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1),
+ CHAN_TURBO_G_BM(T3_2437_2437, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1)
+ },
+
+ {EU1_WORLD, NO_CTL, DFS_FCC3 | DFS_ETSI, PSCAN_WWR, ADHOC_PER_11D,
+ CHAN_11A_BM(W1_5260_5320, W1_5180_5240, W1_5170_5230, W1_5745_5825,
+ W1_5500_5700, -1, -1, -1, -1, -1, -1, -1)
+ CHAN_11A_BM(WT1_5210_5250, WT1_5290_5290, WT1_5760_5800,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1)
+ CHAN_11A_BMZERO
+ BM(W1_2412_2412, W1_2437_2442, W1_2462_2462, W2_2472_2472, W1_2417_2432,
+ W1_2447_2457, W2_2467_2467, -1, -1, -1, -1, -1),
+ BM(WG2_2412_2472, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1),
+ CHAN_TURBO_G_BM(T3_2437_2437, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1)
+ },
+
+ {WOR1_WORLD, NO_CTL, DFS_FCC3 | DFS_ETSI, PSCAN_WWR, ADHOC_NO_11A,
+ CHAN_11A_BM(W1_5260_5320, W1_5180_5240, W1_5170_5230, W1_5745_5825,
+ W1_5500_5700, -1, -1, -1, -1, -1, -1, -1)
+ CHAN_11A_BMZERO
+ CHAN_11A_BMZERO
+ BM(W1_2412_2412, W1_2437_2442, W1_2462_2462, W1_2472_2472, W1_2417_2432,
+ W1_2447_2457, W1_2467_2467, W1_2484_2484, -1, -1, -1, -1),
+ BM(WG1_2412_2472, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1),
+ CHAN_TURBO_G_BM(T3_2437_2437, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1)
+ },
+
+ {WOR2_WORLD, NO_CTL, DFS_FCC3 | DFS_ETSI, PSCAN_WWR, ADHOC_NO_11A,
+ CHAN_11A_BM(W1_5260_5320, W1_5180_5240, W1_5170_5230, W1_5745_5825,
+ W1_5500_5700, -1, -1, -1, -1, -1, -1, -1)
+ CHAN_11A_BM(WT1_5210_5250, WT1_5290_5290, WT1_5760_5800,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1)
+ CHAN_11A_BMZERO
+ BM(W1_2412_2412, W1_2437_2442, W1_2462_2462, W1_2472_2472, W1_2417_2432,
+ W1_2447_2457, W1_2467_2467, W1_2484_2484, -1, -1, -1, -1),
+ BM(WG1_2412_2472, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1),
+ CHAN_TURBO_G_BM(T3_2437_2437, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1)
+ },
+
+ {WOR3_WORLD, NO_CTL, DFS_FCC3 | DFS_ETSI, PSCAN_WWR, ADHOC_PER_11D,
+ CHAN_11A_BM(W1_5260_5320, W1_5180_5240, W1_5170_5230, W1_5745_5825,
+ -1, -1, -1, -1, -1, -1, -1, -1)
+ CHAN_11A_BM(WT1_5210_5250, WT1_5290_5290, WT1_5760_5800,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1)
+ CHAN_11A_BMZERO
+ BM(W1_2412_2412, W1_2437_2442, W1_2462_2462, W1_2472_2472, W1_2417_2432,
+ W1_2447_2457, W1_2467_2467, -1, -1, -1, -1, -1),
+ BM(WG1_2412_2472, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1),
+ CHAN_TURBO_G_BM(T3_2437_2437, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1)
+ },
+
+ {WOR4_WORLD, NO_CTL, DFS_FCC3 | DFS_ETSI, PSCAN_WWR, ADHOC_NO_11A,
+ CHAN_11A_BM(W1_5260_5320, W1_5180_5240, W1_5745_5825,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1)
+ CHAN_11A_BM(WT1_5210_5250, WT1_5290_5290, WT1_5760_5800,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1)
+ CHAN_11A_BMZERO
+ BM(W1_2412_2412, W1_2437_2442, W1_2462_2462, W1_2417_2432, W1_2447_2457,
+ -1, -1, -1, -1, -1, -1, -1),
+ BM(WG1_2412_2462, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1),
+ CHAN_TURBO_G_BM(T3_2437_2437, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1)
+ },
+
+ {WOR5_ETSIC, NO_CTL, DFS_FCC3 | DFS_ETSI, PSCAN_WWR, ADHOC_NO_11A,
+ CHAN_11A_BM(W1_5260_5320, W1_5180_5240, W1_5745_5825,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1)
+ CHAN_11A_BMZERO
+ CHAN_11A_BMZERO
+ BM(W1_2412_2412, W1_2437_2442, W1_2462_2462, W1_2472_2472, W1_2417_2432,
+ W1_2447_2457, W1_2467_2467, -1, -1, -1, -1, -1),
+ BM(WG1_2412_2472, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1),
+ CHAN_TURBO_G_BM(T3_2437_2437, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1)
+ },
+
+ {WOR9_WORLD, NO_CTL, DFS_FCC3 | DFS_ETSI, PSCAN_WWR, ADHOC_NO_11A,
+ CHAN_11A_BM(W1_5260_5320, W1_5180_5240, W1_5745_5825, W1_5500_5700,
+ -1, -1, -1, -1, -1, -1, -1, -1)
+ CHAN_11A_BM(WT1_5210_5250, WT1_5290_5290, WT1_5760_5800,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1)
+ CHAN_11A_BMZERO
+ BM(W1_2412_2412, W1_2437_2442, W1_2462_2462, W1_2417_2432, W1_2447_2457,
+ -1, -1, -1, -1, -1, -1, -1),
+ BM(WG1_2412_2462, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1),
+ CHAN_TURBO_G_BM(T3_2437_2437, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1)
+ },
+
+ {WORA_WORLD, NO_CTL, DFS_FCC3 | DFS_ETSI, PSCAN_WWR, ADHOC_NO_11A,
+ CHAN_11A_BM(W1_5260_5320, W1_5180_5240, W1_5745_5825, W1_5500_5700,
+ -1, -1, -1, -1, -1, -1, -1, -1)
+ CHAN_11A_BMZERO
+ CHAN_11A_BMZERO
+ BM(W1_2412_2412, W1_2437_2442, W1_2462_2462, W1_2472_2472, W1_2417_2432,
+ W1_2447_2457, W1_2467_2467, -1, -1, -1, -1, -1),
+ BM(WG1_2412_2472, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1),
+ CHAN_TURBO_G_BM(T3_2437_2437, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1)
+ },
+
+ {WORB_WORLD, NO_CTL, DFS_FCC3 | DFS_ETSI, PSCAN_WWR, ADHOC_NO_11A,
+ CHAN_11A_BM(W1_5260_5320, W1_5180_5240, W1_5500_5700,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1)
+ CHAN_11A_BMZERO
+ CHAN_11A_BMZERO
+ BM(W1_2412_2412, W1_2437_2442, W1_2462_2462, W1_2472_2472, W1_2417_2432,
+ W1_2447_2457, W1_2467_2467, -1, -1, -1, -1, -1),
+ BM(WG1_2412_2472, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1),
+ CHAN_TURBO_G_BM(T3_2437_2437, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1)
+ },
+
+ {WORC_WORLD, NO_CTL, DFS_FCC3 | DFS_ETSI, PSCAN_WWR, ADHOC_PER_11D,
+ CHAN_11A_BM(W1_5260_5320, W1_5180_5240, W1_5500_5700, W1_5745_5825,
+ -1, -1, -1, -1, -1, -1, -1, -1)
+ CHAN_11A_BMZERO
+ CHAN_11A_BMZERO
+ BM(W1_2412_2412, W1_2437_2442, W1_2462_2462, W1_2472_2472, W1_2417_2432,
+ W1_2447_2457, W1_2467_2467, -1, -1, -1, -1, -1),
+ BM(WG1_2412_2472, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1),
+ CHAN_TURBO_G_BM(T3_2437_2437, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1)
+ },
+
+ {NULL1, NO_CTL, NO_DFS, NO_PSCAN, NO_REQ,
+ CHAN_11A_BMZERO
+ CHAN_11A_BMZERO
+ CHAN_11A_BMZERO
+ BMZERO,
+ BMZERO,
+ CHAN_TURBO_G_BMZERO
+ },
+};
+
+static const struct cmode modes[] = {
+ { REGDMN_MODE_TURBO, IEEE80211_CHAN_ST}, /* TURBO means 11a Static Turbo */
+ { REGDMN_MODE_11A, IEEE80211_CHAN_A},
+ { REGDMN_MODE_11B, IEEE80211_CHAN_B},
+ { REGDMN_MODE_11G, IEEE80211_CHAN_PUREG},
+ { REGDMN_MODE_11G_TURBO, IEEE80211_CHAN_108G},
+ { REGDMN_MODE_11A_TURBO, IEEE80211_CHAN_108A},
+ { REGDMN_MODE_11NG_HT20, IEEE80211_CHAN_11NG_HT20},
+ { REGDMN_MODE_11NG_HT40PLUS, IEEE80211_CHAN_11NG_HT40PLUS},
+ { REGDMN_MODE_11NG_HT40MINUS, IEEE80211_CHAN_11NG_HT40MINUS},
+ { REGDMN_MODE_11NA_HT20, IEEE80211_CHAN_11NA_HT20},
+ { REGDMN_MODE_11NA_HT40PLUS, IEEE80211_CHAN_11NA_HT40PLUS},
+ { REGDMN_MODE_11NA_HT40MINUS, IEEE80211_CHAN_11NA_HT40MINUS},
+ { REGDMN_MODE_11AC_VHT20, IEEE80211_CHAN_11AC_VHT20},
+ { REGDMN_MODE_11AC_VHT40PLUS, IEEE80211_CHAN_11AC_VHT40PLUS},
+ { REGDMN_MODE_11AC_VHT40MINUS, IEEE80211_CHAN_11AC_VHT40MINUS},
+ { REGDMN_MODE_11AC_VHT80, IEEE80211_CHAN_11AC_VHT80},
+ { REGDMN_MODE_11AC_VHT20_2G, IEEE80211_CHAN_11AC_VHT20_2G},
+ { REGDMN_MODE_11AC_VHT40_2G, IEEE80211_CHAN_11AC_VHT40_2G},
+ { REGDMN_MODE_11AC_VHT80_2G, IEEE80211_CHAN_11AC_VHT80_2G},
+};
diff --git a/CORE/SERVICES/WMA/wma.c b/CORE/SERVICES/WMA/wma.c
index 64b65dadbca3..46444cc84e9b 100644
--- a/CORE/SERVICES/WMA/wma.c
+++ b/CORE/SERVICES/WMA/wma.c
@@ -45,7 +45,7 @@
-------- --- -----------------------------------------
12/03/2013 Ganesh Implementation of WMA APIs.
Kondabattini
- 27/03/2013 Ganesh Rx Management Support added
+ 27/03/2013 Ganesh Rx Management Support added
Babu
==========================================================================*/
@@ -177,7 +177,7 @@ static inline uint8_t wma_parse_mpdudensity(u_int8_t mpdudensity)
/* Function : wma_find_vdev_by_id
* Descriptin : Returns vdev handle for given vdev id.
* Args : @wma - wma handle, @vdev_id - vdev ID
- * Retruns : Returns vdev handle if given vdev id is valid.
+ * Returns : Returns vdev handle if given vdev id is valid.
* Otherwise returns NULL.
*/
static inline void *wma_find_vdev_by_id(tp_wma_handle wma, u_int8_t vdev_id)
@@ -208,7 +208,7 @@ static inline u_int8_t wma_get_vdev_count(tp_wma_handle wma)
* Descriptin : Helper function to know whether given vdev id
* is in AP mode or not.
* Args : @wma - wma handle, @ vdev_id - vdev ID.
- * Retruns : True - if given vdev id is in AP mode.
+ * Returns : True - if given vdev id is in AP mode.
* False - if given vdev id is not in AP mode.
*/
static bool wma_is_vdev_in_ap_mode(tp_wma_handle wma, u_int8_t vdev_id)
@@ -274,9 +274,9 @@ static void *wma_find_vdev_by_bssid(tp_wma_handle wma, u_int8_t *bssid,
/* ############# function definitions ############ */
/* function : wma_swap_bytes
- * Descriptin :
- * Args :
- * Retruns :
+ * Descriptin :
+ * Args :
+ * Retruns :
*/
v_VOID_t wma_swap_bytes(v_VOID_t *pv, v_SIZE_t n)
{
@@ -323,7 +323,7 @@ static struct wma_target_req *wma_find_vdev_req(tp_wma_handle wma,
return req_msg;
}
-static void wma_vdev_start_rsp_ap_mode(tp_wma_handle wma,
+static void wma_vdev_start_rsp(tp_wma_handle wma,
tpAddBssParams add_bss,
wmi_vdev_start_response_event_fixed_param *resp_event)
{
@@ -335,6 +335,7 @@ static void wma_vdev_start_rsp_ap_mode(tp_wma_handle wma,
goto send_fail_resp;
}
#ifndef QCA_WIFI_ISOC
+ if (add_bss->operMode == BSS_OPERATIONAL_MODE_AP) {
wma->interfaces[resp_event->vdev_id].beacon =
vos_mem_malloc(sizeof(struct beacon_info));
@@ -361,6 +362,7 @@ static void wma_vdev_start_rsp_ap_mode(tp_wma_handle wma,
WMA_LOGD("%s: Allocated beacon struct %p, template memory %p\n",
__func__, bcn, bcn->buf);
+ }
#endif
add_bss->status = VOS_STATUS_SUCCESS;
add_bss->bssIdx = resp_event->vdev_id;
@@ -401,9 +403,8 @@ static int wma_vdev_start_resp_handler(void *handle, u_int8_t *cmd_param_info,
params->status = resp_event->status;
wma_send_msg(wma, WDA_SWITCH_CHANNEL_RSP, (void *)params, 0);
} else if (req_msg->msg_type == WDA_ADD_BSS_REQ) {
- wma_vdev_start_rsp_ap_mode(wma,
- (tpAddBssParams) req_msg->user_data,
- resp_event);
+ tpAddBssParams bssParams = (tpAddBssParams) req_msg->user_data;
+ wma_vdev_start_rsp(wma, bssParams, resp_event);
}
vos_timer_destroy(&req_msg->event_timeout);
vos_mem_free(req_msg);
@@ -412,9 +413,9 @@ static int wma_vdev_start_resp_handler(void *handle, u_int8_t *cmd_param_info,
}
/* function : wma_unified_debug_print_event_handler
- * Descriptin :
- * Args :
- * Retruns :
+ * Descriptin :
+ * Args :
+ * Returns :
*/
static int wma_unified_debug_print_event_handler(void *handle, u_int8_t *datap,
u_int32_t len)
@@ -920,6 +921,7 @@ static void wma_send_bcn_buf_ll(tp_wma_handle wma,
wmi_p2p_noa_info *p2p_noa_info = param_buf->p2p_noa_info;
struct p2p_sub_element_noa noa_ie;
u_int8_t i;
+ int status;
bcn = wma->interfaces[vdev_id].beacon;
if (!bcn->buf) {
@@ -1053,9 +1055,13 @@ static void wma_send_bcn_buf_ll(tp_wma_handle wma,
cmd->dtim_flag |= WMI_BCN_SEND_DTIM_BITCTL_SET;
}
- wmi_unified_cmd_send(wma->wmi_handle, wmi_buf, sizeof(*cmd),
+ status = wmi_unified_cmd_send(wma->wmi_handle, wmi_buf, sizeof(*cmd),
WMI_PDEV_SEND_BCN_CMDID);
+ if (status != EOK) {
+ WMA_LOGE("Failed to send WMI_PDEV_SEND_BCN_CMDID command");
+ wmi_buf_free(wmi_buf);
+ }
adf_os_spin_unlock_bh(&bcn->lock);
}
@@ -1164,6 +1170,86 @@ static int wma_gtk_offload_status_event(void *handle, u_int8_t *event,
}
#endif
+#ifdef FEATURE_OEM_DATA_SUPPORT
+static int wma_oem_data_rsp_event_callback(void *handle, u_int8_t *datap,
+ u_int32_t len)
+{
+ tp_wma_handle wma = (tp_wma_handle) handle;
+ WMI_OEM_DATA_RSP_EVENTID_param_tlvs *param_buf;
+ u_int8_t *data;
+ u_int32_t datalen;
+ tStartOemDataRsp *pStartOemDataRsp;
+
+ param_buf = (WMI_OEM_DATA_RSP_EVENTID_param_tlvs *)datap;
+ if (!param_buf) {
+ WMA_LOGE("%s: Received NULL buf ptr from FW", __func__);
+ return -ENOMEM;
+ }
+
+ data = param_buf->data;
+ datalen = param_buf->num_data;
+
+ if (!data) {
+ WMA_LOGE("%s: Received NULL data from FW", __func__);
+ return -EINVAL;
+ }
+
+ if (datalen > OEM_DATA_RSP_SIZE) {
+ WMA_LOGE("%s: Received data len (%d) exceeds max value (%d)",
+ __func__, datalen, OEM_DATA_RSP_SIZE);
+ return -EINVAL;
+ }
+
+ pStartOemDataRsp = vos_mem_malloc(sizeof(tStartOemDataRsp));
+
+ vos_mem_zero(pStartOemDataRsp, sizeof(tStartOemDataRsp));
+ vos_mem_copy(&pStartOemDataRsp->oemDataRsp[0], data, datalen);
+
+ wma_send_msg(wma, WDA_START_OEM_DATA_RSP, (void *)pStartOemDataRsp, 0);
+ vos_mem_free(data);
+ return 0;
+}
+
+static int wma_oem_data_error_report_event_callback(void *handle,
+ u_int8_t *datap, u_int32_t len)
+{
+ tp_wma_handle wma = (tp_wma_handle) handle;
+ WMI_OEM_DATA_ERROR_REPORT_EVENTID_param_tlvs *param_buf;
+ u_int8_t *data;
+ u_int32_t datalen;
+ tStartOemDataRsp *pStartOemDataRsp;
+
+ param_buf = (WMI_OEM_DATA_ERROR_REPORT_EVENTID_param_tlvs *)datap;
+ if (!param_buf) {
+ WMA_LOGE("%s: Received NULL buf ptr from FW", __func__);
+ return -ENOMEM;
+ }
+
+ data = param_buf->data;
+ datalen = param_buf->num_data;
+
+ if (!data) {
+ WMA_LOGE("%s: Received NULL data from FW", __func__);
+ return -EINVAL;
+ }
+
+ if (datalen > OEM_DATA_RSP_SIZE) {
+ WMA_LOGE("%s: Received data len (%d) exceeds max value (%d)",
+ __func__, datalen, OEM_DATA_RSP_SIZE);
+ return -EINVAL;
+ }
+
+ pStartOemDataRsp = vos_mem_malloc(sizeof(tStartOemDataRsp));
+
+ vos_mem_zero(pStartOemDataRsp, sizeof(tStartOemDataRsp));
+ vos_mem_copy(&pStartOemDataRsp->oemDataRsp[0], data, datalen);
+
+ wma_send_msg(wma, WDA_START_OEM_DATA_RSP, (void *)data, 0);
+ vos_mem_free(data);
+ return 0;
+}
+#endif /* FEATURE_OEM_DATA_SUPPORT */
+
/*
* Allocate and init wmi adaptation layer.
*/
@@ -1302,6 +1388,17 @@ VOS_STATUS WDA_open(v_VOID_t *vos_context, v_VOID_t *os_ctx,
wmi_unified_register_event_handler(wma_handle->wmi_handle,
WMI_PEER_STA_KICKOUT_EVENTID,
wma_peer_sta_kickout_event_handler);
+
+#ifdef FEATURE_OEM_DATA_SUPPORT
+ wmi_unified_register_event_handler(wma_handle->wmi_handle,
+ WMI_OEM_DATA_RSP_EVENTID,
+ wma_oem_data_rsp_event_callback);
+
+ wmi_unified_register_event_handler(wma_handle->wmi_handle,
+ WMI_OEM_DATA_ERROR_REPORT_EVENTID,
+ wma_oem_data_error_report_event_callback);
+#endif
+
/* Firmware debug log */
vos_status = dbglog_init(wma_handle->wmi_handle);
if (vos_status != VOS_STATUS_SUCCESS) {
@@ -1325,10 +1422,10 @@ err_wmi_attach:
return vos_status;
}
-/* function : wma_pre_start
- * Descriptin :
- * Args :
- * Retruns :
+/* function : wma_pre_start
+ * Descriptin :
+ * Args :
+ * Returns :
*/
VOS_STATUS wma_pre_start(v_VOID_t *vos_ctx)
{
@@ -1349,8 +1446,8 @@ VOS_STATUS wma_pre_start(v_VOID_t *vos_ctx)
}
/* Open endpoint for ctrl path - WMI <--> HTC */
status = wmi_unified_connect_htc_service(
- wma_handle->wmi_handle,
- wma_handle->htc_handle);
+ wma_handle->wmi_handle,
+ wma_handle->htc_handle);
if (A_OK != status) {
WMA_LOGP("wmi_unified_connect_htc_service");
vos_status = VOS_STATUS_E_FAULT;
@@ -1372,7 +1469,7 @@ VOS_STATUS wma_pre_start(v_VOID_t *vos_ctx)
wma_msg.type = WNI_CFG_DNLD_REQ ;
wma_msg.bodyptr = NULL;
wma_msg.bodyval = 0;
-
+
vos_status = vos_mq_post_message( VOS_MQ_ID_WDA, &wma_msg );
if (VOS_STATUS_SUCCESS !=vos_status) {
WMA_LOGP("Failed to post WNI_CFG_DNLD_REQ msg");
@@ -1387,7 +1484,7 @@ end:
/* function : wma_send_msg
* Descriptin :
* Args :
- * Retruns :
+ * Returns :
*/
static void wma_send_msg(tp_wma_handle wma_handle, u_int16_t msg_type,
void *body_ptr, u_int32_t body_val)
@@ -1401,7 +1498,7 @@ static void wma_send_msg(tp_wma_handle wma_handle, u_int16_t msg_type,
msg.bodyptr = body_ptr;
status = limPostMsgApi(pMac, &msg);
if (VOS_STATUS_SUCCESS != status) {
- if(NULL != body_ptr)
+ if(NULL != body_ptr)
vos_mem_free(body_ptr);
VOS_ASSERT(0) ;
}
@@ -1411,7 +1508,7 @@ static void wma_send_msg(tp_wma_handle wma_handle, u_int16_t msg_type,
/* function : wma_get_txrx_vdev_type
* Descriptin :
* Args :
- * Retruns :
+ * Returns :
*/
enum wlan_op_mode wma_get_txrx_vdev_type(u_int32_t type)
{
@@ -1436,7 +1533,7 @@ enum wlan_op_mode wma_get_txrx_vdev_type(u_int32_t type)
/* function : wma_unified_vdev_create_send
* Descriptin :
* Args :
- * Retruns :
+ * Returns :
*/
int wma_unified_vdev_create_send(wmi_unified_t wmi_handle, u_int8_t if_id,
u_int32_t type, u_int32_t subtype,
@@ -1445,6 +1542,7 @@ int wma_unified_vdev_create_send(wmi_unified_t wmi_handle, u_int8_t if_id,
wmi_vdev_create_cmd_fixed_param* cmd;
wmi_buf_t buf;
int len = sizeof(*cmd);
+ int ret;
buf = wmi_buf_alloc(wmi_handle, len);
if (!buf) {
@@ -1464,18 +1562,24 @@ int wma_unified_vdev_create_send(wmi_unified_t wmi_handle, u_int8_t if_id,
__func__, if_id,
macaddr[0], macaddr[1], macaddr[2],
macaddr[3], macaddr[4], macaddr[5]);
- return wmi_unified_cmd_send(wmi_handle, buf, len, WMI_VDEV_CREATE_CMDID);
+ ret = wmi_unified_cmd_send(wmi_handle, buf, len, WMI_VDEV_CREATE_CMDID);
+ if (ret != EOK) {
+ WMA_LOGE("Failed to send WMI_VDEV_CREATE_CMDID");
+ wmi_buf_free(buf);
+ }
+ return ret;
}
/* function : wma_unified_vdev_delete_send
* Descriptin :
* Args :
- * Retruns :
+ * Returns :
*/
static int wma_unified_vdev_delete_send(wmi_unified_t wmi_handle, u_int8_t if_id)
{
wmi_vdev_delete_cmd_fixed_param* cmd;
wmi_buf_t buf;
+ int ret;
buf = wmi_buf_alloc(wmi_handle, sizeof(*cmd));
if (!buf) {
@@ -1489,14 +1593,19 @@ static int wma_unified_vdev_delete_send(wmi_unified_t wmi_handle, u_int8_t if_id
WMITLV_GET_STRUCT_TLVLEN(
wmi_vdev_delete_cmd_fixed_param));
cmd->vdev_id = if_id;
- return wmi_unified_cmd_send(wmi_handle, buf, sizeof(wmi_vdev_delete_cmd_fixed_param),
+ ret = wmi_unified_cmd_send(wmi_handle, buf, sizeof(wmi_vdev_delete_cmd_fixed_param),
WMI_VDEV_DELETE_CMDID);
+ if (ret != EOK) {
+ WMA_LOGE("Failed to send WMI_VDEV_DELETE_CMDID");
+ wmi_buf_free(buf);
+ }
+ return ret;
}
/* function : wma_vdev_detach
* Descriptin :
* Args :
- * Retruns :
+ * Returns :
*/
static VOS_STATUS wma_vdev_detach(tp_wma_handle wma_handle,
tpDelStaSelfParams pdel_sta_self_req_param)
@@ -1532,7 +1641,7 @@ static VOS_STATUS wma_vdev_detach(tp_wma_handle wma_handle,
}
/* remove the interface from ath_dev */
- if (wma_unified_vdev_delete_send(wma_handle->wmi_handle,
+ if (wma_unified_vdev_delete_send(wma_handle->wmi_handle,
pdel_sta_self_req_param->sessionId)) {
WMA_LOGP("Unable to remove an interface for ath_dev.\n");
status = VOS_STATUS_E_FAILURE;
@@ -1575,7 +1684,7 @@ static int wmi_unified_peer_create_send(wmi_unified_t wmi,
cmd->vdev_id = vdev_id;
if (wmi_unified_cmd_send(wmi, buf, len, WMI_PEER_CREATE_CMDID)) {
- WMA_LOGP("failed to send peer create command\n");
+ WMA_LOGP("failed to send WMI_PEER_CREATE_CMDID\n");
adf_nbuf_free(buf);
return -EIO;
}
@@ -1611,29 +1720,54 @@ err:
return VOS_STATUS_E_FAILURE;
}
-static void wma_set_sta_null_keep_alive(tp_wma_handle wma, u_int8_t vdev_id,
- v_U32_t timeperiod)
+static void wma_set_sta_keep_alive(tp_wma_handle wma, u_int8_t vdev_id,
+ v_U32_t method, v_U32_t timeperiod,
+ u_int8_t *hostv4addr, u_int8_t *destv4addr,
+ u_int8_t *destmac)
{
wmi_buf_t buf;
- wmi_vdev_set_keepalive_cmd_fixed_param *cmd;
+ WMI_STA_KEEPALIVE_CMD_fixed_param *cmd;
+ WMI_STA_KEEPALVE_ARP_RESPONSE *arp_rsp;
+ u_int8_t *buf_ptr;
+ int len;
WMA_LOGD("%s: Enter", __func__);
- buf = wmi_buf_alloc(wma->wmi_handle, sizeof(*cmd));
+ len = sizeof(*cmd) + sizeof(*arp_rsp);
+ buf = wmi_buf_alloc(wma->wmi_handle, len);
if (!buf) {
WMA_LOGE("wmi_buf_alloc failed");
return;
}
- cmd = (wmi_vdev_set_keepalive_cmd_fixed_param *) wmi_buf_data(buf);
+ cmd = (WMI_STA_KEEPALIVE_CMD_fixed_param *) wmi_buf_data(buf);
+ buf_ptr = (u_int8_t *)cmd;
WMITLV_SET_HDR(&cmd->tlv_header,
- WMITLV_TAG_STRUC_wmi_vdev_set_keepalive_cmd_fixed_param,
+ WMITLV_TAG_STRUC_WMI_STA_KEEPALIVE_CMD_fixed_param,
WMITLV_GET_STRUCT_TLVLEN(
- wmi_vdev_set_keepalive_cmd_fixed_param));
- cmd->keepaliveInterval = timeperiod;
+ WMI_STA_KEEPALIVE_CMD_fixed_param));
+ cmd->interval = timeperiod;
+ cmd->enable = (timeperiod)? 1:0;
cmd->vdev_id = vdev_id;
- WMA_LOGD("Keep Alive: vdev_id:%d interval:%u", vdev_id, timeperiod);
- if (wmi_unified_cmd_send(wma->wmi_handle, buf, sizeof(*cmd),
- WMI_VDEV_SET_KEEPALIVE_CMDID)) {
+ WMA_LOGD("Keep Alive: vdev_id:%d interval:%u method:%d", vdev_id,
+ timeperiod, method);
+ arp_rsp = (WMI_STA_KEEPALVE_ARP_RESPONSE *)(buf_ptr + sizeof(*cmd));
+ WMITLV_SET_HDR(&arp_rsp->tlv_header,
+ WMITLV_TAG_STRUC_WMI_STA_KEEPALVE_ARP_RESPONSE,
+ WMITLV_GET_STRUCT_TLVLEN(WMI_STA_KEEPALVE_ARP_RESPONSE));
+
+ if (method == SIR_KEEP_ALIVE_UNSOLICIT_ARP_RSP) {
+ cmd->method = WMI_STA_KEEPALIVE_METHOD_UNSOLICITED_ARP_RESPONSE;
+ vos_mem_copy(&arp_rsp->sender_prot_addr, hostv4addr,
+ SIR_IPV4_ADDR_LEN);
+ vos_mem_copy(&arp_rsp->target_prot_addr, destv4addr,
+ SIR_IPV4_ADDR_LEN);
+ WMI_CHAR_ARRAY_TO_MAC_ADDR(destmac,&arp_rsp->dest_mac_addr);
+ } else {
+ cmd->method = WMI_STA_KEEPALIVE_METHOD_NULL_FRAME;
+ }
+
+ if (wmi_unified_cmd_send(wma->wmi_handle, buf, len,
+ WMI_STA_KEEPALIVE_CMDID)) {
WMA_LOGE("Failed to set KeepAlive");
adf_nbuf_free(buf);
}
@@ -1708,7 +1842,7 @@ static void wma_set_sap_keepalive(tp_wma_handle wma, u_int8_t vdev_id)
/* function : wma_vdev_attach
* Descriptin :
* Args :
- * Retruns :
+ * Returns :
*/
static ol_txrx_vdev_handle wma_vdev_attach(tp_wma_handle wma_handle,
tpAddStaSelfParams self_sta_req)
@@ -1773,9 +1907,13 @@ static ol_txrx_vdev_handle wma_vdev_attach(tp_wma_handle wma_handle,
cfg_val = DEFAULT_INFRA_STA_KEEP_ALIVE_PERIOD;
}
- wma_set_sta_null_keep_alive(wma_handle,
- self_sta_req->sessionId,
- cfg_val);
+ wma_set_sta_keep_alive(wma_handle,
+ self_sta_req->sessionId,
+ SIR_KEEP_ALIVE_NULL_PKT,
+ cfg_val,
+ NULL,
+ NULL,
+ NULL);
break;
}
@@ -1824,6 +1962,14 @@ static ol_txrx_vdev_handle wma_vdev_attach(tp_wma_handle wma_handle,
} else {
WMA_LOGE("Failed to get value for WNI_CFG_FRAGMENTATION_THRESHOLD, leaving unchanged");
}
+ if (self_sta_req->type == WMI_VDEV_TYPE_STA) {
+ /* Enable roaming offload
+ * return value is not significant because some firmware versions may have
+ * roam offload always enabled. It will stay enabled even if this command fails.
+ */
+ ret = wmi_unified_vdev_set_param_send(wma_handle->wmi_handle, self_sta_req->sessionId,
+ WMI_VDEV_PARAM_ROAM_FW_OFFLOAD, 1);
+ }
end:
self_sta_req->status = status;
@@ -1911,7 +2057,7 @@ fail:
/* function : wma_set_scan_info
* Descriptin : function to save current ongoing scan info
* Args : wma handle, scan id, scan requestor id, vdev id
- * Retruns : None
+ * Returns : None
*/
static inline void wma_set_scan_info(tp_wma_handle wma_handle,
u_int32_t scan_id,
@@ -1928,7 +2074,7 @@ static inline void wma_set_scan_info(tp_wma_handle wma_handle,
/* function : wma_reset_scan_info
* Descriptin : function to reset the current ongoing scan info
* Args : wma handle, vdev_id
- * Retruns : None
+ * Returns : None
*/
static inline void wma_reset_scan_info(tp_wma_handle wma_handle,
u_int8_t vdev_id)
@@ -1940,7 +2086,7 @@ static inline void wma_reset_scan_info(tp_wma_handle wma_handle,
/* function : wma_get_buf_start_scan_cmd
* Descriptin :
* Args :
- * Retruns :
+ * Returns :
*/
VOS_STATUS wma_get_buf_start_scan_cmd(tp_wma_handle wma_handle,
tSirScanOffloadReq *scan_req,
@@ -1983,7 +2129,6 @@ VOS_STATUS wma_get_buf_start_scan_cmd(tp_wma_handle wma_handle,
buf_ptr = (u_int8_t *) wmi_buf_data(*buf);
cmd = (wmi_start_scan_cmd_fixed_param *) buf_ptr;
- vos_mem_zero(cmd, len);
WMITLV_SET_HDR(&cmd->tlv_header,
WMITLV_TAG_STRUC_wmi_start_scan_cmd_fixed_param,
WMITLV_GET_STRUCT_TLVLEN(
@@ -2000,6 +2145,7 @@ VOS_STATUS wma_get_buf_start_scan_cmd(tp_wma_handle wma_handle,
/* TODO: handle all the other flags also */
cmd->notify_scan_events = WMI_SCAN_EVENT_STARTED |
WMI_SCAN_EVENT_START_FAILED |
+ WMI_SCAN_EVENT_FOREIGN_CHANNEL |
WMI_SCAN_EVENT_COMPLETED;
cmd->dwell_time_active = scan_req->maxChannelTime;
@@ -2096,7 +2242,7 @@ error:
/* function : wma_get_buf_stop_scan_cmd
* Descriptin : function to fill the args for wmi_stop_scan_cmd
* Args : wma handle, wmi command buffer, buffer length, vdev_id
- * Retruns : failure or success
+ * Returns : failure or success
*/
VOS_STATUS wma_get_buf_stop_scan_cmd(tp_wma_handle wma_handle,
wmi_buf_t *buf,
@@ -2116,7 +2262,6 @@ VOS_STATUS wma_get_buf_stop_scan_cmd(tp_wma_handle wma_handle,
}
cmd = (wmi_stop_scan_cmd_fixed_param *) wmi_buf_data(*buf);
- vos_mem_zero(cmd, len);
WMITLV_SET_HDR(&cmd->tlv_header,
WMITLV_TAG_STRUC_wmi_stop_scan_cmd_fixed_param,
WMITLV_GET_STRUCT_TLVLEN(wmi_stop_scan_cmd_fixed_param));
@@ -2138,7 +2283,7 @@ error:
/* function : wma_start_scan
* Descriptin :
* Args :
- * Retruns :
+ * Returns :
*/
VOS_STATUS wma_start_scan(tp_wma_handle wma_handle,
tSirScanOffloadReq *scan_req)
@@ -2175,7 +2320,7 @@ VOS_STATUS wma_start_scan(tp_wma_handle wma_handle,
status = wmi_unified_cmd_send(wma_handle->wmi_handle, buf,
len, WMI_START_SCAN_CMDID);
/* Call the wmi api to request the scan */
- if (0 != status) {
+ if (status != EOK) {
WMA_LOGE("wmi_unified_cmd_send returned Error %d",
status);
vos_status = VOS_STATUS_E_FAILURE;
@@ -2205,7 +2350,7 @@ error1:
/* function : wma_stop_scan
* Descriptin : function to send the stop scan command
* Args : wma_handle
- * Retruns : failure or success
+ * Returns : failure or success
*/
VOS_STATUS wma_stop_scan(tp_wma_handle wma_handle,
tAbortScanParams *abort_scan_req)
@@ -2225,8 +2370,8 @@ VOS_STATUS wma_stop_scan(tp_wma_handle wma_handle,
status = wmi_unified_cmd_send(wma_handle->wmi_handle, buf,
len, WMI_STOP_SCAN_CMDID);
/* Call the wmi api to request the scan */
- if (0 != status) {
- WMA_LOGE("wmi_unified_cmd_send returned Error %d",
+ if (status != EOK) {
+ WMA_LOGE("wmi_unified_cmd_send WMI_STOP_SCAN_CMDID returned Error %d",
status);
vos_status = VOS_STATUS_E_FAILURE;
goto error;
@@ -2245,7 +2390,7 @@ error1:
/* function : wma_update_channel_list
* Descriptin : Function is used to update the support channel list
* Args : wma_handle, list of supported channels and power
- * Retruns : SUCCESS or FAILURE
+ * Returns : SUCCESS or FAILURE
*/
VOS_STATUS wma_update_channel_list(WMA_HANDLE handle,
tSirUpdateChanList *chan_list)
@@ -2313,14 +2458,622 @@ VOS_STATUS wma_update_channel_list(WMA_HANDLE handle,
status = wmi_unified_cmd_send(wma_handle->wmi_handle, buf, len,
WMI_SCAN_CHAN_LIST_CMDID);
- if (status != 0) {
+ if (status != EOK) {
vos_status = VOS_STATUS_E_FAILURE;
- WMA_LOGE("Failed to send the WMI_SCAN_CHAN_LIST_CMDID");
+ WMA_LOGE("Failed to send WMI_SCAN_CHAN_LIST_CMDID");
+ wmi_buf_free(buf);
}
end:
return vos_status;
}
+/* function : wma_roam_scan_offload_mode
+ * Descriptin : send WMI_ROAM_SCAN_MODE TLV to firmware. It has a piggyback
+ * : of WMI_ROAM_SCAN_MODE.
+ * Args : scan_cmd_fp contains the scan parameters.
+ * : mode controls rssi based and periodic scans by roam engine.
+ * Returns :
+ */
+VOS_STATUS wma_roam_scan_offload_mode(tp_wma_handle wma_handle, u_int8_t sessionId,
+ wmi_start_scan_cmd_fixed_param *scan_cmd_fp, u_int32_t mode)
+{
+ VOS_STATUS vos_status = VOS_STATUS_SUCCESS;
+ wmi_buf_t buf = NULL;
+ int status = 0;
+ int len;
+ wmi_roam_scan_mode_fixed_param *roam_scan_mode_fp;
+ u_int8_t *buf_ptr;
+
+ /* Need to create a buf with roam_scan command at front and piggyback with scan command */
+ len = sizeof(wmi_roam_scan_mode_fixed_param) + sizeof(wmi_start_scan_cmd_fixed_param);
+ buf = wmi_buf_alloc(wma_handle->wmi_handle, len);
+ if (!buf) {
+ WMA_LOGD("%s : wmi_buf_alloc failed\n", __func__);
+ return VOS_STATUS_E_NOMEM;
+ }
+
+ buf_ptr = (u_int8_t *) wmi_buf_data(buf);
+ roam_scan_mode_fp = (wmi_roam_scan_mode_fixed_param *) buf_ptr;
+ WMITLV_SET_HDR(&roam_scan_mode_fp->tlv_header,
+ WMITLV_TAG_STRUC_wmi_roam_scan_mode_fixed_param,
+ WMITLV_GET_STRUCT_TLVLEN(wmi_roam_scan_mode_fixed_param));
+
+ roam_scan_mode_fp->roam_scan_mode = mode;
+ roam_scan_mode_fp->vdev_id = sessionId;
+ /* 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));
+ /* Ensure there is no additional IEs */
+ scan_cmd_fp->ie_len = 0;
+ WMITLV_SET_HDR(buf_ptr,
+ WMITLV_TAG_STRUC_wmi_start_scan_cmd_fixed_param,
+ WMITLV_GET_STRUCT_TLVLEN(wmi_start_scan_cmd_fixed_param));
+ status = wmi_unified_cmd_send(wma_handle->wmi_handle, buf,
+ len, WMI_ROAM_SCAN_MODE);
+ if (status != EOK) {
+ WMA_LOGE("wmi_unified_cmd_send WMI_ROAM_SCAN_MODE returned Error %d",
+ status);
+ vos_status = VOS_STATUS_E_FAILURE;
+ goto error;
+ }
+
+ WMA_LOGI("%s: WMA --> WMI_ROAM_SCAN_MODE", __func__);
+ return VOS_STATUS_SUCCESS;
+error:
+ wmi_buf_free(buf);
+
+ return vos_status;
+}
+
+/* function : wma_roam_scan_offload_rssi_threshold
+ * Descriptin : Send WMI_ROAM_SCAN_RSSI_THRESHOLD TLV to firmware
+ * Args :
+ * Returns :
+ */
+VOS_STATUS wma_roam_scan_offload_rssi_thresh(tp_wma_handle wma_handle, u_int8_t sessionId,
+ A_UINT32 rssi_thresh, A_UINT32 rssi_thresh_diff)
+{
+ VOS_STATUS vos_status = VOS_STATUS_SUCCESS;
+ wmi_buf_t buf = NULL;
+ int status = 0;
+ int len;
+ u_int8_t *buf_ptr;
+ wmi_roam_scan_rssi_threshold_fixed_param *rssi_threshold_fp;
+
+ /* Send rssi threshold */
+ len = sizeof(wmi_roam_scan_rssi_threshold_fixed_param);
+ buf = wmi_buf_alloc(wma_handle->wmi_handle, len);
+ if (!buf) {
+ WMA_LOGE("%s : wmi_buf_alloc failed\n", __func__);
+ return VOS_STATUS_E_NOMEM;
+ }
+
+ buf_ptr = (u_int8_t *) wmi_buf_data(buf);
+ rssi_threshold_fp = (wmi_roam_scan_rssi_threshold_fixed_param *) buf_ptr;
+ WMITLV_SET_HDR(&rssi_threshold_fp->tlv_header,
+ WMITLV_TAG_STRUC_wmi_roam_scan_rssi_threshold_fixed_param,
+ WMITLV_GET_STRUCT_TLVLEN(
+ wmi_roam_scan_rssi_threshold_fixed_param));
+ /* fill in threshold values */
+ rssi_threshold_fp->vdev_id = sessionId;
+ rssi_threshold_fp->roam_scan_rssi_thresh = rssi_thresh;
+ rssi_threshold_fp->roam_rssi_thresh_diff = rssi_thresh_diff;
+
+ status = wmi_unified_cmd_send(wma_handle->wmi_handle, buf,
+ len, WMI_ROAM_SCAN_RSSI_THRESHOLD);
+ if (status != EOK) {
+ WMA_LOGE("wmi_unified_cmd_send WMI_ROAM_SCAN_RSSI_THRESHOLD returned Error %d",
+ status);
+ vos_status = VOS_STATUS_E_FAILURE;
+ goto error;
+ }
+
+ WMA_LOGI("%s: WMA --> WMI_ROAM_SCAN_RSSI_THRESHOLD roam_scan_rssi_thresh=%d, roam_rssi_thresh_diff=%d",
+ __func__, rssi_thresh, rssi_thresh_diff);
+ return VOS_STATUS_SUCCESS;
+error:
+ wmi_buf_free(buf);
+
+ return vos_status;
+}
+
+/* function : wma_roam_scan_offload_scan_period
+ * Descriptin : Send WMI_ROAM_SCAN_PERIOD TLV to firmware
+ * Args :
+ * Returns :
+ */
+VOS_STATUS wma_roam_scan_offload_scan_period(tp_wma_handle wma_handle, u_int8_t sessionId,
+ A_UINT32 scan_period, A_UINT32 scan_age)
+{
+ VOS_STATUS vos_status = VOS_STATUS_SUCCESS;
+ wmi_buf_t buf = NULL;
+ int status = 0;
+ int len;
+ u_int8_t *buf_ptr;
+ wmi_roam_scan_period_fixed_param *scan_period_fp;
+
+ /* Send scan period values */
+ len = sizeof(wmi_roam_scan_period_fixed_param);
+ buf = wmi_buf_alloc(wma_handle->wmi_handle, len);
+ if (!buf) {
+ WMA_LOGE("%s : wmi_buf_alloc failed\n", __func__);
+ return VOS_STATUS_E_NOMEM;
+ }
+
+ buf_ptr = (u_int8_t *) wmi_buf_data(buf);
+ scan_period_fp = (wmi_roam_scan_period_fixed_param *) buf_ptr;
+ WMITLV_SET_HDR(&scan_period_fp->tlv_header,
+ WMITLV_TAG_STRUC_wmi_roam_scan_period_fixed_param,
+ WMITLV_GET_STRUCT_TLVLEN(
+ wmi_roam_scan_period_fixed_param));
+ /* fill in scan period values */
+ scan_period_fp->vdev_id = sessionId;
+ scan_period_fp->roam_scan_period = scan_period; /* 20 seconds */
+ scan_period_fp->roam_scan_age = scan_age;
+
+ status = wmi_unified_cmd_send(wma_handle->wmi_handle, buf,
+ len, WMI_ROAM_SCAN_PERIOD);
+ if (status != EOK) {
+ WMA_LOGE("wmi_unified_cmd_send WMI_ROAM_SCAN_PERIOD returned Error %d",
+ status);
+ vos_status = VOS_STATUS_E_FAILURE;
+ goto error;
+ }
+
+ WMA_LOGI("%s: WMA --> WMI_ROAM_SCAN_PERIOD roam_scan_period=%d, roam_scan_age=%d",
+ __func__, scan_period, scan_age);
+ return VOS_STATUS_SUCCESS;
+error:
+ wmi_buf_free(buf);
+
+ return vos_status;
+}
+/* function : wma_roam_scan_offload_rssi_change
+ * Descriptin : Send WMI_ROAM_SCAN_RSSI_CHANGE_THRESHOLD TLV to firmware
+ * Args :
+ * Returns :
+ */
+VOS_STATUS wma_roam_scan_offload_rssi_change(tp_wma_handle wma_handle, u_int8_t sessionId,
+ A_UINT32 rssi_change_thresh, A_UINT32 bcn_rssi_weight)
+{
+ VOS_STATUS vos_status = VOS_STATUS_SUCCESS;
+ wmi_buf_t buf = NULL;
+ int status = 0;
+ int len;
+ u_int8_t *buf_ptr;
+ wmi_roam_scan_rssi_change_threshold_fixed_param *rssi_change_fp;
+
+ /* Send rssi change parameters */
+ len = sizeof(wmi_roam_scan_rssi_change_threshold_fixed_param);
+ buf = wmi_buf_alloc(wma_handle->wmi_handle, len);
+ if (!buf) {
+ WMA_LOGE("%s : wmi_buf_alloc failed\n", __func__);
+ return VOS_STATUS_E_NOMEM;
+ }
+
+ buf_ptr = (u_int8_t *) wmi_buf_data(buf);
+ rssi_change_fp = (wmi_roam_scan_rssi_change_threshold_fixed_param *) buf_ptr;
+ WMITLV_SET_HDR(&rssi_change_fp->tlv_header,
+ WMITLV_TAG_STRUC_wmi_roam_scan_rssi_change_threshold_fixed_param,
+ WMITLV_GET_STRUCT_TLVLEN(
+ wmi_roam_scan_rssi_change_threshold_fixed_param));
+ /* fill in rssi change threshold (hysteresis) values */
+ rssi_change_fp->vdev_id = sessionId;
+ rssi_change_fp->roam_scan_rssi_change_thresh = rssi_change_thresh;
+ rssi_change_fp->bcn_rssi_weight = bcn_rssi_weight;
+
+ status = wmi_unified_cmd_send(wma_handle->wmi_handle, buf,
+ len, WMI_ROAM_SCAN_RSSI_CHANGE_THRESHOLD);
+ if (status != EOK) {
+ WMA_LOGE("wmi_unified_cmd_send WMI_ROAM_SCAN_RSSI_CHANGE_THRESHOLD returned Error %d",
+ status);
+ vos_status = VOS_STATUS_E_FAILURE;
+ goto error;
+ }
+
+ WMA_LOGI("%s: WMA --> WMI_ROAM_SCAN_RSSI_CHANGE_THERSHOLD roam_scan_rssi_change_thresh=%d, bcn_rssi_weight=%d",
+ __func__, rssi_change_thresh, bcn_rssi_weight);
+ return VOS_STATUS_SUCCESS;
+error:
+ wmi_buf_free(buf);
+
+ return vos_status;
+}
+
+/* function : wma_roam_scan_offload_chan_list
+ * Descriptin : Send WMI_ROAM_CHAN_LIST TLV to firmware
+ * Args :
+ * Returns :
+ */
+VOS_STATUS wma_roam_scan_offload_chan_list(tp_wma_handle wma_handle, u_int8_t sessionId,
+ u_int8_t chan_count, u_int8_t *chan_list)
+{
+ VOS_STATUS vos_status = VOS_STATUS_SUCCESS;
+ wmi_buf_t buf = NULL;
+ int status = 0;
+ int len, list_tlv_len;
+ int i;
+ u_int8_t *buf_ptr;
+ wmi_roam_chan_list_fixed_param *chan_list_fp;
+ A_UINT32 *roam_chan_list_array;
+
+ if (chan_count == 0)
+ {
+ WMA_LOGD("%s : invalid number of channels %d\n", __func__, chan_count);
+ return VOS_STATUS_E_INVAL;
+ }
+ /* Channel list is a table of 2 TLV's */
+ list_tlv_len = WMI_TLV_HDR_SIZE + chan_count * sizeof(A_UINT32);
+ len = sizeof(wmi_roam_chan_list_fixed_param) + list_tlv_len;
+ buf = wmi_buf_alloc(wma_handle->wmi_handle, len);
+ if (!buf) {
+ WMA_LOGE("%s : wmi_buf_alloc failed\n", __func__);
+ return VOS_STATUS_E_NOMEM;
+ }
+
+ buf_ptr = (u_int8_t *) wmi_buf_data(buf);
+ chan_list_fp = (wmi_roam_chan_list_fixed_param *) buf_ptr;
+ 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 = sessionId;
+ chan_list_fp->num_chan = chan_count;
+ chan_list_fp->chan_list_type = WMI_ROAM_SCAN_CHAN_LIST_TYPE_STATIC;
+
+ buf_ptr += sizeof(wmi_roam_chan_list_fixed_param);
+ WMITLV_SET_HDR(buf_ptr, WMITLV_TAG_ARRAY_UINT32,
+ (chan_list_fp->num_chan * sizeof(u_int32_t)));
+ roam_chan_list_array = (A_UINT32 *)(buf_ptr + WMI_TLV_HDR_SIZE);
+ WMA_LOGI("%s: %d channels = ", __func__, chan_list_fp->num_chan);
+ for (i = 0; i < chan_list_fp->num_chan; i++) {
+ roam_chan_list_array[i] = vos_chan_to_freq(chan_list[i]);
+ WMA_LOGI("%d,",roam_chan_list_array[i]);
+ }
+ WMA_LOGI("\n");
+
+ status = wmi_unified_cmd_send(wma_handle->wmi_handle, buf,
+ len, WMI_ROAM_CHAN_LIST);
+ if (status != EOK) {
+ WMA_LOGE("wmi_unified_cmd_send WMI_ROAM_CHAN_LIST returned Error %d",
+ status);
+ vos_status = VOS_STATUS_E_FAILURE;
+ goto error;
+ }
+
+ WMA_LOGI("%s: WMA --> WMI_ROAM_SCAN_CHAN_LIST", __func__);
+ return VOS_STATUS_SUCCESS;
+error:
+ wmi_buf_free(buf);
+
+ return vos_status;
+}
+
+/* function : eCsrAuthType_to_rsn_authmode
+ * Descriptin : Map CSR's authentication type into RSN auth mode used by firmware
+ * Args :
+ * Returns :
+ */
+
+
+A_UINT32 eCsrAuthType_to_rsn_authmode (eCsrAuthType authtype) {
+ switch(authtype) {
+ case eCSR_AUTH_TYPE_OPEN_SYSTEM:
+ return (IEEE80211_AUTH_OPEN);
+ case eCSR_AUTH_TYPE_WPA:
+ case eCSR_AUTH_TYPE_WPA_PSK:
+ return(IEEE80211_AUTH_WPA);
+ case eCSR_AUTH_TYPE_RSN:
+ case eCSR_AUTH_TYPE_RSN_PSK:
+#if defined WLAN_FEATURE_VOWIFI_11R
+ case eCSR_AUTH_TYPE_FT_RSN:
+ case eCSR_AUTH_TYPE_FT_RSN_PSK:
+ return(IEEE80211_AUTH_RSNA);
+#endif
+#ifdef FEATURE_WLAN_WAPI
+ case eCSR_AUTH_TYPE_WAPI_WAI_CERTIFICATE:
+ case eCSR_AUTH_TYPE_WAPI_WAI_PSK:
+ return(IEEE80211_AUTH_WAPI);
+#endif
+#ifdef FEATURE_WLAN_CCX
+ case eCSR_AUTH_TYPE_CCKM_WPA:
+ case eCSR_AUTH_TYPE_CCKM_RSN:
+ return(IEEE80211_AUTH_CCKM);
+#endif
+ default:
+ return(WMI_AUTH_NONE);
+ }
+}
+
+/* function : eCsrEncryptionType_to_rsn_cipherset
+ * Descriptin : Map CSR's encryption type into RSN cipher types used by firmware
+ * Args :
+ * Returns :
+ */
+
+A_UINT32 eCsrEncryptionType_to_rsn_cipherset (eCsrEncryptionType encr) {
+
+ switch (encr) {
+ case eCSR_ENCRYPT_TYPE_WEP40_STATICKEY:
+ case eCSR_ENCRYPT_TYPE_WEP104_STATICKEY:
+ case eCSR_ENCRYPT_TYPE_WEP40:
+ case eCSR_ENCRYPT_TYPE_WEP104:
+ return (IEEE80211_CIPHER_WEP);
+ case eCSR_ENCRYPT_TYPE_TKIP:
+ return (IEEE80211_CIPHER_TKIP);
+ case eCSR_ENCRYPT_TYPE_AES:
+ return (IEEE80211_CIPHER_AES_CCM);
+#ifdef FEATURE_WLAN_WAPI
+ case eCSR_ENCRYPT_TYPE_WPI:
+ return (IEEE80211_CIPHER_WAPI);
+#endif /* FEATURE_WLAN_WAPI */
+ case eCSR_ENCRYPT_TYPE_ANY:
+ case eCSR_ENCRYPT_TYPE_NONE:
+ default:
+ return (IEEE80211_CIPHER_NONE);
+ }
+}
+
+/* function : wma_roam_scan_fill_ap_profile
+ * Descriptin : Fill ap_profile structure from configured parameters
+ * Args :
+ * Returns :
+ */
+v_VOID_t wma_roam_scan_fill_ap_profile(tp_wma_handle wma_handle, tpAniSirGlobal pMac,
+tANI_U8 sessionId, wmi_ap_profile *ap_profile_p)
+{
+ ap_profile_p->ssid.ssid_len = pMac->roam.roamSession[sessionId].connectedProfile.SSID.length;
+ vos_mem_copy(ap_profile_p->ssid.ssid,
+ pMac->roam.roamSession[sessionId].connectedProfile.SSID.ssId,
+ ap_profile_p->ssid.ssid_len);
+ ap_profile_p->rsn_authmode =
+ eCsrAuthType_to_rsn_authmode(pMac->roam.roamSession[sessionId].connectedProfile.AuthType);
+ ap_profile_p->rsn_ucastcipherset =
+ eCsrEncryptionType_to_rsn_cipherset(pMac->roam.roamSession[sessionId].connectedProfile.EncryptionType);
+ ap_profile_p->rsn_mcastcipherset =
+ eCsrEncryptionType_to_rsn_cipherset(pMac->roam.roamSession[sessionId].connectedProfile.mcEncryptionType);
+ ap_profile_p->rsn_mcastmgmtcipherset = ap_profile_p->rsn_mcastcipherset;
+ // DPD @@ ap_profile_p->rssi_threshold = pMac->roam.configParam.vccRssiThreshold;
+ ap_profile_p->rssi_threshold = 5;
+}
+
+/* function : wma_roam_scan_scan_params
+ * Descriptin : Fill scan_params structure from configured parameters
+ * Args : roam_req pointer = NULL if this routine is called before connect
+ * : It will be non-NULL if called after assoc.
+ * Returns :
+ */
+v_VOID_t wma_roam_scan_fill_scan_params(tp_wma_handle wma_handle, tpAniSirGlobal pMac,
+ tSirRoamOffloadScanReq *roam_req, wmi_start_scan_cmd_fixed_param *scan_params)
+{
+ /* Pronto values
+ * scan_params.dwell_time_active = tSirRoamOffloadScanReq->NeighborScanChannelMaxTime;
+ * scan_params.dwell_time_passive = tSirRoamOffloadScanReq->NeighborScanChannelMaxTime;
+ * scan_params.min_rest_time = tSirRoamOffloadScanReq->NeighborScanTimerPeriod;
+ * scan_params.max_rest_time = tSirRoamOffloadScanReq->NeighborScanTimerPeriod;
+ * scan_params.repeat_probe_time = 50;
+ * scan_params.probe_spacing_time = 0;
+ * scan_params.probe_delay = 0;
+ * scan_params.max_scan_time = 50000;
+ * scan_params.idle_time = 200;
+ */
+
+ /*
+ * Currently it uses default parameters similar to Windows platform.
+ * They will be tuned after experiments and matching with CSR parameters
+ * used for Pronto.
+ */
+ scan_params->dwell_time_active = 500;
+ scan_params->dwell_time_passive = 500;
+ scan_params->min_rest_time = 50;
+ scan_params->max_rest_time = 500;
+ scan_params->repeat_probe_time = 50;
+ scan_params->probe_spacing_time = 0;
+ scan_params->probe_delay = 0;
+ scan_params->max_scan_time = 50000;
+ scan_params->idle_time = 200;
+}
+/* function : wma_roam_scan_offload_ap_profile
+ * Descriptin : Send WMI_ROAM_AP_PROFILE TLV to firmware
+ * Args : AP profile parameters are passed in as the structure used in TLV
+ * Returns :
+ */
+VOS_STATUS wma_roam_scan_offload_ap_profile(tp_wma_handle wma_handle, u_int8_t sessionId,
+ wmi_ap_profile *ap_profile_p)
+{
+ VOS_STATUS vos_status = VOS_STATUS_SUCCESS;
+ wmi_buf_t buf = NULL;
+ int status = 0;
+ int len;
+ u_int8_t *buf_ptr;
+ wmi_roam_ap_profile_fixed_param *roam_ap_profile_fp;
+
+ len = sizeof(wmi_roam_ap_profile_fixed_param) +
+ sizeof(wmi_ap_profile);
+
+ buf = wmi_buf_alloc(wma_handle->wmi_handle, len);
+ if (!buf) {
+ WMA_LOGE("%s : wmi_buf_alloc failed\n", __func__);
+ return VOS_STATUS_E_NOMEM;
+ }
+
+ buf_ptr = (u_int8_t *) wmi_buf_data(buf);
+ roam_ap_profile_fp = (wmi_roam_ap_profile_fixed_param *) buf_ptr;
+ WMITLV_SET_HDR(&roam_ap_profile_fp->tlv_header,
+ WMITLV_TAG_STRUC_wmi_roam_ap_profile_fixed_param,
+ WMITLV_GET_STRUCT_TLVLEN(
+ wmi_roam_ap_profile_fixed_param));
+ /* fill in threshold values */
+ roam_ap_profile_fp->vdev_id = sessionId;
+ roam_ap_profile_fp->id = 0;
+ buf_ptr += sizeof(wmi_roam_ap_profile_fixed_param);
+
+ vos_mem_copy(buf_ptr, ap_profile_p, sizeof(wmi_ap_profile));
+ WMITLV_SET_HDR(buf_ptr,
+ WMITLV_TAG_STRUC_wmi_ap_profile,
+ WMITLV_GET_STRUCT_TLVLEN(
+ wmi_ap_profile));
+ status = wmi_unified_cmd_send(wma_handle->wmi_handle, buf,
+ len, WMI_ROAM_AP_PROFILE);
+ if (status != EOK) {
+ WMA_LOGE("wmi_unified_cmd_send WMI_ROAM_AP_PROFILE returned Error %d",
+ status);
+ vos_status = VOS_STATUS_E_FAILURE;
+ goto error;
+ }
+
+ WMA_LOGI("WMA --> WMI_ROAM_AP_PROFILE and other parameters");
+ return VOS_STATUS_SUCCESS;
+error:
+ wmi_buf_free(buf);
+
+ return vos_status;
+}
+
+/* function : wma_roam_scan_offload_init_connect
+ * Descriptin : Rome firmware requires that roam scan engine is configured prior to
+ * : sending VDEV_UP command to firmware. This routine configures it
+ * : to default values with only periodic scan mode. Rssi triggerred scan
+ * : is not enabled, preventing unnecessary off-channel scans while EAPOL
+ * : handshake is completed.
+ * Args :
+ * Returns :
+ */
+VOS_STATUS wma_roam_scan_offload_init_connect(tp_wma_handle wma_handle, u_int8_t sessionId)
+{
+ VOS_STATUS vos_status;
+ tpAniSirGlobal pMac = (tpAniSirGlobal)vos_get_context(VOS_MODULE_ID_PE,
+ wma_handle->vos_context);
+ wmi_start_scan_cmd_fixed_param scan_params;
+ wmi_ap_profile ap_profile;
+
+ if (!pMac) {
+ return VOS_STATUS_SUCCESS;
+ }
+ if (pMac->roam.roamSession[sessionId].connectedProfile.SSID.length == 0) {
+ /* No need to configure roam scan for null SSID. */
+ return VOS_STATUS_SUCCESS;
+ }
+ /* first program the parameters to conservative values so that roaming scan won't be
+ * triggered before association completes
+ */
+ /* rssi_thresh = 10 is low enough */
+ vos_status = wma_roam_scan_offload_rssi_thresh(wma_handle, sessionId, 10, 30);
+ vos_status = wma_roam_scan_offload_scan_period(wma_handle, sessionId,
+ 100000, 500000);
+ vos_status = wma_roam_scan_offload_rssi_change(wma_handle, sessionId,
+ 15, 14);
+ wma_roam_scan_fill_ap_profile(wma_handle, pMac, sessionId, &ap_profile);
+
+ vos_status = wma_roam_scan_offload_ap_profile(wma_handle, sessionId, &ap_profile);
+
+ wma_roam_scan_fill_scan_params(wma_handle, pMac, NULL, &scan_params);
+ vos_status = wma_roam_scan_offload_mode(wma_handle, sessionId, &scan_params,
+ WMI_ROAM_SCAN_MODE_PERIODIC);
+ return vos_status;
+}
+
+
+/* function : wma_process_roam_scan_req
+ * Descriptin : Main routine to handle ROAM commands coming from CSR module.
+ * Args :
+ * Returns :
+ */
+VOS_STATUS wma_process_roam_scan_req(tp_wma_handle wma_handle,
+ tSirRoamOffloadScanReq *roam_req)
+{
+ VOS_STATUS vos_status = VOS_STATUS_SUCCESS;
+ wmi_start_scan_cmd_fixed_param scan_params;
+ wmi_ap_profile ap_profile;
+ tpAniSirGlobal pMac = (tpAniSirGlobal)vos_get_context(VOS_MODULE_ID_PE,
+ wma_handle->vos_context);
+ A_UINT32 mode;
+
+ vos_trace_setValue(VOS_MODULE_ID_WDA, VOS_TRACE_LEVEL_DEBUG, 1);
+ WMA_LOGI("%s: command 0x%x\n", __func__, roam_req->Command);
+ switch (roam_req->Command) {
+ case ROAM_SCAN_OFFLOAD_START:
+ case ROAM_SCAN_OFFLOAD_STOP:
+ /* first program the parameters */
+ /*
+ * Scan/Roam threshold parameters are translated from fields of tSirRoamOffloadScanReq
+ * to WMITLV values sent to Rome firmware.
+ * roam_scan_rssi_thresh = tSirRoamOffloadScanReq->LookupThreshold
+ * roam_rssi_thresh_diff = 50 - roam_scan_rssi_thresh (so that opportunistic low
+ * priority scan will trigger at rssi < 50 db)
+ * roam_scan_period = tSirRoamOffloadScanReq->neighborResultsRefreshPeriod,
+ * default is 20000 (20 seconds)
+ * roam_scan_age = 3 * roam_scan_period
+ * roam_scan_rssi_change_thresh = 7 (trigger another roam scan only if rssi changes
+ * more than this value).
+ * bcn_rssi_weight = 14 (default used for hw generated beacon rssi interrupt)
+ */
+
+ /*
+ * Current values for roaming parameters are hardcoded for initial testing.
+ * They will be changed to values coming from tSirRoamOffloadScanReq after testing
+ * and tuning.
+ */
+ if(wma_roam_scan_offload_rssi_thresh(wma_handle, roam_req->sessionId, 30, 30)
+ != VOS_STATUS_SUCCESS) {
+ break;
+ }
+ if (wma_roam_scan_offload_scan_period(wma_handle, roam_req->sessionId,
+ 100000, 500000) != VOS_STATUS_SUCCESS) {
+ break;
+ }
+ if (wma_roam_scan_offload_rssi_change(wma_handle, roam_req->sessionId,
+ 15, 14) != VOS_STATUS_SUCCESS) {
+ break;
+ }
+ wma_roam_scan_fill_ap_profile(wma_handle, pMac, roam_req->sessionId, &ap_profile);
+
+ if (wma_roam_scan_offload_ap_profile(wma_handle, roam_req->sessionId,
+ &ap_profile) != VOS_STATUS_SUCCESS) {
+ break;
+ }
+ if (wma_roam_scan_offload_chan_list(wma_handle, roam_req->sessionId,
+ roam_req->ValidChannelCount,
+ &roam_req->ValidChannelList[0]) != VOS_STATUS_SUCCESS) {
+ break;
+ }
+
+
+ wma_roam_scan_fill_scan_params(wma_handle, pMac, roam_req, &scan_params);
+ if (roam_req->Command == ROAM_SCAN_OFFLOAD_START) {
+ mode = (WMI_ROAM_SCAN_MODE_PERIODIC | WMI_ROAM_SCAN_MODE_RSSI_CHANGE);
+ } else {
+ mode = WMI_ROAM_SCAN_MODE_NONE; /* STOP */
+ }
+ vos_status = wma_roam_scan_offload_mode(wma_handle, roam_req->sessionId, &scan_params,
+ mode);
+ break;
+
+ case ROAM_SCAN_OFFLOAD_RESTART:
+ /* Not needed. Rome offload engine does not stop after any scan */
+ break;
+
+ case ROAM_SCAN_OFFLOAD_UPDATE_CFG:
+ /*
+ * Runtime (after association) changes to rssi thresholds and other parameters.
+ */
+ if (wma_roam_scan_offload_rssi_thresh(wma_handle, roam_req->sessionId, 30, 30)
+ != VOS_STATUS_SUCCESS) {
+ break;
+ }
+ if (wma_roam_scan_offload_scan_period(wma_handle, roam_req->sessionId,
+ 20000, 120000) != VOS_STATUS_SUCCESS) {
+ break;
+ }
+ wma_roam_scan_offload_rssi_change(wma_handle, roam_req->sessionId, 15, 14);
+ break;
+
+ default:
+ break;
+ }
+ vos_mem_free(roam_req);
+ return vos_status;
+}
+
static WLAN_PHY_MODE wma_chan_to_mode(u8 chan, ePhyChanBondState chan_offset,
u8 vht_capable)
{
@@ -2413,7 +3166,7 @@ static VOS_STATUS wma_vdev_start(tp_wma_handle wma,
WMI_TLV_HDR_SIZE;
buf = wmi_buf_alloc(wma->wmi_handle, len);
if (!buf) {
- WMA_LOGD("%s : wmi_buf_alloc failed\n", __func__);
+ WMA_LOGE("%s : wmi_buf_alloc failed\n", __func__);
return VOS_STATUS_E_NOMEM;
}
buf_ptr = (u_int8_t *) wmi_buf_data(buf);
@@ -2679,6 +3432,30 @@ static WLAN_PHY_MODE wma_peer_phymode(tSirNwType nw_type, u_int8_t is_ht,
return phymode;
}
+static int32_t wmi_unified_send_txbf(tp_wma_handle wma,
+ tpAddStaParams params)
+{
+ wmi_vdev_txbf_en txbf_en;
+
+ /* This is set when Other partner is Bformer
+ and we are capable bformee(enabled both in ini and fw) */
+ txbf_en.sutxbfee = params->vhtTxBFCapable;
+ txbf_en.mutxbfee = params->vhtTxMUBformeeCapable;
+ txbf_en.sutxbfer = 0;
+ txbf_en.mutxbfer = 0;
+
+ /* When MU TxBfee is set, SU TxBfee must be set by default */
+ if (txbf_en.mutxbfee)
+ txbf_en.sutxbfee = txbf_en.mutxbfee;
+
+ WMA_LOGD("txbf_en.sutxbfee %d txbf_en.mutxbfee %d\n",
+ txbf_en.sutxbfee, txbf_en.mutxbfee);
+
+ return(wmi_unified_vdev_set_param_send(wma->wmi_handle,
+ params->smesessionId, WMI_VDEV_PARAM_TXBF,
+ *((A_UINT8 *)&txbf_en)));
+}
+
static int32_t wmi_unified_send_peer_assoc(tp_wma_handle wma,
tSirNwType nw_type,
tpAddStaParams params)
@@ -2688,7 +3465,7 @@ static int32_t wmi_unified_send_peer_assoc(tp_wma_handle wma,
wmi_buf_t buf;
int32_t len;
int32_t ret, max_rates, i;
- u_int8_t rx_stbc;
+ u_int8_t rx_stbc, tx_stbc;
u_int8_t *rate_pos, *buf_ptr;
wmi_rate_set peer_legacy_rates, peer_ht_rates;
wmi_vht_rate_set *mcs;
@@ -2763,7 +3540,7 @@ static int32_t wmi_unified_send_peer_assoc(tp_wma_handle wma,
buf = wmi_buf_alloc(wma->wmi_handle, len);
if (!buf) {
- WMA_LOGP("%s: wmi_buf_alloc failed\n", __func__);
+ WMA_LOGE("%s: wmi_buf_alloc failed\n", __func__);
return -ENOMEM;
}
@@ -2826,6 +3603,13 @@ static int32_t wmi_unified_send_peer_assoc(tp_wma_handle wma,
cmd->peer_rate_caps |= (rx_stbc << WMI_RC_RX_STBC_FLAG_S);
}
+ tx_stbc = (params->ht_caps & IEEE80211_HTCAP_C_TXSTBC) >>
+ IEEE80211_HTCAP_C_TXSTBC_S;
+ if (tx_stbc) {
+ cmd->peer_flags |= WMI_PEER_STBC;
+ cmd->peer_rate_caps |= (tx_stbc << WMI_RC_TX_STBC_FLAG_S);
+ }
+
if (params->htLdpcCapable || params->vhtLdpcCapable)
cmd->peer_flags |= WMI_PEER_LDPC;
@@ -2934,7 +3718,7 @@ static int32_t wmi_unified_send_peer_assoc(tp_wma_handle wma,
ret = wmi_unified_cmd_send(wma->wmi_handle, buf, len,
WMI_PEER_ASSOC_CMDID);
- if (ret < 0) {
+ if (ret != EOK) {
WMA_LOGP("Failed to send peer assoc command ret = %d\n", ret);
adf_nbuf_free(buf);
}
@@ -2967,13 +3751,31 @@ wmi_unified_pdev_set_param(wmi_unified_t wmi_handle, WMI_PDEV_PARAM param_id,
param_id, param_value);
ret = wmi_unified_cmd_send(wmi_handle, buf, len,
WMI_PDEV_SET_PARAM_CMDID);
- if (ret < 0) {
+ if (ret != EOK) {
WMA_LOGE("Failed to send set param command ret = %d", ret);
wmi_buf_free(buf);
}
return ret;
}
+static int32_t wma_txrx_fw_stats_reset(tp_wma_handle wma_handle,
+ uint8_t vdev_id, u_int32_t value)
+{
+ struct ol_txrx_stats_req req;
+ ol_txrx_vdev_handle vdev;
+
+ vdev = wma_find_vdev_by_id(wma_handle, vdev_id);
+ if (!vdev) {
+ WMA_LOGE("%s:Invalid vdev handle", __func__);
+ return -EINVAL;
+ }
+ vos_mem_zero(&req, sizeof(req));
+ req.stats_type_reset_mask = value;
+ ol_txrx_fw_stats_get(vdev, &req);
+
+ return 0;
+}
+
static int32_t wma_set_txrx_fw_stats_level(tp_wma_handle wma_handle,
uint8_t vdev_id, u_int32_t value)
{
@@ -3015,6 +3817,11 @@ static int32_t wma_set_priv_cfg(tp_wma_handle wma_handle,
privcmd->param_vdev_id,
privcmd->param_value);
break;
+ case WMA_VDEV_TXRX_FWSTATS_RESET_CMDID:
+ ret = wma_txrx_fw_stats_reset(wma_handle,
+ privcmd->param_vdev_id,
+ privcmd->param_value);
+ break;
default:
WMA_LOGE("Invalid wma config command id:%d",
privcmd->param_id);
@@ -3494,7 +4301,9 @@ wma_update_cfg_params(tp_wma_handle wma, tSirMsgQ *cfgParam)
/* BSS set params functions */
static void
-wma_vdev_set_bss_params(tp_wma_handle wma, int vdev_id, tpAddBssParams params)
+wma_vdev_set_bss_params(tp_wma_handle wma, int vdev_id,
+ tSirMacBeaconInterval beaconInterval, tANI_U8 dtimPeriod,
+ tANI_U8 shortSlotTimeSupported, tANI_U8 llbCoexist)
{
int ret;
uint32_t slot_time;
@@ -3502,19 +4311,19 @@ wma_vdev_set_bss_params(tp_wma_handle wma, int vdev_id, tpAddBssParams params)
/* Beacon Interval setting */
ret = wmi_unified_vdev_set_param_send(wma->wmi_handle, vdev_id,
WMI_VDEV_PARAM_BEACON_INTERVAL,
- params->beaconInterval);
+ beaconInterval);
if (ret)
WMA_LOGE("failed to set WMI_VDEV_PARAM_BEACON_INTERVAL\n");
ret = wmi_unified_vdev_set_param_send(wma->wmi_handle, vdev_id,
WMI_VDEV_PARAM_DTIM_PERIOD,
- params->dtimPeriod);
+ dtimPeriod);
if (ret)
WMA_LOGE("failed to set WMI_VDEV_PARAM_DTIM_PERIOD\n");
/* Slot time */
- if (params->shortSlotTimeSupported)
+ if (shortSlotTimeSupported)
slot_time = WMI_VDEV_SLOT_TIME_SHORT;
else
slot_time = WMI_VDEV_SLOT_TIME_LONG;
@@ -3526,7 +4335,7 @@ wma_vdev_set_bss_params(tp_wma_handle wma, int vdev_id, tpAddBssParams params)
WMA_LOGE("failed to set WMI_VDEV_PARAM_SLOT_TIME\n");
/* Initialize protection mode in case of coexistence */
- wma_update_protection_mode(wma, vdev_id, params->llbCoexist);
+ wma_update_protection_mode(wma, vdev_id, llbCoexist);
}
static void wma_add_bss_ap_mode(tp_wma_handle wma, tpAddBssParams add_bss)
@@ -3582,6 +4391,7 @@ static void wma_add_bss_ap_mode(tp_wma_handle wma, tpAddBssParams add_bss)
req.dtim_period = add_bss->dtimPeriod;
req.hidden_ssid = add_bss->bHiddenSSIDEn;
req.is_dfs = add_bss->bSpectrumMgtEnabled;
+ req.oper_mode = BSS_OPERATIONAL_MODE_AP;
req.ssid.length = add_bss->ssId.length;
if (req.ssid.length > 0)
vos_mem_copy(req.ssid.ssId, add_bss->ssId.ssId,
@@ -3610,71 +4420,130 @@ send_fail_resp:
wma_send_msg(wma, WDA_ADD_BSS_RSP, (void *)add_bss, 0);
}
-static void wma_add_bss_sta_mode(tp_wma_handle wma, tpAddBssParams params)
+static void wma_add_bss_sta_mode(tp_wma_handle wma, tpAddBssParams add_bss)
{
ol_txrx_pdev_handle pdev;
- wmi_vdev_txbf_en txbf_en;
+ struct wma_vdev_start_req req;
+ struct wma_target_req *msg;
+ u_int8_t vdev_id, peer_id;
+ ol_txrx_peer_handle peer;
+ VOS_STATUS status;
+ struct wma_txrx_node *iface;
pdev = vos_get_context(VOS_MODULE_ID_TXRX, wma->vos_context);
- if (params->operMode) {
- if (!params->updateBss)
+ vdev_id = add_bss->staContext.smesessionId;
+ iface = &wma->interfaces[vdev_id];
+ if (add_bss->operMode) {
+ if (add_bss->reassocReq) {
+ // Called in preassoc state. BSSID peer is already added by set_linkstate
+ peer = ol_txrx_find_peer_by_addr(pdev, add_bss->bssId, &peer_id);
+ if (!peer) {
+ WMA_LOGE("%s Failed to find peer %pM\n", __func__,
+ add_bss->bssId);
+ goto send_fail_resp;
+ }
+ msg = wma_fill_vdev_req(wma, vdev_id, WDA_ADD_BSS_REQ,
+ WMA_TARGET_REQ_TYPE_VDEV_START, add_bss);
+ if (!msg) {
+ WMA_LOGP("%s Failed to allocate vdev request vdev_id %d\n",
+ __func__, vdev_id);
+ goto peer_cleanup;
+ }
+
+ add_bss->staContext.staIdx = ol_txrx_local_peer_id(peer);
+
+ vos_mem_zero(&req, sizeof(req));
+ req.vdev_id = vdev_id;
+ req.chan = add_bss->currentOperChannel;
+ req.chan_offset = add_bss->currentExtChannel;
+#if defined WLAN_FEATURE_VOWIF
+ req.max_txpow = add_bss->maxTxPower;
+#else
+ req.max_txpow = 0;
+#endif
+ req.beacon_intval = add_bss->beaconInterval;
+ req.dtim_period = add_bss->dtimPeriod;
+ req.hidden_ssid = add_bss->bHiddenSSIDEn;
+ req.is_dfs = add_bss->bSpectrumMgtEnabled;
+ req.ssid.length = add_bss->ssId.length;
+ req.oper_mode = BSS_OPERATIONAL_MODE_STA;
+ if (req.ssid.length > 0)
+ vos_mem_copy(req.ssid.ssId, add_bss->ssId.ssId,
+ add_bss->ssId.length);
+
+ status = wma_vdev_start(wma, &req);
+ if (status != VOS_STATUS_SUCCESS) {
+ wma_remove_vdev_req(wma, vdev_id,
+ WMA_TARGET_REQ_TYPE_VDEV_START);
+ goto peer_cleanup;
+ }
+ // Save parameters later needed by WDA_ADD_STA_REQ
+ iface->beaconInterval = add_bss->beaconInterval;
+ iface->dtimPeriod = add_bss->dtimPeriod;
+ iface->llbCoexist = add_bss->llbCoexist;
+ iface->shortSlotTimeSupported = add_bss->shortSlotTimeSupported;
+ // ADD_BSS_RESP will be deferred to completion of VDEV_START
+
+ return;
+ }
+ if (!add_bss->updateBss) {
goto send_bss_resp;
+ }
/* Update peer state */
- if (params->staContext.encryptType == eSIR_ED_NONE) {
+ if (add_bss->staContext.encryptType == eSIR_ED_NONE) {
WMA_LOGD("%s: Update peer(%pM) state into auth\n",
- __func__, params->bssId);
- ol_txrx_peer_state_update(pdev, params->bssId,
+ __func__, add_bss->bssId);
+ ol_txrx_peer_state_update(pdev, add_bss->bssId,
ol_txrx_peer_state_auth);
} else {
WMA_LOGD("%s: Update peer(%pM) state into conn\n",
- __func__, params->bssId);
- ol_txrx_peer_state_update(pdev, params->bssId,
+ __func__, add_bss->bssId);
+ ol_txrx_peer_state_update(pdev, add_bss->bssId,
ol_txrx_peer_state_conn);
}
- /* This is set when Other partner is Bformer
- and we are capable bformee(enabled both in ini and fw) */
- txbf_en.sutxbfee = params->staContext.vhtTxBFCapable;
- txbf_en.mutxbfee = 0;
- txbf_en.sutxbfer = 0;
- txbf_en.mutxbfer = 0;
- wmi_unified_vdev_set_param_send(wma->wmi_handle,
- params->staContext.smesessionId, WMI_VDEV_PARAM_TXBF,
- *((A_UINT8 *)&txbf_en));
+ wmi_unified_send_txbf(wma, &add_bss->staContext);
- wmi_unified_send_peer_assoc(wma, params->nwType,
- &params->staContext);
- if (params->staContext.encryptType == eSIR_ED_NONE) {
+ wmi_unified_send_peer_assoc(wma, add_bss->nwType,
+ &add_bss->staContext);
+ if (add_bss->staContext.encryptType == eSIR_ED_NONE) {
WMA_LOGD("%s: send peer authorize wmi cmd for %pM\n",
- __func__, params->bssId);
- wma_set_peer_param(wma, params->bssId,
+ __func__, add_bss->bssId);
+ wma_set_peer_param(wma, add_bss->bssId,
WMI_PEER_AUTHORIZE, 1,
- params->staContext.smesessionId);
- wma_vdev_set_bss_params(wma, params->staContext.smesessionId, params);
+ add_bss->staContext.smesessionId);
+ wma_vdev_set_bss_params(wma, add_bss->staContext.smesessionId,
+ add_bss->beaconInterval, add_bss->dtimPeriod,
+ add_bss->shortSlotTimeSupported, add_bss->llbCoexist);
}
/*
* Store the bssid in interface table, bssid will
* be used during group key setting sta mode.
*/
- vos_mem_copy(wma->interfaces
- [params->staContext.smesessionId].bssid,
- params->bssId, ETH_ALEN);
+ vos_mem_copy(iface->bssid, add_bss->bssId, ETH_ALEN);
}
send_bss_resp:
- ol_txrx_find_peer_by_addr(pdev, params->bssId,
- &params->staContext.staIdx);
- params->status = (params->staContext.staIdx < 0) ?
+ ol_txrx_find_peer_by_addr(pdev, add_bss->bssId,
+ &add_bss->staContext.staIdx);
+ add_bss->status = (add_bss->staContext.staIdx < 0) ?
VOS_STATUS_E_FAILURE : VOS_STATUS_SUCCESS;
- params->bssIdx = params->staContext.smesessionId;
- vos_mem_copy(params->staContext.staMac, params->bssId,
- sizeof(params->staContext.staMac));
+ add_bss->bssIdx = add_bss->staContext.smesessionId;
+ vos_mem_copy(add_bss->staContext.staMac, add_bss->bssId,
+ sizeof(add_bss->staContext.staMac));
WMA_LOGD("%s: opermode %d update_bss %d nw_type %d bssid %pM"
- " staIdx %d status %d\n", __func__, params->operMode,
- params->updateBss, params->nwType, params->bssId,
- params->staContext.staIdx, params->status);
- wma_send_msg(wma, WDA_ADD_BSS_RSP, (void *)params, 0);
+ " staIdx %d status %d\n", __func__, add_bss->operMode,
+ add_bss->updateBss, add_bss->nwType, add_bss->bssId,
+ add_bss->staContext.staIdx, add_bss->status);
+ wma_send_msg(wma, WDA_ADD_BSS_RSP, (void *)add_bss, 0);
+ return;
+
+peer_cleanup:
+ wma_remove_peer(wma, add_bss->bssId, vdev_id, peer);
+send_fail_resp:
+ add_bss->status = VOS_STATUS_E_FAILURE;
+ wma_send_msg(wma, WDA_ADD_BSS_RSP, (void *)add_bss, 0);
}
static void wma_add_bss(tp_wma_handle wma, tpAddBssParams params)
@@ -3694,6 +4563,7 @@ static int wmi_unified_vdev_up_send(wmi_unified_t wmi,
wmi_buf_t buf;
int32_t len = sizeof(*cmd);
+ printk("%s: VDEV_UP\n", __func__);
WMA_LOGD("%s: vdev_id %d aid %d bssid %pM\n", __func__,
vdev_id, aid, bssid);
buf = wmi_buf_alloc(wmi, len);
@@ -3827,7 +4697,6 @@ static void wma_add_sta_req_ap_mode(tp_wma_handle wma, tpAddStaParams add_sta)
u_int8_t peer_id;
VOS_STATUS status;
int32_t ret;
- wmi_vdev_txbf_en txbf_en;
pdev = vos_get_context(VOS_MODULE_ID_TXRX, wma->vos_context);
@@ -3869,15 +4738,8 @@ static void wma_add_sta_req_ap_mode(tp_wma_handle wma, tpAddStaParams add_sta)
wma_remove_peer(wma, add_sta->staMac, add_sta->smesessionId, peer);
goto send_rsp;
}
- /* This is set when Other partner is Bformer
- and we are capable bformee(enabled both in ini and fw) */
- txbf_en.sutxbfee = add_sta->vhtTxBFCapable;
- txbf_en.mutxbfee = 0;
- txbf_en.sutxbfer = 0;
- txbf_en.mutxbfer = 0;
- wmi_unified_vdev_set_param_send(wma->wmi_handle, add_sta->smesessionId,
- WMI_VDEV_PARAM_TXBF, *((A_UINT8 *)&txbf_en));
+ wmi_unified_send_txbf(wma, add_sta);
ret = wmi_unified_send_peer_assoc(wma, add_sta->nwType, add_sta);
if (ret) {
@@ -3929,14 +4791,52 @@ static void wma_add_sta_req_sta_mode(tp_wma_handle wma, tpAddStaParams params)
{
ol_txrx_pdev_handle pdev;
VOS_STATUS status = VOS_STATUS_SUCCESS;
+ ol_txrx_peer_handle peer;
+ struct wma_txrx_node *iface;
pdev = vos_get_context(VOS_MODULE_ID_TXRX, wma->vos_context);
+ iface = &wma->interfaces[params->smesessionId];
if (params->staType != STA_ENTRY_SELF) {
WMA_LOGP("%s: unsupported station type %d\n",
__func__, params->staType);
goto out;
}
+ peer = ol_txrx_find_peer_by_addr(pdev, params->bssId, &params->staIdx);
+ if (peer != NULL && peer->state == ol_txrx_peer_state_disc) {
+ /*
+ * This is the case for reassociation.
+ * peer state update and peer_assoc is required since it
+ * was not done by WDA_ADD_BSS_REQ.
+ */
+
+ /* Update peer state */
+ if (params->encryptType == eSIR_ED_NONE) {
+ WMA_LOGD("%s: Update peer(%pM) state into auth\n",
+ __func__, params->bssId);
+ ol_txrx_peer_state_update(pdev, params->bssId,
+ ol_txrx_peer_state_auth);
+ } else {
+ WMA_LOGD("%s: Update peer(%pM) state into conn\n",
+ __func__, params->bssId);
+ ol_txrx_peer_state_update(pdev, params->bssId,
+ ol_txrx_peer_state_conn);
+ }
+
+ if (params->encryptType == eSIR_ED_NONE) {
+ WMA_LOGD("%s: send peer authorize wmi cmd for %pM\n",
+ __func__, params->bssId);
+ wma_set_peer_param(wma, params->bssId,
+ WMI_PEER_AUTHORIZE, 1,
+ params->smesessionId);
+ }
+ wmi_unified_send_txbf(wma, params);
+ wmi_unified_send_peer_assoc(wma, params->nwType,
+ params);
+ }
+ wma_vdev_set_bss_params(wma, params->smesessionId, iface->beaconInterval,
+ iface->dtimPeriod, iface->shortSlotTimeSupported, iface->llbCoexist);
+ wma_roam_scan_offload_init_connect(wma, params->smesessionId);
if (wmi_unified_vdev_up_send(wma->wmi_handle, params->smesessionId,
params->assocId, params->bssId) < 0) {
WMA_LOGP("Failed to send vdev up cmd: vdev %d bssid %pM\n",
@@ -3945,7 +4845,6 @@ static void wma_add_sta_req_sta_mode(tp_wma_handle wma, tpAddStaParams params)
}
out:
- ol_txrx_find_peer_by_addr(pdev, params->bssId, &params->staIdx);
params->status = status;
WMA_LOGD("%s: statype %d vdev_id %d aid %d bssid %pM staIdx %d status %d\n",
__func__, params->staType, params->smesessionId, params->assocId,
@@ -4375,6 +5274,7 @@ static void wma_delete_sta_req_sta_mode(tp_wma_handle wma,
{
VOS_STATUS status = VOS_STATUS_SUCCESS;
+ wma_roam_scan_offload_init_connect(wma, params->smesessionId);
if (wmi_unified_vdev_down_send(wma->wmi_handle, params->smesessionId) < 0) {
WMA_LOGP("%s: failed to bring down vdev %d\n",
__func__, params->smesessionId);
@@ -4502,8 +5402,9 @@ static void wma_set_linkstate(tp_wma_handle wma, tpLinkStateParams params)
goto out;
}
- if (params->state == eSIR_LINK_PREASSOC_STATE)
+ if (params->state == eSIR_LINK_PREASSOC_STATE) {
wma_create_peer(wma, pdev, vdev, params->bssid, vdev_id);
+ }
else {
if (wmi_unified_vdev_stop_send(wma->wmi_handle, vdev_id)) {
WMA_LOGP("%s: %d Failed to send vdev stop\n",
@@ -5130,17 +6031,13 @@ static void wma_set_keepalive_req(tp_wma_handle wma,
tSirKeepAliveReq *keepalive)
{
WMA_LOGD("KEEPALIVE:PacketType:%d", keepalive->packetType);
- if (keepalive->packetType == SIR_KEEP_ALIVE_NULL_PKT)
- wma_set_sta_null_keep_alive(wma, keepalive->sessionId,
- keepalive->timePeriod);
-#ifdef QCA_WIFI_ISOC
- else if (keepalive->packetType == SIR_KEEP_ALIVE_UNSOLICIT_ARP_RSP)
- wma_set_sta_arp_keep_alive(wma, keepalive->sessionId,
- keepalive->hostIpv4Addr,
- keepalive->destIpv4Addr,
- keepalive->destMacAddr,
- keepalive->timePeriod);
-#endif
+ wma_set_sta_keep_alive(wma, keepalive->sessionId,
+ keepalive->packetType,
+ keepalive->timePeriod,
+ keepalive->hostIpv4Addr,
+ keepalive->destIpv4Addr,
+ keepalive->destMacAddr);
+
vos_mem_free(keepalive);
}
/*
@@ -5205,7 +6102,7 @@ wmi_unified_set_sta_uapsd_auto_trig_cmd(
ret = wmi_unified_cmd_send(wmi_handle, buf, cmd_len,
WMI_STA_UAPSD_AUTO_TRIG_CMDID);
- if (ret < 0) {
+ if (ret != EOK) {
WMA_LOGE("Failed to send set uapsd param ret = %d", ret);
wmi_buf_free(buf);
}
@@ -5297,7 +6194,6 @@ static VOS_STATUS wma_pno_start(tp_wma_handle wma, tpSirPNOScanReq pno)
}
cmd = (wmi_nlo_config_cmd_fixed_param *) wmi_buf_data(buf);
- vos_mem_zero(cmd, len);
buf_ptr = (u_int8_t *) cmd;
WMITLV_SET_HDR(&cmd->tlv_header,
@@ -5346,7 +6242,7 @@ static VOS_STATUS wma_pno_start(tp_wma_handle wma, tpSirPNOScanReq pno)
WMA_LOGD("Ch[%d]: %d MHz", i, channel_list[i]);
}
- buf_ptr += cmd->num_of_channels * sizeof(u_int32+t);
+ buf_ptr += cmd->num_of_channels * sizeof(u_int32_t);
/* TODO: PNO offload present in discrete firmware is implemented
@@ -6293,10 +7189,241 @@ static void wma_process_update_opmode(tp_wma_handle wma_handle,
update_vht_opmode->smesessionId);
}
+#ifdef FEATURE_OEM_DATA_SUPPORT
+static void wma_start_oem_data_req(tp_wma_handle wma_handle,
+ tStartOemDataReq *startOemDataReq)
+{
+ wmi_buf_t buf;
+ u_int8_t *cmd;
+ int ret = 0;
+
+ WMA_LOGD("%s: Send OEM Data Request to target", __func__);
+
+ if (!startOemDataReq)
+ return;
+
+ if (!wma_handle || !wma_handle->wmi_handle) {
+ WMA_LOGE("%s: WMA is closed, can not send Oem data request cmd", __func__);
+ return;
+ }
+
+ buf = wmi_buf_alloc(wma_handle->wmi_handle,
+ (OEM_DATA_REQ_SIZE + WMI_TLV_HDR_SIZE));
+ if (!buf) {
+ WMA_LOGE("%s:wmi_buf_alloc failed", __func__);
+ return;
+ }
+
+ cmd = (u_int8_t *)wmi_buf_data(buf);
+
+ WMITLV_SET_HDR(cmd, WMITLV_TAG_ARRAY_BYTE,
+ OEM_DATA_REQ_SIZE);
+ cmd += WMI_TLV_HDR_SIZE;
+ vos_mem_copy(cmd, &startOemDataReq->oemDataReq[0], OEM_DATA_REQ_SIZE);
+
+ ret = wmi_unified_cmd_send(wma_handle->wmi_handle, buf,
+ (OEM_DATA_REQ_SIZE +
+ WMI_TLV_HDR_SIZE),
+ WMI_OEM_DATA_REQ_CMDID);
+
+ if (ret != EOK) {
+ WMA_LOGE("%s:wmi cmd send failed", __func__);
+ adf_nbuf_free(buf);
+ return;
+ }
+
+ return;
+}
+#endif /* FEATURE_OEM_DATA_SUPPORT */
+static int wma_process_receive_filter_set_filter_req(tp_wma_handle wma_handle,
+ tSirRcvPktFilterCfgType *rcv_filter_param)
+{
+ wmi_chatter_coalescing_add_filter_cmd_fixed_param *cmd;
+ chatter_pkt_coalescing_filter *cmd_filter;
+ u_int8_t *buf_ptr;
+ wmi_buf_t buf;
+ int num_rules = 1; /* Only one rule at a time */
+ int len;
+ int err;
+ int i;
+
+ /* allocate the memory */
+ len = sizeof(*cmd) + WMI_TLV_HDR_SIZE + sizeof(*cmd_filter) * num_rules;
+ buf = wmi_buf_alloc(wma_handle->wmi_handle, len);
+ if (!buf) {
+ WMA_LOGE("Failed to allocate buffer to send set_param cmd");
+ vos_mem_free(rcv_filter_param);
+ return -ENOMEM;
+ }
+ buf_ptr = (u_int8_t *) wmi_buf_data(buf);
+
+ /* fill the fixed part */
+ cmd = (wmi_chatter_coalescing_add_filter_cmd_fixed_param *) buf_ptr;
+ WMITLV_SET_HDR(&cmd->tlv_header,
+ WMITLV_TAG_STRUC_wmi_chatter_coalescing_add_filter_cmd_fixed_param,
+ WMITLV_GET_STRUCT_TLVLEN(
+ wmi_chatter_coalescing_add_filter_cmd_fixed_param));
+ cmd->num_of_filters = num_rules;
+
+ /* specify the type of data in the subsequent buffer */
+ buf_ptr += sizeof(*cmd);
+ cmd_filter = (chatter_pkt_coalescing_filter *) buf_ptr;
+ WMITLV_SET_HDR(buf_ptr, WMITLV_TAG_ARRAY_STRUC,
+ num_rules * sizeof(chatter_pkt_coalescing_filter));
+
+ /* fill the actual filter data */
+ buf_ptr += WMI_TLV_HDR_SIZE;
+ cmd_filter = (chatter_pkt_coalescing_filter *) buf_ptr;
+
+ WMITLV_SET_HDR(&cmd_filter->tlv_header,
+ WMITLV_TAG_STRUC_wmi_chatter_pkt_coalescing_filter,
+ WMITLV_GET_STRUCT_TLVLEN(chatter_pkt_coalescing_filter));
+
+ cmd_filter->filter_id = rcv_filter_param->filterId;
+ cmd_filter->max_coalescing_delay = rcv_filter_param->coalesceTime;
+ cmd_filter->pkt_type = CHATTER_COALESCING_PKT_TYPE_UNICAST |
+ CHATTER_COALESCING_PKT_TYPE_MULTICAST |
+ CHATTER_COALESCING_PKT_TYPE_BROADCAST;
+ cmd_filter->num_of_test_field = MIN(rcv_filter_param->numFieldParams,
+ CHATTER_MAX_FIELD_TEST);
+
+ for (i = 0; i < cmd_filter->num_of_test_field; i++) {
+ cmd_filter->test_fields[i].offset = rcv_filter_param->paramsData[i].dataOffset;
+ cmd_filter->test_fields[i].length = MIN(rcv_filter_param->paramsData[i].dataLength,
+ CHATTER_MAX_TEST_FIELD_LEN32);
+ cmd_filter->test_fields[i].test = rcv_filter_param->paramsData[i].cmpFlag;
+ memcpy(&cmd_filter->test_fields[i].value, rcv_filter_param->paramsData[i].compareData,
+ cmd_filter->test_fields[i].length);
+ memcpy(&cmd_filter->test_fields[i].mask, rcv_filter_param->paramsData[i].dataMask,
+ cmd_filter->test_fields[i].length);
+ }
+ WMA_LOGD("Chatter packets, adding filter with id: %d, num_test_fields=%d",cmd_filter->filter_id,
+ cmd_filter->num_of_test_field);
+ /* send the command along with data */
+ err = wmi_unified_cmd_send(wma_handle->wmi_handle, buf, len,
+ WMI_CHATTER_ADD_COALESCING_FILTER_CMDID);
+ if (err) {
+ WMA_LOGE("Failed to send set_param cmd");
+ wmi_buf_free(buf);
+ vos_mem_free(rcv_filter_param);
+ return -EIO;
+ }
+ vos_mem_free(rcv_filter_param);
+ return 0; /* SUCCESS */
+}
+
+static int wma_process_receive_filter_clear_filter_req(tp_wma_handle wma_handle,
+ tSirRcvFltPktClearParam *rcv_clear_param)
+{
+ wmi_chatter_coalescing_delete_filter_cmd_fixed_param *cmd;
+ wmi_buf_t buf;
+ int err;
+
+ /* allocate the memory */
+ buf = wmi_buf_alloc(wma_handle->wmi_handle, sizeof(*cmd));
+ if (!buf) {
+ WMA_LOGE("Failed to allocate buffer to send set_param cmd");
+ vos_mem_free(rcv_clear_param);
+ return -ENOMEM;
+ }
+
+ /* fill the fixed part */
+ cmd = (wmi_chatter_coalescing_delete_filter_cmd_fixed_param *) wmi_buf_data(buf);
+ WMITLV_SET_HDR(&cmd->tlv_header,
+ WMITLV_TAG_STRUC_wmi_chatter_coalescing_delete_filter_cmd_fixed_param,
+ WMITLV_GET_STRUCT_TLVLEN(
+ wmi_chatter_coalescing_delete_filter_cmd_fixed_param));
+ cmd->filter_id = rcv_clear_param->filterId;
+ WMA_LOGD("Chatter packets, clearing filter with id: %d",cmd->filter_id);
+
+ /* send the command along with data */
+ err = wmi_unified_cmd_send(wma_handle->wmi_handle, buf,
+ sizeof(*cmd), WMI_CHATTER_DELETE_COALESCING_FILTER_CMDID);
+ if (err) {
+ WMA_LOGE("Failed to send set_param cmd");
+ wmi_buf_free(buf);
+ vos_mem_free(rcv_clear_param);
+ return -EIO;
+ }
+ vos_mem_free(rcv_clear_param);
+ return 0; /* SUCCESS */
+}
+
+#ifdef FEATURE_WLAN_CCX
+
+#define TSM_DELAY_HISTROGRAM_BINS 4
+/*
+ * @brief: A parallel function to WDA_ProcessTsmStatsReq for pronto. This
+ * function fetches stats from data path APIs and post
+ * WDA_TSM_STATS_RSP msg back to LIM.
+ * @param: wma_handler - handle to wma
+ * @param: pTsmStats - TSM stats struct that needs to be populated and
+ * passed in message.
+ */
+
+VOS_STATUS wma_process_tsm_stats_req(tp_wma_handle wma_handler,
+ tTSMStats *pTsmStats)
+{
+ int tid = pTsmStats->tid;
+ u_int8_t counter;
+ u_int32_t queue_delay_microsec = 0;
+ u_int32_t tx_delay_microsec = 0;
+ u_int16_t packet_count = 0;
+ u_int16_t packet_loss_count = 0;
+ /*
+ * The number of histrogram bin report by data path api are different
+ * than required by TSM, hence different (6) size array used
+ */
+ u_int16_t bin_values[QCA_TX_DELAY_HIST_REPORT_BINS] = {0,};
+
+ ol_txrx_pdev_handle pdev = vos_get_context(VOS_MODULE_ID_TXRX,
+ wma_handler->vos_context);
+
+ /* get required values from data path APIs */
+ ol_tx_delay(pdev, &queue_delay_microsec, &tx_delay_microsec, tid);
+ ol_tx_delay_hist(pdev, bin_values, tid);
+ ol_tx_packet_count(pdev, &packet_count, &packet_loss_count, tid );
+
+ /* populate pTsmStats */
+ pTsmStats->tsmMetrics.UplinkPktQueueDly = queue_delay_microsec;
+ /* store only required number of bin values */
+ for ( counter = 0; counter < TSM_DELAY_HISTROGRAM_BINS; counter++)
+ {
+ pTsmStats->tsmMetrics.UplinkPktQueueDlyHist[counter] =
+ bin_values[counter];
+ }
+ pTsmStats->tsmMetrics.UplinkPktTxDly = tx_delay_microsec;
+ pTsmStats->tsmMetrics.UplinkPktLoss = packet_loss_count;
+ pTsmStats->tsmMetrics.UplinkPktCount = packet_count;
+
+ /*
+ * No need to populate roaming delay and roaming count as they are
+ * being populated just before sending IAPP frame out
+ */
+
+ /* post this message to LIM/PE */
+ wma_send_msg(wma_handler, WDA_TSM_STATS_RSP, (void *)pTsmStats , 0) ;
+ return VOS_STATUS_SUCCESS;
+}
+
+#endif
+
static void wma_add_ts_req(tp_wma_handle wma, tAddTsParams *msg)
{
- msg->status = eHAL_STATUS_SUCCESS;
- wma_send_msg(wma, WDA_ADD_TS_RSP, msg, 0);
+#ifdef FEATURE_WLAN_CCX
+ /*
+ * msmt_interval is in unit called TU (1 TU = 1024 us)
+ * max value of msmt_interval cannot make resulting
+ * interval_miliseconds overflow 32 bit
+ */
+ ol_txrx_pdev_handle pdev =
+ vos_get_context(VOS_MODULE_ID_TXRX, wma->vos_context);
+ tANI_U32 intervalMiliseconds =
+ (msg->tsm_interval*1024)/1000;
+ ol_tx_set_compute_interval(pdev, intervalMiliseconds);
+#endif
+ msg->status = eHAL_STATUS_SUCCESS;
+ wma_send_msg(wma, WDA_ADD_TS_RSP, msg, 0);
}
static void wma_data_tx_ack_work_handler(struct work_struct *ack_work)
@@ -6389,7 +7516,6 @@ static VOS_STATUS wma_process_gtk_offload_req(tp_wma_handle wma,
}
cmd = (WMI_GTK_OFFLOAD_CMD_fixed_param *)wmi_buf_data(buf);
- vos_mem_zero(cmd, sizeof(*cmd));
WMITLV_SET_HDR(&cmd->tlv_header,
WMITLV_TAG_STRUC_WMI_GTK_OFFLOAD_CMD_fixed_param,
WMITLV_GET_STRUCT_TLVLEN(
@@ -6454,7 +7580,6 @@ static VOS_STATUS wma_process_gtk_offload_getinfo_req(tp_wma_handle wma,
}
cmd = (WMI_GTK_OFFLOAD_CMD_fixed_param *)wmi_buf_data(buf);
- vos_mem_zero(cmd, sizeof(*cmd));
WMITLV_SET_HDR(&cmd->tlv_header,
WMITLV_TAG_STRUC_WMI_GTK_OFFLOAD_CMD_fixed_param,
WMITLV_GET_STRUCT_TLVLEN(
@@ -6478,16 +7603,145 @@ out:
}
#endif
+/*
+ * Function : wma_enable_arp_ns_offload
+ * Description : To configure ARP NS off load data to firmware
+ * when target goes to wow mode.
+ * Args : @wma - wma handle, @tpSirHostOffloadReq -
+ * pHostOffloadParams,@bool bArpOnly
+ * Returns : Returns Failure or Success based on WMI cmd.
+ * Comments : Since firware expects ARP and NS to be configured
+ * at a time, Arp info is cached in wma and send along
+ * with NS info to make both work.
+ */
+static VOS_STATUS wma_enable_arp_ns_offload(tp_wma_handle wma, tpSirHostOffloadReq pHostOffloadParams, bool bArpOnly)
+{
+ int32_t i;
+ int32_t res;
+ WMI_SET_ARP_NS_OFFLOAD_CMD_fixed_param *cmd;
+ WMI_NS_OFFLOAD_TUPLE *ns_tuple;
+ WMI_ARP_OFFLOAD_TUPLE *arp_tuple;
+ A_UINT8* buf_ptr;
+ wmi_buf_t buf;
+ int32_t len;
+ u_int8_t vdev_id;
+
+ /* Get the vdev id */
+ if (!wma_find_vdev_by_bssid(wma, pHostOffloadParams->bssId, &vdev_id)) {
+ WMA_LOGE("vdev handle is invalid for %pM", pHostOffloadParams->bssId);
+ vos_mem_free(pHostOffloadParams);
+ return VOS_STATUS_E_INVAL;
+ }
+
+ len = sizeof(WMI_SET_ARP_NS_OFFLOAD_CMD_fixed_param) +
+ WMI_TLV_HDR_SIZE + // TLV place holder size for array of NS tuples
+ WMI_MAX_NS_OFFLOADS*sizeof(WMI_NS_OFFLOAD_TUPLE) +
+ WMI_TLV_HDR_SIZE + // TLV place holder size for array of ARP tuples
+ WMI_MAX_ARP_OFFLOADS*sizeof(WMI_ARP_OFFLOAD_TUPLE);
+ buf = wmi_buf_alloc(wma->wmi_handle, len);
+ if (!buf) {
+ WMA_LOGE("%s: wmi_buf_alloc failed", __func__);
+ vos_mem_free(pHostOffloadParams);
+ return VOS_STATUS_E_NOMEM;
+ }
+
+ buf_ptr = (A_UINT8*)wmi_buf_data(buf);
+ cmd = (WMI_SET_ARP_NS_OFFLOAD_CMD_fixed_param *)buf_ptr;
+ WMITLV_SET_HDR(&cmd->tlv_header,
+ WMITLV_TAG_STRUC_WMI_SET_ARP_NS_OFFLOAD_CMD_fixed_param,
+ WMITLV_GET_STRUCT_TLVLEN(WMI_SET_ARP_NS_OFFLOAD_CMD_fixed_param));
+ cmd->flags = 0;
+ cmd->vdev_id = vdev_id;
+
+ WMA_LOGD("ARP NS Offload vdev_id: %d",cmd->vdev_id);
+
+ /* Have copy of arp info to send along with NS, Since FW expects
+ * both ARP and NS info in single cmd */
+ if(bArpOnly)
+ vos_mem_copy(&wma->mArpInfo, pHostOffloadParams, sizeof(tSirHostOffloadReq));
+
+ buf_ptr += sizeof(WMI_SET_ARP_NS_OFFLOAD_CMD_fixed_param);
+ WMITLV_SET_HDR(buf_ptr,WMITLV_TAG_ARRAY_STRUC,(WMI_MAX_NS_OFFLOADS*sizeof(WMI_NS_OFFLOAD_TUPLE)));
+ buf_ptr += WMI_TLV_HDR_SIZE;
+ for(i = 0; i < WMI_MAX_NS_OFFLOADS; i++ ){
+ ns_tuple = (WMI_NS_OFFLOAD_TUPLE *)buf_ptr;
+ WMITLV_SET_HDR(&ns_tuple->tlv_header,
+ WMITLV_TAG_STRUC_WMI_NS_OFFLOAD_TUPLE,
+ (sizeof(WMI_NS_OFFLOAD_TUPLE)-WMI_TLV_HDR_SIZE));
+
+ /* Fill data only for NS offload in the first ARP tuple for LA */
+ if (!bArpOnly &&
+ (pHostOffloadParams->enableOrDisable == SIR_OFFLOAD_ENABLE && i==0)) {
+ ns_tuple->flags |= WMI_NSOFF_FLAGS_VALID;
+
+ /*Copy the target/solicitation/remote ip addr */
+ if(pHostOffloadParams->nsOffloadInfo.targetIPv6AddrValid[0])
+ A_MEMCPY(&ns_tuple->target_ipaddr[0],
+ &pHostOffloadParams->nsOffloadInfo.targetIPv6Addr[0],sizeof(WMI_IPV6_ADDR));
+ if(pHostOffloadParams->nsOffloadInfo.targetIPv6AddrValid[1])
+ A_MEMCPY(&ns_tuple->target_ipaddr[1],
+ &pHostOffloadParams->nsOffloadInfo.targetIPv6Addr[1],sizeof(WMI_IPV6_ADDR));
+ A_MEMCPY(&ns_tuple->solicitation_ipaddr,
+ &pHostOffloadParams->nsOffloadInfo.selfIPv6Addr,sizeof(WMI_IPV6_ADDR));
+ WMA_LOGD("NS solicitedIp: %pI6, targetIp: %pI6",
+ pHostOffloadParams->nsOffloadInfo.selfIPv6Addr,
+ pHostOffloadParams->nsOffloadInfo.targetIPv6Addr[0]);
+
+ /* target MAC is optional, check if it is valid, if this is not valid,
+ * the target will use the known local MAC address rather than the tuple */
+ WMI_CHAR_ARRAY_TO_MAC_ADDR(pHostOffloadParams->nsOffloadInfo.selfMacAddr,
+ &ns_tuple->target_mac);
+ if ((ns_tuple->target_mac.mac_addr31to0 != 0) ||
+ (ns_tuple->target_mac.mac_addr47to32 != 0))
+ {
+ ns_tuple->flags |= WMI_NSOFF_FLAGS_MAC_VALID;
+ }
+ }
+ buf_ptr += sizeof(WMI_NS_OFFLOAD_TUPLE);
+ }
+
+ WMITLV_SET_HDR(buf_ptr,WMITLV_TAG_ARRAY_STRUC,(WMI_MAX_ARP_OFFLOADS*sizeof(WMI_ARP_OFFLOAD_TUPLE)));
+ buf_ptr += WMI_TLV_HDR_SIZE;
+ for(i = 0; i < WMI_MAX_ARP_OFFLOADS; i++){
+ arp_tuple = (WMI_ARP_OFFLOAD_TUPLE *)buf_ptr;
+ WMITLV_SET_HDR(&arp_tuple->tlv_header,
+ WMITLV_TAG_STRUC_WMI_ARP_OFFLOAD_TUPLE,
+ WMITLV_GET_STRUCT_TLVLEN(WMI_ARP_OFFLOAD_TUPLE));
+
+ /* Fill data for ARP and NS in the first tupple for LA */
+ if ((wma->mArpInfo.enableOrDisable == SIR_OFFLOAD_ENABLE) && (i==0)) {
+ /*Copy the target ip addr and flags*/
+ arp_tuple->flags = WMI_ARPOFF_FLAGS_VALID;
+ A_MEMCPY(&arp_tuple->target_ipaddr,wma->mArpInfo.params.hostIpv4Addr,
+ SIR_IPV4_ADDR_LEN);
+ WMA_LOGD("ARPOffload IP4 address: %pI4",
+ wma->mArpInfo.params.hostIpv4Addr);
+ }
+ buf_ptr += sizeof(WMI_ARP_OFFLOAD_TUPLE);
+ }
+ res = wmi_unified_cmd_send(wma->wmi_handle, buf, len, WMI_SET_ARP_NS_OFFLOAD_CMDID);
+ if(res) {
+ WMA_LOGE("Failed to enable ARP NDP/NSffload");
+ wmi_buf_free(buf);
+ vos_mem_free(pHostOffloadParams);
+ return VOS_STATUS_E_FAILURE;
+ }
+
+ vos_mem_free(pHostOffloadParams);
+ return VOS_STATUS_SUCCESS;
+}
+
/* function : wma_mc_process_msg
* Descriptin :
* Args :
- * Retruns :
+ * Returns :
*/
VOS_STATUS wma_mc_process_msg(v_VOID_t *vos_context, vos_msg_t *msg)
{
VOS_STATUS vos_status = VOS_STATUS_SUCCESS;
tp_wma_handle wma_handle;
ol_txrx_vdev_handle txrx_vdev_handle = NULL;
+ extern tANI_U8* macTraceGetWdaMsgString( tANI_U16 wdaMsg );
WMA_LOGD("%s: Enter", __func__);
if(NULL == msg) {
@@ -6497,11 +7751,11 @@ VOS_STATUS wma_mc_process_msg(v_VOID_t *vos_context, vos_msg_t *msg)
goto end;
}
- WMA_LOGD("msg->type = %x", msg->type);
+ WMA_LOGD("msg->type = %x %s", msg->type, macTraceGetWdaMsgString(msg->type));
wma_handle = (tp_wma_handle) vos_get_context(VOS_MODULE_ID_WDA,
vos_context);
-
+
if (NULL == wma_handle) {
WMA_LOGP("wma_handle is NULL");
VOS_ASSERT(0);
@@ -6511,6 +7765,12 @@ VOS_STATUS wma_mc_process_msg(v_VOID_t *vos_context, vos_msg_t *msg)
}
switch (msg->type) {
+#ifdef FEATURE_WLAN_CCX
+ case WDA_TSM_STATS_REQ:
+ WMA_LOGA("McThread: WDA_TSM_STATS_REQ");
+ wma_process_tsm_stats_req(wma_handle, (tTSMStats *)msg->bodyptr);
+ break;
+#endif
case WNI_CFG_DNLD_REQ:
WMA_LOGA("McThread: WNI_CFG_DNLD_REQ");
vos_status = wma_wni_cfg_dnld(wma_handle);
@@ -6669,6 +7929,17 @@ VOS_STATUS wma_mc_process_msg(v_VOID_t *vos_context, vos_msg_t *msg)
case WDA_ADD_TS_REQ:
wma_add_ts_req(wma_handle, (tAddTsParams *)msg->bodyptr);
break;
+
+ case WDA_RECEIVE_FILTER_SET_FILTER_REQ:
+ wma_process_receive_filter_set_filter_req(wma_handle,
+ (tSirRcvPktFilterCfgType *)msg->bodyptr);
+ break;
+
+ case WDA_RECEIVE_FILTER_CLEAR_FILTER_REQ:
+ wma_process_receive_filter_clear_filter_req(wma_handle,
+ (tSirRcvFltPktClearParam *)msg->bodyptr);
+ break;
+
case WDA_WOWL_ADD_BCAST_PTRN:
wma_wow_add_pattern(wma_handle,
(tpSirWowlAddBcastPtrn)msg->bodyptr);
@@ -6706,6 +7977,28 @@ VOS_STATUS wma_mc_process_msg(v_VOID_t *vos_context, vos_msg_t *msg)
(tpSirGtkOffloadGetInfoRspParams)msg->bodyptr);
break;
#endif /* WLAN_FEATURE_GTK_OFFLOAD */
+#ifdef FEATURE_OEM_DATA_SUPPORT
+ case WDA_START_OEM_DATA_REQ:
+ wma_start_oem_data_req(wma_handle,
+ (tStartOemDataReq *)msg->bodyptr);
+ break;
+#endif /* FEATURE_OEM_DATA_SUPPORT */
+ case WDA_SET_HOST_OFFLOAD:
+ wma_enable_arp_ns_offload(wma_handle, (tpSirHostOffloadReq)msg->bodyptr, true);
+ break;
+#ifdef WLAN_NS_OFFLOAD
+ case WDA_SET_NS_OFFLOAD:
+ wma_enable_arp_ns_offload(wma_handle, (tpSirHostOffloadReq)msg->bodyptr, false);
+ break;
+#endif /*WLAN_NS_OFFLOAD */
+ case WDA_START_ROAM_CANDIDATE_LOOKUP_REQ:
+ /*
+ * Main entry point or roaming directives from CSR.
+ */
+ wma_process_roam_scan_req(wma_handle,
+ (tSirRoamOffloadScanReq *)msg->bodyptr);
+ break;
+
default:
WMA_LOGD("unknow msg type %x", msg->type);
/* Do Nothing? MSG Body should be freed at here */
@@ -6934,6 +8227,26 @@ static void wma_beacon_miss_handler(tp_wma_handle wma, u_int32_t vdev_id)
wma_send_msg(wma, WDA_MISSED_BEACON_IND,
(void *)beacon_miss_ind, 0);
}
+/* function : wma_roam_better_ap_handler
+ * Descriptin : Handler for WMI_ROAM_REASON_BETTER_AP event from roam firmware in Rome.
+ * : This event means roam algorithm in Rome has found a better matching
+ * : candidate AP. The indication is sent through tl_shim as by repeating
+ * : the last beacon. Hence this routine calls a tlshim routine.
+ * Args :
+ * Returns :
+ */
+static void wma_roam_better_ap_handler(tp_wma_handle wma, u_int32_t vdev_id)
+{
+extern int tlshim_mgmt_roam_event_ind(void *context);
+ VOS_STATUS ret;
+ ret = tlshim_mgmt_roam_event_ind(wma->vos_context);
+}
+
+/* function : wma_roam_event_callback
+ * Descriptin : Handler for all events from roam engine in firmware
+ * Args :
+ * Returns :
+ */
static int wma_roam_event_callback(WMA_HANDLE handle, u_int8_t *event_buf,
u_int32_t len)
@@ -6949,17 +8262,22 @@ static int wma_roam_event_callback(WMA_HANDLE handle, u_int8_t *event_buf,
}
wmi_event = param_buf->fixed_param;
- WMA_LOGD("%s: Reason %x for vdevid %x",
- __func__, wmi_event->reason, wmi_event->vdev_id);
+ WMA_LOGD("%s: Reason %x for vdevid %x, rssi %d",
+ __func__, wmi_event->reason, wmi_event->vdev_id, wmi_event->rssi);
switch(wmi_event->reason) {
case WMI_ROAM_REASON_BMISS:
- WMA_LOGD("%s:Beacon Miss for vdevid %x",wmi_event->reason,
+ WMA_LOGD("%s:Beacon Miss for vdevid %x",__func__,
wmi_event->vdev_id);
wma_beacon_miss_handler(wma_handle, wmi_event->vdev_id);
break;
+ case WMI_ROAM_REASON_BETTER_AP:
+ WMA_LOGD("%s:Better AP found for vdevid %x, rssi %d", __func__,
+ wmi_event->vdev_id, wmi_event->rssi);
+ wma_roam_better_ap_handler(wma_handle, wmi_event->vdev_id);
+ break;
default:
- WMA_LOGD("Unhandled Roam Event %x for vdevid %x",
+ WMA_LOGD("%s:Unhandled Roam Event %x for vdevid %x", __func__,
wmi_event->reason, wmi_event->vdev_id);
break;
}
@@ -7040,10 +8358,10 @@ skip_pno_cmp_ind:
#endif
-/* function : wma_start
- * Descriptin :
- * Args :
- * Retruns :
+/* function : wma_start
+ * Descriptin :
+ * Args :
+ * Returns :
*/
VOS_STATUS wma_start(v_VOID_t *vos_ctx)
{
@@ -7157,9 +8475,9 @@ end:
}
/* function : wma_stop
- * Descriptin :
- * Args :
- * Retruns :
+ * Descriptin :
+ * Args :
+ * Returns :
*/
VOS_STATUS wma_stop(v_VOID_t *vos_ctx, tANI_U8 reason)
{
@@ -7223,9 +8541,9 @@ static void wma_cleanup_vdev_resp(tp_wma_handle wma)
}
/* function : wma_close
- * Descriptin :
- * Args :
- * Retruns :
+ * Descriptin :
+ * Args :
+ * Returns :
*/
VOS_STATUS wma_close(v_VOID_t *vos_ctx)
{
@@ -7311,7 +8629,7 @@ static v_VOID_t wma_update_fw_config(tp_wma_handle wma_handle,
#if !defined(QCA_WIFI_ISOC) && !defined(CONFIG_HL_SUPPORT)
/**
- * allocate a chunk of memory at the index indicated and
+ * allocate a chunk of memory at the index indicated and
* if allocation fail allocate smallest size possiblr and
* return number of units allocated.
*/
@@ -7439,6 +8757,14 @@ static inline void wma_update_target_ht_cap(tp_wma_handle wh,
/* RF chains */
cfg->num_rf_chains = wh->num_rf_chains;
+
+ WMA_LOGD("\n%s: ht_cap_info - %x ht_rx_stbc - %d, ht_tx_stbc - %d\n\
+ mpdu_density - %d ht_rx_ldpc - %d ht_sgi_20 - %d\n\
+ ht_sgi_40 - %d num_rf_chains - %d \n", __func__,
+ wh->ht_cap_info, cfg->ht_rx_stbc, cfg->ht_tx_stbc,
+ cfg->mpdu_density, cfg->ht_rx_ldpc, cfg->ht_sgi_20,
+ cfg->ht_sgi_40, cfg->num_rf_chains);
+
}
#ifdef WLAN_FEATURE_11AC
@@ -7447,11 +8773,11 @@ static inline void wma_update_target_vht_cap(tp_wma_handle wh,
{
/* Max MPDU length */
if (wh->vht_cap_info & IEEE80211_VHTCAP_MAX_MPDU_LEN_3839)
- cfg->vht_max_mpdu = 3839;
+ cfg->vht_max_mpdu = 0;
else if (wh->vht_cap_info & IEEE80211_VHTCAP_MAX_MPDU_LEN_7935)
- cfg->vht_max_mpdu = 7935;
+ cfg->vht_max_mpdu = 1;
else if (wh->vht_cap_info & IEEE80211_VHTCAP_MAX_MPDU_LEN_11454)
- cfg->vht_max_mpdu = 11454;
+ cfg->vht_max_mpdu = 2;
else
cfg->vht_max_mpdu = 0;
@@ -7481,7 +8807,11 @@ static inline void wma_update_target_vht_cap(tp_wma_handle wh,
cfg->vht_tx_stbc = wh->vht_cap_info & IEEE80211_VHTCAP_TX_STBC;
/* RX STBC capability */
- cfg->vht_rx_stbc = wh->vht_cap_info & IEEE80211_VHTCAP_RX_STBC;
+ cfg->vht_rx_stbc = wh->vht_cap_info & IEEE80211_VHTCAP_RX_STBC;
+
+ cfg->vht_max_ampdu_len_exp = (wh->vht_cap_info &
+ IEEE80211_VHTCAP_MAX_AMPDU_LEN_EXP)
+ >> IEEE80211_VHTCAP_MAX_AMPDU_LEN_EXP_S;
/* SU beamformer cap */
cfg->vht_su_bformer = wh->vht_cap_info & IEEE80211_VHTCAP_SU_BFORMER;
@@ -7501,6 +8831,14 @@ static inline void wma_update_target_vht_cap(tp_wma_handle wh,
/* VHT TXOP PS cap */
cfg->vht_txop_ps = wh->vht_cap_info & IEEE80211_VHTCAP_TXOP_PS;
+
+ WMA_LOGD("\n %s: max_mpdu %d supp_chan_width %x rx_ldpc %x\n \
+ short_gi_80 %x tx_stbc %x rx_stbc %x txop_ps %x\n \
+ su_bformee %x mu_bformee %x max_ampdu_len_exp %d\n",
+ __func__, cfg->vht_max_mpdu, cfg->supp_chan_width,
+ cfg->vht_rx_ldpc, cfg->vht_short_gi_80, cfg->vht_tx_stbc,
+ cfg->vht_rx_stbc, cfg->vht_txop_ps, cfg->vht_su_bformee,
+ cfg->vht_mu_bformee, cfg->vht_max_ampdu_len_exp);
}
#endif /* #ifdef WLAN_FEATURE_11AC */
@@ -7544,6 +8882,7 @@ static void wma_update_hdd_cfg(tp_wma_handle wma_handle)
#endif /* #ifdef WLAN_FEATURE_11AC */
#ifndef QCA_WIFI_ISOC
+ hdd_tgt_cfg.target_fw_version = wma_handle->target_fw_version;
wma_handle->tgt_cfg_update_cb(hdd_ctx, &hdd_tgt_cfg);
#endif
}
@@ -7709,6 +9048,8 @@ v_VOID_t wma_rx_service_ready_event(WMA_HANDLE handle, void *cmd_param_info)
#endif
wma_handle->num_rf_chains = ev->num_rf_chains;
+ wma_handle->target_fw_version = ev->fw_build_vers;
+
/* TODO: Recheck below line to dump service ready event */
/* dbg_print_wmi_service_11ac(ev); */
@@ -7717,20 +9058,13 @@ v_VOID_t wma_rx_service_ready_event(WMA_HANDLE handle, void *cmd_param_info)
param_buf->wmi_service_bitmap,
sizeof(wma_handle->wmi_service_bitmap));
#ifndef QCA_WIFI_ISOC
- if (!WMI_SERVICE_IS_ENABLED(wma_handle->wmi_service_bitmap,
- WMI_SERVICE_BEACON_OFFLOAD)) {
-
- WMA_LOGD("%s: FW doesn't have beacon offload capability, "
- "enabling host based beaconing support\n", __func__);
-
- /* SWBA event handler for beacon transmission */
- status = wmi_unified_register_event_handler(wma_handle->wmi_handle,
- WMI_HOST_SWBA_EVENTID,
- wma_beacon_swba_handler);
- if (status) {
- WMA_LOGE("Failed to register swba beacon event cb");
- return;
- }
+ /* SWBA event handler for beacon transmission */
+ status = wmi_unified_register_event_handler(wma_handle->wmi_handle,
+ WMI_HOST_SWBA_EVENTID,
+ wma_beacon_swba_handler);
+ if (status) {
+ WMA_LOGE("Failed to register swba beacon event cb");
+ return;
}
#endif
#ifdef WLAN_FEATURE_GTK_OFFLOAD
@@ -7762,13 +9096,49 @@ v_VOID_t wma_rx_service_ready_event(WMA_HANDLE handle, void *cmd_param_info)
}
WMA_LOGA("WMA --> WMI_INIT_CMDID");
- wmi_unified_cmd_send(wma_handle->wmi_handle, buf, len, WMI_INIT_CMDID);
+ status = wmi_unified_cmd_send(wma_handle->wmi_handle, buf, len, WMI_INIT_CMDID);
+ if (status != EOK) {
+ WMA_LOGE("Failed to send WMI_INIT_CMDID command");
+ wmi_buf_free(buf);
+ return;
+ }
+}
+
+static void wma_set_regdomain(u_int32_t regdmn)
+{
+ void *vos_context = vos_get_global_context(VOS_MODULE_ID_WDA, NULL);
+ tp_wma_handle wma = vos_get_context(VOS_MODULE_ID_WDA, vos_context);
+ u_int32_t modeSelect = 0xFFFFFFFF;
+
+ switch (wma->phy_capability) {
+ case WMI_11G_CAPABILITY:
+ case WMI_11NG_CAPABILITY:
+ modeSelect &= ~(REGDMN_MODE_11A | REGDMN_MODE_TURBO |
+ REGDMN_MODE_108A | REGDMN_MODE_11A_HALF_RATE |
+ REGDMN_MODE_11A_QUARTER_RATE | REGDMN_MODE_11NA_HT20 |
+ REGDMN_MODE_11NA_HT40PLUS | REGDMN_MODE_11NA_HT40MINUS |
+ REGDMN_MODE_11AC_VHT20 | REGDMN_MODE_11AC_VHT40PLUS |
+ REGDMN_MODE_11AC_VHT40MINUS | REGDMN_MODE_11AC_VHT80);
+ break;
+ case WMI_11A_CAPABILITY:
+ case WMI_11NA_CAPABILITY:
+ case WMI_11AC_CAPABILITY:
+ modeSelect &= ~(REGDMN_MODE_11B | REGDMN_MODE_11G |
+ REGDMN_MODE_108G | REGDMN_MODE_11NG_HT20 |
+ REGDMN_MODE_11NG_HT40PLUS | REGDMN_MODE_11NG_HT40MINUS |
+ REGDMN_MODE_11AC_VHT20_2G | REGDMN_MODE_11AC_VHT40_2G |
+ REGDMN_MODE_11AC_VHT80_2G);
+ break;
+ }
+
+ regdmn_get_ctl_info(regdmn, wma->reg_cap.wireless_modes, modeSelect);
+ return;
}
/* function : wma_rx_ready_event
- * Descriptin :
- * Args :
- * Retruns :
+ * Descriptin :
+ * Args :
+ * Retruns :
*/
v_VOID_t wma_rx_ready_event(WMA_HANDLE handle, void *cmd_param_info)
{
@@ -7784,7 +9154,7 @@ v_VOID_t wma_rx_ready_event(WMA_HANDLE handle, void *cmd_param_info)
VOS_ASSERT(0);
return;
}
-
+
WMA_LOGA("WMA <-- WMI_READY_EVENTID");
ev = param_buf->fixed_param;
@@ -7843,6 +9213,7 @@ v_VOID_t wma_rx_ready_event(WMA_HANDLE handle, void *cmd_param_info)
#endif
vos_event_set(&wma_handle->wma_ready_event);
+ wma_set_regdomain(wma_handle->reg_cap.eeprom_rd);
WMA_LOGD("Exit");
}
@@ -8195,10 +9566,10 @@ error:
return VOS_STATUS_E_FAILURE;
}
-/* function :wma_setneedshutdown
+/* function :wma_setneedshutdown
* Descriptin :
* Args :
- * Retruns :
+ * Returns :
*/
v_VOID_t wma_setneedshutdown(v_VOID_t *vos_ctx)
{
@@ -8221,7 +9592,7 @@ v_VOID_t wma_setneedshutdown(v_VOID_t *vos_ctx)
/* function : wma_rx_ready_event
* Descriptin :
* Args :
- * Retruns :
+ * Returns :
*/
v_BOOL_t wma_needshutdown(v_VOID_t *vos_ctx)
{
@@ -8313,6 +9684,7 @@ int wma_resume_target(WMA_HANDLE handle)
tp_wma_handle wma_handle = (tp_wma_handle) handle;
wmi_buf_t wmibuf;
wmi_pdev_resume_cmd_fixed_param *cmd;
+ int ret;
wmibuf = wmi_buf_alloc(wma_handle->wmi_handle, sizeof(*cmd));
if (wmibuf == NULL) {
@@ -8323,8 +9695,13 @@ int wma_resume_target(WMA_HANDLE handle)
WMITLV_TAG_STRUC_wmi_pdev_resume_cmd_fixed_param,
WMITLV_GET_STRUCT_TLVLEN(wmi_pdev_resume_cmd_fixed_param));
cmd->reserved0 = 0;
- return wmi_unified_cmd_send(wma_handle->wmi_handle, wmibuf, sizeof(*cmd),
+ ret = wmi_unified_cmd_send(wma_handle->wmi_handle, wmibuf, sizeof(*cmd),
WMI_PDEV_RESUME_CMDID);
+ if(ret != EOK) {
+ WMA_LOGE("Failed to send WMI_PDEV_RESUME_CMDID command");
+ wmi_buf_free(wmibuf);
+ }
+ return ret;
}
#endif
@@ -8641,8 +10018,9 @@ wmi_unified_pdev_utf_cmd(wmi_unified_t wmi_handle, u_int8_t *utf_payload,
WMI_TLV_HDR_SIZE),
WMI_PDEV_UTF_CMDID);
- if (ret != 0) {
- printk("wmi cmd send failed\n");
+ if (ret != EOK) {
+ WMA_LOGE("Failed to send WMI_PDEV_UTF_CMDID command");
+ wmi_buf_free(buf);
break;
}
@@ -8745,8 +10123,59 @@ eHalStatus wma_set_htconfig(tANI_U8 vdev_id, tANI_U16 ht_capab, int value)
return (ret)? eHAL_STATUS_FAILURE : eHAL_STATUS_SUCCESS;
}
+eHalStatus WMA_SetRegDomain(void * clientCtxt, v_REGDOMAIN_t regId)
+{
+ if(VOS_STATUS_SUCCESS != vos_nv_setRegDomain(clientCtxt, regId))
+ return eHAL_STATUS_INVALID_PARAMETER;
+
+ return eHAL_STATUS_SUCCESS;
+}
+
+eHalStatus WMA_SetCountryCode(v_VOID_t *client_ctx, tANI_U8 *countrycode)
+{
+ int32_t regdmn;
+ regdmn = regdmn_get_regdmn_for_country(countrycode);
+ if (regdmn < 0)
+ return eHAL_STATUS_FAILURE;
+
+ wma_set_regdomain(regdmn);
+ return eHAL_STATUS_SUCCESS;
+}
+
tANI_U8 wma_getFwWlanFeatCaps(tANI_U8 featEnumValue)
{
return gFwWlanFeatCaps & featEnumValue;
}
+void wma_send_regdomain_info(u_int32_t reg_dmn, u_int16_t regdmn2G,
+ u_int16_t regdmn5G, int8_t ctl2G, int8_t ctl5G)
+{
+ wmi_buf_t buf;
+ wmi_pdev_set_regdomain_cmd_fixed_param *cmd;
+ int32_t len = sizeof(*cmd);
+ void *vos_context = vos_get_global_context(VOS_MODULE_ID_WDA, NULL);
+ tp_wma_handle wma = vos_get_context(VOS_MODULE_ID_WDA, vos_context);
+
+ buf = wmi_buf_alloc(wma->wmi_handle, len);
+ if (!buf) {
+ WMA_LOGP("%s : wmi_buf_alloc failed", __func__);
+ return;
+ }
+ cmd = (wmi_pdev_set_regdomain_cmd_fixed_param *) wmi_buf_data(buf);
+ WMITLV_SET_HDR(&cmd->tlv_header,
+ WMITLV_TAG_STRUC_wmi_pdev_set_regdomain_cmd_fixed_param,
+ WMITLV_GET_STRUCT_TLVLEN(
+ wmi_pdev_set_regdomain_cmd_fixed_param));
+ cmd->reg_domain = reg_dmn;
+ cmd->reg_domain_2G = regdmn2G;
+ cmd->reg_domain_5G = regdmn5G;
+ cmd->conformance_test_limit_2G = ctl2G;
+ cmd->conformance_test_limit_5G = ctl5G;
+
+ if (wmi_unified_cmd_send(wma->wmi_handle, buf, len,
+ WMI_PDEV_SET_REGDOMAIN_CMDID)) {
+ WMA_LOGP("Failed to send pdev set regdomain command");
+ adf_nbuf_free(buf);
+ }
+ return;
+}
diff --git a/CORE/SERVICES/WMA/wma.h b/CORE/SERVICES/WMA/wma.h
index fbb0d54acf61..b2d9befdacd8 100644
--- a/CORE/SERVICES/WMA/wma.h
+++ b/CORE/SERVICES/WMA/wma.h
@@ -45,7 +45,7 @@
-------- --- -----------------------------------------
12/03/2013 Ganesh Created module for WMA
Kondabattini
- 27/03/2013 Ganesh Rx Mgmt Related added
+ 27/03/2013 Ganesh Rx Mgmt Related added
Babu
==========================================================================*/
#ifndef WMA_H
@@ -81,13 +81,13 @@
In prima 12 HW stations are supported including BCAST STA(staId 0)
and SELF STA(staId 1) so total ASSOC stations which can connect to Prima
SoftAP = 12 - 1(Self STa) - 1(Bcast Sta) = 10 Stations. */
-
+
#ifdef WLAN_SOFTAP_VSTA_FEATURE
-#define WMA_MAX_SUPPORTED_STAS 38
+#define WMA_MAX_SUPPORTED_STAS 38
#else
-#define WMA_MAX_SUPPORTED_STAS 12
+#define WMA_MAX_SUPPORTED_STAS 12
#endif
-#define WMA_MAX_SUPPORTED_BSS 5
+#define WMA_MAX_SUPPORTED_BSS 5
#define FRAGMENT_SIZE 3072
@@ -121,7 +121,7 @@
#define WMA_LOGA(fmt, args...) \
printk(KERN_INFO "\n%s-%d: " fmt, __func__, __LINE__, ## args)
#else
-#define WMA_LOGA(fmt, args...)
+#define WMA_LOGA(fmt, args...)
#endif
#define ALIGNED_WORD_SIZE 4
@@ -277,6 +277,11 @@ struct wma_txrx_node {
#endif
v_BOOL_t ptrn_match_enable;
v_BOOL_t conn_state;
+ /* BSS parameters cached for use in WDA_ADD_STA */
+ tSirMacBeaconInterval beaconInterval;
+ tANI_U8 llbCoexist;
+ tANI_U8 shortSlotTimeSupported;
+ tANI_U8 dtimPeriod;
};
#if defined(QCA_WIFI_FTM) && !defined(QCA_WIFI_ISOC)
@@ -326,6 +331,7 @@ typedef struct {
wmi_abi_version target_abi_vers; /* The target firmware version */
/* The final negotiated ABI version to be used for communicating */
wmi_abi_version final_abi_vers;
+ v_U32_t target_fw_version; /* Target f/w build version */
bool wmi_ready;
u_int32_t wlan_init_status;
adf_os_device_t adf_dev;
@@ -373,6 +379,11 @@ typedef struct {
u_int8_t is_fw_assert;
struct wma_wow wow;
u_int8_t no_of_suspend_ind;
+
+ /* Have a back up of arp info to send along
+ * with ns info suppose if ns also enabled
+ */
+ tSirHostOffloadReq mArpInfo;
}t_wma_handle, *tp_wma_handle;
struct wma_target_cap {
@@ -398,13 +409,13 @@ of NV fragment is nt possbile.The next multiple of 1Kb is 3K */
typedef struct
{
- v_VOID_t *pConfigBuffer;
-
+ v_VOID_t *pConfigBuffer;
+
/*Length of the config buffer above*/
v_U16_t usConfigBufferLen;
-
+
/*Production or FTM driver*/
- t_wma_drv_type driver_type;
+ t_wma_drv_type driver_type;
/*The user data passed in by UMAC, it will be sent back when the above
function pointer will be called */
@@ -416,7 +427,7 @@ typedef struct
}t_wma_start_req;
/* Message types for messages exchanged between WDI and HAL */
-typedef enum
+typedef enum
{
//Init/De-Init
WLAN_HAL_START_REQ = 0,
@@ -486,7 +497,7 @@ typedef enum
WLAN_HAL_MIC_FAILURE_IND = 52,
WLAN_HAL_FATAL_ERROR_IND = 53,
WLAN_HAL_SET_KEYDONE_MSG = 54,
-
+
//NV Interface
WLAN_HAL_DOWNLOAD_NV_REQ = 55,
WLAN_HAL_DOWNLOAD_NV_RSP = 56,
@@ -505,11 +516,11 @@ typedef enum
WLAN_HAL_DELETE_STA_CONTEXT_IND = 67,
WLAN_HAL_UPDATE_PROBE_RSP_TEMPLATE_REQ = 68,
WLAN_HAL_UPDATE_PROBE_RSP_TEMPLATE_RSP = 69,
-
+
// PTT interface support
WLAN_HAL_PROCESS_PTT_REQ = 70,
WLAN_HAL_PROCESS_PTT_RSP = 71,
-
+
// BTAMP related events
WLAN_HAL_SIGNAL_BTAMP_EVENT_REQ = 72,
WLAN_HAL_SIGNAL_BTAMP_EVENT_RSP = 73,
@@ -568,7 +579,7 @@ typedef enum
//P2P WLAN_FEATURE_P2P
WLAN_HAL_SET_P2P_GONOA_REQ = 119,
WLAN_HAL_SET_P2P_GONOA_RSP = 120,
-
+
//WLAN Dump commands
WLAN_HAL_DUMP_COMMAND_REQ = 121,
WLAN_HAL_DUMP_COMMAND_RSP = 122,
@@ -588,7 +599,7 @@ typedef enum
// Coex Indication
WLAN_HAL_COEX_IND = 129,
- // Tx Complete Indication
+ // Tx Complete Indication
WLAN_HAL_OTA_TX_COMPL_IND = 130,
//Host Suspend/resume messages
@@ -602,7 +613,7 @@ typedef enum
WLAN_HAL_GET_TX_POWER_RSP = 137,
WLAN_HAL_P2P_NOA_ATTR_IND = 138,
-
+
WLAN_HAL_ENABLE_RADAR_DETECT_REQ = 139,
WLAN_HAL_ENABLE_RADAR_DETECT_RSP = 140,
WLAN_HAL_GET_TPC_REPORT_REQ = 141,
@@ -610,7 +621,7 @@ typedef enum
WLAN_HAL_RADAR_DETECT_IND = 143,
WLAN_HAL_RADAR_DETECT_INTR_IND = 144,
WLAN_HAL_KEEP_ALIVE_REQ = 145,
- WLAN_HAL_KEEP_ALIVE_RSP = 146,
+ WLAN_HAL_KEEP_ALIVE_RSP = 146,
/*PNO messages*/
WLAN_HAL_SET_PREF_NETWORK_REQ = 147,
@@ -619,25 +630,25 @@ typedef enum
WLAN_HAL_SET_RSSI_FILTER_RSP = 150,
WLAN_HAL_UPDATE_SCAN_PARAM_REQ = 151,
WLAN_HAL_UPDATE_SCAN_PARAM_RSP = 152,
- WLAN_HAL_PREF_NETW_FOUND_IND = 153,
+ WLAN_HAL_PREF_NETW_FOUND_IND = 153,
WLAN_HAL_SET_TX_PER_TRACKING_REQ = 154,
WLAN_HAL_SET_TX_PER_TRACKING_RSP = 155,
WLAN_HAL_TX_PER_HIT_IND = 156,
-
+
WLAN_HAL_8023_MULTICAST_LIST_REQ = 157,
- WLAN_HAL_8023_MULTICAST_LIST_RSP = 158,
+ WLAN_HAL_8023_MULTICAST_LIST_RSP = 158,
WLAN_HAL_SET_PACKET_FILTER_REQ = 159,
- WLAN_HAL_SET_PACKET_FILTER_RSP = 160,
+ WLAN_HAL_SET_PACKET_FILTER_RSP = 160,
WLAN_HAL_PACKET_FILTER_MATCH_COUNT_REQ = 161,
- WLAN_HAL_PACKET_FILTER_MATCH_COUNT_RSP = 162,
+ WLAN_HAL_PACKET_FILTER_MATCH_COUNT_RSP = 162,
WLAN_HAL_CLEAR_PACKET_FILTER_REQ = 163,
- WLAN_HAL_CLEAR_PACKET_FILTER_RSP = 164,
- /*This is temp fix. Should be removed once
+ WLAN_HAL_CLEAR_PACKET_FILTER_RSP = 164,
+ /*This is temp fix. Should be removed once
* Host and Riva code is in sync*/
WLAN_HAL_INIT_SCAN_CON_REQ = 165,
-
+
WLAN_HAL_SET_POWER_PARAMS_REQ = 166,
WLAN_HAL_SET_POWER_PARAMS_RSP = 167,
@@ -646,7 +657,7 @@ typedef enum
// wake reason indication (WOW)
WLAN_HAL_WAKE_REASON_IND = 170,
- // GTK offload support
+ // GTK offload support
WLAN_HAL_GTK_OFFLOAD_REQ = 171,
WLAN_HAL_GTK_OFFLOAD_RSP = 172,
WLAN_HAL_GTK_OFFLOAD_GETINFO_REQ = 173,
@@ -661,12 +672,12 @@ typedef enum
WLAN_HAL_UPDATE_VHT_OP_MODE_REQ = 182,
WLAN_HAL_UPDATE_VHT_OP_MODE_RSP = 183,
-
+
WLAN_HAL_P2P_NOA_START_IND = 184,
WLAN_HAL_GET_ROAM_RSSI_REQ = 185,
WLAN_HAL_GET_ROAM_RSSI_RSP = 186,
-
+
WLAN_HAL_CLASS_B_STATS_IND = 187,
WLAN_HAL_DEL_BA_IND = 188,
WLAN_HAL_DHCP_START_IND = 189,
@@ -710,14 +721,14 @@ typedef PACKED_PRE struct PACKED_POST
{
/* Fragment sequence number of the NV Image. Note that NV Image might not
* fit into one message due to size limitation of the SMD channel FIFO. UMAC
- * can hence choose to chop the NV blob into multiple fragments starting with
- * seqeunce number 0, 1, 2 etc. The last fragment MUST be indicated by
+ * can hence choose to chop the NV blob into multiple fragments starting with
+ * seqeunce number 0, 1, 2 etc. The last fragment MUST be indicated by
* marking the isLastFragment field to 1. Note that all the NV blobs would be
* concatenated together by HAL without any padding bytes in between.*/
tANI_U16 fragNumber;
/* Is this the last fragment? When set to 1 it indicates that no more fragments
- * will be sent by UMAC and HAL can concatenate all the NV blobs rcvd & proceed
+ * will be sent by UMAC and HAL can concatenate all the NV blobs rcvd & proceed
* with the parsing. HAL would generate a WLAN_HAL_DOWNLOAD_NV_RSP to the
* WLAN_HAL_DOWNLOAD_NV_REQ after it receives each fragment */
tANI_U16 isLastFragment;
@@ -855,9 +866,11 @@ typedef PACKED_PRE struct PACKED_POST
extern v_BOOL_t sys_validateStaConfig(void *pImage, unsigned long cbFile,
void **ppStaConfig, v_SIZE_t *pcbStaConfig);
extern void vos_WDAComplete_cback(v_PVOID_t pVosContext);
+extern void wma_send_regdomain_info(u_int32_t reg_dmn, u_int16_t regdmn2G,
+ u_int16_t regdmn5G, int8_t ctl2G, int8_t ctl5G);
#ifdef QCA_WIFI_ISOC
-VOS_STATUS wma_cfg_download_isoc(v_VOID_t *vos_context,
+VOS_STATUS wma_cfg_download_isoc(v_VOID_t *vos_context,
tp_wma_handle wma_handle);
VOS_STATUS wma_nv_download_start(v_VOID_t *handle);
@@ -867,14 +880,11 @@ VOS_STATUS wma_cfg_nv_get_hal_message_buffer(tp_wma_handle wma_handle,
u_int8_t **pMsgBuffer, u_int16_t *pusDataOffset,
u_int16_t *pusBufferSize);
-VOS_STATUS wma_prepare_config_tlv(v_VOID_t *vos_context,
+VOS_STATUS wma_prepare_config_tlv(v_VOID_t *vos_context,
t_wma_start_req *wdi_start_params );
VOS_STATUS wma_htc_cfg_nv_connect_service(tp_wma_handle wma_handle);
VOS_STATUS wma_hal_stop_isoc(tp_wma_handle wma_handle);
-void wma_set_sta_arp_keep_alive(tp_wma_handle wma, u_int8_t vdev_id,
- u_int8_t *hostv4addr, u_int8_t *destv4addr,
- u_int8_t *destmac, v_U32_t timeperiod);
#endif
/**
@@ -888,11 +898,14 @@ enum frame_index {
FRAME_INDEX_MAX
};
-VOS_STATUS wma_update_vdev_tbl(tp_wma_handle wma_handle, u_int8_t vdev_id,
- ol_txrx_vdev_handle tx_rx_vdev_handle, u_int8_t *mac,
+VOS_STATUS wma_update_vdev_tbl(tp_wma_handle wma_handle, u_int8_t vdev_id,
+ ol_txrx_vdev_handle tx_rx_vdev_handle, u_int8_t *mac,
u_int32_t vdev_type, bool add_del);
#ifndef QCA_WIFI_ISOC
int regdmn_get_country_alpha2(u_int16_t rd, u_int8_t *alpha2);
+void regdmn_get_ctl_info(u_int32_t reg_dmn, u_int32_t modesAvail,
+ u_int32_t modeSelect);
+int32_t regdmn_get_regdmn_for_country(u_int8_t *alpha2);
#endif
#define WMA_FW_PHY_STATS 0x1
@@ -976,6 +989,7 @@ struct wma_set_key_params {
*/
enum wma_cfg_cmd_id {
WMA_VDEV_TXRX_FWSTATS_ENABLE_CMDID = WMI_CMDID_MAX,
+ WMA_VDEV_TXRX_FWSTATS_RESET_CMDID,
/* Add any new command before this */
WMA_CMD_ID_MAX
};
diff --git a/CORE/SERVICES/WMA/wma_isoc.c b/CORE/SERVICES/WMA/wma_isoc.c
index 4c241ae5d68a..7458f1fdf50e 100644
--- a/CORE/SERVICES/WMA/wma_isoc.c
+++ b/CORE/SERVICES/WMA/wma_isoc.c
@@ -1617,36 +1617,3 @@ end:
return vos_status;
}
-
-void wma_set_sta_arp_keep_alive(tp_wma_handle wma, u_int8_t vdev_id,
- u_int8_t *hostv4addr, u_int8_t *destv4addr,
- u_int8_t *destmac, v_U32_t timeperiod)
-{
- wmi_buf_t buf;
- WMI_STA_KEEPALIVE_CMD *cmd;
-
- buf = wmi_buf_alloc(wma->wmi_handle, sizeof(*cmd));
- if (!buf) {
- WMA_LOGE("wmi_buf_alloc failed");
- return;
- }
-
- WMA_LOGD("keep alive method ARP_RESPONSE interval:%d", timeperiod);
- cmd = (WMI_STA_KEEPALIVE_CMD *)wmi_buf_data(buf);
- cmd->vdev_id = vdev_id;
- cmd->interval = timeperiod;
- cmd->enable = (timeperiod)? true : false;
- cmd->method = WMI_STA_KEEPALIVE_METHOD_UNSOLICITED_ARP_RESPONSE;
- vos_mem_copy(&cmd->arp_resp.sender_prot_addr, hostv4addr,
- SIR_IPV4_ADDR_LEN);
- vos_mem_copy(&cmd->arp_resp.target_prot_addr, destv4addr,
- SIR_IPV4_ADDR_LEN);
- WMI_CHAR_ARRAY_TO_MAC_ADDR(destmac,&cmd->arp_resp.dest_mac_addr);
- if (wmi_unified_cmd_send(wma->wmi_handle, buf, sizeof(*cmd),
- WMI_STA_KEEPALIVE_CMDID)) {
- WMA_LOGE("Failed to set KeepAlive");
- adf_nbuf_free(buf);
- }
-
- return;
-}
diff --git a/CORE/SERVICES/WMA/wma_stub.h b/CORE/SERVICES/WMA/wma_stub.h
index 2c2589ceb50f..d92d674a0500 100644
--- a/CORE/SERVICES/WMA/wma_stub.h
+++ b/CORE/SERVICES/WMA/wma_stub.h
@@ -88,10 +88,6 @@ static inline void WMA_UpdateRssiBmps(v_PVOID_t pvosGCtx,
v_U8_t staId, v_S7_t rssi)
{
}
-static inline eHalStatus WMA_SetRegDomain(v_VOID_t *client_ctx, v_REGDOMAIN_t regId)
-{
- return eHAL_STATUS_SUCCESS;
-}
#endif
diff --git a/CORE/SME/inc/csrApi.h b/CORE/SME/inc/csrApi.h
index 4595c027fe97..88eea1083e04 100644
--- a/CORE/SME/inc/csrApi.h
+++ b/CORE/SME/inc/csrApi.h
@@ -1069,6 +1069,7 @@ typedef struct tagCsrConfigParam
tANI_U8 txBFCsnValue;
tANI_U8 enable2x2;
tANI_BOOLEAN enableVhtFor24GHz;
+ tANI_U8 enableMuBformee;
#endif
/*
diff --git a/CORE/SME/inc/csrInternal.h b/CORE/SME/inc/csrInternal.h
index 390b866d1fda..a3f5861f4e7e 100644
--- a/CORE/SME/inc/csrInternal.h
+++ b/CORE/SME/inc/csrInternal.h
@@ -629,6 +629,7 @@ typedef struct tagCsrConfig
tANI_U8 txBFCsnValue;
tANI_U8 enable2x2;
tANI_BOOLEAN enableVhtFor24GHz;
+ tANI_U8 txMuBformee;
#endif
tANI_U8 txLdpcEnable;
diff --git a/CORE/SME/inc/oemDataApi.h b/CORE/SME/inc/oemDataApi.h
index ad1f6421a82d..7da6c9bcc047 100644
--- a/CORE/SME/inc/oemDataApi.h
+++ b/CORE/SME/inc/oemDataApi.h
@@ -47,12 +47,20 @@
#include "csrLinkList.h"
#ifndef OEM_DATA_REQ_SIZE
+#ifdef QCA_WIFI_2_0
+#define OEM_DATA_REQ_SIZE 276
+#else
#define OEM_DATA_REQ_SIZE 134
#endif
+#endif
#ifndef OEM_DATA_RSP_SIZE
+#ifdef QCA_WIFI_2_0
+#define OEM_DATA_RSP_SIZE 1720
+#else
#define OEM_DATA_RSP_SIZE 1968
#endif
+#endif
/*************************************************************************************************************
OEM DATA REQ/RSP - DATA STRUCTURES
@@ -133,6 +141,16 @@ 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
+ application
+ \return None
+ --------------------------------------------------------------------------*/
+void send_oem_data_rsp_msg(int length, tANI_U8 *oemDataRsp);
+#endif /* QCA_WIFI_2_0 */
+
#endif //_OEM_DATA_API_H__
#endif //FEATURE_OEM_DATA_SUPPORT
diff --git a/CORE/SME/inc/sme_Api.h b/CORE/SME/inc/sme_Api.h
index 57716048c292..bfc7a63bbeeb 100644
--- a/CORE/SME/inc/sme_Api.h
+++ b/CORE/SME/inc/sme_Api.h
@@ -78,6 +78,26 @@
#define SME_INVALID_COUNTRY_CODE "XX"
+#define SME_2_4_GHZ_MAX_FREQ 3000
+#define SME_MODE_11A 0 /* 11a mode */
+#define SME_MODE_11G 1 /* 11b/g mode */
+
+/* channel info consists of 6 bits of channel mode */
+#define SME_SET_CHANNEL_MODE(psme_channel, val) do { \
+ (psme_channel)->info &= 0xffffffc0; \
+ (psme_channel)->info |= (val); \
+} while(0)
+
+#define SME_SET_CHANNEL_MAX_POWER(psme_channel, val) do { \
+ (psme_channel)->reg_info_1 &= 0xffff00ff; \
+ (psme_channel)->reg_info_1 |= ((val & 0xff) << 8); \
+} while(0)
+
+#define SME_SET_CHANNEL_REG_POWER(psme_channel, val) do { \
+ (psme_channel)->reg_info_1 &= 0xff00ffff; \
+ (psme_channel)->reg_info_1 |= ((val & 0xff) << 16); \
+} while(0)
+
/*--------------------------------------------------------------------------
Type declarations
------------------------------------------------------------------------*/
@@ -105,6 +125,31 @@ typedef struct _smeConfigParams
tANI_BOOLEAN fP2pListenOffload;
} tSmeConfigParams, *tpSmeConfigParams;
+#ifdef QCA_WIFI_2_0
+typedef struct _smeChannelInfo
+{
+ /* channel id */
+ tANI_U8 chan_id;
+
+ /* primary 20 MHz channel frequency in mhz */
+ tANI_U32 mhz;
+
+ /* Center frequency 1 in MHz */
+ tANI_U32 band_center_freq1;
+
+ /* Center frequency 2 in MHz - valid only for 11acvht 80plus80 mode */
+ tANI_U32 band_center_freq2;
+
+ /* channel info described below */
+ tANI_U32 info;
+
+ /* contains min power, max power, reg power and reg class id */
+ tANI_U32 reg_info_1;
+
+ /* contains antennamax */
+ tANI_U32 reg_info_2;
+} tSmeChannelInfo;
+#endif
/*-------------------------------------------------------------------------
Function declarations and documenation
@@ -2804,7 +2849,13 @@ eHalStatus sme_PsOffloadDisablePowerSave (tHalHandle hHal, tANI_U32 sessionId);
int sme_UpdateHTConfig(tHalHandle hHal, tANI_U8 sessionId, tANI_U16 htCapab,
int value);
tANI_S16 sme_GetHTConfig(tHalHandle hHal, tANI_U8 session_id, tANI_U16 ht_capab);
+eHalStatus sme_getValidChannelList(tHalHandle hHal, tANI_U8 *numChannels,
+ tANI_U8 **chanList);
#ifdef FEATURE_WLAN_PNO_OFFLOAD
eHalStatus sme_MoveCsrToScanStateForPno (tHalHandle hHal, tANI_U8 sessionId);
#endif
+#ifdef QCA_WIFI_2_0
+eHalStatus sme_getChannelInfo(tHalHandle hHal, tANI_U8 chanId,
+ tSmeChannelInfo *chanInfo);
+#endif
#endif //#if !defined( __SME_API_H )
diff --git a/CORE/SME/src/csr/csrApiRoam.c b/CORE/SME/src/csr/csrApiRoam.c
index 42f7059bf2c2..9e48627e8061 100644
--- a/CORE/SME/src/csr/csrApiRoam.c
+++ b/CORE/SME/src/csr/csrApiRoam.c
@@ -45,7 +45,7 @@
when who what, where, why
---------- --- --------------------------------------------------------
-06/03/10 js Added support to hostapd driven
+06/03/10 js Added support to hostapd driven
* deauth/disassoc/mic failure
===========================================================================*/
#include "aniGlobal.h" //for tpAniSirGlobal
@@ -78,11 +78,11 @@
#define CSR_WAIT_FOR_KEY_TIMEOUT_PERIOD ( 5 * PAL_TIMER_TO_SEC_UNIT ) // 5 seconds, for WPA, WPA2, CCKM
#define CSR_WAIT_FOR_WPS_KEY_TIMEOUT_PERIOD ( 120 * PAL_TIMER_TO_SEC_UNIT ) // 120 seconds, for WPS
/*---------------------------------------------------------------------------
- OBIWAN recommends [8 10]% : pick 9%
+ OBIWAN recommends [8 10]% : pick 9%
---------------------------------------------------------------------------*/
#define CSR_VCC_UL_MAC_LOSS_THRESHOLD 9
/*---------------------------------------------------------------------------
- OBIWAN recommends -85dBm
+ OBIWAN recommends -85dBm
---------------------------------------------------------------------------*/
#define CSR_VCC_RSSI_THRESHOLD 80
#define CSR_MIN_GLOBAL_STAT_QUERY_PERIOD 500 //ms
@@ -99,7 +99,7 @@
#define RSSI_HACK_BMPS (-40)
#define MAX_CB_VALUE_IN_INI (2)
-/*--------------------------------------------------------------------------
+/*--------------------------------------------------------------------------
Static Type declarations
------------------------------------------------------------------------*/
static tCsrRoamSession csrRoamRoamSession[CSR_ROAM_SESSION_MAX];
@@ -114,7 +114,7 @@ static const char KR_25[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13,
36, 40, 44, 48, 149, 153, 157, 161};
#endif
-/*--------------------------------------------------------------------------
+/*--------------------------------------------------------------------------
Type declarations
------------------------------------------------------------------------*/
#ifdef FEATURE_WLAN_DIAG_SUPPORT_CSR
@@ -184,16 +184,16 @@ int diagEncTypeFromCSRType(eCsrEncryptionType encType)
return (n);
}
#endif //#ifdef FEATURE_WLAN_DIAG_SUPPORT_CSR
-static const tANI_U8 csrStartIbssChannels50[ CSR_NUM_IBSS_START_CHANNELS_50 ] = { 36, 40, 44, 48};
+static const tANI_U8 csrStartIbssChannels50[ CSR_NUM_IBSS_START_CHANNELS_50 ] = { 36, 40, 44, 48};
static const tANI_U8 csrStartIbssChannels24[ CSR_NUM_IBSS_START_CHANNELS_24 ] = { 1, 6, 11 };
static void initConfigParam(tpAniSirGlobal pMac);
static tANI_BOOLEAN csrRoamProcessResults( tpAniSirGlobal pMac, tSmeCmd *pCommand,
eCsrRoamCompleteResult Result, void *Context );
-static eHalStatus csrRoamStartIbss( tpAniSirGlobal pMac, tANI_U32 sessionId,
- tCsrRoamProfile *pProfile,
+static eHalStatus csrRoamStartIbss( tpAniSirGlobal pMac, tANI_U32 sessionId,
+ tCsrRoamProfile *pProfile,
tANI_BOOLEAN *pfSameIbss );
static void csrRoamUpdateConnectedProfileFromNewBss( tpAniSirGlobal pMac, tANI_U32 sessionId, tSirSmeNewBssInfo *pNewBss );
-static void csrRoamPrepareBssParams(tpAniSirGlobal pMac, tANI_U32 sessionId, tCsrRoamProfile *pProfile,
+static void csrRoamPrepareBssParams(tpAniSirGlobal pMac, tANI_U32 sessionId, tCsrRoamProfile *pProfile,
tSirBssDescription *pBssDesc, tBssConfigParam *pBssConfig, tDot11fBeaconIEs *pIes);
static ePhyChanBondState csrGetCBModeFromIes(tpAniSirGlobal pMac, tANI_U8 primaryChn, tDot11fBeaconIEs *pIes);
eHalStatus csrInitGetChannels(tpAniSirGlobal pMac);
@@ -203,7 +203,7 @@ eHalStatus csrRoamClose(tpAniSirGlobal pMac);
void csrRoamMICErrorTimerHandler(void *pv);
void csrRoamTKIPCounterMeasureTimerHandler(void *pv);
tANI_BOOLEAN csrRoamIsSameProfileKeys(tpAniSirGlobal pMac, tCsrRoamConnectedProfile *pConnProfile, tCsrRoamProfile *pProfile2);
-
+
static eHalStatus csrRoamStartRoamingTimer(tpAniSirGlobal pMac, tANI_U32 sessionId, tANI_U32 interval);
static eHalStatus csrRoamStopRoamingTimer(tpAniSirGlobal pMac, tANI_U32 sessionId);
static void csrRoamRoamingTimerHandler(void *pv);
@@ -213,23 +213,23 @@ static void csrRoamIbssJoinTimerHandler(void *pv);
eHalStatus csrRoamStartWaitForKeyTimer(tpAniSirGlobal pMac, tANI_U32 interval);
eHalStatus csrRoamStopWaitForKeyTimer(tpAniSirGlobal pMac);
static void csrRoamWaitForKeyTimeOutHandler(void *pv);
-
+
static eHalStatus CsrInit11dInfo(tpAniSirGlobal pMac, tCsr11dinfo *ps11dinfo);
static eHalStatus csrInitChannelPowerList( tpAniSirGlobal pMac, tCsr11dinfo *ps11dinfo);
static eHalStatus csrRoamFreeConnectedInfo( tpAniSirGlobal pMac, tCsrRoamConnectedInfo *pConnectedInfo );
-eHalStatus csrSendMBSetContextReqMsg( tpAniSirGlobal pMac, tANI_U32 sessionId,
- tSirMacAddr peerMacAddr, tANI_U8 numKeys, tAniEdType edType,
+eHalStatus csrSendMBSetContextReqMsg( tpAniSirGlobal pMac, tANI_U32 sessionId,
+ tSirMacAddr peerMacAddr, tANI_U8 numKeys, tAniEdType edType,
tANI_BOOLEAN fUnicast, tAniKeyDirection aniKeyDirection,
- tANI_U8 keyId, tANI_U8 keyLength, tANI_U8 *pKey, tANI_U8 paeRole,
+ tANI_U8 keyId, tANI_U8 keyLength, tANI_U8 *pKey, tANI_U8 paeRole,
tANI_U8 *pKeyRsc );
-static eHalStatus csrRoamIssueReassociate( tpAniSirGlobal pMac, tANI_U32 sessionId,
- tSirBssDescription *pSirBssDesc, tDot11fBeaconIEs *pIes,
+static eHalStatus csrRoamIssueReassociate( tpAniSirGlobal pMac, tANI_U32 sessionId,
+ tSirBssDescription *pSirBssDesc, tDot11fBeaconIEs *pIes,
tCsrRoamProfile *pProfile );
void csrRoamStatisticsTimerHandler(void *pv);
void csrRoamStatsGlobalClassDTimerHandler(void *pv);
static void csrRoamLinkUp(tpAniSirGlobal pMac, tCsrBssid bssid);
-VOS_STATUS csrRoamVccTriggerRssiIndCallback(tHalHandle hHal,
- v_U8_t rssiNotification,
+VOS_STATUS csrRoamVccTriggerRssiIndCallback(tHalHandle hHal,
+ v_U8_t rssiNotification,
void * context);
static void csrRoamLinkDown(tpAniSirGlobal pMac, tANI_U32 sessionId);
void csrRoamVccTrigger(tpAniSirGlobal pMac);
@@ -244,9 +244,9 @@ tCsrStatsClientReqInfo * csrRoamInsertEntryIntoList( tpAniSirGlobal pMac,
tDblLinkList *pStaList,
tCsrStatsClientReqInfo *pStaEntry);
void csrRoamStatsClientTimerHandler(void *pv);
-tCsrPeStatsReqInfo * csrRoamCheckPeStatsReqList(tpAniSirGlobal pMac, tANI_U32 statsMask,
+tCsrPeStatsReqInfo * csrRoamCheckPeStatsReqList(tpAniSirGlobal pMac, tANI_U32 statsMask,
tANI_U32 periodicity, tANI_BOOLEAN *pFound, tANI_U8 staId);
-void csrRoamReportStatistics(tpAniSirGlobal pMac, tANI_U32 statsMask,
+void csrRoamReportStatistics(tpAniSirGlobal pMac, tANI_U32 statsMask,
tCsrStatsCallback callback, tANI_U8 staId, void *pContext);
void csrRoamSaveStatsFromTl(tpAniSirGlobal pMac, WLANTL_TRANSFER_STA_TYPE *pTlStats);
void csrRoamTlStatsTimerHandler(void *pv);
@@ -258,7 +258,7 @@ eHalStatus csrRoamDeregStatisticsReq(tpAniSirGlobal pMac);
static tANI_U32 csrFindIbssSession( tpAniSirGlobal pMac );
static eHalStatus csrRoamStartWds( tpAniSirGlobal pMac, tANI_U32 sessionId, tCsrRoamProfile *pProfile, tSirBssDescription *pBssDesc );
static void csrInitSession( tpAniSirGlobal pMac, tANI_U32 sessionId );
-static eHalStatus csrRoamIssueSetKeyCommand( 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);
@@ -297,7 +297,7 @@ eHalStatus csrOpen(tpAniSirGlobal pMac)
VOS_STATUS vosStatus = VOS_STATUS_SUCCESS;
v_REGDOMAIN_t regId;
tANI_U32 i;
-
+
do
{
/* Initialize CSR Roam Globals */
@@ -320,7 +320,7 @@ eHalStatus csrOpen(tpAniSirGlobal pMac)
vosStatus = vos_nv_readDefaultCountryTable( &nvTables );
if ( VOS_IS_STATUS_SUCCESS(vosStatus) )
{
- palCopyMemory( pMac->hHdd, pMac->scan.countryCodeDefault,
+ palCopyMemory( pMac->hHdd, pMac->scan.countryCodeDefault,
nvTables.defaultCountryTable.countryCode, WNI_CFG_COUNTRY_CODE_LEN );
status = eHAL_STATUS_SUCCESS;
}
@@ -338,11 +338,11 @@ eHalStatus csrOpen(tpAniSirGlobal pMac)
WDA_SetRegDomain(pMac, regId);
pMac->scan.domainIdDefault = regId;
pMac->scan.domainIdCurrent = pMac->scan.domainIdDefault;
- status = palCopyMemory(pMac->hHdd, pMac->scan.countryCodeCurrent,
+ status = palCopyMemory(pMac->hHdd, pMac->scan.countryCodeCurrent,
pMac->scan.countryCodeDefault, WNI_CFG_COUNTRY_CODE_LEN);
status = csrInitGetChannels( pMac );
}while(0);
-
+
return (status);
}
@@ -399,7 +399,7 @@ eHalStatus csrSetRegInfo(tHalHandle hHal, tANI_U8 *apCntryCode)
return eHAL_STATUS_FAILURE;
}
smsLog( pMac, LOGW, FL(" country Code %.2s"), apCntryCode );
- /* To get correct Regulatory domain from NV table
+ /* To get correct Regulatory domain from NV table
* 2 character Country code should be used
* 3rd charater is optional for indoor/outdoor setting */
cntryCodeLength = WNI_CFG_COUNTRY_CODE_LEN;
@@ -432,7 +432,7 @@ eHalStatus csrSetRegInfo(tHalHandle hHal, tANI_U8 *apCntryCode)
WNI_CFG_COUNTRY_CODE_LEN,
0 );
/* Copy 2 or 3 bytes country code */
- palCopyMemory( pMac->hHdd, pMac->scan.countryCodeDefault,
+ palCopyMemory( pMac->hHdd, pMac->scan.countryCodeDefault,
apCntryCode, cntryCodeLength );
/* If 2 bytes country code, 3rd byte must be filled with space */
if((WNI_CFG_COUNTRY_CODE_LEN - 1) == cntryCodeLength)
@@ -442,7 +442,7 @@ eHalStatus csrSetRegInfo(tHalHandle hHal, tANI_U8 *apCntryCode)
1,
0x20 );
}
- status = palCopyMemory(pMac->hHdd, pMac->scan.countryCodeCurrent,
+ status = palCopyMemory(pMac->hHdd, pMac->scan.countryCodeCurrent,
pMac->scan.countryCodeDefault, WNI_CFG_COUNTRY_CODE_LEN);
status = csrInitGetChannels( pMac );
return status;
@@ -452,7 +452,7 @@ eHalStatus csrSetChannels(tHalHandle hHal, tCsrConfigParam *pParam )
eHalStatus status = eHAL_STATUS_SUCCESS;
tpAniSirGlobal pMac = PMAC_STRUCT( hHal );
tANI_U8 index = 0;
- palCopyMemory( pMac->hHdd, pParam->Csr11dinfo.countryCode,
+ palCopyMemory( pMac->hHdd, pParam->Csr11dinfo.countryCode,
pMac->scan.countryCodeCurrent, WNI_CFG_COUNTRY_CODE_LEN );
for ( index = 0; index < pMac->scan.base20MHzChannels.numChannels ; index++)
{
@@ -462,7 +462,7 @@ eHalStatus csrSetChannels(tHalHandle hHal, tCsrConfigParam *pParam )
pParam->Csr11dinfo.ChnPower[index].maxtxPower = pMac->scan.defaultPowerTable[index].pwr;
}
pParam->Csr11dinfo.Channels.numChannels = pMac->scan.base20MHzChannels.numChannels;
-
+
return status;
}
eHalStatus csrClose(tpAniSirGlobal pMac)
@@ -478,7 +478,7 @@ eHalStatus csrClose(tpAniSirGlobal pMac)
/* DeInit Globals */
csrRoamDeInitGlobals(pMac);
return (status);
-}
+}
eHalStatus csrUpdateChannelList(tCsrScanStruct *pScan)
{
@@ -522,7 +522,7 @@ eHalStatus csrStart(tpAniSirGlobal pMac)
{
eHalStatus status = eHAL_STATUS_SUCCESS;
tANI_U32 i;
-
+
do
{
//save the global vos context
@@ -563,7 +563,7 @@ eHalStatus csrStart(tpAniSirGlobal pMac)
pMac->roam.tlStatsReqInfo.timerRunning = FALSE;
//init the link quality indication also
pMac->roam.vccLinkQuality = eCSR_ROAM_LINK_QUAL_MIN_IND;
- if(!HAL_STATUS_SUCCESS(status))
+ if(!HAL_STATUS_SUCCESS(status))
{
smsLog(pMac, LOGW, " csrStart: Couldn't Init HO control blk ");
break;
@@ -596,7 +596,7 @@ eHalStatus csrStop(tpAniSirGlobal pMac)
pMac->scan.fCancelIdleScan = eANI_BOOLEAN_FALSE;
pMac->scan.fRestartIdleScan = eANI_BOOLEAN_FALSE;
csrLLPurge( &pMac->roam.roamCmdPendingList, eANI_BOOLEAN_TRUE );
-
+
#if defined WLAN_FEATURE_NEIGHBOR_ROAMING
csrNeighborRoamClose(pMac);
#endif
@@ -638,8 +638,8 @@ eHalStatus csrReady(tpAniSirGlobal pMac)
csrInitBGScanChannelList(pMac);
/* HDD issues the init scan */
csrScanStartResultAgingTimer(pMac);
- /* If the gScanAgingTime is set to '0' then scan results aging timeout
- based on timer feature is not enabled*/
+ /* If the gScanAgingTime is set to '0' then scan results aging timeout
+ based on timer feature is not enabled*/
if(0 != pMac->scan.scanResultCfgAgingTime )
{
csrScanStartResultCfgAgingTimer(pMac);
@@ -666,7 +666,7 @@ void csrSetGlobalCfgs( tpAniSirGlobal pMac )
ccmCfgSetInt(pMac, WNI_CFG_FRAGMENTATION_THRESHOLD, csrGetFragThresh(pMac), NULL, eANI_BOOLEAN_FALSE);
ccmCfgSetInt(pMac, WNI_CFG_RTS_THRESHOLD, csrGetRTSThresh(pMac), NULL, eANI_BOOLEAN_FALSE);
ccmCfgSetInt(pMac, WNI_CFG_11D_ENABLED,
- ((pMac->roam.configParam.Is11hSupportEnabled) ? pMac->roam.configParam.Is11dSupportEnabled : pMac->roam.configParam.Is11dSupportEnabled),
+ ((pMac->roam.configParam.Is11hSupportEnabled) ? pMac->roam.configParam.Is11dSupportEnabled : pMac->roam.configParam.Is11dSupportEnabled),
NULL, eANI_BOOLEAN_FALSE);
ccmCfgSetInt(pMac, WNI_CFG_11H_ENABLED, pMac->roam.configParam.Is11hSupportEnabled, NULL, eANI_BOOLEAN_FALSE);
/* For now we will just use the 5GHz CB mode ini parameter to decide whether CB supported or not in Probes when there is no session
@@ -674,10 +674,10 @@ void csrSetGlobalCfgs( tpAniSirGlobal pMac )
*/
ccmCfgSetInt(pMac, WNI_CFG_CHANNEL_BONDING_MODE, !!(pMac->roam.configParam.channelBondingMode5GHz), NULL, eANI_BOOLEAN_FALSE);
ccmCfgSetInt(pMac, WNI_CFG_HEART_BEAT_THRESHOLD, pMac->roam.configParam.HeartbeatThresh24, NULL, eANI_BOOLEAN_FALSE);
-
+
//Update the operating mode to configured value during initialization,
//So that client can advertise full capabilities in Probe request frame.
- csrSetDefaultDot11Mode( pMac );
+ csrSetDefaultDot11Mode( pMac );
}
eHalStatus csrRoamOpen(tpAniSirGlobal pMac)
@@ -695,7 +695,7 @@ eHalStatus csrRoamOpen(tpAniSirGlobal pMac)
}
pMac->roam.WaitForKeyTimerInfo.pMac = pMac;
pMac->roam.WaitForKeyTimerInfo.sessionId = CSR_SESSION_ID_INVALID;
- status = palTimerAlloc(pMac->hHdd, &pMac->roam.hTimerWaitForKey, csrRoamWaitForKeyTimeOutHandler,
+ status = palTimerAlloc(pMac->hHdd, &pMac->roam.hTimerWaitForKey, csrRoamWaitForKeyTimeOutHandler,
&pMac->roam.WaitForKeyTimerInfo);
if(!HAL_STATUS_SUCCESS(status))
{
@@ -745,7 +745,7 @@ eHalStatus csrRoamGetConnectState(tpAniSirGlobal pMac, tANI_U32 sessionId, eCsrC
{
status = eHAL_STATUS_SUCCESS;
*pState = pMac->roam.roamSession[sessionId].connectState;
- }
+ }
return (status);
}
@@ -760,7 +760,7 @@ eHalStatus csrRoamCopyConnectProfile(tpAniSirGlobal pMac, tANI_U32 sessionId, tC
smsLog(pMac, LOGE, FL(" session %d not found "), sessionId);
return eHAL_STATUS_FAILURE;
}
-
+
if(pProfile)
{
if(pSession->pConnectBssDesc)
@@ -806,18 +806,18 @@ eHalStatus csrRoamCopyConnectProfile(tpAniSirGlobal pMac, tANI_U32 sessionId, tC
pProfile->isCCXAssoc = pSession->connectedProfile.isCCXAssoc;
if (csrIsAuthTypeCCX(pSession->connectedProfile.AuthType))
{
- palCopyMemory( pMac->hHdd, pProfile->ccxCckmInfo.krk,
+ palCopyMemory( pMac->hHdd, pProfile->ccxCckmInfo.krk,
pSession->connectedProfile.ccxCckmInfo.krk, CSR_KRK_KEY_LEN );
pProfile->ccxCckmInfo.reassoc_req_num=
pSession->connectedProfile.ccxCckmInfo.reassoc_req_num;
- pProfile->ccxCckmInfo.krk_plumbed =
+ pProfile->ccxCckmInfo.krk_plumbed =
pSession->connectedProfile.ccxCckmInfo.krk_plumbed;
}
#endif
}while(0);
}
}
-
+
return (status);
}
@@ -839,7 +839,7 @@ eHalStatus csrRoamGetConnectProfile(tpAniSirGlobal pMac, tANI_U32 sessionId, tCs
eHalStatus csrRoamFreeConnectProfile(tpAniSirGlobal pMac, tCsrRoamConnectedProfile *pProfile)
{
eHalStatus status = eHAL_STATUS_SUCCESS;
-
+
if(pProfile->pBssDesc)
{
palFreeMemory(pMac->hHdd, pProfile->pBssDesc);
@@ -867,22 +867,22 @@ static eHalStatus csrRoamFreeConnectedInfo( tpAniSirGlobal pMac, tCsrRoamConnect
pConnectedInfo->staId = 0;
#ifdef WLAN_FEATURE_VOWIFI_11R
pConnectedInfo->nRICRspLength = 0;
-#endif
+#endif
#ifdef FEATURE_WLAN_CCX
pConnectedInfo->nTspecIeLength = 0;
-#endif
+#endif
return ( status );
}
-
-
-
+
+
+
void csrReleaseCommandPreauth(tpAniSirGlobal pMac, tSmeCmd *pCommand)
{
csrReinitPreauthCmd(pMac, pCommand);
csrReleaseCommand( pMac, pCommand );
}
-
+
void csrReleaseCommandRoam(tpAniSirGlobal pMac, tSmeCmd *pCommand)
{
csrReinitRoamCmd(pMac, pCommand);
@@ -977,16 +977,16 @@ void csrRoamSubstateChange( tpAniSirGlobal pMac, eCsrRoamSubState NewSubstate, t
eCsrRoamState csrRoamStateChange( tpAniSirGlobal pMac, eCsrRoamState NewRoamState, tANI_U8 sessionId)
{
eCsrRoamState PreviousState;
-
+
smsLog( pMac, LOG1, "CSR RoamState[%hu]: [ %d <== %d ]", sessionId,
NewRoamState, pMac->roam.curState[sessionId]);
PreviousState = pMac->roam.curState[sessionId];
-
- if ( NewRoamState != pMac->roam.curState[sessionId] )
+
+ if ( NewRoamState != pMac->roam.curState[sessionId] )
{
// Whenever we transition OUT of the Roaming state, clear the Roaming substate...
- if ( CSR_IS_ROAM_JOINING(pMac, sessionId) )
+ if ( CSR_IS_ROAM_JOINING(pMac, sessionId) )
{
csrRoamSubstateChange( pMac, eCSR_ROAM_SUBSTATE_NONE, sessionId );
}
@@ -1032,10 +1032,10 @@ static void initConfigParam(tpAniSirGlobal pMac)
pMac->roam.configParam.ProprietaryRatesEnabled = eANI_BOOLEAN_TRUE;
pMac->roam.configParam.TxRate = eCSR_TX_RATE_AUTO;
pMac->roam.configParam.impsSleepTime = CSR_IDLE_SCAN_NO_PS_INTERVAL;
- pMac->roam.configParam.scanAgeTimeNCNPS = CSR_SCAN_AGING_TIME_NOT_CONNECT_NO_PS;
- pMac->roam.configParam.scanAgeTimeNCPS = CSR_SCAN_AGING_TIME_NOT_CONNECT_W_PS;
- pMac->roam.configParam.scanAgeTimeCNPS = CSR_SCAN_AGING_TIME_CONNECT_NO_PS;
- pMac->roam.configParam.scanAgeTimeCPS = CSR_SCAN_AGING_TIME_CONNECT_W_PS;
+ pMac->roam.configParam.scanAgeTimeNCNPS = CSR_SCAN_AGING_TIME_NOT_CONNECT_NO_PS;
+ pMac->roam.configParam.scanAgeTimeNCPS = CSR_SCAN_AGING_TIME_NOT_CONNECT_W_PS;
+ pMac->roam.configParam.scanAgeTimeCNPS = CSR_SCAN_AGING_TIME_CONNECT_NO_PS;
+ pMac->roam.configParam.scanAgeTimeCPS = CSR_SCAN_AGING_TIME_CONNECT_W_PS;
for(i = 0; i < CSR_NUM_RSSI_CAT; i++)
{
pMac->roam.configParam.BssPreferValue[i] = i;
@@ -1088,7 +1088,7 @@ static void initConfigParam(tpAniSirGlobal pMac)
pMac->roam.configParam.addTSWhenACMIsOff = 0;
pMac->roam.configParam.fScanTwice = eANI_BOOLEAN_FALSE;
- //Remove this code once SLM_Sessionization is supported
+ //Remove this code once SLM_Sessionization is supported
//BMPS_WORKAROUND_NOT_NEEDED
pMac->roam.configParam.doBMPSWorkaround = 0;
@@ -1356,10 +1356,10 @@ eHalStatus csrSetBand(tHalHandle hHal, eCsrBand eBand)
/* The funcns csrConvertCBIniValueToPhyCBState and csrConvertPhyCBStateToIniValue have been
* introduced to convert the ini value to the ENUM used in csr and MAC for CB state
* Ideally we should have kept the ini value and enum value same and representing the same
- * cb values as in 11n standard i.e.
- * Set to 1 (SCA) if the secondary channel is above the primary channel
- * Set to 3 (SCB) if the secondary channel is below the primary channel
- * Set to 0 (SCN) if no secondary channel is present
+ * cb values as in 11n standard i.e.
+ * Set to 1 (SCA) if the secondary channel is above the primary channel
+ * Set to 3 (SCB) if the secondary channel is below the primary channel
+ * Set to 0 (SCN) if no secondary channel is present
* However, since our driver is already distributed we will keep the ini definition as it is which is:
* 0 - secondary none
* 1 - secondary LOW
@@ -1389,27 +1389,27 @@ ePhyChanBondState csrConvertCBIniValueToPhyCBState(v_U32_t cbIniValue)
break;
#ifdef WLAN_FEATURE_11AC
case 3:
- phyCbState = PHY_QUADRUPLE_CHANNEL_20MHZ_LOW_40MHZ_CENTERED;
+ phyCbState = PHY_QUADRUPLE_CHANNEL_20MHZ_LOW_40MHZ_CENTERED;
break;
case 4:
phyCbState = PHY_QUADRUPLE_CHANNEL_20MHZ_CENTERED_40MHZ_CENTERED;
break;
case 5:
phyCbState = PHY_QUADRUPLE_CHANNEL_20MHZ_CENTERED_40MHZ_CENTERED;
- break;
+ break;
case 6:
phyCbState = PHY_QUADRUPLE_CHANNEL_20MHZ_LOW_40MHZ_LOW;
break;
case 7:
phyCbState = PHY_QUADRUPLE_CHANNEL_20MHZ_HIGH_40MHZ_LOW;
- break;
+ break;
case 8:
phyCbState = PHY_QUADRUPLE_CHANNEL_20MHZ_LOW_40MHZ_HIGH;
break;
case 9:
phyCbState = PHY_QUADRUPLE_CHANNEL_20MHZ_HIGH_40MHZ_HIGH;
- break;
-#endif
+ break;
+#endif
default:
// If an invalid value is passed, disable CHANNEL BONDING
phyCbState = PHY_SINGLE_CHANNEL_CENTERED;
@@ -1481,7 +1481,7 @@ eHalStatus csrChangeDefaultConfigParam(tpAniSirGlobal pMac, tCsrConfigParam *pPa
pMac->roam.configParam.fenableMCCMode = pParam->fEnableMCCMode;
pMac->roam.configParam.fAllowMCCGODiffBI = pParam->fAllowMCCGODiffBI;
-
+
/* channelBondingMode5GHz plays a dual role right now
* INFRA STA will use this non zero value as CB enabled and SOFTAP will use this non-zero value to determine the secondary channel offset
* This is how channelBondingMode5GHz works now and this is kept intact to avoid any cfg.ini change
@@ -1579,7 +1579,7 @@ eHalStatus csrChangeDefaultConfigParam(tpAniSirGlobal pMac, tCsrConfigParam *pPa
pMac->roam.configParam.impsSleepTime = 0;
}
pMac->roam.configParam.eBand = pParam->eBand;
- pMac->roam.configParam.uCfgDot11Mode = csrGetCfgDot11ModeFromCsrPhyMode(NULL, pMac->roam.configParam.phyMode,
+ pMac->roam.configParam.uCfgDot11Mode = csrGetCfgDot11ModeFromCsrPhyMode(NULL, pMac->roam.configParam.phyMode,
pMac->roam.configParam.ProprietaryRatesEnabled);
//if HDD passed down non zero values for age params, then only update,
//otherwise keep using the defaults
@@ -1589,21 +1589,21 @@ eHalStatus csrChangeDefaultConfigParam(tpAniSirGlobal pMac, tCsrConfigParam *pPa
}
if(pParam->scanAgeTimeNCNPS)
{
- pMac->roam.configParam.scanAgeTimeNCNPS = pParam->scanAgeTimeNCNPS;
+ pMac->roam.configParam.scanAgeTimeNCNPS = pParam->scanAgeTimeNCNPS;
}
if(pParam->scanAgeTimeNCPS)
{
- pMac->roam.configParam.scanAgeTimeNCPS = pParam->scanAgeTimeNCPS;
+ pMac->roam.configParam.scanAgeTimeNCPS = pParam->scanAgeTimeNCPS;
}
if(pParam->scanAgeTimeCNPS)
{
- pMac->roam.configParam.scanAgeTimeCNPS = pParam->scanAgeTimeCNPS;
+ pMac->roam.configParam.scanAgeTimeCNPS = pParam->scanAgeTimeCNPS;
}
if(pParam->scanAgeTimeCPS)
{
- pMac->roam.configParam.scanAgeTimeCPS = pParam->scanAgeTimeCPS;
+ pMac->roam.configParam.scanAgeTimeCPS = pParam->scanAgeTimeCPS;
}
-
+
csrAssignRssiForCategory(pMac, pParam->bCatRssiOffset);
pMac->roam.configParam.nRoamingTime = pParam->nRoamingTime;
pMac->roam.configParam.fEnforce11dChannels = pParam->fEnforce11dChannels;
@@ -1634,7 +1634,7 @@ eHalStatus csrChangeDefaultConfigParam(tpAniSirGlobal pMac, tCsrConfigParam *pPa
}
-#ifdef WLAN_FEATURE_VOWIFI_11R
+#ifdef WLAN_FEATURE_VOWIFI_11R
palCopyMemory( pMac->hHdd, &pMac->roam.configParam.csr11rConfig, &pParam->csr11rConfig, sizeof(tCsr11rConfigParams) );
smsLog( pMac, LOG1, "IsFTResourceReqSupp = %d", pMac->roam.configParam.csr11rConfig.IsFTResourceReqSupported);
#endif
@@ -1655,7 +1655,7 @@ eHalStatus csrChangeDefaultConfigParam(tpAniSirGlobal pMac, tCsrConfigParam *pPa
pMac->roam.configParam.isFastRoamIniFeatureEnabled = pParam->isFastRoamIniFeatureEnabled;
#endif
-#ifdef FEATURE_WLAN_CCX
+#ifdef FEATURE_WLAN_CCX
pMac->roam.configParam.isCcxIniFeatureEnabled = pParam->isCcxIniFeatureEnabled;
#endif
#ifdef WLAN_FEATURE_NEIGHBOR_ROAMING
@@ -1691,7 +1691,7 @@ eHalStatus csrChangeDefaultConfigParam(tpAniSirGlobal pMac, tCsrConfigParam *pPa
* will automatically connect back and resume BMPS since resume BMPS is not working when moving from concurrent to
* single session
*/
- //Remove this code once SLM_Sessionization is supported
+ //Remove this code once SLM_Sessionization is supported
//BMPS_WORKAROUND_NOT_NEEDED
pMac->roam.configParam.doBMPSWorkaround = 0;
@@ -1701,10 +1701,11 @@ eHalStatus csrChangeDefaultConfigParam(tpAniSirGlobal pMac, tCsrConfigParam *pPa
pMac->roam.configParam.txBFCsnValue = pParam->txBFCsnValue;
pMac->roam.configParam.enable2x2= pParam->enable2x2;
pMac->roam.configParam.enableVhtFor24GHz = pParam->enableVhtFor24GHz;
+ pMac->roam.configParam.txMuBformee= pParam->enableMuBformee;
#endif
pMac->roam.configParam.txLdpcEnable = pParam->enableTxLdpc;
}
-
+
return status;
}
@@ -1749,16 +1750,16 @@ eHalStatus csrGetConfigParam(tpAniSirGlobal pMac, tCsrConfigParam *pParam)
pParam->impsSleepTime = pMac->roam.configParam.impsSleepTime / PAL_TIMER_TO_SEC_UNIT;
pParam->eBand = pMac->roam.configParam.eBand;
pParam->nScanResultAgeCount = pMac->roam.configParam.agingCount;
- pParam->scanAgeTimeNCNPS = pMac->roam.configParam.scanAgeTimeNCNPS;
- pParam->scanAgeTimeNCPS = pMac->roam.configParam.scanAgeTimeNCPS;
- pParam->scanAgeTimeCNPS = pMac->roam.configParam.scanAgeTimeCNPS;
- pParam->scanAgeTimeCPS = pMac->roam.configParam.scanAgeTimeCPS;
+ pParam->scanAgeTimeNCNPS = pMac->roam.configParam.scanAgeTimeNCNPS;
+ pParam->scanAgeTimeNCPS = pMac->roam.configParam.scanAgeTimeNCPS;
+ pParam->scanAgeTimeCNPS = pMac->roam.configParam.scanAgeTimeCNPS;
+ pParam->scanAgeTimeCPS = pMac->roam.configParam.scanAgeTimeCPS;
pParam->bCatRssiOffset = pMac->roam.configParam.bCatRssiOffset;
pParam->nRoamingTime = pMac->roam.configParam.nRoamingTime;
pParam->fEnforce11dChannels = pMac->roam.configParam.fEnforce11dChannels;
pParam->fSupplicantCountryCodeHasPriority = pMac->roam.configParam.fSupplicantCountryCodeHasPriority;
pParam->fEnforceCountryCodeMatch = pMac->roam.configParam.fEnforceCountryCodeMatch;
- pParam->fEnforceDefaultDomain = pMac->roam.configParam.fEnforceDefaultDomain;
+ pParam->fEnforceDefaultDomain = pMac->roam.configParam.fEnforceDefaultDomain;
pParam->vccRssiThreshold = pMac->roam.configParam.vccRssiThreshold;
pParam->vccUlMacLossThreshold = pMac->roam.configParam.vccUlMacLossThreshold;
pParam->IsIdleScanEnabled = pMac->roam.configParam.IsIdleScanEnabled;
@@ -1782,6 +1783,7 @@ eHalStatus csrGetConfigParam(tpAniSirGlobal pMac, tCsrConfigParam *pParam)
pParam->nVhtChannelWidth = pMac->roam.configParam.nVhtChannelWidth;
pParam->enableTxBF = pMac->roam.configParam.txBFEnable;
pParam->txBFCsnValue = pMac->roam.configParam.txBFCsnValue;
+ pParam->enableMuBformee = pMac->roam.configParam.txMuBformee;
#endif
pParam->enableTxLdpc = pMac->roam.configParam.txLdpcEnable;
csrSetChannels(pMac, pParam);
@@ -1808,8 +1810,8 @@ eHalStatus csrSetPhyMode(tHalHandle hHal, tANI_U32 phyMode, eCsrBand eBand, tANI
{
if(CSR_IS_RADIO_BG_ONLY(pMac)) break;
if((eCSR_DOT11_MODE_11b & phyMode) || (eCSR_DOT11_MODE_11b_ONLY & phyMode) ||
- (eCSR_DOT11_MODE_11g & phyMode) || (eCSR_DOT11_MODE_11g_ONLY & phyMode)
- )
+ (eCSR_DOT11_MODE_11g & phyMode) || (eCSR_DOT11_MODE_11g_ONLY & phyMode)
+ )
{
break;
}
@@ -1921,7 +1923,7 @@ eHalStatus csrSetPhyMode(tHalHandle hHal, tANI_U32 phyMode, eCsrBand eBand, tANI
}
return (status);
}
-
+
void csrPruneChannelListForMode( tpAniSirGlobal pMac, tCsrChannel *pChannelList )
{
tANI_U8 Index;
@@ -1943,20 +1945,20 @@ void csrPruneChannelListForMode( tpAniSirGlobal pMac, tCsrChannel *pChannelList
}
}
// Cleanup the rest of channels. Note we only need to clean up the channels if we had
- // to trim the list. Calling palZeroMemory() with a 0 size is going to throw asserts on
+ // to trim the list. Calling palZeroMemory() with a 0 size is going to throw asserts on
// the debug builds so let's be a bit smarter about that. Zero out the reset of the channels
// only if we need to.
//
- // The amount of memory to clear is the number of channesl that we trimmed
+ // The amount of memory to clear is the number of channesl that we trimmed
// (pChannelList->numChannels - cChannels) times the size of a channel in the structure.
-
+
if ( pChannelList->numChannels > cChannels )
{
palZeroMemory( pMac->hHdd, &pChannelList->channelList[ cChannels ],
sizeof( pChannelList->channelList[ 0 ] ) * ( pChannelList->numChannels - cChannels ) );
-
+
}
-
+
pChannelList->numChannels = cChannels;
}
else if ( CSR_IS_5G_BAND_ONLY( pMac ) )
@@ -1970,18 +1972,18 @@ void csrPruneChannelListForMode( tpAniSirGlobal pMac, tCsrChannel *pChannelList
}
}
// Cleanup the rest of channels. Note we only need to clean up the channels if we had
- // to trim the list. Calling palZeroMemory() with a 0 size is going to throw asserts on
+ // to trim the list. Calling palZeroMemory() with a 0 size is going to throw asserts on
// the debug builds so let's be a bit smarter about that. Zero out the reset of the channels
// only if we need to.
//
- // The amount of memory to clear is the number of channesl that we trimmed
+ // The amount of memory to clear is the number of channesl that we trimmed
// (pChannelList->numChannels - cChannels) times the size of a channel in the structure.
if ( pChannelList->numChannels > cChannels )
{
palZeroMemory( pMac->hHdd, &pChannelList->channelList[ cChannels ],
sizeof( pChannelList->channelList[ 0 ] ) * ( pChannelList->numChannels - cChannels ) );
- }
-
+ }
+
pChannelList->numChannels = cChannels;
}
}
@@ -2128,12 +2130,12 @@ eHalStatus csrInitGetChannels(tpAniSirGlobal pMac)
VOS_STATUS vosStatus;
tANI_U8 Index = 0;
tANI_U8 num40MHzChannelsFound = 0;
-
-
+
+
//TODO: this interface changed to include the 40MHz channel list
// this needs to be tied into the adapter structure somehow and referenced appropriately for CB operation
// Read the scan channel list (including the power limit) from EEPROM
- vosStatus = vos_nv_getChannelListWithPower( pMac->scan.defaultPowerTable, &num20MHzChannelsFound,
+ vosStatus = vos_nv_getChannelListWithPower( pMac->scan.defaultPowerTable, &num20MHzChannelsFound,
pMac->scan.defaultPowerTable40MHz, &num40MHzChannelsFound);
if ( (VOS_STATUS_SUCCESS != vosStatus) || (num20MHzChannelsFound == 0) )
{
@@ -2164,7 +2166,7 @@ eHalStatus csrInitGetChannels(tpAniSirGlobal pMac)
}
pMac->scan.base40MHzChannels.numChannels = num40MHzChannelsFound;
}
- return (status);
+ return (status);
}
eHalStatus csrInitChannelList( tHalHandle hHal )
@@ -2177,10 +2179,10 @@ eHalStatus csrInitChannelList( tHalHandle hHal )
csrSaveChannelPowerForBand(pMac, eANI_BOOLEAN_TRUE);
// Apply the base channel list, power info, and set the Country code...
csrApplyChannelPowerCountryInfo( pMac, &pMac->scan.base20MHzChannels, pMac->scan.countryCodeCurrent, eANI_BOOLEAN_TRUE );
-
+
return (status);
}
-eHalStatus csrChangeConfigParams(tpAniSirGlobal pMac,
+eHalStatus csrChangeConfigParams(tpAniSirGlobal pMac,
tCsrUpdateConfigParam *pUpdateConfigParam)
{
eHalStatus status = eHAL_STATUS_FAILURE;
@@ -2203,10 +2205,10 @@ static eHalStatus CsrInit11dInfo(tpAniSirGlobal pMac, tCsr11dinfo *ps11dinfo)
{
return (status);
}
- if ( ps11dinfo->Channels.numChannels && ( WNI_CFG_VALID_CHANNEL_LIST_LEN >= ps11dinfo->Channels.numChannels ) )
+ if ( ps11dinfo->Channels.numChannels && ( WNI_CFG_VALID_CHANNEL_LIST_LEN >= ps11dinfo->Channels.numChannels ) )
{
pMac->scan.base20MHzChannels.numChannels = ps11dinfo->Channels.numChannels;
- status = palCopyMemory(pMac->hHdd, pMac->scan.base20MHzChannels.channelList,
+ status = palCopyMemory(pMac->hHdd, pMac->scan.base20MHzChannels.channelList,
ps11dinfo->Channels.channelList, ps11dinfo->Channels.numChannels);
if(!HAL_STATUS_SUCCESS(status)) return (status);
}
@@ -2216,14 +2218,14 @@ static eHalStatus CsrInit11dInfo(tpAniSirGlobal pMac, tCsr11dinfo *ps11dinfo)
return (eHAL_STATUS_SUCCESS);
}
//legacy maintenance
- status = palCopyMemory(pMac->hHdd, pMac->scan.countryCodeDefault,
+ status = palCopyMemory(pMac->hHdd, pMac->scan.countryCodeDefault,
ps11dinfo->countryCode, WNI_CFG_COUNTRY_CODE_LEN);
if(!HAL_STATUS_SUCCESS(status)) return (status);
- //Tush: at csropen get this initialized with default, during csr reset if this
+ //Tush: at csropen get this initialized with default, during csr reset if this
// already set with some value no need initilaize with default again
if(0 == pMac->scan.countryCodeCurrent[0])
{
- status = palCopyMemory(pMac->hHdd, pMac->scan.countryCodeCurrent,
+ status = palCopyMemory(pMac->hHdd, pMac->scan.countryCodeCurrent,
ps11dinfo->countryCode, WNI_CFG_COUNTRY_CODE_LEN);
if(!HAL_STATUS_SUCCESS(status)) return (status);
}
@@ -2327,17 +2329,17 @@ void csrRoamRemoveDuplicateCommand(tpAniSirGlobal pMac, tANI_U32 sessionId, tSme
// - the new roam command is a NewProfileList.
// - the new roam command is a Forced Dissoc
// - the new roam command is from an 802.11 OID (OID_SSID or OID_BSSID).
- if (
+ if (
(pCommand && ( pCommand->sessionId == pDupCommand->sessionId ) &&
((pCommand->command == pDupCommand->command) &&
/* This peermac check is requried for Softap/GO scenarios
- * For STA scenario below OR check will suffice as pCommand will
+ * For STA scenario below OR check will suffice as pCommand will
* always be NULL for STA scenarios
*/
(vos_mem_compare(pDupCommand->u.roamCmd.peerMac, pCommand->u.roamCmd.peerMac, sizeof(v_MACADDR_t))) &&
(pCommand->u.roamCmd.roamReason == pDupCommand->u.roamCmd.roamReason ||
eCsrForcedDisassoc == pCommand->u.roamCmd.roamReason ||
- eCsrHddIssued == pCommand->u.roamCmd.roamReason)))
+ eCsrHddIssued == pCommand->u.roamCmd.roamReason)))
||
//below the pCommand is NULL
( (sessionId == pDupCommand->sessionId) &&
@@ -2368,7 +2370,7 @@ void csrRoamRemoveDuplicateCommand(tpAniSirGlobal pMac, tANI_U32 sessionId, tSme
}
csrLLClose(&localList);
}
-eHalStatus csrRoamCallCallback(tpAniSirGlobal pMac, tANI_U32 sessionId, tCsrRoamInfo *pRoamInfo,
+eHalStatus csrRoamCallCallback(tpAniSirGlobal pMac, tANI_U32 sessionId, tCsrRoamInfo *pRoamInfo,
tANI_U32 roamId, eRoamCmdStatus u1, eCsrRoamResult u2)
{
eHalStatus status = eHAL_STATUS_SUCCESS;
@@ -2393,12 +2395,12 @@ eHalStatus csrRoamCallCallback(tpAniSirGlobal pMac, tANI_U32 sessionId, tCsrRoam
if ((u1 == eCSR_ROAM_FT_REASSOC_FAILED) && (pSession->bRefAssocStartCnt)) {
/*
* Decrement bRefAssocStartCnt for FT reassoc failure.
- * Reason: For FT reassoc failures, we first call
- * csrRoamCallCallback before notifying a failed roam
- * completion through csrRoamComplete. The latter in
- * turn calls csrRoamProcessResults which tries to
+ * Reason: For FT reassoc failures, we first call
+ * csrRoamCallCallback before notifying a failed roam
+ * completion through csrRoamComplete. The latter in
+ * turn calls csrRoamProcessResults which tries to
* once again call csrRoamCallCallback if bRefAssocStartCnt
- * is non-zero. Since this is redundant for FT reassoc
+ * is non-zero. Since this is redundant for FT reassoc
* failure, decrement bRefAssocStartCnt.
*/
pSession->bRefAssocStartCnt--;
@@ -2418,19 +2420,19 @@ eHalStatus csrRoamCallCallback(tpAniSirGlobal pMac, tANI_U32 sessionId, tCsrRoam
pRoamInfo->sessionId = (tANI_U8)sessionId;
}
- /* avoid holding the global lock when making the roaming callback , original change came
- from a raised CR (CR304874). Since this callback is in HDD a potential deadlock
- is possible on other OS ports where the callback may need to take locks to protect
- HDD state
+ /* avoid holding the global lock when making the roaming callback , original change came
+ from a raised CR (CR304874). Since this callback is in HDD a potential deadlock
+ is possible on other OS ports where the callback may need to take locks to protect
+ HDD state
UPDATE : revert this change but keep the comments here. Need to revisit as there are callbacks
that may actually depend on the lock being held */
// TODO: revisit: sme_ReleaseGlobalLock( &pMac->sme );
status = pSession->callback(pSession->pContext, pRoamInfo, roamId, u1, u2);
// TODO: revisit: sme_AcquireGlobalLock( &pMac->sme );
}
- //EVENT_WLAN_STATUS: eCSR_ROAM_ASSOCIATION_COMPLETION,
- // eCSR_ROAM_LOSTLINK, eCSR_ROAM_DISASSOCIATED,
-#ifdef FEATURE_WLAN_DIAG_SUPPORT_CSR
+ //EVENT_WLAN_STATUS: eCSR_ROAM_ASSOCIATION_COMPLETION,
+ // eCSR_ROAM_LOSTLINK, eCSR_ROAM_DISASSOCIATED,
+#ifdef FEATURE_WLAN_DIAG_SUPPORT_CSR
palZeroMemory(pMac->hHdd, &connectionStatus, sizeof(vos_event_wlan_status_payload_type));
if((eCSR_ROAM_ASSOCIATION_COMPLETION == u1) && (eCSR_ROAM_RESULT_ASSOCIATED == u2))
{
@@ -2473,21 +2475,21 @@ eHalStatus csrRoamCallCallback(tpAniSirGlobal pMac, tANI_U32 sessionId, tCsrRoam
WLAN_VOS_DIAG_EVENT_REPORT(&connectionStatus, EVENT_WLAN_STATUS);
}
#endif //FEATURE_WLAN_DIAG_SUPPORT_CSR
-
+
return (status);
}
// Returns whether handoff is currently in progress or not
tANI_BOOLEAN csrRoamIsHandoffInProgress(tpAniSirGlobal pMac)
{
#ifdef WLAN_FEATURE_NEIGHBOR_ROAMING
- return csrNeighborRoamIsHandoffInProgress(pMac);
+ return csrNeighborRoamIsHandoffInProgress(pMac);
#else
return eANI_BOOLEAN_FALSE;
#endif
}
eHalStatus csrRoamIssueDisassociate( tpAniSirGlobal pMac, tANI_U32 sessionId,
eCsrRoamSubState NewSubstate, tANI_BOOLEAN fMICFailure )
-{
+{
eHalStatus status = eHAL_STATUS_SUCCESS;
tCsrBssid bssId = {0xff, 0xff, 0xff, 0xff, 0xff, 0xff};
tANI_U16 reasonCode;
@@ -2498,15 +2500,15 @@ eHalStatus csrRoamIssueDisassociate( tpAniSirGlobal pMac, tANI_U32 sessionId,
smsLog(pMac, LOGE, FL(" session %d not found "), sessionId);
return eHAL_STATUS_FAILURE;
}
-
- //Restore AC weight in case we change it
+
+ //Restore AC weight in case we change it
if ( csrIsConnStateConnectedInfra( pMac, sessionId ) )
{
smsLog(pMac, LOG1, FL(" restore AC weights (%d-%d-%d-%d)"), pMac->roam.ucACWeights[0], pMac->roam.ucACWeights[1],
pMac->roam.ucACWeights[2], pMac->roam.ucACWeights[3]);
WLANTL_SetACWeights(pMac->roam.gVosContext, pMac->roam.ucACWeights);
}
-
+
if ( fMICFailure )
{
reasonCode = eSIR_MAC_MIC_FAILURE_REASON;
@@ -2514,35 +2516,35 @@ eHalStatus csrRoamIssueDisassociate( tpAniSirGlobal pMac, tANI_U32 sessionId,
else if (NewSubstate == eCSR_ROAM_SUBSTATE_DISASSOC_HANDOFF)
{
reasonCode = eSIR_MAC_DISASSOC_DUE_TO_FTHANDOFF_REASON;
- }
- else
+ }
+ else
{
reasonCode = eSIR_MAC_UNSPEC_FAILURE_REASON;
- }
+ }
#ifdef WLAN_FEATURE_VOWIFI_11R
- if ( (csrRoamIsHandoffInProgress(pMac)) &&
+ if ( (csrRoamIsHandoffInProgress(pMac)) &&
(NewSubstate != eCSR_ROAM_SUBSTATE_DISASSOC_HANDOFF))
{
tpCsrNeighborRoamControlInfo pNeighborRoamInfo = &pMac->roam.neighborRoamInfo;
palCopyMemory(pMac->hHdd, &bssId, pNeighborRoamInfo->csrNeighborRoamProfile.BSSIDs.bssid, sizeof(tSirMacAddr));
- }
- else
+ }
+ else
#endif
if(pSession->pConnectBssDesc)
{
palCopyMemory(pMac->hHdd, &bssId, pSession->pConnectBssDesc->bssId, sizeof(tCsrBssid));
}
-
-
+
+
smsLog( pMac, LOG2, "CSR Attempting to Disassociate Bssid=%02x-%02x-%02x-%02x-%02x-%02x"
- "subState = %d reason=%d", bssId[ 0 ], bssId[ 1 ], bssId[ 2 ], bssId[ 3 ],
+ "subState = %d reason=%d", bssId[ 0 ], bssId[ 1 ], bssId[ 2 ], bssId[ 3 ],
bssId[ 4 ], bssId[ 5 ], NewSubstate, reasonCode);
csrRoamSubstateChange( pMac, NewSubstate, sessionId);
- status = csrSendMBDisassocReqMsg( pMac, sessionId, bssId, reasonCode );
-
- if(HAL_STATUS_SUCCESS(status))
+ status = csrSendMBDisassocReqMsg( pMac, sessionId, bssId, reasonCode );
+
+ if(HAL_STATUS_SUCCESS(status))
{
csrRoamLinkDown(pMac, sessionId);
#ifndef WLAN_MDM_CODE_REDUCTION_OPT
@@ -2570,8 +2572,8 @@ eHalStatus csrRoamIssueDisassociate( tpAniSirGlobal pMac, tANI_U32 sessionId,
\param reason - reason code, be one of the tSirMacReasonCodes
\return eHalStatus
---------------------------------------------------------------------------*/
-eHalStatus csrRoamIssueDisassociateStaCmd( tpAniSirGlobal pMac,
- tANI_U32 sessionId,
+eHalStatus csrRoamIssueDisassociateStaCmd( tpAniSirGlobal pMac,
+ tANI_U32 sessionId,
tANI_U8 *pPeerMacAddr,
tANI_U32 reason)
{
@@ -2581,7 +2583,7 @@ eHalStatus csrRoamIssueDisassociateStaCmd( tpAniSirGlobal pMac,
do
{
pCommand = csrGetCommandBuffer( pMac );
- if ( !pCommand )
+ if ( !pCommand )
{
smsLog( pMac, LOGE, FL(" fail to get command buffer") );
status = eHAL_STATUS_RESOURCES;
@@ -2612,8 +2614,8 @@ eHalStatus csrRoamIssueDisassociateStaCmd( tpAniSirGlobal pMac,
\param reason - reason code, be one of the tSirMacReasonCodes
\return eHalStatus
---------------------------------------------------------------------------*/
-eHalStatus csrRoamIssueDeauthStaCmd( tpAniSirGlobal pMac,
- tANI_U32 sessionId,
+eHalStatus csrRoamIssueDeauthStaCmd( tpAniSirGlobal pMac,
+ tANI_U32 sessionId,
tANI_U8 *pPeerMacAddr,
tANI_U32 reason)
{
@@ -2623,7 +2625,7 @@ eHalStatus csrRoamIssueDeauthStaCmd( tpAniSirGlobal pMac,
do
{
pCommand = csrGetCommandBuffer( pMac );
- if ( !pCommand )
+ if ( !pCommand )
{
smsLog( pMac, LOGE, FL(" fail to get command buffer") );
status = eHAL_STATUS_RESOURCES;
@@ -2706,7 +2708,7 @@ csrRoamGetWpsSessionOverlap( tpAniSirGlobal pMac, tANI_U32 sessionId,
eHalStatus status = eHAL_STATUS_SUCCESS;
tCsrBssid bssId = {0xff, 0xff, 0xff, 0xff, 0xff, 0xff};
tCsrRoamSession *pSession = CSR_GET_SESSION( pMac, sessionId );
-
+
if (!pSession)
{
smsLog( pMac, LOGE, "csrRoamGetWpsSessionOverlap:CSR Session not found");
@@ -2724,13 +2726,13 @@ csrRoamGetWpsSessionOverlap( tpAniSirGlobal pMac, tANI_U32 sessionId,
smsLog( pMac, LOG2, "CSR getting WPS Session Overlap for Bssid = %02x-%02x-%02x-%02x-%02x-%02x",
bssId[ 0 ], bssId[ 1 ], bssId[ 2 ],
bssId[ 3 ], bssId[ 4 ], bssId[ 5 ] );
-
- status = csrSendMBGetWPSPBCSessions( pMac, sessionId, bssId, pUsrContext, pfnSapEventCallback, pRemoveMac);
-
+
+ status = csrSendMBGetWPSPBCSessions( pMac, sessionId, bssId, pUsrContext, pfnSapEventCallback, pRemoveMac);
+
return (status);
}
eHalStatus csrRoamIssueDeauth( tpAniSirGlobal pMac, tANI_U32 sessionId, eCsrRoamSubState NewSubstate )
-{
+{
eHalStatus status = eHAL_STATUS_SUCCESS;
tCsrBssid bssId = {0xff, 0xff, 0xff, 0xff, 0xff, 0xff};
tCsrRoamSession *pSession = CSR_GET_SESSION( pMac, sessionId );
@@ -2740,16 +2742,16 @@ eHalStatus csrRoamIssueDeauth( tpAniSirGlobal pMac, tANI_U32 sessionId, eCsrRoam
smsLog(pMac, LOGE, FL(" session %d not found "), sessionId);
return eHAL_STATUS_FAILURE;
}
-
+
if(pSession->pConnectBssDesc)
{
palCopyMemory(pMac->hHdd, &bssId, pSession->pConnectBssDesc->bssId, sizeof(tCsrBssid));
}
smsLog( pMac, LOG2, "CSR Attempting to Deauth Bssid= %02x-%02x-%02x-%02x-%02x-%02x",
bssId[ 0 ], bssId[ 1 ], bssId[ 2 ],
- bssId[ 3 ], bssId[ 4 ], bssId[ 5 ] );
+ bssId[ 3 ], bssId[ 4 ], bssId[ 5 ] );
csrRoamSubstateChange( pMac, NewSubstate, sessionId);
-
+
status = csrSendMBDeauthReqMsg( pMac, sessionId, bssId, eSIR_MAC_DEAUTH_LEAVING_BSS_REASON );
if(!HAL_STATUS_SUCCESS(status))
{
@@ -2770,14 +2772,14 @@ eHalStatus csrRoamSaveConnectedBssDesc( tpAniSirGlobal pMac, tANI_U32 sessionId,
smsLog(pMac, LOGE, FL(" session %d not found "), sessionId);
return eHAL_STATUS_FAILURE;
}
-
- // If no BSS description was found in this connection (happens with start IBSS), then
+
+ // If no BSS description was found in this connection (happens with start IBSS), then
// nix the BSS description that we keep around for the connected BSS) and get out...
if(NULL == pBssDesc)
{
csrFreeConnectBssDesc(pMac, sessionId);
}
- else
+ else
{
size = pBssDesc->length + sizeof( pBssDesc->length );
if(NULL != pSession->pConnectBssDesc)
@@ -2790,18 +2792,18 @@ eHalStatus csrRoamSaveConnectedBssDesc( tpAniSirGlobal pMac, tANI_U32 sessionId,
}
if(NULL == pSession->pConnectBssDesc)
{
- status = palAllocateMemory( pMac->hHdd, (void **)&pSession->pConnectBssDesc, size);
+ status = palAllocateMemory( pMac->hHdd, (void **)&pSession->pConnectBssDesc, size);
}
- if ( HAL_STATUS_SUCCESS(status) && pSession->pConnectBssDesc )
+ if ( HAL_STATUS_SUCCESS(status) && pSession->pConnectBssDesc )
{
- palCopyMemory( pMac->hHdd, pSession->pConnectBssDesc, pBssDesc, size );
+ palCopyMemory( pMac->hHdd, pSession->pConnectBssDesc, pBssDesc, size );
}
}
-
+
return (status);
}
-eHalStatus csrRoamPrepareBssConfig(tpAniSirGlobal pMac, tCsrRoamProfile *pProfile,
+eHalStatus csrRoamPrepareBssConfig(tpAniSirGlobal pMac, tCsrRoamProfile *pProfile,
tSirBssDescription *pBssDesc, tBssConfigParam *pBssConfig,
tDot11fBeaconIEs *pIes)
{
@@ -2848,7 +2850,7 @@ eHalStatus csrRoamPrepareBssConfig(tpAniSirGlobal pMac, tCsrRoamProfile *pProfil
{
pBssConfig->uCfgDot11Mode = cfgDot11Mode;
}
- else
+ else
{
smsLog(pMac, LOGW, " Can not find match phy mode");
//force it
@@ -2870,7 +2872,7 @@ eHalStatus csrRoamPrepareBssConfig(tpAniSirGlobal pMac, tCsrRoamProfile *pProfil
pBssConfig->qosType = eCSR_MEDIUM_ACCESS_DCF;
}
- if (((pBssConfig->uCfgDot11Mode == eCSR_CFG_DOT11_MODE_11N) ||
+ if (((pBssConfig->uCfgDot11Mode == eCSR_CFG_DOT11_MODE_11N) ||
(pBssConfig->uCfgDot11Mode == eCSR_CFG_DOT11_MODE_11AC)) &&
((pBssConfig->qosType != eCSR_MEDIUM_ACCESS_WMM_eDCF_DSCP) ||
(pBssConfig->qosType != eCSR_MEDIUM_ACCESS_11e_HCF) ||
@@ -2882,7 +2884,7 @@ eHalStatus csrRoamPrepareBssConfig(tpAniSirGlobal pMac, tCsrRoamProfile *pProfil
}
//auth type
- switch( pProfile->negotiatedAuthType )
+ switch( pProfile->negotiatedAuthType )
{
default:
case eCSR_AUTH_TYPE_WPA:
@@ -2910,7 +2912,7 @@ eHalStatus csrRoamPrepareBssConfig(tpAniSirGlobal pMac, tCsrRoamProfile *pProfil
if(pBssConfig->BssCap.ibss)
{
//We don't support 11h on IBSS
- pBssConfig->f11hSupport = eANI_BOOLEAN_FALSE;
+ pBssConfig->f11hSupport = eANI_BOOLEAN_FALSE;
}
else
{
@@ -2921,21 +2923,21 @@ eHalStatus csrRoamPrepareBssConfig(tpAniSirGlobal pMac, tCsrRoamProfile *pProfil
//heartbeat
if ( CSR_IS_11A_BSS( pBssDesc ) )
{
- pBssConfig->uHeartBeatThresh = pMac->roam.configParam.HeartbeatThresh50;
+ pBssConfig->uHeartBeatThresh = pMac->roam.configParam.HeartbeatThresh50;
}
else
{
pBssConfig->uHeartBeatThresh = pMac->roam.configParam.HeartbeatThresh24;
}
//Join timeout
- // if we find a BeaconInterval in the BssDescription, then set the Join Timeout to
- // be 10 x the BeaconInterval.
+ // if we find a BeaconInterval in the BssDescription, then set the Join Timeout to
+ // be 10 x the BeaconInterval.
if ( pBssDesc->beaconInterval )
{
//Make sure it is bigger than the minimal
pBssConfig->uJoinTimeOut = CSR_ROAM_MAX(10 * pBssDesc->beaconInterval, CSR_JOIN_FAILURE_TIMEOUT_MIN);
}
- else
+ else
{
pBssConfig->uJoinTimeOut = CSR_JOIN_FAILURE_TIMEOUT_DEFAULT;
}
@@ -2945,11 +2947,11 @@ eHalStatus csrRoamPrepareBssConfig(tpAniSirGlobal pMac, tCsrRoamProfile *pProfil
return (status);
}
-static eHalStatus csrRoamPrepareBssConfigFromProfile(tpAniSirGlobal pMac, tCsrRoamProfile *pProfile,
+static eHalStatus csrRoamPrepareBssConfigFromProfile(tpAniSirGlobal pMac, tCsrRoamProfile *pProfile,
tBssConfigParam *pBssConfig, tSirBssDescription *pBssDesc)
{
eHalStatus status = eHAL_STATUS_SUCCESS;
- tANI_U8 operationChannel = 0;
+ tANI_U8 operationChannel = 0;
tANI_U8 qAPisEnabled = FALSE;
//SSID
pBssConfig->SSID.length = 0;
@@ -2982,11 +2984,11 @@ static eHalStatus csrRoamPrepareBssConfigFromProfile(tpAniSirGlobal pMac, tCsrRo
{
operationChannel = pProfile->ChannelInfo.ChannelList[0];
}
- pBssConfig->uCfgDot11Mode = csrRoamGetPhyModeBandForBss(pMac, pProfile, operationChannel,
+ pBssConfig->uCfgDot11Mode = csrRoamGetPhyModeBandForBss(pMac, pProfile, operationChannel,
&pBssConfig->eBand);
//QOS
//Is this correct to always set to this //***
- if ( pBssConfig->BssCap.ess == 1 )
+ if ( pBssConfig->BssCap.ess == 1 )
{
/*For Softap case enable WMM*/
if(CSR_IS_INFRA_AP(pProfile) && (eCsrRoamWmmNoQos != pMac->roam.configParam.WMMSupportMode )){
@@ -3010,7 +3012,7 @@ static eHalStatus csrRoamPrepareBssConfigFromProfile(tpAniSirGlobal pMac, tCsrRo
} else {
pBssConfig->qosType = eCSR_MEDIUM_ACCESS_DCF;
}
-
+
//auth type
switch( pProfile->AuthType.authType[0] ) //Take the preferred Auth type.
{
@@ -3043,7 +3045,7 @@ static eHalStatus csrRoamPrepareBssConfigFromProfile(tpAniSirGlobal pMac, tCsrRo
//heartbeat
if ( eCSR_BAND_5G == pBssConfig->eBand )
{
- pBssConfig->uHeartBeatThresh = pMac->roam.configParam.HeartbeatThresh50;
+ pBssConfig->uHeartBeatThresh = pMac->roam.configParam.HeartbeatThresh50;
}
else
{
@@ -3058,13 +3060,13 @@ static eHalStatus csrRoamGetQosInfoFromBss(tpAniSirGlobal pMac, tSirBssDescripti
{
eHalStatus status = eHAL_STATUS_FAILURE;
tDot11fBeaconIEs *pIes = NULL;
-
+
do
{
if(!HAL_STATUS_SUCCESS(csrGetParsedBssDescriptionIEs(pMac, pBssDesc, &pIes)))
{
//err msg
- VOS_TRACE(VOS_MODULE_ID_SME, VOS_TRACE_LEVEL_ERROR,
+ VOS_TRACE(VOS_MODULE_ID_SME, VOS_TRACE_LEVEL_ERROR,
"csrRoamGetQosInfoFromBss() failed");
break;
}
@@ -3079,8 +3081,8 @@ static eHalStatus csrRoamGetQosInfoFromBss(tpAniSirGlobal pMac, tSirBssDescripti
void csrSetCfgPrivacy( tpAniSirGlobal pMac, tCsrRoamProfile *pProfile, tANI_BOOLEAN fPrivacy )
{
- // !! Note: the only difference between this function and the csrSetCfgPrivacyFromProfile() is the
- // setting of the privacy CFG based on the advertised privacy setting from the AP for WPA associations.
+ // !! Note: the only difference between this function and the csrSetCfgPrivacyFromProfile() is the
+ // setting of the privacy CFG based on the advertised privacy setting from the AP for WPA associations.
// See !!Note: below in this function...
tANI_U32 PrivacyEnabled = 0;
tANI_U32 RsnEnabled = 0;
@@ -3090,45 +3092,45 @@ void csrSetCfgPrivacy( tpAniSirGlobal pMac, tCsrRoamProfile *pProfile, tANI_BOOL
tANI_U32 Key1Length = 0;
tANI_U32 Key2Length = 0;
tANI_U32 Key3Length = 0;
-
- // Reserve for the biggest key
+
+ // Reserve for the biggest key
tANI_U8 Key0[ WNI_CFG_WEP_DEFAULT_KEY_1_LEN ];
tANI_U8 Key1[ WNI_CFG_WEP_DEFAULT_KEY_2_LEN ];
tANI_U8 Key2[ WNI_CFG_WEP_DEFAULT_KEY_3_LEN ];
tANI_U8 Key3[ WNI_CFG_WEP_DEFAULT_KEY_4_LEN ];
-
+
switch ( pProfile->negotiatedUCEncryptionType )
{
case eCSR_ENCRYPT_TYPE_NONE:
-
+
// for NO encryption, turn off Privacy and Rsn.
- PrivacyEnabled = 0;
+ PrivacyEnabled = 0;
RsnEnabled = 0;
-
+
// WEP key length and Wep Default Key ID don't matter in this case....
-
+
// clear out the WEP keys that may be hanging around.
Key0Length = 0;
Key1Length = 0;
Key2Length = 0;
Key3Length = 0;
-
+
break;
-
+
case eCSR_ENCRYPT_TYPE_WEP40_STATICKEY:
case eCSR_ENCRYPT_TYPE_WEP40:
-
+
// Privacy is ON. NO RSN for Wep40 static key.
- PrivacyEnabled = 1;
+ PrivacyEnabled = 1;
RsnEnabled = 0;
-
+
// Set the Wep default key ID.
WepDefaultKeyId = pProfile->Keys.defaultIndex;
// Wep key size if 5 bytes (40 bits).
- WepKeyLength = WNI_CFG_WEP_KEY_LENGTH_5;
-
+ WepKeyLength = WNI_CFG_WEP_KEY_LENGTH_5;
+
// set encryption keys in the CFG database or clear those that are not present in this profile.
- if ( pProfile->Keys.KeyLength[0] )
+ if ( pProfile->Keys.KeyLength[0] )
{
palCopyMemory( pMac->hHdd, Key0, pProfile->Keys.KeyMaterial[0], WNI_CFG_WEP_KEY_LENGTH_5 );
Key0Length = WNI_CFG_WEP_KEY_LENGTH_5;
@@ -3137,8 +3139,8 @@ void csrSetCfgPrivacy( tpAniSirGlobal pMac, tCsrRoamProfile *pProfile, tANI_BOOL
{
Key0Length = 0;
}
-
- if ( pProfile->Keys.KeyLength[1] )
+
+ if ( pProfile->Keys.KeyLength[1] )
{
palCopyMemory( pMac->hHdd, Key1, pProfile->Keys.KeyMaterial[1], WNI_CFG_WEP_KEY_LENGTH_5 );
Key1Length = WNI_CFG_WEP_KEY_LENGTH_5;
@@ -3147,43 +3149,43 @@ void csrSetCfgPrivacy( tpAniSirGlobal pMac, tCsrRoamProfile *pProfile, tANI_BOOL
{
Key1Length = 0;
}
-
- if ( pProfile->Keys.KeyLength[2] )
+
+ if ( pProfile->Keys.KeyLength[2] )
{
palCopyMemory( pMac->hHdd, Key2, pProfile->Keys.KeyMaterial[2], WNI_CFG_WEP_KEY_LENGTH_5 );
- Key2Length = WNI_CFG_WEP_KEY_LENGTH_5;
+ Key2Length = WNI_CFG_WEP_KEY_LENGTH_5;
}
else
{
Key2Length = 0;
}
-
- if ( pProfile->Keys.KeyLength[3] )
+
+ if ( pProfile->Keys.KeyLength[3] )
{
palCopyMemory( pMac->hHdd, Key3, pProfile->Keys.KeyMaterial[3], WNI_CFG_WEP_KEY_LENGTH_5 );
- Key3Length = WNI_CFG_WEP_KEY_LENGTH_5;
+ Key3Length = WNI_CFG_WEP_KEY_LENGTH_5;
}
else
{
Key3Length = 0;
- }
+ }
break;
-
+
case eCSR_ENCRYPT_TYPE_WEP104_STATICKEY:
case eCSR_ENCRYPT_TYPE_WEP104:
-
+
// Privacy is ON. NO RSN for Wep40 static key.
- PrivacyEnabled = 1;
+ PrivacyEnabled = 1;
RsnEnabled = 0;
-
+
// Set the Wep default key ID.
WepDefaultKeyId = pProfile->Keys.defaultIndex;
-
+
// Wep key size if 13 bytes (104 bits).
WepKeyLength = WNI_CFG_WEP_KEY_LENGTH_13;
-
+
// set encryption keys in the CFG database or clear those that are not present in this profile.
- if ( pProfile->Keys.KeyLength[0] )
+ if ( pProfile->Keys.KeyLength[0] )
{
palCopyMemory( pMac->hHdd, Key0, pProfile->Keys.KeyMaterial[ 0 ], WNI_CFG_WEP_KEY_LENGTH_13 );
Key0Length = WNI_CFG_WEP_KEY_LENGTH_13;
@@ -3192,8 +3194,8 @@ void csrSetCfgPrivacy( tpAniSirGlobal pMac, tCsrRoamProfile *pProfile, tANI_BOOL
{
Key0Length = 0;
}
-
- if ( pProfile->Keys.KeyLength[1] )
+
+ if ( pProfile->Keys.KeyLength[1] )
{
palCopyMemory( pMac->hHdd, Key1, pProfile->Keys.KeyMaterial[ 1 ], WNI_CFG_WEP_KEY_LENGTH_13 );
Key1Length = WNI_CFG_WEP_KEY_LENGTH_13;
@@ -3202,8 +3204,8 @@ void csrSetCfgPrivacy( tpAniSirGlobal pMac, tCsrRoamProfile *pProfile, tANI_BOOL
{
Key1Length = 0;
}
-
- if ( pProfile->Keys.KeyLength[2] )
+
+ if ( pProfile->Keys.KeyLength[2] )
{
palCopyMemory( pMac->hHdd, Key2, pProfile->Keys.KeyMaterial[ 2 ], WNI_CFG_WEP_KEY_LENGTH_13 );
Key2Length = WNI_CFG_WEP_KEY_LENGTH_13;
@@ -3212,8 +3214,8 @@ void csrSetCfgPrivacy( tpAniSirGlobal pMac, tCsrRoamProfile *pProfile, tANI_BOOL
{
Key2Length = 0;
}
-
- if ( pProfile->Keys.KeyLength[3] )
+
+ if ( pProfile->Keys.KeyLength[3] )
{
palCopyMemory( pMac->hHdd, Key3, pProfile->Keys.KeyMaterial[ 3 ], WNI_CFG_WEP_KEY_LENGTH_13 );
Key3Length = WNI_CFG_WEP_KEY_LENGTH_13;
@@ -3222,36 +3224,36 @@ void csrSetCfgPrivacy( tpAniSirGlobal pMac, tCsrRoamProfile *pProfile, tANI_BOOL
{
Key3Length = 0;
}
-
+
break;
-
+
case eCSR_ENCRYPT_TYPE_TKIP:
case eCSR_ENCRYPT_TYPE_AES:
#ifdef FEATURE_WLAN_WAPI
case eCSR_ENCRYPT_TYPE_WPI:
#endif /* FEATURE_WLAN_WAPI */
// !! Note: this is the only difference between this function and the csrSetCfgPrivacyFromProfile()
- // (setting of the privacy CFG based on the advertised privacy setting from the AP for WPA/WAPI associations ).
+ // (setting of the privacy CFG based on the advertised privacy setting from the AP for WPA/WAPI associations ).
PrivacyEnabled = (0 != fPrivacy);
-
- // turn on RSN enabled for WPA associations
+
+ // turn on RSN enabled for WPA associations
RsnEnabled = 1;
-
+
// WEP key length and Wep Default Key ID don't matter in this case....
-
+
// clear out the static WEP keys that may be hanging around.
Key0Length = 0;
Key1Length = 0;
Key2Length = 0;
- Key3Length = 0;
-
- break;
+ Key3Length = 0;
+
+ break;
default:
PrivacyEnabled = 0;
RsnEnabled = 0;
- break;
- }
-
+ break;
+ }
+
ccmCfgSetInt(pMac, WNI_CFG_PRIVACY_ENABLED, PrivacyEnabled, NULL, eANI_BOOLEAN_FALSE);
ccmCfgSetInt(pMac, WNI_CFG_RSN_ENABLED, RsnEnabled, NULL, eANI_BOOLEAN_FALSE);
ccmCfgSetStr(pMac, WNI_CFG_WEP_DEFAULT_KEY_1, Key0, Key0Length, NULL, eANI_BOOLEAN_FALSE);
@@ -3322,7 +3324,7 @@ static eHalStatus csrGetRateSet( tpAniSirGlobal pMac, tCsrRoamProfile *pProfile
palZeroMemory(pMac->hHdd, pOpRateSet, sizeof(tSirMacRateSet));
palZeroMemory(pMac->hHdd, pExRateSet, sizeof(tSirMacRateSet));
VOS_ASSERT( pIes != NULL );
-
+
if( NULL != pIes )
{
csrIsPhyModeMatch( pMac, phyMode, pBssDesc, pProfile, &cfgDot11Mode, pIes );
@@ -3338,16 +3340,16 @@ static eHalStatus csrGetRateSet( tpAniSirGlobal pMac, tCsrRoamProfile *pProfile
pDstRate = pOpRateSet->rate;
if(pIes->SuppRates.present)
{
- for ( i = 0; i < pIes->SuppRates.num_rates; i++ )
+ for ( i = 0; i < pIes->SuppRates.num_rates; i++ )
{
- if ( csrRatesIsDot11RateSupported( pMac, pIes->SuppRates.rates[ i ] ) )
+ if ( csrRatesIsDot11RateSupported( pMac, pIes->SuppRates.rates[ i ] ) )
{
*pDstRate++ = pIes->SuppRates.rates[ i ];
pOpRateSet->numRates++;
}
}
}
- if ( eCSR_CFG_DOT11_MODE_11G == cfgDot11Mode ||
+ if ( eCSR_CFG_DOT11_MODE_11G == cfgDot11Mode ||
eCSR_CFG_DOT11_MODE_11N == cfgDot11Mode ||
eCSR_CFG_DOT11_MODE_TAURUS == cfgDot11Mode ||
eCSR_CFG_DOT11_MODE_ABG == cfgDot11Mode )
@@ -3358,9 +3360,9 @@ static eHalStatus csrGetRateSet( tpAniSirGlobal pMac, tCsrRoamProfile *pProfile
pDstRate = pExRateSet->rate;
if(pIes->ExtSuppRates.present)
{
- for ( i = 0; i < pIes->ExtSuppRates.num_rates; i++ )
+ for ( i = 0; i < pIes->ExtSuppRates.num_rates; i++ )
{
- if ( csrRatesIsDot11RateSupported( pMac, pIes->ExtSuppRates.rates[ i ] ) )
+ if ( csrRatesIsDot11RateSupported( pMac, pIes->ExtSuppRates.rates[ i ] ) )
{
*pDstRate++ = pIes->ExtSuppRates.rates[ i ];
pExRateSet->numRates++;
@@ -3376,7 +3378,7 @@ static eHalStatus csrGetRateSet( tpAniSirGlobal pMac, tCsrRoamProfile *pProfile
if (pOpRateSet->numRates > 0 || pExRateSet->numRates > 0) status = eHAL_STATUS_SUCCESS;
return status;
}
-
+
static void csrSetCfgRateSet( tpAniSirGlobal pMac, eCsrPhyMode phyMode, tCsrRoamProfile *pProfile,
tSirBssDescription *pBssDesc, tDot11fBeaconIEs *pIes)
{
@@ -3408,7 +3410,7 @@ static void csrSetCfgRateSet( tpAniSirGlobal pMac, eCsrPhyMode phyMode, tCsrRoam
pDstRate = OperationalRates;
if(pIes->SuppRates.present)
{
- for ( i = 0; i < pIes->SuppRates.num_rates; i++ )
+ for ( i = 0; i < pIes->SuppRates.num_rates; i++ )
{
if ( csrRatesIsDot11RateSupported( pMac, pIes->SuppRates.rates[ i ] ) &&
( OperationalRatesLength < CSR_DOT11_SUPPORTED_RATES_MAX ))
@@ -3418,7 +3420,7 @@ static void csrSetCfgRateSet( tpAniSirGlobal pMac, eCsrPhyMode phyMode, tCsrRoam
}
}
}
- if ( eCSR_CFG_DOT11_MODE_11G == cfgDot11Mode ||
+ if ( eCSR_CFG_DOT11_MODE_11G == cfgDot11Mode ||
eCSR_CFG_DOT11_MODE_11N == cfgDot11Mode ||
eCSR_CFG_DOT11_MODE_TAURUS == cfgDot11Mode ||
eCSR_CFG_DOT11_MODE_ABG == cfgDot11Mode )
@@ -3429,7 +3431,7 @@ static void csrSetCfgRateSet( tpAniSirGlobal pMac, eCsrPhyMode phyMode, tCsrRoam
pDstRate = ExtendedOperationalRates;
if(pIes->ExtSuppRates.present)
{
- for ( i = 0; i < pIes->ExtSuppRates.num_rates; i++ )
+ for ( i = 0; i < pIes->ExtSuppRates.num_rates; i++ )
{
if ( csrRatesIsDot11RateSupported( pMac, pIes->ExtSuppRates.rates[ i ] ) &&
( ExtendedOperationalRatesLength < CSR_DOT11_EXTENDED_SUPPORTED_RATES_MAX ))
@@ -3454,7 +3456,7 @@ static void csrSetCfgRateSet( tpAniSirGlobal pMac, eCsrPhyMode phyMode, tCsrRoam
// set with any proprietary rates we found in the beacon, only if user
// allows them...
if ( PropRatesEnable && pIes->Airgo.PropSuppRates.present &&
- ( pIes->Airgo.PropSuppRates.num_rates > 0 ))
+ ( pIes->Airgo.PropSuppRates.num_rates > 0 ))
{
ProprietaryOperationalRatesLength = pIes->Airgo.PropSuppRates.num_rates;
if ( ProprietaryOperationalRatesLength > sizeof(ProprietaryOperationalRates) )
@@ -3481,16 +3483,16 @@ static void csrSetCfgRateSet( tpAniSirGlobal pMac, eCsrPhyMode phyMode, tCsrRoam
}
}
// Set the operational rate set CFG variables...
- ccmCfgSetStr(pMac, WNI_CFG_OPERATIONAL_RATE_SET, OperationalRates,
+ ccmCfgSetStr(pMac, WNI_CFG_OPERATIONAL_RATE_SET, OperationalRates,
OperationalRatesLength, NULL, eANI_BOOLEAN_FALSE);
- ccmCfgSetStr(pMac, WNI_CFG_EXTENDED_OPERATIONAL_RATE_SET, ExtendedOperationalRates,
+ ccmCfgSetStr(pMac, WNI_CFG_EXTENDED_OPERATIONAL_RATE_SET, ExtendedOperationalRates,
ExtendedOperationalRatesLength, NULL, eANI_BOOLEAN_FALSE);
- ccmCfgSetStr(pMac, WNI_CFG_PROPRIETARY_OPERATIONAL_RATE_SET,
- ProprietaryOperationalRates,
+ ccmCfgSetStr(pMac, WNI_CFG_PROPRIETARY_OPERATIONAL_RATE_SET,
+ ProprietaryOperationalRates,
ProprietaryOperationalRatesLength, NULL, eANI_BOOLEAN_FALSE);
ccmCfgSetInt(pMac, WNI_CFG_PROPRIETARY_ANI_FEATURES_ENABLED, PropRatesEnable, NULL, eANI_BOOLEAN_FALSE);
- ccmCfgSetStr(pMac, WNI_CFG_CURRENT_MCS_SET, MCSRateIdxSet,
- MCSRateLength, NULL, eANI_BOOLEAN_FALSE);
+ ccmCfgSetStr(pMac, WNI_CFG_CURRENT_MCS_SET, MCSRateIdxSet,
+ MCSRateLength, NULL, eANI_BOOLEAN_FALSE);
}//Parsing BSSDesc
else
{
@@ -3501,25 +3503,25 @@ static void csrSetCfgRateSet( tpAniSirGlobal pMac, eCsrPhyMode phyMode, tCsrRoam
static void csrSetCfgRateSetFromProfile( tpAniSirGlobal pMac,
tCsrRoamProfile *pProfile )
{
- tSirMacRateSetIE DefaultSupportedRates11a = { SIR_MAC_RATESET_EID,
- { 8,
- { SIR_MAC_RATE_6,
- SIR_MAC_RATE_9,
- SIR_MAC_RATE_12,
+ tSirMacRateSetIE DefaultSupportedRates11a = { SIR_MAC_RATESET_EID,
+ { 8,
+ { SIR_MAC_RATE_6,
+ SIR_MAC_RATE_9,
+ SIR_MAC_RATE_12,
SIR_MAC_RATE_18,
SIR_MAC_RATE_24,
SIR_MAC_RATE_36,
SIR_MAC_RATE_48,
SIR_MAC_RATE_54 } } };
- tSirMacRateSetIE DefaultSupportedRates11b = { SIR_MAC_RATESET_EID,
- { 4,
- { SIR_MAC_RATE_1,
- SIR_MAC_RATE_2,
- SIR_MAC_RATE_5_5,
+ tSirMacRateSetIE DefaultSupportedRates11b = { SIR_MAC_RATESET_EID,
+ { 4,
+ { SIR_MAC_RATE_1,
+ SIR_MAC_RATE_2,
+ SIR_MAC_RATE_5_5,
SIR_MAC_RATE_11 } } };
-
-
- tSirMacPropRateSet DefaultSupportedPropRates = { 3,
+
+
+ tSirMacPropRateSet DefaultSupportedPropRates = { 3,
{ SIR_MAC_RATE_72,
SIR_MAC_RATE_96,
SIR_MAC_RATE_108 } };
@@ -3532,106 +3534,106 @@ static void csrSetCfgRateSetFromProfile( tpAniSirGlobal pMac,
tANI_U8 ProprietaryOperationalRates[ 4 ]; // leave enough room for the max number of proprietary rates
tANI_U32 ProprietaryOperationalRatesLength = 0;
tANI_U32 PropRatesEnable = 0;
- tANI_U8 operationChannel = 0;
+ tANI_U8 operationChannel = 0;
if(pProfile->ChannelInfo.ChannelList)
{
operationChannel = pProfile->ChannelInfo.ChannelList[0];
}
cfgDot11Mode = csrRoamGetPhyModeBandForBss( pMac, pProfile, operationChannel, &eBand );
- // For 11a networks, the 11a rates go into the Operational Rate set. For 11b and 11g
+ // For 11a networks, the 11a rates go into the Operational Rate set. For 11b and 11g
// networks, the 11b rates appear in the Operational Rate set. In either case,
- // we can blindly put the rates we support into our Operational Rate set
- // (including the basic rates, which we have already verified are supported
+ // we can blindly put the rates we support into our Operational Rate set
+ // (including the basic rates, which we have already verified are supported
// earlier in the roaming decision).
- if ( eCSR_BAND_5G == eBand )
- {
- // 11a rates into the Operational Rate Set.
+ if ( eCSR_BAND_5G == eBand )
+ {
+ // 11a rates into the Operational Rate Set.
OperationalRatesLength = DefaultSupportedRates11a.supportedRateSet.numRates *
sizeof(*DefaultSupportedRates11a.supportedRateSet.rate);
- palCopyMemory( pMac->hHdd, OperationalRates,
- DefaultSupportedRates11a.supportedRateSet.rate,
+ palCopyMemory( pMac->hHdd, OperationalRates,
+ DefaultSupportedRates11a.supportedRateSet.rate,
OperationalRatesLength );
-
+
// Nothing in the Extended rate set.
ExtendedOperationalRatesLength = 0;
// populate proprietary rates if user allows them
- if ( pMac->roam.configParam.ProprietaryRatesEnabled )
+ if ( pMac->roam.configParam.ProprietaryRatesEnabled )
{
- ProprietaryOperationalRatesLength = DefaultSupportedPropRates.numPropRates *
- sizeof(*DefaultSupportedPropRates.propRate);
+ ProprietaryOperationalRatesLength = DefaultSupportedPropRates.numPropRates *
+ sizeof(*DefaultSupportedPropRates.propRate);
palCopyMemory( pMac->hHdd, ProprietaryOperationalRates,
- DefaultSupportedPropRates.propRate,
+ DefaultSupportedPropRates.propRate,
ProprietaryOperationalRatesLength );
- }
- else
- {
+ }
+ else
+ {
// No proprietary modes
- ProprietaryOperationalRatesLength = 0;
- }
- }
- else if ( eCSR_CFG_DOT11_MODE_11B == cfgDot11Mode )
- {
- // 11b rates into the Operational Rate Set.
+ ProprietaryOperationalRatesLength = 0;
+ }
+ }
+ else if ( eCSR_CFG_DOT11_MODE_11B == cfgDot11Mode )
+ {
+ // 11b rates into the Operational Rate Set.
OperationalRatesLength = DefaultSupportedRates11b.supportedRateSet.numRates *
sizeof(*DefaultSupportedRates11b.supportedRateSet.rate);
- palCopyMemory( pMac->hHdd, OperationalRates,
- DefaultSupportedRates11b.supportedRateSet.rate,
+ palCopyMemory( pMac->hHdd, OperationalRates,
+ DefaultSupportedRates11b.supportedRateSet.rate,
OperationalRatesLength );
// Nothing in the Extended rate set.
ExtendedOperationalRatesLength = 0;
// No proprietary modes
ProprietaryOperationalRatesLength = 0;
- }
- else
- {
+ }
+ else
+ {
// 11G
-
- // 11b rates into the Operational Rate Set.
- OperationalRatesLength = DefaultSupportedRates11b.supportedRateSet.numRates *
+
+ // 11b rates into the Operational Rate Set.
+ OperationalRatesLength = DefaultSupportedRates11b.supportedRateSet.numRates *
sizeof(*DefaultSupportedRates11b.supportedRateSet.rate);
- palCopyMemory( pMac->hHdd, OperationalRates,
- DefaultSupportedRates11b.supportedRateSet.rate,
+ palCopyMemory( pMac->hHdd, OperationalRates,
+ DefaultSupportedRates11b.supportedRateSet.rate,
OperationalRatesLength );
-
+
// 11a rates go in the Extended rate set.
- ExtendedOperationalRatesLength = DefaultSupportedRates11a.supportedRateSet.numRates *
+ ExtendedOperationalRatesLength = DefaultSupportedRates11a.supportedRateSet.numRates *
sizeof(*DefaultSupportedRates11a.supportedRateSet.rate);
- palCopyMemory( pMac->hHdd, ExtendedOperationalRates,
- DefaultSupportedRates11a.supportedRateSet.rate,
+ palCopyMemory( pMac->hHdd, ExtendedOperationalRates,
+ DefaultSupportedRates11a.supportedRateSet.rate,
ExtendedOperationalRatesLength );
-
+
// populate proprietary rates if user allows them
- if ( pMac->roam.configParam.ProprietaryRatesEnabled )
+ if ( pMac->roam.configParam.ProprietaryRatesEnabled )
{
ProprietaryOperationalRatesLength = DefaultSupportedPropRates.numPropRates *
- sizeof(*DefaultSupportedPropRates.propRate);
- palCopyMemory( pMac->hHdd, ProprietaryOperationalRates,
- DefaultSupportedPropRates.propRate,
+ sizeof(*DefaultSupportedPropRates.propRate);
+ palCopyMemory( pMac->hHdd, ProprietaryOperationalRates,
+ DefaultSupportedPropRates.propRate,
ProprietaryOperationalRatesLength );
- }
- else
- {
+ }
+ else
+ {
// No proprietary modes
- ProprietaryOperationalRatesLength = 0;
- }
- }
+ ProprietaryOperationalRatesLength = 0;
+ }
+ }
// set this to 1 if prop. rates need to be advertised in to the IBSS beacon and user wants to use them
- if ( ProprietaryOperationalRatesLength && pMac->roam.configParam.ProprietaryRatesEnabled )
+ if ( ProprietaryOperationalRatesLength && pMac->roam.configParam.ProprietaryRatesEnabled )
{
- PropRatesEnable = 1;
+ PropRatesEnable = 1;
}
- else
+ else
{
- PropRatesEnable = 0;
+ PropRatesEnable = 0;
}
-
+
// Set the operational rate set CFG variables...
- ccmCfgSetStr(pMac, WNI_CFG_OPERATIONAL_RATE_SET, OperationalRates,
+ ccmCfgSetStr(pMac, WNI_CFG_OPERATIONAL_RATE_SET, OperationalRates,
OperationalRatesLength, NULL, eANI_BOOLEAN_FALSE);
- ccmCfgSetStr(pMac, WNI_CFG_EXTENDED_OPERATIONAL_RATE_SET, ExtendedOperationalRates,
+ ccmCfgSetStr(pMac, WNI_CFG_EXTENDED_OPERATIONAL_RATE_SET, ExtendedOperationalRates,
ExtendedOperationalRatesLength, NULL, eANI_BOOLEAN_FALSE);
- ccmCfgSetStr(pMac, WNI_CFG_PROPRIETARY_OPERATIONAL_RATE_SET,
- ProprietaryOperationalRates,
+ ccmCfgSetStr(pMac, WNI_CFG_PROPRIETARY_OPERATIONAL_RATE_SET,
+ ProprietaryOperationalRates,
ProprietaryOperationalRatesLength, NULL, eANI_BOOLEAN_FALSE);
ccmCfgSetInt(pMac, WNI_CFG_PROPRIETARY_ANI_FEATURES_ENABLED, PropRatesEnable, NULL, eANI_BOOLEAN_FALSE);
}
@@ -3671,8 +3673,8 @@ tANI_U32 csrRoamGetPhyModeFromDot11Mode(eCsrCfgDot11Mode dot11Mode, eCsrBand ban
}
return (WNI_CFG_PHY_MODE_11A);
}
-
-
+
+
#ifdef WLAN_FEATURE_11AC
ePhyChanBondState csrGetHTCBStateFromVHTCBState(ePhyChanBondState aniCBMode)
{
@@ -3727,7 +3729,7 @@ eHalStatus csrRoamSetBssConfigCfg(tpAniSirGlobal pMac, tANI_U32 sessionId, tCsrR
//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);
//encryption type
@@ -3775,7 +3777,7 @@ eHalStatus csrRoamSetBssConfigCfg(tpAniSirGlobal pMac, tANI_U32 sessionId, tCsrR
if(!WDA_getFwWlanFeatCaps(DOT11AC)) {
cfgCb = csrGetHTCBStateFromVHTCBState(cfgCb);
}
- else
+ else
{
ccmCfgSetInt(pMac, WNI_CFG_VHT_CHANNEL_WIDTH, pMac->roam.configParam.nVhtChannelWidth, NULL, eANI_BOOLEAN_FALSE);
}
@@ -3801,20 +3803,20 @@ eHalStatus csrRoamSetBssConfigCfg(tpAniSirGlobal pMac, tANI_U32 sessionId, tCsrR
return (status);
}
-eHalStatus csrRoamStopNetwork( tpAniSirGlobal pMac, tANI_U32 sessionId, tCsrRoamProfile *pProfile,
+eHalStatus csrRoamStopNetwork( tpAniSirGlobal pMac, tANI_U32 sessionId, tCsrRoamProfile *pProfile,
tSirBssDescription *pBssDesc, tDot11fBeaconIEs *pIes)
{
eHalStatus status;
tBssConfigParam *pBssConfig;
tCsrRoamSession *pSession = CSR_GET_SESSION( pMac, sessionId );
-
+
if(!pSession)
{
smsLog(pMac, LOGE, FL(" session %d not found "), sessionId);
return eHAL_STATUS_FAILURE;
}
-
- status = palAllocateMemory(pMac->hHdd, (void **)&pBssConfig, sizeof(tBssConfigParam));
+
+ status = palAllocateMemory(pMac->hHdd, (void **)&pBssConfig, sizeof(tBssConfigParam));
if(HAL_STATUS_SUCCESS(status))
{
palZeroMemory(pMac->hHdd, pBssConfig, sizeof(tBssConfigParam));
@@ -3833,56 +3835,56 @@ eHalStatus csrRoamStopNetwork( tpAniSirGlobal pMac, tANI_U32 sessionId, tCsrRoam
}
// If we are in an IBSS, then stop the IBSS...
////Not worry about WDS connection for now
- if ( csrIsConnStateIbss( pMac, sessionId ) )
+ if ( csrIsConnStateIbss( pMac, sessionId ) )
{
status = csrRoamIssueStopBss( pMac, sessionId, eCSR_ROAM_SUBSTATE_DISCONNECT_CONTINUE_ROAMING );
}
- else
+ else
{
// if we are in an Infrastructure association....
- if ( csrIsConnStateInfra( pMac, sessionId ) )
+ if ( csrIsConnStateInfra( pMac, sessionId ) )
{
// and the new Bss is an Ibss OR we are roaming from Infra to Infra
- // across SSIDs (roaming to a new SSID)... //
+ // across SSIDs (roaming to a new SSID)... //
//Not worry about WDS connection for now
if ( pBssDesc && ( ( csrIsIbssBssDesc( pBssDesc ) ) ||
- !csrIsSsidEqual( pMac, pSession->pConnectBssDesc, pBssDesc, pIes ) ) )
+ !csrIsSsidEqual( pMac, pSession->pConnectBssDesc, pBssDesc, pIes ) ) )
{
// then we need to disassociate from the Infrastructure network...
- status = csrRoamIssueDisassociate( pMac, sessionId, eCSR_ROAM_SUBSTATE_DISCONNECT_CONTINUE_ROAMING, FALSE );
+ status = csrRoamIssueDisassociate( pMac, sessionId, eCSR_ROAM_SUBSTATE_DISCONNECT_CONTINUE_ROAMING, FALSE );
}
- else
- {
+ else
+ {
// In an Infrastucture and going to an Infrastructure network with the same SSID. This
// calls for a Reassociation sequence. So issue the CFG sets for this new AP.
- if ( pBssDesc )
+ if ( pBssDesc )
{
- // Set parameters for this Bss.
+ // Set parameters for this Bss.
status = csrRoamSetBssConfigCfg(pMac, sessionId, pProfile, pBssDesc, pBssConfig, pIes);
}
- }
+ }
}
- else
+ else
{
// Neiher in IBSS nor in Infra. We can go ahead and set the CFG for tne new network...
// Nothing to stop.
if ( pBssDesc || CSR_IS_WDS_AP( pProfile )
|| CSR_IS_INFRA_AP(pProfile)
- )
- {
- // Set parameters for this Bss.
+ )
+ {
+ // Set parameters for this Bss.
status = csrRoamSetBssConfigCfg(pMac, sessionId, pProfile, pBssDesc, pBssConfig, pIes);
- }
+ }
}
}
}//Success getting BSS config info
palFreeMemory(pMac->hHdd, pBssConfig);
}//Allocate memory
-
+
return (status);
}
-eCsrJoinState csrRoamJoin( tpAniSirGlobal pMac, tANI_U32 sessionId,
+eCsrJoinState csrRoamJoin( tpAniSirGlobal pMac, tANI_U32 sessionId,
tCsrScanResultInfo *pScanResult, tCsrRoamProfile *pProfile )
{
eCsrJoinState eRoamState = eCsrContinueRoaming;
@@ -3896,7 +3898,7 @@ eCsrJoinState csrRoamJoin( tpAniSirGlobal pMac, tANI_U32 sessionId,
smsLog(pMac, LOGE, FL(" session %d not found "), sessionId);
return (eCsrStopRoaming);
}
-
+
if( CSR_IS_WDS_STA( pProfile ) )
{
status = csrRoamStartWds( pMac, sessionId, pProfile, pBssDesc );
@@ -3912,20 +3914,20 @@ eCsrJoinState csrRoamJoin( tpAniSirGlobal pMac, tANI_U32 sessionId,
smsLog(pMac, LOGE, FL(" fail to parse IEs"));
return (eCsrStopRoaming);
}
- if ( csrIsInfraBssDesc( pBssDesc ) )
+ if ( csrIsInfraBssDesc( pBssDesc ) )
{
// If we are connected in infrastructure mode and the Join Bss description is for the same BssID, then we are
// attempting to join the AP we are already connected with. In that case, see if the Bss or Sta capabilities
// have changed and handle the changes (without disturbing the current association).
-
- if ( csrIsConnStateConnectedInfra(pMac, sessionId) &&
+
+ if ( csrIsConnStateConnectedInfra(pMac, sessionId) &&
csrIsBssIdEqual( pMac, pBssDesc, pSession->pConnectBssDesc ) &&
csrIsSsidEqual( pMac, pSession->pConnectBssDesc, pBssDesc, pIesLocal )
- )
- {
+ )
+ {
// Check to see if the Auth type has changed in the Profile. If so, we don't want to Reassociate
- // with Authenticating first. To force this, stop the current association (Disassociate) and
- // then re 'Join' the AP, wihch will force an Authentication (with the new Auth type) followed by
+ // 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, &pSession->connectedProfile, pProfile))
{
@@ -3959,18 +3961,18 @@ eCsrJoinState csrRoamJoin( tpAniSirGlobal pMac, tANI_U32 sessionId,
}
else
{
- if(!HAL_STATUS_SUCCESS(csrRoamIssueDisassociate( pMac, sessionId,
+ if(!HAL_STATUS_SUCCESS(csrRoamIssueDisassociate( pMac, sessionId,
eCSR_ROAM_SUBSTATE_DISASSOC_REQ, FALSE )))
{
smsLog(pMac, LOGW, FL(" fail to issue disassociate"));
eRoamState = eCsrStopRoaming;
- }
+ }
}
- }
- else
+ }
+ else
{
// note: we used to pre-auth here with open authentication networks but that was not working so well.
- // we had a lot of join timeouts when testing at Samsung. removing this step helped associations
+ // we had a lot of join timeouts when testing at Samsung. removing this step helped associations
// work much better.
//
//
@@ -3981,7 +3983,7 @@ eCsrJoinState csrRoamJoin( tpAniSirGlobal pMac, tANI_U32 sessionId,
}
}
}//Infra
- else
+ else
{
if(!HAL_STATUS_SUCCESS(csrRoamStopNetwork(pMac, sessionId, pProfile, pBssDesc, pIesLocal)))
{
@@ -3996,7 +3998,7 @@ eCsrJoinState csrRoamJoin( tpAniSirGlobal pMac, tANI_U32 sessionId,
return( eRoamState );
}
-eHalStatus csrRoamShouldRoam(tpAniSirGlobal pMac, tANI_U32 sessionId,
+eHalStatus csrRoamShouldRoam(tpAniSirGlobal pMac, tANI_U32 sessionId,
tSirBssDescription *pBssDesc, tANI_U32 roamId)
{
eHalStatus status = eHAL_STATUS_SUCCESS;
@@ -4029,10 +4031,10 @@ static void csrRoamAssignDefaultParam( tpAniSirGlobal pMac, tSmeCmd *pCommand )
pCommand->u.roamCmd.roamProfile.negotiatedAuthType = eCSR_AUTH_TYPE_AUTOSWITCH;
break;
}
- pCommand->u.roamCmd.roamProfile.negotiatedUCEncryptionType =
- pCommand->u.roamCmd.roamProfile.EncryptionType.encryptionType[0];
+ pCommand->u.roamCmd.roamProfile.negotiatedUCEncryptionType =
+ pCommand->u.roamCmd.roamProfile.EncryptionType.encryptionType[0];
//In this case, the multicast encryption needs to follow the uncast ones.
- pCommand->u.roamCmd.roamProfile.negotiatedMCEncryptionType =
+ pCommand->u.roamCmd.roamProfile.negotiatedMCEncryptionType =
pCommand->u.roamCmd.roamProfile.EncryptionType.encryptionType[0];
}
@@ -4067,23 +4069,23 @@ static eCsrJoinState csrRoamJoinNextBss( tpAniSirGlobal pMac, tSmeCmd *pCommand,
tCsrRoamInfo roamInfo, *pRoamInfo = NULL;
#ifndef WLAN_MDM_CODE_REDUCTION_OPT
v_U8_t acm_mask = 0;
-#endif
+#endif
tANI_U32 sessionId = pCommand->sessionId;
tCsrRoamSession *pSession = CSR_GET_SESSION( pMac, sessionId );
tCsrRoamProfile *pProfile = &pCommand->u.roamCmd.roamProfile;
tANI_U8 concurrentChannel = 0;
-
+
if(!pSession)
{
smsLog(pMac, LOGE, FL(" session %d not found "), sessionId);
return (eCsrStopRoaming);
}
-
- do
+
+ do
{
// Check for Cardbus eject condition, before trying to Roam to any BSS
//***if( !balIsCardPresent(pAdapter) ) break;
-
+
palZeroMemory(pMac->hHdd, &roamInfo, sizeof(roamInfo));
memcpy (&roamInfo.bssid, &pSession->joinFailStatusCode.bssId, sizeof(tSirMacAddr));
if(NULL != pBSSList)
@@ -4122,30 +4124,30 @@ static eCsrJoinState csrRoamJoinNextBss( tpAniSirGlobal pMac, tSmeCmd *pCommand,
pScanResult = GET_BASE_ADDR(pCommand->u.roamCmd.pRoamBssEntry, tCsrScanResult, Link);
/*If concurrency enabled take the concurrent connected channel first. */
/* Valid multichannel concurrent sessions exempted */
- if (vos_concurrent_sessions_running() &&
+ if (vos_concurrent_sessions_running() &&
!csrIsValidMcConcurrentSession(pMac, sessionId, &pScanResult->Result.BssDescriptor))
{
- concurrentChannel =
+ concurrentChannel =
csrGetConcurrentOperationChannel(pMac);
VOS_TRACE(VOS_MODULE_ID_SME, VOS_TRACE_LEVEL_INFO_HIGH, "%s: "
" csr Concurrent Channel = %d", __func__, concurrentChannel);
- if ((concurrentChannel) &&
- (concurrentChannel ==
+ if ((concurrentChannel) &&
+ (concurrentChannel ==
pScanResult->Result.BssDescriptor.channelId))
{
- //make this 0 because we do not want the
- //below check to pass as we don't want to
+ //make this 0 because we do not want the
+ //below check to pass as we don't want to
//connect on other channel
VOS_TRACE(VOS_MODULE_ID_SME, VOS_TRACE_LEVEL_INFO,
FL("Concurrent channel match =%d"),
concurrentChannel);
- concurrentChannel = 0;
+ concurrentChannel = 0;
}
}
if (!concurrentChannel)
{
-
+
if(HAL_STATUS_SUCCESS(csrRoamShouldRoam(pMac,
sessionId, &pScanResult->Result.BssDescriptor,
pCommand->u.roamCmd.roamId)))
@@ -4217,7 +4219,7 @@ static eCsrJoinState csrRoamJoinNextBss( tpAniSirGlobal pMac, tSmeCmd *pCommand,
CSR_IS_UAPSD_BSS(pIesLocal) )
{
#ifndef WLAN_MDM_CODE_REDUCTION_OPT
- acm_mask = sme_QosGetACMMask(pMac, &pScanResult->Result.BssDescriptor,
+ acm_mask = sme_QosGetACMMask(pMac, &pScanResult->Result.BssDescriptor,
pIesLocal);
pCommand->u.roamCmd.roamProfile.uapsd_mask &= ~(acm_mask);
#endif /* WLAN_MDM_CODE_REDUCTION_OPT*/
@@ -4237,13 +4239,13 @@ static eCsrJoinState csrRoamJoinNextBss( tpAniSirGlobal pMac, tSmeCmd *pCommand,
}
roamInfo.pProfile = pProfile;
pSession->bRefAssocStartCnt++;
- csrRoamCallCallback( pMac, sessionId, &roamInfo, pCommand->u.roamCmd.roamId,
+ csrRoamCallCallback( pMac, sessionId, &roamInfo, pCommand->u.roamCmd.roamId,
eCSR_ROAM_ASSOCIATION_START, eCSR_ROAM_RESULT_NONE );
}
- if ( NULL == pCommand->u.roamCmd.pRoamBssEntry )
+ if ( NULL == pCommand->u.roamCmd.pRoamBssEntry )
{
// If this is a start IBSS profile, then we need to start the IBSS.
- if ( CSR_IS_START_IBSS(pProfile) )
+ if ( CSR_IS_START_IBSS(pProfile) )
{
tANI_BOOLEAN fSameIbss = eANI_BOOLEAN_FALSE;
// Attempt to start this IBSS...
@@ -4251,7 +4253,7 @@ static eCsrJoinState csrRoamJoinNextBss( tpAniSirGlobal pMac, tSmeCmd *pCommand,
status = csrRoamStartIbss( pMac, sessionId, pProfile, &fSameIbss );
if(HAL_STATUS_SUCCESS(status))
{
- if ( fSameIbss )
+ if ( fSameIbss )
{
eRoamState = eCsrStartIbssSameIbss;
}
@@ -4279,21 +4281,21 @@ static eCsrJoinState csrRoamJoinNextBss( tpAniSirGlobal pMac, tSmeCmd *pCommand,
{
eRoamState = eCsrContinueRoaming;
}
- else
+ else
{
//it somehow fail need to stop
eRoamState = eCsrStopRoaming;
}
}
- else
+ else
{
//Nothing we can do
smsLog(pMac, LOGW, FL("cannot continue without BSS list"));
eRoamState = eCsrStopRoaming;
break;
}
- }
- else //We have BSS
+ }
+ else //We have BSS
{
//Need to assign these value because they are used in csrIsSameProfile
pScanResult = GET_BASE_ADDR(pCommand->u.roamCmd.pRoamBssEntry, tCsrScanResult, Link);
@@ -4306,7 +4308,7 @@ static eCsrJoinState csrRoamJoinNextBss( tpAniSirGlobal pMac, tSmeCmd *pCommand,
{
eRoamState = eCsrStartIbssSameIbss;
break;
- }
+ }
}
if( pCommand->u.roamCmd.fReassocToSelfNoCapChange )
{
@@ -4319,7 +4321,7 @@ static eCsrJoinState csrRoamJoinNextBss( tpAniSirGlobal pMac, tSmeCmd *pCommand,
eRoamState = csrRoamJoin( pMac, sessionId, &pScanResult->Result, pProfile );
break;
}
-
+
} while( 0 );
if( (eCsrStopRoaming == eRoamState) && (CSR_IS_INFRASTRUCTURE( pProfile )) )
{
@@ -4329,8 +4331,8 @@ static eCsrJoinState csrRoamJoinNextBss( tpAniSirGlobal pMac, tSmeCmd *pCommand,
pSession->bRefAssocStartCnt--;
//Complete the last association attemp because a new one is about to be tried
pRoamInfo = &roamInfo;
- csrRoamCallCallback(pMac, sessionId, pRoamInfo, pCommand->u.roamCmd.roamId,
- eCSR_ROAM_ASSOCIATION_COMPLETION,
+ csrRoamCallCallback(pMac, sessionId, pRoamInfo, pCommand->u.roamCmd.roamId,
+ eCSR_ROAM_ASSOCIATION_COMPLETION,
eCSR_ROAM_RESULT_NOT_ASSOCIATED);
}
}
@@ -4343,7 +4345,7 @@ static eHalStatus csrRoam( tpAniSirGlobal pMac, tSmeCmd *pCommand )
eHalStatus status = eHAL_STATUS_SUCCESS;
eCsrJoinState RoamState;
tANI_U32 sessionId = pCommand->sessionId;
-
+
//***if( hddIsRadioStateOn( pAdapter ) )
{
// Attept to join a Bss...
@@ -4354,7 +4356,7 @@ static eHalStatus csrRoam( tpAniSirGlobal pMac, tSmeCmd *pCommand )
{
tANI_BOOLEAN fComplete = eANI_BOOLEAN_FALSE;
// and if connected in Infrastructure mode...
- if ( csrIsConnStateInfra(pMac, sessionId) )
+ if ( csrIsConnStateInfra(pMac, sessionId) )
{
//... then we need to issue a disassociation
status = csrRoamIssueDisassociate( pMac, sessionId, eCSR_ROAM_SUBSTATE_DISASSOC_NOTHING_TO_JOIN, FALSE );
@@ -4386,7 +4388,7 @@ static eHalStatus csrRoam( tpAniSirGlobal pMac, tSmeCmd *pCommand )
}
}
else
- {
+ {
fComplete = eANI_BOOLEAN_TRUE;
}
if(fComplete)
@@ -4400,7 +4402,7 @@ static eHalStatus csrRoam( tpAniSirGlobal pMac, tSmeCmd *pCommand )
{
csrRoamComplete( pMac, eCsrNothingToJoin, NULL );
}
- }
+ }
}
else if ( eCsrReassocToSelfNoCapChange == RoamState )
{
@@ -4408,10 +4410,10 @@ static eHalStatus csrRoam( tpAniSirGlobal pMac, tSmeCmd *pCommand )
}
else if ( eCsrStartIbssSameIbss == RoamState )
{
- csrRoamComplete( pMac, eCsrSilentlyStopRoaming, NULL );
+ csrRoamComplete( pMac, eCsrSilentlyStopRoaming, NULL );
}
}//hddIsRadioStateOn
-
+
return status;
}
eHalStatus csrProcessFTReassocRoamCommand ( tpAniSirGlobal pMac, tSmeCmd *pCommand )
@@ -4429,12 +4431,12 @@ eHalStatus csrProcessFTReassocRoamCommand ( tpAniSirGlobal pMac, tSmeCmd *pComma
smsLog(pMac, LOGE, FL(" session %d not found "), sessionId);
return eHAL_STATUS_FAILURE;
}
-
+
if(CSR_IS_ROAMING(pSession) && pSession->fCancelRoaming)
{
//the roaming is cancelled. Simply complete the command
smsLog(pMac, LOG1, FL(" Roam command cancelled"));
- csrRoamComplete(pMac, eCsrNothingToJoin, NULL);
+ csrRoamComplete(pMac, eCsrNothingToJoin, NULL);
return eHAL_STATUS_FAILURE;
}
if (pCommand->u.roamCmd.pRoamBssEntry)
@@ -4446,10 +4448,10 @@ eHalStatus csrProcessFTReassocRoamCommand ( tpAniSirGlobal pMac, tSmeCmd *pComma
{
//the roaming is cancelled. Simply complete the command
smsLog(pMac, LOG1, FL(" Roam command cancelled"));
- csrRoamComplete(pMac, eCsrNothingToJoin, NULL);
+ csrRoamComplete(pMac, eCsrNothingToJoin, NULL);
return eHAL_STATUS_FAILURE;
}
- status = csrRoamIssueReassociate(pMac, sessionId, pBssDesc,
+ status = csrRoamIssueReassociate(pMac, sessionId, pBssDesc,
(tDot11fBeaconIEs *)( pScanResult->Result.pvIes ), &pCommand->u.roamCmd.roamProfile);
return status;
}
@@ -4466,10 +4468,16 @@ eHalStatus csrRoamProcessCommand( tpAniSirGlobal pMac, tSmeCmd *pCommand )
smsLog(pMac, LOGE, FL(" session %d not found "), sessionId);
return eHAL_STATUS_FAILURE;
}
-
+
switch ( pCommand->u.roamCmd.roamReason )
{
case eCsrForcedDisassoc:
+ if (eCSR_ROAMING_STATE_IDLE == pMac->roam.curState[sessionId]) {
+ smsLog(pMac, LOGE, FL("Ignore eCsrForcedDisassoc cmd on roam state"
+ " %d"), eCSR_ROAMING_STATE_IDLE);
+ return eHAL_STATUS_FAILURE;
+ }
+
status = csrRoamProcessDisassocDeauth( pMac, pCommand, TRUE, FALSE );
csrFreeRoamProfile(pMac, sessionId);
break;
@@ -4510,9 +4518,9 @@ eHalStatus csrRoamProcessCommand( tpAniSirGlobal pMac, tSmeCmd *pCommand )
roamInfo.pBssDesc = pSession->pConnectBssDesc;
roamInfo.pProfile = &pCommand->u.roamCmd.roamProfile;
pSession->bRefAssocStartCnt++;
- csrRoamCallCallback( pMac, sessionId, &roamInfo, pCommand->u.roamCmd.roamId,
+ csrRoamCallCallback( pMac, sessionId, &roamInfo, pCommand->u.roamCmd.roamId,
eCSR_ROAM_ASSOCIATION_START, eCSR_ROAM_RESULT_NONE );
-
+
smsLog(pMac, LOG1, FL(" calling csrRoamIssueReassociate"));
status = csrRoamIssueReassociate( pMac, sessionId, pSession->pConnectBssDesc, pIes,
&pCommand->u.roamCmd.roamProfile );
@@ -4531,7 +4539,7 @@ eHalStatus csrRoamProcessCommand( tpAniSirGlobal pMac, tSmeCmd *pCommand )
case eCsrCapsChange:
smsLog(pMac, LOGE, FL("received eCsrCapsChange "));
csrRoamStateChange( pMac, eCSR_ROAMING_STATE_JOINING, sessionId );
- status = csrRoamIssueDisassociate( pMac, sessionId, eCSR_ROAM_SUBSTATE_DISCONNECT_CONTINUE_ROAMING, FALSE);
+ status = csrRoamIssueDisassociate( pMac, sessionId, eCSR_ROAM_SUBSTATE_DISCONNECT_CONTINUE_ROAMING, FALSE);
break;
case eCsrSmeIssuedFTReassoc:
smsLog(pMac, LOGE, FL("received FT Reassoc Req "));
@@ -4546,20 +4554,20 @@ eHalStatus csrRoamProcessCommand( tpAniSirGlobal pMac, tSmeCmd *pCommand )
case eCsrForcedDisassocSta:
csrRoamStateChange( pMac, eCSR_ROAMING_STATE_JOINING, sessionId);
csrRoamSubstateChange( pMac, eCSR_ROAM_SUBSTATE_DISASSOC_REQ, sessionId);
- status = csrSendMBDisassocReqMsg( pMac, sessionId, pCommand->u.roamCmd.peerMac,
+ status = csrSendMBDisassocReqMsg( pMac, sessionId, pCommand->u.roamCmd.peerMac,
pCommand->u.roamCmd.reason);
break;
case eCsrForcedDeauthSta:
csrRoamStateChange( pMac, eCSR_ROAMING_STATE_JOINING, sessionId);
csrRoamSubstateChange( pMac, eCSR_ROAM_SUBSTATE_DEAUTH_REQ, sessionId);
- status = csrSendMBDeauthReqMsg( pMac, sessionId, pCommand->u.roamCmd.peerMac,
+ status = csrSendMBDeauthReqMsg( pMac, sessionId, pCommand->u.roamCmd.peerMac,
pCommand->u.roamCmd.reason);
break;
case eCsrPerformPreauth:
smsLog(pMac, LOG1, FL("Attempting FT PreAuth Req"));
- status = csrRoamIssueFTPreauthReq(pMac, sessionId,
+ status = csrRoamIssueFTPreauthReq(pMac, sessionId,
pCommand->u.roamCmd.pLastRoamBss);
break;
@@ -4568,7 +4576,7 @@ eHalStatus csrRoamProcessCommand( tpAniSirGlobal pMac, tSmeCmd *pCommand )
if( pCommand->u.roamCmd.fUpdateCurRoamProfile )
{
- //Remember the roaming profile
+ //Remember the roaming profile
csrFreeRoamProfile(pMac, sessionId);
if(HAL_STATUS_SUCCESS(palAllocateMemory(pMac->hHdd, (void **)&pSession->pCurRoamProfile, sizeof(tCsrRoamProfile))))
{
@@ -4576,10 +4584,10 @@ eHalStatus csrRoamProcessCommand( tpAniSirGlobal pMac, tSmeCmd *pCommand )
csrRoamCopyProfile(pMac, pSession->pCurRoamProfile, &pCommand->u.roamCmd.roamProfile);
}
}
-
+
//At this point, original uapsd_mask is saved in pCurRoamProfile
//uapsd_mask in the pCommand may change from this point on.
-
+
// Attempt to roam with the new scan results (if we need to..)
status = csrRoam( pMac, pCommand );
if(!HAL_STATUS_SUCCESS(status))
@@ -4591,7 +4599,7 @@ eHalStatus csrRoamProcessCommand( tpAniSirGlobal pMac, tSmeCmd *pCommand )
return (status);
}
-void csrReinitPreauthCmd(tpAniSirGlobal pMac, tSmeCmd *pCommand)
+void csrReinitPreauthCmd(tpAniSirGlobal pMac, tSmeCmd *pCommand)
{
pCommand->u.roamCmd.pLastRoamBss = NULL;
pCommand->u.roamCmd.pRoamBssEntry = NULL;
@@ -4599,7 +4607,7 @@ void csrReinitPreauthCmd(tpAniSirGlobal pMac, tSmeCmd *pCommand)
palZeroMemory(pMac->hHdd, &pCommand->u.roamCmd, sizeof(tRoamCmd));
}
-void csrReinitRoamCmd(tpAniSirGlobal pMac, tSmeCmd *pCommand)
+void csrReinitRoamCmd(tpAniSirGlobal pMac, tSmeCmd *pCommand)
{
if(pCommand->u.roamCmd.fReleaseBssList)
{
@@ -4635,7 +4643,7 @@ void csrRoamComplete( tpAniSirGlobal pMac, eCsrRoamCompleteResult Result, void *
// and put this on the Free queue.
if ( eSmeCommandRoam == pCommand->command )
{
- //we need to process the result first before removing it from active list because state changes
+ //we need to process the result first before removing it from active list because state changes
//still happening insides roamQProcessRoamResults so no other roam command should be issued
fReleaseCommand = csrRoamProcessResults( pMac, pCommand, Result, Context );
if( fReleaseCommand )
@@ -4697,7 +4705,7 @@ void csrResetBKIDCandidateList( tpAniSirGlobal pMac, tANI_U32 sessionId )
#endif /* FEATURE_WLAN_WAPI */
extern tANI_U8 csrWpaOui[][ CSR_WPA_OUI_SIZE ];
-static eHalStatus csrRoamSaveSecurityRspIE(tpAniSirGlobal pMac, tANI_U32 sessionId, eCsrAuthType authType,
+static eHalStatus csrRoamSaveSecurityRspIE(tpAniSirGlobal pMac, tANI_U32 sessionId, eCsrAuthType authType,
tSirBssDescription *pSirBssDesc,
tDot11fBeaconIEs *pIes)
{
@@ -4710,7 +4718,7 @@ static eHalStatus csrRoamSaveSecurityRspIE(tpAniSirGlobal pMac, tANI_U32 session
smsLog(pMac, LOGE, FL(" session %d not found "), sessionId);
return eHAL_STATUS_FAILURE;
}
-
+
if((eCSR_AUTH_TYPE_WPA == authType) ||
(eCSR_AUTH_TYPE_WPA_PSK == authType) ||
(eCSR_AUTH_TYPE_RSN == authType) ||
@@ -4720,7 +4728,7 @@ static eHalStatus csrRoamSaveSecurityRspIE(tpAniSirGlobal pMac, tANI_U32 session
(eCSR_AUTH_TYPE_FT_RSN == authType) ||
(eCSR_AUTH_TYPE_FT_RSN_PSK == authType)
#endif /* FEATURE_WLAN_WAPI */
-#ifdef FEATURE_WLAN_WAPI
+#ifdef FEATURE_WLAN_WAPI
||
(eCSR_AUTH_TYPE_WAPI_WAI_PSK == authType) ||
(eCSR_AUTH_TYPE_WAPI_WAI_CERTIFICATE == authType)
@@ -4778,7 +4786,7 @@ static eHalStatus csrRoamSaveSecurityRspIE(tpAniSirGlobal pMac, tANI_U32 session
if( pIesLocal->RSN.pwise_cipher_suite_count )
{
//copy pwise_cipher_suites
- palCopyMemory(pMac->hHdd, pIeBuf, pIesLocal->RSN.pwise_cipher_suites,
+ palCopyMemory(pMac->hHdd, pIeBuf, pIesLocal->RSN.pwise_cipher_suites,
pIesLocal->RSN.pwise_cipher_suite_count * 4);
pIeBuf += pIesLocal->RSN.pwise_cipher_suite_count * 4;
}
@@ -4787,15 +4795,15 @@ static eHalStatus csrRoamSaveSecurityRspIE(tpAniSirGlobal pMac, tANI_U32 session
if( pIesLocal->RSN.akm_suite_count )
{
//copy akm_suites
- palCopyMemory(pMac->hHdd, pIeBuf, pIesLocal->RSN.akm_suites,
+ palCopyMemory(pMac->hHdd, pIeBuf, pIesLocal->RSN.akm_suites,
pIesLocal->RSN.akm_suite_count * 4);
pIeBuf += pIesLocal->RSN.akm_suite_count * 4;
}
//copy the rest
- palCopyMemory(pMac->hHdd, pIeBuf, pIesLocal->RSN.akm_suites +
- pIesLocal->RSN.akm_suite_count * 4,
+ palCopyMemory(pMac->hHdd, pIeBuf, pIesLocal->RSN.akm_suites +
+ pIesLocal->RSN.akm_suite_count * 4,
2 + pIesLocal->RSN.pmkid_count * 4);
- pSession->nWpaRsnRspIeLength = nIeLen + 2;
+ pSession->nWpaRsnRspIeLength = nIeLen + 2;
}
}
}
@@ -4822,13 +4830,13 @@ static eHalStatus csrRoamSaveSecurityRspIE(tpAniSirGlobal pMac, tANI_U32 session
//Copy WPA OUI
palCopyMemory(pMac->hHdd, pIeBuf, &csrWpaOui[1], 4);
pIeBuf += 4;
- palCopyMemory(pMac->hHdd, pIeBuf, &pIesLocal->WPA.version, 8 +
+ palCopyMemory(pMac->hHdd, pIeBuf, &pIesLocal->WPA.version, 8 +
pIesLocal->WPA.unicast_cipher_count * 4);
pIeBuf += 8 + pIesLocal->WPA.unicast_cipher_count * 4;
- palCopyMemory(pMac->hHdd, pIeBuf, &pIesLocal->WPA.auth_suite_count, 2 +
+ palCopyMemory(pMac->hHdd, pIeBuf, &pIesLocal->WPA.auth_suite_count, 2 +
pIesLocal->WPA.auth_suite_count * 4);
pIeBuf += pIesLocal->WPA.auth_suite_count * 4;
- pSession->nWpaRsnRspIeLength = nIeLen + 2;
+ pSession->nWpaRsnRspIeLength = nIeLen + 2;
}
}
}
@@ -4839,7 +4847,7 @@ static eHalStatus csrRoamSaveSecurityRspIE(tpAniSirGlobal pMac, tANI_U32 session
if(pIesLocal->WAPI.present)
{
//Calculate the actual length
- nIeLen = 4 //version + akm_suite_count
+ nIeLen = 4 //version + akm_suite_count
+ pIesLocal->WAPI.akm_suite_count * 4 // akm_suites
+ 2 //pwise_cipher_suite_count
+ pIesLocal->WAPI.unicast_cipher_suite_count * 4 //pwise_cipher_suites
@@ -4848,7 +4856,7 @@ static eHalStatus csrRoamSaveSecurityRspIE(tpAniSirGlobal pMac, tANI_U32 session
{
nIeLen += 2 + pIesLocal->WAPI.bkid_count * 4; //bkid
}
-
+
//nIeLen doesn't count EID and length fields
if(HAL_STATUS_SUCCESS((status = palAllocateMemory(pMac->hHdd, (void **)&pSession->pWapiRspIE, nIeLen + 2))))
{
@@ -4861,7 +4869,7 @@ static eHalStatus csrRoamSaveSecurityRspIE(tpAniSirGlobal pMac, tANI_U32 session
if( pIesLocal->WAPI.akm_suite_count )
{
//copy akm_suites
- palCopyMemory(pMac->hHdd, pIeBuf, pIesLocal->WAPI.akm_suites,
+ palCopyMemory(pMac->hHdd, pIeBuf, pIesLocal->WAPI.akm_suites,
pIesLocal->WAPI.akm_suite_count * 4);
pIeBuf += pIesLocal->WAPI.akm_suite_count * 4;
}
@@ -4870,7 +4878,7 @@ static eHalStatus csrRoamSaveSecurityRspIE(tpAniSirGlobal pMac, tANI_U32 session
if( pIesLocal->WAPI.unicast_cipher_suite_count )
{
//copy pwise_cipher_suites
- palCopyMemory(pMac->hHdd, pIeBuf, pIesLocal->WAPI.unicast_cipher_suites,
+ palCopyMemory(pMac->hHdd, pIeBuf, pIesLocal->WAPI.unicast_cipher_suites,
pIesLocal->WAPI.unicast_cipher_suite_count * 4);
pIeBuf += pIesLocal->WAPI.unicast_cipher_suite_count * 4;
}
@@ -4883,7 +4891,7 @@ static eHalStatus csrRoamSaveSecurityRspIE(tpAniSirGlobal pMac, tANI_U32 session
palCopyMemory(pMac->hHdd, pIeBuf, pIesLocal->WAPI.bkid, pIesLocal->WAPI.bkid_count * 4);
pIeBuf += pIesLocal->WAPI.bkid_count * 4;
}
- pSession->nWapiRspIeLength = nIeLen + 2;
+ pSession->nWapiRspIeLength = nIeLen + 2;
}
}
}
@@ -5013,7 +5021,7 @@ static tANI_BOOLEAN csrRoamProcessResults( tpAniSirGlobal pMac, tSmeCmd *pComman
eCsrRoamCompleteResult Result, void *Context )
{
tANI_BOOLEAN fReleaseCommand = eANI_BOOLEAN_TRUE;
- tSirBssDescription *pSirBssDesc = NULL;
+ tSirBssDescription *pSirBssDesc = NULL;
tSirMacAddr BroadcastMac = { 0xff, 0xff, 0xff, 0xff, 0xff, 0xff };
tCsrScanResult *pScanResult = NULL;
tCsrRoamInfo roamInfo;
@@ -5098,11 +5106,11 @@ static tANI_BOOLEAN csrRoamProcessResults( tpAniSirGlobal pMac, tSmeCmd *pComman
if(pSirBssDesc)
{
palCopyMemory(pMac->hHdd, &roamInfo.bssid, &pSirBssDesc->bssId, sizeof(tCsrBssid));
- }
+ }
}
else
{
-
+
if(pCommand->u.roamCmd.pRoamBssEntry)
{
pScanResult = GET_BASE_ADDR(pCommand->u.roamCmd.pRoamBssEntry, tCsrScanResult, Link);
@@ -5124,28 +5132,28 @@ static tANI_BOOLEAN csrRoamProcessResults( tpAniSirGlobal pMac, tSmeCmd *pComman
#ifdef FEATURE_WLAN_CCX
roamInfo.isCCXAssoc = pSession->connectedProfile.isCCXAssoc;
#endif
-
+
// csrRoamStateChange also affects sub-state. Hence, csrRoamStateChange happens first and then
// substate change.
// Moving even save profile above so that below mentioned conditon is also met.
// JEZ100225: Moved to after saving the profile. Fix needed in main/latest
csrRoamStateChange( pMac, eCSR_ROAMING_STATE_JOINED, sessionId );
- // Make sure the Set Context is issued before link indication to NDIS. After link indication is
+ // Make sure the Set Context is issued before link indication to NDIS. After link indication is
// made to NDIS, frames could start flowing. If we have not set context with LIM, the frames
- // will be dropped for the security context may not be set properly.
+ // will be dropped for the security context may not be set properly.
//
// this was causing issues in the 2c_wlan_wep WHQL test when the SetContext was issued after the link
// indication. (Link Indication happens in the profFSMSetConnectedInfra call).
//
// this reordering was done on titan_prod_usb branch and is being replicated here.
//
-
+
if( CSR_IS_ENC_TYPE_STATIC( pProfile->negotiatedUCEncryptionType ) &&
!pProfile->bWPSAssociation)
{
// Issue the set Context request to LIM to establish the Unicast STA context
if( !HAL_STATUS_SUCCESS( csrRoamIssueSetContextReq( pMac, sessionId,
- pProfile->negotiatedUCEncryptionType,
+ pProfile->negotiatedUCEncryptionType,
pSirBssDesc, &(pSirBssDesc->bssId),
FALSE, TRUE, eSIR_TX_RX, 0, 0, NULL, 0 ) ) ) // NO keys... these key parameters don't matter.
{
@@ -5172,7 +5180,7 @@ static tANI_BOOLEAN csrRoamProcessResults( tpAniSirGlobal pMac, tSmeCmd *pComman
{
key_timeout_interval = CSR_WAIT_FOR_KEY_TIMEOUT_PERIOD;
}
-
+
//Save sessionId in case of timeout
pMac->roam.WaitForKeyTimerInfo.sessionId = (tANI_U8)sessionId;
//This time should be long enough for the rest of the process plus setting key
@@ -5183,7 +5191,7 @@ static tANI_BOOLEAN csrRoamProcessResults( tpAniSirGlobal pMac, tSmeCmd *pComman
csrRoamSubstateChange( pMac, eCSR_ROAM_SUBSTATE_NONE, sessionId);
}
}
-
+
assocInfo.pBssDesc = pSirBssDesc; //could be NULL
assocInfo.pProfile = pProfile;
if(Context)
@@ -5194,16 +5202,16 @@ static tANI_BOOLEAN csrRoamProcessResults( tpAniSirGlobal pMac, tSmeCmd *pComman
len = pJoinRsp->assocReqLength + pJoinRsp->assocRspLength + pJoinRsp->beaconLength;
#ifdef WLAN_FEATURE_VOWIFI_11R
len += pJoinRsp->parsedRicRspLen;
-#endif /* WLAN_FEATURE_VOWIFI_11R */
+#endif /* WLAN_FEATURE_VOWIFI_11R */
#ifdef FEATURE_WLAN_CCX
len += pJoinRsp->tspecIeLen;
#endif
if(len)
{
- if(HAL_STATUS_SUCCESS(palAllocateMemory(pMac->hHdd,
+ if(HAL_STATUS_SUCCESS(palAllocateMemory(pMac->hHdd,
(void **)&pSession->connectedInfo.pbFrames, len)))
{
- if(HAL_STATUS_SUCCESS( palCopyMemory(pMac->hHdd,
+ if(HAL_STATUS_SUCCESS( palCopyMemory(pMac->hHdd,
pSession->connectedInfo.pbFrames, pJoinRsp->frames, len) ))
{
pSession->connectedInfo.nAssocReqLength = pJoinRsp->assocReqLength;
@@ -5211,7 +5219,7 @@ static tANI_BOOLEAN csrRoamProcessResults( tpAniSirGlobal pMac, tSmeCmd *pComman
pSession->connectedInfo.nBeaconLength = pJoinRsp->beaconLength;
#ifdef WLAN_FEATURE_VOWIFI_11R
pSession->connectedInfo.nRICRspLength = pJoinRsp->parsedRicRspLen;
-#endif /* WLAN_FEATURE_VOWIFI_11R */
+#endif /* WLAN_FEATURE_VOWIFI_11R */
#ifdef FEATURE_WLAN_CCX
pSession->connectedInfo.nTspecIeLength = pJoinRsp->tspecIeLen;
#endif
@@ -5250,8 +5258,8 @@ static tANI_BOOLEAN csrRoamProcessResults( tpAniSirGlobal pMac, tSmeCmd *pComman
}
}
#ifndef WLAN_MDM_CODE_REDUCTION_OPT
- // Indicate SME-QOS with reassoc success event, only after
- // copying the frames
+ // Indicate SME-QOS with reassoc success event, only after
+ // copying the frames
sme_QosCsrEventInd(pMac, (v_U8_t)sessionId, ind_qos, &assocInfo);
#endif
roamInfo.pBssDesc = pSirBssDesc;
@@ -5281,7 +5289,7 @@ static tANI_BOOLEAN csrRoamProcessResults( tpAniSirGlobal pMac, tSmeCmd *pComman
if( pSession->bRefAssocStartCnt > 0 )
{
pSession->bRefAssocStartCnt--;
- //Remove this code once SLM_Sessionization is supported
+ //Remove this code once SLM_Sessionization is supported
//BMPS_WORKAROUND_NOT_NEEDED
if(!IS_FEATURE_SUPPORTED_BY_FW(SLM_SESSIONIZATION) && ( csrIsConcurrentSessionRunning( pMac )))
{
@@ -5289,14 +5297,14 @@ static tANI_BOOLEAN csrRoamProcessResults( tpAniSirGlobal pMac, tSmeCmd *pComman
}
csrRoamCallCallback(pMac, sessionId, &roamInfo, pCommand->u.roamCmd.roamId, eCSR_ROAM_ASSOCIATION_COMPLETION, eCSR_ROAM_RESULT_ASSOCIATED);
}
-
+
csrRoamCompletion(pMac, sessionId, NULL, pCommand, eCSR_ROAM_RESULT_NONE, eANI_BOOLEAN_TRUE);
// reset the PMKID candidate list
csrResetPMKIDCandidateList( pMac, sessionId );
//Update TL's AC weight base on the current EDCA parameters
//These parameters may change in the course of the connection, that sictuation
//is not taken care here. This change is mainly to address a WIFI WMM test where
- //BE has a equal or higher TX priority than VI.
+ //BE has a equal or higher TX priority than VI.
//We only do this for infra link
if( csrIsConnStateConnectedInfra(pMac, sessionId ) && pIes )
{
@@ -5363,7 +5371,7 @@ static tANI_BOOLEAN csrRoamProcessResults( tpAniSirGlobal pMac, tSmeCmd *pComman
smsLog(pMac, LOG2, FL("cannot parse IBSS IEs"));
roamInfo.pBssDesc = pSirBssDesc;
//We need to associate_complete it first, becasue Associate_start already indicated.
- csrRoamCallCallback( pMac, sessionId, &roamInfo, pCommand->u.roamCmd.roamId,
+ csrRoamCallCallback( pMac, sessionId, &roamInfo, pCommand->u.roamCmd.roamId,
eCSR_ROAM_IBSS_IND, eCSR_ROAM_RESULT_IBSS_START_FAILED );
break;
}
@@ -5385,10 +5393,10 @@ static tANI_BOOLEAN csrRoamProcessResults( tpAniSirGlobal pMac, tSmeCmd *pComman
{
vos_log_ibss_pkt_type *pIbssLog;
tANI_U32 bi;
-
+
WLAN_VOS_DIAG_LOG_ALLOC(pIbssLog, vos_log_ibss_pkt_type, LOG_WLAN_IBSS_C);
if(pIbssLog)
- {
+ {
if(CSR_INVALID_SCANRESULT_HANDLE == pCommand->u.roamCmd.hBSSList)
{
//We start the IBSS (didn't find any matched IBSS out there)
@@ -5417,8 +5425,8 @@ 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.
- csrRoamIssueSetContextReq( pMac, sessionId,
- pProfile->negotiatedMCEncryptionType,
+ csrRoamIssueSetContextReq( pMac, sessionId,
+ pProfile->negotiatedMCEncryptionType,
pSirBssDesc, &BroadcastMac,
FALSE, FALSE, eSIR_TX_RX, 0, 0, NULL, 0 ); // NO keys... these key parameters don't matter.
}
@@ -5445,7 +5453,7 @@ static tANI_BOOLEAN csrRoamProcessResults( tpAniSirGlobal pMac, tSmeCmd *pComman
}
}
//Only tell upper layer is we start the BSS because Vista doesn't like multiple connection
- //indications. If we don't start the BSS ourself, handler of eSIR_SME_JOINED_NEW_BSS will
+ //indications. If we don't start the BSS ourself, handler of eSIR_SME_JOINED_NEW_BSS will
//trigger the connection start indication in Vista
if( !CSR_IS_JOIN_TO_IBSS( pProfile ) )
{
@@ -5461,9 +5469,9 @@ static tANI_BOOLEAN csrRoamProcessResults( tpAniSirGlobal pMac, tSmeCmd *pComman
roamStatus = eCSR_ROAM_INFRA_IND;
roamResult = eCSR_ROAM_RESULT_INFRA_STARTED;
}
-
+
//Only tell upper layer is we start the BSS because Vista doesn't like multiple connection
- //indications. If we don't start the BSS ourself, handler of eSIR_SME_JOINED_NEW_BSS will
+ //indications. If we don't start the BSS ourself, handler of eSIR_SME_JOINED_NEW_BSS will
//trigger the connection start indication in Vista
palZeroMemory(pMac->hHdd, &roamInfo, sizeof(tCsrRoamInfo));
roamInfo.statusCode = pSession->joinFailStatusCode.statusCode;
@@ -5474,7 +5482,7 @@ static tANI_BOOLEAN csrRoamProcessResults( tpAniSirGlobal pMac, tSmeCmd *pComman
roamInfo.pBssDesc = pSirBssDesc;
}
roamInfo.staId = (tANI_U8)pSmeStartBssRsp->staId;
- //Remove this code once SLM_Sessionization is supported
+ //Remove this code once SLM_Sessionization is supported
//BMPS_WORKAROUND_NOT_NEEDED
if(!IS_FEATURE_SUPPORTED_BY_FW(SLM_SESSIONIZATION) &&
( csrIsConcurrentSessionRunning( pMac )))
@@ -5484,7 +5492,7 @@ static tANI_BOOLEAN csrRoamProcessResults( tpAniSirGlobal pMac, tSmeCmd *pComman
csrRoamCallCallback( pMac, sessionId, &roamInfo, pCommand->u.roamCmd.roamId, roamStatus, roamResult );
}
-
+
csrScanCancelIdleScan(pMac);
//Only use this timer for ibss. BAP has its own timer for WDS
if( CSR_IS_IBSS( pProfile) && CSR_INVALID_SCANRESULT_HANDLE != pCommand->u.roamCmd.hBSSList)
@@ -5502,7 +5510,7 @@ static tANI_BOOLEAN csrRoamProcessResults( tpAniSirGlobal pMac, tSmeCmd *pComman
{
//need to send stop BSS because we fail to send join_req
csrRoamIssueDisassociateCmd( pMac, sessionId, eCSR_DISCONNECT_REASON_UNSPECIFIED );
- csrRoamCallCallback( pMac, sessionId, &roamInfo, pCommand->u.roamCmd.roamId,
+ csrRoamCallCallback( pMac, sessionId, &roamInfo, pCommand->u.roamCmd.roamId,
eCSR_ROAM_WDS_IND, eCSR_ROAM_RESULT_WDS_STOPPED );
}
break;
@@ -5559,7 +5567,7 @@ static tANI_BOOLEAN csrRoamProcessResults( tpAniSirGlobal pMac, tSmeCmd *pComman
}
//Since there is no change in the current state, simply pass back no result otherwise
//HDD may be mistakenly mark to disconnected state.
- csrRoamCallCallback( pMac, sessionId, &roamInfo, pCommand->u.roamCmd.roamId,
+ csrRoamCallCallback( pMac, sessionId, &roamInfo, pCommand->u.roamCmd.roamId,
eCSR_ROAM_IBSS_IND, eCSR_ROAM_RESULT_NONE );
break;
case eCsrSilentlyStopRoamingSaveState:
@@ -5567,7 +5575,7 @@ static tANI_BOOLEAN csrRoamProcessResults( tpAniSirGlobal pMac, tSmeCmd *pComman
//No message to PE
smsLog(pMac, LOGW, FL("receives silently stop roaming indication"));
palZeroMemory(pMac->hHdd, &roamInfo, sizeof(roamInfo));
-
+
//to aviod resetting the substate to NONE
pMac->roam.curState[sessionId] = eCSR_ROAMING_STATE_JOINED;
//No need to change substate to wai_for_key because there is no state change
@@ -5586,7 +5594,7 @@ static tANI_BOOLEAN csrRoamProcessResults( tpAniSirGlobal pMac, tSmeCmd *pComman
roamInfo.u.pConnectedProfile = &pSession->connectedProfile;
VOS_ASSERT( roamInfo.staId != 0 );
pSession->bRefAssocStartCnt--;
- csrRoamCallCallback(pMac, sessionId, &roamInfo, pCommand->u.roamCmd.roamId,
+ csrRoamCallCallback(pMac, sessionId, &roamInfo, pCommand->u.roamCmd.roamId,
eCSR_ROAM_ASSOCIATION_COMPLETION, eCSR_ROAM_RESULT_ASSOCIATED);
csrRoamCompletion(pMac, sessionId, NULL, pCommand, eCSR_ROAM_RESULT_ASSOCIATED, eANI_BOOLEAN_TRUE);
break;
@@ -5603,8 +5611,8 @@ static tANI_BOOLEAN csrRoamProcessResults( tpAniSirGlobal pMac, tSmeCmd *pComman
roamInfo.pBssDesc = pCommand->u.roamCmd.pLastRoamBss;
roamInfo.statusCode = pSession->joinFailStatusCode.statusCode;
roamInfo.reasonCode = pSession->joinFailStatusCode.reasonCode;
- csrRoamCallCallback(pMac, sessionId, &roamInfo, pCommand->u.roamCmd.roamId,
- eCSR_ROAM_WDS_IND,
+ csrRoamCallCallback(pMac, sessionId, &roamInfo, pCommand->u.roamCmd.roamId,
+ eCSR_ROAM_WDS_IND,
eCSR_ROAM_RESULT_WDS_NOT_ASSOCIATED);
//Need to issue stop_bss
break;
@@ -5616,7 +5624,7 @@ static tANI_BOOLEAN csrRoamProcessResults( tpAniSirGlobal pMac, tSmeCmd *pComman
smsLog(pMac, LOGW, FL("receives no association indication"));
smsLog(pMac, LOG1, FL("Assoc ref count %d"),
pSession->bRefAssocStartCnt);
- if( CSR_IS_INFRASTRUCTURE( &pSession->connectedProfile ) ||
+ if( CSR_IS_INFRASTRUCTURE( &pSession->connectedProfile ) ||
CSR_IS_ROAM_SUBSTATE_STOP_BSS_REQ( pMac, sessionId ) )
{
//do not free for the other profiles as we need to send down stop BSS later
@@ -5656,14 +5664,14 @@ static tANI_BOOLEAN csrRoamProcessResults( tpAniSirGlobal pMac, tSmeCmd *pComman
pSession->bRefAssocStartCnt--;
if(eCsrJoinFailureDueToConcurrency == Result)
{
- csrRoamCallCallback(pMac, sessionId, &roamInfo, pCommand->u.roamCmd.roamId,
- eCSR_ROAM_ASSOCIATION_COMPLETION,
+ csrRoamCallCallback(pMac, sessionId, &roamInfo, pCommand->u.roamCmd.roamId,
+ eCSR_ROAM_ASSOCIATION_COMPLETION,
eCSR_ROAM_RESULT_ASSOC_FAIL_CON_CHANNEL);
}
else
{
- csrRoamCallCallback(pMac, sessionId, &roamInfo, pCommand->u.roamCmd.roamId,
- eCSR_ROAM_ASSOCIATION_COMPLETION,
+ csrRoamCallCallback(pMac, sessionId, &roamInfo, pCommand->u.roamCmd.roamId,
+ eCSR_ROAM_ASSOCIATION_COMPLETION,
eCSR_ROAM_RESULT_FAILURE);
}
}
@@ -5699,7 +5707,7 @@ static tANI_BOOLEAN csrRoamProcessResults( tpAniSirGlobal pMac, tSmeCmd *pComman
csrRoamStateChange( pMac, eCSR_ROAMING_STATE_IDLE, sessionId);
csrRoamCallCallback(pMac, sessionId, NULL, pCommand->u.roamCmd.roamId, eCSR_ROAM_DISASSOCIATED, eCSR_ROAM_RESULT_FORCED);
-#ifndef WLAN_MDM_CODE_REDUCTION_OPT
+#ifndef WLAN_MDM_CODE_REDUCTION_OPT
sme_QosCsrEventInd(pMac, (tANI_U8)sessionId, SME_QOS_CSR_DISCONNECT_IND, NULL);
#endif
csrRoamCompletion(pMac, sessionId, NULL, pCommand, eCSR_ROAM_RESULT_FAILURE, eANI_BOOLEAN_FALSE);
@@ -5717,8 +5725,8 @@ static tANI_BOOLEAN csrRoamProcessResults( tpAniSirGlobal pMac, tSmeCmd *pComman
}
else
{
- csrRoamCallCallback(pMac, sessionId, NULL,
- pCommand->u.roamCmd.roamId,
+ csrRoamCallCallback(pMac, sessionId, NULL,
+ pCommand->u.roamCmd.roamId,
eCSR_ROAM_DISASSOCIATED, eCSR_ROAM_RESULT_FORCED);
}
#ifndef WLAN_MDM_CODE_REDUCTION_OPT
@@ -5728,8 +5736,8 @@ static tANI_BOOLEAN csrRoamProcessResults( tpAniSirGlobal pMac, tSmeCmd *pComman
csrScanStartIdleScan(pMac);
break;
case eCsrForcedIbssLeave:
- csrRoamCallCallback(pMac, sessionId, NULL,
- pCommand->u.roamCmd.roamId,
+ csrRoamCallCallback(pMac, sessionId, NULL,
+ pCommand->u.roamCmd.roamId,
eCSR_ROAM_IBSS_LEAVE,
eCSR_ROAM_RESULT_IBSS_STOP);
break;
@@ -5743,16 +5751,16 @@ static tANI_BOOLEAN csrRoamProcessResults( tpAniSirGlobal pMac, tSmeCmd *pComman
csrScanStartIdleScan(pMac);
break;
case eCsrStopBss:
- csrRoamCallCallback(pMac, sessionId, NULL,
- pCommand->u.roamCmd.roamId,
- eCSR_ROAM_INFRA_IND,
+ csrRoamCallCallback(pMac, sessionId, NULL,
+ pCommand->u.roamCmd.roamId,
+ eCSR_ROAM_INFRA_IND,
eCSR_ROAM_RESULT_INFRA_STOPPED);
break;
case eCsrForcedDisassocSta:
case eCsrForcedDeauthSta:
csrRoamStateChange( pMac, eCSR_ROAMING_STATE_JOINED, sessionId);
if( CSR_IS_SESSION_VALID(pMac, sessionId) )
- {
+ {
pSession = CSR_GET_SESSION(pMac, sessionId);
if (!pSession)
break;
@@ -5760,12 +5768,12 @@ static tANI_BOOLEAN csrRoamProcessResults( tpAniSirGlobal pMac, tSmeCmd *pComman
if ( CSR_IS_INFRA_AP(&pSession->connectedProfile) )
{
roamInfo.u.pConnectedProfile = &pSession->connectedProfile;
- palCopyMemory(pMac->hHdd, roamInfo.peerMac,
+ palCopyMemory(pMac->hHdd, roamInfo.peerMac,
pCommand->u.roamCmd.peerMac, sizeof(tSirMacAddr));
roamInfo.reasonCode = eCSR_ROAM_RESULT_FORCED;
roamInfo.statusCode = eSIR_SME_SUCCESS;
- status = csrRoamCallCallback(pMac, sessionId,
- &roamInfo, pCommand->u.roamCmd.roamId,
+ status = csrRoamCallCallback(pMac, sessionId,
+ &roamInfo, pCommand->u.roamCmd.roamId,
eCSR_ROAM_LOSTLINK, eCSR_ROAM_RESULT_FORCED);
}
}
@@ -5802,7 +5810,7 @@ eHalStatus csrRoamCopyProfile(tpAniSirGlobal pMac, tCsrRoamProfile *pDstProfile,
{
eHalStatus status = eHAL_STATUS_SUCCESS;
tANI_U32 size = 0;
-
+
do
{
palZeroMemory(pMac->hHdd, pDstProfile, sizeof(tCsrRoamProfile));
@@ -5908,7 +5916,7 @@ eHalStatus csrRoamCopyProfile(tpAniSirGlobal pMac, tCsrRoamProfile *pDstProfile,
pDstProfile->BSSType = pSrcProfile->BSSType;
pDstProfile->phyMode = pSrcProfile->phyMode;
pDstProfile->csrPersona = pSrcProfile->csrPersona;
-
+
#ifdef FEATURE_WLAN_WAPI
if(csrIsProfileWapi(pSrcProfile))
{
@@ -5927,10 +5935,10 @@ eHalStatus csrRoamCopyProfile(tpAniSirGlobal pMac, tCsrRoamProfile *pDstProfile,
pDstProfile->fwdWPSPBCProbeReq = pSrcProfile->fwdWPSPBCProbeReq;
pDstProfile->csr80211AuthType = pSrcProfile->csr80211AuthType;
pDstProfile->dtimPeriod = pSrcProfile->dtimPeriod;
- pDstProfile->ApUapsdEnable = pSrcProfile->ApUapsdEnable;
+ pDstProfile->ApUapsdEnable = pSrcProfile->ApUapsdEnable;
pDstProfile->SSIDs.SSIDList[0].ssidHidden = pSrcProfile->SSIDs.SSIDList[0].ssidHidden;
- pDstProfile->protEnabled = pSrcProfile->protEnabled;
- pDstProfile->obssProtEnabled = pSrcProfile->obssProtEnabled;
+ pDstProfile->protEnabled = pSrcProfile->protEnabled;
+ pDstProfile->obssProtEnabled = pSrcProfile->obssProtEnabled;
pDstProfile->cfg_protection = pSrcProfile->cfg_protection;
pDstProfile->wps_state = pSrcProfile->wps_state;
pDstProfile->ieee80211d = pSrcProfile->ieee80211d;
@@ -5943,19 +5951,19 @@ eHalStatus csrRoamCopyProfile(tpAniSirGlobal pMac, tCsrRoamProfile *pDstProfile,
}
#endif
}while(0);
-
+
if(!HAL_STATUS_SUCCESS(status))
{
csrReleaseProfile(pMac, pDstProfile);
pDstProfile = NULL;
}
-
+
return (status);
}
eHalStatus csrRoamCopyConnectedProfile(tpAniSirGlobal pMac, tANI_U32 sessionId, tCsrRoamProfile *pDstProfile )
{
eHalStatus status = eHAL_STATUS_SUCCESS;
- tCsrRoamConnectedProfile *pSrcProfile = &pMac->roam.roamSession[sessionId].connectedProfile;
+ tCsrRoamConnectedProfile *pSrcProfile = &pMac->roam.roamSession[sessionId].connectedProfile;
do
{
palZeroMemory(pMac->hHdd, pDstProfile, sizeof(tCsrRoamProfile));
@@ -6019,26 +6027,26 @@ eHalStatus csrRoamCopyConnectedProfile(tpAniSirGlobal pMac, tANI_U32 sessionId,
pDstProfile->MDID.mobilityDomain = pSrcProfile->MDID.mobilityDomain;
}
#endif
-
+
}while(0);
-
+
if(!HAL_STATUS_SUCCESS(status))
{
csrReleaseProfile(pMac, pDstProfile);
pDstProfile = NULL;
}
-
+
return (status);
}
-eHalStatus csrRoamIssueConnect(tpAniSirGlobal pMac, tANI_U32 sessionId, tCsrRoamProfile *pProfile,
- tScanResultHandle hBSSList,
+eHalStatus csrRoamIssueConnect(tpAniSirGlobal pMac, tANI_U32 sessionId, tCsrRoamProfile *pProfile,
+ tScanResultHandle hBSSList,
eCsrRoamReason reason, tANI_U32 roamId, tANI_BOOLEAN fImediate,
tANI_BOOLEAN fClearScan)
{
eHalStatus status = eHAL_STATUS_SUCCESS;
tSmeCmd *pCommand;
-
+
pCommand = csrGetCommandBuffer(pMac);
if(NULL == pCommand)
{
@@ -6058,11 +6066,11 @@ eHalStatus csrRoamIssueConnect(tpAniSirGlobal pMac, tANI_U32 sessionId, tCsrRoam
//We can roam now
//Since pProfile is NULL, we need to build our own profile, set everything to default
//We can only support open and no encryption
- pCommand->u.roamCmd.roamProfile.AuthType.numEntries = 1;
+ pCommand->u.roamCmd.roamProfile.AuthType.numEntries = 1;
pCommand->u.roamCmd.roamProfile.AuthType.authType[0] = eCSR_AUTH_TYPE_OPEN_SYSTEM;
pCommand->u.roamCmd.roamProfile.EncryptionType.numEntries = 1;
pCommand->u.roamCmd.roamProfile.EncryptionType.encryptionType[0] = eCSR_ENCRYPT_TYPE_NONE;
- pCommand->u.roamCmd.roamProfile.csrPersona = VOS_STA_MODE;
+ pCommand->u.roamCmd.roamProfile.csrPersona = VOS_STA_MODE;
}
else
{
@@ -6091,7 +6099,7 @@ eHalStatus csrRoamIssueConnect(tpAniSirGlobal pMac, tANI_U32 sessionId, tCsrRoam
csrReleaseCommandRoam( pMac, pCommand );
}
}
-
+
return (status);
}
eHalStatus csrRoamIssueReassoc(tpAniSirGlobal pMac, tANI_U32 sessionId, tCsrRoamProfile *pProfile,
@@ -6100,7 +6108,7 @@ eHalStatus csrRoamIssueReassoc(tpAniSirGlobal pMac, tANI_U32 sessionId, tCsrRoam
{
eHalStatus status = eHAL_STATUS_SUCCESS;
tSmeCmd *pCommand;
-
+
pCommand = csrGetCommandBuffer(pMac);
if(NULL == pCommand)
{
@@ -6135,7 +6143,7 @@ eHalStatus csrRoamIssueReassoc(tpAniSirGlobal pMac, tANI_U32 sessionId, tCsrRoam
pCommand->u.roamCmd.roamReason = reason;
//We need to free the BssList when the command is done
//For reassoc there is no BSS list, so the boolean set to false
- pCommand->u.roamCmd.hBSSList = CSR_INVALID_SCANRESULT_HANDLE;
+ pCommand->u.roamCmd.hBSSList = CSR_INVALID_SCANRESULT_HANDLE;
pCommand->u.roamCmd.fReleaseBssList = eANI_BOOLEAN_FALSE;
pCommand->u.roamCmd.fReassoc = eANI_BOOLEAN_TRUE;
status = csrQueueSmeCommand(pMac, pCommand, fImediate);
@@ -6155,7 +6163,7 @@ eHalStatus csrRoamEnqueuePreauth(tpAniSirGlobal pMac, tANI_U32 sessionId, tpSirB
{
eHalStatus status = eHAL_STATUS_SUCCESS;
tSmeCmd *pCommand;
-
+
pCommand = csrGetCommandBuffer(pMac);
if(NULL == pCommand)
{
@@ -6171,7 +6179,7 @@ eHalStatus csrRoamEnqueuePreauth(tpAniSirGlobal pMac, tANI_U32 sessionId, tpSirB
pCommand->sessionId = (tANI_U8)sessionId;
pCommand->u.roamCmd.roamReason = reason;
//this is the important parameter
- //in this case we are using this field for the "next" BSS
+ //in this case we are using this field for the "next" BSS
pCommand->u.roamCmd.pLastRoamBss = pBssDescription;
status = csrQueueSmeCommand(pMac, pCommand, fImmediate);
if( !HAL_STATUS_SUCCESS( status ) )
@@ -6197,9 +6205,9 @@ eHalStatus csrRoamDequeuePreauth(tpAniSirGlobal pMac)
if ( pEntry )
{
pCommand = GET_BASE_ADDR( pEntry, tSmeCmd, Link );
- if ( (eSmeCommandRoam == pCommand->command) &&
+ if ( (eSmeCommandRoam == pCommand->command) &&
(eCsrPerformPreauth == pCommand->u.roamCmd.roamReason))
- {
+ {
smsLog( pMac, LOG1, FL("DQ-Command = %d, Reason = %d"),
pCommand->command, pCommand->u.roamCmd.roamReason);
if (csrLLRemoveEntry( &pMac->sme.smeCmdActiveList, pEntry, LL_ACCESS_LOCK )) {
@@ -6217,7 +6225,7 @@ eHalStatus csrRoamDequeuePreauth(tpAniSirGlobal pMac)
return eHAL_STATUS_SUCCESS;
}
-eHalStatus csrRoamConnectWithBSSList(tpAniSirGlobal pMac, tANI_U32 sessionId, tCsrRoamProfile *pProfile,
+eHalStatus csrRoamConnectWithBSSList(tpAniSirGlobal pMac, tANI_U32 sessionId, tCsrRoamProfile *pProfile,
tScanResultHandle hBssListIn, tANI_U32 *pRoamId)
{
eHalStatus status = eHAL_STATUS_FAILURE;
@@ -6231,7 +6239,7 @@ eHalStatus csrRoamConnectWithBSSList(tpAniSirGlobal pMac, tANI_U32 sessionId, tC
{
*pRoamId = roamId;
}
- status = csrRoamIssueConnect(pMac, sessionId, pProfile, hBSSList, eCsrHddIssued,
+ status = csrRoamIssueConnect(pMac, sessionId, pProfile, hBSSList, eCsrHddIssued,
roamId, eANI_BOOLEAN_FALSE, eANI_BOOLEAN_FALSE);
if(!HAL_STATUS_SUCCESS(status))
{
@@ -6242,7 +6250,7 @@ eHalStatus csrRoamConnectWithBSSList(tpAniSirGlobal pMac, tANI_U32 sessionId, tC
return (status);
}
-eHalStatus csrRoamConnect(tpAniSirGlobal pMac, tANI_U32 sessionId, tCsrRoamProfile *pProfile,
+eHalStatus csrRoamConnect(tpAniSirGlobal pMac, tANI_U32 sessionId, tCsrRoamProfile *pProfile,
tScanResultHandle hBssListIn, tANI_U32 *pRoamId)
{
eHalStatus status = eHAL_STATUS_SUCCESS;
@@ -6258,7 +6266,7 @@ eHalStatus csrRoamConnect(tpAniSirGlobal pMac, tANI_U32 sessionId, tCsrRoamProfi
}
smsLog(pMac, LOG1, FL("called BSSType = %d authtype = %d encryType = %d"),
pProfile->BSSType, pProfile->AuthType.authType[0], pProfile->EncryptionType.encryptionType[0]);
- if( CSR_IS_WDS( pProfile ) &&
+ if( CSR_IS_WDS( pProfile ) &&
!HAL_STATUS_SUCCESS( status = csrIsBTAMPAllowed( pMac, pProfile->operationChannel ) ) )
{
smsLog(pMac, LOGE, FL("Request for BT AMP connection failed, channel requested is different than infra = %d"),
@@ -6284,7 +6292,7 @@ eHalStatus csrRoamConnect(tpAniSirGlobal pMac, tANI_U32 sessionId, tCsrRoamProfi
}
}
#ifdef FEATURE_WLAN_BTAMP_UT_RF
- pSession->maxRetryCount = CSR_JOIN_MAX_RETRY_COUNT;
+ pSession->maxRetryCount = CSR_JOIN_MAX_RETRY_COUNT;
#endif
if(CSR_INVALID_SCANRESULT_HANDLE != hBssListIn)
{
@@ -6312,7 +6320,7 @@ eHalStatus csrRoamConnect(tpAniSirGlobal pMac, tANI_U32 sessionId, tCsrRoamProfi
pScanFilter->EncryptionType.numEntries = 1;
pScanFilter->EncryptionType.encryptionType[0] = eCSR_ENCRYPT_TYPE_NONE;
}//we don't have a profile
- else
+ else
{
//Here is the profile we need to connect to
status = csrRoamPrepareFilterFromProfile(pMac, pProfile, pScanFilter);
@@ -6322,7 +6330,7 @@ eHalStatus csrRoamConnect(tpAniSirGlobal pMac, tANI_U32 sessionId, tCsrRoamProfi
{
*pRoamId = roamId;
}
-
+
if(HAL_STATUS_SUCCESS(status))
{
/*Save the WPS info*/
@@ -6341,7 +6349,7 @@ eHalStatus csrRoamConnect(tpAniSirGlobal pMac, tANI_U32 sessionId, tCsrRoamProfi
)
{
//This can be started right away
- status = csrRoamIssueConnect(pMac, sessionId, pProfile, NULL, eCsrHddIssued,
+ status = csrRoamIssueConnect(pMac, sessionId, pProfile, NULL, eCsrHddIssued,
roamId, eANI_BOOLEAN_FALSE, eANI_BOOLEAN_FALSE);
if(!HAL_STATUS_SUCCESS(status))
{
@@ -6358,7 +6366,7 @@ eHalStatus csrRoamConnect(tpAniSirGlobal pMac, tANI_U32 sessionId, tCsrRoamProfi
smsLog(pMac, LOG1, "************ csrScanGetResult Status ********* %d", status);
if(HAL_STATUS_SUCCESS(status))
{
- status = csrRoamIssueConnect(pMac, sessionId, pProfile, hBSSList, eCsrHddIssued,
+ status = csrRoamIssueConnect(pMac, sessionId, pProfile, hBSSList, eCsrHddIssued,
roamId, eANI_BOOLEAN_FALSE, eANI_BOOLEAN_FALSE);
if(!HAL_STATUS_SUCCESS(status))
{
@@ -6372,7 +6380,7 @@ eHalStatus csrRoamConnect(tpAniSirGlobal pMac, tANI_U32 sessionId, tCsrRoamProfi
//Check whether it is for start ibss
if(CSR_IS_START_IBSS(pProfile))
{
- status = csrRoamIssueConnect(pMac, sessionId, pProfile, NULL, eCsrHddIssued,
+ status = csrRoamIssueConnect(pMac, sessionId, pProfile, NULL, eCsrHddIssued,
roamId, eANI_BOOLEAN_FALSE, eANI_BOOLEAN_FALSE);
if(!HAL_STATUS_SUCCESS(status))
{
@@ -6406,7 +6414,7 @@ eHalStatus csrRoamConnect(tpAniSirGlobal pMac, tANI_U32 sessionId, tCsrRoamProfi
csrFreeScanFilter(pMac, pScanFilter);
}
}//Got the scan filter from profile
-
+
palFreeMemory(pMac->hHdd, pScanFilter);
}//allocated memory for pScanFilter
}//No Bsslist coming in
@@ -6415,9 +6423,9 @@ eHalStatus csrRoamConnect(tpAniSirGlobal pMac, tANI_U32 sessionId, tCsrRoamProfi
{
csrRoamCallCallback(pMac, sessionId, NULL, roamId, eCSR_ROAM_FAILED, eCSR_ROAM_RESULT_FAILURE);
}
-
+
return (status);
-}
+}
eHalStatus csrRoamReassoc(tpAniSirGlobal pMac, tANI_U32 sessionId, tCsrRoamProfile *pProfile,
tCsrRoamModifyProfileFields modProfileFields,
tANI_U32 *pRoamId)
@@ -6441,7 +6449,7 @@ eHalStatus csrRoamReassoc(tpAniSirGlobal pMac, tANI_U32 sessionId, tCsrRoamProfi
{
if(pProfile)
{
- if(pProfile->SSIDs.numOfSSIDs &&
+ if(pProfile->SSIDs.numOfSSIDs &&
csrIsSsidInList(pMac, &pSession->connectedProfile.SSID, &pProfile->SSIDs))
{
fCallCallback = eANI_BOOLEAN_FALSE;
@@ -6451,8 +6459,8 @@ eHalStatus csrRoamReassoc(tpAniSirGlobal pMac, tANI_U32 sessionId, tCsrRoamProfi
smsLog(pMac, LOG1, FL("Not connected to the same SSID asked in the profile"));
}
}
- else if(!palEqualMemory(pMac->hHdd, &modProfileFields,
- &pSession->connectedProfile.modifyProfileFields,
+ else if(!palEqualMemory(pMac->hHdd, &modProfileFields,
+ &pSession->connectedProfile.modifyProfileFields,
sizeof(tCsrRoamModifyProfileFields)))
{
fCallCallback = eANI_BOOLEAN_FALSE;
@@ -6475,12 +6483,12 @@ eHalStatus csrRoamReassoc(tpAniSirGlobal pMac, tANI_U32 sessionId, tCsrRoamProfi
*pRoamId = roamId;
}
- status = csrRoamIssueReassoc(pMac, sessionId, pProfile, &modProfileFields,
+ status = csrRoamIssueReassoc(pMac, sessionId, pProfile, &modProfileFields,
eCsrHddIssuedReassocToSameAP, roamId, eANI_BOOLEAN_FALSE);
}
else
{
- status = csrRoamCallCallback(pMac, sessionId, NULL, roamId,
+ status = csrRoamCallCallback(pMac, sessionId, NULL, roamId,
eCSR_ROAM_FAILED, eCSR_ROAM_RESULT_FAILURE);
}
return status;
@@ -6499,7 +6507,7 @@ eHalStatus csrRoamJoinLastProfile(tpAniSirGlobal pMac, tANI_U32 sessionId)
smsLog(pMac, LOGE, FL(" session %d not found "), sessionId);
return eHAL_STATUS_FAILURE;
}
-
+
do
{
if(pSession->pCurRoamProfile)
@@ -6531,7 +6539,7 @@ eHalStatus csrRoamJoinLastProfile(tpAniSirGlobal pMac, tANI_U32 sessionId)
{
//we want to put the last connected BSS to the very beginning, if possible
csrMoveBssToHeadFromBSSID(pMac, &pSession->connectedProfile.bssid, hBSSList);
- status = csrRoamIssueConnect(pMac, sessionId, pProfile, hBSSList, eCsrHddIssued,
+ status = csrRoamIssueConnect(pMac, sessionId, pProfile, hBSSList, eCsrHddIssued,
roamId, eANI_BOOLEAN_FALSE, eANI_BOOLEAN_FALSE);
if(!HAL_STATUS_SUCCESS(status))
{
@@ -6601,7 +6609,7 @@ eHalStatus csrRoamProcessDisassocDeauth( tpAniSirGlobal pMac, tSmeCmd *pCommand,
tANI_BOOLEAN fComplete = eANI_BOOLEAN_FALSE;
eCsrRoamSubState NewSubstate;
tANI_U32 sessionId = pCommand->sessionId;
-
+
// change state to 'Roaming'...
csrRoamStateChange( pMac, eCSR_ROAMING_STATE_JOINING, sessionId );
@@ -6615,7 +6623,7 @@ eHalStatus csrRoamProcessDisassocDeauth( tpAniSirGlobal pMac, tSmeCmd *pCommand,
{
smsLog(pMac, LOG1, FL(" restore AC weights (%d-%d-%d-%d)"), pMac->roam.ucACWeights[0], pMac->roam.ucACWeights[1],
pMac->roam.ucACWeights[2], pMac->roam.ucACWeights[3]);
- //Restore AC weight in case we change it
+ //Restore AC weight in case we change it
WLANTL_SetACWeights(pMac->roam.gVosContext, pMac->roam.ucACWeights);
// in Infrasturcture, we need to disassociate from the Infrastructure network...
NewSubstate = eCSR_ROAM_SUBSTATE_DISASSOC_FORCED;
@@ -6643,11 +6651,11 @@ eHalStatus csrRoamProcessDisassocDeauth( tpAniSirGlobal pMac, tSmeCmd *pCommand,
//This has to be WDS station
else if( csrIsConnStateConnectedWds( pMac, sessionId ) ) //This has to be WDS station
{
-
+
pCommand->u.roamCmd.fStopWds = eANI_BOOLEAN_TRUE;
if( fDisassoc )
{
- status = csrRoamIssueDisassociate( pMac, sessionId,
+ status = csrRoamIssueDisassociate( pMac, sessionId,
eCSR_ROAM_SUBSTATE_DISCONNECT_CONTINUE_ROAMING, fMICFailure );
fComplete = (!HAL_STATUS_SUCCESS(status));
}
@@ -6667,7 +6675,7 @@ eHalStatus csrRoamProcessDisassocDeauth( tpAniSirGlobal pMac, tSmeCmd *pCommand,
{
if ( csrIsConnStateInfra( pMac, sessionId ) )
{
- //Set the state to disconnect here
+ //Set the state to disconnect here
pMac->roam.roamSession[sessionId].connectState = eCSR_ASSOC_STATE_TYPE_NOT_CONNECTED;
}
}
@@ -6699,7 +6707,7 @@ eHalStatus csrRoamIssueDisassociateCmd( tpAniSirGlobal pMac, tANI_U32 sessionId,
{
smsLog( pMac, LOG1, FL(" reason = %d"), reason );
pCommand = csrGetCommandBuffer( pMac );
- if ( !pCommand )
+ if ( !pCommand )
{
smsLog( pMac, LOGE, FL(" fail to get command buffer") );
status = eHAL_STATUS_RESOURCES;
@@ -6753,7 +6761,7 @@ eHalStatus csrRoamIssueStopBssCmd( tpAniSirGlobal pMac, tANI_U32 sessionId, tANI
eHalStatus status = eHAL_STATUS_SUCCESS;
tSmeCmd *pCommand;
pCommand = csrGetCommandBuffer( pMac );
- if ( NULL != pCommand )
+ if ( NULL != pCommand )
{
//Change the substate in case it is wait-for-key
if( CSR_IS_WAIT_FOR_KEY( pMac, sessionId) )
@@ -6789,7 +6797,7 @@ eHalStatus csrRoamDisconnectInternal(tpAniSirGlobal pMac, tANI_U32 sessionId, eC
smsLog(pMac, LOGE, FL(" session %d not found "), sessionId);
return eHAL_STATUS_FAILURE;
}
-
+
#ifdef FEATURE_WLAN_BTAMP_UT_RF
//Stop te retry
pSession->maxRetryCount = 0;
@@ -6797,10 +6805,10 @@ eHalStatus csrRoamDisconnectInternal(tpAniSirGlobal pMac, tANI_U32 sessionId, eC
#endif
//Not to call cancel roaming here
//Only issue disconnect when necessary
- if(csrIsConnStateConnected(pMac, sessionId) || csrIsBssTypeIBSS(pSession->connectedProfile.BSSType)
- || csrIsBssTypeWDS(pSession->connectedProfile.BSSType)
+ if(csrIsConnStateConnected(pMac, sessionId) || csrIsBssTypeIBSS(pSession->connectedProfile.BSSType)
+ || csrIsBssTypeWDS(pSession->connectedProfile.BSSType)
|| csrIsRoamCommandWaitingForSession(pMac, sessionId) )
-
+
{
smsLog(pMac, LOG2, FL("called"));
status = csrRoamIssueDisassociateCmd(pMac, sessionId, reason);
@@ -6817,16 +6825,16 @@ eHalStatus csrRoamDisconnect(tpAniSirGlobal pMac, tANI_U32 sessionId, eCsrRoamDi
smsLog(pMac, LOGE, FL(" session %d not found "), sessionId);
return eHAL_STATUS_FAILURE;
}
-
+
csrRoamCancelRoaming(pMac, sessionId);
pSession->ibss_join_pending = FALSE;
csrRoamStopIbssJoinTimer(pMac, sessionId);
csrRoamRemoveDuplicateCommand(pMac, sessionId, NULL, eCsrForcedDisassoc);
-
+
return (csrRoamDisconnectInternal(pMac, sessionId, reason));
}
-eHalStatus csrRoamSaveConnectedInfomation(tpAniSirGlobal pMac, tANI_U32 sessionId, tCsrRoamProfile *pProfile,
+eHalStatus csrRoamSaveConnectedInfomation(tpAniSirGlobal pMac, tANI_U32 sessionId, tCsrRoamProfile *pProfile,
tSirBssDescription *pSirBssDesc, tDot11fBeaconIEs *pIes)
{
eHalStatus status = eHAL_STATUS_SUCCESS;
@@ -6840,7 +6848,7 @@ eHalStatus csrRoamSaveConnectedInfomation(tpAniSirGlobal pMac, tANI_U32 sessionI
smsLog(pMac, LOGE, FL(" session %d not found "), sessionId);
return eHAL_STATUS_FAILURE;
}
-
+
palZeroMemory(pMac->hHdd, &pSession->connectedProfile, sizeof(tCsrRoamConnectedProfile));
pConnectProfile->AuthType = pProfile->negotiatedAuthType;
pConnectProfile->AuthInfo = pProfile->AuthType;
@@ -6869,7 +6877,7 @@ eHalStatus csrRoamSaveConnectedInfomation(tpAniSirGlobal pMac, tANI_U32 sessionI
palCopyMemory(pMac->hHdd, pConnectProfile->pAddIEAssoc, pProfile->pAddIEAssoc,
pProfile->nAddIEAssocLength);
}
-
+
//Save bssid
csrGetBssIdBssDesc(pMac, pSirBssDesc, &pConnectProfile->bssid);
#ifdef WLAN_FEATURE_VOWIFI_11R
@@ -6884,12 +6892,12 @@ eHalStatus csrRoamSaveConnectedInfomation(tpAniSirGlobal pMac, tANI_U32 sessionI
status = csrGetParsedBssDescriptionIEs(pMac, pSirBssDesc, &pIesTemp);
}
#ifdef FEATURE_WLAN_CCX
- if ((csrIsProfileCCX(pProfile) ||
- ((pIesTemp->CCXVersion.present)
- && ((pProfile->negotiatedAuthType == eCSR_AUTH_TYPE_OPEN_SYSTEM)
- || (pProfile->negotiatedAuthType == eCSR_AUTH_TYPE_WPA)
- || (pProfile->negotiatedAuthType == eCSR_AUTH_TYPE_WPA_PSK)
- || (pProfile->negotiatedAuthType == eCSR_AUTH_TYPE_RSN)
+ if ((csrIsProfileCCX(pProfile) ||
+ ((pIesTemp->CCXVersion.present)
+ && ((pProfile->negotiatedAuthType == eCSR_AUTH_TYPE_OPEN_SYSTEM)
+ || (pProfile->negotiatedAuthType == eCSR_AUTH_TYPE_WPA)
+ || (pProfile->negotiatedAuthType == eCSR_AUTH_TYPE_WPA_PSK)
+ || (pProfile->negotiatedAuthType == eCSR_AUTH_TYPE_RSN)
#ifdef WLAN_FEATURE_11W
|| (pProfile->negotiatedAuthType == eCSR_AUTH_TYPE_RSN_PSK_SHA256)
#endif
@@ -6905,13 +6913,13 @@ eHalStatus csrRoamSaveConnectedInfomation(tpAniSirGlobal pMac, tANI_U32 sessionI
if(pIesTemp->SSID.present)
{
pConnectProfile->SSID.length = pIesTemp->SSID.num_ssid;
- palCopyMemory(pMac->hHdd, pConnectProfile->SSID.ssId,
+ palCopyMemory(pMac->hHdd, pConnectProfile->SSID.ssId,
pIesTemp->SSID.ssid, pIesTemp->SSID.num_ssid);
}
-
+
//Save the bss desc
status = csrRoamSaveConnectedBssDesc(pMac, sessionId, pSirBssDesc);
-
+
if( CSR_IS_QOS_BSS(pIesTemp) || pIesTemp->HTCaps.present)
{
//Some HT AP's dont send WMM IE so in that case we assume all HT Ap's are Qos Enabled AP's
@@ -6929,7 +6937,7 @@ eHalStatus csrRoamSaveConnectedInfomation(tpAniSirGlobal pMac, tANI_U32 sessionI
}
//Save Qos connection
pConnectProfile->qosConnection = pMac->roam.roamSession[sessionId].fWMMConnection;
-
+
if(!HAL_STATUS_SUCCESS(status))
{
csrFreeConnectBssDesc(pMac, sessionId);
@@ -6937,7 +6945,7 @@ eHalStatus csrRoamSaveConnectedInfomation(tpAniSirGlobal pMac, tANI_U32 sessionI
for(index = 0; index < pProfile->SSIDs.numOfSSIDs; index++)
{
if((pProfile->SSIDs.SSIDList[index].SSID.length == pConnectProfile->SSID.length) &&
- palEqualMemory(pMac->hHdd, pProfile->SSIDs.SSIDList[index].SSID.ssId,
+ palEqualMemory(pMac->hHdd, pProfile->SSIDs.SSIDList[index].SSID.ssId,
pConnectProfile->SSID.ssId, pConnectProfile->SSID.length))
{
pConnectProfile->handoffPermitted = pProfile->SSIDs.SSIDList[index].handoffPermitted;
@@ -6945,7 +6953,7 @@ eHalStatus csrRoamSaveConnectedInfomation(tpAniSirGlobal pMac, tANI_U32 sessionI
}
pConnectProfile->handoffPermitted = FALSE;
}
-
+
return (status);
}
@@ -6959,7 +6967,7 @@ static void csrRoamJoinRspProcessor( tpAniSirGlobal pMac, tSirSmeJoinRsp *pSmeJo
{
pCommand = GET_BASE_ADDR(pEntry, tSmeCmd, Link);
}
- if ( eSIR_SME_SUCCESS == pSmeJoinRsp->statusCode )
+ if ( eSIR_SME_SUCCESS == pSmeJoinRsp->statusCode )
{
if(pCommand && eCsrSmeIssuedAssocToSimilarAP == pCommand->u.roamCmd.roamReason)
{
@@ -6978,8 +6986,8 @@ static void csrRoamJoinRspProcessor( tpAniSirGlobal pMac, tSirSmeJoinRsp *pSmeJo
smsLog(pMac, LOGE, FL(" session %d not found "), pSmeJoinRsp->sessionId);
return;
}
-
-
+
+
//The head of the active list is the request we sent
//Try to get back the same profile and roam again
if(pCommand)
@@ -7013,8 +7021,8 @@ static void csrRoamJoinRspProcessor( tpAniSirGlobal pMac, tSirSmeJoinRsp *pSmeJo
else
{
csrRoam(pMac, pCommand);
- }
- }
+ }
+ }
else
{
csrRoamComplete( pMac, eCsrNothingToJoin, NULL );
@@ -7022,7 +7030,7 @@ static void csrRoamJoinRspProcessor( tpAniSirGlobal pMac, tSirSmeJoinRsp *pSmeJo
} /*else: ( eSIR_SME_SUCCESS == pSmeJoinRsp->statusCode ) */
}
-eHalStatus csrRoamIssueJoin( tpAniSirGlobal pMac, tANI_U32 sessionId, tSirBssDescription *pSirBssDesc,
+eHalStatus csrRoamIssueJoin( tpAniSirGlobal pMac, tANI_U32 sessionId, tSirBssDescription *pSirBssDesc,
tDot11fBeaconIEs *pIes,
tCsrRoamProfile *pProfile, tANI_U32 roamId )
{
@@ -7030,7 +7038,7 @@ eHalStatus csrRoamIssueJoin( tpAniSirGlobal pMac, tANI_U32 sessionId, tSirBssDes
smsLog( pMac, LOG1, "Attempting to Join Bssid= %02x-%02x-%02x-%02x-%02x-%02x",
pSirBssDesc->bssId[ 0 ],pSirBssDesc->bssId[ 1 ],pSirBssDesc->bssId[ 2 ],
pSirBssDesc->bssId[ 3 ],pSirBssDesc->bssId[ 4 ],pSirBssDesc->bssId[ 5 ] );
-
+
// Set the roaming substate to 'join attempt'...
csrRoamSubstateChange( pMac, eCSR_ROAM_SUBSTATE_JOIN_REQ, sessionId);
// attempt to Join this BSS...
@@ -7038,7 +7046,7 @@ eHalStatus csrRoamIssueJoin( tpAniSirGlobal pMac, tANI_U32 sessionId, tSirBssDes
return (status);
}
-static eHalStatus csrRoamIssueReassociate( tpAniSirGlobal pMac, tANI_U32 sessionId, tSirBssDescription *pSirBssDesc,
+static eHalStatus csrRoamIssueReassociate( tpAniSirGlobal pMac, tANI_U32 sessionId, tSirBssDescription *pSirBssDesc,
tDot11fBeaconIEs *pIes, tCsrRoamProfile *pProfile)
{
csrRoamStateChange( pMac, eCSR_ROAMING_STATE_JOINING, sessionId);
@@ -7046,7 +7054,7 @@ static eHalStatus csrRoamIssueReassociate( tpAniSirGlobal pMac, tANI_U32 session
csrRoamSubstateChange( pMac, eCSR_ROAM_SUBSTATE_REASSOC_REQ, sessionId );
smsLog(pMac, LOGE, FL(" calling csrSendJoinReqMsg (eWNI_SME_REASSOC_REQ)"));
-
+
// attempt to Join this BSS...
return csrSendJoinReqMsg( pMac, sessionId, pSirBssDesc, pProfile, pIes, eWNI_SME_REASSOC_REQ);
}
@@ -7058,7 +7066,7 @@ void csrRoamReissueRoamCommand(tpAniSirGlobal pMac)
tCsrRoamInfo roamInfo;
tANI_U32 sessionId;
tCsrRoamSession *pSession;
-
+
pEntry = csrLLPeekHead(&pMac->sme.smeCmdActiveList, LL_ACCESS_LOCK);
if(pEntry)
{
@@ -7073,7 +7081,7 @@ void csrRoamReissueRoamCommand(tpAniSirGlobal pMac)
smsLog(pMac, LOGE, FL(" session %d not found "), sessionId);
return;
}
-
+
if( pCommand->u.roamCmd.fStopWds )
{
palZeroMemory(pMac->hHdd, &roamInfo, sizeof(tCsrRoamInfo));
@@ -7082,16 +7090,16 @@ void csrRoamReissueRoamCommand(tpAniSirGlobal pMac)
roamInfo.reasonCode = pSession->joinFailStatusCode.reasonCode;
if (CSR_IS_WDS(&pSession->connectedProfile)){
pSession->connectState = eCSR_ASSOC_STATE_TYPE_WDS_DISCONNECTED;
- csrRoamCallCallback(pMac, sessionId, &roamInfo, pCommand->u.roamCmd.roamId,
- eCSR_ROAM_WDS_IND,
+ csrRoamCallCallback(pMac, sessionId, &roamInfo, pCommand->u.roamCmd.roamId,
+ eCSR_ROAM_WDS_IND,
eCSR_ROAM_RESULT_WDS_DISASSOCIATED);
}else if (CSR_IS_INFRA_AP(&pSession->connectedProfile)){
pSession->connectState = eCSR_ASSOC_STATE_TYPE_INFRA_DISCONNECTED;
csrRoamCallCallback(pMac, sessionId, &roamInfo, pCommand->u.roamCmd.roamId,
eCSR_ROAM_INFRA_IND,
eCSR_ROAM_RESULT_INFRA_DISASSOCIATED);
- }
-
+ }
+
if( !HAL_STATUS_SUCCESS( csrRoamIssueStopBss( pMac, sessionId, eCSR_ROAM_SUBSTATE_STOP_BSS_REQ ) ) )
{
@@ -7110,7 +7118,7 @@ void csrRoamReissueRoamCommand(tpAniSirGlobal pMac)
smsLog(pMac, LOGW, " Command is not roaming after disassociated");
}
}
- else
+ else
{
smsLog(pMac, LOGE, " Disassoc rsp cannot continue because no command is available");
}
@@ -7191,8 +7199,8 @@ tANI_BOOLEAN csrIsScanForRoamCommandActive( tpAniSirGlobal pMac )
if( pEntry )
{
pCommand = GET_BASE_ADDR(pEntry, tCsrCmd, Link);
- if( ( eCsrRoamCommandScan == pCommand->command ) &&
- ( ( eCsrScanForSsid == pCommand->u.scanCmd.reason ) ||
+ if( ( eCsrRoamCommandScan == pCommand->command ) &&
+ ( ( eCsrScanForSsid == pCommand->u.scanCmd.reason ) ||
( eCsrScanForCapsChange == pCommand->u.scanCmd.reason ) ||
( eCsrScanP2PFindPeer == pCommand->u.scanCmd.reason ) ) )
{
@@ -7208,13 +7216,13 @@ eHalStatus csrRoamIssueReassociateCmd( tpAniSirGlobal pMac, tANI_U32 sessionId )
tSmeCmd *pCommand = NULL;
tANI_BOOLEAN fHighPriority = eANI_BOOLEAN_TRUE;
tANI_BOOLEAN fRemoveCmd = FALSE;
- tListElem *pEntry;
+ tListElem *pEntry;
// Delete the old assoc command. All is setup for reassoc to be serialized
pEntry = csrLLPeekHead( &pMac->sme.smeCmdActiveList, LL_ACCESS_LOCK );
if ( pEntry )
{
pCommand = GET_BASE_ADDR( pEntry, tSmeCmd, Link );
- if ( !pCommand )
+ if ( !pCommand )
{
smsLog( pMac, LOGE, FL(" fail to get command buffer") );
return eHAL_STATUS_RESOURCES;
@@ -7225,7 +7233,7 @@ eHalStatus csrRoamIssueReassociateCmd( tpAniSirGlobal pMac, tANI_U32 sessionId )
{
fRemoveCmd = csrLLRemoveEntry( &pMac->sme.smeCmdActiveList, pEntry, LL_ACCESS_LOCK );
}
- else
+ else
{
smsLog( pMac, LOGE, FL(" Unexpected active roam command present ") );
}
@@ -7242,7 +7250,7 @@ eHalStatus csrRoamIssueReassociateCmd( tpAniSirGlobal pMac, tANI_U32 sessionId )
smsLog( pMac, LOGE, FL(" fail to get command buffer as expected based on previous connect roam command") );
return eHAL_STATUS_RESOURCES;
}
- do
+ do
{
//Change the substate in case it is wait-for-key
if( CSR_IS_WAIT_FOR_KEY( pMac, sessionId ) )
@@ -7285,12 +7293,12 @@ static void csrRoamingStateConfigCnfProcessor( tpAniSirGlobal pMac, tANI_U32 res
smsLog(pMac, LOGE, FL(" session %d not found "), sessionId);
return;
}
-
+
if(CSR_IS_ROAMING(pSession) && pSession->fCancelRoaming)
{
//the roaming is cancelled. Simply complete the command
smsLog(pMac, LOGW, FL(" Roam command cancelled"));
- csrRoamComplete(pMac, eCsrNothingToJoin, NULL);
+ csrRoamComplete(pMac, eCsrNothingToJoin, NULL);
}
/* If the roaming has stopped, not to continue the roaming command*/
else if ( !CSR_IS_ROAMING(pSession) && CSR_IS_ROAMING_COMMAND(pCommand) )
@@ -7314,12 +7322,12 @@ static void csrRoamingStateConfigCnfProcessor( tpAniSirGlobal pMac, tANI_U32 res
pBssDesc = &pScanResult->Result.BssDescriptor;
}
if ( csrIsBssTypeIBSS( pCommand->u.roamCmd.roamProfile.BSSType ) ||
- CSR_IS_WDS( &pCommand->u.roamCmd.roamProfile )
- || CSR_IS_INFRA_AP(&pCommand->u.roamCmd.roamProfile)
+ CSR_IS_WDS( &pCommand->u.roamCmd.roamProfile )
+ || CSR_IS_INFRA_AP(&pCommand->u.roamCmd.roamProfile)
)
{
if(!HAL_STATUS_SUCCESS(csrRoamIssueStartBss( pMac, sessionId,
- &pSession->bssParams, &pCommand->u.roamCmd.roamProfile,
+ &pSession->bssParams, &pCommand->u.roamCmd.roamProfile,
pBssDesc, pCommand->u.roamCmd.roamId )))
{
smsLog(pMac, LOGW, " CSR start BSS failed");
@@ -7335,9 +7343,9 @@ static void csrRoamingStateConfigCnfProcessor( tpAniSirGlobal pMac, tANI_U32 res
//We need to complete the command
csrRoamComplete(pMac, eCsrJoinFailure, NULL);
return;
- }
+ }
// If we are roaming TO an Infrastructure BSS...
- VOS_ASSERT(pScanResult != NULL);
+ VOS_ASSERT(pScanResult != NULL);
if ( csrIsInfraBssDesc( pBssDesc ) )
{
tDot11fBeaconIEs *pIesLocal = (tDot11fBeaconIEs *)pScanResult->Result.pvIes;
@@ -7347,7 +7355,7 @@ static void csrRoamingStateConfigCnfProcessor( tpAniSirGlobal pMac, tANI_U32 res
if( csrIsConnStateConnectedInfra( pMac, sessionId ) )
{
// ...and the SSIDs are equal, then we Reassoc.
- if ( csrIsSsidEqual( pMac, pSession->pConnectBssDesc, pBssDesc,
+ if ( csrIsSsidEqual( pMac, pSession->pConnectBssDesc, pBssDesc,
pIesLocal ) )
// ..and currently in an infrastructure connection
{
@@ -7358,11 +7366,11 @@ static void csrRoamingStateConfigCnfProcessor( tpAniSirGlobal pMac, tANI_U32 res
}
else
{
-
+
// otherwise, we have to issue a new Join request to LIM because we disassociated from the
// previously associated AP.
- if(!HAL_STATUS_SUCCESS(csrRoamIssueJoin( pMac, sessionId, pBssDesc,
- pIesLocal,
+ if(!HAL_STATUS_SUCCESS(csrRoamIssueJoin( pMac, sessionId, pBssDesc,
+ pIesLocal,
&pCommand->u.roamCmd.roamProfile, pCommand->u.roamCmd.roamId )))
{
//try something else
@@ -7373,22 +7381,22 @@ static void csrRoamingStateConfigCnfProcessor( tpAniSirGlobal pMac, tANI_U32 res
else
{
eHalStatus status = eHAL_STATUS_SUCCESS;
-
+
/* We need to come with other way to figure out that this is because of HO in BMP
The below API will be only available for Android as it uses a different HO algorithm */
- /* Reassoc request will be used only for CCX and 11r handoff whereas other legacy roaming should
+ /* Reassoc request will be used only for CCX and 11r handoff whereas other legacy roaming should
* use join request */
#ifdef WLAN_FEATURE_VOWIFI_11R
- if (csrRoamIsHandoffInProgress(pMac) &&
+ if (csrRoamIsHandoffInProgress(pMac) &&
csrRoamIs11rAssoc(pMac))
{
- status = csrRoamIssueReassociate(pMac, sessionId, pBssDesc,
+ status = csrRoamIssueReassociate(pMac, sessionId, pBssDesc,
(tDot11fBeaconIEs *)( pScanResult->Result.pvIes ), &pCommand->u.roamCmd.roamProfile);
}
else
#endif
#ifdef FEATURE_WLAN_CCX
- if (csrRoamIsHandoffInProgress(pMac) &&
+ if (csrRoamIsHandoffInProgress(pMac) &&
csrRoamIsCCXAssoc(pMac))
{
// Now serialize the reassoc command.
@@ -7397,7 +7405,7 @@ static void csrRoamingStateConfigCnfProcessor( tpAniSirGlobal pMac, tANI_U32 res
else
#endif
#ifdef FEATURE_WLAN_LFR
- if (csrRoamIsHandoffInProgress(pMac) &&
+ if (csrRoamIsHandoffInProgress(pMac) &&
csrRoamIsFastRoamEnabled(pMac, sessionId))
{
// Now serialize the reassoc command.
@@ -7408,7 +7416,7 @@ static void csrRoamingStateConfigCnfProcessor( tpAniSirGlobal pMac, tANI_U32 res
// else we are not connected and attempting to Join. Issue the
// Join request.
{
- status = csrRoamIssueJoin( pMac, sessionId, pBssDesc,
+ status = csrRoamIssueJoin( pMac, sessionId, pBssDesc,
(tDot11fBeaconIEs *)( pScanResult->Result.pvIes ),
&pCommand->u.roamCmd.roamProfile, pCommand->u.roamCmd.roamId );
}
@@ -7433,7 +7441,7 @@ static void csrRoamingStateConfigCnfProcessor( tpAniSirGlobal pMac, tANI_U32 res
}//if ( WNI_CFG_SUCCESS == result )
else
{
- // In the event the configuration failed, for infra let the roam processor
+ // In the event the configuration failed, for infra let the roam processor
//attempt to join something else...
if( pCommand->u.roamCmd.pRoamBssEntry && CSR_IS_INFRASTRUCTURE( &pCommand->u.roamCmd.roamProfile ) )
{
@@ -7459,7 +7467,7 @@ 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 )
+ 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
@@ -7481,14 +7489,14 @@ static void csrRoamRoamingStateReassocRspProcessor( tpAniSirGlobal pMac, tpSirSm
tpCsrNeighborRoamControlInfo pNeighborRoamInfo = &pMac->roam.neighborRoamInfo;
tCsrRoamInfo roamInfo;
tANI_U32 roamId = 0;
-
- if ( eSIR_SME_SUCCESS == pSmeJoinRsp->statusCode )
+
+ if ( eSIR_SME_SUCCESS == pSmeJoinRsp->statusCode )
{
smsLog( pMac, LOGW, "CSR SmeReassocReq Successful" );
result = eCsrReassocSuccess;
/* Defeaturize this part later if needed */
#ifdef WLAN_FEATURE_NEIGHBOR_ROAMING
- /* Since the neighbor roam algorithm uses reassoc req for handoff instead of join,
+ /* Since the neighbor roam algorithm uses reassoc req for handoff instead of join,
* we need the response contents while processing the result in csrRoamProcessResults() */
if (csrRoamIsHandoffInProgress(pMac))
{
@@ -7512,7 +7520,7 @@ static void csrRoamRoamingStateReassocRspProcessor( tpAniSirGlobal pMac, tpSirSm
if ((eSIR_SME_FT_REASSOC_TIMEOUT_FAILURE == pSmeJoinRsp->statusCode) ||
(eSIR_SME_FT_REASSOC_FAILURE == pSmeJoinRsp->statusCode))
{
- // Inform HDD to turn off FT flag in HDD
+ // Inform HDD to turn off FT flag in HDD
if (pNeighborRoamInfo)
{
vos_mem_zero(&roamInfo, sizeof(tCsrRoamInfo));
@@ -7520,12 +7528,12 @@ static void csrRoamRoamingStateReassocRspProcessor( tpAniSirGlobal pMac, tpSirSm
&roamInfo, roamId, eCSR_ROAM_FT_REASSOC_FAILED, eSIR_SME_SUCCESS);
/*
* Since the above callback sends a disconnect
- * to HDD, we should clean-up our state
+ * to HDD, we should clean-up our state
* machine as well to be in sync with the upper
- * layers. There is no need to send a disassoc
- * since: 1) we will never reassoc to the current
- * AP in LFR, and 2) there is no need to issue a
- * disassoc to the AP with which we were trying
+ * layers. There is no need to send a disassoc
+ * since: 1) we will never reassoc to the current
+ * AP in LFR, and 2) there is no need to issue a
+ * disassoc to the AP with which we were trying
* to reassoc.
*/
csrRoamComplete( pMac, eCsrJoinFailure, NULL );
@@ -7609,7 +7617,7 @@ void csrRoamRoamingStateDisassocRspProcessor( tpAniSirGlobal pMac, tSirSmeDisass
smsLog(pMac, LOGE, FL(" session %d not found "), sessionId);
return;
}
-
+
if ( CSR_IS_ROAM_SUBSTATE_DISASSOC_NO_JOIN( pMac, sessionId ) )
{
csrRoamComplete( pMac, eCsrNothingToJoin, NULL );
@@ -7621,7 +7629,7 @@ void csrRoamRoamingStateDisassocRspProcessor( tpAniSirGlobal pMac, tSirSmeDisass
{
smsLog( pMac, LOG2, "CSR SmeDisassocReq force disassociated Successfully" );
//A callback to HDD will be issued from csrRoamComplete so no need to do anything here
- }
+ }
csrRoamComplete( pMac, eCsrNothingToJoin, NULL );
}
else if ( CSR_IS_ROAM_SUBSTATE_DISASSOC_HO( pMac, sessionId ) )
@@ -7636,7 +7644,7 @@ void csrRoamRoamingStateDisassocRspProcessor( tpAniSirGlobal pMac, tSirSmeDisass
if(HAL_STATUS_SUCCESS(status))
{
palZeroMemory(pMac->hHdd, pScanFilter, sizeof(tCsrScanResultFilter));
- status = csrRoamPrepareFilterFromProfile(pMac,
+ status = csrRoamPrepareFilterFromProfile(pMac,
&pMac->roam.neighborRoamInfo.csrNeighborRoamProfile, pScanFilter);
if(!HAL_STATUS_SUCCESS(status))
{
@@ -7677,7 +7685,7 @@ void csrRoamRoamingStateDisassocRspProcessor( tpAniSirGlobal pMac, tSirSmeDisass
{
/*
- * we need to process the result first before removing it from active list
+ * we need to process the result first before removing it from active list
* because state changes still happening insides roamQProcessRoamResults so
* no other roam command should be issued.
*/
@@ -7708,22 +7716,22 @@ void csrRoamRoamingStateDisassocRspProcessor( tpAniSirGlobal pMac, tSirSmeDisass
/* Notify HDD about handoff and provide the BSSID too */
roamInfo.reasonCode = eCsrRoamReasonBetterAP;
- palCopyMemory(pMac->hHdd, roamInfo.bssid,
- pMac->roam.neighborRoamInfo.csrNeighborRoamProfile.BSSIDs.bssid,
+ palCopyMemory(pMac->hHdd, roamInfo.bssid,
+ pMac->roam.neighborRoamInfo.csrNeighborRoamProfile.BSSIDs.bssid,
sizeof(tSirMacAddr));
- csrRoamCallCallback(pMac,sessionId, &roamInfo, 0,
+ csrRoamCallCallback(pMac,sessionId, &roamInfo, 0,
eCSR_ROAM_ROAMING_START, eCSR_ROAM_RESULT_NONE);
/* Copy the connected profile to apply the same for this connection as well */
- if(HAL_STATUS_SUCCESS(palAllocateMemory(pMac->hHdd,
+ if(HAL_STATUS_SUCCESS(palAllocateMemory(pMac->hHdd,
(void **)&pCurRoamProfile, sizeof(tCsrRoamProfile))))
{
palZeroMemory(pMac->hHdd, pCurRoamProfile, sizeof(tCsrRoamProfile));
csrRoamCopyProfile(pMac, pCurRoamProfile, pSession->pCurRoamProfile);
//make sure to put it at the head of the cmd queue
- status = csrRoamIssueConnect(pMac, sessionId, pCurRoamProfile,
- hBSSList, eCsrSmeIssuedAssocToSimilarAP,
+ status = csrRoamIssueConnect(pMac, sessionId, pCurRoamProfile,
+ hBSSList, eCsrSmeIssuedAssocToSimilarAP,
roamId, eANI_BOOLEAN_TRUE, eANI_BOOLEAN_FALSE);
if(!HAL_STATUS_SUCCESS(status))
@@ -7732,7 +7740,7 @@ void csrRoamRoamingStateDisassocRspProcessor( tpAniSirGlobal pMac, tSirSmeDisass
__func__, status);
fCallCallback = eANI_BOOLEAN_TRUE;
}
-
+
/* Notify sub-modules like QoS etc. that handoff happening */
sme_QosCsrEventInd(pMac, sessionId, SME_QOS_CSR_HANDOFF_ASSOC_REQ, NULL);
csrReleaseProfile(pMac, pCurRoamProfile);
@@ -7756,14 +7764,14 @@ POST_ROAM_FAILURE:
csrRoamCallCallback(pMac, sessionId,
&roamInfo, 0, eCSR_ROAM_FT_REASSOC_FAILED, eSIR_SME_SUCCESS);
- /*
+ /*
* Issue a disassoc request so that PE/LIM uses this to clean-up the FT session.
* Upon success, we would re-enter this routine after receiving the disassoc
* response and will fall into the reassoc fail sub-state. And, eventually
- * call csrRoamComplete which would remove the roam command from SME active
+ * call csrRoamComplete which would remove the roam command from SME active
* queue.
*/
- if (!HAL_STATUS_SUCCESS(csrRoamIssueDisassociate(pMac, sessionId,
+ if (!HAL_STATUS_SUCCESS(csrRoamIssueDisassociate(pMac, sessionId,
eCSR_ROAM_SUBSTATE_DISASSOC_REASSOC_FAILURE, FALSE)))
{
smsLog( pMac, LOGE,"%s: csrRoamIssueDisassociate failed with status %d",
@@ -7790,7 +7798,7 @@ POST_ROAM_FAILURE:
// Infrastructure network.
// - Third is where we are doing an Infra to Infra roam between networks with different
// SSIDs. In all cases, we set the new Bss configuration here and attempt to join
-
+
smsLog( pMac, LOG2, "CSR SmeDisassocReq disassociated Successfully" );
}
else
@@ -7814,7 +7822,7 @@ static void csrRoamRoamingStateDeauthRspProcessor( tpAniSirGlobal pMac, tSirSmeD
}
else
{
- if ( eSIR_SME_SUCCESS == statusCode )
+ if ( eSIR_SME_SUCCESS == statusCode )
{
// Successfully deauth from the 'old' Bss...
//
@@ -7832,13 +7840,13 @@ static void csrRoamRoamingStateDeauthRspProcessor( tpAniSirGlobal pMac, tSirSmeD
static void csrRoamRoamingStateStartBssRspProcessor( tpAniSirGlobal pMac, tSirSmeStartBssRsp *pSmeStartBssRsp )
{
eCsrRoamCompleteResult result;
-
- if ( eSIR_SME_SUCCESS == pSmeStartBssRsp->statusCode )
+
+ if ( eSIR_SME_SUCCESS == pSmeStartBssRsp->statusCode )
{
smsLog( pMac, LOGW, "SmeStartBssReq Successful" );
result = eCsrStartBssSuccess;
}
- else
+ else
{
smsLog( pMac, LOGW, "SmeStartBssReq failed with statusCode= 0x%08lX", pSmeStartBssRsp->statusCode );
//Let csrRoamComplete decide what to do
@@ -7851,7 +7859,7 @@ static void csrRoamRoamingStateStartBssRspProcessor( tpAniSirGlobal pMac, tSirSm
We need to be careful on whether to cast pMsgBuf (pSmeRsp) to other type of strucutres.
It depends on how the message is constructed. If the message is sent by limSendSmeRsp,
the pMsgBuf is only a generic response and can only be used as pointer to tSirSmeRsp.
- For the messages where sender allocates memory for specific structures, then it can be
+ For the messages where sender allocates memory for specific structures, then it can be
cast accordingly.
*/
void csrRoamingStateMsgProcessor( tpAniSirGlobal pMac, void *pMsgBuf )
@@ -7868,9 +7876,9 @@ void csrRoamingStateMsgProcessor( tpAniSirGlobal pMac, void *pMsgBuf )
pSmeRsp->messageType = (pSmeRsp->messageType);
pSmeRsp->length = (pSmeRsp->length);
pSmeRsp->statusCode = (pSmeRsp->statusCode);
- switch (pSmeRsp->messageType)
+ switch (pSmeRsp->messageType)
{
-
+
case eWNI_SME_JOIN_RSP: // in Roaming state, process the Join response message...
if (CSR_IS_ROAM_SUBSTATE_JOIN_REQ(pMac, pSmeRsp->sessionId))
{
@@ -7878,28 +7886,28 @@ void csrRoamingStateMsgProcessor( tpAniSirGlobal pMac, void *pMsgBuf )
csrRoamJoinRspProcessor( pMac, (tSirSmeJoinRsp *)pSmeRsp );
}
break;
-
+
case eWNI_SME_AUTH_RSP: // or the Authenticate response message...
- if (CSR_IS_ROAM_SUBSTATE_AUTH_REQ( pMac, pSmeRsp->sessionId) )
+ if (CSR_IS_ROAM_SUBSTATE_AUTH_REQ( pMac, pSmeRsp->sessionId) )
{
//We sent a AUTH_REQ
csrRoamRoamingStateAuthRspProcessor( pMac, (tSirSmeAuthRsp *)pSmeRsp );
}
break;
-
+
case eWNI_SME_REASSOC_RSP: // or the Reassociation response message...
- if (CSR_IS_ROAM_SUBSTATE_REASSOC_REQ( pMac, pSmeRsp->sessionId) )
+ if (CSR_IS_ROAM_SUBSTATE_REASSOC_REQ( pMac, pSmeRsp->sessionId) )
{
csrRoamRoamingStateReassocRspProcessor( pMac, (tpSirSmeJoinRsp )pSmeRsp );
}
break;
-
+
case eWNI_SME_STOP_BSS_RSP: // or the Stop Bss response message...
{
csrRoamRoamingStateStopBssRspProcessor(pMac, pSmeRsp);
}
break;
-
+
case eWNI_SME_DISASSOC_RSP: // or the Disassociate response message...
if ( CSR_IS_ROAM_SUBSTATE_DISASSOC_REQ( pMac, pSmeRsp->sessionId ) ||
CSR_IS_ROAM_SUBSTATE_DISASSOC_NO_JOIN( pMac, pSmeRsp->sessionId ) ||
@@ -7913,23 +7921,23 @@ void csrRoamingStateMsgProcessor( tpAniSirGlobal pMac, void *pMsgBuf )
csrRoamRoamingStateDisassocRspProcessor( pMac, (tSirSmeDisassocRsp *)pSmeRsp );
}
break;
-
+
case eWNI_SME_DEAUTH_RSP: // or the Deauthentication response message...
- if ( CSR_IS_ROAM_SUBSTATE_DEAUTH_REQ( pMac, pSmeRsp->sessionId ) )
+ if ( CSR_IS_ROAM_SUBSTATE_DEAUTH_REQ( pMac, pSmeRsp->sessionId ) )
{
csrRoamRoamingStateDeauthRspProcessor( pMac, (tSirSmeDeauthRsp *)pSmeRsp );
}
break;
-
+
case eWNI_SME_START_BSS_RSP: // or the Start BSS response message...
- if (CSR_IS_ROAM_SUBSTATE_START_BSS_REQ( pMac, pSmeRsp->sessionId ) )
+ if (CSR_IS_ROAM_SUBSTATE_START_BSS_REQ( pMac, pSmeRsp->sessionId ) )
{
csrRoamRoamingStateStartBssRspProcessor( pMac, (tSirSmeStartBssRsp *)pSmeRsp );
- }
+ }
break;
-
+
case WNI_CFG_SET_CNF: // process the Config Confirm messages when we are in 'Config' substate...
- if ( CSR_IS_ROAM_SUBSTATE_CONFIG( pMac, pSmeRsp->sessionId ) )
+ if ( CSR_IS_ROAM_SUBSTATE_CONFIG( pMac, pSmeRsp->sessionId ) )
{
csrRoamingStateConfigCnfProcessor( pMac, ((tCsrCfgSetRsp *)pSmeRsp)->respStatus );
}
@@ -7943,8 +7951,8 @@ void csrRoamingStateMsgProcessor( tpAniSirGlobal pMac, void *pMsgBuf )
roamInfo.ucastSig = (tANI_U8)pIbssPeerInd->ucastSig;
roamInfo.bcastSig = (tANI_U8)pIbssPeerInd->bcastSig;
palCopyMemory(pMac->hHdd, &roamInfo.peerMac, pIbssPeerInd->peerAddr, sizeof(tCsrBssid));
- csrRoamCallCallback(pMac, sessionId, &roamInfo, 0,
- eCSR_ROAM_CONNECT_STATUS_UPDATE,
+ csrRoamCallCallback(pMac, sessionId, &roamInfo, 0,
+ eCSR_ROAM_CONNECT_STATUS_UPDATE,
eCSR_ROAM_RESULT_IBSS_PEER_DEPARTED);
break;
default:
@@ -7952,19 +7960,19 @@ void csrRoamingStateMsgProcessor( tpAniSirGlobal pMac, void *pMsgBuf )
pSmeRsp->messageType, pSmeRsp->messageType,
pMac->roam.curSubState[pSmeRsp->sessionId] );
- //If we are connected, check the link status change
+ //If we are connected, check the link status change
if(!csrIsConnStateDisconnected(pMac, sessionId))
{
csrRoamCheckForLinkStatusChange( pMac, pSmeRsp );
}
- break;
+ break;
}
}
void csrRoamJoinedStateMsgProcessor( tpAniSirGlobal pMac, void *pMsgBuf )
{
tSirSmeRsp *pSirMsg = (tSirSmeRsp *)pMsgBuf;
- switch (pSirMsg->messageType)
+ switch (pSirMsg->messageType)
{
case eWNI_SME_GET_STATISTICS_RSP:
smsLog( pMac, LOG2, FL("Stats rsp from PE"));
@@ -7990,14 +7998,14 @@ void csrRoamJoinedStateMsgProcessor( tpAniSirGlobal pMac, void *pMsgBuf )
smsLog(pMac, LOGE, FL(" session %d not found "), sessionId);
return;
}
-
- pRoamInfo->statusCode = eSIR_SME_SUCCESS; //send the status code as Success
+
+ pRoamInfo->statusCode = eSIR_SME_SUCCESS; //send the status code as Success
pRoamInfo->u.pConnectedProfile = &pSession->connectedProfile;
pRoamInfo->staId = (tANI_U8)pUpperLayerAssocCnf->aid;
pRoamInfo->rsnIELen = (tANI_U8)pUpperLayerAssocCnf->rsnIE.length;
pRoamInfo->prsnIE = pUpperLayerAssocCnf->rsnIE.rsnIEdata;
pRoamInfo->addIELen = (tANI_U8)pUpperLayerAssocCnf->addIE.length;
- pRoamInfo->paddIE = pUpperLayerAssocCnf->addIE.addIEdata;
+ pRoamInfo->paddIE = pUpperLayerAssocCnf->addIE.addIEdata;
palCopyMemory(pMac->hHdd, pRoamInfo->peerMac, pUpperLayerAssocCnf->peerMacAddr, sizeof(tSirMacAddr));
palCopyMemory(pMac->hHdd, &pRoamInfo->bssid, pUpperLayerAssocCnf->bssId, sizeof(tCsrBssid));
pRoamInfo->wmmEnabledSta = pUpperLayerAssocCnf->wmmEnabledSta;
@@ -8022,35 +8030,35 @@ void csrRoamJoinedStateMsgProcessor( tpAniSirGlobal pMac, void *pMsgBuf )
}
}
-eHalStatus csrRoamIssueSetContextReq( tpAniSirGlobal pMac, tANI_U32 sessionId, eCsrEncryptionType EncryptType,
+eHalStatus csrRoamIssueSetContextReq( tpAniSirGlobal pMac, tANI_U32 sessionId, eCsrEncryptionType EncryptType,
tSirBssDescription *pBssDescription,
tSirMacAddr *bssId, tANI_BOOLEAN addKey,
- tANI_BOOLEAN fUnicast, tAniKeyDirection aniKeyDirection,
- tANI_U8 keyId, tANI_U16 keyLength,
+ tANI_BOOLEAN fUnicast, tAniKeyDirection aniKeyDirection,
+ tANI_U8 keyId, tANI_U16 keyLength,
tANI_U8 *pKey, tANI_U8 paeRole )
{
eHalStatus status = eHAL_STATUS_SUCCESS;
tAniEdType edType;
-
+
if(eCSR_ENCRYPT_TYPE_UNKNOWN == EncryptType)
{
EncryptType = eCSR_ENCRYPT_TYPE_NONE; //***
}
-
+
edType = csrTranslateEncryptTypeToEdType( EncryptType );
-
+
// Allow 0 keys to be set for the non-WPA encrypt types... For WPA encrypt types, the num keys must be non-zero
// or LIM will reject the set context (assumes the SET_CONTEXT does not occur until the keys are distrubuted).
if ( CSR_IS_ENC_TYPE_STATIC( EncryptType ) ||
- addKey )
+ addKey )
{
tCsrRoamSetKey setKey;
setKey.encType = EncryptType;
setKey.keyDirection = aniKeyDirection; //Tx, Rx or Tx-and-Rx
- palCopyMemory( pMac->hHdd, &setKey.peerMac, bssId, sizeof(tCsrBssid) );
+ palCopyMemory( pMac->hHdd, &setKey.peerMac, bssId, sizeof(tCsrBssid) );
setKey.paeRole = paeRole; //0 for supplicant
setKey.keyId = keyId; // Kye index
- setKey.keyLength = keyLength;
+ setKey.keyLength = keyLength;
if( keyLength )
{
palCopyMemory( pMac->hHdd, setKey.Key, pKey, keyLength );
@@ -8060,7 +8068,7 @@ eHalStatus csrRoamIssueSetContextReq( tpAniSirGlobal pMac, tANI_U32 sessionId, e
return (status);
}
-static eHalStatus csrRoamIssueSetKeyCommand( tpAniSirGlobal pMac, tANI_U32 sessionId,
+static eHalStatus csrRoamIssueSetKeyCommand( tpAniSirGlobal pMac, tANI_U32 sessionId,
tCsrRoamSetKey *pSetKey, tANI_U32 roamId )
{
eHalStatus status = eHAL_STATUS_INVALID_PARAMETER;
@@ -8068,7 +8076,7 @@ static eHalStatus csrRoamIssueSetKeyCommand( tpAniSirGlobal pMac, tANI_U32 sessi
#ifdef FEATURE_WLAN_CCX
tCsrRoamSession *pSession = CSR_GET_SESSION( pMac, sessionId );
#endif /* FEATURE_WLAN_CCX */
-
+
do
{
pCommand = csrGetCommandBuffer(pMac);
@@ -8082,39 +8090,39 @@ static eHalStatus csrRoamIssueSetKeyCommand( tpAniSirGlobal pMac, tANI_U32 sessi
pCommand->sessionId = (tANI_U8)sessionId;
// validate the key length, Adjust if too long...
// for static WEP the keys are not set thru' SetContextReq
- if ( ( eCSR_ENCRYPT_TYPE_WEP40 == pSetKey->encType ) ||
- ( eCSR_ENCRYPT_TYPE_WEP40_STATICKEY == pSetKey->encType ) )
+ if ( ( eCSR_ENCRYPT_TYPE_WEP40 == pSetKey->encType ) ||
+ ( eCSR_ENCRYPT_TYPE_WEP40_STATICKEY == pSetKey->encType ) )
{
//KeyLength maybe 0 for static WEP
if( pSetKey->keyLength )
{
- if ( pSetKey->keyLength < CSR_WEP40_KEY_LEN )
+ if ( pSetKey->keyLength < CSR_WEP40_KEY_LEN )
{
smsLog( pMac, LOGW, "Invalid WEP40 keylength [= %d] in SetContext call", pSetKey->keyLength );
- break;
+ break;
}
-
+
pCommand->u.setKeyCmd.keyLength = CSR_WEP40_KEY_LEN;
palCopyMemory( pMac->hHdd, pCommand->u.setKeyCmd.Key, pSetKey->Key, CSR_WEP40_KEY_LEN );
}
}
- else if ( ( eCSR_ENCRYPT_TYPE_WEP104 == pSetKey->encType ) ||
- ( eCSR_ENCRYPT_TYPE_WEP104_STATICKEY == pSetKey->encType ) )
+ else if ( ( eCSR_ENCRYPT_TYPE_WEP104 == pSetKey->encType ) ||
+ ( eCSR_ENCRYPT_TYPE_WEP104_STATICKEY == pSetKey->encType ) )
{
//KeyLength maybe 0 for static WEP
if( pSetKey->keyLength )
{
- if ( pSetKey->keyLength < CSR_WEP104_KEY_LEN )
+ if ( pSetKey->keyLength < CSR_WEP104_KEY_LEN )
{
smsLog( pMac, LOGW, "Invalid WEP104 keylength [= %d] in SetContext call", pSetKey->keyLength );
- break;
+ break;
}
-
+
pCommand->u.setKeyCmd.keyLength = CSR_WEP104_KEY_LEN;
palCopyMemory( pMac->hHdd, pCommand->u.setKeyCmd.Key, pSetKey->Key, CSR_WEP104_KEY_LEN );
}
}
- else if ( eCSR_ENCRYPT_TYPE_TKIP == pSetKey->encType )
+ else if ( eCSR_ENCRYPT_TYPE_TKIP == pSetKey->encType )
{
if ( pSetKey->keyLength < CSR_TKIP_KEY_LEN )
{
@@ -8124,7 +8132,7 @@ static eHalStatus csrRoamIssueSetKeyCommand( tpAniSirGlobal pMac, tANI_U32 sessi
pCommand->u.setKeyCmd.keyLength = CSR_TKIP_KEY_LEN;
palCopyMemory( pMac->hHdd, pCommand->u.setKeyCmd.Key, pSetKey->Key, CSR_TKIP_KEY_LEN );
}
- else if ( eCSR_ENCRYPT_TYPE_AES == pSetKey->encType )
+ else if ( eCSR_ENCRYPT_TYPE_AES == pSetKey->encType )
{
if ( pSetKey->keyLength < CSR_AES_KEY_LEN )
{
@@ -8135,7 +8143,7 @@ static eHalStatus csrRoamIssueSetKeyCommand( tpAniSirGlobal pMac, tANI_U32 sessi
palCopyMemory( pMac->hHdd, pCommand->u.setKeyCmd.Key, pSetKey->Key, CSR_AES_KEY_LEN );
}
#ifdef FEATURE_WLAN_WAPI
- else if ( eCSR_ENCRYPT_TYPE_WPI == pSetKey->encType )
+ else if ( eCSR_ENCRYPT_TYPE_WPI == pSetKey->encType )
{
if ( pSetKey->keyLength < CSR_WAPI_KEY_LEN )
{
@@ -8147,7 +8155,7 @@ static eHalStatus csrRoamIssueSetKeyCommand( tpAniSirGlobal pMac, tANI_U32 sessi
}
#endif /* FEATURE_WLAN_WAPI */
#ifdef FEATURE_WLAN_CCX
- else if ( eCSR_ENCRYPT_TYPE_KRK == pSetKey->encType )
+ else if ( eCSR_ENCRYPT_TYPE_KRK == pSetKey->encType )
{
if ( pSetKey->keyLength < CSR_KRK_KEY_LEN )
{
@@ -8179,24 +8187,24 @@ static eHalStatus csrRoamIssueSetKeyCommand( tpAniSirGlobal pMac, tANI_U32 sessi
pCommand->u.setKeyCmd.roamId = roamId;
pCommand->u.setKeyCmd.encType = pSetKey->encType;
pCommand->u.setKeyCmd.keyDirection = pSetKey->keyDirection; //Tx, Rx or Tx-and-Rx
- palCopyMemory( pMac->hHdd, &pCommand->u.setKeyCmd.peerMac, &pSetKey->peerMac, sizeof(tCsrBssid) );
+ palCopyMemory( pMac->hHdd, &pCommand->u.setKeyCmd.peerMac, &pSetKey->peerMac, sizeof(tCsrBssid) );
pCommand->u.setKeyCmd.paeRole = pSetKey->paeRole; //0 for supplicant
pCommand->u.setKeyCmd.keyId = pSetKey->keyId;
palCopyMemory( pMac->hHdd, pCommand->u.setKeyCmd.keyRsc, pSetKey->keyRsc, CSR_MAX_RSC_LEN );
//Always put set key to the head of the Q because it is the only thing to get executed in case of WT_KEY state
-
+
status = csrQueueSmeCommand(pMac, pCommand, eANI_BOOLEAN_TRUE);
if( !HAL_STATUS_SUCCESS( status ) )
{
smsLog( pMac, LOGE, FL(" fail to send message status = %d"), status );
}
} while (0);
- // Free the command if there has been a failure, or it is a
+ // Free the command if there has been a failure, or it is a
// "local" operation like the set CCX CCKM KRK key.
if ( ( NULL != pCommand ) &&
( (!HAL_STATUS_SUCCESS( status ) )
#ifdef FEATURE_WLAN_CCX
- || ( eCSR_ENCRYPT_TYPE_KRK == pSetKey->encType )
+ || ( eCSR_ENCRYPT_TYPE_KRK == pSetKey->encType )
#endif /* FEATURE_WLAN_CCX */
) )
{
@@ -8213,7 +8221,7 @@ eHalStatus csrRoamIssueRemoveKeyCommand( tpAniSirGlobal pMac, tANI_U32 sessionId
tANI_BOOLEAN fImediate = eANI_BOOLEAN_TRUE;
do
{
- if( !csrIsSetKeyAllowed(pMac, sessionId) )
+ if( !csrIsSetKeyAllowed(pMac, sessionId) )
{
smsLog( pMac, LOGW, FL(" wrong state not allowed to set key") );
status = eHAL_STATUS_CSR_WRONG_STATE;
@@ -8241,8 +8249,8 @@ eHalStatus csrRoamIssueRemoveKeyCommand( tpAniSirGlobal pMac, tANI_U32 sessionId
pRemoveKey->encType, pRemoveKey->keyId,
pCommand->u.removeKeyCmd.peerMac[0],
pCommand->u.removeKeyCmd.peerMac[1],
- pCommand->u.removeKeyCmd.peerMac[2],
- pCommand->u.removeKeyCmd.peerMac[3],
+ pCommand->u.removeKeyCmd.peerMac[2],
+ pCommand->u.removeKeyCmd.peerMac[3],
pCommand->u.removeKeyCmd.peerMac[4],
pCommand->u.removeKeyCmd.peerMac[5]);
status = csrQueueSmeCommand(pMac, pCommand, fImediate);
@@ -8305,11 +8313,11 @@ eHalStatus csrRoamProcessSetKeyCommand( tpAniSirGlobal pMac, tSmeCmd *pCommand )
#endif //FEATURE_WLAN_DIAG_SUPPORT_CSR
if( csrIsSetKeyAllowed(pMac, sessionId) )
{
- status = csrSendMBSetContextReqMsg( pMac, sessionId,
- ( tANI_U8 *)&pCommand->u.setKeyCmd.peerMac,
- numKeys, edType, fUnicast, pCommand->u.setKeyCmd.keyDirection,
- pCommand->u.setKeyCmd.keyId, pCommand->u.setKeyCmd.keyLength,
- pCommand->u.setKeyCmd.Key, pCommand->u.setKeyCmd.paeRole,
+ status = csrSendMBSetContextReqMsg( pMac, sessionId,
+ ( tANI_U8 *)&pCommand->u.setKeyCmd.peerMac,
+ numKeys, edType, fUnicast, pCommand->u.setKeyCmd.keyDirection,
+ pCommand->u.setKeyCmd.keyId, pCommand->u.setKeyCmd.keyLength,
+ pCommand->u.setKeyCmd.Key, pCommand->u.setKeyCmd.paeRole,
pCommand->u.setKeyCmd.keyRsc);
}
else
@@ -8389,7 +8397,7 @@ eHalStatus csrRoamProcessRemoveKeyCommand( tpAniSirGlobal pMac, tSmeCmd *pComman
*p = (tANI_U8)csrTranslateEncryptTypeToEdType( pCommand->u.removeKeyCmd.encType );
p++;
// weptype
- if( ( eCSR_ENCRYPT_TYPE_WEP40_STATICKEY == pCommand->u.removeKeyCmd.encType ) ||
+ if( ( eCSR_ENCRYPT_TYPE_WEP40_STATICKEY == pCommand->u.removeKeyCmd.encType ) ||
( eCSR_ENCRYPT_TYPE_WEP104_STATICKEY == pCommand->u.removeKeyCmd.encType ) )
{
*p = (tANI_U8)eSIR_WEP_STATIC;
@@ -8421,7 +8429,7 @@ eHalStatus csrRoamProcessRemoveKeyCommand( tpAniSirGlobal pMac, tSmeCmd *pComman
eHalStatus csrRoamSetKey( tpAniSirGlobal pMac, tANI_U32 sessionId, tCsrRoamSetKey *pSetKey, tANI_U32 roamId )
{
eHalStatus status;
-
+
if( !csrIsSetKeyAllowed(pMac, sessionId) )
{
status = eHAL_STATUS_CSR_WRONG_STATE;
@@ -8435,16 +8443,16 @@ eHalStatus csrRoamSetKey( tpAniSirGlobal pMac, tANI_U32 sessionId, tCsrRoamSetKe
/*
Prepare a filter base on a profile for parsing the scan results.
- Upon successful return, caller MUST call csrFreeScanFilter on
+ Upon successful return, caller MUST call csrFreeScanFilter on
pScanFilter when it is done with the filter.
*/
-eHalStatus csrRoamPrepareFilterFromProfile(tpAniSirGlobal pMac, tCsrRoamProfile *pProfile,
+eHalStatus csrRoamPrepareFilterFromProfile(tpAniSirGlobal pMac, tCsrRoamProfile *pProfile,
tCsrScanResultFilter *pScanFilter)
{
eHalStatus status = eHAL_STATUS_SUCCESS;
tANI_U32 size = 0;
tANI_U8 index = 0;
-
+
do
{
if(pProfile->BSSIDs.numOfBSSIDs)
@@ -8493,11 +8501,11 @@ eHalStatus csrRoamPrepareFilterFromProfile(tpAniSirGlobal pMac, tCsrRoamProfile
{
if(csrRoamIsChannelValid(pMac, pProfile->ChannelInfo.ChannelList[index]))
{
- pScanFilter->ChannelInfo.ChannelList[pScanFilter->ChannelInfo.numOfChannels]
+ pScanFilter->ChannelInfo.ChannelList[pScanFilter->ChannelInfo.numOfChannels]
= pProfile->ChannelInfo.ChannelList[index];
pScanFilter->ChannelInfo.numOfChannels++;
}
- else
+ else
{
smsLog(pMac, LOG1, FL("process a channel (%d) that is invalid"), pProfile->ChannelInfo.ChannelList[index]);
}
@@ -8508,7 +8516,7 @@ eHalStatus csrRoamPrepareFilterFromProfile(tpAniSirGlobal pMac, tCsrRoamProfile
break;
}
}
- else
+ else
{
smsLog(pMac, LOGW, FL("Channel list empty"));
status = eHAL_STATUS_FAILURE;
@@ -8544,7 +8552,7 @@ eHalStatus csrRoamPrepareFilterFromProfile(tpAniSirGlobal pMac, tCsrRoamProfile
if( pProfile->countryCode[0] )
{
//This causes the matching function to use countryCode as one of the criteria.
- palCopyMemory( pMac->hHdd, pScanFilter->countryCode, pProfile->countryCode,
+ palCopyMemory( pMac->hHdd, pScanFilter->countryCode, pProfile->countryCode,
WNI_CFG_COUNTRY_CODE_LEN );
}
#ifdef WLAN_FEATURE_VOWIFI_11R
@@ -8554,14 +8562,14 @@ eHalStatus csrRoamPrepareFilterFromProfile(tpAniSirGlobal pMac, tCsrRoamProfile
pScanFilter->MDID.mobilityDomain = pProfile->MDID.mobilityDomain;
}
#endif
-
+
}while(0);
-
+
if(!HAL_STATUS_SUCCESS(status))
{
csrFreeScanFilter(pMac, pScanFilter);
}
-
+
return(status);
}
@@ -8591,12 +8599,12 @@ tANI_BOOLEAN csrRoamIssueWmStatusChange( tpAniSirGlobal pMac, tANI_U32 sessionId
pCommand->u.wmStatusChangeCmd.Type = Type;
if ( eCsrDisassociated == Type )
{
- palCopyMemory( pMac->hHdd, &pCommand->u.wmStatusChangeCmd.u.DisassocIndMsg, pSmeRsp,
+ palCopyMemory( pMac->hHdd, &pCommand->u.wmStatusChangeCmd.u.DisassocIndMsg, pSmeRsp,
sizeof( pCommand->u.wmStatusChangeCmd.u.DisassocIndMsg ) );
}
else
{
- palCopyMemory( pMac->hHdd, &pCommand->u.wmStatusChangeCmd.u.DeauthIndMsg, pSmeRsp,
+ palCopyMemory( pMac->hHdd, &pCommand->u.wmStatusChangeCmd.u.DeauthIndMsg, pSmeRsp,
sizeof( pCommand->u.wmStatusChangeCmd.u.DeauthIndMsg ) );
}
if( HAL_STATUS_SUCCESS( csrQueueSmeCommand(pMac, pCommand, eANI_BOOLEAN_TRUE) ) )
@@ -8630,7 +8638,7 @@ static void csrUpdateRssi(tpAniSirGlobal pMac, void* pMsg)
smsLog( pMac, LOGE, FL("pGetRssiReq->pVosContext is NULL"));
return;
}
-
+
if(NULL != pGetRssiReq->rssiCallback)
{
((tCsrRssiCallback)(pGetRssiReq->rssiCallback))(rssi, pGetRssiReq->staId, pGetRssiReq->pDevContext);
@@ -8755,7 +8763,7 @@ void csrRoamCheckForLinkStatusChange( tpAniSirGlobal pMac, tSirSmeRsp *pSirMsg )
pSirMsg->length = (pSirMsg->length);
pSirMsg->statusCode = (pSirMsg->statusCode);
palZeroMemory(pMac->hHdd, &roamInfo, sizeof(roamInfo));
- switch( pSirMsg->messageType )
+ switch( pSirMsg->messageType )
{
case eWNI_SME_ASSOC_IND:
{
@@ -8780,14 +8788,14 @@ void csrRoamCheckForLinkStatusChange( tpAniSirGlobal pMac, tSirSmeRsp *pSirMsg )
pRoamInfo->assocReqPtr = pAssocInd->assocReqPtr;
pRoamInfo->beaconPtr = pAssocInd->beaconPtr;
- pRoamInfo->beaconLength = pAssocInd->beaconLength;
- pRoamInfo->statusCode = eSIR_SME_SUCCESS; //send the status code as Success
+ pRoamInfo->beaconLength = pAssocInd->beaconLength;
+ pRoamInfo->statusCode = eSIR_SME_SUCCESS; //send the status code as Success
pRoamInfo->u.pConnectedProfile = &pSession->connectedProfile;
pRoamInfo->staId = (tANI_U8)pAssocInd->staId;
pRoamInfo->rsnIELen = (tANI_U8)pAssocInd->rsnIE.length;
pRoamInfo->prsnIE = pAssocInd->rsnIE.rsnIEdata;
-
+
pRoamInfo->addIELen = (tANI_U8)pAssocInd->addIE.length;
pRoamInfo->paddIE = pAssocInd->addIE.addIEdata;
palCopyMemory(pMac->hHdd, pRoamInfo->peerMac, pAssocInd->peerMacAddr, sizeof(tSirMacAddr));
@@ -8799,7 +8807,7 @@ void csrRoamCheckForLinkStatusChange( tpAniSirGlobal pMac, tSirSmeRsp *pSirMsg )
{
if( CSR_IS_ENC_TYPE_STATIC( pSession->pCurRoamProfile->negotiatedUCEncryptionType ))
{
- csrRoamIssueSetContextReq( pMac, sessionId, pSession->pCurRoamProfile->negotiatedUCEncryptionType,
+ csrRoamIssueSetContextReq( pMac, sessionId, pSession->pCurRoamProfile->negotiatedUCEncryptionType,
pSession->pConnectBssDesc,
&(pRoamInfo->peerMac),
FALSE, TRUE, eSIR_TX_RX, 0, 0, NULL, 0 ); // NO keys... these key parameters don't matter.
@@ -8811,11 +8819,11 @@ void csrRoamCheckForLinkStatusChange( tpAniSirGlobal pMac, tSirSmeRsp *pSirMsg )
}
status = csrRoamCallCallback(pMac, sessionId, pRoamInfo, 0, eCSR_ROAM_INFRA_IND, eCSR_ROAM_RESULT_INFRA_ASSOCIATION_IND);
if (!HAL_STATUS_SUCCESS(status))
- pRoamInfo->statusCode = eSIR_SME_ASSOC_REFUSED;// Refused due to Mac filtering
+ pRoamInfo->statusCode = eSIR_SME_ASSOC_REFUSED;// Refused due to Mac filtering
}
/* Send Association completion message to PE */
status = csrSendAssocCnfMsg( pMac, pAssocInd, status );//Sta
-
+
/* send a message to CSR itself just to avoid the EAPOL frames going
* OTA before association response */
if(CSR_IS_WDS_AP( pRoamInfo->u.pConnectedProfile))
@@ -8842,7 +8850,7 @@ void csrRoamCheckForLinkStatusChange( tpAniSirGlobal pMac, tSirSmeRsp *pSirMsg )
{
// If we are in neighbor preauth done state then on receiving
// disassoc or deauth we dont roam instead we just disassoc
- // from current ap and then go to disconnected state
+ // from current ap and then go to disconnected state
// This happens for CCX and 11r FT connections ONLY.
#ifdef WLAN_FEATURE_VOWIFI_11R
if (csrRoamIs11rAssoc(pMac) && (csrNeighborRoamStatePreauthDone(pMac)))
@@ -8884,7 +8892,7 @@ void csrRoamCheckForLinkStatusChange( tpAniSirGlobal pMac, tSirSmeRsp *pSirMsg )
pRoamInfo = &roamInfo;
- pRoamInfo->statusCode = pDisassocInd->statusCode;
+ pRoamInfo->statusCode = pDisassocInd->statusCode;
pRoamInfo->u.pConnectedProfile = &pSession->connectedProfile;
pRoamInfo->staId = (tANI_U8)pDisassocInd->staId;
@@ -8895,7 +8903,7 @@ void csrRoamCheckForLinkStatusChange( tpAniSirGlobal pMac, tSirSmeRsp *pSirMsg )
status = csrRoamCallCallback(pMac, sessionId, pRoamInfo, 0, eCSR_ROAM_INFRA_IND, eCSR_ROAM_RESULT_DISASSOC_IND);
/*
- * STA/P2P client got disassociated so remove any pending deauth
+ * STA/P2P client got disassociated so remove any pending deauth
* commands in sme pending list
*/
pCommand.command = eSmeCommandRoam;
@@ -8914,7 +8922,7 @@ void csrRoamCheckForLinkStatusChange( tpAniSirGlobal pMac, tSirSmeRsp *pSirMsg )
{
// If we are in neighbor preauth done state then on receiving
// disassoc or deauth we dont roam instead we just disassoc
- // from current ap and then go to disconnected state
+ // from current ap and then go to disconnected state
// This happens for CCX and 11r FT connections ONLY.
#ifdef WLAN_FEATURE_VOWIFI_11R
if (csrRoamIs11rAssoc(pMac) && (csrNeighborRoamStatePreauthDone(pMac)))
@@ -8968,7 +8976,7 @@ void csrRoamCheckForLinkStatusChange( tpAniSirGlobal pMac, tSirSmeRsp *pSirMsg )
}
}
break;
-
+
case eWNI_SME_SWITCH_CHL_REQ: // in case of STA, the SWITCH_CHANNEL originates from its AP
smsLog( pMac, LOGW, FL("eWNI_SME_SWITCH_CHL_REQ from SME"));
pSwitchChnInd = (tpSirSmeSwitchChannelInd)pSirMsg;
@@ -8990,14 +8998,14 @@ void csrRoamCheckForLinkStatusChange( tpAniSirGlobal pMac, tSirSmeRsp *pSirMsg )
}
}
break;
-
+
case eWNI_SME_DEAUTH_RSP:
smsLog( pMac, LOGW, FL("eWNI_SME_DEAUTH_RSP from SME"));
{
tSirSmeDeauthRsp* pDeauthRsp = (tSirSmeDeauthRsp *)pSirMsg;
sessionId = pDeauthRsp->sessionId;
if( CSR_IS_SESSION_VALID(pMac, sessionId) )
- {
+ {
pSession = CSR_GET_SESSION(pMac, sessionId);
if(!pSession)
{
@@ -9016,7 +9024,7 @@ void csrRoamCheckForLinkStatusChange( tpAniSirGlobal pMac, tSirSmeRsp *pSirMsg )
}
}
break;
-
+
case eWNI_SME_DISASSOC_RSP:
/* session id is invalid here so cant use it to access the array curSubstate as index */
smsLog( pMac, LOGW, FL("eWNI_SME_DISASSOC_RSP from SME "));
@@ -9024,7 +9032,7 @@ void csrRoamCheckForLinkStatusChange( tpAniSirGlobal pMac, tSirSmeRsp *pSirMsg )
tSirSmeDisassocRsp *pDisassocRsp = (tSirSmeDisassocRsp *)pSirMsg;
sessionId = pDisassocRsp->sessionId;
if( CSR_IS_SESSION_VALID(pMac, sessionId) )
- {
+ {
pSession = CSR_GET_SESSION(pMac, sessionId);
if(!pSession)
{
@@ -9059,11 +9067,11 @@ void csrRoamCheckForLinkStatusChange( tpAniSirGlobal pMac, tSirSmeRsp *pSirMsg )
}
palZeroMemory(pMac->hHdd, &secEvent, sizeof(vos_event_wlan_security_payload_type));
secEvent.eventId = WLAN_SECURITY_EVENT_MIC_ERROR;
- secEvent.encryptionModeMulticast =
+ secEvent.encryptionModeMulticast =
(v_U8_t)diagEncTypeFromCSRType(pSession->connectedProfile.mcEncryptionType);
- secEvent.encryptionModeUnicast =
+ secEvent.encryptionModeUnicast =
(v_U8_t)diagEncTypeFromCSRType(pSession->connectedProfile.EncryptionType);
- secEvent.authMode =
+ secEvent.authMode =
(v_U8_t)diagAuthTypeFromCSRType(pSession->connectedProfile.AuthType);
palCopyMemory( pMac->hHdd, secEvent.bssid, pSession->connectedProfile.bssid, 6 );
WLAN_VOS_DIAG_EVENT_REPORT(&secEvent, EVENT_WLAN_SECURITY);
@@ -9092,21 +9100,21 @@ void csrRoamCheckForLinkStatusChange( tpAniSirGlobal pMac, tSirSmeRsp *pSirMsg )
tpSirSmeProbeReqInd pProbeReqInd = (tpSirSmeProbeReqInd)pSirMsg;
tCsrRoamInfo roamInfo;
smsLog( pMac, LOG1, FL("WPS PBC Probe request Indication from SME"));
-
+
status = csrRoamGetSessionIdFromBSSID( pMac, (tCsrBssid *)pProbeReqInd->bssId, &sessionId );
if( HAL_STATUS_SUCCESS( status ) )
{
palZeroMemory(pMac->hHdd, &roamInfo, sizeof(tCsrRoamInfo));
roamInfo.u.pWPSPBCProbeReq = &pProbeReqInd->WPSPBCProbeReq;
- csrRoamCallCallback(pMac, sessionId, &roamInfo, 0, eCSR_ROAM_WPS_PBC_PROBE_REQ_IND,
+ csrRoamCallCallback(pMac, sessionId, &roamInfo, 0, eCSR_ROAM_WPS_PBC_PROBE_REQ_IND,
eCSR_ROAM_RESULT_WPS_PBC_PROBE_REQ_IND);
}
}
- break;
-
+ break;
+
case eWNI_SME_WM_STATUS_CHANGE_NTF:
pStatusChangeMsg = (tSirSmeWmStatusChangeNtf *)pSirMsg;
- switch( pStatusChangeMsg->statusChangeCode )
+ switch( pStatusChangeMsg->statusChangeCode )
{
case eSIR_SME_IBSS_ACTIVE:
sessionId = csrFindIbssSession( pMac );
@@ -9187,7 +9195,7 @@ void csrRoamCheckForLinkStatusChange( tpAniSirGlobal pMac, tSirSmeRsp *pSirMsg )
}
#endif //FEATURE_WLAN_DIAG_SUPPORT_CSR
csrRoamUpdateConnectedProfileFromNewBss( pMac, sessionId, pNewBss );
- csrRoamIssueSetContextReq( pMac, sessionId, pSession->connectedProfile.EncryptionType,
+ csrRoamIssueSetContextReq( pMac, sessionId, pSession->connectedProfile.EncryptionType,
pSession->pConnectBssDesc,
&Broadcastaddr,
FALSE, FALSE, eSIR_TX_RX, 0, 0, NULL, 0 );
@@ -9200,7 +9208,7 @@ void csrRoamCheckForLinkStatusChange( tpAniSirGlobal pMac, tSirSmeRsp *pSirMsg )
{
palCopyMemory(pMac->hHdd, pSession->pConnectBssDesc->bssId, &pNewBss->bssId, sizeof(tCsrBssid));
}
- // Stop the join IBSS timer in case of join, for
+ // Stop the join IBSS timer in case of join, for
// genuine merge do nothing
if(pSession->ibss_join_pending)
{
@@ -9285,7 +9293,7 @@ void csrRoamCheckForLinkStatusChange( tpAniSirGlobal pMac, tSirSmeRsp *pSirMsg )
palCopyMemory(pMac->hHdd, &roamInfo.bssid, pSession->pConnectBssDesc->bssId, sizeof(tCsrBssid));
if(pIbssPeerInd->mesgLen > sizeof(tSmeIbssPeerInd))
{
- status = palAllocateMemory(pMac->hHdd, (void **)&roamInfo.pbFrames,
+ status = palAllocateMemory(pMac->hHdd, (void **)&roamInfo.pbFrames,
(pIbssPeerInd->mesgLen - sizeof(tSmeIbssPeerInd)));
if(HAL_STATUS_SUCCESS(status))
{
@@ -9296,11 +9304,11 @@ void csrRoamCheckForLinkStatusChange( tpAniSirGlobal pMac, tSirSmeRsp *pSirMsg )
roamInfo.staId = (tANI_U8)pIbssPeerInd->staId;
roamInfo.ucastSig = (tANI_U8)pIbssPeerInd->ucastSig;
roamInfo.bcastSig = (tANI_U8)pIbssPeerInd->bcastSig;
- status = palAllocateMemory(pMac->hHdd, (void **)&roamInfo.pBssDesc,
+ status = palAllocateMemory(pMac->hHdd, (void **)&roamInfo.pBssDesc,
pSession->pConnectBssDesc->length);
if(HAL_STATUS_SUCCESS(status))
{
- palCopyMemory(pMac->hHdd, roamInfo.pBssDesc, pSession->pConnectBssDesc,
+ palCopyMemory(pMac->hHdd, roamInfo.pBssDesc, pSession->pConnectBssDesc,
pSession->pConnectBssDesc->length);
}
if(HAL_STATUS_SUCCESS(status))
@@ -9323,7 +9331,7 @@ void csrRoamCheckForLinkStatusChange( tpAniSirGlobal pMac, tSirSmeRsp *pSirMsg )
{
pRoamInfo = &roamInfo;
}
- csrRoamIssueSetContextReq( pMac, sessionId, pSession->connectedProfile.EncryptionType,
+ csrRoamIssueSetContextReq( pMac, sessionId, pSession->connectedProfile.EncryptionType,
pSession->pConnectBssDesc,
&(pIbssPeerInd->peerAddr),
FALSE, TRUE, eSIR_TX_RX, 0, 0, NULL, 0 ); // NO keys... these key parameters don't matter.
@@ -9337,7 +9345,7 @@ void csrRoamCheckForLinkStatusChange( tpAniSirGlobal pMac, tSirSmeRsp *pSirMsg )
{
pRoamInfo->u.pConnectedProfile = &pSession->connectedProfile;
}
- csrRoamCallCallback(pMac, sessionId, pRoamInfo, 0,
+ csrRoamCallCallback(pMac, sessionId, pRoamInfo, 0,
eCSR_ROAM_CONNECT_STATUS_UPDATE, eCSR_ROAM_RESULT_IBSS_NEW_PEER);
if(pRoamInfo)
{
@@ -9360,7 +9368,7 @@ void csrRoamCheckForLinkStatusChange( tpAniSirGlobal pMac, tSirSmeRsp *pSirMsg )
#ifdef FEATURE_WLAN_DIAG_SUPPORT_CSR
{
vos_log_ibss_pkt_type *pIbssLog;
-
+
WLAN_VOS_DIAG_LOG_ALLOC(pIbssLog, vos_log_ibss_pkt_type, LOG_WLAN_IBSS_C);
if(pIbssLog)
{
@@ -9378,7 +9386,7 @@ void csrRoamCheckForLinkStatusChange( tpAniSirGlobal pMac, tSirSmeRsp *pSirMsg )
roamInfo.ucastSig = (tANI_U8)pIbssPeerInd->ucastSig;
roamInfo.bcastSig = (tANI_U8)pIbssPeerInd->bcastSig;
palCopyMemory(pMac->hHdd, &roamInfo.peerMac, pIbssPeerInd->peerAddr, sizeof(tCsrBssid));
- csrRoamCallCallback(pMac, sessionId, &roamInfo, 0,
+ csrRoamCallCallback(pMac, sessionId, &roamInfo, 0,
eCSR_ROAM_CONNECT_STATUS_UPDATE, eCSR_ROAM_RESULT_IBSS_PEER_DEPARTED);
}
break;
@@ -9387,14 +9395,14 @@ void csrRoamCheckForLinkStatusChange( tpAniSirGlobal pMac, tSirSmeRsp *pSirMsg )
tSirSmeSetContextRsp *pRsp = (tSirSmeSetContextRsp *)pSirMsg;
tListElem *pEntry;
tSmeCmd *pCommand;
-
+
pEntry = csrLLPeekHead( &pMac->sme.smeCmdActiveList, LL_ACCESS_LOCK );
if ( pEntry )
{
pCommand = GET_BASE_ADDR( pEntry, tSmeCmd, Link );
if ( eSmeCommandSetKey == pCommand->command )
- {
- sessionId = pCommand->sessionId;
+ {
+ sessionId = pCommand->sessionId;
pSession = CSR_GET_SESSION( pMac, sessionId );
if(!pSession)
@@ -9402,7 +9410,7 @@ void csrRoamCheckForLinkStatusChange( tpAniSirGlobal pMac, tSirSmeRsp *pSirMsg )
smsLog(pMac, LOGE, FL(" session %d not found "), sessionId);
return;
}
-
+
#ifdef FEATURE_WLAN_DIAG_SUPPORT_CSR
if(eCSR_ENCRYPT_TYPE_NONE != pSession->connectedProfile.EncryptionType)
{
@@ -9416,12 +9424,12 @@ void csrRoamCheckForLinkStatusChange( tpAniSirGlobal pMac, tSirSmeRsp *pSirMsg )
{
setKeyEvent.eventId = WLAN_SECURITY_EVENT_SET_PTK_RSP;
}
- setKeyEvent.encryptionModeMulticast =
+ setKeyEvent.encryptionModeMulticast =
(v_U8_t)diagEncTypeFromCSRType(pSession->connectedProfile.mcEncryptionType);
- setKeyEvent.encryptionModeUnicast =
+ setKeyEvent.encryptionModeUnicast =
(v_U8_t)diagEncTypeFromCSRType(pSession->connectedProfile.EncryptionType);
palCopyMemory( pMac->hHdd, setKeyEvent.bssid, pSession->connectedProfile.bssid, 6 );
- setKeyEvent.authMode =
+ setKeyEvent.authMode =
(v_U8_t)diagAuthTypeFromCSRType(pSession->connectedProfile.AuthType);
if( eSIR_SME_SUCCESS != pRsp->statusCode )
{
@@ -9436,9 +9444,9 @@ void csrRoamCheckForLinkStatusChange( tpAniSirGlobal pMac, tSirSmeRsp *pSirMsg )
//We are done with authentication, whethere succeed or not
csrRoamSubstateChange( pMac, eCSR_ROAM_SUBSTATE_NONE, sessionId);
- //We do it here because this linkup function is not called after association
- //when a key needs to be set.
- if( csrIsConnStateConnectedInfra(pMac, sessionId) )
+ //We do it here because this linkup function is not called after association
+ //when a key needs to be set.
+ if( csrIsConnStateConnectedInfra(pMac, sessionId) )
{
csrRoamLinkUp(pMac, pSession->connectedProfile.bssid);
}
@@ -9448,7 +9456,7 @@ void csrRoamCheckForLinkStatusChange( tpAniSirGlobal pMac, tSirSmeRsp *pSirMsg )
palCopyMemory( pMac, &roamInfo.peerMac, &pRsp->peerMacAddr, sizeof(tCsrBssid) );
//Make sure we install the GTK before indicating to HDD as authenticated
//This is to prevent broadcast packets go out after PTK and before GTK.
- if( palEqualMemory( pMac->hHdd, &Broadcastaddr, pRsp->peerMacAddr,
+ if( palEqualMemory( pMac->hHdd, &Broadcastaddr, pRsp->peerMacAddr,
sizeof(tSirMacAddr) ) )
{
#ifdef WLAN_ACTIVEMODE_OFFLOAD_FEATURE
@@ -9459,7 +9467,7 @@ void csrRoamCheckForLinkStatusChange( tpAniSirGlobal pMac, tSirSmeRsp *pSirMsg )
pMsg->messageType = pal_cpu_to_be16((tANI_U16)eWNI_SME_SET_BCN_FILTER_REQ);
pMsg->length = pal_cpu_to_be16(sizeof( tANI_U8));
pMsg->seesionId = sessionId;
- status = palSendMBMessage(pMac->hHdd, pMsg );
+ status = palSendMBMessage(pMac->hHdd, pMsg );
}
#endif
result = eCSR_ROAM_RESULT_AUTHENTICATED;
@@ -9477,7 +9485,7 @@ void csrRoamCheckForLinkStatusChange( tpAniSirGlobal pMac, tSirSmeRsp *pSirMsg )
pRsp->statusCode, pRsp->peerMacAddr[0], pRsp->peerMacAddr[1], pRsp->peerMacAddr[2],
pRsp->peerMacAddr[3], pRsp->peerMacAddr[4], pRsp->peerMacAddr[5] );
}
- csrRoamCallCallback(pMac, sessionId, &roamInfo, pCommand->u.setKeyCmd.roamId,
+ csrRoamCallCallback(pMac, sessionId, &roamInfo, pCommand->u.setKeyCmd.roamId,
eCSR_ROAM_SET_KEY_COMPLETE, result);
// Indicate SME_QOS that the SET_KEY is completed, so that SME_QOS
// can go ahead and initiate the TSPEC if any are pending
@@ -9485,7 +9493,7 @@ void csrRoamCheckForLinkStatusChange( tpAniSirGlobal pMac, tSirSmeRsp *pSirMsg )
#ifdef FEATURE_WLAN_CCX
//Send Adjacent AP repot to new AP.
if (result == eCSR_ROAM_RESULT_AUTHENTICATED &&
- pSession->isPrevApInfoValid &&
+ pSession->isPrevApInfoValid &&
pSession->connectedProfile.isCCXAssoc)
{
#ifdef WLAN_FEATURE_VOWIFI
@@ -9516,13 +9524,13 @@ void csrRoamCheckForLinkStatusChange( tpAniSirGlobal pMac, tSirSmeRsp *pSirMsg )
tSirSmeRemoveKeyRsp *pRsp = (tSirSmeRemoveKeyRsp *)pSirMsg;
tListElem *pEntry;
tSmeCmd *pCommand;
-
+
pEntry = csrLLPeekHead( &pMac->sme.smeCmdActiveList, LL_ACCESS_LOCK );
if ( pEntry )
{
pCommand = GET_BASE_ADDR( pEntry, tSmeCmd, Link );
if ( eSmeCommandRemoveKey == pCommand->command )
- {
+ {
sessionId = pCommand->sessionId;
pSession = CSR_GET_SESSION( pMac, sessionId );
@@ -9536,12 +9544,12 @@ void csrRoamCheckForLinkStatusChange( tpAniSirGlobal pMac, tSirSmeRsp *pSirMsg )
WLAN_VOS_DIAG_EVENT_DEF(removeKeyEvent, vos_event_wlan_security_payload_type);
palZeroMemory(pMac->hHdd, &removeKeyEvent, sizeof(vos_event_wlan_security_payload_type));
removeKeyEvent.eventId = WLAN_SECURITY_EVENT_REMOVE_KEY_RSP;
- removeKeyEvent.encryptionModeMulticast =
+ removeKeyEvent.encryptionModeMulticast =
(v_U8_t)diagEncTypeFromCSRType(pSession->connectedProfile.mcEncryptionType);
- removeKeyEvent.encryptionModeUnicast =
+ removeKeyEvent.encryptionModeUnicast =
(v_U8_t)diagEncTypeFromCSRType(pSession->connectedProfile.EncryptionType);
palCopyMemory( pMac->hHdd, removeKeyEvent.bssid, pSession->connectedProfile.bssid, 6 );
- removeKeyEvent.authMode =
+ removeKeyEvent.authMode =
(v_U8_t)diagAuthTypeFromCSRType(pSession->connectedProfile.AuthType);
if( eSIR_SME_SUCCESS != pRsp->statusCode )
{
@@ -9560,7 +9568,7 @@ void csrRoamCheckForLinkStatusChange( tpAniSirGlobal pMac, tSirSmeRsp *pSirMsg )
{
result = eCSR_ROAM_RESULT_FAILURE;
}
- csrRoamCallCallback(pMac, sessionId, &roamInfo, pCommand->u.setKeyCmd.roamId,
+ csrRoamCallCallback(pMac, sessionId, &roamInfo, pCommand->u.setKeyCmd.roamId,
eCSR_ROAM_REMOVE_KEY_COMPLETE, result);
if( csrLLRemoveEntry( &pMac->sme.smeCmdActiveList, pEntry, LL_ACCESS_LOCK ) )
{
@@ -9605,10 +9613,10 @@ void csrRoamCheckForLinkStatusChange( tpAniSirGlobal pMac, tSirSmeRsp *pSirMsg )
sessionId = pSmeMaxAssocInd->sessionId;
roamInfo.sessionId = sessionId;
palCopyMemory(pMac->hHdd, &roamInfo.peerMac, pSmeMaxAssocInd->peerMac, sizeof(tCsrBssid));
- csrRoamCallCallback(pMac, sessionId, &roamInfo, 0,
+ csrRoamCallCallback(pMac, sessionId, &roamInfo, 0,
eCSR_ROAM_INFRA_IND, eCSR_ROAM_RESULT_MAX_ASSOC_EXCEEDED);
break;
-
+
case eWNI_SME_BTAMP_LOG_LINK_IND:
smsLog( pMac, LOG1, FL("Establish logical link req from HCI serialized through MC thread"));
btampEstablishLogLinkHdlr( pSirMsg );
@@ -9629,7 +9637,7 @@ void csrRoamCheckForLinkStatusChange( tpAniSirGlobal pMac, tSirSmeRsp *pSirMsg )
} // end switch on message type
}
-void csrCallRoamingCompletionCallback(tpAniSirGlobal pMac, tCsrRoamSession *pSession,
+void csrCallRoamingCompletionCallback(tpAniSirGlobal pMac, tCsrRoamSession *pSession,
tCsrRoamInfo *pRoamInfo, tANI_U32 roamId, eCsrRoamResult roamResult)
{
if(pSession)
@@ -9639,8 +9647,8 @@ void csrCallRoamingCompletionCallback(tpAniSirGlobal pMac, tCsrRoamSession *pSes
pSession->bRefAssocStartCnt--;
VOS_ASSERT( pSession->bRefAssocStartCnt == 0);
//Need to call association_completion because there is an assoc_start pending.
- csrRoamCallCallback(pMac, pSession->sessionId, NULL, roamId,
- eCSR_ROAM_ASSOCIATION_COMPLETION,
+ csrRoamCallCallback(pMac, pSession->sessionId, NULL, roamId,
+ eCSR_ROAM_ASSOCIATION_COMPLETION,
eCSR_ROAM_RESULT_FAILURE);
}
csrRoamCallCallback(pMac, pSession->sessionId, pRoamInfo, roamId, eCSR_ROAM_ROAMING_COMPLETION, roamResult);
@@ -9655,7 +9663,7 @@ void csrCallRoamingCompletionCallback(tpAniSirGlobal pMac, tCsrRoamSession *pSes
eHalStatus csrRoamStartRoaming(tpAniSirGlobal pMac, tANI_U32 sessionId, eCsrRoamingReason roamingReason)
{
eHalStatus status = eHAL_STATUS_FAILURE;
- if(CSR_IS_LOSTLINK_ROAMING(roamingReason) &&
+ if(CSR_IS_LOSTLINK_ROAMING(roamingReason) &&
(eANI_BOOLEAN_FALSE == pMac->roam.roamSession[sessionId].fCancelRoaming))
{
status = csrScanRequestLostLink1( pMac, sessionId );
@@ -9664,7 +9672,7 @@ eHalStatus csrRoamStartRoaming(tpAniSirGlobal pMac, tANI_U32 sessionId, eCsrRoam
}
//return a boolean to indicate whether roaming completed or continue.
-tANI_BOOLEAN csrRoamCompleteRoaming(tpAniSirGlobal pMac, tANI_U32 sessionId,
+tANI_BOOLEAN csrRoamCompleteRoaming(tpAniSirGlobal pMac, tANI_U32 sessionId,
tANI_BOOLEAN fForce, eCsrRoamResult roamResult)
{
tANI_BOOLEAN fCompleted = eANI_BOOLEAN_TRUE;
@@ -9677,7 +9685,7 @@ tANI_BOOLEAN csrRoamCompleteRoaming(tpAniSirGlobal pMac, tANI_U32 sessionId,
return eANI_BOOLEAN_FALSE;
}
//Check whether time is up
- if(pSession->fCancelRoaming || fForce ||
+ if(pSession->fCancelRoaming || fForce ||
((curTime - pSession->roamingStartTime) > roamTime) ||
eCsrReassocRoaming == pSession->roamingReason ||
eCsrDynamicRoaming == pSession->roamingReason)
@@ -9734,7 +9742,7 @@ void csrRoamCancelRoaming(tpAniSirGlobal pMac, tANI_U32 sessionId)
smsLog(pMac, LOGE, FL(" session %d not found "), sessionId);
return;
}
-
+
if(CSR_IS_ROAMING(pSession))
{
smsLog(pMac, LOGW, " Cancelling roaming");
@@ -9745,9 +9753,9 @@ void csrRoamCancelRoaming(tpAniSirGlobal pMac, tANI_U32 sessionId)
}
else
{
- eCsrRoamResult roamResult = CSR_IS_LOSTLINK_ROAMING(pSession->roamingReason) ?
+ eCsrRoamResult roamResult = CSR_IS_LOSTLINK_ROAMING(pSession->roamingReason) ?
eCSR_ROAM_RESULT_LOSTLINK : eCSR_ROAM_RESULT_NONE;
- //Roaming is stopped after here
+ //Roaming is stopped after here
csrRoamCompleteRoaming(pMac, sessionId, eANI_BOOLEAN_TRUE, roamResult);
//Since CSR may be in lostlink roaming situation, abort all roaming related activities
csrScanAbortMacScan(pMac, sessionId);
@@ -9768,8 +9776,8 @@ void csrRoamRoamingTimerHandler(void *pv)
smsLog(pMac, LOGE, FL(" session %d not found "), sessionId);
return;
}
-
- if(eANI_BOOLEAN_FALSE == pSession->fCancelRoaming)
+
+ if(eANI_BOOLEAN_FALSE == pSession->fCancelRoaming)
{
if(!HAL_STATUS_SUCCESS(csrRoamStartRoaming(pMac, sessionId, pSession->roamingReason)))
{
@@ -9789,11 +9797,11 @@ eHalStatus csrRoamStartRoamingTimer(tpAniSirGlobal pMac, tANI_U32 sessionId, tAN
smsLog(pMac, LOGE, FL(" session %d not found"), sessionId);
return eHAL_STATUS_FAILURE;
}
-
+
smsLog(pMac, LOG1, " csrScanStartRoamingTimer");
pSession->roamingTimerInfo.sessionId = (tANI_U8)sessionId;
status = palTimerStart(pMac->hHdd, pSession->hTimerRoaming, interval, eANI_BOOLEAN_FALSE);
-
+
return (status);
}
@@ -9817,9 +9825,9 @@ void csrRoamWaitForKeyTimeOutHandler(void *pv)
#ifdef FEATURE_WLAN_LFR
if (csrNeighborRoamIsHandoffInProgress(pMac))
{
- /*
+ /*
* Enable heartbeat timer when hand-off is in progress
- * and Key Wait timer expired.
+ * and Key Wait timer expired.
*/
smsLog(pMac, LOG2, "Enabling HB timer after WaitKey expiry"
" (nHBCount=%d)",
@@ -9834,7 +9842,7 @@ void csrRoamWaitForKeyTimeOutHandler(void *pv)
csrRoamSubstateChange( pMac, eCSR_ROAM_SUBSTATE_NONE, pInfo->sessionId);
if (pSession)
{
- if( csrIsConnStateConnectedInfra(pMac, pInfo->sessionId) )
+ if( csrIsConnStateConnectedInfra(pMac, pInfo->sessionId) )
{
csrRoamLinkUp(pMac, pSession->connectedProfile.bssid);
smeProcessPendingQueue(pMac);
@@ -9850,7 +9858,7 @@ void csrRoamWaitForKeyTimeOutHandler(void *pv)
smsLog(pMac, LOGW, "%s: session not found", __func__);
}
}
-
+
}
eHalStatus csrRoamStartWaitForKeyTimer(tpAniSirGlobal pMac, tANI_U32 interval)
@@ -9869,7 +9877,7 @@ eHalStatus csrRoamStartWaitForKeyTimer(tpAniSirGlobal pMac, tANI_U32 interval)
#endif
smsLog(pMac, LOG1, " csrScanStartWaitForKeyTimer");
status = palTimerStart(pMac->hHdd, pMac->roam.hTimerWaitForKey, interval, eANI_BOOLEAN_FALSE);
-
+
return (status);
}
@@ -9881,9 +9889,9 @@ eHalStatus csrRoamStopWaitForKeyTimer(tpAniSirGlobal pMac)
#ifdef FEATURE_WLAN_LFR
if (csrNeighborRoamIsHandoffInProgress(pMac))
{
- /*
+ /*
* Enable heartbeat timer when hand-off is in progress
- * and Key Wait timer got stopped for some reason
+ * and Key Wait timer got stopped for some reason
*/
smsLog(pMac, LOG2, "Enabling HB timer after WaitKey stop"
" (nHBCount=%d)",
@@ -9909,7 +9917,7 @@ void csrRoamIbssJoinTimerHandler(void *pv)
smsLog(pMac, LOGE, FL(" session %d not found "), sessionId);
return;
}
-
+
pSession->ibss_join_pending = FALSE;
// JEZ100225: As of main/latest "tip", we are no longer doing this. Check on this.
//csrRoamCallCallback(pMac, sessionId, NULL, 0, eCSR_ROAM_IBS_IND, eCSR_ROAM_RESULT_IBSS_JOIN_FAILED);
@@ -9926,18 +9934,18 @@ eHalStatus csrRoamStartIbssJoinTimer(tpAniSirGlobal pMac, tANI_U32 sessionId, tA
smsLog(pMac, LOGE, FL(" session %d not found "), sessionId);
return eHAL_STATUS_FAILURE;
}
-
+
smsLog(pMac, LOG1, " csrRoamStartIbssJoinTimer");
pSession->ibssJoinTimerInfo.sessionId = (tANI_U8)sessionId;
status = palTimerStart(pMac->hHdd, pSession->hTimerIbssJoining, interval, eANI_BOOLEAN_FALSE);
-
+
return (status);
}
eHalStatus csrRoamStopIbssJoinTimer(tpAniSirGlobal pMac, tANI_U32 sessionId)
{
return (palTimerStop(pMac->hHdd, pMac->roam.roamSession[sessionId].hTimerIbssJoining));
}
-void csrRoamCompletion(tpAniSirGlobal pMac, tANI_U32 sessionId, tCsrRoamInfo *pRoamInfo, tSmeCmd *pCommand,
+void csrRoamCompletion(tpAniSirGlobal pMac, tANI_U32 sessionId, tCsrRoamInfo *pRoamInfo, tSmeCmd *pCommand,
eCsrRoamResult roamResult, tANI_BOOLEAN fSuccess)
{
eRoamCmdStatus roamStatus = csrGetRoamCompleteStatus(pMac, sessionId);
@@ -9949,7 +9957,7 @@ void csrRoamCompletion(tpAniSirGlobal pMac, tANI_U32 sessionId, tCsrRoamInfo *pR
smsLog(pMac, LOGE, FL(" session %d not found "), sessionId);
return;
}
-
+
if(pCommand)
{
roamId = pCommand->u.roamCmd.roamId;
@@ -10013,13 +10021,13 @@ eHalStatus csrRoamLostLink( tpAniSirGlobal pMac, tANI_U32 sessionId, tANI_U32 ty
result = eCSR_ROAM_RESULT_NONE;
pSession->joinFailStatusCode.reasonCode = 1;
}
-
+
// call profile lost link routine here
if(!CSR_IS_INFRA_AP(&pSession->connectedProfile))
{
csrRoamCallCallback(pMac, sessionId, NULL, 0, eCSR_ROAM_LOSTLINK_DETECTED, result);
}
-
+
if ( eWNI_SME_DISASSOC_IND == type )
{
status = csrSendMBDisassocCnfMsg(pMac, pDisassocIndMsg);
@@ -10063,7 +10071,7 @@ eHalStatus csrRoamLostLink( tpAniSirGlobal pMac, tANI_U32 sessionId, tANI_U32 ty
if( pMac->roam.configParam.nRoamingTime )
{
if(HAL_STATUS_SUCCESS(status = csrRoamStartRoaming(pMac, sessionId,
- ( eWNI_SME_DEAUTH_IND == type ) ?
+ ( eWNI_SME_DEAUTH_IND == type ) ?
eCsrLostlinkRoamingDeauth : eCsrLostlinkRoamingDisassoc)))
{
palZeroMemory(pMac->hHdd, &roamInfo, sizeof(tCsrRoamInfo));
@@ -10079,7 +10087,7 @@ eHalStatus csrRoamLostLink( tpAniSirGlobal pMac, tANI_U32 sessionId, tANI_U32 ty
roamInfo.reasonCode = eCsrRoamReasonSmeIssuedForLostLink;
}
pRoamInfo = &roamInfo;
- pSession->roamingReason = ( eWNI_SME_DEAUTH_IND == type ) ?
+ pSession->roamingReason = ( eWNI_SME_DEAUTH_IND == type ) ?
eCsrLostlinkRoamingDeauth : eCsrLostlinkRoamingDisassoc;
pSession->roamingStartTime = (tANI_TIMESTAMP)palGetTickCount(pMac->hHdd);
csrRoamCallCallback(pMac, sessionId, pRoamInfo, 0, eCSR_ROAM_ROAMING_START, eCSR_ROAM_RESULT_LOSTLINK);
@@ -10108,14 +10116,14 @@ eHalStatus csrRoamLostLink( tpAniSirGlobal pMac, tANI_U32 sessionId, tANI_U32 ty
csrRoamCallCallback(pMac, sessionId, &roamInfo, 0, eCSR_ROAM_LOSTLINK, result);
}
- /*No need to start idle scan in case of IBSS/SAP
+ /*No need to start idle scan in case of IBSS/SAP
Still enable idle scan for polling in case concurrent sessions are running */
if(CSR_IS_INFRASTRUCTURE(&pSession->connectedProfile))
{
csrScanStartIdleScan(pMac);
}
}
-
+
return (status);
}
@@ -10131,7 +10139,7 @@ eHalStatus csrRoamLostLinkAfterhandoffFailure( tpAniSirGlobal pMac,tANI_U32 sess
smsLog(pMac, LOGE, FL(" session %d not found "), sessionId);
return eHAL_STATUS_FAILURE;
}
-
+
pSession->fCancelRoaming = eANI_BOOLEAN_FALSE;
//Only remove the connected BSS in infrastructure mode
csrRoamRemoveConnectedBssFromScanCache(pMac, &pSession->connectedProfile);
@@ -10164,7 +10172,7 @@ eHalStatus csrRoamLostLinkAfterhandoffFailure( tpAniSirGlobal pMac,tANI_U32 sess
//We are told not to roam, indicate lostlink
status = eHAL_STATUS_FAILURE;
}
-
+
return (status);
}
void csrRoamWmStatusChangeComplete( tpAniSirGlobal pMac )
@@ -10181,13 +10189,13 @@ void csrRoamWmStatusChangeComplete( tpAniSirGlobal pMac )
// roaming sequence.
if( csrLLRemoveEntry( &pMac->sme.smeCmdActiveList, pEntry, LL_ACCESS_LOCK ) )
{
- csrReleaseCommandWmStatusChange( pMac, pCommand );
+ csrReleaseCommandWmStatusChange( pMac, pCommand );
}
else
{
smsLog( pMac, LOGE, " ******csrRoamWmStatusChangeComplete fail to release command");
}
-
+
}
else
{
@@ -10212,7 +10220,7 @@ void csrRoamProcessWmStatusChangeCommand( tpAniSirGlobal pMac, tSmeCmd *pCommand
smsLog(pMac, LOGE, FL(" session %d not found "), pCommand->sessionId);
return;
}
-
+
switch ( pCommand->u.wmStatusChangeCmd.Type )
{
case eCsrDisassociated:
@@ -10244,16 +10252,16 @@ void csrRoamProcessWmStatusChangeCommand( tpAniSirGlobal pMac, tSmeCmd *pCommand
//This function returns band and mode information.
//The only tricky part is that if phyMode is set to 11abg, this function may return eCSR_CFG_DOT11_MODE_11B
//instead of eCSR_CFG_DOT11_MODE_11G if everything is set to auto-pick.
-static eCsrCfgDot11Mode csrRoamGetPhyModeBandForBss( tpAniSirGlobal pMac, tCsrRoamProfile *pProfile,
+static eCsrCfgDot11Mode csrRoamGetPhyModeBandForBss( tpAniSirGlobal pMac, tCsrRoamProfile *pProfile,
tANI_U8 operationChn, eCsrBand *pBand )
{
eCsrPhyMode phyModeIn = (eCsrPhyMode)pProfile->phyMode;
- eCsrCfgDot11Mode cfgDot11Mode = csrGetCfgDot11ModeFromCsrPhyMode(pProfile, phyModeIn,
+ eCsrCfgDot11Mode cfgDot11Mode = csrGetCfgDot11ModeFromCsrPhyMode(pProfile, phyModeIn,
pMac->roam.configParam.ProprietaryRatesEnabled);
eCsrBand eBand;
-
+
//If the global setting for dot11Mode is set to auto/abg, we overwrite the setting in the profile.
- if( ((!CSR_IS_INFRA_AP(pProfile )&& !CSR_IS_WDS(pProfile )) &&
+ if( ((!CSR_IS_INFRA_AP(pProfile )&& !CSR_IS_WDS(pProfile )) &&
((eCSR_CFG_DOT11_MODE_AUTO == pMac->roam.configParam.uCfgDot11Mode) ||
(eCSR_CFG_DOT11_MODE_ABG == pMac->roam.configParam.uCfgDot11Mode))) ||
(eCSR_CFG_DOT11_MODE_AUTO == cfgDot11Mode) || (eCSR_CFG_DOT11_MODE_ABG == cfgDot11Mode) )
@@ -10271,15 +10279,15 @@ static eCsrCfgDot11Mode csrRoamGetPhyModeBandForBss( tpAniSirGlobal pMac, tCsrRo
case eCSR_CFG_DOT11_MODE_11G:
cfgDot11Mode = eCSR_CFG_DOT11_MODE_11G;
eBand = eCSR_BAND_24;
- break;
+ break;
case eCSR_CFG_DOT11_MODE_11N:
cfgDot11Mode = eCSR_CFG_DOT11_MODE_11N;
eBand = eCSR_BAND_24;
- break;
+ break;
//case eCSR_CFG_DOT11_MODE_BEST:
// cfgDot11Mode = eCSR_CFG_DOT11_MODE_BEST;
// eBand = eCSR_BAND_24;
- // break;
+ // break;
default:
// Global dot11 Mode setting is 11a/b/g.
// use the channel number to determine the Mode setting.
@@ -10304,20 +10312,20 @@ static eCsrCfgDot11Mode csrRoamGetPhyModeBandForBss( tpAniSirGlobal pMac, tCsrRo
//
// !!LAC - WiFi tests require IBSS networks to start in 11b mode without any change to the
// default parameter settings on the adapter. We use ACU to start an IBSS through creation
- // of a startIBSS profile. this startIBSS profile has Auto MACProtocol and the
- // adapter property setting for dot11Mode is also AUTO. So in this case, let's start
+ // of a startIBSS profile. this startIBSS profile has Auto MACProtocol and the
+ // adapter property setting for dot11Mode is also AUTO. So in this case, let's start
// the IBSS network in 11b mode instead of 11g mode.
//
- // so this is for Auto=profile->MacProtocol && Auto=Global.dot11Mode && profile->channel is < 14,
+ // so this is for Auto=profile->MacProtocol && Auto=Global.dot11Mode && profile->channel is < 14,
// then start the IBSS in b mode.
- //
+ //
// Note: we used to have this start as an 11g IBSS for best performance... now to specify that
// the user will have to set the do11Mode in the property page to 11g to force it.
cfgDot11Mode = eCSR_CFG_DOT11_MODE_11B;
eBand = eCSR_BAND_24;
}
- else
- {
+ else
+ {
// else, it's a 5.0GHz channel. Set mode to 11a.
cfgDot11Mode = eCSR_CFG_DOT11_MODE_11A;
eBand = eCSR_BAND_5G;
@@ -10330,7 +10338,7 @@ static eCsrCfgDot11Mode csrRoamGetPhyModeBandForBss( tpAniSirGlobal pMac, tCsrRo
//dot11 mode is set, lets pick the band
if ( eCSR_OPERATING_CHANNEL_AUTO == operationChn )
{
- // channel is Auto also.
+ // channel is Auto also.
eBand = pMac->roam.configParam.eBand;
if(eCSR_BAND_ALL == eBand)
{
@@ -10342,8 +10350,8 @@ static eCsrCfgDot11Mode csrRoamGetPhyModeBandForBss( tpAniSirGlobal pMac, tCsrRo
{
eBand = eCSR_BAND_24;
}
- else
- {
+ else
+ {
eBand = eCSR_BAND_5G;
}
}
@@ -10351,8 +10359,8 @@ static eCsrCfgDot11Mode csrRoamGetPhyModeBandForBss( tpAniSirGlobal pMac, tCsrRo
{
*pBand = eBand;
}
-
- if (operationChn == 14){
+
+ if (operationChn == 14){
smsLog(pMac, LOGE, FL(" Switching to Dot11B mode "));
cfgDot11Mode = eCSR_CFG_DOT11_MODE_11B;
}
@@ -10388,7 +10396,7 @@ eHalStatus csrRoamIssueStopBss( tpAniSirGlobal pMac, tANI_U32 sessionId, eCsrRoa
smsLog(pMac, LOGE, FL(" session %d not found "), sessionId);
return eHAL_STATUS_FAILURE;
}
-
+
#ifdef FEATURE_WLAN_DIAG_SUPPORT_CSR
{
vos_log_ibss_pkt_type *pIbssLog;
@@ -10417,7 +10425,7 @@ eHalStatus csrRoamIssueStopBss( tpAniSirGlobal pMac, tANI_U32 sessionId, eCsrRoa
//pNumChan is a caller allocated space with the sizeof pChannels
eHalStatus csrGetCfgValidChannels(tpAniSirGlobal pMac, tANI_U8 *pChannels, tANI_U32 *pNumChan)
{
-
+
return (ccmCfgGetStr(pMac, WNI_CFG_VALID_CHANNEL_LIST,
(tANI_U8 *)pChannels,
pNumChan));
@@ -10487,7 +10495,7 @@ tANI_BOOLEAN csrRoamIsChannelValid( tpAniSirGlobal pMac, tANI_U8 channel )
tANI_BOOLEAN fValid = FALSE;
tANI_U32 idxValidChannels;
tANI_U32 len = sizeof(pMac->roam.validChannelList);
-
+
if (HAL_STATUS_SUCCESS(csrGetCfgValidChannels(pMac, pMac->roam.validChannelList, &len)))
{
for ( idxValidChannels = 0; ( idxValidChannels < len ); idxValidChannels++ )
@@ -10498,8 +10506,8 @@ tANI_BOOLEAN csrRoamIsChannelValid( tpAniSirGlobal pMac, tANI_U8 channel )
break;
}
}
- }
- pMac->roam.numValidChannels = len;
+ }
+ pMac->roam.numValidChannels = len;
return fValid;
}
@@ -10539,7 +10547,7 @@ tANI_BOOLEAN csrRoamIsValid40MhzChannel(tpAniSirGlobal pMac, tANI_U8 channel)
{
if(pIes->HTInfo.present)
{
- /* This is called during INFRA STA/CLIENT and should use the merged value of
+ /* This is called during INFRA STA/CLIENT and should use the merged value of
* supported channel width and recommended tx width as per standard
*/
smsLog(pMac, LOG1, "scws %u rtws %u sco %u",
@@ -10606,7 +10614,7 @@ tANI_BOOLEAN csrIsSameProfile(tpAniSirGlobal pMac, tCsrRoamConnectedProfile *pPr
tANI_BOOLEAN fCheck = eANI_BOOLEAN_FALSE;
tCsrScanResultFilter *pScanFilter = NULL;
eHalStatus status = eHAL_STATUS_SUCCESS;
-
+
if(pProfile1 && pProfile2)
{
status = palAllocateMemory(pMac->hHdd, (void **)&pScanFilter, sizeof(tCsrScanResultFilter));
@@ -10622,7 +10630,7 @@ tANI_BOOLEAN csrIsSameProfile(tpAniSirGlobal pMac, tCsrRoamConnectedProfile *pPr
tANI_U32 i;
for(i = 0; i < pScanFilter->SSIDs.numOfSSIDs; i++)
{
- fCheck = csrIsSsidMatch( pMac, pScanFilter->SSIDs.SSIDList[i].SSID.ssId,
+ fCheck = csrIsSsidMatch( pMac, pScanFilter->SSIDs.SSIDList[i].SSID.ssId,
pScanFilter->SSIDs.SSIDList[i].SSID.length,
pProfile1->SSID.ssId, pProfile1->SSID.length, eANI_BOOLEAN_FALSE );
if ( fCheck ) break;
@@ -10657,7 +10665,7 @@ tANI_BOOLEAN csrIsSameProfile(tpAniSirGlobal pMac, tCsrRoamConnectedProfile *pPr
palFreeMemory(pMac->hHdd, pScanFilter);
}
}
-
+
return (fCheck);
}
@@ -10679,7 +10687,7 @@ tANI_BOOLEAN csrRoamIsSameProfileKeys(tpAniSirGlobal pMac, tCsrRoamConnectedProf
for(i = 0; i < CSR_MAX_NUM_KEY; i++)
{
if(pConnProfile->Keys.KeyLength[i] != pProfile2->Keys.KeyLength[i]) break;
- if(!palEqualMemory(pMac->hHdd, &pConnProfile->Keys.KeyMaterial[i],
+ if(!palEqualMemory(pMac->hHdd, &pConnProfile->Keys.KeyMaterial[i],
&pProfile2->Keys.KeyMaterial[i], pProfile2->Keys.KeyLength[i]))
{
break;
@@ -10697,12 +10705,12 @@ tANI_BOOLEAN csrRoamIsSameProfileKeys(tpAniSirGlobal pMac, tCsrRoamConnectedProf
tANI_U8 csrRoamGetIbssStartChannelNumber50( tpAniSirGlobal pMac )
{
- tANI_U8 channel = 0;
+ tANI_U8 channel = 0;
tANI_U32 idx;
tANI_U32 idxValidChannels;
tANI_BOOLEAN fFound = FALSE;
tANI_U32 len = sizeof(pMac->roam.validChannelList);
-
+
if(eCSR_OPERATING_CHANNEL_ANY != pMac->roam.configParam.AdHocChannel5G)
{
channel = pMac->roam.configParam.AdHocChannel5G;
@@ -10713,7 +10721,7 @@ tANI_U8 csrRoamGetIbssStartChannelNumber50( tpAniSirGlobal pMac )
}
if (0 == channel && HAL_STATUS_SUCCESS(csrGetCfgValidChannels(pMac, (tANI_U8 *)pMac->roam.validChannelList, &len)))
{
- for ( idx = 0; ( idx < CSR_NUM_IBSS_START_CHANNELS_50 ) && !fFound; idx++ )
+ for ( idx = 0; ( idx < CSR_NUM_IBSS_START_CHANNELS_50 ) && !fFound; idx++ )
{
for ( idxValidChannels = 0; ( idxValidChannels < len ) && !fFound; idxValidChannels++ )
{
@@ -10725,7 +10733,7 @@ tANI_U8 csrRoamGetIbssStartChannelNumber50( tpAniSirGlobal pMac )
}
}
// this is rare, but if it does happen, we find anyone in 11a bandwidth and return the first 11a channel found!
- if (!fFound)
+ if (!fFound)
{
for ( idxValidChannels = 0; idxValidChannels < len ; idxValidChannels++ )
{
@@ -10737,8 +10745,8 @@ tANI_U8 csrRoamGetIbssStartChannelNumber50( tpAniSirGlobal pMac )
}
}
}//if
-
- return( channel );
+
+ return( channel );
}
tANI_U8 csrRoamGetIbssStartChannelNumber24( tpAniSirGlobal pMac )
@@ -10748,7 +10756,7 @@ tANI_U8 csrRoamGetIbssStartChannelNumber24( tpAniSirGlobal pMac )
tANI_U32 idxValidChannels;
tANI_BOOLEAN fFound = FALSE;
tANI_U32 len = sizeof(pMac->roam.validChannelList);
-
+
if(eCSR_OPERATING_CHANNEL_ANY != pMac->roam.configParam.AdHocChannel24)
{
channel = pMac->roam.configParam.AdHocChannel24;
@@ -10757,10 +10765,10 @@ tANI_U8 csrRoamGetIbssStartChannelNumber24( tpAniSirGlobal pMac )
channel = 0;
}
}
-
+
if (0 == channel && HAL_STATUS_SUCCESS(csrGetCfgValidChannels(pMac, (tANI_U8 *)pMac->roam.validChannelList, &len)))
{
- for ( idx = 0; ( idx < CSR_NUM_IBSS_START_CHANNELS_24 ) && !fFound; idx++ )
+ for ( idx = 0; ( idx < CSR_NUM_IBSS_START_CHANNELS_24 ) && !fFound; idx++ )
{
for ( idxValidChannels = 0; ( idxValidChannels < len ) && !fFound; idxValidChannels++ )
{
@@ -10772,33 +10780,33 @@ tANI_U8 csrRoamGetIbssStartChannelNumber24( tpAniSirGlobal pMac )
}
}
}
-
- return( channel );
+
+ return( channel );
}
-static void csrRoamGetBssStartParms( tpAniSirGlobal pMac, tCsrRoamProfile *pProfile,
+static void csrRoamGetBssStartParms( tpAniSirGlobal pMac, tCsrRoamProfile *pProfile,
tCsrRoamStartBssParams *pParam )
{
eCsrCfgDot11Mode cfgDot11Mode;
eCsrBand eBand;
tANI_U8 channel = 0;
tSirNwType nwType;
- tANI_U8 operationChannel = 0;
-
+ tANI_U8 operationChannel = 0;
+
if(pProfile->ChannelInfo.numOfChannels && pProfile->ChannelInfo.ChannelList)
{
operationChannel = pProfile->ChannelInfo.ChannelList[0];
}
-
+
cfgDot11Mode = csrRoamGetPhyModeBandForBss( pMac, pProfile, operationChannel, &eBand );
-
+
if( ( (pProfile->csrPersona == VOS_P2P_CLIENT_MODE) ||
(pProfile->csrPersona == VOS_P2P_GO_MODE) )
&& ( cfgDot11Mode == eCSR_CFG_DOT11_MODE_11B)
)
{
/* This should never happen */
- VOS_TRACE(VOS_MODULE_ID_SME, VOS_TRACE_LEVEL_FATAL,
+ VOS_TRACE(VOS_MODULE_ID_SME, VOS_TRACE_LEVEL_FATAL,
FL("For P2PClient/P2P-GO (persona %d) cfgDot11Mode is 11B"),
pProfile->csrPersona);
VOS_ASSERT(0);
@@ -10810,7 +10818,7 @@ static void csrRoamGetBssStartParms( tpAniSirGlobal pMac, tCsrRoamProfile *pProf
break;
case eCSR_CFG_DOT11_MODE_11B:
nwType = eSIR_11B_NW_TYPE;
- break;
+ break;
case eCSR_CFG_DOT11_MODE_11A:
nwType = eSIR_11A_NW_TYPE;
break;
@@ -10827,7 +10835,7 @@ static void csrRoamGetBssStartParms( tpAniSirGlobal pMac, tCsrRoamProfile *pProf
nwType = eSIR_11A_NW_TYPE;
}
break;
- }
+ }
pParam->extendedRateSet.numRates = 0;
@@ -10836,9 +10844,9 @@ static void csrRoamGetBssStartParms( tpAniSirGlobal pMac, tCsrRoamProfile *pProf
default:
smsLog(pMac, LOGE, FL("sees an unknown pSirNwType (%d)"), nwType);
case eSIR_11A_NW_TYPE:
-
+
pParam->operationalRateSet.numRates = 8;
-
+
pParam->operationalRateSet.rate[0] = SIR_MAC_RATE_6 | CSR_DOT11_BASIC_RATE_MASK;
pParam->operationalRateSet.rate[1] = SIR_MAC_RATE_9;
pParam->operationalRateSet.rate[2] = SIR_MAC_RATE_12 | CSR_DOT11_BASIC_RATE_MASK;
@@ -10847,13 +10855,13 @@ static void csrRoamGetBssStartParms( tpAniSirGlobal pMac, tCsrRoamProfile *pProf
pParam->operationalRateSet.rate[5] = SIR_MAC_RATE_36;
pParam->operationalRateSet.rate[6] = SIR_MAC_RATE_48;
pParam->operationalRateSet.rate[7] = SIR_MAC_RATE_54;
-
- if ( eCSR_OPERATING_CHANNEL_ANY == operationChannel )
+
+ if ( eCSR_OPERATING_CHANNEL_ANY == operationChannel )
{
channel = csrRoamGetIbssStartChannelNumber50( pMac );
if( 0 == channel &&
- CSR_IS_PHY_MODE_DUAL_BAND(pProfile->phyMode) &&
- CSR_IS_PHY_MODE_DUAL_BAND(pMac->roam.configParam.phyMode)
+ CSR_IS_PHY_MODE_DUAL_BAND(pProfile->phyMode) &&
+ CSR_IS_PHY_MODE_DUAL_BAND(pMac->roam.configParam.phyMode)
)
{
//We could not find a 5G channel by auto pick, let's try 2.4G channels
@@ -10867,36 +10875,36 @@ static void csrRoamGetBssStartParms( tpAniSirGlobal pMac, tCsrRoamProfile *pProf
pParam->operationalRateSet.rate[3] = SIR_MAC_RATE_11 | CSR_DOT11_BASIC_RATE_MASK;
}
}
- else
+ else
{
channel = operationChannel;
}
break;
-
+
case eSIR_11B_NW_TYPE:
pParam->operationalRateSet.numRates = 4;
pParam->operationalRateSet.rate[0] = SIR_MAC_RATE_1 | CSR_DOT11_BASIC_RATE_MASK;
pParam->operationalRateSet.rate[1] = SIR_MAC_RATE_2 | CSR_DOT11_BASIC_RATE_MASK;
pParam->operationalRateSet.rate[2] = SIR_MAC_RATE_5_5 | CSR_DOT11_BASIC_RATE_MASK;
pParam->operationalRateSet.rate[3] = SIR_MAC_RATE_11 | CSR_DOT11_BASIC_RATE_MASK;
- if ( eCSR_OPERATING_CHANNEL_ANY == operationChannel )
+ if ( eCSR_OPERATING_CHANNEL_ANY == operationChannel )
{
channel = csrRoamGetIbssStartChannelNumber24( pMac );
}
- else
+ else
{
channel = operationChannel;
}
-
- break;
+
+ break;
case eSIR_11G_NW_TYPE:
- /* For P2P Client and P2P GO, disable 11b rates */
+ /* For P2P Client and P2P GO, disable 11b rates */
if( (pProfile->csrPersona == VOS_P2P_CLIENT_MODE) ||
(pProfile->csrPersona == VOS_P2P_GO_MODE)
)
{
pParam->operationalRateSet.numRates = 8;
-
+
pParam->operationalRateSet.rate[0] = SIR_MAC_RATE_6 | CSR_DOT11_BASIC_RATE_MASK;
pParam->operationalRateSet.rate[1] = SIR_MAC_RATE_9;
pParam->operationalRateSet.rate[2] = SIR_MAC_RATE_12 | CSR_DOT11_BASIC_RATE_MASK;
@@ -10913,7 +10921,7 @@ static void csrRoamGetBssStartParms( tpAniSirGlobal pMac, tCsrRoamProfile *pProf
pParam->operationalRateSet.rate[1] = SIR_MAC_RATE_2 | CSR_DOT11_BASIC_RATE_MASK;
pParam->operationalRateSet.rate[2] = SIR_MAC_RATE_5_5 | CSR_DOT11_BASIC_RATE_MASK;
pParam->operationalRateSet.rate[3] = SIR_MAC_RATE_11 | CSR_DOT11_BASIC_RATE_MASK;
-
+
pParam->extendedRateSet.numRates = 8;
pParam->extendedRateSet.rate[0] = SIR_MAC_RATE_6;
pParam->extendedRateSet.rate[1] = SIR_MAC_RATE_9;
@@ -10924,33 +10932,33 @@ static void csrRoamGetBssStartParms( tpAniSirGlobal pMac, tCsrRoamProfile *pProf
pParam->extendedRateSet.rate[6] = SIR_MAC_RATE_48;
pParam->extendedRateSet.rate[7] = SIR_MAC_RATE_54;
}
-
- if ( eCSR_OPERATING_CHANNEL_ANY == operationChannel )
+
+ if ( eCSR_OPERATING_CHANNEL_ANY == operationChannel )
{
channel = csrRoamGetIbssStartChannelNumber24( pMac );
}
- else
+ else
{
channel = operationChannel;
}
-
- break;
+
+ break;
}
pParam->operationChn = channel;
pParam->sirNwType = nwType;
}
-static void csrRoamGetBssStartParmsFromBssDesc( tpAniSirGlobal pMac, tSirBssDescription *pBssDesc,
+static void csrRoamGetBssStartParmsFromBssDesc( tpAniSirGlobal pMac, tSirBssDescription *pBssDesc,
tDot11fBeaconIEs *pIes, tCsrRoamStartBssParams *pParam )
{
-
+
if( pParam )
{
pParam->sirNwType = pBssDesc->nwType;
pParam->cbMode = PHY_SINGLE_CHANNEL_CENTERED;
pParam->operationChn = pBssDesc->channelId;
palCopyMemory( pMac->hHdd, &pParam->bssid, pBssDesc->bssId, sizeof(tCsrBssid) );
-
+
if( pIes )
{
if(pIes->SuppRates.present)
@@ -10962,7 +10970,7 @@ static void csrRoamGetBssStartParmsFromBssDesc( tpAniSirGlobal pMac, tSirBssDesc
pIes->SuppRates.num_rates);
pIes->SuppRates.num_rates = SIR_MAC_RATESET_EID_MAX;
}
- palCopyMemory(pMac->hHdd, pParam->operationalRateSet.rate, pIes->SuppRates.rates,
+ palCopyMemory(pMac->hHdd, pParam->operationalRateSet.rate, pIes->SuppRates.rates,
sizeof(*pIes->SuppRates.rates) * pIes->SuppRates.num_rates);
}
if( pIes->SSID.present )
@@ -10984,22 +10992,22 @@ static void csrRoamDetermineMaxRateForAdHoc( tpAniSirGlobal pMac, tSirMacRateSet
{
tANI_U8 MaxRate = 0;
tANI_U32 i;
- tANI_U8 *pRate;
-
+ tANI_U8 *pRate;
+
pRate = pSirRateSet->rate;
for ( i = 0; i < pSirRateSet->numRates; i++ )
{
MaxRate = CSR_MAX( MaxRate, ( pRate[ i ] & (~CSR_DOT11_BASIC_RATE_MASK) ) );
}
-
+
// Save the max rate in the connected state information...
-
+
// modify LastRates variable as well
-
+
return;
}
-eHalStatus csrRoamIssueStartBss( tpAniSirGlobal pMac, tANI_U32 sessionId, tCsrRoamStartBssParams *pParam,
+eHalStatus csrRoamIssueStartBss( tpAniSirGlobal pMac, tANI_U32 sessionId, tCsrRoamStartBssParams *pParam,
tCsrRoamProfile *pProfile, tSirBssDescription *pBssDesc, tANI_U32 roamId )
{
eHalStatus status = eHAL_STATUS_SUCCESS;
@@ -11043,7 +11051,7 @@ eHalStatus csrRoamIssueStartBss( tpAniSirGlobal pMac, tANI_U32 sessionId, tCsrRo
pParam->pRSNIE = pProfile->pRSNReqIE;
pParam->privacy = pProfile->privacy;
- pParam->fwdWPSPBCProbeReq = pProfile->fwdWPSPBCProbeReq;
+ pParam->fwdWPSPBCProbeReq = pProfile->fwdWPSPBCProbeReq;
pParam->authType = pProfile->csr80211AuthType;
pParam->beaconInterval = pProfile->beaconInterval;
pParam->dtimPeriod = pProfile->dtimPeriod;
@@ -11053,15 +11061,15 @@ eHalStatus csrRoamIssueStartBss( tpAniSirGlobal pMac, tANI_U32 sessionId, tCsrRo
{
if (csrIsValidChannel(pMac, pParam->operationChn) != eHAL_STATUS_SUCCESS)
{
- pParam->operationChn = INFRA_AP_DEFAULT_CHANNEL;
- }
+ pParam->operationChn = INFRA_AP_DEFAULT_CHANNEL;
+ }
}
pParam->protEnabled = pProfile->protEnabled;
pParam->obssProtEnabled = pProfile->obssProtEnabled;
pParam->ht_protection = pProfile->cfg_protection;
pParam->wps_state = pProfile->wps_state;
- pParam->uCfgDot11Mode = csrRoamGetPhyModeBandForBss(pMac, pProfile, pParam->operationChn /* pProfile->operationChannel*/,
+ pParam->uCfgDot11Mode = csrRoamGetPhyModeBandForBss(pMac, pProfile, pParam->operationChn /* pProfile->operationChannel*/,
&eBand);
pParam->bssPersona = pProfile->csrPersona;
// When starting an IBSS, start on the channel from the Profile.
@@ -11069,7 +11077,7 @@ eHalStatus csrRoamIssueStartBss( tpAniSirGlobal pMac, tANI_U32 sessionId, tCsrRo
return (status);
}
-static void csrRoamPrepareBssParams(tpAniSirGlobal pMac, tANI_U32 sessionId, tCsrRoamProfile *pProfile,
+static void csrRoamPrepareBssParams(tpAniSirGlobal pMac, tANI_U32 sessionId, tCsrRoamProfile *pProfile,
tSirBssDescription *pBssDesc, tBssConfigParam *pBssConfig, tDot11fBeaconIEs *pIes)
{
tANI_U8 Channel;
@@ -11081,7 +11089,7 @@ static void csrRoamPrepareBssParams(tpAniSirGlobal pMac, tANI_U32 sessionId, tCs
smsLog(pMac, LOGE, FL(" session %d not found "), sessionId);
return;
}
-
+
if( pBssDesc )
{
csrRoamGetBssStartParmsFromBssDesc( pMac, pBssDesc, pIes, &pSession->bssParams );
@@ -11117,18 +11125,18 @@ static void csrRoamPrepareBssParams(tpAniSirGlobal pMac, tANI_U32 sessionId, tCs
}
}
Channel = pSession->bssParams.operationChn;
- //Set operating channel in pProfile which will be used
+ //Set operating channel in pProfile which will be used
//in csrRoamSetBssConfigCfg() to determine channel bonding
- //mode and will be configured in CFG later
+ //mode and will be configured in CFG later
pProfile->operationChannel = Channel;
-
+
if(Channel == 0)
{
smsLog(pMac, LOGW, " CSR cannot find a channel to start IBSS");
}
else
{
-
+
csrRoamDetermineMaxRateForAdHoc( pMac, &pSession->bssParams.operationalRateSet );
if (CSR_IS_INFRA_AP(pProfile) || CSR_IS_START_IBSS( pProfile ) )
{
@@ -11147,35 +11155,35 @@ static void csrRoamPrepareBssParams(tpAniSirGlobal pMac, tANI_U32 sessionId, tCs
}
}
-static eHalStatus csrRoamStartIbss( tpAniSirGlobal pMac, tANI_U32 sessionId, tCsrRoamProfile *pProfile,
+static eHalStatus csrRoamStartIbss( tpAniSirGlobal pMac, tANI_U32 sessionId, tCsrRoamProfile *pProfile,
tANI_BOOLEAN *pfSameIbss )
{
eHalStatus status = eHAL_STATUS_SUCCESS;
tANI_BOOLEAN fSameIbss = FALSE;
-
- if ( csrIsConnStateIbss( pMac, sessionId ) )
- {
+
+ if ( csrIsConnStateIbss( pMac, sessionId ) )
+ {
// Check if any profile parameter has changed ? If any profile parameter
// has changed then stop old BSS and start a new one with new parameters
- if ( csrIsSameProfile( pMac, &pMac->roam.roamSession[sessionId].connectedProfile, pProfile ) )
+ if ( csrIsSameProfile( pMac, &pMac->roam.roamSession[sessionId].connectedProfile, pProfile ) )
{
fSameIbss = TRUE;
}
else
{
status = csrRoamIssueStopBss( pMac, sessionId, eCSR_ROAM_SUBSTATE_DISCONNECT_CONTINUE_ROAMING );
- }
+ }
}
- else if ( csrIsConnStateConnectedInfra( pMac, sessionId ) )
+ else if ( csrIsConnStateConnectedInfra( pMac, sessionId ) )
{
// Disassociate from the connected Infrastructure network...
status = csrRoamIssueDisassociate( pMac, sessionId, eCSR_ROAM_SUBSTATE_DISCONNECT_CONTINUE_ROAMING, FALSE );
}
- else
+ else
{
tBssConfigParam *pBssConfig;
-
- status = palAllocateMemory(pMac->hHdd, (void **)&pBssConfig, sizeof(tBssConfigParam));
+
+ status = palAllocateMemory(pMac->hHdd, (void **)&pBssConfig, sizeof(tBssConfigParam));
if(HAL_STATUS_SUCCESS(status))
{
palZeroMemory(pMac->hHdd, pBssConfig, sizeof(tBssConfigParam));
@@ -11190,11 +11198,11 @@ static eHalStatus csrRoamStartIbss( tpAniSirGlobal pMac, tANI_U32 sessionId, tCs
csrRoamPrepareBssParams(pMac, sessionId, pProfile, NULL, pBssConfig, NULL);
status = csrRoamSetBssConfigCfg(pMac, sessionId, pProfile, NULL, pBssConfig, NULL);
}
-
+
palFreeMemory(pMac->hHdd, pBssConfig);
}//Allocate memory
}
-
+
if(pfSameIbss)
{
*pfSameIbss = fSameIbss;
@@ -11202,7 +11210,7 @@ static eHalStatus csrRoamStartIbss( tpAniSirGlobal pMac, tANI_U32 sessionId, tCs
return( status );
}
-static void csrRoamUpdateConnectedProfileFromNewBss( tpAniSirGlobal pMac, tANI_U32 sessionId,
+static void csrRoamUpdateConnectedProfileFromNewBss( tpAniSirGlobal pMac, tANI_U32 sessionId,
tSirSmeNewBssInfo *pNewBss )
{
tCsrRoamSession *pSession = CSR_GET_SESSION( pMac, sessionId );
@@ -11212,14 +11220,14 @@ static void csrRoamUpdateConnectedProfileFromNewBss( tpAniSirGlobal pMac, tANI_U
smsLog(pMac, LOGE, FL(" session %d not found "), sessionId);
return;
}
-
+
if( pNewBss )
{
// Set the operating channel.
pSession->connectedProfile.operationChannel = pNewBss->channelNumber;
// move the BSSId from the BSS description into the connected state information.
- palCopyMemory( pMac->hHdd, &pSession->connectedProfile.bssid,
- &(pNewBss->bssId), sizeof( tCsrBssid ) );
+ palCopyMemory( pMac->hHdd, &pSession->connectedProfile.bssid,
+ &(pNewBss->bssId), sizeof( tCsrBssid ) );
}
return;
}
@@ -11294,13 +11302,13 @@ eHalStatus csrRoamSetPMKIDCache( tpAniSirGlobal pMac, tANI_U32 sessionId,
{
eHalStatus status = eHAL_STATUS_INVALID_PARAMETER;
tCsrRoamSession *pSession = CSR_GET_SESSION( pMac, sessionId );
-
+
if(!pSession)
{
smsLog(pMac, LOGE, FL(" session %d not found "), sessionId);
return eHAL_STATUS_FAILURE;
}
-
+
smsLog(pMac, LOGW, "csrRoamSetPMKIDCache called, numItems = %d", numItems);
if(numItems <= CSR_MAX_PMKID_ALLOWED)
{
@@ -11309,12 +11317,12 @@ eHalStatus csrRoamSetPMKIDCache( tpAniSirGlobal pMac, tANI_U32 sessionId,
WLAN_VOS_DIAG_EVENT_DEF(secEvent, vos_event_wlan_security_payload_type);
palZeroMemory(pMac->hHdd, &secEvent, sizeof(vos_event_wlan_security_payload_type));
secEvent.eventId = WLAN_SECURITY_EVENT_PMKID_UPDATE;
- secEvent.encryptionModeMulticast =
+ secEvent.encryptionModeMulticast =
(v_U8_t)diagEncTypeFromCSRType(pSession->connectedProfile.mcEncryptionType);
- secEvent.encryptionModeUnicast =
+ secEvent.encryptionModeUnicast =
(v_U8_t)diagEncTypeFromCSRType(pSession->connectedProfile.EncryptionType);
palCopyMemory( pMac->hHdd, secEvent.bssid, pSession->connectedProfile.bssid, 6 );
- secEvent.authMode =
+ secEvent.authMode =
(v_U8_t)diagAuthTypeFromCSRType(pSession->connectedProfile.AuthType);
WLAN_VOS_DIAG_EVENT_REPORT(&secEvent, EVENT_WLAN_SECURITY);
}
@@ -11346,7 +11354,7 @@ eHalStatus csrRoamGetPMKIDCache(tpAniSirGlobal pMac, tANI_U32 sessionId, tANI_U3
smsLog(pMac, LOGE, FL(" session %d not found "), sessionId);
return eHAL_STATUS_FAILURE;
}
-
+
if(pNum && pPmkidCache)
{
if(pSession->NumPmkidCache == 0)
@@ -11376,13 +11384,13 @@ eHalStatus csrRoamGetWpaRsnReqIE(tpAniSirGlobal pMac, tANI_U32 sessionId, tANI_U
eHalStatus status = eHAL_STATUS_INVALID_PARAMETER;
tANI_U32 len;
tCsrRoamSession *pSession = CSR_GET_SESSION( pMac, sessionId );
-
+
if(!pSession)
{
smsLog(pMac, LOGE, FL(" session %d not found "), sessionId);
return eHAL_STATUS_FAILURE;
}
-
+
if(pLen)
{
len = *pLen;
@@ -11409,7 +11417,7 @@ eHalStatus csrRoamGetWpaRsnRspIE(tpAniSirGlobal pMac, tANI_U32 sessionId, tANI_U
smsLog(pMac, LOGE, FL(" session %d not found "), sessionId);
return eHAL_STATUS_FAILURE;
}
-
+
if(pLen)
{
len = *pLen;
@@ -11436,7 +11444,7 @@ eHalStatus csrRoamGetWapiReqIE(tpAniSirGlobal pMac, tANI_U32 sessionId, tANI_U32
smsLog(pMac, LOGE, FL(" session %d not found "), sessionId);
return eHAL_STATUS_FAILURE;
}
-
+
if(pLen)
{
len = *pLen;
@@ -11462,7 +11470,7 @@ eHalStatus csrRoamGetWapiRspIE(tpAniSirGlobal pMac, tANI_U32 sessionId, tANI_U32
smsLog(pMac, LOGE, FL(" session %d not found "), sessionId);
return eHAL_STATUS_FAILURE;
}
-
+
if(pLen)
{
len = *pLen;
@@ -11488,7 +11496,7 @@ eRoamCmdStatus csrGetRoamCompleteStatus(tpAniSirGlobal pMac, tANI_U32 sessionId)
smsLog(pMac, LOGE, FL(" session %d not found "), sessionId);
return (retStatus);
}
-
+
if(CSR_IS_ROAMING(pSession))
{
retStatus = eCSR_ROAM_ROAMING_COMPLETION;
@@ -11542,11 +11550,11 @@ eHalStatus csrRoamRemoveConnectedBssFromScanCache(tpAniSirGlobal pMac,
pScanFilter->phyMode = eCSR_DOT11_MODE_TAURUS;
csrLLLock(&pMac->scan.scanResultList);
pEntry = csrLLPeekHead( &pMac->scan.scanResultList, LL_ACCESS_NOLOCK );
- while( pEntry )
+ while( pEntry )
{
pResult = GET_BASE_ADDR( pEntry, tCsrScanResult, Link );
pIes = (tDot11fBeaconIEs *)( pResult->Result.pvIes );
- fMatch = csrMatchBSS(pMac, &pResult->Result.BssDescriptor,
+ fMatch = csrMatchBSS(pMac, &pResult->Result.BssDescriptor,
pScanFilter, NULL, NULL, NULL, &pIes);
//Release the IEs allocated by csrMatchBSS is needed
if( !pResult->Result.pvIes )
@@ -11595,7 +11603,7 @@ eHalStatus csrIsBTAMPAllowed( tpAniSirGlobal pMac, tANI_U32 chnId )
}
if( csrIsConnStateInfra( pMac, sessionId ) )
{
- if( chnId &&
+ if( chnId &&
( (tANI_U8)chnId != pMac->roam.roamSession[sessionId].connectedProfile.operationChannel ) )
{
smsLog( pMac, LOGW, " BTAMP is not allowed due to channel (%d) diff than infr channel (%d)",
@@ -11620,21 +11628,21 @@ static eHalStatus csrRoamStartWds( tpAniSirGlobal pMac, tANI_U32 sessionId, tCsr
smsLog(pMac, LOGE, FL(" session %d not found "), sessionId);
return eHAL_STATUS_FAILURE;
}
-
- if ( csrIsConnStateIbss( pMac, sessionId ) )
- {
+
+ if ( csrIsConnStateIbss( pMac, sessionId ) )
+ {
status = csrRoamIssueStopBss( pMac, sessionId, eCSR_ROAM_SUBSTATE_DISCONNECT_CONTINUE_ROAMING );
}
- else if ( csrIsConnStateConnectedInfra( pMac, sessionId ) )
+ else if ( csrIsConnStateConnectedInfra( pMac, sessionId ) )
{
// Disassociate from the connected Infrastructure network...
status = csrRoamIssueDisassociate( pMac, sessionId, eCSR_ROAM_SUBSTATE_DISCONNECT_CONTINUE_ROAMING, FALSE );
}
else
{
- //We don't expect Bt-AMP HDD not to disconnect the last connection first at this time.
+ //We don't expect Bt-AMP HDD not to disconnect the last connection first at this time.
//Otherwise we need to add code to handle the
- //situation just like IBSS. Though for WDS station, we need to send disassoc to PE first then
+ //situation just like IBSS. Though for WDS station, we need to send disassoc to PE first then
//send stop_bss to PE, before we can continue.
VOS_ASSERT( !csrIsConnStateWds( pMac, sessionId ) );
palZeroMemory(pMac->hHdd, &bssConfig, sizeof(tBssConfigParam));
@@ -11647,7 +11655,7 @@ static eHalStatus csrRoamStartWds( tpAniSirGlobal pMac, tANI_U32 sessionId, tCsr
{
//Save profile for late use
csrFreeRoamProfile( pMac, sessionId );
- if (HAL_STATUS_SUCCESS(palAllocateMemory(pMac->hHdd,
+ if (HAL_STATUS_SUCCESS(palAllocateMemory(pMac->hHdd,
(void **)&pSession->pCurRoamProfile,
sizeof(tCsrRoamProfile))))
{
@@ -11659,7 +11667,7 @@ static eHalStatus csrRoamStartWds( tpAniSirGlobal pMac, tANI_U32 sessionId, tCsr
status = csrRoamSetBssConfigCfg(pMac, sessionId, pProfile, NULL, &bssConfig, NULL);
}
}
-
+
return( status );
}
@@ -11667,8 +11675,8 @@ static eHalStatus csrRoamStartWds( tpAniSirGlobal pMac, tANI_U32 sessionId, tCsr
//pBuf is caller allocated memory point to &(tSirSmeJoinReq->rsnIE.rsnIEdata[ 0 ]) + pMsg->rsnIE.length;
//or &(tSirSmeReassocReq->rsnIE.rsnIEdata[ 0 ]) + pMsg->rsnIE.length;
-static void csrPrepareJoinReassocReqBuffer( tpAniSirGlobal pMac,
- tSirBssDescription *pBssDescription,
+static void csrPrepareJoinReassocReqBuffer( tpAniSirGlobal pMac,
+ tSirBssDescription *pBssDescription,
tANI_U8 *pBuf, tANI_U8 uapsdMask)
{
tCsrChannelSet channelGroup;
@@ -11692,14 +11700,14 @@ static void csrPrepareJoinReassocReqBuffer( tpAniSirGlobal pMac,
}
else
fTmp = (tAniBool)0;
-
+
// corresponds to --- pMsg->spectrumMgtIndicator = ON;
palCopyMemory( pMac->hHdd, pBuf, (tANI_U8 *)&fTmp, sizeof(tAniBool) );
pBuf += sizeof(tAniBool);
*pBuf++ = MIN_STA_PWR_CAP_DBM; // it is for pMsg->powerCap.minTxPower = 0;
found = csrSearchChannelListForTxPower(pMac, pBssDescription, &channelGroup);
// This is required for 11k test VoWiFi Ent: Test 2.
- // We need the power capabilities for Assoc Req.
+ // We need the power capabilities for Assoc Req.
// This macro is provided by the halPhyCfg.h. We pick our
// max and min capability by the halPhy provided macros
pwrLimit = csrGetCfgMaxTxPower (pMac, pBssDescription->channelId);
@@ -11713,19 +11721,19 @@ static void csrPrepareJoinReassocReqBuffer( tpAniSirGlobal pMac,
}
size = sizeof(pMac->roam.validChannelList);
if(HAL_STATUS_SUCCESS(csrGetCfgValidChannels(pMac, (tANI_U8 *)pMac->roam.validChannelList, &size)))
- {
- *pBuf++ = (tANI_U8)size; //tSirSupChnl->numChnl
- for ( i = 0; i < size; i++)
+ {
+ *pBuf++ = (tANI_U8)size; //tSirSupChnl->numChnl
+ for ( i = 0; i < size; i++)
{
*pBuf++ = pMac->roam.validChannelList[ i ]; //tSirSupChnl->channelList[ i ]
-
+
}
}
else
{
smsLog(pMac, LOGE, FL("can not find any valid channel"));
*pBuf++ = 0; //tSirSupChnl->numChnl
- }
+ }
//Check whether it is ok to enter UAPSD
#ifndef WLAN_MDM_CODE_REDUCTION_OPT
if( btcIsReadyForUapsd(pMac) )
@@ -11740,14 +11748,14 @@ static void csrPrepareJoinReassocReqBuffer( tpAniSirGlobal pMac,
*pBuf++ = 0;
}
#endif /* WLAN_MDM_CODE_REDUCTION_OPT*/
-
+
// move the entire BssDescription into the join request.
- palCopyMemory( pMac->hHdd, pBuf, pBssDescription,
+ palCopyMemory( pMac->hHdd, pBuf, pBssDescription,
pBssDescription->length + sizeof( pBssDescription->length ) );
pBuf += pBssDescription->length + sizeof( pBssDescription->length ); // update to new location
}
-/*
+/*
* The communication between HDD and LIM is thru mailbox (MB).
* Both sides will access the data structure "tSirSmeJoinReq".
* The rule is, while the components of "tSirSmeJoinReq" can be accessed in the regular way like tSirSmeJoinReq.assocType, this guideline
@@ -11755,7 +11763,7 @@ static void csrPrepareJoinReassocReqBuffer( tpAniSirGlobal pMac,
* with the component "tSirBssDescription". And since the size of actual 'tSirBssDescription' varies, the receiving side (which is the routine
* limJoinReqSerDes() of limSerDesUtils.cc) should keep in mind not to access the components DIRECTLY after tSirRSNie.
*/
-eHalStatus csrSendJoinReqMsg( tpAniSirGlobal pMac, tANI_U32 sessionId, tSirBssDescription *pBssDescription,
+eHalStatus csrSendJoinReqMsg( tpAniSirGlobal pMac, tANI_U32 sessionId, tSirBssDescription *pBssDescription,
tCsrRoamProfile *pProfile, tDot11fBeaconIEs *pIes, tANI_U16 messageType )
{
eHalStatus status = eHAL_STATUS_SUCCESS;
@@ -11787,14 +11795,14 @@ eHalStatus csrSendJoinReqMsg( tpAniSirGlobal pMac, tANI_U32 sessionId, tSirBssDe
pSession->joinFailStatusCode.reasonCode = 0;
memcpy (&pSession->joinFailStatusCode.bssId, &pBssDescription->bssId, sizeof(tSirMacAddr));
// There are a number of variable length fields to consider. First, the tSirSmeJoinReq
- // includes a single bssDescription. bssDescription includes a single tANI_U32 for the
- // IE fields, but the length field in the bssDescription needs to be interpreted to
+ // includes a single bssDescription. bssDescription includes a single tANI_U32 for the
+ // IE fields, but the length field in the bssDescription needs to be interpreted to
// determine length of the IE fields.
//
- // So, take the size of the JoinReq, subtract the size of the bssDescription and
+ // So, take the size of the JoinReq, subtract the size of the bssDescription and
// add in the length from the bssDescription (then add the size of the 'length' field
// itself because that is NOT included in the length field).
- msgLen = sizeof( tSirSmeJoinReq ) - sizeof( *pBssDescription ) +
+ msgLen = sizeof( tSirSmeJoinReq ) - sizeof( *pBssDescription ) +
pBssDescription->length + sizeof( pBssDescription->length ) +
sizeof( tCsrWpaIe ) + sizeof( tCsrWpaAuthIe ) + sizeof( tANI_U16 ); // add in the size of the WPA IE that we may build.
status = palAllocateMemory(pMac->hHdd, (void **)&pMsg, msgLen);
@@ -12040,7 +12048,7 @@ eHalStatus csrSendJoinReqMsg( tpAniSirGlobal pMac, tANI_U32 sessionId, tSirBssDe
if(!HAL_STATUS_SUCCESS(status)) break;
}
pSession->nAddIEScanLength = ieLen;
- palCopyMemory(pMac->hHdd, pSession->pAddIEScan,
+ palCopyMemory(pMac->hHdd, pSession->pAddIEScan,
pProfile->pAddIEScan, ieLen);
wTmp = pal_cpu_to_be16( ieLen );
palCopyMemory( pMac->hHdd, pBuf, &wTmp, sizeof(tANI_U16) );
@@ -12295,6 +12303,11 @@ eHalStatus csrSendJoinReqMsg( tpAniSirGlobal pMac, tANI_U32 sessionId, tSirBssDe
// txBFCsnValue
*pBuf = (tANI_U8)pMac->roam.configParam.txBFCsnValue;
pBuf++;
+
+ // txMuBformee
+ *pBuf = (tANI_U8)pMac->roam.configParam.txMuBformee;
+ pBuf++;
+
#endif
//BssDesc
csrPrepareJoinReassocReqBuffer( pMac, pBssDescription, pBuf,
@@ -12346,7 +12359,7 @@ eHalStatus csrSendMBDisassocReqMsg( tpAniSirGlobal pMac, tANI_U32 sessionId, tSi
*pBuf = 0;
*( pBuf + 1 ) = 0;
pBuf += sizeof(tANI_U16);
-
+
if ( (pSession->pCurRoamProfile != NULL) &&
((CSR_IS_INFRA_AP(pSession->pCurRoamProfile)) ||
(CSR_IS_WDS_AP(pSession->pCurRoamProfile))) )
@@ -12380,13 +12393,13 @@ eHalStatus csrSendMBDisassocReqMsg( tpAniSirGlobal pMac, tANI_U32 sessionId, tSi
break;
}
pBuf += sizeof(tANI_U16);
- /* The state will be DISASSOC_HANDOFF only when we are doing handoff.
+ /* The state will be DISASSOC_HANDOFF only when we are doing handoff.
Here we should not send the disassoc over the air to the AP */
if ( CSR_IS_ROAM_SUBSTATE_DISASSOC_HO(pMac, sessionId)
#ifdef WLAN_FEATURE_VOWIFI_11R
&& csrRoamIs11rAssoc(pMac)
#endif
- )
+ )
{
*pBuf = CSR_DONT_SEND_DISASSOC_OVER_THE_AIR; /* Set DoNotSendOverTheAir flag to 1 only for handoff case */
}
@@ -12449,7 +12462,7 @@ csrSendMBGetAssociatedStasReqMsg( tpAniSirGlobal pMac, tANI_U32 sessionId,
// bssId
palCopyMemory( pMac->hHdd, (tSirMacAddr *)pBuf, bssId, sizeof(tSirMacAddr) );
pBuf += sizeof(tSirMacAddr);
- // modId
+ // modId
dwTmp = pal_cpu_to_be16((tANI_U16)modId);
palCopyMemory( pMac->hHdd, pBuf, (tANI_U8 *)&dwTmp, sizeof(tANI_U16));
pBuf += sizeof(tANI_U16);
@@ -12527,7 +12540,7 @@ csrSendChngMCCBeaconInterval(tpAniSirGlobal pMac, tANI_U32 sessionId)
pMac->roam.roamSession[sessionId].bssParams.updatebeaconInterval = eANI_BOOLEAN_FALSE;
/* Create the message and send to lim */
- len = sizeof(tSirChangeBIParams);
+ len = sizeof(tSirChangeBIParams);
status = palAllocateMemory( pMac->hHdd, (void **)&pMsg, len );
if(HAL_STATUS_SUCCESS(status))
{
@@ -12542,7 +12555,7 @@ csrSendChngMCCBeaconInterval(tpAniSirGlobal pMac, tANI_U32 sessionId)
pMsg->bssId[ 3 ], pMsg->bssId[ 4 ], pMsg->bssId[ 5 ] );
pMsg->sessionId = sessionId;
smsLog(pMac, LOG1, FL(" session %d BeaconInterval %d"), sessionId, pMac->roam.roamSession[sessionId].bssParams.beaconInterval);
- pMsg->beaconInterval = pMac->roam.roamSession[sessionId].bssParams.beaconInterval;
+ pMsg->beaconInterval = pMac->roam.roamSession[sessionId].bssParams.beaconInterval;
status = palSendMBMessage(pMac->hHdd, pMsg);
}
return status;
@@ -12566,14 +12579,14 @@ eHalStatus csrSendMBDeauthReqMsg( tpAniSirGlobal pMac, tANI_U32 sessionId, tSirM
//sessionId
pBuf = &pMsg->sessionId;
*pBuf++ = (tANI_U8)sessionId;
-
+
//tansactionId
*pBuf = 0;
*(pBuf + 1 ) = 0;
pBuf += sizeof(tANI_U16);
if ((pSession->pCurRoamProfile != NULL) && (
- (CSR_IS_INFRA_AP(pSession->pCurRoamProfile)) ||
- (CSR_IS_WDS_AP(pSession->pCurRoamProfile)))){
+ (CSR_IS_INFRA_AP(pSession->pCurRoamProfile)) ||
+ (CSR_IS_WDS_AP(pSession->pCurRoamProfile)))){
// Set the BSSID before sending the message to LIM
status = palCopyMemory( pMac->hHdd, (tSirMacAddr *)pBuf, pSession->selfMacAddr, sizeof( pMsg->peerMacAddr ) );
pBuf = pBuf + sizeof(tSirMacAddr);
@@ -12588,7 +12601,7 @@ eHalStatus csrSendMBDeauthReqMsg( tpAniSirGlobal pMac, tANI_U32 sessionId, tSirM
{
palFreeMemory(pMac->hHdd, pMsg);
break;
- }
+ }
// Set the peer MAC address before sending the message to LIM
status = palCopyMemory( pMac->hHdd, (tSirMacAddr *) pBuf, bssId, sizeof( pMsg->peerMacAddr ) );
pBuf = pBuf + sizeof(tSirMacAddr);
@@ -12596,7 +12609,7 @@ eHalStatus csrSendMBDeauthReqMsg( tpAniSirGlobal pMac, tANI_U32 sessionId, tSirM
{
palFreeMemory(pMac->hHdd, pMsg);
break;
- }
+ }
wTmp = pal_cpu_to_be16(reasonCode);
status = palCopyMemory( pMac->hHdd, pBuf, &wTmp,sizeof( tANI_U16 ) );
if(!HAL_STATUS_SUCCESS(status))
@@ -12620,14 +12633,14 @@ eHalStatus csrSendMBDisassocCnfMsg( tpAniSirGlobal pMac, tpSirSmeDisassocInd pDi
pMsg->messageType = pal_cpu_to_be16((tANI_U16)eWNI_SME_DISASSOC_CNF);
pMsg->statusCode = (tSirResultCodes)pal_cpu_to_be32(eSIR_SME_SUCCESS);
pMsg->length = pal_cpu_to_be16((tANI_U16)sizeof( tSirSmeDisassocCnf ));
- status = palCopyMemory(pMac->hHdd, pMsg->peerMacAddr, pDisassocInd->peerMacAddr, sizeof(pMsg->peerMacAddr));
+ status = palCopyMemory(pMac->hHdd, pMsg->peerMacAddr, pDisassocInd->peerMacAddr, sizeof(pMsg->peerMacAddr));
if(!HAL_STATUS_SUCCESS(status))
{
palFreeMemory(pMac->hHdd, pMsg);
break;
}
-//To test reconn
- status = palCopyMemory(pMac->hHdd, pMsg->bssId, pDisassocInd->bssId, sizeof(pMsg->peerMacAddr));
+//To test reconn
+ status = palCopyMemory(pMac->hHdd, pMsg->bssId, pDisassocInd->bssId, sizeof(pMsg->peerMacAddr));
if(!HAL_STATUS_SUCCESS(status))
{
palFreeMemory(pMac->hHdd, pMsg);
@@ -12650,13 +12663,13 @@ eHalStatus csrSendMBDeauthCnfMsg( tpAniSirGlobal pMac, tpSirSmeDeauthInd pDeauth
pMsg->messageType = pal_cpu_to_be16((tANI_U16)eWNI_SME_DEAUTH_CNF);
pMsg->statusCode = (tSirResultCodes)pal_cpu_to_be32(eSIR_SME_SUCCESS);
pMsg->length = pal_cpu_to_be16((tANI_U16)sizeof( tSirSmeDeauthCnf ));
- status = palCopyMemory(pMac->hHdd, pMsg->bssId, pDeauthInd->bssId, sizeof(pMsg->bssId));
+ status = palCopyMemory(pMac->hHdd, pMsg->bssId, pDeauthInd->bssId, sizeof(pMsg->bssId));
if(!HAL_STATUS_SUCCESS(status))
{
palFreeMemory(pMac->hHdd, pMsg);
break;
}
- status = palCopyMemory(pMac->hHdd, pMsg->peerMacAddr, pDeauthInd->peerMacAddr, sizeof(pMsg->peerMacAddr));
+ status = palCopyMemory(pMac->hHdd, pMsg->peerMacAddr, pDeauthInd->peerMacAddr, sizeof(pMsg->peerMacAddr));
if(!HAL_STATUS_SUCCESS(status))
{
palFreeMemory(pMac->hHdd, pMsg);
@@ -12690,7 +12703,7 @@ eHalStatus csrSendAssocCnfMsg( tpAniSirGlobal pMac, tpSirSmeAssocInd pAssocInd,
status = palCopyMemory(pMac->hHdd, (tSirMacAddr *)pBuf, pAssocInd->bssId, sizeof(tSirMacAddr));
pBuf += sizeof (tSirMacAddr);
// peerMacAddr
- status = palCopyMemory(pMac->hHdd, (tSirMacAddr *)pBuf, pAssocInd->peerMacAddr, sizeof(tSirMacAddr));
+ status = palCopyMemory(pMac->hHdd, (tSirMacAddr *)pBuf, pAssocInd->peerMacAddr, sizeof(tSirMacAddr));
pBuf += sizeof (tSirMacAddr);
// aid
wTmp = pal_cpu_to_be16(pAssocInd->aid);
@@ -12710,9 +12723,9 @@ eHalStatus csrSendAssocCnfMsg( tpAniSirGlobal pMac, tpSirSmeAssocInd pAssocInd,
} while( 0 );
return( status );
}
-eHalStatus csrSendAssocIndToUpperLayerCnfMsg( tpAniSirGlobal pMac,
- tpSirSmeAssocInd pAssocInd,
- eHalStatus Halstatus,
+eHalStatus csrSendAssocIndToUpperLayerCnfMsg( tpAniSirGlobal pMac,
+ tpSirSmeAssocInd pAssocInd,
+ eHalStatus Halstatus,
tANI_U8 sessionId)
{
tSirMsgQ msgQ;
@@ -12742,7 +12755,7 @@ eHalStatus csrSendAssocIndToUpperLayerCnfMsg( tpAniSirGlobal pMac,
status = palCopyMemory(pMac->hHdd, (tSirMacAddr *)pBuf, pAssocInd->bssId, sizeof(tSirMacAddr));
pBuf += sizeof (tSirMacAddr);
// peerMacAddr
- status = palCopyMemory(pMac->hHdd, (tSirMacAddr *)pBuf, pAssocInd->peerMacAddr, sizeof(tSirMacAddr));
+ status = palCopyMemory(pMac->hHdd, (tSirMacAddr *)pBuf, pAssocInd->peerMacAddr, sizeof(tSirMacAddr));
pBuf += sizeof (tSirMacAddr);
// StaId
wTmp = pal_cpu_to_be16(pAssocInd->staId);
@@ -12776,9 +12789,9 @@ eHalStatus csrSendAssocIndToUpperLayerCnfMsg( tpAniSirGlobal pMac,
}
eHalStatus csrSendMBSetContextReqMsg( tpAniSirGlobal pMac, tANI_U32 sessionId ,
- tSirMacAddr peerMacAddr, tANI_U8 numKeys, tAniEdType edType,
+ tSirMacAddr peerMacAddr, tANI_U8 numKeys, tAniEdType edType,
tANI_BOOLEAN fUnicast, tAniKeyDirection aniKeyDirection,
- tANI_U8 keyId, tANI_U8 keyLength, tANI_U8 *pKey, tANI_U8 paeRole,
+ tANI_U8 keyId, tANI_U8 keyLength, tANI_U8 *pKey, tANI_U8 paeRole,
tANI_U8 *pKeyRsc )
{
tSirSmeSetContextReq *pMsg;
@@ -12791,13 +12804,13 @@ eHalStatus csrSendMBSetContextReqMsg( tpAniSirGlobal pMac, tANI_U32 sessionId ,
tCsrRoamSession *pSession = CSR_GET_SESSION( pMac, sessionId );
do {
if( ( 1 != numKeys ) && ( 0 != numKeys ) ) break;
- // all of these fields appear in every SET_CONTEXT message. Below we'll add in the size for each
+ // all of these fields appear in every SET_CONTEXT message. Below we'll add in the size for each
// key set. Since we only support upto one key, we always allocate memory for 1 key
msgLen = sizeof( tANI_U16) + sizeof( tANI_U16 ) + sizeof( tSirMacAddr ) +
sizeof( tSirMacAddr ) + 1 + sizeof(tANI_U16) +
sizeof( pMsg->keyMaterial.length ) + sizeof( pMsg->keyMaterial.edType ) + sizeof( pMsg->keyMaterial.numKeys ) +
( sizeof( pMsg->keyMaterial.key ) );
-
+
status = palAllocateMemory(pMac->hHdd, (void **)&pMsg, msgLen);
if ( !HAL_STATUS_SUCCESS(status) ) break;
palZeroMemory(pMac->hHdd, pMsg, msgLen);
@@ -12812,13 +12825,13 @@ eHalStatus csrSendMBSetContextReqMsg( tpAniSirGlobal pMac, tANI_U32 sessionId ,
*(pBuf + 1) = 0;
pBuf += sizeof(tANI_U16);
// peerMacAddr
- palCopyMemory( pMac->hHdd, pBuf,
+ palCopyMemory( pMac->hHdd, pBuf,
(tANI_U8 *)peerMacAddr, sizeof(tSirMacAddr) );
pBuf += sizeof(tSirMacAddr);
// bssId
- palCopyMemory( pMac->hHdd, pBuf,
+ palCopyMemory( pMac->hHdd, pBuf,
(tANI_U8 *)&pSession->connectedProfile.bssid, sizeof(tSirMacAddr) );
pBuf += sizeof(tSirMacAddr);
@@ -12827,7 +12840,7 @@ eHalStatus csrSendMBSetContextReqMsg( tpAniSirGlobal pMac, tANI_U32 sessionId ,
// Set the pMsg->keyMaterial.length field (this length is defined as all data that follows the edType field
// in the tSirKeyMaterial keyMaterial; field).
//
- // !!NOTE: This keyMaterial.length contains the length of a MAX size key, though the keyLength can be
+ // !!NOTE: This keyMaterial.length contains the length of a MAX size key, though the keyLength can be
// shorter than this max size. Is LIM interpreting this ok ?
p = pal_set_U16( p, pal_cpu_to_be16((tANI_U16)( sizeof( pMsg->keyMaterial.numKeys ) + ( numKeys * sizeof( pMsg->keyMaterial.key ) ) )) );
// set pMsg->keyMaterial.edType
@@ -12836,7 +12849,7 @@ eHalStatus csrSendMBSetContextReqMsg( tpAniSirGlobal pMac, tANI_U32 sessionId ,
p += sizeof( pMsg->keyMaterial.edType );
// set the pMsg->keyMaterial.numKeys field
*p = numKeys;
- p += sizeof( pMsg->keyMaterial.numKeys );
+ p += sizeof( pMsg->keyMaterial.numKeys );
// set pSirKey->keyId = keyId;
*p = keyId;
p += sizeof( pMsg->keyMaterial.key[ 0 ].keyId );
@@ -12855,9 +12868,9 @@ eHalStatus csrSendMBSetContextReqMsg( tpAniSirGlobal pMac, tANI_U32 sessionId ,
p++;
// set pSirKey->keyLength = keyLength;
p = pal_set_U16( p, pal_cpu_to_be16(keyLength) );
- if ( keyLength && pKey )
- {
- palCopyMemory( pMac->hHdd, p, pKey, keyLength );
+ if ( keyLength && pKey )
+ {
+ palCopyMemory( pMac->hHdd, p, pKey, keyLength );
if(keyLength == 16)
{
smsLog(pMac, LOG1, " SME Set keyIdx (%d) encType(%d) key = %02X-%02X-%02X-%02X-%02X-%02X-%02X-%02X-%02X-%02X-%02X-%02X-%02X-%02X-%02X-%02X",
@@ -12871,7 +12884,7 @@ eHalStatus csrSendMBSetContextReqMsg( tpAniSirGlobal pMac, tANI_U32 sessionId ,
return( status );
}
-eHalStatus csrSendMBStartBssReqMsg( tpAniSirGlobal pMac, tANI_U32 sessionId, eCsrRoamBssType bssType,
+eHalStatus csrSendMBStartBssReqMsg( tpAniSirGlobal pMac, tANI_U32 sessionId, eCsrRoamBssType bssType,
tCsrRoamStartBssParams *pParam, tSirBssDescription *pBssDesc )
{
eHalStatus status;
@@ -12890,7 +12903,7 @@ eHalStatus csrSendMBStartBssReqMsg( tpAniSirGlobal pMac, tANI_U32 sessionId, eCs
smsLog(pMac, LOGE, FL(" session %d not found "), sessionId);
return eHAL_STATUS_FAILURE;
}
-
+
do {
pSession->joinFailStatusCode.statusCode = eSIR_SME_SUCCESS;
pSession->joinFailStatusCode.reasonCode = 0;
@@ -12908,7 +12921,7 @@ eHalStatus csrSendMBStartBssReqMsg( tpAniSirGlobal pMac, tANI_U32 sessionId, eCs
*pBuf = 0;
*(pBuf + 1) = 0;
pBuf += sizeof(tANI_U16);
- // bssid
+ // bssid
palCopyMemory( pMac->hHdd, pBuf, pParam->bssid, sizeof(tSirMacAddr) );
pBuf += sizeof(tSirMacAddr);
// selfMacAddr
@@ -12930,10 +12943,10 @@ eHalStatus csrSendMBStartBssReqMsg( tpAniSirGlobal pMac, tANI_U32 sessionId, eCs
if(csrIsconcurrentsessionValid (pMac, sessionId,
pParam->bssPersona)
== eHAL_STATUS_SUCCESS )
- {
+ {
csrValidateMCCBeaconInterval(pMac, pParam->operationChn, &wTmp, sessionId,
pParam->bssPersona);
- //Update the beacon Interval
+ //Update the beacon Interval
pParam->beaconInterval = wTmp;
}
else
@@ -12944,7 +12957,7 @@ eHalStatus csrSendMBStartBssReqMsg( tpAniSirGlobal pMac, tANI_U32 sessionId, eCs
return status;
}
- palCopyMemory( pMac->hHdd, pBuf, &wTmp, sizeof( tANI_U16 ) );
+ palCopyMemory( pMac->hHdd, pBuf, &wTmp, sizeof( tANI_U16 ) );
pBuf += sizeof(tANI_U16);
// dot11mode
*pBuf = (tANI_U8)csrTranslateToWNICfgDot11Mode( pMac, pParam->uCfgDot11Mode );
@@ -12965,7 +12978,7 @@ eHalStatus csrSendMBStartBssReqMsg( tpAniSirGlobal pMac, tANI_U32 sessionId, eCs
else
{
*pBuf = 0;
- pBuf++;
+ pBuf++;
}
// set the channel Id
*pBuf = pParam->operationChn;
@@ -12978,8 +12991,8 @@ eHalStatus csrSendMBStartBssReqMsg( tpAniSirGlobal pMac, tANI_U32 sessionId, eCs
// Set privacy
*pBuf = pParam->privacy;
pBuf++;
-
- //Set Uapsd
+
+ //Set Uapsd
*pBuf = pParam->ApUapsdEnable;
pBuf++;
//Set SSID hidden
@@ -12987,7 +13000,7 @@ eHalStatus csrSendMBStartBssReqMsg( tpAniSirGlobal pMac, tANI_U32 sessionId, eCs
pBuf++;
*pBuf = (tANI_U8)pParam->fwdWPSPBCProbeReq;
pBuf++;
-
+
//Ht protection Enable/Disable
*pBuf = (tANI_U8)pParam->protEnabled;
pBuf++;
@@ -12996,7 +13009,7 @@ eHalStatus csrSendMBStartBssReqMsg( tpAniSirGlobal pMac, tANI_U32 sessionId, eCs
pBuf++;
//set cfg related to protection
wTmp = pal_cpu_to_be16( pParam->ht_protection );
- palCopyMemory( pMac->hHdd, pBuf, &wTmp, sizeof( tANI_U16 ) );
+ palCopyMemory( pMac->hHdd, pBuf, &wTmp, sizeof( tANI_U16 ) );
pBuf += sizeof(tANI_U16);
// Set Auth type
authType = pal_cpu_to_be32(pParam->authType);
@@ -13012,13 +13025,13 @@ eHalStatus csrSendMBStartBssReqMsg( tpAniSirGlobal pMac, tANI_U32 sessionId, eCs
//Persona
*pBuf = (tANI_U8)pParam->bssPersona;
pBuf++;
-
+
//txLdpcIniFeatureEnabled
*pBuf = (tANI_U8)(tANI_U8)pMac->roam.configParam.txLdpcEnable;
pBuf++;
-
-
- // set RSN IE
+
+
+ // set RSN IE
if( pParam->nRSNIELength > sizeof(pMsg->rsnIE.rsnIEdata) )
{
status = eHAL_STATUS_INVALID_PARAMETER;
@@ -13054,7 +13067,7 @@ eHalStatus csrSendMBStartBssReqMsg( tpAniSirGlobal pMac, tANI_U32 sessionId, eCs
pBuf += sizeof(tSirHTConfig);
msgLen = (tANI_U16)(sizeof(tANI_U32 ) + (pBuf - wTmpBuf)); //msg_header + msg
pMsg->length = pal_cpu_to_be16(msgLen);
-
+
status = palSendMBMessage(pMac->hHdd, pMsg);
} while( 0 );
return( status );
@@ -13073,7 +13086,7 @@ eHalStatus csrSendMBStopBssReqMsg( tpAniSirGlobal pMac, tANI_U32 sessionId )
smsLog(pMac, LOGE, FL(" session %d not found "), sessionId);
return eHAL_STATUS_FAILURE;
}
-
+
do {
status = palAllocateMemory(pMac, (void **)&pMsg, sizeof(tSirSmeStopBssReq));
if ( !HAL_STATUS_SUCCESS(status) ) break;
@@ -13089,21 +13102,21 @@ eHalStatus csrSendMBStopBssReqMsg( tpAniSirGlobal pMac, tANI_U32 sessionId )
//reason code
*pBuf = 0;
pBuf += sizeof(tSirResultCodes);
- // bssid
+ // bssid
// if BSSType is WDS sta, use selfmacAddr as bssid, else use bssid in connectedProfile
if( CSR_IS_CONN_WDS_STA(&pSession->connectedProfile) )
{
- palCopyMemory( pMac->hHdd, pBuf,(tANI_U8 *)&pSession->selfMacAddr, sizeof(tSirMacAddr) );
+ palCopyMemory( pMac->hHdd, pBuf,(tANI_U8 *)&pSession->selfMacAddr, sizeof(tSirMacAddr) );
}
else
{
- palCopyMemory( pMac->hHdd, pBuf,(tANI_U8 *)&pSession->connectedProfile.bssid, sizeof(tSirMacAddr) );
+ palCopyMemory( pMac->hHdd, pBuf,(tANI_U8 *)&pSession->connectedProfile.bssid, sizeof(tSirMacAddr) );
}
pBuf += sizeof(tSirMacAddr);
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
+#if 0
status = palAllocateMemory(pMac, (void **)&pMsg, sizeof(tSirSmeStopBssReq));
if ( !HAL_STATUS_SUCCESS(status) ) break;
palZeroMemory(pMac->hHdd, pMsg, sizeof( tSirSmeStopBssReq ));
@@ -13124,12 +13137,12 @@ eHalStatus csrSendMBStopBssReqMsg( tpAniSirGlobal pMac, tANI_U32 sessionId )
pMsg->sessionId = (tANI_U8)sessionId;
pMsg->length = pal_cpu_to_be16((tANI_U16)sizeof( tSirSmeStopBssReq ));
status = palSendMBMessage( pMac->hHdd, pMsg );
-#endif
+#endif
} while( 0 );
return( status );
}
-eHalStatus csrReassoc(tpAniSirGlobal pMac, tANI_U32 sessionId,
+eHalStatus csrReassoc(tpAniSirGlobal pMac, tANI_U32 sessionId,
tCsrRoamModifyProfileFields *pModProfileFields,
tANI_U32 *pRoamId, v_BOOL_t fForce)
{
@@ -13137,8 +13150,8 @@ eHalStatus csrReassoc(tpAniSirGlobal pMac, tANI_U32 sessionId,
tANI_U32 roamId = 0;
tCsrRoamSession *pSession = CSR_GET_SESSION( pMac, sessionId );
if((csrIsConnStateConnected(pMac, sessionId)) &&
- (fForce || (!palEqualMemory(pMac->hHdd, &pModProfileFields,
- &pSession->connectedProfile.modifyProfileFields,
+ (fForce || (!palEqualMemory(pMac->hHdd, &pModProfileFields,
+ &pSession->connectedProfile.modifyProfileFields,
sizeof(tCsrRoamModifyProfileFields)))) )
{
roamId = GET_NEXT_ROAM_ID(&pMac->roam);
@@ -13147,8 +13160,8 @@ eHalStatus csrReassoc(tpAniSirGlobal pMac, tANI_U32 sessionId,
*pRoamId = roamId;
}
- status = csrRoamIssueReassoc(pMac, sessionId, NULL, pModProfileFields,
- eCsrSmeIssuedReassocToSameAP, roamId,
+ status = csrRoamIssueReassoc(pMac, sessionId, NULL, pModProfileFields,
+ eCsrSmeIssuedReassocToSameAP, roamId,
eANI_BOOLEAN_FALSE);
}
return status;
@@ -13269,7 +13282,7 @@ eHalStatus csrIssueAddStaForSessionReq(tpAniSirGlobal pMac, tANI_U32 sessionId,
}
eHalStatus csrProcessAddStaSessionCommand( tpAniSirGlobal pMac, tSmeCmd *pCommand )
{
- return csrSendMBAddSelfStaReqMsg( pMac,
+ return csrSendMBAddSelfStaReqMsg( pMac,
pCommand->u.addStaSessionCmd.selfMacAddr,
pCommand->u.addStaSessionCmd.type,
pCommand->u.addStaSessionCmd.subType,
@@ -13309,7 +13322,7 @@ eHalStatus csrRoamOpenSession( tpAniSirGlobal pMac, csrRoamCompleteCallback call
break;
}
- status = palTimerAlloc(pMac->hHdd, &pSession->hTimerRoaming, csrRoamRoamingTimerHandler,
+ status = palTimerAlloc(pMac->hHdd, &pSession->hTimerRoaming, csrRoamRoamingTimerHandler,
&pSession->roamingTimerInfo);
if(!HAL_STATUS_SUCCESS(status))
{
@@ -13317,7 +13330,7 @@ eHalStatus csrRoamOpenSession( tpAniSirGlobal pMac, csrRoamCompleteCallback call
break;
}
#ifdef FEATURE_WLAN_BTAMP_UT_RF
- status = palTimerAlloc(pMac->hHdd, &pSession->hTimerJoinRetry, csrRoamJoinRetryTimerHandler,
+ status = palTimerAlloc(pMac->hHdd, &pSession->hTimerJoinRetry, csrRoamJoinRetryTimerHandler,
&pSession->joinRetryTimerInfo);
if(!HAL_STATUS_SUCCESS(status))
{
@@ -13327,7 +13340,7 @@ eHalStatus csrRoamOpenSession( tpAniSirGlobal pMac, csrRoamCompleteCallback call
#endif
pSession->ibssJoinTimerInfo.pMac = pMac;
pSession->ibssJoinTimerInfo.sessionId = CSR_SESSION_ID_INVALID;
- status = palTimerAlloc(pMac->hHdd, &pSession->hTimerIbssJoining, csrRoamIbssJoinTimerHandler,
+ status = palTimerAlloc(pMac->hHdd, &pSession->hTimerIbssJoining, csrRoamIbssJoinTimerHandler,
&pSession->ibssJoinTimerInfo);
if(!HAL_STATUS_SUCCESS(status))
{
@@ -13379,7 +13392,7 @@ eHalStatus csrProcessDelStaSessionRsp( tpAniSirGlobal pMac, tANI_U8 *pMsg)
csrCleanupSession(pMac, sessionId);
if(pCommand->u.delStaSessionCmd.callback)
{
-
+
status = sme_ReleaseGlobalLock( &pMac->sme );
if ( HAL_STATUS_SUCCESS( status ) )
{
@@ -13395,8 +13408,8 @@ eHalStatus csrProcessDelStaSessionRsp( tpAniSirGlobal pMac, tANI_U8 *pMsg)
else {
smsLog(pMac, LOGE, "%s: Failed to Release Lock", __func__);
}
- }
-
+ }
+
//Remove this command out of the active list
if(csrLLRemoveEntry(&pMac->sme.smeCmdActiveList, pEntry, LL_ACCESS_LOCK))
{
@@ -13433,7 +13446,7 @@ eHalStatus csrSendMBDelSelfStaReqMsg( tpAniSirGlobal pMac, tSirMacAddr macAddr,
msgLen = sizeof(tSirSmeDelStaSelfReq);
status = palAllocateMemory(pMac->hHdd, (void **)&pMsg, msgLen);
if ( !HAL_STATUS_SUCCESS(status) ) break;
-
+
palZeroMemory(pMac->hHdd, pMsg, msgLen);
pMsg->mesgType = pal_cpu_to_be16((tANI_U16)eWNI_SME_DEL_STA_SELF_REQ);
pMsg->mesgLen = pal_cpu_to_be16(msgLen);
@@ -13474,7 +13487,7 @@ eHalStatus csrIssueDelStaForSessionReq(tpAniSirGlobal pMac, tANI_U32 sessionId,
}
eHalStatus csrProcessDelStaSessionCommand( tpAniSirGlobal pMac, tSmeCmd *pCommand )
{
- return csrSendMBDelSelfStaReqMsg( pMac,
+ return csrSendMBDelSelfStaReqMsg( pMac,
pCommand->u.delStaSessionCmd.selfMacAddr,
(tANI_U8)pCommand->sessionId);
}
@@ -13542,7 +13555,7 @@ void csrCleanupSession(tpAniSirGlobal pMac, tANI_U32 sessionId)
}
eHalStatus csrRoamCloseSession( tpAniSirGlobal pMac, tANI_U32 sessionId,
- tANI_BOOLEAN fSync,
+ tANI_BOOLEAN fSync,
csrRoamSessionCloseCallback callback,
void *pContext )
{
@@ -13555,7 +13568,7 @@ eHalStatus csrRoamCloseSession( tpAniSirGlobal pMac, tANI_U32 sessionId,
csrCleanupSession(pMac, sessionId);
}
else
- {
+ {
purgeSmeSessionCmdList(pMac, sessionId,
&pMac->sme.smeCmdPendingList);
if (pMac->fScanOffload)
@@ -13584,7 +13597,7 @@ static void csrInitSession( tpAniSirGlobal pMac, tANI_U32 sessionId )
smsLog(pMac, LOGE, FL(" session %d not found "), sessionId);
return;
}
-
+
pSession->sessionActive = eANI_BOOLEAN_FALSE;
pSession->sessionId = CSR_SESSION_ID_INVALID;
pSession->callback = NULL;
@@ -13658,7 +13671,7 @@ eHalStatus csrRoamGetSessionIdFromBSSID( tpAniSirGlobal pMac, tCsrBssid *bssid,
return( status );
}
-//This function assumes that we only support one IBSS session. We cannot use BSSID to identify
+//This function assumes that we only support one IBSS session. We cannot use BSSID to identify
//session because for IBSS, the bssid changes.
static tANI_U32 csrFindIbssSession( tpAniSirGlobal pMac )
{
@@ -13681,20 +13694,20 @@ static tANI_U32 csrFindIbssSession( tpAniSirGlobal pMac )
}
static void csrRoamLinkUp(tpAniSirGlobal pMac, tCsrBssid bssid)
{
- /* Update the current BSS info in ho control block based on connected
+ /* Update the current BSS info in ho control block based on connected
profile info from pmac global structure */
-
+
smsLog(pMac, LOGW, " csrRoamLinkUp: WLAN link UP with AP= %02x-%02x-%02x-%02x-%02x-%02x",
bssid[ 0 ], bssid[ 1 ], bssid[ 2 ],
bssid[ 3 ], bssid[ 4 ], bssid[ 5 ] );
/* Check for user misconfig of RSSI trigger threshold */
pMac->roam.configParam.vccRssiThreshold =
- ( 0 == pMac->roam.configParam.vccRssiThreshold ) ?
+ ( 0 == pMac->roam.configParam.vccRssiThreshold ) ?
CSR_VCC_RSSI_THRESHOLD : pMac->roam.configParam.vccRssiThreshold;
pMac->roam.vccLinkQuality = eCSR_ROAM_LINK_QUAL_POOR_IND;
/* Check for user misconfig of UL MAC Loss trigger threshold */
pMac->roam.configParam.vccUlMacLossThreshold =
- ( 0 == pMac->roam.configParam.vccUlMacLossThreshold ) ?
+ ( 0 == pMac->roam.configParam.vccUlMacLossThreshold ) ?
CSR_VCC_UL_MAC_LOSS_THRESHOLD : pMac->roam.configParam.vccUlMacLossThreshold;
#if defined WLAN_FEATURE_NEIGHBOR_ROAMING
{
@@ -13715,7 +13728,7 @@ static void csrRoamLinkDown(tpAniSirGlobal pMac, tANI_U32 sessionId)
smsLog(pMac, LOGE, FL(" session %d not found "), sessionId);
return;
}
-
+
//Only to handle the case for Handover on infra link
if( eCSR_BSS_TYPE_INFRASTRUCTURE != pSession->connectedProfile.BSSType )
{
@@ -13729,10 +13742,10 @@ static void csrRoamLinkDown(tpAniSirGlobal pMac, tANI_U32 sessionId)
csrNeighborRoamIndicateDisconnect(pMac, sessionId);
#endif
- //Remove this code once SLM_Sessionization is supported
+ //Remove this code once SLM_Sessionization is supported
//BMPS_WORKAROUND_NOT_NEEDED
- if(!IS_FEATURE_SUPPORTED_BY_FW(SLM_SESSIONIZATION) &&
- csrIsInfraApStarted( pMac ) &&
+ if(!IS_FEATURE_SUPPORTED_BY_FW(SLM_SESSIONIZATION) &&
+ csrIsInfraApStarted( pMac ) &&
pMac->roam.configParam.doBMPSWorkaround)
{
pMac->roam.configParam.doBMPSWorkaround = 0;
@@ -13769,7 +13782,7 @@ void csrRoamTlStatsTimerHandler(void *pv)
if(pMac->roam.tlStatsReqInfo.periodicity)
{
//start timer
- status = palTimerStart(pMac->hHdd, pMac->roam.tlStatsReqInfo.hTlStatsTimer,
+ status = palTimerStart(pMac->hHdd, pMac->roam.tlStatsReqInfo.hTlStatsTimer,
pMac->roam.tlStatsReqInfo.periodicity * PAL_TIMER_TO_MS_UNIT, eANI_BOOLEAN_FALSE);
if(!HAL_STATUS_SUCCESS(status))
{
@@ -13790,7 +13803,7 @@ void csrRoamPeStatsTimerHandler(void *pv)
pPeStatsReqListEntry->timerRunning = FALSE;
if( pPeStatsReqListEntry->timerStopFailed == TRUE )
{
- // If we entered here, meaning the timer could not be successfully
+ // If we entered here, meaning the timer could not be successfully
// stopped in csrRoamRemoveEntryFromPeStatsReqList(). So do it here.
/* Destroy the timer */
@@ -13808,7 +13821,7 @@ void csrRoamPeStatsTimerHandler(void *pv)
{
if(!pPeStatsReqListEntry->rspPending)
{
- status = csrSendMBStatsReqMsg(pMac, pPeStatsReqListEntry->statsMask & ~(1 << eCsrGlobalClassDStats),
+ status = csrSendMBStatsReqMsg(pMac, pPeStatsReqListEntry->statsMask & ~(1 << eCsrGlobalClassDStats),
pPeStatsReqListEntry->staId);
if(!HAL_STATUS_SUCCESS(status))
{
@@ -13821,7 +13834,7 @@ void csrRoamPeStatsTimerHandler(void *pv)
}
//send down a req
- if(pPeStatsReqListEntry->periodicity &&
+ if(pPeStatsReqListEntry->periodicity &&
(VOS_TIMER_STATE_STOPPED == vos_timer_getCurrentState(&pPeStatsReqListEntry->hPeStatsTimer)))
{
pmcQueryPowerState(pMac, &powerState, NULL, NULL);
@@ -13841,7 +13854,7 @@ void csrRoamPeStatsTimerHandler(void *pv)
}
//start timer
vosStatus = vos_timer_start( &pPeStatsReqListEntry->hPeStatsTimer, pPeStatsReqListEntry->periodicity );
- if ( !VOS_IS_STATUS_SUCCESS( vosStatus ) )
+ if ( !VOS_IS_STATUS_SUCCESS( vosStatus ) )
{
smsLog(pMac, LOGE, FL("csrRoamPeStatsTimerHandler:cannot start hPeStatsTimer timer"));
return;
@@ -13861,16 +13874,16 @@ void csrRoamStatsClientTimerHandler(void *pv)
// TODO Stats fix for multisession
//start the timer
vosStatus = vos_timer_start( &pStaEntry->timer, pStaEntry->periodicity );
-
- if ( !VOS_IS_STATUS_SUCCESS( vosStatus ) )
+
+ if ( !VOS_IS_STATUS_SUCCESS( vosStatus ) )
{
smsLog(pStaEntry->pMac, LOGE, FL("csrGetStatistics:cannot start StatsClient timer"));
}
-#endif
+#endif
}
#if 0
//send up the stats report
- csrRoamReportStatistics(pStaEntry->pMac, pStaEntry->statsMask, pStaEntry->callback,
+ csrRoamReportStatistics(pStaEntry->pMac, pStaEntry->statsMask, pStaEntry->callback,
pStaEntry->staId, pStaEntry->pContext);
#endif
}
@@ -13882,7 +13895,7 @@ eHalStatus csrSendMBStatsReqMsg( tpAniSirGlobal pMac, tANI_U32 statsMask, tANI_U
tAniGetPEStatsReq *pMsg;
eHalStatus status = eHAL_STATUS_SUCCESS;
status = palAllocateMemory(pMac->hHdd, (void **)&pMsg, sizeof(tAniGetPEStatsReq));
- if ( !HAL_STATUS_SUCCESS(status) )
+ if ( !HAL_STATUS_SUCCESS(status) )
{
smsLog(pMac, LOG1, " csrSendMBStatsReqMsg: failed to allocate mem for stats req ");
return status;
@@ -13892,7 +13905,7 @@ eHalStatus csrSendMBStatsReqMsg( tpAniSirGlobal pMac, tANI_U32 statsMask, tANI_U
pMsg->msgLen = (tANI_U16)sizeof(tAniGetPEStatsReq);
pMsg->staId = staId;
pMsg->statsMask = statsMask;
- status = palSendMBMessage(pMac->hHdd, pMsg );
+ status = palSendMBMessage(pMac->hHdd, pMsg );
if(!HAL_STATUS_SUCCESS(status))
{
smsLog(pMac, LOG1, " csrSendMBStatsReqMsg: failed to send down the stats req ");
@@ -13921,8 +13934,8 @@ void csrRoamStatsRspProcessor(tpAniSirGlobal pMac, tSirSmeRsp *pSirMsg)
}
tempMask = pSmeStatsRsp->statsMask;
pStats = ((tANI_U8 *)&pSmeStatsRsp->statsMask) + sizeof(pSmeStatsRsp->statsMask);
- /* subtract all statistics from this length, and after processing the entire
- * 'stat' part of the message, if the length is not zero, then rssi is piggy packed
+ /* subtract all statistics from this length, and after processing the entire
+ * 'stat' part of the message, if the length is not zero, then rssi is piggy packed
* in this 'stats' message.
*/
length = pSmeStatsRsp->msgLen - sizeof(tAniGetPEStatsRsp);
@@ -13935,7 +13948,7 @@ void csrRoamStatsRspProcessor(tpAniSirGlobal pMac, tSirSmeRsp *pSirMsg)
{
case eCsrSummaryStats:
smsLog( pMac, LOG2, FL("csrRoamStatsRspProcessor:summary stats"));
- status = palCopyMemory(pMac->hHdd, (tANI_U8 *)&pMac->roam.summaryStatsInfo,
+ status = palCopyMemory(pMac->hHdd, (tANI_U8 *)&pMac->roam.summaryStatsInfo,
pStats, sizeof(tCsrSummaryStatsInfo));
if(!HAL_STATUS_SUCCESS(status))
{
@@ -13946,7 +13959,7 @@ void csrRoamStatsRspProcessor(tpAniSirGlobal pMac, tSirSmeRsp *pSirMsg)
break;
case eCsrGlobalClassAStats:
smsLog( pMac, LOG2, FL("csrRoamStatsRspProcessor:ClassA stats"));
- status = palCopyMemory(pMac->hHdd, (tANI_U8 *)&pMac->roam.classAStatsInfo,
+ status = palCopyMemory(pMac->hHdd, (tANI_U8 *)&pMac->roam.classAStatsInfo,
pStats, sizeof(tCsrGlobalClassAStatsInfo));
if(!HAL_STATUS_SUCCESS(status))
{
@@ -13957,7 +13970,7 @@ void csrRoamStatsRspProcessor(tpAniSirGlobal pMac, tSirSmeRsp *pSirMsg)
break;
case eCsrGlobalClassBStats:
smsLog( pMac, LOG2, FL("csrRoamStatsRspProcessor:ClassB stats"));
- status = palCopyMemory(pMac->hHdd, (tANI_U8 *)&pMac->roam.classBStatsInfo,
+ status = palCopyMemory(pMac->hHdd, (tANI_U8 *)&pMac->roam.classBStatsInfo,
pStats, sizeof(tCsrGlobalClassBStatsInfo));
if(!HAL_STATUS_SUCCESS(status))
{
@@ -13968,7 +13981,7 @@ void csrRoamStatsRspProcessor(tpAniSirGlobal pMac, tSirSmeRsp *pSirMsg)
break;
case eCsrGlobalClassCStats:
smsLog( pMac, LOG2, FL("csrRoamStatsRspProcessor:ClassC stats"));
- status = palCopyMemory(pMac->hHdd, (tANI_U8 *)&pMac->roam.classCStatsInfo,
+ status = palCopyMemory(pMac->hHdd, (tANI_U8 *)&pMac->roam.classCStatsInfo,
pStats, sizeof(tCsrGlobalClassCStatsInfo));
if(!HAL_STATUS_SUCCESS(status))
{
@@ -13981,7 +13994,7 @@ void csrRoamStatsRspProcessor(tpAniSirGlobal pMac, tSirSmeRsp *pSirMsg)
smsLog( pMac, LOG2, FL("csrRoamStatsRspProcessor:PerSta stats"));
if( CSR_MAX_STA > pSmeStatsRsp->staId )
{
- status = palCopyMemory(pMac->hHdd, (tANI_U8 *)&pMac->roam.perStaStatsInfo[pSmeStatsRsp->staId],
+ status = palCopyMemory(pMac->hHdd, (tANI_U8 *)&pMac->roam.perStaStatsInfo[pSmeStatsRsp->staId],
pStats, sizeof(tCsrPerStaStatsInfo));
}
else
@@ -14017,14 +14030,14 @@ void csrRoamStatsRspProcessor(tpAniSirGlobal pMac, tSirSmeRsp *pSirMsg)
rssi = RSSI_HACK_BMPS;
}
WDA_UpdateRssiBmps(pvosGCtx, pSmeStatsRsp->staId, rssi);
-post_update:
- //make sure to update the pe stats req list
+post_update:
+ //make sure to update the pe stats req list
pEntry = csrRoamFindInPeStatsReqList(pMac, pSmeStatsRsp->statsMask);
if(pEntry)
{
pPeStaEntry = GET_BASE_ADDR( pEntry, tCsrPeStatsReqInfo, link );
pPeStaEntry->rspPending = FALSE;
-
+
}
//check the one timer cases
pEntry = csrRoamCheckClientReqList(pMac, pSmeStatsRsp->statsMask);
@@ -14034,7 +14047,7 @@ post_update:
if(pTempStaEntry->timerExpired)
{
//send up the stats report
- csrRoamReportStatistics(pMac, pTempStaEntry->statsMask, pTempStaEntry->callback,
+ csrRoamReportStatistics(pMac, pTempStaEntry->statsMask, pTempStaEntry->callback,
pTempStaEntry->staId, pTempStaEntry->pContext);
//also remove from the client list
csrRoamRemoveStatListEntry(pMac, pEntry);
@@ -14082,7 +14095,7 @@ tListElem * csrRoamChecknUpdateClientReqList(tpAniSirGlobal pMac, tCsrStatsClien
while( pEntry )
{
pTempStaEntry = GET_BASE_ADDR( pEntry, tCsrStatsClientReqInfo, link );
- if((pTempStaEntry->requesterId == pStaEntry->requesterId) &&
+ if((pTempStaEntry->requesterId == pStaEntry->requesterId) &&
(pTempStaEntry->statsMask == pStaEntry->statsMask))
{
smsLog(pMac, LOG3, "csrRoamChecknUpdateClientReqList: match found");
@@ -14123,7 +14136,7 @@ tListElem * csrRoamCheckClientReqList(tpAniSirGlobal pMac, tANI_U32 statsMask)
return pEntry;
}
eHalStatus csrRoamRegisterLinkQualityIndCallback(tpAniSirGlobal pMac,
- csrRoamLinkQualityIndCallback callback,
+ csrRoamLinkQualityIndCallback callback,
void *pContext)
{
pMac->roam.linkQualityIndInfo.callback = callback;
@@ -14149,7 +14162,7 @@ void csrRoamVccTrigger(tpAniSirGlobal pMac)
Link quality is currently binary based on OBIWAN recommended triggers
Check for a change in link quality and notify client if necessary
-------------------------------------------------------------------------*/
- ul_mac_loss_trigger_threshold =
+ ul_mac_loss_trigger_threshold =
pMac->roam.configParam.vccUlMacLossThreshold;
VOS_ASSERT( ul_mac_loss_trigger_threshold != 0 );
smsLog(pMac, LOGW, "csrRoamVccTrigger: UL_MAC_LOSS_THRESHOLD is %d",
@@ -14169,13 +14182,13 @@ void csrRoamVccTrigger(tpAniSirGlobal pMac)
if(newVccLinkQuality != pMac->roam.vccLinkQuality)
{
smsLog(pMac, LOGW, "csrRoamVccTrigger: link quality changed: trigger necessary");
- if(NULL != pMac->roam.linkQualityIndInfo.callback)
+ if(NULL != pMac->roam.linkQualityIndInfo.callback)
{
smsLog(pMac, LOGW, "csrRoamVccTrigger: link quality indication %d",
newVccLinkQuality );
-
+
/* we now invoke the callback once to notify client of initial value */
- pMac->roam.linkQualityIndInfo.callback( newVccLinkQuality,
+ pMac->roam.linkQualityIndInfo.callback( newVccLinkQuality,
pMac->roam.linkQualityIndInfo.context );
//event: EVENT_WLAN_VCC
}
@@ -14183,8 +14196,8 @@ void csrRoamVccTrigger(tpAniSirGlobal pMac)
pMac->roam.vccLinkQuality = newVccLinkQuality;
}
-VOS_STATUS csrRoamVccTriggerRssiIndCallback(tHalHandle hHal,
- v_U8_t rssiNotification,
+VOS_STATUS csrRoamVccTriggerRssiIndCallback(tHalHandle hHal,
+ v_U8_t rssiNotification,
void * context)
{
tpAniSirGlobal pMac = PMAC_STRUCT( context );
@@ -14217,19 +14230,19 @@ VOS_STATUS csrRoamVccTriggerRssiIndCallback(tHalHandle hHal,
{
smsLog(pMac, LOGW, "csrRoamVccTriggerRssiIndCallback: unknown rssi notification %d", rssiNotification);
//Set to this so the code below won't do anything
- newVccLinkQuality = pMac->roam.vccLinkQuality;
+ newVccLinkQuality = pMac->roam.vccLinkQuality;
VOS_ASSERT(0);
}
if(newVccLinkQuality != pMac->roam.vccLinkQuality)
{
smsLog(pMac, LOGW, "csrRoamVccTriggerRssiIndCallback: link quality changed: trigger necessary");
- if(NULL != pMac->roam.linkQualityIndInfo.callback)
+ if(NULL != pMac->roam.linkQualityIndInfo.callback)
{
smsLog(pMac, LOGW, "csrRoamVccTriggerRssiIndCallback: link quality indication %d",
newVccLinkQuality);
/* we now invoke the callback once to notify client of initial value */
- pMac->roam.linkQualityIndInfo.callback( newVccLinkQuality,
+ pMac->roam.linkQualityIndInfo.callback( newVccLinkQuality,
pMac->roam.linkQualityIndInfo.context );
//event: EVENT_WLAN_VCC
}
@@ -14243,11 +14256,11 @@ tCsrStatsClientReqInfo * csrRoamInsertEntryIntoList( tpAniSirGlobal pMac,
{
tCsrStatsClientReqInfo *pNewStaEntry = NULL;
eHalStatus status;
- //if same entity requested for same set of stats with different periodicity &
+ //if same entity requested for same set of stats with different periodicity &
// callback update it
if(NULL == csrRoamChecknUpdateClientReqList(pMac, pStaEntry, TRUE))
{
-
+
status = palAllocateMemory(pMac->hHdd, (void **)&pNewStaEntry, sizeof(tCsrStatsClientReqInfo));
if (!HAL_STATUS_SUCCESS(status))
{
@@ -14255,7 +14268,7 @@ tCsrStatsClientReqInfo * csrRoamInsertEntryIntoList( tpAniSirGlobal pMac,
"entry");
return NULL;
}
-
+
pNewStaEntry->callback = pStaEntry->callback;
pNewStaEntry->pContext = pStaEntry->pContext;
pNewStaEntry->periodicity = pStaEntry->periodicity;
@@ -14265,7 +14278,7 @@ tCsrStatsClientReqInfo * csrRoamInsertEntryIntoList( tpAniSirGlobal pMac,
pNewStaEntry->pMac = pStaEntry->pMac;
pNewStaEntry->staId = pStaEntry->staId;
pNewStaEntry->timerExpired = pStaEntry->timerExpired;
-
+
csrLLInsertTail( pStaList, &pNewStaEntry->link, LL_ACCESS_LOCK );
}
return pNewStaEntry;
@@ -14284,7 +14297,7 @@ tCsrPeStatsReqInfo * csrRoamInsertEntryIntoPeStatsReqList( tpAniSirGlobal pMac,
"entry");
return NULL;
}
-
+
pNewStaEntry->hPeStatsTimer = pStaEntry->hPeStatsTimer;
pNewStaEntry->numClient = pStaEntry->numClient;
pNewStaEntry->periodicity = pStaEntry->periodicity;
@@ -14293,14 +14306,14 @@ tCsrPeStatsReqInfo * csrRoamInsertEntryIntoPeStatsReqList( tpAniSirGlobal pMac,
pNewStaEntry->staId = pStaEntry->staId;
pNewStaEntry->timerRunning = pStaEntry->timerRunning;
pNewStaEntry->rspPending = pStaEntry->rspPending;
-
+
csrLLInsertTail( pStaList, &pNewStaEntry->link, LL_ACCESS_LOCK );
return pNewStaEntry;
}
-eHalStatus csrGetRssi(tpAniSirGlobal pMac,
- tCsrRssiCallback callback,
+eHalStatus csrGetRssi(tpAniSirGlobal pMac,
+ tCsrRssiCallback callback,
tANI_U8 staId, tCsrBssid bssId, void *pContext, void* pVosContext)
-{
+{
eHalStatus status = eHAL_STATUS_SUCCESS;
vos_msg_t msg;
tANI_U32 sessionId;
@@ -14308,7 +14321,7 @@ eHalStatus csrGetRssi(tpAniSirGlobal pMac,
tAniGetRssiReq *pMsg;
smsLog(pMac, LOG2, FL("called"));
status = palAllocateMemory(pMac->hHdd, (void **)&pMsg, sizeof(tAniGetRssiReq));
- if ( !HAL_STATUS_SUCCESS(status) )
+ if ( !HAL_STATUS_SUCCESS(status) )
{
smsLog(pMac, LOGE, " csrGetRssi: failed to allocate mem for req ");
return status;
@@ -14367,15 +14380,15 @@ eHalStatus csrGetRoamRssi(tpAniSirGlobal pMac,
}
#endif
-eHalStatus csrGetStatistics(tpAniSirGlobal pMac, eCsrStatsRequesterType requesterId,
- tANI_U32 statsMask,
- tCsrStatsCallback callback,
- tANI_U32 periodicity, tANI_BOOLEAN cache,
+eHalStatus csrGetStatistics(tpAniSirGlobal pMac, eCsrStatsRequesterType requesterId,
+ tANI_U32 statsMask,
+ tCsrStatsCallback callback,
+ tANI_U32 periodicity, tANI_BOOLEAN cache,
tANI_U8 staId, void *pContext)
-{
+{
tCsrStatsClientReqInfo staEntry;
tCsrStatsClientReqInfo *pStaEntry = NULL;
- tCsrPeStatsReqInfo *pPeStaEntry = NULL;
+ tCsrPeStatsReqInfo *pPeStaEntry = NULL;
tListElem *pEntry = NULL;
tANI_BOOLEAN found = FALSE;
eHalStatus status = eHAL_STATUS_SUCCESS;
@@ -14422,7 +14435,7 @@ eHalStatus csrGetStatistics(tpAniSirGlobal pMac, eCsrStatsRequesterType requeste
}
}
- //check if we need to stop the tl stats timer too
+ //check if we need to stop the tl stats timer too
pMac->roam.tlStatsReqInfo.numClient--;
if(!pMac->roam.tlStatsReqInfo.numClient)
{
@@ -14439,7 +14452,7 @@ eHalStatus csrGetStatistics(tpAniSirGlobal pMac, eCsrStatsRequesterType requeste
pMac->roam.tlStatsReqInfo.timerRunning = FALSE;
}
vos_timer_stop( &pStaEntry->timer );
- // Destroy the vos timer...
+ // Destroy the vos timer...
vosStatus = vos_timer_destroy( &pStaEntry->timer );
if ( !VOS_IS_STATUS_SUCCESS( vosStatus ) )
{
@@ -14450,7 +14463,7 @@ eHalStatus csrGetStatistics(tpAniSirGlobal pMac, eCsrStatsRequesterType requeste
return eHAL_STATUS_SUCCESS;
}
}
-
+
if(cache && !periodicity)
{
//return the cached stats
@@ -14466,18 +14479,18 @@ eHalStatus csrGetStatistics(tpAniSirGlobal pMac, eCsrStatsRequesterType requeste
staEntry.staId = staId;
staEntry.pMac = pMac;
staEntry.timerExpired = FALSE;
-
-
+
+
//if periodic report requested with non cached result from PE/TL
if(periodicity)
{
-
+
//if looking for stats from PE
if(statsMask & ~(1 << eCsrGlobalClassDStats))
{
-
+
//check if same request made already & waiting for rsp
- pPeStaEntry = csrRoamCheckPeStatsReqList(pMac, statsMask & ~(1 << eCsrGlobalClassDStats),
+ pPeStaEntry = csrRoamCheckPeStatsReqList(pMac, statsMask & ~(1 << eCsrGlobalClassDStats),
periodicity, &found, staId);
if(!pPeStaEntry)
{
@@ -14488,7 +14501,7 @@ eHalStatus csrGetStatistics(tpAniSirGlobal pMac, eCsrStatsRequesterType requeste
{
staEntry.pPeStaEntry = pPeStaEntry;
}
-
+
}
//request stats from TL rightaway if requested by client, update tlStatsReqInfo if needed
if(statsMask & (1 << eCsrGlobalClassDStats))
@@ -14499,11 +14512,11 @@ eHalStatus csrGetStatistics(tpAniSirGlobal pMac, eCsrStatsRequesterType requeste
}
else
{
-
+
//update periodicity
if(pMac->roam.tlStatsReqInfo.periodicity)
{
- pMac->roam.tlStatsReqInfo.periodicity =
+ pMac->roam.tlStatsReqInfo.periodicity =
CSR_ROAM_MIN(periodicity, pMac->roam.tlStatsReqInfo.periodicity);
}
else
@@ -14514,7 +14527,7 @@ eHalStatus csrGetStatistics(tpAniSirGlobal pMac, eCsrStatsRequesterType requeste
{
pMac->roam.tlStatsReqInfo.periodicity = CSR_MIN_TL_STAT_QUERY_PERIOD;
}
-
+
if(!pMac->roam.tlStatsReqInfo.timerRunning)
{
pTlStats = (WLANTL_TRANSFER_STA_TYPE *)vos_mem_malloc(sizeof(WLANTL_TRANSFER_STA_TYPE));
@@ -14541,7 +14554,7 @@ eHalStatus csrGetStatistics(tpAniSirGlobal pMac, eCsrStatsRequesterType requeste
if(pMac->roam.tlStatsReqInfo.periodicity)
{
//start timer
- status = palTimerStart(pMac->hHdd, pMac->roam.tlStatsReqInfo.hTlStatsTimer,
+ status = palTimerStart(pMac->hHdd, pMac->roam.tlStatsReqInfo.hTlStatsTimer,
pMac->roam.tlStatsReqInfo.periodicity * PAL_TIMER_TO_MS_UNIT, eANI_BOOLEAN_FALSE);
if(!HAL_STATUS_SUCCESS(status))
{
@@ -14554,7 +14567,7 @@ eHalStatus csrGetStatistics(tpAniSirGlobal pMac, eCsrStatsRequesterType requeste
}
pMac->roam.tlStatsReqInfo.numClient++;
}
-
+
insertInClientList = TRUE;
}
//if one time report requested with non cached result from PE/TL
@@ -14597,7 +14610,7 @@ eHalStatus csrGetStatistics(tpAniSirGlobal pMac, eCsrStatsRequesterType requeste
}
}
- //if looking for stats from TL only
+ //if looking for stats from TL only
if(!insertInClientList)
{
//return the stats
@@ -14606,7 +14619,7 @@ eHalStatus csrGetStatistics(tpAniSirGlobal pMac, eCsrStatsRequesterType requeste
}
if(insertInClientList)
{
- pStaEntry = csrRoamInsertEntryIntoList(pMac, &pMac->roam.statsClientReqList, &staEntry);
+ pStaEntry = csrRoamInsertEntryIntoList(pMac, &pMac->roam.statsClientReqList, &staEntry);
if(!pStaEntry)
{
//msg
@@ -14617,7 +14630,7 @@ eHalStatus csrGetStatistics(tpAniSirGlobal pMac, eCsrStatsRequesterType requeste
//Init & start timer if needed
if(periodicity)
{
- vosStatus = vos_timer_init( &pStaEntry->timer, VOS_TIMER_TYPE_SW,
+ vosStatus = vos_timer_init( &pStaEntry->timer, VOS_TIMER_TYPE_SW,
csrRoamStatsClientTimerHandler, pStaEntry );
if ( !VOS_IS_STATUS_SUCCESS( vosStatus ) )
{
@@ -14625,7 +14638,7 @@ eHalStatus csrGetStatistics(tpAniSirGlobal pMac, eCsrStatsRequesterType requeste
return eHAL_STATUS_FAILURE;
}
vosStatus = vos_timer_start( &pStaEntry->timer, periodicity );
- if ( !VOS_IS_STATUS_SUCCESS( vosStatus ) )
+ if ( !VOS_IS_STATUS_SUCCESS( vosStatus ) )
{
smsLog(pMac, LOGE, FL("csrGetStatistics:cannot start StatsClient timer"));
return eHAL_STATUS_FAILURE;
@@ -14955,6 +14968,7 @@ eHalStatus csrRoamOffloadScan(tpAniSirGlobal pMac, tANI_U8 command, tANI_U8 reas
}
pRequestBuf->MDID.mdiePresent = pMac->roam.roamSession[sessionId].connectedProfile.MDID.mdiePresent;
pRequestBuf->MDID.mobilityDomain = pMac->roam.roamSession[sessionId].connectedProfile.MDID.mobilityDomain;
+ pRequestBuf->sessionId = sessionId;
/*Prepare a probe request for 2.4GHz band and one for 5GHz band*/
ucDot11Mode = (tANI_U8) csrTranslateToWNICfgDot11Mode(pMac,
csrFindBestPhyMode( pMac, pMac->roam.configParam.phyMode ));
@@ -14982,7 +14996,7 @@ eHalStatus csrRoamOffloadScan(tpAniSirGlobal pMac, tANI_U8 command, tANI_U8 reas
}
#endif
-tCsrPeStatsReqInfo * csrRoamCheckPeStatsReqList(tpAniSirGlobal pMac, tANI_U32 statsMask,
+tCsrPeStatsReqInfo * csrRoamCheckPeStatsReqList(tpAniSirGlobal pMac, tANI_U32 statsMask,
tANI_U32 periodicity, tANI_BOOLEAN *pFound, tANI_U8 staId)
{
tANI_BOOLEAN found = FALSE;
@@ -14993,14 +15007,14 @@ tCsrPeStatsReqInfo * csrRoamCheckPeStatsReqList(tpAniSirGlobal pMac, tANI_U32 s
VOS_STATUS vosStatus;
tPmcPowerState powerState;
*pFound = FALSE;
-
+
pStaEntry = csrRoamFindInPeStatsReqList(pMac, statsMask);
if(pStaEntry)
{
pTempStaEntry = GET_BASE_ADDR( pStaEntry, tCsrPeStatsReqInfo, link );
if(pTempStaEntry->periodicity)
{
- pTempStaEntry->periodicity =
+ pTempStaEntry->periodicity =
CSR_ROAM_MIN(periodicity, pTempStaEntry->periodicity);
}
else
@@ -15020,7 +15034,7 @@ tCsrPeStatsReqInfo * csrRoamCheckPeStatsReqList(tpAniSirGlobal pMac, tANI_U32 s
staEntry.staId = staId;
staEntry.statsMask = statsMask;
staEntry.timerRunning = FALSE;
- pTempStaEntry = csrRoamInsertEntryIntoPeStatsReqList(pMac, &pMac->roam.peStatsReqList, &staEntry);
+ pTempStaEntry = csrRoamInsertEntryIntoPeStatsReqList(pMac, &pMac->roam.peStatsReqList, &staEntry);
if(!pTempStaEntry)
{
//msg
@@ -15046,7 +15060,7 @@ tCsrPeStatsReqInfo * csrRoamCheckPeStatsReqList(tpAniSirGlobal pMac, tANI_U32 s
if(!pTempStaEntry->timerRunning)
{
//send down a req in case of one time req, for periodic ones wait for timer to expire
- if(!pTempStaEntry->rspPending &&
+ if(!pTempStaEntry->rspPending &&
!pTempStaEntry->periodicity)
{
status = csrSendMBStatsReqMsg(pMac, statsMask & ~(1 << eCsrGlobalClassDStats), staId);
@@ -15063,8 +15077,8 @@ tCsrPeStatsReqInfo * csrRoamCheckPeStatsReqList(tpAniSirGlobal pMac, tANI_U32 s
{
if(!found)
{
-
- vosStatus = vos_timer_init( &pTempStaEntry->hPeStatsTimer, VOS_TIMER_TYPE_SW,
+
+ vosStatus = vos_timer_init( &pTempStaEntry->hPeStatsTimer, VOS_TIMER_TYPE_SW,
csrRoamPeStatsTimerHandler, pTempStaEntry );
if ( !VOS_IS_STATUS_SUCCESS( vosStatus ) )
{
@@ -15075,7 +15089,7 @@ tCsrPeStatsReqInfo * csrRoamCheckPeStatsReqList(tpAniSirGlobal pMac, tANI_U32 s
//start timer
smsLog(pMac, LOG1, "csrRoamCheckPeStatsReqList:peStatsTimer period %d", pTempStaEntry->periodicity);
vosStatus = vos_timer_start( &pTempStaEntry->hPeStatsTimer, pTempStaEntry->periodicity );
- if ( !VOS_IS_STATUS_SUCCESS( vosStatus ) )
+ if ( !VOS_IS_STATUS_SUCCESS( vosStatus ) )
{
smsLog(pMac, LOGE, FL("csrRoamCheckPeStatsReqList:cannot start hPeStatsTimer timer"));
return NULL;
@@ -15122,8 +15136,8 @@ void csrRoamRemoveEntryFromPeStatsReqList(tpAniSirGlobal pMac, tCsrPeStatsReqInf
if(pTempStaEntry->timerRunning)
{
vosStatus = vos_timer_stop( &pTempStaEntry->hPeStatsTimer );
- /* If we are not able to stop the timer here, just remove
- * the entry from the linked list. Destroy the timer object
+ /* If we are not able to stop the timer here, just remove
+ * the entry from the linked list. Destroy the timer object
* and free the memory in the timer CB
*/
if( vosStatus == VOS_STATUS_SUCCESS )
@@ -15140,11 +15154,11 @@ void csrRoamRemoveEntryFromPeStatsReqList(tpAniSirGlobal pMac, tCsrPeStatsReqInf
}
else
{
- // the timer could not be stopped. Hence destroy and free the
+ // the timer could not be stopped. Hence destroy and free the
// memory for the PE stat entry in the timer CB.
pTempStaEntry->timerStopFailed = TRUE;
}
- }
+ }
if(csrLLRemoveEntry(&pMac->roam.peStatsReqList, pEntry, LL_ACCESS_LOCK))
{
@@ -15187,7 +15201,7 @@ void csrRoamSaveStatsFromTl(tpAniSirGlobal pMac, WLANTL_TRANSFER_STA_TYPE *pTlSt
}
-void csrRoamReportStatistics(tpAniSirGlobal pMac, tANI_U32 statsMask,
+void csrRoamReportStatistics(tpAniSirGlobal pMac, tANI_U32 statsMask,
tCsrStatsCallback callback, tANI_U8 staId, void *pContext)
{
tANI_U8 stats[500];
@@ -15216,7 +15230,7 @@ void csrRoamReportStatistics(tpAniSirGlobal pMac, tANI_U32 statsMask,
{
case eCsrSummaryStats:
smsLog( pMac, LOG2, FL("csrRoamReportStatistics:summary stats"));
- status = palCopyMemory(pMac->hHdd, pStats, (tANI_U8 *)&pMac->roam.summaryStatsInfo,
+ status = palCopyMemory(pMac->hHdd, pStats, (tANI_U8 *)&pMac->roam.summaryStatsInfo,
sizeof(tCsrSummaryStatsInfo));
if(!HAL_STATUS_SUCCESS(status))
{
@@ -15226,7 +15240,7 @@ void csrRoamReportStatistics(tpAniSirGlobal pMac, tANI_U32 statsMask,
break;
case eCsrGlobalClassAStats:
smsLog( pMac, LOG2, FL("csrRoamReportStatistics:ClassA stats"));
- status = palCopyMemory(pMac->hHdd, pStats, (tANI_U8 *)&pMac->roam.classAStatsInfo,
+ status = palCopyMemory(pMac->hHdd, pStats, (tANI_U8 *)&pMac->roam.classAStatsInfo,
sizeof(tCsrGlobalClassAStatsInfo));
if(!HAL_STATUS_SUCCESS(status))
{
@@ -15236,7 +15250,7 @@ void csrRoamReportStatistics(tpAniSirGlobal pMac, tANI_U32 statsMask,
break;
case eCsrGlobalClassBStats:
smsLog( pMac, LOG2, FL("csrRoamReportStatistics:ClassB stats"));
- status = palCopyMemory(pMac->hHdd, pStats, (tANI_U8 *)&pMac->roam.classBStatsInfo,
+ status = palCopyMemory(pMac->hHdd, pStats, (tANI_U8 *)&pMac->roam.classBStatsInfo,
sizeof(tCsrGlobalClassBStatsInfo));
if(!HAL_STATUS_SUCCESS(status))
{
@@ -15246,7 +15260,7 @@ void csrRoamReportStatistics(tpAniSirGlobal pMac, tANI_U32 statsMask,
break;
case eCsrGlobalClassCStats:
smsLog( pMac, LOG2, FL("csrRoamReportStatistics:ClassC stats"));
- status = palCopyMemory(pMac->hHdd, pStats, (tANI_U8 *)&pMac->roam.classCStatsInfo,
+ status = palCopyMemory(pMac->hHdd, pStats, (tANI_U8 *)&pMac->roam.classCStatsInfo,
sizeof(tCsrGlobalClassCStatsInfo));
if(!HAL_STATUS_SUCCESS(status))
{
@@ -15256,7 +15270,7 @@ void csrRoamReportStatistics(tpAniSirGlobal pMac, tANI_U32 statsMask,
break;
case eCsrGlobalClassDStats:
smsLog( pMac, LOG2, FL("csrRoamReportStatistics:ClassD stats"));
- status = palCopyMemory(pMac->hHdd, pStats, (tANI_U8 *)&pMac->roam.classDStatsInfo,
+ status = palCopyMemory(pMac->hHdd, pStats, (tANI_U8 *)&pMac->roam.classDStatsInfo,
sizeof(tCsrGlobalClassDStatsInfo));
if(!HAL_STATUS_SUCCESS(status))
{
@@ -15266,7 +15280,7 @@ void csrRoamReportStatistics(tpAniSirGlobal pMac, tANI_U32 statsMask,
break;
case eCsrPerStaStats:
smsLog( pMac, LOG2, FL("csrRoamReportStatistics:PerSta stats"));
- status = palCopyMemory(pMac->hHdd, pStats, (tANI_U8 *)&pMac->roam.perStaStatsInfo[staId],
+ status = palCopyMemory(pMac->hHdd, pStats, (tANI_U8 *)&pMac->roam.perStaStatsInfo[staId],
sizeof(tCsrPerStaStatsInfo));
if(!HAL_STATUS_SUCCESS(status))
{
@@ -15306,7 +15320,7 @@ eHalStatus csrRoamDeregStatisticsReq(tpAniSirGlobal pMac)
{
pTempStaEntry = GET_BASE_ADDR( pPrevEntry, tCsrStatsClientReqInfo, link );
//send up the stats report
- csrRoamReportStatistics(pMac, pTempStaEntry->statsMask, pTempStaEntry->callback,
+ csrRoamReportStatistics(pMac, pTempStaEntry->statsMask, pTempStaEntry->callback,
pTempStaEntry->staId, pTempStaEntry->pContext);
csrRoamRemoveStatListEntry(pMac, pPrevEntry);
}
@@ -15320,7 +15334,7 @@ eHalStatus csrRoamDeregStatisticsReq(tpAniSirGlobal pMac)
csrRoamRemoveEntryFromPeStatsReqList(pMac, pTempStaEntry->pPeStaEntry);
}
}
- //check if we need to stop the tl stats timer too
+ //check if we need to stop the tl stats timer too
pMac->roam.tlStatsReqInfo.numClient--;
if(!pMac->roam.tlStatsReqInfo.numClient)
{
@@ -15339,19 +15353,19 @@ eHalStatus csrRoamDeregStatisticsReq(tpAniSirGlobal pMac)
if (pTempStaEntry->periodicity)
{
//While creating StaEntry in csrGetStatistics,
- //Initializing and starting timer only when periodicity is set.
+ //Initializing and starting timer only when periodicity is set.
//So Stop and Destroy timer only when periodicity is set.
-
+
vos_timer_stop( &pTempStaEntry->timer );
- // Destroy the vos timer...
+ // Destroy the vos timer...
vosStatus = vos_timer_destroy( &pTempStaEntry->timer );
if ( !VOS_IS_STATUS_SUCCESS( vosStatus ) )
{
smsLog(pMac, LOGE, FL("csrRoamDeregStatisticsReq:failed to destroy Client req timer"));
}
}
-
-
+
+
pPrevEntry = pEntry;
pEntry = csrLLNext( &pMac->roam.statsClientReqList, pEntry, LL_ACCESS_NOLOCK );
}
@@ -15360,15 +15374,15 @@ eHalStatus csrRoamDeregStatisticsReq(tpAniSirGlobal pMac)
{
pTempStaEntry = GET_BASE_ADDR( pPrevEntry, tCsrStatsClientReqInfo, link );
//send up the stats report
- csrRoamReportStatistics(pMac, pTempStaEntry->statsMask, pTempStaEntry->callback,
+ csrRoamReportStatistics(pMac, pTempStaEntry->statsMask, pTempStaEntry->callback,
pTempStaEntry->staId, pTempStaEntry->pContext);
csrRoamRemoveStatListEntry(pMac, pPrevEntry);
}
return status;
-
+
}
-eHalStatus csrIsFullPowerNeeded( tpAniSirGlobal pMac, tSmeCmd *pCommand,
+eHalStatus csrIsFullPowerNeeded( tpAniSirGlobal pMac, tSmeCmd *pCommand,
tRequestFullPowerReason *pReason,
tANI_BOOLEAN *pfNeedPower )
{
@@ -15460,12 +15474,12 @@ eHalStatus csrIsFullPowerNeeded( tpAniSirGlobal pMac, tSmeCmd *pCommand,
#if 0
// TODO : Session Specific info pConnectBssDesc
if( csrIsBssIdEqual( pMac, &pScanResult->Result.BssDescriptor, pMac->roam.pConnectBssDesc ) &&
- csrIsSsidEqual( pMac, 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
+ // 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))
{
@@ -15497,7 +15511,7 @@ eHalStatus csrIsFullPowerNeeded( tpAniSirGlobal pMac, tSmeCmd *pCommand,
#ifdef FEATURE_WLAN_TDLS
else if( eSmeCommandTdlsAddPeer == pCommand->command )
{
- //TDLS link is getting established. need full power
+ //TDLS link is getting established. need full power
fNeedFullPower = eANI_BOOLEAN_TRUE;
reason = eSME_FULL_PWR_NEEDED_BY_TDLS_PEER_SETUP;
}
@@ -15788,7 +15802,7 @@ eHalStatus csrRoamUpdateAPWPSIE( tpAniSirGlobal pMac, tANI_U32 sessionId, tSirAP
eHalStatus status = eHAL_STATUS_SUCCESS;
tSirUpdateAPWPSIEsReq *pMsg;
tANI_U8 *pBuf = NULL, *wTmpBuf = NULL;
-
+
tCsrRoamSession *pSession = CSR_GET_SESSION( pMac, sessionId );
if (NULL == pSession)
{
@@ -15845,13 +15859,13 @@ eHalStatus csrRoamUpdateWPARSNIEs( tpAniSirGlobal pMac, tANI_U32 sessionId, tSir
*pBuf = 0;
*( pBuf + 1 ) = 0;
pBuf += sizeof(tANI_U16);
-
+
// bssId
palCopyMemory( pMac->hHdd, (tSirMacAddr *)pBuf, &pSession->selfMacAddr, sizeof(tSirMacAddr) );
pBuf += sizeof(tSirMacAddr);
// sessionId
*pBuf++ = (tANI_U8)sessionId;
-
+
// APWPARSNIEs
palCopyMemory( pMac->hHdd, (tSirRSNie *)pBuf, pAPSirRSNie, sizeof(tSirRSNie));
pBuf += sizeof(tSirRSNie);
@@ -15888,30 +15902,30 @@ eHalStatus csrRoamIssueFTPreauthReq(tHalHandle hHal, tANI_U32 sessionId, tpSirBs
pftPreAuthReq->preAuthchannelNum = pBssDescription->channelId;
palCopyMemory(pMac->hHdd, (void *)&pftPreAuthReq->currbssId, (void *)pSession->connectedProfile.bssid, sizeof(tSirMacAddr));
- palCopyMemory(pMac->hHdd, (void *)&pftPreAuthReq->preAuthbssId, (void *)pBssDescription->bssId, sizeof(tSirMacAddr));
+ palCopyMemory(pMac->hHdd, (void *)&pftPreAuthReq->preAuthbssId, (void *)pBssDescription->bssId, sizeof(tSirMacAddr));
#ifdef WLAN_FEATURE_VOWIFI_11R
- if (csrRoamIs11rAssoc(pMac) &&
+ if (csrRoamIs11rAssoc(pMac) &&
(pMac->roam.roamSession[sessionId].connectedProfile.AuthType != eCSR_AUTH_TYPE_OPEN_SYSTEM))
{
pftPreAuthReq->ft_ies_length = (tANI_U16)pMac->ft.ftSmeContext.auth_ft_ies_length;
- palCopyMemory(pMac->hHdd, pftPreAuthReq->ft_ies, pMac->ft.ftSmeContext.auth_ft_ies,
+ palCopyMemory(pMac->hHdd, pftPreAuthReq->ft_ies, pMac->ft.ftSmeContext.auth_ft_ies,
pMac->ft.ftSmeContext.auth_ft_ies_length);
}
else
#endif
{
- pftPreAuthReq->ft_ies_length = 0;
+ pftPreAuthReq->ft_ies_length = 0;
}
vos_mem_copy(pftPreAuthReq->pbssDescription, pBssDescription,
sizeof(pBssDescription->length) + pBssDescription->length);
- pftPreAuthReq->length = pal_cpu_to_be16(auth_req_len);
+ pftPreAuthReq->length = pal_cpu_to_be16(auth_req_len);
return palSendMBMessage(pMac->hHdd, pftPreAuthReq);
}
/*--------------------------------------------------------------------------
- * This will receive and process the FT Pre Auth Rsp from the current
- * associated ap.
- *
+ * This will receive and process the FT Pre Auth Rsp from the current
+ * associated ap.
+ *
* This will invoke the hdd call back. This is so that hdd can now
* send the FTIEs from the Auth Rsp (Auth Seq 2) to the supplicant.
------------------------------------------------------------------------*/
@@ -15944,7 +15958,7 @@ void csrRoamFTPreAuthRspProcessor( tHalHandle hHal, tpSirFTPreAuthRsp pFTPreAuth
// Indicate SME QoS module the completion of Preauth success. This will trigger the creation of RIC IEs
pMac->ft.ftSmeContext.psavedFTPreAuthRsp = pFTPreAuthRsp;
sme_QosCsrEventInd(pMac, pMac->ft.ftSmeContext.smeSessionId, SME_QOS_CSR_PREAUTH_SUCCESS_IND, NULL);
- /* Start the pre-auth reassoc interval timer with a period of 400ms. When this expires,
+ /* Start the pre-auth reassoc interval timer with a period of 400ms. When this expires,
* actual transition from the current to handoff AP is triggered */
status = palTimerStart(pMac->hHdd, pMac->ft.ftSmeContext.preAuthReassocIntvlTimer,
60 * PAL_TIMER_TO_MS_UNIT,
@@ -15957,16 +15971,16 @@ void csrRoamFTPreAuthRspProcessor( tHalHandle hHal, tpSirFTPreAuthRsp pFTPreAuth
// Save the received response
palCopyMemory(pMac->hHdd, (void *)&pMac->ft.ftSmeContext.preAuthbssId, (void *)pFTPreAuthRsp->preAuthbssId, sizeof(tCsrBssid));
if (csrRoamIs11rAssoc(pMac))
- csrRoamCallCallback(pMac, pFTPreAuthRsp->smeSessionId, NULL, 0,
+ csrRoamCallCallback(pMac, pFTPreAuthRsp->smeSessionId, NULL, 0,
eCSR_ROAM_FT_RESPONSE, eCSR_ROAM_RESULT_NONE);
// Currently we dont do anything special for CCX connection.
#ifdef FEATURE_WLAN_LFR
- // If Legacy Fast Roaming is enabled, signal the supplicant
+ // If Legacy Fast Roaming is enabled, signal the supplicant
// So he can send us a PMK-ID for this candidate AP.
if (csrRoamIsFastRoamEnabled(pMac, CSR_SESSION_ID_INVALID))
{
- // Save the bssid from the received response
+ // Save the bssid from the received response
palCopyMemory(pMac->hHdd, (void *)&roamInfo.bssid, (void *)pFTPreAuthRsp->preAuthbssId, sizeof(tCsrBssid));
csrRoamCallCallback(pMac, pFTPreAuthRsp->smeSessionId, &roamInfo, 0, eCSR_ROAM_PMK_NOTIFY, 0);
}
@@ -15984,7 +15998,7 @@ void csrRoamJoinRetryTimerHandler(void *pv)
tpAniSirGlobal pMac = pInfo->pMac;
tANI_U32 sessionId = pInfo->sessionId;
tCsrRoamSession *pSession;
-
+
if( CSR_IS_SESSION_VALID(pMac, sessionId) )
{
smsLog( pMac, LOGE, FL( " retrying the last roam profile on session %d" ), sessionId );
@@ -16002,7 +16016,7 @@ eHalStatus csrRoamStartJoinRetryTimer(tpAniSirGlobal pMac, tANI_U32 sessionId, t
{
eHalStatus status = eHAL_STATUS_FAILURE;
tCsrRoamSession *pSession = CSR_GET_SESSION( pMac, sessionId );
-
+
if(pSession->pCurRoamProfile && pSession->maxRetryCount)
{
smsLog(pMac, LOGE, FL(" call sessionId %d retry count %d left"), sessionId, pSession->maxRetryCount);
@@ -16020,7 +16034,7 @@ eHalStatus csrRoamStartJoinRetryTimer(tpAniSirGlobal pMac, tANI_U32 sessionId, t
smsLog(pMac, LOGE, FL(" not to start timer due to no profile or reach mac ret (%d)"),
pSession->maxRetryCount);
}
-
+
return (status);
}
eHalStatus csrRoamStopJoinRetryTimer(tpAniSirGlobal pMac, tANI_U32 sessionId)
@@ -16030,7 +16044,7 @@ eHalStatus csrRoamStopJoinRetryTimer(tpAniSirGlobal pMac, tANI_U32 sessionId)
{
return (palTimerStop(pMac->hHdd, pMac->roam.roamSession[sessionId].hTimerJoinRetry));
}
-
+
return eHAL_STATUS_SUCCESS;
}
#endif
diff --git a/CORE/SME/src/csr/csrApiScan.c b/CORE/SME/src/csr/csrApiScan.c
index c4183a331a73..caf345215e81 100644
--- a/CORE/SME/src/csr/csrApiScan.c
+++ b/CORE/SME/src/csr/csrApiScan.c
@@ -59,7 +59,7 @@ tDblLinkList *g_pchannelPowerInfoList24 = NULL, * g_pchannelPowerInfoList5 = NUL
tpAniSirGlobal g_pMac;
#endif
-/* Purpose of HIDDEN_TIMER
+/* Purpose of HIDDEN_TIMER
** When we remove hidden ssid from the profile i.e., forget the SSID via GUI that SSID shouldn't see in the profile
** For above requirement we used timer limit, logic is explained below
** Timer value is initialsed to current time when it receives corresponding probe response of hidden SSID (The probe request is
@@ -67,22 +67,22 @@ tpAniSirGlobal g_pMac;
** for broadcast probe request, during update SSID with saved SSID we will diff current time with saved SSID time if it is greater than 1 min
** then we are not updating with old one
*/
-
-#define HIDDEN_TIMER (1*60*1000)
+
+#define HIDDEN_TIMER (1*60*1000)
#define CSR_SCAN_RESULT_RSSI_WEIGHT 80 // must be less than 100, represent the persentage of new RSSI
-
+
/*---------------------------------------------------------------------------
PER filter constant fraction: it is a %
----------------------------------------------------------------------------*/
+---------------------------------------------------------------------------*/
#define CSR_SCAN_PER_FILTER_FRAC 100
-
+
/*---------------------------------------------------------------------------
RSSI filter constant fraction: it is a %
----------------------------------------------------------------------------*/
+---------------------------------------------------------------------------*/
#define CSR_SCAN_RSSI_FILTER_FRAC 100
/*---------------------------------------------------------------------------
-Convert RSSI into overall score: Since RSSI is in -dBm values, and the
+Convert RSSI into overall score: Since RSSI is in -dBm values, and the
overall needs to be weighted inversely (where greater value means better
system), we convert.
RSSI *cannot* be more than 0xFF or less than 0 for meaningful WLAN operation
@@ -95,7 +95,7 @@ RSSI *cannot* be more than 0xFF or less than 0 for meaningful WLAN operation
#define CSR_SCAN_OVERALL_SCORE( rssi ) \
(( rssi < CSR_SCAN_MAX_SCORE_VAL ) \
? (CSR_SCAN_MAX_SCORE_VAL-rssi) : CSR_SCAN_MIN_SCORE_VAL)
-
+
#define CSR_SCAN_IS_OVER_BSS_LIMIT(pMac) \
( (pMac)->scan.nBssLimit <= (csrLLCount(&(pMac)->scan.scanResultList)) )
@@ -141,8 +141,8 @@ void csrPurgeChannelPower( tpAniSirGlobal pMac, tDblLinkList *pChannelList );
eHalStatus csrSetCfgBackgroundScanPeriod(tpAniSirGlobal pMac, tANI_U32 bgPeriod);
eHalStatus csrProcessSetBGScanParam(tpAniSirGlobal pMac, tSmeCmd *pCommand);
void csrReleaseScanCommand(tpAniSirGlobal pMac, tSmeCmd *pCommand, eCsrScanStatus scanStatus);
-static tANI_BOOLEAN csrScanValidateScanResult( tpAniSirGlobal pMac, tANI_U8 *pChannels,
- tANI_U8 numChn, tSirBssDescription *pBssDesc,
+static tANI_BOOLEAN csrScanValidateScanResult( tpAniSirGlobal pMac, tANI_U8 *pChannels,
+ tANI_U8 numChn, tSirBssDescription *pBssDesc,
tDot11fBeaconIEs **ppIes );
eHalStatus csrSetBGScanChannelList( tpAniSirGlobal pMac, tANI_U8 *pAdjustChannels, tANI_U8 NumAdjustChannels);
void csrReleaseCmdSingle(tpAniSirGlobal pMac, tSmeCmd *pCommand);
@@ -187,17 +187,17 @@ static eHalStatus csrLLScanPurgeResult(tpAniSirGlobal pMac, tDblLinkList *pList)
eHalStatus status = eHAL_STATUS_SUCCESS;
tListElem *pEntry;
tCsrScanResult *pBssDesc;
-
+
csrLLLock(pList);
-
+
while((pEntry = csrLLRemoveHead(pList, LL_ACCESS_NOLOCK)) != NULL)
{
pBssDesc = GET_BASE_ADDR( pEntry, tCsrScanResult, Link );
csrFreeScanResultEntry( pMac, pBssDesc );
}
-
- csrLLUnlock(pList);
-
+
+ csrLLUnlock(pList);
+
return (status);
}
@@ -217,7 +217,7 @@ int csrCheckValidateLists(void * dest, const void *src, v_SIZE_t num, int idx)
//check 2.4 list
tListElem *pElem, *pHead;
int count;
-
+
count = (int)(g_pchannelPowerInfoList24->Count);
pHead = &g_pchannelPowerInfoList24->ListHead;
pElem = pHead->next;
@@ -234,10 +234,10 @@ int csrCheckValidateLists(void * dest, const void *src, v_SIZE_t num, int idx)
}
else
{
- VOS_TRACE(VOS_MODULE_ID_SME, VOS_TRACE_LEVEL_FATAL,
+ VOS_TRACE(VOS_MODULE_ID_SME, VOS_TRACE_LEVEL_FATAL,
" %d Detect 1 list(0x%X) error Head(0x%X) next(0x%X) Count %d, dest(0x%X) src(0x%X) numBytes(%d)",
- idx, (unsigned int)g_pchannelPowerInfoList24, (unsigned int)pHead,
- (unsigned int)(pHead->next), (int)g_pchannelPowerInfoList24->Count,
+ idx, (unsigned int)g_pchannelPowerInfoList24, (unsigned int)pHead,
+ (unsigned int)(pHead->next), (int)g_pchannelPowerInfoList24->Count,
(unsigned int)dest, (unsigned int)src, (int)num);
VOS_ASSERT(0);
ii = 0;
@@ -248,9 +248,9 @@ int csrCheckValidateLists(void * dest, const void *src, v_SIZE_t num, int idx)
else
{
//Bad list
- VOS_TRACE(VOS_MODULE_ID_SME, VOS_TRACE_LEVEL_FATAL, " %d Detect list(0x%X) error Head(0x%X) next(0x%X) Count %d, dest(0x%X) src(0x%X) numBytes(%d)",
- idx, (unsigned int)g_pchannelPowerInfoList24, (unsigned int)pHead,
- (unsigned int)(pHead->next), (int)g_pchannelPowerInfoList24->Count,
+ VOS_TRACE(VOS_MODULE_ID_SME, VOS_TRACE_LEVEL_FATAL, " %d Detect list(0x%X) error Head(0x%X) next(0x%X) Count %d, dest(0x%X) src(0x%X) numBytes(%d)",
+ idx, (unsigned int)g_pchannelPowerInfoList24, (unsigned int)pHead,
+ (unsigned int)(pHead->next), (int)g_pchannelPowerInfoList24->Count,
(unsigned int)dest, (unsigned int)src, (int)num);
VOS_ASSERT(0);
ii = 0;
@@ -274,7 +274,7 @@ int csrCheckValidateLists(void * dest, const void *src, v_SIZE_t num, int idx)
eHalStatus csrScanOpen( tpAniSirGlobal pMac )
{
eHalStatus status;
-
+
do
{
csrLLOpen(pMac->hHdd, &pMac->scan.scanResultList);
@@ -304,7 +304,7 @@ eHalStatus csrScanOpen( tpAniSirGlobal pMac )
smsLog(pMac, LOGE, FL("cannot allocate memory for hTimerStaApConcTimer timer"));
break;
}
-#endif
+#endif
status = palTimerAlloc(pMac->hHdd, &pMac->scan.hTimerIdleScan, csrScanIdleScanTimerHandler, pMac);
if(!HAL_STATUS_SUCCESS(status))
{
@@ -317,7 +317,7 @@ eHalStatus csrScanOpen( tpAniSirGlobal pMac )
smsLog(pMac, LOGE, FL("cannot allocate memory for ResultAging timer"));
break;
}
- status = palTimerAlloc(pMac->hHdd, &pMac->scan.hTimerResultCfgAging,
+ status = palTimerAlloc(pMac->hHdd, &pMac->scan.hTimerResultCfgAging,
csrScanResultCfgAgingTimerHandler, pMac);
if(!HAL_STATUS_SUCCESS(status))
{
@@ -325,7 +325,7 @@ eHalStatus csrScanOpen( tpAniSirGlobal pMac )
break;
}
}while(0);
-
+
return (status);
}
@@ -365,32 +365,32 @@ eHalStatus csrScanClose( tpAniSirGlobal pMac )
eHalStatus csrScanEnable( tpAniSirGlobal pMac )
{
-
+
pMac->scan.fScanEnable = eANI_BOOLEAN_TRUE;
pMac->scan.fRestartIdleScan = eANI_BOOLEAN_TRUE;
-
+
return eHAL_STATUS_SUCCESS;
}
eHalStatus csrScanDisable( tpAniSirGlobal pMac )
{
-
+
csrScanStopTimers(pMac);
pMac->scan.fScanEnable = eANI_BOOLEAN_FALSE;
-
+
return eHAL_STATUS_SUCCESS;
}
-//Set scan timing parameters according to state of other driver sessions
-//No validation of the parameters is performed.
+//Set scan timing parameters according to state of other driver sessions
+//No validation of the parameters is performed.
static void csrSetDefaultScanTiming( tpAniSirGlobal pMac, tSirScanType scanType, tCsrScanRequest *pScanRequest)
{
#ifdef WLAN_AP_STA_CONCURRENCY
if(csrIsAnySessionConnected(pMac))
{
- //If multi-session, use the appropriate default scan times
+ //If multi-session, use the appropriate default scan times
if(scanType == eSIR_ACTIVE_SCAN)
{
pScanRequest->maxChnTime = pMac->roam.configParam.nActiveMaxChnTimeConc;
@@ -405,7 +405,7 @@ static void csrSetDefaultScanTiming( tpAniSirGlobal pMac, tSirScanType scanType,
pScanRequest->minChnTimeBtc = pMac->roam.configParam.nActiveMinChnTimeBtc;
pScanRequest->restTime = pMac->roam.configParam.nRestTimeConc;
-
+
//Return so that fields set above will not be overwritten.
return;
}
@@ -434,7 +434,7 @@ static void csrSetDefaultScanTiming( tpAniSirGlobal pMac, tSirScanType scanType,
}
#ifdef WLAN_AP_STA_CONCURRENCY
-//Return SUCCESS is the command is queued, else returns eHAL_STATUS_FAILURE
+//Return SUCCESS is the command is queued, else returns eHAL_STATUS_FAILURE
eHalStatus csrQueueScanRequest( tpAniSirGlobal pMac, tSmeCmd *pScanCmd )
{
eHalStatus status = eHAL_STATUS_SUCCESS;
@@ -451,17 +451,17 @@ eHalStatus csrQueueScanRequest( tpAniSirGlobal pMac, tSmeCmd *pScanCmd )
/* split scan if any one of the following:
* - STA session is connected and the scan is not a P2P search
* - any P2P session is connected
- * Do not split scans if no concurrent infra connections are
+ * Do not split scans if no concurrent infra connections are
* active and if the scan is a BG scan triggered by LFR (OR)
* any scan if LFR is in the middle of a BG scan. Splitting
* the scan is delaying the time it takes for LFR to find
* candidates and resulting in disconnects.
*/
- if ( (csrIsStaSessionConnected(pMac) &&
+ if ( (csrIsStaSessionConnected(pMac) &&
#ifdef FEATURE_WLAN_LFR
(csrIsConcurrentInfraConnected(pMac) ||
((pScanCmd->u.scanCmd.reason != eCsrScanBgScan) &&
- (pMac->roam.neighborRoamInfo.neighborRoamState !=
+ (pMac->roam.neighborRoamInfo.neighborRoamState !=
eCSR_NEIGHBOR_ROAM_STATE_CFG_CHAN_LIST_SCAN))) &&
#endif
(pScanCmd->u.scanCmd.u.scanRequest.p2pSearch != 1)) ||
@@ -600,12 +600,12 @@ eHalStatus csrQueueScanRequest( tpAniSirGlobal pMac, tSmeCmd *pScanCmd )
if( fNoCmdPending )
{
if (pQueueScanCmd != NULL)
- {
+ {
csrLLInsertTail( &pMac->scan.scanCmdPendingList, &pQueueScanCmd->Link, LL_ACCESS_LOCK );
}
if (pSendScanCmd != NULL)
- {
+ {
return csrQueueSmeCommand(pMac, pSendScanCmd, eANI_BOOLEAN_FALSE);
}
}
@@ -626,7 +626,7 @@ eHalStatus csrQueueScanRequest( tpAniSirGlobal pMac, tSmeCmd *pScanCmd )
{ //No concurrency case
smsLog( pMac, LOG2, FL("Queuing scan command (reason=%d, roamState=%d"
" numOfChannels=%d)"),
- pScanCmd->u.scanCmd.reason,
+ pScanCmd->u.scanCmd.reason,
pMac->roam.neighborRoamInfo.neighborRoamState,
pScanCmd->u.scanCmd.u.scanRequest.ChannelInfo.numOfChannels);
return csrQueueSmeCommand(pMac, pScanCmd, eANI_BOOLEAN_FALSE);
@@ -638,14 +638,14 @@ eHalStatus csrQueueScanRequest( tpAniSirGlobal pMac, tSmeCmd *pScanCmd )
/* ---------------------------------------------------------------------------
\fn csrScan2GOnyRequest
- \brief This function will update the scan request with only
+ \brief This function will update the scan request with only
2.4GHz valid channel list.
\param pMac
\param pScanCmd
\param pScanRequest
\return None
-------------------------------------------------------------------------------*/
-static void csrScan2GOnyRequest(tpAniSirGlobal pMac,tSmeCmd *pScanCmd,
+static void csrScan2GOnyRequest(tpAniSirGlobal pMac,tSmeCmd *pScanCmd,
tCsrScanRequest *pScanRequest)
{
tANI_U8 index, channelId, channelListSize = 0;
@@ -655,10 +655,10 @@ static void csrScan2GOnyRequest(tpAniSirGlobal pMac,tSmeCmd *pScanCmd,
VOS_ASSERT(pScanCmd && pScanRequest);
/* To silence the KW tool null check is added */
if((pScanCmd == NULL) || (pScanRequest == NULL))
- {
+ {
smsLog( pMac, LOGE, FL(" pScanCmd or pScanRequest is NULL "));
return;
- }
+ }
if (pScanCmd->u.scanCmd.scanID ||
(eCSR_SCAN_REQUEST_FULL_SCAN != pScanRequest->requestType))
@@ -678,14 +678,14 @@ static void csrScan2GOnyRequest(tpAniSirGlobal pMac,tSmeCmd *pScanCmd,
pScanRequest->ChannelInfo.ChannelList = validchannelList;
}
-eHalStatus csrScanRequest(tpAniSirGlobal pMac, tANI_U16 sessionId,
- tCsrScanRequest *pScanRequest, tANI_U32 *pScanRequestID,
+eHalStatus csrScanRequest(tpAniSirGlobal pMac, tANI_U16 sessionId,
+ tCsrScanRequest *pScanRequest, tANI_U32 *pScanRequestID,
csrScanCompleteCallback callback, void *pContext)
{
eHalStatus status = eHAL_STATUS_FAILURE;
tSmeCmd *pScanCmd = NULL;
eCsrConnectState ConnectState;
-
+
if(pScanRequest == NULL)
{
smsLog( pMac, LOGE, FL(" pScanRequest is NULL"));
@@ -700,7 +700,7 @@ eHalStatus csrScanRequest(tpAniSirGlobal pMac, tANI_U16 sessionId,
if(pScanCmd)
{
palZeroMemory(pMac->hHdd, &pScanCmd->u.scanCmd, sizeof(tScanCmd));
- pScanCmd->command = eSmeCommandScan;
+ pScanCmd->command = eSmeCommandScan;
pScanCmd->sessionId = sessionId;
pScanCmd->u.scanCmd.callback = callback;
pScanCmd->u.scanCmd.pContext = pContext;
@@ -762,26 +762,26 @@ eHalStatus csrScanRequest(tpAniSirGlobal pMac, tANI_U16 sessionId,
{
pScanRequest->maxChnTime = pScanRequest->maxChnTime << 1;
pScanRequest->minChnTime = pScanRequest->minChnTime << 1;
- }
+ }
pScanRequest->maxChnTimeBtc = pMac->roam.configParam.nActiveMaxChnTimeBtc;
pScanRequest->minChnTimeBtc = pMac->roam.configParam.nActiveMinChnTimeBtc;
//Need to make the following atomic
pScanCmd->u.scanCmd.scanID = pMac->scan.nextScanID++; //let it wrap around
-
+
if(pScanRequestID)
{
- *pScanRequestID = pScanCmd->u.scanCmd.scanID;
+ *pScanRequestID = pScanCmd->u.scanCmd.scanID;
}
- // If it is the first scan request from HDD, CSR checks if it is for 11d.
- // If it is not, CSR will save the scan request in the pending cmd queue
+ // If it is the first scan request from HDD, CSR checks if it is for 11d.
+ // If it is not, CSR will save the scan request in the pending cmd queue
// & issue an 11d scan request to PE.
if (((0 == pScanCmd->u.scanCmd.scanID)
&& (eCSR_SCAN_REQUEST_11D_SCAN != pScanRequest->requestType))
#ifdef SOFTAP_CHANNEL_RANGE
&& (eCSR_SCAN_SOFTAP_CHANNEL_RANGE != pScanRequest->requestType)
-#endif
+#endif
&& (eANI_BOOLEAN_FALSE == pMac->scan.fEnableBypass11d)
)
{
@@ -802,7 +802,7 @@ eHalStatus csrScanRequest(tpAniSirGlobal pMac, tANI_U16 sessionId,
{
break;
}
- status = palCopyMemory( pMac->hHdd, pChnInfo->ChannelList,
+ status = palCopyMemory( pMac->hHdd, pChnInfo->ChannelList,
pMac->scan.baseChannels.channelList, numChn );
if ( !HAL_STATUS_SUCCESS( status ) )
{
@@ -814,7 +814,7 @@ eHalStatus csrScanRequest(tpAniSirGlobal pMac, tANI_U16 sessionId,
p11dScanCmd->command = eSmeCommandScan;
p11dScanCmd->u.scanCmd.callback = NULL;
p11dScanCmd->u.scanCmd.pContext = NULL;
- p11dScanCmd->u.scanCmd.scanID = pMac->scan.nextScanID++;
+ p11dScanCmd->u.scanCmd.scanID = pMac->scan.nextScanID++;
scanReq.BSSType = eCSR_BSS_TYPE_ANY;
if ( csrIs11dSupported(pMac) )
@@ -853,14 +853,14 @@ eHalStatus csrScanRequest(tpAniSirGlobal pMac, tANI_U16 sessionId,
eANI_BOOLEAN_FALSE);
#else
status = csrQueueSmeCommand(pMac, p11dScanCmd, eANI_BOOLEAN_FALSE);
-#endif
+#endif
if( !HAL_STATUS_SUCCESS( status ) )
{
smsLog( pMac, LOGE, FL(" fail to send message status = %d"), status );
break;
}
}
- else
+ else
{
break;
}
@@ -892,7 +892,7 @@ eHalStatus csrScanRequest(tpAniSirGlobal pMac, tANI_U16 sessionId,
status = csrQueueSmeCommand(pMac, pScanCmd,
eANI_BOOLEAN_FALSE);
#else
- status = csrQueueSmeCommand(pMac, pScanCmd, eANI_BOOLEAN_FALSE);
+ status = csrQueueSmeCommand(pMac, pScanCmd, eANI_BOOLEAN_FALSE);
#endif
if( !HAL_STATUS_SUCCESS( status ) )
{
@@ -900,13 +900,13 @@ eHalStatus csrScanRequest(tpAniSirGlobal pMac, tANI_U16 sessionId,
break;
}
}
- else
+ else
{
smsLog( pMac, LOGE, FL(" fail to copy request status = %d"), status );
break;
}
}
- else
+ else
{
smsLog( pMac, LOGE, FL(" pScanCmd is NULL"));
break;
@@ -932,7 +932,7 @@ eHalStatus csrScanRequestResult(tpAniSirGlobal pMac)
{
eHalStatus status = eHAL_STATUS_SUCCESS;
tSmeCmd *pScanCmd;
-
+
if(pMac->scan.fScanEnable)
{
pScanCmd = csrGetCommandBuffer(pMac);
@@ -952,14 +952,14 @@ eHalStatus csrScanRequestResult(tpAniSirGlobal pMac)
csrReleaseCommandScan(pMac, pScanCmd);
}
}
- else
+ else
{
//log error
smsLog(pMac, LOGE, FL("can not obtain a common buffer"));
status = eHAL_STATUS_RESOURCES;
}
}
-
+
return (status);
}
@@ -1016,9 +1016,9 @@ eHalStatus csrScanAllChannels(tpAniSirGlobal pMac, eCsrRequestType reqType)
scanReq.minChnTime = pMac->roam.configParam.nActiveMinChnTime;
scanReq.maxChnTimeBtc = pMac->roam.configParam.nActiveMaxChnTimeBtc;
scanReq.minChnTimeBtc = pMac->roam.configParam.nActiveMinChnTimeBtc;
- //Scan with invalid sessionId.
+ //Scan with invalid sessionId.
//This results in SME using the first available session to scan.
- status = csrScanRequest(pMac, CSR_SESSION_ID_INVALID, &scanReq,
+ status = csrScanRequest(pMac, CSR_SESSION_ID_INVALID, &scanReq,
&scanId, NULL, NULL);
return (status);
@@ -1085,7 +1085,7 @@ eHalStatus csrIssueRoamAfterLostlinkScan(tpAniSirGlobal pMac, tANI_U32 sessionId
//we want to put the last connected BSS to the very beginning, if possible
csrMoveBssToHeadFromBSSID(pMac, &pSession->connectedProfile.bssid, hBSSList);
}
- status = csrRoamIssueConnect(pMac, sessionId, pProfile, hBSSList, reason,
+ status = csrRoamIssueConnect(pMac, sessionId, pProfile, hBSSList, reason,
roamId, eANI_BOOLEAN_TRUE, eANI_BOOLEAN_TRUE);
if(!HAL_STATUS_SUCCESS(status))
{
@@ -1115,7 +1115,7 @@ eHalStatus csrScanGetScanChnInfo(tpAniSirGlobal pMac, tANI_U8 sessionId,
{
eHalStatus status = eHAL_STATUS_SUCCESS;
tSmeCmd *pScanCmd;
-
+
if(pMac->scan.fScanEnable)
{
pScanCmd = csrGetCommandBuffer(pMac);
@@ -1136,14 +1136,14 @@ eHalStatus csrScanGetScanChnInfo(tpAniSirGlobal pMac, tANI_U8 sessionId,
csrReleaseCommandScan(pMac, pScanCmd);
}
}
- else
+ else
{
//log error
smsLog(pMac, LOGE, FL("can not obtain a common buffer"));
status = eHAL_STATUS_RESOURCES;
}
}
-
+
return (status);
}
@@ -1173,7 +1173,7 @@ eHalStatus csrScanHandleFailedLostlink1(tpAniSirGlobal pMac, tANI_U32 sessionId)
//try lostlink scan2
status = csrScanRequestLostLink2(pMac, sessionId);
}
- else if(!pSession->pCurRoamProfile->ChannelInfo.ChannelList ||
+ else if(!pSession->pCurRoamProfile->ChannelInfo.ChannelList ||
pSession->pCurRoamProfile->ChannelInfo.ChannelList[0] == 0)
{
//go straight to lostlink scan3
@@ -1194,7 +1194,7 @@ eHalStatus csrScanHandleFailedLostlink1(tpAniSirGlobal pMac, tANI_U32 sessionId)
status = csrScanRequestLostLink3(pMac, sessionId);
}
- return (status);
+ return (status);
}
@@ -1215,7 +1215,7 @@ eHalStatus csrScanHandleFailedLostlink2(tpAniSirGlobal pMac, tANI_U32 sessionId)
{
csrScanStartIdleScan(pMac);
}
- else if(!pSession->pCurRoamProfile || !pSession->pCurRoamProfile->ChannelInfo.ChannelList ||
+ else if(!pSession->pCurRoamProfile || !pSession->pCurRoamProfile->ChannelInfo.ChannelList ||
pSession->pCurRoamProfile->ChannelInfo.ChannelList[0] == 0)
{
//try lostlink scan3
@@ -1230,7 +1230,7 @@ eHalStatus csrScanHandleFailedLostlink2(tpAniSirGlobal pMac, tANI_U32 sessionId)
}
}
- return (status);
+ return (status);
}
@@ -1245,8 +1245,8 @@ eHalStatus csrScanHandleFailedLostlink3(tpAniSirGlobal pMac, tANI_U32 sessionId)
//we are done with lostlink
csrScanStartIdleScan(pMac);
}
-
- return (status);
+
+ return (status);
}
@@ -1298,7 +1298,7 @@ eHalStatus csrScanRequestLostLink1( tpAniSirGlobal pMac, tANI_U32 sessionId )
break;
}
pCommand->u.scanCmd.u.scanRequest.SSIDs.numOfSSIDs = 1;
- palCopyMemory(pMac->hHdd, &pCommand->u.scanCmd.u.scanRequest.SSIDs.SSIDList[0].SSID,
+ palCopyMemory(pMac->hHdd, &pCommand->u.scanCmd.u.scanRequest.SSIDs.SSIDList[0].SSID,
&pSession->connectedProfile.SSID, sizeof(tSirMacSSid));
}
else
@@ -1334,7 +1334,7 @@ eHalStatus csrScanRequestLostLink1( tpAniSirGlobal pMac, tANI_U32 sessionId )
{
for(i = 0; i < nChn; i++)
{
- if(pCommand->u.scanCmd.u.scanRequest.ChannelInfo.ChannelList[i] ==
+ if(pCommand->u.scanCmd.u.scanRequest.ChannelInfo.ChannelList[i] ==
pScanResult->BssDescriptor.channelId)
{
break;
@@ -1350,7 +1350,7 @@ eHalStatus csrScanRequestLostLink1( tpAniSirGlobal pMac, tANI_U32 sessionId )
{
for(i = 0; i < nChn; i++)
{
- if(pCommand->u.scanCmd.u.scanRequest.ChannelInfo.ChannelList[i] ==
+ if(pCommand->u.scanCmd.u.scanRequest.ChannelInfo.ChannelList[i] ==
pSession->connectedProfile.operationChannel)
{
break;
@@ -1375,7 +1375,7 @@ eHalStatus csrScanRequestLostLink1( tpAniSirGlobal pMac, tANI_U32 sessionId )
pCommand->u.scanCmd.u.scanRequest.ChannelInfo.ChannelList[0] = pSession->connectedProfile.operationChannel;
pCommand->u.scanCmd.u.scanRequest.ChannelInfo.numOfChannels = 1;
}
- else
+ else
{
break;
}
@@ -1484,7 +1484,7 @@ eHalStatus csrScanRequestLostLink2( tpAniSirGlobal pMac, tANI_U32 sessionId )
{
for(i = 0; i < nChn; i++)
{
- if(pCommand->u.scanCmd.u.scanRequest.ChannelInfo.ChannelList[i] ==
+ if(pCommand->u.scanCmd.u.scanRequest.ChannelInfo.ChannelList[i] ==
pScanResult->BssDescriptor.channelId)
{
break;
@@ -1614,7 +1614,7 @@ eHalStatus csrScanHandleSearchForSSID(tpAniSirGlobal pMac, tSmeCmd *pCommand)
status = csrScanGetResult(pMac, pScanFilter, &hBSSList);
if(!HAL_STATUS_SUCCESS(status))
break;
- status = csrRoamIssueConnect(pMac, sessionId, pProfile, hBSSList, eCsrHddIssued,
+ status = csrRoamIssueConnect(pMac, sessionId, pProfile, hBSSList, eCsrHddIssued,
pCommand->u.scanCmd.roamId, eANI_BOOLEAN_TRUE, eANI_BOOLEAN_TRUE);
if(!HAL_STATUS_SUCCESS(status))
{
@@ -1641,7 +1641,7 @@ eHalStatus csrScanHandleSearchForSSID(tpAniSirGlobal pMac, tSmeCmd *pCommand)
{
//Save the roma profile so we can retry
csrFreeRoamProfile( pMac, sessionId );
- if (HAL_STATUS_SUCCESS(palAllocateMemory(pMac->hHdd,
+ if (HAL_STATUS_SUCCESS(palAllocateMemory(pMac->hHdd,
(void **)&pSession->pCurRoamProfile,
sizeof(tCsrRoamProfile))))
{
@@ -1688,7 +1688,7 @@ eHalStatus csrScanHandleSearchForSSIDFailure(tpAniSirGlobal pMac, tSmeCmd *pComm
//Check whether it is for start ibss. No need to do anything if it is a JOIN request
if(pProfile && CSR_IS_START_IBSS(pProfile))
{
- status = csrRoamIssueConnect(pMac, sessionId, pProfile, NULL, eCsrHddIssued,
+ status = csrRoamIssueConnect(pMac, sessionId, pProfile, NULL, eCsrHddIssued,
pCommand->u.scanCmd.roamId, eANI_BOOLEAN_TRUE, eANI_BOOLEAN_TRUE);
if(!HAL_STATUS_SUCCESS(status))
{
@@ -1696,7 +1696,7 @@ eHalStatus csrScanHandleSearchForSSIDFailure(tpAniSirGlobal pMac, tSmeCmd *pComm
csrRoamCallCallback(pMac, sessionId, NULL, pCommand->u.scanCmd.roamId, eCSR_ROAM_FAILED, eCSR_ROAM_RESULT_FAILURE);
}
}
- else
+ else
{
eCsrRoamResult roamResult = eCSR_ROAM_RESULT_FAILURE;
@@ -1715,7 +1715,7 @@ eHalStatus csrScanHandleSearchForSSIDFailure(tpAniSirGlobal pMac, tSmeCmd *pComm
pRoamInfo = &roamInfo;
if(pCommand->u.roamCmd.pRoamBssEntry)
{
- tCsrScanResult *pScanResult =
+ tCsrScanResult *pScanResult =
GET_BASE_ADDR(pCommand->u.roamCmd.pRoamBssEntry,
tCsrScanResult, Link);
roamInfo.pBssDesc = &pScanResult->Result.BssDescriptor;
@@ -1741,7 +1741,7 @@ eHalStatus csrScanHandleSearchForSSIDFailure(tpAniSirGlobal pMac, tSmeCmd *pComm
{
//Save the roma profile so we can retry
csrFreeRoamProfile( pMac, sessionId );
- if (HAL_STATUS_SUCCESS(palAllocateMemory(pMac->hHdd,
+ if (HAL_STATUS_SUCCESS(palAllocateMemory(pMac->hHdd,
(void **)&pSession->pCurRoamProfile,
sizeof(tCsrRoamProfile))))
{
@@ -1805,7 +1805,7 @@ eHalStatus csrScanHandleCapChangeScanComplete(tpAniSirGlobal pMac, tANI_U32 sess
{
//we want to put the last connected BSS to the very beginning, if possible
csrMoveBssToHeadFromBSSID(pMac, &pSession->connectedProfile.bssid, hBSSList);
- status = csrRoamIssueConnect(pMac, sessionId, pProfile, hBSSList,
+ status = csrRoamIssueConnect(pMac, sessionId, pProfile, hBSSList,
eCsrCapsChange, 0, eANI_BOOLEAN_TRUE, eANI_BOOLEAN_TRUE);
if(!HAL_STATUS_SUCCESS(status))
{
@@ -1846,7 +1846,7 @@ eHalStatus csrScanResultPurge(tpAniSirGlobal pMac, tScanResultHandle hScanList)
{
eHalStatus status = eHAL_STATUS_INVALID_PARAMETER;
tScanResultList *pScanList = (tScanResultList *)hScanList;
-
+
if(pScanList)
{
status = csrLLScanPurgeResult(pMac, &pScanList->List);
@@ -1940,12 +1940,12 @@ static tANI_BOOLEAN csrIsBetterBss(tCsrScanResult *pBss1, tCsrScanResult *pBss2)
}
-#ifdef FEATURE_WLAN_LFR
+#ifdef FEATURE_WLAN_LFR
//Add the channel to the occupiedChannels array
static void csrScanAddToOccupiedChannels(
- tpAniSirGlobal pMac,
- tCsrScanResult *pResult,
- tCsrChannel *pOccupiedChannels,
+ tpAniSirGlobal pMac,
+ tCsrScanResult *pResult,
+ tCsrChannel *pOccupiedChannels,
tDot11fBeaconIEs *pIes)
{
eHalStatus status;
@@ -1958,15 +1958,15 @@ static void csrScanAddToOccupiedChannels(
if (!csrIsChannelPresentInList(pOccupiedChannelList, numOccupiedChannels, channel)
&& csrNeighborRoamConnectedProfileMatch(pMac, pResult, pIes))
{
- status = csrAddToChannelListFront(pOccupiedChannelList, numOccupiedChannels, channel);
+ status = csrAddToChannelListFront(pOccupiedChannelList, numOccupiedChannels, channel);
if(HAL_STATUS_SUCCESS(status))
- {
+ {
pOccupiedChannels->numChannels++;
smsLog(pMac, LOG2, FL("%s: added channel %d to the list (count=%d)"),
__func__, channel, pOccupiedChannels->numChannels);
- if (pOccupiedChannels->numChannels > CSR_BG_SCAN_OCCUPIED_CHANNEL_LIST_LEN)
- pOccupiedChannels->numChannels = CSR_BG_SCAN_OCCUPIED_CHANNEL_LIST_LEN;
- }
+ if (pOccupiedChannels->numChannels > CSR_BG_SCAN_OCCUPIED_CHANNEL_LIST_LEN)
+ pOccupiedChannels->numChannels = CSR_BG_SCAN_OCCUPIED_CHANNEL_LIST_LEN;
+ }
}
}
#endif
@@ -1975,17 +1975,17 @@ static void csrScanAddToOccupiedChannels(
//pIes can not be NULL
static void csrScanAddResult(tpAniSirGlobal pMac, tCsrScanResult *pResult, tDot11fBeaconIEs *pIes)
{
-#ifdef FEATURE_WLAN_LFR
+#ifdef FEATURE_WLAN_LFR
tpCsrNeighborRoamControlInfo pNeighborRoamInfo = &pMac->roam.neighborRoamInfo;
#endif
pResult->preferValue = csrGetBssPreferValue(pMac, (int)pResult->Result.BssDescriptor.rssi);
pResult->capValue = csrGetBssCapValue(pMac, &pResult->Result.BssDescriptor, pIes);
csrLLInsertTail( &pMac->scan.scanResultList, &pResult->Link, LL_ACCESS_LOCK );
-#ifdef FEATURE_WLAN_LFR
+#ifdef FEATURE_WLAN_LFR
if(0 == pNeighborRoamInfo->cfgParams.channelInfo.numOfChannels)
{
- /* Build the occupied channel list, only if "gNeighborScanChannelList" is
+ /* Build the occupied channel list, only if "gNeighborScanChannelList" is
NOT set in the cfg.ini file */
csrScanAddToOccupiedChannels(pMac, pResult, &pMac->scan.occupiedChannels, pIes);
}
@@ -2005,7 +2005,7 @@ eHalStatus csrScanGetResult(tpAniSirGlobal pMac, tCsrScanResultFilter *pFilter,
eCsrAuthType auth = eCSR_AUTH_TYPE_OPEN_SYSTEM;
tDot11fBeaconIEs *pIes, *pNewIes;
tANI_BOOLEAN fMatch;
-
+
if(phResult)
{
*phResult = CSR_INVALID_SCANRESULT_HANDLE;
@@ -2016,10 +2016,10 @@ eHalStatus csrScanGetResult(tpAniSirGlobal pMac, tCsrScanResultFilter *pFilter,
palZeroMemory(pMac->hHdd, pRetList, sizeof(tScanResultList));
csrLLOpen(pMac->hHdd, &pRetList->List);
pRetList->pCurEntry = NULL;
-
+
csrLLLock(&pMac->scan.scanResultList);
pEntry = csrLLPeekHead( &pMac->scan.scanResultList, LL_ACCESS_NOLOCK );
- while( pEntry )
+ while( pEntry )
{
pBssDesc = GET_BASE_ADDR( pEntry, tCsrScanResult, Link );
pIes = (tDot11fBeaconIEs *)( pBssDesc->Result.pvIes );
@@ -2116,7 +2116,7 @@ eHalStatus csrScanGetResult(tpAniSirGlobal pMac, tCsrScanResultFilter *pFilter,
//To sort the list
tListElem *pTmpEntry;
tCsrScanResult *pTmpResult;
-
+
pTmpEntry = csrLLPeekHead(&pRetList->List, LL_ACCESS_NOLOCK);
while(pTmpEntry)
{
@@ -2141,9 +2141,9 @@ eHalStatus csrScanGetResult(tpAniSirGlobal pMac, tCsrScanResultFilter *pFilter,
pEntry = csrLLNext( &pMac->scan.scanResultList, pEntry, LL_ACCESS_NOLOCK );
}//while
csrLLUnlock(&pMac->scan.scanResultList);
-
+
smsLog(pMac, LOG2, FL("return %d BSS"), csrLLCount(&pRetList->List));
-
+
if( !HAL_STATUS_SUCCESS(status) || (phResult == NULL) )
{
//Fail or No one wants the result.
@@ -2164,7 +2164,7 @@ eHalStatus csrScanGetResult(tpAniSirGlobal pMac, tCsrScanResultFilter *pFilter,
}
}
}//Allocated pRetList
-
+
return (status);
}
@@ -2175,9 +2175,9 @@ eHalStatus csrScanGetResult(tpAniSirGlobal pMac, tCsrScanResultFilter *pFilter,
* we are unable to recover from
* csrRoamRoamingStateDisassocRspProcessor.
* If it is needed to remove this routine,
- * first ensure that we recover gracefully from
- * csrRoamRoamingStateDisassocRspProcessor if
- * csrScanGetResult returns with a failure because
+ * first ensure that we recover gracefully from
+ * csrRoamRoamingStateDisassocRspProcessor if
+ * csrScanGetResult returns with a failure because
* of not being able to find the roaming BSS.
*/
tANI_U8 csrScanFlushDenied(tpAniSirGlobal pMac)
@@ -2217,7 +2217,7 @@ eHalStatus csrScanFlushSelectiveResult(tpAniSirGlobal pMac, v_BOOL_t flushP2P)
while( pEntry != NULL)
{
pBssDesc = GET_BASE_ADDR( pEntry, tCsrScanResult, Link );
- if( flushP2P == vos_mem_compare( pBssDesc->Result.ssId.ssId,
+ if( flushP2P == vos_mem_compare( pBssDesc->Result.ssId.ssId,
"DIRECT-", 7) )
{
pFreeElem = pEntry;
@@ -2312,7 +2312,7 @@ eHalStatus csrScanFilter11dResult(tpAniSirGlobal pMac)
while( pEntry )
{
pBssDesc = GET_BASE_ADDR( pEntry, tCsrScanResult, Link );
- pTempEntry = csrLLNext( &pMac->scan.scanResultList, pEntry,
+ pTempEntry = csrLLNext( &pMac->scan.scanResultList, pEntry,
LL_ACCESS_LOCK );
if(csrCheck11dChannel(pBssDesc->Result.BssDescriptor.channelId,
pMac->roam.validChannelList, len))
@@ -2338,7 +2338,7 @@ eHalStatus csrScanCopyResultList(tpAniSirGlobal pMac, tScanResultHandle hIn, tSc
tANI_U32 count = 0;
tListElem *pEntry;
tANI_U32 bssLen, allocLen;
-
+
if(phResult)
{
*phResult = CSR_INVALID_SCANRESULT_HANDLE;
@@ -2351,9 +2351,9 @@ eHalStatus csrScanCopyResultList(tpAniSirGlobal pMac, tScanResultHandle hIn, tSc
pRetList->pCurEntry = NULL;
csrLLLock(&pMac->scan.scanResultList);
csrLLLock(&pInList->List);
-
+
pEntry = csrLLPeekHead( &pInList->List, LL_ACCESS_NOLOCK );
- while( pEntry )
+ while( pEntry )
{
pScanResult = GET_BASE_ADDR( pEntry, tCsrScanResult, Link );
bssLen = pScanResult->Result.BssDescriptor.length + sizeof(pScanResult->Result.BssDescriptor.length);
@@ -2384,7 +2384,7 @@ eHalStatus csrScanCopyResultList(tpAniSirGlobal pMac, tScanResultHandle hIn, tSc
count = 0;
break;
}
- status = palCopyMemory(pMac->hHdd, pResult->Result.pvIes,
+ status = palCopyMemory(pMac->hHdd, pResult->Result.pvIes,
pScanResult->Result.pvIes, sizeof( tDot11fBeaconIEs ));
if(!HAL_STATUS_SUCCESS(status))
{
@@ -2401,7 +2401,7 @@ eHalStatus csrScanCopyResultList(tpAniSirGlobal pMac, tScanResultHandle hIn, tSc
}//while
csrLLUnlock(&pInList->List);
csrLLUnlock(&pMac->scan.scanResultList);
-
+
if(HAL_STATUS_SUCCESS(status))
{
if(0 == count)
@@ -2416,12 +2416,12 @@ eHalStatus csrScanCopyResultList(tpAniSirGlobal pMac, tScanResultHandle hIn, tSc
}
}
}//Allocated pRetList
-
+
return (status);
}
-
+
eHalStatus csrScanningStateMsgProcessor( tpAniSirGlobal pMac, void *pMsgBuf )
{
eHalStatus status = eHAL_STATUS_SUCCESS;
@@ -2433,7 +2433,7 @@ eHalStatus csrScanningStateMsgProcessor( tpAniSirGlobal pMac, void *pMsgBuf )
}
else
{
- if(pMsg->type == eWNI_SME_UPPER_LAYER_ASSOC_CNF)
+ if(pMsg->type == eWNI_SME_UPPER_LAYER_ASSOC_CNF)
{
tCsrRoamSession *pSession;
tSirSmeAssocIndToUpperLayerCnf *pUpperLayerAssocCnf;
@@ -2454,13 +2454,13 @@ eHalStatus csrScanningStateMsgProcessor( tpAniSirGlobal pMac, void *pMsgBuf )
return eHAL_STATUS_FAILURE;
}
- pRoamInfo->statusCode = eSIR_SME_SUCCESS; //send the status code as Success
+ pRoamInfo->statusCode = eSIR_SME_SUCCESS; //send the status code as Success
pRoamInfo->u.pConnectedProfile = &pSession->connectedProfile;
pRoamInfo->staId = (tANI_U8)pUpperLayerAssocCnf->aid;
pRoamInfo->rsnIELen = (tANI_U8)pUpperLayerAssocCnf->rsnIE.length;
pRoamInfo->prsnIE = pUpperLayerAssocCnf->rsnIE.rsnIEdata;
pRoamInfo->addIELen = (tANI_U8)pUpperLayerAssocCnf->addIE.length;
- pRoamInfo->paddIE = pUpperLayerAssocCnf->addIE.addIEdata;
+ pRoamInfo->paddIE = pUpperLayerAssocCnf->addIE.addIEdata;
palCopyMemory(pMac->hHdd, pRoamInfo->peerMac, pUpperLayerAssocCnf->peerMacAddr, sizeof(tSirMacAddr));
palCopyMemory(pMac->hHdd, &pRoamInfo->bssid, pUpperLayerAssocCnf->bssId, sizeof(tCsrBssid));
pRoamInfo->wmmEnabledSta = pUpperLayerAssocCnf->wmmEnabledSta;
@@ -2509,7 +2509,7 @@ void csrCheckNSaveWscIe(tpAniSirGlobal pMac, tSirBssDescription *pNewBssDescr, t
(0 == pNewBssDescr->WscIeLen))
{
idx = 0;
- len = pOldBssDescr->length - sizeof(tSirBssDescription) +
+ len = pOldBssDescr->length - sizeof(tSirBssDescription) +
sizeof(tANI_U16) + sizeof(tANI_U32) - DOT11F_IE_WSCPROBERES_MIN_LEN - 2;
pbIe = (tANI_U8 *)pOldBssDescr->ieFields;
//Save WPS IE if it exists
@@ -2538,7 +2538,7 @@ void csrCheckNSaveWscIe(tpAniSirGlobal pMac, tSirBssDescription *pNewBssDescr, t
//pIes may be NULL
tANI_BOOLEAN csrRemoveDupBssDescription( tpAniSirGlobal pMac, tSirBssDescription *pSirBssDescr,
- tDot11fBeaconIEs *pIes, tAniSSID *pSsid , v_TIME_t *timer )
+ tDot11fBeaconIEs *pIes, tAniSSID *pSsid , v_TIME_t *timer )
{
tListElem *pEntry;
@@ -2550,13 +2550,13 @@ tANI_BOOLEAN csrRemoveDupBssDescription( tpAniSirGlobal pMac, tSirBssDescription
// results for this Bss. In that case, remove the 'old' Bss description from the linked list.
pEntry = csrLLPeekHead( &pMac->scan.scanResultList, LL_ACCESS_LOCK );
- while( pEntry )
+ while( pEntry )
{
pBssDesc = GET_BASE_ADDR( pEntry, tCsrScanResult, Link );
// we have a duplicate scan results only when BSSID, SSID, Channel and NetworkType
// matches
- if ( csrIsDuplicateBssDescription( pMac, &pBssDesc->Result.BssDescriptor,
+ if ( csrIsDuplicateBssDescription( pMac, &pBssDesc->Result.BssDescriptor,
pSirBssDescr, pIes ) )
{
pSirBssDescr->rssi = (tANI_S8)( (((tANI_S32)pSirBssDescr->rssi * CSR_SCAN_RESULT_RSSI_WEIGHT ) +
@@ -2569,7 +2569,7 @@ tANI_BOOLEAN csrRemoveDupBssDescription( tpAniSirGlobal pMac, tSirBssDescription
*pSsid = pBssDesc->Result.ssId;
*timer = pBssDesc->Result.timer;
csrCheckNSaveWscIe(pMac, pSirBssDescr, &pBssDesc->Result.BssDescriptor);
-
+
csrFreeScanResultEntry( pMac, pBssDesc );
}
else
@@ -2616,21 +2616,21 @@ eHalStatus csrAddPMKIDCandidateList( tpAniSirGlobal pMac, tANI_U32 sessionId,
WLAN_VOS_DIAG_EVENT_DEF(secEvent, vos_event_wlan_security_payload_type);
palZeroMemory(pMac->hHdd, &secEvent, sizeof(vos_event_wlan_security_payload_type));
secEvent.eventId = WLAN_SECURITY_EVENT_PMKID_CANDIDATE_FOUND;
- secEvent.encryptionModeMulticast =
+ secEvent.encryptionModeMulticast =
(v_U8_t)diagEncTypeFromCSRType(pSession->connectedProfile.mcEncryptionType);
- secEvent.encryptionModeUnicast =
+ secEvent.encryptionModeUnicast =
(v_U8_t)diagEncTypeFromCSRType(pSession->connectedProfile.EncryptionType);
palCopyMemory( pMac->hHdd, secEvent.bssid, pSession->connectedProfile.bssid, 6 );
- secEvent.authMode =
+ secEvent.authMode =
(v_U8_t)diagAuthTypeFromCSRType(pSession->connectedProfile.AuthType);
WLAN_VOS_DIAG_EVENT_REPORT(&secEvent, EVENT_WLAN_SECURITY);
}
#endif//#ifdef FEATURE_WLAN_DIAG_SUPPORT_CSR
// if yes, then add to PMKIDCandidateList
- status = palCopyMemory(pMac->hHdd, pSession->PmkidCandidateInfo[pSession->NumPmkidCandidate].BSSID,
+ status = palCopyMemory(pMac->hHdd, pSession->PmkidCandidateInfo[pSession->NumPmkidCandidate].BSSID,
pBssDesc->bssId, WNI_CFG_BSSID_LEN);
-
+
if( HAL_STATUS_SUCCESS( status ) )
{
if ( (pIes->RSN.RSN_Cap[0] >> 0) & 0x1 ) // Bit 0 offirst byte - PreAuthentication Capability
@@ -2656,7 +2656,7 @@ eHalStatus csrAddPMKIDCandidateList( tpAniSirGlobal pMac, tANI_U32 sessionId,
//This function checks whether new AP is found for the current connected profile
//If it is found, it return the sessionId, else it return invalid sessionID
-tANI_U32 csrProcessBSSDescForPMKIDList(tpAniSirGlobal pMac,
+tANI_U32 csrProcessBSSDescForPMKIDList(tpAniSirGlobal pMac,
tSirBssDescription *pBssDesc,
tDot11fBeaconIEs *pIes)
{
@@ -2671,7 +2671,7 @@ tANI_U32 csrProcessBSSDescForPMKIDList(tpAniSirGlobal pMac,
if( CSR_IS_SESSION_VALID( pMac, i ) )
{
pSession = CSR_GET_SESSION( pMac, i );
- if( csrIsConnStateConnectedInfra( pMac, i ) &&
+ if( csrIsConnStateConnectedInfra( pMac, i ) &&
( eCSR_AUTH_TYPE_RSN == pSession->connectedProfile.AuthType ) )
{
if(csrMatchBSSToConnectProfile(pMac, &pSession->connectedProfile, pBssDesc, pIesLocal))
@@ -2719,9 +2719,9 @@ eHalStatus csrAddBKIDCandidateList( tpAniSirGlobal pMac, tANI_U32 sessionId,
{
// if yes, then add to BKIDCandidateList
- status = palCopyMemory(pMac->hHdd, pSession->BkidCandidateInfo[pSession->NumBkidCandidate].BSSID,
+ status = palCopyMemory(pMac->hHdd, pSession->BkidCandidateInfo[pSession->NumBkidCandidate].BSSID,
pBssDesc->bssId, WNI_CFG_BSSID_LEN);
-
+
if( HAL_STATUS_SUCCESS( status ) )
{
if ( pIes->WAPI.preauth )
@@ -2762,7 +2762,7 @@ tANI_BOOLEAN csrProcessBSSDescForBKIDList(tpAniSirGlobal pMac, tSirBssDescriptio
if( CSR_IS_SESSION_VALID( pMac, sessionId) )
{
pSession = CSR_GET_SESSION( pMac, sessionId );
- if( csrIsConnStateConnectedInfra( pMac, sessionId ) &&
+ if( csrIsConnStateConnectedInfra( pMac, sessionId ) &&
eCSR_AUTH_TYPE_WAPI_WAI_CERTIFICATE == pSession->connectedProfile.AuthType)
{
if(csrMatchBSSToConnectProfile(pMac, &pSession->connectedProfile,pBssDesc, pIesLocal))
@@ -2848,11 +2848,11 @@ static void csrMoveTempScanResultsToMainList( tpAniSirGlobal pMac, tANI_U8 reaso
if ( !fDupBss )
{
//Found a new BSS
- sessionId = csrProcessBSSDescForPMKIDList(pMac,
+ sessionId = csrProcessBSSDescForPMKIDList(pMac,
&pBssDescription->Result.BssDescriptor, pIesLocal);
if( CSR_SESSION_ID_INVALID != sessionId)
{
- csrRoamCallCallback(pMac, sessionId, NULL, 0,
+ csrRoamCallCallback(pMac, sessionId, NULL, 0,
eCSR_ROAM_SCAN_FOUND_NEW_BSS, eCSR_ROAM_RESULT_NONE);
}
}
@@ -2861,11 +2861,11 @@ static void csrMoveTempScanResultsToMainList( tpAniSirGlobal pMac, tANI_U8 reaso
//Check if the new one has SSID it it, if not, use the older SSID if it exists.
if( (0 == pBssDescription->Result.ssId.length) && tmpSsid.length )
{
- //New BSS has a hidden SSID and old one has the SSID. Keep the SSID only
+ //New BSS has a hidden SSID and old one has the SSID. Keep the SSID only
//if diff of saved SSID time and current time is less than 1 min to avoid
//side effect of saving SSID with old one is that if AP changes its SSID while remain
- //hidden, we may never see it and also to address the requirement of
- //When we remove hidden ssid from the profile i.e., forget the SSID via
+ //hidden, we may never see it and also to address the requirement of
+ //When we remove hidden ssid from the profile i.e., forget the SSID via
// GUI that SSID shouldn't see in the profile
if( (vos_timer_get_system_time() - timer) <= HIDDEN_TIMER)
{
@@ -2885,14 +2885,14 @@ static void csrMoveTempScanResultsToMainList( tpAniSirGlobal pMac, tANI_U8 reaso
{
cand_Bss_rssi = pBssDescription->Result.BssDescriptor.rssi;
// learn country information
- csrLearnCountryInformation( pMac, &pBssDescription->Result.BssDescriptor,
+ csrLearnCountryInformation( pMac, &pBssDescription->Result.BssDescriptor,
pIesLocal, eANI_BOOLEAN_FALSE );
}
}
}
-
+
// append to main list
csrScanAddResult(pMac, pBssDescription, pIesLocal);
if( (pBssDescription->Result.pvIes == NULL) && pIesLocal )
@@ -2904,7 +2904,7 @@ static void csrMoveTempScanResultsToMainList( tpAniSirGlobal pMac, tANI_U8 reaso
//Tush: If we can find the current 11d info in any of the scan results, or
// a good enough AP with the 11d info from the scan results then no need to
// get into ambiguous state
- if(pMac->scan.fAmbiguous11dInfoFound)
+ if(pMac->scan.fAmbiguous11dInfoFound)
{
if((pMac->scan.fCurrent11dInfoMatch) || (cand_Bss_rssi != -128))
{
@@ -2954,8 +2954,8 @@ static tCsrScanResult *csrScanSaveBssDescription( tpAniSirGlobal pMac, tSirBssDe
}
// Append a Bss Description...
-tCsrScanResult *csrScanAppendBssDescription( tpAniSirGlobal pMac,
- tSirBssDescription *pSirBssDescription,
+tCsrScanResult *csrScanAppendBssDescription( tpAniSirGlobal pMac,
+ tSirBssDescription *pSirBssDescription,
tDot11fBeaconIEs *pIes )
{
tCsrScanResult *pCsrBssDescription = NULL;
@@ -2978,7 +2978,7 @@ tCsrScanResult *csrScanAppendBssDescription( tpAniSirGlobal pMac,
//When we remove hidden ssid from the profile i.e., forget the SSID via
// GUI that SSID shouldn't see in the profile
if((vos_timer_get_system_time()-timer) <= HIDDEN_TIMER)
- {
+ {
pCsrBssDescription->Result.ssId = tmpSsid;
pCsrBssDescription->Result.timer = timer;
}
@@ -2996,7 +2996,7 @@ void csrPurgeChannelPower( tpAniSirGlobal pMac, tDblLinkList *pChannelList )
tCsrChannelPowerInfo *pChannelSet;
tListElem *pEntry;
- csrLLLock(pChannelList);
+ csrLLLock(pChannelList);
// Remove the channel sets from the learned list and put them in the free list
while( ( pEntry = csrLLRemoveHead( pChannelList, LL_ACCESS_NOLOCK ) ) != NULL)
{
@@ -3012,7 +3012,7 @@ void csrPurgeChannelPower( tpAniSirGlobal pMac, tDblLinkList *pChannelList )
/*
- * Save the channelList into the ultimate storage as the final stage of channel
+ * Save the channelList into the ultimate storage as the final stage of channel
* Input: pCountryInfo -- the country code (e.g. "USI"), channel list, and power limit are all stored inside this data structure
*/
eHalStatus csrSaveToChannelPower2G_5G( tpAniSirGlobal pMac, tANI_U32 tableSize, tSirMacChanInfo *channelTable )
@@ -3139,7 +3139,7 @@ void csrApplyChannelPowerCountryInfo( tpAniSirGlobal pMac, tCsrChannel *pChannel
}
}
tempNumChannels = CSR_MIN(pChannelList->numChannels, WNI_CFG_VALID_CHANNEL_LIST_LEN);
- /* If user doesn't want to scan the DFS channels lets trim them from
+ /* If user doesn't want to scan the DFS channels lets trim them from
the valid channel list*/
for(i=0; i < tempNumChannels; i++)
{
@@ -3192,7 +3192,7 @@ void csrApplyChannelPowerCountryInfo( tpAniSirGlobal pMac, tCsrChannel *pChannel
{
smsLog( pMac, LOGE, FL(" 11D channel list is empty"));
}
- csrApplyPower2Current( pMac ); // Store the channel+power info in the global place: Cfg
+ csrApplyPower2Current( pMac ); // Store the channel+power info in the global place: Cfg
csrSetCfgCountryCode(pMac, countryCode);
}
@@ -3440,8 +3440,8 @@ void csrApplyCountryInformation( tpAniSirGlobal pMac, tANI_BOOLEAN fForce )
#endif //#ifdef FEATURE_WLAN_DIAG_SUPPORT_CSR
if(pMac->scan.domainIdCurrent != domainId)
{
- /* Regulatory Domain Changed, Purge Only scan result
- * which does not have channel number belong to 11d
+ /* Regulatory Domain Changed, Purge Only scan result
+ * which does not have channel number belong to 11d
* channel list
* */
smsLog(pMac, LOGW, FL("Domain Changed Old %d, new %d"),
@@ -3570,7 +3570,7 @@ void csrSetOppositeBandChannelInfo( tpAniSirGlobal pMac )
{
tANI_BOOLEAN fPopulate5GBand = FALSE;
- do
+ do
{
// if this is not a dual band product, then we don't need to set the opposite
// band info. We only work in one band so no need to look in the other band.
@@ -3648,7 +3648,7 @@ tANI_U8 csrGetChannelListFromChannelSet( tpAniSirGlobal pMac, tANI_U8 *pChannelL
//bSize -- specify the buffer size of pChannelList
-void csrConstructCurrentValidChannelList( tpAniSirGlobal pMac, tDblLinkList *pChannelSetList,
+void csrConstructCurrentValidChannelList( tpAniSirGlobal pMac, tDblLinkList *pChannelSetList,
tANI_U8 *pChannelList, tANI_U8 bSize, tANI_U8 *pNumChannels )
{
tListElem *pEntry;
@@ -3730,7 +3730,7 @@ tANI_BOOLEAN csrLearnCountryInformation( tpAniSirGlobal pMac, tSirBssDescription
if(fMatch)
{
smsLog(pMac, LOGW, " Matching roam profile BSSID %02X-%02X-%02X-%02X-%02X-%02X causing ambiguous domain info",
- pSirBssDesc->bssId[0], pSirBssDesc->bssId[1], pSirBssDesc->bssId[2],
+ pSirBssDesc->bssId[0], pSirBssDesc->bssId[1], pSirBssDesc->bssId[2],
pSirBssDesc->bssId[3], pSirBssDesc->bssId[4], pSirBssDesc->bssId[5]);
pMac->scan.fAmbiguous11dInfoFound = eANI_BOOLEAN_TRUE;
break;
@@ -3739,7 +3739,7 @@ tANI_BOOLEAN csrLearnCountryInformation( tpAniSirGlobal pMac, tSirBssDescription
}
else if( csrIsConnStateConnected(pMac, i))
{
- //Reach here only when the currention is base on no profile.
+ //Reach here only when the currention is base on no profile.
//User doesn't give profile and just connect to anything.
if(csrMatchBSSToConnectProfile(pMac, &pSession->connectedProfile, pSirBssDesc, pIesLocal))
{
@@ -3748,7 +3748,7 @@ tANI_BOOLEAN csrLearnCountryInformation( tpAniSirGlobal pMac, tSirBssDescription
pSirBssDesc->bssId[3], pSirBssDesc->bssId[4], pSirBssDesc->bssId[5]);
//Tush
pMac->scan.fAmbiguous11dInfoFound = eANI_BOOLEAN_TRUE;
- if(csrIsBssidMatch(pMac, (tCsrBssid *)&pSirBssDesc->bssId,
+ if(csrIsBssidMatch(pMac, (tCsrBssid *)&pSirBssDesc->bssId,
&pSession->connectedProfile.bssid))
{
//AP changed the 11d info on the fly, modify cfg
@@ -3760,17 +3760,17 @@ tANI_BOOLEAN csrLearnCountryInformation( tpAniSirGlobal pMac, tSirBssDescription
}
} //valid session
} //for
- if ( i == CSR_ROAM_SESSION_MAX )
+ if ( i == CSR_ROAM_SESSION_MAX )
{
//Check whether we can use this country's 11d information
if( !pMac->roam.configParam.fEnforceDefaultDomain )
{
pMac->scan.fAmbiguous11dInfoFound = eANI_BOOLEAN_TRUE;
}
- else
+ else
{
VOS_ASSERT( pMac->scan.domainIdCurrent == pMac->scan.domainIdDefault );
- if( HAL_STATUS_SUCCESS(csrGetRegulatoryDomainForCountry(
+ if( HAL_STATUS_SUCCESS(csrGetRegulatoryDomainForCountry(
pMac, pIesLocal->Country.country, &domainId )) &&
( domainId == pMac->scan.domainIdCurrent ) )
{
@@ -3832,7 +3832,7 @@ tANI_BOOLEAN csrLearnCountryInformation( tpAniSirGlobal pMac, tSirBssDescription
csrSetOppositeBandChannelInfo( pMac );
bMaxNumChn = WNI_CFG_VALID_CHANNEL_LIST_LEN;
// construct 2GHz channel list first
- csrConstructCurrentValidChannelList( pMac, &pMac->scan.channelPowerInfoList24, pMac->scan.channels11d.channelList,
+ csrConstructCurrentValidChannelList( pMac, &pMac->scan.channelPowerInfoList24, pMac->scan.channels11d.channelList,
bMaxNumChn, &Num2GChannels );
// construct 5GHz channel list now
if(bMaxNumChn > Num2GChannels)
@@ -3846,7 +3846,7 @@ tANI_BOOLEAN csrLearnCountryInformation( tpAniSirGlobal pMac, tSirBssDescription
fRet = eANI_BOOLEAN_TRUE;
} while( 0 );
-
+
if( !pIes && pIesLocal )
{
//locally allocated
@@ -3964,7 +3964,7 @@ tANI_BOOLEAN csrGetRemainingChannelsFor11dScan( tpAniSirGlobal pMac, tANI_U8 *pC
eCsrScanCompleteNextCommand csrScanGetNextCommandState( tpAniSirGlobal pMac, tSmeCmd *pCommand, tANI_BOOLEAN fSuccess )
{
eCsrScanCompleteNextCommand NextCommand = eCsrNextScanNothing;
-
+
switch( pCommand->u.scanCmd.reason )
{
case eCsrScan11d1:
@@ -3972,7 +3972,7 @@ eCsrScanCompleteNextCommand csrScanGetNextCommandState( tpAniSirGlobal pMac, tSm
break;
case eCsrScan11d2:
NextCommand = (fSuccess) ? eCsrNext11dScan2Success : eCsrNext11dScan2Failure;
- break;
+ break;
case eCsrScan11dDone:
NextCommand = eCsrNext11dScanComplete;
break;
@@ -4006,7 +4006,7 @@ eCsrScanCompleteNextCommand csrScanGetNextCommandState( tpAniSirGlobal pMac, tSm
tANI_BOOLEAN csrHandleScan11d1Failure(tpAniSirGlobal pMac, tSmeCmd *pCommand)
{
tANI_BOOLEAN fRet = eANI_BOOLEAN_TRUE;
-
+
//Apply back the default setting and passively scan one more time.
csrResetCountryInformation(pMac, eANI_BOOLEAN_FALSE, eANI_BOOLEAN_TRUE);
pCommand->u.scanCmd.reason = eCsrScan11d2;
@@ -4014,7 +4014,7 @@ tANI_BOOLEAN csrHandleScan11d1Failure(tpAniSirGlobal pMac, tSmeCmd *pCommand)
{
fRet = eANI_BOOLEAN_FALSE;
}
-
+
return (fRet);
}
@@ -4024,7 +4024,7 @@ tANI_BOOLEAN csrHandleScan11dSuccess(tpAniSirGlobal pMac, tSmeCmd *pCommand)
tANI_BOOLEAN fRet = eANI_BOOLEAN_TRUE;
tANI_U8 *pChannels;
tANI_U8 cChannels;
-
+
if(HAL_STATUS_SUCCESS(palAllocateMemory(pMac->hHdd, (void **)&pChannels, WNI_CFG_VALID_CHANNEL_LIST_LEN)))
{
palZeroMemory(pMac->hHdd, pChannels, WNI_CFG_VALID_CHANNEL_LIST_LEN);
@@ -4033,7 +4033,7 @@ tANI_BOOLEAN csrHandleScan11dSuccess(tpAniSirGlobal pMac, tSmeCmd *pCommand)
pCommand->u.scanCmd.reason = eCsrScan11dDone;
if(pCommand->u.scanCmd.u.scanRequest.ChannelInfo.ChannelList)
{
- palFreeMemory(pMac->hHdd, pCommand->u.scanCmd.u.scanRequest.ChannelInfo.ChannelList);
+ palFreeMemory(pMac->hHdd, pCommand->u.scanCmd.u.scanRequest.ChannelInfo.ChannelList);
pCommand->u.scanCmd.u.scanRequest.ChannelInfo.ChannelList = NULL;
}
if(HAL_STATUS_SUCCESS(palAllocateMemory(pMac->hHdd, (void **)&pCommand->u.scanCmd.u.scanRequest.ChannelInfo.ChannelList, cChannels)))
@@ -4051,7 +4051,7 @@ tANI_BOOLEAN csrHandleScan11dSuccess(tpAniSirGlobal pMac, tSmeCmd *pCommand)
}
palFreeMemory(pMac->hHdd, pChannels);
}
-
+
return (fRet);
}
@@ -4076,7 +4076,7 @@ tANI_BOOLEAN csrScanComplete( tpAniSirGlobal pMac, tSirSmeScanRsp *pScanRsp )
// If the head of the queue is Active and it is a SCAN command, remove
// and put this on the Free queue.
if ( eSmeCommandScan == pCommand->command )
- {
+ {
tANI_U32 sessionId = pCommand->sessionId;
if(eSIR_SME_SUCCESS != pScanRsp->statusCode)
@@ -4102,7 +4102,7 @@ tANI_BOOLEAN csrScanComplete( tpAniSirGlobal pMac, tSirSmeScanRsp *pScanRsp )
WLAN_VOS_DIAG_LOG_ALLOC(pScanLog, vos_log_scan_pkt_type, LOG_WLAN_SCAN_C);
if(pScanLog)
{
- if(eCsrScanBgScan == pCommand->u.scanCmd.reason ||
+ if(eCsrScanBgScan == pCommand->u.scanCmd.reason ||
eCsrScanProbeBss == pCommand->u.scanCmd.reason ||
eCsrScanSetBGScanParam == pCommand->u.scanCmd.reason)
{
@@ -4135,7 +4135,7 @@ tANI_BOOLEAN csrScanComplete( tpAniSirGlobal pMac, tSirSmeScanRsp *pScanRsp )
palCopyMemory(pMac->hHdd, pScanLog->bssid[n], pScanResult->BssDescriptor.bssId, 6);
if(pIes && pIes->SSID.present && VOS_LOG_MAX_SSID_SIZE >= pIes->SSID.num_ssid)
{
- palCopyMemory(pMac->hHdd, pScanLog->ssid[n],
+ palCopyMemory(pMac->hHdd, pScanLog->ssid[n],
pIes->SSID.ssid, pIes->SSID.num_ssid);
}
palFreeMemory(pMac->hHdd, pIes);
@@ -4176,7 +4176,7 @@ tANI_BOOLEAN csrScanComplete( tpAniSirGlobal pMac, tSirSmeScanRsp *pScanRsp )
if(fRemoveCommand)
{
NextCommand = eCsrNext11dScanComplete;
- }
+ }
break;
case eCsrNextLostLinkScan1Success:
if(!HAL_STATUS_SUCCESS(csrIssueRoamAfterLostlinkScan(pMac, sessionId, eCsrLostLink1)))
@@ -4204,7 +4204,7 @@ tANI_BOOLEAN csrScanComplete( tpAniSirGlobal pMac, tSirSmeScanRsp *pScanRsp )
break;
case eCsrNextLostLinkScan3Failed:
csrScanHandleFailedLostlink3(pMac, sessionId);
- break;
+ break;
case eCsrNexteScanForSsidSuccess:
csrScanHandleSearchForSSID(pMac, pCommand);
break;
@@ -4233,13 +4233,13 @@ tANI_BOOLEAN csrScanComplete( tpAniSirGlobal pMac, tSirSmeScanRsp *pScanRsp )
smsLog( pMac, LOGW, FL("Scan Completion called but NO commands are ACTIVE ..."));
fRemoveCommand = eANI_BOOLEAN_FALSE;
}
-
+
return( fRemoveCommand );
}
-static void csrScanRemoveDupBssDescriptionFromInterimList( tpAniSirGlobal pMac,
+static void csrScanRemoveDupBssDescriptionFromInterimList( tpAniSirGlobal pMac,
tSirBssDescription *pSirBssDescr,
tDot11fBeaconIEs *pIes)
{
@@ -4250,14 +4250,14 @@ static void csrScanRemoveDupBssDescriptionFromInterimList( tpAniSirGlobal pMac,
// matches the BssID of the BssDescription passed in, then these must be duplicate scan
// results for this Bss. In that case, remove the 'old' Bss description from the linked list.
pEntry = csrLLPeekHead( &pMac->scan.tempScanResults, LL_ACCESS_LOCK );
- while( pEntry )
+ while( pEntry )
{
pCsrBssDescription = GET_BASE_ADDR( pEntry, tCsrScanResult, Link );
// we have a duplicate scan results only when BSSID, SSID, Channel and NetworkType
// matches
- if ( csrIsDuplicateBssDescription( pMac, &pCsrBssDescription->Result.BssDescriptor,
+ if ( csrIsDuplicateBssDescription( pMac, &pCsrBssDescription->Result.BssDescriptor,
pSirBssDescr, pIes ) )
{
pSirBssDescr->rssi = (tANI_S8)( (((tANI_S32)pSirBssDescr->rssi * CSR_SCAN_RESULT_RSSI_WEIGHT ) +
@@ -4270,7 +4270,7 @@ static void csrScanRemoveDupBssDescriptionFromInterimList( tpAniSirGlobal pMac,
// we need to free the memory associated with this node
csrFreeScanResultEntry( pMac, pCsrBssDescription );
}
-
+
// If we found a match, we can stop looking through the list.
break;
}
@@ -4283,7 +4283,7 @@ static void csrScanRemoveDupBssDescriptionFromInterimList( tpAniSirGlobal pMac,
//Caller allocated memory pfNewBssForConn to return whether new candidate for
//current connection is found. Cannot be NULL
-tCsrScanResult *csrScanSaveBssDescriptionToInterimList( tpAniSirGlobal pMac,
+tCsrScanResult *csrScanSaveBssDescriptionToInterimList( tpAniSirGlobal pMac,
tSirBssDescription *pBSSDescription,
tDot11fBeaconIEs *pIes)
{
@@ -4291,7 +4291,7 @@ tCsrScanResult *csrScanSaveBssDescriptionToInterimList( tpAniSirGlobal pMac,
tANI_U32 cbBSSDesc;
tANI_U32 cbAllocated;
eHalStatus halStatus;
-
+
// figure out how big the BSS description is (the BSSDesc->length does NOT
// include the size of the length field itself).
cbBSSDesc = pBSSDescription->length + sizeof( pBSSDescription->length );
@@ -4316,7 +4316,7 @@ tCsrScanResult *csrScanSaveBssDescriptionToInterimList( tpAniSirGlobal pMac,
}
pCsrBssDescription->Result.ssId.length = len;
pCsrBssDescription->Result.timer = vos_timer_get_system_time();
- palCopyMemory(pMac->hHdd, pCsrBssDescription->Result.ssId.ssId,
+ palCopyMemory(pMac->hHdd, pCsrBssDescription->Result.ssId.ssId,
pIes->SSID.ssid, len );
}
csrLLInsertTail( &pMac->scan.tempScanResults, &pCsrBssDescription->Link, LL_ACCESS_LOCK );
@@ -4326,9 +4326,9 @@ tCsrScanResult *csrScanSaveBssDescriptionToInterimList( tpAniSirGlobal pMac,
}
-
-tANI_BOOLEAN csrIsDuplicateBssDescription( tpAniSirGlobal pMac, tSirBssDescription *pSirBssDesc1,
+
+tANI_BOOLEAN csrIsDuplicateBssDescription( tpAniSirGlobal pMac, tSirBssDescription *pSirBssDesc1,
tSirBssDescription *pSirBssDesc2, tDot11fBeaconIEs *pIes2 )
{
tANI_BOOLEAN fMatch = FALSE;
@@ -4340,7 +4340,7 @@ tANI_BOOLEAN csrIsDuplicateBssDescription( tpAniSirGlobal pMac, tSirBssDescripti
pCap2 = (tSirMacCapabilityInfo *)&pSirBssDesc2->capabilityInfo;
if(pCap1->ess == pCap2->ess)
{
- if (pCap1->ess &&
+ if (pCap1->ess &&
csrIsMacAddressEqual( pMac, (tCsrBssid *)pSirBssDesc1->bssId, (tCsrBssid *)pSirBssDesc2->bssId)&&
(pSirBssDesc1->channelId == pSirBssDesc2->channelId))
{
@@ -4361,9 +4361,9 @@ tANI_BOOLEAN csrIsDuplicateBssDescription( tpAniSirGlobal pMac, tSirBssDescripti
}
if(pIes1->SSID.present && pIesTemp->SSID.present)
{
- fMatch = csrIsSsidMatch(pMac, pIes1->SSID.ssid, pIes1->SSID.num_ssid,
+ fMatch = csrIsSsidMatch(pMac, pIes1->SSID.ssid, pIes1->SSID.num_ssid,
pIesTemp->SSID.ssid, pIesTemp->SSID.num_ssid, eANI_BOOLEAN_TRUE);
- }
+ }
}while(0);
}
@@ -4386,13 +4386,13 @@ tANI_BOOLEAN csrIsDuplicateBssDescription( tpAniSirGlobal pMac, tSirBssDescripti
//Same channel cannot have same SSID for different IBSS
if(pIes1->SSID.present && pIesTemp->SSID.present)
{
- fMatch = csrIsSsidMatch(pMac, pIes1->SSID.ssid, pIes1->SSID.num_ssid,
+ fMatch = csrIsSsidMatch(pMac, pIes1->SSID.ssid, pIes1->SSID.num_ssid,
pIesTemp->SSID.ssid, pIesTemp->SSID.num_ssid, eANI_BOOLEAN_TRUE);
}
}while(0);
}
/* In case of P2P devices, ess and ibss will be set to zero */
- else if (!pCap1->ess &&
+ else if (!pCap1->ess &&
csrIsMacAddressEqual( pMac, (tCsrBssid *)pSirBssDesc1->bssId, (tCsrBssid *)pSirBssDesc2->bssId))
{
fMatch = TRUE;
@@ -4403,7 +4403,7 @@ tANI_BOOLEAN csrIsDuplicateBssDescription( tpAniSirGlobal pMac, tSirBssDescripti
{
palFreeMemory(pMac->hHdd, pIes1);
}
-
+
if( (NULL == pIes2) && pIesTemp )
{
//locally allocated
@@ -4421,7 +4421,7 @@ tANI_BOOLEAN csrIsNetworkTypeEqual( tSirBssDescription *pSirBssDesc1, tSirBssDes
//to check whether the BSS matches the dot11Mode
-static tANI_BOOLEAN csrScanIsBssAllowed(tpAniSirGlobal pMac, tSirBssDescription *pBssDesc,
+static tANI_BOOLEAN csrScanIsBssAllowed(tpAniSirGlobal pMac, tSirBssDescription *pBssDesc,
tDot11fBeaconIEs *pIes)
{
tANI_BOOLEAN fAllowed = eANI_BOOLEAN_FALSE;
@@ -4475,8 +4475,8 @@ static tANI_BOOLEAN csrScanIsBssAllowed(tpAniSirGlobal pMac, tSirBssDescription
//Return pIes to caller for future use when returning TRUE.
-static tANI_BOOLEAN csrScanValidateScanResult( tpAniSirGlobal pMac, tANI_U8 *pChannels,
- tANI_U8 numChn, tSirBssDescription *pBssDesc,
+static tANI_BOOLEAN csrScanValidateScanResult( tpAniSirGlobal pMac, tANI_U8 *pChannels,
+ tANI_U8 numChn, tSirBssDescription *pBssDesc,
tDot11fBeaconIEs **ppIes )
{
tANI_BOOLEAN fValidChannel = FALSE;
@@ -4486,11 +4486,11 @@ static tANI_BOOLEAN csrScanValidateScanResult( tpAniSirGlobal pMac, tANI_U8 *pCh
for( index = 0; index < numChn; index++ )
{
// This check relies on the fact that a single BSS description is returned in each
- // ScanRsp call, which is the way LIM implemented the scan req/rsp funtions. We changed
- // to this model when we ran with a large number of APs. If this were to change, then
- // this check would have to mess with removing the bssDescription from somewhere in an
+ // ScanRsp call, which is the way LIM implemented the scan req/rsp funtions. We changed
+ // to this model when we ran with a large number of APs. If this were to change, then
+ // this check would have to mess with removing the bssDescription from somewhere in an
// arbitrary index in the bssDescription array.
- if ( pChannels[ index ] == pBssDesc->channelId )
+ if ( pChannels[ index ] == pBssDesc->channelId )
{
fValidChannel = TRUE;
break;
@@ -4517,12 +4517,12 @@ static tANI_BOOLEAN csrScanValidateScanResult( tpAniSirGlobal pMac, tANI_U8 *pCh
}
}
- return( fValidChannel );
+ return( fValidChannel );
}
//Return whether last scan result is received
-static tANI_BOOLEAN csrScanProcessScanResults( tpAniSirGlobal pMac, tSmeCmd *pCommand,
+static tANI_BOOLEAN csrScanProcessScanResults( tpAniSirGlobal pMac, tSmeCmd *pCommand,
tSirSmeScanRsp *pScanRsp, tANI_BOOLEAN *pfRemoveCommand )
{
tANI_BOOLEAN fRet = eANI_BOOLEAN_FALSE, fRemoveCommand = eANI_BOOLEAN_FALSE;
@@ -4530,7 +4530,7 @@ static tANI_BOOLEAN csrScanProcessScanResults( tpAniSirGlobal pMac, tSmeCmd *pCo
tANI_U32 cbParsed;
tSirBssDescription *pSirBssDescription;
tANI_U32 cbBssDesc;
- tANI_U32 cbScanResult = GET_FIELD_OFFSET( tSirSmeScanRsp, bssDescription )
+ tANI_U32 cbScanResult = GET_FIELD_OFFSET( tSirSmeScanRsp, bssDescription )
+ sizeof(tSirBssDescription); //We need at least one CB
// don't consider the scan rsp to be valid if the status code is Scan Failure. Scan Failure
@@ -4539,7 +4539,7 @@ static tANI_BOOLEAN csrScanProcessScanResults( tpAniSirGlobal pMac, tSmeCmd *pCo
// BssDescriptions....
do
{
- if ( ( cbScanResult <= pScanRsp->length ) &&
+ if ( ( cbScanResult <= pScanRsp->length ) &&
(( eSIR_SME_SUCCESS == pScanRsp->statusCode ) ||
( eSIR_SME_MORE_SCAN_RESULTS_FOLLOW == pScanRsp->statusCode ) ) )
{
@@ -4575,19 +4575,19 @@ static tANI_BOOLEAN csrScanProcessScanResults( tpAniSirGlobal pMac, tSmeCmd *pCo
// let's drop the scan result.
//
// The other situation is where the scan request is for a scan on a particular channel set
- // and the scan result is from a
-
+ // and the scan result is from a
+
// if the NumChannels is 0, then we are supposed to be scanning all channels. Use the full channel
// list as the 'valid' channel list. Otherwise, use the specific channel list in the scan parms
// as the valid channels.
- if ( 0 == cChannels )
+ if ( 0 == cChannels )
{
tANI_U32 len = sizeof(pMac->roam.validChannelList);
-
+
if (HAL_STATUS_SUCCESS(csrGetCfgValidChannels(pMac, (tANI_U8 *)pMac->roam.validChannelList, &len)))
{
pChannelList = pMac->roam.validChannelList;
- cChannels = (tANI_U8)len;
+ cChannels = (tANI_U8)len;
}
else
{
@@ -4602,7 +4602,7 @@ static tANI_BOOLEAN csrScanProcessScanResults( tpAniSirGlobal pMac, tSmeCmd *pCo
pSirBssDescription = pScanRsp->bssDescription;
while( cbParsed < pScanRsp->length )
{
- if ( csrScanValidateScanResult( pMac, pChannelList, cChannels, pSirBssDescription, &pIes ) )
+ if ( csrScanValidateScanResult( pMac, pChannelList, cChannels, pSirBssDescription, &pIes ) )
{
csrScanRemoveDupBssDescriptionFromInterimList(pMac, pSirBssDescription, pIes);
csrScanSaveBssDescriptionToInterimList( pMac, pSirBssDescription, pIes );
@@ -4710,7 +4710,7 @@ static tANI_BOOLEAN csrScanProcessScanResults( tpAniSirGlobal pMac, tSmeCmd *pCo
tANI_BOOLEAN csrScanIsWildCardScan( tpAniSirGlobal pMac, tSmeCmd *pCommand )
{
tANI_U8 bssid[WNI_CFG_BSSID_LEN] = {0, 0, 0, 0, 0, 0};
- tANI_BOOLEAN f = palEqualMemory( pMac->hHdd, pCommand->u.scanCmd.u.scanRequest.bssid,
+ tANI_BOOLEAN f = palEqualMemory( pMac->hHdd, pCommand->u.scanCmd.u.scanRequest.bssid,
bssid, sizeof(tCsrBssid) );
//It is not a wild card scan if the bssid is not broadcast and the number of SSID is 1.
@@ -4834,7 +4834,7 @@ eHalStatus csrScanSmeScanResponse( tpAniSirGlobal pMac, void *pMsgBuf )
case eCsrScanGetScanChnInfo:
pScanChnInfo = (tSmeGetScanChnRsp *)pMsgBuf;
/*
- * status code not available in tSmeGetScanChnRsp, so
+ * status code not available in tSmeGetScanChnRsp, so
* by default considereing it to be success
*/
scanStatus = eSIR_SME_SUCCESS;
@@ -4903,7 +4903,7 @@ eHalStatus csrScanSmeScanResponse( tpAniSirGlobal pMac, void *pMsgBuf )
smsLog( pMac, LOGW, "CSR: Scan Completion called but NO commands are ACTIVE ..." );
status = eHAL_STATUS_FAILURE;
}
-
+
return (status);
}
@@ -4916,7 +4916,7 @@ tCsrScanResultInfo *csrScanResultGetFirst(tpAniSirGlobal pMac, tScanResultHandle
tCsrScanResult *pResult;
tCsrScanResultInfo *pRet = NULL;
tScanResultList *pResultList = (tScanResultList *)hScanResult;
-
+
if(pResultList)
{
csrLLLock(&pResultList->List);
@@ -4929,7 +4929,7 @@ tCsrScanResultInfo *csrScanResultGetFirst(tpAniSirGlobal pMac, tScanResultHandle
pResultList->pCurEntry = pEntry;
csrLLUnlock(&pResultList->List);
}
-
+
return pRet;
}
@@ -4940,7 +4940,7 @@ tCsrScanResultInfo *csrScanResultGetNext(tpAniSirGlobal pMac, tScanResultHandle
tCsrScanResult *pResult = NULL;
tCsrScanResultInfo *pRet = NULL;
tScanResultList *pResultList = (tScanResultList *)hScanResult;
-
+
if(pResultList)
{
csrLLLock(&pResultList->List);
@@ -4960,7 +4960,7 @@ tCsrScanResultInfo *csrScanResultGetNext(tpAniSirGlobal pMac, tScanResultHandle
pResultList->pCurEntry = pEntry;
csrLLUnlock(&pResultList->List);
}
-
+
return pRet;
}
@@ -4972,7 +4972,7 @@ eHalStatus csrMoveBssToHeadFromBSSID(tpAniSirGlobal pMac, tCsrBssid *bssid, tSca
tScanResultList *pResultList = (tScanResultList *)hScanResult;
tCsrScanResult *pResult = NULL;
tListElem *pEntry = NULL;
-
+
if(pResultList && bssid)
{
csrLLLock(&pResultList->List);
@@ -4991,7 +4991,7 @@ eHalStatus csrMoveBssToHeadFromBSSID(tpAniSirGlobal pMac, tCsrBssid *bssid, tSca
}
csrLLUnlock(&pResultList->List);
}
-
+
return (status);
}
@@ -5012,7 +5012,7 @@ tANI_BOOLEAN csrScanAgeOutBss(tpAniSirGlobal pMac, tCsrScanResult *pResult)
pSession = CSR_GET_SESSION( pMac, i );
//Not to remove the BSS we are connected to.
if(csrIsConnStateDisconnected(pMac, i) || (NULL == pSession->pConnectBssDesc) ||
- (!csrIsDuplicateBssDescription(pMac, &pResult->Result.BssDescriptor,
+ (!csrIsDuplicateBssDescription(pMac, &pResult->Result.BssDescriptor,
pSession->pConnectBssDesc, NULL))
)
{
@@ -5058,7 +5058,7 @@ eHalStatus csrScanAgeResults(tpAniSirGlobal pMac, tSmeGetScanChnRsp *pScanChnInf
{
pChnInfo = &pScanChnInfo->scanChn[i];
pEntry = csrLLPeekHead( &pMac->scan.scanResultList, LL_ACCESS_NOLOCK );
- while( pEntry )
+ while( pEntry )
{
tmpEntry = csrLLNext(&pMac->scan.scanResultList, pEntry, LL_ACCESS_NOLOCK);
pResult = GET_BASE_ADDR( pEntry, tCsrScanResult, Link );
@@ -5083,7 +5083,7 @@ eHalStatus csrScanAgeResults(tpAniSirGlobal pMac, tSmeGetScanChnRsp *pScanChnInf
}
-eHalStatus csrSendMBScanReq( tpAniSirGlobal pMac, tANI_U16 sessionId,
+eHalStatus csrSendMBScanReq( tpAniSirGlobal pMac, tANI_U16 sessionId,
tCsrScanRequest *pScanReq, tScanReqParam *pScanReqParam )
{
eHalStatus status = eHAL_STATUS_SUCCESS;
@@ -5097,7 +5097,7 @@ eHalStatus csrSendMBScanReq( tpAniSirGlobal pMac, tANI_U16 sessionId,
tANI_U8 selfMacAddr[WNI_CFG_BSSID_LEN];
tANI_U8 *pSelfMac = NULL;
- msgLen = (tANI_U16)(sizeof( tSirSmeScanReq ) - sizeof( pMsg->channelList.channelNumber ) +
+ msgLen = (tANI_U16)(sizeof( tSirSmeScanReq ) - sizeof( pMsg->channelList.channelNumber ) +
( sizeof( pMsg->channelList.channelNumber ) * pScanReq->ChannelInfo.numOfChannels )) +
( pScanReq->uIEFieldLen ) ;
@@ -5146,7 +5146,7 @@ eHalStatus csrSendMBScanReq( tpAniSirGlobal pMac, tANI_U16 sessionId,
tANI_U32 len = WNI_CFG_BSSID_LEN;
pSelfMac = selfMacAddr;
status = ccmCfgGetStr( pMac, WNI_CFG_STA_ID, pSelfMac, &len );
- if( !HAL_STATUS_SUCCESS( status ) ||
+ if( !HAL_STATUS_SUCCESS( status ) ||
( len < WNI_CFG_BSSID_LEN ) )
{
smsLog( pMac, LOGE, FL(" Can not get self MAC address from CFG status = %d"), status );
@@ -5166,12 +5166,12 @@ eHalStatus csrSendMBScanReq( tpAniSirGlobal pMac, tANI_U16 sessionId,
}
else
{
- palCopyMemory(pMac->hHdd, pMsg->bssId, pScanReq->bssid, WNI_CFG_BSSID_LEN);
+ palCopyMemory(pMac->hHdd, pMsg->bssId, pScanReq->bssid, WNI_CFG_BSSID_LEN);
}
minChnTime = pScanReq->minChnTime;
maxChnTime = pScanReq->maxChnTime;
- //Verify the scan type first, if the scan is active scan, we need to make sure we
+ //Verify the scan type first, if the scan is active scan, we need to make sure we
//are allowed to do so.
/* if 11d is enabled & we don't see any beacon around, scan type falls
back to passive. But in BT AMP STA mode we need to send out a
@@ -5183,7 +5183,7 @@ eHalStatus csrSendMBScanReq( tpAniSirGlobal pMac, tANI_U16 sessionId,
scanType = pMac->scan.curScanType;
if(eSIR_PASSIVE_SCAN == pMac->scan.curScanType)
{
- if(minChnTime < pMac->roam.configParam.nPassiveMinChnTime)
+ if(minChnTime < pMac->roam.configParam.nPassiveMinChnTime)
{
minChnTime = pMac->roam.configParam.nPassiveMinChnTime;
}
@@ -5232,28 +5232,28 @@ eHalStatus csrSendMBScanReq( tpAniSirGlobal pMac, tANI_U16 sessionId,
if(pScanReq->ChannelInfo.numOfChannels)
{
//Assuming the channelNumber is tANI_U8 (1 byte)
- status = palCopyMemory(pMac->hHdd, pMsg->channelList.channelNumber, pScanReq->ChannelInfo.ChannelList,
+ status = palCopyMemory(pMac->hHdd, pMsg->channelList.channelNumber, pScanReq->ChannelInfo.ChannelList,
pScanReq->ChannelInfo.numOfChannels);
}
pMsg->uIEFieldLen = (tANI_U16) pScanReq->uIEFieldLen;
- pMsg->uIEFieldOffset = (tANI_U16)(sizeof( tSirSmeScanReq ) - sizeof( pMsg->channelList.channelNumber ) +
+ pMsg->uIEFieldOffset = (tANI_U16)(sizeof( tSirSmeScanReq ) - sizeof( pMsg->channelList.channelNumber ) +
( sizeof( pMsg->channelList.channelNumber ) * pScanReq->ChannelInfo.numOfChannels )) ;
- if(pScanReq->uIEFieldLen != 0)
+ if(pScanReq->uIEFieldLen != 0)
{
palCopyMemory(pMac->hHdd, (tANI_U8 *)pMsg+pMsg->uIEFieldOffset,
pScanReq->pIEField, pScanReq->uIEFieldLen );
}
pMsg->p2pSearch = pScanReq->p2pSearch;
- if (pScanReq->requestType == eCSR_SCAN_HO_BG_SCAN)
+ if (pScanReq->requestType == eCSR_SCAN_HO_BG_SCAN)
{
pMsg->backgroundScanMode = eSIR_ROAMING_SCAN;
- }
+ }
}while(0);
smsLog(pMac, LOG1, FL("domainIdCurrent %d scanType %d bssType %d requestType %d numChannels %d "),
- pMac->scan.domainIdCurrent, pMsg->scanType, pMsg->bssType,
+ pMac->scan.domainIdCurrent, pMsg->scanType, pMsg->bssType,
pScanReq->requestType, pMsg->channelList.numChannels);
for(i = 0; i < pMsg->channelList.numChannels; i++)
@@ -5265,7 +5265,7 @@ eHalStatus csrSendMBScanReq( tpAniSirGlobal pMac, tANI_U16 sessionId,
{
status = palSendMBMessage(pMac->hHdd, pMsg);
}
- else
+ else
{
smsLog( pMac, LOGE, FL(" failed to send down scan req with status = %d"), status );
palFreeMemory(pMac->hHdd, pMsg);
@@ -5304,7 +5304,7 @@ eHalStatus csrSendMBScanResultReq( tpAniSirGlobal pMac, tANI_U32 sessionId, tSca
smsLog( pMac, LOGE, FL(" failed to send down scan req with status = %d\n"), status );
}
- }
+ }
return( status );
}
@@ -5315,10 +5315,15 @@ eHalStatus csrScanChannels( tpAniSirGlobal pMac, tSmeCmd *pCommand )
{
eHalStatus status = eHAL_STATUS_FAILURE;
tScanReqParam scanReq;
-
+
do
- {
- scanReq.freshScan = CSR_SME_SCAN_FLAGS_DELETE_CACHE | TRUE;
+ {
+ /*
+ * Don't delete cached results. Rome rssi based scan candidates
+ * may land up in scan cache instead of LFR cache.
+ * They will be deleted upon query.
+ */
+ scanReq.freshScan = SIR_BG_SCAN_RETURN_FRESH_RESULTS;
scanReq.fUniqueResult = TRUE;
scanReq.hiddenSsid = SIR_SCAN_NO_HIDDEN_SSID;
if(eCsrScanForSsid == pCommand->u.scanCmd.reason)
@@ -5343,14 +5348,14 @@ eHalStatus csrScanChannels( tpAniSirGlobal pMac, tSmeCmd *pCommand )
WLAN_VOS_DIAG_LOG_ALLOC(pScanLog, vos_log_scan_pkt_type, LOG_WLAN_SCAN_C);
if(pScanLog)
{
- if(eCsrScanBgScan == pCommand->u.scanCmd.reason ||
+ if(eCsrScanBgScan == pCommand->u.scanCmd.reason ||
eCsrScanProbeBss == pCommand->u.scanCmd.reason)
{
pScanLog->eventId = WLAN_SCAN_EVENT_HO_SCAN_REQ;
}
else
{
- if( (eSIR_PASSIVE_SCAN != pCommand->u.scanCmd.u.scanRequest.scanType) &&
+ if( (eSIR_PASSIVE_SCAN != pCommand->u.scanCmd.u.scanRequest.scanType) &&
(eSIR_PASSIVE_SCAN != pMac->scan.curScanType) )
{
pScanLog->eventId = WLAN_SCAN_EVENT_ACTIVE_SCAN_REQ;
@@ -5378,7 +5383,7 @@ eHalStatus csrScanChannels( tpAniSirGlobal pMac, tSmeCmd *pCommand )
status = csrSendMBScanReq(pMac, pCommand->sessionId,
&pCommand->u.scanCmd.u.scanRequest, &scanReq);
}while(0);
-
+
return( status );
}
@@ -5387,9 +5392,9 @@ eHalStatus csrScanRetrieveResult(tpAniSirGlobal pMac, tSmeCmd *pCommand)
{
eHalStatus status = eHAL_STATUS_FAILURE;
tScanReqParam scanReq;
-
+
do
- {
+ {
#ifdef WLAN_FEATURE_ROAM_SCAN_OFFLOAD
if (eCsrScanGetLfrResult == pCommand->u.scanCmd.reason)
{
@@ -5402,13 +5407,13 @@ eHalStatus csrScanRetrieveResult(tpAniSirGlobal pMac, tSmeCmd *pCommand)
#endif
{
//not a fresh scan
- scanReq.freshScan = CSR_SME_SCAN_FLAGS_DELETE_CACHE;
+ scanReq.freshScan = SIR_BG_SCAN_PURGE_RESUTLS;
scanReq.fUniqueResult = TRUE;
scanReq.bReturnAfter1stMatch = CSR_SCAN_RETURN_AFTER_ALL_CHANNELS;
}
status = csrSendMBScanResultReq(pMac, pCommand->sessionId, &scanReq);
}while(0);
-
+
return (status);
}
@@ -5522,13 +5527,13 @@ eHalStatus csrProcessScanCommand( tpAniSirGlobal pMac, tSmeCmd *pCommand )
default:
status = csrScanChannels(pMac, pCommand);
break;
- }
-
+ }
+
if(!HAL_STATUS_SUCCESS(status))
{
csrReleaseScanCommand(pMac, pCommand, eCSR_SCAN_FAILURE);
}
-
+
return (status);
}
@@ -5537,7 +5542,7 @@ eHalStatus csrScanSetBGScanparams(tpAniSirGlobal pMac, tCsrBGScanRequest *pScanR
{
eHalStatus status = eHAL_STATUS_SUCCESS;
tSmeCmd *pCommand = NULL;
-
+
if(pScanReq)
{
do
@@ -5566,7 +5571,7 @@ eHalStatus csrScanSetBGScanparams(tpAniSirGlobal pMac, tCsrBGScanRequest *pScanR
if(HAL_STATUS_SUCCESS(status))
{
palCopyMemory(pMac->hHdd, pCommand->u.scanCmd.u.bgScanRequest.ChannelInfo.ChannelList,
- pScanReq->ChannelInfo.ChannelList, pScanReq->ChannelInfo.numOfChannels);
+ pScanReq->ChannelInfo.ChannelList, pScanReq->ChannelInfo.numOfChannels);
}
else
{
@@ -5579,9 +5584,9 @@ eHalStatus csrScanSetBGScanparams(tpAniSirGlobal pMac, tCsrBGScanRequest *pScanR
//scan req for SSID
if(pScanReq->SSID.length)
{
- palCopyMemory(pMac->hHdd,
+ palCopyMemory(pMac->hHdd,
pCommand->u.scanCmd.u.bgScanRequest.SSID.ssId,
- pScanReq->SSID.ssId,
+ pScanReq->SSID.ssId,
pScanReq->SSID.length);
pCommand->u.scanCmd.u.bgScanRequest.SSID.length = pScanReq->SSID.length;
@@ -5600,7 +5605,7 @@ eHalStatus csrScanSetBGScanparams(tpAniSirGlobal pMac, tCsrBGScanRequest *pScanR
}
}while(0);
}
-
+
return (status);
}
@@ -5608,7 +5613,7 @@ eHalStatus csrScanBGScanAbort( tpAniSirGlobal pMac )
{
eHalStatus status = eHAL_STATUS_SUCCESS;
tSmeCmd *pCommand = NULL;
-
+
do
{
pCommand = csrGetCommandBuffer(pMac);
@@ -5618,7 +5623,7 @@ eHalStatus csrScanBGScanAbort( tpAniSirGlobal pMac )
break;
}
palZeroMemory(pMac->hHdd, &pCommand->u.scanCmd, sizeof(tScanCmd));
- pCommand->command = eSmeCommandScan;
+ pCommand->command = eSmeCommandScan;
pCommand->u.scanCmd.reason = eCsrScanBGScanAbort;
pCommand->u.scanCmd.callback = NULL;
pCommand->u.scanCmd.pContext = NULL;
@@ -5630,17 +5635,17 @@ eHalStatus csrScanBGScanAbort( tpAniSirGlobal pMac )
break;
}
}while(0);
-
+
return (status);
}
-//This will enable the background scan with the non-zero interval
+//This will enable the background scan with the non-zero interval
eHalStatus csrScanBGScanEnable(tpAniSirGlobal pMac)
{
eHalStatus status = eHAL_STATUS_SUCCESS;
tSmeCmd *pCommand = NULL;
-
+
if(pMac->roam.configParam.bgScanInterval)
{
do
@@ -5652,7 +5657,7 @@ eHalStatus csrScanBGScanEnable(tpAniSirGlobal pMac)
break;
}
palZeroMemory(pMac->hHdd, &pCommand->u.scanCmd, sizeof(tScanCmd));
- pCommand->command = eSmeCommandScan;
+ pCommand->command = eSmeCommandScan;
pCommand->u.scanCmd.reason = eCsrScanBGScanEnable;
pCommand->u.scanCmd.callback = NULL;
pCommand->u.scanCmd.pContext = NULL;
@@ -5676,7 +5681,7 @@ eHalStatus csrScanBGScanEnable(tpAniSirGlobal pMac)
smsLog(pMac, LOGE, FL("cannot continue because the bgscan interval is 0"));
status = eHAL_STATUS_INVALID_PARAMETER;
}
-
+
return (status);
}
@@ -5725,7 +5730,7 @@ eHalStatus csrScanCopyRequest(tpAniSirGlobal pMac, tCsrScanRequest *pDstReq, tCs
}
else
{
- status = palAllocateMemory(pMac->hHdd, (void **)&pDstReq->ChannelInfo.ChannelList,
+ status = palAllocateMemory(pMac->hHdd, (void **)&pDstReq->ChannelInfo.ChannelList,
pSrcReq->ChannelInfo.numOfChannels * sizeof(*pDstReq->ChannelInfo.ChannelList));
if(!HAL_STATUS_SUCCESS(status))
{
@@ -5751,7 +5756,7 @@ eHalStatus csrScanCopyRequest(tpAniSirGlobal pMac, tCsrScanRequest *pDstReq, tCs
for ( index = 0; index < pSrcReq->ChannelInfo.numOfChannels ; index++ )
{
/* Allow scan on valid channels only.
- * If it is p2p scan and valid channel list doesnt contain
+ * If it is p2p scan and valid channel list doesnt contain
* social channels, enforce scan on social channels because
* that is the only way to find p2p peers.
* This can happen only if band is set to 5Ghz mode.
@@ -5760,12 +5765,12 @@ eHalStatus csrScanCopyRequest(tpAniSirGlobal pMac, tCsrScanRequest *pDstReq, tCs
((eCSR_SCAN_P2P_DISCOVERY == pSrcReq->requestType) &&
CSR_IS_SOCIAL_CHANNEL(pSrcReq->ChannelInfo.ChannelList[index])))
{
- if( (pSrcReq->skipDfsChnlInP2pSearch &&
+ if( (pSrcReq->skipDfsChnlInP2pSearch &&
(NV_CHANNEL_DFS == vos_nv_getChannelEnabledState(pSrcReq->ChannelInfo.ChannelList[index])) )
#ifdef FEATURE_WLAN_LFR
- /*
+ /*
* If LFR is requesting a contiguous scan
- * (i.e. numOfChannels > 1), then ignore
+ * (i.e. numOfChannels > 1), then ignore
* DFS channels.
* TODO: vos_nv_getChannelEnabledState is returning
* 120, 124 and 128 as non-DFS channels. Hence, the
@@ -5802,7 +5807,7 @@ eHalStatus csrScanCopyRequest(tpAniSirGlobal pMac, tCsrScanRequest *pDstReq, tCs
* No valid channels found in the request.
* Only perform scan on the channels passed
* pSrcReq if it is a eCSR_SCAN_HO_BG_SCAN.
- * Passing 0 to LIM will trigger a scan on
+ * Passing 0 to LIM will trigger a scan on
* all valid channels which is not desirable.
*/
smsLog(pMac, LOGE, "%s: no valid channels found (request=%d)",
@@ -5820,7 +5825,7 @@ eHalStatus csrScanCopyRequest(tpAniSirGlobal pMac, tCsrScanRequest *pDstReq, tCs
else
{
smsLog(pMac, LOGE, "Couldn't get the valid Channel List, keeping requester's list");
- palCopyMemory(pMac->hHdd, pDstReq->ChannelInfo.ChannelList, pSrcReq->ChannelInfo.ChannelList,
+ palCopyMemory(pMac->hHdd, pDstReq->ChannelInfo.ChannelList, pSrcReq->ChannelInfo.ChannelList,
pSrcReq->ChannelInfo.numOfChannels * sizeof(*pDstReq->ChannelInfo.ChannelList));
pDstReq->ChannelInfo.numOfChannels = pSrcReq->ChannelInfo.numOfChannels;
}
@@ -5833,12 +5838,12 @@ eHalStatus csrScanCopyRequest(tpAniSirGlobal pMac, tCsrScanRequest *pDstReq, tCs
}
else
{
- status = palAllocateMemory(pMac->hHdd, (void **)&pDstReq->SSIDs.SSIDList,
+ status = palAllocateMemory(pMac->hHdd, (void **)&pDstReq->SSIDs.SSIDList,
pSrcReq->SSIDs.numOfSSIDs * sizeof(*pDstReq->SSIDs.SSIDList));
if(HAL_STATUS_SUCCESS(status))
{
pDstReq->SSIDs.numOfSSIDs = pSrcReq->SSIDs.numOfSSIDs;
- palCopyMemory(pMac->hHdd, pDstReq->SSIDs.SSIDList, pSrcReq->SSIDs.SSIDList,
+ palCopyMemory(pMac->hHdd, pDstReq->SSIDs.SSIDList, pSrcReq->SSIDs.SSIDList,
pSrcReq->SSIDs.numOfSSIDs * sizeof(*pDstReq->SSIDs.SSIDList));
}
else
@@ -5853,12 +5858,12 @@ eHalStatus csrScanCopyRequest(tpAniSirGlobal pMac, tCsrScanRequest *pDstReq, tCs
}
}while(0);
-
+
if(!HAL_STATUS_SUCCESS(status))
{
csrScanFreeRequest(pMac, pDstReq);
}
-
+
return (status);
}
@@ -5866,7 +5871,7 @@ eHalStatus csrScanCopyRequest(tpAniSirGlobal pMac, tCsrScanRequest *pDstReq, tCs
eHalStatus csrScanFreeRequest(tpAniSirGlobal pMac, tCsrScanRequest *pReq)
{
eHalStatus status = eHAL_STATUS_SUCCESS;
-
+
if(pReq->ChannelInfo.ChannelList)
{
status = palFreeMemory(pMac->hHdd, pReq->ChannelInfo.ChannelList);
@@ -5885,7 +5890,7 @@ eHalStatus csrScanFreeRequest(tpAniSirGlobal pMac, tCsrScanRequest *pReq)
pReq->SSIDs.SSIDList = NULL;
}
pReq->SSIDs.numOfSSIDs = 0;
-
+
return (status);
}
@@ -5895,7 +5900,7 @@ void csrScanCallCallback(tpAniSirGlobal pMac, tSmeCmd *pCommand, eCsrScanStatus
if(pCommand->u.scanCmd.callback)
{
// sme_ReleaseGlobalLock( &pMac->sme );
- pCommand->u.scanCmd.callback(pMac, pCommand->u.scanCmd.pContext, pCommand->u.scanCmd.scanID, scanStatus);
+ pCommand->u.scanCmd.callback(pMac, pCommand->u.scanCmd.pContext, pCommand->u.scanCmd.scanID, scanStatus);
// sme_AcquireGlobalLock( &pMac->sme );
} else {
smsLog( pMac, LOG2, "%s:%d - Callback NULL!!!", __func__, __LINE__);
@@ -5919,7 +5924,7 @@ void csrScanStopTimers(tpAniSirGlobal pMac)
eHalStatus csrScanStartGetResultTimer(tpAniSirGlobal pMac)
{
eHalStatus status;
-
+
if(pMac->scan.fScanEnable)
{
status = palTimerStart(pMac->hHdd, pMac->scan.hTimerGetResult, CSR_SCAN_GET_RESULT_INTERVAL, eANI_BOOLEAN_TRUE);
@@ -5928,7 +5933,7 @@ eHalStatus csrScanStartGetResultTimer(tpAniSirGlobal pMac)
{
status = eHAL_STATUS_FAILURE;
}
-
+
return (status);
}
@@ -5942,7 +5947,7 @@ eHalStatus csrScanStopGetResultTimer(tpAniSirGlobal pMac)
void csrScanGetResultTimerHandler(void *pv)
{
tpAniSirGlobal pMac = PMAC_STRUCT( pv );
-
+
csrScanRequestResult(pMac);
}
@@ -5956,7 +5961,7 @@ static void csrStaApConcTimerHandler(void *pv)
csrLLLock(&pMac->scan.scanCmdPendingList);
if ( NULL != ( pEntry = csrLLPeekHead( &pMac->scan.scanCmdPendingList, LL_ACCESS_NOLOCK) ) )
- {
+ {
tCsrScanRequest scanReq;
tSmeCmd *pSendScanCmd = NULL;
tANI_U8 numChn = 0;
@@ -5964,7 +5969,7 @@ static void csrStaApConcTimerHandler(void *pv)
tCsrChannelInfo *pChnInfo = &scanReq.ChannelInfo;
tANI_U8 channelToScan[WNI_CFG_VALID_CHANNEL_LIST_LEN];
eHalStatus status;
-
+
pScanCmd = GET_BASE_ADDR( pEntry, tSmeCmd, Link );
numChn = pScanCmd->u.scanCmd.u.scanRequest.ChannelInfo.numOfChannels;
@@ -5977,18 +5982,18 @@ static void csrStaApConcTimerHandler(void *pv)
* any one of the following:
* - STA session is connected and the scan is not a P2P search
* - any P2P session is connected
- * Do not split scans if no concurrent infra connections are
+ * Do not split scans if no concurrent infra connections are
* active and if the scan is a BG scan triggered by LFR (OR)
* any scan if LFR is in the middle of a BG scan. Splitting
* the scan is delaying the time it takes for LFR to find
* candidates and resulting in disconnects.
*/
if ( (numChn > pMac->roam.configParam.nNumChanCombinedConc) &&
- ((csrIsStaSessionConnected(pMac) &&
+ ((csrIsStaSessionConnected(pMac) &&
#ifdef FEATURE_WLAN_LFR
(csrIsConcurrentInfraConnected(pMac) ||
((pScanCmd->u.scanCmd.reason != eCsrScanBgScan) &&
- (pMac->roam.neighborRoamInfo.neighborRoamState !=
+ (pMac->roam.neighborRoamInfo.neighborRoamState !=
eCSR_NEIGHBOR_ROAM_STATE_CFG_CHAN_LIST_SCAN))) &&
#endif
(pScanCmd->u.scanCmd.u.scanRequest.p2pSearch != 1)) ||
@@ -6003,7 +6008,7 @@ static void csrStaApConcTimerHandler(void *pv)
csrLLUnlock(&pMac->scan.scanCmdPendingList);
return;
}
- pSendScanCmd->command = pScanCmd->command;
+ pSendScanCmd->command = pScanCmd->command;
pSendScanCmd->sessionId = pScanCmd->sessionId;
pSendScanCmd->u.scanCmd.callback = NULL;
pSendScanCmd->u.scanCmd.pContext = pScanCmd->u.scanCmd.pContext;
@@ -6012,14 +6017,14 @@ static void csrStaApConcTimerHandler(void *pv)
/* First copy all the parameters to local variable of scan request */
csrScanCopyRequest(pMac, &scanReq, &pScanCmd->u.scanCmd.u.scanRequest);
-
+
/* Now modify the elements of local var scan request required to be modified for split scan */
if(scanReq.ChannelInfo.ChannelList != NULL)
{
palFreeMemory(pMac->hHdd,scanReq.ChannelInfo.ChannelList);
scanReq.ChannelInfo.ChannelList = NULL;
}
-
+
pChnInfo->numOfChannels = pMac->roam.configParam.nNumChanCombinedConc;
palCopyMemory(pMac->hHdd, &channelToScan[0], &pScanCmd->u.scanCmd.u.scanRequest.ChannelInfo.ChannelList[0],
pChnInfo->numOfChannels * sizeof(tANI_U8)); //just send one channel
@@ -6027,16 +6032,16 @@ static void csrStaApConcTimerHandler(void *pv)
for (i = 0, j = pMac->roam.configParam.nNumChanCombinedConc; i < (numChn-pMac->roam.configParam.nNumChanCombinedConc); i++, j++)
{
- pScanCmd->u.scanCmd.u.scanRequest.ChannelInfo.ChannelList[i] =
+ pScanCmd->u.scanCmd.u.scanRequest.ChannelInfo.ChannelList[i] =
pScanCmd->u.scanCmd.u.scanRequest.ChannelInfo.ChannelList[j]; //Move all the channels one step
}
-
+
pScanCmd->u.scanCmd.u.scanRequest.ChannelInfo.numOfChannels = numChn - pMac->roam.configParam.nNumChanCombinedConc; //reduce outstanding # of channels to be scanned
scanReq.BSSType = eCSR_BSS_TYPE_ANY;
//Modify callers parameters in case of concurrency
scanReq.scanType = eSIR_ACTIVE_SCAN;
- //Use concurrency values for min/maxChnTime.
+ //Use concurrency values for min/maxChnTime.
//We know csrIsAnySessionConnected(pMac) returns TRUE here
csrSetDefaultScanTiming(pMac, scanReq.scanType, &scanReq);
@@ -6057,26 +6062,26 @@ static void csrStaApConcTimerHandler(void *pv)
/* no active connected session present or numChn == 1
* scan all remaining channels */
pSendScanCmd = pScanCmd;
- //remove this command from pending list
+ //remove this command from pending list
if (csrLLRemoveHead( &pMac->scan.scanCmdPendingList, LL_ACCESS_NOLOCK) == NULL)
{ //In case between PeekHead and here, the entry got removed by another thread.
smsLog( pMac, LOGE, FL(" Failed to remove entry from scanCmdPendingList"));
}
-
- }
+
+ }
csrQueueSmeCommand(pMac, pSendScanCmd, eANI_BOOLEAN_FALSE);
}
csrLLUnlock(&pMac->scan.scanCmdPendingList);
-
+
}
#endif
eHalStatus csrScanStartResultAgingTimer(tpAniSirGlobal pMac)
{
eHalStatus status = eHAL_STATUS_FAILURE;
-
+
if(pMac->scan.fScanEnable)
{
status = palTimerStart(pMac->hHdd, pMac->scan.hTimerResultAging, CSR_SCAN_RESULT_AGING_INTERVAL, eANI_BOOLEAN_TRUE);
@@ -6090,7 +6095,7 @@ eHalStatus csrScanStartResultCfgAgingTimer(tpAniSirGlobal pMac)
if(pMac->scan.fScanEnable)
{
- status = palTimerStart(pMac->hHdd, pMac->scan.hTimerResultCfgAging,
+ status = palTimerStart(pMac->hHdd, pMac->scan.hTimerResultCfgAging,
CSR_SCAN_RESULT_CFG_AGING_INTERVAL, eANI_BOOLEAN_TRUE);
}
return (status);
@@ -6114,7 +6119,7 @@ eHalStatus csrScanStopResultCfgAgingTimer(tpAniSirGlobal pMac)
//Connected w/o traffic, with PS
//Connected w/ traffic, no PS -- Not supported
//Connected w/ traffic, with PS -- Not supported
-//the return unit is in seconds.
+//the return unit is in seconds.
tANI_U32 csrScanGetAgeOutTime(tpAniSirGlobal pMac)
{
tANI_U32 nRet;
@@ -6174,10 +6179,10 @@ void csrScanResultAgingTimerHandler(void *pv)
{
tpAniSirGlobal pMac = PMAC_STRUCT( pv );
tANI_BOOLEAN fDisconnected = csrIsAllSessionDisconnected(pMac);
-
+
//no scan, no aging
- if(pMac->scan.fScanEnable &&
- (((eANI_BOOLEAN_FALSE == fDisconnected) && pMac->roam.configParam.bgScanInterval)
+ if(pMac->scan.fScanEnable &&
+ (((eANI_BOOLEAN_FALSE == fDisconnected) && pMac->roam.configParam.bgScanInterval)
|| (fDisconnected && (pMac->scan.fCancelIdleScan == eANI_BOOLEAN_FALSE)))
)
{
@@ -6188,7 +6193,7 @@ void csrScanResultAgingTimerHandler(void *pv)
csrLLLock(&pMac->scan.scanResultList);
pEntry = csrLLPeekHead( &pMac->scan.scanResultList, LL_ACCESS_NOLOCK );
- while( pEntry )
+ while( pEntry )
{
tmpEntry = csrLLNext(&pMac->scan.scanResultList, pEntry, LL_ACCESS_NOLOCK);
pResult = GET_BASE_ADDR( pEntry, tCsrScanResult, Link );
@@ -6210,10 +6215,10 @@ static void csrScanResultCfgAgingTimerHandler(void *pv)
tCsrScanResult *pResult;
tANI_TIMESTAMP ageOutTime = pMac->scan.scanResultCfgAgingTime * PAL_TICKS_PER_SECOND;
tANI_TIMESTAMP curTime = (tANI_TIMESTAMP)palGetTickCount(pMac->hHdd);
-
+
csrLLLock(&pMac->scan.scanResultList);
pEntry = csrLLPeekHead( &pMac->scan.scanResultList, LL_ACCESS_NOLOCK );
- while( pEntry )
+ while( pEntry )
{
tmpEntry = csrLLNext(&pMac->scan.scanResultList, pEntry, LL_ACCESS_NOLOCK);
pResult = GET_BASE_ADDR( pEntry, tCsrScanResult, Link );
@@ -6230,7 +6235,7 @@ static void csrScanResultCfgAgingTimerHandler(void *pv)
eHalStatus csrScanStartIdleScanTimer(tpAniSirGlobal pMac, tANI_U32 interval)
{
eHalStatus status;
-
+
smsLog(pMac, LOG1, " csrScanStartIdleScanTimer");
if((pMac->scan.fScanEnable) && (eANI_BOOLEAN_FALSE == pMac->scan.fCancelIdleScan) && interval)
{
@@ -6252,7 +6257,7 @@ eHalStatus csrScanStartIdleScanTimer(tpAniSirGlobal pMac, tANI_U32 interval)
}
status = eHAL_STATUS_FAILURE;
}
-
+
return (status);
}
@@ -6284,7 +6289,7 @@ void csrScanIMPSCallback(void *callbackContext, eHalStatus status)
if(eANI_BOOLEAN_FALSE == pMac->scan.fCancelIdleScan)
{
- if(pMac->roam.configParam.IsIdleScanEnabled)
+ if(pMac->roam.configParam.IsIdleScanEnabled)
{
if(HAL_STATUS_SUCCESS(status))
{
@@ -6308,7 +6313,7 @@ void csrScanIMPSCallback(void *callbackContext, eHalStatus status)
}
else
{//we might need another flag to check if CSR needs to request imps at all
-
+
tANI_U32 nTime = 0;
pMac->scan.fRestartIdleScan = eANI_BOOLEAN_FALSE;
@@ -6321,7 +6326,7 @@ void csrScanIMPSCallback(void *callbackContext, eHalStatus status)
}
-//Param: pTimeInterval -- Caller allocated memory in return, if failed, to specify the nxt time interval for
+//Param: pTimeInterval -- Caller allocated memory in return, if failed, to specify the nxt time interval for
//idle scan timer interval
//Return: Not success -- meaning it cannot start IMPS, caller needs to start a timer for idle scan
eHalStatus csrScanTriggerIdleScan(tpAniSirGlobal pMac, tANI_U32 *pTimeInterval)
@@ -6365,7 +6370,7 @@ eHalStatus csrScanTriggerIdleScan(tpAniSirGlobal pMac, tANI_U32 *pTimeInterval)
return status;
}
- if((pMac->scan.fScanEnable) && (eANI_BOOLEAN_FALSE == pMac->scan.fCancelIdleScan)
+ if((pMac->scan.fScanEnable) && (eANI_BOOLEAN_FALSE == pMac->scan.fCancelIdleScan)
/*&& pMac->roam.configParam.impsSleepTime*/)
{
//Stop get result timer because idle scan gets scan result out of PE
@@ -6387,7 +6392,7 @@ eHalStatus csrScanTriggerIdleScan(tpAniSirGlobal pMac, tANI_U32 *pTimeInterval)
{
*pTimeInterval = 0;
}
- //Set the restart flag to true because that idle scan
+ //Set the restart flag to true because that idle scan
//can be restarted even though the timer will not be running
pMac->scan.fRestartIdleScan = eANI_BOOLEAN_TRUE;
}
@@ -6628,11 +6633,11 @@ tANI_BOOLEAN csrScanRemoveFreshScanCommand(tpAniSirGlobal pMac, tANI_U8 sessionI
pCommand = GET_BASE_ADDR(pEntry, tSmeCmd, Link);
if (pCommand->u.scanCmd.callback)
{
- /* User scan request is pending,
+ /* User scan request is pending,
* send response with status eCSR_SCAN_ABORT*/
- pCommand->u.scanCmd.callback(pMac,
- pCommand->u.scanCmd.pContext,
- pCommand->u.scanCmd.scanID,
+ pCommand->u.scanCmd.callback(pMac,
+ pCommand->u.scanCmd.pContext,
+ pCommand->u.scanCmd.scanID,
eCSR_SCAN_ABORT);
}
csrReleaseCommandScan( pMac, pCommand );
@@ -6724,13 +6729,13 @@ eHalStatus csrScanGetPMKIDCandidateList(tpAniSirGlobal pMac, tANI_U32 sessionId,
while(((pScanResult = csrScanResultGetNext(pMac, hBSSList)) != NULL) && ( pSession->NumPmkidCandidate < nItems))
{
//NumPmkidCandidate adds up here
- csrProcessBSSDescForPMKIDList(pMac, &pScanResult->BssDescriptor,
+ csrProcessBSSDescForPMKIDList(pMac, &pScanResult->BssDescriptor,
(tDot11fBeaconIEs *)( pScanResult->pvIes ));
}
if(pSession->NumPmkidCandidate)
{
*pNumItems = pSession->NumPmkidCandidate;
- palCopyMemory(pMac->hHdd, pPmkidList, pSession->PmkidCandidateInfo,
+ palCopyMemory(pMac->hHdd, pPmkidList, pSession->PmkidCandidateInfo,
pSession->NumPmkidCandidate * sizeof(tPmkidCandidateInfo));
}
csrScanResultPurge(pMac, hBSSList);
@@ -6804,13 +6809,13 @@ eHalStatus csrScanGetBKIDCandidateList(tpAniSirGlobal pMac, tANI_U32 sessionId,
-//This function is usually used for BSSs that suppresses SSID so the profile
+//This function is usually used for BSSs that suppresses SSID so the profile
//shall have one and only one SSID
eHalStatus csrScanForSSID(tpAniSirGlobal pMac, tANI_U32 sessionId, tCsrRoamProfile *pProfile, tANI_U32 roamId)
{
eHalStatus status = eHAL_STATUS_INVALID_PARAMETER;
tSmeCmd *pScanCmd = NULL;
- tANI_U8 bAddr[6] = {0xff, 0xff, 0xff, 0xff, 0xff, 0xff};
+ tANI_U8 bAddr[6] = {0xff, 0xff, 0xff, 0xff, 0xff, 0xff};
tANI_U8 index = 0;
tANI_U32 numSsid = pProfile->SSIDs.numOfSSIDs;
@@ -6904,11 +6909,11 @@ eHalStatus csrScanForSSID(tpAniSirGlobal pMac, tANI_U32 sessionId, tCsrRoamProfi
{
if(csrRoamIsValidChannel(pMac, pProfile->ChannelInfo.ChannelList[index]))
{
- pScanCmd->u.scanCmd.u.scanRequest.ChannelInfo.ChannelList[pScanCmd->u.scanCmd.u.scanRequest.ChannelInfo.numOfChannels]
+ pScanCmd->u.scanCmd.u.scanRequest.ChannelInfo.ChannelList[pScanCmd->u.scanCmd.u.scanRequest.ChannelInfo.numOfChannels]
= pProfile->ChannelInfo.ChannelList[index];
pScanCmd->u.scanCmd.u.scanRequest.ChannelInfo.numOfChannels++;
}
- else
+ else
{
smsLog(pMac, LOGW, FL("process a channel (%d) that is invalid"), pProfile->ChannelInfo.ChannelList[index]);
}
@@ -6927,8 +6932,8 @@ eHalStatus csrScanForSSID(tpAniSirGlobal pMac, tANI_U32 sessionId, tCsrRoamProfi
}
if(pProfile->SSIDs.numOfSSIDs)
{
- status = palAllocateMemory(pMac->hHdd, (void **)&pScanCmd->u.scanCmd.u.scanRequest.SSIDs.SSIDList,
- pProfile->SSIDs.numOfSSIDs * sizeof(tCsrSSIDInfo));
+ status = palAllocateMemory(pMac->hHdd, (void **)&pScanCmd->u.scanCmd.u.scanRequest.SSIDs.SSIDList,
+ pProfile->SSIDs.numOfSSIDs * sizeof(tCsrSSIDInfo));
if(!HAL_STATUS_SUCCESS(status))
{
break;
@@ -6960,7 +6965,7 @@ eHalStatus csrScanForSSID(tpAniSirGlobal pMac, tANI_U32 sessionId, tCsrRoamProfi
smsLog(pMac, LOGE, FL("cannot scan because scanEnable (%d) or numSSID (%d) is invalid"),
pMac->scan.fScanEnable, pProfile->SSIDs.numOfSSIDs);
}
-
+
return (status);
}
@@ -6987,7 +6992,7 @@ eHalStatus csrScanForCapabilityChange(tpAniSirGlobal pMac, tSirSmeApNewCaps *pNe
palZeroMemory(pMac->hHdd, &pScanCmd->u.scanCmd, sizeof(tScanCmd));
status = eHAL_STATUS_SUCCESS;
pScanCmd->u.scanCmd.roamId = 0;
- pScanCmd->command = eSmeCommandScan;
+ pScanCmd->command = eSmeCommandScan;
pScanCmd->u.scanCmd.callback = NULL;
pScanCmd->u.scanCmd.pContext = NULL;
pScanCmd->u.scanCmd.reason = eCsrScanForCapsChange;
@@ -7005,7 +7010,7 @@ eHalStatus csrScanForCapabilityChange(tpAniSirGlobal pMac, tSirSmeApNewCaps *pNe
{
csrReleaseCommandScan(pMac, pScanCmd);
}
- }
+ }
}
return (status);
@@ -7030,7 +7035,7 @@ void csrInitBGScanChannelList(tpAniSirGlobal pMac)
}
-//This function return TRUE if background scan channel list is adjusted.
+//This function return TRUE if background scan channel list is adjusted.
//this function will only shrink the background scan channel list
tANI_BOOLEAN csrAdjustBGScanChannelList(tpAniSirGlobal pMac, tANI_U8 *pChannelList, tANI_U8 NumChannels,
tANI_U8 *pAdjustChannels, tANI_U8 *pNumAdjustChannels)
@@ -7088,7 +7093,7 @@ eHalStatus csrScanGetSupportedChannels( tpAniSirGlobal pMac )
smsLog( pMac, LOGE, FL(" failed") );
pMac->scan.baseChannels.numChannels = 0;
}
-
+
return ( status );
}
@@ -7205,7 +7210,7 @@ void csrSaveTxPowerToCfg( tpAniSirGlobal pMac, tDblLinkList *pList, tANI_U32 cfg
if(cbLen)
{
- ccmCfgSetStr(pMac, cfgId, (tANI_U8 *)pBuf, cbLen, NULL, eANI_BOOLEAN_FALSE);
+ ccmCfgSetStr(pMac, cfgId, (tANI_U8 *)pBuf, cbLen, NULL, eANI_BOOLEAN_FALSE);
}
palFreeMemory( pMac->hHdd, pBuf );
}//Allocate memory
@@ -7216,7 +7221,7 @@ void csrSetCfgCountryCode( tpAniSirGlobal pMac, tANI_U8 *countryCode )
{
tANI_U8 cc[WNI_CFG_COUNTRY_CODE_LEN];
///v_REGDOMAIN_t DomainId;
-
+
smsLog( pMac, LOG3, "Setting Country Code in Cfg from csrSetCfgCountryCode %s",countryCode );
palCopyMemory( pMac->hHdd, cc, countryCode, WNI_CFG_COUNTRY_CODE_LEN );
@@ -7232,7 +7237,7 @@ void csrSetCfgCountryCode( tpAniSirGlobal pMac, tANI_U8 *countryCode )
}
ccmCfgSetStr(pMac, WNI_CFG_COUNTRY_CODE, cc, WNI_CFG_COUNTRY_CODE_LEN, NULL, eANI_BOOLEAN_FALSE);
- //Need to let HALPHY know about the current domain so it can apply some
+ //Need to let HALPHY know about the current domain so it can apply some
//domain-specific settings (TX filter...)
/*if(HAL_STATUS_SUCCESS(csrGetRegulatoryDomainForCountry(pMac, cc, &DomainId)))
{
@@ -7256,15 +7261,15 @@ eHalStatus csrGetCountryCode(tpAniSirGlobal pMac, tANI_U8 *pBuf, tANI_U8 *pbLen)
*pbLen = (tANI_U8)len;
}
}
-
+
return (status);
}
void csrSetCfgScanControlList( tpAniSirGlobal pMac, tANI_U8 *countryCode, tCsrChannel *pChannelList )
-{
+{
tANI_U8 i, j;
- tANI_BOOLEAN found=FALSE;
+ tANI_BOOLEAN found=FALSE;
tANI_U8 *pControlList = NULL;
tANI_U32 len = WNI_CFG_SCAN_CONTROL_LIST_LEN;
@@ -7275,30 +7280,30 @@ void csrSetCfgScanControlList( tpAniSirGlobal pMac, tANI_U8 *countryCode, tCsrCh
{
for (i = 0; i < pChannelList->numChannels; i++)
{
- for (j = 0; j < len; j += 2)
+ for (j = 0; j < len; j += 2)
{
- if (pControlList[j] == pChannelList->channelList[i])
+ if (pControlList[j] == pChannelList->channelList[i])
{
found = TRUE;
break;
}
}
-
+
if (found) // insert a pair(channel#, flag)
{
if (CSR_IS_CHANNEL_5GHZ(pControlList[j]))
{
- pControlList[j+1] = csrGetScanType(pMac, pControlList[j]);
+ pControlList[j+1] = csrGetScanType(pMac, pControlList[j]);
}
- else
+ else
{
- pControlList[j+1] = eSIR_ACTIVE_SCAN;
+ pControlList[j+1] = eSIR_ACTIVE_SCAN;
}
found = FALSE; // reset the flag
}
-
- }
+
+ }
ccmCfgSetStr(pMac, WNI_CFG_SCAN_CONTROL_LIST, pControlList, len, NULL, eANI_BOOLEAN_FALSE);
}//Successfully getting scan control list
@@ -7312,7 +7317,7 @@ eHalStatus csrSetCfgBackgroundScanPeriod(tpAniSirGlobal pMac, tANI_U32 bgPeriod)
{
return (ccmCfgSetInt(pMac, WNI_CFG_BACKGROUND_SCAN_PERIOD, bgPeriod, (tCcmCfgSetCallback) csrScanCcmCfgSetCallback, eANI_BOOLEAN_FALSE));
}
-
+
void csrScanCcmCfgSetCallback(tHalHandle hHal, tANI_S32 result)
{
@@ -7339,7 +7344,7 @@ void csrScanCcmCfgSetCallback(tHalHandle hHal, tANI_S32 result)
{
smsLog( pMac, LOGW, "CSR: Scan Completion called but SCAN command is not ACTIVE ..." );
}
- }
+ }
smeProcessPendingQueue( pMac );
}
@@ -7348,7 +7353,7 @@ eHalStatus csrProcessSetBGScanParam(tpAniSirGlobal pMac, tSmeCmd *pCommand)
eHalStatus status;
tCsrBGScanRequest *pScanReq = &pCommand->u.scanCmd.u.bgScanRequest;
tANI_U32 dataLen = sizeof( tANI_U8 ) * pScanReq->ChannelInfo.numOfChannels;
-
+
//***setcfg for background scan channel list
status = ccmCfgSetInt(pMac, WNI_CFG_ACTIVE_MINIMUM_CHANNEL_TIME, pScanReq->minChnTime, NULL, eANI_BOOLEAN_FALSE);
status = ccmCfgSetInt(pMac, WNI_CFG_ACTIVE_MAXIMUM_CHANNEL_TIME, pScanReq->maxChnTime, NULL, eANI_BOOLEAN_FALSE);
@@ -7391,12 +7396,12 @@ eHalStatus csrProcessSetBGScanParam(tpAniSirGlobal pMac, tSmeCmd *pCommand)
//No need to stop aging because IDLE scan is still running
status = ccmCfgSetInt(pMac, WNI_CFG_BACKGROUND_SCAN_PERIOD, 0, NULL, eANI_BOOLEAN_FALSE);
}
-
+
if(pScanReq->SSID.length > WNI_CFG_SSID_LEN)
{
pScanReq->SSID.length = WNI_CFG_SSID_LEN;
}
-
+
status = ccmCfgSetStr(pMac, WNI_CFG_BG_SCAN_CHANNEL_LIST, pScanReq->ChannelInfo.ChannelList, dataLen, NULL, eANI_BOOLEAN_FALSE);
status = ccmCfgSetStr(pMac, WNI_CFG_SSID, (tANI_U8 *)pScanReq->SSID.ssId, pScanReq->SSID.length, NULL, eANI_BOOLEAN_FALSE);
@@ -7611,7 +7616,7 @@ eHalStatus csrScanGetScanChannelInfo(tpAniSirGlobal pMac, tANI_U8 sessionId)
if (pMac->fScanOffload)
((tSirSmeGetScanChanReq *)pMsg)->sessionId = sessionId;
status = palSendMBMessage(pMac->hHdd, pMsg);
- }
+ }
return( status );
}
@@ -7621,7 +7626,7 @@ tANI_BOOLEAN csrRoamIsValidChannel( tpAniSirGlobal pMac, tANI_U8 channel )
tANI_BOOLEAN fValid = FALSE;
tANI_U32 idxValidChannels;
tANI_U32 len = pMac->roam.numValidChannels;
-
+
for ( idxValidChannels = 0; ( idxValidChannels < len ); idxValidChannels++ )
{
if ( channel == pMac->roam.validChannelList[ idxValidChannels ] )
@@ -7630,7 +7635,7 @@ tANI_BOOLEAN csrRoamIsValidChannel( tpAniSirGlobal pMac, tANI_U8 channel )
break;
}
}
-
+
return fValid;
}
@@ -7854,7 +7859,7 @@ void csrInitOccupiedChannelsList(tpAniSirGlobal pMac)
pIes = (tDot11fBeaconIEs *)( pBssDesc->Result.pvIes );
//At this time, pBssDescription->Result.pvIes may be NULL
- if( !pIes && (!HAL_STATUS_SUCCESS(csrGetParsedBssDescriptionIEs(pMac,
+ if( !pIes && (!HAL_STATUS_SUCCESS(csrGetParsedBssDescriptionIEs(pMac,
&pBssDesc->Result.BssDescriptor, &pIes))) )
{
continue;
@@ -7873,7 +7878,7 @@ void csrInitOccupiedChannelsList(tpAniSirGlobal pMac)
pEntry = csrLLNext( &pMac->scan.scanResultList, pEntry, LL_ACCESS_NOLOCK );
}//while
csrLLUnlock(&pMac->scan.scanResultList);
-
+
}
#endif
diff --git a/CORE/SME/src/csr/csrUtil.c b/CORE/SME/src/csr/csrUtil.c
index 3104e75d4716..1d765c11bda7 100644
--- a/CORE/SME/src/csr/csrUtil.c
+++ b/CORE/SME/src/csr/csrUtil.c
@@ -2741,13 +2741,9 @@ csrIsconcurrentsessionValid(tpAniSirGlobal pMac,tANI_U32 cursessionId,
switch (currBssPersona)
{
case VOS_STA_MODE:
- 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;
- }
+ case VOS_P2P_CLIENT_MODE:
+ smsLog(pMac, LOG4, FL(" Second session for persona %d"), currBssPersona);
+ return eHAL_STATUS_SUCCESS;
break;
case VOS_STA_SAP_MODE:
@@ -2914,11 +2910,11 @@ eHalStatus csrValidateMCCBeaconInterval(tpAniSirGlobal pMac, tANI_U8 channelId,
else if (pMac->roam.roamSession[sessionId].bssParams.bssPersona
== VOS_STA_SAP_MODE)
{
- if (pMac->roam.roamSession[sessionId].bssParams.operationChn
+ if (pMac->roam.roamSession[sessionId].bssParams.operationChn
!= channelId )
{
- smsLog(pMac, LOGE, FL("***MCC is not enabled for SAP +STA****"));
- return eHAL_STATUS_FAILURE;
+ smsLog(pMac, LOGE, FL("*** MCC with SAP+STA sessions ****"));
+ return eHAL_STATUS_SUCCESS;
}
}
else if (pMac->roam.roamSession[sessionId].bssParams.bssPersona
diff --git a/CORE/SME/src/oemData/oemDataApi.c b/CORE/SME/src/oemData/oemDataApi.c
index 033a366e3e67..79a9892e39d7 100644
--- a/CORE/SME/src/oemData/oemDataApi.c
+++ b/CORE/SME/src/oemData/oemDataApi.c
@@ -308,6 +308,7 @@ eHalStatus sme_HandleOemDataRsp(tHalHandle hHal, tANI_U8* pMsg)
break;
}
+#ifndef QCA_WIFI_2_0
pEntry = csrLLPeekHead( &pMac->sme.smeCmdActiveList, LL_ACCESS_LOCK );
if(pEntry)
{
@@ -359,7 +360,34 @@ eHalStatus sme_HandleOemDataRsp(tHalHandle hHal, tANI_U8* pMsg)
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
+ * request command on receiving first response and thereafter SME
+ * passes each sunsequent response to upper user layer.
+ */
+ pEntry = csrLLPeekHead(&pMac->sme.smeCmdActiveList, LL_ACCESS_LOCK);
+ if (pEntry)
+ {
+ pCommand = GET_BASE_ADDR(pEntry, tSmeCmd, Link);
+ if (eSmeCommandOemDataReq == pCommand->command)
+ {
+ if (csrLLRemoveEntry(&pMac->sme.smeCmdActiveList,
+ &pCommand->Link, LL_ACCESS_LOCK))
+ {
+ vos_mem_set(&(pCommand->u.oemDataCmd),
+ sizeof(tOemDataCmd), 0);
+ smeReleaseCommand(pMac, pCommand);
+ }
+ }
+ }
+
+ pOemDataRsp = (tSirOemDataRsp *)pMsg;
+ smsLog(pMac, LOG1, "calling send_oem_data_rsp_msg");
+ send_oem_data_rsp_msg(sizeof(tOemDataRsp), &pOemDataRsp->oemDataRsp[0]);
+#endif /* QCA_WIFI_2_0 */
} while(0);
return status;
diff --git a/CORE/SME/src/sme_common/sme_Api.c b/CORE/SME/src/sme_common/sme_Api.c
index 70080337949d..bc56d903033f 100644
--- a/CORE/SME/src/sme_common/sme_Api.c
+++ b/CORE/SME/src/sme_common/sme_Api.c
@@ -66,6 +66,7 @@
#include "csrInternal.h"
#include "wlan_qct_wda.h"
#include "halMsgApi.h"
+#include "vos_utils.h"
#include "sapApi.h"
@@ -6636,6 +6637,14 @@ eHalStatus sme_HandleChangeCountryCode(tpAniSirGlobal pMac, void *pMsgBuf)
return status;
}
+ status = WDA_SetCountryCode(pMac, pMsg->countryCode);
+ if ( status != eHAL_STATUS_SUCCESS )
+ {
+ smsLog(pMac, LOGE, FL("Fail to set countryCode: %c%c"), pMsg->countryCode[0],
+ pMsg->countryCode[1]);
+ return status;
+ }
+
/* purge current scan results
if i don't do this than I still get old ap's (of different country code) as available (even if they are powered off).
Looks like a bug in current scan sequence.
@@ -8932,3 +8941,75 @@ eHalStatus sme_MoveCsrToScanStateForPno (tHalHandle hHal, tANI_U8 sessionId)
return status;
}
#endif
+
+eHalStatus sme_getValidChannelList(tHalHandle hHal, tANI_U8 *numChannels,
+ tANI_U8 **chanList)
+{
+ tpAniSirGlobal pMac = PMAC_STRUCT(hHal);
+ eHalStatus status;
+
+ status = sme_AcquireGlobalLock(&pMac->sme);
+ if (HAL_STATUS_SUCCESS(status))
+ {
+ *numChannels =
+ pMac->roam.neighborRoamInfo.cfgParams.channelInfo.numOfChannels;
+ vos_mem_copy(*chanList,
+ &pMac->roam.neighborRoamInfo.cfgParams.channelInfo.ChannelList,
+ *numChannels);
+ sme_ReleaseGlobalLock(&pMac->sme);
+ }
+ return status;
+}
+
+#ifdef QCA_WIFI_2_0
+eHalStatus sme_getChannelInfo(tHalHandle hHal, tANI_U8 chanId,
+ tSmeChannelInfo *chanInfo)
+{
+ tpAniSirGlobal pMac = PMAC_STRUCT(hHal);
+ eHalStatus status;
+ tANI_U8 i;
+ eAniBoolean found = false;
+
+ status = sme_AcquireGlobalLock(&pMac->sme);
+ if (HAL_STATUS_SUCCESS(status))
+ {
+ for (i = 0 ; i < WNI_CFG_VALID_CHANNEL_LIST_LEN; i++)
+ {
+ if (pMac->scan.defaultPowerTable[i].chanId == chanId)
+ {
+ chanInfo->chan_id = chanId;
+ chanInfo->mhz = vos_chan_to_freq(chanId);
+ chanInfo->band_center_freq1 = chanInfo->mhz;
+ chanInfo->band_center_freq2 = 0;
+
+ if (chanInfo->mhz < SME_2_4_GHZ_MAX_FREQ)
+ {
+ SME_SET_CHANNEL_MODE(chanInfo, SME_MODE_11G);
+ }
+ else
+ {
+ SME_SET_CHANNEL_MODE(chanInfo, SME_MODE_11A);
+ }
+
+ SME_SET_CHANNEL_MAX_POWER(chanInfo,
+ pMac->scan.defaultPowerTable[i].pwr);
+
+ SME_SET_CHANNEL_REG_POWER(chanInfo,
+ pMac->scan.defaultPowerTable[i].pwr);
+
+ /* TODO: Set CHANNEL_MIN_POWER */
+ /* TODO: Set CHANNEL_ANTENNA_MAX */
+ /* TODO: Set CHANNEL_REG_CLASSID */
+
+ found = true;
+ break;
+ }
+ }
+ if (!found)
+ status = eHAL_STATUS_FAILURE;
+
+ sme_ReleaseGlobalLock(&pMac->sme);
+ }
+ return status;
+}
+#endif /* QCA_WIFI_2_0 */
diff --git a/CORE/SVC/external/wlan_nlink_common.h b/CORE/SVC/external/wlan_nlink_common.h
index 43e30591bd14..0fd897fa1c17 100644
--- a/CORE/SVC/external/wlan_nlink_common.h
+++ b/CORE/SVC/external/wlan_nlink_common.h
@@ -102,6 +102,9 @@ typedef enum eAniNlModuleTypes {
ANI_NL_MSG_PUMAC = ANI_NL_MSG_BASE + 0x01,// PTT Socket App
ANI_NL_MSG_PTT = ANI_NL_MSG_BASE + 0x07,// Quarky GUI
WLAN_NL_MSG_BTC,
+#ifdef QCA_WIFI_2_0
+ WLAN_NL_MSG_OEM,
+#endif
ANI_NL_MSG_MAX
} tAniNlModTypes, tWlanNlModTypes;
diff --git a/CORE/SVC/inc/wlan_ptt_sock_svc.h b/CORE/SVC/inc/wlan_ptt_sock_svc.h
index e6f427d93a6f..2157d4980902 100644
--- a/CORE/SVC/inc/wlan_ptt_sock_svc.h
+++ b/CORE/SVC/inc/wlan_ptt_sock_svc.h
@@ -61,6 +61,12 @@
#define ANI_DRIVER_MSG_START 0x0001
#define ANI_MSG_APP_REG_REQ (ANI_DRIVER_MSG_START + 0)
#define ANI_MSG_APP_REG_RSP (ANI_DRIVER_MSG_START + 1)
+#define ANI_MSG_OEM_DATA_REQ (ANI_DRIVER_MSG_START + 2)
+#define ANI_MSG_OEM_DATA_RSP (ANI_DRIVER_MSG_START + 3)
+#define ANI_MSG_CHANNEL_INFO_REQ (ANI_DRIVER_MSG_START + 4)
+#define ANI_MSG_CHANNEL_INFO_RSP (ANI_DRIVER_MSG_START + 5)
+#define ANI_MSG_OEM_ERROR (ANI_DRIVER_MSG_START + 6)
+
#define ANI_MAX_RADIOS 3
#define ANI_NL_MSG_OK 0
#define ANI_NL_MSG_ERROR -1
diff --git a/CORE/SYS/legacy/src/utils/src/parserApi.c b/CORE/SYS/legacy/src/utils/src/parserApi.c
index 2d5c958e9a0f..9d9a478533c4 100644
--- a/CORE/SYS/legacy/src/utils/src/parserApi.c
+++ b/CORE/SYS/legacy/src/utils/src/parserApi.c
@@ -3138,6 +3138,19 @@ sirConvertBeaconFrame2Struct(tpAniSirGlobal pMac,
}
#endif
+#ifdef FEATURE_WLAN_CCX
+ /* copy CCX TPC info element */
+ if (pBeacon->CCXTxmitPower.present) {
+ pBeaconStruct->ccxTxPwr.present = 1;
+ pBeaconStruct->ccxTxPwr.power_limit =
+ pBeacon->CCXTxmitPower.power_limit;
+ }
+ if (pBeacon->QBSSLoad.present) {
+ palCopyMemory(pMac, &pBeaconStruct->QBSSLoad, &pBeacon->QBSSLoad,
+ sizeof(tDot11fIEQBSSLoad));
+ }
+#endif
+
palFreeMemory(pMac->hHdd, pBeacon);
return eSIR_SUCCESS;
diff --git a/CORE/TL/inc/wlan_qct_tl.h b/CORE/TL/inc/wlan_qct_tl.h
index ba34be195e9e..cce365da1e07 100644
--- a/CORE/TL/inc/wlan_qct_tl.h
+++ b/CORE/TL/inc/wlan_qct_tl.h
@@ -303,6 +303,9 @@ typedef struct
/* Min Threshold for Processing Frames in TL */
v_U8_t uMinFramesProcThres;
+
+ /* Ip checksum offload */
+ v_BOOL_t ip_checksum_offload;
}WLANTL_ConfigInfoType;
/*---------------------------------------------------------------------------
diff --git a/CORE/UTILS/FWLOG/dbglog_host.c b/CORE/UTILS/FWLOG/dbglog_host.c
index cb1a0bef397f..516405ed65e2 100644
--- a/CORE/UTILS/FWLOG/dbglog_host.c
+++ b/CORE/UTILS/FWLOG/dbglog_host.c
@@ -36,6 +36,13 @@
#include "wma.h"
#include "ol_defines.h"
+#include <net/sock.h>
+#include <linux/netlink.h>
+
+struct sock *nl_sk = NULL;
+int g_pid;
+bool appstarted = FALSE;
+
#ifdef WLAN_OPEN_SOURCE
#include <linux/debugfs.h>
#endif /* WLAN_OPEN_SOURCE */
@@ -64,7 +71,7 @@ ATH_DEBUG_INSTANTIATE_MODULE_VAR(fwlog,
module_dbg_print mod_print[WLAN_MODULE_ID_MAX];
-A_UINT32 dbglog_process_type = DBGLOG_PROCESS_DEFAULT;
+A_UINT32 dbglog_process_type = DBGLOG_PROCESS_NET_RAW;
A_STATUS
wmi_config_debug_module_cmd(wmi_unified_t wmi_handle, A_UINT32 param, A_UINT32 val,
@@ -1256,6 +1263,40 @@ dbglog_debugfs_raw_data(wmi_unified_t wmi_handle, const u_int8_t *buf, A_UINT32
#endif /* WLAN_OPEN_SOURCE */
int
+dbglog_process_netlink_data(wmi_unified_t wmi_handle, const u_int8_t *buffer, A_UINT32 len)
+{
+ struct sk_buff *skb_out;
+ struct nlmsghdr *nlh;
+ int res = 0;
+ struct dbglog_slot *slot;
+ size_t slot_len;
+
+ if (WARN_ON(len > ATH6KL_FWLOG_PAYLOAD_SIZE))
+ return -ENODEV;
+
+ slot_len = sizeof(*slot) + ATH6KL_FWLOG_PAYLOAD_SIZE;
+
+ skb_out = nlmsg_new(slot_len, 0);
+ if (!skb_out)
+ {
+ AR_DEBUG_PRINTF(ATH_DEBUG_ERR, ("Failed to allocate new skb\n"));
+ return -1;
+ }
+
+ nlh = nlmsg_put(skb_out, 0, 0, NLMSG_DONE, slot_len, 0);
+ slot = (struct dbglog_slot *) nlmsg_data(nlh);
+ slot->timestamp = cpu_to_le32(jiffies);
+ slot->length = cpu_to_le32(len);
+ memcpy(slot->payload, buffer, len);
+ NETLINK_CB(skb_out).dst_group = 0; /* not in mcast group */
+
+ nlmsg_unicast(nl_sk,
+ skb_out,
+ g_pid);
+ return res;
+}
+
+int
dbglog_parse_debug_logs(ol_scn_t scn, u_int8_t *data, u_int32_t datalen)
{
tp_wma_handle wma = (tp_wma_handle)scn;
@@ -1280,7 +1321,7 @@ dbglog_parse_debug_logs(ol_scn_t scn, u_int8_t *data, u_int32_t datalen)
} else {
param_buf = (WMI_DEBUG_MESG_EVENTID_param_tlvs *) data;
if (!param_buf) {
- AR_DEBUG_PRINTF(ATH_DEBUG_INFO, ("Get NULL point message from FW\n"));
+ AR_DEBUG_PRINTF(ATH_DEBUG_ERR, ("Get NULL point message from FW\n"));
return -1;
}
@@ -1303,6 +1344,17 @@ dbglog_parse_debug_logs(ol_scn_t scn, u_int8_t *data, u_int32_t datalen)
return dbglog_print_raw_data(buffer, length);
}
+ if ( dbglog_process_type == DBGLOG_PROCESS_NET_RAW) {
+ if(appstarted){
+ return dbglog_process_netlink_data((wmi_unified_t)wma->wmi_handle,
+ (A_UINT8 *)buffer,
+ len);
+ } else {
+ return 0;
+ }
+
+ }
+
#ifdef WLAN_OPEN_SOURCE
if (dbglog_process_type == DBGLOG_PROCESS_POOL_RAW) {
return dbglog_debugfs_raw_data((wmi_unified_t)wma->wmi_handle,
@@ -2640,6 +2692,50 @@ int dbglog_debugfs_remove(wmi_unified_t wmi_handle)
return TRUE;
}
#endif /* WLAN_OPEN_SOURCE */
+static void nl_recv_msg(struct sk_buff *skb)
+{
+ struct nlmsghdr *nlh;
+
+ nlh = (struct nlmsghdr *)skb->data;
+ g_pid = nlh->nlmsg_pid; /*pid of sending process */
+ appstarted = TRUE;
+}
+
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,6,0))
+struct netlink_kernel_cfg cfg = {
+ .input = nl_recv_msg,
+};
+#endif
+
+int dbglog_netlink_init(wmi_unified_t wmi_handle)
+{
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,6,0))
+ nl_sk = netlink_kernel_create(&init_net,
+ CLD_NETLINK_USER,
+#if (LINUX_VERSION_CODE < KERNEL_VERSION(3,7,0))
+ THIS_MODULE,
+#endif
+ &cfg);
+#else
+ nl_sk = netlink_kernel_create(&init_net,
+ CLD_NETLINK_USER,
+ 0,
+ nl_recv_msg,
+ NULL,
+ THIS_MODULE);
+#endif
+ if (!nl_sk)
+ {
+ AR_DEBUG_PRINTF(ATH_DEBUG_ERR, ("Error creating socket. \n"));
+ return -1;
+ }
+ return A_OK;
+}
+
+void dbglog_netlink_deinit(wmi_unified_t wmi_handle)
+{
+ netlink_kernel_release(nl_sk);
+}
int dbglog_parser_type_init(wmi_unified_t wmi_handle, int type)
{
@@ -2674,6 +2770,10 @@ dbglog_init(wmi_unified_t wmi_handle)
if(res != 0)
return res;
+ res = dbglog_netlink_init(wmi_handle);
+ if(res != 0)
+ return res;
+
#ifdef WLAN_OPEN_SOURCE
/* Initialize the fw debug log queue */
skb_queue_head_init(&wmi_handle->dbglog.fwlog_queue);
@@ -2700,6 +2800,8 @@ dbglog_deinit(wmi_unified_t wmi_handle)
dbglog_debugfs_remove(wmi_handle);
#endif /* WLAN_OPEN_SOURCE */
+ dbglog_netlink_deinit(wmi_handle);
+
res = wmi_unified_unregister_event_handler(wmi_handle, WMI_DEBUG_MESG_EVENTID);
if(res != 0)
return res;
diff --git a/CORE/VOSS/inc/i_vos_packet.h b/CORE/VOSS/inc/i_vos_packet.h
index 3dc6a9983688..6ec546fab4c1 100644
--- a/CORE/VOSS/inc/i_vos_packet.h
+++ b/CORE/VOSS/inc/i_vos_packet.h
@@ -64,6 +64,9 @@ typedef struct
u_int32_t mpdu_len;
u_int32_t mpdu_hdr_len;
u_int32_t mpdu_data_len;
+ u_int8_t offloadScanLearn:1;
+ u_int8_t roamCandidateInd:1;
+ u_int8_t scan:1;
}t_packetmeta, *tp_packetmeta;
/* implementation specific vos packet type */
diff --git a/CORE/VOSS/inc/vos_utils.h b/CORE/VOSS/inc/vos_utils.h
index 48414751237a..123f5d7fe742 100644
--- a/CORE/VOSS/inc/vos_utils.h
+++ b/CORE/VOSS/inc/vos_utils.h
@@ -170,4 +170,5 @@ VOS_STATUS vos_decrypt_AES(v_U32_t cryptHandle, /* Handle */
v_U8_t *pKey); /* pointer to authentication key */
v_U32_t vos_chan_to_freq(v_U8_t chan);
+v_U8_t vos_freq_to_chan(v_U32_t freq);
#endif // #if !defined __VOSS_UTILS_H
diff --git a/CORE/VOSS/src/vos_api.c b/CORE/VOSS/src/vos_api.c
index d802a0f1ccec..10e73f0565e1 100644
--- a/CORE/VOSS/src/vos_api.c
+++ b/CORE/VOSS/src/vos_api.c
@@ -680,7 +680,17 @@ VOS_STATUS vos_preStart( v_CONTEXT_t vosContext )
return VOS_STATUS_E_FAILURE;
}
#ifndef QCA_WIFI_ISOC
- wma_wait_for_ready_event(gpVosContext->pWDAContext);
+ vStatus = wma_wait_for_ready_event(gpVosContext->pWDAContext);
+ if (!VOS_IS_STATUS_SUCCESS(vStatus))
+ {
+ VOS_TRACE(VOS_MODULE_ID_SYS, VOS_TRACE_LEVEL_FATAL,
+ "Failed to get ready event from target firmware");
+ macStop(gpVosContext->pMACContext, HAL_STOP_TYPE_SYS_DEEP_SLEEP);
+ ccmStop(gpVosContext->pMACContext);
+ HTCStop(gpVosContext->htc_ctx);
+ VOS_ASSERT( 0 );
+ return VOS_STATUS_E_FAILURE;
+ }
#endif
#endif /* QCA_WIFI_2_0 */
@@ -2045,6 +2055,7 @@ vos_fetch_tl_cfg_parms
pTLConfig->ucAcWeights[3] = pConfig->WfqVoWeight;
pTLConfig->uDelayedTriggerFrmInt = pConfig->DelayedTriggerFrmInt;
pTLConfig->uMinFramesProcThres = pConfig->MinFramesProcThres;
+ pTLConfig->ip_checksum_offload = pConfig->enableIPChecksumOffload;
}
diff --git a/CORE/VOSS/src/vos_nvitem.c b/CORE/VOSS/src/vos_nvitem.c
index c9685501a73f..2b80ab3022b7 100644
--- a/CORE/VOSS/src/vos_nvitem.c
+++ b/CORE/VOSS/src/vos_nvitem.c
@@ -1930,7 +1930,7 @@ static int create_crda_regulatory_entry(struct wiphy *wiphy,
if (wiphy->bands[i] == NULL)
{
pr_info("error: wiphy->bands[i] is NULL, i = %d\n", i);
- return -1;
+ continue;
}
// internal channels[] is one continous array for both 2G and 5G bands
// m is internal starting channel index for each band
@@ -2294,36 +2294,34 @@ int wlan_hdd_crda_reg_notifier(struct wiphy *wiphy,
if (request->initiator == NL80211_REGDOM_SET_BY_USER)
{
wiphy_dbg(wiphy, "info: set by user\n");
- if (create_crda_regulatory_entry(wiphy, request, pHddCtx->cfg_ini->nBandCapability) != 0)
+ if (create_crda_regulatory_entry(wiphy, request, pHddCtx->cfg_ini->nBandCapability) != 0) {
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,9,0))
return;
#else
return 0;
#endif
- // ToDo
- /* Don't change default country code to CRDA country code by user req */
+ }
/* Shouldcall sme_ChangeCountryCode to send a message to trigger read
regd for new country settings */
- //sme_ChangeCountryCode(pHddCtx->hHal, NULL,
- // &country_code[0], pAdapter, pHddCtx->pvosContext);
+ sme_ChangeCountryCode(pHddCtx->hHal, NULL,
+ &request->alpha2[0], NULL, pHddCtx->pvosContext);
}
else if (request->initiator == NL80211_REGDOM_SET_BY_COUNTRY_IE)
{
wiphy_dbg(wiphy, "info: set by country IE\n");
- if (create_crda_regulatory_entry(wiphy, request, pHddCtx->cfg_ini->nBandCapability) != 0)
+ if (create_crda_regulatory_entry(wiphy, request, pHddCtx->cfg_ini->nBandCapability) != 0) {
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,9,0))
return;
#else
return 0;
#endif
- // ToDo
- /* Intersect of 11d and crda settings */
+ }
- /* Don't change default country code to CRDA country code by 11d req */
- /* for every adapter call sme_ChangeCountryCode to trigger read regd
+ /* Intersect of 11d and crda settings */
+ /* call sme_ChangeCountryCode to trigger read regd
for intersected new country settings */
- // sme_ChangeCountryCode(pHddCtx->hHal, NULL,
- // &country_code[0], pAdapter, pHddCtx->pvosContext);
+ sme_ChangeCountryCode(pHddCtx->hHal, NULL,
+ &request->alpha2[0], NULL, pHddCtx->pvosContext);
}
else if (request->initiator == NL80211_REGDOM_SET_BY_DRIVER)
{
diff --git a/CORE/VOSS/src/vos_utils.c b/CORE/VOSS/src/vos_utils.c
index b78aab21d6a9..8a43a429935b 100644
--- a/CORE/VOSS/src/vos_utils.c
+++ b/CORE/VOSS/src/vos_utils.c
@@ -714,3 +714,19 @@ v_U32_t vos_chan_to_freq(v_U8_t chan)
else
return VOS_5_GHZ_BASE_FREQ + chan * VOS_CHAN_SPACING_5MHZ;
}
+
+v_U8_t vos_freq_to_chan(v_U32_t freq)
+{
+ v_U8_t chan;
+
+ if (freq > VOS_24_GHZ_BASE_FREQ && freq < VOS_CHAN_14_FREQ)
+ chan = ((freq - VOS_24_GHZ_BASE_FREQ)/VOS_CHAN_SPACING_5MHZ);
+ else if (freq == VOS_CHAN_14_FREQ)
+ chan = VOS_24_GHZ_CHANNEL_14;
+ else if ((freq > VOS_24_GHZ_BASE_FREQ) && (freq < VOS_5_GHZ_BASE_FREQ))
+ chan = (((freq - VOS_CHAN_15_FREQ)/VOS_CHAN_SPACING_20MHZ) +
+ VOS_24_GHZ_CHANNEL_15);
+ else
+ chan = (freq - VOS_5_GHZ_BASE_FREQ)/VOS_CHAN_SPACING_5MHZ;
+ return chan;
+}
diff --git a/CORE/WDA/inc/legacy/halMsgApi.h b/CORE/WDA/inc/legacy/halMsgApi.h
index f8ebfb95c864..ec8dda3c3b04 100644
--- a/CORE/WDA/inc/legacy/halMsgApi.h
+++ b/CORE/WDA/inc/legacy/halMsgApi.h
@@ -263,8 +263,8 @@ typedef struct
/* The unicast encryption type in the association */
tANI_U32 encryptType;
-
- /*The DPU signatures will be sent eventually to TL to help it determine the
+
+ /*The DPU signatures will be sent eventually to TL to help it determine the
association to which a packet belongs to*/
/*Unicast DPU index*/
tANI_U8 ucUcastSig;
@@ -272,7 +272,7 @@ typedef struct
/*Broadcast DPU index*/
tANI_U8 ucBcastSig;
- tANI_U8 sessionId; //PE session id for PE<->HAL interface
+ tANI_U8 sessionId; //PE session id for PE<->HAL interface
// HAL just sends back what it receives.
/*if this is a P2P Capable Sta*/
@@ -282,6 +282,7 @@ typedef struct
tANI_U8 vhtCapable;
tANI_U8 vhtTxChannelWidthSet;
tANI_U8 vhtTxBFCapable;
+ tANI_U8 vhtTxMUBformeeCapable;
#endif
tANI_U8 htLdpcCapable;
@@ -326,7 +327,7 @@ typedef struct
tANI_U16 assocId;
eHalStatus status; // Status of SIR_HAL_DELETE_STA_REQ is reported here
tANI_U8 respReqd;
- tANI_U8 sessionId; // PE session id for PE<->HAL interface
+ tANI_U8 sessionId; // PE session id for PE<->HAL interface
// PE session id now added to all HAL<->PE transacations
// HAL sends it back unmodified.
tANI_U8 smesessionId;
@@ -353,7 +354,7 @@ typedef struct
* via response message. HAL does not read them.
*/
eHalStatus status; // status of SIR_HAL_SET_STAKEY_REQ is reported here
- tANI_U8 sessionId; // PE session id for PE<->HAL interface
+ tANI_U8 sessionId; // PE session id for PE<->HAL interface
// PE session id now added to all HAL<->PE transacations
// HAL sends back response with no modification
@@ -473,7 +474,7 @@ typedef struct
//HAL will send the response message to LIM only when this flag is set.
//LIM will set this flag, whereas DVT will not set this flag.
tANI_U8 respReqd;
- tANI_U8 sessionId; // PE session id for PE<->HAL interface
+ tANI_U8 sessionId; // PE session id for PE<->HAL interface
// PE session id now added to all HAL<->PE transacations
// HAL Sends the sessionId unmodified.
@@ -488,7 +489,7 @@ typedef struct
#endif
tANI_U8 ucMaxProbeRespRetryLimit; //probe Response Max retries
- tANI_U8 bHiddenSSIDEn; //To Enable Hidden ssid.
+ tANI_U8 bHiddenSSIDEn; //To Enable Hidden ssid.
tANI_U8 bProxyProbeRespEn; //To Enable Disable FW Proxy Probe Resp
tANI_U8 halPersona; //Persona for the BSS can be STA,AP,GO,CLIENT value same as tVOS_CON_MODE
@@ -498,6 +499,7 @@ typedef struct
tANI_U8 vhtCapable;
tANI_U8 vhtTxChannelWidthSet;
#endif
+ tANI_U8 reassocReq; // Set only during roaming reassociation
} tAddBssParams, * tpAddBssParams;
typedef struct
@@ -508,7 +510,7 @@ typedef struct
//HAL will send the response message to LIM only when this flag is set.
//LIM will set this flag, whereas DVT will not set this flag.
tANI_U8 respReqd;
- tANI_U8 sessionId; // PE session id for PE<->HAL interface
+ tANI_U8 sessionId; // PE session id for PE<->HAL interface
// HAL sends it back unmodified.
tSirMacAddr bssid; // Will be removed for PE-HAL integration
tANI_U8 smesessionId;
@@ -516,7 +518,7 @@ typedef struct
//
// UAPSD AC mask: 1b per AC
-// LSB 4 bits for delivery enabled setting. msb 4 bits for trigger enabled settings.
+// LSB 4 bits for delivery enabled setting. msb 4 bits for trigger enabled settings.
// Encoded as follows:
// b7 b6 b5 b4 b3 b2 b1 b0
// BE BK VI VO BE BK VI VO
@@ -524,8 +526,8 @@ typedef struct
typedef struct
{
tANI_U8 staIdx;
- tANI_U8 uapsdACMask;
- tANI_U8 maxSpLen;
+ tANI_U8 uapsdACMask;
+ tANI_U8 maxSpLen;
} tUpdateUapsdParams, * tpUpdateUapsdParams;
typedef struct sSirScanEntry
@@ -588,10 +590,10 @@ typedef enum eDelStaReasonCode{
typedef struct {
tANI_U16 assocId;
tANI_U16 staId;
- tSirMacAddr bssId; // TO SUPPORT BT-AMP
+ tSirMacAddr bssId; // TO SUPPORT BT-AMP
// HAL copies bssid from the sta table.
- tSirMacAddr addr2; //
- tANI_U16 reasonCode; // To unify the keepalive / unknown A2 / tim-based disa
+ tSirMacAddr addr2; //
+ tANI_U16 reasonCode; // To unify the keepalive / unknown A2 / tim-based disa
} tDeleteStaContext, * tpDeleteStaContext;
@@ -684,14 +686,22 @@ typedef struct {
} tFinishScanParams, * tpFinishScanParams;
-#ifdef FEATURE_OEM_DATA_SUPPORT
+#ifdef FEATURE_OEM_DATA_SUPPORT
#ifndef OEM_DATA_REQ_SIZE
+#ifdef QCA_WIFI_2_0
+#define OEM_DATA_REQ_SIZE 276
+#else
#define OEM_DATA_REQ_SIZE 134
#endif
+#endif
#ifndef OEM_DATA_RSP_SIZE
+#ifdef QCA_WIFI_2_0
+#define OEM_DATA_RSP_SIZE 1720
+#else
#define OEM_DATA_RSP_SIZE 1968
#endif
+#endif
typedef struct
{
@@ -700,7 +710,7 @@ typedef struct
tANI_U8 oemDataReq[OEM_DATA_REQ_SIZE];
} tStartOemDataReq, *tpStartOemDataReq;
-typedef struct
+typedef struct
{
tANI_U8 oemDataRsp[OEM_DATA_RSP_SIZE];
} tStartOemDataRsp, *tpStartOemDataRsp;
@@ -741,7 +751,7 @@ typedef struct {
typedef struct sSendProbeRespParams {
tSirMacAddr bssId;
- tANI_U8 *pProbeRespTemplate;
+ tANI_U8 *pProbeRespTemplate;
tANI_U32 probeRespTemplateLen;
tANI_U32 ucProxyProbeReqValidIEBmap[8];
} tSendProbeRespParams, * tpSendProbeRespParams;
@@ -762,7 +772,7 @@ typedef struct
* via response message. HAL does not read them.
*/
eHalStatus status; // status of SIR_HAL_SET_BSSKEY_REQ is reported here
- tANI_U8 sessionId; // PE session id for PE<->HAL interface
+ tANI_U8 sessionId; // PE session id for PE<->HAL interface
// HAL sends this unmodified in the response
} tSetBssKeyParams, *tpSetBssKeyParams;
@@ -779,10 +789,10 @@ typedef struct
* Following parameter is for returning status
* via response message. HAL does not read them.
*/
- eHalStatus status; // return status of SIR_HAL_REMOVE_STAKEY_REQ
- tANI_U8 sessionId; // PE session id for PE<->HAL interface
- // HAL Sends back the PE session
- // id unmodified
+ eHalStatus status; // return status of SIR_HAL_REMOVE_STAKEY_REQ
+ tANI_U8 sessionId; // PE session id for PE<->HAL interface
+ // HAL Sends back the PE session
+ // id unmodified
} tRemoveStaKeyParams, *tpRemoveStaKeyParams;
/*
@@ -798,10 +808,10 @@ typedef struct
* Following parameter is for returning status
* via response message. HAL does not read them.
*/
- eHalStatus status; // return status of SIR_HAL_REMOVE_BSSKEY_REQ
- tANI_U8 sessionId; // PE session id for PE<->HAL interface
- // HAL Sends back the PE session
- // id unmodified
+ eHalStatus status; // return status of SIR_HAL_REMOVE_BSSKEY_REQ
+ tANI_U8 sessionId; // PE session id for PE<->HAL interface
+ // HAL Sends back the PE session
+ // id unmodified
} tRemoveBssKeyParams, *tpRemoveBssKeyParams;
typedef struct
@@ -870,7 +880,7 @@ typedef struct
}tUpdateBeaconParams, *tpUpdateBeaconParams;
#ifdef WLAN_FEATURE_11AC
-typedef struct
+typedef struct
{
tANI_U16 opMode;
tANI_U16 staId;
@@ -927,7 +937,7 @@ typedef struct
typedef struct
{
tANI_U8 channelNumber;
-#ifndef WLAN_FEATURE_VOWIFI
+#ifndef WLAN_FEATURE_VOWIFI
tANI_U8 localPowerConstraint;
#endif /* WLAN_FEATURE_VOWIFI */
ePhyChanBondState secondaryChannelOffset;
@@ -938,7 +948,7 @@ typedef struct
#endif
tSirMacAddr selfStaMacAddr;
//the request has power constraints, this should be applied only to that session
- /* VO Wifi comment: BSSID is needed to identify which session issued this request. As the
+ /* VO Wifi comment: BSSID is needed to identify which session issued this request. As the
request has power constraints, this should be applied only to that session */
/* V IMP: Keep bssId field at the end of this msg. It is used to mantain backward compatbility
* by way of ignoring if using new host/old FW or old host/new FW since it is at the end of this struct
@@ -972,7 +982,10 @@ typedef struct
tANI_U16 tspecIdx; //TSPEC handler uniquely identifying a TSPEC for a STA in a BSS
tSirMacTspecIE tspec;
eHalStatus status;
- tANI_U8 sessionId; //PE session id for PE<->HAL interface
+ tANI_U8 sessionId; //PE session id for PE<->HAL interface
+#ifdef FEATURE_WLAN_CCX
+ tANI_U16 tsm_interval; // TSM interval period passed from lim to wda
+#endif
} tAddTsParams, *tpAddTsParams;
typedef struct
@@ -980,7 +993,7 @@ typedef struct
tANI_U16 staIdx;
tANI_U16 tspecIdx; //TSPEC identifier uniquely identifying a TSPEC for a STA in a BSS
tSirMacAddr bssId; //TO SUPPORT BT-AMP
-
+
} tDelTsParams, *tpDelTsParams;
#ifdef WLAN_FEATURE_VOWIFI_11R
@@ -994,7 +1007,7 @@ typedef struct
tANI_U16 tspecIdx; //TSPEC handler uniquely identifying a TSPEC for a STA in a BSS
tSirMacTspecIE tspec[HAL_QOS_NUM_AC_MAX];
eHalStatus status[HAL_QOS_NUM_AC_MAX];
- tANI_U8 sessionId; //PE session id for PE<->HAL interface
+ tANI_U8 sessionId; //PE session id for PE<->HAL interface
}tAggrAddTsParams, *tpAggrAddTsParams;
#endif /* WLAN_FEATURE_VOWIFI_11R */
@@ -1077,9 +1090,9 @@ typedef struct sAddBAParams
// Indicating to HAL whether a response message is required.
tANI_U8 respReqd;
- tANI_U8 sessionId; // PE session id for PE<->HAL interface
- // HAL Sends back the PE session
- // id unmodified
+ tANI_U8 sessionId; // PE session id for PE<->HAL interface
+ // HAL Sends back the PE session
+ // id unmodified
} tAddBAParams, * tpAddBAParams;
@@ -1196,7 +1209,7 @@ typedef struct sBADeleteParams
tANI_U32 reasonCode;
- tSirMacAddr bssId; // TO SUPPORT BT-AMP
+ tSirMacAddr bssId; // TO SUPPORT BT-AMP
// HAL copies the sta bssid to this.
} tBADeleteParams, * tpBADeleteParams;
@@ -1207,7 +1220,7 @@ typedef struct sBaActivityInd
tANI_U16 baCandidateCnt;
//baCandidateCnt is followed by BA Candidate List ( tAddBaCandidate)
- tSirMacAddr bssId; // TO SUPPORT BT-AMP
+ tSirMacAddr bssId; // TO SUPPORT BT-AMP
} tBaActivityInd, * tpBaActivityInd;
@@ -1281,7 +1294,7 @@ typedef struct sEnterBmpsRspParams
//
typedef struct sMaxTxPowerParams
{
- tSirMacAddr bssId; // BSSID is needed to identify which session issued this request. As
+ tSirMacAddr bssId; // BSSID is needed to identify which session issued this request. As
//the request has power constraints, this should be applied only to that session
tSirMacAddr selfStaMacAddr;
//In request,
@@ -1316,14 +1329,14 @@ typedef struct sP2pPsParams
{
tANI_U8 opp_ps;
tANI_U32 ctWindow;
- tANI_U8 count;
+ tANI_U8 count;
tANI_U32 duration;
tANI_U32 interval;
tANI_U32 single_noa_duration;
tANI_U8 psSelection;
}tP2pPsParams, *tpP2pPsParams;
-static inline void halGetTxTSFtimer(tpAniSirGlobal pMac,
+static inline void halGetTxTSFtimer(tpAniSirGlobal pMac,
tSirMacTimeStamp *pTime)
{
}
@@ -1350,7 +1363,7 @@ typedef __ani_attr_pre_packed struct sEidByteInfo
} __ani_attr_packed tEidByteInfo, *tpEidByteInfo;
-/* The above structure would be followed by multiple of below mentioned
+/* The above structure would be followed by multiple of below mentioned
structure */
typedef __ani_attr_pre_packed struct sBeaconFilterIe
{
@@ -1359,7 +1372,7 @@ typedef __ani_attr_pre_packed struct sBeaconFilterIe
tEidByteInfo byte;
} __ani_attr_packed tBeaconFilterIe, *tpBeaconFilterIe;
-typedef __ani_attr_pre_packed struct sRemBeaconFilterMsg
+typedef __ani_attr_pre_packed struct sRemBeaconFilterMsg
{
tANI_U8 ucIeCount;
tANI_U8 ucRemIeId[1];
diff --git a/CORE/WDA/inc/wlan_qct_wda.h b/CORE/WDA/inc/wlan_qct_wda.h
index acf3aee1cb8e..71c0314b1345 100644
--- a/CORE/WDA/inc/wlan_qct_wda.h
+++ b/CORE/WDA/inc/wlan_qct_wda.h
@@ -200,9 +200,9 @@ typedef enum
WDA_TLI_802_3_HEADER_LEN:WDA_TLI_802_11_HEADER_LEN )
/* TX channel enum type:
-
- We have five types of TX packets so far and want to block/unblock each
- traffic individually according to, for example, low resouce condition.
+
+ We have five types of TX packets so far and want to block/unblock each
+ traffic individually according to, for example, low resouce condition.
Define five TX channels for UMAC here. WDA can map these logical
channels to physical DXE channels if needed.
*/
@@ -223,8 +223,8 @@ typedef enum
/* ---------------------------------------------------------------------
Libra and Volans specifics
- TODO Consider refactoring it and put it into two separate headers,
- one for Prima and one for Volans
+ TODO Consider refactoring it and put it into two separate headers,
+ one for Prima and one for Volans
----------------------------------------------------------------------*/
/* For backward compatability with SDIO. It's BAL header size for SDIO
@@ -247,7 +247,7 @@ typedef enum
# define WDA_NUM_STA 8
/* For backward compatability with SDIO.
-
+
For SDIO interface, calculate the TX frame length and number of PDU
to transfter the frame.
@@ -306,10 +306,10 @@ typedef enum
/* 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,
+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 );
@@ -332,8 +332,8 @@ typedef void (*wda_tgt_cfg_cb) (void *context, void *param);
typedef struct
{
tANI_U16 ucValidStaIndex ;
- /*
- * each bit in ucUseBaBitmap represent BA is enabled or not for this tid
+ /*
+ * each bit in ucUseBaBitmap represent BA is enabled or not for this tid
* tid0 ..bit0, tid1..bit1 and so on..
*/
tANI_U8 ucUseBaBitmap ;
@@ -362,7 +362,7 @@ typedef struct
{
v_PVOID_t pVosContext; /* global VOSS context*/
v_PVOID_t pWdiContext; /* WDI context */
- WDA_state wdaState ; /* WDA state tracking */
+ WDA_state wdaState ; /* WDA state tracking */
v_PVOID_t wdaWdiCfgApiMsgParam ; /* WDI API paramter tracking */
vos_event_t wdaWdiEvent; /* WDI API sync event */
@@ -372,7 +372,7 @@ typedef struct
/* call back function for tx complete*/
pWDATxRxCompFunc pTxCbFunc;
/* call back function for tx packet ack */
- pWDAAckFnTxComp pAckTxCbFunc;
+ pWDAAckFnTxComp pAckTxCbFunc;
tANI_U32 frameTransRequired;
tSirMacAddr macBSSID; /*BSSID of the network */
tSirMacAddr macSTASelf; /*Self STA MAC*/
@@ -383,16 +383,16 @@ typedef struct
/* TL's TX resource callback */
WDA_DS_ResourceCB pfnTxResourceCB;
/* TL's TX complete callback */
- WDA_DS_TxCompleteCallback pfnTxCompleteCallback;
+ WDA_DS_TxCompleteCallback pfnTxCompleteCallback;
#endif
-
+
tWdaStaInfo wdaStaInfo[WDA_MAX_STA];
tANI_U8 wdaMaxSta;
tWdaTimers wdaTimers;
/* STA, AP, IBSS, MULTI-BSS etc.*/
- tBssSystemRole wdaGlobalSystemRole;
+ tBssSystemRole wdaGlobalSystemRole;
/* driver mode, PRODUCTION or FTM */
tDriverType driverMode;
@@ -405,7 +405,7 @@ typedef struct
/* Status frm TL after suspend/resume Tx */
tANI_U8 txStatus;
/* Flag set to true when TL suspend timesout.*/
- tANI_U8 txSuspendTimedOut;
+ tANI_U8 txSuspendTimedOut;
vos_event_t waitOnWdiIndicationCallBack;
@@ -415,7 +415,7 @@ typedef struct
tSirVersionString wcnssSoftwareVersionString;
tSirVersionString wcnssHardwareVersionString;
-
+
tSirLinkState linkState;
/* set, when BT AMP session is going on */
v_BOOL_t wdaAmpSessionOn;
@@ -423,14 +423,14 @@ typedef struct
v_BOOL_t needShutdown;
v_BOOL_t wdiFailed;
v_BOOL_t wdaTimersCreated;
-} tWDA_CbContext ;
+} tWDA_CbContext ;
typedef struct
{
v_PVOID_t pWdaContext; /* pointer to WDA context*/
v_PVOID_t wdaMsgParam; /* PE parameter tracking */
v_PVOID_t wdaWdiApiMsgParam; /* WDI API paramter tracking */
-} tWDA_ReqParams;
+} tWDA_ReqParams;
#ifdef QCA_WIFI_2_0
typedef struct {
@@ -486,16 +486,16 @@ VOS_STATUS WDA_open(v_PVOID_t pVosContext, v_PVOID_t pOSContext,
/*
* FUNCTION: WDA_preStart
- * Trigger DAL-AL to start CFG download
- */
+ * 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
- */
+ * Trigger WDA to start CFG download
+ */
VOS_STATUS WDA_preStart(v_PVOID_t pVosContext) ;
/*
* FUNCTION: WDA_stop
@@ -527,8 +527,8 @@ v_BOOL_t WDA_needShutdown(v_PVOID_t pVosContext);
/*
* FUNCTION: WDA_McProcessMsg
- * DAL-AL message processing entry function
- */
+ * DAL-AL message processing entry function
+ */
VOS_STATUS WDA_McProcessMsg( v_CONTEXT_t pVosContext, vos_msg_t *pMsg ) ;
@@ -538,12 +538,12 @@ VOS_STATUS WDA_McProcessMsg( v_CONTEXT_t pVosContext, vos_msg_t *pMsg ) ;
/*
* FUNCTION: WDA_MgmtDSRegister
* Send Message back to PE
- */
+ */
-VOS_STATUS WDA_MgmtDSRegister(tWDA_CbContext *pWDA,
+VOS_STATUS WDA_MgmtDSRegister(tWDA_CbContext *pWDA,
WDA_DS_TxCompleteCb WDA_TxCompleteCallback,
- WDA_DS_RxCompleteCb WDA_RxCompleteCallback,
- WDA_DS_TxFlowControlCb WDA_TxFlowCtrlCallback
+ WDA_DS_RxCompleteCb WDA_RxCompleteCallback,
+ WDA_DS_TxFlowControlCb WDA_TxFlowCtrlCallback
) ;
/*
@@ -555,12 +555,12 @@ VOS_STATUS WDA_PostMsgApi(tpAniSirGlobal pMac, tSirMsgQ *pMsg) ;
/* ---------------------------------------------------------
* FUNCTION: wdaGetGlobalSystemRole()
*
- * Get the global HAL system role.
+ * Get the global HAL system role.
* ---------------------------------------------------------
*/
tBssSystemRole wdaGetGlobalSystemRole(tpAniSirGlobal pMac);
-/* maximum wait time for WDA complete event (correct value has to be derived)
+/* 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 */
@@ -568,7 +568,7 @@ tBssSystemRole wdaGetGlobalSystemRole(tpAniSirGlobal pMac);
#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_MGMT_TIMED_OUT 0xDEAD
#define WDA_TL_TX_SUSPEND_SUCCESS 0
#define WDA_TL_TX_SUSPEND_FAILURE 1
@@ -622,12 +622,15 @@ tBssSystemRole wdaGetGlobalSystemRole(tpAniSirGlobal pMac);
#define WDA_GET_RX_TIMESTAMP(pRxMeta) \
(((t_packetmeta *)pRxMeta)->timestamp)
-#define WDA_IS_RX_IN_SCAN(pRxMeta) 0
+#define WDA_IS_RX_IN_SCAN(pRxMeta) \
+ (((t_packetmeta *)pRxMeta)->scan)
#ifdef WLAN_FEATURE_ROAM_SCAN_OFFLOAD
-#define WDA_GET_OFFLOADSCANLEARN(pRxMeta) 0
+#define WDA_GET_OFFLOADSCANLEARN(pRxMeta) \
+ (((t_packetmeta *)pRxMeta)->offloadScanLearn)
+#define WDA_GET_ROAMCANDIDATEIND(pRxMeta) \
+ (((t_packetmeta *)pRxMeta)->roamCandidateInd)
-#define WDA_GET_ROAMCANDIDATEIND(pRxMeta) 0
#endif
#define WDA_GET_RX_SNR(pRxMeta) \
@@ -641,7 +644,7 @@ tBssSystemRole wdaGetGlobalSystemRole(tpAniSirGlobal pMac);
#else /* #ifdef QCA_WIFI_2_0 */
/* ---------------------------------------------------------------------------
-
+
RX Meta info access for Integrated SOC
RX BD header access for NON Integrated SOC
@@ -683,7 +686,7 @@ tBssSystemRole wdaGetGlobalSystemRole(tpAniSirGlobal pMac);
# 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,
+// 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
@@ -709,7 +712,7 @@ tBssSystemRole wdaGetGlobalSystemRole(tpAniSirGlobal pMac);
/* 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)
@@ -772,7 +775,7 @@ tBssSystemRole wdaGetGlobalSystemRole(tpAniSirGlobal pMac);
/* WDA_IS_RX_LAST_MPDU *******************************************************/
# define WDA_IS_RX_LAST_MPDU(pRxMeta) \
- ( ((WDI_DS_RxMetaInfoType*)(pRxMeta))->rxpFlags & WLANWDA_HO_LAST_MPDU_OF_AMPDU )
+ ( ((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)
@@ -801,7 +804,7 @@ tBssSystemRole wdaGetGlobalSystemRole(tpAniSirGlobal pMac);
/* WDA_IS_RX_FC **************************************************************/
// Flow control frames
-/* FIXME WDA should provide the meta info which indicates FC frame
+/* 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)
@@ -895,7 +898,7 @@ tSirRetStatus uMacPostCtrlMsg(void* pSirGlobal, tSirMbMsg* pMb);
//#define WDA_BTC_SET_CFG SIR_HAL_BTC_SET_CFG
//Required by PE
-#define WDA_HOST_MSG_START SIR_HAL_HOST_MSG_START
+#define WDA_HOST_MSG_START SIR_HAL_HOST_MSG_START
#define WDA_INITIAL_CAL_FAILED_NTF SIR_HAL_INITIAL_CAL_FAILED_NTF
#define WDA_SHUTDOWN_REQ SIR_HAL_SHUTDOWN_REQ
#define WDA_SHUTDOWN_CNF SIR_HAL_SHUTDOWN_CNF
@@ -905,7 +908,7 @@ tSirRetStatus uMacPostCtrlMsg(void* pSirGlobal, tSirMbMsg* pMb);
(eHalStatus halPhySetRegDomain(tHalHandle hHal, eRegDomainId regDomain))
#endif
-#define WDA_APP_SETUP_NTF SIR_HAL_APP_SETUP_NTF
+#define WDA_APP_SETUP_NTF SIR_HAL_APP_SETUP_NTF
#define WDA_NIC_OPER_NTF SIR_HAL_NIC_OPER_NTF
#define WDA_INIT_START_REQ SIR_HAL_INIT_START_REQ
#define WDA_RESET_REQ SIR_HAL_RESET_REQ
@@ -919,14 +922,14 @@ tSirRetStatus uMacPostCtrlMsg(void* pSirGlobal, tSirMbMsg* pMb);
#define WDA_MSG_TYPES_BEGIN SIR_HAL_MSG_TYPES_BEGIN
#define WDA_ITC_MSG_TYPES_BEGIN SIR_HAL_ITC_MSG_TYPES_BEGIN
#define WDA_RADAR_DETECTED_IND SIR_HAL_RADAR_DETECTED_IND
-#define WDA_WDT_KAM_RSP SIR_HAL_WDT_KAM_RSP
+#define WDA_WDT_KAM_RSP SIR_HAL_WDT_KAM_RSP
#define WDA_TIMER_TEMP_MEAS_REQ SIR_HAL_TIMER_TEMP_MEAS_REQ
#define WDA_TIMER_PERIODIC_STATS_COLLECT_REQ SIR_HAL_TIMER_PERIODIC_STATS_COLLECT_REQ
#define WDA_CAL_REQ_NTF SIR_HAL_CAL_REQ_NTF
#define WDA_MNT_OPEN_TPC_TEMP_MEAS_REQ SIR_HAL_MNT_OPEN_TPC_TEMP_MEAS_REQ
#define WDA_CCA_MONITOR_INTERVAL_TO SIR_HAL_CCA_MONITOR_INTERVAL_TO
#define WDA_CCA_MONITOR_DURATION_TO SIR_HAL_CCA_MONITOR_DURATION_TO
-#define WDA_CCA_MONITOR_START SIR_HAL_CCA_MONITOR_START
+#define WDA_CCA_MONITOR_START SIR_HAL_CCA_MONITOR_START
#define WDA_CCA_MONITOR_STOP SIR_HAL_CCA_MONITOR_STOP
#define WDA_CCA_CHANGE_MODE SIR_HAL_CCA_CHANGE_MODE
#define WDA_TIMER_WRAP_AROUND_STATS_COLLECT_REQ SIR_HAL_TIMER_WRAP_AROUND_STATS_COLLECT_REQ
@@ -938,7 +941,7 @@ tSirRetStatus uMacPostCtrlMsg(void* pSirGlobal, tSirMbMsg* pMb);
#define WDA_ADD_STA_RSP SIR_HAL_ADD_STA_RSP
#define WDA_ADD_STA_SELF_RSP SIR_HAL_ADD_STA_SELF_RSP
#define WDA_DEL_STA_SELF_RSP SIR_HAL_DEL_STA_SELF_RSP
-#define WDA_DELETE_STA_REQ SIR_HAL_DELETE_STA_REQ
+#define WDA_DELETE_STA_REQ SIR_HAL_DELETE_STA_REQ
#define WDA_DELETE_STA_RSP SIR_HAL_DELETE_STA_RSP
#define WDA_ADD_BSS_REQ SIR_HAL_ADD_BSS_REQ
#define WDA_ADD_BSS_RSP SIR_HAL_ADD_BSS_RSP
@@ -965,7 +968,7 @@ tSirRetStatus uMacPostCtrlMsg(void* pSirGlobal, tSirMbMsg* pMb);
#define WDA_SET_BSSKEY_RSP SIR_HAL_SET_BSSKEY_RSP
#define WDA_SET_STAKEY_REQ SIR_HAL_SET_STAKEY_REQ
#define WDA_SET_STAKEY_RSP SIR_HAL_SET_STAKEY_RSP
-#define WDA_DPU_STATS_REQ SIR_HAL_DPU_STATS_REQ
+#define WDA_DPU_STATS_REQ SIR_HAL_DPU_STATS_REQ
#define WDA_DPU_STATS_RSP SIR_HAL_DPU_STATS_RSP
#define WDA_GET_DPUINFO_REQ SIR_HAL_GET_DPUINFO_REQ
#define WDA_GET_DPUINFO_RSP SIR_HAL_GET_DPUINFO_RSP
@@ -985,7 +988,7 @@ tSirRetStatus uMacPostCtrlMsg(void* pSirGlobal, tSirMbMsg* pMb);
#define WDA_MBOX_SENDMSG_COMPLETE_IND SIR_HAL_MBOX_SENDMSG_COMPLETE_IND
#define WDA_EXIT_BMPS_REQ SIR_HAL_EXIT_BMPS_REQ
#define WDA_EXIT_BMPS_RSP SIR_HAL_EXIT_BMPS_RSP
-#define WDA_EXIT_BMPS_IND SIR_HAL_EXIT_BMPS_IND
+#define WDA_EXIT_BMPS_IND SIR_HAL_EXIT_BMPS_IND
#define WDA_ENTER_BMPS_REQ SIR_HAL_ENTER_BMPS_REQ
#define WDA_ENTER_BMPS_RSP SIR_HAL_ENTER_BMPS_RSP
#define WDA_BMPS_STATUS_IND SIR_HAL_BMPS_STATUS_IND
@@ -1008,7 +1011,7 @@ tSirRetStatus uMacPostCtrlMsg(void* pSirGlobal, tSirMbMsg* pMb);
#define WDA_SOFTMAC_BULKREGREAD_RESPONSE SIR_HAL_SOFTMAC_BULKREGREAD_RESPONSE
#define WDA_SOFTMAC_HOSTMESG_MSGPROCESSRESULT SIR_HAL_SOFTMAC_HOSTMESG_MSGPROCESSRESULT
-#define WDA_ADDBA_REQ SIR_HAL_ADDBA_REQ
+#define WDA_ADDBA_REQ SIR_HAL_ADDBA_REQ
#define WDA_ADDBA_RSP SIR_HAL_ADDBA_RSP
#define WDA_DELBA_IND SIR_HAL_DELBA_IND
#define WDA_DEL_BA_IND SIR_HAL_DEL_BA_IND
@@ -1024,11 +1027,11 @@ tSirRetStatus uMacPostCtrlMsg(void* pSirGlobal, tSirMbMsg* pMb);
#define WDA_ENTER_IMPS_RSP SIR_HAL_ENTER_IMPS_RSP
#define WDA_EXIT_IMPS_RSP SIR_HAL_EXIT_IMPS_RSP
#define WDA_EXIT_IMPS_REQ SIR_HAL_EXIT_IMPS_REQ
-#define WDA_SOFTMAC_HOSTMESG_PS_STATUS_IND SIR_HAL_SOFTMAC_HOSTMESG_PS_STATUS_IND
+#define WDA_SOFTMAC_HOSTMESG_PS_STATUS_IND SIR_HAL_SOFTMAC_HOSTMESG_PS_STATUS_IND
#define WDA_POSTPONE_ENTER_IMPS_RSP SIR_HAL_POSTPONE_ENTER_IMPS_RSP
-#define WDA_STA_STAT_REQ SIR_HAL_STA_STAT_REQ
+#define WDA_STA_STAT_REQ SIR_HAL_STA_STAT_REQ
#define WDA_GLOBAL_STAT_REQ SIR_HAL_GLOBAL_STAT_REQ
-#define WDA_AGGR_STAT_REQ SIR_HAL_AGGR_STAT_REQ
+#define WDA_AGGR_STAT_REQ SIR_HAL_AGGR_STAT_REQ
#define WDA_STA_STAT_RSP SIR_HAL_STA_STAT_RSP
#define WDA_GLOBAL_STAT_RSP SIR_HAL_GLOBAL_STAT_RSP
#define WDA_AGGR_STAT_RSP SIR_HAL_AGGR_STAT_RSP
@@ -1038,7 +1041,7 @@ tSirRetStatus uMacPostCtrlMsg(void* pSirGlobal, tSirMbMsg* pMb);
#define WDA_REMOVE_BSSKEY_RSP SIR_HAL_REMOVE_BSSKEY_RSP
#define WDA_REMOVE_STAKEY_REQ SIR_HAL_REMOVE_STAKEY_REQ
#define WDA_REMOVE_STAKEY_RSP SIR_HAL_REMOVE_STAKEY_RSP
-#define WDA_SET_STA_BCASTKEY_REQ SIR_HAL_SET_STA_BCASTKEY_REQ
+#define WDA_SET_STA_BCASTKEY_REQ SIR_HAL_SET_STA_BCASTKEY_REQ
#define WDA_SET_STA_BCASTKEY_RSP SIR_HAL_SET_STA_BCASTKEY_RSP
#define WDA_REMOVE_STA_BCASTKEY_REQ SIR_HAL_REMOVE_STA_BCASTKEY_REQ
#define WDA_REMOVE_STA_BCASTKEY_RSP SIR_HAL_REMOVE_STA_BCASTKEY_RSP
@@ -1061,14 +1064,14 @@ tSirRetStatus uMacPostCtrlMsg(void* pSirGlobal, tSirMbMsg* pMb);
#define WDA_UPDATE_PROBE_RSP_IE_BITMAP_IND SIR_HAL_UPDATE_PROBE_RSP_IE_BITMAP_IND
#define WDA_UPDATE_UAPSD_IND SIR_HAL_UPDATE_UAPSD_IND
-#define WDA_SET_MIMOPS_REQ SIR_HAL_SET_MIMOPS_REQ
+#define WDA_SET_MIMOPS_REQ SIR_HAL_SET_MIMOPS_REQ
#define WDA_SET_MIMOPS_RSP SIR_HAL_SET_MIMOPS_RSP
#define WDA_SYS_READY_IND SIR_HAL_SYS_READY_IND
#define WDA_SET_TX_POWER_REQ SIR_HAL_SET_TX_POWER_REQ
#define WDA_SET_TX_POWER_RSP SIR_HAL_SET_TX_POWER_RSP
#define WDA_GET_TX_POWER_REQ SIR_HAL_GET_TX_POWER_REQ
#define WDA_GET_TX_POWER_RSP SIR_HAL_GET_TX_POWER_RSP
-#define WDA_GET_NOISE_REQ SIR_HAL_GET_NOISE_REQ
+#define WDA_GET_NOISE_REQ SIR_HAL_GET_NOISE_REQ
#define WDA_GET_NOISE_RSP SIR_HAL_GET_NOISE_RSP
#define WDA_SET_TX_PER_TRACKING_REQ SIR_HAL_SET_TX_PER_TRACKING_REQ
@@ -1082,9 +1085,9 @@ tSirRetStatus uMacPostCtrlMsg(void* pSirGlobal, tSirMbMsg* pMb);
#define WDA_BEACON_PRE_IND SIR_HAL_BEACON_PRE_IND
#define WDA_ENTER_UAPSD_REQ SIR_HAL_ENTER_UAPSD_REQ
#define WDA_ENTER_UAPSD_RSP SIR_HAL_ENTER_UAPSD_RSP
-#define WDA_EXIT_UAPSD_REQ SIR_HAL_EXIT_UAPSD_REQ
+#define WDA_EXIT_UAPSD_REQ SIR_HAL_EXIT_UAPSD_REQ
#define WDA_EXIT_UAPSD_RSP SIR_HAL_EXIT_UAPSD_RSP
-#define WDA_LOW_RSSI_IND SIR_HAL_LOW_RSSI_IND
+#define WDA_LOW_RSSI_IND SIR_HAL_LOW_RSSI_IND
#define WDA_BEACON_FILTER_IND SIR_HAL_BEACON_FILTER_IND
/// PE <-> HAL WOWL messages
#define WDA_WOWL_ADD_BCAST_PTRN SIR_HAL_WOWL_ADD_BCAST_PTRN
@@ -1109,7 +1112,7 @@ tSirRetStatus uMacPostCtrlMsg(void* pSirGlobal, tSirMbMsg* pMb);
#ifdef FEATURE_OEM_DATA_SUPPORT
/* PE <-> HAL OEM_DATA RELATED MESSAGES */
-#define WDA_START_OEM_DATA_REQ SIR_HAL_START_OEM_DATA_REQ
+#define WDA_START_OEM_DATA_REQ SIR_HAL_START_OEM_DATA_REQ
#define WDA_START_OEM_DATA_RSP SIR_HAL_START_OEM_DATA_RSP
#define WDA_FINISH_OEM_DATA_REQ SIR_HAL_FINISH_OEM_DATA_REQ
#endif
@@ -1117,7 +1120,7 @@ tSirRetStatus uMacPostCtrlMsg(void* pSirGlobal, tSirMbMsg* pMb);
#define WDA_SET_MAX_TX_POWER_REQ SIR_HAL_SET_MAX_TX_POWER_REQ
#define WDA_SET_MAX_TX_POWER_RSP SIR_HAL_SET_MAX_TX_POWER_RSP
-#define WDA_SEND_MSG_COMPLETE SIR_HAL_SEND_MSG_COMPLETE
+#define WDA_SEND_MSG_COMPLETE SIR_HAL_SEND_MSG_COMPLETE
/// PE <-> HAL Host Offload message
#define WDA_SET_HOST_OFFLOAD SIR_HAL_SET_HOST_OFFLOAD
@@ -1138,8 +1141,8 @@ tSirRetStatus uMacPostCtrlMsg(void* pSirGlobal, tSirMbMsg* pMb);
#define WDA_WLAN_RESUME_REQ SIR_HAL_WLAN_RESUME_REQ
#define WDA_MSG_TYPES_END SIR_HAL_MSG_TYPES_END
-#define WDA_MMH_TXMB_READY_EVT SIR_HAL_MMH_TXMB_READY_EVT
-#define WDA_MMH_RXMB_DONE_EVT SIR_HAL_MMH_RXMB_DONE_EVT
+#define WDA_MMH_TXMB_READY_EVT SIR_HAL_MMH_TXMB_READY_EVT
+#define WDA_MMH_RXMB_DONE_EVT SIR_HAL_MMH_RXMB_DONE_EVT
#define WDA_MMH_MSGQ_NE_EVT SIR_HAL_MMH_MSGQ_NE_EVT
#ifdef WLAN_FEATURE_VOWIFI_11R
@@ -1166,7 +1169,7 @@ tSirRetStatus uMacPostCtrlMsg(void* pSirGlobal, tSirMbMsg* pMb);
#endif
#ifdef WLAN_WAKEUP_EVENTS
-#define WDA_WAKE_REASON_IND SIR_HAL_WAKE_REASON_IND
+#define WDA_WAKE_REASON_IND SIR_HAL_WAKE_REASON_IND
#endif // WLAN_WAKEUP_EVENTS
#ifdef WLAN_FEATURE_PACKET_FILTERING
@@ -1174,7 +1177,7 @@ tSirRetStatus uMacPostCtrlMsg(void* pSirGlobal, tSirMbMsg* pMb);
#define WDA_RECEIVE_FILTER_SET_FILTER_REQ SIR_HAL_RECEIVE_FILTER_SET_FILTER_REQ
#define WDA_PACKET_COALESCING_FILTER_MATCH_COUNT_REQ SIR_HAL_PACKET_COALESCING_FILTER_MATCH_COUNT_REQ
#define WDA_PACKET_COALESCING_FILTER_MATCH_COUNT_RSP SIR_HAL_PACKET_COALESCING_FILTER_MATCH_COUNT_RSP
-#define WDA_RECEIVE_FILTER_CLEAR_FILTER_REQ SIR_HAL_RECEIVE_FILTER_CLEAR_FILTER_REQ
+#define WDA_RECEIVE_FILTER_CLEAR_FILTER_REQ SIR_HAL_RECEIVE_FILTER_CLEAR_FILTER_REQ
#endif // WLAN_FEATURE_PACKET_FILTERING
#define WDA_SET_POWER_PARAMS_REQ SIR_HAL_SET_POWER_PARAMS_REQ
@@ -1252,6 +1255,7 @@ tSirRetStatus wdaPostCtrlMsg(tpAniSirGlobal pMac, tSirMsgQ *pMsg);
#ifdef QCA_WIFI_2_0
#define WDA_SetRegDomain WMA_SetRegDomain
+#define WDA_SetCountryCode WMA_SetCountryCode
#define WDA_SetHTConfig wma_set_htconfig
#define WDA_UpdateRssiBmps WMA_UpdateRssiBmps
@@ -1263,11 +1267,16 @@ static int WDA_SetHTConfig(tANI_U8 sessionId, tANI_U16 htCapab, int value)
return 0;
}
+static inline eHalStatus WDA_SetCountryCode(v_VOID_t *client_ctx, tANI_U8 *countrycode)
+{
+ return eHAL_STATUS_SUCCESS;
+}
+
/* -----------------------------------------------------------------
WDA data path API's for TL
-------------------------------------------------------------------*/
-v_BOOL_t WDA_IsHwFrameTxTranslationCapable(v_PVOID_t pVosGCtx,
+v_BOOL_t WDA_IsHwFrameTxTranslationCapable(v_PVOID_t pVosGCtx,
tANI_U8 staIdx);
# define WDA_EnableUapsdAcParams(vosGCtx, staId, uapsdInfo) \
@@ -1340,42 +1349,42 @@ WDA_DS_PeekRxPacketInfo
#else /* #ifdef QCA_WIFI_2_0 */
-#ifdef WLAN_PERF
+#ifdef WLAN_PERF
/*==========================================================================
FUNCTION WDA_TLI_FastHwFwdDataFrame
- DESCRIPTION
+ 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
+ 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
+ TODO For integrated SOC, this function does nothing yet. Pima SLM/HAL
should provide the equivelant functionality.
- DEPENDENCIES
-
- PARAMETERS
+ 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.
+ No return.
+
+ SIDE EFFECTS
- SIDE EFFECTS
-
============================================================================*/
void WDA_TLI_FastHwFwdDataFrame
(
@@ -1391,7 +1400,7 @@ void WDA_TLI_FastHwFwdDataFrame
/*==========================================================================
FUNCTION WDA_DS_Register
- DESCRIPTION
+ DESCRIPTION
Register TL client to WDA. This function registers TL RX/TX functions
to WDI by calling WDI_DS_Register.
@@ -1399,14 +1408,14 @@ void WDA_TLI_FastHwFwdDataFrame
For NON integrated SOC, this function calls WLANBAL_RegTlCbFunctions
to register TL's RX/TX functions to BAL
- TODO
+ 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
+ DEPENDENCIES
+
+ PARAMETERS
IN
pvosGCtx VOS context
@@ -1417,22 +1426,22 @@ void WDA_TLI_FastHwFwdDataFrame
pCallbackContext WDI calls callback function with it
VOS global context pointer
OUT
- uAvailableTxBuf available TX PDU numbder.
+ 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_E_FAULT: pointer is NULL and other errors
VOS_STATUS_SUCCESS: Everything is good :)
- SIDE EFFECTS
-
+ SIDE EFFECTS
+
============================================================================*/
-VOS_STATUS
-WDA_DS_Register
-(
- v_PVOID_t pvosGCtx,
+VOS_STATUS
+WDA_DS_Register
+(
+ v_PVOID_t pvosGCtx,
WDA_DS_TxCompleteCallback pfnTxCompleteCallback,
- WDA_DS_RxPacketCallback pfnRxPacketCallback,
+ WDA_DS_RxPacketCallback pfnRxPacketCallback,
WDA_DS_TxPacketCallback pfnTxPacketCallback,
WDA_DS_ResourceCB pfnResourceCB,
v_U32_t uResTheshold,
@@ -1443,27 +1452,27 @@ WDA_DS_Register
/*==========================================================================
FUNCTION WDA_DS_StartXmit
- DESCRIPTION
- Serialize TX transmit reques to TX thread.
+ 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
+ DEPENDENCIES
+
+ PARAMETERS
IN
pvosGCtx VOS context
-
+
RETURN VALUE
- VOS_STATUS_E_FAULT: pointer is NULL and other errors
+ VOS_STATUS_E_FAULT: pointer is NULL and other errors
VOS_STATUS_SUCCESS: Everything is good :)
- SIDE EFFECTS
-
+ SIDE EFFECTS
+
============================================================================*/
VOS_STATUS
WDA_DS_StartXmit
@@ -1474,22 +1483,22 @@ WDA_DS_StartXmit
/*==========================================================================
FUNCTION WDA_DS_FinishULA
- DESCRIPTION
- Serialize Finish Upper Level Authentication reques to TX thread.
+ DESCRIPTION
+ Serialize Finish Upper Level Authentication reques to TX thread.
+
+ DEPENDENCIES
- DEPENDENCIES
-
- PARAMETERS
+ PARAMETERS
IN
callbackRoutine routine to be called in TX thread
- callbackContext user data for the above routine
-
+ callbackContext user data for the above routine
+
RETURN VALUE
please see vos_tx_mq_serialize
- SIDE EFFECTS
-
+ SIDE EFFECTS
+
============================================================================*/
VOS_STATUS
WDA_DS_FinishULA
@@ -1503,10 +1512,10 @@ WDA_DS_FinishULA
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
@@ -1532,7 +1541,7 @@ WDA_DS_FinishULA
*pusPktLen Packet length
RETURN VALUE
- VOS_STATUS_E_FAULT: pointer is NULL and other errors
+ VOS_STATUS_E_FAULT: pointer is NULL and other errors
VOS_STATUS_SUCCESS: Everything is good :)
SIDE EFFECTS
@@ -1564,7 +1573,7 @@ WDA_DS_BuildTxPacketInfo
DESCRIPTION
Trim/Remove RX BD header for NON integrated SOC.
It does nothing for integrated SOC.
-
+
DEPENDENCIES
PARAMETERS
@@ -1573,7 +1582,7 @@ WDA_DS_BuildTxPacketInfo
vosDataBuff vos data buffer
RETURN VALUE
- VOS_STATUS_E_FAULT: pointer is NULL and other errors
+ VOS_STATUS_E_FAULT: pointer is NULL and other errors
VOS_STATUS_SUCCESS: Everything is good :)
SIDE EFFECTS
@@ -1581,7 +1590,7 @@ WDA_DS_BuildTxPacketInfo
============================================================================*/
VOS_STATUS
WDA_DS_TrimRxPacketInfo
-(
+(
vos_pkt_t *vosDataBuff
);
@@ -1593,19 +1602,19 @@ WDA_DS_TrimRxPacketInfo
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_E_FAULT: pointer is NULL and other errors
VOS_STATUS_SUCCESS: Everything is good :)
SIDE EFFECTS
@@ -1613,7 +1622,7 @@ WDA_DS_TrimRxPacketInfo
============================================================================*/
VOS_STATUS
WDA_DS_GetTxResources
-(
+(
v_PVOID_t pvosGCtx,
v_U32_t* puResCount
);
@@ -1622,7 +1631,7 @@ WDA_DS_GetTxResources
FUNCTION WDA_DS_GetRssi
DESCRIPTION
- Get RSSI
+ Get RSSI
TODO It returns hardcoded value in the meantime since WDA/WDI does nothing
support it yet for Prima.
@@ -1638,7 +1647,7 @@ WDA_DS_GetTxResources
puRssi RSSI
RETURN VALUE
- VOS_STATUS_E_FAULT: pointer is NULL and other errors
+ VOS_STATUS_E_FAULT: pointer is NULL and other errors
VOS_STATUS_SUCCESS: Everything is good :)
SIDE EFFECTS
@@ -1671,7 +1680,7 @@ WDA_DS_GetRssi
OUT
RETURN VALUE
- VOS_STATUS_E_FAULT: pointer is NULL and other errors
+ VOS_STATUS_E_FAULT: pointer is NULL and other errors
VOS_STATUS_SUCCESS: Everything is good :)
SIDE EFFECTS
@@ -1693,7 +1702,7 @@ WDA_DS_RxAmsduBdFix
back to BD header. So for NON integrated SOC, this function does
the same.
- For integrated SOC, WDI does the same, not TL.
+ For integrated SOC, WDI does the same, not TL.
It does return typeSubtype from RX meta info for integrated SOC.
DEPENDENCIES
@@ -1709,7 +1718,7 @@ WDA_DS_RxAmsduBdFix
ucTypeSubtype typeSubtype
RETURN VALUE
- VOS_STATUS_E_FAULT: pointer is NULL and other errors
+ VOS_STATUS_E_FAULT: pointer is NULL and other errors
VOS_STATUS_SUCCESS: Everything is good :)
SIDE EFFECTS
@@ -1771,7 +1780,7 @@ WDA_DS_GetReplayCounter
OUT
RETURN VALUE
- VOS_STATUS_E_FAULT: pointer is NULL and other errors
+ VOS_STATUS_E_FAULT: pointer is NULL and other errors
VOS_STATUS_SUCCESS: Everything is good :)
SIDE EFFECTS
@@ -1806,7 +1815,7 @@ WDA_DS_SetRSSIThresholds
OUT
RETURN VALUE
- VOS_STATUS_E_FAULT: pointer is NULL and other errors
+ VOS_STATUS_E_FAULT: pointer is NULL and other errors
VOS_STATUS_SUCCESS: Everything is good :)
SIDE EFFECTS
@@ -1814,8 +1823,8 @@ WDA_DS_SetRSSIThresholds
============================================================================*/
VOS_STATUS
WDA_DS_TxFrames
-(
- v_PVOID_t pvosGCtx
+(
+ v_PVOID_t pvosGCtx
);
/*==========================================================================
@@ -1865,7 +1874,7 @@ WDA_DS_TxFlowControlCallback
Defined in WDA_TXFlowEnumType
RETURN VALUE
- VOS_STATUS_E_INVAL: pointer is NULL and other errors
+ VOS_STATUS_E_INVAL: pointer is NULL and other errors
VOS_STATUS_SUCCESS: Everything is good :)
SIDE EFFECTS
@@ -1883,7 +1892,7 @@ WDA_DS_GetTxFlowMask
DESCRIPTION
Send Dump commandsto WDI
-
+
DEPENDENCIES
PARAMETERS
@@ -1900,13 +1909,13 @@ WDA_DS_GetTxFlowMask
pBuffer Dump command Response buffer
RETURN VALUE
- VOS_STATUS_E_FAULT: pointer is NULL and other errors
+ 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,
+VOS_STATUS WDA_HALDumpCmdReq(tpAniSirGlobal pMac,tANI_U32 cmd,
tANI_U32 arg1, tANI_U32 arg2, tANI_U32 arg3,
tANI_U32 arg4, tANI_U8 *pBuffer);
@@ -1928,7 +1937,7 @@ VOS_STATUS WDA_HALDumpCmdReq(tpAniSirGlobal pMac,tANI_U32 cmd,
RETURN VALUE
NONE
-
+
SIDE EFFECTS
============================================================================*/
void WDA_featureCapsExchange(v_PVOID_t pVosContext);
@@ -1954,7 +1963,7 @@ void WDA_disableCapablityFeature(tANI_U8 feature_index);
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);
@@ -1979,7 +1988,7 @@ tANI_U8 WDA_getHostWlanFeatCaps(tANI_U8 featEnumValue);
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);
diff --git a/CORE/WDI/CP/inc/wlan_qct_wdi.h b/CORE/WDI/CP/inc/wlan_qct_wdi.h
index e3ce1d346a6c..15a7499ad8da 100644
--- a/CORE/WDI/CP/inc/wlan_qct_wdi.h
+++ b/CORE/WDI/CP/inc/wlan_qct_wdi.h
@@ -3909,11 +3909,20 @@ typedef struct
#ifdef FEATURE_OEM_DATA_SUPPORT
#ifndef OEM_DATA_REQ_SIZE
+#ifdef QCA_WIFI_2_0
+#define OEM_DATA_REQ_SIZE 276
+#else
#define OEM_DATA_REQ_SIZE 134
#endif
+#endif
+
#ifndef OEM_DATA_RSP_SIZE
+#ifdef QCA_WIFI_2_0
+#define OEM_DATA_RSP_SIZE 1720
+#else
#define OEM_DATA_RSP_SIZE 1968
#endif
+#endif
/*----------------------------------------------------------------------------
WDI_oemDataReqInfoType
diff --git a/Kbuild b/Kbuild
index c0e62e1b0d2c..b9c2c4b73ad0 100644..100755
--- a/Kbuild
+++ b/Kbuild
@@ -50,7 +50,7 @@ endif
BUILD_DEBUG_VERSION := 1
#Enable this flag to build driver in diag version
-BUILD_DIAG_VERSION := 0
+BUILD_DIAG_VERSION := 1
#Do we panic on bug? default is to warn
PANIC_ON_BUG := 0
@@ -137,7 +137,7 @@ CONFIG_QCA_WIFI_FTM := 1
CONFIG_CHECKSUM_OFFLOAD := 1
#Enable GTK offload
-CONFIG_GTK_OFFLOAD := 0
+CONFIG_GTK_OFFLOAD := 1
ifeq ($(CONFIG_CFG80211),y)
HAVE_CFG80211 := 1
@@ -861,6 +861,8 @@ endif
ifeq ($(CONFIG_QCOM_CCX),y)
CDEFINES += -DFEATURE_WLAN_CCX
+CDEFINES += -DQCA_COMPUTE_TX_DELAY
+CDEFINES += -DQCA_COMPUTE_TX_DELAY_PER_TID
endif
#normally, TDLS negative behavior is not needed
diff --git a/Makefile b/Makefile
index bec070796d06..1503a6907eee 100644
--- a/Makefile
+++ b/Makefile
@@ -50,7 +50,7 @@
BUILD_DEBUG_VERSION := 1
#Enable this flag to build driver in diag version
-BUILD_DIAG_VERSION := 0
+BUILD_DIAG_VERSION := 1
#Do we panic on bug? default is to warn
PANIC_ON_BUG := 0
@@ -121,7 +121,7 @@ CONFIG_QCA_WIFI_FTM := 0
CONFIG_CHECKSUM_OFFLOAD := 1
#Enable GTK offload
-CONFIG_GTK_OFFLOAD := 0
+CONFIG_GTK_OFFLOAD := 1
ifeq ($(CONFIG_CFG80211),y)
HAVE_CFG80211 := 1
@@ -843,6 +843,8 @@ endif
ifeq ($(CONFIG_QCOM_CCX),y)
CDEFINES += -DFEATURE_WLAN_CCX
+CDEFINES += -DQCA_COMPUTE_TX_DELAY
+CDEFINES += -DQCA_COMPUTE_TX_DELAY_PER_TID
endif
#normally, TDLS negative behavior is not needed
diff --git a/firmware_bin/WCNSS_qcom_cfg.ini b/firmware_bin/WCNSS_qcom_cfg.ini
index 36a34e6c020f..4ecc293a46ff 100644
--- a/firmware_bin/WCNSS_qcom_cfg.ini
+++ b/firmware_bin/WCNSS_qcom_cfg.ini
@@ -102,6 +102,10 @@ gEnableTCPChkSumOffld=0
hostNSOffload=0
+#Flag to enable IPChkSumOffld feature or not
+
+gEnableIPChecksumOffload=0
+
#SoftAP Related Parameters
# AP MAc addr
@@ -379,9 +383,15 @@ gNumChanCombinedConc=1
#If set to 0, MCC is not allowed.
gEnableMCCMode=1
-# 1=enable STBC; 0=disable STBC
+# 1=enable STBC; 0=disable STBC
gEnableRXSTBC=1
+# 1=enable tx STBC; 0=disable
+gEnableTXSTBC=1
+
+# 1=enable rx LDPC; 0=disable
+gEnableRXLDPC=1
+
# Enable Active mode offload
gEnableActiveModeOffload=1
@@ -415,6 +425,13 @@ gEnablefwlog=1
#P2P Listen offload
gEnableP2pListenOffload=1
+
+# Maximum Receive AMPDU size (VHT only. Valid values: 0->8k 1->16k 2->32k 3->64k 4->128k)
+gVhtAmpduLenExponent=4
+
+# Maximum MPDU length (VHT only. Valid values: 0->3895 octets, 1->7991 octets, 2->11454 octets)
+gVhtMpduLen=2
+
END
# Note: Configuration parser would not read anything past the END marker
diff --git a/tools/athdiag/athdiag.c b/tools/athdiag/athdiag.c
index 76b5aa9c14a6..12616b6c38d3 100644
--- a/tools/athdiag/athdiag.c
+++ b/tools/athdiag/athdiag.c
@@ -46,6 +46,7 @@
#include <errno.h>
#include <sys/time.h>
+#include <a_osapi.h>
#include <athdefs.h>
#include <a_types.h>
@@ -69,24 +70,79 @@
#define DIAG_WRITE_TARGET 2
#define DIAG_READ_WORD 3
#define DIAG_WRITE_WORD 4
-
-#define ADDRESS_FLAG 0x001
-#define LENGTH_FLAG 0x002
-#define PARAM_FLAG 0x004
-#define FILE_FLAG 0x008
-#define UNUSED0x010 0x010
-#define AND_OP_FLAG 0x020
-#define BITWISE_OP_FLAG 0x040
-#define QUIET_FLAG 0x080
-#define OTP_FLAG 0x100
+#define DIAG_DUMP_TARGET 5
+
+
+#define ADDRESS_FLAG 0x0001
+#define LENGTH_FLAG 0x0002
+#define PARAM_FLAG 0x0004
+#define FILE_FLAG 0x0008
+#define UNUSED0x010 0x0010
+#define AND_OP_FLAG 0x0020
+#define BITWISE_OP_FLAG 0x0040
+#define QUIET_FLAG 0x0080
+#define OTP_FLAG 0x0100
+#define HEX_FLAG 0x0200
/* dump file mode,x: hex mode; other binary mode. */
-#define HEX_FLAG 0x200
-#define UNUSED0x400 0x400
-#define DEVICE_FLAG 0x800
+#define UNUSED0x400 0x0400
+#define DEVICE_FLAG 0x0800
+#define TARGET_FLAG 0x1000
+#define PATH_FLAG 0x2000
+
/* Limit malloc size when reading/writing file */
#define MAX_BUF (8*1024)
+#define DUMP_DRAM_START_ADDR 0x400000
+#define DUMP_DRAM_LEN 0x50000
+
+
+#define PEREGRINE_REG_PART1_START_ADDR 0x4000
+#define PEREGRINE_REG_PART1_LEN 0x2000
+#define PEREGRINE_REG_PART2_START_ADDR 0x8000
+#define PEREGRINE_REG_PART2_LEN 0x58000
+
+#define AR6320V1_REG_PART1_START_ADDR 0x0 /*RTC_SOC_BASE_ADDRESS*/
+#define AR6320V1_REG_PART1_LEN (0x800 - 0x0) /*WLAN_MBOX_BASE_ADDRESS - RTC_SOC_BASE_ADDRESS*/
+#define AR6320V1_REG_PART2_START_ADDR 0x27000 /*STEREO_BASE_ADDRESS*/
+#define AR6320V1_REG_PART2_LEN (0x60000 - 0x27000) /*USB_BASE_ADDRESS - STEREO_BASE_ADDRESS*/
+
+
+struct ath_target_reg_info {
+ A_UINT32 reg_start;
+ A_UINT32 reg_len;
+ const char *reg_info;
+ const char *save_file;
+};
+
+static const struct ath_target_reg_info reg_ar9888_v2[] = {
+ {DUMP_DRAM_START_ADDR, DUMP_DRAM_LEN, "DRAM", "fwdump_prgr_v2_dram"},
+ {PEREGRINE_REG_PART1_START_ADDR, PEREGRINE_REG_PART1_LEN, "REG_PART1", "fwdump_prgr_v2_reg1"},
+ {PEREGRINE_REG_PART2_START_ADDR, PEREGRINE_REG_PART2_LEN, "REG_PART2", "fwdump_prgr_v2_reg2"},
+ {0, 0, 0, 0}
+};
+
+static const struct ath_target_reg_info reg_ar6320_v1[] = {
+ {DUMP_DRAM_START_ADDR, DUMP_DRAM_LEN, "DRAM", "fwdump_rome_v1_dram"},
+ {AR6320V1_REG_PART1_START_ADDR, AR6320V1_REG_PART1_LEN, "REG_PART1", "fwdump_rome_v1_reg1"},
+ {AR6320V1_REG_PART2_START_ADDR, AR6320V1_REG_PART2_LEN, "REG_PART2", "fwdump_rome_v1_reg2"},
+ {0, 0, 0, 0}
+};
+
+
+#define INVALID_TARGET_INDEX 0xffff
+struct ath_target_info {
+ const char *name;
+ const struct ath_target_reg_info *reg_info;
+};
+
+static const struct ath_target_info target_info[] = {
+ {"AR9888_v2", reg_ar9888_v2},
+ {"AR6320_v1", reg_ar6320_v1},
+};
+
+
+
unsigned int flag;
const char *progname;
const char commands[] =
@@ -100,6 +156,7 @@ const char commands[] =
--[value|param]=<value>\n\
--otp --read --address=<otp offset> --length=<bytes> --file=<filename>\n\
--otp --write --address=<otp offset> --file=<filename>\n\
+--dump --target=<target name> [--hex] [--path=<pathname>]\n\
--quiet\n\
--device=<device name> (if not default)\n\
The options can also be given in the abbreviated form --option=x or -o x.\n\
@@ -141,6 +198,17 @@ usage(void)
}
void
+list_supported_target_names()
+{
+ int i, target_num = sizeof(target_info)/sizeof(target_info[0]);
+
+ fprintf(stderr, "supported target parameter as follow:\n");
+ for (i = 0; i < target_num; i++) {
+ fprintf(stderr, "\t--target=%s\n", target_info[i].name);
+ }
+}
+
+void
ReadTargetRange(int dev, A_UINT32 address, A_UINT8 *buffer, A_UINT32 length)
{
int nbyte;
@@ -205,15 +273,12 @@ WriteTargetRange(int dev, A_UINT32 address, A_UINT8 *buffer, A_UINT32 length)
{
int nbyte;
unsigned int remaining;
- A_UINT8 *tbuffer = NULL;
-
- fprintf(stderr, "add 0x%x buff 0x%x\n", address, *((A_UINT32 *)buffer));
- remaining = sizeof(address) + length;
- while (remaining > sizeof(address)) {
- tbuffer = (A_UINT8 *)MALLOC(remaining);
- memcpy(tbuffer, (A_UINT8 *)(&address), sizeof(address));
- memcpy(tbuffer + sizeof(address), buffer, remaining - sizeof(address));
- nbyte = write(dev, tbuffer, (size_t)remaining);
+
+ (void)lseek(dev, address, SEEK_SET);
+
+ remaining = length;
+ while (remaining) {
+ nbyte = write(dev, buffer, (size_t)remaining);
if (nbyte <= 0) {
fprintf(stderr, "err %s failed (nbyte=%d, address=0x%x"
" remaining=%d).\n",
@@ -224,7 +289,6 @@ WriteTargetRange(int dev, A_UINT32 address, A_UINT8 *buffer, A_UINT32 length)
remaining -= nbyte;
buffer += nbyte;
address += nbyte;
- free(tbuffer);
}
}
@@ -251,7 +315,7 @@ ValidWriteOTP(int dev, A_UINT32 offset, A_UINT8 *buffer, A_UINT32 length)
A_UINT32 i;
A_UINT8 *otp_contents;
- otp_contents = (A_UINT8 *)MALLOC(length);
+ otp_contents = MALLOC(length);
ReadTargetOTP(dev, offset, otp_contents, length);
for (i=0; i<length; i++) {
@@ -327,6 +391,70 @@ WriteTargetOTP(int dev, A_UINT32 offset, A_UINT8 *buffer, A_UINT32 length)
WriteTargetWord(dev, RTC_SOC_BASE_ADDRESS+OTP_OFFSET, 0);
}
+void
+DumpTargetMem(int dev, unsigned int target_idx, char *pathname)
+{
+ const struct ath_target_reg_info *reg_info;
+ FILE * dump_fd;
+ char filename[PATH_MAX], tempfn[PATH_MAX];
+ A_UINT8 *buffer;
+ unsigned int i, address, length, remaining;
+
+ buffer = (A_UINT8 *)MALLOC(MAX_BUF);
+ reg_info = target_info[target_idx].reg_info;
+
+ while ((reg_info->reg_start != 0) || (reg_info->reg_len != 0)) {
+ memset(filename, 0, sizeof(filename));
+ snprintf(filename, sizeof(filename), "%s%s", pathname,
+ reg_info->save_file);
+ snprintf(tempfn, sizeof(tempfn), "%s", filename);
+ if(flag & HEX_FLAG) {
+ snprintf(filename, sizeof(filename), "%s.txt", tempfn);
+ } else {
+ snprintf(filename, sizeof(filename), "%s.bin", tempfn);
+ }
+
+ if ((dump_fd = fopen(filename, "wb+")) == NULL) {
+ fprintf(stderr, "err %s cannot create/open output file (%s)\n",
+ __FUNCTION__, filename);
+ reg_info++;
+ continue;
+ }
+
+ remaining = length = reg_info->reg_len;
+ address = reg_info->reg_start;
+ if(flag & HEX_FLAG) {
+ fprintf(dump_fd,"target mem dump area[0x%08x - 0x%08x]",address,
+ address+length);
+ }
+
+ nqprintf("DIAG Read Target (address: 0x%x, length: %d, filename: %s)\n",
+ address, length, filename);
+
+ while (remaining) {
+ length = (remaining > MAX_BUF) ? MAX_BUF : remaining;
+ ReadTargetRange(dev, address, buffer, length);
+ if(flag & HEX_FLAG) {
+ for(i=0; i<length; i+=4) {
+ if(i%16 == 0)
+ fprintf(dump_fd,"\n0x%08x:\t",address+i);
+ fprintf(dump_fd,"0x%08x\t",*(A_UINT32*)(buffer+i));
+ }
+ } else {
+ fwrite(buffer,1 , length, dump_fd);
+ }
+ remaining -= length;
+ address += length;
+ }
+
+ fclose(dump_fd);
+ reg_info++;
+ }
+ free(buffer);
+}
+
+
+
unsigned int
parse_address(char *optarg)
{
@@ -339,18 +467,36 @@ parse_address(char *optarg)
return address;
}
+unsigned int
+parse_target_index(char *optarg)
+{
+ unsigned int i, index = INVALID_TARGET_INDEX;
+
+ for (i = 0; i < sizeof(target_info)/sizeof(target_info[0]); i++) {
+ if (strncmp(optarg, target_info[i].name, sizeof(target_info[i].name)) == 0) {
+ /* found */
+ index = i;
+ break;
+ }
+ }
+
+ return index;
+}
+
int
main (int argc, char **argv) {
int c, fd, dev;
int i;
FILE * dump_fd;
- unsigned int address = 0, length = 0;
+ unsigned int address = 0, target_idx = 0, length = 0;
A_UINT32 param;
- char filename[PATH_MAX];
+ char filename[PATH_MAX], tempfn[PATH_MAX];
+ char pathname[PATH_MAX];
char devicename[PATH_MAX];
unsigned int cmd = 0;
A_UINT8 *buffer;
unsigned int bitwise_mask = 0;
+
progname = argv[0];
if (argc == 1) usage();
@@ -358,6 +504,7 @@ main (int argc, char **argv) {
flag = 0;
memset(filename, '\0', sizeof(filename));
memset(devicename, '\0', sizeof(devicename));
+ memset(tempfn, '\0', sizeof(tempfn));
while (1) {
int option_index = 0;
@@ -365,22 +512,25 @@ main (int argc, char **argv) {
{"address", 1, NULL, 'a'},
{"and", 1, NULL, 'n'},
{"device", 1, NULL, 'D'},
+ {"dump", 0, NULL, 'd'},
{"get", 0, NULL, 'g'},
{"file", 1, NULL, 'f'},
+ {"hex", 0, NULL, 'x'},
{"length", 1, NULL, 'l'},
{"or", 1, NULL, 'o'},
{"otp", 0, NULL, 'O'},
{"param", 1, NULL, 'p'},
+ {"path", 1, NULL, 'P'},
{"quiet", 0, NULL, 'q'},
{"read", 0, NULL, 'r'},
{"set", 0, NULL, 's'},
+ {"target", 1, NULL, 't'},
{"value", 1, NULL, 'p'},
{"write", 0, NULL, 'w'},
- {"hex", 0, NULL, 'x'},
{0, 0, 0, 0}
};
- c = getopt_long (argc, argv, "xrwgsqOf:l:a:p:c:n:o:D:",
+ c = getopt_long (argc, argv, "xrwgsqdOf:l:a:p:c:n:o:D:t:P:",
long_options, &option_index);
if (c == -1)
break;
@@ -402,6 +552,10 @@ main (int argc, char **argv) {
cmd = DIAG_WRITE_WORD;
break;
+ case 'd':
+ cmd = DIAG_DUMP_TARGET;
+ break;
+
case 'f':
memset(filename, '\0', sizeof(filename));
snprintf(filename, sizeof(filename), "%s", optarg);
@@ -441,6 +595,23 @@ main (int argc, char **argv) {
flag |= QUIET_FLAG;
break;
+ case 't':
+ target_idx = parse_target_index(optarg);
+ if (target_idx != INVALID_TARGET_INDEX) {
+ flag |= TARGET_FLAG;
+ }
+ break;
+
+ case 'P':
+ memset(pathname, '\0', sizeof(pathname));
+ snprintf(pathname, sizeof(pathname), "%s", optarg);
+ if (pathname[strlen(pathname)-1] != '/') {
+ snprintf(tempfn, sizeof(tempfn),"%s", pathname);
+ snprintf(pathname, sizeof(pathname),"%s/", tempfn);
+ }
+ flag |= PATH_FLAG;
+ break;
+
case 'D':
snprintf(devicename, sizeof(devicename), "%s%s", optarg,
"/athdiag");
@@ -462,12 +633,13 @@ main (int argc, char **argv) {
if (!(flag & DEVICE_FLAG)) {
FILE *find_dev;
size_t nbytes;
+
/*
* Convenience: if no device was specified on the command
* line, try to figure it out. Typically there's only a
* single device anyway.
*/
- find_dev = popen("find /proc -name athdiagpfs | head -1", "r");
+ find_dev = popen("busybox find /proc -name athdiagpfs | busybox head -1", "r");
if (find_dev) {
nbytes=fread(devicename, 1, sizeof(devicename), find_dev);
pclose(find_dev);
@@ -498,7 +670,7 @@ main (int argc, char **argv) {
if ((flag & (ADDRESS_FLAG | LENGTH_FLAG | FILE_FLAG)) ==
(ADDRESS_FLAG | LENGTH_FLAG | FILE_FLAG))
{
- if (((int)(dump_fd = fopen(filename, "wb+"))) < 0)
+ if ((dump_fd = fopen(filename, "wb+")) == NULL)
{
fprintf(stderr, "err %s cannot create/open output file (%s)\n",
__FUNCTION__, filename);
@@ -741,11 +913,29 @@ main (int argc, char **argv) {
nqprintf("DIAG Write Word (address: 0x%x, param:"
" 0x%x)\n", address, param);
}
+
WriteTargetWord(dev, address, param);
}
else usage();
break;
+ case DIAG_DUMP_TARGET:
+ if (!(flag & TARGET_FLAG)) {
+ list_supported_target_names();
+ usage(); /* no target specified */
+ }
+
+ if (!(flag & PATH_FLAG)) {
+ memset(pathname, '\0', sizeof(filename));
+ if (getcwd(pathname, sizeof(pathname)-1) != NULL)
+ printf("%s\n",pathname);
+ snprintf(tempfn, sizeof(tempfn), "%s", pathname);
+ snprintf(pathname, sizeof(pathname), "%s/", tempfn);
+ }
+
+ DumpTargetMem(dev, target_idx, pathname);
+ break;
+
default:
usage();
}
diff --git a/tools/fwdebuglog/Android.mk b/tools/fwdebuglog/Android.mk
index 57f7f04344da..17ce0871be2c 100644
--- a/tools/fwdebuglog/Android.mk
+++ b/tools/fwdebuglog/Android.mk
@@ -9,6 +9,18 @@ LOCAL_CFLAGS := $(CFLAGS)
include $(BUILD_EXECUTABLE)
include $(CLEAR_VARS)
+LOCAL_MODULE := cld-fwlog-netlink
+LOCAL_MODULE_TAGS := optional
+LOCAL_C_INCLUDES := $(LOCAL_PATH)/../../CORE/SERVICES/COMMON
+LOCAL_SHARED_LIBRARIES := libc libcutils
+LOCAL_SRC_FILES := cld-fwlog-netlink.c parser.c
+LOCAL_CFLAGS := $(CFLAGS)
+LOCAL_CFLAGS += -DCONFIG_ANDROID_LOG
+LOCAL_LDLIBS += -llog
+LOCAL_LDLIBS := -landroid
+include $(BUILD_EXECUTABLE)
+
+include $(CLEAR_VARS)
LOCAL_MODULE := cld-fwlog-parser
LOCAL_MODULE_TAGS := optional
LOCAL_C_INCLUDES := $(LOCAL_PATH)/../../CORE/SERVICES/COMMON
diff --git a/tools/fwdebuglog/Makefile b/tools/fwdebuglog/Makefile
index 51164ecb6b47..d0ccb9d10714 100644
--- a/tools/fwdebuglog/Makefile
+++ b/tools/fwdebuglog/Makefile
@@ -8,9 +8,14 @@ all:
-I ../../CORE/SERVICES/HIF/ \
cld-fwlog-record.c -o cld-fwlog-record
$(CC) -g3 -Wall \
- -I ../../CORE/COMMON/ \
- -I ../../CORE/HIF/ \
+ -I ../../CORE/SERVICES/COMMON/ \
+ -I ../../CORE/SERVICES/HIF/ \
+ cld-fwlog-netlink.c parser.c -o cld-fwlog-netlink
+ $(CC) -g3 -Wall \
+ -I ../../CORE/SERVICES/COMMON/ \
+ -I ../../CORE/SERVICES/HIF/ \
cld-fwlog-parser.c -o cld-fwlog-parser
clean:
rm -f cld-fwlog-record
rm -f cld-fwlog-parser
+ rm -f cld-fwlog-netlink
diff --git a/tools/fwdebuglog/cld-fwlog-netlink.c b/tools/fwdebuglog/cld-fwlog-netlink.c
new file mode 100644
index 000000000000..d4df5c9c0c97
--- /dev/null
+++ b/tools/fwdebuglog/cld-fwlog-netlink.c
@@ -0,0 +1,282 @@
+/*
+ * Copyright (c) 2013 Qualcomm Atheros, Inc.
+ * All Rights Reserved.
+ * Qualcomm Atheros Confidential and Proprietary.
+ *
+ */
+
+#include <stdlib.h>
+#include <stdio.h>
+#include <signal.h>
+#include <string.h>
+#include <unistd.h>
+#include <errno.h>
+#include <time.h>
+#include <getopt.h>
+#include <limits.h>
+#include <asm/types.h>
+#include <sys/types.h>
+#include <sys/ioctl.h>
+
+#include <sys/socket.h>
+#include <linux/netlink.h>
+
+#include <athdefs.h>
+#include <a_types.h>
+#include "dbglog.h"
+#include "dbglog_host.h"
+
+
+#define LOGFILE_FLAG 0x01
+#define CONSOLE_FLAG 0x02
+#define QXDM_FLAG 0x04
+
+const char options[] =
+"Options:\n\
+-f, --logfile=<Output log file> [Mandotory]\n\
+-r, --reclimit=<Maximum number of records before the log rolls over> [Optional]\n\
+-c, --console (prints the logs in the console)\n\
+-q, --qxdm (prints the logs in the qxdm)\n\
+The options can also be given in the abbreviated form --option=x or -o x. The options can be given in any order";
+
+struct sockaddr_nl src_addr, dest_addr;
+struct nlmsghdr *nlh = NULL;
+struct iovec iov;
+int sock_fd;
+struct msghdr msg;
+
+static FILE *fwlog_res;
+static FILE *log_out;
+const char *fwlog_res_file;
+int max_records;
+int record;
+const char *progname;
+char dbglogoutfile[PATH_MAX];
+int optionflag;
+
+int rec_limit = 1000000; /* Million records is a good default */
+
+static void
+usage(void)
+{
+ fprintf(stderr, "Usage:\n%s options\n", progname);
+ fprintf(stderr, "%s\n", options);
+ exit(-1);
+}
+
+extern int parser_init();
+
+
+extern int
+dbglog_parse_debug_logs(u_int8_t *datap, u_int16_t len);
+
+static unsigned int get_le32(const unsigned char *pos)
+{
+ return pos[0] | (pos[1] << 8) | (pos[2] << 16) | (pos[3] << 24);
+}
+
+static size_t reorder(FILE *log_in, FILE *log_out)
+{
+ unsigned char buf[RECLEN];
+ size_t res;
+ unsigned int timestamp, min_timestamp = -1;
+ int pos = 0, min_pos = 0;
+
+ pos = 0;
+ while ((res = fread(buf, RECLEN, 1, log_in)) == 1) {
+ timestamp = get_le32(buf);
+ if (timestamp < min_timestamp) {
+ min_timestamp = timestamp;
+ min_pos = pos;
+ }
+ pos++;
+ }
+ printf("First record at position %d\n", min_pos);
+
+ fseek(log_in, min_pos * RECLEN, SEEK_SET);
+ while ((res = fread(buf, RECLEN, 1, log_in)) == 1) {
+ printf("Read record timestamp=%u length=%u\n",
+ get_le32(buf), get_le32(&buf[4]));
+ if (fwrite(buf, RECLEN, res, log_out) != res)
+ perror("fwrite");
+ }
+
+ fseek(log_in, 0, SEEK_SET);
+ pos = min_pos;
+ while (pos > 0 && (res = fread(buf, RECLEN, 1, log_out)) == 1) {
+ pos--;
+ printf("Read record timestamp=%u length=%u\n",
+ get_le32(buf), get_le32(&buf[4]));
+ if (fwrite(buf, RECLEN, res, log_out) != res)
+ perror("fwrite");
+ }
+
+ return 0;
+}
+
+static void cleanup(void) {
+ close(sock_fd);
+
+ fwlog_res = fopen(fwlog_res_file, "w");
+
+ if (fwlog_res == NULL) {
+ perror("Failed to open reorder fwlog file");
+ goto out;
+ }
+
+ reorder(log_out, fwlog_res);
+out:
+ fclose(fwlog_res);
+ fclose(log_out);
+}
+
+static void stop(int signum)
+{
+
+ if(optionflag & LOGFILE_FLAG){
+ printf("Recording stopped\n");
+ cleanup();
+ }
+ exit(0);
+}
+
+int main(int argc, char *argv[])
+{
+ int res =0;
+ unsigned char *buf;
+ int c;
+ char *mesg="Hello";
+
+ progname = argv[0];
+
+ int option_index = 0;
+ static struct option long_options[] = {
+ {"logfile", 1, NULL, 'f'},
+ {"reclimit", 1, NULL, 'r'},
+ {"console", 0, NULL, 'c'},
+ {"qxdm", 0, NULL, 'q'},
+ { 0, 0, 0, 0}
+ };
+
+ while (1) {
+ c = getopt_long (argc, argv, "f:cq:r:", long_options, &option_index);
+ if (c == -1) break;
+
+ switch (c) {
+ case 'f':
+ memset(dbglogoutfile, 0, PATH_MAX);
+ memcpy(dbglogoutfile, optarg, strlen(optarg));
+ optionflag |= LOGFILE_FLAG;
+ break;
+
+ case 'c':
+ optionflag |= CONSOLE_FLAG;
+ break;
+
+ case 'q':
+ printf("Do it for QXDM \n");
+ optionflag |= QXDM_FLAG;
+ break;
+
+ case 'r':
+ rec_limit = strtoul(optarg, NULL, 0);
+ break;
+
+ default:
+ usage();
+ }
+ }
+
+ if (!(optionflag & (LOGFILE_FLAG | CONSOLE_FLAG | QXDM_FLAG))) {
+ usage();
+ return -1;
+ }
+
+ sock_fd = socket(PF_NETLINK, SOCK_RAW, CLD_NETLINK_USER);
+ if (sock_fd < 0)
+ return -1;
+
+ memset(&src_addr, 0, sizeof(src_addr));
+ src_addr.nl_family = AF_NETLINK;
+ src_addr.nl_pid = getpid(); /* self pid */
+
+ bind(sock_fd, (struct sockaddr *)&src_addr, sizeof(src_addr));
+
+ memset(&dest_addr, 0, sizeof(dest_addr));
+ memset(&dest_addr, 0, sizeof(dest_addr));
+ dest_addr.nl_family = AF_NETLINK;
+ dest_addr.nl_pid = 0; /* For Linux Kernel */
+ dest_addr.nl_groups = 0; /* unicast */
+
+ nlh = (struct nlmsghdr *)malloc(NLMSG_SPACE(RECLEN));
+ memset(nlh, 0, NLMSG_SPACE(RECLEN));
+ nlh->nlmsg_len = NLMSG_SPACE(RECLEN);
+ nlh->nlmsg_pid = getpid();
+ nlh->nlmsg_flags = 0;
+
+ memcpy(NLMSG_DATA(nlh), mesg, strlen(mesg));
+
+ iov.iov_base = (void *)nlh;
+ iov.iov_len = nlh->nlmsg_len;
+ msg.msg_name = (void *)&dest_addr;
+ msg.msg_namelen = sizeof(dest_addr);
+ msg.msg_iov = &iov;
+ msg.msg_iovlen = 1;
+
+ sendmsg(sock_fd, &msg, 0);
+
+ signal(SIGINT, stop);
+ signal(SIGTERM, stop);
+
+ if (optionflag & LOGFILE_FLAG) {
+
+ if (rec_limit < RECLEN) {
+ fprintf(stderr, "Too small maximum length (has to be >= %d)\n",
+ RECLEN);
+ close(sock_fd);
+ return -1;
+ }
+ max_records = rec_limit / RECLEN;
+ printf("Storing last %d records\n", max_records);
+
+ log_out = fopen(dbglogoutfile, "w");
+ if (log_out == NULL) {
+ perror("Failed to create output file");
+ close(sock_fd);
+ return -1;
+ }
+
+ fwlog_res_file = "./reorder";
+
+ /* Read message from kernel */
+ while ((res = recvmsg(sock_fd, &msg, 0)) > 0) {
+ buf = (unsigned char *)NLMSG_DATA(nlh);
+ printf("Read record timestamp=%u length=%u \n",
+ get_le32(&buf[0]), get_le32(&buf[4]));
+ fseek(log_out, record * RECLEN, SEEK_SET);
+ if ((res = fwrite(buf, RECLEN, 1, log_out)) != 1){
+ perror("fwrite");
+ break;
+ }
+ record++;
+ if (record == max_records)
+ record = 0;
+ }
+
+ printf("Incomplete read: %d bytes\n", (int) res);
+ cleanup();
+ }
+
+ if (optionflag & CONSOLE_FLAG) {
+
+ parser_init();
+
+ while ((res = recvmsg(sock_fd, &msg, 0)) > 0) {
+ buf = (unsigned char *)NLMSG_DATA(nlh);
+ dbglog_parse_debug_logs(&buf[8], get_le32(&buf[4]));
+ }
+ close(sock_fd);
+ }
+
+ return 0;
+}
diff --git a/tools/fwdebuglog/parser.c b/tools/fwdebuglog/parser.c
new file mode 100644
index 000000000000..e3bf5a709919
--- /dev/null
+++ b/tools/fwdebuglog/parser.c
@@ -0,0 +1,2268 @@
+/*
+ * Copyright (c) 2013 Qualcomm Atheros, Inc.
+ * All Rights Reserved.
+ * Qualcomm Atheros Confidential and Proprietary.
+ *
+ */
+
+#include <stdlib.h>
+#include <stdarg.h>
+#include <stdio.h>
+#include <signal.h>
+#include <string.h>
+#include <unistd.h>
+
+#include <athdefs.h>
+#include <a_types.h>
+#include "dbglog.h"
+#include "dbglog_id.h"
+#include "dbglog_host.h"
+
+#include "a_debug.h"
+#include "ol_defines.h"
+#include "ah_osdep.h"
+
+
+#ifdef CONFIG_ANDROID_LOG
+
+#include <android/log.h>
+
+#define FWDEBUG_LOG_NAME "ROME"
+#define printf(...) __android_log_print(ANDROID_LOG_INFO, FWDEBUG_LOG_NAME, __VA_ARGS__);
+#endif
+
+unsigned char buf[RECLEN];
+
+#define MAX_DBG_MSGS 256
+
+module_dbg_print mod_print[WLAN_MODULE_ID_MAX];
+
+const char *dbglog_get_module_str(A_UINT32 module_id)
+{
+ switch (module_id) {
+ case WLAN_MODULE_INF:
+ return "INF";
+ case WLAN_MODULE_WMI:
+ return "WMI";
+ case WLAN_MODULE_STA_PWRSAVE:
+ return "STA PS";
+ case WLAN_MODULE_WHAL:
+ return "WHAL";
+ case WLAN_MODULE_COEX:
+ return "COEX";
+ case WLAN_MODULE_ROAM:
+ return "ROAM";
+ case WLAN_MODULE_RESMGR_CHAN_MANAGER:
+ return "CHANMGR";
+ case WLAN_MODULE_RESMGR:
+ return "RESMGR";
+ case WLAN_MODULE_VDEV_MGR:
+ return "VDEV";
+ case WLAN_MODULE_SCAN:
+ return "SCAN";
+ case WLAN_MODULE_RATECTRL:
+ return "RC";
+ case WLAN_MODULE_AP_PWRSAVE:
+ return "AP PS";
+ case WLAN_MODULE_BLOCKACK:
+ return "BA";
+ case WLAN_MODULE_MGMT_TXRX:
+ return "MGMT";
+ case WLAN_MODULE_DATA_TXRX:
+ return "DATA";
+ case WLAN_MODULE_HTT:
+ return "HTT";
+ case WLAN_MODULE_HOST:
+ return "HOST";
+ case WLAN_MODULE_BEACON:
+ return "BEACON";
+ case WLAN_MODULE_OFFLOAD:
+ return "OFFLOAD";
+ case WLAN_MODULE_WAL:
+ return "WAL";
+ case WAL_MODULE_DE:
+ return "DE";
+ case WLAN_MODULE_PCIELP:
+ return "PCIELP";
+ case WLAN_MODULE_RTT:
+ return "RTT";
+ case WLAN_MODULE_DCS:
+ return "DCS";
+ case WLAN_MODULE_CACHEMGR:
+ return "CACHEMGR";
+ case WLAN_MODULE_ANI:
+ return "ANI";
+ case WLAN_MODULE_TEST:
+ return "TESTPOINT";
+ case WLAN_MODULE_STA_SMPS:
+ return "STA_SMPS";
+ case WLAN_MODULE_TDLS:
+ return "TDLS";
+ default:
+ return "UNKNOWN";
+ }
+}
+
+char * DBG_MSG_ARR[WLAN_MODULE_ID_MAX][MAX_DBG_MSGS] =
+{
+ {
+ "INF_MSG_START",
+ "INF_ASSERTION_FAILED",
+ "INF_TARGET_ID",
+ "INF_MSG_END"
+ },
+ {
+ "WMI_DBGID_DEFINITION_START",
+ "WMI_CMD_RX_XTND_PKT_TOO_SHORT",
+ "WMI_EXTENDED_CMD_NOT_HANDLED",
+ "WMI_CMD_RX_PKT_TOO_SHORT",
+ "WMI_CALLING_WMI_EXTENSION_FN",
+ "WMI_CMD_NOT_HANDLED",
+ "WMI_IN_SYNC",
+ "WMI_TARGET_WMI_SYNC_CMD",
+ "WMI_SET_SNR_THRESHOLD_PARAMS",
+ "WMI_SET_RSSI_THRESHOLD_PARAMS",
+ "WMI_SET_LQ_TRESHOLD_PARAMS",
+ "WMI_TARGET_CREATE_PSTREAM_CMD",
+ "WMI_WI_DTM_INUSE",
+ "WMI_TARGET_DELETE_PSTREAM_CMD",
+ "WMI_TARGET_IMPLICIT_DELETE_PSTREAM_CMD",
+ "WMI_TARGET_GET_BIT_RATE_CMD",
+ "WMI_GET_RATE_MASK_CMD_FIX_RATE_MASK_IS",
+ "WMI_TARGET_GET_AVAILABLE_CHANNELS_CMD",
+ "WMI_TARGET_GET_TX_PWR_CMD",
+ "WMI_FREE_EVBUF_WMIBUF",
+ "WMI_FREE_EVBUF_DATABUF",
+ "WMI_FREE_EVBUF_BADFLAG",
+ "WMI_HTC_RX_ERROR_DATA_PACKET",
+ "WMI_HTC_RX_SYNC_PAUSING_FOR_MBOX",
+ "WMI_INCORRECT_WMI_DATA_HDR_DROPPING_PKT",
+ "WMI_SENDING_READY_EVENT",
+ "WMI_SETPOWER_MDOE_TO_MAXPERF",
+ "WMI_SETPOWER_MDOE_TO_REC",
+ "WMI_BSSINFO_EVENT_FROM",
+ "WMI_TARGET_GET_STATS_CMD",
+ "WMI_SENDING_SCAN_COMPLETE_EVENT",
+ "WMI_SENDING_RSSI_INDB_THRESHOLD_EVENT ",
+ "WMI_SENDING_RSSI_INDBM_THRESHOLD_EVENT",
+ "WMI_SENDING_LINK_QUALITY_THRESHOLD_EVENT",
+ "WMI_SENDING_ERROR_REPORT_EVENT",
+ "WMI_SENDING_CAC_EVENT",
+ "WMI_TARGET_GET_ROAM_TABLE_CMD",
+ "WMI_TARGET_GET_ROAM_DATA_CMD",
+ "WMI_SENDING_GPIO_INTR_EVENT",
+ "WMI_SENDING_GPIO_ACK_EVENT",
+ "WMI_SENDING_GPIO_DATA_EVENT",
+ "WMI_CMD_RX",
+ "WMI_CMD_RX_XTND",
+ "WMI_EVENT_SEND",
+ "WMI_EVENT_SEND_XTND",
+ "WMI_CMD_PARAMS_DUMP_START",
+ "WMI_CMD_PARAMS_DUMP_END",
+ "WMI_CMD_PARAMS",
+ "WMI_EVENT_ALLOC_FAILURE",
+ "WMI_DBGID_DCS_PARAM_CMD",
+ "WMI_DBGID_DEFNITION_END",
+ },
+ {
+ "PS_STA_DEFINITION_START",
+ "PS_STA_PM_ARB_REQUEST",
+ },
+ {
+ "WHAL_DBGID_DEFINITION_START",
+ "WHAL_ERROR_ANI_CONTROL",
+ "WHAL_ERROR_CHIP_TEST1",
+ "WHAL_ERROR_CHIP_TEST2",
+ "WHAL_ERROR_EEPROM_CHECKSUM",
+ "WHAL_ERROR_EEPROM_MACADDR",
+ "WHAL_ERROR_INTERRUPT_HIU",
+ "WHAL_ERROR_KEYCACHE_RESET",
+ "WHAL_ERROR_KEYCACHE_SET",
+ "WHAL_ERROR_KEYCACHE_TYPE",
+ "WHAL_ERROR_KEYCACHE_TKIPENTRY",
+ "WHAL_ERROR_KEYCACHE_WEPLENGTH",
+ "WHAL_ERROR_PHY_INVALID_CHANNEL",
+ "WHAL_ERROR_POWER_AWAKE",
+ "WHAL_ERROR_POWER_SET",
+ "WHAL_ERROR_RECV_STOPDMA",
+ "WHAL_ERROR_RECV_STOPPCU",
+ "WHAL_ERROR_RESET_CHANNF1",
+ "WHAL_ERROR_RESET_CHANNF2",
+ "WHAL_ERROR_RESET_PM",
+ "WHAL_ERROR_RESET_OFFSETCAL",
+ "WHAL_ERROR_RESET_RFGRANT",
+ "WHAL_ERROR_RESET_RXFRAME",
+ "WHAL_ERROR_RESET_STOPDMA",
+ "WHAL_ERROR_RESET_ERRID",
+ "WHAL_ERROR_RESET_ADCDCCAL1",
+ "WHAL_ERROR_RESET_ADCDCCAL2",
+ "WHAL_ERROR_RESET_TXIQCAL",
+ "WHAL_ERROR_RESET_RXIQCAL",
+ "WHAL_ERROR_RESET_CARRIERLEAK",
+ "WHAL_ERROR_XMIT_COMPUTE",
+ "WHAL_ERROR_XMIT_NOQUEUE",
+ "WHAL_ERROR_XMIT_ACTIVEQUEUE",
+ "WHAL_ERROR_XMIT_BADTYPE",
+ "WHAL_ERROR_XMIT_STOPDMA",
+ "WHAL_ERROR_INTERRUPT_BB_PANIC",
+ "WHAL_ERROR_PAPRD_MAXGAIN_ABOVE_WINDOW",
+ "WHAL_ERROR_QCU_HW_PAUSE_MISMATCH",
+ "WHAL_COEX_RESET",
+ "WHAL_COEX_SELF_GEN_MASK",
+ "WHAL_ERROR_COEX_MCI_ISR",
+ "WHAL_COEX_MCI_ISR_IntRaw",
+ "WHAL_COEX_MCI_ISR_Int1Raw",
+ "WHAL_COEX_MCI_ISR_RxMsgRaw",
+ "WHAL_COEX_SENDMSG_QUEUE",
+ "WHAL_COEX_TX_MCI_REMOTE_RESET",
+ "WHAL_COEX_TX_MCI_TYPE_UNKNOWN",
+ "WHAL_COEX_TX_MCI_SYS_SLEEPING",
+ "WHAL_COEX_TX_MCI_REQ_WAKE",
+ "WHAL_COEX_TX_MCI_SYS_WAKING",
+ "WHAL_COEX_TX_MCI_LNA_TAKE",
+ "WHAL_COEX_TX_MCI_LNA_TRANS",
+ "WHAL_COEX_TX_MCI_GPM_UNKNOWN",
+ "WHAL_COEX_TX_MCI_GPM_WLAN_SET_ACL_INACTIVITY",
+ "WHAL_COEX_TX_MCI_GPM_BT_PAUSE_PROFILE",
+ "WHAL_COEX_TX_MCI_GPM_WLAN_PRIO",
+ "WHAL_COEX_TX_MCI_GPM_BT_STATUS_UPDATE",
+ "WHAL_COEX_TX_MCI_GPM_BT_UPDATE_FLAGS",
+ "WHAL_COEX_TX_MCI_GPM_VERSION_QUERY",
+ "WHAL_COEX_TX_MCI_GPM_VERSION_RESPONSE",
+ "WHAL_COEX_TX_MCI_GPM_STATUS_QUERY",
+ "WHAL_COEX_TX_MCI_GPM_HALT_BT_GPM",
+ "WHAL_COEX_TX_MCI_GPM_WLAN_CHANNELS",
+ "WHAL_COEX_TX_MCI_GPM_BT_PROFILE_INFO",
+ "WHAL_COEX_TX_MCI_GPM_BT_CAL_REQ ",
+ "WHAL_COEX_TX_MCI_GPM_BT_CAL_GRANT",
+ "WHAL_COEX_TX_MCI_GPM_BT_CAL_DONE",
+ "WHAL_COEX_TX_MCI_GPM_WLAN_CAL_REQ",
+ "WHAL_COEX_TX_MCI_GPM_WLAN_CAL_GRANT",
+ "WHAL_COEX_TX_MCI_GPM_WLAN_CAL_DONE",
+ "WHAL_COEX_TX_MCI_GPM_BT_DEBUG",
+ "WHAL_COEX_WHAL_MCI_RESET",
+ "WHAL_COEX_POLL_BT_CAL_DONE_TIMEOUT",
+ "WHAL_COEX_WHAL_PAUSE",
+ "WHAL_COEX_RX_MCI_GPM_BT_CAL_REQ",
+ "WHAL_COEX_RX_MCI_GPM_BT_CAL_DONE",
+ "WHAL_COEX_RX_MCI_GPM_BT_CAL_GRANT",
+ "WHAL_COEX_WLAN_CAL_START",
+ "WHAL_COEX_WLAN_CAL_RESULT ",
+ "WHAL_COEX_BtMciState",
+ "WHAL_COEX_BtCalState",
+ "WHAL_COEX_WlanCalState",
+ "WHAL_COEX_RxReqWakeCount",
+ "WHAL_COEX_RxRemoteResetCount",
+ "WHAL_COEX_RESTART_CAL",
+ "WHAL_COEX_WHAL_COEX_RESET",
+ "WHAL_COEX_SELF_GEN_MASK",
+ "WHAL_DBGID_DEFINITION_END"
+ },
+ {
+ "COEX_DEBUGID_START",
+ "BTCOEX_DBG_MCI_1",
+ "BTCOEX_DBG_MCI_2",
+ "BTCOEX_DBG_MCI_3",
+ "BTCOEX_DBG_MCI_4",
+ "BTCOEX_DBG_MCI_5",
+ "BTCOEX_DBG_MCI_6",
+ "BTCOEX_DBG_MCI_7",
+ "BTCOEX_DBG_MCI_8",
+ "BTCOEX_DBG_MCI_9",
+ "BTCOEX_DBG_MCI_10",
+ "COEX_WAL_BTCOEX_INIT",
+ "COEX_WAL_PAUSE",
+ "COEX_WAL_RESUME",
+ "COEX_UPDATE_AFH",
+ "COEX_HWQ_EMPTY_CB",
+ "COEX_MCI_TIMER_HANDLER",
+ "COEX_MCI_RECOVER",
+ "ERROR_COEX_MCI_ISR",
+ "ERROR_COEX_MCI_GPM",
+ "COEX_ProfileType",
+ "COEX_LinkID",
+ "COEX_LinkState",
+ "COEX_LinkRole",
+ "COEX_LinkRate",
+ "COEX_VoiceType",
+ "COEX_TInterval",
+ "COEX_WRetrx",
+ "COEX_Attempts",
+ "COEX_PerformanceState",
+ "COEX_LinkType",
+ "COEX_RX_MCI_GPM_VERSION_QUERY",
+ "COEX_RX_MCI_GPM_VERSION_RESPONSE",
+ "COEX_RX_MCI_GPM_STATUS_QUERY",
+ "COEX_STATE_WLAN_VDEV_DOWN",
+ "COEX_STATE_WLAN_VDEV_START",
+ "COEX_STATE_WLAN_VDEV_CONNECTED",
+ "COEX_STATE_WLAN_VDEV_SCAN_STARTED",
+ "COEX_STATE_WLAN_VDEV_SCAN_END",
+ "COEX_STATE_WLAN_DEFAULT",
+ "COEX_CHANNEL_CHANGE",
+ "COEX_POWER_CHANGE",
+ "COEX_CONFIG_MGR",
+ "COEX_TX_MCI_GPM_BT_CAL_REQ",
+ "COEX_TX_MCI_GPM_BT_CAL_GRANT",
+ "COEX_TX_MCI_GPM_BT_CAL_DONE",
+ "COEX_TX_MCI_GPM_WLAN_CAL_REQ",
+ "COEX_TX_MCI_GPM_WLAN_CAL_GRANT",
+ "COEX_TX_MCI_GPM_WLAN_CAL_DONE",
+ "COEX_TX_MCI_GPM_BT_DEBUG",
+ "COEX_TX_MCI_GPM_VERSION_QUERY",
+ "COEX_TX_MCI_GPM_VERSION_RESPONSE",
+ "COEX_TX_MCI_GPM_STATUS_QUERY",
+ "COEX_TX_MCI_GPM_HALT_BT_GPM",
+ "COEX_TX_MCI_GPM_WLAN_CHANNELS",
+ "COEX_TX_MCI_GPM_BT_PROFILE_INFO",
+ "COEX_TX_MCI_GPM_BT_STATUS_UPDATE",
+ "COEX_TX_MCI_GPM_BT_UPDATE_FLAGS",
+ "COEX_TX_MCI_GPM_UNKNOWN",
+ "COEX_TX_MCI_SYS_WAKING",
+ "COEX_TX_MCI_LNA_TAKE",
+ "COEX_TX_MCI_LNA_TRANS",
+ "COEX_TX_MCI_SYS_SLEEPING",
+ "COEX_TX_MCI_REQ_WAKE",
+ "COEX_TX_MCI_REMOTE_RESET",
+ "COEX_TX_MCI_TYPE_UNKNOWN",
+ "COEX_WHAL_MCI_RESET",
+ "COEX_POLL_BT_CAL_DONE_TIMEOUT",
+ "COEX_WHAL_PAUSE",
+ "COEX_RX_MCI_GPM_BT_CAL_REQ",
+ "COEX_RX_MCI_GPM_BT_CAL_DONE",
+ "COEX_RX_MCI_GPM_BT_CAL_GRANT",
+ "COEX_WLAN_CAL_START",
+ "COEX_WLAN_CAL_RESULT",
+ "COEX_BtMciState",
+ "COEX_BtCalState",
+ "COEX_WlanCalState",
+ "COEX_RxReqWakeCount",
+ "COEX_RxRemoteResetCount",
+ "COEX_RESTART_CAL",
+ "COEX_SENDMSG_QUEUE",
+ "COEX_RESETSEQ_LNAINFO_TIMEOUT",
+ "COEX_MCI_ISR_IntRaw",
+ "COEX_MCI_ISR_Int1Raw",
+ "COEX_MCI_ISR_RxMsgRaw",
+ "COEX_WHAL_COEX_RESET",
+ "COEX_WAL_COEX_INIT",
+ "COEX_TXRX_CNT_LIMIT_ISR",
+ "COEX_CH_BUSY",
+ "COEX_REASSESS_WLAN_STATE",
+ "COEX_BTCOEX_WLAN_STATE_UPDATE",
+ "COEX_BT_NUM_OF_PROFILES",
+ "COEX_BT_NUM_OF_HID_PROFILES",
+ "COEX_BT_NUM_OF_ACL_PROFILES",
+ "COEX_BT_NUM_OF_HI_ACL_PROFILES",
+ "COEX_BT_NUM_OF_VOICE_PROFILES",
+ "COEX_WLAN_AGGR_LIMIT",
+ "COEX_BT_LOW_PRIO_BUDGET",
+ "COEX_BT_HI_PRIO_BUDGET",
+ "COEX_BT_IDLE_TIME",
+ "COEX_SET_COEX_WEIGHT",
+ "COEX_WLAN_WEIGHT_GROUP",
+ "COEX_BT_WEIGHT_GROUP",
+ "COEX_BT_INTERVAL_ALLOC",
+ "COEX_BT_SCHEME",
+ "COEX_BT_MGR",
+ "COEX_BT_SM_ERROR",
+ "COEX_SYSTEM_UPDATE",
+ "COEX_LOW_PRIO_LIMIT",
+ "COEX_HI_PRIO_LIMIT",
+ "COEX_BT_INTERVAL_START",
+ "COEX_WLAN_INTERVAL_START",
+ "COEX_NON_LINK_BUDGET",
+ "COEX_CONTENTION_MSG",
+ "COEX_SET_NSS",
+ "COEX_SELF_GEN_MASK",
+ "COEX_PROFILE_ERROR",
+ "COEX_WLAN_INIT",
+ "COEX_BEACON_MISS",
+ "COEX_BEACON_OK",
+ "COEX_BTCOEX_SCAN_ACTIVITY",
+ "COEX_SCAN_ACTIVITY",
+ "COEX_FORCE_QUIETTIME",
+ "COEX_BT_MGR_QUIETTIME",
+ "COEX_BT_INACTIVITY_TRIGGER",
+ "COEX_BT_INACTIVITY_REPORTED",
+ "COEX_TX_MCI_GPM_WLAN_PRIO",
+ "COEX_TX_MCI_GPM_BT_PAUSE_PROFILE",
+ "COEX_TX_MCI_GPM_WLAN_SET_ACL_INACTIVITY",
+ "COEX_RX_MCI_GPM_BT_ACL_INACTIVITY_REPORT",
+ "COEX_GENERIC_ERROR",
+ "COEX_RX_RATE_THRESHOLD",
+ "COEX_RSSI",
+ "COEX_WLAN_VDEV_NOTIF_START", // 133
+ "COEX_WLAN_VDEV_NOTIF_UP", // 134
+ "COEX_WLAN_VDEV_NOTIF_DOWN", // 135
+ "COEX_WLAN_VDEV_NOTIF_STOP", // 136
+ "COEX_WLAN_VDEV_NOTIF_ADD_PEER", // 137
+ "COEX_WLAN_VDEV_NOTIF_DELETE_PEER", // 138
+ "COEX_WLAN_VDEV_NOTIF_CONNECTED_PEER", // 139
+ "COEX_WLAN_VDEV_NOTIF_PAUSE", // 140
+ "COEX_WLAN_VDEV_NOTIF_UNPAUSED", // 141
+ "COEX_STATE_WLAN_VDEV_PEER_ADD", // 142
+ "COEX_STATE_WLAN_VDEV_CONNECTED_PEER", // 143
+ "COEX_STATE_WLAN_VDEV_DELETE_PEER", // 144
+ "COEX_STATE_WLAN_VDEV_PAUSE", // 145
+ "COEX_STATE_WLAN_VDEV_UNPAUSED", // 146
+ "COEX_SCAN_CALLBACK", // 147
+ "COEX_RC_SET_CHAINMASK", // 148
+ "COEX_TX_MCI_GPM_WLAN_SET_BT_RXSS_THRES", // 149
+ "COEX_TX_MCI_GPM_BT_RXSS_THRES_QUERY", // 150
+ "COEX_BT_RXSS_THRES", // 151
+ "COEX_BT_PROFILE_ADD_RMV", // 152
+ "COEX_BT_SCHED_INFO", // 153
+ "COEX_TRF_MGMT", // 154
+ "COEX_SCHED_START", // 155
+ "COEX_SCHED_RESULT", // 156
+ "COEX_SCHED_ERROR", // 157
+ "COEX_SCHED_PRE_OP", // 158
+ "COEX_SCHED_POST_OP", // 159
+ "COEX_RX_RATE", // 160
+ "COEX_ACK_PRIORITY", // 161
+ "COEX_STATE_WLAN_VDEV_UP", // 162
+ "COEX_STATE_WLAN_VDEV_PEER_UPDATE", // 163
+ "COEX_STATE_WLAN_VDEV_STOP", // 164
+ "COEX_WLAN_PAUSE_PEER", // 165
+ "COEX_WLAN_UNPAUSE_PEER", // 166
+ "COEX_WLAN_PAUSE_INTERVAL_START", // 167
+ "COEX_WLAN_POSTPAUSE_INTERVAL_START", // 168
+ "COEX_TRF_FREERUN", // 169
+ "COEX_TRF_SHAPE_PM", // 170
+ "COEX_TRF_SHAPE_PSP", // 171
+ "COEX_TRF_SHAPE_S_CTS", // 172
+ "COEX_CHAIN_CONFIG", // 173
+ "COEX_SYSTEM_MONITOR", // 174
+ "COEX_SINGLECHAIN_INIT", // 175
+ "COEX_MULTICHAIN_INIT", // 176
+ "COEX_SINGLECHAIN_DBG_1", // 177
+ "COEX_SINGLECHAIN_DBG_2", // 178
+ "COEX_SINGLECHAIN_DBG_3", // 179
+ "COEX_MULTICHAIN_DBG_1", // 180
+ "COEX_MULTICHAIN_DBG_2", // 181
+ "COEX_MULTICHAIN_DBG_3", // 182
+ "COEX_PSP_TX_CB", // 183
+ "COEX_PSP_RX_CB", // 184
+ "COEX_PSP_STAT_1", // 185
+ "COEX_PSP_SPEC_POLL", // 186
+ "COEX_PSP_READY_STATE", // 187
+ "COEX_PSP_TX_STATUS_STATE", // 188
+ "COEX_PSP_RX_STATUS_STATE_1", // 189
+ "COEX_PSP_NOT_READY_STATE", // 190
+ "COEX_PSP_DISABLED_STATE", // 191
+ "COEX_PSP_ENABLED_STATE", // 192
+ "COEX_PSP_SEND_PSPOLL", // 193
+ "COEX_PSP_MGR_ENTER", // 194
+ "COEX_PSP_MGR_RESULT", // 195
+ "COEX_PSP_NONWLAN_INTERVAL", // 196
+ "COEX_PSP_STAT_2", // 197
+ "COEX_PSP_RX_STATUS_STATE_2", // 198
+ "COEX_PSP_ERROR", // 199
+ "COEX_T2BT", // 200
+ "COEX_BT_DURATION", // 201
+ "COEX_TX_MCI_GPM_WLAN_SCHED_INFO_TRIG", // 202
+ "COEX_TX_MCI_GPM_WLAN_SCHED_INFO_TRIG_RSP", // 203
+ "COEX_TX_MCI_GPM_SCAN_OP", // 204
+ "COEX_TX_MCI_GPM_BT_PAUSE_GPM_TX", // 205
+ "COEX_CTS2S_SEND", // 206
+ "COEX_CTS2S_RESULT", // 207
+ "COEX_ENTER_OCS", // 208
+ "COEX_EXIT_OCS", // 209
+ "COEX_UPDATE_OCS", // 210
+ "COEX_STATUS_OCS", // 211
+ "COEX_STATS_BT", // 212
+ "COEX_DEBUG_MESSAGE_END"
+ },
+ {
+ "RO_DBGID_DEFINITION_START",
+ "RO_REFRESH_ROAM_TABLE",
+ "RO_UPDATE_ROAM_CANDIDATE",
+ "RO_UPDATE_ROAM_CANDIDATE_CB",
+ "RO_UPDATE_ROAM_CANDIDATE_FINISH",
+ "RO_REFRESH_ROAM_TABLE_DONE",
+ "RO_PERIODIC_SEARCH_CB",
+ "RO_PERIODIC_SEARCH_TIMEOUT",
+ "RO_INIT",
+ "RO_BMISS_STATE1",
+ "RO_BMISS_STATE2",
+ "RO_SET_PERIODIC_SEARCH_ENABLE",
+ "RO_SET_PERIODIC_SEARCH_DISABLE",
+ "RO_ENABLE_SQ_THRESHOLD",
+ "RO_DISABLE_SQ_THRESHOLD",
+ "RO_ADD_BSS_TO_ROAM_TABLE",
+ "RO_SET_PERIODIC_SEARCH_MODE",
+ "RO_CONFIGURE_SQ_THRESHOLD1",
+ "RO_CONFIGURE_SQ_THRESHOLD2",
+ "RO_CONFIGURE_SQ_PARAMS",
+ "RO_LOW_SIGNAL_QUALITY_EVENT",
+ "RO_HIGH_SIGNAL_QUALITY_EVENT",
+ "RO_REMOVE_BSS_FROM_ROAM_TABLE",
+ "RO_UPDATE_CONNECTION_STATE_METRIC",
+ "RO_LOWRSSI_SCAN_PARAMS",
+ "RO_LOWRSSI_SCAN_START",
+ "RO_LOWRSSI_SCAN_END",
+ "RO_LOWRSSI_SCAN_CANCEL",
+ "RO_LOWRSSI_ROAM_CANCEL",
+ "RO_REFRESH_ROAM_CANDIDATE",
+ "RO_DBGID_DEFINITION_END"
+ },
+ {
+ "RESMGR_CHMGR_DEFINITION_START",
+ "RESMGR_CHMGR_PAUSE_COMPLETE",
+ "RESMGR_CHMGR_CHANNEL_CHANGE",
+ "RESMGR_CHMGR_RESUME_COMPLETE",
+ "RESMGR_CHMGR_VDEV_PAUSE",
+ "RESMGR_CHMGR_VDEV_UNPAUSE",
+ "RESMGR_CHMGR_DEFINITION_END"
+ },
+ {
+ "RESMGR_DEFINITION_START",
+ "RESMGR_OCS_ALLOCRAM_SIZE",
+ "RESMGR_OCS_RESOURCES",
+ "RESMGR_LINK_CREATE",
+ "RESMGR_LINK_DELETE",
+ "RESMGR_OCS_CHREQ_CREATE",
+ "RESMGR_OCS_CHREQ_DELETE",
+ "RESMGR_OCS_CHREQ_START",
+ "RESMGR_OCS_CHREQ_STOP",
+ "RESMGR_OCS_SCHEDULER_INVOKED",
+ "RESMGR_OCS_CHREQ_GRANT",
+ "RESMGR_OCS_CHREQ_COMPLETE",
+ "RESMGR_OCS_NEXT_TSFTIME",
+ "RESMGR_OCS_TSF_TIMEOUT_US",
+ "RESMGR_OCS_CURR_CAT_WINDOW",
+ "RESMGR_OCS_CURR_CAT_WINDOW_REQ",
+ "RESMGR_OCS_CURR_CAT_WINDOW_TIMESLOT",
+ "RESMGR_OCS_CHREQ_RESTART",
+ "RESMGR_OCS_CLEANUP_CH_ALLOCATORS",
+ "RESMGR_OCS_PURGE_CHREQ",
+ "RESMGR_OCS_CH_ALLOCATOR_FREE",
+ "RESMGR_OCS_RECOMPUTE_SCHEDULE",
+ "RESMGR_OCS_NEW_CAT_WINDOW_REQ",
+ "RESMGR_OCS_NEW_CAT_WINDOW_TIMESLOT",
+ "RESMGR_OCS_CUR_CH_ALLOC",
+ "RESMGR_OCS_WIN_CH_ALLOC",
+ "RESMGR_OCS_SCHED_CH_CHANGE",
+ "RESMGR_OCS_CONSTRUCT_CAT_WIN",
+ "RESMGR_OCS_CHREQ_PREEMPTED",
+ "RESMGR_OCS_CH_SWITCH_REQ",
+ "RESMGR_OCS_CHANNEL_SWITCHED",
+ "RESMGR_OCS_CLEANUP_STALE_REQS",
+ "RESMGR_OCS_CHREQ_UPDATE",
+ "RESMGR_OCS_REG_NOA_NOTIF",
+ "RESMGR_OCS_DEREG_NOA_NOTIF",
+ "RESMGR_OCS_GEN_PERIODIC_NOA",
+ "RESMGR_OCS_RECAL_QUOTAS",
+ "RESMGR_OCS_GRANTED_QUOTA_STATS",
+ "RESMGR_OCS_ALLOCATED_QUOTA_STATS",
+ "RESMGR_OCS_REQ_QUOTA_STATS",
+ "RESMGR_OCS_TRACKING_TIME_FIRED",
+ "RESMGR_VC_ARBITRATE_ATTRIBUTES",
+ "RESMGR_OCS_LATENCY_STRICT_TIME_SLOT",
+ "RESMGR_OCS_CURR_TSF",
+ "RESMGR_OCS_QUOTA_REM",
+ "RESMGR_OCS_LATENCY_CASE_NO",
+ "RESMGR_OCS_WIN_CAT_DUR",
+ "RESMGR_VC_UPDATE_CUR_VC",
+ "RESMGR_VC_REG_UNREG_LINK",
+ "RESMGR_VC_PRINT_LINK",
+ "RESMGR_OCS_MISS_TOLERANCE",
+ "RESMGR_DEFINITION_END"
+ },
+ {
+ "VDEV_MGR_DEBID_DEFINITION_START", /* vdev Mgr */
+ "VDEV_MGR_FIRST_BEACON_MISS_DETECTED",
+ "VDEV_MGR_FINAL_BEACON_MISS_DETECTED",
+ "VDEV_MGR_BEACON_IN_SYNC",
+ "VDEV_MGR_AP_KEEPALIVE_IDLE",
+ "VDEV_MGR_AP_KEEPALIVE_INACTIVE",
+ "VDEV_MGR_AP_KEEPALIVE_UNRESPONSIVE",
+ "VDEV_MGR_AP_TBTT_CONFIG",
+ "VDEV_MGR_FIRST_BCN_RECEIVED",
+ "VDEV_MGR_VDEV_START",
+ "VDEV_MGR_VDEV_UP",
+ "VDEV_MGR_PEER_AUTHORIZED",
+ "VDEV_MGR_OCS_HP_LP_REQ_POSTED",
+ "VDEV_MGR_VDEV_START_OCS_HP_REQ_COMPLETE",
+ "VDEV_MGR_VDEV_START_OCS_HP_REQ_STOP",
+ "VDEV_MGR_HP_START_TIME",
+ "VDEV_MGR_DEFINITION_END",
+ },
+ {
+ "SCAN_START_COMMAND_FAILED", /* scan */
+ "SCAN_STOP_COMMAND_FAILED",
+ "SCAN_EVENT_SEND_FAILED",
+ "SCAN_ENGINE_START",
+ "SCAN_ENGINE_CANCEL_COMMAND",
+ "SCAN_ENGINE_STOP_DUE_TO_TIMEOUT",
+ "SCAN_EVENT_SEND_TO_HOST",
+ "SCAN_FWLOG_EVENT_ADD",
+ "SCAN_FWLOG_EVENT_REM",
+ "SCAN_FWLOG_EVENT_PREEMPTED",
+ "SCAN_FWLOG_EVENT_RESTARTED",
+ "SCAN_FWLOG_EVENT_COMPLETED",
+ },
+ { "" /* Rate ctrl*/
+ },
+ {
+ "AP_PS_DBGID_DEFINITION_START",
+ "AP_PS_DBGID_UPDATE_TIM",
+ "AP_PS_DBGID_PEER_STATE_CHANGE",
+ "AP_PS_DBGID_PSPOLL",
+ "AP_PS_DBGID_PEER_CREATE",
+ "AP_PS_DBGID_PEER_DELETE",
+ "AP_PS_DBGID_VDEV_CREATE",
+ "AP_PS_DBGID_VDEV_DELETE",
+ "AP_PS_DBGID_SYNC_TIM",
+ "AP_PS_DBGID_NEXT_RESPONSE",
+ "AP_PS_DBGID_START_SP",
+ "AP_PS_DBGID_COMPLETED_EOSP",
+ "AP_PS_DBGID_TRIGGER",
+ "AP_PS_DBGID_DUPLICATE_TRIGGER",
+ "AP_PS_DBGID_UAPSD_RESPONSE",
+ "AP_PS_DBGID_SEND_COMPLETE",
+ "AP_PS_DBGID_SEND_N_COMPLETE",
+ },
+ {
+ "" /* Block Ack */
+ },
+ /* Mgmt TxRx */
+ {
+ "MGMT_TXRX_DBGID_DEFINITION_START",
+ "MGMT_TXRX_FORWARD_TO_HOST",
+ "MGMT_TXRX_DBGID_DEFINITION_END",
+ },
+ { /* Data TxRx */
+ "DATA_TXRX_DBGID_DEFINITION_START",
+ "DATA_TXRX_DBGID_RX_DATA_SEQ_LEN_INFO",
+ "DATA_TXRX_DBGID_DEFINITION_END",
+ },
+ { "" /* HTT */
+ },
+ { "" /* HOST */
+ },
+ { "" /* BEACON */
+ "BEACON_EVENT_SWBA_SEND_FAILED",
+ "BEACON_EVENT_EARLY_RX_BMISS_STATUS",
+ "BEACON_EVENT_EARLY_RX_SLEEP_SLOP",
+ "BEACON_EVENT_EARLY_RX_CONT_BMISS_TIMEOUT",
+ "BEACON_EVENT_EARLY_RX_PAUSE_SKIP_BCN_NUM",
+ },
+ { /* Offload Mgr */
+ "OFFLOAD_MGR_DBGID_DEFINITION_START",
+ "OFFLOADMGR_REGISTER_OFFLOAD",
+ "OFFLOADMGR_DEREGISTER_OFFLOAD",
+ "OFFLOADMGR_NO_REG_DATA_HANDLERS",
+ "OFFLOADMGR_NO_REG_EVENT_HANDLERS",
+ "OFFLOADMGR_REG_OFFLOAD_FAILED",
+ "OFFLOADMGR_DBGID_DEFINITION_END",
+ },
+ {
+ "WAL_DBGID_DEFINITION_START",
+ "WAL_DBGID_FAST_WAKE_REQUEST",
+ "WAL_DBGID_FAST_WAKE_RELEASE",
+ "WAL_DBGID_SET_POWER_STATE",
+ "WAL_DBGID_MISSING",
+ "WAL_DBGID_CHANNEL_CHANGE_FORCE_RESET",
+ "WAL_DBGID_CHANNEL_CHANGE",
+ "WAL_DBGID_VDEV_START",
+ "WAL_DBGID_VDEV_STOP",
+ "WAL_DBGID_VDEV_UP",
+ "WAL_DBGID_VDEV_DOWN",
+ "WAL_DBGID_SW_WDOG_RESET",
+ "WAL_DBGID_TX_SCH_REGISTER_TIDQ",
+ "WAL_DBGID_TX_SCH_UNREGISTER_TIDQ",
+ "WAL_DBGID_TX_SCH_TICKLE_TIDQ",
+ "WAL_DBGID_XCESS_FAILURES",
+ "WAL_DBGID_AST_ADD_WDS_ENTRY",
+ "WAL_DBGID_AST_DEL_WDS_ENTRY",
+ "WAL_DBGID_AST_WDS_ENTRY_PEER_CHG",
+ "WAL_DBGID_AST_WDS_SRC_LEARN_FAIL",
+ "WAL_DBGID_STA_KICKOUT",
+ "WAL_DBGID_BAR_TX_FAIL",
+ "WAL_DBGID_BAR_ALLOC_FAIL",
+ "WAL_DBGID_LOCAL_DATA_TX_FAIL",
+ "WAL_DBGID_SECURITY_PM4_QUEUED",
+ "WAL_DBGID_SECURITY_GM1_QUEUED",
+ "WAL_DBGID_SECURITY_PM4_SENT",
+ "WAL_DBGID_SECURITY_ALLOW_DATA",
+ "WAL_DBGID_SECURITY_UCAST_KEY_SET",
+ "WAL_DBGID_SECURITY_MCAST_KEY_SET",
+ "WAL_DBGID_SECURITY_ENCR_EN",
+ "WAL_DBGID_BB_WDOG_TRIGGERED",
+ "WAL_DBGID_RX_LOCAL_BUFS_LWM",
+ "WAL_DBGID_RX_LOCAL_DROP_LARGE_MGMT",
+ "WAL_DBGID_VHT_ILLEGAL_RATE_PHY_ERR_DETECTED",
+ "WAL_DBGID_DEV_RESET",
+ "WAL_DBGID_TX_BA_SETUP",
+ "WAL_DBGID_RX_BA_SETUP",
+ "WAL_DBGID_DEV_TX_TIMEOUT",
+ "WAL_DBGID_DEV_RX_TIMEOUT",
+ "WAL_DBGID_STA_VDEV_XRETRY",
+ "WAL_DBGID_DCS",
+ "WAL_DBGID_MGMT_TX_FAIL",
+ "WAL_DBGID_SET_M4_SENT_MANUALLY",
+ "WAL_DBGID_PROCESS_4_WAY_HANDSHAKE",
+ "WAL_DBGID_WAL_CHANNEL_CHANGE_START",
+ "WAL_DBGID_WAL_CHANNEL_CHANGE_COMPLETE",
+ "WAL_DBGID_WHAL_CHANNEL_CHANGE_START",
+ "WAL_DBGID_WHAL_CHANNEL_CHANGE_COMPLETE",
+ "WAL_DBGID_TX_MGMT_DESCID_SEQ_TYPE_LEN",
+ "WAL_DBGID_TX_DATA_MSDUID_SEQ_TYPE_LEN",
+ "WAL_DBGID_TX_DISCARD",
+ "WAL_DBGID_TX_MGMT_COMP_DESCID_STATUS",
+ "WAL_DBGID_TX_DATA_COMP_MSDUID_STATUS",
+ "WAL_DBGID_RESET_PCU_CYCLE_CNT",
+ "WAL_DBGID_DEFINITION_END",
+ },
+ {
+ "" /* DE */
+ },
+ {
+ "" /* pcie lp */
+ },
+ {
+ "" /* RTT */
+ },
+ { /* RESOURCE */
+ "RESOURCE_DBGID_DEFINITION_START",
+ "RESOURCE_PEER_ALLOC",
+ "RESOURCE_PEER_FREE",
+ "RESOURCE_PEER_ALLOC_WAL_PEER",
+ "RESOURCE_DBGID_DEFINITION_END",
+ },
+ { /* DCS */
+ "WLAN_DCS_DBGID_INIT",
+ "WLAN_DCS_DBGID_WMI_CWINT",
+ "WLAN_DCS_DBGID_TIMER",
+ "WLAN_DCS_DBGID_CMDG",
+ "WLAN_DCS_DBGID_CMDS",
+ "WLAN_DCS_DBGID_DINIT"
+ },
+ { /* CACHEMGR */
+ ""
+ },
+ { /* ANI */
+ ""
+ },
+ {
+ "P2P_DBGID_DEFINITION_START",
+ "P2P_DEV_REGISTER",
+ "P2P_HANDLE_NOA",
+ "P2P_UPDATE_SCHEDULE_OPPS",
+ "P2P_UPDATE_SCHEDULE",
+ "P2P_UPDATE_START_TIME",
+ "P2P_UPDATE_START_TIME_DIFF_TSF32",
+ "P2P_UPDATE_START_TIME_FINAL",
+ "P2P_SETUP_SCHEDULE_TIMER",
+ "P2P_PROCESS_SCHEDULE_AFTER_CALC",
+ "P2P_PROCESS_SCHEDULE_STARTED_TIMER",
+ "P2P_CALC_SCHEDULES_FIRST_CALL_ALL_NEXT_EVENT",
+ "P2P_CALC_SCHEDULES_FIRST_VALUE",
+ "P2P_CALC_SCHEDULES_EARLIEST_NEXT_EVENT",
+ "P2P_CALC_SCHEDULES_SANITY_COUNT",
+ "P2P_CALC_SCHEDULES_CALL_ALL_NEXT_EVENT_FROM_WHILE_LOOP",
+ "P2P_CALC_SCHEDULES_TIMEOUT_1",
+ "P2P_CALC_SCHEDULES_TIMEOUT_2",
+ "P2P_FIND_ALL_NEXT_EVENTS_REQ_EXPIRED",
+ "P2P_FIND_ALL_NEXT_EVENTS_REQ_ACTIVE",
+ "P2P_FIND_NEXT_EVENT_REQ_NOT_STARTED",
+ "P2P_FIND_NEXT_EVENT_REQ_COMPLETE_NON_PERIODIC",
+ "P2P_FIND_NEXT_EVENT_IN_MID_OF_NOA",
+ "P2P_FIND_NEXT_EVENT_REQ_COMPLETE",
+ "P2P_SCHEDULE_TIMEOUT",
+ "P2P_CALC_SCHEDULES_ENTER",
+ "P2P_PROCESS_SCHEDULE_ENTER",
+ "P2P_FIND_ALL_NEXT_EVENTS_INDIVIDUAL_REQ_AFTER_CHANGE",
+ "P2P_FIND_ALL_NEXT_EVENTS_INDIVIDUAL_REQ_BEFORE_CHANGE",
+ "P2P_FIND_ALL_NEXT_EVENTS_ENTER",
+ "P2P_FIND_NEXT_EVENT_ENTER",
+ "P2P_NOA_GO_PRESENT",
+ "P2P_NOA_GO_ABSENT",
+ "P2P_GO_NOA_NOTIF",
+ "P2P_GO_TBTT_OFFSET",
+ "P2P_GO_GET_NOA_INFO",
+ "P2P_DBGID_DEFINITION_END",
+ },
+ {
+ "CSA_DBGID_DEFINITION_START",
+ "CSA_OFFLOAD_POOL_INIT",
+ "CSA_OFFLOAD_REGISTER_VDEV",
+ "CSA_OFFLOAD_DEREGISTER_VDEV",
+ "CSA_DEREGISTER_VDEV_ERROR",
+ "CSA_OFFLOAD_BEACON_RECEIVED",
+ "CSA_OFFLOAD_BEACON_CSA_RECV",
+ "CSA_OFFLOAD_CSA_RECV_ERROR_IE",
+ "CSA_OFFLOAD_CSA_TIMER_ERROR",
+ "CSA_OFFLOAD_CSA_TIMER_EXP",
+ "CSA_OFFLOAD_WMI_EVENT_ERROR",
+ "CSA_OFFLOAD_WMI_EVENT_SENT",
+ "CSA_OFFLOAD_WMI_CHANSWITCH_RECV",
+ },
+ { /* NLO offload */
+ ""
+ },
+ {
+ "WLAN_CHATTER_DBGID_DEFINITION_START",
+ "WLAN_CHATTER_ENTER",
+ "WLAN_CHATTER_EXIT",
+ "WLAN_CHATTER_FILTER_HIT",
+ "WLAN_CHATTER_FILTER_MISS",
+ "WLAN_CHATTER_FILTER_FULL",
+ "WLAN_CHATTER_FILTER_TM_ADJ",
+ "WLAN_CHATTER_DBGID_DEFINITION_END",
+ },
+ {
+ "WOW_DBGID_DEFINITION_START",
+ "WOW_ENABLE_CMDID",
+ "WOW_RECV_DATA_PKT",
+ "WOW_WAKE_HOST_DATA",
+ "WOW_RECV_MGMT",
+ "WOW_WAKE_HOST_MGMT",
+ "WOW_RECV_EVENT",
+ "WOW_WAKE_HOST_EVENT",
+ "WOW_INIT",
+ "WOW_RECV_MAGIC_PKT",
+ "WOW_RECV_BITMAP_PATTERN",
+ },
+ { /* WAL_VDEV */
+ ""
+ },
+ { /* WAL_PDEV */
+ ""
+ },
+ { /* TEST */
+ "TP_CHANGE_CHANNEL",
+ "TP_LOCAL_SEND",
+ },
+ { /* STA SMPS */
+ ""
+ },
+ { /* SWBMISS */
+ "SWBMISS_DBGID_DEFINITION_START",
+ "SWBMISS_ENABLED",
+ "SWBMISS_DISABLED",
+ "SWBMISS_DBGID_DEFINITION_END",
+ },
+ { /* WMMAC */
+ ""
+ },
+ { /* TDLS */
+ "TDLS_DBGID_DEFINITION_START",
+ "TDLS_DBGID_VDEV_CREATE",
+ "TDLS_DBGID_VDEV_DELETE",
+ "TDLS_DBGID_ENABLED_PASSIVE",
+ "TDLS_DBGID_ENABLED_ACTIVE",
+ "TDLS_DBGID_DISABLED",
+ "TDLS_DBGID_CONNTRACK_TIMER",
+ "TDLS_DBGID_WAL_SET",
+ "TDLS_DBGID_WAL_GET",
+ "TDLS_DBGID_WAL_PEER_UPDATE_SET",
+ "TDLS_DBGID_WAL_PEER_UPDATE_EVT",
+ "TDLS_DBGID_WAL_VDEV_CREATE",
+ "TDLS_DBGID_WAL_VDEV_DELETE",
+ "TDLS_DBGID_WLAN_EVENT",
+ "TDLS_DBGID_WLAN_PEER_UPDATE_SET",
+ "TDLS_DBGID_PEER_EVT_DRP_THRESH",
+ "TDLS_DBGID_PEER_EVT_DRP_RATE",
+ "TDLS_DBGID_PEER_EVT_DRP_RSSI",
+ "TDLS_DBGID_PEER_EVT_DISCOVER",
+ "TDLS_DBGID_PEER_EVT_DELETE",
+ },
+};
+
+static char *
+dbglog_get_msg(A_UINT32 moduleid, A_UINT32 debugid)
+{
+ static char unknown_str[64];
+
+ if (moduleid < WLAN_MODULE_ID_MAX && debugid < MAX_DBG_MSGS) {
+ char *str = DBG_MSG_ARR[moduleid][debugid];
+ if (str && str[0] != '\0') {
+ return str;
+ }
+ }
+
+ snprintf(unknown_str, sizeof(unknown_str),
+ "UNKNOWN %u:%u",
+ moduleid, debugid);
+
+ return unknown_str;
+}
+
+void
+dbglog_printf(
+ A_UINT32 timestamp,
+ A_UINT16 vap_id,
+ const char *fmt, ...)
+{
+ char buf[128];
+ va_list ap;
+
+ if (vap_id < DBGLOG_MAX_VDEVID) {
+ printf(DBGLOG_PRINT_PREFIX "[%u] vap-%u ", timestamp, vap_id);
+ } else {
+ printf(DBGLOG_PRINT_PREFIX "[%u] ", timestamp);
+ }
+
+ va_start(ap, fmt);
+ vsnprintf(buf, sizeof(buf), fmt, ap);
+ va_end(ap);
+
+ printf("%s\n", buf);
+}
+
+void
+dbglog_printf_no_line_break(
+ A_UINT32 timestamp,
+ A_UINT16 vap_id,
+ const char *fmt, ...)
+{
+ char buf[128];
+ va_list ap;
+
+ if (vap_id < DBGLOG_MAX_VDEVID) {
+ printf(DBGLOG_PRINT_PREFIX "[%u] vap-%u ", timestamp, vap_id);
+ } else {
+ printf(DBGLOG_PRINT_PREFIX "[%u] ", timestamp);
+ }
+
+ va_start(ap, fmt);
+ vsnprintf(buf, sizeof(buf), fmt, ap);
+ va_end(ap);
+
+ printf("%s", buf);
+}
+
+#define USE_NUMERIC 0
+
+A_BOOL
+dbglog_default_print_handler(A_UINT32 mod_id, A_UINT16 vap_id, A_UINT32 dbg_id,
+ A_UINT32 timestamp, A_UINT16 numargs, A_UINT32 *args)
+{
+ int i;
+
+ if (vap_id < DBGLOG_MAX_VDEVID) {
+ printf(DBGLOG_PRINT_PREFIX "[%u] vap-%u %s ( ", timestamp, vap_id, dbglog_get_msg(mod_id, dbg_id));
+ } else {
+ printf(DBGLOG_PRINT_PREFIX "[%u] %s ( ", timestamp, dbglog_get_msg(mod_id, dbg_id));
+ }
+
+ for (i = 0; i < numargs; i++) {
+#if USE_NUMERIC
+ printf("%u", args[i]);
+#else
+ printf("%#x", args[i]);
+#endif
+ if ((i + 1) < numargs) {
+ printf(", ");
+ }
+ }
+ printf(" )\n");
+
+ return TRUE;
+}
+
+#define DBGLOG_PARSE_ARGS_STRING_LENGTH (DBGLOG_NUM_ARGS_MAX * 11 + 10)
+static int
+dbglog_print_raw_data(A_UINT32 *buffer, A_UINT32 length)
+{
+ A_UINT32 timestamp;
+ A_UINT32 debugid;
+ A_UINT32 moduleid;
+ A_UINT16 numargs, curArgs;
+ A_UINT32 count = 0, totalWriteLen, writeLen;
+ char parseArgsString[DBGLOG_PARSE_ARGS_STRING_LENGTH];
+ char *dbgidString;
+
+ buffer = (A_UINT32 *)buf;
+
+ while (count < length) {
+
+ debugid = DBGLOG_GET_DBGID(buffer[count + 1]);
+ moduleid = DBGLOG_GET_MODULEID(buffer[count + 1]);
+ numargs = DBGLOG_GET_NUMARGS(buffer[count + 1]);
+ timestamp = DBGLOG_GET_TIME_STAMP(buffer[count]);
+
+ if (moduleid < WLAN_MODULE_ID_MAX && debugid < MAX_DBG_MSGS && numargs <= DBGLOG_NUM_ARGS_MAX) {
+
+ memset(parseArgsString, 0, sizeof(parseArgsString));
+ totalWriteLen = 0;
+
+ for (curArgs = 0; curArgs < numargs; curArgs++){
+ writeLen = snprintf(parseArgsString + totalWriteLen, sizeof(parseArgsString), "%x ", buffer[count + 2 + curArgs]);
+ totalWriteLen += writeLen;
+ }
+
+ dbgidString = DBG_MSG_ARR[moduleid][debugid];
+ if (dbgidString != NULL) {
+ printf("fw:%s(%x %x):%s\n",
+ dbgidString,
+ timestamp, buffer[count+1],
+ parseArgsString);
+ } else {
+ /* host need sync with FW id */
+ printf("fw:%s:m:%x,id:%x(%x %x):%s\n",
+ "UNKNOWN", moduleid, debugid,
+ timestamp, buffer[count+1],
+ parseArgsString);
+ }
+ }
+
+ count += numargs + 2; /* 32 bit Time stamp + 32 bit Dbg header*/
+ }
+
+ return 0;
+
+}
+
+int
+dbglog_parse_debug_logs(u_int8_t *datap, u_int16_t len)
+{
+ A_UINT32 count=0;
+ A_UINT32 timestamp=0;
+ A_UINT32 debugid=0;
+ A_UINT32 moduleid=0;
+ A_UINT16 vapid=0;
+ A_UINT16 numargs=0;
+ A_UINT32 *buffer;
+ A_UINT32 length = len >> 2;
+
+ buffer = (A_UINT32 *)datap;
+ length = (len >> 2);
+
+ while ((count + 2) < length) {
+
+ timestamp = DBGLOG_GET_TIME_STAMP(buffer[count]);
+ debugid = DBGLOG_GET_DBGID(buffer[count+1]);
+ moduleid = DBGLOG_GET_MODULEID(buffer[count+1]);
+ vapid = DBGLOG_GET_VDEVID(buffer[count+1]);
+ numargs = DBGLOG_GET_NUMARGS(buffer[count+1]);
+
+ if ((count + 2 + numargs) > length)
+ return 0;
+
+ if (moduleid >= WLAN_MODULE_ID_MAX)
+ return 0;
+
+ if (mod_print[moduleid] == NULL) {
+ /* No module specific log registered use the default handler*/
+ dbglog_default_print_handler(moduleid, vapid, debugid, timestamp,
+ numargs,
+ (((A_UINT32 *)buffer) + 2 + count));
+ } else {
+ if(!(mod_print[moduleid](moduleid, vapid, debugid, timestamp,
+ numargs,
+ (((A_UINT32 *)buffer) + 2 + count)))) {
+ /* The message is not handled by the module specific handler*/
+ dbglog_default_print_handler(moduleid, vapid, debugid, timestamp,
+ numargs,
+ (((A_UINT32 *)buffer) + 2 + count));
+
+ }
+ }
+
+ count += numargs + 2; /* 32 bit Time stamp + 32 bit Dbg header*/
+ }
+ /* Always returns zero */
+ return (0);
+}
+
+void
+dbglog_reg_modprint(A_UINT32 mod_id, module_dbg_print printfn)
+{
+ if (!mod_print[mod_id]) {
+ mod_print[mod_id] = printfn;
+ } else {
+ printf("module print is already registered for this module %d\n",
+ mod_id);
+ }
+}
+
+void
+dbglog_sm_print(
+ A_UINT32 timestamp,
+ A_UINT16 vap_id,
+ A_UINT16 numargs,
+ A_UINT32 *args,
+ const char *module_prefix,
+ const char *states[], A_UINT32 num_states,
+ const char *events[], A_UINT32 num_events)
+{
+ A_UINT8 type, arg1, arg2, arg3;
+ A_UINT32 extra, extra2, extra3;
+
+ if (numargs != 4) {
+ return;
+ }
+
+ type = (args[0] >> 24) & 0xff;
+ arg1 = (args[0] >> 16) & 0xff;
+ arg2 = (args[0] >> 8) & 0xff;
+ arg3 = (args[0] >> 0) & 0xff;
+
+ extra = args[1];
+ extra2 = args[2];
+ extra3 = args[3];
+
+ switch (type) {
+ case 0: /* state transition */
+ if (arg1 < num_states && arg2 < num_states) {
+ dbglog_printf(timestamp, vap_id, "%s: %s => %s (%#x, %#x, %#x)",
+ module_prefix, states[arg1], states[arg2], extra, extra2, extra3);
+ } else {
+ dbglog_printf(timestamp, vap_id, "%s: %u => %u (%#x, %#x, %#x)",
+ module_prefix, arg1, arg2, extra, extra2, extra3);
+ }
+ break;
+ case 1: /* dispatch event */
+ if (arg1 < num_states && arg2 < num_events) {
+ dbglog_printf(timestamp, vap_id, "%s: %s < %s (%#x, %#x, %#x)",
+ module_prefix, states[arg1], events[arg2], extra, extra2, extra3);
+ } else {
+ dbglog_printf(timestamp, vap_id, "%s: %u < %u (%#x, %#x, %#x)",
+ module_prefix, arg1, arg2, extra, extra2, extra3);
+ }
+ break;
+ case 2: /* warning */
+ switch (arg1) {
+ case 0: /* unhandled event */
+ if (arg2 < num_states && arg3 < num_events) {
+ dbglog_printf(timestamp, vap_id, "%s: unhandled event %s in state %s (%#x, %#x, %#x)",
+ module_prefix, events[arg3], states[arg2], extra, extra2, extra3);
+ } else {
+ dbglog_printf(timestamp, vap_id, "%s: unhandled event %u in state %u (%#x, %#x, %#x)",
+ module_prefix, arg3, arg2, extra, extra2, extra3);
+ }
+ break;
+ default:
+ break;
+
+ }
+ break;
+ }
+}
+
+A_BOOL
+dbglog_sta_powersave_print_handler(
+ A_UINT32 mod_id,
+ A_UINT16 vap_id,
+ A_UINT32 dbg_id,
+ A_UINT32 timestamp,
+ A_UINT16 numargs,
+ A_UINT32 *args)
+{
+ static const char *states[] = {
+ "IDLE",
+ "ACTIVE",
+ "SLEEP_TXQ_FLUSH",
+ "SLEEP_TX_SENT",
+ "PAUSE",
+ "SLEEP_DOZE",
+ "SLEEP_AWAKE",
+ "ACTIVE_TXQ_FLUSH",
+ "ACTIVE_TX_SENT",
+ "PAUSE_TXQ_FLUSH",
+ "PAUSE_TX_SENT",
+ "IDLE_TXQ_FLUSH",
+ "IDLE_TX_SENT",
+ };
+
+ static const char *events[] = {
+ "START",
+ "STOP",
+ "PAUSE",
+ "UNPAUSE",
+ "TIM",
+ "DTIM",
+ "SEND_COMPLETE",
+ "PRE_SEND",
+ "RX",
+ "HWQ_EMPTY",
+ "PAUSE_TIMEOUT",
+ "TXRX_INACTIVITY_TIMEOUT",
+ "PSPOLL_TIMEOUT",
+ "UAPSD_TIMEOUT",
+ "DELAYED_SLEEP_TIMEOUT",
+ "SEND_N_COMPLETE",
+ "TIDQ_PAUSE_COMPLETE",
+ "SEND_PSPOLL",
+ "SEND_SPEC_PSPOLL",
+ };
+
+ switch (dbg_id) {
+ case DBGLOG_DBGID_SM_FRAMEWORK_PROXY_DBGLOG_MSG:
+ dbglog_sm_print(timestamp, vap_id, numargs, args, "STA PS",
+ states, ARRAY_LENGTH(states), events, ARRAY_LENGTH(events));
+ break;
+ case PS_STA_PM_ARB_REQUEST:
+ if (numargs == 4) {
+ dbglog_printf(timestamp, vap_id, "PM ARB request flags=%x, last_time=%x %s: %s",
+ args[1], args[2], dbglog_get_module_str(args[0]), args[3] ? "SLEEP" : "WAKE");
+ }
+ break;
+ case PS_STA_DELIVER_EVENT:
+ if (numargs == 2) {
+ dbglog_printf(timestamp, vap_id, "STA PS: %s %s",
+ (args[0] == 0 ? "PAUSE_COMPLETE" :
+ (args[0] == 1 ? "UNPAUSE_COMPLETE" :
+ (args[0] == 2 ? "SLEEP" :
+ (args[0] == 3 ? "AWAKE" : "UNKNOWN")))),
+ (args[1] == 0 ? "SUCCESS" :
+ (args[1] == 1 ? "TXQ_FLUSH_TIMEOUT" :
+ (args[1] == 2 ? "NO_ACK" :
+ (args[1] == 3 ? "RX_LEAK_TIMEOUT" :
+ (args[1] == 4 ? "PSPOLL_UAPSD_BUSY_TIMEOUT" : "UNKNOWN"))))));
+ }
+ break;
+ case PS_STA_PSPOLL_SEQ_DONE:
+ if (numargs == 5) {
+ dbglog_printf(timestamp, vap_id, "STA PS poll: queue=%u comp=%u rsp=%u rsp_dur=%u fc=%x qos=%x %s",
+ args[0], args[1], args[2], args[3],
+ (args[4] >> 16) & 0xffff,
+ (args[4] >> 8) & 0xff,
+ (args[4] & 0xff) == 0 ? "SUCCESS" :
+ (args[4] & 0xff) == 1 ? "NO_ACK" :
+ (args[4] & 0xff) == 2 ? "DROPPED" :
+ (args[4] & 0xff) == 3 ? "FILTERED" :
+ (args[4] & 0xff) == 4 ? "RSP_TIMEOUT" : "UNKNOWN");
+ }
+ break;
+ case PS_STA_COEX_MODE:
+ if (numargs == 1) {
+ dbglog_printf(timestamp, vap_id, "STA PS COEX MODE %s",
+ args[0] ? "ENABLED" : "DISABLED");
+ }
+ break;
+ case PS_STA_PSPOLL_ALLOW:
+ if (numargs == 3) {
+ dbglog_printf(timestamp, vap_id, "STA PS-Poll %s flags=%x time=%u",
+ args[0] ? "ALLOW" : "DISALLOW", args[1], args[2]);
+ }
+ break;
+ case PS_STA_SET_PARAM:
+ if (numargs == 2) {
+ struct {
+ char *name;
+ int is_time_param;
+ } params[] = {
+ { "MAX_SLEEP_ATTEMPTS", 0 },
+ { "DELAYED_SLEEP", 1 },
+ { "TXRX_INACTIVITY", 1 },
+ { "MAX_TX_BEFORE_WAKE", 0 },
+ { "UAPSD_TIMEOUT", 1 },
+ { "UAPSD_CONFIG", 0 },
+ { "PSPOLL_RESPONSE_TIMEOUT", 1 },
+ { "MAX_PSPOLL_BEFORE_WAKE", 0 },
+ { "RX_WAKE_POLICY", 0 },
+ { "DELAYED_PAUSE_RX_LEAK", 1 },
+ { "TXRX_INACTIVITY_BLOCKED_RETRY", 1 },
+ };
+ A_UINT32 param = args[0];
+ A_UINT32 value = args[1];
+
+ if (param < ARRAY_LENGTH(params)) {
+ if (params[param].is_time_param) {
+ dbglog_printf(timestamp, vap_id, "STA PS SET_PARAM %s => %u (us)",
+ params[param].name, value);
+ } else {
+ dbglog_printf(timestamp, vap_id, "STA PS SET_PARAM %s => %#x",
+ params[param].name, value);
+ }
+ } else {
+ dbglog_printf(timestamp, vap_id, "STA PS SET_PARAM %x => %#x",
+ param, value);
+ }
+ }
+ break;
+ case PS_STA_SPECPOLL_TIMER_STARTED:
+ dbglog_printf(timestamp, vap_id, "SPEC Poll Timer Started: Beacon time Remaining:%d wakeup interval:%d", args[0], args[1]);
+ break;
+ case PS_STA_SPECPOLL_TIMER_STOPPED:
+ dbglog_printf(timestamp, vap_id,
+ "SPEC Poll Timer Stopped");
+ break;
+ default:
+ return FALSE;
+ }
+
+ return TRUE;
+}
+
+A_BOOL dbglog_ratectrl_print_handler(
+ A_UINT32 mod_id,
+ A_UINT16 vap_id,
+ A_UINT32 dbg_id,
+ A_UINT32 timestamp,
+ A_UINT16 numargs,
+ A_UINT32 *args)
+{
+ switch (dbg_id) {
+ case RATECTRL_DBGID_ASSOC:
+ dbglog_printf(timestamp, vap_id, "RATE: ChainMask %d, phymode %d, ni_flags 0x%08x, vht_mcs_set 0x%04x, ht_mcs_set 0x%04x",
+ args[0], args[1], args[2], args[3], args[4]);
+ break;
+ case RATECTRL_DBGID_NSS_CHANGE:
+ dbglog_printf(timestamp, vap_id, "RATE: NEW NSS %d\n", args[0]);
+ break;
+ case RATECTRL_DBGID_CHAINMASK_ERR:
+ dbglog_printf(timestamp, vap_id, "RATE: Chainmask ERR %d %d %d\n",
+ args[0], args[1], args[2]);
+ break;
+ case RATECTRL_DBGID_UNEXPECTED_FRAME:
+ dbglog_printf(timestamp, vap_id, "RATE: WARN1: rate %d flags 0x%08x\n", args[0], args[1]);
+ break;
+ case RATECTRL_DBGID_WAL_RCQUERY:
+ dbglog_printf(timestamp, vap_id, "ratectrl_dbgid_wal_rcquery [rix1 %d rix2 %d rix3 %d proberix %d ppduflag 0x%x] ",
+ args[0], args[1], args[2], args[3], args[4]);
+ break;
+ case RATECTRL_DBGID_WAL_RCUPDATE:
+ dbglog_printf(timestamp, vap_id, "ratectrl_dbgid_wal_rcupdate [numelems %d ppduflag 0x%x] ",
+ args[0], args[1]);
+ }
+ return TRUE;
+}
+
+A_BOOL dbglog_ani_print_handler(
+ A_UINT32 mod_id,
+ A_UINT16 vap_id,
+ A_UINT32 dbg_id,
+ A_UINT32 timestamp,
+ A_UINT16 numargs,
+ A_UINT32 *args)
+{
+ switch (dbg_id) {
+ case ANI_DBGID_ENABLE:
+ dbglog_printf(timestamp, vap_id,
+ "ANI Enable: %d", args[0]);
+ break;
+ case ANI_DBGID_POLL:
+ dbglog_printf(timestamp, vap_id,
+ "ANI POLLING: AccumListenTime %d ListenTime %d ofdmphyerr %d cckphyerr %d",
+ args[0], args[1], args[2],args[3]);
+ break;
+ case ANI_DBGID_RESTART:
+ dbglog_printf(timestamp, vap_id,"ANI Restart");
+ break;
+ case ANI_DBGID_CURRENT_LEVEL:
+ dbglog_printf(timestamp, vap_id,
+ "ANI CURRENT LEVEL ofdm level %d cck level %d",args[0],args[1]);
+ break;
+ case ANI_DBGID_OFDM_LEVEL:
+ dbglog_printf(timestamp, vap_id,
+ "ANI UPDATE ofdm level %d firstep %d firstep_low %d cycpwr_thr %d self_corr_low %d",
+ args[0], args[1],args[2],args[3],args[4]);
+ break;
+ case ANI_DBGID_CCK_LEVEL:
+ dbglog_printf(timestamp, vap_id,
+ "ANI UPDATE cck level %d firstep %d firstep_low %d mrc_cck %d",
+ args[0],args[1],args[2],args[3]);
+ break;
+ case ANI_DBGID_CONTROL:
+ dbglog_printf(timestamp, vap_id,
+ "ANI CONTROL ofdmlevel %d ccklevel %d\n",
+ args[0]);
+
+ break;
+ case ANI_DBGID_OFDM_PARAMS:
+ dbglog_printf(timestamp, vap_id,
+ "ANI ofdm_control firstep %d cycpwr %d\n",
+ args[0],args[1]);
+ break;
+ case ANI_DBGID_CCK_PARAMS:
+ dbglog_printf(timestamp, vap_id,
+ "ANI cck_control mrc_cck %d barker_threshold %d\n",
+ args[0],args[1]);
+ break;
+ case ANI_DBGID_RESET:
+ dbglog_printf(timestamp, vap_id,
+ "ANI resetting resetflag %d resetCause %8x channel index %d",
+ args[0],args[1],args[2]);
+ break;
+ case ANI_DBGID_SELF_CORR_LOW:
+ dbglog_printf(timestamp, vap_id,"ANI self_corr_low %d",args[0]);
+ break;
+ case ANI_DBGID_FIRSTEP:
+ dbglog_printf(timestamp, vap_id,"ANI firstep %d firstep_low %d",
+ args[0],args[1]);
+ break;
+ case ANI_DBGID_MRC_CCK:
+ dbglog_printf(timestamp, vap_id,"ANI mrc_cck %d",args[0]);
+ break;
+ case ANI_DBGID_CYCPWR:
+ dbglog_printf(timestamp, vap_id,"ANI cypwr_thresh %d",args[0]);
+ break;
+ case ANI_DBGID_POLL_PERIOD:
+ dbglog_printf(timestamp, vap_id,"ANI Configure poll period to %d",args[0]);
+ break;
+ case ANI_DBGID_LISTEN_PERIOD:
+ dbglog_printf(timestamp, vap_id,"ANI Configure listen period to %d",args[0]);
+ break;
+ case ANI_DBGID_OFDM_LEVEL_CFG:
+ dbglog_printf(timestamp, vap_id,"ANI Configure ofdm level to %d",args[0]);
+ break;
+ case ANI_DBGID_CCK_LEVEL_CFG:
+ dbglog_printf(timestamp, vap_id,"ANI Configure cck level to %d",args[0]);
+ break;
+ default:
+ dbglog_printf(timestamp, vap_id,"ANI arg1 %d arg2 %d arg3 %d",
+ args[0],args[1],args[2]);
+ break;
+ }
+ return TRUE;
+}
+
+A_BOOL
+dbglog_ap_powersave_print_handler(
+ A_UINT32 mod_id,
+ A_UINT16 vap_id,
+ A_UINT32 dbg_id,
+ A_UINT32 timestamp,
+ A_UINT16 numargs,
+ A_UINT32 *args)
+{
+ switch (dbg_id) {
+ case AP_PS_DBGID_UPDATE_TIM:
+ if (numargs == 2) {
+ dbglog_printf(timestamp, vap_id,
+ "AP PS: TIM update AID=%u %s",
+ args[0], args[1] ? "set" : "clear");
+ }
+ break;
+ case AP_PS_DBGID_PEER_STATE_CHANGE:
+ if (numargs == 2) {
+ dbglog_printf(timestamp, vap_id,
+ "AP PS: AID=%u power save %s",
+ args[0], args[1] ? "enabled" : "disabled");
+ }
+ break;
+ case AP_PS_DBGID_PSPOLL:
+ if (numargs == 3) {
+ dbglog_printf(timestamp, vap_id,
+ "AP PS: AID=%u pspoll response tid=%u flags=%x",
+ args[0], args[1], args[2]);
+ }
+ break;
+ case AP_PS_DBGID_PEER_CREATE:
+ if (numargs == 1) {
+ dbglog_printf(timestamp, vap_id,
+ "AP PS: create peer AID=%u", args[0]);
+ }
+ break;
+ case AP_PS_DBGID_PEER_DELETE:
+ if (numargs == 1) {
+ dbglog_printf(timestamp, vap_id,
+ "AP PS: delete peer AID=%u", args[0]);
+ }
+ break;
+ case AP_PS_DBGID_VDEV_CREATE:
+ dbglog_printf(timestamp, vap_id, "AP PS: vdev create");
+ break;
+ case AP_PS_DBGID_VDEV_DELETE:
+ dbglog_printf(timestamp, vap_id, "AP PS: vdev delete");
+ break;
+ case AP_PS_DBGID_SYNC_TIM:
+ if (numargs == 3) {
+ dbglog_printf(timestamp, vap_id,
+ "AP PS: AID=%u advertised=%#x buffered=%#x", args[0], args[1], args[2]);
+ }
+ break;
+ case AP_PS_DBGID_NEXT_RESPONSE:
+ if (numargs == 4) {
+ dbglog_printf(timestamp, vap_id,
+ "AP PS: AID=%u select next response %s%s%s", args[0],
+ args[1] ? "(usp active) " : "",
+ args[2] ? "(pending usp) " : "",
+ args[3] ? "(pending poll response)" : "");
+ }
+ break;
+ case AP_PS_DBGID_START_SP:
+ if (numargs == 3) {
+ dbglog_printf(timestamp, vap_id,
+ "AP PS: AID=%u START SP tsf=%#x (%u)",
+ args[0], args[1], args[2]);
+ }
+ break;
+ case AP_PS_DBGID_COMPLETED_EOSP:
+ if (numargs == 3) {
+ dbglog_printf(timestamp, vap_id,
+ "AP PS: AID=%u EOSP eosp_tsf=%#x trigger_tsf=%#x",
+ args[0], args[1], args[2]);
+ }
+ break;
+ case AP_PS_DBGID_TRIGGER:
+ if (numargs == 4) {
+ dbglog_printf(timestamp, vap_id,
+ "AP PS: AID=%u TRIGGER tsf=%#x %s%s", args[0], args[1],
+ args[2] ? "(usp active) " : "",
+ args[3] ? "(send_n in progress)" : "");
+ }
+ break;
+ case AP_PS_DBGID_DUPLICATE_TRIGGER:
+ if (numargs == 4) {
+ dbglog_printf(timestamp, vap_id,
+ "AP PS: AID=%u DUP TRIGGER tsf=%#x seq=%u ac=%u",
+ args[0], args[1], args[2], args[3]);
+ }
+ break;
+ case AP_PS_DBGID_UAPSD_RESPONSE:
+ if (numargs == 5) {
+ dbglog_printf(timestamp, vap_id,
+ "AP PS: AID=%u UAPSD response tid=%u, n_mpdu=%u flags=%#x max_sp=%u current_sp=%u",
+ args[0], args[1], args[2], args[3], (args[4] >> 16) & 0xffff, args[4] & 0xffff);
+ }
+ break;
+ case AP_PS_DBGID_SEND_COMPLETE:
+ if (numargs == 5) {
+ dbglog_printf(timestamp, vap_id,
+ "AP PS: AID=%u SEND_COMPLETE fc=%#x qos=%#x %s%s",
+ args[0], args[1], args[2],
+ args[3] ? "(usp active) " : "",
+ args[4] ? "(pending poll response)" : "");
+ }
+ break;
+ case AP_PS_DBGID_SEND_N_COMPLETE:
+ if (numargs == 3) {
+ dbglog_printf(timestamp, vap_id,
+ "AP PS: AID=%u SEND_N_COMPLETE %s%s",
+ args[0],
+ args[1] ? "(usp active) " : "",
+ args[2] ? "(pending poll response)" : "");
+ }
+ break;
+ case AP_PS_DBGID_DETECT_OUT_OF_SYNC_STA:
+ if (numargs == 4) {
+ dbglog_printf(timestamp, vap_id,
+ "AP PS: AID=%u detected out-of-sync now=%u tx_waiting=%u txq_depth=%u",
+ args[0], args[1], args[2], args[3]);
+ }
+ break;
+ case AP_PS_DBGID_DELIVER_CAB:
+ if (numargs == 4) {
+ dbglog_printf(timestamp, vap_id,
+ "AP PS: CAB %s n_mpdus=%u, flags=%x, extra=%u",
+ (args[0] == 17) ? "MGMT" : "DATA", args[1], args[2], args[3]);
+ }
+ break;
+ default:
+ return FALSE;
+ }
+
+ return TRUE;
+}
+
+A_BOOL
+dbglog_wal_print_handler(
+ A_UINT32 mod_id,
+ A_UINT16 vap_id,
+ A_UINT32 dbg_id,
+ A_UINT32 timestamp,
+ A_UINT16 numargs,
+ A_UINT32 *args)
+{
+ static const char *states[] = {
+ "ACTIVE",
+ "WAIT",
+ "WAIT_FILTER",
+ "PAUSE",
+ "PAUSE_SEND_N",
+ "BLOCK",
+ };
+
+ static const char *events[] = {
+ "PAUSE",
+ "PAUSE_FILTER",
+ "UNPAUSE",
+
+ "BLOCK",
+ "BLOCK_FILTER",
+ "UNBLOCK",
+
+ "HWQ_EMPTY",
+ "ALLOW_N",
+ };
+
+#define WAL_VDEV_TYPE(type) \
+ (type == 0 ? "AP" : \
+ (type == 1 ? "STA" : \
+ (type == 2 ? "IBSS" : \
+ (type == 2 ? "MONITOR" : \
+ "UNKNOWN"))))
+
+#define WAL_SLEEP_STATE(state) \
+ (state == 1 ? "NETWORK SLEEP" : \
+ (state == 2 ? "AWAKE" : \
+ (state == 3 ? "SYSTEM SLEEP" : \
+ "UNKNOWN")))
+
+ switch (dbg_id) {
+ case DBGLOG_DBGID_SM_FRAMEWORK_PROXY_DBGLOG_MSG:
+ dbglog_sm_print(timestamp, vap_id, numargs, args, "TID PAUSE",
+ states, ARRAY_LENGTH(states), events, ARRAY_LENGTH(events));
+ break;
+ case WAL_DBGID_SET_POWER_STATE:
+ if (numargs == 3) {
+ dbglog_printf(timestamp, vap_id,
+ "WAL %s => %s, req_count=%u",
+ WAL_SLEEP_STATE(args[0]), WAL_SLEEP_STATE(args[1]),
+ args[2]);
+ }
+ break;
+ case WAL_DBGID_CHANNEL_CHANGE_FORCE_RESET:
+ if (numargs == 4) {
+ dbglog_printf(timestamp, vap_id,
+ "WAL channel change (force reset) freq=%u, flags=%u mode=%u rx_ok=%u tx_ok=%u",
+ args[0] & 0x0000ffff, (args[0] & 0xffff0000) >> 16, args[1],
+ args[2], args[3]);
+ }
+ break;
+ case WAL_DBGID_CHANNEL_CHANGE:
+ if (numargs == 2) {
+ dbglog_printf(timestamp, vap_id,
+ "WAL channel change freq=%u, mode=%u flags=%u rx_ok=1 tx_ok=1",
+ args[0] & 0x0000ffff, (args[0] & 0xffff0000) >> 16, args[1]);
+ }
+ break;
+ case WAL_DBGID_VDEV_START:
+ if (numargs == 1) {
+ dbglog_printf(timestamp, vap_id, "WAL %s vdev started",
+ WAL_VDEV_TYPE(args[0]));
+ }
+ break;
+ case WAL_DBGID_VDEV_STOP:
+ dbglog_printf(timestamp, vap_id, "WAL %s vdev stopped",
+ WAL_VDEV_TYPE(args[0]));
+ break;
+ case WAL_DBGID_VDEV_UP:
+ dbglog_printf(timestamp, vap_id, "WAL %s vdev up, count=%u",
+ WAL_VDEV_TYPE(args[0]), args[1]);
+ break;
+ case WAL_DBGID_VDEV_DOWN:
+ dbglog_printf(timestamp, vap_id, "WAL %s vdev down, count=%u",
+ WAL_VDEV_TYPE(args[0]), args[1]);
+ break;
+ case WAL_DBGID_TX_MGMT_DESCID_SEQ_TYPE_LEN:
+ dbglog_printf(timestamp, vap_id, "WAL Tx Mgmt frame desc_id=0x%x, seq=0x%x, type=0x%x, len=0x%x islocal=0x%x",
+ args[0], args[1], args[2], (args[3] & 0xffff0000) >> 16, args[3] & 0x0000ffff);
+ break;
+ case WAL_DBGID_TX_MGMT_COMP_DESCID_STATUS:
+ dbglog_printf(timestamp, vap_id, "WAL Tx Mgmt frame completion desc_id=0x%x, status=0x%x, islocal=0x%x",
+ args[0], args[1], args[2]);
+ break;
+ case WAL_DBGID_TX_DATA_MSDUID_SEQ_TYPE_LEN:
+ dbglog_printf(timestamp, vap_id, "WAL Tx Data frame msdu_id=0x%x, seq=0x%x, type=0x%x, len=0x%x",
+ args[0], args[1], args[2], args[3]);
+ break;
+ case WAL_DBGID_TX_DATA_COMP_MSDUID_STATUS:
+ dbglog_printf(timestamp, vap_id, "WAL Tx Data frame completion desc_id=0x%x, status=0x%x, seq=0x%x",
+ args[0], args[1], args[2]);
+ break;
+ case WAL_DBGID_RESET_PCU_CYCLE_CNT:
+ dbglog_printf(timestamp, vap_id, "WAL PCU cycle counter value at reset:%x", args[0]);
+ break;
+ case WAL_DBGID_TX_DISCARD:
+ dbglog_printf(timestamp, vap_id, "WAL Tx enqueue discard msdu_id=0x%x", args[0]);
+ break;
+ default:
+ return FALSE;
+ }
+
+ return TRUE;
+}
+
+A_BOOL
+dbglog_scan_print_handler(
+ A_UINT32 mod_id,
+ A_UINT16 vap_id,
+ A_UINT32 dbg_id,
+ A_UINT32 timestamp,
+ A_UINT16 numargs,
+ A_UINT32 *args)
+{
+ static const char *states[] = {
+ "IDLE",
+ "BSSCHAN",
+ "WAIT_FOREIGN_CHAN",
+ "FOREIGN_CHANNEL",
+ "TERMINATING"
+ };
+
+ static const char *events[] = {
+ "REQ",
+ "STOP",
+ "BSSCHAN",
+ "FOREIGN_CHAN",
+ "CHECK_ACTIVITY",
+ "REST_TIME_EXPIRE",
+ "DWELL_TIME_EXPIRE",
+ "PROBE_TIME_EXPIRE",
+ };
+
+ switch (dbg_id) {
+ case DBGLOG_DBGID_SM_FRAMEWORK_PROXY_DBGLOG_MSG:
+ dbglog_sm_print(timestamp, vap_id, numargs, args, "SCAN",
+ states, ARRAY_LENGTH(states), events, ARRAY_LENGTH(events));
+ break;
+ default:
+ return FALSE;
+ }
+
+ return TRUE;
+}
+
+A_BOOL dbglog_coex_print_handler(
+ A_UINT32 mod_id,
+ A_UINT16 vap_id,
+ A_UINT32 dbg_id,
+ A_UINT32 timestamp,
+ A_UINT16 numargs,
+ A_UINT32 * args)
+{
+ A_UINT8 i;
+ char * dbg_id_str;
+
+ static const char * wlan_rx_xput_status[] = {
+ "WLAN_XPUT_NORMAL",
+ "WLAN_XPUT_UNDER_THRESH",
+ "WLAN_XPUT_CRITICAL",
+ "WLAN_XPUT_RECOVERY_TIMEOUT",
+ };
+
+ static const char * coex_sched_req[] = {
+ "SCHED_REQ_NEXT",
+ "SCHED_REQ_BT",
+ "SCHED_REQ_WLAN",
+ "SCHED_REQ_POSTPAUSE",
+ "SCHED_REQ_UNPAUSE",
+ };
+
+ static const char * coex_sched_type[] = {
+ "SCHED_NONE",
+ "SCHED_WLAN",
+ "SCHED_BT",
+ "SCHED_WLAN_PAUSE",
+ "SCHED_WLAN_POSTPAUSE",
+ "SCHED_WLAN_UNPAUSE",
+ };
+
+ static const char * coex_trf_mgmt_type[] = {
+ "TRF_MGMT_FREERUN",
+ "TRF_MGMT_SHAPE_PM",
+ "TRF_MGMT_SHAPE_PSP",
+ "TRF_MGMT_SHAPE_S_CTS",
+ };
+
+ static const char * coex_system_status[] = {
+ "BT_OFF",
+ "BTCOEX_NOT_REQD",
+ "WLAN_IS_IDLE",
+ "EXECUTE_SCHEME",
+ "BT_FULL_CONCURRENCY",
+ "WLAN_SLEEPING",
+ "WLAN_IS_PAUSED",
+ "WAIT_FOR_NEXT_ACTION",
+ };
+
+ static const char * wlan_rssi_type[] = {
+ "LOW_RSSI",
+ "MID_RSSI",
+ "HI_RSSI",
+ "INVALID_RSSI",
+ };
+
+ static const char * coex_bt_scheme[] = {
+ "IDLE_CTRL",
+ "ACTIVE_ASYNC_CTRL",
+ "PASSIVE_SYNC_CTRL",
+ "ACTIVE_SYNC_CTRL",
+ "DEFAULT_CTRL",
+ "CONCURRENCY_CTRL",
+ };
+
+ static const char * wal_peer_rx_rate_stats_event_sent[] = {
+ "PR_RX_EVT_SENT_NONE",
+ "PR_RX_EVT_SENT_LOWER",
+ "PR_RX_EVT_SENT_UPPER",
+ };
+
+ static const char * wlan_psp_stimulus[] = {
+ "ENTRY",
+ "EXIT",
+ "PS_READY",
+ "PS_NOT_READY",
+ "RX_MORE_DATA_RCVD",
+ "RX_NO_MORE_DATA_RCVD",
+ "TX_DATA_COMPLT",
+ "TX_COMPLT",
+ "TIM_SET",
+ "REQ",
+ "DONE_SUCCESS",
+ "DONE_NO_PS_POLL_ACK",
+ "DONE_RESPONSE_TMO",
+ "DONE_DROPPED",
+ "DONE_FILTERED",
+ "WLAN_START",
+ "NONWLAN_START",
+ "NONWLAN_INTVL_UPDATE",
+ "NULL_TX",
+ "NULL_TX_COMPLT",
+ "BMISS_FIRST",
+ "NULL_TX_FAIL",
+ "RX_NO_MORE_DATA_DATAFRM",
+ };
+
+ static const char * coex_pspoll_state[] = {
+ "STATE_DISABLED",
+ "STATE_NOT_READY",
+ "STATE_ENABLED",
+ "STATE_READY",
+ "STATE_TX_STATUS",
+ "STATE_RX_STATUS",
+ };
+
+ static const char * coex_scheduler_interval[] = {
+ "COEX_SCHED_NONWLAN_INT",
+ "COEX_SCHED_WLAN_INT",
+ };
+
+ static const char * wlan_weight[] = {
+ "BT_COEX_BASE",
+ "BT_COEX_LOW",
+ "BT_COEX_MID",
+ "BT_COEX_MID_NONSYNC",
+ "BT_COEX_HI_NONVOICE",
+ "BT_COEX_HI",
+ "BT_COEX_CRITICAL",
+ };
+
+ static const char * coex_psp_error_type[] = {
+ "DISABLED_STATE",
+ "VDEV_NULL",
+ "COEX_PSP_ENTRY",
+ "ZERO_INTERVAL",
+ "COEX_PSP_EXIT",
+ "READY_DISABLED",
+ "READY_NOT_DISABLED",
+ "POLL_PKT_DROPPED",
+ "SET_TIMER_PARAM",
+ };
+
+ dbg_id_str = dbglog_get_msg(mod_id, dbg_id);
+
+ switch (dbg_id) {
+ case COEX_SYSTEM_UPDATE:
+ if (numargs >= 1 && args[0] < 8) {
+ dbglog_printf(timestamp, vap_id, "%s: %s", dbg_id_str, coex_system_status[args[0]]);
+ } else {
+ return FALSE;
+ }
+ break;
+ case COEX_SCHED_START:
+ if (numargs >= 5 && args[0] < 5 && args[2] < 4 && args[3] < 4 && args[4] < 4) {
+ if (args[1] == 0xffffffff) {
+ dbglog_printf(timestamp, vap_id, "%s: %s, DETERMINE_DURATION, %s, %s, %s",
+ dbg_id_str, coex_sched_req[args[0]], coex_trf_mgmt_type[args[2]], wlan_rx_xput_status[args[3]], wlan_rssi_type[args[4]]);
+ } else {
+ dbglog_printf(timestamp, vap_id, "%s: %s, IntvlDur(%u), %s, %s, %s",
+ dbg_id_str, coex_sched_req[args[0]], args[1], coex_trf_mgmt_type[args[2]], wlan_rx_xput_status[args[3]], wlan_rssi_type[args[4]]);
+ }
+ } else {
+ return FALSE;
+ }
+ break;
+ case COEX_SCHED_RESULT:
+ if (numargs >= 5 && args[0] < 6) {
+ dbglog_printf(timestamp, vap_id, "%s: %s, CoexMgrPolicy(%u), WlanIsIdleOverride(%u), HidConcurTxOverride(%u), minRSSI(%u)",
+ dbg_id_str, coex_sched_type[args[0]], args[1], args[2], args[3], args[4]);
+ } else {
+ return FALSE;
+ }
+ break;
+ case COEX_BT_SCHEME:
+ if (numargs >= 1 && args[0] < 6) {
+ dbglog_printf(timestamp, vap_id, "%s: %s", dbg_id_str, coex_bt_scheme[args[0]]);
+ } else {
+ return FALSE;
+ }
+ break;
+ case COEX_TRF_FREERUN:
+ case COEX_TRF_SHAPE_PM:
+ if (numargs >= 5 && args[0] < 6) {
+ dbglog_printf(timestamp, vap_id, "%s: %s, AllocatedBtIntvls(%u), BtIntvlCnt(%u), AllocatedWlanIntvls(%u), WlanIntvlCnt(%u)",
+ dbg_id_str, coex_sched_type[args[0]], args[1], args[2], args[3], args[4]);
+ } else {
+ return FALSE;
+ }
+ break;
+ case COEX_SYSTEM_MONITOR:
+ if (numargs >= 5 && args[1] < 4 && args[4] < 4) {
+ dbglog_printf(timestamp, vap_id, "%s: WlanRxCritical(%u), %s, MinDirectRxRate(%u), XputMonitorActiveNum(%u), %s",
+ dbg_id_str, args[0], wlan_rx_xput_status[args[1]], args[2], args[3], wlan_rssi_type[args[4]]);
+ } else {
+ return FALSE;
+ }
+ break;
+ case COEX_RX_RATE:
+ if (numargs >= 5 && args[4] < 3) {
+ dbglog_printf(timestamp, vap_id, "%s: NumUnderThreshPeers(%u), MinDirectRate(%u), LastRateSample(%u), DeltaT(%u), %s",
+ dbg_id_str, args[0], args[1], args[2], args[3], wal_peer_rx_rate_stats_event_sent[args[4]]);
+ } else {
+ return FALSE;
+ }
+ break;
+ case COEX_WLAN_INTERVAL_START:
+ if (numargs >= 4) {
+ dbglog_printf(timestamp, vap_id, "%s: WlanIntvlCnt(%u), XputMonitorActiveNum(%u), Duration(%u), Weight(%u)",
+ dbg_id_str, args[0], args[1], args[2], args[3]);
+ } else {
+ return FALSE;
+ }
+ break;
+ case COEX_WLAN_POSTPAUSE_INTERVAL_START:
+ if (numargs >= 4) {
+ dbglog_printf(timestamp, vap_id, "%s: WlanPostPauseIntvlCnt(%u), XputMonitorActiveNum(%u), Duration(%u), Weight(%u)",
+ dbg_id_str, args[0], args[1], args[2], args[3]);
+ } else {
+ return FALSE;
+ }
+ break;
+ case COEX_BT_INTERVAL_START:
+ if (numargs >= 5) {
+ dbglog_printf(timestamp, vap_id, "%s: BtIntvlCnt(%u), HidConcurrentTxOverride(%u), EnableBtBwLimit(%u), Duration(%u), Weight(%u)",
+ dbg_id_str, args[0], args[1], args[2], args[3], args[4]);
+ } else {
+ return FALSE;
+ }
+ break;
+ case COEX_PSP_MGR_ENTER:
+ if (numargs >= 5 && args[0] < 23 && args[1] < 6 && args[3] < 2) {
+ dbglog_printf(timestamp, vap_id, "%s: %s, %s, PsPollAvg(%u), %s, CurrT(%u)",
+ dbg_id_str, wlan_psp_stimulus[args[0]], coex_pspoll_state[args[1]], args[2], coex_scheduler_interval[args[3]], args[4]);
+ } else {
+ return FALSE;
+ }
+ break;
+ case COEX_PSP_MGR_RESULT:
+ if (numargs >= 5 && args[0] < 6) {
+ dbglog_printf(timestamp, vap_id, "%s: %s, PsPollAvg(%u), EstimationOverrun(%u), EstimationUnderun(%u), NotReadyErr(%u)",
+ dbg_id_str, coex_pspoll_state[args[0]], args[1], args[2], args[3], args[4]);
+ } else {
+ return FALSE;
+ }
+ break;
+ case COEX_TRF_SHAPE_PSP:
+ if (numargs == 2 && args[0] < 6) {
+ dbglog_printf(timestamp, vap_id, "%s: %s, CurrT(%u)",
+ dbg_id_str, coex_pspoll_state[args[0]], args[1]);
+ } else if (numargs >= 5 && args[0] < 6 && args[1] < 7) {
+ dbglog_printf(timestamp, vap_id, "%s: %s, %s, Dur(%u), WlanOverride(%u), PrioritizeWlanDuringCollis(%u)",
+ dbg_id_str, coex_sched_type[args[0]], wlan_weight[args[1]], args[2], args[3], args[4]);
+ } else {
+ return FALSE;
+ }
+ break;
+ case COEX_PSP_SPEC_POLL:
+ if (numargs >= 5) {
+ dbglog_printf(timestamp, vap_id, "%s: PsPollSpecEna(%u), Count(%u), NextTS(%u), AllowSpecPsPollTx(%u), Intvl(%u)",
+ dbg_id_str, args[0], args[1], args[2], args[3], args[4]);
+ } else {
+ return FALSE;
+ }
+ break;
+ case COEX_PSP_READY_STATE:
+ if (numargs >= 5) {
+ dbglog_printf(timestamp, vap_id, "%s: T2BT(%u), CoexSchedulerEndTS(%u), MoreData(%u), PSPRespExpectedTS(%u), NonWlanIdleT(%u)",
+ dbg_id_str, args[0], args[1], args[2], args[3], args[4]);
+ } else {
+ return FALSE;
+ }
+ break;
+ case COEX_PSP_NONWLAN_INTERVAL:
+ if (numargs >= 4) {
+ dbglog_printf(timestamp, vap_id, "%s: NonWlanBaseIntvl(%u), NonWlanIdleT(%u), PSPSpecIntvl(%u), ApRespTimeout(%u)",
+ dbg_id_str, args[0], args[1], args[2], args[3]);
+ } else {
+ return FALSE;
+ }
+ break;
+ case COEX_PSP_ERROR:
+ if (numargs >= 1 && args[0] < 9) {
+ dbglog_printf_no_line_break(timestamp, vap_id, "%s: %s",
+ dbg_id_str, coex_psp_error_type[args[0]]);
+ for (i = 1; i < numargs; i++) {
+ printf(", %u", args[i]);
+ }
+ printf("\n");
+ } else {
+ return FALSE;
+ }
+ break;
+ case COEX_PSP_STAT_1:
+ if (numargs >= 5) {
+ dbglog_printf(timestamp, vap_id, "%s: ApResp0(%u), ApResp1(%u), ApResp2(%u), ApResp3(%u), ApResp4(%u)",
+ dbg_id_str, args[0], args[1], args[2], args[3], args[4]);
+ } else {
+ return FALSE;
+ }
+ break;
+ case COEX_PSP_STAT_2:
+ if (numargs >= 5) {
+ dbglog_printf(timestamp, vap_id, "%s: DataPt(%u), Max(%u), NextApRespIndex(%u), NumOfValidDataPts(%u), PsPollAvg(%u)",
+ dbg_id_str, args[0], args[1], args[2], args[3], args[4]);
+ } else {
+ return FALSE;
+ }
+ break;
+ case COEX_PSP_RX_STATUS_STATE_1:
+ if (numargs >= 5) {
+ if (args[2]) {
+ dbglog_printf(timestamp, vap_id, "%s: RsExpectedTS(%u), RespActualTS(%u), Overrun, RsOverrunT(%u), RsRxDur(%u)",
+ dbg_id_str, args[0], args[1], args[3], args[4]);
+ } else {
+ dbglog_printf(timestamp, vap_id, "%s: RsExpectedTS(%u), RespActualTS(%u), Underrun, RsUnderrunT(%u), RsRxDur(%u)",
+ dbg_id_str, args[0], args[1], args[3], args[4]);
+ }
+ } else {
+ return FALSE;
+ }
+ break;
+ //Translate following into decimal
+ case COEX_SINGLECHAIN_DBG_1:
+ case COEX_SINGLECHAIN_DBG_2:
+ case COEX_SINGLECHAIN_DBG_3:
+ case COEX_MULTICHAIN_DBG_1:
+ case COEX_MULTICHAIN_DBG_2:
+ case COEX_MULTICHAIN_DBG_3:
+ if (numargs > 0) {
+ dbglog_printf_no_line_break(timestamp, vap_id, "%s: %u",
+ dbg_id_str, args[0]);
+ for (i = 1; i < numargs; i++) {
+ printf(", %u", args[i]);
+ }
+ printf("\n");
+ } else {
+ return FALSE;
+ }
+ break;
+ case COEX_LinkID:
+ if (numargs >= 4) {
+ if (args[0]) { //Add profile
+ dbglog_printf(timestamp, vap_id, "%s Alloc: LocalID(%u), RemoteID(%u), MinFreeLocalID(%u)",
+ dbg_id_str, args[1], args[2], args[3]);
+ } else { //Remove profile
+ dbglog_printf(timestamp, vap_id, "%s Dealloc: LocalID(%u), RemoteID(%u), MinFreeLocalID(%u)",
+ dbg_id_str, args[1], args[2], args[3]);
+ }
+ } else {
+ return FALSE;
+ }
+ break;
+ case COEX_BT_DURATION:
+ if (numargs == 3) {
+ dbglog_printf(timestamp, vap_id, "%s: Result(%u), NumOfValidSchedMsgs(%u) PrioLowerLimit(%u)",
+ dbg_id_str, args[0], args[1], args[2]);
+ } else {
+ return FALSE;
+ }
+ break;
+ case COEX_T2BT:
+ if (numargs == 3) {
+ dbglog_printf(timestamp, vap_id, "%s: Result(%u), BtTime1(%u), PrioLowerLimit(%u)",
+ dbg_id_str, args[0], args[1], args[2]);
+ } else {
+ return FALSE;
+ }
+ break;
+ default:
+ return FALSE;
+ }
+
+ return TRUE;
+}
+
+A_BOOL
+dbglog_beacon_print_handler(
+ A_UINT32 mod_id,
+ A_UINT16 vap_id,
+ A_UINT32 dbg_id,
+ A_UINT32 timestamp,
+ A_UINT16 numargs,
+ A_UINT32 *args)
+{
+ static const char *states[] = {
+ "INIT",
+ "ADJUST_START",
+ "ADJUSTING",
+ "ADJUST_HOLD",
+ };
+
+ static const char *events[] = {
+ "ADJUST_START",
+ "ADJUST_RESTART",
+ "ADJUST_STOP",
+ "ADJUST_PAUSE",
+ "ADJUST_UNPAUSE",
+ "ADJUST_INC_SLOP_STEP",
+ "ADJUST_HOLD",
+ "ADJUST_HOLD_TIME_OUT",
+ };
+
+ switch (dbg_id) {
+ case DBGLOG_DBGID_SM_FRAMEWORK_PROXY_DBGLOG_MSG:
+ dbglog_sm_print(timestamp, vap_id, numargs, args, "EARLY_RX",
+ states, ARRAY_LENGTH(states), events, ARRAY_LENGTH(events));
+ break;
+ case BEACON_EVENT_EARLY_RX_BMISS_STATUS:
+ if (numargs == 3) {
+ dbglog_printf(timestamp, vap_id,
+ "early_rx bmiss status:rcv=%d total=%d miss=%d",
+ args[0], args[1], args[2]);
+ }
+ break;
+ case BEACON_EVENT_EARLY_RX_SLEEP_SLOP:
+ if (numargs == 1) {
+ dbglog_printf(timestamp, vap_id,
+ "early_rx update sleep_slop:%d",
+ args[0]);
+ }
+ break;
+ case BEACON_EVENT_EARLY_RX_CONT_BMISS_TIMEOUT:
+ if (numargs == 1) {
+ dbglog_printf(timestamp, vap_id,
+ "early_rx cont bmiss timeout,update sleep_slop:%d",
+ args[0]);
+ }
+ break;
+ case BEACON_EVENT_EARLY_RX_PAUSE_SKIP_BCN_NUM:
+ if (numargs == 1) {
+ dbglog_printf(timestamp, vap_id,
+ "early_rx skip bcn num:%d",
+ args[0]);
+ }
+ break;
+ default:
+ return FALSE;
+ }
+
+ return TRUE;
+}
+
+A_BOOL
+dbglog_data_txrx_print_handler(
+ A_UINT32 mod_id,
+ A_UINT16 vap_id,
+ A_UINT32 dbg_id,
+ A_UINT32 timestamp,
+ A_UINT16 numargs,
+ A_UINT32 *args)
+{
+ switch (dbg_id) {
+ case DATA_TXRX_DBGID_RX_DATA_SEQ_LEN_INFO:
+ dbglog_printf(timestamp, vap_id, "DATA RX seq=0x%x, len=0x%x, stored=0x%x, duperr=0x%x",
+ args[0], args[1], (args[2] & 0xffff0000) >> 16, args[2] & 0x0000ffff);
+ break;
+ default:
+ return FALSE;
+ }
+
+ return TRUE;
+}
+
+A_BOOL dbglog_smps_print_handler(A_UINT32 mod_id,
+ A_UINT16 vap_id,
+ A_UINT32 dbg_id,
+ A_UINT32 timestamp,
+ A_UINT16 numargs,
+ A_UINT32 *args)
+{
+ static const char *states[] = {
+ "S_INACTIVE",
+ "S_STATIC",
+ "S_DYNAMIC",
+ "S_STALLED",
+ "S_INACTIVE_WAIT",
+ "S_STATIC_WAIT",
+ "S_DYNAMIC_WAIT",
+ };
+
+ static const char *events[] = {
+ "E_STOP",
+ "E_STOP_COMPL",
+ "E_START",
+ "E_STATIC",
+ "E_STATIC_COMPL",
+ "E_DYNAMIC",
+ "E_DYNAMIC_COMPL",
+ "E_STALL",
+ "E_RSSI_ABOVE_THRESH",
+ "E_RSSI_BELOW_THRESH",
+ "E_FORCED_NONE",
+ };
+
+ switch(dbg_id) {
+ case DBGLOG_DBGID_SM_FRAMEWORK_PROXY_DBGLOG_MSG:
+ dbglog_sm_print(timestamp, vap_id, numargs, args, "STA_SMPS SM",
+ states, ARRAY_LENGTH(states), events, ARRAY_LENGTH(events));
+ break;
+ case STA_SMPS_DBGID_CREATE_PDEV_INSTANCE:
+ dbglog_printf(timestamp, vap_id, "STA_SMPS Create PDEV ctx %#x",
+ args[0]);
+ break;
+ case STA_SMPS_DBGID_CREATE_VIRTUAL_CHAN_INSTANCE:
+ dbglog_printf(timestamp, vap_id, "STA_SMPS Create Virtual Chan ctx %#x",
+ args[0]);
+ break;
+ case STA_SMPS_DBGID_DELETE_VIRTUAL_CHAN_INSTANCE:
+ dbglog_printf(timestamp, vap_id, "STA_SMPS Delete Virtual Chan ctx %#x",
+ args[0]);
+ break;
+ case STA_SMPS_DBGID_CREATE_STA_INSTANCE:
+ dbglog_printf(timestamp, vap_id, "STA_SMPS Create STA ctx %#x",
+ args[0]);
+ break;
+ case STA_SMPS_DBGID_DELETE_STA_INSTANCE:
+ dbglog_printf(timestamp, vap_id, "STA_SMPS Delete STA ctx %#x",
+ args[0]);
+ break;
+ case STA_SMPS_DBGID_VIRTUAL_CHAN_SMPS_START:
+ break;
+ case STA_SMPS_DBGID_VIRTUAL_CHAN_SMPS_STOP:
+ break;
+ case STA_SMPS_DBGID_SEND_SMPS_ACTION_FRAME:
+ dbglog_printf(timestamp, vap_id, "STA_SMPS STA %#x Signal SMPS mode as %s; cb_flags %#x",
+ args[0],
+ (args[1] == 0 ? "DISABLED":
+ (args[1] == 0x1 ? "STATIC" :
+ (args[1] == 0x3 ? "DYNAMIC" : "UNKNOWN"))),
+ args[2]);
+ break;
+
+
+ default:
+ dbglog_printf(
+ timestamp,
+ vap_id,
+ "STA_SMPS: UNKNOWN DBGID!");
+ return FALSE;
+ }
+
+ return TRUE;
+}
+
+int parser_init()
+{
+ /* Registering parser */
+ dbglog_reg_modprint(WLAN_MODULE_STA_PWRSAVE, dbglog_sta_powersave_print_handler);
+ dbglog_reg_modprint(WLAN_MODULE_AP_PWRSAVE, dbglog_ap_powersave_print_handler);
+ dbglog_reg_modprint(WLAN_MODULE_WAL, dbglog_wal_print_handler);
+ dbglog_reg_modprint(WLAN_MODULE_SCAN, dbglog_scan_print_handler);
+ dbglog_reg_modprint(WLAN_MODULE_RATECTRL, dbglog_ratectrl_print_handler);
+ dbglog_reg_modprint(WLAN_MODULE_ANI, dbglog_ani_print_handler);
+ dbglog_reg_modprint(WLAN_MODULE_COEX, dbglog_coex_print_handler);
+ dbglog_reg_modprint(WLAN_MODULE_BEACON,dbglog_beacon_print_handler);
+ dbglog_reg_modprint(WLAN_MODULE_DATA_TXRX,dbglog_data_txrx_print_handler);
+ dbglog_reg_modprint(WLAN_MODULE_STA_SMPS, dbglog_smps_print_handler);
+
+ return 0;
+}
diff --git a/wcnss/inc/wlan_hal_msg.h b/wcnss/inc/wlan_hal_msg.h
index 8de664bb0cce..58ae2cd23fcc 100644
--- a/wcnss/inc/wlan_hal_msg.h
+++ b/wcnss/inc/wlan_hal_msg.h
@@ -2269,12 +2269,20 @@ typedef PACKED_PRE struct PACKED_POST
#ifdef FEATURE_OEM_DATA_SUPPORT
#ifndef OEM_DATA_REQ_SIZE
+#ifdef QCA_WIFI_2_0
+#define OEM_DATA_REQ_SIZE 276
+#else
#define OEM_DATA_REQ_SIZE 134
#endif
+#endif
#ifndef OEM_DATA_RSP_SIZE
+#ifdef QCA_WIFI_2_0
+#define OEM_DATA_RSP_SIZE 1720
+#else
#define OEM_DATA_RSP_SIZE 1968
#endif
+#endif
/*-------------------------------------------------------------------------
WLAN_HAL_START_OEM_DATA_REQ