Skip to contentSkip to conversation

staging:r8188eu: use lib80211 CCMP decrypt

PATCH In review Ivan Safonov 2 participants 4 messages Feb 23, 2018 – Feb 28, 2018 Staging

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 staging:r8188eu: use lib80211 CCMP decrypt

Custom AES decrypt implementation replaced with lib80211 library.

---
 drivers/staging/rtl8188eu/Kconfig             |   1 +
 drivers/staging/rtl8188eu/core/rtw_security.c | 266 +++++---------------------
 2 files changed, 51 insertions(+), 216 deletions(-)
drivers/staging/rtl8188eu/Kconfig +1 -0
index d787a091d3c1..ff7832798a77 100644
@@ -6,6 +6,7 @@ config R8188EU
 	select WEXT_PRIV
 	select LIB80211
 	select LIB80211_CRYPT_WEP
+	select LIB80211_CRYPT_CCMP
 	---help---
 	This option adds the Realtek RTL8188EU USB device such as TP-Link TL-WN725N.
 	If built as a module, it will be called r8188eu.
drivers/staging/rtl8188eu/core/rtw_security.c +50 -216

285 lines not on this page · raw message

Signature · 6 lines
2.16.1

_______________________________________________
devel mailing list
[email protected]
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
#1 lore raw
Quoted 3 lines · Ivan Safonov

Custom AES decrypt implementation replaced with lib80211 library.

The new code looks like original RTL code (really bad) so I'm guessing you copy and pasted the code from somewhere else?

The idea is good, but RTL code is painful to look at.

regards,
dan carpenter

_______________________________________________
devel mailing list
[email protected]
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

#2 lore raw
Quoted 7 lines · Dan Carpenter
Quoted 3 lines · Ivan Safonov

Custom AES decrypt implementation replaced with lib80211 library.

The new code looks like original RTL code (really bad) so I'm guessing you copy and pasted the code from somewhere else?

Unfortunately, your assumption is wrong. Rather, bad code is created because I'm not a good programmer =).

Seriously, after each patch the driver gets better, does not it?

Quoted 2 lines

The idea is good, but RTL code is painful to look at.

The basic idea is to replace a _small_ (or trivial) parts of the program, because I can not test my patches.

Quoted 4 lines

regards,
dan carpenter

Ivan Safonov.
_______________________________________________
devel mailing list
[email protected]
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

#3 lore raw

Hm... Sorry. I was looking at the wrong code.

I was looking at aes_decipher() instead of rtw_aes_decrypt(). The aes_decipher() was acceptable style (although, it's of course good that you deleted it). rtw_aes_decrypt() was always really really awful.

That's fine then. Sorry again.

regards,
dan carpenter

_______________________________________________
devel mailing list
[email protected]
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel