From 825556e195ecde9ce8f5f4cbad9953f398c8598e Mon Sep 17 00:00:00 2001 From: SpacingBat3 Date: Wed, 3 Dec 2025 07:33:29 +0000 Subject: [PATCH] Linux 6.18 compat: Drop `hmac_sha256` symbol (#277) * Linux 6.18 compat: Drop `hmac_sha256` symbol It looks like it is a backwards compatibility code piece, I could find any occurence of it outside of the core/crypto/sha256.{c,h} and it looks like driver uses `hmac_sha256_vector` directly anyway that this function was a (legacy?) wrapper for. Signed-off-by: SpacingBat3 * chore: update README.md Signed-off-by: SpacingBat3 --------- Signed-off-by: SpacingBat3 --- README.md | 2 +- core/crypto/sha256.c | 16 ---------------- core/crypto/sha256.h | 2 -- 3 files changed, 1 insertion(+), 19 deletions(-) diff --git a/README.md b/README.md index 8f413b3..0f7d667 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # REALTEK RTL88x2B USB Linux Driver **Current Driver Version**: 5.13.1-30 -**Support Kernel**: 2.6.24 ~ 6.15 (with unofficial patches) +**Support Kernel**: 2.6.24 ~ 6.18 (with unofficial patches) Linux in-tree rtw8822bu driver is a work in progress. Check [this](https://lore.kernel.org/lkml/20220518082318.3898514-1-s.hauer@pengutronix.de/) patchset. diff --git a/core/crypto/sha256.c b/core/crypto/sha256.c index ea5d9e3..f31f957 100644 --- a/core/crypto/sha256.c +++ b/core/crypto/sha256.c @@ -86,19 +86,3 @@ int hmac_sha256_vector(const u8 *key, size_t key_len, size_t num_elem, _len[1] = SHA256_MAC_LEN; return sha256_vector(2, _addr, _len, mac); } - - -/** - * hmac_sha256 - HMAC-SHA256 over data buffer (RFC 2104) - * @key: Key for HMAC operations - * @key_len: Length of the key in bytes - * @data: Pointers to the data area - * @data_len: Length of the data area - * @mac: Buffer for the hash (32 bytes) - * Returns: 0 on success, -1 on failure - */ -int hmac_sha256(const u8 *key, size_t key_len, const u8 *data, - size_t data_len, u8 *mac) -{ - return hmac_sha256_vector(key, key_len, 1, &data, &data_len, mac); -} diff --git a/core/crypto/sha256.h b/core/crypto/sha256.h index 5219022..0ca87d1 100644 --- a/core/crypto/sha256.h +++ b/core/crypto/sha256.h @@ -13,8 +13,6 @@ int hmac_sha256_vector(const u8 *key, size_t key_len, size_t num_elem, const u8 *addr[], const size_t *len, u8 *mac); -int hmac_sha256(const u8 *key, size_t key_len, const u8 *data, - size_t data_len, u8 *mac); int sha256_prf(const u8 *key, size_t key_len, const char *label, const u8 *data, size_t data_len, u8 *buf, size_t buf_len); int sha256_prf_bits(const u8 *key, size_t key_len, const char *label,