From f317154929f87d2fe799179761d1b639af33de74 Mon Sep 17 00:00:00 2001 From: Stanislav Fomichev Date: Mon, 21 Feb 2011 10:35:26 +0300 Subject: staging: brcm80211: remove the rest of broadcom specific byte swapping routines - move ltoh16_buf/htol16_buf util/bcmsrom.c - replace ltoh16_buf in brcmsmac/wlc_mac80211.c with several le16_to_cpu's Signed-off-by: Stanislav Fomichev Signed-off-by: Greg Kroah-Hartman --- drivers/staging/brcm80211/util/bcmsrom.c | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'drivers/staging/brcm80211/util/bcmsrom.c') diff --git a/drivers/staging/brcm80211/util/bcmsrom.c b/drivers/staging/brcm80211/util/bcmsrom.c index b26877c..3ef5a50 100644 --- a/drivers/staging/brcm80211/util/bcmsrom.c +++ b/drivers/staging/brcm80211/util/bcmsrom.c @@ -25,7 +25,6 @@ #include #include #include -#include #include #include #include @@ -1438,6 +1437,18 @@ srom_cc_cmd(si_t *sih, struct osl_info *osh, void *ccregs, u32 cmd, return 0xffff; } +static inline void ltoh16_buf(u16 *buf, unsigned int size) +{ + for (size /= 2; size; size--) + *(buf + size) = le16_to_cpu(*(buf + size)); +} + +static inline void htol16_buf(u16 *buf, unsigned int size) +{ + for (size /= 2; size; size--) + *(buf + size) = cpu_to_le16(*(buf + size)); +} + /* * Read in and validate sprom. * Return 0 on success, nonzero on error. -- cgit v1.1