From ad4c039d2cff172533f4a047c12568cb4eea37ea Mon Sep 17 00:00:00 2001 From: Himanshu Agarwal Date: Tue, 8 May 2018 16:53:36 +0530 Subject: [PATCH] qcacld-3.0: Remove force SAP ACS support from driver Remove force SAP ACS support from driver as it is no longer needed after hostapd based ACS is enabled permanently from framework. Change-Id: Ib3b8bac0dcf45562596d89d0aa49e16a03f85499 CRs-Fixed: 2234858 --- core/hdd/inc/qc_sap_ioctl.h | 4 - core/hdd/inc/wlan_hdd_cfg.h | 79 ------------ core/hdd/src/wlan_hdd_cfg.c | 30 ----- core/hdd/src/wlan_hdd_cfg80211.c | 127 -------------------- core/hdd/src/wlan_hdd_hostapd.c | 199 +------------------------------ core/hdd/src/wlan_hdd_wext.c | 58 +-------- 6 files changed, 6 insertions(+), 491 deletions(-) diff --git a/core/hdd/inc/qc_sap_ioctl.h b/core/hdd/inc/qc_sap_ioctl.h index af033887f171..82ef9e19613b 100644 --- a/core/hdd/inc/qc_sap_ioctl.h +++ b/core/hdd/inc/qc_sap_ioctl.h @@ -72,7 +72,6 @@ struct channel_list_info { #define QCSAP_IOCTL_PRIV_SET_THREE_INT_GET_NONE (SIOCIWFIRSTPRIV + 15) #define WE_SET_WLAN_DBG 1 #define WE_SET_DP_TRACE 2 -#define WE_SET_SAP_CHANNELS 3 #define QCSAP_IOCTL_PRIV_SET_VAR_INT_GET_NONE (SIOCIWFIRSTPRIV + 16) #define WE_UNIT_TEST_CMD 7 /* @@ -96,8 +95,6 @@ struct channel_list_info { */ #define WE_SET_CHAN_AVOID 21 -#define QCSAP_IOCTL_SET_CHANNEL_RANGE (SIOCIWFIRSTPRIV + 17) - #define WE_P2P_NOA_CMD 2 #define QCSAP_IOCTL_MODIFY_ACL (SIOCIWFIRSTPRIV + 18) @@ -177,7 +174,6 @@ enum { QCSAP_PARAM_CLR_ACL = 4, QCSAP_PARAM_ACL_MODE, QCSAP_PARAM_HIDE_SSID, - QCSAP_PARAM_AUTO_CHANNEL, QCSAP_PARAM_SET_MC_RATE, QCSAP_PARAM_SET_TXRX_FW_STATS, QCSAP_PARAM_SET_MCC_CHANNEL_LATENCY, diff --git a/core/hdd/inc/wlan_hdd_cfg.h b/core/hdd/inc/wlan_hdd_cfg.h index 9411778bbcae..a1d333bd847c 100644 --- a/core/hdd/inc/wlan_hdd_cfg.h +++ b/core/hdd/inc/wlan_hdd_cfg.h @@ -5782,82 +5782,6 @@ enum hdd_link_speed_rpt_type { #define CFG_VC_MODE_BITMAP_MAX (0x0fffffff) #define CFG_VC_MODE_BITMAP_DEFAULT (0x00000005) -/* - * - * gApAutoChannelSelection - Force ACS from ini - * @Min: 0 - * @Max: 1 - * @Default: 0 - * - * This ini is used to set to enable force acs from driver. - * If enabled, channel/ hw config from hostapd is ignored. - * Driver uses INI params dot11Mode, channel bonding mode and vht chan width - * to derive ACS HW mode and operating BW. - * - * Non android platforms shall not use force ACS method and rely on hostapd - * driven ACS method for concurrent SAP ACS configuration, OBSS etc. - * - * Related: Only applicable if gCoalesingInIBSS is 0 - * - * Supported Feature: SAP - * - * Usage: Internal/External - * - * - */ -#define CFG_FORCE_SAP_ACS "gApAutoChannelSelection" -#define CFG_FORCE_SAP_ACS_MIN (0) -#define CFG_FORCE_SAP_ACS_MAX (1) -#define CFG_FORCE_SAP_ACS_DEFAULT (0) - -/* - * - * gAPChannelSelectStartChannel - start channel for ACS - * @Min: 0 - * @Max: 0xFF - * @Default: 1 - * - * This ini is used to set start channel for ACS. - * ACS scan will choose channel between force_sap_acs_st_ch - * and force_sap_acs_end_ch - * - * Related: Only applicable gAPChannelSelectEndChannel is set - * - * Supported Feature: SAP - * - * Usage: Internal/External - * - * - */ -#define CFG_FORCE_SAP_ACS_START_CH "gAPChannelSelectStartChannel" -#define CFG_FORCE_SAP_ACS_START_CH_MIN (0) -#define CFG_FORCE_SAP_ACS_START_CH_MAX (0xFF) -#define CFG_FORCE_SAP_ACS_START_CH_DEFAULT (1) - -/* - * - * gAPChannelSelectEndChannel - end channel for ACS - * @Min: 0 - * @Max: 0xFF - * @Default: 11 - * - * This ini is used to set end channel for ACS. - * ACS scan will choose channel between force_sap_acs_st_ch - * and force_sap_acs_end_ch - * - * Related: Only applicable if gAPChannelSelectStartChannel is set - * - * Supported Feature: SAP - * - * Usage: Internal/External - * - * - */ -#define CFG_FORCE_SAP_ACS_END_CH "gAPChannelSelectEndChannel" -#define CFG_FORCE_SAP_ACS_END_CH_MIN (0) -#define CFG_FORCE_SAP_ACS_END_CH_MAX (0xFF) -#define CFG_FORCE_SAP_ACS_END_CH_DEFAULT (11) - /* * * gEnableSAPManadatoryChanList - Enable SAP Mandatory channel list @@ -14743,9 +14667,6 @@ struct hdd_config { /* Flag to indicate crash inject enabled or not */ bool crash_inject_enabled; - uint8_t force_sap_acs; - uint8_t force_sap_acs_st_ch; - uint8_t force_sap_acs_end_ch; bool enable_sap_mandatory_chan_list; diff --git a/core/hdd/src/wlan_hdd_cfg.c b/core/hdd/src/wlan_hdd_cfg.c index 3b5610698d0f..62e50e858033 100644 --- a/core/hdd/src/wlan_hdd_cfg.c +++ b/core/hdd/src/wlan_hdd_cfg.c @@ -606,30 +606,6 @@ struct reg_table_entry g_registry_table[] = { CFG_VC_MODE_BITMAP_MIN, CFG_VC_MODE_BITMAP_MAX), - REG_VARIABLE(CFG_FORCE_SAP_ACS, WLAN_PARAM_Integer, - struct hdd_config, force_sap_acs, - VAR_FLAGS_DYNAMIC_CFG | - VAR_FLAGS_OPTIONAL | VAR_FLAGS_RANGE_CHECK_ASSUME_DEFAULT, - CFG_FORCE_SAP_ACS_DEFAULT, - CFG_FORCE_SAP_ACS_MIN, - CFG_FORCE_SAP_ACS_MAX), - - REG_VARIABLE(CFG_FORCE_SAP_ACS_START_CH, WLAN_PARAM_Integer, - struct hdd_config, force_sap_acs_st_ch, - VAR_FLAGS_DYNAMIC_CFG | - VAR_FLAGS_OPTIONAL | VAR_FLAGS_RANGE_CHECK_ASSUME_DEFAULT, - CFG_FORCE_SAP_ACS_START_CH_DEFAULT, - CFG_FORCE_SAP_ACS_START_CH_MIN, - CFG_FORCE_SAP_ACS_START_CH_MAX), - - REG_VARIABLE(CFG_FORCE_SAP_ACS_END_CH, WLAN_PARAM_Integer, - struct hdd_config, force_sap_acs_end_ch, - VAR_FLAGS_DYNAMIC_CFG | - VAR_FLAGS_OPTIONAL | VAR_FLAGS_RANGE_CHECK_ASSUME_DEFAULT, - CFG_FORCE_SAP_ACS_END_CH_DEFAULT, - CFG_FORCE_SAP_ACS_END_CH_MIN, - CFG_FORCE_SAP_ACS_END_CH_MAX), - REG_VARIABLE(CFG_ENABLE_SAP_MANDATORY_CHAN_LIST, WLAN_PARAM_Integer, struct hdd_config, enable_sap_mandatory_chan_list, VAR_FLAGS_OPTIONAL | VAR_FLAGS_RANGE_CHECK_ASSUME_DEFAULT, @@ -6441,12 +6417,6 @@ void hdd_cfg_print(struct hdd_context *hdd_ctx) hdd_ctx->config->apProtection); hdd_debug("Name = [gEnableApOBSSProt] value = [%u]", hdd_ctx->config->apOBSSProtEnabled); - hdd_debug("Name = [%s] value = [%u]", CFG_FORCE_SAP_ACS, - hdd_ctx->config->force_sap_acs); - hdd_debug("Name = [%s] value = [%u]", CFG_FORCE_SAP_ACS_START_CH, - hdd_ctx->config->force_sap_acs_st_ch); - hdd_debug("Name = [%s] value = [%u]", CFG_FORCE_SAP_ACS_END_CH, - hdd_ctx->config->force_sap_acs_end_ch); #ifdef FEATURE_AP_MCC_CH_AVOIDANCE hdd_debug("Name = [sap_channel_avoidance] value = [%u]", hdd_ctx->config->sap_channel_avoidance); diff --git a/core/hdd/src/wlan_hdd_cfg80211.c b/core/hdd/src/wlan_hdd_cfg80211.c index 06ca262b8a98..45df80663dfe 100644 --- a/core/hdd/src/wlan_hdd_cfg80211.c +++ b/core/hdd/src/wlan_hdd_cfg80211.c @@ -1593,117 +1593,6 @@ int wlan_hdd_sap_cfg_dfs_override(struct hdd_adapter *adapter) return con_ch; } -/** - * wlan_hdd_reset_force_acs_chan_range: Set acs channel ranges as per force ACS - * configuration. - * @hdd_ctx: pointer to hdd context - * @sap_config: pointer to SAP config struct - * - * Return: 0 if success else error code - */ -static int wlan_hdd_reset_force_acs_chan_range(struct hdd_context *hdd_ctx, - tsap_config_t *sap_config) -{ - bool is_dfs_mode_enabled = false; - uint32_t i, num_channels = 0; - uint8_t channels[WNI_CFG_VALID_CHANNEL_LIST_LEN] = {0}; - eCsrPhyMode hw_mode; - tSirMacHTChannelWidth ch_width; - - if (hdd_ctx->config->force_sap_acs_st_ch > - hdd_ctx->config->force_sap_acs_end_ch) { - hdd_err("invalid configuration for start and end channel"); - return -EINVAL; - } - if (hdd_ctx->config->enableDFSMasterCap) - is_dfs_mode_enabled = true; - - sap_config->acs_cfg.start_ch = - hdd_ctx->config->force_sap_acs_st_ch; - sap_config->acs_cfg.end_ch = - hdd_ctx->config->force_sap_acs_end_ch; - - for (i = sap_config->acs_cfg.start_ch; - i <= sap_config->acs_cfg.end_ch; i++) { - if ((CHANNEL_STATE_ENABLE == - wlan_reg_get_channel_state(hdd_ctx->hdd_pdev, i)) || - (is_dfs_mode_enabled && - CHANNEL_STATE_DFS == - wlan_reg_get_channel_state(hdd_ctx->hdd_pdev, i))) { - channels[num_channels] = i; - num_channels++; - } - } - if (sap_config->acs_cfg.ch_list) - qdf_mem_free(sap_config->acs_cfg.ch_list); - - sap_config->acs_cfg.ch_list = qdf_mem_malloc(num_channels); - if (!sap_config->acs_cfg.ch_list) { - hdd_err("ACS config alloc fail"); - return -ENOMEM; - } - qdf_mem_copy(sap_config->acs_cfg.ch_list, channels, num_channels); - sap_config->acs_cfg.ch_list_count = num_channels; - - /* Derive ACS HW mode */ - hw_mode = hdd_cfg_xlate_to_csr_phy_mode(hdd_ctx->config->dot11Mode); - if (hw_mode == eCSR_DOT11_MODE_AUTO) { - if (sme_is_feature_supported_by_fw(DOT11AX)) - hw_mode = eCSR_DOT11_MODE_11ax; - else - hw_mode = eCSR_DOT11_MODE_11ac; - } - - if (hdd_ctx->config->sap_force_11n_for_11ac) { - if (hw_mode == eCSR_DOT11_MODE_11ac || - hw_mode == eCSR_DOT11_MODE_11ac_ONLY) - hw_mode = eCSR_DOT11_MODE_11n; - } - - if ((hw_mode == eCSR_DOT11_MODE_11b || - hw_mode == eCSR_DOT11_MODE_11g || - hw_mode == eCSR_DOT11_MODE_11g_ONLY) && - sap_config->acs_cfg.start_ch > 14) { - hdd_err("Invalid ACS HW Mode %d + CH range <%d - %d>", - hw_mode, sap_config->acs_cfg.start_ch, - sap_config->acs_cfg.end_ch); - return -EINVAL; - } - sap_config->acs_cfg.hw_mode = hw_mode; - - /* Derive ACS BW */ - ch_width = eHT_CHANNEL_WIDTH_20MHZ; - if (hw_mode == eCSR_DOT11_MODE_11ac || - hw_mode == eCSR_DOT11_MODE_11ac_ONLY || - hw_mode == eCSR_DOT11_MODE_11ax || - hw_mode == eCSR_DOT11_MODE_11ax_ONLY) { - ch_width = hdd_ctx->config->vhtChannelWidth; - /* VHT in 2.4G depends on gChannelBondingMode24GHz INI param */ - if (sap_config->acs_cfg.end_ch <= 14) - ch_width = - hdd_ctx->config->nChannelBondingMode24GHz ? - eHT_CHANNEL_WIDTH_40MHZ : - eHT_CHANNEL_WIDTH_20MHZ; - } - - if (hw_mode == eCSR_DOT11_MODE_11n || - hw_mode == eCSR_DOT11_MODE_11n_ONLY) { - if (sap_config->acs_cfg.end_ch <= 14) - ch_width = - hdd_ctx->config->nChannelBondingMode24GHz ? - eHT_CHANNEL_WIDTH_40MHZ : - eHT_CHANNEL_WIDTH_20MHZ; - else - ch_width = - hdd_ctx->config->nChannelBondingMode5GHz ? - eHT_CHANNEL_WIDTH_40MHZ : - eHT_CHANNEL_WIDTH_20MHZ; - } - sap_config->acs_cfg.ch_width = ch_width; - - return 0; -} - /** * wlan_hdd_set_acs_ch_range : Populate ACS hw mode and channel range values * @sap_cfg: pointer to SAP config struct @@ -2480,12 +2369,6 @@ static int __wlan_hdd_cfg80211_do_acs(struct wiphy *wiphy, return -EPERM; } - if (hdd_ctx->config->force_sap_acs && - !hdd_ctx->config->vendor_acs_support) { - hdd_err("Hostapd ACS rejected as Driver ACS enabled"); - return -EPERM; - } - ret = wlan_hdd_validate_context(hdd_ctx); if (ret) return ret; @@ -2668,16 +2551,6 @@ static int __wlan_hdd_cfg80211_do_acs(struct wiphy *wiphy, sap_config->acs_cfg.ch_list, &sap_config->acs_cfg.ch_list_count); - if (hdd_ctx->config->force_sap_acs) { - hdd_debug("forcing SAP acs start and end channel"); - ret = wlan_hdd_reset_force_acs_chan_range(hdd_ctx, - sap_config); - if (ret) { - hdd_err("reset force acs channel range failed"); - goto out; - } - } - sap_config->acs_cfg.band = hw_mode; ret = wlan_hdd_set_acs_ch_range(sap_config, hw_mode, ht_enabled, vht_enabled); diff --git a/core/hdd/src/wlan_hdd_hostapd.c b/core/hdd/src/wlan_hdd_hostapd.c index 1162e91ff3eb..7009996eb5d1 100644 --- a/core/hdd/src/wlan_hdd_hostapd.c +++ b/core/hdd/src/wlan_hdd_hostapd.c @@ -2377,12 +2377,6 @@ QDF_STATUS hdd_hostapd_sap_event_cb(tpSap_Event pSapEvent, ap_ctx->sap_config.acs_cfg.ch_width = pSapEvent->sapevt.sap_ch_selected.ch_width; - /* Indicate operating channel change to hostapd - * only for non driver override acs - */ - if (adapter->device_mode == QDF_SAP_MODE && - hdd_ctx->config->force_sap_acs) - return QDF_STATUS_SUCCESS; sap_ch_param.ch_width = pSapEvent->sapevt.sap_ch_selected.ch_width; sap_ch_param.center_freq_seg0 = @@ -2440,9 +2434,7 @@ QDF_STATUS hdd_hostapd_sap_event_cb(tpSap_Event pSapEvent, pSapEvent->sapevt.sap_ch_selected.vht_seg1_center_ch; ap_ctx->sap_config.acs_cfg.ch_width = pSapEvent->sapevt.sap_ch_selected.ch_width; - /* send vendor event to hostapd only for hostapd based acs*/ - if (!hdd_ctx->config->force_sap_acs) - wlan_hdd_cfg80211_acs_ch_select_evt(adapter); + wlan_hdd_cfg80211_acs_ch_select_evt(adapter); qdf_atomic_set(&adapter->session.ap.acs_in_progress, 0); return QDF_STATUS_SUCCESS; case eSAP_ECSA_CHANGE_CHAN_IND: @@ -3312,14 +3304,6 @@ static __iw_softap_setparam(struct net_device *dev, ret = -EINVAL; } break; - case QCSAP_PARAM_AUTO_CHANNEL: - if (set_value == 0 || set_value == 1) - (WLAN_HDD_GET_CTX( - adapter))->config->force_sap_acs = - set_value; - else - ret = -EINVAL; - break; case QCSAP_PARAM_CONC_SYSTEM_PREF: hdd_debug("New preference: %d", set_value); if (!((set_value >= CFG_CONC_SYSTEM_PREF_MIN) && @@ -4042,11 +4026,6 @@ static __iw_softap_getparam(struct net_device *dev, } break; - case QCSAP_PARAM_AUTO_CHANNEL: - *value = (WLAN_HDD_GET_CTX - (adapter))->config->force_sap_acs; - break; - case QCSAP_PARAM_GET_WLAN_DBG: { qdf_trace_display(); @@ -4762,57 +4741,6 @@ static int iw_get_char_setnone(struct net_device *dev, return ret; } -static int wlan_hdd_set_force_acs_ch_range(struct net_device *dev, - struct iw_request_info *info, - union iwreq_data *wrqu, char *extra) -{ - struct hdd_adapter *adapter = (netdev_priv(dev)); - struct hdd_context *hdd_ctx = WLAN_HDD_GET_CTX(adapter); - int ret; - int *value = (int *)extra; - - hdd_enter_dev(dev); - - if (!capable(CAP_NET_ADMIN)) { - hdd_err("permission check failed"); - return -EPERM; - } - - ret = wlan_hdd_validate_context(hdd_ctx); - if (0 != ret) - return ret; - - ret = hdd_check_private_wext_control(hdd_ctx, info); - if (0 != ret) - return ret; - - if (wlan_hdd_validate_operation_channel(adapter, value[0]) != - QDF_STATUS_SUCCESS || - wlan_hdd_validate_operation_channel(adapter, value[1]) != - QDF_STATUS_SUCCESS) { - return -EINVAL; - } - hdd_ctx->config->force_sap_acs_st_ch = value[0]; - hdd_ctx->config->force_sap_acs_end_ch = value[1]; - - hdd_ctx->config->force_sap_acs_st_ch = value[0]; - hdd_ctx->config->force_sap_acs_end_ch = value[1]; - - return 0; -} - -static int iw_softap_set_force_acs_ch_range(struct net_device *dev, - struct iw_request_info *info, - union iwreq_data *wrqu, char *extra) -{ - int ret; - - cds_ssr_protect(__func__); - ret = wlan_hdd_set_force_acs_ch_range(dev, info, wrqu, extra); - cds_ssr_unprotect(__func__); - return ret; -} - static int __iw_get_channel_list(struct net_device *dev, struct iw_request_info *info, union iwreq_data *wrqu, char *extra) @@ -5495,10 +5423,6 @@ static const struct iw_priv_args hostapd_private_args[] = { QCSAP_PARAM_SET_CHANNEL_CHANGE, IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 1, 0, "setChanChange" - }, { - QCSAP_PARAM_AUTO_CHANNEL, - IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 1, 0, - "setAutoChannel" }, { QCSAP_PARAM_CONC_SYSTEM_PREF, IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 1, 0, @@ -5679,9 +5603,6 @@ static const struct iw_priv_args hostapd_private_args[] = { }, { QCSAP_PARAM_GET_WLAN_DBG, 0, IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 1, "getwlandbg" - }, { - QCSAP_PARAM_AUTO_CHANNEL, 0, - IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 1, "getAutoChannel" }, { QCSAP_GTX_BWMASK, 0, IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 1, "get_gtxBWMask" @@ -5815,9 +5736,6 @@ static const struct iw_priv_args hostapd_private_args[] = { { WE_SET_WLAN_DBG, IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 3, 0, "setwlandbg" - }, { - WE_SET_SAP_CHANNELS, - IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 3, 0, "setsapchannels" } , #ifdef CONFIG_DP_TRACE @@ -6015,8 +5933,6 @@ static const iw_handler hostapd_private[] = { [QCSAP_IOCTL_PRIV_SET_VAR_INT_GET_NONE - SIOCIWFIRSTPRIV] = iw_set_var_ints_getnone, - [QCSAP_IOCTL_SET_CHANNEL_RANGE - SIOCIWFIRSTPRIV] = - iw_softap_set_force_acs_ch_range, [QCSAP_IOCTL_MODIFY_ACL - SIOCIWFIRSTPRIV] = iw_softap_modify_acl, [QCSAP_IOCTL_GET_CHANNEL_LIST - SIOCIWFIRSTPRIV] = @@ -7336,106 +7252,6 @@ static int wlan_hdd_sap_p2p_11ac_overrides(struct hdd_adapter *ap_adapter) return 0; } -/** - * wlan_hdd_setup_acs_overrides : Overrides ACS configurations - * @adapter: pointer to adapter struct - * - * This function overrides ACS configuration based on driver INI - * parameters. These overrides are done to support android legacy - * configuration method. - * - * NOTE: Non android platform supports concurrency and these overrides shall - * not be used. Also future driver based overrides shall be consolidated in this - * function only. Avoid random overrides in other location based on ini. - * - * Return: 0 for Success or Negative error codes. - */ -static int wlan_hdd_setup_acs_overrides(struct hdd_adapter *ap_adapter) -{ - tsap_config_t *sap_cfg = &ap_adapter->session.ap.sap_config; - struct hdd_context *hdd_ctx = WLAN_HDD_GET_CTX(ap_adapter); - - hdd_debug("** Driver force ACS override **"); - - sap_cfg->channel = AUTO_CHANNEL_SELECT; - sap_cfg->acs_cfg.acs_mode = true; - sap_cfg->acs_cfg.start_ch = hdd_ctx->config->force_sap_acs_st_ch; - sap_cfg->acs_cfg.end_ch = hdd_ctx->config->force_sap_acs_end_ch; - - if (sap_cfg->acs_cfg.start_ch > sap_cfg->acs_cfg.end_ch) { - hdd_err("Driver force ACS start ch (%d) > end ch (%d)", - sap_cfg->acs_cfg.start_ch, sap_cfg->acs_cfg.end_ch); - return -EINVAL; - } - - /* Derive ACS HW mode */ - sap_cfg->SapHw_mode = hdd_cfg_xlate_to_csr_phy_mode( - hdd_ctx->config->dot11Mode); - if (sap_cfg->SapHw_mode == eCSR_DOT11_MODE_AUTO) { - if (sme_is_feature_supported_by_fw(DOT11AX)) - sap_cfg->SapHw_mode = eCSR_DOT11_MODE_11ax; - else - sap_cfg->SapHw_mode = eCSR_DOT11_MODE_11ac; - } - - if (((ap_adapter->device_mode == QDF_SAP_MODE) && - (hdd_ctx->config->sap_force_11n_for_11ac)) || - ((ap_adapter->device_mode == QDF_P2P_GO_MODE) && - (hdd_ctx->config->go_force_11n_for_11ac))) { - if (sap_cfg->SapHw_mode == eCSR_DOT11_MODE_11ac || - sap_cfg->SapHw_mode == eCSR_DOT11_MODE_11ac_ONLY) - sap_cfg->SapHw_mode = eCSR_DOT11_MODE_11n; - } - - if ((sap_cfg->SapHw_mode == eCSR_DOT11_MODE_11b || - sap_cfg->SapHw_mode == eCSR_DOT11_MODE_11g || - sap_cfg->SapHw_mode == eCSR_DOT11_MODE_11g_ONLY) && - sap_cfg->acs_cfg.start_ch > 14) { - hdd_err("Invalid ACS HW Mode %d + CH range <%d - %d>", - sap_cfg->SapHw_mode, sap_cfg->acs_cfg.start_ch, - sap_cfg->acs_cfg.end_ch); - return -EINVAL; - } - sap_cfg->acs_cfg.hw_mode = sap_cfg->SapHw_mode; - - /* Derive ACS BW */ - sap_cfg->ch_width_orig = eHT_CHANNEL_WIDTH_20MHZ; - if (sap_cfg->SapHw_mode == eCSR_DOT11_MODE_11ac || - sap_cfg->SapHw_mode == eCSR_DOT11_MODE_11ac_ONLY || - sap_cfg->SapHw_mode == eCSR_DOT11_MODE_11ax || - sap_cfg->SapHw_mode == eCSR_DOT11_MODE_11ax_ONLY) { - sap_cfg->ch_width_orig = hdd_ctx->config->vhtChannelWidth; - /* VHT in 2.4G depends on gChannelBondingMode24GHz INI param */ - if (sap_cfg->acs_cfg.end_ch <= 14) - sap_cfg->ch_width_orig = - hdd_ctx->config->nChannelBondingMode24GHz ? - eHT_CHANNEL_WIDTH_40MHZ : - eHT_CHANNEL_WIDTH_20MHZ; - } - - if (sap_cfg->SapHw_mode == eCSR_DOT11_MODE_11n || - sap_cfg->SapHw_mode == eCSR_DOT11_MODE_11n_ONLY) { - if (sap_cfg->acs_cfg.end_ch <= 14) - sap_cfg->ch_width_orig = - hdd_ctx->config->nChannelBondingMode24GHz ? - eHT_CHANNEL_WIDTH_40MHZ : - eHT_CHANNEL_WIDTH_20MHZ; - else - sap_cfg->ch_width_orig = - hdd_ctx->config->nChannelBondingMode5GHz ? - eHT_CHANNEL_WIDTH_40MHZ : - eHT_CHANNEL_WIDTH_20MHZ; - } - sap_cfg->acs_cfg.ch_width = sap_cfg->ch_width_orig; - - hdd_debug("Force ACS Config: HW_MODE: %d ACS_BW: %d", - sap_cfg->acs_cfg.hw_mode, sap_cfg->acs_cfg.ch_width); - hdd_debug("Force ACS Config: ST_CH: %d END_CH: %d", - sap_cfg->acs_cfg.start_ch, sap_cfg->acs_cfg.end_ch); - - return 0; -} - /** * wlan_hdd_setup_driver_overrides : Overrides SAP / P2P GO Params * @adapter: pointer to adapter struct @@ -7454,13 +7270,9 @@ static int wlan_hdd_setup_driver_overrides(struct hdd_adapter *ap_adapter) { struct hdd_context *hdd_ctx = WLAN_HDD_GET_CTX(ap_adapter); - if (!hdd_ctx->config->vendor_acs_support) { - if (ap_adapter->device_mode == QDF_SAP_MODE && - hdd_ctx->config->force_sap_acs) - return wlan_hdd_setup_acs_overrides(ap_adapter); - else - return wlan_hdd_sap_p2p_11ac_overrides(ap_adapter); - } else + if (!hdd_ctx->config->vendor_acs_support) + return wlan_hdd_sap_p2p_11ac_overrides(ap_adapter); + else return 0; } @@ -7931,8 +7743,7 @@ int wlan_hdd_cfg80211_start_bss(struct hdd_adapter *adapter, acl_entry++; } } - if (!hdd_ctx->config->force_sap_acs && - !(ssid && qdf_str_len(PRE_CAC_SSID) == ssid_len && + if (!(ssid && qdf_str_len(PRE_CAC_SSID) == ssid_len && (0 == qdf_mem_cmp(ssid, PRE_CAC_SSID, ssid_len)))) { pIe = wlan_get_ie_ptr_from_eid(WLAN_EID_SUPP_RATES, &pMgmt_frame->u.beacon.variable[0], diff --git a/core/hdd/src/wlan_hdd_wext.c b/core/hdd/src/wlan_hdd_wext.c index 1c5b10518a5e..3b889049f44b 100644 --- a/core/hdd/src/wlan_hdd_wext.c +++ b/core/hdd/src/wlan_hdd_wext.c @@ -597,25 +597,6 @@ * */ #define WE_PPS_RSSI_CHECK 53 -/* - * - * setAutoChannel - set ACS enable/disable - * - * @INPUT: None - * - * @OUTPUT: None - * - * This IOCTL is used to set SAP ACS eanble/disable - * - * @E.g: iwpriv wlan0 setAutoChannel 0 - * - * Supported Feature: SAP - * - * Usage: Internal/External - * - * - */ -#define WE_SET_SAP_AUTO_CHANNEL_SELECTION 54 /* * * htsmps - Sets the htsmps @@ -1166,7 +1147,6 @@ /* Private ioctls and their sub-ioctls */ #define WLAN_PRIV_SET_NONE_GET_INT (SIOCIWFIRSTPRIV + 1) #define WE_GET_11D_STATE 1 -#define WE_SET_SAP_CHANNELS 3 #define WE_GET_WLAN_DBG 4 #define WE_GET_MAX_ASSOC 6 /* 7 is unused */ @@ -1913,7 +1893,6 @@ #define WLAN_PRIV_SET_THREE_INT_GET_NONE (SIOCIWFIRSTPRIV + 4) #define WE_SET_WLAN_DBG 1 #define WE_SET_DP_TRACE 2 -#define WE_SET_SAP_CHANNELS 3 #define WE_SET_FW_TEST 4 /* Private ioctls and their sub-ioctls */ @@ -4346,14 +4325,6 @@ static int __iw_setint_getnone(struct net_device *dev, break; } - case WE_SET_SAP_AUTO_CHANNEL_SELECTION: - if (set_value == 0 || set_value == 1) - (WLAN_HDD_GET_CTX(adapter))->config->force_sap_acs = - set_value; - else - ret = -EINVAL; - break; - case WE_SET_DATA_INACTIVITY_TO: if (!hHal) return -EINVAL; @@ -5710,10 +5681,6 @@ static int __iw_setnone_getint(struct net_device *dev, } break; } - case WE_GET_SAP_AUTO_CHANNEL_SELECTION: - *value = (WLAN_HDD_GET_CTX( - adapter))->config->force_sap_acs; - break; case WE_GET_CONCURRENCY_MODE: { @@ -6258,21 +6225,7 @@ static int __iw_set_three_ints_getnone(struct net_device *dev, case WE_SET_DP_TRACE: qdf_dp_trace_set_value(value[1], value[2], value[3]); break; - /* value[3] the acs band is not required as start and end channels are - * enough but this cmd is maintained under set three ints for historic - * reasons. - */ - case WE_SET_SAP_CHANNELS: - if (wlan_hdd_validate_operation_channel(adapter, value[1]) != - QDF_STATUS_SUCCESS || - wlan_hdd_validate_operation_channel(adapter, - value[2]) != QDF_STATUS_SUCCESS) { - ret = -EINVAL; - } else { - hdd_ctx->config->force_sap_acs_st_ch = value[1]; - hdd_ctx->config->force_sap_acs_end_ch = value[2]; - } - break; + case WE_SET_DUAL_MAC_SCAN_CONFIG: hdd_debug("Ioctl to set dual mac scan config"); if (hdd_ctx->config->dual_mac_feature_disable == @@ -9257,10 +9210,6 @@ static const struct iw_priv_args we_private_args[] = { 0, "setMaxAssoc"}, - {WE_SET_SAP_AUTO_CHANNEL_SELECTION, - IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 1, 0, - "setAutoChannel" }, - {WE_SET_SCAN_DISABLE, IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 1, 0, @@ -9991,11 +9940,6 @@ static const struct iw_priv_args we_private_args[] = { "set_dp_trace"}, #endif - {WE_SET_SAP_CHANNELS, - IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 3, - 0, - "setsapchannels"}, - {WE_SET_FW_TEST, IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 3, 0, "fw_test"},