diff --git a/core/hdd/src/wlan_hdd_wext.c b/core/hdd/src/wlan_hdd_wext.c index c19e100eabc1..bf4cdbc0c796 100644 --- a/core/hdd/src/wlan_hdd_wext.c +++ b/core/hdd/src/wlan_hdd_wext.c @@ -1143,6 +1143,28 @@ static const struct ccp_freq_chan_map freq_chan_map[] = { */ #define WE_SET_PDEV_RESET 95 +/* + * setModDTIM - Change Modulated DTIM + * + * @INPUT: set_value. + * + * @OUTPUT: None + * + * This IOCTL is used to change modulated DTIM + * value without WIFI OFF/ON. + * + * @E.g: iwpriv wlan0 setModDTIM + * iwpriv wlan0 setModDTIM 2 + * + * Supported Feature: N/A + * + * Usage: Internal/External + * + * + */ +#define WE_SET_MODULATED_DTIM 96 + + /* Private ioctls and their sub-ioctls */ #define WLAN_PRIV_SET_NONE_GET_INT (SIOCIWFIRSTPRIV + 1) #define WE_GET_11D_STATE 1 @@ -9225,6 +9247,18 @@ static int __iw_setint_getnone(struct net_device *dev, case WE_SET_PDEV_RESET: ret = hdd_handle_pdev_reset(adapter, set_value); break; + case WE_SET_MODULATED_DTIM: + { + if ((set_value < CFG_ENABLE_MODULATED_DTIM_MIN) || + (set_value > CFG_ENABLE_MODULATED_DTIM_MAX)) { + hdd_err("Invalid gEnableModuleDTIM value %d", + set_value); + return -EINVAL; + } else { + hdd_ctx->config->enableModulatedDTIM = set_value; + } + break; + } default: hdd_err("Invalid sub command %d", sub_cmd); ret = -EINVAL; @@ -13744,6 +13778,10 @@ static const struct iw_priv_args we_private_args[] = { IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 1, 0, "pdev_reset" }, + {WE_SET_MODULATED_DTIM, + IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 1, + 0, "setModDTIM" }, + {WLAN_PRIV_SET_NONE_GET_INT, 0, IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 1,