diff options
| author | Linux Build Service Account <lnxbuild@localhost> | 2015-04-11 05:18:24 -0700 |
|---|---|---|
| committer | Gerrit - the friendly Code Review server <code-review@localhost> | 2015-04-11 05:18:24 -0700 |
| commit | aecf9460803fbc2ec6ecdf8cdbb220f988244810 (patch) | |
| tree | d1d8d50f5f7710e017812091d5f2024818dc01fc | |
| parent | c4d13ab42dfd4f3d75861c3d70486c8b37f9b604 (diff) | |
| parent | 507a91e017024d15c95aa25a0ce770173434897e (diff) | |
Merge "Release 4.0.10.73 QCACLD WLAN Driver."
| -rw-r--r-- | CORE/HDD/inc/wlan_hdd_tdls.h | 18 | ||||
| -rw-r--r-- | CORE/HDD/src/wlan_hdd_cfg80211.c | 70 | ||||
| -rw-r--r-- | CORE/HDD/src/wlan_hdd_p2p.c | 3 | ||||
| -rw-r--r-- | CORE/HDD/src/wlan_hdd_tdls.c | 187 | ||||
| -rw-r--r-- | CORE/MAC/inc/qwlan_version.h | 4 | ||||
| -rw-r--r-- | CORE/MAC/inc/sirApi.h | 1 | ||||
| -rw-r--r-- | CORE/SERVICES/COMMON/targaddrs.h | 4 | ||||
| -rw-r--r-- | CORE/SERVICES/COMMON/wlan_defs.h | 2 | ||||
| -rw-r--r-- | CORE/SERVICES/COMMON/wmi_tlv_defs.h | 26 | ||||
| -rw-r--r-- | CORE/SERVICES/COMMON/wmi_unified.h | 111 | ||||
| -rw-r--r-- | CORE/SERVICES/COMMON/wmi_version.h | 2 | ||||
| -rw-r--r-- | CORE/SERVICES/WMI/wmi_unified.c | 1 | ||||
| -rw-r--r-- | CORE/SME/src/csr/csrApiRoam.c | 84 | ||||
| -rw-r--r-- | CORE/SME/src/csr/csrNeighborRoam.c | 22 | ||||
| -rw-r--r-- | CORE/SME/src/sme_common/sme_Api.c | 7 |
15 files changed, 385 insertions, 157 deletions
diff --git a/CORE/HDD/inc/wlan_hdd_tdls.h b/CORE/HDD/inc/wlan_hdd_tdls.h index e726ac6b1244..04d8398914c4 100644 --- a/CORE/HDD/inc/wlan_hdd_tdls.h +++ b/CORE/HDD/inc/wlan_hdd_tdls.h @@ -36,6 +36,8 @@ #define MAX_NUM_TDLS_PEER 3 +#ifdef FEATURE_WLAN_TDLS + #define TDLS_SUB_DISCOVERY_PERIOD 100 #define TDLS_MAX_DISCOVER_REQS_PER_TIMER 1 @@ -370,6 +372,10 @@ int wlan_hdd_tdls_extctrl_config_peer(hdd_adapter_t *pAdapter, uint32_t max_latency, uint32_t op_class, uint32_t min_bandwidth); +void hdd_tdls_notify_mode_change(hdd_adapter_t *pAdapter, + hdd_context_t *pHddCtx); +void wlan_hdd_tdls_disable_offchan_and_teardown_links(hdd_context_t *pHddCtx); + /* EXT TDLS */ int wlan_hdd_tdls_get_status(hdd_adapter_t *pAdapter, tANI_U8* mac, @@ -386,4 +392,16 @@ int hdd_set_tdls_offchannelmode(hdd_adapter_t *pAdapter, int offchanmode); void wlan_hdd_update_tdls_info(hdd_adapter_t *adapter, bool tdls_prohibited, bool tdls_chan_swit_prohibited); int hdd_set_tdls_scan_type(hdd_context_t *hdd_ctx, int val); + +#else +static inline void hdd_tdls_notify_mode_change(hdd_adapter_t *pAdapter, + hdd_context_t *pHddCtx) +{ +} +static inline void +wlan_hdd_tdls_disable_offchan_and_teardown_links(hdd_context_t *pHddCtx) +{ +} +#endif + #endif // __HDD_TDSL_H diff --git a/CORE/HDD/src/wlan_hdd_cfg80211.c b/CORE/HDD/src/wlan_hdd_cfg80211.c index 52b878b882c3..2ff2d64d354f 100644 --- a/CORE/HDD/src/wlan_hdd_cfg80211.c +++ b/CORE/HDD/src/wlan_hdd_cfg80211.c @@ -89,11 +89,9 @@ #include "vos_utils.h" #include "vos_sched.h" #include <qc_sap_ioctl.h> -#ifdef FEATURE_WLAN_TDLS #include "wlan_hdd_tdls.h" #include "wlan_hdd_wmm.h" #include "wlan_qct_wda.h" -#endif #include "wlan_nv.h" #include "wlan_hdd_dev_pwr.h" #ifdef CONFIG_CNSS @@ -1529,19 +1527,19 @@ wlan_hdd_cfg80211_set_ext_roam_params(struct wiphy *wiphy, if (nla_parse(tb, QCA_WLAN_VENDOR_ATTR_ROAMING_PARAM_MAX, data, data_len, NULL)) { - hddLog(VOS_TRACE_LEVEL_ERROR, FL("Invalid ATTR")); + hddLog(LOGE, FL("Invalid ATTR")); return -EINVAL; } /* Parse and fetch Command Type*/ if (!tb[QCA_WLAN_VENDOR_ATTR_ROAMING_SUBCMD]) { - hddLog(VOS_TRACE_LEVEL_ERROR, FL("roam cmd type failed")); + hddLog(LOGE, FL("roam cmd type failed")); goto fail; } session_id = pAdapter->sessionId; vos_mem_set(&roam_params, sizeof(roam_params),0); cmd_type = nla_get_u32(tb[QCA_WLAN_VENDOR_ATTR_ROAMING_SUBCMD]); if (!tb[QCA_WLAN_VENDOR_ATTR_ROAMING_REQ_ID]) { - hddLog(VOS_TRACE_LEVEL_ERROR, FL("attr request id failed")); + hddLog(LOGE, FL("attr request id failed")); goto fail; } req_id = nla_get_u32( @@ -1552,8 +1550,7 @@ wlan_hdd_cfg80211_set_ext_roam_params(struct wiphy *wiphy, case QCA_WLAN_VENDOR_ATTR_ROAM_SUBCMD_SSID_WHITE_LIST: /* Parse and fetch number of allowed ssid */ if (!tb[QCA_WLAN_VENDOR_ATTR_ROAMING_PARAM_WHITE_LIST_SSID_NUM_NETWORKS]) { - hddLog(VOS_TRACE_LEVEL_ERROR, - FL("attr num of allowed ssid failed")); + hddLog(LOGE, FL("attr num of allowed ssid failed")); goto fail; } roam_params.num_ssid_allowed_list = nla_get_u32( @@ -1569,14 +1566,12 @@ wlan_hdd_cfg80211_set_ext_roam_params(struct wiphy *wiphy, QCA_WLAN_VENDOR_ATTR_ROAM_SUBCMD_MAX, nla_data(curr_attr), nla_len(curr_attr), NULL)) { - hddLog(VOS_TRACE_LEVEL_ERROR, - FL("nla_parse failed")); + hddLog(LOGE, FL("nla_parse failed")); goto fail; } /* Parse and Fetch allowed SSID list*/ if (!tb2[QCA_WLAN_VENDOR_ATTR_ROAMING_PARAM_WHITE_LIST_SSID]) { - hddLog(VOS_TRACE_LEVEL_ERROR, - FL("attr allowed ssid failed")); + hddLog(LOGE, FL("attr allowed ssid failed")); goto fail; } buf = nla_data(tb2[QCA_WLAN_VENDOR_ATTR_ROAMING_PARAM_WHITE_LIST_SSID]); @@ -1598,8 +1593,7 @@ wlan_hdd_cfg80211_set_ext_roam_params(struct wiphy *wiphy, case QCA_WLAN_VENDOR_ATTR_ROAM_SUBCMD_SET_EXTSCAN_ROAM_PARAMS: /* Parse and fetch 5G Boost Threshold */ if (!tb[QCA_WLAN_VENDOR_ATTR_ROAMING_PARAM_A_BAND_BOOST_THRESHOLD]) { - hddLog(VOS_TRACE_LEVEL_ERROR, - FL("5G boost threshold failed")); + hddLog(LOGE, FL("5G boost threshold failed")); goto fail; } roam_params.raise_rssi_thresh_5g = nla_get_s32( @@ -1609,8 +1603,7 @@ wlan_hdd_cfg80211_set_ext_roam_params(struct wiphy *wiphy, roam_params.raise_rssi_thresh_5g); /* Parse and fetch 5G Penalty Threshold */ if (!tb[QCA_WLAN_VENDOR_ATTR_ROAMING_PARAM_A_BAND_PENALTY_THRESHOLD]) { - hddLog(VOS_TRACE_LEVEL_ERROR, - FL("5G penalty threshold failed")); + hddLog(LOGE, FL("5G penalty threshold failed")); goto fail; } roam_params.drop_rssi_thresh_5g = nla_get_s32( @@ -1620,8 +1613,7 @@ wlan_hdd_cfg80211_set_ext_roam_params(struct wiphy *wiphy, roam_params.drop_rssi_thresh_5g); /* Parse and fetch 5G Boost Factor */ if (!tb[QCA_WLAN_VENDOR_ATTR_ROAMING_PARAM_A_BAND_BOOST_FACTOR]) { - hddLog(VOS_TRACE_LEVEL_ERROR, - FL("5G boost Factor failed")); + hddLog(LOGE, FL("5G boost Factor failed")); goto fail; } roam_params.raise_factor_5g = nla_get_u32( @@ -1630,8 +1622,7 @@ wlan_hdd_cfg80211_set_ext_roam_params(struct wiphy *wiphy, roam_params.raise_factor_5g); /* Parse and fetch 5G Penalty factor */ if (!tb[QCA_WLAN_VENDOR_ATTR_ROAMING_PARAM_A_BAND_PENALTY_FACTOR]) { - hddLog(VOS_TRACE_LEVEL_ERROR, - FL("5G Penalty Factor failed")); + hddLog(LOGE, FL("5G Penalty Factor failed")); goto fail; } roam_params.drop_factor_5g = nla_get_u32( @@ -1641,8 +1632,7 @@ wlan_hdd_cfg80211_set_ext_roam_params(struct wiphy *wiphy, roam_params.drop_factor_5g); /* Parse and fetch 5G Max Boost */ if (!tb[QCA_WLAN_VENDOR_ATTR_ROAMING_PARAM_A_BAND_MAX_BOOST]) { - hddLog(VOS_TRACE_LEVEL_ERROR, - FL("5G Max Boost failed")); + hddLog(LOGE, FL("5G Max Boost failed")); goto fail; } roam_params.max_raise_rssi_5g = nla_get_u32( @@ -1651,8 +1641,7 @@ wlan_hdd_cfg80211_set_ext_roam_params(struct wiphy *wiphy, roam_params.max_raise_rssi_5g); /* Parse and fetch Rssi Diff */ if (!tb[QCA_WLAN_VENDOR_ATTR_ROAMING_PARAM_LAZY_ROAM_HISTERESYS]) { - hddLog(VOS_TRACE_LEVEL_ERROR, - FL("Rssi Diff failed")); + hddLog(LOGE, FL("Rssi Diff failed")); goto fail; } roam_params.rssi_diff = nla_get_s32( @@ -1661,15 +1650,14 @@ wlan_hdd_cfg80211_set_ext_roam_params(struct wiphy *wiphy, roam_params.rssi_diff); /* Parse and fetch Good Rssi Threshold */ if (!tb[QCA_WLAN_VENDOR_ATTR_ROAMING_PARAM_ALERT_ROAM_RSSI_TRIGGER]) { - hddLog(VOS_TRACE_LEVEL_ERROR, - FL("Good Rssi Threshold failed")); + hddLog(LOGE, FL("Alert Rssi Threshold failed")); goto fail; } - roam_params.good_rssi_threshold = nla_get_u32( + roam_params.alert_rssi_threshold = nla_get_u32( tb[QCA_WLAN_VENDOR_ATTR_ROAMING_PARAM_ALERT_ROAM_RSSI_TRIGGER]); hddLog(VOS_TRACE_LEVEL_DEBUG, - FL("Good RSSI Threshold (%d)"), - roam_params.good_rssi_threshold); + FL("Alert RSSI Threshold (%d)"), + roam_params.alert_rssi_threshold); sme_update_roam_params(pHddCtx->hHal, session_id, roam_params, REASON_ROAM_EXT_SCAN_PARAMS_CHANGED); @@ -1677,8 +1665,7 @@ wlan_hdd_cfg80211_set_ext_roam_params(struct wiphy *wiphy, case QCA_WLAN_VENDOR_ATTR_ROAM_SUBCMD_SET_LAZY_ROAM: /* Parse and fetch Activate Good Rssi Roam */ if (!tb[QCA_WLAN_VENDOR_ATTR_ROAMING_PARAM_SET_LAZY_ROAM_ENABLE]) { - hddLog(VOS_TRACE_LEVEL_ERROR, - FL("Activate Good Rssi Roam failed")); + hddLog(LOGE, FL("Activate Good Rssi Roam failed")); goto fail; } roam_params.good_rssi_roam = nla_get_s32( @@ -1692,8 +1679,7 @@ wlan_hdd_cfg80211_set_ext_roam_params(struct wiphy *wiphy, case QCA_WLAN_VENDOR_ATTR_ROAM_SUBCMD_SET_BSSID_PREFS: /* Parse and fetch number of preferred BSSID */ if (!tb[QCA_WLAN_VENDOR_ATTR_ROAMING_PARAM_SET_LAZY_ROAM_NUM_BSSID]) { - hddLog(VOS_TRACE_LEVEL_ERROR, - FL("attr num of preferred bssid failed")); + hddLog(LOGE, FL("attr num of preferred bssid failed")); goto fail; } roam_params.num_bssid_favored = nla_get_u32( @@ -1709,14 +1695,12 @@ wlan_hdd_cfg80211_set_ext_roam_params(struct wiphy *wiphy, QCA_WLAN_VENDOR_ATTR_ROAMING_PARAM_MAX, nla_data(curr_attr), nla_len(curr_attr), NULL)) { - hddLog(VOS_TRACE_LEVEL_ERROR, - FL("nla_parse failed")); + hddLog(LOGE, FL("nla_parse failed")); goto fail; } /* Parse and fetch MAC address */ if (!tb2[QCA_WLAN_VENDOR_ATTR_ROAMING_PARAM_SET_LAZY_ROAM_BSSID]) { - hddLog(VOS_TRACE_LEVEL_ERROR, - FL("attr mac address failed")); + hddLog(LOGE, FL("attr mac address failed")); goto fail; } nla_memcpy(roam_params.bssid_favored[i], @@ -1726,8 +1710,7 @@ wlan_hdd_cfg80211_set_ext_roam_params(struct wiphy *wiphy, MAC_ADDR_ARRAY(roam_params.bssid_favored[i])); /* Parse and fetch preference factor*/ if (!tb2[QCA_WLAN_VENDOR_ATTR_ROAMING_PARAM_SET_LAZY_ROAM_RSSI_MODIFIER]) { - hddLog(VOS_TRACE_LEVEL_ERROR, - FL("BSSID Preference score failed")); + hddLog(LOGE, FL("BSSID Preference score failed")); goto fail; } roam_params.bssid_favored_factor[i] = nla_get_u32( @@ -1743,8 +1726,7 @@ wlan_hdd_cfg80211_set_ext_roam_params(struct wiphy *wiphy, case QCA_WLAN_VENDOR_ATTR_ROAM_SUBCMD_SET_BLACKLIST_BSSID: /* Parse and fetch number of blacklist BSSID */ if (!tb[QCA_WLAN_VENDOR_ATTR_ROAMING_PARAM_SET_BSSID_PARAMS_NUM_BSSID]) { - hddLog(VOS_TRACE_LEVEL_ERROR, - FL("attr num of blacklist bssid failed")); + hddLog(LOGE, FL("attr num of blacklist bssid failed")); goto fail; } roam_params.num_bssid_avoid_list = nla_get_u32( @@ -1760,14 +1742,12 @@ wlan_hdd_cfg80211_set_ext_roam_params(struct wiphy *wiphy, QCA_WLAN_VENDOR_ATTR_ROAMING_PARAM_MAX, nla_data(curr_attr), nla_len(curr_attr), NULL)) { - hddLog(VOS_TRACE_LEVEL_ERROR, - FL("nla_parse failed")); + hddLog(LOGE, FL("nla_parse failed")); goto fail; } /* Parse and fetch MAC address */ if (!tb2[QCA_WLAN_VENDOR_ATTR_ROAMING_PARAM_SET_BSSID_PARAMS_BSSID]) { - hddLog(VOS_TRACE_LEVEL_ERROR, - FL("attr blacklist addr failed")); + hddLog(LOGE, FL("attr blacklist addr failed")); goto fail; } nla_memcpy(roam_params.bssid_avoid_list[i], @@ -9921,6 +9901,8 @@ static int __wlan_hdd_cfg80211_change_iface(struct wiphy *wiphy, /* Reset the current device mode bit mask */ wlan_hdd_clear_concurrency_mode(pHddCtx, pAdapter->device_mode); + hdd_tdls_notify_mode_change(pAdapter, pHddCtx); + if ((pAdapter->device_mode == WLAN_HDD_INFRA_STATION) || (pAdapter->device_mode == WLAN_HDD_P2P_CLIENT) || (pAdapter->device_mode == WLAN_HDD_P2P_DEVICE)) { diff --git a/CORE/HDD/src/wlan_hdd_p2p.c b/CORE/HDD/src/wlan_hdd_p2p.c index acdf04f33523..41fc8e912a41 100644 --- a/CORE/HDD/src/wlan_hdd_p2p.c +++ b/CORE/HDD/src/wlan_hdd_p2p.c @@ -46,9 +46,7 @@ #include <linux/skbuff.h> #include <linux/etherdevice.h> #include <net/ieee80211_radiotap.h> -#ifdef FEATURE_WLAN_TDLS #include "wlan_hdd_tdls.h" -#endif #include "wlan_hdd_trace.h" #include "vos_types.h" #include "vos_trace.h" @@ -2179,6 +2177,7 @@ struct net_device* __wlan_hdd_add_virtual_intf( eCSR_SCAN_ABORT_DEFAULT); hddLog(LOG1, FL("Abort Scan while adding virtual interface")); } + wlan_hdd_tdls_disable_offchan_and_teardown_links(pHddCtx); } pAdapter = NULL; diff --git a/CORE/HDD/src/wlan_hdd_tdls.c b/CORE/HDD/src/wlan_hdd_tdls.c index 874265d37d68..7c49a9c1c161 100644 --- a/CORE/HDD/src/wlan_hdd_tdls.c +++ b/CORE/HDD/src/wlan_hdd_tdls.c @@ -60,6 +60,88 @@ static u8 wlan_hdd_tdls_hash_key (u8 *mac) return key; } +/** + * wlan_hdd_tdls_disable_offchan_and_teardown_links - Disable offchannel + * and teardown TDLS links + * @hddCtx : pointer to hdd context + * + * Return: None + */ +void wlan_hdd_tdls_disable_offchan_and_teardown_links(hdd_context_t *hddctx) +{ + u16 connected_tdls_peers = 0; + u8 staidx; + hddTdlsPeer_t *curr_peer = NULL; + hdd_adapter_t *adapter = NULL; + + if (eTDLS_SUPPORT_NOT_ENABLED == hddctx->tdls_mode) { + hddLog(LOG1, FL("TDLS mode is disabled OR not enabled in FW")); + return ; + } + + adapter = hdd_get_adapter(hddctx, WLAN_HDD_INFRA_STATION); + + if (adapter == NULL) { + hddLog(LOGE, FL("Station Adapter Not Found")); + return; + } + + connected_tdls_peers = wlan_hdd_tdlsConnectedPeers(adapter); + + if (!connected_tdls_peers) + return ; + + /* TDLS is not supported in case of concurrency. + * Disable TDLS Offchannel in FW to avoid more + * than two concurrent channels and generate TDLS + * teardown indication to supplicant. + * Below function Finds the first connected peer and + * disables TDLS offchannel for that peer. + * FW enables TDLS offchannel only when there is + * one TDLS peer. When there are more than one TDLS peer, + * there will not be TDLS offchannel in FW. + * So to avoid sending multiple request to FW, for now, + * just invoke offchannel mode functions only once + */ + hdd_set_tdls_offchannel(hddctx, hddctx->cfg_ini->fTDLSPrefOffChanNum); + hdd_set_tdls_secoffchanneloffset(hddctx, + TDLS_SEC_OFFCHAN_OFFSET_40PLUS); + hdd_set_tdls_offchannelmode(adapter, DISABLE_CHANSWITCH); + + for (staidx = 0; staidx < hddctx->max_num_tdls_sta; + staidx++) { + if (!hddctx->tdlsConnInfo[staidx].staId) + continue; + + curr_peer = wlan_hdd_tdls_find_all_peer(hddctx, + hddctx->tdlsConnInfo[staidx].peerMac.bytes); + + if (!curr_peer) + continue; + + hddLog(LOG1, FL("indicate TDLS teardown (staId %d)"), + curr_peer->staId); + + wlan_hdd_tdls_indicate_teardown( + curr_peer->pHddTdlsCtx->pAdapter, + curr_peer, + eSIR_MAC_TDLS_TEARDOWN_UNSPEC_REASON); + } +} + +/** + * hdd_tdls_notify_mode_change - Notify mode change + * @adapter: pointer to hdd adapter + * @hddCtx : pointer to hdd context + * + * Return: None + */ +void hdd_tdls_notify_mode_change(hdd_adapter_t *adapter, hdd_context_t *hddctx) +{ + if (adapter->device_mode != WLAN_HDD_INFRA_STATION) + wlan_hdd_tdls_disable_offchan_and_teardown_links(hddctx); +} + #ifdef CONFIG_TDLS_IMPLICIT void wlan_hdd_tdls_pre_setup_init_work(tdlsCtx_t * pHddTdlsCtx, hddTdlsPeer_t *curr_candidate) @@ -494,11 +576,43 @@ static void wlan_hdd_tdls_schedule_scan(struct work_struct *work) scan_ctx->scan_request); } +/* stop all monitoring timers per Adapter */ +static void wlan_hdd_tdls_monitor_timers_stop(tdlsCtx_t *pHddTdlsCtx) +{ +#ifdef TDLS_USE_SEPARATE_DISCOVERY_TIMER + vos_timer_stop(&pHddTdlsCtx->peerDiscoverTimer); +#endif + vos_timer_stop(&pHddTdlsCtx->peerDiscoveryTimeoutTimer); +} + +/* stop all per peer timers */ +static void wlan_hdd_tdls_peer_timers_stop(tdlsCtx_t *pHddTdlsCtx) +{ + int i; + struct list_head *head; + struct list_head *pos; + hddTdlsPeer_t *curr_peer; + for (i = 0; i < TDLS_PEER_LIST_SIZE; i++) + { + head = &pHddTdlsCtx->peer_list[i]; + list_for_each (pos, head) { + curr_peer = list_entry (pos, hddTdlsPeer_t, node); + vos_timer_stop( &curr_peer->initiatorWaitTimeoutTimer ); + } + } +} + +/* stop all the tdls timers running */ +static void wlan_hdd_tdls_timers_stop(tdlsCtx_t *pHddTdlsCtx) +{ + wlan_hdd_tdls_monitor_timers_stop(pHddTdlsCtx); + wlan_hdd_tdls_peer_timers_stop(pHddTdlsCtx); +} int wlan_hdd_tdls_init(hdd_adapter_t *pAdapter) { hdd_context_t *pHddCtx = WLAN_HDD_GET_CTX( pAdapter ); - tdlsCtx_t *pHddTdlsCtx; + tdlsCtx_t *pHddTdlsCtx = NULL; int i; v_U8_t staIdx; tdlsInfo_t *tInfo; @@ -569,9 +683,38 @@ int wlan_hdd_tdls_init(hdd_adapter_t *pAdapter) pHddTdlsCtx); pAdapter->sessionCtx.station.pHddTdlsCtx = pHddTdlsCtx; - } - pHddTdlsCtx = pAdapter->sessionCtx.station.pHddTdlsCtx; + for (i = 0; i < TDLS_PEER_LIST_SIZE; i++) + INIT_LIST_HEAD(&pHddTdlsCtx->peer_list[i]); + } else { + struct list_head *head, *pos, *q; + hddTdlsPeer_t *tmp = NULL; + + pHddTdlsCtx = pAdapter->sessionCtx.station.pHddTdlsCtx; + + /* stop all timers */ + wlan_hdd_tdls_timers_stop(pHddTdlsCtx); + + /* remove entries from peer list only if peer is not forced */ + for (i = 0; i < TDLS_PEER_LIST_SIZE; i++) { + head = &pHddTdlsCtx->peer_list[i]; + list_for_each_safe(pos, q, head) { + tmp = list_entry(pos, hddTdlsPeer_t, node); + if (FALSE == tmp->isForcedPeer) { + vos_timer_destroy(&tmp->initiatorWaitTimeoutTimer); + list_del(pos); + vos_mem_free(tmp); + tmp = NULL; + } else { + tmp->link_status = eTDLS_LINK_IDLE; + tmp->reason = eTDLS_LINK_UNSPECIFIED; + tmp->discovery_attempt = 0; + } + } + } + /* reset tdls peer count to 0 */ + pHddCtx->connected_peer_count = 0; + } /* initialize TDLS global context */ pHddCtx->connected_peer_count = 0; @@ -595,11 +738,6 @@ int wlan_hdd_tdls_init(hdd_adapter_t *pAdapter) pHddTdlsCtx->pAdapter = pAdapter; - for (i = 0; i < TDLS_PEER_LIST_SIZE; i++) - { - INIT_LIST_HEAD(&pHddTdlsCtx->peer_list[i]); - } - pHddTdlsCtx->curr_candidate = NULL; pHddTdlsCtx->magic = 0; @@ -909,39 +1047,6 @@ void wlan_hdd_tdls_exit(hdd_adapter_t *pAdapter) pHddTdlsCtx = NULL; } -/* stop all monitoring timers per Adapter */ -static void wlan_hdd_tdls_monitor_timers_stop(tdlsCtx_t *pHddTdlsCtx) -{ -#ifdef TDLS_USE_SEPARATE_DISCOVERY_TIMER - vos_timer_stop(&pHddTdlsCtx->peerDiscoverTimer); -#endif - vos_timer_stop(&pHddTdlsCtx->peerDiscoveryTimeoutTimer); -} - -/* stop all per peer timers */ -static void wlan_hdd_tdls_peer_timers_stop(tdlsCtx_t *pHddTdlsCtx) -{ - int i; - struct list_head *head; - struct list_head *pos; - hddTdlsPeer_t *curr_peer; - for (i = 0; i < TDLS_PEER_LIST_SIZE; i++) - { - head = &pHddTdlsCtx->peer_list[i]; - list_for_each (pos, head) { - curr_peer = list_entry (pos, hddTdlsPeer_t, node); - vos_timer_stop( &curr_peer->initiatorWaitTimeoutTimer ); - } - } -} - -/* stop all the tdls timers running */ -static void wlan_hdd_tdls_timers_stop(tdlsCtx_t *pHddTdlsCtx) -{ - wlan_hdd_tdls_monitor_timers_stop(pHddTdlsCtx); - wlan_hdd_tdls_peer_timers_stop(pHddTdlsCtx); -} - /* if mac address exist, return pointer if mac address doesn't exist, create a list and add, return pointer return NULL if fails to get new mac address diff --git a/CORE/MAC/inc/qwlan_version.h b/CORE/MAC/inc/qwlan_version.h index ba099e3c2f5b..f92845ff386c 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 10 #define QWLAN_VERSION_EXTRA "" -#define QWLAN_VERSION_BUILD 72 +#define QWLAN_VERSION_BUILD 73 -#define QWLAN_VERSIONSTR "4.0.10.72" +#define QWLAN_VERSIONSTR "4.0.10.73" #define AR6320_REV1_VERSION 0x5000000 diff --git a/CORE/MAC/inc/sirApi.h b/CORE/MAC/inc/sirApi.h index 8c4d1059f65f..6979f90929fd 100644 --- a/CORE/MAC/inc/sirApi.h +++ b/CORE/MAC/inc/sirApi.h @@ -3724,6 +3724,7 @@ struct roam_ext_params { uint8_t drop_factor_5g; int max_raise_rssi_5g; int max_drop_rssi_5g; + int alert_rssi_threshold; int good_rssi_threshold; int rssi_diff; int good_rssi_roam; diff --git a/CORE/SERVICES/COMMON/targaddrs.h b/CORE/SERVICES/COMMON/targaddrs.h index 05a0fbc3ce5a..1421b5bb69b0 100644 --- a/CORE/SERVICES/COMMON/targaddrs.h +++ b/CORE/SERVICES/COMMON/targaddrs.h @@ -369,6 +369,10 @@ PREPACK64 struct host_interest_s { #define HI_OPTION_USE_EXT_LDO 0x40 /* use LDO27 for 1.1V instead of PMU */ #define HI_OPTION_DBUART_SUPPORT 0x80 /* Enable uart debug support */ +#define HT_OPTION_GPIO_WAKEUP_SUPPORT 0x200 /* GPIO wake up support */ + +#define GPIO_WAKEUP_ENABLED() \ + (HOST_INTEREST->hi_option_flag2 & HT_OPTION_GPIO_WAKEUP_SUPPORT) /* hi_reset_flag */ #define HI_RESET_FLAG_PRESERVE_APP_START 0x01 /* preserve App Start address */ diff --git a/CORE/SERVICES/COMMON/wlan_defs.h b/CORE/SERVICES/COMMON/wlan_defs.h index 2265855ba1dd..c43015430806 100644 --- a/CORE/SERVICES/COMMON/wlan_defs.h +++ b/CORE/SERVICES/COMMON/wlan_defs.h @@ -277,6 +277,8 @@ typedef A_UINT8 A_RATE; #error "Extend rate table module first" #endif +#define MAX_IBSS_PEERS 32 + #if defined(CONFIG_AR900B_SUPPORT) || defined(AR900B) typedef struct{ A_UINT32 psdu_len [NUM_DYN_BW * NUM_SCHED_ENTRIES]; diff --git a/CORE/SERVICES/COMMON/wmi_tlv_defs.h b/CORE/SERVICES/COMMON/wmi_tlv_defs.h index 84114d44075a..1be1bf6b3fe7 100644 --- a/CORE/SERVICES/COMMON/wmi_tlv_defs.h +++ b/CORE/SERVICES/COMMON/wmi_tlv_defs.h @@ -557,6 +557,9 @@ typedef enum { WMITLV_TAG_STRUC_wmi_extscan_hotlist_ssid_match_event_fixed_param, WMITLV_TAG_STRUC_wmi_vdev_tsf_tstamp_action_cmd_fixed_param, WMITLV_TAG_STRUC_wmi_vdev_tsf_report_event_fixed_param, + WMITLV_TAG_STRUC_wmi_get_fw_mem_dump_fixed_param, + WMITLV_TAG_STRUC_wmi_update_fw_mem_dump_fixed_param, + WMITLV_TAG_STRUC_wmi_fw_mem_dump_params } WMITLV_TAG_ID; /* @@ -769,7 +772,8 @@ typedef enum { OP(WMI_DCC_UPDATE_NDL_CMDID) \ OP(WMI_ROAM_FILTER_CMDID) \ OP(WMI_PASSPOINT_LIST_CONFIG_CMDID) \ - OP(WMI_VDEV_TSF_TSTAMP_ACTION_CMDID) + OP(WMI_VDEV_TSF_TSTAMP_ACTION_CMDID) \ + OP(WMI_GET_FW_MEM_DUMP_CMDID) /* * IMPORTANT: Please add _ALL_ WMI Events Here. @@ -872,7 +876,8 @@ typedef enum { OP(WMI_DCC_UPDATE_NDL_RESP_EVENTID) \ OP(WMI_DCC_STATS_EVENTID) \ OP(WMI_PASSPOINT_MATCH_EVENTID) \ - OP(WMI_VDEV_TSF_REPORT_EVENTID) + OP(WMI_VDEV_TSF_REPORT_EVENTID) \ + OP(WMI_UPDATE_FW_MEM_DUMP_EVENTID) /* TLV definitions of WMI commands */ @@ -1312,6 +1317,15 @@ WMITLV_CREATE_PARAM_STRUC(WMI_VDEV_SPECTRAL_SCAN_ENABLE_CMDID); WMITLV_CREATE_PARAM_STRUC(WMI_REQUEST_STATS_CMDID); + +/* Request for memory dump stats Cmd */ +#define WMITLV_TABLE_WMI_GET_FW_MEM_DUMP_CMDID(id,op,buf,len) \ + WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_STRUC_wmi_get_fw_mem_dump_fixed_param, wmi_get_fw_mem_dump_fixed_param, fixed_param, WMITLV_SIZE_FIX) \ + WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_ARRAY_STRUC, wmi_fw_mem_dump, fw_mem_dump_params, WMITLV_SIZE_VAR) + +WMITLV_CREATE_PARAM_STRUC(WMI_GET_FW_MEM_DUMP_CMDID); + + /* Set config params */ #define WMITLV_TABLE_WMI_START_LINK_STATS_CMDID(id,op,buf,len) \ WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_STRUC_wmi_start_link_stats_cmd_fixed_param, wmi_start_link_stats_cmd_fixed_param, fixed_param, WMITLV_SIZE_FIX) @@ -2457,6 +2471,14 @@ WMITLV_CREATE_PARAM_STRUC(WMI_UPDATE_STATS_EVENTID); WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_STRUC_wmi_vdev_rate_stats_event_fixed_param, wmi_vdev_rate_stats_event_fixed_param, fixed_param, WMITLV_SIZE_FIX) \ WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_ARRAY_STRUC, wmi_vdev_rate_ht_info, ht_info, WMITLV_SIZE_VAR) WMITLV_CREATE_PARAM_STRUC(WMI_UPDATE_VDEV_RATE_STATS_EVENTID); + + +/* Update memory dump complete Event */ +#define WMITLV_TABLE_WMI_UPDATE_FW_MEM_DUMP_EVENTID(id,op,buf,len)\ + WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_STRUC_wmi_update_fw_mem_dump_fixed_param, wmi_update_fw_mem_dump_fixed_param, fixed_param, WMITLV_SIZE_FIX) + +WMITLV_CREATE_PARAM_STRUC(WMI_UPDATE_FW_MEM_DUMP_EVENTID); + /* Update iface link stats Event */ #define WMITLV_TABLE_WMI_IFACE_LINK_STATS_EVENTID(id,op,buf,len)\ WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_STRUC_wmi_iface_link_stats_event_fixed_param, wmi_iface_link_stats_event_fixed_param, fixed_param, WMITLV_SIZE_FIX) \ diff --git a/CORE/SERVICES/COMMON/wmi_unified.h b/CORE/SERVICES/COMMON/wmi_unified.h index e843030e4487..d650051a35e9 100644 --- a/CORE/SERVICES/COMMON/wmi_unified.h +++ b/CORE/SERVICES/COMMON/wmi_unified.h @@ -549,6 +549,9 @@ typedef enum { /** Request to clear stats*/ WMI_CLEAR_LINK_STATS_CMDID, + /** Request for getting the Firmware Memory Dump */ + WMI_GET_FW_MEM_DUMP_CMDID, + /** ARP OFFLOAD REQUEST*/ WMI_SET_ARP_NS_OFFLOAD_CMDID=WMI_CMD_GRP_START_ID(WMI_GRP_ARP_NS_OFL), @@ -919,6 +922,9 @@ typedef enum { /** FW Update radio stats Event */ WMI_RADIO_LINK_STATS_EVENTID, + /** Firmware memory dump Complete event*/ + WMI_UPDATE_FW_MEM_DUMP_EVENTID, + /*NLO specific events*/ /** NLO match event after the first match */ WMI_NLO_MATCH_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_NLO_OFL), @@ -2939,6 +2945,42 @@ typedef struct { /** Default value for stats if the stats collection has not started */ #define WMI_STATS_VALUE_INVALID 0xffffffff +typedef struct { + A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_fw_mem_dump */ + /** unique id identifying the segment */ + A_UINT32 seg_id; + /** Start address of the segment to be read */ + A_UINT32 seg_start_addr_lo; + A_UINT32 seg_start_addr_hi; + /** Length of the segment to be read */ + A_UINT32 seg_length; + /** Host bufeer address to which the segment will be read and dumped */ + A_UINT32 dest_addr_lo; + A_UINT32 dest_addr_hi; +} wmi_fw_mem_dump; + +/* Command to get firmware memory dump*/ +typedef struct { + A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_get_fw_mem_dump_fixed_param */ + /** unique id identifying the request */ + A_UINT32 request_id; + /** number of memory dump segments */ + A_UINT32 num_fw_mem_dump_segs; +/** + * This TLV is followed by another TLV + * wmi_fw_mem_dump fw_mem_dump[]; + */ +} wmi_get_fw_mem_dump_fixed_param; + +/** Event to indicate the completion of fw mem dump */ +typedef struct { + A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_update_fw_mem_dump_fixed_param */ + /** unique id identifying the request, given in the request stats command */ + A_UINT32 request_id; + /*In case of Firmware memory dump */ + A_UINT32 fw_mem_dump_complete; +} wmi_update_fw_mem_dump_fixed_param; + typedef enum { WMI_ROAMING_IDLE = 0, WMI_ROAMING_ACTIVE = 1, @@ -10456,9 +10498,42 @@ typedef struct { A_UINT32 status; } wmi_dcc_update_ndl_resp_event_fixed_param; -/** +/* Actions for TSF timestamp */ +typedef enum { + TSF_TSTAMP_CAPTURE_REQ = 1, + TSF_TSTAMP_CAPTURE_RESET = 2, + TSF_TSTAMP_READ_VALUE = 3, +} wmi_tsf_tstamp_action; + +typedef struct { + /** TLV tag and len; tag equals + * WMITLV_TAG_STRUC_wmi_vdev_tsf_tstamp_action_cmd_fixed_param */ + A_UINT32 tlv_header; + /** unique id identifying the VDEV, generated by the caller */ + A_UINT32 vdev_id; + /* action type, refer to wmi_tsf_tstamp_action */ + A_UINT32 tsf_action; +} wmi_vdev_tsf_tstamp_action_cmd_fixed_param; + +typedef struct { + /* TLV tag and len; tag equals + * WMITLV_TAG_STRUC_wmi_vdev_tsf_report_event_fixed_param */ + A_UINT32 tlv_header; + /* VDEV identifier */ + A_UINT32 vdev_id; + /* low 32bit of tsf */ + A_UINT32 tsf_low; + /* high 32 bit of tsf */ + A_UINT32 tsf_high; +} wmi_vdev_tsf_report_event_fixed_param; + +/* ADD NEW DEFS HERE */ + + +/***************************************************************************** * The following structures are deprecated. DO NOT USE THEM! */ + /** Max number of channels in the schedule. */ #define OCB_CHANNEL_MAX (5) @@ -10513,40 +10588,12 @@ typedef struct { /** Return status. 0 for success, non-zero otherwise */ A_UINT32 status; } wmi_ocb_set_sched_event_fixed_param; -/** + +/***************************************************************************** * END DEPRECATED */ - -/* Actions for TSF timestamp */ -typedef enum { - TSF_TSTAMP_CAPTURE_REQ = 1, - TSF_TSTAMP_CAPTURE_RESET = 2, - TSF_TSTAMP_READ_VALUE = 3, -} wmi_tsf_tstamp_action; - -typedef struct { - /** TLV tag and len; tag equals - * WMITLV_TAG_STRUC_wmi_vdev_tsf_tstamp_action_cmd_fixed_param */ - A_UINT32 tlv_header; - /** unique id identifying the VDEV, generated by the caller */ - A_UINT32 vdev_id; - /* action type, refer to wmi_tsf_tstamp_action */ - A_UINT32 tsf_action; -} wmi_vdev_tsf_tstamp_action_cmd_fixed_param; - -typedef struct { - /* TLV tag and len; tag equals - * WMITLV_TAG_STRUC_wmi_vdev_tsf_report_event_fixed_param */ - A_UINT32 tlv_header; - /* VDEV identifier */ - A_UINT32 vdev_id; - /* low 32bit of tsf */ - A_UINT32 tsf_low; - /* high 32 bit of tsf */ - A_UINT32 tsf_high; -} wmi_vdev_tsf_report_event_fixed_param; - +/* ADD NEW DEFS ABOVE THIS DEPRECATED SECTION */ #ifdef __cplusplus } diff --git a/CORE/SERVICES/COMMON/wmi_version.h b/CORE/SERVICES/COMMON/wmi_version.h index 7c67b024cd6a..c9ffe84b946b 100644 --- a/CORE/SERVICES/COMMON/wmi_version.h +++ b/CORE/SERVICES/COMMON/wmi_version.h @@ -36,7 +36,7 @@ #define __WMI_VER_MINOR_ 0 /** WMI revision number has to be incremented when there is a * change that may or may not break compatibility. */ -#define __WMI_REVISION_ 105 +#define __WMI_REVISION_ 106 /** The Version Namespace should not be normally changed. Only * host and firmware of the same WMI namespace will work diff --git a/CORE/SERVICES/WMI/wmi_unified.c b/CORE/SERVICES/WMI/wmi_unified.c index f94d43e6d156..a7fb4f692d90 100644 --- a/CORE/SERVICES/WMI/wmi_unified.c +++ b/CORE/SERVICES/WMI/wmi_unified.c @@ -572,6 +572,7 @@ static u_int8_t* get_wmi_cmd_string(WMI_CMD_ID wmi_command) CASE_RETURN_STRING(WMI_REQUEST_LINK_STATS_CMDID); CASE_RETURN_STRING(WMI_START_LINK_STATS_CMDID); CASE_RETURN_STRING(WMI_CLEAR_LINK_STATS_CMDID); + CASE_RETURN_STRING(WMI_GET_FW_MEM_DUMP_CMDID); CASE_RETURN_STRING(WMI_LPI_MGMT_SNOOPING_CONFIG_CMDID); CASE_RETURN_STRING(WMI_LPI_START_SCAN_CMDID); CASE_RETURN_STRING(WMI_LPI_STOP_SCAN_CMDID); diff --git a/CORE/SME/src/csr/csrApiRoam.c b/CORE/SME/src/csr/csrApiRoam.c index 4466fd7fa60b..29636b23e675 100644 --- a/CORE/SME/src/csr/csrApiRoam.c +++ b/CORE/SME/src/csr/csrApiRoam.c @@ -9392,7 +9392,7 @@ eHalStatus csrRoamPrepareFilterFromProfile(tpAniSirGlobal pMac, tCsrRoamProfile if (pScanFilter->scan_filter_for_roam && roam_params->num_ssid_allowed_list) { pScanFilter->SSIDs.numOfSSIDs = - (1 + roam_params->num_ssid_allowed_list); + roam_params->num_ssid_allowed_list; size = sizeof(tCsrSSIDInfo) * pScanFilter->SSIDs.numOfSSIDs; pScanFilter->SSIDs.SSIDList = vos_mem_malloc(size); if ( NULL == pScanFilter->SSIDs.SSIDList) @@ -9410,13 +9410,6 @@ eHalStatus csrRoamPrepareFilterFromProfile(tpAniSirGlobal pMac, tCsrRoamProfile pScanFilter->SSIDs.SSIDList[i].handoffPermitted = 1; pScanFilter->SSIDs.SSIDList[i].ssidHidden = 0; } - pScanFilter->SSIDs.SSIDList[i].SSID.length = - pProfile->SSIDs.SSIDList->SSID.length; - vos_mem_copy(pScanFilter->SSIDs.SSIDList[i].SSID.ssId, - pProfile->SSIDs.SSIDList->SSID.ssId, - pProfile->SSIDs.SSIDList->SSID.length); - pScanFilter->SSIDs.SSIDList[i].handoffPermitted = 1; - pScanFilter->SSIDs.SSIDList[i].ssidHidden = 0; } else { size = sizeof(tCsrSSIDInfo) * pProfile->SSIDs.numOfSSIDs; pScanFilter->SSIDs.SSIDList = vos_mem_malloc(size); @@ -16619,6 +16612,54 @@ void csrRoamOffload(tpAniSirGlobal pMac, tSirRoamOffloadScanReq *pRequestBuf, } #endif +/** + * check_allowed_ssid_list() - Check the WhiteList + * @req_buffer: Buffer which contains the connected profile SSID. + * @roam_params: Buffer which contains the whitelist SSID's. + * + * Check if the connected profile SSID exists in the whitelist. + * It is assumed that the framework provides this also in the whitelist. + * If it exists there is no issue. Otherwise add it to the list. + * + * Return: None + */ +static void check_allowed_ssid_list(tSirRoamOffloadScanReq *req_buffer, + struct roam_ext_params *roam_params) +{ + int i = 0; + bool match = false; + for (i = 0; i < roam_params->num_ssid_allowed_list; i++) { + if ((roam_params->ssid_allowed_list[i].length == + req_buffer->ConnectedNetwork.ssId.length) && + vos_mem_compare(roam_params->ssid_allowed_list[i].ssId, + req_buffer->ConnectedNetwork.ssId.ssId, + roam_params->ssid_allowed_list[i].length)) { + VOS_TRACE(VOS_MODULE_ID_SME, VOS_TRACE_LEVEL_DEBUG, + "Whitelist contains connected profile SSID"); + match = true; + break; + } + } + if (!match) { + if (roam_params->num_ssid_allowed_list >= + MAX_SSID_ALLOWED_LIST) { + VOS_TRACE(VOS_MODULE_ID_SME, VOS_TRACE_LEVEL_DEBUG, + "Whitelist is FULL. Cannot Add another entry"); + return; + } + VOS_TRACE(VOS_MODULE_ID_SME, VOS_TRACE_LEVEL_DEBUG, + "Adding Connected profile SSID to whitelist"); + /* i is the next available index to add the entry.*/ + i = roam_params->num_ssid_allowed_list; + vos_mem_copy(roam_params->ssid_allowed_list[i].ssId, + req_buffer->ConnectedNetwork.ssId.ssId, + req_buffer->ConnectedNetwork.ssId.length); + roam_params->ssid_allowed_list[i].length = + req_buffer->ConnectedNetwork.ssId.length; + roam_params->num_ssid_allowed_list++; + } +} + eHalStatus csrRoamOffloadScan(tpAniSirGlobal pMac, tANI_U8 sessionId, tANI_U8 command, tANI_U8 reason) { @@ -16678,9 +16719,10 @@ eHalStatus csrRoamOffloadScan(tpAniSirGlobal pMac, tANI_U8 sessionId, if ((pMac->roam.neighborRoamInfo[sessionId].neighborRoamState == eCSR_NEIGHBOR_ROAM_STATE_INIT) && - (command != ROAM_SCAN_OFFLOAD_STOP)) + (command != ROAM_SCAN_OFFLOAD_STOP) && + (reason != REASON_ROAM_SET_BLACKLIST_BSSID)) { - VOS_TRACE(VOS_MODULE_ID_SME, VOS_TRACE_LEVEL_INFO, + VOS_TRACE(VOS_MODULE_ID_SME, VOS_TRACE_LEVEL_DEBUG, FL("Scan Command not sent to FW with state = %s and cmd=%d"), macTraceGetNeighbourRoamState( pMac->roam.neighborRoamInfo[sessionId].neighborRoamState), command); @@ -16725,8 +16767,6 @@ eHalStatus csrRoamOffloadScan(tpAniSirGlobal pMac, tANI_U8 sessionId, pMac->roam.roamSession[sessionId].connectedProfile.EncryptionType; pRequestBuf->ConnectedNetwork.mcencryption = pMac->roam.roamSession[sessionId].connectedProfile.mcEncryptionType; - pRequestBuf->LookupThreshold = - (v_S7_t)pNeighborRoamInfo->cfgParams.neighborLookupThreshold * (-1); pRequestBuf->delay_before_vdev_stop = pNeighborRoamInfo->cfgParams.delay_before_vdev_stop; pRequestBuf->OpportunisticScanThresholdDiff = @@ -16955,8 +16995,18 @@ eHalStatus csrRoamOffloadScan(tpAniSirGlobal pMac, tANI_U8 sessionId, #endif roam_params_dst = &pRequestBuf->roam_params; roam_params_src = &pMac->roam.configParam.roam_params; - vos_mem_copy(&pRequestBuf->roam_params, &pMac->roam.configParam.roam_params, - sizeof(pRequestBuf->roam_params)); + if (reason == REASON_ROAM_SET_SSID_ALLOWED) + check_allowed_ssid_list(pRequestBuf, roam_params_src); + /* Configure the lookup threshold either from INI or from framework. + * If both are present, give higher priority to the one from framework. + */ + if (roam_params_src->alert_rssi_threshold) + pRequestBuf->LookupThreshold = roam_params_src->alert_rssi_threshold; + else + pRequestBuf->LookupThreshold = + (v_S7_t)pNeighborRoamInfo->cfgParams.neighborLookupThreshold * (-1); + vos_mem_copy(roam_params_dst, roam_params_src, + sizeof(struct roam_ext_params)); pRequestBuf->hi_rssi_scan_max_count = pNeighborRoamInfo->cfgParams.hi_rssi_scan_max_count; pRequestBuf->hi_rssi_scan_delay = @@ -16995,14 +17045,16 @@ eHalStatus csrRoamOffloadScan(tpAniSirGlobal pMac, tANI_U8 sessionId, "num_bssid_avoid_list: %d, num_ssid_allowed_list:%d, num_bssid_favored:%d," "raise_rssi_thresh_5g: %d, drop_rssi_thresh_5g:%d, raise_rssi_type_5g:%d," "raise_factor_5g:%d, drop_rssi_type_5g:%d, drop_factor_5g:%d," - "max_raise_rssi_5g=%d, max_drop_rssi_5g:%d, good_rssi_threshold:%d", + "max_raise_rssi_5g=%d, max_drop_rssi_5g:%d, good_rssi_threshold:%d," + "alert_rssi_threshold:%d", roam_params_dst->num_bssid_avoid_list, roam_params_dst->num_ssid_allowed_list, roam_params_dst->num_bssid_favored, roam_params_dst->raise_rssi_thresh_5g, roam_params_dst->drop_rssi_thresh_5g, roam_params_dst->raise_rssi_type_5g, roam_params_dst->raise_factor_5g, roam_params_dst->drop_rssi_type_5g, roam_params_dst->drop_factor_5g, roam_params_dst->max_raise_rssi_5g, - roam_params_dst->max_drop_rssi_5g, roam_params_dst->good_rssi_threshold); + roam_params_dst->max_drop_rssi_5g, roam_params_dst->good_rssi_threshold, + roam_params_dst->alert_rssi_threshold); for (i = 0; i < roam_params_dst->num_bssid_avoid_list; i++) { VOS_TRACE(VOS_MODULE_ID_SME, VOS_TRACE_LEVEL_DEBUG, diff --git a/CORE/SME/src/csr/csrNeighborRoam.c b/CORE/SME/src/csr/csrNeighborRoam.c index 973ae14bbf0c..edf83e2d0e96 100644 --- a/CORE/SME/src/csr/csrNeighborRoam.c +++ b/CORE/SME/src/csr/csrNeighborRoam.c @@ -1819,8 +1819,9 @@ csrNeighborRoamPrepareScanProfileFilter(tpAniSirGlobal pMac, VOS_TRACE (VOS_MODULE_ID_SME, VOS_TRACE_LEVEL_DEBUG, FL("No of Allowed SSID List:%d"), roam_params->num_ssid_allowed_list); if (roam_params->num_ssid_allowed_list) { - pScanFilter->SSIDs.numOfSSIDs = (1 + roam_params->num_ssid_allowed_list); - pScanFilter->SSIDs.SSIDList = vos_mem_malloc(sizeof(tCsrSSIDInfo) * pScanFilter->SSIDs.numOfSSIDs); + pScanFilter->SSIDs.numOfSSIDs = (roam_params->num_ssid_allowed_list); + pScanFilter->SSIDs.SSIDList = + vos_mem_malloc(sizeof(tCsrSSIDInfo) * pScanFilter->SSIDs.numOfSSIDs); if (NULL == pScanFilter->SSIDs.SSIDList) { smsLog(pMac, LOGE, FL("Scan Filter SSID mem alloc failed")); return eHAL_STATUS_FAILED_ALLOC; @@ -1834,13 +1835,6 @@ csrNeighborRoamPrepareScanProfileFilter(tpAniSirGlobal pMac, pScanFilter->SSIDs.SSIDList[i].SSID.length = roam_params->ssid_allowed_list[i].length; } - vos_mem_copy((void *)pScanFilter->SSIDs.SSIDList[i].SSID.ssId, - (void *)pCurProfile->SSID.ssId, - pCurProfile->SSID.length); - pScanFilter->SSIDs.SSIDList[i].SSID.length = - pCurProfile->SSID.length; - pScanFilter->SSIDs.SSIDList[i].handoffPermitted = 1; - pScanFilter->SSIDs.SSIDList[i].ssidHidden = 0; } else { /* Populate all the information from the connected profile */ pScanFilter->SSIDs.numOfSSIDs = 1; @@ -4764,17 +4758,15 @@ csrNeighborRoamNeighborLookupDOWNCallback (v_PVOID_t pAdapter, void csr_roam_reset_roam_params(tpAniSirGlobal mac_ctx) { struct roam_ext_params *roam_params = NULL; - /* clear all the whitelist and preferred BSSID parameters, + /* clear all the whitelist parameters, * remaining needs to be retained across connections. */ - VOS_TRACE(VOS_MODULE_ID_SME, VOS_TRACE_LEVEL_DEBUG, - FL("Whitelist and preferred BSSID are reset")); + + VOS_TRACE(VOS_MODULE_ID_SME, VOS_TRACE_LEVEL_ERROR, + FL("Roaming parameters are reset")); roam_params = &mac_ctx->roam.configParam.roam_params; roam_params->num_ssid_allowed_list = 0; - roam_params->num_bssid_favored = 0; vos_mem_set(&roam_params->ssid_allowed_list, 0, sizeof(tSirMacSSid) * MAX_SSID_ALLOWED_LIST); - vos_mem_set(&roam_params->bssid_favored, 0, - sizeof(tSirMacAddr) * MAX_BSSID_FAVORED); } /* --------------------------------------------------------------------------- diff --git a/CORE/SME/src/sme_common/sme_Api.c b/CORE/SME/src/sme_common/sme_Api.c index a7cfa29ba79f..fb503d35f92c 100644 --- a/CORE/SME/src/sme_common/sme_Api.c +++ b/CORE/SME/src/sme_common/sme_Api.c @@ -1708,6 +1708,8 @@ eHalStatus sme_update_roam_params(tHalHandle hHal, roam_params_src.max_raise_rssi_5g; roam_params_dst->max_drop_rssi_5g= roam_params_src.max_drop_rssi_5g; + roam_params_dst->alert_rssi_threshold = + roam_params_src.alert_rssi_threshold; roam_params_dst->is_5g_pref_enabled = true; break; case REASON_ROAM_SET_SSID_ALLOWED: @@ -1746,11 +1748,12 @@ eHalStatus sme_update_roam_params(tHalHandle hHal, &roam_params_src.bssid_avoid_list[i], sizeof(tSirMacAddr)); } + break; default: break; } - csrRoamOffloadScan(pMac, session_id, ROAM_SCAN_OFFLOAD_UPDATE_CFG, - update_param); + csrRoamOffloadScan(pMac, session_id, + ROAM_SCAN_OFFLOAD_UPDATE_CFG, update_param); return 0; } #ifdef WLAN_FEATURE_GTK_OFFLOAD |
