diff options
author | Todd C. Miller <millert@cvs.openbsd.org> | 2002-10-11 13:31:50 +0000 |
---|---|---|
committer | Todd C. Miller <millert@cvs.openbsd.org> | 2002-10-11 13:31:50 +0000 |
commit | b8a117c58f8bb6206b9a1d921bdc90e50fc1ae7a (patch) | |
tree | bf43c66e5d59e4fe911bfd1ff0a141d3d7fadb45 /sys/dev/ic | |
parent | 83b21262cb16181786f615a3f2c3078fd63b814a (diff) |
Sigh, we can't just put the htole16() in the WI_CARD_IDS macro
since gcc doesn't seem to evaluate htole16() of a constant at
compile time after all. Noticed by deraadt@
Diffstat (limited to 'sys/dev/ic')
-rw-r--r-- | sys/dev/ic/if_wi.c | 6 | ||||
-rw-r--r-- | sys/dev/ic/if_wi_ieee.h | 66 |
2 files changed, 36 insertions, 36 deletions
diff --git a/sys/dev/ic/if_wi.c b/sys/dev/ic/if_wi.c index fd863db2acd..527739b832c 100644 --- a/sys/dev/ic/if_wi.c +++ b/sys/dev/ic/if_wi.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_wi.c,v 1.81 2002/10/10 20:27:46 millert Exp $ */ +/* $OpenBSD: if_wi.c,v 1.82 2002/10/11 13:31:49 millert Exp $ */ /* * Copyright (c) 1997, 1998, 1999 @@ -124,7 +124,7 @@ u_int32_t widebug = WIDEBUG; #if !defined(lint) && !defined(__OpenBSD__) static const char rcsid[] = - "$OpenBSD: if_wi.c,v 1.81 2002/10/10 20:27:46 millert Exp $"; + "$OpenBSD: if_wi.c,v 1.82 2002/10/11 13:31:49 millert Exp $"; #endif /* lint */ #ifdef foo @@ -2246,7 +2246,7 @@ wi_get_id(sc) ver.wi_len = 5; wi_read_record(sc, (struct wi_ltv_gen *)&ver); for (id = wi_card_ident; id->firm_type != WI_NOTYPE; id++) { - if (ver.wi_ver[0] == id->card_id) + if (letoh16(ver.wi_ver[0]) == id->card_id) break; } if (id->firm_type != WI_NOTYPE) { diff --git a/sys/dev/ic/if_wi_ieee.h b/sys/dev/ic/if_wi_ieee.h index 0ed4d38e2a6..e2b2e238596 100644 --- a/sys/dev/ic/if_wi_ieee.h +++ b/sys/dev/ic/if_wi_ieee.h @@ -1,4 +1,4 @@ -/* $OpenBSD: if_wi_ieee.h,v 1.13 2002/10/10 20:27:46 millert Exp $ */ +/* $OpenBSD: if_wi_ieee.h,v 1.14 2002/10/11 13:31:49 millert Exp $ */ /* * Copyright (c) 1997, 1998, 1999 @@ -773,131 +773,131 @@ struct wi_card_ident { #define WI_CARD_IDS \ { \ - htole16(WI_NIC_LUCENT), \ + WI_NIC_LUCENT, \ "Lucent WaveLAN/IEEE", \ WI_LUCENT \ }, { \ - htole16(WI_NIC_SONY), \ + WI_NIC_SONY, \ "Sony WaveLAN/IEEE", \ WI_LUCENT \ }, { \ - htole16(WI_NIC_LUCENT_EMB), \ + WI_NIC_LUCENT_EMB, \ "Lucent Embedded WaveLAN/IEEE", \ WI_LUCENT \ }, { \ - htole16(WI_NIC_EVB2), \ + WI_NIC_EVB2, \ "PRISM2 HFA3841(EVB2)", \ WI_INTERSIL \ }, { \ - htole16(WI_NIC_HWB3763), \ + WI_NIC_HWB3763, \ "PRISM2 HWB3763 rev.B", \ WI_INTERSIL \ }, { \ - htole16(WI_NIC_HWB3163), \ + WI_NIC_HWB3163, \ "PRISM2 HWB3163 rev.A", \ WI_INTERSIL \ }, { \ - htole16(WI_NIC_HWB3163B), \ + WI_NIC_HWB3163B, \ "PRISM2 HWB3163 rev.B", \ WI_INTERSIL \ }, { \ - htole16(WI_NIC_EVB3), \ + WI_NIC_EVB3, \ "PRISM2 HFA3842(EVB3)", \ WI_INTERSIL \ }, { \ - htole16(WI_NIC_HWB1153), \ + WI_NIC_HWB1153, \ "PRISM1 HWB1153", \ WI_INTERSIL \ }, { \ - htole16(WI_NIC_P2_SST), \ + WI_NIC_P2_SST, \ "PRISM2 HWB3163 SST-flash", \ WI_INTERSIL \ }, { \ - htole16(WI_NIC_EVB2_SST), \ + WI_NIC_EVB2_SST, \ "PRISM2 HWB3163(EVB2) SST-flash", \ WI_INTERSIL \ }, { \ - htole16(WI_NIC_3842_EVA), \ + WI_NIC_3842_EVA, \ "PRISM2 HFA3842(EVAL)", \ WI_INTERSIL \ }, { \ - htole16(WI_NIC_3842_PCMCIA_AMD), \ + WI_NIC_3842_PCMCIA_AMD, \ "PRISM2.5 ISL3873", \ WI_INTERSIL \ }, { \ - htole16(WI_NIC_3842_PCMCIA_SST), \ + WI_NIC_3842_PCMCIA_SST, \ "PRISM2.5 ISL3873", \ WI_INTERSIL \ }, { \ - htole16(WI_NIC_3842_PCMCIA_ATL), \ + WI_NIC_3842_PCMCIA_ATL, \ "PRISM2.5 ISL3873", \ WI_INTERSIL \ }, { \ - htole16(WI_NIC_3842_PCMCIA_ATS), \ + WI_NIC_3842_PCMCIA_ATS, \ "PRISM2.5 ISL3873", \ WI_INTERSIL \ }, { \ - htole16(WI_NIC_3842_MINI_AMD), \ + WI_NIC_3842_MINI_AMD, \ "PRISM2.5 ISL3874A(Mini-PCI)", \ WI_INTERSIL \ }, { \ - htole16(WI_NIC_3842_MINI_SST), \ + WI_NIC_3842_MINI_SST, \ "PRISM2.5 ISL3874A(Mini-PCI)", \ WI_INTERSIL \ }, { \ - htole16(WI_NIC_3842_MINI_ATL), \ + WI_NIC_3842_MINI_ATL, \ "PRISM2.5 ISL3874A(Mini-PCI)", \ WI_INTERSIL \ }, { \ - htole16(WI_NIC_3842_MINI_ATS), \ + WI_NIC_3842_MINI_ATS, \ "PRISM2.5 ISL3874A(Mini-PCI)", \ WI_INTERSIL \ }, { \ - htole16(WI_NIC_3842_PCI_AMD), \ + WI_NIC_3842_PCI_AMD, \ "PRISM2.5 ISL3874A(PCI-bridge)", \ WI_INTERSIL \ }, { \ - htole16(WI_NIC_3842_PCI_SST), \ + WI_NIC_3842_PCI_SST, \ "PRISM2.5 ISL3874A(PCI-bridge)", \ WI_INTERSIL \ }, { \ - htole16(WI_NIC_3842_PCI_ATS), \ + WI_NIC_3842_PCI_ATS, \ "PRISM2.5 ISL3874A(PCI-bridge)", \ WI_INTERSIL \ }, { \ - htole16(WI_NIC_3842_PCI_ATL), \ + WI_NIC_3842_PCI_ATL, \ "PRISM2.5 ISL3874A(PCI-bridge)", \ WI_INTERSIL \ }, { \ - htole16(WI_NIC_P3_PCMCIA_AMD), \ + WI_NIC_P3_PCMCIA_AMD, \ "PRISM3 ISL37300P", \ WI_INTERSIL \ }, { \ - htole16(WI_NIC_P3_PCMCIA_SST), \ + WI_NIC_P3_PCMCIA_SST, \ "PRISM3 ISL37300P", \ WI_INTERSIL \ }, { \ - htole16(WI_NIC_P3_PCMCIA_ATL), \ + WI_NIC_P3_PCMCIA_ATL, \ "PRISM3 ISL37300P", \ WI_INTERSIL \ }, { \ - htole16(WI_NIC_P3_PCMCIA_ATS), \ + WI_NIC_P3_PCMCIA_ATS, \ "PRISM3 ISL37300P", \ WI_INTERSIL \ }, { \ - htole16(WI_NIC_P3_MINI_AMD), \ + WI_NIC_P3_MINI_AMD, \ "PRISM3 ISL37300P(PCI)", \ WI_INTERSIL \ }, { \ - htole16(WI_NIC_P3_MINI_SST), \ + WI_NIC_P3_MINI_SST, \ "PRISM3 ISL37300P(PCI)", \ WI_INTERSIL \ }, { \ - htole16(WI_NIC_P3_MINI_ATL), \ + WI_NIC_P3_MINI_ATL, \ "PRISM3 ISL37300P(PCI)", \ WI_INTERSIL \ }, { \ - htole16(WI_NIC_P3_MINI_ATS), \ + WI_NIC_P3_MINI_ATS, \ "PRISM3 ISL37300P(PCI)", \ WI_INTERSIL \ }, { \ |