Skip to contentSkip to conversation

r8152: use SHA-256 library API instead of crypto_shash API

PATCH Applied Eric Biggers 2 participants 2 messages Apr 28, 2025 – May 3, 2025

Subsystems (5)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 r8152: use SHA-256 library API instead of crypto_shash API

From: Eric Biggers <[email protected]>

This user of SHA-256 does not support any other algorithm, so the crypto_shash abstraction provides no value. Just use the SHA-256 library API instead, which is much simpler and easier to use.

---
 drivers/net/usb/Kconfig |  4 +---
 drivers/net/usb/r8152.c | 46 +++++++----------------------------------
 2 files changed, 8 insertions(+), 42 deletions(-)
drivers/net/usb/Kconfig +1 -3
index 3c360d4f06352..370b32fc25880 100644
@@ -99,13 +99,11 @@ config USB_RTL8150
 config USB_RTL8152
 	tristate "Realtek RTL8152/RTL8153 Based USB Ethernet Adapters"
 	select MII
 	select PHYLIB
 	select CRC32
-	select CRYPTO
-	select CRYPTO_HASH
-	select CRYPTO_SHA256
+	select CRYPTO_LIB_SHA256
 	help
 	  This option adds support for Realtek RTL8152 based USB 2.0
 	  10/100 Ethernet adapters and RTL8153 based USB 3.0 10/100/1000
 	  Ethernet adapters.
 
drivers/net/usb/r8152.c +7 -39

70 lines not on this page · raw message

base-commit: 33035b665157558254b3c21c3f049fd728e72368

Signature · 1 line
2.49.0
maintainer Applied
#1 lore raw
Quoted 7 lines · On Mon, 28 Apr 2025 12:16:06 -0700 Eric Biggers wrote:

From: Eric Biggers <[email protected]>

This user of SHA-256 does not support any other algorithm, so the crypto_shash abstraction provides no value. Just use the SHA-256 library API instead, which is much simpler and easier to use.

Applied, thanks!