aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/p54common.c
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2007-12-21 23:49:02 -0500
committerDavid S. Miller <davem@davemloft.net>2008-01-28 18:08:53 -0500
commitdc73c623dd0a653bf80ec41870dcf8b601fc6e9b (patch)
tree09432cf8d477f0636e494e1758bdb01f6142b893 /drivers/net/wireless/p54common.c
parente0c0056c677709bd1e2c18b84a1d10e54f7c8fcc (diff)
p54common annotations and fixes
* ->exp_id in bootrec_exp_if is __le16; missing conversion in its use * !(x & y) misspelled as !x & y Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/p54common.c')
-rw-r--r--drivers/net/wireless/p54common.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/net/wireless/p54common.c b/drivers/net/wireless/p54common.c
index ad5c307a4410..9660fdd873ac 100644
--- a/drivers/net/wireless/p54common.c
+++ b/drivers/net/wireless/p54common.c
@@ -54,7 +54,7 @@ void p54_parse_firmware(struct ieee80211_hw *dev, const struct firmware *fw)
54 u32 code = le32_to_cpu(bootrec->code); 54 u32 code = le32_to_cpu(bootrec->code);
55 switch (code) { 55 switch (code) {
56 case BR_CODE_COMPONENT_ID: 56 case BR_CODE_COMPONENT_ID:
57 switch (be32_to_cpu(*bootrec->data)) { 57 switch (be32_to_cpu(*(__be32 *)bootrec->data)) {
58 case FW_FMAC: 58 case FW_FMAC:
59 printk(KERN_INFO "p54: FreeMAC firmware\n"); 59 printk(KERN_INFO "p54: FreeMAC firmware\n");
60 break; 60 break;
@@ -78,14 +78,14 @@ void p54_parse_firmware(struct ieee80211_hw *dev, const struct firmware *fw)
78 fw_version = (unsigned char*)bootrec->data; 78 fw_version = (unsigned char*)bootrec->data;
79 break; 79 break;
80 case BR_CODE_DESCR: 80 case BR_CODE_DESCR:
81 priv->rx_start = le32_to_cpu(bootrec->data[1]); 81 priv->rx_start = le32_to_cpu(((__le32 *)bootrec->data)[1]);
82 /* FIXME add sanity checking */ 82 /* FIXME add sanity checking */
83 priv->rx_end = le32_to_cpu(bootrec->data[2]) - 0x3500; 83 priv->rx_end = le32_to_cpu(((__le32 *)bootrec->data)[2]) - 0x3500;
84 break; 84 break;
85 case BR_CODE_EXPOSED_IF: 85 case BR_CODE_EXPOSED_IF:
86 exp_if = (struct bootrec_exp_if *) bootrec->data; 86 exp_if = (struct bootrec_exp_if *) bootrec->data;
87 for (i = 0; i < (len * sizeof(*exp_if) / 4); i++) 87 for (i = 0; i < (len * sizeof(*exp_if) / 4); i++)
88 if (exp_if[i].if_id == 0x1a) 88 if (exp_if[i].if_id == cpu_to_le16(0x1a))
89 priv->fw_var = le16_to_cpu(exp_if[i].variant); 89 priv->fw_var = le16_to_cpu(exp_if[i].variant);
90 break; 90 break;
91 case BR_CODE_DEPENDENT_IF: 91 case BR_CODE_DEPENDENT_IF: