summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKhanjan Desai <quic_khanjan@quicinc.com>2023-03-17 12:05:45 +0530
committerHsiu-Chang Chen <hsiuchangchen@google.com>2023-06-17 04:43:22 +0000
commitd96c661e9735dd7c83d378e1a2f2527d96e1565e (patch)
tree9bea790b24ef0ca77f31ba09a9f01ad44c4891c4
parente85357780de5402699288c09400fb15de46798aa (diff)
downloadwlan-d96c661e9735dd7c83d378e1a2f2527d96e1565e.tar.gz
Add null check for on_rtt_result_v2
Either on_rtt_results or on_rtt_results_v2 can be NULL as only one callback will be enabled for Lowi RTT. As Such, INVALID_ARGS will be considerd if both are NULL. Bug: 261366015 Test: Regression Test Change-Id: Ib056f23bf1e602e4ab7f3d9660675f1e3aef50f0 CRs-Fixed: 3452947
-rw-r--r--wcn6740/qcwcn/wifi_hal/rtt.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/wcn6740/qcwcn/wifi_hal/rtt.cpp b/wcn6740/qcwcn/wifi_hal/rtt.cpp
index 785af6d..0919aaf 100644
--- a/wcn6740/qcwcn/wifi_hal/rtt.cpp
+++ b/wcn6740/qcwcn/wifi_hal/rtt.cpp
@@ -121,7 +121,7 @@ wifi_error wifi_rtt_range_request(wifi_request_id id,
return WIFI_ERROR_INVALID_ARGS;
}
- if (handler.on_rtt_results == NULL) {
+ if (handler.on_rtt_results == NULL && handler.on_rtt_results_v2 == NULL ) {
ALOGE("wifi_rtt_range_request: NULL capabilities pointer provided."
" Exit.");
return WIFI_ERROR_INVALID_ARGS;