aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/iwlwifi/iwl-helpers.h
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/wireless/iwlwifi/iwl-helpers.h')
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-helpers.h92
1 files changed, 1 insertions, 91 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-helpers.h b/drivers/net/wireless/iwlwifi/iwl-helpers.h
index a443472bea62..41eed6793328 100644
--- a/drivers/net/wireless/iwlwifi/iwl-helpers.h
+++ b/drivers/net/wireless/iwlwifi/iwl-helpers.h
@@ -136,8 +136,8 @@ static inline void iwl_set_bits16(__le16 *dst, u8 pos, u8 len, int val)
136 136
137#define KELVIN_TO_CELSIUS(x) ((x)-273) 137#define KELVIN_TO_CELSIUS(x) ((x)-273)
138#define CELSIUS_TO_KELVIN(x) ((x)+273) 138#define CELSIUS_TO_KELVIN(x) ((x)+273)
139#define IWL_MASK(lo, hi) ((1 << (hi)) | ((1 << (hi)) - (1 << (lo))))
139 140
140#define IEEE80211_CHAN_W_RADAR_DETECT 0x00000010
141 141
142static inline struct ieee80211_conf *ieee80211_get_hw_conf( 142static inline struct ieee80211_conf *ieee80211_get_hw_conf(
143 struct ieee80211_hw *hw) 143 struct ieee80211_hw *hw)
@@ -145,96 +145,6 @@ static inline struct ieee80211_conf *ieee80211_get_hw_conf(
145 return &hw->conf; 145 return &hw->conf;
146} 146}
147 147
148#define QOS_CONTROL_LEN 2
149
150
151static inline int ieee80211_is_management(u16 fc)
152{
153 return (fc & IEEE80211_FCTL_FTYPE) == IEEE80211_FTYPE_MGMT;
154}
155
156static inline int ieee80211_is_control(u16 fc)
157{
158 return (fc & IEEE80211_FCTL_FTYPE) == IEEE80211_FTYPE_CTL;
159}
160
161static inline int ieee80211_is_data(u16 fc)
162{
163 return (fc & IEEE80211_FCTL_FTYPE) == IEEE80211_FTYPE_DATA;
164}
165
166static inline int ieee80211_is_back_request(u16 fc)
167{
168 return ((fc & IEEE80211_FCTL_FTYPE) == IEEE80211_FTYPE_CTL) &&
169 ((fc & IEEE80211_FCTL_STYPE) == IEEE80211_STYPE_BACK_REQ);
170}
171
172static inline int ieee80211_is_probe_response(u16 fc)
173{
174 return ((fc & IEEE80211_FCTL_FTYPE) == IEEE80211_FTYPE_MGMT) &&
175 ((fc & IEEE80211_FCTL_STYPE) == IEEE80211_STYPE_PROBE_RESP);
176}
177
178static inline int ieee80211_is_probe_request(u16 fc)
179{
180 return ((fc & IEEE80211_FCTL_FTYPE) == IEEE80211_FTYPE_MGMT) &&
181 ((fc & IEEE80211_FCTL_STYPE) == IEEE80211_STYPE_PROBE_REQ);
182}
183
184static inline int ieee80211_is_beacon(u16 fc)
185{
186 return ((fc & IEEE80211_FCTL_FTYPE) == IEEE80211_FTYPE_MGMT) &&
187 ((fc & IEEE80211_FCTL_STYPE) == IEEE80211_STYPE_BEACON);
188}
189
190static inline int ieee80211_is_atim(u16 fc)
191{
192 return ((fc & IEEE80211_FCTL_FTYPE) == IEEE80211_FTYPE_MGMT) &&
193 ((fc & IEEE80211_FCTL_STYPE) == IEEE80211_STYPE_ATIM);
194}
195
196static inline int ieee80211_is_assoc_request(u16 fc)
197{
198 return ((fc & IEEE80211_FCTL_FTYPE) == IEEE80211_FTYPE_MGMT) &&
199 ((fc & IEEE80211_FCTL_STYPE) == IEEE80211_STYPE_ASSOC_REQ);
200}
201
202static inline int ieee80211_is_assoc_response(u16 fc)
203{
204 return ((fc & IEEE80211_FCTL_FTYPE) == IEEE80211_FTYPE_MGMT) &&
205 ((fc & IEEE80211_FCTL_STYPE) == IEEE80211_STYPE_ASSOC_RESP);
206}
207
208static inline int ieee80211_is_auth(u16 fc)
209{
210 return ((fc & IEEE80211_FCTL_FTYPE) == IEEE80211_FTYPE_MGMT) &&
211 ((fc & IEEE80211_FCTL_STYPE) == IEEE80211_STYPE_ASSOC_REQ);
212}
213
214static inline int ieee80211_is_deauth(u16 fc)
215{
216 return ((fc & IEEE80211_FCTL_FTYPE) == IEEE80211_FTYPE_MGMT) &&
217 ((fc & IEEE80211_FCTL_STYPE) == IEEE80211_STYPE_ASSOC_REQ);
218}
219
220static inline int ieee80211_is_disassoc(u16 fc)
221{
222 return ((fc & IEEE80211_FCTL_FTYPE) == IEEE80211_FTYPE_MGMT) &&
223 ((fc & IEEE80211_FCTL_STYPE) == IEEE80211_STYPE_ASSOC_REQ);
224}
225
226static inline int ieee80211_is_reassoc_request(u16 fc)
227{
228 return ((fc & IEEE80211_FCTL_FTYPE) == IEEE80211_FTYPE_MGMT) &&
229 ((fc & IEEE80211_FCTL_STYPE) == IEEE80211_STYPE_REASSOC_REQ);
230}
231
232static inline int ieee80211_is_reassoc_response(u16 fc)
233{
234 return ((fc & IEEE80211_FCTL_FTYPE) == IEEE80211_FTYPE_MGMT) &&
235 ((fc & IEEE80211_FCTL_STYPE) == IEEE80211_STYPE_REASSOC_RESP);
236}
237
238static inline int iwl_check_bits(unsigned long field, unsigned long mask) 148static inline int iwl_check_bits(unsigned long field, unsigned long mask)
239{ 149{
240 return ((field & mask) == mask) ? 1 : 0; 150 return ((field & mask) == mask) ? 1 : 0;