diff options
author | Johannes Berg <johannes.berg@intel.com> | 2010-05-27 08:41:07 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2010-06-03 14:10:45 -0400 |
commit | 6a8579d0e62c0eac428184ce45e86bc46677724a (patch) | |
tree | 192d3adc84985598ad6006df43d246adce002f7e /net/mac80211 | |
parent | 2b2c009ecf71f4c66ff8420b63dddbc9737e04e3 (diff) |
mac80211: clean up ieee80211_stop_tx_ba_session
There's no sense in letting anything but internal
mac80211 functions set the initiator to anything
but WLAN_BACK_INITIATOR, since WLAN_BACK_RECIPIENT
is only valid when we have received a frame from
the peer, which we react to directly in mac80211.
The debugfs code I recently added got this wrong
as well.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'net/mac80211')
-rw-r--r-- | net/mac80211/agg-tx.c | 7 | ||||
-rw-r--r-- | net/mac80211/debugfs_sta.c | 3 | ||||
-rw-r--r-- | net/mac80211/driver-trace.h | 10 |
3 files changed, 8 insertions, 12 deletions
diff --git a/net/mac80211/agg-tx.c b/net/mac80211/agg-tx.c index c163d0a149f4..feb15c4a1fad 100644 --- a/net/mac80211/agg-tx.c +++ b/net/mac80211/agg-tx.c | |||
@@ -538,14 +538,13 @@ int __ieee80211_stop_tx_ba_session(struct sta_info *sta, u16 tid, | |||
538 | return ret; | 538 | return ret; |
539 | } | 539 | } |
540 | 540 | ||
541 | int ieee80211_stop_tx_ba_session(struct ieee80211_sta *pubsta, u16 tid, | 541 | int ieee80211_stop_tx_ba_session(struct ieee80211_sta *pubsta, u16 tid) |
542 | enum ieee80211_back_parties initiator) | ||
543 | { | 542 | { |
544 | struct sta_info *sta = container_of(pubsta, struct sta_info, sta); | 543 | struct sta_info *sta = container_of(pubsta, struct sta_info, sta); |
545 | struct ieee80211_sub_if_data *sdata = sta->sdata; | 544 | struct ieee80211_sub_if_data *sdata = sta->sdata; |
546 | struct ieee80211_local *local = sdata->local; | 545 | struct ieee80211_local *local = sdata->local; |
547 | 546 | ||
548 | trace_api_stop_tx_ba_session(pubsta, tid, initiator); | 547 | trace_api_stop_tx_ba_session(pubsta, tid); |
549 | 548 | ||
550 | if (!local->ops->ampdu_action) | 549 | if (!local->ops->ampdu_action) |
551 | return -EINVAL; | 550 | return -EINVAL; |
@@ -553,7 +552,7 @@ int ieee80211_stop_tx_ba_session(struct ieee80211_sta *pubsta, u16 tid, | |||
553 | if (tid >= STA_TID_NUM) | 552 | if (tid >= STA_TID_NUM) |
554 | return -EINVAL; | 553 | return -EINVAL; |
555 | 554 | ||
556 | return __ieee80211_stop_tx_ba_session(sta, tid, initiator); | 555 | return __ieee80211_stop_tx_ba_session(sta, tid, WLAN_BACK_INITIATOR); |
557 | } | 556 | } |
558 | EXPORT_SYMBOL(ieee80211_stop_tx_ba_session); | 557 | EXPORT_SYMBOL(ieee80211_stop_tx_ba_session); |
559 | 558 | ||
diff --git a/net/mac80211/debugfs_sta.c b/net/mac80211/debugfs_sta.c index e763f1529ddb..9f140612224a 100644 --- a/net/mac80211/debugfs_sta.c +++ b/net/mac80211/debugfs_sta.c | |||
@@ -210,8 +210,7 @@ static ssize_t sta_agg_status_write(struct file *file, const char __user *userbu | |||
210 | if (start) | 210 | if (start) |
211 | ret = ieee80211_start_tx_ba_session(&sta->sta, tid); | 211 | ret = ieee80211_start_tx_ba_session(&sta->sta, tid); |
212 | else | 212 | else |
213 | ret = ieee80211_stop_tx_ba_session(&sta->sta, tid, | 213 | ret = ieee80211_stop_tx_ba_session(&sta->sta, tid); |
214 | WLAN_BACK_RECIPIENT); | ||
215 | } else { | 214 | } else { |
216 | __ieee80211_stop_rx_ba_session(sta, tid, WLAN_BACK_RECIPIENT, 3); | 215 | __ieee80211_stop_rx_ba_session(sta, tid, WLAN_BACK_RECIPIENT, 3); |
217 | ret = 0; | 216 | ret = 0; |
diff --git a/net/mac80211/driver-trace.h b/net/mac80211/driver-trace.h index 577460da2ea1..6b90630151ab 100644 --- a/net/mac80211/driver-trace.h +++ b/net/mac80211/driver-trace.h | |||
@@ -876,25 +876,23 @@ TRACE_EVENT(api_start_tx_ba_cb, | |||
876 | ); | 876 | ); |
877 | 877 | ||
878 | TRACE_EVENT(api_stop_tx_ba_session, | 878 | TRACE_EVENT(api_stop_tx_ba_session, |
879 | TP_PROTO(struct ieee80211_sta *sta, u16 tid, u16 initiator), | 879 | TP_PROTO(struct ieee80211_sta *sta, u16 tid), |
880 | 880 | ||
881 | TP_ARGS(sta, tid, initiator), | 881 | TP_ARGS(sta, tid), |
882 | 882 | ||
883 | TP_STRUCT__entry( | 883 | TP_STRUCT__entry( |
884 | STA_ENTRY | 884 | STA_ENTRY |
885 | __field(u16, tid) | 885 | __field(u16, tid) |
886 | __field(u16, initiator) | ||
887 | ), | 886 | ), |
888 | 887 | ||
889 | TP_fast_assign( | 888 | TP_fast_assign( |
890 | STA_ASSIGN; | 889 | STA_ASSIGN; |
891 | __entry->tid = tid; | 890 | __entry->tid = tid; |
892 | __entry->initiator = initiator; | ||
893 | ), | 891 | ), |
894 | 892 | ||
895 | TP_printk( | 893 | TP_printk( |
896 | STA_PR_FMT " tid:%d initiator:%d", | 894 | STA_PR_FMT " tid:%d", |
897 | STA_PR_ARG, __entry->tid, __entry->initiator | 895 | STA_PR_ARG, __entry->tid |
898 | ) | 896 | ) |
899 | ); | 897 | ); |
900 | 898 | ||