diff options
| author | Service qcabuildsw <qcabuildsw@localhost> | 2016-12-22 17:15:12 -0800 |
|---|---|---|
| committer | Gerrit - the friendly Code Review server <code-review@localhost> | 2016-12-22 17:15:12 -0800 |
| commit | b68a8c7eb4c606d3ec3cc8020a69f1482b43c039 (patch) | |
| tree | 1500177058cb64222fc28bc994b422608b540f61 | |
| parent | 3da44e9c6fceae02658324ffa9cf9b9d925f8269 (diff) | |
| parent | 09f4178c0ab36b90b661fc62acb0341c5992114d (diff) | |
Merge "qcacld-3.0: Allow full spectrum scan when agile & aDFS scan supported" into wlan-cld3.driver.lnx.1.1-dev
| -rw-r--r-- | core/cds/inc/cds_concurrency.h | 1 | ||||
| -rw-r--r-- | core/cds/src/cds_concurrency.c | 36 | ||||
| -rw-r--r-- | core/hdd/src/wlan_hdd_cfg80211.c | 9 | ||||
| -rw-r--r-- | core/sme/src/csr/csr_api_scan.c | 55 | ||||
| -rw-r--r-- | core/wma/inc/wma.h | 5 | ||||
| -rw-r--r-- | core/wma/src/wma_utils.c | 20 |
6 files changed, 98 insertions, 28 deletions
diff --git a/core/cds/inc/cds_concurrency.h b/core/cds/inc/cds_concurrency.h index 2378e8aa4f51..9786e1b57384 100644 --- a/core/cds/inc/cds_concurrency.h +++ b/core/cds/inc/cds_concurrency.h @@ -723,6 +723,7 @@ void cds_update_with_safe_channel_list(uint8_t *pcl_channels, uint32_t *len, uint8_t cds_get_nondfs_preferred_channel(enum cds_con_mode mode, bool for_existing_conn); bool cds_is_any_nondfs_chnl_present(uint8_t *channel); +bool cds_is_any_dfs_beaconing_session_present(uint8_t *channel); bool cds_allow_concurrency(enum cds_con_mode mode, uint8_t channel, enum hw_mode_bandwidth bw); enum cds_conc_priority_mode cds_get_first_connection_pcl_table_index(void); diff --git a/core/cds/src/cds_concurrency.c b/core/cds/src/cds_concurrency.c index 5cca3b62bbc2..4475cbcb0e2b 100644 --- a/core/cds/src/cds_concurrency.c +++ b/core/cds/src/cds_concurrency.c @@ -8711,6 +8711,42 @@ bool cds_is_any_nondfs_chnl_present(uint8_t *channel) } /** + * cds_is_any_dfs_beaconing_session_present() - to find if any DFS session + * @channel: pointer to channel number that needs to filled + * + * If any beaconing session such as SAP or GO present and it is on DFS channel + * then this function will return true + * + * Return: true if session is on DFS or false if session is on non-dfs channel + */ +bool cds_is_any_dfs_beaconing_session_present(uint8_t *channel) +{ + cds_context_type *cds_ctx; + struct cds_conc_connection_info *conn_info; + bool status = false; + uint32_t conn_index = 0; + cds_ctx = cds_get_context(QDF_MODULE_ID_QDF); + + if (!cds_ctx) { + cds_err("Invalid CDS Context"); + return false; + } + qdf_mutex_acquire(&cds_ctx->qdf_conc_list_lock); + for (conn_index = 0; conn_index < MAX_NUMBER_OF_CONC_CONNECTIONS; + conn_index++) { + conn_info = &conc_connection_list[conn_index]; + if (conn_info->in_use && CDS_IS_DFS_CH(conn_info->chan) && + (CDS_SAP_MODE == conn_info->mode || + CDS_P2P_GO_MODE == conn_info->mode)) { + *channel = conc_connection_list[conn_index].chan; + status = true; + } + } + qdf_mutex_release(&cds_ctx->qdf_conc_list_lock); + return status; +} + +/** * cds_get_valid_chans() - Get the valid channel list * @chan_list: Pointer to the valid channel list * @list_len: Pointer to the length of the valid channel list diff --git a/core/hdd/src/wlan_hdd_cfg80211.c b/core/hdd/src/wlan_hdd_cfg80211.c index 4eea18845bd2..42fdc7f98300 100644 --- a/core/hdd/src/wlan_hdd_cfg80211.c +++ b/core/hdd/src/wlan_hdd_cfg80211.c @@ -11720,7 +11720,6 @@ static int wlan_hdd_cfg80211_connect_start(hdd_adapter_t *pAdapter, eCsrAuthType RSNAuthType; tSmeConfigParams *sme_config; uint8_t channel = 0; - struct sir_hw_mode_params hw_mode; ENTER(); @@ -12012,14 +12011,8 @@ static int wlan_hdd_cfg80211_connect_start(hdd_adapter_t *pAdapter, pRoamProfile->ChannelInfo.ChannelList = NULL; pRoamProfile->ChannelInfo.numOfChannels = 0; - if (!QDF_IS_STATUS_SUCCESS( - wma_get_current_hw_mode(&hw_mode))) { - hdd_err("wma_get_current_hw_mode failed"); - return status; - } - if ((QDF_STA_MODE == pAdapter->device_mode) - && hw_mode.dbs_cap) { + && wma_is_current_hwmode_dbs()) { cds_get_channel_from_scan_result(pAdapter, pRoamProfile, &channel); if (channel) diff --git a/core/sme/src/csr/csr_api_scan.c b/core/sme/src/csr/csr_api_scan.c index 948831fd5967..b27d974107aa 100644 --- a/core/sme/src/csr/csr_api_scan.c +++ b/core/sme/src/csr/csr_api_scan.c @@ -5407,25 +5407,25 @@ static void csr_scan_copy_request_valid_channels_only(tpAniSirGlobal mac_ctx, } /** - * csr_scan_filter_ibss_chnl_band() - filter all channels which matches IBSS + * csr_scan_filter_given_chnl_band() - filter all channels which matches given * channel's band * @mac_ctx: pointer to mac context - * @ibss_channel: Given IBSS channel + * @channel: Given channel * @dst_req: destination scan request * - * when ever IBSS connection already exist, STA should not scan the channels - * which fall under same band as IBSS channel's band. this routine will filter - * out those channels + * when ever particular connection already exist, STA should not scan the + * channels which fall under same band as given channel's band. + * this routine will filter out those channels * * Return: true if success otherwise false for any failure */ -static bool csr_scan_filter_ibss_chnl_band(tpAniSirGlobal mac_ctx, - uint8_t ibss_channel, tCsrScanRequest *dst_req) { +static bool csr_scan_filter_given_chnl_band(tpAniSirGlobal mac_ctx, + uint8_t channel, tCsrScanRequest *dst_req) { uint8_t valid_chnl_list[WNI_CFG_VALID_CHANNEL_LIST_LEN] = {0}; uint32_t filter_chnl_len = 0, i = 0; uint32_t valid_chnl_len = WNI_CFG_VALID_CHANNEL_LIST_LEN; - if (ibss_channel == 0) { + if (!channel) { sms_log(mac_ctx, LOG1, FL("Nothing to filter as no IBSS session")); return true; @@ -5455,17 +5455,17 @@ static bool csr_scan_filter_ibss_chnl_band(tpAniSirGlobal mac_ctx, } for (i = 0; i < valid_chnl_len; i++) { /* - * Don't allow DSRC channel when IBSS concurrent connection - * is up + * Don't allow DSRC channel when IBSS or SAP DFS concurrent + * connection is up */ if (valid_chnl_list[i] >= CDS_MIN_11P_CHANNEL) continue; - if (CDS_IS_CHANNEL_5GHZ(ibss_channel) && + if (CDS_IS_CHANNEL_5GHZ(channel) && CDS_IS_CHANNEL_24GHZ(valid_chnl_list[i])) { valid_chnl_list[filter_chnl_len] = valid_chnl_list[i]; filter_chnl_len++; - } else if (CDS_IS_CHANNEL_24GHZ(ibss_channel) && + } else if (CDS_IS_CHANNEL_24GHZ(channel) && CDS_IS_CHANNEL_5GHZ(valid_chnl_list[i])) { valid_chnl_list[filter_chnl_len] = valid_chnl_list[i]; @@ -5517,7 +5517,7 @@ QDF_STATUS csr_scan_copy_request(tpAniSirGlobal mac_ctx, uint32_t index = 0; uint32_t new_index = 0; enum channel_state channel_state; - uint8_t ibss_channel = 0; + uint8_t channel = 0; bool skip_dfs_chnl = mac_ctx->roam.configParam.initial_scan_no_dfs_chnl || @@ -5622,17 +5622,36 @@ QDF_STATUS csr_scan_copy_request(tpAniSirGlobal mac_ctx, * request comes from STA adapter then we need to filter * out IBSS channel's band otherwise it will cause issue * in IBSS+STA concurrency + * + * If DFS SAP/GO concurrent connection exist, and if the scan + * request comes from STA adapter then we need to filter + * out SAP/GO channel's band otherwise it will cause issue in + * SAP+STA concurrency */ - if (true == cds_is_ibss_conn_exist(&ibss_channel)) { + if (cds_is_ibss_conn_exist(&channel)) { sms_log(mac_ctx, LOG1, FL("Conc IBSS exist, channel list will be modified")); + } else if (cds_is_any_dfs_beaconing_session_present(&channel)) { + /* + * 1) if agile & DFS scans are supported + * 2) if hardware is DBS capable + * 3) if current hw mode is non-dbs + * if all above 3 conditions are true then don't skip any + * channel from scan list + */ + if (true != wma_is_current_hwmode_dbs() && + wma_get_dbs_plus_agile_scan_config() && + wma_get_single_mac_scan_with_dfs_config()) + channel = 0; + else + sms_log(mac_ctx, LOG1, + FL("Conc DFS SAP/GO exist, channel list will be modified")); } - if ((ibss_channel > 0) && - (false == csr_scan_filter_ibss_chnl_band(mac_ctx, - ibss_channel, dst_req))) { + if ((channel > 0) && + (!csr_scan_filter_given_chnl_band(mac_ctx, channel, dst_req))) { sms_log(mac_ctx, LOGE, - FL("Can't filter channels due to IBSS")); + FL("Can't filter channels due to IBSS/SAP DFS")); goto complete; } diff --git a/core/wma/inc/wma.h b/core/wma/inc/wma.h index f22f0c07ea65..18580e6d58a5 100644 --- a/core/wma/inc/wma.h +++ b/core/wma/inc/wma.h @@ -1,4 +1,4 @@ - /* +/* * Copyright (c) 2013-2016 The Linux Foundation. All rights reserved. * * Previously licensed under the ISC license by Qualcomm Atheros, Inc. @@ -2280,6 +2280,7 @@ static inline QDF_STATUS wma_lro_config_cmd(tp_wma_handle wma_handle, return QDF_STATUS_SUCCESS; } #endif +bool wma_is_current_hwmode_dbs(void); void wma_indicate_err(enum ol_rx_err_type err_type, struct ol_error_info *err_info); @@ -2319,7 +2320,6 @@ QDF_STATUS wma_create_peer(tp_wma_handle wma, ol_txrx_pdev_handle pdev, u_int32_t peer_type, u_int8_t vdev_id, bool roam_synch_in_progress); -#endif struct wma_ini_config *wma_get_ini_handle(tp_wma_handle wma_handle); WLAN_PHY_MODE wma_chan_phy_mode(u8 chan, enum phy_ch_width chan_width, u8 dot11_mode); @@ -2340,3 +2340,4 @@ void wma_update_sta_inactivity_timeout(tp_wma_handle wma, QDF_STATUS wma_send_udp_resp_offload_cmd(tp_wma_handle wma_handle, struct udp_resp_offload *udp_response); +#endif diff --git a/core/wma/src/wma_utils.c b/core/wma/src/wma_utils.c index 2a357ade1004..a3a4eeb52dab 100644 --- a/core/wma/src/wma_utils.c +++ b/core/wma/src/wma_utils.c @@ -3289,6 +3289,26 @@ QDF_STATUS wma_get_current_hw_mode(struct sir_hw_mode_params *hw_mode) } /** + * wma_is_current_hwmode_dbs() - Check if current hw mode is DBS + * + * Checks if current hardware mode of the system is DBS or no + * + * Return: true or false + */ +bool wma_is_current_hwmode_dbs(void) +{ + struct sir_hw_mode_params hw_mode; + + if (!wma_is_hw_dbs_capable()) + return false; + if (QDF_STATUS_SUCCESS != wma_get_current_hw_mode(&hw_mode)) + return false; + if (hw_mode.dbs_cap) + return true; + return false; +} + +/** * wma_is_dbs_enable() - Check if master DBS control is enabled * * Checks if the master DBS control is enabled. This will be used |
