staging: brcm80211: fix off-by-one error in swap functions
authorHenry Ptasinski <henryp@broadcom.com>
Mon, 15 Aug 2011 13:34:21 +0000 (15:34 +0200)
committerGreg Kroah-Hartman <gregkh@suse.de>
Tue, 23 Aug 2011 20:08:05 +0000 (13:08 -0700)
commit8ac98a56fac0cafb56d900154ac4569a959011c0
tree0d0e2328e19f46ff01eee3dbacd10e12b7dbc6c0
parentc9be7049ad7892d96011ee00fe430efb8f30b89b
staging: brcm80211: fix off-by-one error in swap functions

The original implementation iterated over the data in buf+1 through buf+size,
whereas it should have been over the data in buf through buf+size-1.

Tested on Mac G5 PPC and BCM63281.

Signed-off-by: Henry Ptasinski <henryp@broadcom.com>
Reviewed-by: Arend van Spriel <arend@broadcom.com>
Reviewed-by: Roland Vossen <rvossen@broadcom.com>
Tested-by: Jonas Gorski <jonas.gorski@gmail.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/staging/brcm80211/brcmsmac/srom.c