2012-10-25 06:17:05

by Rami Rosen

[permalink] [raw]
Subject: [PATCH] mac80211: remove duplicate check in ieee80211_rx_mgmt_beacon().

This patch removes a duplicate identical check in ieee80211_rx_mgmt_beacon(), mlme.c.
There is no need to make again the same check for IEEE80211_HW_PS_NULLFUNC_STACK
flag. It should be done in the same block.

Signed-off-by: Rami Rosen <[email protected]>
---
net/mac80211/mlme.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c
index 861e1c4..8898708 100644
--- a/net/mac80211/mlme.c
+++ b/net/mac80211/mlme.c
@@ -2564,11 +2564,9 @@ static void ieee80211_rx_mgmt_beacon(struct ieee80211_sub_if_data *sdata,
len - baselen, &elems,
care_about_ies, ncrc);

- if (local->hw.flags & IEEE80211_HW_PS_NULLFUNC_STACK)
+ if (local->hw.flags & IEEE80211_HW_PS_NULLFUNC_STACK) {
directed_tim = ieee80211_check_tim(elems.tim, elems.tim_len,
ifmgd->aid);
-
- if (local->hw.flags & IEEE80211_HW_PS_NULLFUNC_STACK) {
if (directed_tim) {
if (local->hw.conf.dynamic_ps_timeout > 0) {
if (local->hw.conf.flags & IEEE80211_CONF_PS) {
--
1.7.11.4



2012-10-25 11:28:21

by Johannes Berg

[permalink] [raw]
Subject: Re: [PATCH] mac80211: remove duplicate check in ieee80211_rx_mgmt_beacon().

On Thu, 2012-10-25 at 10:16 +0200, Rami Rosen wrote:
> This patch removes a duplicate identical check in ieee80211_rx_mgmt_beacon(), mlme.c.
> There is no need to make again the same check for IEEE80211_HW_PS_NULLFUNC_STACK
> flag. It should be done in the same block.

Applied.

johannes