staging: vt6656: Fix return for unsupported cipher modes.
mac80211 expect to see -EOPNOTSUPP on unsupported ciphers so these can be done on stack. correct all the returns to do this. Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com> Link: https://lore.kernel.org/r/b65a3b23-735f-f679-0f16-a54c3266b5ae@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
Родитель
be9bca8cfb
Коммит
88900631d7
|
@ -144,11 +144,14 @@ int vnt_set_keys(struct ieee80211_hw *hw, struct ieee80211_sta *sta,
|
|||
break;
|
||||
case WLAN_CIPHER_SUITE_CCMP:
|
||||
if (priv->local_id <= MAC_REVISION_A1)
|
||||
return -EINVAL;
|
||||
return -EOPNOTSUPP;
|
||||
|
||||
key_dec_mode = KEY_CTL_CCMP;
|
||||
|
||||
key->flags |= IEEE80211_KEY_FLAG_GENERATE_IV;
|
||||
break;
|
||||
default:
|
||||
return -EOPNOTSUPP;
|
||||
}
|
||||
|
||||
if (key->flags & IEEE80211_KEY_FLAG_PAIRWISE) {
|
||||
|
|
|
@ -858,9 +858,7 @@ static int vnt_set_key(struct ieee80211_hw *hw, enum set_key_cmd cmd,
|
|||
|
||||
switch (cmd) {
|
||||
case SET_KEY:
|
||||
if (vnt_set_keys(hw, sta, vif, key))
|
||||
return -EOPNOTSUPP;
|
||||
break;
|
||||
return vnt_set_keys(hw, sta, vif, key);
|
||||
case DISABLE_KEY:
|
||||
if (test_bit(key->hw_key_idx, &priv->key_entry_inuse))
|
||||
clear_bit(key->hw_key_idx, &priv->key_entry_inuse);
|
||||
|
|
Загрузка…
Ссылка в новой задаче