aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/net/wireless/p54common.c2
-rw-r--r--drivers/net/wireless/p54common.h8
2 files changed, 5 insertions, 5 deletions
diff --git a/drivers/net/wireless/p54common.c b/drivers/net/wireless/p54common.c
index 5cda49aff3a..56aabec73c2 100644
--- a/drivers/net/wireless/p54common.c
+++ b/drivers/net/wireless/p54common.c
@@ -172,7 +172,7 @@ int p54_parse_eeprom(struct ieee80211_hw *dev, void *eeprom, int len)
172 int err; 172 int err;
173 173
174 wrap = (struct eeprom_pda_wrap *) eeprom; 174 wrap = (struct eeprom_pda_wrap *) eeprom;
175 entry = (void *)wrap->data + wrap->len; 175 entry = (void *)wrap->data + le16_to_cpu(wrap->len);
176 i += 2; 176 i += 2;
177 i += le16_to_cpu(entry->len)*2; 177 i += le16_to_cpu(entry->len)*2;
178 while (i < len) { 178 while (i < len) {
diff --git a/drivers/net/wireless/p54common.h b/drivers/net/wireless/p54common.h
index a721334e20d..b67ff34e26f 100644
--- a/drivers/net/wireless/p54common.h
+++ b/drivers/net/wireless/p54common.h
@@ -53,10 +53,10 @@ struct pda_entry {
53} __attribute__ ((packed)); 53} __attribute__ ((packed));
54 54
55struct eeprom_pda_wrap { 55struct eeprom_pda_wrap {
56 u32 magic; 56 __le32 magic;
57 u16 pad; 57 __le16 pad;
58 u16 len; 58 __le16 len;
59 u32 arm_opcode; 59 __le32 arm_opcode;
60 u8 data[0]; 60 u8 data[0];
61} __attribute__ ((packed)); 61} __attribute__ ((packed));
62 62