diff options
author | Johannes Berg <johannes@sipsolutions.net> | 2009-10-30 07:56:02 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2009-10-30 16:50:40 -0400 |
commit | ff9458d3ec179831ebe6966a8aa014ccb3907dc6 (patch) | |
tree | 99bbb4ddd16878dd2948e68b297918dade83a511 /net/mac80211/rx.c | |
parent | 22403def134e2c1017cb04ae9129a38e841b2d8c (diff) |
mac80211: remove sent_ps_buffered
This variable is set once, and tested once.
However, the code path that can set it is
mutually exclusive with the code path that
tests it, so the test is always true. Thus
we also don't need to set it either and can
just remove the variable.
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'net/mac80211/rx.c')
-rw-r--r-- | net/mac80211/rx.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/net/mac80211/rx.c b/net/mac80211/rx.c index 51cb8bc3af81..c06496f0b76d 100644 --- a/net/mac80211/rx.c +++ b/net/mac80211/rx.c | |||
@@ -789,7 +789,7 @@ static void ap_sta_ps_start(struct sta_info *sta) | |||
789 | #endif /* CONFIG_MAC80211_VERBOSE_PS_DEBUG */ | 789 | #endif /* CONFIG_MAC80211_VERBOSE_PS_DEBUG */ |
790 | } | 790 | } |
791 | 791 | ||
792 | static int ap_sta_ps_end(struct sta_info *sta) | 792 | static void ap_sta_ps_end(struct sta_info *sta) |
793 | { | 793 | { |
794 | struct ieee80211_sub_if_data *sdata = sta->sdata; | 794 | struct ieee80211_sub_if_data *sdata = sta->sdata; |
795 | struct ieee80211_local *local = sdata->local; | 795 | struct ieee80211_local *local = sdata->local; |
@@ -819,8 +819,6 @@ static int ap_sta_ps_end(struct sta_info *sta) | |||
819 | "since STA not sleeping anymore\n", sdata->dev->name, | 819 | "since STA not sleeping anymore\n", sdata->dev->name, |
820 | sta->sta.addr, sta->sta.aid, sent - buffered, buffered); | 820 | sta->sta.addr, sta->sta.aid, sent - buffered, buffered); |
821 | #endif /* CONFIG_MAC80211_VERBOSE_PS_DEBUG */ | 821 | #endif /* CONFIG_MAC80211_VERBOSE_PS_DEBUG */ |
822 | |||
823 | return sent; | ||
824 | } | 822 | } |
825 | 823 | ||
826 | static ieee80211_rx_result debug_noinline | 824 | static ieee80211_rx_result debug_noinline |
@@ -879,7 +877,7 @@ ieee80211_rx_h_sta_process(struct ieee80211_rx_data *rx) | |||
879 | */ | 877 | */ |
880 | if (ieee80211_is_data(hdr->frame_control) && | 878 | if (ieee80211_is_data(hdr->frame_control) && |
881 | !ieee80211_has_pm(hdr->frame_control)) | 879 | !ieee80211_has_pm(hdr->frame_control)) |
882 | rx->sent_ps_buffered += ap_sta_ps_end(sta); | 880 | ap_sta_ps_end(sta); |
883 | } else { | 881 | } else { |
884 | if (ieee80211_has_pm(hdr->frame_control)) | 882 | if (ieee80211_has_pm(hdr->frame_control)) |
885 | ap_sta_ps_start(sta); | 883 | ap_sta_ps_start(sta); |
@@ -1147,7 +1145,7 @@ ieee80211_rx_h_ps_poll(struct ieee80211_rx_data *rx) | |||
1147 | if (no_pending_pkts) | 1145 | if (no_pending_pkts) |
1148 | sta_info_clear_tim_bit(rx->sta); | 1146 | sta_info_clear_tim_bit(rx->sta); |
1149 | #ifdef CONFIG_MAC80211_VERBOSE_PS_DEBUG | 1147 | #ifdef CONFIG_MAC80211_VERBOSE_PS_DEBUG |
1150 | } else if (!rx->sent_ps_buffered) { | 1148 | } else { |
1151 | /* | 1149 | /* |
1152 | * FIXME: This can be the result of a race condition between | 1150 | * FIXME: This can be the result of a race condition between |
1153 | * us expiring a frame and the station polling for it. | 1151 | * us expiring a frame and the station polling for it. |