diff options
author | 2002-10-11 13:33:14 +0000 | |
---|---|---|
committer | 2002-10-11 13:33:14 +0000 | |
commit | 56517e1a3ef0739a44e86b37ee43f8975a0b5d97 (patch) | |
tree | 18fe1a5ab0cc5b16b47575dd13be3996371e3eae | |
parent | Sigh, we can't just put the htole16() in the WI_CARD_IDS macro (diff) | |
download | wireguard-openbsd-56517e1a3ef0739a44e86b37ee43f8975a0b5d97.tar.xz wireguard-openbsd-56517e1a3ef0739a44e86b37ee43f8975a0b5d97.zip |
Add a letoh16() since card ids in WI_CARD_IDS are not guaranteed
to be little endian.
-rw-r--r-- | sbin/wicontrol/wicontrol.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sbin/wicontrol/wicontrol.c b/sbin/wicontrol/wicontrol.c index 9f41c22ad74..fde184c294f 100644 --- a/sbin/wicontrol/wicontrol.c +++ b/sbin/wicontrol/wicontrol.c @@ -1,4 +1,4 @@ -/* $OpenBSD: wicontrol.c,v 1.41 2002/10/10 20:27:46 millert Exp $ */ +/* $OpenBSD: wicontrol.c,v 1.42 2002/10/11 13:33:14 millert Exp $ */ /* * Copyright (c) 1997, 1998, 1999 @@ -69,7 +69,7 @@ static const char copyright[] = "@(#) Copyright (c) 1997, 1998, 1999\ Bill Paul. All rights reserved."; static const char rcsid[] = - "@(#) $OpenBSD: wicontrol.c,v 1.41 2002/10/10 20:27:46 millert Exp $"; + "@(#) $OpenBSD: wicontrol.c,v 1.42 2002/10/11 13:33:14 millert Exp $"; #endif void wi_getval(char *, struct wi_req *); @@ -635,7 +635,7 @@ wi_dumpinfo(iface) wreq.wi_type = WI_RID_CARD_ID; wreq.wi_len = 5; wi_getval(iface, &wreq); - chip_id = wreq.wi_val[0]; + chip_id = letoh16(wreq.wi_val[0]); /* Check for WEP support. */ bzero((char *)&wreq, sizeof(wreq)); |