aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/spectrum_cs.c
diff options
context:
space:
mode:
authorPavel Roskin <proski@gnu.org>2005-09-23 04:18:06 -0400
committerJeff Garzik <jgarzik@pobox.com>2005-09-23 04:36:13 -0400
commitd133ae4cd6a3c75c31b1630f906cc9979a11077f (patch)
tree4b292054c342e6e8c5b2594c62cbf3534eea1edf /drivers/net/wireless/spectrum_cs.c
parent393da59834eef526fc6fd0df321e94344d7c49e3 (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/spectrum_cs.c')
-rw-r--r--drivers/net/wireless/spectrum_cs.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/drivers/net/wireless/spectrum_cs.c b/drivers/net/wireless/spectrum_cs.c
index ceed0241adcd..b1bbc8e8e91f 100644
--- a/drivers/net/wireless/spectrum_cs.c
+++ b/drivers/net/wireless/spectrum_cs.c
@@ -138,8 +138,8 @@ static void spectrum_cs_detach(dev_link_t *link);
138 * Each block has the following structure. 138 * Each block has the following structure.
139 */ 139 */
140struct dblock { 140struct dblock {
141 u32 _addr; /* adapter address where to write the block */ 141 __le32 _addr; /* adapter address where to write the block */
142 u16 _len; /* length of the data only, in bytes */ 142 __le16 _len; /* length of the data only, in bytes */
143 char data[0]; /* data to be written */ 143 char data[0]; /* data to be written */
144} __attribute__ ((packed)); 144} __attribute__ ((packed));
145 145
@@ -149,9 +149,9 @@ struct dblock {
149 * items with matching ID should be written. 149 * items with matching ID should be written.
150 */ 150 */
151struct pdr { 151struct pdr {
152 u32 _id; /* record ID */ 152 __le32 _id; /* record ID */
153 u32 _addr; /* adapter address where to write the data */ 153 __le32 _addr; /* adapter address where to write the data */
154 u32 _len; /* expected length of the data, in bytes */ 154 __le32 _len; /* expected length of the data, in bytes */
155 char next[0]; /* next PDR starts here */ 155 char next[0]; /* next PDR starts here */
156} __attribute__ ((packed)); 156} __attribute__ ((packed));
157 157
@@ -162,8 +162,8 @@ struct pdr {
162 * be plugged into the secondary firmware. 162 * be plugged into the secondary firmware.
163 */ 163 */
164struct pdi { 164struct pdi {
165 u16 _len; /* length of ID and data, in words */ 165 __le16 _len; /* length of ID and data, in words */
166 u16 _id; /* record ID */ 166 __le16 _id; /* record ID */
167 char data[0]; /* plug data */ 167 char data[0]; /* plug data */
168} __attribute__ ((packed));; 168} __attribute__ ((packed));;
169 169
@@ -370,7 +370,7 @@ spectrum_plug_pdi(hermes_t *hw, struct pdr *first_pdr, struct pdi *pdi)
370 370
371/* Read PDA from the adapter */ 371/* Read PDA from the adapter */
372static int 372static int
373spectrum_read_pda(hermes_t *hw, u16 *pda, int pda_len) 373spectrum_read_pda(hermes_t *hw, __le16 *pda, int pda_len)
374{ 374{
375 int ret; 375 int ret;
376 int pda_size; 376 int pda_size;
@@ -401,7 +401,7 @@ spectrum_read_pda(hermes_t *hw, u16 *pda, int pda_len)
401/* Parse PDA and write the records into the adapter */ 401/* Parse PDA and write the records into the adapter */
402static int 402static int
403spectrum_apply_pda(hermes_t *hw, const struct dblock *first_block, 403spectrum_apply_pda(hermes_t *hw, const struct dblock *first_block,
404 u16 *pda) 404 __le16 *pda)
405{ 405{
406 int ret; 406 int ret;
407 struct pdi *pdi; 407 struct pdi *pdi;
@@ -467,7 +467,7 @@ spectrum_dl_image(hermes_t *hw, dev_link_t *link,
467 const struct dblock *first_block; 467 const struct dblock *first_block;
468 468
469 /* Plug Data Area (PDA) */ 469 /* Plug Data Area (PDA) */
470 u16 pda[PDA_WORDS]; 470 __le16 pda[PDA_WORDS];
471 471
472 /* Binary block begins after the 0x1A marker */ 472 /* Binary block begins after the 0x1A marker */
473 ptr = image; 473 ptr = image;