diff options
author | Johannes Berg <johannes.berg@intel.com> | 2015-09-24 17:13:07 +0300 |
---|---|---|
committer | Johannes Berg <johannes.berg@intel.com> | 2015-09-29 16:56:52 +0300 |
commit | 90d13e8f5b3c2445f481be4a2012a1861337f718 (patch) | |
tree | c534096c93bbe1da1dbde0eb3afb0a09ad65e1f5 /net/mac80211/mlme.c | |
parent | 50f36ae61a5b65ba4612a5d2aa696c8ac5b6c988 (diff) | |
download | linux-90d13e8f5b3c2445f481be4a2012a1861337f718.tar.xz |
mac80211: reduce indentation by inlining a check
Instead of nesting two if statements, inline the second
check into the first if statement and to indentation.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net/mac80211/mlme.c')
-rw-r--r-- | net/mac80211/mlme.c | 44 |
1 files changed, 20 insertions, 24 deletions
diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c index c7d316b440ef..88894d9a25b2 100644 --- a/net/mac80211/mlme.c +++ b/net/mac80211/mlme.c @@ -3437,31 +3437,27 @@ static void ieee80211_rx_mgmt_beacon(struct ieee80211_sub_if_data *sdata, len - baselen, false, &elems, care_about_ies, ncrc); - if (ieee80211_hw_check(&local->hw, PS_NULLFUNC_STACK)) { - bool directed_tim = ieee80211_check_tim(elems.tim, - elems.tim_len, - ifmgd->aid); - if (directed_tim) { - if (local->hw.conf.dynamic_ps_timeout > 0) { - if (local->hw.conf.flags & IEEE80211_CONF_PS) { - local->hw.conf.flags &= ~IEEE80211_CONF_PS; - ieee80211_hw_config(local, - IEEE80211_CONF_CHANGE_PS); - } - ieee80211_send_nullfunc(local, sdata, 0); - } else if (!local->pspolling && sdata->u.mgd.powersave) { - local->pspolling = true; - - /* - * Here is assumed that the driver will be - * able to send ps-poll frame and receive a - * response even though power save mode is - * enabled, but some drivers might require - * to disable power save here. This needs - * to be investigated. - */ - ieee80211_send_pspoll(local, sdata); + if (ieee80211_hw_check(&local->hw, PS_NULLFUNC_STACK) && + ieee80211_check_tim(elems.tim, elems.tim_len, ifmgd->aid)) { + if (local->hw.conf.dynamic_ps_timeout > 0) { + if (local->hw.conf.flags & IEEE80211_CONF_PS) { + local->hw.conf.flags &= ~IEEE80211_CONF_PS; + ieee80211_hw_config(local, + IEEE80211_CONF_CHANGE_PS); } + ieee80211_send_nullfunc(local, sdata, 0); + } else if (!local->pspolling && sdata->u.mgd.powersave) { + local->pspolling = true; + + /* + * Here is assumed that the driver will be + * able to send ps-poll frame and receive a + * response even though power save mode is + * enabled, but some drivers might require + * to disable power save here. This needs + * to be investigated. + */ + ieee80211_send_pspoll(local, sdata); } } |