Skip to content

Commit 9326c5c

Browse files
smaclennangregkh
authored andcommitted
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>
1 parent 28a821c commit 9326c5c

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎drivers/staging/rtl8192e/rtllib_tx.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@ inline int rtllib_put_snap(u8 *data, u16 h_proto)
171171
snap->oui[1] = oui[1];
172172
snap->oui[2] = oui[2];
173173

174-
*(u16 *)(data + SNAP_SIZE) = h_proto;
174+
*(__be16 *)(data + SNAP_SIZE) = htons(h_proto);
175175

176176
return SNAP_SIZE + sizeof(u16);
177177
}

0 commit comments

Comments
 (0)