diff options
| -rw-r--r-- | core/hdd/src/wlan_hdd_ioctl.c | 31 |
1 files changed, 20 insertions, 11 deletions
diff --git a/core/hdd/src/wlan_hdd_ioctl.c b/core/hdd/src/wlan_hdd_ioctl.c index 9e89e85a3aef..d4e019f5bb0d 100644 --- a/core/hdd/src/wlan_hdd_ioctl.c +++ b/core/hdd/src/wlan_hdd_ioctl.c @@ -2323,9 +2323,10 @@ static int hdd_set_dwell_time(hdd_adapter_t *adapter, uint8_t *command) sme_get_config_param(hHal, sme_config); if (strncmp(command, "SETDWELLTIME ACTIVE MAX", 23) == 0) { - if (drv_cmd_validate(command, 23)) - return -EINVAL; - + if (drv_cmd_validate(command, 23)) { + retval = -EINVAL; + goto free; + } value = value + 24; temp = kstrtou32(value, 10, &val); if (temp != 0 || val < CFG_ACTIVE_MAX_CHANNEL_TIME_MIN || @@ -2338,8 +2339,10 @@ static int hdd_set_dwell_time(hdd_adapter_t *adapter, uint8_t *command) sme_config->csrConfig.nActiveMaxChnTime = val; sme_update_config(hHal, sme_config); } else if (strncmp(command, "SETDWELLTIME ACTIVE MIN", 23) == 0) { - if (drv_cmd_validate(command, 23)) - return -EINVAL; + if (drv_cmd_validate(command, 23)) { + retval = -EINVAL; + goto free; + } value = value + 24; temp = kstrtou32(value, 10, &val); @@ -2353,8 +2356,10 @@ static int hdd_set_dwell_time(hdd_adapter_t *adapter, uint8_t *command) sme_config->csrConfig.nActiveMinChnTime = val; sme_update_config(hHal, sme_config); } else if (strncmp(command, "SETDWELLTIME PASSIVE MAX", 24) == 0) { - if (drv_cmd_validate(command, 24)) - return -EINVAL; + if (drv_cmd_validate(command, 24)) { + retval = -EINVAL; + goto free; + } value = value + 25; temp = kstrtou32(value, 10, &val); @@ -2368,8 +2373,10 @@ static int hdd_set_dwell_time(hdd_adapter_t *adapter, uint8_t *command) sme_config->csrConfig.nPassiveMaxChnTime = val; sme_update_config(hHal, sme_config); } else if (strncmp(command, "SETDWELLTIME PASSIVE MIN", 24) == 0) { - if (drv_cmd_validate(command, 24)) - return -EINVAL; + if (drv_cmd_validate(command, 24)) { + retval = -EINVAL; + goto free; + } value = value + 25; temp = kstrtou32(value, 10, &val); @@ -2383,8 +2390,10 @@ static int hdd_set_dwell_time(hdd_adapter_t *adapter, uint8_t *command) sme_config->csrConfig.nPassiveMinChnTime = val; sme_update_config(hHal, sme_config); } else if (strncmp(command, "SETDWELLTIME", 12) == 0) { - if (drv_cmd_validate(command, 12)) - return -EINVAL; + if (drv_cmd_validate(command, 12)) { + retval = -EINVAL; + goto free; + } value = value + 13; temp = kstrtou32(value, 10, &val); |
