Skip to contentSkip to conversation

staging: ks7010: Fix build error

PATCH Superseded YueHaibing 2 participants 3 messages Jun 21, 2019 Staging

lore
Share & tools
lore

YueHaibing

author
#0 lore raw

PATCH 1/1 staging: ks7010: Fix build error

when CRYPTO is m and KS7010 is y, building fails:

drivers/staging/ks7010/ks_hostif.o: In function `michael_mic.constprop.13':
ks_hostif.c:(.text+0x560): undefined reference to crypto_alloc_shash' ks_hostif.c:(.text+0x580): undefined reference to crypto_shash_setkey' ks_hostif.c:(.text+0x5e0): undefined reference to crypto_destroy_tfm' ks_hostif.c:(.text+0x614): undefined reference to crypto_shash_update' ks_hostif.c:(.text+0x62c): undefined reference to crypto_shash_update' ks_hostif.c:(.text+0x648): undefined reference to crypto_shash_finup'

select CRYPTO and CRYPTO_HASH to fix this.

Fixes 8b523f20417d ("staging: ks7010: removed custom Michael MIC implementation.")
---
 drivers/staging/ks7010/Kconfig | 2 ++
 1 file changed, 2 insertions(+)
drivers/staging/ks7010/Kconfig +2 -0
index 0987fdc..6a20e64 100644
@@ -5,6 +5,8 @@ config KS7010
 	select WIRELESS_EXT
 	select WEXT_PRIV
 	select FW_LOADER
+	select CRYPTO
+	select CRYPTO_HASH
 	help
 	  This is a driver for KeyStream KS7010 based SDIO WIFI cards. It is
 	  found on at least later Spectec SDW-821 (FCC-ID "S2Y-WLAN-11G-K" only,
Signature · 1 line
2.7.4
maintainer
#1 lore raw
Quoted 24 lines · YueHaibing

when CRYPTO is m and KS7010 is y, building fails:

drivers/staging/ks7010/ks_hostif.o: In function `michael_mic.constprop.13':
ks_hostif.c:(.text+0x560): undefined reference to crypto_alloc_shash' ks_hostif.c:(.text+0x580): undefined reference to crypto_shash_setkey' ks_hostif.c:(.text+0x5e0): undefined reference to crypto_destroy_tfm' ks_hostif.c:(.text+0x614): undefined reference to crypto_shash_update' ks_hostif.c:(.text+0x62c): undefined reference to crypto_shash_update' ks_hostif.c:(.text+0x648): undefined reference to crypto_shash_finup'

select CRYPTO and CRYPTO_HASH to fix this.

Fixes 8b523f20417d ("staging: ks7010: removed custom Michael MIC implementation.")
---
 drivers/staging/ks7010/Kconfig | 2 ++
 1 file changed, 2 insertions(+)
drivers/staging/ks7010/Kconfig +0 -0
index 0987fdc..6a20e64 100644

drivers/staging/ks7010/Kconfig config KS7010 · line 9

Quoted 5 lines
drivers/staging/ks7010/Kconfig +2 -0
@@ -5,6 +5,8 @@ config KS7010
 	select WIRELESS_EXT
 	select WEXT_PRIV
 	select FW_LOADER
+	select CRYPTO
+	select CRYPTO_HASH

selects are horrible. can we do a depends on instead?

thanks,

greg k-h

author
#2 lore raw

PATCH v2 1/1 staging: ks7010: Fix build error

when CRYPTO is m and KS7010 is y, building fails:

drivers/staging/ks7010/ks_hostif.o: In function `michael_mic.constprop.13':
ks_hostif.c:(.text+0x560): undefined reference to crypto_alloc_shash' ks_hostif.c:(.text+0x580): undefined reference to crypto_shash_setkey' ks_hostif.c:(.text+0x5e0): undefined reference to crypto_destroy_tfm' ks_hostif.c:(.text+0x614): undefined reference to crypto_shash_update' ks_hostif.c:(.text+0x62c): undefined reference to crypto_shash_update' ks_hostif.c:(.text+0x648): undefined reference to crypto_shash_finup'

Add CRYPTO and CRYPTO_HASH dependencies to fix this.

Fixes 8b523f20417d ("staging: ks7010: removed custom Michael MIC implementation.")

---
v2: use 'depends on' instead of 'select'

---
 drivers/staging/ks7010/Kconfig | 1 +
 1 file changed, 1 insertion(+)
drivers/staging/ks7010/Kconfig +1 -0
index 0987fdc..9d7cbc8 100644
@@ -5,6 +5,7 @@ config KS7010
 	select WIRELESS_EXT
 	select WEXT_PRIV
 	select FW_LOADER
+	depends on CRYPTO && CRYPTO_HASH
 	help
 	  This is a driver for KeyStream KS7010 based SDIO WIFI cards. It is
 	  found on at least later Spectec SDW-821 (FCC-ID "S2Y-WLAN-11G-K" only,
Signature · 1 line
2.7.4