Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 150257
b: refs/heads/master
c: 58905ca
h: refs/heads/master
i:
  150255: df9b95e
v: v3
  • Loading branch information
Johannes Berg authored and John W. Linville committed May 11, 2009
1 parent 6eed009 commit f7ec94c
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 8 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: 02018b39a75057541c7946a9173561d1a76a0bfe
refs/heads/master: 58905ca5b11a0ff3860f55b789cbbf052f7158a7
3 changes: 2 additions & 1 deletion trunk/net/mac80211/iface.c
Original file line number Diff line number Diff line change
Expand Up @@ -964,5 +964,6 @@ void ieee80211_recalc_idle(struct ieee80211_local *local)
mutex_lock(&local->iflist_mtx);
chg = __ieee80211_recalc_idle(local);
mutex_unlock(&local->iflist_mtx);
ieee80211_hw_config(local, chg);
if (chg)
ieee80211_hw_config(local, chg);
}
14 changes: 8 additions & 6 deletions trunk/net/mac80211/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -154,15 +154,17 @@ static void ieee80211_master_set_multicast_list(struct net_device *dev)

int ieee80211_hw_config(struct ieee80211_local *local, u32 changed)
{
struct ieee80211_channel *chan;
struct ieee80211_channel *chan, *scan_chan;
int ret = 0;
int power;
enum nl80211_channel_type channel_type;

might_sleep();

if (local->sw_scanning) {
chan = local->scan_channel;
scan_chan = local->scan_channel;

if (scan_chan) {
chan = scan_chan;
channel_type = NL80211_CHAN_NO_HT;
} else {
chan = local->oper_channel;
Expand All @@ -176,7 +178,7 @@ int ieee80211_hw_config(struct ieee80211_local *local, u32 changed)
changed |= IEEE80211_CONF_CHANGE_CHANNEL;
}

if (local->sw_scanning)
if (scan_chan)
power = chan->max_power;
else
power = local->power_constr_level ?
Expand Down Expand Up @@ -859,8 +861,8 @@ int ieee80211_register_hw(struct ieee80211_hw *hw)
if (!local->oper_channel) {
/* init channel we're on */
local->hw.conf.channel =
local->oper_channel =
local->scan_channel = &sband->channels[0];
local->oper_channel = &sband->channels[0];
local->hw.conf.channel_type = NL80211_CHAN_NO_HT;
}
channels += sband->n_channels;

Expand Down
1 change: 1 addition & 0 deletions trunk/net/mac80211/scan.c
Original file line number Diff line number Diff line change
Expand Up @@ -298,6 +298,7 @@ void ieee80211_scan_completed(struct ieee80211_hw *hw, bool aborted)
was_hw_scan = local->hw_scanning;
local->hw_scanning = false;
local->sw_scanning = false;
local->scan_channel = NULL;

/* we only have to protect scan_req and hw/sw scan */
mutex_unlock(&local->scan_mtx);
Expand Down

0 comments on commit f7ec94c

Please sign in to comment.