diff options
Diffstat (limited to 'drivers/net/wireless/ath/ath9k/spectral.h')
-rw-r--r-- | drivers/net/wireless/ath/ath9k/spectral.h | 71 |
1 files changed, 2 insertions, 69 deletions
diff --git a/drivers/net/wireless/ath/ath9k/spectral.h b/drivers/net/wireless/ath/ath9k/spectral.h index ead63412ee1a..7b410c6858b0 100644 --- a/drivers/net/wireless/ath/ath9k/spectral.h +++ b/drivers/net/wireless/ath/ath9k/spectral.h | |||
@@ -17,6 +17,8 @@ | |||
17 | #ifndef SPECTRAL_H | 17 | #ifndef SPECTRAL_H |
18 | #define SPECTRAL_H | 18 | #define SPECTRAL_H |
19 | 19 | ||
20 | #include "../spectral_common.h" | ||
21 | |||
20 | /* enum spectral_mode: | 22 | /* enum spectral_mode: |
21 | * | 23 | * |
22 | * @SPECTRAL_DISABLED: spectral mode is disabled | 24 | * @SPECTRAL_DISABLED: spectral mode is disabled |
@@ -54,8 +56,6 @@ struct ath_ht20_mag_info { | |||
54 | u8 max_exp; | 56 | u8 max_exp; |
55 | } __packed; | 57 | } __packed; |
56 | 58 | ||
57 | #define SPECTRAL_HT20_NUM_BINS 56 | ||
58 | |||
59 | /* WARNING: don't actually use this struct! MAC may vary the amount of | 59 | /* WARNING: don't actually use this struct! MAC may vary the amount of |
60 | * data by -1/+2. This struct is for reference only. | 60 | * data by -1/+2. This struct is for reference only. |
61 | */ | 61 | */ |
@@ -83,8 +83,6 @@ struct ath_ht20_40_mag_info { | |||
83 | u8 max_exp; | 83 | u8 max_exp; |
84 | } __packed; | 84 | } __packed; |
85 | 85 | ||
86 | #define SPECTRAL_HT20_40_NUM_BINS 128 | ||
87 | |||
88 | /* WARNING: don't actually use this struct! MAC may vary the amount of | 86 | /* WARNING: don't actually use this struct! MAC may vary the amount of |
89 | * data. This struct is for reference only. | 87 | * data. This struct is for reference only. |
90 | */ | 88 | */ |
@@ -125,71 +123,6 @@ static inline u8 spectral_bitmap_weight(u8 *bins) | |||
125 | return bins[0] & 0x3f; | 123 | return bins[0] & 0x3f; |
126 | } | 124 | } |
127 | 125 | ||
128 | /* FFT sample format given to userspace via debugfs. | ||
129 | * | ||
130 | * Please keep the type/length at the front position and change | ||
131 | * other fields after adding another sample type | ||
132 | * | ||
133 | * TODO: this might need rework when switching to nl80211-based | ||
134 | * interface. | ||
135 | */ | ||
136 | enum ath_fft_sample_type { | ||
137 | ATH_FFT_SAMPLE_HT20 = 1, | ||
138 | ATH_FFT_SAMPLE_HT20_40, | ||
139 | }; | ||
140 | |||
141 | struct fft_sample_tlv { | ||
142 | u8 type; /* see ath_fft_sample */ | ||
143 | __be16 length; | ||
144 | /* type dependent data follows */ | ||
145 | } __packed; | ||
146 | |||
147 | struct fft_sample_ht20 { | ||
148 | struct fft_sample_tlv tlv; | ||
149 | |||
150 | u8 max_exp; | ||
151 | |||
152 | __be16 freq; | ||
153 | s8 rssi; | ||
154 | s8 noise; | ||
155 | |||
156 | __be16 max_magnitude; | ||
157 | u8 max_index; | ||
158 | u8 bitmap_weight; | ||
159 | |||
160 | __be64 tsf; | ||
161 | |||
162 | u8 data[SPECTRAL_HT20_NUM_BINS]; | ||
163 | } __packed; | ||
164 | |||
165 | struct fft_sample_ht20_40 { | ||
166 | struct fft_sample_tlv tlv; | ||
167 | |||
168 | u8 channel_type; | ||
169 | __be16 freq; | ||
170 | |||
171 | s8 lower_rssi; | ||
172 | s8 upper_rssi; | ||
173 | |||
174 | __be64 tsf; | ||
175 | |||
176 | s8 lower_noise; | ||
177 | s8 upper_noise; | ||
178 | |||
179 | __be16 lower_max_magnitude; | ||
180 | __be16 upper_max_magnitude; | ||
181 | |||
182 | u8 lower_max_index; | ||
183 | u8 upper_max_index; | ||
184 | |||
185 | u8 lower_bitmap_weight; | ||
186 | u8 upper_bitmap_weight; | ||
187 | |||
188 | u8 max_exp; | ||
189 | |||
190 | u8 data[SPECTRAL_HT20_40_NUM_BINS]; | ||
191 | } __packed; | ||
192 | |||
193 | void ath9k_spectral_init_debug(struct ath_softc *sc); | 126 | void ath9k_spectral_init_debug(struct ath_softc *sc); |
194 | void ath9k_spectral_deinit_debug(struct ath_softc *sc); | 127 | void ath9k_spectral_deinit_debug(struct ath_softc *sc); |
195 | 128 | ||