diff options
author | Kalle Valo <kvalo@qca.qualcomm.com> | 2012-03-07 13:04:00 -0500 |
---|---|---|
committer | Kalle Valo <kvalo@qca.qualcomm.com> | 2012-03-07 13:04:00 -0500 |
commit | 12eb9444a8df7ab4aa5f4c91f8e3049af5d9819b (patch) | |
tree | f41b0ec87bfefbec06da96a6679097f1a53c9f36 | |
parent | 8c9bb054f866cefd54bf7d551bf69a1ab3ff2089 (diff) |
ath6kl: document all spinlocks
Also fixes quite a few checkpatch warnings like this:
ath6kl/hif.h:226: CHECK: spinlock_t definition without comment
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
-rw-r--r-- | drivers/net/wireless/ath/ath6kl/core.h | 21 | ||||
-rw-r--r-- | drivers/net/wireless/ath/ath6kl/hif.h | 1 | ||||
-rw-r--r-- | drivers/net/wireless/ath/ath6kl/htc.h | 7 | ||||
-rw-r--r-- | drivers/net/wireless/ath/ath6kl/sdio.c | 5 | ||||
-rw-r--r-- | drivers/net/wireless/ath/ath6kl/wmi.h | 2 |
5 files changed, 36 insertions, 0 deletions
diff --git a/drivers/net/wireless/ath/ath6kl/core.h b/drivers/net/wireless/ath/ath6kl/core.h index f048924313fa..f1dd8906be45 100644 --- a/drivers/net/wireless/ath/ath6kl/core.h +++ b/drivers/net/wireless/ath/ath6kl/core.h | |||
@@ -233,6 +233,12 @@ struct rxtid { | |||
233 | u32 hold_q_sz; | 233 | u32 hold_q_sz; |
234 | struct skb_hold_q *hold_q; | 234 | struct skb_hold_q *hold_q; |
235 | struct sk_buff_head q; | 235 | struct sk_buff_head q; |
236 | |||
237 | /* | ||
238 | * FIXME: No clue what this should protect. Apparently it should | ||
239 | * protect some of the fields above but they are also accessed | ||
240 | * without taking the lock. | ||
241 | */ | ||
236 | spinlock_t lock; | 242 | spinlock_t lock; |
237 | }; | 243 | }; |
238 | 244 | ||
@@ -311,7 +317,10 @@ struct ath6kl_sta { | |||
311 | u8 auth; | 317 | u8 auth; |
312 | u8 wpa_ie[ATH6KL_MAX_IE]; | 318 | u8 wpa_ie[ATH6KL_MAX_IE]; |
313 | struct sk_buff_head psq; | 319 | struct sk_buff_head psq; |
320 | |||
321 | /* protects psq, mgmt_psq, apsdq, and mgmt_psq_len fields */ | ||
314 | spinlock_t psq_lock; | 322 | spinlock_t psq_lock; |
323 | |||
315 | struct list_head mgmt_psq; | 324 | struct list_head mgmt_psq; |
316 | size_t mgmt_psq_len; | 325 | size_t mgmt_psq_len; |
317 | u8 apsd_info; | 326 | u8 apsd_info; |
@@ -572,7 +581,13 @@ struct ath6kl { | |||
572 | unsigned int vif_max; | 581 | unsigned int vif_max; |
573 | u8 max_norm_iface; | 582 | u8 max_norm_iface; |
574 | u8 avail_idx_map; | 583 | u8 avail_idx_map; |
584 | |||
585 | /* | ||
586 | * Protects at least amsdu_rx_buffer_queue, ath6kl_alloc_cookie() | ||
587 | * calls, tx_pending and total_tx_data_pend. | ||
588 | */ | ||
575 | spinlock_t lock; | 589 | spinlock_t lock; |
590 | |||
576 | struct semaphore sem; | 591 | struct semaphore sem; |
577 | u8 lrssi_roam_threshold; | 592 | u8 lrssi_roam_threshold; |
578 | struct ath6kl_version version; | 593 | struct ath6kl_version version; |
@@ -599,7 +614,13 @@ struct ath6kl { | |||
599 | u8 sta_list_index; | 614 | u8 sta_list_index; |
600 | struct ath6kl_req_key ap_mode_bkey; | 615 | struct ath6kl_req_key ap_mode_bkey; |
601 | struct sk_buff_head mcastpsq; | 616 | struct sk_buff_head mcastpsq; |
617 | |||
618 | /* | ||
619 | * FIXME: protects access to mcastpsq but is actually useless as | ||
620 | * all skbe_queue_*() functions provide serialisation themselves | ||
621 | */ | ||
602 | spinlock_t mcastpsq_lock; | 622 | spinlock_t mcastpsq_lock; |
623 | |||
603 | u8 intra_bss; | 624 | u8 intra_bss; |
604 | struct wmi_ap_mode_stat ap_stats; | 625 | struct wmi_ap_mode_stat ap_stats; |
605 | u8 ap_country_code[3]; | 626 | u8 ap_country_code[3]; |
diff --git a/drivers/net/wireless/ath/ath6kl/hif.h b/drivers/net/wireless/ath/ath6kl/hif.h index 904458ab484b..20ed6b73517b 100644 --- a/drivers/net/wireless/ath/ath6kl/hif.h +++ b/drivers/net/wireless/ath/ath6kl/hif.h | |||
@@ -223,6 +223,7 @@ struct ath6kl_irq_enable_reg { | |||
223 | } __packed; | 223 | } __packed; |
224 | 224 | ||
225 | struct ath6kl_device { | 225 | struct ath6kl_device { |
226 | /* protects irq_proc_reg and irq_en_reg below */ | ||
226 | spinlock_t lock; | 227 | spinlock_t lock; |
227 | struct ath6kl_irq_proc_registers irq_proc_reg; | 228 | struct ath6kl_irq_proc_registers irq_proc_reg; |
228 | struct ath6kl_irq_enable_reg irq_en_reg; | 229 | struct ath6kl_irq_enable_reg irq_en_reg; |
diff --git a/drivers/net/wireless/ath/ath6kl/htc.h b/drivers/net/wireless/ath/ath6kl/htc.h index 2de4d6fc1e32..5027ccc36b62 100644 --- a/drivers/net/wireless/ath/ath6kl/htc.h +++ b/drivers/net/wireless/ath/ath6kl/htc.h | |||
@@ -523,9 +523,16 @@ struct htc_target { | |||
523 | struct ath6kl_htc_credit_info *credit_info; | 523 | struct ath6kl_htc_credit_info *credit_info; |
524 | int tgt_creds; | 524 | int tgt_creds; |
525 | unsigned int tgt_cred_sz; | 525 | unsigned int tgt_cred_sz; |
526 | |||
527 | /* protects free_ctrl_txbuf and free_ctrl_rxbuf */ | ||
526 | spinlock_t htc_lock; | 528 | spinlock_t htc_lock; |
529 | |||
530 | /* FIXME: does this protext rx_bufq and endpoint structures or what? */ | ||
527 | spinlock_t rx_lock; | 531 | spinlock_t rx_lock; |
532 | |||
533 | /* protects endpoint->txq */ | ||
528 | spinlock_t tx_lock; | 534 | spinlock_t tx_lock; |
535 | |||
529 | struct ath6kl_device *dev; | 536 | struct ath6kl_device *dev; |
530 | u32 htc_flags; | 537 | u32 htc_flags; |
531 | u32 rx_st_flags; | 538 | u32 rx_st_flags; |
diff --git a/drivers/net/wireless/ath/ath6kl/sdio.c b/drivers/net/wireless/ath/ath6kl/sdio.c index 5d5f3faa1f04..5a03082ee589 100644 --- a/drivers/net/wireless/ath/ath6kl/sdio.c +++ b/drivers/net/wireless/ath/ath6kl/sdio.c | |||
@@ -32,6 +32,7 @@ | |||
32 | struct ath6kl_sdio { | 32 | struct ath6kl_sdio { |
33 | struct sdio_func *func; | 33 | struct sdio_func *func; |
34 | 34 | ||
35 | /* protects access to bus_req_freeq */ | ||
35 | spinlock_t lock; | 36 | spinlock_t lock; |
36 | 37 | ||
37 | /* free list */ | 38 | /* free list */ |
@@ -53,13 +54,17 @@ struct ath6kl_sdio { | |||
53 | atomic_t irq_handling; | 54 | atomic_t irq_handling; |
54 | wait_queue_head_t irq_wq; | 55 | wait_queue_head_t irq_wq; |
55 | 56 | ||
57 | /* protects access to scat_req */ | ||
56 | spinlock_t scat_lock; | 58 | spinlock_t scat_lock; |
59 | |||
57 | bool scatter_enabled; | 60 | bool scatter_enabled; |
58 | 61 | ||
59 | bool is_disabled; | 62 | bool is_disabled; |
60 | const struct sdio_device_id *id; | 63 | const struct sdio_device_id *id; |
61 | struct work_struct wr_async_work; | 64 | struct work_struct wr_async_work; |
62 | struct list_head wr_asyncq; | 65 | struct list_head wr_asyncq; |
66 | |||
67 | /* protects access to wr_asyncq */ | ||
63 | spinlock_t wr_async_lock; | 68 | spinlock_t wr_async_lock; |
64 | }; | 69 | }; |
65 | 70 | ||
diff --git a/drivers/net/wireless/ath/ath6kl/wmi.h b/drivers/net/wireless/ath/ath6kl/wmi.h index 892a7a0a1378..e0d9145c1cf7 100644 --- a/drivers/net/wireless/ath/ath6kl/wmi.h +++ b/drivers/net/wireless/ath/ath6kl/wmi.h | |||
@@ -111,6 +111,8 @@ struct wmi { | |||
111 | u8 fat_pipe_exist; | 111 | u8 fat_pipe_exist; |
112 | struct ath6kl *parent_dev; | 112 | struct ath6kl *parent_dev; |
113 | u8 pwr_mode; | 113 | u8 pwr_mode; |
114 | |||
115 | /* protects fat_pipe_exist and stream_exist_for_ac */ | ||
114 | spinlock_t lock; | 116 | spinlock_t lock; |
115 | enum htc_endpoint_id ep_id; | 117 | enum htc_endpoint_id ep_id; |
116 | struct sq_threshold_params | 118 | struct sq_threshold_params |