diff --git a/core/hdd/inc/qc_sap_ioctl.h b/core/hdd/inc/qc_sap_ioctl.h index cede160e85e8..232a1d1c6f6e 100644 --- a/core/hdd/inc/qc_sap_ioctl.h +++ b/core/hdd/inc/qc_sap_ioctl.h @@ -245,6 +245,7 @@ enum { QCSAP_START_FW_PROFILING, QCSAP_CAP_TSF, QCSAP_GET_TSF, + QCSAP_PARAM_CONC_SYSTEM_PREF }; int iw_softap_get_channel_list(struct net_device *dev, diff --git a/core/hdd/src/wlan_hdd_hostapd.c b/core/hdd/src/wlan_hdd_hostapd.c index 597d51278731..ab894f63ab1b 100644 --- a/core/hdd/src/wlan_hdd_hostapd.c +++ b/core/hdd/src/wlan_hdd_hostapd.c @@ -2454,7 +2454,16 @@ static __iw_softap_setparam(struct net_device *dev, else ret = -EINVAL; break; - + case QCSAP_PARAM_CONC_SYSTEM_PREF: + hdd_info("New preference: %d", set_value); + if (!((set_value >= CFG_CONC_SYSTEM_PREF_MIN) && + (set_value <= CFG_CONC_SYSTEM_PREF_MAX))) { + hdd_err("Invalid system preference %d", set_value); + return -EINVAL; + } + /* hdd_ctx, hdd_ctx->config are already checked for null */ + hdd_ctx->config->conc_system_pref = set_value; + break; case QCSAP_PARAM_MAX_ASSOC: if (WNI_CFG_ASSOC_STA_LIMIT_STAMIN > set_value) { hddLog(LOGE, FL("Invalid setMaxAssoc value %d"), @@ -5672,6 +5681,10 @@ static const struct iw_priv_args hostapd_private_args[] = { 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, + "setConcSysPref" }, /* Sub-cmds DBGLOG specific commands */ { diff --git a/core/hdd/src/wlan_hdd_wext.c b/core/hdd/src/wlan_hdd_wext.c index 9e3571890bf9..e741530bce03 100644 --- a/core/hdd/src/wlan_hdd_wext.c +++ b/core/hdd/src/wlan_hdd_wext.c @@ -216,6 +216,7 @@ static const hdd_freq_chan_map_t freq_chan_map[] = { /* Private sub ioctl for starting/stopping the profiling */ #define WE_START_FW_PROFILE 87 #define WE_SET_CHANNEL 88 +#define WE_SET_CONC_SYSTEM_PREF 89 /* Private ioctls and their sub-ioctls */ #define WLAN_PRIV_SET_NONE_GET_INT (SIOCIWFIRSTPRIV + 1) @@ -6274,7 +6275,19 @@ static int __iw_setint_getnone(struct net_device *dev, } break; } + case WE_SET_CONC_SYSTEM_PREF: + { + hdd_info("New preference: %d", set_value); + if (!((set_value >= CFG_CONC_SYSTEM_PREF_MIN) && + (set_value <= CFG_CONC_SYSTEM_PREF_MAX))) { + hdd_err("Invalid system preference %d", set_value); + return -EINVAL; + } + /* hdd_ctx, hdd_ctx->config are already checked for null */ + hdd_ctx->config->conc_system_pref = set_value; + break; + } default: { hddLog(LOGE, "%s: Invalid sub command %d", __func__, @@ -10322,6 +10335,10 @@ static const struct iw_priv_args we_private_args[] = { IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 1, 0, "setChanChange" }, + {WE_SET_CONC_SYSTEM_PREF, + IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 1, + 0, "setConcSysPref" }, + {WLAN_PRIV_SET_NONE_GET_INT, 0, IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 1,