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@xxxxxxxxx> --- drivers/staging/vt6656/key.c | 5 ++++- drivers/staging/vt6656/main_usb.c | 4 +--- 2 files changed, 5 insertions(+), 4 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) { diff --git a/drivers/staging/vt6656/main_usb.c b/drivers/staging/vt6656/main_usb.c index 5e48b3ddb94c..6e5963adb501 100644 --- a/drivers/staging/vt6656/main_usb.c +++ b/drivers/staging/vt6656/main_usb.c @@ -862,9 +862,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); -- 2.25.0 _______________________________________________ devel mailing list devel@xxxxxxxxxxxxxxxxxxxxxx http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel