ath5k: drop bogus warning on drv_set_key with unsupported cipher
authorFelix Fietkau <nbd@nbd.name>
Wed, 11 Jan 2017 14:32:13 +0000 (16:32 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 12 Mar 2017 05:37:28 +0000 (06:37 +0100)
commit a70e1d6fd6b5e1a81fa6171600942bee34f5128f upstream.

Simply return -EOPNOTSUPP instead.

Signed-off-by: Felix Fietkau <nbd@nbd.name>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/net/wireless/ath/ath5k/mac80211-ops.c

index dc44cfef75176e1710f6622fee85f1f5e9b97e11..16e052d02c94088006e380dd95bc9bec1ba28f88 100644 (file)
@@ -502,8 +502,7 @@ ath5k_set_key(struct ieee80211_hw *hw, enum set_key_cmd cmd,
                        break;
                return -EOPNOTSUPP;
        default:
-               WARN_ON(1);
-               return -EINVAL;
+               return -EOPNOTSUPP;
        }
 
        mutex_lock(&ah->lock);