diff mbox

mac80211: Minor optimization in ieee80211_rx_h_data

Message ID 1291115974-4878-1-git-send-email-helmut.schaa@googlemail.com (mailing list archive)
State Not Applicable, archived
Headers show

Commit Message

Helmut Schaa Nov. 30, 2010, 11:19 a.m. UTC
None
diff mbox

Patch

diff --git a/net/mac80211/rx.c b/net/mac80211/rx.c
index 9dd60a7..9e44fbf 100644
--- a/net/mac80211/rx.c
+++ b/net/mac80211/rx.c
@@ -1871,9 +1871,8 @@  ieee80211_rx_h_data(struct ieee80211_rx_data *rx)
 	dev->stats.rx_packets++;
 	dev->stats.rx_bytes += rx->skb->len;
 
-	if (ieee80211_is_data(hdr->frame_control) &&
-	    !is_multicast_ether_addr(hdr->addr1) &&
-	    local->hw.conf.dynamic_ps_timeout > 0 && local->ps_sdata) {
+	if (local->ps_sdata && local->hw.conf.dynamic_ps_timeout > 0 && 
+	    !is_multicast_ether_addr(((struct ethhdr *)rx->skb->data)->h_dest)) {
 			mod_timer(&local->dynamic_ps_timer, jiffies +
 			 msecs_to_jiffies(local->hw.conf.dynamic_ps_timeout));
 	}