From 40f6e433f747b01e7d088762c52c0d92111064df Mon Sep 17 00:00:00 2001 From: Lorenzo Bianconi Date: Tue, 2 May 2023 11:49:05 +0200 Subject: [PATCH] wifi: mt76: mt76x02: remove WEP support Get rid of WEP support in mt76x02_set_key routine since it is not longer supported upstream. Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau --- mt76x02_util.c | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/mt76x02_util.c b/mt76x02_util.c index dcbb5c60..a9b77083 100644 --- a/mt76x02_util.c +++ b/mt76x02_util.c @@ -413,12 +413,9 @@ int mt76x02_set_key(struct ieee80211_hw *hw, enum set_key_cmd cmd, struct mt76x02_sta *msta; struct mt76_wcid *wcid; int idx = key->keyidx; - int ret; /* fall back to sw encryption for unsupported ciphers */ switch (key->cipher) { - case WLAN_CIPHER_SUITE_WEP40: - case WLAN_CIPHER_SUITE_WEP104: case WLAN_CIPHER_SUITE_TKIP: case WLAN_CIPHER_SUITE_CCMP: break; @@ -471,16 +468,6 @@ int mt76x02_set_key(struct ieee80211_hw *hw, enum set_key_cmd cmd, } mt76_wcid_key_setup(&dev->mt76, wcid, key); - if (!msta) { - if (key || wcid->hw_key_idx == idx) { - ret = mt76x02_mac_wcid_set_key(dev, wcid->idx, key); - if (ret) - return ret; - } - - return mt76x02_mac_shared_key_setup(dev, mvif->idx, idx, key); - } - return mt76x02_mac_wcid_set_key(dev, msta->wcid.idx, key); } EXPORT_SYMBOL_GPL(mt76x02_set_key);