summaryrefslogtreecommitdiff
path: root/net/irda/irlmp.c
diff options
context:
space:
mode:
authorGraf Yang <graf.yang@analog.com>2008-05-13 23:25:57 -0700
committerDavid S. Miller <davem@davemloft.net>2008-05-13 23:25:57 -0700
commit332223831e86b2e17b48b4afafad07d8e3b73861 (patch)
treea3bd42005c91888c3cb20ec0ca6880e3181e7acb /net/irda/irlmp.c
parentc1cc678adaa78ae2aab6a6d699241ad516d84476 (diff)
downloadlinux-stable-332223831e86b2e17b48b4afafad07d8e3b73861.tar.gz
linux-stable-332223831e86b2e17b48b4afafad07d8e3b73861.tar.bz2
linux-stable-332223831e86b2e17b48b4afafad07d8e3b73861.zip
irda: Fix a misalign access issue. (v2)
Replace u16ho with put/get_unaligned functions Signed-off-by: Graf Yang <graf.yang@analog.com> Signed-off-by: Bryan Wu <cooloney@kernel.org> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/irda/irlmp.c')
-rw-r--r--net/irda/irlmp.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/net/irda/irlmp.c b/net/irda/irlmp.c
index 1f81f8e7c61d..7bf5b913828b 100644
--- a/net/irda/irlmp.c
+++ b/net/irda/irlmp.c
@@ -1062,7 +1062,8 @@ void irlmp_discovery_expiry(discinfo_t *expiries, int number)
for(i = 0; i < number; i++) {
/* Check if we should notify client */
if ((client->expir_callback) &&
- (client->hint_mask.word & u16ho(expiries[i].hints)
+ (client->hint_mask.word &
+ get_unaligned((__u16 *)expiries[i].hints)
& 0x7f7f) )
client->expir_callback(&(expiries[i]),
EXPIRY_TIMEOUT,
@@ -1086,7 +1087,7 @@ discovery_t *irlmp_get_discovery_response(void)
IRDA_ASSERT(irlmp != NULL, return NULL;);
- u16ho(irlmp->discovery_rsp.data.hints) = irlmp->hints.word;
+ put_unaligned(irlmp->hints.word, (__u16 *)irlmp->discovery_rsp.data.hints);
/*
* Set character set for device name (we use ASCII), and