diff options
| -rw-r--r-- | core/cds/inc/cds_config.h | 2 | ||||
| -rw-r--r-- | core/cds/inc/cds_regdomain.h | 8 | ||||
| -rw-r--r-- | core/cds/inc/cds_sched.h | 24 | ||||
| -rw-r--r-- | core/cds/src/cds_api.c | 7 | ||||
| -rw-r--r-- | core/cds/src/cds_concurrency.c | 3 | ||||
| -rw-r--r-- | core/cds/src/cds_regdomain.c | 4 | ||||
| -rw-r--r-- | core/cds/src/cds_sched.c | 48 | ||||
| -rw-r--r-- | core/hdd/inc/wlan_hdd_cfg.h | 4 | ||||
| -rw-r--r-- | core/hdd/src/wlan_hdd_assoc.c | 7 | ||||
| -rw-r--r-- | core/hdd/src/wlan_hdd_cfg80211.c | 7 | ||||
| -rw-r--r-- | core/hdd/src/wlan_hdd_hostapd.c | 32 | ||||
| -rw-r--r-- | core/hdd/src/wlan_hdd_main.c | 1 | ||||
| -rw-r--r-- | core/hdd/src/wlan_hdd_power.c | 11 | ||||
| -rw-r--r-- | core/hdd/src/wlan_hdd_scan.c | 33 | ||||
| -rw-r--r-- | core/hdd/src/wlan_hdd_scan.h | 20 | ||||
| -rw-r--r-- | core/mac/inc/qwlan_version.h | 6 | ||||
| -rw-r--r-- | core/sap/inc/sap_api.h | 1 | ||||
| -rw-r--r-- | core/sap/src/sap_fsm.c | 6 | ||||
| -rw-r--r-- | core/sme/inc/sme_rrm_internal.h | 1 | ||||
| -rw-r--r-- | core/sme/src/common/sme_api.c | 6 | ||||
| -rw-r--r-- | core/sme/src/rrm/sme_rrm.c | 43 | ||||
| -rw-r--r-- | core/wma/src/wma_features.c | 8 | ||||
| -rw-r--r-- | core/wma/src/wma_main.c | 6 |
23 files changed, 238 insertions, 50 deletions
diff --git a/core/cds/inc/cds_config.h b/core/cds/inc/cds_config.h index 33bb3b73a721..e311a2d32b22 100644 --- a/core/cds/inc/cds_config.h +++ b/core/cds/inc/cds_config.h @@ -155,6 +155,7 @@ enum cds_auto_pwr_detect_failure_mode_t { * @bandcapability: Configured band by user * @etsi_srd_chan_in_master_mode: Use of ETSI SRD chan in SAP/P2P-GO ACS/PCL * @dot11p_mode: dot11p user configuration + * @dfs_master_enable: DFS master capability * Structure for holding cds ini parameters. */ @@ -221,6 +222,7 @@ struct cds_config_info { uint8_t bandcapability; bool etsi_srd_chan_in_master_mode; uint8_t dot11p_mode; + bool dfs_master_enable; }; #ifdef WLAN_FEATURE_FILS_SK diff --git a/core/cds/inc/cds_regdomain.h b/core/cds/inc/cds_regdomain.h index 283d28b61716..b65995fe663f 100644 --- a/core/cds/inc/cds_regdomain.h +++ b/core/cds/inc/cds_regdomain.h @@ -152,6 +152,7 @@ enum country_code { CTRY_ISRAEL = 376, CTRY_ITALY = 380, CTRY_JAMAICA = 388, + CTRY_JAPAN = 392, CTRY_JORDAN = 400, CTRY_KAZAKHSTAN = 398, CTRY_KENYA = 404, @@ -253,11 +254,6 @@ enum country_code { CTRY_WALLIS_AND_FUTUNA = 876, CTRY_YEMEN = 887, CTRY_ZIMBABWE = 716, - CTRY_JAPAN9 = 4009, - CTRY_JAPAN15 = 4015, - CTRY_JAPAN48 = 4048, - CTRY_JAPAN55 = 4055, - CTRY_JAPAN60 = 4060, CTRY_XA = 4100, }; @@ -302,7 +298,7 @@ enum reg_domain { ETSI9_WORLD = 0x3E, ETSI10_WORLD = 0x24, ETSI11_WORLD = 0x26, - ETSI13_WORLD = 0x28, + ETSI13_WORLD = 0x27, ETSI14_WORLD = 0x29, ETSI15_WORLD = 0x31, diff --git a/core/cds/inc/cds_sched.h b/core/cds/inc/cds_sched.h index 304dfa364a69..6b5f7a7841df 100644 --- a/core/cds/inc/cds_sched.h +++ b/core/cds/inc/cds_sched.h @@ -384,6 +384,16 @@ void cds_indicate_rxpkt(p_cds_sched_context pSchedContext, */ void cds_wakeup_rx_thread(p_cds_sched_context pSchedContext); +/** + * cds_close_rx_thread() - close the Tlshim Rx thread + * @p_cds_context: Pointer to the global CDS Context + * + * This api closes the Tlshim Rx thread: + * + * Return: qdf status + */ +QDF_STATUS cds_close_rx_thread(void *p_cds_context); + /*--------------------------------------------------------------------------- \brief cds_alloc_ol_rx_pkt() - API to return next available cds message The \a cds_alloc_ol_rx_pkt() returns next available cds message buffer @@ -461,6 +471,20 @@ void cds_wakeup_rx_thread(p_cds_sched_context pSchedContext) } /** + * cds_close_rx_thread() - close the Tlshim Rx thread + * @p_cds_context: Pointer to the global CDS Context + * + * This api closes the Tlshim Rx thread: + * + * Return: qdf status + */ +static inline +QDF_STATUS cds_close_rx_thread(void *p_cds_context) +{ + return QDF_STATUS_SUCCESS; +} + +/** * cds_alloc_ol_rx_pkt() - API to return next available cds message * @pSchedContext: pointer to CDS Sched Context * diff --git a/core/cds/src/cds_api.c b/core/cds/src/cds_api.c index 20e9a9d99ccf..531afce9e0c6 100644 --- a/core/cds/src/cds_api.c +++ b/core/cds/src/cds_api.c @@ -916,6 +916,7 @@ QDF_STATUS cds_post_disable(void) tp_wma_handle wma_handle; struct hif_opaque_softc *hif_ctx; ol_txrx_pdev_handle txrx_pdev; + QDF_STATUS qdf_status; wma_handle = cds_get_context(QDF_MODULE_ID_WMA); if (!wma_handle) { @@ -959,6 +960,12 @@ QDF_STATUS cds_post_disable(void) htc_stop(gp_cds_context->htc_ctx); } + qdf_status = cds_close_rx_thread(gp_cds_context); + if (!QDF_IS_STATUS_SUCCESS(qdf_status)) { + cds_err("Failed to close RX thread!"); + return QDF_STATUS_E_INVAL; + } + ol_txrx_pdev_pre_detach(txrx_pdev, 1); return QDF_STATUS_SUCCESS; diff --git a/core/cds/src/cds_concurrency.c b/core/cds/src/cds_concurrency.c index 9843c1a196c4..ad4c98136696 100644 --- a/core/cds/src/cds_concurrency.c +++ b/core/cds/src/cds_concurrency.c @@ -5238,6 +5238,9 @@ static QDF_STATUS cds_get_channel_list(enum cds_pcl_type pcl, skip_dfs_channel = true; } + if (!cds_cfg->dfs_master_enable) + skip_dfs_channel = true; + if ((mode == CDS_SAP_MODE) || (mode == CDS_P2P_GO_MODE)) { skip_srd_chan = !cds_cfg->etsi_srd_chan_in_master_mode && cds_is_5g_regdmn_etsi13(); diff --git a/core/cds/src/cds_regdomain.c b/core/cds/src/cds_regdomain.c index 35cee7dd9569..9cf377b73445 100644 --- a/core/cds/src/cds_regdomain.c +++ b/core/cds/src/cds_regdomain.c @@ -209,7 +209,7 @@ static const struct reg_dmn_pair g_reg_dmn_pairs[] = { {WORA_WORLD, WORA_WORLD, WORA_WORLD, CTRY_DEFAULT}, {WORB_WORLD, WORB_WORLD, WORB_WORLD, CTRY_DEFAULT}, {WORC_WORLD, WORC_WORLD, WORC_WORLD, CTRY_DEFAULT}, - {MKK5_MKKC, MKK5, MKKC, CTRY_JAPAN15}, + {MKK5_MKKC, MKK5, MKKC, CTRY_JAPAN}, {MKK5_MKKA2, MKK5, MKKA, CTRY_DEFAULT}, }; @@ -385,7 +385,7 @@ static const struct country_code_to_reg_dmn g_all_countries[] = { {CTRY_WALLIS_AND_FUTUNA, ETSI1_WORLD, "WF" "WALLIS"}, {CTRY_YEMEN, NULL1_WORLD, "YE", "YEMEN"}, {CTRY_ZIMBABWE, ETSI1_WORLD, "ZW", "ZIMBABWE"}, - {CTRY_JAPAN15, MKK5_MKKC, "JP", "JAPAN"}, + {CTRY_JAPAN, MKK5_MKKC, "JP", "JAPAN"}, {CTRY_XA, MKK5_MKKA2, "XA", "JAPAN PASSIVE"} }; diff --git a/core/cds/src/cds_sched.c b/core/cds/src/cds_sched.c index a2c3a21b8d13..d06b8de713ff 100644 --- a/core/cds/src/cds_sched.c +++ b/core/cds/src/cds_sched.c @@ -1066,6 +1066,41 @@ cds_wakeup_rx_thread(p_cds_sched_context pSchedContext) } /** + * cds_close_rx_thread() - close the Tlshim Rx thread + * @p_cds_context: Pointer to the global CDS Context + * + * This api closes the Tlshim Rx thread: + * + * Return: qdf status + */ +QDF_STATUS cds_close_rx_thread(void *p_cds_context) +{ + QDF_TRACE(QDF_MODULE_ID_QDF, QDF_TRACE_LEVEL_INFO_HIGH, + "%s: invoked", __func__); + + if (gp_cds_sched_context == NULL) { + QDF_TRACE(QDF_MODULE_ID_QDF, QDF_TRACE_LEVEL_ERROR, + "%s: gp_cds_sched_context == NULL", __func__); + return QDF_STATUS_E_FAILURE; + } + + if (!gp_cds_sched_context->ol_rx_thread) + return QDF_STATUS_SUCCESS; + + /* Shut down Tlshim Rx thread */ + set_bit(RX_SHUTDOWN_EVENT, &gp_cds_sched_context->ol_rx_event_flag); + set_bit(RX_POST_EVENT, &gp_cds_sched_context->ol_rx_event_flag); + wake_up_interruptible(&gp_cds_sched_context->ol_rx_wait_queue); + wait_for_completion(&gp_cds_sched_context->ol_rx_shutdown); + gp_cds_sched_context->ol_rx_thread = NULL; + cds_drop_rxpkt_by_staid(gp_cds_sched_context, WLAN_MAX_STA_COUNT); + cds_free_ol_rx_pkt_freeq(gp_cds_sched_context); + qdf_cpuhp_unregister(&gp_cds_sched_context->cpuhp_event_handle); + + return QDF_STATUS_SUCCESS; +} /* cds_close_rx_thread */ + +/** * cds_drop_rxpkt_by_staid() - api to drop pending rx packets for a sta * @pSchedContext: Pointer to the global CDS Sched Context * @staId: Station Id @@ -1316,17 +1351,8 @@ QDF_STATUS cds_sched_close(void *p_cds_context) /* Deinit all the queues */ cds_sched_deinit_mqs(gp_cds_sched_context); -#ifdef QCA_CONFIG_SMP - /* Shut down Tlshim Rx thread */ - set_bit(RX_SHUTDOWN_EVENT, &gp_cds_sched_context->ol_rx_event_flag); - set_bit(RX_POST_EVENT, &gp_cds_sched_context->ol_rx_event_flag); - wake_up_interruptible(&gp_cds_sched_context->ol_rx_wait_queue); - wait_for_completion(&gp_cds_sched_context->ol_rx_shutdown); - gp_cds_sched_context->ol_rx_thread = NULL; - cds_drop_rxpkt_by_staid(gp_cds_sched_context, WLAN_MAX_STA_COUNT); - cds_free_ol_rx_pkt_freeq(gp_cds_sched_context); - qdf_cpuhp_unregister(&gp_cds_sched_context->cpuhp_event_handle); -#endif + cds_close_rx_thread(p_cds_context); + gp_cds_sched_context = NULL; return QDF_STATUS_SUCCESS; } /* cds_sched_close() */ diff --git a/core/hdd/inc/wlan_hdd_cfg.h b/core/hdd/inc/wlan_hdd_cfg.h index 520de6a2ae9a..b629ab45d7d7 100644 --- a/core/hdd/inc/wlan_hdd_cfg.h +++ b/core/hdd/inc/wlan_hdd_cfg.h @@ -2860,7 +2860,7 @@ enum hdd_dot11_mode { * * @min: 0x0 * @max: 0xffffffff - * @defalut: 0xc8a + * @defalut: 0xc83 * * |31 12| 11 | 10 |9 8|7 6|5 4|3 2| 1 | 0 | * +------+------+------+------+------+------+------+-----+-----+ @@ -2893,7 +2893,7 @@ enum hdd_dot11_mode { #define CFG_LATENCY_FLAGS_ULTRALOW_NAME "wlm_latency_flags_ultralow" #define CFG_LATENCY_FLAGS_ULTRALOW_MIN (0x0) #define CFG_LATENCY_FLAGS_ULTRALOW_MAX (0xffffffff) -#define CFG_LATENCY_FLAGS_ULTRALOW_DEFAULT (0xc8a) +#define CFG_LATENCY_FLAGS_ULTRALOW_DEFAULT (0xc83) #define CFG_INTF0_MAC_ADDR_NAME "Intf0MacAddress" #define CFG_INTF0_MAC_ADDR_MIN "000000000000" diff --git a/core/hdd/src/wlan_hdd_assoc.c b/core/hdd/src/wlan_hdd_assoc.c index fc669066af40..6c918ea58792 100644 --- a/core/hdd/src/wlan_hdd_assoc.c +++ b/core/hdd/src/wlan_hdd_assoc.c @@ -53,6 +53,7 @@ #include "wlan_hdd_napi.h" #include <wlan_logging_sock_svc.h> #include "wlan_hdd_tsf.h" +#include "wlan_hdd_scan.h" /* These are needed to recognize WPA and RSN suite types */ #define HDD_WPA_OUI_SIZE 4 @@ -2613,6 +2614,12 @@ static QDF_STATUS hdd_association_completion_handler(hdd_adapter_t *pAdapter, } /* + * reset scan reject params if connection is success or we received + * final failure from CSR after trying with all APs. + */ + hdd_reset_scan_reject_params(pHddCtx, roamStatus, roamResult); + + /* * Enable roaming on other STA iface except this one. * Firmware dosent support connection on one STA iface while * roaming on other STA iface diff --git a/core/hdd/src/wlan_hdd_cfg80211.c b/core/hdd/src/wlan_hdd_cfg80211.c index 2ed23470d770..a8bb76e62349 100644 --- a/core/hdd/src/wlan_hdd_cfg80211.c +++ b/core/hdd/src/wlan_hdd_cfg80211.c @@ -1725,6 +1725,13 @@ static int __wlan_hdd_cfg80211_do_acs(struct wiphy *wiphy, else sap_config->acs_cfg.ch_width = CH_WIDTH_20MHZ; + /* + * Update dfs master capability info in acs cfg, used to exclude + * the dfs channels from acs scan list, in API sap_get_channel_list + */ + sap_config->acs_cfg.dfs_master_enable = + hdd_ctx->config->enableDFSMasterCap; + /* hw_mode = a/b/g: QCA_WLAN_VENDOR_ATTR_ACS_CH_LIST and * QCA_WLAN_VENDOR_ATTR_ACS_FREQ_LIST attrs are present, and * QCA_WLAN_VENDOR_ATTR_ACS_CH_LIST is used for obtaining the diff --git a/core/hdd/src/wlan_hdd_hostapd.c b/core/hdd/src/wlan_hdd_hostapd.c index 839bb386ebe1..6c5ae98d40fd 100644 --- a/core/hdd/src/wlan_hdd_hostapd.c +++ b/core/hdd/src/wlan_hdd_hostapd.c @@ -7969,6 +7969,7 @@ int wlan_hdd_cfg80211_start_bss(hdd_adapter_t *pHostapdAdapter, tsap_Config_t *pConfig; beacon_data_t *pBeacon = NULL; struct ieee80211_mgmt *pMgmt_frame; + struct ieee80211_mgmt mgmt; uint8_t *pIe = NULL; uint16_t capab_info; eCsrAuthType RSNAuthType; @@ -7989,6 +7990,7 @@ int wlan_hdd_cfg80211_start_bss(hdd_adapter_t *pHostapdAdapter, enum dfs_mode mode; bool disable_fw_tdls_state = false; uint8_t ignore_cac = 0; + uint8_t beacon_fixed_len; hdd_adapter_t *sta_adapter; ENTER(); @@ -8069,7 +8071,8 @@ int wlan_hdd_cfg80211_start_bss(hdd_adapter_t *pHostapdAdapter, hdd_update_indoor_channel(pHddCtx, false); hdd_err("Can't start BSS: update channel list failed"); qdf_mem_free(sme_config); - return -EINVAL; + ret = -EINVAL; + goto enable_roaming; } /* check if STA is on indoor channel*/ @@ -8094,6 +8097,21 @@ int wlan_hdd_cfg80211_start_bss(hdd_adapter_t *pHostapdAdapter, pBeacon = pHostapdAdapter->sessionCtx.ap.beacon; + /* + * beacon_fixed_len is the fixed length of beacon + * frame which includes only mac header length and + * beacon manadatory fields like timestamp, + * beacon_int and capab_info. + * (From the reference of struct ieee80211_mgmt) + */ + beacon_fixed_len = sizeof(mgmt) - sizeof(mgmt.u) + + sizeof(mgmt.u.beacon); + if (pBeacon->head_len < beacon_fixed_len) { + hdd_err("Invalid beacon head len"); + ret = -EINVAL; + goto error; + } + pMgmt_frame = (struct ieee80211_mgmt *)pBeacon->head; pConfig->beacon_int = pMgmt_frame->u.beacon.beacon_int; @@ -8413,9 +8431,12 @@ int wlan_hdd_cfg80211_start_bss(hdd_adapter_t *pHostapdAdapter, if (!(ssid && qdf_str_len(PRE_CAC_SSID) == ssid_len && (0 == qdf_mem_cmp(ssid, PRE_CAC_SSID, ssid_len)))) { + uint16_t beacon_data_len; + + beacon_data_len = pBeacon->head_len - beacon_fixed_len; pIe = wlan_hdd_cfg80211_get_ie_ptr( &pMgmt_frame->u.beacon.variable[0], - pBeacon->head_len, WLAN_EID_SUPP_RATES); + beacon_data_len, WLAN_EID_SUPP_RATES); if (pIe != NULL) { pIe++; @@ -8560,11 +8581,8 @@ int wlan_hdd_cfg80211_start_bss(hdd_adapter_t *pHostapdAdapter, wlansap_reset_sap_config_add_ie(pConfig, eUPDATE_IE_ALL); /* Bss already started. just return. */ /* TODO Probably it should update some beacon params. */ - if (sme_config) - qdf_mem_free(sme_config); hdd_debug("Bss Already started...Ignore the request"); - EXIT(); - return 0; + goto exit; } if (check_for_concurrency) { @@ -8647,6 +8665,8 @@ int wlan_hdd_cfg80211_start_bss(hdd_adapter_t *pHostapdAdapter, cds_set_connection_in_progress(false); pHostapdState->bCommit = true; + +exit: if (sme_config) qdf_mem_free(sme_config); diff --git a/core/hdd/src/wlan_hdd_main.c b/core/hdd/src/wlan_hdd_main.c index d2fe9b849275..0588d2cf53e0 100644 --- a/core/hdd/src/wlan_hdd_main.c +++ b/core/hdd/src/wlan_hdd_main.c @@ -9358,6 +9358,7 @@ static int hdd_update_cds_config(hdd_context_t *hdd_ctx) hdd_ctx->config->crash_inject_enabled; cds_cfg->enable_mc_list = hdd_ctx->config->fEnableMCAddrList; + cds_cfg->dfs_master_enable = hdd_ctx->config->enableDFSMasterCap; cds_cfg->ap_maxoffload_peers = hdd_ctx->config->apMaxOffloadPeers; cds_cfg->ap_maxoffload_reorderbuffs = diff --git a/core/hdd/src/wlan_hdd_power.c b/core/hdd/src/wlan_hdd_power.c index a5e65d914813..2e0ac39155e3 100644 --- a/core/hdd/src/wlan_hdd_power.c +++ b/core/hdd/src/wlan_hdd_power.c @@ -1309,7 +1309,6 @@ hdd_suspend_wlan(void (*callback)(void *callbackContext, bool suspended), return; } - status = hdd_get_front_adapter(pHddCtx, &pAdapterNode); while (NULL != pAdapterNode && QDF_STATUS_SUCCESS == status) { pAdapter = pAdapterNode->pAdapter; @@ -1665,10 +1664,8 @@ QDF_STATUS hdd_wlan_re_init(void) /* Restart all adapters */ hdd_start_all_adapters(pHddCtx); - pHddCtx->last_scan_reject_session_id = 0xFF; - pHddCtx->last_scan_reject_reason = 0; - pHddCtx->last_scan_reject_timestamp = 0; - pHddCtx->scan_reject_cnt = 0; + /* init the scan reject params */ + hdd_init_scan_reject_params(pHddCtx); hdd_set_roaming_in_progress(false); complete(&pAdapter->roaming_comp_var); @@ -2095,10 +2092,10 @@ next_adapter: pAdapter = pAdapterNode->pAdapter; if (pAdapter->sessionId >= MAX_NUMBER_OF_ADAPTERS) - continue; + goto fetch_adapter; sme_ps_timer_flush_sync(pHddCtx->hHal, pAdapter->sessionId); - +fetch_adapter: status = hdd_get_next_adapter(pHddCtx, pAdapterNode, &pAdapterNode); } diff --git a/core/hdd/src/wlan_hdd_scan.c b/core/hdd/src/wlan_hdd_scan.c index d98686b83a21..ecc78d864f5c 100644 --- a/core/hdd/src/wlan_hdd_scan.c +++ b/core/hdd/src/wlan_hdd_scan.c @@ -428,6 +428,32 @@ static int hdd_add_scan_event_from_ies(struct hdd_scan_info *scanInfo, return 0; } +void hdd_init_scan_reject_params(hdd_context_t *hdd_ctx) +{ + if (hdd_ctx) { + hdd_ctx->last_scan_reject_timestamp = 0; + hdd_ctx->last_scan_reject_session_id = 0xFF; + hdd_ctx->last_scan_reject_reason = 0; + hdd_ctx->scan_reject_cnt = 0; + } + + return; +} + +void hdd_reset_scan_reject_params(hdd_context_t *hdd_ctx, + eRoamCmdStatus roam_status, + eCsrRoamResult roam_result) +{ + + if ((roam_status == eCSR_ROAM_ASSOCIATION_FAILURE) || + (roam_status == eCSR_ROAM_CANCELLED) || + (roam_result == eCSR_ROAM_RESULT_ASSOCIATED)) { + hdd_debug("Reset scan reject params"); + hdd_init_scan_reject_params(hdd_ctx); + } + + return; +} /** * hdd_indicate_scan_result() - indicate scan results @@ -2198,10 +2224,9 @@ static int __wlan_hdd_cfg80211_scan(struct wiphy *wiphy, } return -EBUSY; } - pHddCtx->last_scan_reject_timestamp = 0; - pHddCtx->last_scan_reject_session_id = 0xFF; - pHddCtx->last_scan_reject_reason = 0; - pHddCtx->scan_reject_cnt = 0; + + /* reinit the scan reject params */ + hdd_init_scan_reject_params(pHddCtx); /* Check whether SAP scan can be skipped or not */ if (pAdapter->device_mode == QDF_SAP_MODE && diff --git a/core/hdd/src/wlan_hdd_scan.h b/core/hdd/src/wlan_hdd_scan.h index 4f20fdf17c8a..157f579d0c20 100644 --- a/core/hdd/src/wlan_hdd_scan.h +++ b/core/hdd/src/wlan_hdd_scan.h @@ -162,6 +162,26 @@ void wlan_hdd_fill_whitelist_ie_attrs(bool *ie_whitelist, hdd_context_t *hdd_ctx); /** + * hdd_init_scan_reject_params() - init scan reject params + * @hdd_ctx: hdd contxt + * + * Return: None + */ +void hdd_init_scan_reject_params(hdd_context_t *hdd_ctx); + +/** + * hdd_reset_scan_reject_params() - reset scan reject params per roam stats + * @hdd_ctx: hdd contxt + * @roam_status: roam status + * @roam_result: roam result + * + * Return: None + */ +void hdd_reset_scan_reject_params(hdd_context_t *hdd_ctx, + eRoamCmdStatus roam_status, + eCsrRoamResult roam_result); + +/** * wlan_hdd_cfg80211_scan_block_cb() - scan block work handler * @work: Pointer to work * diff --git a/core/mac/inc/qwlan_version.h b/core/mac/inc/qwlan_version.h index b5dab63ed546..6e6d4e5af7fe 100644 --- a/core/mac/inc/qwlan_version.h +++ b/core/mac/inc/qwlan_version.h @@ -32,9 +32,9 @@ #define QWLAN_VERSION_MAJOR 5 #define QWLAN_VERSION_MINOR 1 #define QWLAN_VERSION_PATCH 1 -#define QWLAN_VERSION_EXTRA "Q" -#define QWLAN_VERSION_BUILD 68 +#define QWLAN_VERSION_EXTRA "" +#define QWLAN_VERSION_BUILD 69 -#define QWLAN_VERSIONSTR "5.1.1.68Q" +#define QWLAN_VERSIONSTR "5.1.1.69" #endif /* QWLAN_VERSION_H */ diff --git a/core/sap/inc/sap_api.h b/core/sap/inc/sap_api.h index cf97b0aa02ed..6de2f4029a3a 100644 --- a/core/sap/inc/sap_api.h +++ b/core/sap/inc/sap_api.h @@ -515,6 +515,7 @@ struct sap_acs_cfg { uint8_t ht_sec_ch; uint8_t vht_seg0_center_ch; uint8_t vht_seg1_center_ch; + bool dfs_master_enable; }; /* diff --git a/core/sap/src/sap_fsm.c b/core/sap/src/sap_fsm.c index f5243a4953bc..b77013b61aa7 100644 --- a/core/sap/src/sap_fsm.c +++ b/core/sap/src/sap_fsm.c @@ -4931,9 +4931,13 @@ static QDF_STATUS sap_get_channel_list(ptSapContext sap_ctx, /* Dont scan DFS channels in case of MCC disallowed * As it can result in SAP starting on DFS channel * resulting MCC on DFS channel + * Also if the dfs master mode in not enabled, exclude the + * dfs channels, as the user doesnt want the SAP bringup on + * dfs channel. */ if (CDS_IS_DFS_CH(CDS_CHANNEL_NUM(loop_count)) && - cds_disallow_mcc(CDS_CHANNEL_NUM(loop_count))) + (cds_disallow_mcc(CDS_CHANNEL_NUM(loop_count)) || + !sap_ctx->acs_cfg->dfs_master_enable)) continue; /* diff --git a/core/sme/inc/sme_rrm_internal.h b/core/sme/inc/sme_rrm_internal.h index 217f5c86c8b0..2679c7f8447a 100644 --- a/core/sme/inc/sme_rrm_internal.h +++ b/core/sme/inc/sme_rrm_internal.h @@ -84,6 +84,7 @@ typedef struct sRrmSMEContext { bool eseBcnReqInProgress; #endif /* FEATURE_WLAN_ESE */ tRrmMsgReqSource msgSource; + qdf_wake_lock_t scan_wake_lock; } tRrmSMEContext, *tpRrmSMEContext; typedef struct sRrmNeighborReq { diff --git a/core/sme/src/common/sme_api.c b/core/sme/src/common/sme_api.c index f17ea5c16a7b..665ba336e4dd 100644 --- a/core/sme/src/common/sme_api.c +++ b/core/sme/src/common/sme_api.c @@ -19392,12 +19392,12 @@ QDF_STATUS sme_fast_reassoc(tHalHandle hal, tCsrRoamProfile *profile, } } - msg.type = SIR_HAL_ROAM_INVOKE; + msg.type = eWNI_SME_ROAM_INVOKE; msg.reserved = 0; msg.bodyptr = fastreassoc; - status = cds_mq_post_message(QDF_MODULE_ID_WMA, &msg); + status = cds_mq_post_message(QDF_MODULE_ID_PE, &msg); if (QDF_STATUS_SUCCESS != status) { - sme_err("Not able to post ROAM_INVOKE_CMD message to WMA"); + sme_err("Not able to post ROAM_INVOKE_CMD message to PE"); qdf_mem_free(fastreassoc); } diff --git a/core/sme/src/rrm/sme_rrm.c b/core/sme/src/rrm/sme_rrm.c index 931349949920..7ea530e3ea92 100644 --- a/core/sme/src/rrm/sme_rrm.c +++ b/core/sme/src/rrm/sme_rrm.c @@ -875,6 +875,38 @@ free_ch_lst: } /** + * sme_rrm_calculate_total_scan_time() - calculate total time req for + * scan for all channels + * @mac_ctx: The handle returned by mac_open. + * + * Return: total rrm scan time + */ +static uint32_t sme_rrm_calculate_total_scan_time(tpAniSirGlobal mac_ctx) +{ + uint32_t dwell_time_active; + uint16_t interval; + tpRrmSMEContext pSmeRrmContext = &mac_ctx->rrm.rrmSmeContext; + uint8_t num_channels; + uint32_t rrm_scan_time = 0; + + num_channels = pSmeRrmContext->channelList.numOfChannels; + + interval = pSmeRrmContext->randnIntvl + 10; + + dwell_time_active = pSmeRrmContext->duration[0]; + + /* + * Add 1 sec extra in actual total rrm scan time + * to accommodate any delay + */ + if (num_channels) + rrm_scan_time = ((num_channels * dwell_time_active) + + ((num_channels - 1) * interval) + 1000); + + return rrm_scan_time; +} + +/** * sme_rrm_process_beacon_report_req_ind() -Process beacon report request * @pMac:- Global Mac structure * @pMsgBuf:- a pointer to a buffer that maps to various structures base @@ -893,6 +925,7 @@ QDF_STATUS sme_rrm_process_beacon_report_req_ind(tpAniSirGlobal pMac, tpRrmSMEContext pSmeRrmContext = &pMac->rrm.rrmSmeContext; uint32_t len = 0, i = 0; uint8_t temp = 0; + uint32_t total_rrm_scan_time; sme_debug("Received Beacon report request ind Channel = %d", pBeaconReq->channelInfo.channelNum); @@ -1008,6 +1041,12 @@ QDF_STATUS sme_rrm_process_beacon_report_req_ind(tpAniSirGlobal pMac, pSmeRrmContext->token, pSmeRrmContext->regClass, pSmeRrmContext->randnIntvl, pSmeRrmContext->msgSource); + total_rrm_scan_time = sme_rrm_calculate_total_scan_time(pMac); + + if (total_rrm_scan_time) + qdf_wake_lock_timeout_acquire(&pSmeRrmContext->scan_wake_lock, + total_rrm_scan_time); + return sme_rrm_issue_scan_req(pMac); } @@ -1421,6 +1460,8 @@ QDF_STATUS rrm_open(tpAniSirGlobal pMac) QDF_STATUS qdf_ret_status = QDF_STATUS_SUCCESS; pSmeRrmContext->rrmConfig.max_randn_interval = 50; /* ms */ + qdf_wake_lock_create(&pSmeRrmContext->scan_wake_lock, + "wlan_rrm_scan_wl"); qdf_status = qdf_mc_timer_init(&pSmeRrmContext->IterMeasTimer, QDF_TIMER_TYPE_SW, @@ -1522,6 +1563,8 @@ QDF_STATUS rrm_close(tpAniSirGlobal pMac) csr_ll_close(&pSmeRrmContext->neighborReportCache); + qdf_wake_lock_destroy(&pSmeRrmContext->scan_wake_lock); + return qdf_status; } diff --git a/core/wma/src/wma_features.c b/core/wma/src/wma_features.c index 0d35a7a39d2d..8caa6636500d 100644 --- a/core/wma/src/wma_features.c +++ b/core/wma/src/wma_features.c @@ -2176,6 +2176,12 @@ static QDF_STATUS dfs_phyerr_offload_event_handler(void *handle, qdf_spin_lock_bh(&ic->chan_lock); chan = ic->ic_curchan; + if (chan == NULL) { + WMA_LOGE("%s: chan is NULL", __func__); + qdf_spin_unlock_bh(&ic->chan_lock); + return QDF_STATUS_E_FAILURE; + } + if (ic->disable_phy_err_processing) { WMA_LOGD("%s: radar indication done,drop phyerror event", __func__); @@ -8409,7 +8415,7 @@ void wma_send_regdomain_info_to_fw(uint32_t reg_dmn, uint16_t regdmn2G, if (status == QDF_STATUS_E_NOMEM) return; - if ((((reg_dmn & ~CTRY_FLAG) == CTRY_JAPAN15) || + if ((((reg_dmn & ~CTRY_FLAG) == CTRY_JAPAN) || ((reg_dmn & ~CTRY_FLAG) == CTRY_KOREA_ROC)) && (true == wma->tx_chain_mask_cck)) cck_mask_val = 1; diff --git a/core/wma/src/wma_main.c b/core/wma/src/wma_main.c index a5ff14aa7429..c5eeb84165e7 100644 --- a/core/wma/src/wma_main.c +++ b/core/wma/src/wma_main.c @@ -3257,8 +3257,7 @@ static int wma_pdev_set_hw_mode_resp_evt_handler(void *handle, pdev_id = vdev_mac_entry[i].pdev_id; if (pdev_id == WMI_PDEV_ID_SOC) { WMA_LOGE("%s: soc level id received for mac id)", - __func__); - QDF_BUG(0); + __func__); goto fail; } if (vdev_id >= wma->max_bssid) { @@ -3350,8 +3349,7 @@ void wma_process_pdev_hw_mode_trans_ind(void *handle, if (pdev_id == WMI_PDEV_ID_SOC) { WMA_LOGE("%s: soc level id received for mac id)", - __func__); - QDF_BUG(0); + __func__); return; } if (vdev_id >= wma->max_bssid) { |
