3 @@ -1452,60 +1452,66 @@ void acx_free_modes(acx_device_t * adev)
8 -#define RATETAB_ENT(_rate, _rateid, _flags) \
12 - .val2 = (_rateid), \
13 - .flags = (_flags), \
17 static struct ieee80211_rate acx_rates[] = {
18 { .bitrate = 10, .hw_value = 0, .flags = IEEE80211_RATE_SHORT_PREAMBLE },
19 { .bitrate = 20, .hw_value = 1, .flags = IEEE80211_RATE_SHORT_PREAMBLE },
20 { .bitrate = 55, .hw_value = 2, .flags = IEEE80211_RATE_SHORT_PREAMBLE },
21 { .bitrate = 110, .hw_value = 3, .flags = IEEE80211_RATE_SHORT_PREAMBLE },
22 - { .bitrate = 60, .hw_value = 4, },
23 - { .bitrate = 90, .hw_value = 5, },
24 - { .bitrate = 120, .hw_value = 6, },
25 - { .bitrate = 180, .hw_value = 7, },
26 - { .bitrate = 240, .hw_value = 8, },
27 - { .bitrate = 360, .hw_value = 9, },
28 - { .bitrate = 480, .hw_value = 10, },
29 - { .bitrate = 540, .hw_value = 11, },
30 + { .bitrate = 60, .hw_value = 4, .flags = 0 },
31 + { .bitrate = 90, .hw_value = 5, .flags = 0 },
32 + { .bitrate = 120, .hw_value = 6, .flags = 0 },
33 + { .bitrate = 180, .hw_value = 7, .flags = 0 },
34 + { .bitrate = 240, .hw_value = 8, .flags = 0 },
35 + { .bitrate = 360, .hw_value = 9, .flags = 0 },
36 + { .bitrate = 480, .hw_value = 10, .flags = 0 },
37 + { .bitrate = 540, .hw_value = 11, .flags = 0 },
40 +#define CHAN4G(_channel, _freq, _flags) { \
41 + .band = IEEE80211_BAND_2GHZ, \
42 + .center_freq = (_freq), \
43 + .hw_value = (_channel), \
44 + .flags = (_flags), \
45 + .max_antenna_gain = 0, \
48 static struct ieee80211_channel channels[] = {
49 - { .center_freq = 2412, .hw_value = 1, },
50 - { .center_freq = 2417, .hw_value = 2, },
51 - { .center_freq = 2422, .hw_value = 3, },
52 - { .center_freq = 2427, .hw_value = 4, },
53 - { .center_freq = 2432, .hw_value = 5, },
54 - { .center_freq = 2437, .hw_value = 6, },
55 - { .center_freq = 2442, .hw_value = 7, },
56 - { .center_freq = 2447, .hw_value = 8, },
57 - { .center_freq = 2452, .hw_value = 9, },
58 - { .center_freq = 2457, .hw_value = 10, },
59 - { .center_freq = 2462, .hw_value = 11, },
60 - { .center_freq = 2467, .hw_value = 12, },
61 - { .center_freq = 2472, .hw_value = 13, },
62 - { .center_freq = 2484, .hw_value = 14, },
72 + CHAN4G(10, 2457, 0),
73 + CHAN4G(11, 2462, 0),
74 + CHAN4G(12, 2467, 0),
75 + CHAN4G(13, 2472, 0),
76 + CHAN4G(14, 2484, 0),
80 +#define acx_b_ratetable (acx_rates + 0)
81 +#define acx_b_ratetable_size 4
82 +#define acx_g_ratetable (acx_rates + 0)
83 +#define acx_g_ratetable_size 12
85 static struct ieee80211_supported_band g_band_2GHz = {
86 + .band = IEEE80211_BAND_2GHZ,
88 .n_channels = ARRAY_SIZE(channels),
89 - .bitrates = acx_rates,
91 + .bitrates = acx_b_ratetable,
92 + .n_bitrates = acx_g_ratetable_size,
95 static struct ieee80211_supported_band b_band_2GHz = {
96 + .band = IEEE80211_BAND_2GHZ,
98 .n_channels = ARRAY_SIZE(channels),
99 - .bitrates = acx_rates,
101 + .bitrates = acx_g_ratetable,
102 + .n_bitrates = acx_b_ratetable_size,
105 int acx_setup_modes(acx_device_t * adev)