From: Juuso Oikarinen Date: Thu, 18 Feb 2010 11:25:49 +0000 (+0200) Subject: wl1271: Fix key-remove error X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=fddc7dd7deaa400db314b214d92de95f865a8af0;p=linux-beck.git wl1271: Fix key-remove error The new firmware does not allow removal of unicast keys - they will be automatically removed on the next CMD_JOIN. Signed-off-by: Juuso Oikarinen Reviewed-by: Kalle Valo Signed-off-by: John W. Linville --- diff --git a/drivers/net/wireless/wl12xx/wl1271_main.c b/drivers/net/wireless/wl12xx/wl1271_main.c index 9de7df76f53b..4a0a15bcd67e 100644 --- a/drivers/net/wireless/wl12xx/wl1271_main.c +++ b/drivers/net/wireless/wl12xx/wl1271_main.c @@ -1478,6 +1478,13 @@ static int wl1271_op_set_key(struct ieee80211_hw *hw, enum set_key_cmd cmd, break; case DISABLE_KEY: + /* The wl1271 does not allow to remove unicast keys - they + will be cleared automatically on next CMD_JOIN. Ignore the + request silently, as we dont want the mac80211 to emit + an error message. */ + if (!is_broadcast_ether_addr(addr)) + break; + ret = wl1271_cmd_set_key(wl, KEY_REMOVE, key_conf->keyidx, key_type, key_conf->keylen, key_conf->key,