summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorDamien Bergamini <damien@cvs.openbsd.org>2010-06-21 19:56:43 +0000
committerDamien Bergamini <damien@cvs.openbsd.org>2010-06-21 19:56:43 +0000
commit8fe3fec3667e97dc206f2b25c350b95ee7eed1e4 (patch)
tree4f3568734a708699c90f2723cc0392937c456d89 /sys
parent8a9b943dc21b12b30eefc5eb5791e1629a497d5e (diff)
use LE_READ_4/LE_READ_2 instead of hardcoding
Diffstat (limited to 'sys')
-rw-r--r--sys/dev/ic/athn.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/dev/ic/athn.c b/sys/dev/ic/athn.c
index ffff833c5a5..80165cfeb1b 100644
--- a/sys/dev/ic/athn.c
+++ b/sys/dev/ic/athn.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: athn.c,v 1.52 2010/06/21 19:46:50 damien Exp $ */
+/* $OpenBSD: athn.c,v 1.53 2010/06/21 19:56:42 damien Exp $ */
/*-
* Copyright (c) 2009 Damien Bergamini <damien.bergamini@free.fr>
@@ -1013,8 +1013,8 @@ athn_set_key(struct ieee80211com *ic, struct ieee80211_node *ni,
if (!(k->k_flags & IEEE80211_KEY_GROUP)) {
addr = ni->ni_macaddr;
- lo = addr[0] | addr[1] << 8 | addr[2] << 16 | addr[3] << 24;
- hi = addr[4] | addr[5] << 8;
+ lo = LE_READ_4(&addr[0]);
+ hi = LE_READ_2(&addr[4]);
lo = lo >> 1 | hi << 31;
hi = hi >> 1;
} else