summaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/wl12xx/cmd.c
diff options
context:
space:
mode:
authorEliad Peller <eliad@wizery.com>2011-08-14 13:17:24 +0300
committerLuciano Coelho <coelho@ti.com>2011-08-22 12:35:28 +0300
commitb42f068baab96a899bb5488ad9f0e72b14743ec5 (patch)
tree02c570ec10b40171831f19ec72df0d56cece064a /drivers/net/wireless/wl12xx/cmd.c
parentb67476ef1a6417b92d3bb52510ceee266cd9ea1e (diff)
downloadlinux-b42f068baab96a899bb5488ad9f0e72b14743ec5.tar.gz
linux-b42f068baab96a899bb5488ad9f0e72b14743ec5.tar.bz2
linux-b42f068baab96a899bb5488ad9f0e72b14743ec5.zip
wl12xx: don't remove key if hlid was already deleted
If hlid was already removed, there is no need to remove its key (it might cause a fw crash, as the key is invalid). Signed-off-by: Eliad Peller <eliad@wizery.com> Signed-off-by: Luciano Coelho <coelho@ti.com>
Diffstat (limited to 'drivers/net/wireless/wl12xx/cmd.c')
-rw-r--r--drivers/net/wireless/wl12xx/cmd.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/net/wireless/wl12xx/cmd.c b/drivers/net/wireless/wl12xx/cmd.c
index d655e629677c..261807b45ab5 100644
--- a/drivers/net/wireless/wl12xx/cmd.c
+++ b/drivers/net/wireless/wl12xx/cmd.c
@@ -1203,6 +1203,10 @@ int wl1271_cmd_set_sta_key(struct wl1271 *wl, u16 action, u8 id, u8 key_type,
struct wl1271_cmd_set_keys *cmd;
int ret = 0;
+ /* hlid might have already been deleted */
+ if (wl->sta_hlid == WL12XX_INVALID_LINK_ID)
+ return 0;
+
cmd = kzalloc(sizeof(*cmd), GFP_KERNEL);
if (!cmd) {
ret = -ENOMEM;