mirror of https://gitee.com/openkylin/linux.git
staging: vt6656: return all key calls to mac80211 stack.
vnt_mac_set_keyentry can return USB calls so return them to mac80211. Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com> Link: https://lore.kernel.org/r/f1be8ba0-9513-55cb-de9d-dcd4341e5b78@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
ddaa877f2d
commit
f4269d4862
|
@ -91,9 +91,8 @@ static int vnt_set_keymode(struct ieee80211_hw *hw, u8 *mac_addr,
|
|||
key->key[15] |= 0x80;
|
||||
}
|
||||
|
||||
vnt_mac_set_keyentry(priv, key_mode, entry, key_inx, bssid, key->key);
|
||||
|
||||
return 0;
|
||||
return vnt_mac_set_keyentry(priv, key_mode, entry,
|
||||
key_inx, bssid, key->key);
|
||||
}
|
||||
|
||||
int vnt_set_keys(struct ieee80211_hw *hw, struct ieee80211_sta *sta,
|
||||
|
@ -102,7 +101,6 @@ 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;
|
||||
|
||||
if (sta)
|
||||
mac_addr = &sta->addr[0];
|
||||
|
@ -115,7 +113,9 @@ int vnt_set_keys(struct ieee80211_hw *hw, struct ieee80211_sta *sta,
|
|||
|
||||
key->flags |= IEEE80211_KEY_FLAG_GENERATE_IV;
|
||||
|
||||
return ret;
|
||||
return vnt_set_keymode(hw, mac_addr, key, VNT_KEY_DEFAULTKEY,
|
||||
KEY_CTL_WEP);
|
||||
|
||||
case WLAN_CIPHER_SUITE_TKIP:
|
||||
key->flags |= IEEE80211_KEY_FLAG_GENERATE_MMIC;
|
||||
key->flags |= IEEE80211_KEY_FLAG_GENERATE_IV;
|
||||
|
@ -136,11 +136,9 @@ int vnt_set_keys(struct ieee80211_hw *hw, struct ieee80211_sta *sta,
|
|||
}
|
||||
|
||||
if (key->flags & IEEE80211_KEY_FLAG_PAIRWISE)
|
||||
vnt_set_keymode(hw, mac_addr, key, VNT_KEY_PAIRWISE,
|
||||
return vnt_set_keymode(hw, mac_addr, key, VNT_KEY_PAIRWISE,
|
||||
key_dec_mode);
|
||||
else
|
||||
vnt_set_keymode(hw, mac_addr, key,
|
||||
VNT_KEY_GROUP_ADDRESS, key_dec_mode);
|
||||
|
||||
return 0;
|
||||
return vnt_set_keymode(hw, mac_addr, key,
|
||||
VNT_KEY_GROUP_ADDRESS, key_dec_mode);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue