Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 279355
b: refs/heads/master
c: a0c7b78
h: refs/heads/master
i:
  279353: 33ddcce
  279351: 5d67936
v: v3
  • Loading branch information
Eliad Peller authored and Luciano Coelho committed Dec 20, 2011
1 parent 5cb5ad4 commit fa7aa5d
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 7 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: 5b37ddfec23c17e16b99d8b5c5d1815b312af060
refs/heads/master: a0c7b7825e026c7acf63fd92a5182efd3aff637f
8 changes: 6 additions & 2 deletions trunk/drivers/net/wireless/wl12xx/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -2384,6 +2384,10 @@ static int wl1271_sta_handle_idle(struct wl1271 *wl, struct wl12xx_vif *wlvif,
bool idle)
{
int ret;
bool cur_idle = !test_bit(WLVIF_FLAG_IN_USE, &wlvif->flags);

if (idle == cur_idle)
return 0;

if (idle) {
/* no need to croc if we weren't busy (e.g. during boot) */
Expand All @@ -2402,7 +2406,7 @@ static int wl1271_sta_handle_idle(struct wl1271 *wl, struct wl12xx_vif *wlvif,
ACX_KEEP_ALIVE_TPL_INVALID);
if (ret < 0)
goto out;
set_bit(WL1271_FLAG_IDLE, &wl->flags);
clear_bit(WLVIF_FLAG_IN_USE, &wlvif->flags);
} else {
/* The current firmware only supports sched_scan in idle */
if (wl->sched_scanning) {
Expand All @@ -2413,7 +2417,7 @@ static int wl1271_sta_handle_idle(struct wl1271 *wl, struct wl12xx_vif *wlvif,
ret = wl12xx_start_dev(wl, wlvif);
if (ret < 0)
goto out;
clear_bit(WL1271_FLAG_IDLE, &wl->flags);
set_bit(WLVIF_FLAG_IN_USE, &wlvif->flags);
}

out:
Expand Down
10 changes: 8 additions & 2 deletions trunk/drivers/net/wireless/wl12xx/ps.c
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,11 @@ void wl1271_elp_work(struct work_struct *work)
goto out;

wl12xx_for_each_wlvif(wl, wlvif) {
if (wlvif->bss_type == BSS_TYPE_AP_BSS)
goto out;

if (!test_bit(WLVIF_FLAG_PSM, &wlvif->flags) &&
!test_bit(WL1271_FLAG_IDLE, &wl->flags))
test_bit(WLVIF_FLAG_IN_USE, &wlvif->flags))
goto out;
}

Expand All @@ -78,8 +81,11 @@ void wl1271_ps_elp_sleep(struct wl1271 *wl)
return;

wl12xx_for_each_wlvif(wl, wlvif) {
if (wlvif->bss_type == BSS_TYPE_AP_BSS)
return;

if (!test_bit(WLVIF_FLAG_PSM, &wlvif->flags) &&
!test_bit(WL1271_FLAG_IDLE, &wl->flags))
test_bit(WLVIF_FLAG_IN_USE, &wlvif->flags))
return;
}

Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/net/wireless/wl12xx/scan.c
Original file line number Diff line number Diff line change
Expand Up @@ -703,7 +703,7 @@ int wl1271_scan_sched_scan_start(struct wl1271 *wl, struct wl12xx_vif *wlvif)
if (wlvif->bss_type != BSS_TYPE_STA_BSS)
return -EOPNOTSUPP;

if (!test_bit(WL1271_FLAG_IDLE, &wl->flags))
if (test_bit(WLVIF_FLAG_IN_USE, &wlvif->flags))
return -EBUSY;

start = kzalloc(sizeof(*start), GFP_KERNEL);
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/net/wireless/wl12xx/wl12xx.h
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,6 @@ enum wl12xx_flags {
WL1271_FLAG_IN_ELP,
WL1271_FLAG_ELP_REQUESTED,
WL1271_FLAG_IRQ_RUNNING,
WL1271_FLAG_IDLE,
WL1271_FLAG_FW_TX_BUSY,
WL1271_FLAG_DUMMY_PACKET_PENDING,
WL1271_FLAG_SUSPENDED,
Expand All @@ -262,6 +261,7 @@ enum wl12xx_vif_flags {
WLVIF_FLAG_PSPOLL_FAILURE,
WLVIF_FLAG_CS_PROGRESS,
WLVIF_FLAG_AP_PROBE_RESP_SET,
WLVIF_FLAG_IN_USE,
};

struct wl1271_link {
Expand Down

0 comments on commit fa7aa5d

Please sign in to comment.