Skip to content

Commit

Permalink
mac80211: silently accept deletion of non-existant key
Browse files Browse the repository at this point in the history
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 <linville@tuxdriver.com>
  • Loading branch information
John W. Linville authored and John W. Linville committed Mar 27, 2008
1 parent 5983a3d commit be89247
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions net/mac80211/ieee80211_ioctl.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit be89247

Please sign in to comment.