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)
committerKalle Valo <kvalo@qca.qualcomm.com>
Thu, 12 Jan 2017 10:56:37 +0000 (12:56 +0200)
Simply return -EOPNOTSUPP instead.

Cc: stable@vger.kernel.org
Signed-off-by: Felix Fietkau <nbd@nbd.name>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
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);