aboutsummaryrefslogtreecommitdiffstats
path: root/net/mac80211/tx.c
diff options
context:
space:
mode:
authorJohannes Berg <johannes@sipsolutions.net>2008-02-20 17:59:33 -0500
committerJohn W. Linville <linville@tuxdriver.com>2008-02-29 15:41:32 -0500
commitd46e144b65bf053b25d134ec9f52a38e63e04bb4 (patch)
tree95a3e4ea7660511375f71c54335045a5d1441b1a /net/mac80211/tx.c
parentd97cf01576e1867d26b5c8de360380f815a1b7df (diff)
mac80211: rework TX filtered frame code
This reworks the code for TX filtered frames, splitting it out to a new function to handle those cases, making the clear instruction a flag and renaming a few things to be easier to understand and less Atheros hardware specific. Finally, it also makes the comments explain more. Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'net/mac80211/tx.c')
-rw-r--r--net/mac80211/tx.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/net/mac80211/tx.c b/net/mac80211/tx.c
index 69fdb763aa8b..1cd58e01f1ee 100644
--- a/net/mac80211/tx.c
+++ b/net/mac80211/tx.c
@@ -1020,10 +1020,10 @@ __ieee80211_tx_prepare(struct ieee80211_txrx_data *tx,
1020 } 1020 }
1021 1021
1022 if (!tx->sta) 1022 if (!tx->sta)
1023 control->flags |= IEEE80211_TXCTL_CLEAR_DST_MASK; 1023 control->flags |= IEEE80211_TXCTL_CLEAR_PS_FILT;
1024 else if (tx->sta->clear_dst_mask) { 1024 else if (tx->sta->flags & WLAN_STA_CLEAR_PS_FILT) {
1025 control->flags |= IEEE80211_TXCTL_CLEAR_DST_MASK; 1025 control->flags |= IEEE80211_TXCTL_CLEAR_PS_FILT;
1026 tx->sta->clear_dst_mask = 0; 1026 tx->sta->flags &= ~WLAN_STA_CLEAR_PS_FILT;
1027 } 1027 }
1028 1028
1029 hdrlen = ieee80211_get_hdrlen(tx->fc); 1029 hdrlen = ieee80211_get_hdrlen(tx->fc);
@@ -1084,7 +1084,7 @@ static int __ieee80211_tx(struct ieee80211_local *local, struct sk_buff *skb,
1084 if (tx->u.tx.extra_frag) { 1084 if (tx->u.tx.extra_frag) {
1085 control->flags &= ~(IEEE80211_TXCTL_USE_RTS_CTS | 1085 control->flags &= ~(IEEE80211_TXCTL_USE_RTS_CTS |
1086 IEEE80211_TXCTL_USE_CTS_PROTECT | 1086 IEEE80211_TXCTL_USE_CTS_PROTECT |
1087 IEEE80211_TXCTL_CLEAR_DST_MASK | 1087 IEEE80211_TXCTL_CLEAR_PS_FILT |
1088 IEEE80211_TXCTL_FIRST_FRAGMENT); 1088 IEEE80211_TXCTL_FIRST_FRAGMENT);
1089 for (i = 0; i < tx->u.tx.num_extra_frag; i++) { 1089 for (i = 0; i < tx->u.tx.num_extra_frag; i++) {
1090 if (!tx->u.tx.extra_frag[i]) 1090 if (!tx->u.tx.extra_frag[i])
@@ -1806,7 +1806,7 @@ struct sk_buff *ieee80211_beacon_get(struct ieee80211_hw *hw,
1806 control->antenna_sel_tx = local->hw.conf.antenna_sel_tx; 1806 control->antenna_sel_tx = local->hw.conf.antenna_sel_tx;
1807 control->flags |= IEEE80211_TXCTL_NO_ACK; 1807 control->flags |= IEEE80211_TXCTL_NO_ACK;
1808 control->retry_limit = 1; 1808 control->retry_limit = 1;
1809 control->flags |= IEEE80211_TXCTL_CLEAR_DST_MASK; 1809 control->flags |= IEEE80211_TXCTL_CLEAR_PS_FILT;
1810 } 1810 }
1811 1811
1812 ap->num_beacons++; 1812 ap->num_beacons++;