diff options
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 9cd59ecbcd67..e65da5780cd3 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, | |||
61 | return 1; | 61 | return 1; |
62 | if (unlikely(skb->len < 16 + present_fcs_len + radiotap_len)) | 62 | if (unlikely(skb->len < 16 + present_fcs_len + radiotap_len)) |
63 | return 1; | 63 | return 1; |
64 | if ((hdr->frame_control & cpu_to_le16(IEEE80211_FCTL_FTYPE)) == | 64 | if (((hdr->frame_control & cpu_to_le16(IEEE80211_FCTL_FTYPE)) == |
65 | cpu_to_le16(IEEE80211_FTYPE_CTL)) | 65 | cpu_to_le16(IEEE80211_FTYPE_CTL)) && |
66 | ((hdr->frame_control & cpu_to_le16(IEEE80211_FCTL_STYPE)) != | ||
67 | cpu_to_le16(IEEE80211_STYPE_PSPOLL))) | ||
66 | return 1; | 68 | return 1; |
67 | return 0; | 69 | return 0; |
68 | } | 70 | } |
@@ -896,6 +898,7 @@ ieee80211_rx_h_defragment(struct ieee80211_txrx_data *rx) | |||
896 | static ieee80211_txrx_result | 898 | static ieee80211_txrx_result |
897 | ieee80211_rx_h_ps_poll(struct ieee80211_txrx_data *rx) | 899 | ieee80211_rx_h_ps_poll(struct ieee80211_txrx_data *rx) |
898 | { | 900 | { |
901 | struct ieee80211_sub_if_data *sdata = IEEE80211_DEV_TO_SUB_IF(rx->dev); | ||
899 | struct sk_buff *skb; | 902 | struct sk_buff *skb; |
900 | int no_pending_pkts; | 903 | int no_pending_pkts; |
901 | DECLARE_MAC_BUF(mac); | 904 | DECLARE_MAC_BUF(mac); |
@@ -906,6 +909,10 @@ ieee80211_rx_h_ps_poll(struct ieee80211_txrx_data *rx) | |||
906 | !(rx->flags & IEEE80211_TXRXD_RXRA_MATCH))) | 909 | !(rx->flags & IEEE80211_TXRXD_RXRA_MATCH))) |
907 | return TXRX_CONTINUE; | 910 | return TXRX_CONTINUE; |
908 | 911 | ||
912 | if ((sdata->type != IEEE80211_IF_TYPE_AP) && | ||
913 | (sdata->type != IEEE80211_IF_TYPE_VLAN)) | ||
914 | return TXRX_DROP; | ||
915 | |||
909 | skb = skb_dequeue(&rx->sta->tx_filtered); | 916 | skb = skb_dequeue(&rx->sta->tx_filtered); |
910 | if (!skb) { | 917 | if (!skb) { |
911 | skb = skb_dequeue(&rx->sta->ps_tx_buf); | 918 | skb = skb_dequeue(&rx->sta->ps_tx_buf); |