summaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/ath/ath6kl/core.h
diff options
context:
space:
mode:
authorVasanthakumar Thiagarajan <vthiagar@qca.qualcomm.com>2012-05-30 12:27:11 +0530
committerKalle Valo <kvalo@qca.qualcomm.com>2012-06-11 16:13:41 +0300
commit0faf745872f6d00afb318185e8fb181587974b5a (patch)
tree004a1d372b01b330869b99591762674351302b30 /drivers/net/wireless/ath/ath6kl/core.h
parentd154f32ebe3ffe9dea6ed0a91767883b1e7a6bc0 (diff)
downloadlinux-0faf745872f6d00afb318185e8fb181587974b5a.tar.bz2
ath6kl: Fix race in aggregation reorder logic
There are many places where tid data are accessed without the lock (rxtid->lock), this can lead to a race condition when the timeout handler for aggregatin reorder and the receive function are getting executed at the same time. Fix this race, but still there are races which can not be fixed without rewriting the whole aggregation reorder logic, for now fix the obvious ones. Signed-off-by: Vasanthakumar Thiagarajan <vthiagar@qca.qualcomm.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
Diffstat (limited to 'drivers/net/wireless/ath/ath6kl/core.h')
-rw-r--r--drivers/net/wireless/ath/ath6kl/core.h12
1 files changed, 9 insertions, 3 deletions
diff --git a/drivers/net/wireless/ath/ath6kl/core.h b/drivers/net/wireless/ath/ath6kl/core.h
index 17a44fad859b..12441f7d9036 100644
--- a/drivers/net/wireless/ath/ath6kl/core.h
+++ b/drivers/net/wireless/ath/ath6kl/core.h
@@ -273,9 +273,15 @@ struct rxtid {
struct sk_buff_head q;
/*
- * FIXME: No clue what this should protect. Apparently it should
- * protect some of the fields above but they are also accessed
- * without taking the lock.
+ * lock mainly protects seq_next and hold_q. Movement of seq_next
+ * needs to be protected between aggr_timeout() and
+ * aggr_process_recv_frm(). hold_q will be holding the pending
+ * reorder frames and it's access should also be protected.
+ * Some of the other fields like hold_q_sz, win_sz and aggr are
+ * initialized/reset when receiving addba/delba req, also while
+ * deleting aggr state all the pending buffers are flushed before
+ * resetting these fields, so there should not be any race in accessing
+ * these fields.
*/
spinlock_t lock;
};