|
@@ -4172,6 +4172,27 @@ static int hdd_we_set_max_assoc(struct hdd_adapter *adapter, int value)
|
|
|
return qdf_status_to_os_return(status);
|
|
|
}
|
|
|
|
|
|
+static int hdd_we_set_data_inactivity_timeout(struct hdd_adapter *adapter,
|
|
|
+ int value)
|
|
|
+{
|
|
|
+ struct hdd_context *hdd_ctx = WLAN_HDD_GET_CTX(adapter);
|
|
|
+ mac_handle_t mac_handle = hdd_ctx->mac_handle;
|
|
|
+ tpAniSirGlobal mac_ctx;
|
|
|
+
|
|
|
+ if (!mac_handle)
|
|
|
+ return -EINVAL;
|
|
|
+
|
|
|
+ if (!cfg_in_range(CFG_PS_DATA_INACTIVITY_TIMEOUT, value)) {
|
|
|
+ hdd_err_rl("Invalid value %d", value);
|
|
|
+ return -EINVAL;
|
|
|
+ }
|
|
|
+
|
|
|
+ mac_ctx = PMAC_STRUCT(mac_handle);
|
|
|
+ mac_ctx->mlme_cfg->timeouts.ps_data_inactivity_timeout = value;
|
|
|
+
|
|
|
+ return 0;
|
|
|
+}
|
|
|
+
|
|
|
/**
|
|
|
* iw_setint_getnone() - Generic "set integer" private ioctl handler
|
|
|
* @dev: device upon which the ioctl was received
|
|
@@ -4221,19 +4242,9 @@ static int __iw_setint_getnone(struct net_device *dev,
|
|
|
break;
|
|
|
|
|
|
case WE_SET_DATA_INACTIVITY_TO:
|
|
|
- if (!mac_handle)
|
|
|
- return -EINVAL;
|
|
|
-
|
|
|
- if (cfg_in_range(CFG_PS_DATA_INACTIVITY_TIMEOUT, set_value)) {
|
|
|
- tpAniSirGlobal mac_ctx = PMAC_STRUCT(mac_handle);
|
|
|
-
|
|
|
- mac_ctx->mlme_cfg->timeouts.ps_data_inactivity_timeout =
|
|
|
- set_value;
|
|
|
- } else {
|
|
|
- hdd_err("Invalid inactivity timeout %d", set_value);
|
|
|
- ret = -EINVAL;
|
|
|
- }
|
|
|
+ ret = hdd_we_set_data_inactivity_timeout(adapter, set_value);
|
|
|
break;
|
|
|
+
|
|
|
case WE_SET_WOW_DATA_INACTIVITY_TO:
|
|
|
if (!mac_handle) {
|
|
|
ret = -EINVAL;
|