Skip to contentSkip to conversation

staging: vt6656 remove vnt_mac_disable_keyentry calls

PATCH New Malcolm Priestley 1 participant 1 message Apr 29, 2020 Staging

lore
Share & tools
lore
#0 lore raw

PATCH 2/3 staging: vt6656 remove vnt_mac_disable_keyentry calls

It is not necessary to disable all the keys mac80211 will have removed any existing keys that were used.

---
 drivers/staging/vt6656/key.c | 10 +---------
 1 file changed, 1 insertion(+), 9 deletions(-)
drivers/staging/vt6656/key.c +1 -9
index 47338077c033..de54cc3ff95a 100644
@@ -102,22 +102,14 @@ int vnt_set_keys(struct ieee80211_hw *hw, struct ieee80211_sta *sta,
 	struct vnt_private *priv = hw->priv;
 	u8 *mac_addr = NULL;
 	u8 key_dec_mode = 0;
-	int ret = 0, u;
+	int ret = 0;
 
 	if (sta)
 		mac_addr = &sta->addr[0];
 
 	switch (key->cipher) {
-	case 0:
-		for (u = 0 ; u < MAX_KEY_TABLE; u++)
-			vnt_mac_disable_keyentry(priv, u);
-		return ret;
-
 	case WLAN_CIPHER_SUITE_WEP40:
 	case WLAN_CIPHER_SUITE_WEP104:
-		for (u = 0; u < MAX_KEY_TABLE; u++)
-			vnt_mac_disable_keyentry(priv, u);
-
 		vnt_set_keymode(hw, mac_addr, key, VNT_KEY_DEFAULTKEY,
 				KEY_CTL_WEP);
 
Signature · 1 line
2.25.1