drivers: mediatek: connectivity: fix duplcate symbol error

ld.lld: error: duplicate symbol: hmac_sha256
>>> defined at rpmb-mtk.c:211 (/home/federico/Projects/android_kernel_samsung_a34x/out/../drivers/char/rpmb/rpmb-mtk.c:211)
>>>            drivers/char/rpmb/rpmb-mtk.o:(hmac_sha256) in archive built-in.a
>>> defined at sha256.c:136 (/home/federico/Projects/android_kernel_samsung_a34x/out/../drivers/misc/mediatek/connectivity/wlan/core/gen4m/wpa_supp/src/crypto/sha256.c:136)
This commit is contained in:
Fede2782 2024-04-28 10:44:15 +02:00
parent a5699f57b3
commit a1e16881b9
No known key found for this signature in database
GPG key ID: 1DD0FACD495CE046

View file

@ -132,7 +132,7 @@ hmac_sha256_vector(const u8 *key, size_t key_len, size_t num_elem,
* Returns: 0 on success, -1 on failure * Returns: 0 on success, -1 on failure
*/ */
int int
hmac_sha256(const u8 *key, size_t key_len, const u8 *data, size_t data_len, hmac_sha256_sm(const u8 *key, size_t key_len, const u8 *data, size_t data_len,
u8 *mac) { u8 *mac) {
return hmac_sha256_vector(key, key_len, 1, &data, &data_len, mac); return hmac_sha256_vector(key, key_len, 1, &data, &data_len, mac);
} }
@ -172,7 +172,7 @@ void caculate_pmkid(u8 *key, u8 *IMAC, u8 *RMAC, u8 *serviceName, u8 *pmkid)
os_memcpy(pmkIdSrc+post, RMAC, 6); os_memcpy(pmkIdSrc+post, RMAC, 6);
post += 6; post += 6;
os_memcpy(pmkIdSrc+post, aucServiceID, 6); os_memcpy(pmkIdSrc+post, aucServiceID, 6);
hmac_sha256(key, 32, pmkIdSrc, pmkIdSrcLen, pmkid); hmac_sha256_sm(key, 32, pmkIdSrc, pmkIdSrcLen, pmkid);
os_free(pmkIdSrc); os_free(pmkIdSrc);
} }