|
@@ -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],
|