diff options
author | Pavel Roskin <proski@gnu.org> | 2011-07-16 03:06:33 +0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2011-07-18 22:29:42 +0400 |
commit | 78fa99abd7a7ecfd7364e7b7198c9ecc27766855 (patch) | |
tree | 6454afa1ea8d688d7fe050478f03b4e9c98a9127 /drivers/net/wireless/ath/ath9k/hif_usb.c | |
parent | d47d78dff4d6d72eec59dcdf0f6dd44064088112 (diff) | |
download | linux-78fa99abd7a7ecfd7364e7b7198c9ecc27766855.tar.xz |
ath9k: use get_unaligned_{b16, le16, le32} where possible
Signed-off-by: Pavel Roskin <proski@gnu.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/ath/ath9k/hif_usb.c')
-rw-r--r-- | drivers/net/wireless/ath/ath9k/hif_usb.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/net/wireless/ath/ath9k/hif_usb.c b/drivers/net/wireless/ath/ath9k/hif_usb.c index 8028fe90f666..1d11ae101d67 100644 --- a/drivers/net/wireless/ath/ath9k/hif_usb.c +++ b/drivers/net/wireless/ath/ath9k/hif_usb.c @@ -14,6 +14,7 @@ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ +#include <asm/unaligned.h> #include "htc.h" /* identify firmware images */ @@ -557,8 +558,8 @@ static void ath9k_hif_usb_rx_stream(struct hif_device_usb *hif_dev, ptr = (u8 *) skb->data; - pkt_len = ptr[index] + (ptr[index+1] << 8); - pkt_tag = ptr[index+2] + (ptr[index+3] << 8); + pkt_len = get_unaligned_le16(ptr + index); + pkt_tag = get_unaligned_le16(ptr + index + 2); if (pkt_tag != ATH_USB_RX_STREAM_MODE_TAG) { RX_STAT_INC(skb_dropped); |