Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 315320
b: refs/heads/master
c: c45ee4f
h: refs/heads/master
v: v3
  • Loading branch information
Yoni Divinsky authored and John W. Linville committed Jul 10, 2012
1 parent 27c4804 commit 5cc4502
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: c24ec83bcac50160c344b3eb0e4c601b6cb4f7e5
refs/heads/master: c45ee4ff1f66b2a02f51b8a2c1c3dcfd7faefab0
8 changes: 7 additions & 1 deletion trunk/drivers/net/wireless/ti/wlcore/cmd.c
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
#include "hw_ops.h"

#define WL1271_CMD_FAST_POLL_COUNT 50
#define WL1271_WAIT_EVENT_FAST_POLL_COUNT 20

/*
* send command to firmware
Expand Down Expand Up @@ -138,6 +139,7 @@ static int wl1271_cmd_wait_for_event_or_timeout(struct wl1271 *wl,
u32 *events_vector;
u32 event;
unsigned long timeout_time;
u16 poll_count = 0;
int ret = 0;

*timeout = false;
Expand All @@ -156,7 +158,11 @@ static int wl1271_cmd_wait_for_event_or_timeout(struct wl1271 *wl,
goto out;
}

msleep(1);
poll_count++;
if (poll_count < WL1271_WAIT_EVENT_FAST_POLL_COUNT)
usleep_range(50, 51);
else
usleep_range(1000, 5000);

/* read from both event fields */
ret = wlcore_read(wl, wl->mbox_ptr[0], events_vector,
Expand Down

0 comments on commit 5cc4502

Please sign in to comment.