Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 247111
b: refs/heads/master
c: c1b193e
h: refs/heads/master
i:
  247109: 5a9d591
  247107: 8fbbc58
  247103: 09bfc6e
v: v3
  • Loading branch information
Eliad Peller authored and Luciano Coelho committed Apr 19, 2011
1 parent df47816 commit 50a12fe
Show file tree
Hide file tree
Showing 5 changed files with 37 additions and 44 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: 17e672d6e4b5a8a3f330a70dfd58d25a2cb497b5
refs/heads/master: c1b193eb6557279d037ab18c00ab628c6c78847f
11 changes: 6 additions & 5 deletions trunk/drivers/net/wireless/wl12xx/event.c
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ void wl1271_pspoll_work(struct work_struct *work)
{
struct delayed_work *dwork;
struct wl1271 *wl;
int ret;

dwork = container_of(work, struct delayed_work, work);
wl = container_of(dwork, struct wl1271, pspoll_work);
Expand All @@ -55,8 +56,13 @@ void wl1271_pspoll_work(struct work_struct *work)
* delivery failure occurred, and no-one changed state since, so
* we should go back to powersave.
*/
ret = wl1271_ps_elp_wakeup(wl);
if (ret < 0)
goto out;

wl1271_ps_set_mode(wl, STATION_POWER_SAVE_MODE, wl->basic_rate, true);

wl1271_ps_elp_sleep(wl);
out:
mutex_unlock(&wl->mutex);
};
Expand Down Expand Up @@ -129,11 +135,6 @@ static int wl1271_event_ps_report(struct wl1271 *wl,

/* enable beacon early termination */
ret = wl1271_acx_bet_enable(wl, true);
if (ret < 0)
break;

/* go to extremely low power mode */
wl1271_ps_elp_sleep(wl);
break;
default:
break;
Expand Down
43 changes: 21 additions & 22 deletions trunk/drivers/net/wireless/wl12xx/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -2792,32 +2792,31 @@ static int wl1271_op_conf_tx(struct ieee80211_hw *hw, u16 queue,
conf_tid->ack_policy = CONF_ACK_POLICY_LEGACY;
conf_tid->apsd_conf[0] = 0;
conf_tid->apsd_conf[1] = 0;
} else {
ret = wl1271_ps_elp_wakeup(wl);
if (ret < 0)
goto out;
goto out;
}

/*
* the txop is confed in units of 32us by the mac80211,
* we need us
*/
ret = wl1271_acx_ac_cfg(wl, wl1271_tx_get_queue(queue),
params->cw_min, params->cw_max,
params->aifs, params->txop << 5);
if (ret < 0)
goto out_sleep;
ret = wl1271_ps_elp_wakeup(wl);
if (ret < 0)
goto out;

ret = wl1271_acx_tid_cfg(wl, wl1271_tx_get_queue(queue),
CONF_CHANNEL_TYPE_EDCF,
wl1271_tx_get_queue(queue),
ps_scheme, CONF_ACK_POLICY_LEGACY,
0, 0);
if (ret < 0)
goto out_sleep;
/*
* the txop is confed in units of 32us by the mac80211,
* we need us
*/
ret = wl1271_acx_ac_cfg(wl, wl1271_tx_get_queue(queue),
params->cw_min, params->cw_max,
params->aifs, params->txop << 5);
if (ret < 0)
goto out_sleep;

ret = wl1271_acx_tid_cfg(wl, wl1271_tx_get_queue(queue),
CONF_CHANNEL_TYPE_EDCF,
wl1271_tx_get_queue(queue),
ps_scheme, CONF_ACK_POLICY_LEGACY,
0, 0);

out_sleep:
wl1271_ps_elp_sleep(wl);
}
wl1271_ps_elp_sleep(wl);

out:
mutex_unlock(&wl->mutex);
Expand Down
3 changes: 0 additions & 3 deletions trunk/drivers/net/wireless/wl12xx/ps.c
Original file line number Diff line number Diff line change
Expand Up @@ -149,9 +149,6 @@ int wl1271_ps_set_mode(struct wl1271 *wl, enum wl1271_cmd_ps_mode mode,
case STATION_ACTIVE_MODE:
default:
wl1271_debug(DEBUG_PSM, "leaving psm");
ret = wl1271_ps_elp_wakeup(wl);
if (ret < 0)
return ret;

/* disable beacon early termination */
ret = wl1271_acx_bet_enable(wl, false);
Expand Down
22 changes: 9 additions & 13 deletions trunk/drivers/net/wireless/wl12xx/tx.c
Original file line number Diff line number Diff line change
Expand Up @@ -511,22 +511,14 @@ static void wl1271_skb_queue_head(struct wl1271 *wl, struct sk_buff *skb)
void wl1271_tx_work_locked(struct wl1271 *wl)
{
struct sk_buff *skb;
bool woken_up = false;
u32 buf_offset = 0;
bool sent_packets = false;
int ret;

if (unlikely(wl->state == WL1271_STATE_OFF))
goto out;
return;

while ((skb = wl1271_skb_dequeue(wl))) {
if (!woken_up) {
ret = wl1271_ps_elp_wakeup(wl);
if (ret < 0)
goto out_ack;
woken_up = true;
}

ret = wl1271_prepare_tx_frame(wl, skb, buf_offset);
if (ret == -EAGAIN) {
/*
Expand Down Expand Up @@ -573,18 +565,22 @@ void wl1271_tx_work_locked(struct wl1271 *wl)

wl1271_handle_tx_low_watermark(wl);
}

out:
if (woken_up)
wl1271_ps_elp_sleep(wl);
}

void wl1271_tx_work(struct work_struct *work)
{
struct wl1271 *wl = container_of(work, struct wl1271, tx_work);
int ret;

mutex_lock(&wl->mutex);
ret = wl1271_ps_elp_wakeup(wl);
if (ret < 0)
goto out;

wl1271_tx_work_locked(wl);

wl1271_ps_elp_wakeup(wl);
out:
mutex_unlock(&wl->mutex);
}

Expand Down

0 comments on commit 50a12fe

Please sign in to comment.