diff options
author | Michal Kazior <michal.kazior@tieto.com> | 2013-08-27 07:08:03 -0400 |
---|---|---|
committer | Kalle Valo <kvalo@qca.qualcomm.com> | 2013-09-01 02:28:47 -0400 |
commit | d21fb959d140484beb755854e7bae2f2b3cd44cb (patch) | |
tree | 3c5c175815f9949303ad28abc18390f9d1fc3fe5 | |
parent | 2aa39115737be4e57d80a404490d79bd1981777f (diff) |
ath10k: rename ce_ring_state to ath10k_ce_ring
The new naming makes more sense.
Signed-off-by: Michal Kazior <michal.kazior@tieto.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
-rw-r--r-- | drivers/net/wireless/ath/ath10k/ce.c | 30 | ||||
-rw-r--r-- | drivers/net/wireless/ath/ath10k/ce.h | 7 |
2 files changed, 18 insertions, 19 deletions
diff --git a/drivers/net/wireless/ath/ath10k/ce.c b/drivers/net/wireless/ath/ath10k/ce.c index 15679d93ff8f..dd80c24582f3 100644 --- a/drivers/net/wireless/ath/ath10k/ce.c +++ b/drivers/net/wireless/ath/ath10k/ce.c | |||
@@ -264,7 +264,7 @@ static int ath10k_ce_send_nolock(struct ath10k_ce_pipe *ce_state, | |||
264 | unsigned int flags) | 264 | unsigned int flags) |
265 | { | 265 | { |
266 | struct ath10k *ar = ce_state->ar; | 266 | struct ath10k *ar = ce_state->ar; |
267 | struct ce_ring_state *src_ring = ce_state->src_ring; | 267 | struct ath10k_ce_ring *src_ring = ce_state->src_ring; |
268 | struct ce_desc *desc, *sdesc; | 268 | struct ce_desc *desc, *sdesc; |
269 | unsigned int nentries_mask = src_ring->nentries_mask; | 269 | unsigned int nentries_mask = src_ring->nentries_mask; |
270 | unsigned int sw_index = src_ring->sw_index; | 270 | unsigned int sw_index = src_ring->sw_index; |
@@ -354,7 +354,7 @@ int ath10k_ce_sendlist_send(struct ath10k_ce_pipe *ce_state, | |||
354 | struct ce_sendlist *sendlist, | 354 | struct ce_sendlist *sendlist, |
355 | unsigned int transfer_id) | 355 | unsigned int transfer_id) |
356 | { | 356 | { |
357 | struct ce_ring_state *src_ring = ce_state->src_ring; | 357 | struct ath10k_ce_ring *src_ring = ce_state->src_ring; |
358 | struct ce_sendlist_item *item; | 358 | struct ce_sendlist_item *item; |
359 | struct ath10k *ar = ce_state->ar; | 359 | struct ath10k *ar = ce_state->ar; |
360 | struct ath10k_pci *ar_pci = ath10k_pci_priv(ar); | 360 | struct ath10k_pci *ar_pci = ath10k_pci_priv(ar); |
@@ -406,7 +406,7 @@ int ath10k_ce_recv_buf_enqueue(struct ath10k_ce_pipe *ce_state, | |||
406 | void *per_recv_context, | 406 | void *per_recv_context, |
407 | u32 buffer) | 407 | u32 buffer) |
408 | { | 408 | { |
409 | struct ce_ring_state *dest_ring = ce_state->dest_ring; | 409 | struct ath10k_ce_ring *dest_ring = ce_state->dest_ring; |
410 | u32 ctrl_addr = ce_state->ctrl_addr; | 410 | u32 ctrl_addr = ce_state->ctrl_addr; |
411 | struct ath10k *ar = ce_state->ar; | 411 | struct ath10k *ar = ce_state->ar; |
412 | struct ath10k_pci *ar_pci = ath10k_pci_priv(ar); | 412 | struct ath10k_pci *ar_pci = ath10k_pci_priv(ar); |
@@ -457,7 +457,7 @@ static int ath10k_ce_completed_recv_next_nolock(struct ath10k_ce_pipe *ce_state, | |||
457 | unsigned int *transfer_idp, | 457 | unsigned int *transfer_idp, |
458 | unsigned int *flagsp) | 458 | unsigned int *flagsp) |
459 | { | 459 | { |
460 | struct ce_ring_state *dest_ring = ce_state->dest_ring; | 460 | struct ath10k_ce_ring *dest_ring = ce_state->dest_ring; |
461 | unsigned int nentries_mask = dest_ring->nentries_mask; | 461 | unsigned int nentries_mask = dest_ring->nentries_mask; |
462 | unsigned int sw_index = dest_ring->sw_index; | 462 | unsigned int sw_index = dest_ring->sw_index; |
463 | 463 | ||
@@ -531,7 +531,7 @@ int ath10k_ce_revoke_recv_next(struct ath10k_ce_pipe *ce_state, | |||
531 | void **per_transfer_contextp, | 531 | void **per_transfer_contextp, |
532 | u32 *bufferp) | 532 | u32 *bufferp) |
533 | { | 533 | { |
534 | struct ce_ring_state *dest_ring; | 534 | struct ath10k_ce_ring *dest_ring; |
535 | unsigned int nentries_mask; | 535 | unsigned int nentries_mask; |
536 | unsigned int sw_index; | 536 | unsigned int sw_index; |
537 | unsigned int write_index; | 537 | unsigned int write_index; |
@@ -589,7 +589,7 @@ static int ath10k_ce_completed_send_next_nolock(struct ath10k_ce_pipe *ce_state, | |||
589 | unsigned int *nbytesp, | 589 | unsigned int *nbytesp, |
590 | unsigned int *transfer_idp) | 590 | unsigned int *transfer_idp) |
591 | { | 591 | { |
592 | struct ce_ring_state *src_ring = ce_state->src_ring; | 592 | struct ath10k_ce_ring *src_ring = ce_state->src_ring; |
593 | u32 ctrl_addr = ce_state->ctrl_addr; | 593 | u32 ctrl_addr = ce_state->ctrl_addr; |
594 | struct ath10k *ar = ce_state->ar; | 594 | struct ath10k *ar = ce_state->ar; |
595 | unsigned int nentries_mask = src_ring->nentries_mask; | 595 | unsigned int nentries_mask = src_ring->nentries_mask; |
@@ -646,7 +646,7 @@ int ath10k_ce_cancel_send_next(struct ath10k_ce_pipe *ce_state, | |||
646 | unsigned int *nbytesp, | 646 | unsigned int *nbytesp, |
647 | unsigned int *transfer_idp) | 647 | unsigned int *transfer_idp) |
648 | { | 648 | { |
649 | struct ce_ring_state *src_ring; | 649 | struct ath10k_ce_ring *src_ring; |
650 | unsigned int nentries_mask; | 650 | unsigned int nentries_mask; |
651 | unsigned int sw_index; | 651 | unsigned int sw_index; |
652 | unsigned int write_index; | 652 | unsigned int write_index; |
@@ -894,7 +894,7 @@ static int ath10k_ce_init_src_ring(struct ath10k *ar, | |||
894 | const struct ce_attr *attr) | 894 | const struct ce_attr *attr) |
895 | { | 895 | { |
896 | struct ath10k_pci *ar_pci = ath10k_pci_priv(ar); | 896 | struct ath10k_pci *ar_pci = ath10k_pci_priv(ar); |
897 | struct ce_ring_state *src_ring; | 897 | struct ath10k_ce_ring *src_ring; |
898 | unsigned int nentries = attr->src_nentries; | 898 | unsigned int nentries = attr->src_nentries; |
899 | unsigned int ce_nbytes; | 899 | unsigned int ce_nbytes; |
900 | u32 ctrl_addr = ath10k_ce_base_address(ce_id); | 900 | u32 ctrl_addr = ath10k_ce_base_address(ce_id); |
@@ -908,15 +908,15 @@ static int ath10k_ce_init_src_ring(struct ath10k *ar, | |||
908 | return 0; | 908 | return 0; |
909 | } | 909 | } |
910 | 910 | ||
911 | ce_nbytes = sizeof(struct ce_ring_state) + (nentries * sizeof(void *)); | 911 | ce_nbytes = sizeof(struct ath10k_ce_ring) + (nentries * sizeof(void *)); |
912 | ptr = kzalloc(ce_nbytes, GFP_KERNEL); | 912 | ptr = kzalloc(ce_nbytes, GFP_KERNEL); |
913 | if (ptr == NULL) | 913 | if (ptr == NULL) |
914 | return -ENOMEM; | 914 | return -ENOMEM; |
915 | 915 | ||
916 | ce_state->src_ring = (struct ce_ring_state *)ptr; | 916 | ce_state->src_ring = (struct ath10k_ce_ring *)ptr; |
917 | src_ring = ce_state->src_ring; | 917 | src_ring = ce_state->src_ring; |
918 | 918 | ||
919 | ptr += sizeof(struct ce_ring_state); | 919 | ptr += sizeof(struct ath10k_ce_ring); |
920 | src_ring->nentries = nentries; | 920 | src_ring->nentries = nentries; |
921 | src_ring->nentries_mask = nentries - 1; | 921 | src_ring->nentries_mask = nentries - 1; |
922 | 922 | ||
@@ -997,7 +997,7 @@ static int ath10k_ce_init_dest_ring(struct ath10k *ar, | |||
997 | const struct ce_attr *attr) | 997 | const struct ce_attr *attr) |
998 | { | 998 | { |
999 | struct ath10k_pci *ar_pci = ath10k_pci_priv(ar); | 999 | struct ath10k_pci *ar_pci = ath10k_pci_priv(ar); |
1000 | struct ce_ring_state *dest_ring; | 1000 | struct ath10k_ce_ring *dest_ring; |
1001 | unsigned int nentries = attr->dest_nentries; | 1001 | unsigned int nentries = attr->dest_nentries; |
1002 | unsigned int ce_nbytes; | 1002 | unsigned int ce_nbytes; |
1003 | u32 ctrl_addr = ath10k_ce_base_address(ce_id); | 1003 | u32 ctrl_addr = ath10k_ce_base_address(ce_id); |
@@ -1011,15 +1011,15 @@ static int ath10k_ce_init_dest_ring(struct ath10k *ar, | |||
1011 | return 0; | 1011 | return 0; |
1012 | } | 1012 | } |
1013 | 1013 | ||
1014 | ce_nbytes = sizeof(struct ce_ring_state) + (nentries * sizeof(void *)); | 1014 | ce_nbytes = sizeof(struct ath10k_ce_ring) + (nentries * sizeof(void *)); |
1015 | ptr = kzalloc(ce_nbytes, GFP_KERNEL); | 1015 | ptr = kzalloc(ce_nbytes, GFP_KERNEL); |
1016 | if (ptr == NULL) | 1016 | if (ptr == NULL) |
1017 | return -ENOMEM; | 1017 | return -ENOMEM; |
1018 | 1018 | ||
1019 | ce_state->dest_ring = (struct ce_ring_state *)ptr; | 1019 | ce_state->dest_ring = (struct ath10k_ce_ring *)ptr; |
1020 | dest_ring = ce_state->dest_ring; | 1020 | dest_ring = ce_state->dest_ring; |
1021 | 1021 | ||
1022 | ptr += sizeof(struct ce_ring_state); | 1022 | ptr += sizeof(struct ath10k_ce_ring); |
1023 | dest_ring->nentries = nentries; | 1023 | dest_ring->nentries = nentries; |
1024 | dest_ring->nentries_mask = nentries - 1; | 1024 | dest_ring->nentries_mask = nentries - 1; |
1025 | 1025 | ||
diff --git a/drivers/net/wireless/ath/ath10k/ce.h b/drivers/net/wireless/ath/ath10k/ce.h index ac850c0b711a..cfef7d0fc5c4 100644 --- a/drivers/net/wireless/ath/ath10k/ce.h +++ b/drivers/net/wireless/ath/ath10k/ce.h | |||
@@ -50,8 +50,7 @@ struct ce_desc { | |||
50 | __le16 flags; /* %CE_DESC_FLAGS_ */ | 50 | __le16 flags; /* %CE_DESC_FLAGS_ */ |
51 | }; | 51 | }; |
52 | 52 | ||
53 | /* Copy Engine Ring internal state */ | 53 | struct ath10k_ce_ring { |
54 | struct ce_ring_state { | ||
55 | /* Number of entries in this ring; must be power of 2 */ | 54 | /* Number of entries in this ring; must be power of 2 */ |
56 | unsigned int nentries; | 55 | unsigned int nentries; |
57 | unsigned int nentries_mask; | 56 | unsigned int nentries_mask; |
@@ -130,8 +129,8 @@ struct ath10k_ce_pipe { | |||
130 | unsigned int flags); | 129 | unsigned int flags); |
131 | 130 | ||
132 | unsigned int src_sz_max; | 131 | unsigned int src_sz_max; |
133 | struct ce_ring_state *src_ring; | 132 | struct ath10k_ce_ring *src_ring; |
134 | struct ce_ring_state *dest_ring; | 133 | struct ath10k_ce_ring *dest_ring; |
135 | }; | 134 | }; |
136 | 135 | ||
137 | struct ce_sendlist_item { | 136 | struct ce_sendlist_item { |