aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSean MacLennan <seanm@seanm.ca>2014-05-28 11:19:00 -0400
committerShow Liu <show.liu@linaro.org>2014-06-18 12:05:27 +0800
commit70f7aaff4ac0dce4b1137975e776225612574f34 (patch)
tree0ad6d775de467d3f5b332e76b2e8868f90573e7c
parent68e5d68797d52c60341e6243b3b0094f96e628b3 (diff)
staging: r8192e_pci: fix htons error
commit 9326c5ca0982f548cc08c0cffb14dcbd020f3d43 upstream. A sparse error fixup removed a htons() which is required for the driver to function. This patch puts the htons() back and fixes the sparse warning correctly by changing the left side cast. Signed-off-by: Sean MacLennan <seanm@seanm.ca> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r--drivers/staging/rtl8192e/rtllib_tx.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/staging/rtl8192e/rtllib_tx.c b/drivers/staging/rtl8192e/rtllib_tx.c
index 77964885b3f..334d949afd6 100644
--- a/drivers/staging/rtl8192e/rtllib_tx.c
+++ b/drivers/staging/rtl8192e/rtllib_tx.c
@@ -171,7 +171,7 @@ inline int rtllib_put_snap(u8 *data, u16 h_proto)
snap->oui[1] = oui[1];
snap->oui[2] = oui[2];
- *(u16 *)(data + SNAP_SIZE) = h_proto;
+ *(__be16 *)(data + SNAP_SIZE) = htons(h_proto);
return SNAP_SIZE + sizeof(u16);
}