This source file includes following definitions.
- rtw_ch2freq
1
2
3
4
5
6
7 #define _RTW_RF_C_
8
9 #include <drv_types.h>
10 #include <linux/kernel.h>
11
12
13 struct ch_freq {
14 u32 channel;
15 u32 frequency;
16 };
17
18 static struct ch_freq ch_freq_map[] = {
19 {1, 2412}, {2, 2417}, {3, 2422}, {4, 2427}, {5, 2432},
20 {6, 2437}, {7, 2442}, {8, 2447}, {9, 2452}, {10, 2457},
21 {11, 2462}, {12, 2467}, {13, 2472}, {14, 2484},
22
23 {36, 5180}, {40, 5200}, {44, 5220}, {48, 5240}, {52, 5260},
24 {56, 5280}, {60, 5300}, {64, 5320}, {149, 5745}, {153, 5765},
25 {157, 5785}, {161, 5805}, {165, 5825}, {167, 5835}, {169, 5845},
26 {171, 5855}, {173, 5865},
27
28 {100, 5500}, {104, 5520}, {108, 5540}, {112, 5560}, {116, 5580},
29 {120, 5600}, {124, 5620}, {128, 5640}, {132, 5660}, {136, 5680},
30 {140, 5700},
31
32 {34, 5170}, {38, 5190}, {42, 5210}, {46, 5230},
33
34 {184, 4920}, {188, 4940}, {192, 4960}, {196, 4980},
35 {208, 5040},
36 {212, 5060},
37 {216, 5080},
38 };
39
40 u32 rtw_ch2freq(u32 channel)
41 {
42 u8 i;
43 u32 freq = 0;
44
45 for (i = 0; i < ARRAY_SIZE(ch_freq_map); i++) {
46 if (channel == ch_freq_map[i].channel) {
47 freq = ch_freq_map[i].frequency;
48 break;
49 }
50 }
51 if (i == ARRAY_SIZE(ch_freq_map))
52 freq = 2412;
53
54 return freq;
55 }