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

Kavita Kavita kavita.kavita at oss.qualcomm.com
Wed May 13 02:59:53 PDT 2026


From: Peddolla Harshavardhan Reddy <peddolla.reddy at 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 at oss.qualcomm.com>
---
 wpa_supplicant/pr_supplicant.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

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);
-- 
2.34.1




More information about the Hostap mailing list