mt76: fix enum type mismatch
PATCH 1/1 mt76: fix enum type mismatch
From: Arnd Bergmann <[email protected]>
There is no 'NONE' version of 'enum mcu_cipher_type', and returning 'MT_CIPHER_NONE' causes a warning:
drivers/net/wireless/mediatek/mt76/mt7921/mcu.c: In function 'mt7921_mcu_get_cipher':drivers/net/wireless/mediatek/mt76/mt7921/mcu.c:114:24: error: implicit conversion from 'enum mt76_cipher_type' to 'enum mcu_cipher_type' [-Werror=enum-conversion]
114 | return MT_CIPHER_NONE;
| ^~~~~~~~~~~~~~Add the missing MCU_CIPHER_NONE defintion that fits in here with the same value.
---
This problem currently exists in 5.14-rc2, please ignore my patch if a fix is already queued up elsewhere.
--- drivers/net/wireless/mediatek/mt76/mt7915/mcu.c | 2 +- drivers/net/wireless/mediatek/mt76/mt7915/mcu.h | 3 ++- drivers/net/wireless/mediatek/mt76/mt7921/mcu.c | 2 +- drivers/net/wireless/mediatek/mt76/mt7921/mcu.h | 3 ++- 4 files changed, 6 insertions(+), 4 deletions(-)
drivers/net/wireless/mediatek/mt76/mt7915/mcu.c +1 -1
@@ -111,7 +111,7 @@ mt7915_mcu_get_cipher(int cipher)case WLAN_CIPHER_SUITE_SMS4 :return MCU_CIPHER_WAPI ;default : -return MT_CIPHER_NONE ; +return MCU_CIPHER_NONE ; } }
drivers/net/wireless/mediatek/mt76/mt7915/mcu.h +2 -1
@@ -1073,7 +1073,8 @@ enum { };enum mcu_cipher_type { -MCU_CIPHER_WEP40 =1 , +MCU_CIPHER_NONE =0 , +MCU_CIPHER_WEP40 ,MCU_CIPHER_WEP104 ,MCU_CIPHER_WEP128 ,MCU_CIPHER_TKIP ,
drivers/net/wireless/mediatek/mt76/mt7921/mcu.c +1 -1
@@ -111,7 +111,7 @@ mt7921_mcu_get_cipher(int cipher)case WLAN_CIPHER_SUITE_SMS4 :return MCU_CIPHER_WAPI ;default : -return MT_CIPHER_NONE ; +return MCU_CIPHER_NONE ; } }
drivers/net/wireless/mediatek/mt76/mt7921/mcu.h +2 -1
@@ -199,7 +199,8 @@ struct sta_rec_sec { } __packed;enum mcu_cipher_type { -MCU_CIPHER_WEP40 =1 , +MCU_CIPHER_NONE =0 , +MCU_CIPHER_WEP40 ,MCU_CIPHER_WEP104 ,MCU_CIPHER_WEP128 ,MCU_CIPHER_TKIP ,
Signature · 1 line
2.29.2
Quoted 10 lines · Arnd Bergmann
From: Arnd Bergmann <[email protected]>
There is no 'NONE' version of 'enum
mcu_cipher_type', and returning 'MT_CIPHER_NONE' causes a warning:
drivers/net/wireless/mediatek/mt76/mt7921/mcu.c: In function 'mt7921_mcu_get_cipher':drivers/net/wireless/mediatek/mt76/mt7921/mcu.c:114:24: error: implicit conversion from 'enummt76_cipher_type' to 'enummcu_cipher_type' [-Werror=enum-conversion]114 | return MT_CIPHER_NONE; | ^~~~~~~~~~~~~~
Quoted 8 lines
Add the missing
MCU_CIPHER_NONEdefintion that fits in here with the same value.Fixes c368362c36d3 ("mt76: fix iv and CCMP header insertion")Signed-off-by Arnd Bergmann <[email protected]>---
This problem currently exists in 5.14-rc2, please ignore my patch if a fix is already queued up elsewhere.
Should I take this to wireless-drivers? Felix, ack?
Signature · 8 lines
https://patchwork.kernel.org/project/linux-wireless/list/ https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches _______________________________________________ Linux-mediatek mailing list [email protected] http://lists.infradead.org/mailman/listinfo/linux-mediatek
Quoted 7 lines · Arnd Bergmann
From: Arnd Bergmann <[email protected]>
There is no 'NONE' version of 'enum
mcu_cipher_type', and returning 'MT_CIPHER_NONE' causes a warning:
drivers/net/wireless/mediatek/mt76/mt7921/mcu.c: In function 'mt7921_mcu_get_cipher':drivers/net/wireless/mediatek/mt76/mt7921/mcu.c:114:24: error: implicit conversion from 'enummt76_cipher_type' to 'enummcu_cipher_type' [-Werror=enum-conversion]
Quoted 8 lines
114 | return MT_CIPHER_NONE; | ^~~~~~~~~~~~~~Add the missing
MCU_CIPHER_NONEdefintion that fits in here with the same value.Fixes c368362c36d3 ("mt76: fix iv and CCMP header insertion")Signed-off-by Arnd Bergmann <[email protected]>
Patch applied to wireless-drivers.git, thanks.
abf3d98dee7c mt76: fix enum type mismatch
Signature · 3 lines
https://patchwork.kernel.org/project/linux-wireless/patch/[email protected]/ https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches
Quoted 7 lines · Arnd Bergmann
From: Arnd Bergmann <[email protected]>
There is no 'NONE' version of 'enum
mcu_cipher_type', and returning 'MT_CIPHER_NONE' causes a warning:
drivers/net/wireless/mediatek/mt76/mt7921/mcu.c: In function 'mt7921_mcu_get_cipher':drivers/net/wireless/mediatek/mt76/mt7921/mcu.c:114:24: error: implicit conversion from 'enummt76_cipher_type' to 'enummcu_cipher_type' [-Werror=enum-conversion]
Quoted 8 lines
114 | return MT_CIPHER_NONE; | ^~~~~~~~~~~~~~Add the missing
MCU_CIPHER_NONEdefintion that fits in here with the same value.Fixes c368362c36d3 ("mt76: fix iv and CCMP header insertion")Signed-off-by Arnd Bergmann <[email protected]>
Patch applied to wireless-drivers.git, thanks.
abf3d98dee7c mt76: fix enum type mismatch
Signature · 9 lines
https://patchwork.kernel.org/project/linux-wireless/patch/[email protected]/ https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches _______________________________________________ Linux-mediatek mailing list [email protected] http://lists.infradead.org/mailman/listinfo/linux-mediatek