mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-07 07:08:07 +00:00
mac80211: simplify ieee80211_work_work
Since local->tmp_channel is always NULL in one branch, some code paths will newer be taken in that branch, so remove them. Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com> Reviewed-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
This commit is contained in:
parent
0b62ffb53c
commit
4fdbff0770
1 changed files with 3 additions and 14 deletions
|
@ -942,10 +942,9 @@ static void ieee80211_work_work(struct work_struct *work)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!started && !local->tmp_channel) {
|
if (!started && !local->tmp_channel) {
|
||||||
bool on_oper_chan;
|
bool on_oper_chan, on_oper_chan2;
|
||||||
bool tmp_chan_changed = false;
|
|
||||||
bool on_oper_chan2;
|
|
||||||
enum nl80211_channel_type wk_ct;
|
enum nl80211_channel_type wk_ct;
|
||||||
|
|
||||||
on_oper_chan = ieee80211_cfg_on_oper_channel(local);
|
on_oper_chan = ieee80211_cfg_on_oper_channel(local);
|
||||||
|
|
||||||
/* Work with existing channel type if possible. */
|
/* Work with existing channel type if possible. */
|
||||||
|
@ -954,11 +953,6 @@ static void ieee80211_work_work(struct work_struct *work)
|
||||||
wk_ct = ieee80211_calc_ct(wk->chan_type,
|
wk_ct = ieee80211_calc_ct(wk->chan_type,
|
||||||
local->hw.conf.channel_type);
|
local->hw.conf.channel_type);
|
||||||
|
|
||||||
if (local->tmp_channel)
|
|
||||||
if ((local->tmp_channel != wk->chan) ||
|
|
||||||
(local->tmp_channel_type != wk_ct))
|
|
||||||
tmp_chan_changed = true;
|
|
||||||
|
|
||||||
local->tmp_channel = wk->chan;
|
local->tmp_channel = wk->chan;
|
||||||
local->tmp_channel_type = wk_ct;
|
local->tmp_channel_type = wk_ct;
|
||||||
/*
|
/*
|
||||||
|
@ -981,12 +975,7 @@ static void ieee80211_work_work(struct work_struct *work)
|
||||||
true,
|
true,
|
||||||
false);
|
false);
|
||||||
}
|
}
|
||||||
} else if (tmp_chan_changed)
|
}
|
||||||
/* Still off-channel, but on some other
|
|
||||||
* channel, so update hardware.
|
|
||||||
* PS should already be off-channel.
|
|
||||||
*/
|
|
||||||
ieee80211_hw_config(local, 0);
|
|
||||||
|
|
||||||
started = true;
|
started = true;
|
||||||
wk->timeout = jiffies;
|
wk->timeout = jiffies;
|
||||||
|
|
Loading…
Add table
Reference in a new issue