|
@@ -6087,6 +6087,23 @@ bool reg_is_upper_6g_edge_ch_disabled(struct wlan_objmgr_psoc *psoc)
|
|
|
|
|
|
return psoc_priv_obj->is_upper_6g_edge_ch_disabled;
|
|
|
}
|
|
|
+
|
|
|
+static inline bool reg_is_within_range_inclusive(enum channel_enum left,
|
|
|
+ enum channel_enum right,
|
|
|
+ enum channel_enum idx)
|
|
|
+{
|
|
|
+ return (idx >= left) && (idx <= right);
|
|
|
+}
|
|
|
+
|
|
|
+uint16_t reg_convert_enum_to_6g_idx(enum channel_enum ch_idx)
|
|
|
+{
|
|
|
+ if (!reg_is_within_range_inclusive(MIN_6GHZ_CHANNEL,
|
|
|
+ MAX_6GHZ_CHANNEL,
|
|
|
+ ch_idx))
|
|
|
+ return INVALID_CHANNEL;
|
|
|
+
|
|
|
+ return (ch_idx - MIN_6GHZ_CHANNEL);
|
|
|
+}
|
|
|
#endif
|
|
|
|
|
|
#ifdef FEATURE_WLAN_CH_AVOID_EXT
|