]> git.openfabrics.org - ~emulex/infiniband.git/commitdiff
mac80211: clean up ieee80211_stop_tx_ba_session
authorJohannes Berg <johannes.berg@intel.com>
Thu, 27 May 2010 12:41:07 +0000 (14:41 +0200)
committerJohn W. Linville <linville@tuxdriver.com>
Thu, 3 Jun 2010 18:10:45 +0000 (14:10 -0400)
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>
drivers/net/wireless/iwlwifi/iwl-agn-rs.c
include/net/mac80211.h
net/mac80211/agg-tx.c
net/mac80211/debugfs_sta.c
net/mac80211/driver-trace.h

index cf4a95bae4ffb1369ca5a192919a5caf0445f8cc..40933a5de027e4d0f8850f3f41450cd89bc6a515 100644 (file)
@@ -313,8 +313,7 @@ static int rs_tl_turn_on_agg_for_tid(struct iwl_priv *priv,
                         */
                        IWL_DEBUG_HT(priv, "Fail start Tx agg on tid: %d\n",
                                tid);
-                       ieee80211_stop_tx_ba_session(sta, tid,
-                                               WLAN_BACK_INITIATOR);
+                       ieee80211_stop_tx_ba_session(sta, tid);
                }
        } else
                IWL_ERR(priv, "Fail finding valid aggregation tid: %d\n", tid);
index 74b9b49ddfae7f1f4d564446428def7cca1514ca..2e728611c572cca2d64d192e1b75165aa3f20bc4 100644 (file)
@@ -2345,16 +2345,14 @@ void ieee80211_start_tx_ba_cb_irqsafe(struct ieee80211_vif *vif, const u8 *ra,
  * ieee80211_stop_tx_ba_session - Stop a Block Ack session.
  * @sta: the station whose BA session to stop
  * @tid: the TID to stop BA.
- * @initiator: if indicates initiator DELBA frame will be sent.
  *
- * Return: error if no sta with matching da found, success otherwise
+ * Return: negative error if the TID is invalid, or no aggregation active
  *
  * Although mac80211/low level driver/user space application can estimate
  * the need to stop aggregation on a certain RA/TID, the session level
  * will be managed by the mac80211.
  */
-int ieee80211_stop_tx_ba_session(struct ieee80211_sta *sta, u16 tid,
-                                enum ieee80211_back_parties initiator);
+int ieee80211_stop_tx_ba_session(struct ieee80211_sta *sta, u16 tid);
 
 /**
  * ieee80211_stop_tx_ba_cb - low level driver ready to stop aggregate.
index c163d0a149f49be05b07fa879562f2d821004beb..feb15c4a1fad29a8ac34c92f17abba241b3735d4 100644 (file)
@@ -538,14 +538,13 @@ int __ieee80211_stop_tx_ba_session(struct sta_info *sta, u16 tid,
        return ret;
 }
 
-int ieee80211_stop_tx_ba_session(struct ieee80211_sta *pubsta, u16 tid,
-                                enum ieee80211_back_parties initiator)
+int ieee80211_stop_tx_ba_session(struct ieee80211_sta *pubsta, u16 tid)
 {
        struct sta_info *sta = container_of(pubsta, struct sta_info, sta);
        struct ieee80211_sub_if_data *sdata = sta->sdata;
        struct ieee80211_local *local = sdata->local;
 
-       trace_api_stop_tx_ba_session(pubsta, tid, initiator);
+       trace_api_stop_tx_ba_session(pubsta, tid);
 
        if (!local->ops->ampdu_action)
                return -EINVAL;
@@ -553,7 +552,7 @@ int ieee80211_stop_tx_ba_session(struct ieee80211_sta *pubsta, u16 tid,
        if (tid >= STA_TID_NUM)
                return -EINVAL;
 
-       return __ieee80211_stop_tx_ba_session(sta, tid, initiator);
+       return __ieee80211_stop_tx_ba_session(sta, tid, WLAN_BACK_INITIATOR);
 }
 EXPORT_SYMBOL(ieee80211_stop_tx_ba_session);
 
index e763f1529ddbca6ce54c3af0dd848cd96c643f61..9f140612224a13afae259b3bbd342439ccacccc0 100644 (file)
@@ -210,8 +210,7 @@ static ssize_t sta_agg_status_write(struct file *file, const char __user *userbu
                if (start)
                        ret = ieee80211_start_tx_ba_session(&sta->sta, tid);
                else
-                       ret = ieee80211_stop_tx_ba_session(&sta->sta, tid,
-                                                          WLAN_BACK_RECIPIENT);
+                       ret = ieee80211_stop_tx_ba_session(&sta->sta, tid);
        } else {
                __ieee80211_stop_rx_ba_session(sta, tid, WLAN_BACK_RECIPIENT, 3);
                ret = 0;
index 577460da2ea15faa5aba7f80f9030cdcd81347c6..6b90630151abb4a0dba8b573822b5b41c1035190 100644 (file)
@@ -876,25 +876,23 @@ TRACE_EVENT(api_start_tx_ba_cb,
 );
 
 TRACE_EVENT(api_stop_tx_ba_session,
-       TP_PROTO(struct ieee80211_sta *sta, u16 tid, u16 initiator),
+       TP_PROTO(struct ieee80211_sta *sta, u16 tid),
 
-       TP_ARGS(sta, tid, initiator),
+       TP_ARGS(sta, tid),
 
        TP_STRUCT__entry(
                STA_ENTRY
                __field(u16, tid)
-               __field(u16, initiator)
        ),
 
        TP_fast_assign(
                STA_ASSIGN;
                __entry->tid = tid;
-               __entry->initiator = initiator;
        ),
 
        TP_printk(
-               STA_PR_FMT " tid:%d initiator:%d",
-               STA_PR_ARG, __entry->tid, __entry->initiator
+               STA_PR_FMT " tid:%d",
+               STA_PR_ARG, __entry->tid
        )
 );