aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2011-05-10 14:52:22 -0400
committerJohn W. Linville <linville@tuxdriver.com>2011-05-11 14:50:40 -0400
commitf59a59fea3be78c2bda23cb7f55225b33c502c3c (patch)
tree32dda7d1b23412d203f8a48f219dae68a5c7d233 /drivers/net/wireless
parent858a16529cb4c6434d863740283e0dfeb93cd599 (diff)
ath9k: fix a regression in PS frame filter handling
Only leave filtering enabled for AP or VLAN interfaces, clear the destination mask for all other interfaces. Signed-off-by: Felix Fietkau <nbd@openwrt.org> Reported-by: Ben Greear <greearb@candelatech.com> Tested-by: Ben Greear <greearb@candelatech.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless')
-rw-r--r--drivers/net/wireless/ath/ath9k/main.c5
-rw-r--r--drivers/net/wireless/ath/ath9k/xmit.c6
2 files changed, 11 insertions, 0 deletions
diff --git a/drivers/net/wireless/ath/ath9k/main.c b/drivers/net/wireless/ath/ath9k/main.c
index 9dd72d8c78ec..33816091b439 100644
--- a/drivers/net/wireless/ath/ath9k/main.c
+++ b/drivers/net/wireless/ath/ath9k/main.c
@@ -1782,6 +1782,11 @@ static int ath9k_sta_add(struct ieee80211_hw *hw,
1782 struct ieee80211_key_conf ps_key = { }; 1782 struct ieee80211_key_conf ps_key = { };
1783 1783
1784 ath_node_attach(sc, sta); 1784 ath_node_attach(sc, sta);
1785
1786 if (vif->type != NL80211_IFTYPE_AP &&
1787 vif->type != NL80211_IFTYPE_AP_VLAN)
1788 return 0;
1789
1785 an->ps_key = ath_key_config(common, vif, sta, &ps_key); 1790 an->ps_key = ath_key_config(common, vif, sta, &ps_key);
1786 1791
1787 return 0; 1792 return 0;
diff --git a/drivers/net/wireless/ath/ath9k/xmit.c b/drivers/net/wireless/ath/ath9k/xmit.c
index 947d5b3b6e05..41469d7a2cda 100644
--- a/drivers/net/wireless/ath/ath9k/xmit.c
+++ b/drivers/net/wireless/ath/ath9k/xmit.c
@@ -1845,6 +1845,7 @@ int ath_tx_start(struct ieee80211_hw *hw, struct sk_buff *skb,
1845 struct ieee80211_hdr *hdr = (struct ieee80211_hdr *) skb->data; 1845 struct ieee80211_hdr *hdr = (struct ieee80211_hdr *) skb->data;
1846 struct ieee80211_tx_info *info = IEEE80211_SKB_CB(skb); 1846 struct ieee80211_tx_info *info = IEEE80211_SKB_CB(skb);
1847 struct ieee80211_sta *sta = info->control.sta; 1847 struct ieee80211_sta *sta = info->control.sta;
1848 struct ieee80211_vif *vif = info->control.vif;
1848 struct ath_softc *sc = hw->priv; 1849 struct ath_softc *sc = hw->priv;
1849 struct ath_txq *txq = txctl->txq; 1850 struct ath_txq *txq = txctl->txq;
1850 struct ath_buf *bf; 1851 struct ath_buf *bf;
@@ -1882,6 +1883,11 @@ int ath_tx_start(struct ieee80211_hw *hw, struct sk_buff *skb,
1882 memmove(skb->data, skb->data + padsize, padpos); 1883 memmove(skb->data, skb->data + padsize, padpos);
1883 } 1884 }
1884 1885
1886 if ((vif && vif->type != NL80211_IFTYPE_AP &&
1887 vif->type != NL80211_IFTYPE_AP_VLAN) ||
1888 !ieee80211_is_data(hdr->frame_control))
1889 info->flags |= IEEE80211_TX_CTL_CLEAR_PS_FILT;
1890
1885 setup_frame_info(hw, skb, frmlen); 1891 setup_frame_info(hw, skb, frmlen);
1886 1892
1887 /* 1893 /*