qcacld-3.0: Add ioctl to change concurrency system preference
Add support to change the concurrency system preference at run time. The concurrency system preferences of throughput, latency and power can be changed at run time using the IOCTL "setConcSysPref". The policy manager provides the preferred channel list based on this preference value. Usage: iwpriv <interface> setConcSysPref <preference> Preference - 0 for throughput, 1 for powersave, 2 for latency e.g., iwpriv wlan0 setConcSysPref 1 Change-Id: Ib2b8653688400a0bbad9c9c1b1d630025ae4edcb CRs-Fixed: 993122
Этот коммит содержится в:

коммит произвёл
Gerrit - the friendly Code Review server

родитель
f37d7121d1
Коммит
97e077d091
@@ -245,6 +245,7 @@ enum {
|
|||||||
QCSAP_START_FW_PROFILING,
|
QCSAP_START_FW_PROFILING,
|
||||||
QCSAP_CAP_TSF,
|
QCSAP_CAP_TSF,
|
||||||
QCSAP_GET_TSF,
|
QCSAP_GET_TSF,
|
||||||
|
QCSAP_PARAM_CONC_SYSTEM_PREF
|
||||||
};
|
};
|
||||||
|
|
||||||
int iw_softap_get_channel_list(struct net_device *dev,
|
int iw_softap_get_channel_list(struct net_device *dev,
|
||||||
|
@@ -2454,7 +2454,16 @@ static __iw_softap_setparam(struct net_device *dev,
|
|||||||
else
|
else
|
||||||
ret = -EINVAL;
|
ret = -EINVAL;
|
||||||
break;
|
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:
|
case QCSAP_PARAM_MAX_ASSOC:
|
||||||
if (WNI_CFG_ASSOC_STA_LIMIT_STAMIN > set_value) {
|
if (WNI_CFG_ASSOC_STA_LIMIT_STAMIN > set_value) {
|
||||||
hddLog(LOGE, FL("Invalid setMaxAssoc value %d"),
|
hddLog(LOGE, FL("Invalid setMaxAssoc value %d"),
|
||||||
@@ -5672,6 +5681,10 @@ static const struct iw_priv_args hostapd_private_args[] = {
|
|||||||
QCSAP_PARAM_AUTO_CHANNEL,
|
QCSAP_PARAM_AUTO_CHANNEL,
|
||||||
IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 1, 0,
|
IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 1, 0,
|
||||||
"setAutoChannel"
|
"setAutoChannel"
|
||||||
|
}, {
|
||||||
|
QCSAP_PARAM_CONC_SYSTEM_PREF,
|
||||||
|
IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 1, 0,
|
||||||
|
"setConcSysPref"
|
||||||
},
|
},
|
||||||
/* Sub-cmds DBGLOG specific commands */
|
/* Sub-cmds DBGLOG specific commands */
|
||||||
{
|
{
|
||||||
|
@@ -216,6 +216,7 @@ static const hdd_freq_chan_map_t freq_chan_map[] = {
|
|||||||
/* Private sub ioctl for starting/stopping the profiling */
|
/* Private sub ioctl for starting/stopping the profiling */
|
||||||
#define WE_START_FW_PROFILE 87
|
#define WE_START_FW_PROFILE 87
|
||||||
#define WE_SET_CHANNEL 88
|
#define WE_SET_CHANNEL 88
|
||||||
|
#define WE_SET_CONC_SYSTEM_PREF 89
|
||||||
|
|
||||||
/* Private ioctls and their sub-ioctls */
|
/* Private ioctls and their sub-ioctls */
|
||||||
#define WLAN_PRIV_SET_NONE_GET_INT (SIOCIWFIRSTPRIV + 1)
|
#define WLAN_PRIV_SET_NONE_GET_INT (SIOCIWFIRSTPRIV + 1)
|
||||||
@@ -6274,7 +6275,19 @@ static int __iw_setint_getnone(struct net_device *dev,
|
|||||||
}
|
}
|
||||||
break;
|
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:
|
default:
|
||||||
{
|
{
|
||||||
hddLog(LOGE, "%s: Invalid sub command %d", __func__,
|
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,
|
IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 1,
|
||||||
0, "setChanChange" },
|
0, "setChanChange" },
|
||||||
|
|
||||||
|
{WE_SET_CONC_SYSTEM_PREF,
|
||||||
|
IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 1,
|
||||||
|
0, "setConcSysPref" },
|
||||||
|
|
||||||
{WLAN_PRIV_SET_NONE_GET_INT,
|
{WLAN_PRIV_SET_NONE_GET_INT,
|
||||||
0,
|
0,
|
||||||
IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 1,
|
IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 1,
|
||||||
|
Ссылка в новой задаче
Block a user