r8192e_pci driver broken 3.14+

Sean MacLennan seanm at seanm.ca
Fri Apr 18 17:36:19 UTC 2014


Commit 198e0d17c on November 2 by Rashika Kheria breaks the r8192e_pci
driver on my laptop. The bulk of the commit is fine. It is just the
following change that causes grief:

diff --git a/drivers/staging/rtl8192e/rtllib_tx.c b/drivers/staging/rtl8192e/rtllib_tx.c
index 3183627..7796488 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) = htons(h_proto);
+	*(u16 *)(data + SNAP_SIZE) = h_proto;

	return SNAP_SIZE + sizeof(u16);
 }

I am not sure what platform this was tested on, but I believe for any
little endian machine the htons() is required. Reverting this part of
the commit gets me a working driver. I sent this email using it ;)

Sorry it took so long to report, I don't really use the wireless in
the winter.

Cheers,
   Sean


More information about the devel mailing list