aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/staging/vt6656/key.c
diff options
context:
space:
mode:
authorMalcolm Priestley <tvboxspy@gmail.com>2020-02-02 12:28:07 +0000
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2020-02-09 16:22:56 -0800
commit88900631d706af9a958190abaad59da024b93484 (patch)
tree10f5c021a358eccd0789b98eb5c642db3b78091d /drivers/staging/vt6656/key.c
parentstaging: vt6656: Disable and remove fall back rates from driver. (diff)
downloadlinux-dev-88900631d706af9a958190abaad59da024b93484.tar.xz
linux-dev-88900631d706af9a958190abaad59da024b93484.zip
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>
Diffstat (limited to 'drivers/staging/vt6656/key.c')
-rw-r--r--drivers/staging/vt6656/key.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/staging/vt6656/key.c b/drivers/staging/vt6656/key.c
index dcd933a6b66e..41b73f9670e2 100644
--- a/drivers/staging/vt6656/key.c
+++ b/drivers/staging/vt6656/key.c
@@ -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) {