wpa_supplicant_lib: Allow -82dBm as non-SRG OBSS PD threshold
The valid OBSS PD threshold for non-SRG SR is -82 dBm to -62 dBm.
Correct the bound check to allow setting -82 dBm threshold.
Change-Id: I1aa12e68340e2a3cf7e92f7d30fcdf16048b3b98
CRs-Fixed: 3671087
diff --git a/qcwcn/wpa_supplicant_8_lib/driver_cmd_nl80211_sr.c b/qcwcn/wpa_supplicant_8_lib/driver_cmd_nl80211_sr.c
index d0cb989..47e26e7 100644
--- a/qcwcn/wpa_supplicant_8_lib/driver_cmd_nl80211_sr.c
+++ b/qcwcn/wpa_supplicant_8_lib/driver_cmd_nl80211_sr.c
@@ -343,11 +343,7 @@
cmd += 21;
cmd = skip_white_space(cmd);
pd_thres = get_s32_from_string(cmd, &ret);
- /**
- * For non-SRG OBSS, allowed range for PD threshold
- * is -62 to -81 as -82 is fixed as min offset.
- **/
- if (ret < 0 || pd_thres <= OBSS_PD_THRESHOLD_MIN ||
+ if (ret < 0 || pd_thres < OBSS_PD_THRESHOLD_MIN ||
pd_thres > OBSS_PD_THRESHOLD_MAX) {
wpa_printf(MSG_ERROR, "Invalid Non-SRG PD threshold: %d", pd_thres);
return -EINVAL;