diff options
author | Ashwin <ashwin.bhat@broadcom.com> | 2015-08-06 12:57:31 -0700 |
---|---|---|
committer | xinhe <xinhe@google.com> | 2015-08-07 17:35:11 -0700 |
commit | 340c22b114039948cbdc124797fd84d58a80462c (patch) | |
tree | 6c83fba13ad3060216d14c69b1c63254dd1ca447 | |
parent | ce85c99d5b7035cf4312c40c0431d31cfb7e7951 (diff) | |
download | hardware_broadcom_wlan-340c22b114039948cbdc124797fd84d58a80462c.zip hardware_broadcom_wlan-340c22b114039948cbdc124797fd84d58a80462c.tar.gz hardware_broadcom_wlan-340c22b114039948cbdc124797fd84d58a80462c.tar.bz2 |
RSSI monitor cmd cleanup
Cleanup RSSI monitor cmd if it fails
Bug 22826644
Change-Id: Iaca8201ea32d051bb2afd34e28257fc828908599
Signed-off-by: Ashwin <ashwin.bhat@broadcom.com>
-rw-r--r-- | bcmdhd/wifi_hal/wifi_hal.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/bcmdhd/wifi_hal/wifi_hal.cpp b/bcmdhd/wifi_hal/wifi_hal.cpp index b27bac2..09738a3 100644 --- a/bcmdhd/wifi_hal/wifi_hal.cpp +++ b/bcmdhd/wifi_hal/wifi_hal.cpp @@ -1009,7 +1009,12 @@ static wifi_error wifi_start_rssi_monitoring(wifi_request_id id, wifi_interface_ wifi_handle handle = getWifiHandle(iface); SetRSSIMonitorCommand *cmd = new SetRSSIMonitorCommand(id, iface, max_rssi, min_rssi, eh); wifi_register_cmd(handle, id, cmd); - return (wifi_error)cmd->start(); + + wifi_error result = (wifi_error)cmd->start(); + if (result != WIFI_SUCCESS) { + wifi_unregister_cmd(handle, id); + } + return result; } |