]> git.karo-electronics.de Git - mv-sheeva.git/blobdiff - net/mac80211/sta_info.h
Merge git://git.infradead.org/users/dwmw2/libraid-2.6 into for-linus
[mv-sheeva.git] / net / mac80211 / sta_info.h
index 500bafe0a0bb31fdc1f6bb2dd4029804648c3b74..54262e72376d0e662ebbb1b27b02a14e6a869cdb 100644 (file)
@@ -142,8 +142,11 @@ struct tid_ampdu_rx {
  * @work: work struct for starting/stopping aggregation
  * @tid_rx_timer_expired: bitmap indicating on which TIDs the
  *     RX timer expired until the work for it runs
+ * @mtx: mutex to protect all TX data (except non-NULL assignments
+ *     to tid_tx[idx], which are protected by the sta spinlock)
  */
 struct sta_ampdu_mlme {
+       struct mutex mtx;
        /* rx */
        struct tid_ampdu_rx *tid_rx[STA_TID_NUM];
        unsigned long tid_rx_timer_expired[BITS_TO_LONGS(STA_TID_NUM)];
@@ -424,20 +427,20 @@ void for_each_sta_info_type_check(struct ieee80211_local *local,
 {
 }
 
-#define for_each_sta_info(local, _addr, sta, nxt)                      \
+#define for_each_sta_info(local, _addr, _sta, nxt)                     \
        for (   /* initialise loop */                                   \
-               sta = rcu_dereference(local->sta_hash[STA_HASH(_addr)]),\
-               nxt = sta ? rcu_dereference(sta->hnext) : NULL;         \
+               _sta = rcu_dereference(local->sta_hash[STA_HASH(_addr)]),\
+               nxt = _sta ? rcu_dereference(_sta->hnext) : NULL;       \
                /* typecheck */                                         \
-               for_each_sta_info_type_check(local, (_addr), sta, nxt), \
+               for_each_sta_info_type_check(local, (_addr), _sta, nxt),\
                /* continue condition */                                \
-               sta;                                                    \
+               _sta;                                                   \
                /* advance loop */                                      \
-               sta = nxt,                                              \
-               nxt = sta ? rcu_dereference(sta->hnext) : NULL          \
+               _sta = nxt,                                             \
+               nxt = _sta ? rcu_dereference(_sta->hnext) : NULL        \
             )                                                          \
        /* compare address and run code only if it matches */           \
-       if (memcmp(sta->sta.addr, (_addr), ETH_ALEN) == 0)
+       if (memcmp(_sta->sta.addr, (_addr), ETH_ALEN) == 0)
 
 /*
  * Get STA info by index, BROKEN!