diff options
author | Rami Rosen <ramirose@gmail.com> | 2012-10-25 04:16:23 -0400 |
---|---|---|
committer | Johannes Berg <johannes.berg@intel.com> | 2012-10-25 07:33:26 -0400 |
commit | f87ad637b60a3b789030b3ef969d56a8caec9fed (patch) | |
tree | d9883c4d4331cb003deb420f9e9e72cc7c4d5685 /net | |
parent | eeb126e9ee5d3b14913863fdd7d88fdbf158318f (diff) |
mac80211: remove duplicate check in ieee80211_rx_mgmt_beacon
Remove a duplicate check in ieee80211_rx_mgmt_beacon,
there is no need to make again the same check for the
IEEE80211_HW_PS_NULLFUNC_STACK twice; the two ifs can
be consolidated.
Signed-off-by: Rami Rosen <ramirose@gmail.com>
[reword commit message & break long lines and also
clean up variable]
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net')
-rw-r--r-- | net/mac80211/mlme.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c index 469d86419bc6..2bdf7769506f 100644 --- a/net/mac80211/mlme.c +++ b/net/mac80211/mlme.c | |||
@@ -2433,7 +2433,7 @@ static void ieee80211_rx_mgmt_beacon(struct ieee80211_sub_if_data *sdata, | |||
2433 | struct ieee80211_chanctx_conf *chanctx_conf; | 2433 | struct ieee80211_chanctx_conf *chanctx_conf; |
2434 | struct ieee80211_channel *chan; | 2434 | struct ieee80211_channel *chan; |
2435 | u32 changed = 0; | 2435 | u32 changed = 0; |
2436 | bool erp_valid, directed_tim = false; | 2436 | bool erp_valid; |
2437 | u8 erp_value = 0; | 2437 | u8 erp_value = 0; |
2438 | u32 ncrc; | 2438 | u32 ncrc; |
2439 | u8 *bssid; | 2439 | u8 *bssid; |
@@ -2564,11 +2564,10 @@ static void ieee80211_rx_mgmt_beacon(struct ieee80211_sub_if_data *sdata, | |||
2564 | len - baselen, &elems, | 2564 | len - baselen, &elems, |
2565 | care_about_ies, ncrc); | 2565 | care_about_ies, ncrc); |
2566 | 2566 | ||
2567 | if (local->hw.flags & IEEE80211_HW_PS_NULLFUNC_STACK) | ||
2568 | directed_tim = ieee80211_check_tim(elems.tim, elems.tim_len, | ||
2569 | ifmgd->aid); | ||
2570 | |||
2571 | if (local->hw.flags & IEEE80211_HW_PS_NULLFUNC_STACK) { | 2567 | if (local->hw.flags & IEEE80211_HW_PS_NULLFUNC_STACK) { |
2568 | bool directed_tim = ieee80211_check_tim(elems.tim, | ||
2569 | elems.tim_len, | ||
2570 | ifmgd->aid); | ||
2572 | if (directed_tim) { | 2571 | if (directed_tim) { |
2573 | if (local->hw.conf.dynamic_ps_timeout > 0) { | 2572 | if (local->hw.conf.dynamic_ps_timeout > 0) { |
2574 | if (local->hw.conf.flags & IEEE80211_CONF_PS) { | 2573 | if (local->hw.conf.flags & IEEE80211_CONF_PS) { |