mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
synced 2025-01-07 22:42:04 +00:00
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>
This commit is contained in:
parent
50f36ae61a
commit
90d13e8f5b
@ -3437,31 +3437,27 @@ static void ieee80211_rx_mgmt_beacon(struct ieee80211_sub_if_data *sdata,
|
|||||||
len - baselen, false, &elems,
|
len - baselen, false, &elems,
|
||||||
care_about_ies, ncrc);
|
care_about_ies, ncrc);
|
||||||
|
|
||||||
if (ieee80211_hw_check(&local->hw, PS_NULLFUNC_STACK)) {
|
if (ieee80211_hw_check(&local->hw, PS_NULLFUNC_STACK) &&
|
||||||
bool directed_tim = ieee80211_check_tim(elems.tim,
|
ieee80211_check_tim(elems.tim, elems.tim_len, ifmgd->aid)) {
|
||||||
elems.tim_len,
|
if (local->hw.conf.dynamic_ps_timeout > 0) {
|
||||||
ifmgd->aid);
|
if (local->hw.conf.flags & IEEE80211_CONF_PS) {
|
||||||
if (directed_tim) {
|
local->hw.conf.flags &= ~IEEE80211_CONF_PS;
|
||||||
if (local->hw.conf.dynamic_ps_timeout > 0) {
|
ieee80211_hw_config(local,
|
||||||
if (local->hw.conf.flags & IEEE80211_CONF_PS) {
|
IEEE80211_CONF_CHANGE_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);
|
|
||||||
}
|
}
|
||||||
|
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);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user