aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net')
-rw-r--r--drivers/net/wireless/hermes.h108
-rw-r--r--drivers/net/wireless/orinoco.c62
-rw-r--r--drivers/net/wireless/orinoco.h6
-rw-r--r--drivers/net/wireless/spectrum_cs.c20
4 files changed, 99 insertions, 97 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
193struct hermes_tx_descriptor { 193struct 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
223struct hermes_tallies_frame { 223struct 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 */
253struct prism2_scan_apinfo { 253struct 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 */
269struct agere_scan_apinfo { 269struct 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 {
282struct symbol_scan_apinfo { 282struct 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
313struct hermes_linkstatus { 313struct hermes_linkstatus {
314 u16 linkstatus; /* Link status */ 314 __le16 linkstatus; /* Link status */
315} __attribute__ ((packed)); 315} __attribute__ ((packed));
316 316
317struct hermes_response { 317struct 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 */
322struct hermes_idstring { 322struct hermes_idstring {
323 u16 len; 323 __le16 len;
324 u16 val[16]; 324 __le16 val[16];
325} __attribute__ ((packed)); 325} __attribute__ ((packed));
326 326
327struct hermes_multicast { 327struct hermes_multicast {
@@ -446,7 +446,7 @@ static inline void hermes_clear_words(struct hermes *hw, int off, unsigned count
446 446
447static inline int hermes_read_wordrec(hermes_t *hw, int bap, u16 rid, u16 *word) 447static 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
457static inline int hermes_write_wordrec(hermes_t *hw, int bap, u16 rid, u16 word) 457static 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
diff --git a/drivers/net/wireless/orinoco.c b/drivers/net/wireless/orinoco.c
index 29cb5d81b67e..1ae301c62281 100644
--- a/drivers/net/wireless/orinoco.c
+++ b/drivers/net/wireless/orinoco.c
@@ -202,31 +202,32 @@ static struct {
202/********************************************************************/ 202/********************************************************************/
203 203
204/* Used in Event handling. 204/* Used in Event handling.
205 * We avoid nested structres as they break on ARM -- Moustafa */ 205 * We avoid nested structures as they break on ARM -- Moustafa */
206struct hermes_tx_descriptor_802_11 { 206struct hermes_tx_descriptor_802_11 {
207 /* hermes_tx_descriptor */ 207 /* hermes_tx_descriptor */
208 u16 status; 208 __le16 status;
209 u16 reserved1; 209 __le16 reserved1;
210 u16 reserved2; 210 __le16 reserved2;
211 u32 sw_support; 211 __le32 sw_support;
212 u8 retry_count; 212 u8 retry_count;
213 u8 tx_rate; 213 u8 tx_rate;
214 u16 tx_control; 214 __le16 tx_control;
215 215
216 /* ieee802_11_hdr */ 216 /* ieee80211_hdr */
217 u16 frame_ctl; 217 __le16 frame_ctl;
218 u16 duration_id; 218 __le16 duration_id;
219 u8 addr1[ETH_ALEN]; 219 u8 addr1[ETH_ALEN];
220 u8 addr2[ETH_ALEN]; 220 u8 addr2[ETH_ALEN];
221 u8 addr3[ETH_ALEN]; 221 u8 addr3[ETH_ALEN];
222 u16 seq_ctl; 222 __le16 seq_ctl;
223 u8 addr4[ETH_ALEN]; 223 u8 addr4[ETH_ALEN];
224 u16 data_len; 224
225 __le16 data_len;
225 226
226 /* ethhdr */ 227 /* ethhdr */
227 unsigned char h_dest[ETH_ALEN]; /* destination eth addr */ 228 u8 h_dest[ETH_ALEN]; /* destination eth addr */
228 unsigned char h_source[ETH_ALEN]; /* source ether addr */ 229 u8 h_source[ETH_ALEN]; /* source ether addr */
229 unsigned short h_proto; /* packet type ID field */ 230 __be16 h_proto; /* packet type ID field */
230 231
231 /* p8022_hdr */ 232 /* p8022_hdr */
232 u8 dsap; 233 u8 dsap;
@@ -234,31 +235,31 @@ struct hermes_tx_descriptor_802_11 {
234 u8 ctrl; 235 u8 ctrl;
235 u8 oui[3]; 236 u8 oui[3];
236 237
237 u16 ethertype; 238 __be16 ethertype;
238} __attribute__ ((packed)); 239} __attribute__ ((packed));
239 240
240/* Rx frame header except compatibility 802.3 header */ 241/* Rx frame header except compatibility 802.3 header */
241struct hermes_rx_descriptor { 242struct hermes_rx_descriptor {
242 /* Control */ 243 /* Control */
243 u16 status; 244 __le16 status;
244 u32 time; 245 __le32 time;
245 u8 silence; 246 u8 silence;
246 u8 signal; 247 u8 signal;
247 u8 rate; 248 u8 rate;
248 u8 rxflow; 249 u8 rxflow;
249 u32 reserved; 250 __le32 reserved;
250 251
251 /* 802.11 header */ 252 /* 802.11 header */
252 u16 frame_ctl; 253 __le16 frame_ctl;
253 u16 duration_id; 254 __le16 duration_id;
254 u8 addr1[ETH_ALEN]; 255 u8 addr1[ETH_ALEN];
255 u8 addr2[ETH_ALEN]; 256 u8 addr2[ETH_ALEN];
256 u8 addr3[ETH_ALEN]; 257 u8 addr3[ETH_ALEN];
257 u16 seq_ctl; 258 __le16 seq_ctl;
258 u8 addr4[ETH_ALEN]; 259 u8 addr4[ETH_ALEN];
259 260
260 /* Data length */ 261 /* Data length */
261 u16 data_len; 262 __le16 data_len;
262} __attribute__ ((packed)); 263} __attribute__ ((packed));
263 264
264/********************************************************************/ 265/********************************************************************/
@@ -389,7 +390,7 @@ static struct iw_statistics *orinoco_get_wireless_stats(struct net_device *dev)
389 } 390 }
390 } else { 391 } else {
391 struct { 392 struct {
392 u16 qual, signal, noise; 393 __le16 qual, signal, noise;
393 } __attribute__ ((packed)) cq; 394 } __attribute__ ((packed)) cq;
394 395
395 err = HERMES_READ_RECORD(hw, USER_BAP, 396 err = HERMES_READ_RECORD(hw, USER_BAP,
@@ -615,6 +616,7 @@ static void __orinoco_ev_txexc(struct net_device *dev, hermes_t *hw)
615 struct orinoco_private *priv = netdev_priv(dev); 616 struct orinoco_private *priv = netdev_priv(dev);
616 struct net_device_stats *stats = &priv->stats; 617 struct net_device_stats *stats = &priv->stats;
617 u16 fid = hermes_read_regn(hw, TXCOMPLFID); 618 u16 fid = hermes_read_regn(hw, TXCOMPLFID);
619 u16 status;
618 struct hermes_tx_descriptor_802_11 hdr; 620 struct hermes_tx_descriptor_802_11 hdr;
619 int err = 0; 621 int err = 0;
620 622
@@ -644,8 +646,8 @@ static void __orinoco_ev_txexc(struct net_device *dev, hermes_t *hw)
644 * exceeded, because that's the only status that really mean 646 * exceeded, because that's the only status that really mean
645 * that this particular node went away. 647 * that this particular node went away.
646 * Other errors means that *we* screwed up. - Jean II */ 648 * Other errors means that *we* screwed up. - Jean II */
647 hdr.status = le16_to_cpu(hdr.status); 649 status = le16_to_cpu(hdr.status);
648 if (hdr.status & (HERMES_TXSTAT_RETRYERR | HERMES_TXSTAT_AGEDERR)) { 650 if (status & (HERMES_TXSTAT_RETRYERR | HERMES_TXSTAT_AGEDERR)) {
649 union iwreq_data wrqu; 651 union iwreq_data wrqu;
650 652
651 /* Copy 802.11 dest address. 653 /* Copy 802.11 dest address.
@@ -1031,7 +1033,7 @@ static void orinoco_join_ap(struct net_device *dev)
1031 unsigned long flags; 1033 unsigned long flags;
1032 struct join_req { 1034 struct join_req {
1033 u8 bssid[ETH_ALEN]; 1035 u8 bssid[ETH_ALEN];
1034 u16 channel; 1036 __le16 channel;
1035 } __attribute__ ((packed)) req; 1037 } __attribute__ ((packed)) req;
1036 const int atom_len = offsetof(struct prism2_scan_apinfo, atim); 1038 const int atom_len = offsetof(struct prism2_scan_apinfo, atim);
1037 struct prism2_scan_apinfo *atom = NULL; 1039 struct prism2_scan_apinfo *atom = NULL;
@@ -1128,8 +1130,8 @@ static void __orinoco_ev_info(struct net_device *dev, hermes_t *hw)
1128 struct orinoco_private *priv = netdev_priv(dev); 1130 struct orinoco_private *priv = netdev_priv(dev);
1129 u16 infofid; 1131 u16 infofid;
1130 struct { 1132 struct {
1131 u16 len; 1133 __le16 len;
1132 u16 type; 1134 __le16 type;
1133 } __attribute__ ((packed)) info; 1135 } __attribute__ ((packed)) info;
1134 int len, type; 1136 int len, type;
1135 int err; 1137 int err;
@@ -3905,7 +3907,7 @@ static int orinoco_ioctl_setscan(struct net_device *dev,
3905 HERMES_HOSTSCAN_SYMBOL_BCAST); 3907 HERMES_HOSTSCAN_SYMBOL_BCAST);
3906 break; 3908 break;
3907 case FIRMWARE_TYPE_INTERSIL: { 3909 case FIRMWARE_TYPE_INTERSIL: {
3908 u16 req[3]; 3910 __le16 req[3];
3909 3911
3910 req[0] = cpu_to_le16(0x3fff); /* All channels */ 3912 req[0] = cpu_to_le16(0x3fff); /* All channels */
3911 req[1] = cpu_to_le16(0x0001); /* rate 1 Mbps */ 3913 req[1] = cpu_to_le16(0x0001); /* rate 1 Mbps */
@@ -3979,7 +3981,7 @@ static inline int orinoco_translate_scan(struct net_device *dev,
3979 case FIRMWARE_TYPE_INTERSIL: 3981 case FIRMWARE_TYPE_INTERSIL:
3980 offset = 4; 3982 offset = 4;
3981 if (priv->has_hostscan) { 3983 if (priv->has_hostscan) {
3982 atom_len = le16_to_cpup((u16 *)scan); 3984 atom_len = le16_to_cpup((__le16 *)scan);
3983 /* Sanity check for atom_len */ 3985 /* Sanity check for atom_len */
3984 if (atom_len < sizeof(struct prism2_scan_apinfo)) { 3986 if (atom_len < sizeof(struct prism2_scan_apinfo)) {
3985 printk(KERN_ERR "%s: Invalid atom_len in scan data: %d\n", 3987 printk(KERN_ERR "%s: Invalid atom_len in scan data: %d\n",
diff --git a/drivers/net/wireless/orinoco.h b/drivers/net/wireless/orinoco.h
index 32530d435afb..6920ead11449 100644
--- a/drivers/net/wireless/orinoco.h
+++ b/drivers/net/wireless/orinoco.h
@@ -27,7 +27,7 @@
27#define ORINOCO_MAX_KEYS 4 27#define ORINOCO_MAX_KEYS 4
28 28
29struct orinoco_key { 29struct orinoco_key {
30 u16 len; /* always stored as little-endian */ 30 __le16 len; /* always stored as little-endian */
31 char data[ORINOCO_MAX_KEY_SIZE]; 31 char data[ORINOCO_MAX_KEY_SIZE];
32} __attribute__ ((packed)); 32} __attribute__ ((packed));
33 33
@@ -35,14 +35,14 @@ struct header_struct {
35 /* 802.3 */ 35 /* 802.3 */
36 u8 dest[ETH_ALEN]; 36 u8 dest[ETH_ALEN];
37 u8 src[ETH_ALEN]; 37 u8 src[ETH_ALEN];
38 u16 len; 38 __be16 len;
39 /* 802.2 */ 39 /* 802.2 */
40 u8 dsap; 40 u8 dsap;
41 u8 ssap; 41 u8 ssap;
42 u8 ctrl; 42 u8 ctrl;
43 /* SNAP */ 43 /* SNAP */
44 u8 oui[3]; 44 u8 oui[3];
45 u16 ethertype; 45 unsigned short ethertype;
46} __attribute__ ((packed)); 46} __attribute__ ((packed));
47 47
48typedef enum { 48typedef enum {
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;