--- net/irda/irlmp.c.old 2006-06-08 14:49:20.000000000 +0800 +++ net/irda/irlmp.c 2006-06-09 19:43:58.000000000 +0800 @@ -849,7 +849,13 @@ } /* Construct new discovery info to be used by IrLAP, */ - u16ho(irlmp->discovery_cmd.data.hints) = irlmp->hints.word; +#ifdef __LITTLE_ENDIAN + irlmp->discovery_cmd.data.hints[0] = irlmp->hints.word & 0xff; + irlmp->discovery_cmd.data.hints[1] = (irlmp->hints.word & 0xff00) >> 8; +#else /* ifdef __BIG_ENDIAN */ + irlmp->discovery_cmd.data.hints[0] = (irlmp->hints.word & 0xff00) >> 8; + irlmp->discovery_cmd.data.hints[1] = irlmp->hints.word & 0xff; +#endif /* * Set character set for device name (we use ASCII), and