From: John W. Linville Date: Tue, 25 Mar 2008 15:43:15 +0000 (-0400) Subject: mac80211: silently accept deletion of non-existant key X-Git-Tag: v2.6.26-rc1~1138^2~291^2~15 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=be892471c42f70e47541e42b8dba7ff91cebd026;p=linux-2.6 mac80211: silently accept deletion of non-existant key Otherwise, 'iwconfig wlan0 key off' with no key set results in: Error for wireless request "Set Encode" (8B2A) : SET failed on device wlan0 ; No such file or directory. Signed-off-by: John W. Linville --- diff --git a/net/mac80211/ieee80211_ioctl.c b/net/mac80211/ieee80211_ioctl.c index 5af23d3187..b047eebb63 100644 --- a/net/mac80211/ieee80211_ioctl.c +++ b/net/mac80211/ieee80211_ioctl.c @@ -55,9 +55,6 @@ static int ieee80211_set_encryption(struct net_device *dev, u8 *sta_addr, key = sta->key; } - if (!key) - return -ENOENT; - ieee80211_key_free(key); return 0; } else {