Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 314045
b: refs/heads/master
c: 196ac1c
h: refs/heads/master
i:
  314043: 01b7b43
v: v3
  • Loading branch information
Johannes Berg authored and John W. Linville committed Jun 6, 2012
1 parent 3018498 commit 26d98dc
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 26 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: 491b26b40222cc769c163e77177697dd7a63c316
refs/heads/master: 196ac1c13d4db6c276dbb1c9190c8d7d45a83f1f
8 changes: 7 additions & 1 deletion trunk/include/net/mac80211.h
Original file line number Diff line number Diff line change
Expand Up @@ -2183,7 +2183,13 @@ enum ieee80211_rate_control_changed {
* offload. Frames to transmit on the off-channel channel are transmitted
* normally except for the %IEEE80211_TX_CTL_TX_OFFCHAN flag. When the
* duration (which will always be non-zero) expires, the driver must call
* ieee80211_remain_on_channel_expired(). This callback may sleep.
* ieee80211_remain_on_channel_expired().
* The driver must not call ieee80211_remain_on_channel_expired() before
* the TX status for a frame that was sent off-channel, otherwise the TX
* status is reported to userspace in an invalid way.
* Note that this callback may be called while the device is in IDLE and
* must be accepted in this case.
* This callback may sleep.
* @cancel_remain_on_channel: Requests that an ongoing off-channel period is
* aborted before it expires. This callback may sleep.
*
Expand Down
7 changes: 3 additions & 4 deletions trunk/net/mac80211/cfg.c
Original file line number Diff line number Diff line change
Expand Up @@ -2187,8 +2187,6 @@ static int ieee80211_cancel_remain_on_channel_hw(struct ieee80211_local *local,
local->hw_roc_cookie = 0;
local->hw_roc_channel = NULL;

ieee80211_recalc_idle(local);

return 0;
}

Expand Down Expand Up @@ -2248,7 +2246,7 @@ static int ieee80211_mgmt_tx(struct wiphy *wiphy, struct net_device *dev,
struct ieee80211_work *wk;
const struct ieee80211_mgmt *mgmt = (void *)buf;
u32 flags;
bool is_offchan = false;
bool is_offchan = false, in_hw_roc = false;

if (dont_wait_for_ack)
flags = IEEE80211_TX_CTL_NO_ACK;
Expand All @@ -2268,6 +2266,7 @@ static int ieee80211_mgmt_tx(struct wiphy *wiphy, struct net_device *dev,
if (chan == local->hw_roc_channel) {
/* TODO: check channel type? */
is_offchan = false;
in_hw_roc = true;
flags |= IEEE80211_TX_CTL_TX_OFFCHAN;
}

Expand Down Expand Up @@ -2370,7 +2369,7 @@ static int ieee80211_mgmt_tx(struct wiphy *wiphy, struct net_device *dev,
* wait is involved, we might otherwise not be on
* the right channel for long enough!
*/
if (!is_offchan && !wait && !sdata->vif.bss_conf.idle) {
if (!is_offchan && !wait && (in_hw_roc || !sdata->vif.bss_conf.idle)) {
ieee80211_tx_skb(sdata, skb);
return 0;
}
Expand Down
17 changes: 7 additions & 10 deletions trunk/net/mac80211/iface.c
Original file line number Diff line number Diff line change
Expand Up @@ -1456,7 +1456,7 @@ u32 __ieee80211_recalc_idle(struct ieee80211_local *local)
{
struct ieee80211_sub_if_data *sdata;
int count = 0;
bool working = false, scanning = false, hw_roc = false;
bool working = false, scanning = false;
struct ieee80211_work *wk;
unsigned int led_trig_start = 0, led_trig_stop = 0;

Expand Down Expand Up @@ -1493,9 +1493,11 @@ u32 __ieee80211_recalc_idle(struct ieee80211_local *local)
count++;
}

list_for_each_entry(wk, &local->work_list, list) {
working = true;
wk->sdata->vif.bss_conf.idle = false;
if (!local->ops->remain_on_channel) {
list_for_each_entry(wk, &local->work_list, list) {
working = true;
wk->sdata->vif.bss_conf.idle = false;
}
}

if (local->scan_sdata &&
Expand All @@ -1504,9 +1506,6 @@ u32 __ieee80211_recalc_idle(struct ieee80211_local *local)
local->scan_sdata->vif.bss_conf.idle = false;
}

if (local->hw_roc_channel)
hw_roc = true;

list_for_each_entry(sdata, &local->interfaces, list) {
if (sdata->vif.type == NL80211_IFTYPE_MONITOR ||
sdata->vif.type == NL80211_IFTYPE_AP_VLAN)
Expand All @@ -1518,7 +1517,7 @@ u32 __ieee80211_recalc_idle(struct ieee80211_local *local)
ieee80211_bss_info_change_notify(sdata, BSS_CHANGED_IDLE);
}

if (working || scanning || hw_roc)
if (working || scanning)
led_trig_start |= IEEE80211_TPT_LEDTRIG_FL_WORK;
else
led_trig_stop |= IEEE80211_TPT_LEDTRIG_FL_WORK;
Expand All @@ -1530,8 +1529,6 @@ u32 __ieee80211_recalc_idle(struct ieee80211_local *local)

ieee80211_mod_tpt_led_trig(local, led_trig_start, led_trig_stop);

if (hw_roc)
return ieee80211_idle_off(local, "hw remain-on-channel");
if (working)
return ieee80211_idle_off(local, "working");
if (scanning)
Expand Down
6 changes: 0 additions & 6 deletions trunk/net/mac80211/mlme.c
Original file line number Diff line number Diff line change
Expand Up @@ -930,11 +930,6 @@ void ieee80211_recalc_ps(struct ieee80211_local *local, s32 latency)
return;
}

if (!list_empty(&local->work_list)) {
local->ps_sdata = NULL;
goto change;
}

list_for_each_entry(sdata, &local->interfaces, list) {
if (!ieee80211_sdata_running(sdata))
continue;
Expand Down Expand Up @@ -1007,7 +1002,6 @@ void ieee80211_recalc_ps(struct ieee80211_local *local, s32 latency)
local->ps_sdata = NULL;
}

change:
ieee80211_change_ps(local);
}

Expand Down
4 changes: 0 additions & 4 deletions trunk/net/mac80211/offchannel.c
Original file line number Diff line number Diff line change
Expand Up @@ -207,8 +207,6 @@ static void ieee80211_hw_roc_start(struct work_struct *work)
GFP_KERNEL);
}

ieee80211_recalc_idle(local);

mutex_unlock(&local->mtx);
}

Expand Down Expand Up @@ -260,8 +258,6 @@ static void ieee80211_hw_roc_done(struct work_struct *work)
local->hw_roc_channel = NULL;
local->hw_roc_cookie = 0;

ieee80211_recalc_idle(local);

mutex_unlock(&local->mtx);
}

Expand Down

0 comments on commit 26d98dc

Please sign in to comment.