diff mbox series

[v3,29/46] PR: Use op_class_to_bandwidth() in wpas_pr_ranging_params()

Message ID 20260513100010.1947710-30-kavita.kavita@oss.qualcomm.com
State Accepted
Headers show
Series PR: Add nl80211 support and ranging for Proximity Detection | expand

Commit Message

Kavita Kavita May 13, 2026, 9:59 a.m. UTC
From: Peddolla Harshavardhan Reddy <peddolla.reddy@oss.qualcomm.com>

Replace oper_class_bw_to_int(get_oper_class(NULL, op_class)) with the
simpler and more direct op_class_to_bandwidth(op_class) which achieves
the same result without the intermediate get_oper_class() lookup.

Signed-off-by: Peddolla Harshavardhan Reddy <peddolla.reddy@oss.qualcomm.com>
---
 wpa_supplicant/pr_supplicant.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/wpa_supplicant/pr_supplicant.c b/wpa_supplicant/pr_supplicant.c
index f3f3ad11d..f1120c8a2 100644
--- a/wpa_supplicant/pr_supplicant.c
+++ b/wpa_supplicant/pr_supplicant.c
@@ -299,7 +299,7 @@  static void wpas_pr_ranging_params(void *ctx, const u8 *dev_addr,
 	struct wpa_supplicant *wpa_s = ctx;
 	int bw, format_bw, freq;
 
-	bw = oper_class_bw_to_int(get_oper_class(NULL, op_class));
+	bw = op_class_to_bandwidth(op_class);
 	format_bw = self_format_bw < peer_format_bw ?
 		self_format_bw : peer_format_bw;
 	freq = ieee80211_chan_to_freq(NULL, op_class, op_channel);