diff options
author | Ron Rindjunsky <ron.rindjunsky@intel.com> | 2007-12-18 17:23:53 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-01-28 14:59:16 -0800 |
commit | 98f0b0a3a412eade153c7cf00c6b863600980d89 (patch) | |
tree | 5404eb10a289c27d79e6808bf0ba4dc69e958b58 /net/mac80211/rx.c | |
parent | d647b36a69bf0a630ebf981bde3c0651e2779e5e (diff) | |
download | kernel_samsung_smdk4412-98f0b0a3a412eade153c7cf00c6b863600980d89.zip kernel_samsung_smdk4412-98f0b0a3a412eade153c7cf00c6b863600980d89.tar.gz kernel_samsung_smdk4412-98f0b0a3a412eade153c7cf00c6b863600980d89.tar.bz2 |
mac80211: pass in PS_POLL frames
This patch fixes should_drop_frame function to pass in ps poll control
frames required for power save functioanlity. Interface types that do not
have interest for PS POLL frames now drop it in handler.
Signed-off-by: Ron Rindjunsky <ron.rindjunsky@intel.com>
Acked-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/mac80211/rx.c')
-rw-r--r-- | net/mac80211/rx.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/net/mac80211/rx.c b/net/mac80211/rx.c index 9cd59ec..e65da57 100644 --- a/net/mac80211/rx.c +++ b/net/mac80211/rx.c @@ -61,8 +61,10 @@ static inline int should_drop_frame(struct ieee80211_rx_status *status, return 1; if (unlikely(skb->len < 16 + present_fcs_len + radiotap_len)) return 1; - if ((hdr->frame_control & cpu_to_le16(IEEE80211_FCTL_FTYPE)) == - cpu_to_le16(IEEE80211_FTYPE_CTL)) + if (((hdr->frame_control & cpu_to_le16(IEEE80211_FCTL_FTYPE)) == + cpu_to_le16(IEEE80211_FTYPE_CTL)) && + ((hdr->frame_control & cpu_to_le16(IEEE80211_FCTL_STYPE)) != + cpu_to_le16(IEEE80211_STYPE_PSPOLL))) return 1; return 0; } @@ -896,6 +898,7 @@ ieee80211_rx_h_defragment(struct ieee80211_txrx_data *rx) static ieee80211_txrx_result ieee80211_rx_h_ps_poll(struct ieee80211_txrx_data *rx) { + struct ieee80211_sub_if_data *sdata = IEEE80211_DEV_TO_SUB_IF(rx->dev); struct sk_buff *skb; int no_pending_pkts; DECLARE_MAC_BUF(mac); @@ -906,6 +909,10 @@ ieee80211_rx_h_ps_poll(struct ieee80211_txrx_data *rx) !(rx->flags & IEEE80211_TXRXD_RXRA_MATCH))) return TXRX_CONTINUE; + if ((sdata->type != IEEE80211_IF_TYPE_AP) && + (sdata->type != IEEE80211_IF_TYPE_VLAN)) + return TXRX_DROP; + skb = skb_dequeue(&rx->sta->tx_filtered); if (!skb) { skb = skb_dequeue(&rx->sta->ps_tx_buf); |