Skip to content

Commit

Permalink
wl12xx: don't remove key if hlid was already deleted
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Eliad Peller authored and Luciano Coelho committed Aug 22, 2011
1 parent b67476e commit b42f068
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions drivers/net/wireless/wl12xx/cmd.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit b42f068

Please sign in to comment.