summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDennis Jeon <dennis.jeon@broadcom.com>2022-10-11 17:05:46 +0900
committerRoger Wang <wangroger@google.com>2022-10-21 12:45:42 +0800
commite50c6be2a294efad0d8ce602833c77ba210879d7 (patch)
tree1baae4639375cc6d266e0a2726ba0b6ca906281a
parentc311506bbaa4efc7cd0cf0e0ecba4b9920f7cebc (diff)
downloadwlan-e50c6be2a294efad0d8ce602833c77ba210879d7.tar.gz
Fix for missing unregister cmd in wifi_rtt_range_cancel
Issue: Continuous "WifiHAL : Failed to add command 253272: 0xb400007edaf95de0 at 64, reached max limit 64" error has occurred while running the multiple AP RTT Analysis: When vendor hal is sent with the range_request, each request is registered as cmd and there is a max limit to register the cmd which is 64. In this error case, because of below 2 reasons, register_cmd max limit can be hit. 1. Missing the corresponding RTT event, upon which cmd is unregistered. 2. Missing the cancel range request, as part of the range_cancel request, unregistering the cmd need to be there, which is missing. Need to check why rtt event event is getting missed and need to make sure of the canceling the cmd when range_cancel is receieved. Fix: Adding the missing unregister_cmd call and more logs. Bug: 250396851 Test: RTT comms test done. No regressions observed. Signed-off-by: Dennis Jeon <dennis.jeon@broadcom.com> Change-Id: I049d7d00151c0b3fbf0de721cd18d8185f1bfddc
-rw-r--r--bcmdhd/wifi_hal/rtt.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/bcmdhd/wifi_hal/rtt.cpp b/bcmdhd/wifi_hal/rtt.cpp
index 6bb0a49..46aa868 100644
--- a/bcmdhd/wifi_hal/rtt.cpp
+++ b/bcmdhd/wifi_hal/rtt.cpp
@@ -662,6 +662,7 @@ wifi_error wifi_rtt_range_request(wifi_request_id id, wifi_interface_handle ifac
return WIFI_ERROR_INVALID_ARGS;
}
+ ALOGI("Rtt range_request; id = %d", id);
RttCommand *cmd = new RttCommand(iface, id, num_rtt_config, rtt_config, handler);
NULL_CHECK_RETURN(cmd, "memory allocation failure", WIFI_ERROR_OUT_OF_MEMORY);
wifi_error result = wifi_register_cmd(handle, id, cmd);
@@ -695,9 +696,11 @@ wifi_error wifi_rtt_range_cancel(wifi_request_id id, wifi_interface_handle ifac
return WIFI_ERROR_INVALID_ARGS;
}
+ ALOGI("Rtt range_cancel_request; id = %d", id);
RttCommand *cmd = new RttCommand(iface, id);
NULL_CHECK_RETURN(cmd, "memory allocation failure", WIFI_ERROR_OUT_OF_MEMORY);
cmd->cancel_specific(num_devices, addr);
+ wifi_unregister_cmd(handle, id);
cmd->releaseRef();
return WIFI_SUCCESS;
}