OSDN Git Service

mt76: switch to wep sw crypto for mt7615/mt7915
authorLorenzo Bianconi <lorenzo@kernel.org>
Sat, 17 Oct 2020 09:43:35 +0000 (11:43 +0200)
committerFelix Fietkau <nbd@nbd.name>
Fri, 4 Dec 2020 13:31:12 +0000 (14:31 +0100)
Switch to wep sw crypto for mt7615/mt7915 since wtbl require a sta
reference and wep key is not pairwise

Tested-by: YN Chen <yn.chen@mediatek.com>
Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
drivers/net/wireless/mediatek/mt76/mt7615/main.c
drivers/net/wireless/mediatek/mt76/mt7915/main.c

index 8b47466..e395470 100644 (file)
@@ -379,8 +379,6 @@ static int mt7615_set_key(struct ieee80211_hw *hw, enum set_key_cmd cmd,
        case WLAN_CIPHER_SUITE_AES_CMAC:
                key->flags |= IEEE80211_KEY_FLAG_GENERATE_MMIE;
                break;
-       case WLAN_CIPHER_SUITE_WEP40:
-       case WLAN_CIPHER_SUITE_WEP104:
        case WLAN_CIPHER_SUITE_TKIP:
        case WLAN_CIPHER_SUITE_CCMP:
        case WLAN_CIPHER_SUITE_CCMP_256:
@@ -388,6 +386,8 @@ static int mt7615_set_key(struct ieee80211_hw *hw, enum set_key_cmd cmd,
        case WLAN_CIPHER_SUITE_GCMP_256:
        case WLAN_CIPHER_SUITE_SMS4:
                break;
+       case WLAN_CIPHER_SUITE_WEP40:
+       case WLAN_CIPHER_SUITE_WEP104:
        default:
                return -EOPNOTSUPP;
        }
index b53f04f..989747c 100644 (file)
@@ -313,8 +313,6 @@ static int mt7915_set_key(struct ieee80211_hw *hw, enum set_key_cmd cmd,
        case WLAN_CIPHER_SUITE_AES_CMAC:
                key->flags |= IEEE80211_KEY_FLAG_GENERATE_MMIE;
                break;
-       case WLAN_CIPHER_SUITE_WEP40:
-       case WLAN_CIPHER_SUITE_WEP104:
        case WLAN_CIPHER_SUITE_TKIP:
        case WLAN_CIPHER_SUITE_CCMP:
        case WLAN_CIPHER_SUITE_CCMP_256:
@@ -322,6 +320,8 @@ static int mt7915_set_key(struct ieee80211_hw *hw, enum set_key_cmd cmd,
        case WLAN_CIPHER_SUITE_GCMP_256:
        case WLAN_CIPHER_SUITE_SMS4:
                break;
+       case WLAN_CIPHER_SUITE_WEP40:
+       case WLAN_CIPHER_SUITE_WEP104:
        default:
                return -EOPNOTSUPP;
        }