mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-11-30 05:06:44 +07:00
rndis_wlan: fix broken logic in add_wep_key()
add_wep_key() tries to check if key length is not 5 AND not 13 but uses (key_len != 5 || key_len != 13) instead. Fix this. Signed-off-by: Jussi Kivilinna <jussi.kivilinna@mbnet.fi> Signed-off-by: John W. Linville <linville@tuxdriver.com>
This commit is contained in:
parent
84f6a01ce0
commit
40ba60ddfe
@ -1214,7 +1214,7 @@ static int add_wep_key(struct usbnet *usbdev, char *key, int key_len, int index)
|
||||
struct ndis_80211_wep_key ndis_key;
|
||||
int cipher, ret;
|
||||
|
||||
if ((key_len != 5 || key_len != 13) || index < 0 || index > 3)
|
||||
if ((key_len != 5 && key_len != 13) || index < 0 || index > 3)
|
||||
return -EINVAL;
|
||||
|
||||
if (key_len == 5)
|
||||
|
Loading…
Reference in New Issue
Block a user