diff options
author | Stanislaw Gruszka <sgruszka@redhat.com> | 2011-11-03 05:40:47 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2011-11-09 16:01:01 -0500 |
commit | 4fdbff0770bea059621bc4906fb7c7f5879f3ae1 (patch) | |
tree | 2987e261cbc2b0a0b6c528c8c96d2d9e9700e2fd | |
parent | 0b62ffb53c9732e02ec77ae795f1e03cb2f2d406 (diff) |
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>
-rw-r--r-- | net/mac80211/work.c | 17 |
1 files changed, 3 insertions, 14 deletions
diff --git a/net/mac80211/work.c b/net/mac80211/work.c index 30da4e3f19f7..3dd5a89e99a7 100644 --- a/net/mac80211/work.c +++ b/net/mac80211/work.c | |||
@@ -942,10 +942,9 @@ static void ieee80211_work_work(struct work_struct *work) | |||
942 | } | 942 | } |
943 | 943 | ||
944 | if (!started && !local->tmp_channel) { | 944 | if (!started && !local->tmp_channel) { |
945 | bool on_oper_chan; | 945 | bool on_oper_chan, on_oper_chan2; |
946 | bool tmp_chan_changed = false; | ||
947 | bool on_oper_chan2; | ||
948 | enum nl80211_channel_type wk_ct; | 946 | enum nl80211_channel_type wk_ct; |
947 | |||
949 | on_oper_chan = ieee80211_cfg_on_oper_channel(local); | 948 | on_oper_chan = ieee80211_cfg_on_oper_channel(local); |
950 | 949 | ||
951 | /* Work with existing channel type if possible. */ | 950 | /* Work with existing channel type if possible. */ |
@@ -954,11 +953,6 @@ static void ieee80211_work_work(struct work_struct *work) | |||
954 | wk_ct = ieee80211_calc_ct(wk->chan_type, | 953 | wk_ct = ieee80211_calc_ct(wk->chan_type, |
955 | local->hw.conf.channel_type); | 954 | local->hw.conf.channel_type); |
956 | 955 | ||
957 | if (local->tmp_channel) | ||
958 | if ((local->tmp_channel != wk->chan) || | ||
959 | (local->tmp_channel_type != wk_ct)) | ||
960 | tmp_chan_changed = true; | ||
961 | |||
962 | local->tmp_channel = wk->chan; | 956 | local->tmp_channel = wk->chan; |
963 | local->tmp_channel_type = wk_ct; | 957 | local->tmp_channel_type = wk_ct; |
964 | /* | 958 | /* |
@@ -981,12 +975,7 @@ static void ieee80211_work_work(struct work_struct *work) | |||
981 | true, | 975 | true, |
982 | false); | 976 | false); |
983 | } | 977 | } |
984 | } else if (tmp_chan_changed) | 978 | } |
985 | /* Still off-channel, but on some other | ||
986 | * channel, so update hardware. | ||
987 | * PS should already be off-channel. | ||
988 | */ | ||
989 | ieee80211_hw_config(local, 0); | ||
990 | 979 | ||
991 | started = true; | 980 | started = true; |
992 | wk->timeout = jiffies; | 981 | wk->timeout = jiffies; |