qcacld-3.0: Avoid integer overflow in set_wifi_test_config

While processing vendor command WIFI_TEST_CONFIG_TWT_SETUP,
in respective command handler __wlan_hdd_cfg80211_set_wifi_test_config()
there is no maximum range check of INTVL_EXP and INTVL_MANTISSA attrs
which can lead to potential integer overflow.

Also there is no check whether mandatory attrs like DURATION,
INTVL_MANTISSA etc., are present. If these mandatory attrs are
not present then driver is initializing them to zeros
which can lead to divide by zero error when calculating wake interval.

To address this, return error when mandatory attributes are not
present and add maximum range check.

Change-Id: If3ac71e1263906fdd502c77103e1fff91f65e816
CRs-Fixed: 2435728
2 files changed