diff options
author | Pavel Roskin <proski@gnu.org> | 2005-09-23 04:18:06 -0400 |
---|---|---|
committer | Jeff Garzik <jgarzik@pobox.com> | 2005-09-23 04:36:13 -0400 |
commit | d133ae4cd6a3c75c31b1630f906cc9979a11077f (patch) | |
tree | 4b292054c342e6e8c5b2594c62cbf3534eea1edf /drivers/net/wireless/hermes.h | |
parent | 393da59834eef526fc6fd0df321e94344d7c49e3 (diff) |
[PATCH] orinoco: Annotate endianess of variables and structure members.
Signed-off-by: Pavel Roskin <proski@gnu.org>
Annotate endianess of variables and structure members.
Don't reuse variables for both host-endian and little-endian data.
Minor comment changes in affected structures.
Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
Diffstat (limited to 'drivers/net/wireless/hermes.h')
-rw-r--r-- | drivers/net/wireless/hermes.h | 108 |
1 files changed, 54 insertions, 54 deletions
diff --git a/drivers/net/wireless/hermes.h b/drivers/net/wireless/hermes.h index 786613aaa58a..ad28e3294360 100644 --- a/drivers/net/wireless/hermes.h +++ b/drivers/net/wireless/hermes.h | |||
@@ -191,13 +191,13 @@ | |||
191 | #define HERMES_RXSTAT_WMP (0x6000) /* Wavelan-II Management Protocol frame */ | 191 | #define HERMES_RXSTAT_WMP (0x6000) /* Wavelan-II Management Protocol frame */ |
192 | 192 | ||
193 | struct hermes_tx_descriptor { | 193 | struct hermes_tx_descriptor { |
194 | u16 status; | 194 | __le16 status; |
195 | u16 reserved1; | 195 | __le16 reserved1; |
196 | u16 reserved2; | 196 | __le16 reserved2; |
197 | u32 sw_support; | 197 | __le32 sw_support; |
198 | u8 retry_count; | 198 | u8 retry_count; |
199 | u8 tx_rate; | 199 | u8 tx_rate; |
200 | u16 tx_control; | 200 | __le16 tx_control; |
201 | } __attribute__ ((packed)); | 201 | } __attribute__ ((packed)); |
202 | 202 | ||
203 | #define HERMES_TXSTAT_RETRYERR (0x0001) | 203 | #define HERMES_TXSTAT_RETRYERR (0x0001) |
@@ -221,60 +221,60 @@ struct hermes_tx_descriptor { | |||
221 | #define HERMES_INQ_SEC_STAT_AGERE (0xF202) | 221 | #define HERMES_INQ_SEC_STAT_AGERE (0xF202) |
222 | 222 | ||
223 | struct hermes_tallies_frame { | 223 | struct hermes_tallies_frame { |
224 | u16 TxUnicastFrames; | 224 | __le16 TxUnicastFrames; |
225 | u16 TxMulticastFrames; | 225 | __le16 TxMulticastFrames; |
226 | u16 TxFragments; | 226 | __le16 TxFragments; |
227 | u16 TxUnicastOctets; | 227 | __le16 TxUnicastOctets; |
228 | u16 TxMulticastOctets; | 228 | __le16 TxMulticastOctets; |
229 | u16 TxDeferredTransmissions; | 229 | __le16 TxDeferredTransmissions; |
230 | u16 TxSingleRetryFrames; | 230 | __le16 TxSingleRetryFrames; |
231 | u16 TxMultipleRetryFrames; | 231 | __le16 TxMultipleRetryFrames; |
232 | u16 TxRetryLimitExceeded; | 232 | __le16 TxRetryLimitExceeded; |
233 | u16 TxDiscards; | 233 | __le16 TxDiscards; |
234 | u16 RxUnicastFrames; | 234 | __le16 RxUnicastFrames; |
235 | u16 RxMulticastFrames; | 235 | __le16 RxMulticastFrames; |
236 | u16 RxFragments; | 236 | __le16 RxFragments; |
237 | u16 RxUnicastOctets; | 237 | __le16 RxUnicastOctets; |
238 | u16 RxMulticastOctets; | 238 | __le16 RxMulticastOctets; |
239 | u16 RxFCSErrors; | 239 | __le16 RxFCSErrors; |
240 | u16 RxDiscards_NoBuffer; | 240 | __le16 RxDiscards_NoBuffer; |
241 | u16 TxDiscardsWrongSA; | 241 | __le16 TxDiscardsWrongSA; |
242 | u16 RxWEPUndecryptable; | 242 | __le16 RxWEPUndecryptable; |
243 | u16 RxMsgInMsgFragments; | 243 | __le16 RxMsgInMsgFragments; |
244 | u16 RxMsgInBadMsgFragments; | 244 | __le16 RxMsgInBadMsgFragments; |
245 | /* Those last are probably not available in very old firmwares */ | 245 | /* Those last are probably not available in very old firmwares */ |
246 | u16 RxDiscards_WEPICVError; | 246 | __le16 RxDiscards_WEPICVError; |
247 | u16 RxDiscards_WEPExcluded; | 247 | __le16 RxDiscards_WEPExcluded; |
248 | } __attribute__ ((packed)); | 248 | } __attribute__ ((packed)); |
249 | 249 | ||
250 | /* Grabbed from wlan-ng - Thanks Mark... - Jean II | 250 | /* Grabbed from wlan-ng - Thanks Mark... - Jean II |
251 | * This is the result of a scan inquiry command */ | 251 | * This is the result of a scan inquiry command */ |
252 | /* Structure describing info about an Access Point */ | 252 | /* Structure describing info about an Access Point */ |
253 | struct prism2_scan_apinfo { | 253 | struct prism2_scan_apinfo { |
254 | u16 channel; /* Channel where the AP sits */ | 254 | __le16 channel; /* Channel where the AP sits */ |
255 | u16 noise; /* Noise level */ | 255 | __le16 noise; /* Noise level */ |
256 | u16 level; /* Signal level */ | 256 | __le16 level; /* Signal level */ |
257 | u8 bssid[ETH_ALEN]; /* MAC address of the Access Point */ | 257 | u8 bssid[ETH_ALEN]; /* MAC address of the Access Point */ |
258 | u16 beacon_interv; /* Beacon interval */ | 258 | __le16 beacon_interv; /* Beacon interval */ |
259 | u16 capabilities; /* Capabilities */ | 259 | __le16 capabilities; /* Capabilities */ |
260 | u16 essid_len; /* ESSID length */ | 260 | __le16 essid_len; /* ESSID length */ |
261 | u8 essid[32]; /* ESSID of the network */ | 261 | u8 essid[32]; /* ESSID of the network */ |
262 | u8 rates[10]; /* Bit rate supported */ | 262 | u8 rates[10]; /* Bit rate supported */ |
263 | u16 proberesp_rate; /* Data rate of the response frame */ | 263 | __le16 proberesp_rate; /* Data rate of the response frame */ |
264 | u16 atim; /* ATIM window time, Kus (hostscan only) */ | 264 | __le16 atim; /* ATIM window time, Kus (hostscan only) */ |
265 | } __attribute__ ((packed)); | 265 | } __attribute__ ((packed)); |
266 | 266 | ||
267 | /* Same stuff for the Lucent/Agere card. | 267 | /* Same stuff for the Lucent/Agere card. |
268 | * Thanks to h1kari <h1kari AT dachb0den.com> - Jean II */ | 268 | * Thanks to h1kari <h1kari AT dachb0den.com> - Jean II */ |
269 | struct agere_scan_apinfo { | 269 | struct agere_scan_apinfo { |
270 | u16 channel; /* Channel where the AP sits */ | 270 | __le16 channel; /* Channel where the AP sits */ |
271 | u16 noise; /* Noise level */ | 271 | __le16 noise; /* Noise level */ |
272 | u16 level; /* Signal level */ | 272 | __le16 level; /* Signal level */ |
273 | u8 bssid[ETH_ALEN]; /* MAC address of the Access Point */ | 273 | u8 bssid[ETH_ALEN]; /* MAC address of the Access Point */ |
274 | u16 beacon_interv; /* Beacon interval */ | 274 | __le16 beacon_interv; /* Beacon interval */ |
275 | u16 capabilities; /* Capabilities */ | 275 | __le16 capabilities; /* Capabilities */ |
276 | /* bits: 0-ess, 1-ibss, 4-privacy [wep] */ | 276 | /* bits: 0-ess, 1-ibss, 4-privacy [wep] */ |
277 | u16 essid_len; /* ESSID length */ | 277 | __le16 essid_len; /* ESSID length */ |
278 | u8 essid[32]; /* ESSID of the network */ | 278 | u8 essid[32]; /* ESSID of the network */ |
279 | } __attribute__ ((packed)); | 279 | } __attribute__ ((packed)); |
280 | 280 | ||
@@ -282,16 +282,16 @@ struct agere_scan_apinfo { | |||
282 | struct symbol_scan_apinfo { | 282 | struct symbol_scan_apinfo { |
283 | u8 channel; /* Channel where the AP sits */ | 283 | u8 channel; /* Channel where the AP sits */ |
284 | u8 unknown1; /* 8 in 2.9x and 3.9x f/w, 0 otherwise */ | 284 | u8 unknown1; /* 8 in 2.9x and 3.9x f/w, 0 otherwise */ |
285 | u16 noise; /* Noise level */ | 285 | __le16 noise; /* Noise level */ |
286 | u16 level; /* Signal level */ | 286 | __le16 level; /* Signal level */ |
287 | u8 bssid[ETH_ALEN]; /* MAC address of the Access Point */ | 287 | u8 bssid[ETH_ALEN]; /* MAC address of the Access Point */ |
288 | u16 beacon_interv; /* Beacon interval */ | 288 | __le16 beacon_interv; /* Beacon interval */ |
289 | u16 capabilities; /* Capabilities */ | 289 | __le16 capabilities; /* Capabilities */ |
290 | /* bits: 0-ess, 1-ibss, 4-privacy [wep] */ | 290 | /* bits: 0-ess, 1-ibss, 4-privacy [wep] */ |
291 | u16 essid_len; /* ESSID length */ | 291 | __le16 essid_len; /* ESSID length */ |
292 | u8 essid[32]; /* ESSID of the network */ | 292 | u8 essid[32]; /* ESSID of the network */ |
293 | u16 rates[5]; /* Bit rate supported */ | 293 | __le16 rates[5]; /* Bit rate supported */ |
294 | u16 basic_rates; /* Basic rates bitmask */ | 294 | __le16 basic_rates; /* Basic rates bitmask */ |
295 | u8 unknown2[6]; /* Always FF:FF:FF:FF:00:00 */ | 295 | u8 unknown2[6]; /* Always FF:FF:FF:FF:00:00 */ |
296 | u8 unknown3[8]; /* Always 0, appeared in f/w 3.91-68 */ | 296 | u8 unknown3[8]; /* Always 0, appeared in f/w 3.91-68 */ |
297 | } __attribute__ ((packed)); | 297 | } __attribute__ ((packed)); |
@@ -311,7 +311,7 @@ union hermes_scan_info { | |||
311 | #define HERMES_LINKSTATUS_ASSOC_FAILED (0x0006) | 311 | #define HERMES_LINKSTATUS_ASSOC_FAILED (0x0006) |
312 | 312 | ||
313 | struct hermes_linkstatus { | 313 | struct hermes_linkstatus { |
314 | u16 linkstatus; /* Link status */ | 314 | __le16 linkstatus; /* Link status */ |
315 | } __attribute__ ((packed)); | 315 | } __attribute__ ((packed)); |
316 | 316 | ||
317 | struct hermes_response { | 317 | struct hermes_response { |
@@ -320,8 +320,8 @@ struct hermes_response { | |||
320 | 320 | ||
321 | /* "ID" structure - used for ESSID and station nickname */ | 321 | /* "ID" structure - used for ESSID and station nickname */ |
322 | struct hermes_idstring { | 322 | struct hermes_idstring { |
323 | u16 len; | 323 | __le16 len; |
324 | u16 val[16]; | 324 | __le16 val[16]; |
325 | } __attribute__ ((packed)); | 325 | } __attribute__ ((packed)); |
326 | 326 | ||
327 | struct hermes_multicast { | 327 | struct hermes_multicast { |
@@ -446,7 +446,7 @@ static inline void hermes_clear_words(struct hermes *hw, int off, unsigned count | |||
446 | 446 | ||
447 | static inline int hermes_read_wordrec(hermes_t *hw, int bap, u16 rid, u16 *word) | 447 | static inline int hermes_read_wordrec(hermes_t *hw, int bap, u16 rid, u16 *word) |
448 | { | 448 | { |
449 | u16 rec; | 449 | __le16 rec; |
450 | int err; | 450 | int err; |
451 | 451 | ||
452 | err = HERMES_READ_RECORD(hw, bap, rid, &rec); | 452 | err = HERMES_READ_RECORD(hw, bap, rid, &rec); |
@@ -456,7 +456,7 @@ static inline int hermes_read_wordrec(hermes_t *hw, int bap, u16 rid, u16 *word) | |||
456 | 456 | ||
457 | static inline int hermes_write_wordrec(hermes_t *hw, int bap, u16 rid, u16 word) | 457 | static inline int hermes_write_wordrec(hermes_t *hw, int bap, u16 rid, u16 word) |
458 | { | 458 | { |
459 | u16 rec = cpu_to_le16(word); | 459 | __le16 rec = cpu_to_le16(word); |
460 | return HERMES_WRITE_RECORD(hw, bap, rid, &rec); | 460 | return HERMES_WRITE_RECORD(hw, bap, rid, &rec); |
461 | } | 461 | } |
462 | 462 | ||