summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLinux Build Service Account <lnxbuild@localhost>2014-03-08 07:10:09 -0800
committerGerrit - the friendly Code Review server <code-review@localhost>2014-03-08 07:10:09 -0800
commit8fba96339b2fbb84f46aacecce9be10dc9241b95 (patch)
tree8a16c34e48741fa3a8a443cc87bd73371b088901
parent4bdacbe9e26b8b1973c75584a370ba302bc80e3e (diff)
parent330f6ef035efc00b3318dad4a01a274693118027 (diff)
Merge "Merge remote-tracking branch 'origin/caf/caf-wlan/master'"
-rw-r--r--CORE/CLD_TXRX/TXRX/ol_rx_fwd.c13
-rw-r--r--CORE/CLD_TXRX/TXRX/ol_rx_pn.c16
-rw-r--r--CORE/CLD_TXRX/TXRX/ol_rx_reorder.c49
-rw-r--r--CORE/CLD_TXRX/TXRX/ol_txrx_internal.h4
-rw-r--r--CORE/HDD/inc/wlan_hdd_cfg.h33
-rw-r--r--CORE/HDD/inc/wlan_hdd_main.h11
-rw-r--r--CORE/HDD/src/wlan_hdd_assoc.c6
-rw-r--r--CORE/HDD/src/wlan_hdd_cfg.c77
-rw-r--r--CORE/HDD/src/wlan_hdd_cfg80211.c55
-rw-r--r--CORE/HDD/src/wlan_hdd_hostapd.c48
-rw-r--r--CORE/HDD/src/wlan_hdd_main.c121
-rw-r--r--CORE/MAC/inc/qwlan_version.h4
-rw-r--r--CORE/MAC/inc/sirApi.h3
-rw-r--r--CORE/MAC/src/include/sirParams.h8
-rw-r--r--CORE/SAP/inc/sapApi.h2
-rw-r--r--CORE/SAP/src/sapModule.c10
-rw-r--r--CORE/SERVICES/COMMON/adf/adf_nbuf.c5
-rw-r--r--CORE/SERVICES/COMMON/adf/adf_nbuf.h1
-rw-r--r--CORE/SERVICES/COMMON/adf/linux/adf_nbuf_pvt.h7
-rw-r--r--CORE/SERVICES/WMA/wma.c137
-rw-r--r--CORE/SERVICES/WMA/wma.h4
-rw-r--r--CORE/SME/inc/csrApi.h3
-rw-r--r--CORE/SME/inc/csrInternal.h3
-rw-r--r--CORE/SME/inc/csrNeighborRoam.h18
-rw-r--r--CORE/SME/inc/sme_Api.h74
-rw-r--r--CORE/SME/src/csr/csrApiRoam.c12
-rw-r--r--CORE/SME/src/csr/csrNeighborRoam.c182
-rw-r--r--CORE/SME/src/sme_common/sme_Api.c153
-rw-r--r--CORE/SVC/external/wlan_nlink_common.h2
-rw-r--r--CORE/SYS/legacy/src/utils/src/macTrace.c1
-rw-r--r--CORE/VOSS/src/vos_nvitem.c4
-rw-r--r--CORE/VOSS/src/wlan_nv_parser.c8
-rw-r--r--CORE/WDA/inc/wlan_qct_wda.h1
-rw-r--r--CORE/WDI/WPAL/src/wlan_qct_pal_api.c4
-rw-r--r--Kbuild14
-rwxr-xr-xfirmware_bin/WCNSS_qcom_cfg.ini3
36 files changed, 1003 insertions, 93 deletions
diff --git a/CORE/CLD_TXRX/TXRX/ol_rx_fwd.c b/CORE/CLD_TXRX/TXRX/ol_rx_fwd.c
index 5ad0233cfcdc..5a6134e63baf 100644
--- a/CORE/CLD_TXRX/TXRX/ol_rx_fwd.c
+++ b/CORE/CLD_TXRX/TXRX/ol_rx_fwd.c
@@ -186,10 +186,17 @@ ol_rx_fwd_check(
* from the target, so we can locate the tx vdev.
*/
tx_vdev = vdev;
- /* Copying TID value of RX packet to forwarded
- * packet
+ /*
+ * Copying TID value of RX packet to forwarded
+ * packet if the tid is other than non qos tid.
+ * But for non qos tid fill invalid tid so that
+ * Fw will take care of filling proper tid.
*/
- adf_nbuf_set_tid(msdu, tid);
+ if (tid != HTT_NON_QOS_TID) {
+ adf_nbuf_set_tid(msdu, tid);
+ } else {
+ adf_nbuf_set_tid(msdu, ADF_NBUF_TX_EXT_TID_INVALID);
+ }
/*
* This MSDU needs to be forwarded to the tx path.
* Check whether it also needs to be sent to the OS shim,
diff --git a/CORE/CLD_TXRX/TXRX/ol_rx_pn.c b/CORE/CLD_TXRX/TXRX/ol_rx_pn.c
index e4eb9cdc674a..c70b5ea3e59c 100644
--- a/CORE/CLD_TXRX/TXRX/ol_rx_pn.c
+++ b/CORE/CLD_TXRX/TXRX/ol_rx_pn.c
@@ -154,6 +154,10 @@ ol_rx_pn_check_base(
if (pn_is_replay) {
adf_nbuf_t msdu;
+ static u_int32_t last_pncheck_print_time = 0;
+ int log_level;
+ u_int32_t current_time_ms;
+
/*
* This MPDU failed the PN check:
* 1. Notify the control SW of the PN failure
@@ -161,7 +165,17 @@ ol_rx_pn_check_base(
* 2. Discard all the MSDUs from this MPDU.
*/
msdu = mpdu;
- TXRX_PRINT(TXRX_PRINT_LEVEL_WARN,
+ current_time_ms = adf_os_ticks_to_msecs(adf_os_ticks());
+ if (TXRX_PN_CHECK_FAILURE_PRINT_PERIOD_MS <
+ (current_time_ms - last_pncheck_print_time)) {
+ last_pncheck_print_time = current_time_ms;
+ log_level = TXRX_PRINT_LEVEL_WARN;
+ }
+ else {
+ log_level = TXRX_PRINT_LEVEL_INFO2;
+ }
+
+ TXRX_PRINT(log_level,
"PN check failed - TID %d, peer %p "
"(%02x:%02x:%02x:%02x:%02x:%02x) %s\n"
" old PN (u64 x2)= 0x%08llx %08llx (LSBs = %lld)\n"
diff --git a/CORE/CLD_TXRX/TXRX/ol_rx_reorder.c b/CORE/CLD_TXRX/TXRX/ol_rx_reorder.c
index a54ff598c1af..eafe5b732584 100644
--- a/CORE/CLD_TXRX/TXRX/ol_rx_reorder.c
+++ b/CORE/CLD_TXRX/TXRX/ol_rx_reorder.c
@@ -631,6 +631,9 @@ ol_rx_pn_ind_handler(
if (rx_reorder_array_elem->head) {
if (pn_ie_cnt && seq_num_start == (int)(pn_ie[i])) {
adf_nbuf_t msdu, next_msdu, mpdu_head, mpdu_tail;
+ static u_int32_t last_pncheck_print_time = 0;
+ int log_level;
+ u_int32_t current_time_ms;
mpdu_head = msdu = rx_reorder_array_elem->head;
mpdu_tail = rx_reorder_array_elem->tail;
@@ -640,24 +643,34 @@ ol_rx_pn_ind_handler(
rx_desc = htt_rx_msdu_desc_retrieve(htt_pdev, msdu);
htt_rx_mpdu_desc_pn(htt_pdev, rx_desc, &pn, 16);
- TXRX_PRINT(TXRX_PRINT_LEVEL_WARN,
- "Tgt PN check failed - TID %d, peer %p "
- "(%02x:%02x:%02x:%02x:%02x:%02x)\n"
- " PN (u64 x2)= 0x%08llx %08llx (LSBs = %lld)\n"
- " new seq num = %d\n",
- tid, peer,
- peer->mac_addr.raw[0], peer->mac_addr.raw[1],
- peer->mac_addr.raw[2], peer->mac_addr.raw[3],
- peer->mac_addr.raw[4], peer->mac_addr.raw[5],
- pn.pn128[1],
- pn.pn128[0],
- pn.pn128[0] & 0xffffffffffffULL,
- htt_rx_mpdu_desc_seq_num(htt_pdev, rx_desc));
- ol_rx_err(
- pdev->ctrl_pdev,
- vdev->vdev_id, peer->mac_addr.raw, tid,
- htt_rx_mpdu_desc_tsf32(htt_pdev, rx_desc),
- OL_RX_ERR_PN, mpdu_head, NULL, 0);
+ current_time_ms = adf_os_ticks_to_msecs(adf_os_ticks());
+ if (TXRX_PN_CHECK_FAILURE_PRINT_PERIOD_MS <
+ (current_time_ms - last_pncheck_print_time)) {
+ last_pncheck_print_time = current_time_ms;
+ log_level = TXRX_PRINT_LEVEL_WARN;
+ }
+ else {
+ log_level = TXRX_PRINT_LEVEL_INFO2;
+ }
+ TXRX_PRINT(log_level,
+ "Tgt PN check failed - TID %d, peer %p "
+ "(%02x:%02x:%02x:%02x:%02x:%02x)\n"
+ " PN (u64 x2)= 0x%08llx %08llx (LSBs = %lld)\n"
+ " new seq num = %d\n",
+ tid, peer,
+ peer->mac_addr.raw[0], peer->mac_addr.raw[1],
+ peer->mac_addr.raw[2], peer->mac_addr.raw[3],
+ peer->mac_addr.raw[4], peer->mac_addr.raw[5],
+ pn.pn128[1],
+ pn.pn128[0],
+ pn.pn128[0] & 0xffffffffffffULL,
+ htt_rx_mpdu_desc_seq_num(htt_pdev, rx_desc));
+ ol_rx_err(
+ pdev->ctrl_pdev,
+ vdev->vdev_id, peer->mac_addr.raw, tid,
+ htt_rx_mpdu_desc_tsf32(htt_pdev, rx_desc),
+ OL_RX_ERR_PN, mpdu_head, NULL, 0);
+
/* free all MSDUs within this MPDU */
do {
next_msdu = adf_nbuf_next(msdu);
diff --git a/CORE/CLD_TXRX/TXRX/ol_txrx_internal.h b/CORE/CLD_TXRX/TXRX/ol_txrx_internal.h
index 3081951c7202..6b8a6f6b85fa 100644
--- a/CORE/CLD_TXRX/TXRX/ol_txrx_internal.h
+++ b/CORE/CLD_TXRX/TXRX/ol_txrx_internal.h
@@ -128,6 +128,10 @@ extern unsigned g_txrx_print_level;
#define TXRX_PRINT_VERBOSE(fmt, ...)
#endif /* TXRX_PRINT_VERBOSE_ENABLE */
+/* define PN check failure message print rate
+ as 1 second */
+#define TXRX_PN_CHECK_FAILURE_PRINT_PERIOD_MS 1000
+
#else
#define TXRX_PRINT(level, fmt, ...)
#define TXRX_PRINT_VERBOSE(fmt, ...)
diff --git a/CORE/HDD/inc/wlan_hdd_cfg.h b/CORE/HDD/inc/wlan_hdd_cfg.h
index 047b8cbe8df1..445a4a06236f 100644
--- a/CORE/HDD/inc/wlan_hdd_cfg.h
+++ b/CORE/HDD/inc/wlan_hdd_cfg.h
@@ -456,6 +456,13 @@ typedef enum
#define CFG_AP_AUTO_SHUT_OFF_MAX ( 4294967295UL )
#define CFG_AP_AUTO_SHUT_OFF_DEFAULT ( 0 )
+#ifdef FEATURE_WLAN_AUTO_SHUTDOWN
+#define CFG_WLAN_AUTO_SHUTDOWN "gWlanAutoShutdown"
+#define CFG_WLAN_AUTO_SHUTDOWN_MIN ( 0 )
+#define CFG_WLAN_AUTO_SHUTDOWN_MAX ( 86400 ) /* Max 1 day timeout */
+#define CFG_WLAN_AUTO_SHUTDOWN_DEFAULT ( 0 )
+#endif
+
#define CFG_FRAMES_PROCESSING_TH_MODE_NAME "gMinFramesProcThres"
#define CFG_FRAMES_PROCESSING_TH_MIN ( 0 )
#define CFG_FRAMES_PROCESSING_TH_MAX ( 39 )
@@ -622,7 +629,6 @@ typedef enum
#define CFG_NUM_P2P_CHAN_COMBINED_CONC_MIN ( 1 )
#define CFG_NUM_P2P_CHAN_COMBINED_CONC_MAX ( 255 )
#define CFG_NUM_P2P_CHAN_COMBINED_CONC_DEFAULT ( 1 )
-
#endif
#define CFG_MAX_PS_POLL_NAME "gMaxPsPoll"
@@ -1266,6 +1272,21 @@ typedef enum
#define CFG_EMPTY_SCAN_REFRESH_PERIOD_MIN (0)
#define CFG_EMPTY_SCAN_REFRESH_PERIOD_MAX (60000)
#define CFG_EMPTY_SCAN_REFRESH_PERIOD_DEFAULT (0)
+
+#define CFG_ROAM_BMISS_FIRST_BCNT_NAME "gRoamBmissFirstBcnt"
+#define CFG_ROAM_BMISS_FIRST_BCNT_MIN (5)
+#define CFG_ROAM_BMISS_FIRST_BCNT_MAX (100)
+#define CFG_ROAM_BMISS_FIRST_BCNT_DEFAULT (10)
+
+#define CFG_ROAM_BMISS_FINAL_BCNT_NAME "gRoamBmissFinalBcnt"
+#define CFG_ROAM_BMISS_FINAL_BCNT_MIN (5)
+#define CFG_ROAM_BMISS_FINAL_BCNT_MAX (100)
+#define CFG_ROAM_BMISS_FINAL_BCNT_DEFAULT (10)
+
+#define CFG_ROAM_BEACON_RSSI_WEIGHT_NAME "gRoamBeaconRssiWeight"
+#define CFG_ROAM_BEACON_RSSI_WEIGHT_MIN (0)
+#define CFG_ROAM_BEACON_RSSI_WEIGHT_MAX (16)
+#define CFG_ROAM_BEACON_RSSI_WEIGHT_DEFAULT (14)
#endif /* WLAN_FEATURE_NEIGHBOR_ROAMING */
#define CFG_QOS_WMM_BURST_SIZE_DEFN_NAME "burstSizeDefinition"
@@ -1574,6 +1595,9 @@ typedef enum
#define CFG_SAP_AUTO_CHANNEL_SELECTION_MAX ( 1 )
#define CFG_SAP_AUTO_CHANNEL_SELECTION_DEFAULT ( 0 )
+#define CFG_ONLY_ALLOWED_CHANNELS "gACSAllowedChannels"
+#define CFG_ONLY_ALLOWED_CHANNELS_DEFAULT ""
+
/*BMPS Logic
* Notes:
* 1 - Then Host driver and above layers control the PS mechanism
@@ -2374,6 +2398,9 @@ typedef struct
v_U16_t nMaxNeighborReqTries;
v_U16_t nNeighborResultsRefreshPeriod;
v_U16_t nEmptyScanRefreshPeriod;
+ v_U8_t nRoamBmissFirstBcnt;
+ v_U8_t nRoamBmissFinalBcnt;
+ v_U8_t nRoamBeaconRssiWeight;
#endif
//Additional Handoff params
@@ -2676,6 +2703,9 @@ typedef struct
v_BOOL_t IpaRMEnable;
v_U32_t IpaDescSize;
#endif
+#ifdef FEATURE_WLAN_AUTO_SHUTDOWN
+ v_U32_t WlanAutoShutdown;
+#endif
v_U8_t maxWoWFilters;
v_U8_t wowEnable;
v_U8_t maxNumberOfPeers;
@@ -2696,6 +2726,7 @@ typedef struct
v_U8_t enableRxThread;
v_BOOL_t fDfsPhyerrFilterOffload;
v_BOOL_t gEnableOverLapCh;
+ char acsAllowedChnls[CFG_MAX_STR_LEN];
} 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 fc38b98a9286..68724ce159ca 100644
--- a/CORE/HDD/inc/wlan_hdd_main.h
+++ b/CORE/HDD/inc/wlan_hdd_main.h
@@ -738,6 +738,8 @@ struct hdd_ap_ctx_s
tCsrRoamSetKey wepKey[CSR_MAX_NUM_KEY];
beacon_data_t *beacon;
+
+ v_BOOL_t bApActive;
};
struct hdd_mon_ctx_s
@@ -1294,6 +1296,11 @@ struct hdd_context_s
v_U8_t current_intf_count;
tSirScanType ioctl_scan_mode;
+
+#ifdef FEATURE_WLAN_AUTO_SHUTDOWN
+ vos_timer_t hdd_wlan_shutdown_timer;
+#endif
+
};
@@ -1432,5 +1439,7 @@ void hdd_deinit_batch_scan(hdd_adapter_t *pAdapter);
#endif /*End of FEATURE_WLAN_BATCH_SCAN*/
void wlan_hdd_send_svc_nlink_msg(int type);
-
+#ifdef FEATURE_WLAN_AUTO_SHUTDOWN
+void wlan_hdd_auto_shutdown_enable(hdd_context_t *hdd_ctx, v_U8_t enable);
+#endif
#endif // end #if !defined( WLAN_HDD_MAIN_H )
diff --git a/CORE/HDD/src/wlan_hdd_assoc.c b/CORE/HDD/src/wlan_hdd_assoc.c
index 212fe6a8f01b..62748ac31302 100644
--- a/CORE/HDD/src/wlan_hdd_assoc.c
+++ b/CORE/HDD/src/wlan_hdd_assoc.c
@@ -816,6 +816,9 @@ static eHalStatus hdd_DisConnectHandler( hdd_adapter_t *pAdapter, tCsrRoamInfo *
hdd_ipa_wlan_evt(pAdapter, pHddStaCtx->conn_info.staId[0],
WLAN_STA_DISCONNECT, pHddStaCtx->conn_info.bssId);
#endif
+#ifdef FEATURE_WLAN_AUTO_SHUTDOWN
+ wlan_hdd_auto_shutdown_enable(pHddCtx, VOS_TRUE);
+#endif
#ifdef QCA_PKT_PROTO_TRACE
/* STA disconnected, update into trace buffer */
@@ -1316,6 +1319,9 @@ static eHalStatus hdd_AssociationCompletionHandler( hdd_adapter_t *pAdapter, tCs
hdd_ipa_wlan_evt(pAdapter, pRoamInfo->staId, WLAN_STA_CONNECT,
pRoamInfo->bssid);
#endif
+#ifdef FEATURE_WLAN_AUTO_SHUTDOWN
+ wlan_hdd_auto_shutdown_enable(pHddCtx, VOS_FALSE);
+#endif
#ifdef FEATURE_WLAN_TDLS
wlan_hdd_tdls_connection_callback(pAdapter);
diff --git a/CORE/HDD/src/wlan_hdd_cfg.c b/CORE/HDD/src/wlan_hdd_cfg.c
index ed84829dae7c..64c77d3c9c0c 100644
--- a/CORE/HDD/src/wlan_hdd_cfg.c
+++ b/CORE/HDD/src/wlan_hdd_cfg.c
@@ -216,6 +216,30 @@ static void cbNotifySetNeighborScanMaxChanTime(hdd_context_t *pHddCtx, unsigned
{
sme_setNeighborScanMaxChanTime((tHalHandle)(pHddCtx->hHal), pHddCtx->cfg_ini->nNeighborScanMaxChanTime);
}
+static void cbNotifySetRoamBmissFirstBcnt(hdd_context_t *pHddCtx,
+ unsigned long NotifyId)
+{
+ /*
+ * at the point this routine is called, the value in the cfg_ini table
+ * has already been updated
+ */
+ sme_SetRoamBmissFirstBcnt((tHalHandle)(pHddCtx->hHal),
+ pHddCtx->cfg_ini->nRoamBmissFirstBcnt);
+}
+
+static void cbNotifySetRoamBmissFinalBcnt(hdd_context_t *pHddCtx,
+ unsigned long NotifyId)
+{
+ sme_SetRoamBmissFinalBcnt((tHalHandle)(pHddCtx->hHal),
+ pHddCtx->cfg_ini->nRoamBmissFinalBcnt);
+}
+
+static void cbNotifySetRoamBeaconRssiWeight(hdd_context_t *pHddCtx,
+ unsigned long NotifyId)
+{
+ sme_SetRoamBeaconRssiWeight((tHalHandle)(pHddCtx->hHal),
+ pHddCtx->cfg_ini->nRoamBeaconRssiWeight);
+}
#endif
static void cbNotifySetEnableSSR(hdd_context_t *pHddCtx, unsigned long NotifyId)
@@ -1819,6 +1843,14 @@ REG_TABLE_ENTRY g_registry_table[] =
CFG_AP_AUTO_SHUT_OFF_MIN,
CFG_AP_AUTO_SHUT_OFF_MAX ),
+#ifdef FEATURE_WLAN_AUTO_SHUTDOWN
+ REG_VARIABLE( CFG_WLAN_AUTO_SHUTDOWN , WLAN_PARAM_Integer,
+ hdd_config_t, WlanAutoShutdown,
+ VAR_FLAGS_OPTIONAL | VAR_FLAGS_RANGE_CHECK_ASSUME_DEFAULT,
+ CFG_WLAN_AUTO_SHUTDOWN_DEFAULT,
+ CFG_WLAN_AUTO_SHUTDOWN_MIN,
+ CFG_WLAN_AUTO_SHUTDOWN_MAX ),
+#endif
#if defined WLAN_FEATURE_VOWIFI
REG_VARIABLE( CFG_RRM_ENABLE_NAME, WLAN_PARAM_Integer,
hdd_config_t, fRrmEnable,
@@ -1941,6 +1973,30 @@ REG_TABLE_ENTRY g_registry_table[] =
CFG_EMPTY_SCAN_REFRESH_PERIOD_MIN,
CFG_EMPTY_SCAN_REFRESH_PERIOD_MAX,
cbNotifySetEmptyScanRefreshPeriod, 0 ),
+
+ REG_DYNAMIC_VARIABLE( CFG_ROAM_BMISS_FIRST_BCNT_NAME, WLAN_PARAM_Integer,
+ hdd_config_t, nRoamBmissFirstBcnt,
+ VAR_FLAGS_OPTIONAL | VAR_FLAGS_RANGE_CHECK_ASSUME_DEFAULT,
+ CFG_ROAM_BMISS_FIRST_BCNT_DEFAULT,
+ CFG_ROAM_BMISS_FIRST_BCNT_MIN,
+ CFG_ROAM_BMISS_FIRST_BCNT_MAX,
+ cbNotifySetRoamBmissFirstBcnt, 0 ),
+
+ REG_DYNAMIC_VARIABLE( CFG_ROAM_BMISS_FINAL_BCNT_NAME, WLAN_PARAM_Integer,
+ hdd_config_t, nRoamBmissFinalBcnt,
+ VAR_FLAGS_OPTIONAL | VAR_FLAGS_RANGE_CHECK_ASSUME_DEFAULT,
+ CFG_ROAM_BMISS_FINAL_BCNT_DEFAULT,
+ CFG_ROAM_BMISS_FINAL_BCNT_MIN,
+ CFG_ROAM_BMISS_FINAL_BCNT_MAX,
+ cbNotifySetRoamBmissFinalBcnt, 0 ),
+
+ REG_DYNAMIC_VARIABLE( CFG_ROAM_BEACON_RSSI_WEIGHT_NAME, WLAN_PARAM_Integer,
+ hdd_config_t, nRoamBeaconRssiWeight,
+ VAR_FLAGS_OPTIONAL | VAR_FLAGS_RANGE_CHECK_ASSUME_DEFAULT,
+ CFG_ROAM_BEACON_RSSI_WEIGHT_DEFAULT,
+ CFG_ROAM_BEACON_RSSI_WEIGHT_MIN,
+ CFG_ROAM_BEACON_RSSI_WEIGHT_MAX,
+ cbNotifySetRoamBeaconRssiWeight, 0 ),
#endif /* WLAN_FEATURE_NEIGHBOR_ROAMING */
REG_VARIABLE( CFG_QOS_WMM_BURST_SIZE_DEFN_NAME , WLAN_PARAM_Integer,
@@ -3111,13 +3167,16 @@ REG_VARIABLE( CFG_ENABLE_DFS_PHYERR_FILTEROFFLOAD_NAME, WLAN_PARAM_Integer,
CFG_ENABLE_DFS_PHYERR_FILTEROFFLOAD_DEFAULT,
CFG_ENABLE_DFS_PHYERR_FILTEROFFLOAD_MIN,
CFG_ENABLE_DFS_PHYERR_FILTEROFFLOAD_MAX ),
-
REG_VARIABLE( CFG_ENABLE_OVERLAP_CH, WLAN_PARAM_Integer,
hdd_config_t, gEnableOverLapCh,
VAR_FLAGS_OPTIONAL | VAR_FLAGS_RANGE_CHECK,
CFG_ENABLE_OVERLAP_CH_DEFAULT,
CFG_ENABLE_OVERLAP_CH_MIN,
CFG_ENABLE_OVERLAP_CH_MAX ),
+REG_VARIABLE_STRING( CFG_ONLY_ALLOWED_CHANNELS, WLAN_PARAM_String,
+ hdd_config_t, acsAllowedChnls,
+ VAR_FLAGS_OPTIONAL,
+ (void *)CFG_ONLY_ALLOWED_CHANNELS_DEFAULT),
};
/*
@@ -3350,7 +3409,9 @@ static void print_hdd_cfg(hdd_context_t *pHddCtx)
pHddCtx->cfg_ini->apCntryCode[2]);
VOS_TRACE(VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_INFO_HIGH, "Name = [gEnableApProt] value = [%u]", pHddCtx->cfg_ini->apProtEnabled);
VOS_TRACE(VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_INFO_HIGH, "Name = [gAPAutoShutOff] Value = [%u]\n", pHddCtx->cfg_ini->nAPAutoShutOff);
-
+#ifdef FEATURE_WLAN_AUTO_SHUTDOWN
+ VOS_TRACE(VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_INFO_HIGH, "Name = [gWlanAutoShutdown] Value = [%u]\n", pHddCtx->cfg_ini->WlanAutoShutdown);
+#endif
VOS_TRACE(VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_INFO_HIGH, "Name = [gEnableListenMode] Value = [%u]\n", pHddCtx->cfg_ini->nEnableListenMode);
VOS_TRACE (VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_INFO_HIGH, "Name = [gApProtection] value = [%u]\n",pHddCtx->cfg_ini->apProtection);
VOS_TRACE (VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_INFO_HIGH, "Name = [gEnableApOBSSProt] value = [%u]\n",pHddCtx->cfg_ini->apOBSSProtEnabled);
@@ -3443,6 +3504,15 @@ static void print_hdd_cfg(hdd_context_t *pHddCtx)
VOS_TRACE(VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_INFO_HIGH, "Name = [nNeighborScanPeriod] Value = [%u] ",pHddCtx->cfg_ini->nNeighborScanPeriod);
VOS_TRACE(VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_INFO_HIGH, "Name = [nNeighborScanResultsRefreshPeriod] Value = [%u] ",pHddCtx->cfg_ini->nNeighborResultsRefreshPeriod);
VOS_TRACE(VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_INFO_HIGH, "Name = [nEmptyScanRefreshPeriod] Value = [%u] ",pHddCtx->cfg_ini->nEmptyScanRefreshPeriod);
+ VOS_TRACE(VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_INFO_HIGH,
+ "Name = [nRoamBmissFirstBcnt] Value = [%u] ",
+ pHddCtx->cfg_ini->nRoamBmissFirstBcnt);
+ VOS_TRACE(VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_INFO_HIGH,
+ "Name = [nRoamBmissFinalBcnt] Value = [%u] ",
+ pHddCtx->cfg_ini->nRoamBmissFinalBcnt);
+ VOS_TRACE(VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_INFO_HIGH,
+ "Name = [nRoamBeaconRssiWeight] Value = [%u] ",
+ pHddCtx->cfg_ini->nRoamBeaconRssiWeight);
#endif
VOS_TRACE(VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_INFO_HIGH, "Name = [burstSizeDefinition] Value = [0x%x] ",pHddCtx->cfg_ini->burstSizeDefinition);
VOS_TRACE(VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_INFO_HIGH, "Name = [tsInfoAckPolicy] Value = [0x%x] ",pHddCtx->cfg_ini->tsInfoAckPolicy);
@@ -5146,6 +5216,9 @@ VOS_STATUS hdd_set_sme_config( hdd_context_t *pHddCtx )
smeConfig.csrConfig.neighborRoamConfig.neighborScanChanList.channelList,
&smeConfig.csrConfig.neighborRoamConfig.neighborScanChanList.numChannels,
WNI_CFG_VALID_CHANNEL_LIST_LEN );
+ smeConfig.csrConfig.neighborRoamConfig.nRoamBmissFirstBcnt = pConfig->nRoamBmissFirstBcnt;
+ smeConfig.csrConfig.neighborRoamConfig.nRoamBmissFinalBcnt = pConfig->nRoamBmissFinalBcnt;
+ smeConfig.csrConfig.neighborRoamConfig.nRoamBeaconRssiWeight = pConfig->nRoamBeaconRssiWeight;
#endif
smeConfig.csrConfig.addTSWhenACMIsOff = pConfig->AddTSWhenACMIsOff;
diff --git a/CORE/HDD/src/wlan_hdd_cfg80211.c b/CORE/HDD/src/wlan_hdd_cfg80211.c
index dbd6dbd42e17..c7e0be0adbf2 100644
--- a/CORE/HDD/src/wlan_hdd_cfg80211.c
+++ b/CORE/HDD/src/wlan_hdd_cfg80211.c
@@ -267,7 +267,9 @@ static struct ieee80211_supported_band wlan_hdd_band_2_4_GHZ =
.ht_cap.cap = IEEE80211_HT_CAP_SGI_20
| IEEE80211_HT_CAP_GRN_FLD
| IEEE80211_HT_CAP_DSSSCCK40
- | IEEE80211_HT_CAP_LSIG_TXOP_PROT,
+ | IEEE80211_HT_CAP_LSIG_TXOP_PROT
+ | IEEE80211_HT_CAP_SGI_40
+ | IEEE80211_HT_CAP_SUP_WIDTH_20_40,
.ht_cap.ampdu_factor = IEEE80211_HT_MAX_AMPDU_64K,
.ht_cap.ampdu_density = IEEE80211_HT_MPDU_DENSITY_16,
.ht_cap.mcs.rx_mask = { 0xff, 0, 0, 0, 0, 0, 0, 0, 0, 0, },
@@ -1909,6 +1911,38 @@ static int wlan_hdd_cfg80211_set_channel( struct wiphy *wiphy, struct net_device
return status;
}
+/*
+ * FUNCTION: wlan_hdd_set_acs_allowed_channels
+ * set only allowed channel for ACS
+ * input channel list is a string with comma separated
+ * channel number, the first number is the total number
+ * of channels specified. e.g. 4,1,6,9,36
+ */
+static void wlan_hdd_set_acs_allowed_channels(
+ char *acsAllowedChnls,
+ char *acsSapChnlList,
+ int length)
+{
+ char *p;
+
+ /* a white space is required at the beginning of the
+ string to be properly parsed by function
+ sapSetPreferredChannel later */
+ strlcpy(acsSapChnlList, " ", length);
+ strlcat(acsSapChnlList, acsAllowedChnls, length);
+ p = acsSapChnlList;
+ while (*p)
+ {
+ /* looking for comma, replace it with white space */
+ if (*p == ',')
+ *p = ' ';
+
+ p++;
+ }
+
+ return;
+}
+
#if (LINUX_VERSION_CODE < KERNEL_VERSION(3,4,0))
static int wlan_hdd_cfg80211_start_bss(hdd_adapter_t *pHostapdAdapter,
struct beacon_parameters *params)
@@ -1967,6 +2001,13 @@ static int wlan_hdd_cfg80211_start_bss(hdd_adapter_t *pHostapdAdapter,
pConfig->dtim_period);
pConfig->enOverLapCh = !!pHddCtx->cfg_ini->gEnableOverLapCh;
+ if (strlen(iniConfig->acsAllowedChnls) > 0)
+ {
+ wlan_hdd_set_acs_allowed_channels(
+ iniConfig->acsAllowedChnls,
+ pConfig->acsAllowedChnls,
+ sizeof(pConfig->acsAllowedChnls));
+ }
if (pHostapdAdapter->device_mode == WLAN_HDD_SOFTAP)
{
@@ -2780,7 +2821,6 @@ static int wlan_hdd_cfg80211_change_beacon(struct wiphy *wiphy,
#endif //(LINUX_VERSION_CODE > KERNEL_VERSION(3,3,0))
-
static int wlan_hdd_cfg80211_change_bss (struct wiphy *wiphy,
struct net_device *dev,
struct bss_parameters *params)
@@ -2789,12 +2829,21 @@ static int wlan_hdd_cfg80211_change_bss (struct wiphy *wiphy,
hdd_context_t *pHddCtx = WLAN_HDD_GET_CTX(pAdapter);
int ret = 0;
eHalStatus halStatus;
+ v_CONTEXT_t pVosContext = pHddCtx->pvosContext;
+ ptSapContext pSapCtx = NULL;
ENTER();
hddLog(VOS_TRACE_LEVEL_INFO, "%s: device_mode = %d, ap_isolate = %d",
__func__,pAdapter->device_mode,
params->ap_isolate);
+ if (!pVosContext)
+ return -EINVAL;
+
+ pSapCtx = VOS_GET_SAP_CB(pVosContext);
+
+ if (!pSapCtx)
+ return -EINVAL;
if((pAdapter->device_mode == WLAN_HDD_SOFTAP)
|| (pAdapter->device_mode == WLAN_HDD_P2P_GO)
@@ -2807,7 +2856,7 @@ static int wlan_hdd_cfg80211_change_bss (struct wiphy *wiphy,
pAdapter->sessionCtx.ap.apDisableIntraBssFwd = !!params->ap_isolate;
halStatus = sme_ApDisableIntraBssFwd(pHddCtx->hHal,
- pAdapter->sessionId,
+ pSapCtx->sessionId,
pAdapter->sessionCtx.ap.apDisableIntraBssFwd);
if (!HAL_STATUS_SUCCESS(halStatus))
{
diff --git a/CORE/HDD/src/wlan_hdd_hostapd.c b/CORE/HDD/src/wlan_hdd_hostapd.c
index c763bcd41215..471eb258aecb 100644
--- a/CORE/HDD/src/wlan_hdd_hostapd.c
+++ b/CORE/HDD/src/wlan_hdd_hostapd.c
@@ -464,7 +464,6 @@ VOS_STATUS hdd_hostapd_SAPEventCB( tpSap_Event pSapEvent, v_PVOID_t usrDataForCa
v_U8_t staId;
VOS_STATUS vos_status;
v_BOOL_t bWPSState;
- v_BOOL_t bApActive = FALSE;
v_BOOL_t bAuthRequired = TRUE;
tpSap_AssocMacAddr pAssocStasArray = NULL;
char unknownSTAEvent[IW_CUSTOM_MAX+1];
@@ -548,6 +547,9 @@ VOS_STATUS hdd_hostapd_SAPEventCB( tpSap_Event pSapEvent, v_PVOID_t usrDataForCa
hddLog(LOGE, FL("Failed to init AP inactivity timer\n"));
}
+#ifdef FEATURE_WLAN_AUTO_SHUTDOWN
+ wlan_hdd_auto_shutdown_enable(pHddCtx, VOS_TRUE);
+#endif
pHddApCtx->operatingChannel = pSapEvent->sapevt.sapStartBssCompleteEvent.operatingChannel;
pHostapdState->bssState = BSS_START;
@@ -709,6 +711,7 @@ VOS_STATUS hdd_hostapd_SAPEventCB( tpSap_Event pSapEvent, v_PVOID_t usrDataForCa
vos_pkt_trace_buf_update("HA:ASSOC");
}
#endif /* QCA_PKT_PROTO_TRACE */
+ pHddApCtx->bApActive = VOS_TRUE;
// Stop AP inactivity timer
if (pHddApCtx->hdd_ap_inactivity_timer.state == VOS_TIMER_STATE_RUNNING)
{
@@ -716,6 +719,9 @@ VOS_STATUS hdd_hostapd_SAPEventCB( tpSap_Event pSapEvent, v_PVOID_t usrDataForCa
if (!VOS_IS_STATUS_SUCCESS(vos_status))
hddLog(LOGE, FL("Failed to start AP inactivity timer\n"));
}
+#ifdef FEATURE_WLAN_AUTO_SHUTDOWN
+ wlan_hdd_auto_shutdown_enable(pHddCtx, VOS_FALSE);
+#endif
vos_wake_lock_timeout_acquire(&pHddCtx->sap_wake_lock,
HDD_SAP_WAKE_LOCK_DURATION);
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,38))
@@ -789,21 +795,22 @@ VOS_STATUS hdd_hostapd_SAPEventCB( tpSap_Event pSapEvent, v_PVOID_t usrDataForCa
#endif /* QCA_PKT_PROTO_TRACE */
hdd_softap_DeregisterSTA(pHostapdAdapter, staId);
- if (0 != (WLAN_HDD_GET_CTX(pHostapdAdapter))->cfg_ini->nAPAutoShutOff)
+ pHddApCtx->bApActive = VOS_FALSE;
+ spin_lock_bh( &pHostapdAdapter->staInfo_lock );
+ for (i = 0; i < WLAN_MAX_STA_COUNT; i++)
{
- spin_lock_bh( &pHostapdAdapter->staInfo_lock );
- // Start AP inactivity timer if no stations associated with it
- for (i = 0; i < WLAN_MAX_STA_COUNT; i++)
+ if (pHostapdAdapter->aStaInfo[i].isUsed && i != (WLAN_HDD_GET_AP_CTX_PTR(pHostapdAdapter))->uBCStaId)
{
- if (pHostapdAdapter->aStaInfo[i].isUsed && i != (WLAN_HDD_GET_AP_CTX_PTR(pHostapdAdapter))->uBCStaId)
- {
- bApActive = TRUE;
- break;
- }
+ pHddApCtx->bApActive = VOS_TRUE;
+ break;
}
- spin_unlock_bh( &pHostapdAdapter->staInfo_lock );
+ }
+ spin_unlock_bh( &pHostapdAdapter->staInfo_lock );
- if (bApActive == FALSE)
+ // Start AP inactivity timer if no stations associated with it
+ if ((0 != (WLAN_HDD_GET_CTX(pHostapdAdapter))->cfg_ini->nAPAutoShutOff))
+ {
+ if (pHddApCtx->bApActive == FALSE)
{
if (pHddApCtx->hdd_ap_inactivity_timer.state == VOS_TIMER_STATE_STOPPED)
{
@@ -815,6 +822,10 @@ VOS_STATUS hdd_hostapd_SAPEventCB( tpSap_Event pSapEvent, v_PVOID_t usrDataForCa
VOS_ASSERT(vos_timer_getCurrentState(&pHddApCtx->hdd_ap_inactivity_timer) == VOS_TIMER_STATE_STOPPED);
}
}
+#ifdef FEATURE_WLAN_AUTO_SHUTDOWN
+ wlan_hdd_auto_shutdown_enable(pHddCtx, VOS_TRUE);
+#endif
+
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,38))
cfg80211_del_sta(dev,
(const u8 *)&pSapEvent->sapevt.sapStationDisassocCompleteEvent.staMac.bytes[0],
@@ -967,6 +978,9 @@ stopbss :
if (!VOS_IS_STATUS_SUCCESS(vos_status))
hddLog(LOGE, FL("Failed to Destroy AP inactivity timer"));
}
+#ifdef FEATURE_WLAN_AUTO_SHUTDOWN
+ wlan_hdd_auto_shutdown_enable(pHddCtx, VOS_TRUE);
+#endif
/* Stop the pkts from n/w stack as we are going to free all of
* the TX WMM queues for all STAID's */
@@ -1523,14 +1537,8 @@ static iw_softap_setparam(struct net_device *dev,
(int)WMI_VDEV_PARAM_ENABLE_RTSCTS,
set_value, VDEV_CMD);
if (!ret) {
- if (ccmCfgSetInt(hHal, WNI_CFG_RTS_THRESHOLD, (tANI_U32)value,
- ccmCfgSetCallback, eANI_BOOLEAN_TRUE) !=
- eHAL_STATUS_SUCCESS) {
-
- hddLog(LOGE, "FAILED TO SET RTSCTS at SAP");
- ret = -EIO;
- break;
- }
+ hddLog(LOGE, "FAILED TO SET RTSCTS at SAP");
+ ret = -EIO;
}
break;
}
diff --git a/CORE/HDD/src/wlan_hdd_main.c b/CORE/HDD/src/wlan_hdd_main.c
index c9c633714fdc..70e3c6fe7150 100644
--- a/CORE/HDD/src/wlan_hdd_main.c
+++ b/CORE/HDD/src/wlan_hdd_main.c
@@ -90,7 +90,7 @@ int wlan_hdd_ftm_start(hdd_context_t *pAdapter);
#include <linux/semaphore.h>
#include <linux/ctype.h>
#ifdef MSM_PLATFORM
-#include <mach/subsystem_restart.h>
+#include <soc/qcom/subsystem_restart.h>
#endif
#include <wlan_hdd_hostapd.h>
#include <wlan_hdd_softap_tx_rx.h>
@@ -249,7 +249,9 @@ extern int hdd_ftm_start(hdd_context_t *pHddCtx);
extern int hdd_ftm_stop(hdd_context_t *pHddCtx);
#endif
#endif
-
+#ifdef FEATURE_WLAN_AUTO_SHUTDOWN
+v_VOID_t wlan_hdd_auto_shutdown_cb(v_PVOID_t data);
+#endif
#if defined(FEATURE_WLAN_CCX) && defined(FEATURE_WLAN_CCX_UPLOAD)
VOS_STATUS hdd_parse_get_cckm_ie(tANI_U8 *pValue,
@@ -8585,7 +8587,13 @@ void hdd_wlan_exit(hdd_context_t *pHddCtx)
#ifdef IPA_OFFLOAD
hdd_ipa_cleanup(pHddCtx);
#endif
-
+#ifdef FEATURE_WLAN_AUTO_SHUTDOWN
+ if (pHddCtx->cfg_ini->WlanAutoShutdown != 0) {
+ vosStatus = vos_timer_destroy(&pHddCtx->hdd_wlan_shutdown_timer);
+ if (!VOS_IS_STATUS_SUCCESS(vosStatus))
+ hddLog(LOGE, FL("Failed to Destroy wlan auto shutdown timer"));
+ }
+#endif
//Free up dynamically allocated members inside HDD Adapter
kfree(pHddCtx->cfg_ini);
pHddCtx->cfg_ini= NULL;
@@ -9345,7 +9353,7 @@ int hdd_wlan_startup(struct device *dev, v_VOID_t *hif_sc)
if (status != VOS_STATUS_SUCCESS) {
hddLog(VOS_TRACE_LEVEL_FATAL,
"%s: Failed to init channel list", __func__);
- goto err_vosclose;
+ goto err_wiphy_unregister;
}
if (0 == enable_dfs_chan_scan || 1 == enable_dfs_chan_scan)
@@ -9369,7 +9377,7 @@ int hdd_wlan_startup(struct device *dev, v_VOID_t *hif_sc)
if ( VOS_STATUS_SUCCESS != status )
{
hddLog(VOS_TRACE_LEVEL_FATAL, "%s: Failed hdd_set_sme_config", __func__);
- goto err_vosclose;
+ goto err_wiphy_unregister;
}
//Initialize the WMM module
@@ -9377,7 +9385,7 @@ int hdd_wlan_startup(struct device *dev, v_VOID_t *hif_sc)
if (!VOS_IS_STATUS_SUCCESS(status))
{
hddLog(VOS_TRACE_LEVEL_FATAL, "%s: hdd_wmm_init failed", __func__);
- goto err_vosclose;
+ goto err_wiphy_unregister;
}
/* In the integrated architecture we update the configuration from
@@ -9388,7 +9396,7 @@ int hdd_wlan_startup(struct device *dev, v_VOID_t *hif_sc)
if (FALSE == hdd_update_config_dat(pHddCtx))
{
hddLog(VOS_TRACE_LEVEL_FATAL,"%s: config update failed",__func__ );
- goto err_vosclose;
+ goto err_wiphy_unregister;
}
// Apply the NV to cfg.dat
@@ -9469,7 +9477,7 @@ int hdd_wlan_startup(struct device *dev, v_VOID_t *hif_sc)
{
hddLog(VOS_TRACE_LEVEL_ERROR,"%s: Failed to set MAC Address. "
"HALStatus is %08d [x%08x]",__func__, halStatus, halStatus );
- goto err_vosclose;
+ goto err_wiphy_unregister;
}
}
@@ -9478,7 +9486,7 @@ int hdd_wlan_startup(struct device *dev, v_VOID_t *hif_sc)
if ( !VOS_IS_STATUS_SUCCESS( status ) )
{
hddLog(VOS_TRACE_LEVEL_FATAL,"%s: vos_start failed",__func__);
- goto err_vosclose;
+ goto err_wiphy_unregister;
}
#ifdef FEATURE_WLAN_CH_AVOID
@@ -9834,6 +9842,16 @@ int hdd_wlan_startup(struct device *dev, v_VOID_t *hif_sc)
goto err_nl_srv;
#endif
+#ifdef FEATURE_WLAN_AUTO_SHUTDOWN
+ if (pHddCtx->cfg_ini->WlanAutoShutdown != 0) {
+ status = vos_timer_init( &pHddCtx->hdd_wlan_shutdown_timer,
+ VOS_TIMER_TYPE_SW, wlan_hdd_auto_shutdown_cb,
+ NULL);
+ if (!VOS_IS_STATUS_SUCCESS(status))
+ hddLog(LOGE, FL("Failed to init wlan auto shutdown timer\n"));
+ }
+#endif
+
#ifndef QCA_WIFI_ISOC
/* Thermal Mitigation */
thermalParam.smeThermalMgmtEnabled =
@@ -9924,6 +9942,11 @@ err_close_adapter:
err_vosstop:
vos_stop(pVosContext);
+err_wiphy_unregister:
+#ifdef CONFIG_ENABLE_LINUX_REG
+ wiphy_unregister(wiphy);
+#endif
+
err_vosclose:
status = vos_sched_close( pVosContext );
if (!VOS_IS_STATUS_SUCCESS(status)) {
@@ -9933,12 +9956,10 @@ err_vosclose:
}
vos_close(pVosContext );
-#ifdef CONFIG_ENABLE_LINUX_REG
- wiphy_unregister(wiphy);
-
err_vos_nv_close:
- vos_nv_close();
+#ifdef CONFIG_ENABLE_LINUX_REG
+ vos_nv_close();
err_clkvote:
#endif
@@ -11031,6 +11052,13 @@ void wlan_hdd_send_svc_nlink_msg(int type)
nlh->nlmsg_len = NLMSG_LENGTH((sizeof(tAniMsgHdr)));
skb_put(skb, NLMSG_SPACE(sizeof(tAniMsgHdr)));
break;
+#ifdef FEATURE_WLAN_AUTO_SHUTDOWN
+ case WLAN_SVC_WLAN_AUTO_SHUTDOWN_IND:
+ ani_hdr->length = 0;
+ nlh->nlmsg_len = NLMSG_LENGTH((sizeof(tAniMsgHdr)));
+ skb_put(skb, NLMSG_SPACE(sizeof(tAniMsgHdr)));
+ break;
+#endif
default:
VOS_TRACE(VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_ERROR,
"WLAN SVC: Attempt to send unknown nlink message %d\n", type);
@@ -11042,6 +11070,73 @@ void wlan_hdd_send_svc_nlink_msg(int type)
return;
}
+#ifdef FEATURE_WLAN_AUTO_SHUTDOWN
+v_VOID_t wlan_hdd_auto_shutdown_cb(v_PVOID_t data)
+{
+ hddLog(LOGE, FL("%s: Wlan Idle. Sending Shutdown event.."),__func__);
+ wlan_hdd_send_svc_nlink_msg(WLAN_SVC_WLAN_AUTO_SHUTDOWN_IND);
+}
+
+void wlan_hdd_auto_shutdown_enable(hdd_context_t *hdd_ctx, v_BOOL_t enable)
+{
+ VOS_STATUS vos_status = VOS_STATUS_SUCCESS;
+ hdd_adapter_list_node_t *pAdapterNode = NULL, *pNext = NULL;
+ VOS_STATUS status;
+ hdd_adapter_t *pAdapter;
+ v_BOOL_t ap_connected = VOS_FALSE, sta_connected = VOS_FALSE;
+
+ if (hdd_ctx->cfg_ini->WlanAutoShutdown == 0)
+ return;
+
+ if (enable == VOS_FALSE) {
+ if (hdd_ctx->hdd_wlan_shutdown_timer.state == VOS_TIMER_STATE_RUNNING) {
+ vos_status = vos_timer_stop(&hdd_ctx->hdd_wlan_shutdown_timer);
+ if (!VOS_IS_STATUS_SUCCESS(vos_status))
+ hddLog(LOGE, FL("Failed to stop wlan auto shutdown timer"));
+ }
+ return;
+ }
+
+ /* To enable shutdown timer check conncurrency */
+ if (vos_concurrent_sessions_running()) {
+ status = hdd_get_front_adapter ( hdd_ctx, &pAdapterNode );
+
+ while ( NULL != pAdapterNode && VOS_STATUS_SUCCESS == status ) {
+ pAdapter = pAdapterNode->pAdapter;
+ if (pAdapter && pAdapter->device_mode == WLAN_HDD_INFRA_STATION) {
+ if (WLAN_HDD_GET_STATION_CTX_PTR(pAdapter)->conn_info.connState
+ == eConnectionState_Associated) {
+ sta_connected = VOS_TRUE;
+ break;
+ }
+ }
+ if (pAdapter && pAdapter->device_mode == WLAN_HDD_SOFTAP) {
+ if(WLAN_HDD_GET_AP_CTX_PTR(pAdapter)->bApActive == VOS_TRUE) {
+ ap_connected = VOS_TRUE;
+ break;
+ }
+ }
+ status = hdd_get_next_adapter ( hdd_ctx, pAdapterNode, &pNext );
+ pAdapterNode = pNext;
+ }
+ }
+
+ if (ap_connected == VOS_TRUE || sta_connected == VOS_TRUE) {
+ hddLog(LOGE, FL("CC Session active. Shutdown timer not enabled"));
+ return;
+ } else {
+ if (hdd_ctx->hdd_wlan_shutdown_timer.state == VOS_TIMER_STATE_STOPPED) {
+ vos_status = vos_timer_start( &hdd_ctx->hdd_wlan_shutdown_timer,
+ hdd_ctx->cfg_ini->WlanAutoShutdown * 1000);
+
+ if (!VOS_IS_STATUS_SUCCESS(vos_status))
+ hddLog(LOGE, FL("Failed to start wlan auto shutdown timer"));
+ }
+
+ }
+}
+#endif
+
//Register the module init/exit functions
module_init(hdd_module_init);
module_exit(hdd_module_exit);
diff --git a/CORE/MAC/inc/qwlan_version.h b/CORE/MAC/inc/qwlan_version.h
index e5d4639de19e..f73adec99d6e 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 55
+#define QWLAN_VERSION_BUILD 56
-#define QWLAN_VERSIONSTR "1.0.0.55"
+#define QWLAN_VERSIONSTR "1.0.0.56"
#ifdef QCA_WIFI_2_0
diff --git a/CORE/MAC/inc/sirApi.h b/CORE/MAC/inc/sirApi.h
index 9f0df6aa94f0..a7860b14deb2 100644
--- a/CORE/MAC/inc/sirApi.h
+++ b/CORE/MAC/inc/sirApi.h
@@ -3848,6 +3848,9 @@ typedef struct sSirRoamOffloadScanReq
tSirRoamNetworkType ConnectedNetwork;
tSirMobilityDomainInfo MDID;
tANI_U8 sessionId;
+ tANI_U8 RoamBmissFirstBcnt;
+ tANI_U8 RoamBmissFinalBcnt;
+ tANI_U8 RoamBeaconRssiWeight;
} tSirRoamOffloadScanReq, *tpSirRoamOffloadScanReq;
#endif //WLAN_FEATURE_ROAM_SCAN_OFFLOAD
diff --git a/CORE/MAC/src/include/sirParams.h b/CORE/MAC/src/include/sirParams.h
index 70e693e85b8a..cfea61d3d6ba 100644
--- a/CORE/MAC/src/include/sirParams.h
+++ b/CORE/MAC/src/include/sirParams.h
@@ -144,6 +144,13 @@ typedef struct sSirMsgQ
*/
void *bodyptr;
tANI_U32 bodyval;
+
+ /*
+ * Some messages provide a callback function. The function signature
+ * must be agreed upon between the two entities exchanging the message
+ */
+ void *callback;
+
} tSirMsgQ, *tpSirMsgQ;
/// Mailbox Message Structure Define
@@ -650,6 +657,7 @@ typedef struct sSirMbMsgP2p
#define SIR_HAL_SET_TX_POWER_LIMIT (SIR_HAL_ITC_MSG_TYPES_BEGIN + 251)
#define SIR_HAL_SET_SAP_INTRABSS_DIS (SIR_HAL_ITC_MSG_TYPES_BEGIN + 252)
+#define SIR_HAL_FW_STATS_IND (SIR_HAL_ITC_MSG_TYPES_BEGIN + 253)
#define SIR_HAL_MSG_TYPES_END (SIR_HAL_MSG_TYPES_BEGIN + 0x1FF)
diff --git a/CORE/SAP/inc/sapApi.h b/CORE/SAP/inc/sapApi.h
index fd25cd690c48..0f7c398682a7 100644
--- a/CORE/SAP/inc/sapApi.h
+++ b/CORE/SAP/inc/sapApi.h
@@ -105,6 +105,7 @@ when who what, where, why
#define MAX_NAME_SIZE 64
#define MAX_TEXT_SIZE 32
+#define MAX_CHANNEL_LIST_LEN 256
/*--------------------------------------------------------------------------
reasonCode take form 802.11 standard Table 7-22 to be passed to WLANSAP_DisassocSta api.
@@ -454,6 +455,7 @@ typedef struct sap_Config {
v_U8_t disableDFSChSwitch;
eCsrBand scanBandPreference;
v_BOOL_t enOverLapCh;
+ char acsAllowedChnls[MAX_CHANNEL_LIST_LEN];
} tsap_Config_t;
typedef enum {
diff --git a/CORE/SAP/src/sapModule.c b/CORE/SAP/src/sapModule.c
index d94526986848..440ec1485146 100644
--- a/CORE/SAP/src/sapModule.c
+++ b/CORE/SAP/src/sapModule.c
@@ -573,6 +573,7 @@ WLANSAP_StartBss
ptSapContext pSapCtx = NULL;
tANI_BOOLEAN restartNeeded;
tHalHandle hHal;
+ int ret;
/*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -*/
@@ -600,6 +601,15 @@ WLANSAP_StartBss
pSapCtx->pUsrContext = pUsrContext;
pSapCtx->enableOverLapCh = pConfig->enOverLapCh;
+ if (strlen(pConfig->acsAllowedChnls) > 0)
+ {
+ ret = sapSetPreferredChannel(pConfig->acsAllowedChnls);
+ if (0 != ret)
+ {
+ VOS_TRACE( VOS_MODULE_ID_SAP, VOS_TRACE_LEVEL_INFO_HIGH,
+ "%s: ACS set preferred channel failed!", __func__);
+ }
+ }
//Set the BSSID to your "self MAC Addr" read the mac address from Configuation ITEM received from HDD
pSapCtx->csrRoamProfile.BSSIDs.numOfBSSIDs = 1;
diff --git a/CORE/SERVICES/COMMON/adf/adf_nbuf.c b/CORE/SERVICES/COMMON/adf/adf_nbuf.c
index 3a38d3c03f94..5dae20e3ca4a 100644
--- a/CORE/SERVICES/COMMON/adf/adf_nbuf.c
+++ b/CORE/SERVICES/COMMON/adf/adf_nbuf.c
@@ -388,9 +388,8 @@ __adf_nbuf_reg_trace_cb(adf_nbuf_trace_update_t cb_func_ptr)
#ifdef QCA_PKT_PROTO_TRACE
void
-__adf_nbuf_trace_update(adf_nbuf_t buf, char *event_string)
+__adf_nbuf_trace_update(struct sk_buff *buf, char *event_string)
{
-
char string_buf[NBUF_PKT_TRAC_MAX_STRING];
if ((!trace_update_cb) || (!event_string)) {
@@ -402,7 +401,7 @@ __adf_nbuf_trace_update(adf_nbuf_t buf, char *event_string)
}
/* Buffer over flow */
- if (NBUF_PKT_TRAC_MAX_STRING <
+ if (NBUF_PKT_TRAC_MAX_STRING <=
(adf_os_str_len(event_string) + NBUF_PKT_TRAC_PROTO_STRING)) {
return;
}
diff --git a/CORE/SERVICES/COMMON/adf/adf_nbuf.h b/CORE/SERVICES/COMMON/adf/adf_nbuf.h
index c4203fec85c2..8afc5b88e2e2 100644
--- a/CORE/SERVICES/COMMON/adf/adf_nbuf.h
+++ b/CORE/SERVICES/COMMON/adf/adf_nbuf.h
@@ -1104,4 +1104,5 @@ adf_nbuf_trace_update(adf_nbuf_t buf, char *event_string)
{
__adf_nbuf_trace_update(buf, event_string);
}
+
#endif
diff --git a/CORE/SERVICES/COMMON/adf/linux/adf_nbuf_pvt.h b/CORE/SERVICES/COMMON/adf/linux/adf_nbuf_pvt.h
index 5d684e4fd2f0..095f4a8d1504 100644
--- a/CORE/SERVICES/COMMON/adf/linux/adf_nbuf_pvt.h
+++ b/CORE/SERVICES/COMMON/adf/linux/adf_nbuf_pvt.h
@@ -250,8 +250,13 @@ void __adf_nbuf_dmamap_info(__adf_os_dma_map_t bmap, adf_os_dmamap_in
void __adf_nbuf_frag_info(struct sk_buff *skb, adf_os_sglist_t *sg);
void __adf_nbuf_dmamap_set_cb(__adf_os_dma_map_t dmap, void *cb, void *arg);
void __adf_nbuf_reg_trace_cb(adf_nbuf_trace_update_t cb_func_ptr);
-void __adf_nbuf_trace_update(struct sk_buff *skb, char *event_string);
+#ifdef QCA_PKT_PROTO_TRACE
+void
+__adf_nbuf_trace_update(struct sk_buff *buf, char *event_string);
+#else
+#define __adf_nbuf_trace_update(skb, event_string)
+#endif /* QCA_PKT_PROTO_TRACE */
static inline a_status_t
__adf_os_to_status(signed int error)
diff --git a/CORE/SERVICES/WMA/wma.c b/CORE/SERVICES/WMA/wma.c
index 4a1cf8529033..e22fcfd03376 100644
--- a/CORE/SERVICES/WMA/wma.c
+++ b/CORE/SERVICES/WMA/wma.c
@@ -1160,23 +1160,61 @@ static void wma_update_peer_stats(tp_wma_handle wma, wmi_peer_stats *peer_stats)
}
static int wma_stats_event_handler(void *handle, u_int8_t *cmd_param_info,
- u_int32_t len)
+ u_int32_t len)
{
- tp_wma_handle wma = (tp_wma_handle)handle;
+ WMI_UPDATE_STATS_EVENTID_param_tlvs *param_buf;
wmi_stats_event_fixed_param *event;
+ vos_msg_t vos_msg = {0};
+ u_int32_t buf_size;
+ u_int8_t *buf;
+
+ param_buf = (WMI_UPDATE_STATS_EVENTID_param_tlvs *)cmd_param_info;
+ if (!param_buf) {
+ WMA_LOGA("%s: Invalid stats event", __func__);
+ return -1;
+ }
+ event = param_buf->fixed_param;
+ buf_size = sizeof(*event) +
+ (event->num_pdev_stats * sizeof(wmi_pdev_stats)) +
+ (event->num_vdev_stats * sizeof(wmi_vdev_stats)) +
+ (event->num_peer_stats * sizeof(wmi_peer_stats));
+ buf = vos_mem_malloc(buf_size);
+ if (!buf) {
+ WMA_LOGE("%s: Failed alloc memory for buf", __func__);
+ return -1;
+ }
+ vos_mem_zero(buf, buf_size);
+ vos_mem_copy(buf, event, sizeof(*event));
+ vos_mem_copy(buf + sizeof(*event), (u_int8_t *)param_buf->data,
+ (buf_size - sizeof(*event)));
+ vos_msg.type = WDA_FW_STATS_IND;
+ vos_msg.bodyptr = buf;
+ vos_msg.bodyval = 0;
+
+ if (VOS_STATUS_SUCCESS !=
+ vos_mq_post_message(VOS_MQ_ID_WDA, &vos_msg)) {
+ WMA_LOGP("%s: Failed to post WDA_FW_STATS_IND msg", __func__);
+ vos_mem_free(buf);
+ return -1;
+ }
+ WMA_LOGD("WDA_FW_STATS_IND posted");
+ return 0;
+}
+
+static void wma_fw_stats_ind(tp_wma_handle wma, u_int8_t *buf)
+{
+ wmi_stats_event_fixed_param *event = (wmi_stats_event_fixed_param *)buf;
wmi_pdev_stats *pdev_stats;
wmi_vdev_stats *vdev_stats;
wmi_peer_stats *peer_stats;
- WMI_UPDATE_STATS_EVENTID_param_tlvs *param_buf;
u_int8_t i, *temp;
WMA_LOGI("%s: Enter", __func__);
- param_buf = (WMI_UPDATE_STATS_EVENTID_param_tlvs *)cmd_param_info;
- if (!param_buf)
- return -1;
- event = param_buf->fixed_param;
- temp = (A_UINT8 *)param_buf->data;
+ temp = buf + sizeof(*event);
+ WMA_LOGD("%s: num_stats: pdev: %u vdev: %u peer %u",
+ __func__, event->num_pdev_stats, event->num_vdev_stats,
+ event->num_peer_stats);
if (event->num_pdev_stats > 0) {
for (i = 0; i < event->num_pdev_stats; i++) {
pdev_stats = (wmi_pdev_stats*)temp;
@@ -1202,7 +1240,6 @@ static int wma_stats_event_handler(void *handle, u_int8_t *cmd_param_info,
}
WMA_LOGI("%s: Exit", __func__);
- return 0;
}
#ifndef QCA_WIFI_ISOC
@@ -3704,7 +3741,8 @@ static ol_txrx_vdev_handle wma_vdev_attach(tp_wma_handle wma_handle,
wma_handle->roam_offload_vdev_id = (A_UINT32) self_sta_req->sessionId;
wma_handle->roam_offload_enabled = TRUE;
wmi_unified_vdev_set_param_send(wma_handle->wmi_handle, wma_handle->roam_offload_vdev_id,
- WMI_VDEV_PARAM_ROAM_FW_OFFLOAD, 1);
+ WMI_VDEV_PARAM_ROAM_FW_OFFLOAD,
+ (WMI_ROAM_FW_OFFLOAD_ENABLE_FLAG|WMI_ROAM_BMISS_FINAL_SCAN_ENABLE_FLAG));
}
if (wlan_cfgGetInt(mac, WNI_CFG_ENABLE_MCC_ADAPTIVE_SCHED,
@@ -4905,6 +4943,32 @@ error:
return vos_status;
}
+VOS_STATUS wma_roam_scan_bmiss_cnt(tp_wma_handle wma_handle,
+ A_INT32 first_bcnt, A_UINT32 final_bcnt)
+{
+ int status = 0;
+
+ WMA_LOGI("%s: first_bcnt=%d, final_bcnt=%d", __func__, first_bcnt, final_bcnt);
+
+ status = wmi_unified_vdev_set_param_send(wma_handle->wmi_handle, wma_handle->roam_offload_vdev_id,
+ WMI_VDEV_PARAM_BMISS_FIRST_BCNT, first_bcnt);
+ if (status != EOK) {
+ WMA_LOGE("wmi_unified_vdev_set_param_send WMI_VDEV_PARAM_BMISS_FIRST_BCNT returned Error %d",
+ status);
+ return VOS_STATUS_E_FAILURE;
+ }
+
+ status = wmi_unified_vdev_set_param_send(wma_handle->wmi_handle, wma_handle->roam_offload_vdev_id,
+ WMI_VDEV_PARAM_BMISS_FINAL_BCNT, final_bcnt);
+ if (status != EOK) {
+ WMA_LOGE("wmi_unified_vdev_set_param_send WMI_VDEV_PARAM_BMISS_FINAL_BCNT returned Error %d",
+ status);
+ return VOS_STATUS_E_FAILURE;
+ }
+
+ return VOS_STATUS_SUCCESS;
+}
+
/* 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
@@ -4925,6 +4989,9 @@ VOS_STATUS wma_roam_scan_offload_init_connect(tp_wma_handle wma_handle)
/* first program the parameters to conservative values so that roaming scan won't be
* triggered before association completes
*/
+ vos_status = wma_roam_scan_bmiss_cnt(wma_handle,
+ WMA_ROAM_BMISS_FIRST_BCNT_DEFAULT, WMA_ROAM_BMISS_FINAL_BCNT_DEFAULT);
+
/* rssi_thresh = 10 is low enough */
vos_status = wma_roam_scan_offload_rssi_thresh(wma_handle, WMA_ROAM_LOW_RSSI_TRIGGER_VERYLOW,
pMac->roam.configParam.neighborRoamConfig.nOpportunisticThresholdDiff);
@@ -5005,6 +5072,12 @@ VOS_STATUS wma_process_roam_scan_req(tp_wma_handle wma_handle,
if (vos_status != VOS_STATUS_SUCCESS) {
break;
}
+ vos_status = wma_roam_scan_bmiss_cnt(wma_handle,
+ roam_req->RoamBmissFirstBcnt, roam_req->RoamBmissFinalBcnt);
+ if (vos_status != VOS_STATUS_SUCCESS) {
+ break;
+ }
+
/* Opportunistic scan runs on a timer, value set by EmptyRefreshScanPeriod.
* Age out the entries after 3 such cycles.
*/
@@ -5025,7 +5098,7 @@ VOS_STATUS wma_process_roam_scan_req(tp_wma_handle wma_handle,
*/
vos_status = wma_roam_scan_offload_rssi_change(wma_handle,
roam_req->RoamRescanRssiDiff,
- WMA_ROAM_BEACON_WEIGHT_DEFAULT);
+ roam_req->RoamBeaconRssiWeight);
if (vos_status != VOS_STATUS_SUCCESS) {
break;
}
@@ -5086,6 +5159,12 @@ VOS_STATUS wma_process_roam_scan_req(tp_wma_handle wma_handle,
break;
}
+ vos_status = wma_roam_scan_bmiss_cnt(wma_handle,
+ roam_req->RoamBmissFirstBcnt, roam_req->RoamBmissFinalBcnt);
+ if (vos_status != VOS_STATUS_SUCCESS) {
+ break;
+ }
+
/*
* Runtime (after association) changes to rssi thresholds and other parameters.
*/
@@ -5118,7 +5197,7 @@ VOS_STATUS wma_process_roam_scan_req(tp_wma_handle wma_handle,
vos_status = wma_roam_scan_offload_rssi_change(wma_handle,
roam_req->RoamRescanRssiDiff,
- WMA_ROAM_BEACON_WEIGHT_DEFAULT);
+ roam_req->RoamBeaconRssiWeight);
if (vos_status != VOS_STATUS_SUCCESS) {
break;
}
@@ -6046,10 +6125,15 @@ VOS_STATUS wma_roam_preauth_chan_set(tp_wma_handle wma_handle,
wma_handle->roam_preauth_chan_context = params;
wma_handle->roam_preauth_chanfreq = vos_chan_to_freq(params->channelNumber);
+ /* set the state in advance before calling wma_start_scan and be ready
+ * to handle scan events from firmware. Otherwise print statments
+ * in wma_start_can create a race condition.
+ */
+ wma_handle->roam_preauth_scan_state = WMA_ROAM_PREAUTH_CHAN_REQUESTED;
vos_status = wma_start_scan(wma_handle, &scan_req, WDA_CHNL_SWITCH_REQ);
- wma_handle->roam_preauth_scan_state = (vos_status == VOS_STATUS_SUCCESS) ?
- WMA_ROAM_PREAUTH_CHAN_REQUESTED : WMA_ROAM_PREAUTH_CHAN_NONE;
+ if (vos_status != VOS_STATUS_SUCCESS)
+ wma_handle->roam_preauth_scan_state = WMA_ROAM_PREAUTH_CHAN_NONE;
return vos_status;
}
@@ -15357,6 +15441,10 @@ VOS_STATUS wma_mc_process_msg(v_VOID_t *vos_context, vos_msg_t *msg)
wma_set_vdev_intrabss_fwd(wma_handle, (tDisableIntraBssFwd *)msg->bodyptr);
vos_mem_free(msg->bodyptr);
break;
+ case WDA_FW_STATS_IND:
+ wma_fw_stats_ind(wma_handle, msg->bodyptr);
+ vos_mem_free(msg->bodyptr);
+ break;
default:
WMA_LOGD("unknow msg type %x", msg->type);
/* Do Nothing? MSG Body should be freed at here */
@@ -15630,6 +15718,20 @@ static void wma_roam_better_ap_handler(tp_wma_handle wma, u_int32_t vdev_id)
ret = tlshim_mgmt_roam_event_ind(wma->vos_context, vdev_id);
}
+/* 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_bmiss_scan_ap_handler(tp_wma_handle wma, u_int32_t vdev_id)
+{
+ VOS_STATUS ret;
+ ret = tlshim_mgmt_roam_event_ind(wma->vos_context, vdev_id);
+}
+
/* function : wma_roam_event_callback
* Descriptin : Handler for all events from roam engine in firmware
* Args :
@@ -15655,7 +15757,7 @@ static int wma_roam_event_callback(WMA_HANDLE handle, u_int8_t *event_buf,
switch(wmi_event->reason) {
case WMI_ROAM_REASON_BMISS:
- WMA_LOGA("Beacon Miss for vdevid %x",
+ WMA_LOGD("Beacon Miss for vdevid %x",
wmi_event->vdev_id);
wma_beacon_miss_handler(wma_handle, wmi_event->vdev_id);
break;
@@ -15664,6 +15766,11 @@ static int wma_roam_event_callback(WMA_HANDLE handle, u_int8_t *event_buf,
wmi_event->vdev_id, wmi_event->rssi);
wma_roam_better_ap_handler(wma_handle, wmi_event->vdev_id);
break;
+ case WMI_ROAM_REASON_SUITABLE_AP:
+ WMA_LOGD("%s:Bmiss scan 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("%s:Unhandled Roam Event %x for vdevid %x", __func__,
wmi_event->reason, wmi_event->vdev_id);
diff --git a/CORE/SERVICES/WMA/wma.h b/CORE/SERVICES/WMA/wma.h
index 770c3e29fb0c..53ec297d94a9 100644
--- a/CORE/SERVICES/WMA/wma.h
+++ b/CORE/SERVICES/WMA/wma.h
@@ -144,7 +144,7 @@
* All rssi values are in dB except for WMA_NOISE_FLOOR_DBM_DEFAULT.
*/
-#define WMA_ROAM_SCAN_CHANNEL_SWITCH_TIME (2)
+#define WMA_ROAM_SCAN_CHANNEL_SWITCH_TIME (4)
#define WMA_NOISE_FLOOR_DBM_DEFAULT (-96)
#define WMA_ROAM_RSSI_DIFF_DEFAULT (5)
#define WMA_ROAM_DWELL_TIME_ACTIVE_DEFAULT (100)
@@ -157,6 +157,8 @@
#define WMA_ROAM_OPP_SCAN_PERIOD_DEFAULT (120000)
#define WMA_ROAM_OPP_SCAN_AGING_PERIOD_DEFAULT (WMA_ROAM_OPP_SCAN_PERIOD_DEFAULT * 5)
#define WMA_ROAM_PREAUTH_SCAN_TIME (50)
+#define WMA_ROAM_BMISS_FIRST_BCNT_DEFAULT (10)
+#define WMA_ROAM_BMISS_FINAL_BCNT_DEFAULT (10)
#define WMA_INVALID_KEY_IDX 0xff
#define WMA_DFS_RADAR_FOUND 1
diff --git a/CORE/SME/inc/csrApi.h b/CORE/SME/inc/csrApi.h
index 9644107b3c7b..41947da0221b 100644
--- a/CORE/SME/inc/csrApi.h
+++ b/CORE/SME/inc/csrApi.h
@@ -973,6 +973,9 @@ typedef struct tagCsrNeighborRoamConfigParams
tANI_U16 nEmptyScanRefreshPeriod;
tANI_U8 nOpportunisticThresholdDiff;
tANI_U8 nRoamRescanRssiDiff;
+ tANI_U8 nRoamBmissFirstBcnt;
+ tANI_U8 nRoamBmissFinalBcnt;
+ tANI_U8 nRoamBeaconRssiWeight;
}tCsrNeighborRoamConfigParams;
#endif
diff --git a/CORE/SME/inc/csrInternal.h b/CORE/SME/inc/csrInternal.h
index a9d23672894d..d2784584de32 100644
--- a/CORE/SME/inc/csrInternal.h
+++ b/CORE/SME/inc/csrInternal.h
@@ -514,6 +514,9 @@ typedef struct tagCsrNeighborRoamConfig
tANI_U16 nEmptyScanRefreshPeriod;
tANI_U8 nOpportunisticThresholdDiff;
tANI_U8 nRoamRescanRssiDiff;
+ tANI_U8 nRoamBmissFirstBcnt;
+ tANI_U8 nRoamBmissFinalBcnt;
+ tANI_U8 nRoamBeaconRssiWeight;
}tCsrNeighborRoamConfig;
#endif
diff --git a/CORE/SME/inc/csrNeighborRoam.h b/CORE/SME/inc/csrNeighborRoam.h
index 6d53331f84a6..2bb1f5ce1e8c 100644
--- a/CORE/SME/inc/csrNeighborRoam.h
+++ b/CORE/SME/inc/csrNeighborRoam.h
@@ -71,6 +71,9 @@ typedef struct sCsrNeighborRoamCfgParams
tANI_U16 emptyScanRefreshPeriod;
tANI_U8 nOpportunisticThresholdDiff;
tANI_U8 nRoamRescanRssiDiff;
+ tANI_U8 nRoamBmissFirstBcnt;
+ tANI_U8 nRoamBmissFinalBcnt;
+ tANI_U8 nRoamBeaconRssiWeight;
} tCsrNeighborRoamCfgParams, *tpCsrNeighborRoamCfgParams;
#define CSR_NEIGHBOR_ROAM_INVALID_CHANNEL_INDEX 255
@@ -205,6 +208,9 @@ typedef struct sCsrNeighborRoamControlInfo
#endif
tSmeFastRoamTrigger cfgRoamEn;
tSirMacAddr cfgRoambssId;
+ tANI_U8 currentRoamBmissFirstBcnt;
+ tANI_U8 currentRoamBmissFinalBcnt;
+ tANI_U8 currentRoamBeaconRssiWeight;
} tCsrNeighborRoamControlInfo, *tpCsrNeighborRoamControlInfo;
@@ -236,6 +242,15 @@ csrNeighborRoamSetOpportunisticScanThresholdDiff(tpAniSirGlobal pMac,
VOS_STATUS
csrNeighborRoamSetRoamRescanRssiDiff(tpAniSirGlobal pMac,
v_U8_t nRoamRescanRssiDiff);
+VOS_STATUS
+csrNeighborRoamSetRoamBmissFirstBcnt(tpAniSirGlobal pMac,
+ v_U8_t nRoamBmissFirstBcnt);
+VOS_STATUS
+csrNeighborRoamSetRoamBmissFinalBcnt(tpAniSirGlobal pMac,
+ v_U8_t nRoamBmissFinalBcnt);
+VOS_STATUS
+csrNeighborRoamSetRoamBeaconRssiWeight(tpAniSirGlobal pMac,
+ v_U8_t nRoamBeaconRssiWeight);
VOS_STATUS csrNeighborRoamUpdateFastRoamingEnabled(tpAniSirGlobal pMac, const v_BOOL_t fastRoamEnabled);
VOS_STATUS csrNeighborRoamUpdateCcxModeEnabled(tpAniSirGlobal pMac, const v_BOOL_t ccxMode);
VOS_STATUS csrNeighborRoamChannelsFilterByCurrentBand(
@@ -280,6 +295,9 @@ VOS_STATUS csrNeighborRoamMergeChannelLists(tpAniSirGlobal pMac,
#define REASON_SCAN_HOME_TIME_CHANGED 17
#define REASON_OPPORTUNISTIC_THRESH_DIFF_CHANGED 18
#define REASON_ROAM_RESCAN_RSSI_DIFF_CHANGED 19
+#define REASON_ROAM_BMISS_FIRST_BCNT_CHANGED 20
+#define REASON_ROAM_BMISS_FINAL_BCNT_CHANGED 21
+#define REASON_ROAM_BEACON_RSSI_WEIGHT_CHANGED 22
eHalStatus csrRoamOffloadScan(tpAniSirGlobal pMac, tANI_U8 command, tANI_U8 reason);
eHalStatus csrNeighborRoamCandidateFoundIndHdlr(tpAniSirGlobal pMac, void* pMsg);
eHalStatus csrNeighborRoamHandoffReqHdlr(tpAniSirGlobal pMac, void* pMsg);
diff --git a/CORE/SME/inc/sme_Api.h b/CORE/SME/inc/sme_Api.h
index d82b056271c9..b518293c17ff 100644
--- a/CORE/SME/inc/sme_Api.h
+++ b/CORE/SME/inc/sme_Api.h
@@ -2908,6 +2908,80 @@ eHalStatus sme_setNeighborScanPeriod(tHalHandle hHal, const v_U16_t nNeighborSca
-------------------------------------------------------------------------*/
v_U16_t sme_getNeighborScanPeriod(tHalHandle hHal);
+/* ---------------------------------------------------------------------------
+ \fn sme_SetRoamBmissFirstBcnt
+ \brief Update Roam count for first beacon miss
+ This function is called through dynamic setConfig callback function
+ to configure nRoamBmissFirstBcnt
+ \param hHal - HAL handle for device
+ \param nRoamBmissFirstBcnt - Roam first bmiss count
+ \return eHAL_STATUS_SUCCESS - SME update nRoamBmissFirstBcnt
+ successfully.
+ else SME is failed to update nRoamBmissFirstBcnt
+ -------------------------------------------------------------------------*/
+
+eHalStatus sme_SetRoamBmissFirstBcnt(tHalHandle hHal,
+ const v_U8_t nRoamBmissFirstBcnt);
+
+/*--------------------------------------------------------------------------
+ \fn sme_GetRoamBmissFirstBcnt
+ \brief gets Roam count for first beacon miss
+ This is a synchronous call
+ \param hHal - The handle returned by macOpen
+ \return v_U8_t - nRoamBmissFirstBcnt
+ \sa
+ --------------------------------------------------------------------------*/
+v_U8_t sme_GetRoamBmissFirstBcnt(tHalHandle hHal);
+
+/* ---------------------------------------------------------------------------
+ \fn sme_SetRoamBmissFinalBcnt
+ \brief Update Roam count for final beacon miss
+ This function is called through dynamic setConfig callback function
+ to configure nRoamBmissFinalBcnt
+ \param hHal - HAL handle for device
+ \param nRoamBmissFinalBcnt - Roam final bmiss count
+ \return eHAL_STATUS_SUCCESS - SME update nRoamBmissFinalBcnt
+ successfully.
+ else SME is failed to update nRoamBmissFinalBcnt
+ -------------------------------------------------------------------------*/
+
+eHalStatus sme_SetRoamBmissFinalBcnt(tHalHandle hHal,
+ const v_U8_t nRoamBmissFinalBcnt);
+
+/*--------------------------------------------------------------------------
+ \fn sme_GetRoamBmissFinalBcnt
+ \brief gets Roam count for final beacon miss
+ This is a synchronous call
+ \param hHal - The handle returned by macOpen
+ \return v_U8_t - nRoamBmissFinalBcnt
+ \sa
+ --------------------------------------------------------------------------*/
+v_U8_t sme_GetRoamBmissFinalBcnt(tHalHandle hHal);
+
+/* ---------------------------------------------------------------------------
+ \fn sme_SetRoamBeaconRssiWeight
+ \brief Update Roam beacon rssi weight
+ This function is called through dynamic setConfig callback function
+ to configure nRoamBeaconRssiWeight
+ \param hHal - HAL handle for device
+ \param nRoamBeaconRssiWeight - Roam beacon rssi weight
+ \return eHAL_STATUS_SUCCESS - SME update nRoamBeaconRssiWeight config
+ successfully.
+ else SME is failed to update nRoamBeaconRssiWeight
+ -------------------------------------------------------------------------*/
+
+eHalStatus sme_SetRoamBeaconRssiWeight(tHalHandle hHal,
+ const v_U8_t nRoamBeaconRssiWeight);
+
+/*--------------------------------------------------------------------------
+ \fn sme_GetRoamBeaconRssiWeight
+ \brief gets Roam beacon rssi weight
+ This is a synchronous call
+ \param hHal - The handle returned by macOpen
+ \return v_U8_t - nRoamBeaconRssiWeight
+ \sa
+ --------------------------------------------------------------------------*/
+v_U8_t sme_GetRoamBeaconRssiWeight(tHalHandle hHal);
#endif
#if defined (WLAN_FEATURE_VOWIFI_11R) || defined (FEATURE_WLAN_CCX) || defined(FEATURE_WLAN_LFR)
diff --git a/CORE/SME/src/csr/csrApiRoam.c b/CORE/SME/src/csr/csrApiRoam.c
index ecf1968b3644..896ff1cc080a 100644
--- a/CORE/SME/src/csr/csrApiRoam.c
+++ b/CORE/SME/src/csr/csrApiRoam.c
@@ -1099,6 +1099,9 @@ static void initConfigParam(tpAniSirGlobal pMac)
pMac->roam.configParam.neighborRoamConfig.neighborScanChanList.channelList[2] = 11;
pMac->roam.configParam.neighborRoamConfig.nNeighborResultsRefreshPeriod = 20000; //20 seconds
pMac->roam.configParam.neighborRoamConfig.nEmptyScanRefreshPeriod = 0;
+ pMac->roam.configParam.neighborRoamConfig.nRoamBmissFirstBcnt = 10;
+ pMac->roam.configParam.neighborRoamConfig.nRoamBmissFinalBcnt = 10;
+ pMac->roam.configParam.neighborRoamConfig.nRoamBeaconRssiWeight = 14;
#endif
#ifdef WLAN_FEATURE_11AC
pMac->roam.configParam.nVhtChannelWidth = WNI_CFG_VHT_CHANNEL_WIDTH_80MHZ + 1;
@@ -1779,6 +1782,9 @@ eHalStatus csrChangeDefaultConfigParam(tpAniSirGlobal pMac, tCsrConfigParam *pPa
smsLog( pMac, LOG1, "%d ", pMac->roam.configParam.neighborRoamConfig.neighborScanChanList.channelList[i] );
}
}
+ smsLog( pMac, LOG1, "nRoamBmissFirstBcnt = %d", pMac->roam.configParam.neighborRoamConfig.nRoamBmissFirstBcnt);
+ smsLog( pMac, LOG1, "nRoamBmissFinalBcnt = %d", pMac->roam.configParam.neighborRoamConfig.nRoamBmissFinalBcnt);
+ smsLog( pMac, LOG1, "nRoamBeaconRssiWeight = %d", pMac->roam.configParam.neighborRoamConfig.nRoamBeaconRssiWeight);
#endif
pMac->roam.configParam.addTSWhenACMIsOff = pParam->addTSWhenACMIsOff;
pMac->scan.fValidateList = pParam->fValidateList;
@@ -15855,6 +15861,12 @@ eHalStatus csrRoamOffloadScan(tpAniSirGlobal pMac, tANI_U8 command, tANI_U8 reas
pNeighborRoamInfo->cfgParams.maxChannelScanTime;
pRequestBuf->EmptyRefreshScanPeriod =
pNeighborRoamInfo->cfgParams.emptyScanRefreshPeriod;
+ pRequestBuf->RoamBmissFirstBcnt =
+ pNeighborRoamInfo->cfgParams.nRoamBmissFirstBcnt;
+ pRequestBuf->RoamBmissFinalBcnt =
+ pNeighborRoamInfo->cfgParams.nRoamBmissFinalBcnt;
+ pRequestBuf->RoamBeaconRssiWeight =
+ pNeighborRoamInfo->cfgParams.nRoamBeaconRssiWeight;
/* MAWC feature */
pRequestBuf->MAWCEnabled =
pMac->roam.configParam.MAWCEnabled;
diff --git a/CORE/SME/src/csr/csrNeighborRoam.c b/CORE/SME/src/csr/csrNeighborRoam.c
index 5c7abaef9025..5841e665f3f0 100644
--- a/CORE/SME/src/csr/csrNeighborRoam.c
+++ b/CORE/SME/src/csr/csrNeighborRoam.c
@@ -619,6 +619,164 @@ csrNeighborRoamSetRoamRescanRssiDiff(tpAniSirGlobal pMac,
return vosStatus;
}
+VOS_STATUS
+csrNeighborRoamSetRoamBmissFirstBcnt(tpAniSirGlobal pMac,
+ v_U8_t nRoamBmissFirstBcnt)
+{
+ VOS_STATUS vosStatus = VOS_STATUS_SUCCESS;
+
+ if (eCSR_NEIGHBOR_ROAM_STATE_CONNECTED
+ == pMac->roam.neighborRoamInfo.neighborRoamState)
+ {
+ NEIGHBOR_ROAM_DEBUG(pMac,
+ LOG2,
+ FL("Currently in CONNECTED state, so deregister"
+ " all and re-register for DOWN event again"));
+
+ pMac->roam.neighborRoamInfo.cfgParams.nRoamBmissFirstBcnt =
+ nRoamBmissFirstBcnt;
+ pMac->roam.neighborRoamInfo.currentRoamBmissFirstBcnt =
+ nRoamBmissFirstBcnt;
+
+ /* De-register existing lookup UP/DOWN, Rssi indications */
+#ifdef WLAN_FEATURE_ROAM_SCAN_OFFLOAD
+ if (pMac->roam.configParam.isRoamOffloadScanEnabled)
+ {
+ csrRoamOffloadScan(pMac,
+ ROAM_SCAN_OFFLOAD_UPDATE_CFG,
+ REASON_ROAM_BMISS_FIRST_BCNT_CHANGED);
+ }
+#endif
+ }
+ else if (eCSR_NEIGHBOR_ROAM_STATE_INIT
+ == pMac->roam.neighborRoamInfo.neighborRoamState)
+ {
+ NEIGHBOR_ROAM_DEBUG(pMac,
+ LOG2,
+ FL("Currently in INIT state, safe to set"
+ " roam rescan rssi diff"));
+ pMac->roam.neighborRoamInfo.cfgParams.nRoamBmissFirstBcnt =
+ nRoamBmissFirstBcnt;
+ pMac->roam.neighborRoamInfo.currentRoamBmissFirstBcnt =
+ nRoamBmissFirstBcnt;
+ }
+ else
+ {
+ NEIGHBOR_ROAM_DEBUG(pMac,
+ LOGE,
+ FL("Unexpected state %d"
+ " returning failure"),
+ pMac->roam.neighborRoamInfo.neighborRoamState);
+ vosStatus = VOS_STATUS_E_FAILURE;
+ }
+ return vosStatus;
+}
+
+VOS_STATUS
+csrNeighborRoamSetRoamBmissFinalBcnt(tpAniSirGlobal pMac,
+ v_U8_t nRoamBmissFinalBcnt)
+{
+ VOS_STATUS vosStatus = VOS_STATUS_SUCCESS;
+
+ if (eCSR_NEIGHBOR_ROAM_STATE_CONNECTED
+ == pMac->roam.neighborRoamInfo.neighborRoamState)
+ {
+ NEIGHBOR_ROAM_DEBUG(pMac,
+ LOG2,
+ FL("Currently in CONNECTED state, so deregister"
+ " all and re-register for DOWN event again"));
+
+ pMac->roam.neighborRoamInfo.cfgParams.nRoamBmissFinalBcnt =
+ nRoamBmissFinalBcnt;
+ pMac->roam.neighborRoamInfo.currentRoamBmissFinalBcnt =
+ nRoamBmissFinalBcnt;
+
+ /* De-register existing lookup UP/DOWN, Rssi indications */
+#ifdef WLAN_FEATURE_ROAM_SCAN_OFFLOAD
+ if (pMac->roam.configParam.isRoamOffloadScanEnabled)
+ {
+ csrRoamOffloadScan(pMac,
+ ROAM_SCAN_OFFLOAD_UPDATE_CFG,
+ REASON_ROAM_BMISS_FINAL_BCNT_CHANGED);
+ }
+#endif
+ }
+ else if (eCSR_NEIGHBOR_ROAM_STATE_INIT
+ == pMac->roam.neighborRoamInfo.neighborRoamState)
+ {
+ NEIGHBOR_ROAM_DEBUG(pMac,
+ LOG2,
+ FL("Currently in INIT state, safe to set"
+ " roam rescan rssi diff"));
+ pMac->roam.neighborRoamInfo.cfgParams.nRoamBmissFinalBcnt =
+ nRoamBmissFinalBcnt;
+ pMac->roam.neighborRoamInfo.currentRoamBmissFinalBcnt =
+ nRoamBmissFinalBcnt;
+ }
+ else
+ {
+ NEIGHBOR_ROAM_DEBUG(pMac,
+ LOGE,
+ FL("Unexpected state %d"
+ " returning failure"),
+ pMac->roam.neighborRoamInfo.neighborRoamState);
+ vosStatus = VOS_STATUS_E_FAILURE;
+ }
+ return vosStatus;
+}
+
+VOS_STATUS
+csrNeighborRoamSetRoamBeaconRssiWeight(tpAniSirGlobal pMac,
+ v_U8_t nRoamBeaconRssiWeight)
+{
+ VOS_STATUS vosStatus = VOS_STATUS_SUCCESS;
+
+ if (eCSR_NEIGHBOR_ROAM_STATE_CONNECTED
+ == pMac->roam.neighborRoamInfo.neighborRoamState)
+ {
+ NEIGHBOR_ROAM_DEBUG(pMac,
+ LOG2,
+ FL("Currently in CONNECTED state, so deregister"
+ " all and re-register for DOWN event again"));
+
+ pMac->roam.neighborRoamInfo.cfgParams.nRoamBeaconRssiWeight =
+ nRoamBeaconRssiWeight;
+ pMac->roam.neighborRoamInfo.currentRoamBeaconRssiWeight =
+ nRoamBeaconRssiWeight;
+
+ /* De-register existing lookup UP/DOWN, Rssi indications */
+#ifdef WLAN_FEATURE_ROAM_SCAN_OFFLOAD
+ if (pMac->roam.configParam.isRoamOffloadScanEnabled)
+ {
+ csrRoamOffloadScan(pMac,
+ ROAM_SCAN_OFFLOAD_UPDATE_CFG,
+ REASON_ROAM_BEACON_RSSI_WEIGHT_CHANGED);
+ }
+#endif
+ }
+ else if (eCSR_NEIGHBOR_ROAM_STATE_INIT
+ == pMac->roam.neighborRoamInfo.neighborRoamState)
+ {
+ NEIGHBOR_ROAM_DEBUG(pMac,
+ LOG2,
+ FL("Currently in INIT state, safe to set"
+ " roam rescan rssi diff"));
+ pMac->roam.neighborRoamInfo.cfgParams.nRoamBeaconRssiWeight =
+ nRoamBeaconRssiWeight;
+ pMac->roam.neighborRoamInfo.currentRoamBeaconRssiWeight =
+ nRoamBeaconRssiWeight;
+ }
+ else
+ {
+ NEIGHBOR_ROAM_DEBUG(pMac,
+ LOGE,
+ FL("Unexpected state %d"
+ " returning failure"),
+ pMac->roam.neighborRoamInfo.neighborRoamState);
+ vosStatus = VOS_STATUS_E_FAILURE;
+ }
+ return vosStatus;
+}
/* ---------------------------------------------------------------------------
\fn csrNeighborRoamReassocIndCallback
@@ -821,6 +979,12 @@ static void csrNeighborRoamDeregAllRssiIndication(tpAniSirGlobal pMac)
pNeighborRoamInfo->cfgParams.nOpportunisticThresholdDiff;
pNeighborRoamInfo->currentRoamRescanRssiDiff =
pNeighborRoamInfo->cfgParams.nRoamRescanRssiDiff;
+ pNeighborRoamInfo->currentRoamBmissFirstBcnt =
+ pNeighborRoamInfo->cfgParams.nRoamBmissFirstBcnt;
+ pNeighborRoamInfo->currentRoamBmissFinalBcnt =
+ pNeighborRoamInfo->cfgParams.nRoamBmissFinalBcnt;
+ pNeighborRoamInfo->currentRoamBeaconRssiWeight =
+ pNeighborRoamInfo->cfgParams.nRoamBeaconRssiWeight;
#ifdef FEATURE_WLAN_LFR
pNeighborRoamInfo->uEmptyScanCount = 0;
pNeighborRoamInfo->lookupDOWNRssi = 0;
@@ -4259,6 +4423,12 @@ eHalStatus csrNeighborRoamIndicateConnect(tpAniSirGlobal pMac, tANI_U8 sessionId
pNeighborRoamInfo->cfgParams.nOpportunisticThresholdDiff;
pNeighborRoamInfo->currentRoamRescanRssiDiff =
pNeighborRoamInfo->cfgParams.nRoamRescanRssiDiff;
+ pNeighborRoamInfo->currentRoamBmissFirstBcnt =
+ pNeighborRoamInfo->cfgParams.nRoamBmissFirstBcnt;
+ pNeighborRoamInfo->currentRoamBmissFinalBcnt =
+ pNeighborRoamInfo->cfgParams.nRoamBmissFinalBcnt;
+ pNeighborRoamInfo->currentRoamBeaconRssiWeight =
+ pNeighborRoamInfo->cfgParams.nRoamBeaconRssiWeight;
#ifdef FEATURE_WLAN_LFR
pNeighborRoamInfo->uEmptyScanCount = 0;
pNeighborRoamInfo->lookupDOWNRssi = 0;
@@ -4448,6 +4618,12 @@ eHalStatus csrNeighborRoamInit(tpAniSirGlobal pMac)
pMac->roam.configParam.neighborRoamConfig.nOpportunisticThresholdDiff;
pNeighborRoamInfo->cfgParams.nRoamRescanRssiDiff =
pMac->roam.configParam.neighborRoamConfig.nRoamRescanRssiDiff;
+ pNeighborRoamInfo->cfgParams.nRoamBmissFirstBcnt =
+ pMac->roam.configParam.neighborRoamConfig.nRoamBmissFirstBcnt;
+ pNeighborRoamInfo->cfgParams.nRoamBmissFinalBcnt =
+ pMac->roam.configParam.neighborRoamConfig.nRoamBmissFinalBcnt;
+ pNeighborRoamInfo->cfgParams.nRoamBeaconRssiWeight =
+ pMac->roam.configParam.neighborRoamConfig.nRoamBeaconRssiWeight;
pNeighborRoamInfo->cfgParams.neighborReassocThreshold = pMac->roam.configParam.neighborRoamConfig.nNeighborReassocRssiThreshold;
pNeighborRoamInfo->cfgParams.neighborScanPeriod = pMac->roam.configParam.neighborRoamConfig.nNeighborScanTimerPeriod;
pNeighborRoamInfo->cfgParams.neighborResultsRefreshPeriod = pMac->roam.configParam.neighborRoamConfig.nNeighborResultsRefreshPeriod;
@@ -4476,6 +4652,12 @@ eHalStatus csrNeighborRoamInit(tpAniSirGlobal pMac)
pMac->roam.neighborRoamInfo.cfgParams.nOpportunisticThresholdDiff;
pNeighborRoamInfo->currentRoamRescanRssiDiff =
pMac->roam.neighborRoamInfo.cfgParams.nRoamRescanRssiDiff;
+ pNeighborRoamInfo->currentRoamBmissFirstBcnt =
+ pMac->roam.neighborRoamInfo.cfgParams.nRoamBmissFirstBcnt;
+ pNeighborRoamInfo->currentRoamBmissFinalBcnt =
+ pMac->roam.neighborRoamInfo.cfgParams.nRoamBmissFinalBcnt;
+ pNeighborRoamInfo->currentRoamBeaconRssiWeight =
+ pMac->roam.neighborRoamInfo.cfgParams.nRoamBeaconRssiWeight;
#ifdef FEATURE_WLAN_LFR
pNeighborRoamInfo->lookupDOWNRssi = 0;
pNeighborRoamInfo->uEmptyScanCount = 0;
diff --git a/CORE/SME/src/sme_common/sme_Api.c b/CORE/SME/src/sme_common/sme_Api.c
index 4470324c606b..e781723ecff8 100644
--- a/CORE/SME/src/sme_common/sme_Api.c
+++ b/CORE/SME/src/sme_common/sme_Api.c
@@ -9403,6 +9403,159 @@ v_U8_t sme_GetRoamRescanRssiDiff(tHalHandle hHal)
return pMac->roam.configParam.neighborRoamConfig.nRoamRescanRssiDiff;
}
+/* ---------------------------------------------------------------------------
+ \fn sme_SetRoamBmissFirstBcnt
+ \brief Update Roam count for first beacon miss
+ This function is called through dynamic setConfig callback function
+ to configure nRoamBmissFirstBcnt
+ \param hHal - HAL handle for device
+ \param nRoamBmissFirstBcnt - Roam first bmiss count
+ \return eHAL_STATUS_SUCCESS - SME update nRoamBmissFirstBcnt
+ successfully.
+ else SME is failed to update nRoamBmissFirstBcnt
+ -------------------------------------------------------------------------*/
+eHalStatus sme_SetRoamBmissFirstBcnt(tHalHandle hHal,
+ const v_U8_t nRoamBmissFirstBcnt)
+{
+ tpAniSirGlobal pMac = PMAC_STRUCT( hHal );
+ eHalStatus status = eHAL_STATUS_SUCCESS;
+
+ status = sme_AcquireGlobalLock( &pMac->sme );
+ if ( HAL_STATUS_SUCCESS( status ) )
+ {
+ status = csrNeighborRoamSetRoamBmissFirstBcnt(pMac, nRoamBmissFirstBcnt);
+ if (HAL_STATUS_SUCCESS(status))
+ {
+ VOS_TRACE(VOS_MODULE_ID_SME, VOS_TRACE_LEVEL_DEBUG,
+ "LFR runtime successfully set "
+ "beacon miss first beacon count to %d"
+ " - old value is %d - roam state is %d",
+ nRoamBmissFirstBcnt,
+ pMac->roam.configParam.neighborRoamConfig.nRoamBmissFirstBcnt,
+ pMac->roam.neighborRoamInfo.neighborRoamState);
+ pMac->roam.configParam.neighborRoamConfig.nRoamBmissFirstBcnt =
+ nRoamBmissFirstBcnt;
+ }
+ sme_ReleaseGlobalLock(&pMac->sme);
+ }
+ return status;
+}
+
+/* ---------------------------------------------------------------------------
+ \fn sme_getNeighborScanPeriod
+ \brief get neighbor scan period
+ \param hHal - The handle returned by macOpen.
+ \return v_U16_t - neighbor scan period
+ -------------------------------------------------------------------------*/
+v_U8_t sme_GetRoamBmissFirstBcnt(tHalHandle hHal)
+{
+ tpAniSirGlobal pMac = PMAC_STRUCT( hHal );
+ return pMac->roam.configParam.neighborRoamConfig.nRoamBmissFirstBcnt;
+}
+
+/* ---------------------------------------------------------------------------
+ \fn sme_SetRoamBmissFinalBcnt
+ \brief Update Roam count for final beacon miss
+ This function is called through dynamic setConfig callback function
+ to configure nRoamBmissFinalBcnt
+ \param hHal - HAL handle for device
+ \param nRoamBmissFinalBcnt - Roam final bmiss count
+ \return eHAL_STATUS_SUCCESS - SME update nRoamBmissFinalBcnt
+ successfully.
+ else SME is failed to update nRoamBmissFinalBcnt
+ -------------------------------------------------------------------------*/
+eHalStatus sme_SetRoamBmissFinalBcnt(tHalHandle hHal,
+ const v_U8_t nRoamBmissFinalBcnt)
+{
+ tpAniSirGlobal pMac = PMAC_STRUCT( hHal );
+ eHalStatus status = eHAL_STATUS_SUCCESS;
+
+ status = sme_AcquireGlobalLock( &pMac->sme );
+ if ( HAL_STATUS_SUCCESS( status ) )
+ {
+ status = csrNeighborRoamSetRoamBmissFinalBcnt(pMac, nRoamBmissFinalBcnt);
+ if (HAL_STATUS_SUCCESS(status))
+ {
+ VOS_TRACE(VOS_MODULE_ID_SME, VOS_TRACE_LEVEL_DEBUG,
+ "LFR runtime successfully set "
+ "beacon miss final beacon count to %d"
+ " - old value is %d - roam state is %d",
+ nRoamBmissFinalBcnt,
+ pMac->roam.configParam.neighborRoamConfig.nRoamBmissFinalBcnt,
+ pMac->roam.neighborRoamInfo.neighborRoamState);
+ pMac->roam.configParam.neighborRoamConfig.nRoamBmissFinalBcnt =
+ nRoamBmissFinalBcnt;
+ }
+ sme_ReleaseGlobalLock(&pMac->sme);
+ }
+ return status;
+}
+
+/*--------------------------------------------------------------------------
+ \fn sme_GetRoamBmissFinalBcnt
+ \brief gets Roam count for final beacon miss
+ This is a synchronous call
+ \param hHal - The handle returned by macOpen
+ \return v_U8_t - nRoamBmissFinalBcnt
+ \sa
+ --------------------------------------------------------------------------*/
+v_U8_t sme_GetRoamBmissFinalBcnt(tHalHandle hHal)
+{
+ tpAniSirGlobal pMac = PMAC_STRUCT( hHal );
+ return pMac->roam.configParam.neighborRoamConfig.nRoamBmissFinalBcnt;
+}
+
+/* ---------------------------------------------------------------------------
+ \fn sme_SetRoamBeaconRssiWeight
+ \brief Update Roam beacon rssi weight
+ This function is called through dynamic setConfig callback function
+ to configure nRoamBeaconRssiWeight
+ \param hHal - HAL handle for device
+ \param nRoamBeaconRssiWeight - Roam beacon rssi weight
+ \return eHAL_STATUS_SUCCESS - SME update nRoamBeaconRssiWeight config
+ successfully.
+ else SME is failed to update nRoamBeaconRssiWeight
+ -------------------------------------------------------------------------*/
+eHalStatus sme_SetRoamBeaconRssiWeight(tHalHandle hHal,
+ const v_U8_t nRoamBeaconRssiWeight)
+{
+ tpAniSirGlobal pMac = PMAC_STRUCT( hHal );
+ eHalStatus status = eHAL_STATUS_SUCCESS;
+
+ status = sme_AcquireGlobalLock( &pMac->sme );
+ if ( HAL_STATUS_SUCCESS( status ) )
+ {
+ status = csrNeighborRoamSetRoamBeaconRssiWeight(pMac, nRoamBeaconRssiWeight);
+ if (HAL_STATUS_SUCCESS(status))
+ {
+ VOS_TRACE(VOS_MODULE_ID_SME, VOS_TRACE_LEVEL_DEBUG,
+ "LFR runtime successfully set "
+ "beacon miss final beacon count to %d"
+ " - old value is %d - roam state is %d",
+ nRoamBeaconRssiWeight,
+ pMac->roam.configParam.neighborRoamConfig.nRoamBeaconRssiWeight,
+ pMac->roam.neighborRoamInfo.neighborRoamState);
+ pMac->roam.configParam.neighborRoamConfig.nRoamBeaconRssiWeight =
+ nRoamBeaconRssiWeight;
+ }
+ sme_ReleaseGlobalLock(&pMac->sme);
+ }
+ return status;
+}
+
+/*--------------------------------------------------------------------------
+ \fn sme_GetRoamBeaconRssiWeight
+ \brief gets Roam beacon rssi weight
+ This is a synchronous call
+ \param hHal - The handle returned by macOpen
+ \return v_U8_t - nRoamBeaconRssiWeight
+ \sa
+ --------------------------------------------------------------------------*/
+v_U8_t sme_GetRoamBeaconRssiWeight(tHalHandle hHal)
+{
+ tpAniSirGlobal pMac = PMAC_STRUCT( hHal );
+ return pMac->roam.configParam.neighborRoamConfig.nRoamBeaconRssiWeight;
+}
/*--------------------------------------------------------------------------
\brief sme_setNeighborLookupRssiThreshold() - update neighbor lookup rssi threshold
This is a synchronous call
diff --git a/CORE/SVC/external/wlan_nlink_common.h b/CORE/SVC/external/wlan_nlink_common.h
index 1e9e56ce2f61..1125bd2e0fa1 100644
--- a/CORE/SVC/external/wlan_nlink_common.h
+++ b/CORE/SVC/external/wlan_nlink_common.h
@@ -86,7 +86,7 @@
#define WLAN_BTC_SOFTAP_BSS_START 0x11
#define WLAN_SVC_FW_CRASHED_IND 0x100
#define WLAN_SVC_LTE_COEX_IND 0x101
-
+#define WLAN_SVC_WLAN_AUTO_SHUTDOWN_IND 0x102
// Event data for WLAN_BTC_QUERY_STATE_RSP & WLAN_STA_ASSOC_DONE_IND
typedef struct
diff --git a/CORE/SYS/legacy/src/utils/src/macTrace.c b/CORE/SYS/legacy/src/utils/src/macTrace.c
index c99ed6905e6c..ced550caf698 100644
--- a/CORE/SYS/legacy/src/utils/src/macTrace.c
+++ b/CORE/SYS/legacy/src/utils/src/macTrace.c
@@ -805,6 +805,7 @@ tANI_U8* macTraceGetWdaMsgString( tANI_U16 wdaMsg )
CASE_RETURN_STRING(WDA_INIT_THERMAL_INFO_CMD);
CASE_RETURN_STRING(WDA_SET_THERMAL_LEVEL);
CASE_RETURN_STRING(WDA_SET_SAP_INTRABSS_DIS);
+ CASE_RETURN_STRING(WDA_FW_STATS_IND);
default:
return((tANI_U8*) "UNKNOWN" );
break;
diff --git a/CORE/VOSS/src/vos_nvitem.c b/CORE/VOSS/src/vos_nvitem.c
index 0627139dce1b..fe0be3c31d70 100644
--- a/CORE/VOSS/src/vos_nvitem.c
+++ b/CORE/VOSS/src/vos_nvitem.c
@@ -1208,9 +1208,11 @@ VOS_STATUS vos_nv_open(void)
vos_mem_free(pnvData);
}
+#ifdef CONFIG_QCA_WIFI_ISOC
VOS_TRACE(VOS_MODULE_ID_VOSS, VOS_TRACE_LEVEL_ERROR,
"INFO: NV binary file version=%d Driver default NV version=%d, continue...",
gnvEFSTable->halnv.fields.nvVersion, WLAN_NV_VERSION);
+#endif
/* Copying the read nv data to the globa NV EFS table */
{
@@ -1230,9 +1232,11 @@ VOS_STATUS vos_nv_open(void)
if ( nvReadBufSize != bufSize)
{
pnvEFSTable->nvValidityBitmap = DEFAULT_NV_VALIDITY_BITMAP;
+#ifdef CONFIG_QCA_WIFI_ISOC
VOS_TRACE(VOS_MODULE_ID_VOSS, VOS_TRACE_LEVEL_FATAL,
"!!!WARNING: INVALID NV FILE, DRIVER IS USING DEFAULT CAL VALUES %d %d!!!",
nvReadBufSize, bufSize);
+#endif
return VOS_STATUS_SUCCESS;
}
diff --git a/CORE/VOSS/src/wlan_nv_parser.c b/CORE/VOSS/src/wlan_nv_parser.c
index 7e8269b65cb1..e0a7ba99922e 100644
--- a/CORE/VOSS/src/wlan_nv_parser.c
+++ b/CORE/VOSS/src/wlan_nv_parser.c
@@ -1118,7 +1118,7 @@ static void copyDataToBuiltInFromBin(int tableIdx,int fieldId,
FIELD_ID_TABLE_OR_ENUM_IDX_MASK];
if (storageType == SINGULAR ) {
- ptr = (unsigned char*)((int)gpnvData_t + tableBaseOffset + addOffset);
+ ptr = ((unsigned char*)gpnvData_t) + tableBaseOffset + addOffset;
dptr = (unsigned char *)&pStream[*pos];
if (IsFieldTypeBasicData(pTable[tableIdx][fieldId].fieldId)) {
@@ -1151,7 +1151,7 @@ static void copyDataToBuiltInFromBin(int tableIdx,int fieldId,
}
else {
if (ARRAY_1 == storageType) {
- ptr = (unsigned char*)((int)gpnvData_t + tableBaseOffset + addOffset);
+ ptr = ((unsigned char*)gpnvData_t) + tableBaseOffset + addOffset;
dptr = (unsigned char *)&pStream[*pos];
idx = _STORAGE_SIZE1(pTable[tableIdx][fieldId].fieldStorageSize1,
@@ -1202,7 +1202,7 @@ static void copyDataToBuiltInFromBin(int tableIdx,int fieldId,
*pos = *pos + (size1Bin * sizeOneElem);
}
else if (ARRAY_2 == storageType) {
- ptr = (unsigned char*)((int)gpnvData_t + tableBaseOffset + addOffset);
+ ptr = ((unsigned char*)gpnvData_t) + tableBaseOffset + addOffset;
dptr = (unsigned char *)&pStream[*pos];
idx = _STORAGE_SIZE1(pTable[tableIdx][fieldId].fieldStorageSize1,
@@ -1294,7 +1294,7 @@ static void copyDataToBuiltInFromBin(int tableIdx,int fieldId,
*pos = *pos + size2Bin * size1Bin * sizeOneElem;
}
else if (ARRAY_3 == storageType) {
- ptr = (unsigned char*)((int)gpnvData_t + tableBaseOffset + addOffset);
+ ptr = ((unsigned char*)gpnvData_t) + tableBaseOffset + addOffset;
dptr = (unsigned char *)&pStream[*pos];
idx = _STORAGE_SIZE1(pTable[tableIdx][fieldId].fieldStorageSize1,
diff --git a/CORE/WDA/inc/wlan_qct_wda.h b/CORE/WDA/inc/wlan_qct_wda.h
index 2422dfbe74cc..e2ae45bd7e0e 100644
--- a/CORE/WDA/inc/wlan_qct_wda.h
+++ b/CORE/WDA/inc/wlan_qct_wda.h
@@ -1330,6 +1330,7 @@ tSirRetStatus uMacPostCtrlMsg(void* pSirGlobal, tSirMbMsg* pMb);
* beacon offload case
*/
#define WDA_DFS_BEACON_TX_SUCCESS_IND SIR_HAL_BEACON_TX_SUCCESS_IND
+#define WDA_FW_STATS_IND SIR_HAL_FW_STATS_IND
tSirRetStatus wdaPostCtrlMsg(tpAniSirGlobal pMac, tSirMsgQ *pMsg);
diff --git a/CORE/WDI/WPAL/src/wlan_qct_pal_api.c b/CORE/WDI/WPAL/src/wlan_qct_pal_api.c
index 2cc8e435cd01..cc5ba27eb5b1 100644
--- a/CORE/WDI/WPAL/src/wlan_qct_pal_api.c
+++ b/CORE/WDI/WPAL/src/wlan_qct_pal_api.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2012 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2012, 2014 The Linux Foundation. All rights reserved.
*
* Previously licensed under the ISC license by Qualcomm Atheros, Inc.
*
@@ -46,7 +46,7 @@
#include "vos_api.h"
#include "dma-mapping.h"
-#include <mach/subsystem_restart.h>
+#include <soc/qcom/subsystem_restart.h>
#include <linux/wcnss_wlan.h>
typedef struct sPalStruct
diff --git a/Kbuild b/Kbuild
index fa5b33c0de73..8095ebc86a2d 100644
--- a/Kbuild
+++ b/Kbuild
@@ -879,8 +879,13 @@ ifeq ($(CONFIG_QCA_WIFI_2_0), 0)
CDEFINES += -DWLANTL_DEBUG
else
CDEFINES += -DOSIF_NEED_RX_PEER_ID \
- -DQCA_SUPPORT_TXRX_LOCAL_PEER_ID \
- -DQCA_PKT_PROTO_TRACE
+ -DQCA_SUPPORT_TXRX_LOCAL_PEER_ID
+endif
+
+ifeq ($(CONFIG_QCA_WIFI_2_0), 1)
+ifeq ($(CONFIG_DEBUG_LL),y)
+CDEFINES += -DQCA_PKT_PROTO_TRACE
+endif
endif
ifneq ($(CONFIG_QCA_CLD_WLAN),)
@@ -1110,6 +1115,11 @@ CDEFINES += -DQCA_CONFIG_SMP
endif
endif
+#enable wlan auto shutdown feature for mdm9630
+ifeq ($(CONFIG_ARCH_MDM9630), y)
+CDEFINES += -DFEATURE_WLAN_AUTO_SHUTDOWN
+endif
+
#Open P2P device interface only for non-MDM9630 platform
ifneq ($(CONFIG_ARCH_MDM9630), y)
CDEFINES += -DWLAN_OPEN_P2P_INTERFACE
diff --git a/firmware_bin/WCNSS_qcom_cfg.ini b/firmware_bin/WCNSS_qcom_cfg.ini
index 6627d4757ca5..5d781979e49f 100755
--- a/firmware_bin/WCNSS_qcom_cfg.ini
+++ b/firmware_bin/WCNSS_qcom_cfg.ini
@@ -224,6 +224,9 @@ gShortGI40Mhz=1
gAPAutoShutOff=0
+#Auto Shutdown wlan : Value in Seconds. 0 means disabled. Def 15 mins / max 1 day 86400 sec
+gWlanAutoShutdown = 900
+
# SAP auto channel selection configuration