Skip to content

Commit abf3d98

Browse files
arndbKalle Valo
authored andcommitted
mt76: fix enum type mismatch
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. Fixes: c368362 ("mt76: fix iv and CCMP header insertion") Signed-off-by: Arnd Bergmann <[email protected]> Signed-off-by: Kalle Valo <[email protected]> Link: https://lore.kernel.org/r/[email protected]
1 parent 891332f commit abf3d98

File tree

4 files changed

+6
-4
lines changed

4 files changed

+6
-4
lines changed

drivers/net/wireless/mediatek/mt76/mt7915/mcu.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ mt7915_mcu_get_cipher(int cipher)
111111
case WLAN_CIPHER_SUITE_SMS4:
112112
return MCU_CIPHER_WAPI;
113113
default:
114-
return MT_CIPHER_NONE;
114+
return MCU_CIPHER_NONE;
115115
}
116116
}
117117

drivers/net/wireless/mediatek/mt76/mt7915/mcu.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1073,7 +1073,8 @@ enum {
10731073
};
10741074

10751075
enum mcu_cipher_type {
1076-
MCU_CIPHER_WEP40 = 1,
1076+
MCU_CIPHER_NONE = 0,
1077+
MCU_CIPHER_WEP40,
10771078
MCU_CIPHER_WEP104,
10781079
MCU_CIPHER_WEP128,
10791080
MCU_CIPHER_TKIP,

drivers/net/wireless/mediatek/mt76/mt7921/mcu.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ mt7921_mcu_get_cipher(int cipher)
111111
case WLAN_CIPHER_SUITE_SMS4:
112112
return MCU_CIPHER_WAPI;
113113
default:
114-
return MT_CIPHER_NONE;
114+
return MCU_CIPHER_NONE;
115115
}
116116
}
117117

drivers/net/wireless/mediatek/mt76/mt7921/mcu.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -199,7 +199,8 @@ struct sta_rec_sec {
199199
} __packed;
200200

201201
enum mcu_cipher_type {
202-
MCU_CIPHER_WEP40 = 1,
202+
MCU_CIPHER_NONE = 0,
203+
MCU_CIPHER_WEP40,
203204
MCU_CIPHER_WEP104,
204205
MCU_CIPHER_WEP128,
205206
MCU_CIPHER_TKIP,

0 commit comments

Comments
 (0)