Skip to content

Commit

Permalink
[PATCH] hostap: Fix hw reset after CMDCODE_ACCESS_WRITE timeout
Browse files Browse the repository at this point in the history
The Coverity checker (CID: 59) noted that the call to prism2_hw_reset()
was dead code. Move prism2_hw_reset() call to a place where it is
actually executed.

Signed-off-by: Adrian Bunk <bunk@stusta.de>
Signed-off-by: Jouni Malinen <jkmaline@cc.hut.fi>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
  • Loading branch information
Adrian Bunk authored and John W. Linville committed Mar 23, 2006
1 parent 9e75af3 commit 971d1e6
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions drivers/net/wireless/hostap/hostap_hw.c
Original file line number Diff line number Diff line change
Expand Up @@ -928,15 +928,15 @@ static int hfa384x_set_rid(struct net_device *dev, u16 rid, void *buf, int len)

res = hfa384x_cmd(dev, HFA384X_CMDCODE_ACCESS_WRITE, rid, NULL, NULL);
up(&local->rid_bap_sem);

if (res) {
printk(KERN_DEBUG "%s: hfa384x_set_rid: CMDCODE_ACCESS_WRITE "
"failed (res=%d, rid=%04x, len=%d)\n",
dev->name, res, rid, len);
return res;
}

if (res == -ETIMEDOUT)
prism2_hw_reset(dev);
if (res == -ETIMEDOUT)
prism2_hw_reset(dev);
}

return res;
}
Expand Down

0 comments on commit 971d1e6

Please sign in to comment.