summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLinux Build Service Account <lnxbuild@localhost>2014-04-26 23:05:47 -0700
committerGerrit - the friendly Code Review server <code-review@localhost>2014-04-26 23:05:47 -0700
commitf98c7d4943098b7c2bb2124940256bdfa4568497 (patch)
tree2b4cd1105e232adcda0deb0f8c524d5ea95f86d7
parent6758f6e9e796c46f88a044ed01a5b942421087f7 (diff)
parente0b994cf80183cd4e55e5210cfff28994539ae3c (diff)
Merge "Release 1.0.0.101 QCACLD WLAN Driver"
-rw-r--r--CORE/CLD_TXRX/HTT/htt.c8
-rw-r--r--CORE/CLD_TXRX/HTT/htt_h2t.c57
-rw-r--r--CORE/CLD_TXRX/HTT/htt_internal.h4
-rw-r--r--CORE/CLD_TXRX/TXRX/ol_cfg.c14
-rw-r--r--CORE/HDD/src/wlan_hdd_ftm.c8
-rw-r--r--CORE/HDD/src/wlan_hdd_hostapd.c5
-rw-r--r--CORE/HDD/src/wlan_hdd_main.c15
-rw-r--r--CORE/HDD/src/wlan_hdd_wext.c2
-rw-r--r--CORE/MAC/inc/qwlan_version.h4
-rw-r--r--CORE/MAC/inc/sirApi.h3
-rw-r--r--CORE/MAC/src/pe/lim/limAssocUtils.c3
-rw-r--r--CORE/MAC/src/pe/lim/limProcessSmeReqMessages.c13
-rw-r--r--CORE/MAC/src/pe/sch/schBeaconProcess.c44
-rw-r--r--CORE/SERVICES/COMMON/dbglog_id.h9
-rw-r--r--CORE/SERVICES/COMMON/htc_api.h4
-rw-r--r--CORE/SERVICES/COMMON/ol_cfg.h11
-rw-r--r--CORE/SERVICES/COMMON/wdi_in.h1
-rw-r--r--CORE/SERVICES/DFS/inc/dfs.h3
-rw-r--r--CORE/SERVICES/DFS/src/dfs.c16
-rw-r--r--CORE/SERVICES/DFS/src/dfs_init.c9
-rw-r--r--CORE/SERVICES/HIF/PCIe/if_pci.c23
-rw-r--r--CORE/SERVICES/HIF/PCIe/if_pci.h6
-rw-r--r--CORE/SERVICES/HTC/htc_services.c11
-rw-r--r--CORE/SERVICES/WMA/wma.c170
-rw-r--r--CORE/SME/inc/csrInternal.h20
-rw-r--r--CORE/SME/inc/sme_Api.h20
-rw-r--r--CORE/SME/src/csr/csrApiRoam.c45
-rw-r--r--CORE/SME/src/csr/csrCmdProcess.c21
-rw-r--r--CORE/SME/src/sme_common/sme_Api.c132
-rw-r--r--CORE/UTILS/PKTLOG/pktlog_ac.c2
30 files changed, 478 insertions, 205 deletions
diff --git a/CORE/CLD_TXRX/HTT/htt.c b/CORE/CLD_TXRX/HTT/htt.c
index f4c0e47b0b6e..aec084192633 100644
--- a/CORE/CLD_TXRX/HTT/htt.c
+++ b/CORE/CLD_TXRX/HTT/htt.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2011 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2011, 2014 The Linux Foundation. All rights reserved.
*
* Previously licensed under the ISC license by Qualcomm Atheros, Inc.
*
@@ -429,3 +429,9 @@ htt_display(htt_pdev_handle pdev, int indent)
pdev->rx_ring.sw_rd_idx.msdu_payld);
}
#endif
+
+/* Disable ASPM : Disable PCIe low power */
+void htt_htc_disable_aspm(void)
+{
+ htc_disable_aspm();
+}
diff --git a/CORE/CLD_TXRX/HTT/htt_h2t.c b/CORE/CLD_TXRX/HTT/htt_h2t.c
index 9e0b2146daf3..a88512815888 100644
--- a/CORE/CLD_TXRX/HTT/htt_h2t.c
+++ b/CORE/CLD_TXRX/HTT/htt_h2t.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2011-2013 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2011-2014 The Linux Foundation. All rights reserved.
*
* Previously licensed under the ISC license by Qualcomm Atheros, Inc.
*
@@ -49,9 +49,6 @@
#include <htt.h> /* HTT host->target msg defs */
#include <ol_txrx_htt_api.h> /* ol_tx_completion_handler, htt_tx_status */
#include <ol_htt_tx_api.h>
-#include "vos_api.h"
-#include "vos_sched.h"
-#include "if_pci.h"
#include <htt_internal.h>
@@ -228,36 +225,30 @@ htt_h2t_rx_ring_cfg_msg_ll(struct htt_pdev_t *pdev)
msg_word++;
*msg_word = 0;
#ifndef REMOVE_PKT_LOG
- {
- void *vos_context = NULL;
-
- vos_context = vos_get_global_context(VOS_MODULE_ID_HIF, NULL);
-
- if ((NULL != vos_context) && (vos_is_packet_log_enabled()))
- {
- enable_ctrl_data = 1;
- enable_mgmt_data = 1;
- enable_null_data = 1;
- enable_phy_data = 1;
- enable_hdr = 1;
- enable_ppdu_start= 1;
- enable_ppdu_end = 1;
- adf_os_print("Pkt log is enabled -> disable ASPM\n");
- hif_disable_aspm(((VosContextType*)vos_context)->pHIFContext);
- /*Disable ASPM when pkt log is enabled*/
- }
- else
- {
- adf_os_print("Pkt log is disabled \n");
- enable_ctrl_data = 0;
- enable_mgmt_data = 0;
- enable_null_data = 0;
- enable_phy_data = 0;
- enable_hdr = 0;
- enable_ppdu_start= 0;
- enable_ppdu_end = 0;
+ if (ol_cfg_is_packet_log_enabled(pdev->ctrl_pdev))
+ {
+ enable_ctrl_data = 1;
+ enable_mgmt_data = 1;
+ enable_null_data = 1;
+ enable_phy_data = 1;
+ enable_hdr = 1;
+ enable_ppdu_start= 1;
+ enable_ppdu_end = 1;
+ /* Disable ASPM when pkt log is enabled */
+ adf_os_print("Pkt log is enabled\n");
+ htt_htc_disable_aspm();
+ }
+ else
+ {
+ adf_os_print("Pkt log is disabled\n");
+ enable_ctrl_data = 0;
+ enable_mgmt_data = 0;
+ enable_null_data = 0;
+ enable_phy_data = 0;
+ enable_hdr = 0;
+ enable_ppdu_start= 0;
+ enable_ppdu_end = 0;
}
-}
#else
enable_ctrl_data = 0;
enable_mgmt_data = 0;
diff --git a/CORE/CLD_TXRX/HTT/htt_internal.h b/CORE/CLD_TXRX/HTT/htt_internal.h
index 9e50d4fb83e2..72eee990b943 100644
--- a/CORE/CLD_TXRX/HTT/htt_internal.h
+++ b/CORE/CLD_TXRX/HTT/htt_internal.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2011 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2011, 2014 The Linux Foundation. All rights reserved.
*
* Previously licensed under the ISC license by Qualcomm Atheros, Inc.
*
@@ -392,4 +392,6 @@ void
htt_htc_misc_pkt_pool_free(struct htt_pdev_t *pdev);
#endif
+void htt_htc_disable_aspm(void);
+
#endif /* _HTT_INTERNAL__H_ */
diff --git a/CORE/CLD_TXRX/TXRX/ol_cfg.c b/CORE/CLD_TXRX/TXRX/ol_cfg.c
index 7610ae7925a2..7b3968130b2e 100644
--- a/CORE/CLD_TXRX/TXRX/ol_cfg.c
+++ b/CORE/CLD_TXRX/TXRX/ol_cfg.c
@@ -76,6 +76,8 @@ ol_pdev_handle ol_pdev_cfg_attach(adf_os_device_t osdev)
cfg_ctx->target_tx_credit = CFG_TGT_NUM_MSDU_DESC;
cfg_ctx->throttle_period_ms = 40;
cfg_ctx->rx_fwd_disabled = 0;
+ cfg_ctx->is_packet_log_enabled = 0;
+
return (ol_pdev_handle) cfg_ctx;
}
@@ -119,6 +121,18 @@ void ol_set_cfg_rx_fwd_disabled(ol_pdev_handle pdev, u_int8_t disable_rx_fwd)
cfg->rx_fwd_disabled = disable_rx_fwd;
}
+void ol_set_cfg_packet_log_enabled(ol_pdev_handle pdev, u_int8_t val)
+{
+ struct txrx_pdev_cfg_t *cfg = (struct txrx_pdev_cfg_t *)pdev;
+ cfg->is_packet_log_enabled = val;
+}
+
+u_int8_t ol_cfg_is_packet_log_enabled(ol_pdev_handle pdev)
+{
+ struct txrx_pdev_cfg_t *cfg = (struct txrx_pdev_cfg_t *)pdev;
+ return cfg->is_packet_log_enabled;
+}
+
int ol_cfg_rx_fwd_disabled(ol_pdev_handle pdev)
{
#if defined(ATHR_WIN_NWF)
diff --git a/CORE/HDD/src/wlan_hdd_ftm.c b/CORE/HDD/src/wlan_hdd_ftm.c
index 9c49f1558a50..78922a47dba9 100644
--- a/CORE/HDD/src/wlan_hdd_ftm.c
+++ b/CORE/HDD/src/wlan_hdd_ftm.c
@@ -1530,14 +1530,6 @@ int wlan_hdd_ftm_open(hdd_context_t *pHddCtx)
#endif
#endif
-#ifdef HDD_SESSIONIZE
- //Turn off carrier state
- netif_carrier_off(pAdapter->dev);
-
- //Stop the Interface TX queue. Just being safe
- netif_tx_disable(pAdapter->dev);
-#endif
-
pHddCtx->ftm.processingNVTable = NV_MAX_TABLE;
pHddCtx->ftm.targetNVTableSize = 0;
pHddCtx->ftm.targetNVTablePointer = NULL;
diff --git a/CORE/HDD/src/wlan_hdd_hostapd.c b/CORE/HDD/src/wlan_hdd_hostapd.c
index d7031cd21556..071932675012 100644
--- a/CORE/HDD/src/wlan_hdd_hostapd.c
+++ b/CORE/HDD/src/wlan_hdd_hostapd.c
@@ -624,6 +624,9 @@ VOS_STATUS hdd_hostapd_SAPEventCB( tpSap_Event pSapEvent, v_PVOID_t usrDataForCa
pSapEvent->sapevt.sapStartBssCompleteEvent.operatingChannel,
pSapEvent->sapevt.sapStartBssCompleteEvent.staId);
+ pHostapdAdapter->sessionId =
+ pSapEvent->sapevt.sapStartBssCompleteEvent.sessionId;
+
pHostapdState->vosStatus = pSapEvent->sapevt.sapStartBssCompleteEvent.status;
vos_status = vos_event_set(&pHostapdState->vosEvent);
@@ -635,8 +638,6 @@ VOS_STATUS hdd_hostapd_SAPEventCB( tpSap_Event pSapEvent, v_PVOID_t usrDataForCa
else
{
pHddApCtx->uBCStaId = pSapEvent->sapevt.sapStartBssCompleteEvent.staId;
- pHostapdAdapter->sessionId =
- pSapEvent->sapevt.sapStartBssCompleteEvent.sessionId;
//@@@ need wep logic here to set privacy bit
vos_status = hdd_softap_Register_BC_STA(pHostapdAdapter, pHddApCtx->uPrivacy);
if (!VOS_IS_STATUS_SUCCESS(vos_status))
diff --git a/CORE/HDD/src/wlan_hdd_main.c b/CORE/HDD/src/wlan_hdd_main.c
index 772f6fecd04f..7eb02ff8acc9 100644
--- a/CORE/HDD/src/wlan_hdd_main.c
+++ b/CORE/HDD/src/wlan_hdd_main.c
@@ -7312,21 +7312,6 @@ static int hdd_set_mac_address(struct net_device *dev, void *addr)
ENTER();
memcpy(&pAdapter->macAddressCurrent, psta_mac_addr->sa_data, ETH_ALEN);
-
-#ifdef HDD_SESSIONIZE
- // set the MAC address though the STA ID CFG.
- halStatus = ccmCfgSetStr( pAdapter->hHal, WNI_CFG_STA_ID,
- (v_U8_t *)&pAdapter->macAddressCurrent,
- sizeof( pAdapter->macAddressCurrent ),
- hdd_set_mac_addr_cb, VOS_FALSE );
- if( eHAL_STATUS_SUCCESS != halStatus)
- {
- VOS_TRACE( VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_ERROR,
- "%s: failed to set MAC address in CFG", __func__);
- }
-
-#endif
-
memcpy(dev->dev_addr, psta_mac_addr->sa_data, ETH_ALEN);
EXIT();
diff --git a/CORE/HDD/src/wlan_hdd_wext.c b/CORE/HDD/src/wlan_hdd_wext.c
index be2092513e43..e12b98f15c16 100644
--- a/CORE/HDD/src/wlan_hdd_wext.c
+++ b/CORE/HDD/src/wlan_hdd_wext.c
@@ -987,7 +987,7 @@ VOS_STATUS wlan_hdd_get_rssi(hdd_adapter_t *pAdapter, v_S7_t *rssi_value)
hstatus = sme_GetRssi(pHddCtx->hHal, hdd_GetRssiCB,
pHddStaCtx->conn_info.staId[ 0 ],
- pHddStaCtx->conn_info.bssId,
+ pHddStaCtx->conn_info.bssId, pAdapter->rssi,
&context, pHddCtx->pvosContext);
if (eHAL_STATUS_SUCCESS != hstatus)
{
diff --git a/CORE/MAC/inc/qwlan_version.h b/CORE/MAC/inc/qwlan_version.h
index b39955a81dfc..116ff5e8b670 100644
--- a/CORE/MAC/inc/qwlan_version.h
+++ b/CORE/MAC/inc/qwlan_version.h
@@ -42,9 +42,9 @@ BRIEF DESCRIPTION:
#define QWLAN_VERSION_MINOR 0
#define QWLAN_VERSION_PATCH 0
#define QWLAN_VERSION_EXTRA ""
-#define QWLAN_VERSION_BUILD 100
+#define QWLAN_VERSION_BUILD 101
-#define QWLAN_VERSIONSTR "1.0.0.100"
+#define QWLAN_VERSIONSTR "1.0.0.101"
#ifdef QCA_WIFI_2_0
diff --git a/CORE/MAC/inc/sirApi.h b/CORE/MAC/inc/sirApi.h
index 8bf81bf404d1..e370ddf7b82a 100644
--- a/CORE/MAC/inc/sirApi.h
+++ b/CORE/MAC/inc/sirApi.h
@@ -2176,9 +2176,10 @@ typedef struct sAniGetRssiReq
{
// Common for all types are requests
tANI_U16 msgType; // message type is same as the request type
- tANI_U16 msgLen; // length of the entire request
+ tANI_U16 msgLen; // length of the entire request
tANI_U8 sessionId;
tANI_U8 staId;
+ tANI_S8 lastRSSI; // in case of error, return last RSSI
void *rssiCallback;
void *pDevContext; //device context
void *pVosContext; //voss context
diff --git a/CORE/MAC/src/pe/lim/limAssocUtils.c b/CORE/MAC/src/pe/lim/limAssocUtils.c
index c370a5341435..a2664b7d7999 100644
--- a/CORE/MAC/src/pe/lim/limAssocUtils.c
+++ b/CORE/MAC/src/pe/lim/limAssocUtils.c
@@ -899,7 +899,8 @@ limSendDelStaCnf(tpAniSirGlobal pMac, tSirMacAddr staDsAddr,
//if it is a reassoc failure to join new AP
if((mlmStaContext.resultCode == eSIR_SME_FT_REASSOC_TIMEOUT_FAILURE) ||
- (mlmStaContext.resultCode == eSIR_SME_FT_REASSOC_FAILURE))
+ (mlmStaContext.resultCode == eSIR_SME_FT_REASSOC_FAILURE) ||
+ (mlmStaContext.resultCode == eSIR_SME_REASSOC_TIMEOUT_RESULT_CODE))
{
if(mlmStaContext.resultCode != eSIR_SME_SUCCESS )
{
diff --git a/CORE/MAC/src/pe/lim/limProcessSmeReqMessages.c b/CORE/MAC/src/pe/lim/limProcessSmeReqMessages.c
index 01895a7f6a6f..525f4a659a9c 100644
--- a/CORE/MAC/src/pe/lim/limProcessSmeReqMessages.c
+++ b/CORE/MAC/src/pe/lim/limProcessSmeReqMessages.c
@@ -72,10 +72,19 @@
#endif
#ifdef FEATURE_WLAN_ESE
+#ifdef QCA_WIFI_2_0
/* These are the min/max tx power (non virtual rates) range
- supported by prima hardware */
-#define MIN_TX_PWR_CAP 12
+ * supported by rome hardware
+ */
+#define MIN_TX_PWR_CAP 8
#define MAX_TX_PWR_CAP 19
+#else
+/* These are the min/max tx power (non virtual rates) range
+ * supported by prima hardware
+ */
+#define MIN_TX_PWR_CAP 8
+#define MAX_TX_PWR_CAP 22
+#endif
#endif
diff --git a/CORE/MAC/src/pe/sch/schBeaconProcess.c b/CORE/MAC/src/pe/sch/schBeaconProcess.c
index be6e136205c7..000270f6ae23 100644
--- a/CORE/MAC/src/pe/sch/schBeaconProcess.c
+++ b/CORE/MAC/src/pe/sch/schBeaconProcess.c
@@ -685,6 +685,10 @@ void schBeaconProcess(tpAniSirGlobal pMac, tANI_U8* pRxPacketInfo, tpPESession p
static tSchBeaconStruct beaconStruct;
tUpdateBeaconParams beaconParams;
tpPESession pAPSession = NULL;
+#ifdef WLAN_FEATURE_MBSSID
+ tANI_U8 i;
+#endif
+
vos_mem_zero(&beaconParams, sizeof(tUpdateBeaconParams));
beaconParams.paramChangeBitmap = 0;
@@ -715,6 +719,44 @@ void schBeaconProcess(tpAniSirGlobal pMac, tANI_U8* pRxPacketInfo, tpPESession p
*
*/
+#ifdef WLAN_FEATURE_MBSSID
+
+ for (i =0; i < pMac->lim.maxBssId; i++)
+ {
+ if (((pAPSession = peFindSessionBySessionId(pMac, i)) != NULL)
+#ifdef WLAN_FEATURE_ROAM_SCAN_OFFLOAD
+ && (!(WDA_GET_OFFLOADSCANLEARN(pRxPacketInfo)))
+#endif
+ )
+ {
+ if (eLIM_AP_ROLE != pAPSession->limSystemRole)
+ {
+ continue;
+ }
+
+ beaconParams.bssIdx = pAPSession->bssIdx;
+ if (pAPSession->gLimProtectionControl !=
+ WNI_CFG_FORCE_POLICY_PROTECTION_DISABLE)
+ ap_beacon_process(pMac, pRxPacketInfo, &beaconStruct,
+ &beaconParams, pAPSession);
+
+ if (beaconParams.paramChangeBitmap)
+ {
+ //Update the beacons and apply the new settings to HAL
+ schSetFixedBeaconFields(pMac, pAPSession);
+ PELOG1(schLog(pMac, LOG1,
+ FL("Beacon for PE session[%d] got changed."),
+ pAPSession->peSessionId);)
+ PELOG1(schLog(pMac, LOG1,
+ FL("sending beacon param change bitmap: 0x%x"),
+ beaconParams.paramChangeBitmap);)
+ limSendBeaconParams(pMac, &beaconParams, pAPSession);
+ }
+ }
+ }
+
+#else
+
if (((pAPSession = limIsApSessionActive(pMac)) != NULL)
#ifdef WLAN_FEATURE_ROAM_SCAN_OFFLOAD
&& (!(WDA_GET_OFFLOADSCANLEARN(pRxPacketInfo)))
@@ -735,6 +777,8 @@ void schBeaconProcess(tpAniSirGlobal pMac, tANI_U8* pRxPacketInfo, tpPESession p
}
}
+#endif
+
/*
* Now process the beacon in the context of the BSS which is transmitting the beacons, if one is found
*/
diff --git a/CORE/SERVICES/COMMON/dbglog_id.h b/CORE/SERVICES/COMMON/dbglog_id.h
index 774499ef4d4f..2f94cf8551d1 100644
--- a/CORE/SERVICES/COMMON/dbglog_id.h
+++ b/CORE/SERVICES/COMMON/dbglog_id.h
@@ -1023,6 +1023,15 @@ extern "C" {
#define RMC_SET_ACTION_PERIOD 15
#define RMC_DBGID_DEFINITION_END 16
+/* Stats Module DBGIDs */
+#define WLAN_STATS_DBGID_DEFINITION_START 0
+#define WLAN_STATS_DBGID_EST_LINKSPEED_VDEV_EN_DIS 1
+#define WLAN_STATS_DBGID_EST_LINKSPEED_CHAN_TIME_START 2
+#define WLAN_STATS_DBGID_EST_LINKSPEED_CHAN_TIME_END 3
+#define WLAN_STATS_DBGID_EST_LINKSPEED_CALC 4
+#define WLAN_STATS_DBGID_EST_LINKSPEED_UPDATE_HOME_CHAN 5
+#define WLAN_STATS_DBGID_DEFINITION_END 6
+
#ifdef __cplusplus
}
#endif
diff --git a/CORE/SERVICES/COMMON/htc_api.h b/CORE/SERVICES/COMMON/htc_api.h
index d359e24100ef..93e3dfa72881 100644
--- a/CORE/SERVICES/COMMON/htc_api.h
+++ b/CORE/SERVICES/COMMON/htc_api.h
@@ -688,4 +688,8 @@ void HTC_dump_counter_info(HTC_HANDLE HTCHandle);
void *htc_get_targetdef(HTC_HANDLE htc_handle);
void HTCSetTargetToSleep(void *context);
void HTCCancelDeferredTargetSleep(void *context);
+
+/* Disable ASPM : Disable PCIe low power */
+void htc_disable_aspm(void);
+
#endif /* _HTC_API_H_ */
diff --git a/CORE/SERVICES/COMMON/ol_cfg.h b/CORE/SERVICES/COMMON/ol_cfg.h
index c7797137d1c8..508ed9f200e7 100644
--- a/CORE/SERVICES/COMMON/ol_cfg.h
+++ b/CORE/SERVICES/COMMON/ol_cfg.h
@@ -68,6 +68,7 @@ struct txrx_pdev_cfg_t {
u32 throttle_period_ms;
enum wlan_frm_fmt frame_type;
u8 rx_fwd_disabled;
+ u8 is_packet_log_enabled;
};
/**
@@ -429,4 +430,14 @@ ol_tx_cfg_max_tx_queue_depth_ll(ol_pdev_handle pdev)
return 1500;
}
+/**
+ * @brief Set packet log config in HTT config based on CFG ini configuration
+ */
+void ol_set_cfg_packet_log_enabled(ol_pdev_handle pdev, u_int8_t val);
+
+/**
+ * @brief Get packet log config from HTT config
+ */
+u_int8_t ol_cfg_is_packet_log_enabled(ol_pdev_handle pdev);
+
#endif /* _OL_CFG__H_ */
diff --git a/CORE/SERVICES/COMMON/wdi_in.h b/CORE/SERVICES/COMMON/wdi_in.h
index 202984785fc5..bedc09137594 100644
--- a/CORE/SERVICES/COMMON/wdi_in.h
+++ b/CORE/SERVICES/COMMON/wdi_in.h
@@ -1263,6 +1263,7 @@ ol_tx_queue_log_display(ol_txrx_pdev_handle pdev);
#define wdi_in_event_sub wdi_event_sub
#define wdi_in_event_unsub wdi_event_unsub
#define wdi_in_set_cfg_rx_fwd_disabled ol_set_cfg_rx_fwd_disabled
+#define wdi_in_set_cfg_pakcet_log_enabled ol_set_cfg_packet_log_enabled
#endif /* WDI_API_AS_FUNCS / MACROS */
diff --git a/CORE/SERVICES/DFS/inc/dfs.h b/CORE/SERVICES/DFS/inc/dfs.h
index 751e5071a56a..b9a408463aff 100644
--- a/CORE/SERVICES/DFS/inc/dfs.h
+++ b/CORE/SERVICES/DFS/inc/dfs.h
@@ -110,6 +110,9 @@
*/
#define MAX_EVENTS 100
+#define DFS_STATUS_SUCCESS 0
+#define DFS_STATUS_FAIL 1
+
/*
* Constants to use for chirping detection.
*
diff --git a/CORE/SERVICES/DFS/src/dfs.c b/CORE/SERVICES/DFS/src/dfs.c
index e4f4bfc34bfa..97b17ccf203f 100644
--- a/CORE/SERVICES/DFS/src/dfs.c
+++ b/CORE/SERVICES/DFS/src/dfs.c
@@ -525,6 +525,7 @@ int dfs_radar_enable(struct ieee80211com *ic,
{
int is_ext_ch;
int is_fastclk = 0;
+ int radar_filters_init_status = 0;
//u_int32_t rfilt;
struct ath_dfs *dfs;
struct dfs_state *rs_pri, *rs_ext;
@@ -548,7 +549,18 @@ int dfs_radar_enable(struct ieee80211com *ic,
* Setting country code might change the DFS domain
* so initialize the DFS Radar filters
*/
- dfs_init_radar_filters(ic, radar_info);
+ radar_filters_init_status = dfs_init_radar_filters(ic, radar_info);
+
+ /*
+ * dfs_init_radar_filters() returns 1 on failure and
+ * 0 on success.
+ */
+ if ( DFS_STATUS_FAIL == radar_filters_init_status ) {
+ VOS_TRACE(VOS_MODULE_ID_SAP, VOS_TRACE_LEVEL_ERROR,
+ "%s[%d]: DFS Radar Filters Initialization Failed",
+ __func__, __LINE__);
+ return -EIO;
+ }
if ((ic->ic_opmode == IEEE80211_M_HOSTAP || ic->ic_opmode == IEEE80211_M_IBSS)) {
@@ -619,7 +631,7 @@ int dfs_radar_enable(struct ieee80211com *ic,
}
}
- return 0;
+ return DFS_STATUS_SUCCESS;
}
int
diff --git a/CORE/SERVICES/DFS/src/dfs_init.c b/CORE/SERVICES/DFS/src/dfs_init.c
index bacb4af735e1..1c1fc243bf29 100644
--- a/CORE/SERVICES/DFS/src/dfs_init.c
+++ b/CORE/SERVICES/DFS/src/dfs_init.c
@@ -184,7 +184,7 @@ int dfs_init_radar_filters(struct ieee80211com *ic,
if (dfs == NULL) {
VOS_TRACE(VOS_MODULE_ID_SAP, VOS_TRACE_LEVEL_ERROR,
"%s[%d]: dfs is NULL", __func__, __LINE__);
- return 1;
+ return DFS_STATUS_FAIL;
}
/* clear up the dfs domain flag first */
#ifndef ATH_DFS_RADAR_DETECTION_ONLY
@@ -201,7 +201,8 @@ int dfs_init_radar_filters(struct ieee80211com *ic,
__func__, __LINE__, dfs->dfsdomain);
/* Disable radar detection since we don't have a radar domain */
dfs->dfs_proc_phyerr &= ~DFS_RADAR_EN;
- return 0;
+ /* returning error. return: 1-Fail, 0-Success */
+ return DFS_STATUS_FAIL;
}
VOS_TRACE(VOS_MODULE_ID_SAP, VOS_TRACE_LEVEL_INFO,
@@ -354,10 +355,10 @@ int dfs_init_radar_filters(struct ieee80211com *ic,
VOS_TRACE(VOS_MODULE_ID_SAP, VOS_TRACE_LEVEL_INFO,
"%s[%d]:DFS max pulse dur = %d ticks",
__func__ ,__LINE__, dfs->dfs_rinfo.rn_maxpulsedur);
- return 0;
+ return DFS_STATUS_SUCCESS;
bad4:
- return 1;
+ return DFS_STATUS_FAIL;
}
void
diff --git a/CORE/SERVICES/HIF/PCIe/if_pci.c b/CORE/SERVICES/HIF/PCIe/if_pci.c
index 9269750d46a3..5784c721e7d6 100644
--- a/CORE/SERVICES/HIF/PCIe/if_pci.c
+++ b/CORE/SERVICES/HIF/PCIe/if_pci.c
@@ -1783,13 +1783,22 @@ void hif_reset_soc(void *ol_sc)
#endif
}
-void hif_disable_aspm(void *ol_sc)
+void hif_disable_aspm(void)
{
- u_int32_t lcr_val = 0;
- struct ol_softc *scn = (struct ol_softc *)ol_sc;
- struct hif_pci_softc *sc = scn->hif_sc;
+ u_int32_t lcr_val = 0;
+ void *vos_context = vos_get_global_context(VOS_MODULE_ID_HIF, NULL);
+ struct ol_softc *scn = vos_get_context(VOS_MODULE_ID_HIF, vos_context);
+ struct hif_pci_softc *sc;
+
+ if (NULL == scn)
+ {
+ printk(KERN_ERR "%s: Could not disable ASPM scn is null\n", __func__);
+ return;
+ }
+
+ sc = scn->hif_sc;
- /*Disable ASPM when pkt log is enabled*/
- pci_read_config_dword(sc->pdev, 0x80, &lcr_val);
- pci_write_config_dword(sc->pdev, 0x80, (lcr_val & 0xffffff00));
+ /* Disable ASPM when pkt log is enabled */
+ pci_read_config_dword(sc->pdev, 0x80, &lcr_val);
+ pci_write_config_dword(sc->pdev, 0x80, (lcr_val & 0xffffff00));
}
diff --git a/CORE/SERVICES/HIF/PCIe/if_pci.h b/CORE/SERVICES/HIF/PCIe/if_pci.h
index c6850444847f..fd5ffe2b98ea 100644
--- a/CORE/SERVICES/HIF/PCIe/if_pci.h
+++ b/CORE/SERVICES/HIF/PCIe/if_pci.h
@@ -115,11 +115,11 @@ adf_os_size_t initBufferCount(adf_os_size_t maxSize);
void hif_init_pdev_txrx_handle(void *ol_sc, void *txrx_handle);
void hif_disable_isr(void *ol_sc);
-/* Function to reset SoC*/
+/* Function to reset SoC */
void hif_reset_soc(void *ol_sc);
-/* Function to disable ASPM*/
-void hif_disable_aspm(void *ol_sc);
+/* Function to disable ASPM */
+void hif_disable_aspm(void);
void hif_init_adf_ctx(adf_os_device_t adf_dev, void *ol_sc);
diff --git a/CORE/SERVICES/HTC/htc_services.c b/CORE/SERVICES/HTC/htc_services.c
index a19f0054ba2e..c12009dd8d59 100644
--- a/CORE/SERVICES/HTC/htc_services.c
+++ b/CORE/SERVICES/HTC/htc_services.c
@@ -28,6 +28,9 @@
#include "htc_internal.h"
#include <adf_nbuf.h> /* adf_nbuf_t */
+#if defined(HIF_PCI)
+#include "if_pci.h"
+#endif
extern unsigned int htc_credit_flow;
@@ -317,3 +320,11 @@ void HTCFwEventHandler(void *context)
initInfo->TargetFailure(initInfo->pContext, A_ERROR);
}
}
+
+/* Disable ASPM : disable PCIe low power */
+void htc_disable_aspm(void)
+{
+#if defined(HIF_PCI)
+ hif_disable_aspm();
+#endif
+}
diff --git a/CORE/SERVICES/WMA/wma.c b/CORE/SERVICES/WMA/wma.c
index cd3e8b5720d1..19a8039beb5e 100644
--- a/CORE/SERVICES/WMA/wma.c
+++ b/CORE/SERVICES/WMA/wma.c
@@ -2877,6 +2877,11 @@ VOS_STATUS WDA_open(v_VOID_t *vos_context, v_VOID_t *os_ctx,
wdi_in_set_cfg_rx_fwd_disabled((ol_pdev_handle)((pVosContextType)vos_context)->cfg_ctx,
(u_int8_t)mac_params->apDisableIntraBssFwd);
+ /* adjust the packet log enable default value based on CFG INI setting */
+ wdi_in_set_cfg_pakcet_log_enabled((ol_pdev_handle)
+ ((pVosContextType)vos_context)->cfg_ctx, (u_int8_t)vos_is_packet_log_enabled());
+
+
/* Allocate dfs_ic and initialize DFS */
wma_handle->dfs_ic = wma_dfs_attach(wma_handle->dfs_ic);
if(wma_handle->dfs_ic == NULL) {
@@ -6242,13 +6247,13 @@ static VOS_STATUS wma_vdev_start(tp_wma_handle wma,
* set the WMI_CHAN_FLAG_DFS flag
*/
if (req->is_dfs) {
- /* provide the current channel to DFS*/
- wma->dfs_ic->ic_curchan =
- wma_dfs_configure_channel(wma->dfs_ic,chan,chanmode,req);
WMI_SET_CHANNEL_FLAG(chan, WMI_CHAN_FLAG_DFS);
cmd->disable_hw_ack = VOS_TRUE;
/*
+ * Configure the current operating channel
+ * to DFS module only if the device operating
+ * mode is AP.
* Enable/Disable Phyerr filtering offload
* depending on dfs_phyerr_filter_offload
* flag status as set in ini for SAP mode.
@@ -6258,6 +6263,30 @@ static VOS_STATUS wma_vdev_start(tp_wma_handle wma,
*/
if (intr[cmd->vdev_id].type == WMI_VDEV_TYPE_AP &&
intr[cmd->vdev_id].sub_type == 0) {
+ /*
+ * If DFS regulatory domain is invalid,
+ * then, DFS radar filters intialization
+ * will fail. So, do not configure the
+ * channel in to DFS modlue, do not
+ * indicate if phyerror filtering offload
+ * is enabled or not to the firmware, simply
+ * fail the VDEV start on the DFS channel
+ * early on, to protect the DFS module from
+ * processing phyerrors without being intialized.
+ */
+ if (DFS_UNINIT_DOMAIN == wma->dfs_ic->current_dfs_regdomain) {
+ WMA_LOGE("%s[%d]:DFS Configured with Invalid regdomain"
+ " Failed to send VDEV START command",
+ __func__, __LINE__);
+
+ adf_nbuf_free(buf);
+ return VOS_STATUS_E_FAILURE;
+ }
+
+ /* provide the current channel to DFS */
+ wma->dfs_ic->ic_curchan =
+ wma_dfs_configure_channel(wma->dfs_ic,chan,chanmode,req);
+
wma_unified_dfs_phyerr_filter_offload_enable(wma);
}
}
@@ -13692,7 +13721,9 @@ static void wma_get_stats_req(WMA_HANDLE handle,
if (wmi_unified_cmd_send(wma_handle->wmi_handle, buf, len,
WMI_REQUEST_STATS_CMDID)) {
- vos_mem_free(buf);
+ WMA_LOGE("%s: Failed to send WMI_REQUEST_STATS_CMDID",
+ __func__);
+ wmi_buf_free(buf);
goto failed;
}
@@ -19860,66 +19891,73 @@ struct ieee80211com* wma_dfs_attach(struct ieee80211com *dfs_ic)
void
wma_dfs_configure(struct ieee80211com *ic)
{
- struct ath_dfs_radar_tab_info rinfo;
- int dfsdomain;
- if(ic == NULL)
- {
- WMA_LOGE("%s: DFS ic is Invalid",__func__);
- return;
- }
+ struct ath_dfs_radar_tab_info rinfo;
+ int dfsdomain;
+ int radar_enabled_status = 0;
+ if(ic == NULL) {
+ WMA_LOGE("%s: DFS ic is Invalid",__func__);
+ return;
+ }
- dfsdomain = ic->current_dfs_regdomain;
+ dfsdomain = ic->current_dfs_regdomain;
- /* Fetch current radar patterns from the lmac */
- OS_MEMZERO(&rinfo, sizeof(rinfo));
+ /* Fetch current radar patterns from the lmac */
+ OS_MEMZERO(&rinfo, sizeof(rinfo));
- /*
- * Look up the current DFS
- * regulatory domain and decide
- * which radar pulses to use.
- */
- switch (dfsdomain)
- {
- case DFS_FCC_DOMAIN:
- WMA_LOGI("%s: DFS-FCC domain",__func__);
- rinfo.dfsdomain = DFS_FCC_DOMAIN;
- rinfo.dfs_radars = dfs_fcc_radars;
- rinfo.numradars = ARRAY_LENGTH(dfs_fcc_radars);
- rinfo.b5pulses = dfs_fcc_bin5pulses;
- rinfo.numb5radars = ARRAY_LENGTH(dfs_fcc_bin5pulses);
- break;
- case DFS_ETSI_DOMAIN:
- WMA_LOGI("%s: DFS-ETSI domain",__func__);
- rinfo.dfsdomain = DFS_ETSI_DOMAIN;
- rinfo.dfs_radars = dfs_etsi_radars;
- rinfo.numradars = ARRAY_LENGTH(dfs_etsi_radars);
- rinfo.b5pulses = NULL;
- rinfo.numb5radars = 0;
- break;
- case DFS_MKK4_DOMAIN:
- WMA_LOGI("%s: DFS-MKK4 domain",__func__);
- rinfo.dfsdomain = DFS_MKK4_DOMAIN;
- rinfo.dfs_radars = dfs_mkk4_radars;
- rinfo.numradars = ARRAY_LENGTH(dfs_mkk4_radars);
- rinfo.b5pulses = dfs_jpn_bin5pulses;
- rinfo.numb5radars = ARRAY_LENGTH(dfs_jpn_bin5pulses);
- break;
- default:
- WMA_LOGI("%s: DFS-UNINT domain",__func__);
- rinfo.dfsdomain = DFS_UNINIT_DOMAIN;
- rinfo.dfs_radars = NULL;
- rinfo.numradars = 0;
- rinfo.b5pulses = NULL;
- rinfo.numb5radars = 0;
- break;
- }
+ /*
+ * Look up the current DFS
+ * regulatory domain and decide
+ * which radar pulses to use.
+ */
+ switch (dfsdomain)
+ {
+ case DFS_FCC_DOMAIN:
+ WMA_LOGI("%s: DFS-FCC domain",__func__);
+ rinfo.dfsdomain = DFS_FCC_DOMAIN;
+ rinfo.dfs_radars = dfs_fcc_radars;
+ rinfo.numradars = ARRAY_LENGTH(dfs_fcc_radars);
+ rinfo.b5pulses = dfs_fcc_bin5pulses;
+ rinfo.numb5radars = ARRAY_LENGTH(dfs_fcc_bin5pulses);
+ break;
+ case DFS_ETSI_DOMAIN:
+ WMA_LOGI("%s: DFS-ETSI domain",__func__);
+ rinfo.dfsdomain = DFS_ETSI_DOMAIN;
+ rinfo.dfs_radars = dfs_etsi_radars;
+ rinfo.numradars = ARRAY_LENGTH(dfs_etsi_radars);
+ rinfo.b5pulses = NULL;
+ rinfo.numb5radars = 0;
+ break;
+ case DFS_MKK4_DOMAIN:
+ WMA_LOGI("%s: DFS-MKK4 domain",__func__);
+ rinfo.dfsdomain = DFS_MKK4_DOMAIN;
+ rinfo.dfs_radars = dfs_mkk4_radars;
+ rinfo.numradars = ARRAY_LENGTH(dfs_mkk4_radars);
+ rinfo.b5pulses = dfs_jpn_bin5pulses;
+ rinfo.numb5radars = ARRAY_LENGTH(dfs_jpn_bin5pulses);
+ break;
+ default:
+ WMA_LOGI("%s: DFS-UNINT domain",__func__);
+ rinfo.dfsdomain = DFS_UNINIT_DOMAIN;
+ rinfo.dfs_radars = NULL;
+ rinfo.numradars = 0;
+ rinfo.b5pulses = NULL;
+ rinfo.numb5radars = 0;
+ break;
+ }
- /*
- * Set the regulatory domain,
- * radar pulse table and enable
- * radar events if required.
- */
- dfs_radar_enable(ic, &rinfo);
+ /*
+ * Set the regulatory domain,
+ * radar pulse table and enable
+ * radar events if required.
+ * dfs_radar_enable() returns
+ * 0 on success and non-zero
+ * failure.
+ */
+ radar_enabled_status = dfs_radar_enable(ic, &rinfo);
+ if (radar_enabled_status != DFS_STATUS_SUCCESS) {
+ WMA_LOGE("%s[%d]: DFS- Radar Detection Enabling Failed",
+ __func__, __LINE__);
+ }
}
/*
@@ -20009,6 +20047,12 @@ wma_set_dfs_regdomain(tp_wma_handle wma)
if (regdmn < 0)
{
WMA_LOGE("%s:DFS-Invalid regdomain",__func__);
+ /*
+ * Set the DFS reg domain to unintlialized domain
+ * to indicate dfs regdomain configuration failure
+ */
+ wma->dfs_ic->current_dfs_regdomain = DFS_UNINIT_DOMAIN;
+ return;
}
regdmn5G = get_regdmn_5g(regdmn);
@@ -20017,6 +20061,12 @@ wma_set_dfs_regdomain(tp_wma_handle wma)
if (!ctl)
{
WMA_LOGI("%s:DFS-Invalid CTL",__func__);
+ /*
+ * Set the DFS reg domain to unintlialized domain
+ * to indicate dfs regdomain configuration failure
+ */
+ wma->dfs_ic->current_dfs_regdomain = DFS_UNINIT_DOMAIN;
+ return;
}
if (ctl == FCC)
{
diff --git a/CORE/SME/inc/csrInternal.h b/CORE/SME/inc/csrInternal.h
index b0bb48cbb1c2..aaf019b3141e 100644
--- a/CORE/SME/inc/csrInternal.h
+++ b/CORE/SME/inc/csrInternal.h
@@ -1263,7 +1263,25 @@ eHalStatus csrGetStatistics(tpAniSirGlobal pMac, eCsrStatsRequesterType requeste
---------------------------------------------------------------------------*/
tANI_U16 csrGetTLSTAState(tpAniSirGlobal pMac, tANI_U8 staId);
-eHalStatus csrGetRssi(tpAniSirGlobal pMac,tCsrRssiCallback callback,tANI_U8 staId,tCsrBssid bssId,void * pContext,void * pVosContext);
+/* ---------------------------------------------------------------------------
+ \fn csrGetRssi
+ \ creates SME req packet for getRSSI and post to Self
+
+ \param pMac - global MAC context
+ \param callback - hdd callback function to be called once FW returns the
+ RSSI value
+ \param staId - The staID to be passed to the TL to get the relevant
+ TL STA State
+ \param bssID - bssid for which RSSI is requested
+ \param lastRSSI - RSSI value at time of request. In case request cannot
+ be sent to firmware, do not hold up but return this value.
+ \param pContext - user context to be passed back along with the callback
+ \param pVosContext - vos conext
+ \return the state as tANI_U16
+ ---------------------------------------------------------------------------*/
+eHalStatus csrGetRssi(tpAniSirGlobal pMac,tCsrRssiCallback callback,
+ tANI_U8 staId, tCsrBssid bssId, tANI_S8 lastRSSI,
+ void * pContext,void * pVosContext);
/* ---------------------------------------------------------------------------
\fn csrGetSnr
diff --git a/CORE/SME/inc/sme_Api.h b/CORE/SME/inc/sme_Api.h
index 2c8df703e33a..d838eba70356 100644
--- a/CORE/SME/inc/sme_Api.h
+++ b/CORE/SME/inc/sme_Api.h
@@ -923,9 +923,25 @@ eHalStatus sme_GetStatistics(tHalHandle hHal, eCsrStatsRequesterType requesterId
---------------------------------------------------------------------------*/
tANI_U16 smeGetTLSTAState(tHalHandle hHal, tANI_U8 staId);
+/* ---------------------------------------------------------------------------
+ \fn sme_GetRssi
+ \brief a wrapper function that client calls to register a callback to get
+ RSSI
+
+ \param hHal - HAL handle for device
+ \param callback - SME sends back the requested stats using the callback
+ \param staId - The station ID for which the stats is requested for
+ \param bssid - The bssid of the connected session
+ \param lastRSSI - RSSI value at time of request. In case fw cannot provide
+ RSSI, do not hold up but return this value.
+ \param pContext - user context to be passed back along with the callback
+ \param pVosContext - vos context
+ \return eHalStatus
+ ---------------------------------------------------------------------------*/
eHalStatus sme_GetRssi(tHalHandle hHal,
- tCsrRssiCallback callback,
- tANI_U8 staId, tCsrBssid bssId, void *pContext, void* pVosContext);
+ tCsrRssiCallback callback,
+ tANI_U8 staId, tCsrBssid bssId, tANI_S8 lastRSSI,
+ void *pContext, void* pVosContext);
/* ---------------------------------------------------------------------------
\fn sme_GetSnr
diff --git a/CORE/SME/src/csr/csrApiRoam.c b/CORE/SME/src/csr/csrApiRoam.c
index 0335dd918c6d..ee8d04f537e1 100644
--- a/CORE/SME/src/csr/csrApiRoam.c
+++ b/CORE/SME/src/csr/csrApiRoam.c
@@ -8436,6 +8436,22 @@ void csrRoamingStateMsgProcessor( tpAniSirGlobal pMac, void *pMsgBuf )
eCSR_ROAM_CONNECT_STATUS_UPDATE,
eCSR_ROAM_RESULT_IBSS_PEER_DEPARTED);
break;
+ case eWNI_SME_GET_RSSI_REQ:
+ {
+ tAniGetRssiReq *pGetRssiReq = (tAniGetRssiReq*)pMsgBuf;
+ if (NULL != pGetRssiReq->rssiCallback)
+ {
+ ((tCsrRssiCallback)(pGetRssiReq->rssiCallback))( pGetRssiReq->lastRSSI,
+ pGetRssiReq->staId,
+ pGetRssiReq->pDevContext);
+ }
+ else
+ {
+ smsLog(pMac, LOGE, FL("pGetRssiReq->rssiCallback is NULL"));
+ }
+ }
+ break;
+
default:
smsLog(pMac, LOG1,
FL("Unexpected message type = %d[0x%X] received in substate %s"),
@@ -9223,15 +9239,13 @@ void csrRoamRssiRspProcessor(tpAniSirGlobal pMac, void* pMsg)
if (NULL != pRoamRssiRsp)
{
- /* Get roam Rssi request is backed up and passed back to the response,
- Extract the request message to fetch callback */
+ /* Get roam Rssi request is backed up and passed back to the response,
+ Extract the request message to fetch callback */
tpAniGetRssiReq reqBkp = (tAniGetRssiReq*)pRoamRssiRsp->rssiReq;
v_S7_t rssi = pRoamRssiRsp->rssi;
-
if ((NULL != reqBkp) && (NULL != reqBkp->rssiCallback))
{
((tCsrRssiCallback)(reqBkp->rssiCallback))(rssi, pRoamRssiRsp->staId, reqBkp->pDevContext);
- reqBkp->rssiCallback = NULL;
vos_mem_free(reqBkp);
pRoamRssiRsp->rssiReq = NULL;
}
@@ -15446,8 +15460,12 @@ tCsrPeStatsReqInfo * csrRoamInsertEntryIntoPeStatsReqList( tpAniSirGlobal pMac,
return pNewStaEntry;
}
eHalStatus csrGetRssi(tpAniSirGlobal pMac,
- tCsrRssiCallback callback,
- tANI_U8 staId, tCsrBssid bssId, void *pContext, void* pVosContext)
+ tCsrRssiCallback callback,
+ tANI_U8 staId,
+ tCsrBssid bssId,
+ tANI_S8 lastRSSI,
+ void *pContext,
+ void* pVosContext)
{
eHalStatus status = eHAL_STATUS_SUCCESS;
vos_msg_t msg;
@@ -15455,13 +15473,21 @@ eHalStatus csrGetRssi(tpAniSirGlobal pMac,
tAniGetRssiReq *pMsg;
smsLog(pMac, LOG2, FL("called"));
+
+ status = csrRoamGetSessionIdFromBSSID(pMac, (tCsrBssid *)bssId, &sessionId);
+ if (!HAL_STATUS_SUCCESS(status))
+ {
+ callback(lastRSSI, staId, pContext);
+ smsLog(pMac, LOGE, FL("Failed to get SessionId"));
+ return eHAL_STATUS_FAILURE;
+ }
+
pMsg = vos_mem_malloc(sizeof(tAniGetRssiReq));
if ( NULL == pMsg )
{
smsLog(pMac, LOGE, " csrGetRssi: failed to allocate mem for req ");
return eHAL_STATUS_FAILURE;
}
- csrRoamGetSessionIdFromBSSID(pMac, (tCsrBssid *)bssId, &sessionId);
pMsg->msgType = pal_cpu_to_be16((tANI_U16)eWNI_SME_GET_RSSI_REQ);
pMsg->msgLen = (tANI_U16)sizeof(tAniGetRssiReq);
@@ -15470,6 +15496,11 @@ eHalStatus csrGetRssi(tpAniSirGlobal pMac,
pMsg->rssiCallback = callback;
pMsg->pDevContext = pContext;
pMsg->pVosContext = pVosContext;
+ /*
+ * store RSSI at time of calling, so that if RSSI request cannot
+ * be sent to firmware, this value can be used to return immediately
+ */
+ pMsg->lastRSSI = lastRSSI;
msg.type = eWNI_SME_GET_RSSI_REQ;
msg.bodyptr = pMsg;
msg.reserved = 0;
diff --git a/CORE/SME/src/csr/csrCmdProcess.c b/CORE/SME/src/csr/csrCmdProcess.c
index 49ca8eae976b..dfba380e4cb1 100644
--- a/CORE/SME/src/csr/csrCmdProcess.c
+++ b/CORE/SME/src/csr/csrCmdProcess.c
@@ -54,7 +54,7 @@ eHalStatus csrMsgProcessor( tpAniSirGlobal pMac, void *pMsgBuf )
#endif
smsLog(pMac, LOG2, FL("Message %d[0x%04X] received in curState %s"
- "and substate %s"),
+ " and substate %s"),
pSmeRsp->messageType, pSmeRsp->messageType,
macTraceGetcsrRoamState(pMac->roam.curState[pSmeRsp->sessionId]),
macTraceGetcsrRoamSubState(
@@ -135,6 +135,25 @@ eHalStatus csrMsgProcessor( tpAniSirGlobal pMac, void *pMsgBuf )
smsLog(pMac, LOGW, FL(" handling msg 0x%X CSR state is %d"), pSmeRsp->messageType, pMac->roam.curState[pSmeRsp->sessionId]);
csrRoamCheckForLinkStatusChange(pMac, pSmeRsp);
}
+ else if(eWNI_SME_GET_RSSI_REQ == pSmeRsp->messageType)
+ {
+ tAniGetRssiReq *pGetRssiReq = (tAniGetRssiReq*)pMsgBuf;
+ if(NULL != pGetRssiReq->rssiCallback)
+ {
+ smsLog(pMac,
+ LOGW,
+ FL("Message eWNI_SME_GET_RSSI_REQ is not handled"
+ " by CSR in state %d. calling RSSI callback"),
+ pMac->roam.curState[pSmeRsp->sessionId]);
+ ((tCsrRssiCallback)(pGetRssiReq->rssiCallback))(pGetRssiReq->lastRSSI,
+ pGetRssiReq->staId,
+ pGetRssiReq->pDevContext);
+ }
+ else
+ {
+ smsLog(pMac, LOGE, FL("pGetRssiReq->rssiCallback is NULL"));
+ }
+ }
else
{
smsLog(pMac, LOGW, " Message 0x%04X is not handled by CSR. CSR state is %d ", pSmeRsp->messageType, pMac->roam.curState[pSmeRsp->sessionId]);
diff --git a/CORE/SME/src/sme_common/sme_Api.c b/CORE/SME/src/sme_common/sme_Api.c
index 4bdd3ed14c43..e7655aaa3c4c 100644
--- a/CORE/SME/src/sme_common/sme_Api.c
+++ b/CORE/SME/src/sme_common/sme_Api.c
@@ -4970,17 +4970,22 @@ eHalStatus sme_RoamRemoveKey(tHalHandle hHal, tANI_U8 sessionId,
/* ---------------------------------------------------------------------------
\fn sme_GetRssi
- \brief a wrapper function that client calls to register a callback to get RSSI
+ \brief a wrapper function that client calls to register a callback to get
+ RSSI
+ \param hHal - HAL handle for device
\param callback - SME sends back the requested stats using the callback
- \param staId - The station ID for which the stats is requested for
+ \param staId - The station ID for which the stats is requested for
+ \param bssid - The bssid of the connected session
+ \param lastRSSI - RSSI value at time of request. In case fw cannot provide
+ RSSI, do not hold up but return this value.
\param pContext - user context to be passed back along with the callback
\param pVosContext - vos context
\return eHalStatus
---------------------------------------------------------------------------*/
eHalStatus sme_GetRssi(tHalHandle hHal,
tCsrRssiCallback callback,
- tANI_U8 staId, tCsrBssid bssId,
+ tANI_U8 staId, tCsrBssid bssId, tANI_S8 lastRSSI,
void *pContext, void* pVosContext)
{
eHalStatus status = eHAL_STATUS_FAILURE;
@@ -4992,7 +4997,8 @@ eHalStatus sme_GetRssi(tHalHandle hHal,
if ( HAL_STATUS_SUCCESS( status ) )
{
status = csrGetRssi( pMac, callback,
- staId, bssId, pContext, pVosContext);
+ staId, bssId, lastRSSI,
+ pContext, pVosContext);
sme_ReleaseGlobalLock( &pMac->sme );
}
return (status);
@@ -10889,7 +10895,8 @@ VOS_STATUS sme_SelectCBMode(tHalHandle hHal, eCsrPhyMode eCsrPhyMode, tANI_U8 ch
}
/* If channel bonding mode is not required */
- if ( !pMac->roam.configParam.channelBondingMode5GHz ) {
+ if ( !pMac->roam.configParam.channelBondingMode5GHz
+ && !pMac->roam.configParam.channelBondingMode24GHz) {
return VOS_STATUS_SUCCESS;
}
@@ -10900,57 +10907,80 @@ VOS_STATUS sme_SelectCBMode(tHalHandle hHal, eCsrPhyMode eCsrPhyMode, tANI_U8 ch
if ( eCSR_DOT11_MODE_11ac == eCsrPhyMode ||
eCSR_DOT11_MODE_11ac_ONLY == eCsrPhyMode )
{
- if ( channel== 36 || channel == 52 || channel == 100 ||
- channel == 116 || channel == 149 )
- {
- smeConfig.csrConfig.channelBondingMode5GHz =
- PHY_QUADRUPLE_CHANNEL_20MHZ_LOW_40MHZ_LOW - 1;
- }
- else if ( channel == 40 || channel == 56 || channel == 104 ||
- channel == 120 || channel == 153 )
- {
- smeConfig.csrConfig.channelBondingMode5GHz =
- PHY_QUADRUPLE_CHANNEL_20MHZ_HIGH_40MHZ_LOW - 1;
- }
- else if ( channel == 44 || channel == 60 || channel == 108 ||
- channel == 124 || channel == 157 )
- {
- smeConfig.csrConfig.channelBondingMode5GHz =
- PHY_QUADRUPLE_CHANNEL_20MHZ_LOW_40MHZ_HIGH -1;
- }
- else if ( channel == 48 || channel == 64 || channel == 112 ||
- channel == 128 || channel == 144 || channel == 161 )
- {
- smeConfig.csrConfig.channelBondingMode5GHz =
- PHY_QUADRUPLE_CHANNEL_20MHZ_HIGH_40MHZ_HIGH - 1;
+ if (pMac->roam.configParam.channelBondingMode5GHz) {
+ if ( channel== 36 || channel == 52 || channel == 100 ||
+ channel == 116 || channel == 149 )
+ {
+ smeConfig.csrConfig.channelBondingMode5GHz =
+ PHY_QUADRUPLE_CHANNEL_20MHZ_LOW_40MHZ_LOW - 1;
+ }
+ else if ( channel == 40 || channel == 56 || channel == 104 ||
+ channel == 120 || channel == 153 )
+ {
+ smeConfig.csrConfig.channelBondingMode5GHz =
+ PHY_QUADRUPLE_CHANNEL_20MHZ_HIGH_40MHZ_LOW - 1;
+ }
+ else if ( channel == 44 || channel == 60 || channel == 108 ||
+ channel == 124 || channel == 157 )
+ {
+ smeConfig.csrConfig.channelBondingMode5GHz =
+ PHY_QUADRUPLE_CHANNEL_20MHZ_LOW_40MHZ_HIGH -1;
+ }
+ else if ( channel == 48 || channel == 64 || channel == 112 ||
+ channel == 128 || channel == 144 || channel == 161 )
+ {
+ smeConfig.csrConfig.channelBondingMode5GHz =
+ PHY_QUADRUPLE_CHANNEL_20MHZ_HIGH_40MHZ_HIGH - 1;
+ }
+ else if ( channel == 165 )
+ {
+ smeConfig.csrConfig.channelBondingMode5GHz = 0;
+ }
}
- else if ( channel == 165 )
- {
- smeConfig.csrConfig.channelBondingMode5GHz = 0;
+ /*TODO: Set HT40+ / HT40- for channel 5-7 based on ACS */
+ if (pMac->roam.configParam.channelBondingMode24GHz) {
+ if (channel >= 1 && channel <= 5)
+ smeConfig.csrConfig.channelBondingMode24GHz = 2;
+ else if (channel >= 6 && channel <= 13)
+ smeConfig.csrConfig.channelBondingMode24GHz = 1;
+ else if (channel ==14)
+ smeConfig.csrConfig.channelBondingMode24GHz = 0;
}
+
}
#endif
if ( eCSR_DOT11_MODE_11n == eCsrPhyMode ||
eCSR_DOT11_MODE_11n_ONLY == eCsrPhyMode )
{
- if ( channel== 40 || channel == 48 || channel == 56 ||
- channel == 64 || channel == 104 || channel == 112 ||
- channel == 120 || channel == 128 || channel == 136 ||
- channel == 144 || channel == 153 || channel == 161 )
- {
- smeConfig.csrConfig.channelBondingMode5GHz = 1;
- }
- else if ( channel== 36 || channel == 44 || channel == 52 ||
- channel == 60 || channel == 100 || channel == 108 ||
- channel == 116 || channel == 124 || channel == 132 ||
- channel == 140 || channel == 149 || channel == 157 )
- {
- smeConfig.csrConfig.channelBondingMode5GHz = 2;
+ if (pMac->roam.configParam.channelBondingMode5GHz) {
+ if ( channel== 40 || channel == 48 || channel == 56 ||
+ channel == 64 || channel == 104 || channel == 112 ||
+ channel == 120 || channel == 128 || channel == 136 ||
+ channel == 144 || channel == 153 || channel == 161 )
+ {
+ smeConfig.csrConfig.channelBondingMode5GHz = 1;
+ }
+ else if ( channel== 36 || channel == 44 || channel == 52 ||
+ channel == 60 || channel == 100 || channel == 108 ||
+ channel == 116 || channel == 124 || channel == 132 ||
+ channel == 140 || channel == 149 || channel == 157 )
+ {
+ smeConfig.csrConfig.channelBondingMode5GHz = 2;
+ }
+ else if ( channel == 165 )
+ {
+ smeConfig.csrConfig.channelBondingMode5GHz = 0;
+ }
}
- else if ( channel == 165 )
- {
- smeConfig.csrConfig.channelBondingMode5GHz = 0;
+
+ if (pMac->roam.configParam.channelBondingMode24GHz) {
+ if (channel >= 1 && channel <= 5)
+ smeConfig.csrConfig.channelBondingMode24GHz = 2;
+ else if (channel >= 6 && channel <= 13)
+ smeConfig.csrConfig.channelBondingMode24GHz = 1;
+ else if (channel ==14)
+ smeConfig.csrConfig.channelBondingMode24GHz = 0;
}
}
@@ -10959,16 +10989,20 @@ VOS_STATUS sme_SelectCBMode(tHalHandle hHal, eCsrPhyMode eCsrPhyMode, tANI_U8 ch
From default config, it is set as PHY_DOUBLE_CHANNEL_HIGH_PRIMARY = 3
through csrChangeDefaultConfigParam function. We will override this
value here.
+ for 802.11g only phy mode also channel bonding should be zero.
*/
if ( eCSR_DOT11_MODE_11a == eCsrPhyMode ||
eCSR_DOT11_MODE_11a_ONLY == eCsrPhyMode ||
eCSR_DOT11_MODE_abg == eCsrPhyMode)
{
smeConfig.csrConfig.channelBondingMode5GHz = 0;
- }
+ } else if ( eCSR_DOT11_MODE_11g_ONLY == eCsrPhyMode)
+ smeConfig.csrConfig.channelBondingMode24GHz = 0;
VOS_TRACE(VOS_MODULE_ID_SME, VOS_TRACE_LEVEL_ERROR,
- "cbmode selected=%d", smeConfig.csrConfig.channelBondingMode5GHz);
+ "%s cbmode selected=%d", (channel <= 14) ? "2G" : "5G",
+ (channel <= 14) ? smeConfig.csrConfig.channelBondingMode24GHz :
+ smeConfig.csrConfig.channelBondingMode5GHz);
sme_UpdateConfig (pMac, &smeConfig);
return VOS_STATUS_SUCCESS;
diff --git a/CORE/UTILS/PKTLOG/pktlog_ac.c b/CORE/UTILS/PKTLOG/pktlog_ac.c
index 8c8e14b9e72d..3ff3ac427b9d 100644
--- a/CORE/UTILS/PKTLOG/pktlog_ac.c
+++ b/CORE/UTILS/PKTLOG/pktlog_ac.c
@@ -304,8 +304,6 @@ pktlog_init(struct ol_softc *scn)
PKTLOG_RX_REMOTE_SUBSCRIBER.callback = pktlog_callback;
PKTLOG_RCFIND_SUBSCRIBER.callback = pktlog_callback;
PKTLOG_RCUPDATE_SUBSCRIBER.callback = pktlog_callback;
-
- printk("pktlog initialized\n");
}
int