Quellcode durchsuchen

qcacmn: Map regulatory macros to legacy regulatory

Map regulatory macros used by policy manager to legacy APIs.

Change-Id: Ib1ab408094a02648ba9796619ab14d5800db1217
CRs-Fixed: 2009818
Tushnim Bhattacharyya vor 8 Jahren
Ursprung
Commit
2173d3969e
1 geänderte Dateien mit 25 neuen und 0 gelöschten Zeilen
  1. 25 0
      umac/cmn_services/policy_mgr/src/wlan_policy_mgr_i.h

+ 25 - 0
umac/cmn_services/policy_mgr/src/wlan_policy_mgr_i.h

@@ -33,6 +33,31 @@
 #include "qdf_mc_timer.h"
 #include "qdf_lock.h"
 #include "qdf_defer.h"
+#include <cds_reg_service.h>
+
+enum cds_band_type {
+	CDS_BAND_ALL = 0,
+	CDS_BAND_2GHZ = 1,
+	CDS_BAND_5GHZ = 2
+};
+extern uint32_t cds_chan_to_freq(uint8_t chan);
+extern uint8_t cds_freq_to_chan(uint32_t freq);
+extern enum cds_band_type cds_chan_to_band(uint32_t chan);
+
+#define WLAN_REG_IS_24GHZ_CH(ch) CDS_IS_CHANNEL_24GHZ(ch)
+#define WLAN_REG_IS_5GHZ_CH(ch) CDS_IS_CHANNEL_5GHZ(ch)
+#define WLAN_REG_IS_SAME_BAND_CHANNELS(ch1, ch2) \
+	CDS_IS_SAME_BAND_CHANNELS(ch1, ch2)
+#define WLAN_REG_IS_CHANNEL_VALID_5G_SBS(curchan, newchan) \
+	CDS_IS_CHANNEL_VALID_5G_SBS(curchan, newchan)
+#define wlan_reg_is_dfs_ch(psoc, ch) CDS_IS_DFS_CH(ch)
+#define WLAN_REG_MAX_24GHZ_CH_NUM CDS_MAX_24GHZ_CHANNEL_NUMBER
+#define reg_chan_to_freq(chan_num) cds_chan_to_freq(chan_num)
+#define reg_freq_to_chan(freq) cds_freq_to_chan(freq)
+#define reg_chan_to_band(chan_num) cds_chan_to_band(chan_num)
+#define BAND_2G CDS_BAND_2GHZ
+#define BAND_5G CDS_BAND_5GHZ
+#define BAND_ALL CDS_BAND_ALL
 
 #define MAX_NUMBER_OF_CONC_CONNECTIONS 3
 #define DBS_OPPORTUNISTIC_TIME    10