diff options
| -rw-r--r-- | core/cds/inc/cds_config.h | 4 | ||||
| -rw-r--r-- | core/cds/inc/cds_reg_service.h | 32 | ||||
| -rw-r--r-- | core/cds/src/cds_concurrency.c | 20 | ||||
| -rw-r--r-- | core/cds/src/cds_reg_service.c | 70 | ||||
| -rw-r--r-- | core/cds/src/cds_regdomain.c | 2 | ||||
| -rw-r--r-- | core/hdd/inc/wlan_hdd_cfg.h | 25 | ||||
| -rw-r--r-- | core/hdd/src/wlan_hdd_cfg.c | 7 | ||||
| -rw-r--r-- | core/hdd/src/wlan_hdd_cfg80211.c | 16 | ||||
| -rw-r--r-- | core/hdd/src/wlan_hdd_hostapd.c | 2 | ||||
| -rw-r--r-- | core/hdd/src/wlan_hdd_main.c | 3 | ||||
| -rw-r--r-- | core/hdd/src/wlan_hdd_regulatory.c | 11 | ||||
| -rw-r--r-- | core/mac/inc/wni_cfg.h | 2 | ||||
| -rw-r--r-- | core/sap/inc/sap_api.h | 12 | ||||
| -rw-r--r-- | core/sap/src/sap_ch_select.c | 5 | ||||
| -rw-r--r-- | core/sap/src/sap_fsm.c | 3 | ||||
| -rw-r--r-- | core/sap/src/sap_internal.h | 1 | ||||
| -rw-r--r-- | core/sap/src/sap_module.c | 26 | ||||
| -rw-r--r-- | core/sme/src/csr/csr_api_roam.c | 3 | ||||
| -rw-r--r-- | core/sme/src/csr/csr_api_scan.c | 19 | ||||
| -rw-r--r-- | core/wma/src/wma_features.c | 4 |
20 files changed, 240 insertions, 27 deletions
diff --git a/core/cds/inc/cds_config.h b/core/cds/inc/cds_config.h index cd96842bff9e..ffe4593c947d 100644 --- a/core/cds/inc/cds_config.h +++ b/core/cds/inc/cds_config.h @@ -152,6 +152,8 @@ enum cds_auto_pwr_detect_failure_mode_t { * @rps_enabled: RPS enabled in SAP mode * @ito_repeat_count: Indicates ito repeated count * @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 * Structure for holding cds ini parameters. */ @@ -215,6 +217,8 @@ struct cds_config_info { enum cds_auto_pwr_detect_failure_mode_t auto_power_save_fail_mode; uint8_t ito_repeat_count; uint8_t bandcapability; + bool etsi_srd_chan_in_master_mode; + uint8_t dot11p_mode; }; #ifdef WLAN_FEATURE_FILS_SK diff --git a/core/cds/inc/cds_reg_service.h b/core/cds/inc/cds_reg_service.h index dc9e8f7d7723..fb84151b01df 100644 --- a/core/cds/inc/cds_reg_service.h +++ b/core/cds/inc/cds_reg_service.h @@ -57,10 +57,6 @@ #define CDS_MIN_5GHZ_CHANNEL_NUMBER chan_mapping[MIN_5GHZ_CHANNEL].chan_num #define CDS_MAX_5GHZ_CHANNEL_NUMBER chan_mapping[MAX_5GHZ_CHANNEL].chan_num -#define CDS_IS_CHANNEL_DSRC(chan_num) \ - ((chan_num >= CDS_MIN_59GHZ_CHANNEL_NUMBER) && \ - (chan_num <= CDS_MAX_59GHZ_CHANNEL_NUMBER)) - #define CDS_IS_CHANNEL_5GHZ(chan_num) \ ((chan_num >= CDS_MIN_5GHZ_CHANNEL_NUMBER) && \ (chan_num <= CDS_MAX_5GHZ_CHANNEL_NUMBER)) @@ -73,8 +69,6 @@ (chan_num1 && chan_num2 && \ (CDS_IS_CHANNEL_5GHZ(chan_num1) == CDS_IS_CHANNEL_5GHZ(chan_num2))) -#define CDS_MIN_11P_CHANNEL chan_mapping[MIN_59GHZ_CHANNEL].chan_num - typedef enum { REGDOMAIN_FCC, REGDOMAIN_ETSI, @@ -185,6 +179,7 @@ enum channel_enum { CHAN_ENUM_161, CHAN_ENUM_165, + CHAN_ENUM_169, CHAN_ENUM_170, CHAN_ENUM_171, CHAN_ENUM_172, @@ -409,6 +404,23 @@ QDF_STATUS cds_set_reg_domain(void *client_ctxt, v_REGDOMAIN_t reg_domain); QDF_STATUS cds_put_default_country(uint8_t *def_country); uint16_t cds_bw_value(enum phy_ch_width bw); uint8_t cds_skip_dfs_and_2g(uint32_t rf_channel); + +/** + * cds_is_5g_regdmn_etsi13() - is the 5G regdomain ETSI13 + * + * Return: true on ETSI13 regdomain, false otherwise + */ +bool cds_is_5g_regdmn_etsi13(void); + +/* + * cds_is_etsi13_regdmn_srd_chan() - is the channel ETSI SRD channel + * @center_freq: center freq of the channel + * + * Return: true if channel is etsi13 domain SRD channel + * false otherwise + */ +bool cds_is_etsi13_regdmn_srd_chan(uint16_t center_freq); + /** * cds_get_channel_enum() - get the channel enumeration * @chan_num: channel number @@ -416,4 +428,12 @@ uint8_t cds_skip_dfs_and_2g(uint32_t rf_channel); * Return: enum for the channel */ enum channel_enum cds_get_channel_enum(uint32_t chan_num); + +/** + * cds_set_5G_regdmn() - save 5G reg domain value + * @regdmn_5g: 5G reg domain value + * + * Return: None + */ +void cds_set_5G_regdmn(uint16_t regdmn_5g); #endif /* __CDS_REG_SERVICE_H */ diff --git a/core/cds/src/cds_concurrency.c b/core/cds/src/cds_concurrency.c index 00c4c0e749ea..77061eefaea2 100644 --- a/core/cds/src/cds_concurrency.c +++ b/core/cds/src/cds_concurrency.c @@ -5122,16 +5122,16 @@ static QDF_STATUS cds_get_channel_list(enum cds_pcl_type pcl, uint8_t channel_list_24[QDF_MAX_NUM_CHAN] = {0}; uint8_t channel_list_5[QDF_MAX_NUM_CHAN] = {0}; bool skip_dfs_channel = false; - hdd_context_t *hdd_ctx; + bool skip_srd_chan = false; uint32_t i = 0, j = 0; bool sta_sap_scc_on_dfs_chan; + struct cds_config_info *cds_cfg; - hdd_ctx = cds_get_context(QDF_MODULE_ID_HDD); - if (!hdd_ctx) { - cds_err("HDD context is NULL"); + cds_cfg = cds_get_ini_config(); + if (!cds_cfg) { + cds_err("cds config is NULL"); return status; } - if ((NULL == pcl_channels) || (NULL == len)) { cds_err("pcl_channels or len is NULL"); return status; @@ -5169,6 +5169,10 @@ static QDF_STATUS cds_get_channel_list(enum cds_pcl_type pcl, 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(); + } /* Let's divide the list in 2.4 & 5 Ghz lists */ while ((chan_index < QDF_MAX_NUM_CHAN) && (channel_list[chan_index] <= 11) && @@ -5198,6 +5202,12 @@ static QDF_STATUS cds_get_channel_list(enum cds_pcl_type pcl, chan_index++; continue; } + if ((true == skip_srd_chan) && + cds_is_etsi13_regdmn_srd_chan(cds_chan_to_freq( + channel_list[chan_index]))) { + chan_index++; + continue; + } channel_list_5[chan_index_5++] = channel_list[chan_index++]; } diff --git a/core/cds/src/cds_reg_service.c b/core/cds/src/cds_reg_service.c index 41357770a3a6..ee755963a9f3 100644 --- a/core/cds/src/cds_reg_service.c +++ b/core/cds/src/cds_reg_service.c @@ -37,6 +37,7 @@ #include "qdf_trace.h" #include "cds_api.h" #include "cds_reg_service.h" +#include "cds_utils.h" #include "cds_regdomain.h" #include "sme_api.h" #include "wlan_hdd_main.h" @@ -85,6 +86,8 @@ const struct chan_map chan_mapping[NUM_CHANNELS] = { [CHAN_ENUM_161] = {5805, 161}, [CHAN_ENUM_165] = {5825, 165}, + [CHAN_ENUM_169] = {5845, 169}, + [CHAN_ENUM_170] = {5852, 170}, [CHAN_ENUM_171] = {5855, 171}, [CHAN_ENUM_172] = {5860, 172}, @@ -124,7 +127,8 @@ static const struct bonded_chan bonded_chan_40mhz_array[] = { {132, 136}, {140, 144}, {149, 153}, - {157, 161} + {157, 161}, + {165, 169} }; static const struct bonded_chan bonded_chan_80mhz_array[] = { @@ -154,6 +158,7 @@ static const enum phy_ch_width next_lower_bw[] = { struct regulatory_channel reg_channels[NUM_CHANNELS]; static uint8_t default_country[CDS_COUNTRY_CODE_LEN + 1]; static enum dfs_region dfs_region; +static uint16_t reg_domain_5g; /** * cds_get_channel_list_with_power() - retrieve channel list with power @@ -693,6 +698,18 @@ bool cds_is_fcc_regdomain(void) return false; } +/** + * cds_set_5G_regdmn() - save 5G reg domain value + * @regdmn_5g: 5G reg domain value + * + * Return: None + */ +void cds_set_5G_regdmn(uint16_t regdmn_5g) +{ + + reg_domain_5g = regdmn_5g; + cds_debug("5G reg domain value is set to %d", reg_domain_5g); +} /* * cds_is_dsrc_channel() - is the channel DSRC * @center_freq: center freq of the channel @@ -702,6 +719,17 @@ bool cds_is_fcc_regdomain(void) */ bool cds_is_dsrc_channel(uint16_t center_freq) { + struct cds_config_info *cds_cfg; + + cds_cfg = cds_get_ini_config(); + if (!cds_cfg) { + cds_err("cds config is NULL"); + return false; + } + + if (!cds_cfg->dot11p_mode) + return false; + if (center_freq >= 5852 && center_freq <= 5920) return true; @@ -710,6 +738,46 @@ bool cds_is_dsrc_channel(uint16_t center_freq) } /** + * cds_is_5g_regdmn_etsi13() - is the 5G regdomain ETSI13 + * + * Return: true on ETSI13 regdomain, false otherwise + */ +bool cds_is_5g_regdmn_etsi13(void) +{ + if (ETSI13 == reg_domain_5g) + return true; + return false; +} +/* + * cds_is_etsi13_regdmn_srd_chan() - is the channel ETSI SRD channel + * @center_freq: center freq of the channel + * + * Return: true if channel is etsi13 domain SRD channel + * false otherwise + */ +bool cds_is_etsi13_regdmn_srd_chan(uint16_t center_freq) +{ + struct cds_config_info *cds_cfg; + + cds_cfg = cds_get_ini_config(); + if (!cds_cfg) { + cds_err("cds config is NULL"); + return false; + } + if (cds_cfg->dot11p_mode) + return false; + + if (!cds_is_5g_regdmn_etsi13()) + return false; + + if (center_freq >= 5720 && + center_freq <= 5865) + return true; + + return false; +} + +/** * cds_set_reg_domain() - set regulatory domain * @client_ctxt: client context * @reg_domain: regulatory domain diff --git a/core/cds/src/cds_regdomain.c b/core/cds/src/cds_regdomain.c index bab7cbbb526b..5116f920572b 100644 --- a/core/cds/src/cds_regdomain.c +++ b/core/cds/src/cds_regdomain.c @@ -751,7 +751,7 @@ void cds_fill_and_send_ctl_to_fw(struct regulatory *reg) ctl_2g = reg_dmn_2g->conformance_test_limit; ctl_5g = reg_dmn_5g->conformance_test_limit; - + cds_set_5G_regdmn(reg_dmn_5g->reg_dmn); reg->ctl_5g = ctl_5g; reg->ctl_2g = ctl_2g; diff --git a/core/hdd/inc/wlan_hdd_cfg.h b/core/hdd/inc/wlan_hdd_cfg.h index ab00cb8da2cb..6a77675438a6 100644 --- a/core/hdd/inc/wlan_hdd_cfg.h +++ b/core/hdd/inc/wlan_hdd_cfg.h @@ -9122,6 +9122,30 @@ enum dot11p_mode { /* * <ini> + * etsi_srd_chan_in_master_mode - Enable/disable ETSI SRD channels in + * master mode PCL and ACS functionality + * @Min: 0 + * @Max: 1 + * @Default: 0 + * + * etsi_srd_chan_in_master_mode is to enable/disable ETSI SRD channels in + * master mode PCL and ACS functionality + * + * Related: None + * + * Supported Feature: SAP/P2P-GO + * + * Usage: Internal/External + * + * </ini> + */ +#define CFG_ETSI_SRD_CHAN_IN_MASTER_MODE "etsi_srd_chan_in_master_mode" +#define CFG_ETSI_SRD_CHAN_IN_MASTER_MODE_DEF (0) +#define CFG_ETSI_SRD_CHAN_IN_MASTER_MODE_MIN (0) +#define CFG_ETSI_SRD_CHAN_IN_MASTER_MODE_MAX (1) + +/* + * <ini> * gEnable_go_cts2self_for_sta - Indicate firmware to stop NOA and * start using cts2self * @Min: 1 @@ -14495,6 +14519,7 @@ struct hdd_config { bool fastpath_enable; #endif uint8_t dot11p_mode; + bool etsi_srd_chan_in_master_mode; uint8_t rx_mode; uint32_t ce_service_max_yield_time; uint8_t ce_service_max_rx_ind_flush; diff --git a/core/hdd/src/wlan_hdd_cfg.c b/core/hdd/src/wlan_hdd_cfg.c index 4b49e784df84..2112ff5be422 100644 --- a/core/hdd/src/wlan_hdd_cfg.c +++ b/core/hdd/src/wlan_hdd_cfg.c @@ -3777,6 +3777,13 @@ struct reg_table_entry g_registry_table[] = { CFG_DOT11P_MODE_MIN, CFG_DOT11P_MODE_MAX), + REG_VARIABLE(CFG_ETSI_SRD_CHAN_IN_MASTER_MODE, WLAN_PARAM_Integer, + struct hdd_config, etsi_srd_chan_in_master_mode, + VAR_FLAGS_OPTIONAL | VAR_FLAGS_RANGE_CHECK_ASSUME_DEFAULT, + CFG_ETSI_SRD_CHAN_IN_MASTER_MODE_DEF, + CFG_ETSI_SRD_CHAN_IN_MASTER_MODE_MIN, + CFG_ETSI_SRD_CHAN_IN_MASTER_MODE_MAX), + #ifdef FEATURE_WLAN_EXTSCAN REG_VARIABLE(CFG_EXTSCAN_ALLOWED_NAME, WLAN_PARAM_Integer, struct hdd_config, extscan_enabled, diff --git a/core/hdd/src/wlan_hdd_cfg80211.c b/core/hdd/src/wlan_hdd_cfg80211.c index 712dd6c0e48f..da4e45b4deb8 100644 --- a/core/hdd/src/wlan_hdd_cfg80211.c +++ b/core/hdd/src/wlan_hdd_cfg80211.c @@ -243,6 +243,11 @@ static const struct ieee80211_channel hdd_channels_5_ghz[] = { HDD5GHZCHAN(5825, 165, 0), }; +static const struct ieee80211_channel hdd_etsi_srd_chan[] = { + HDD5GHZCHAN(5845, 169, 0), + HDD5GHZCHAN(5865, 173, 0), +}; + static const struct ieee80211_channel hdd_channels_dot11p[] = { HDD5GHZCHAN(5852, 170, 0), HDD5GHZCHAN(5855, 171, 0), @@ -12648,16 +12653,25 @@ int wlan_hdd_cfg80211_init(struct device *dev, } else { wiphy->bands[HDD_NL80211_BAND_5GHZ]->channels = - qdf_mem_malloc(sizeof(hdd_channels_5_ghz)); + qdf_mem_malloc(sizeof(hdd_channels_5_ghz) + + sizeof(hdd_etsi_srd_chan)); if (wiphy->bands[HDD_NL80211_BAND_5GHZ]->channels == NULL) { hdd_err("Not enough memory to for channels"); goto mem_fail; } + wiphy->bands[HDD_NL80211_BAND_5GHZ]->n_channels = + QDF_ARRAY_SIZE(hdd_channels_5_ghz) + + QDF_ARRAY_SIZE(hdd_etsi_srd_chan); qdf_mem_copy(wiphy-> bands[HDD_NL80211_BAND_5GHZ]->channels, &hdd_channels_5_ghz[0], sizeof(hdd_channels_5_ghz)); + len = sizeof(hdd_channels_5_ghz); + qdf_mem_copy((char *) + wiphy->bands[HDD_NL80211_BAND_5GHZ]->channels + + len, &hdd_etsi_srd_chan[0], + sizeof(hdd_etsi_srd_chan)); } } diff --git a/core/hdd/src/wlan_hdd_hostapd.c b/core/hdd/src/wlan_hdd_hostapd.c index 7de80fa1226e..978cb5e607ef 100644 --- a/core/hdd/src/wlan_hdd_hostapd.c +++ b/core/hdd/src/wlan_hdd_hostapd.c @@ -8029,6 +8029,8 @@ int wlan_hdd_cfg80211_start_bss(hdd_adapter_t *pHostapdAdapter, wlansap_set_tx_leakage_threshold(hHal, iniConfig->sap_tx_leakage_threshold); + wlansap_set_etsi_srd_chan_support(hHal, + iniConfig->etsi_srd_chan_in_master_mode); capab_info = pMgmt_frame->u.beacon.capab_info; pConfig->privacy = (pMgmt_frame->u.beacon.capab_info & diff --git a/core/hdd/src/wlan_hdd_main.c b/core/hdd/src/wlan_hdd_main.c index f266f25e8909..eb0a25a6868b 100644 --- a/core/hdd/src/wlan_hdd_main.c +++ b/core/hdd/src/wlan_hdd_main.c @@ -8752,6 +8752,9 @@ static int hdd_update_cds_config(hdd_context_t *hdd_ctx) cds_cfg->sta_maxlimod_dtim = hdd_ctx->config->fMaxLIModulatedDTIM; cds_cfg->wow_enable = hdd_ctx->config->wowEnable; cds_cfg->max_wow_filters = hdd_ctx->config->maxWoWFilters; + cds_cfg->etsi_srd_chan_in_master_mode = + hdd_ctx->config->etsi_srd_chan_in_master_mode; + cds_cfg->dot11p_mode = hdd_ctx->config->dot11p_mode; /* Here ol_ini_info is used to store ini status of arp offload * ns offload and others. Currently 1st bit is used for arp diff --git a/core/hdd/src/wlan_hdd_regulatory.c b/core/hdd/src/wlan_hdd_regulatory.c index ed09b654f726..3323f3b9c78b 100644 --- a/core/hdd/src/wlan_hdd_regulatory.c +++ b/core/hdd/src/wlan_hdd_regulatory.c @@ -491,6 +491,17 @@ static void hdd_process_regulatory_data(hdd_context_t *hdd_ctx, wiphy_chan = &(wiphy->bands[band_num]->channels[chan_num]); + + while ((wiphy_chan->center_freq != + chan_mapping[chan_enum].center_freq) && + (chan_enum < NUM_CHANNELS)) + chan_enum++; + if (NUM_CHANNELS == chan_enum) { + hdd_alert("wiphy channel freq %d not found", + wiphy_chan->center_freq); + break; + } + cds_chan = &(reg_channels[chan_enum]); if (CHAN_ENUM_144 == chan_enum) wiphy_chan_144 = wiphy_chan; diff --git a/core/mac/inc/wni_cfg.h b/core/mac/inc/wni_cfg.h index a84e187df274..f60c7aed85d6 100644 --- a/core/mac/inc/wni_cfg.h +++ b/core/mac/inc/wni_cfg.h @@ -448,7 +448,7 @@ enum { #define WNI_CFG_LISTEN_INTERVAL_STADEF 1 #define WNI_CFG_CURRENT_CHANNEL_STAMIN 0 -#define WNI_CFG_CURRENT_CHANNEL_STAMAX 165 +#define WNI_CFG_CURRENT_CHANNEL_STAMAX 173 #define WNI_CFG_CURRENT_CHANNEL_STADEF 1 #define WNI_CFG_DEFAULT_RATE_INDEX_24GHZ_STAMIN 0 diff --git a/core/sap/inc/sap_api.h b/core/sap/inc/sap_api.h index 1f975e305bed..47fbfb19102b 100644 --- a/core/sap/inc/sap_api.h +++ b/core/sap/inc/sap_api.h @@ -754,6 +754,7 @@ typedef struct tagSapStruct { bool sap_channel_avoidance; #endif /* FEATURE_AP_MCC_CH_AVOIDANCE */ bool enable_dfs_phy_error_logs; + bool enable_etsi_srd_chan_support; } tSapStruct, *tpSapStruct; #define WPS_PROBRSP_VER_PRESENT 0x00000001 @@ -1024,6 +1025,17 @@ QDF_STATUS wlansap_set_invalid_session(void *cds_ctx); QDF_STATUS sap_roam_session_close_callback(void *pContext); /** + * wlansap_set_etsi_srd_chan_support() - set SRD channel support. + * @hal: HAL pointer + * @srd_chan_support: SRD channel support + * + * This function set sap SRD channel support + * + * Return: None + */ +void wlansap_set_etsi_srd_chan_support(tHalHandle hal, bool srd_chan_support); + +/** * wlansap_cleanup_cac_timer() - Force cleanup DFS CAC timer * @sap_ctx: sap context * diff --git a/core/sap/src/sap_ch_select.c b/core/sap/src/sap_ch_select.c index f4344b3e0cb5..08d9b24d0e06 100644 --- a/core/sap/src/sap_ch_select.c +++ b/core/sap/src/sap_ch_select.c @@ -723,6 +723,11 @@ static bool sap_chan_sel_init(tHalHandle halHandle, if (cds_is_dsrc_channel(cds_chan_to_freq(*pChans))) continue; + if (!pSapCtx->enable_etsi_srd_chan_support && + cds_is_etsi13_regdmn_srd_chan( + cds_chan_to_freq(*pChans))) + continue; + if (true == chSafe) { pSpectCh->chNum = *pChans; pSpectCh->valid = true; diff --git a/core/sap/src/sap_fsm.c b/core/sap/src/sap_fsm.c index 8131ed3678cc..6157cda3d4b3 100644 --- a/core/sap/src/sap_fsm.c +++ b/core/sap/src/sap_fsm.c @@ -2671,6 +2671,9 @@ QDF_STATUS sap_open_session(tHalHandle hHal, ptSapContext sapContext, sapContext->is_pre_cac_on = false; sapContext->pre_cac_complete = false; sapContext->chan_before_pre_cac = 0; + sapContext->enable_etsi_srd_chan_support = + pMac->sap.enable_etsi_srd_chan_support; + return QDF_STATUS_SUCCESS; } diff --git a/core/sap/src/sap_internal.h b/core/sap/src/sap_internal.h index 6177d1efec76..7a6e7846052c 100644 --- a/core/sap/src/sap_internal.h +++ b/core/sap/src/sap_internal.h @@ -274,6 +274,7 @@ typedef struct sSapContext { enum sap_acs_dfs_mode dfs_mode; uint8_t sap_sta_id; bool is_chan_change_inprogress; + bool enable_etsi_srd_chan_support; } *ptSapContext; /*---------------------------------------------------------------------------- diff --git a/core/sap/src/sap_module.c b/core/sap/src/sap_module.c index cd500fa606d5..4b4db4983077 100644 --- a/core/sap/src/sap_module.c +++ b/core/sap/src/sap_module.c @@ -3752,6 +3752,32 @@ QDF_STATUS wlansap_set_tx_leakage_threshold(tHalHandle hal, return QDF_STATUS_SUCCESS; } +/** + * wlansap_set_etsi_srd_chan_support() - set UNI-III band channel support + * @hal: HAL pointer + * @srd_chan_support: ETSI SRD channel support + * + * This function set sap ETSI SRD channel support + * + * Return: None + */ +void wlansap_set_etsi_srd_chan_support(tHalHandle hal, + bool etsi_srd_chan_support) +{ + tpAniSirGlobal mac; + + if (NULL == hal) { + QDF_TRACE(QDF_MODULE_ID_SAP, QDF_TRACE_LEVEL_ERROR, + "%s: Invalid hal pointer", __func__); + return; + } + + mac = PMAC_STRUCT(hal); + mac->sap.enable_etsi_srd_chan_support = etsi_srd_chan_support; + QDF_TRACE(QDF_MODULE_ID_SAP, QDF_TRACE_LEVEL_DEBUG, + "%s: srd_ch_support %d", __func__, + mac->sap.enable_etsi_srd_chan_support); +} /* * wlansap_set_invalid_session() - set session ID to invalid * @cds_ctx: pointer of global context diff --git a/core/sme/src/csr/csr_api_roam.c b/core/sme/src/csr/csr_api_roam.c index 800567262204..4b21da731c18 100644 --- a/core/sme/src/csr/csr_api_roam.c +++ b/core/sme/src/csr/csr_api_roam.c @@ -906,7 +906,8 @@ QDF_STATUS csr_update_channel_list(tpAniSirGlobal pMac) struct csr_sta_roam_policy_params *roam_policy = &pMac->roam.configParam.sta_roam_policy; /* Scan is not performed on DSRC channels*/ - if (pScan->base_channels.channelList[i] >= CDS_MIN_11P_CHANNEL) + if (cds_is_dsrc_channel(cds_chan_to_freq( + pScan->base_channels.channelList[i]))) continue; channel = pScan->base_channels.channelList[i]; diff --git a/core/sme/src/csr/csr_api_scan.c b/core/sme/src/csr/csr_api_scan.c index 11273e607332..f474ba77eb7e 100644 --- a/core/sme/src/csr/csr_api_scan.c +++ b/core/sme/src/csr/csr_api_scan.c @@ -6266,8 +6266,8 @@ static void csr_scan_copy_request_valid_channels_only(tpAniSirGlobal mac_ctx, * that is the only way to find p2p peers. * This can happen only if band is set to 5Ghz mode. */ - if (src_req->ChannelInfo.ChannelList[index] < - CDS_MIN_11P_CHANNEL && + if (!cds_is_dsrc_channel(cds_chan_to_freq( + src_req->ChannelInfo.ChannelList[index])) && ((csr_roam_is_valid_channel(mac_ctx, src_req->ChannelInfo.ChannelList[index])) || ((eCSR_SCAN_P2P_DISCOVERY == src_req->requestType) && @@ -6382,7 +6382,7 @@ static bool csr_scan_filter_given_chnl_band(tpAniSirGlobal mac_ctx, * Don't allow DSRC channel when IBSS or SAP DFS concurrent * connection is up */ - if (valid_chnl_list[i] >= CDS_MIN_11P_CHANNEL) + if (cds_is_dsrc_channel(cds_chan_to_freq(valid_chnl_list[i]))) continue; if (CDS_IS_CHANNEL_5GHZ(channel) && CDS_IS_CHANNEL_24GHZ(valid_chnl_list[i])) { @@ -6530,10 +6530,10 @@ QDF_STATUS csr_scan_copy_request(tpAniSirGlobal mac_ctx, cds_get_channel_state(src_req-> ChannelInfo. ChannelList[index]); - if (src_req->ChannelInfo.ChannelList[index] < - CDS_MIN_11P_CHANNEL && - ((CHANNEL_STATE_ENABLE == - channel_state) || + if (!cds_is_dsrc_channel(cds_chan_to_freq( + src_req->ChannelInfo.ChannelList[index] + )) && ((CHANNEL_STATE_ENABLE == + channel_state) || ((CHANNEL_STATE_DFS == channel_state) && !skip_dfs_chnl))) { dst_req->ChannelInfo.ChannelList @@ -6561,8 +6561,9 @@ QDF_STATUS csr_scan_copy_request(tpAniSirGlobal mac_ctx, new_index = 0; for (index = 0; index < src_req->ChannelInfo. numOfChannels; index++) { - if (src_req->ChannelInfo.ChannelList[index] < - CDS_MIN_11P_CHANNEL) { + if (!cds_is_dsrc_channel(cds_chan_to_freq( + src_req->ChannelInfo.ChannelList[index] + ))) { dst_req->ChannelInfo. ChannelList[new_index] = src_req->ChannelInfo. diff --git a/core/wma/src/wma_features.c b/core/wma/src/wma_features.c index 693cd11b186b..50e511e39468 100644 --- a/core/wma/src/wma_features.c +++ b/core/wma/src/wma_features.c @@ -1001,9 +1001,9 @@ WLAN_PHY_MODE wma_chan_phy_mode(u8 chan, enum phy_ch_width chan_width, break; } } - } else if (CDS_IS_CHANNEL_DSRC(chan)) + } else if (cds_is_dsrc_channel(cds_chan_to_freq(chan))) { phymode = MODE_11A; - else { + } else { if (((CH_WIDTH_5MHZ == chan_width) || (CH_WIDTH_10MHZ == chan_width)) && ((WNI_CFG_DOT11_MODE_11A == dot11_mode) || |
