diff options
| author | Nitesh Shah <niteshs@codeaurora.org> | 2016-12-19 18:28:33 +0530 |
|---|---|---|
| committer | qcabuildsw <qcabuildsw@localhost> | 2016-12-20 19:47:20 -0800 |
| commit | 26edd57827baeefe99855c8e13301e439dbb29ad (patch) | |
| tree | a7333b58e6d38daf9204781fa98b523df71936a4 | |
| parent | 2eddbb91b6e71b602d9f5a0c1b16ed2742e8927b (diff) | |
qcacld-3.0: Input validation for RSSI Delta for TDLS Config
Validating input for RSSI Delta for TDLS configuration in
the function wlan_hdd_tdls_check_config().
Change-Id: I74c00db19dc28f363fe4e349b2bd94440bfc9238
CRs-Fixed: 1102929
| -rw-r--r-- | core/hdd/src/wlan_hdd_tdls.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/core/hdd/src/wlan_hdd_tdls.c b/core/hdd/src/wlan_hdd_tdls.c index 9244b5b3071f..f309890fd164 100644 --- a/core/hdd/src/wlan_hdd_tdls.c +++ b/core/hdd/src/wlan_hdd_tdls.c @@ -1525,6 +1525,14 @@ static int wlan_hdd_tdls_check_config(tdls_config_params_t *config) CFG_TDLS_RSSI_TEARDOWN_THRESHOLD_MAX); return -EINVAL; } + if (config->rssi_delta < CFG_TDLS_RSSI_DELTA_MIN + || config->rssi_delta > CFG_TDLS_RSSI_DELTA_MAX) { + hdd_err("Invalid 11th argument %d. <%d...%d>", + config->rssi_delta, + CFG_TDLS_RSSI_DELTA_MIN, + CFG_TDLS_RSSI_DELTA_MAX); + return -EINVAL; + } return 0; } |
