Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

staging: r8192e_pci: fix htons error

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>
Cc: stable <stable@vger.kernel.org> # 3.14
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

Sean MacLennan and committed by
Greg Kroah-Hartman
9326c5ca 28a821c3

+1 -1
+1 -1
drivers/staging/rtl8192e/rtllib_tx.c
··· 171 171 snap->oui[1] = oui[1]; 172 172 snap->oui[2] = oui[2]; 173 173 174 - *(u16 *)(data + SNAP_SIZE) = h_proto; 174 + *(__be16 *)(data + SNAP_SIZE) = htons(h_proto); 175 175 176 176 return SNAP_SIZE + sizeof(u16); 177 177 }