diff options
author | Govind Singh <govinds@codeaurora.org> | 2017-02-10 17:09:56 +0530 |
---|---|---|
committer | Sarada Prasanna Garnayak <sgarna@codeaurora.org> | 2017-02-14 15:22:59 +0530 |
commit | 7ad58448adc2729f3802e793dd8c92c998f9deec (patch) | |
tree | 62a1b4fe9963084bba35d2f76799ef83586b4808 /drivers/net | |
parent | 3a7e752617514960c5cecdf84e12b13dc63c04c7 (diff) |
ath10k: Remove redundant code from snoc layer
The ath10k snoc bus uses NAPI in rx path and tasklet
is no more used. Remove tasklet references from
bus layer. Refactor driver unload path to have
consistency in API uses.
CRs-Fixed: 2005874
Change-Id: Ib9534286ed45bf1394e109c6ca8063cd89a1d58e
Signed-off-by: Govind Singh <govinds@codeaurora.org>
Diffstat (limited to 'drivers/net')
-rw-r--r-- | drivers/net/wireless/ath/ath10k/snoc.c | 81 | ||||
-rw-r--r-- | drivers/net/wireless/ath/ath10k/snoc.h | 4 |
2 files changed, 8 insertions, 77 deletions
diff --git a/drivers/net/wireless/ath/ath10k/snoc.c b/drivers/net/wireless/ath/ath10k/snoc.c index 487c243e18ec..003d81aea30b 100644 --- a/drivers/net/wireless/ath/ath10k/snoc.c +++ b/drivers/net/wireless/ath/ath10k/snoc.c @@ -48,8 +48,6 @@ const char *ce_name[WCN3990_MAX_IRQ] = { #define SNOC_HIF_POWER_DOWN_DELAY 30 static void ath10k_snoc_buffer_cleanup(struct ath10k *ar); -static int ath10k_snoc_init_irq(struct ath10k *ar); -static int ath10k_snoc_deinit_irq(struct ath10k *ar); static int ath10k_snoc_request_irq(struct ath10k *ar); static void ath10k_snoc_free_irq(struct ath10k *ar); static void ath10k_snoc_htc_tx_cb(struct ath10k_ce_pipe *ce_state); @@ -703,31 +701,6 @@ static void ath10k_snoc_hif_send_complete_check(struct ath10k *ar, u8 pipe, ath10k_ce_per_engine_service(ar, pipe); } -static void ath10k_snoc_kill_tasklet(struct ath10k *ar) -{ - struct ath10k_snoc *ar_snoc = ath10k_snoc_priv(ar); - int i; - - for (i = 0; i < CE_COUNT; i++) - tasklet_kill(&ar_snoc->pipe_info[i].intr); - - del_timer_sync(&ar_snoc->rx_post_retry); -} - -static void ath10k_snoc_ce_deinit(struct ath10k *ar) -{ - int i; - - for (i = 0; i < CE_COUNT; i++) - ath10k_ce_deinit_pipe(ar, i); -} - -static void ath10k_snoc_release_resource(struct ath10k *ar) -{ - netif_napi_del(&ar->napi); - ath10k_snoc_ce_deinit(ar); -} - static int ath10k_snoc_hif_map_service_to_pipe(struct ath10k *ar, u16 service_id, u8 *ul_pipe, u8 *dl_pipe) @@ -862,6 +835,7 @@ static void ath10k_snoc_buffer_cleanup(struct ath10k *ar) struct ath10k_snoc *ar_snoc = ath10k_snoc_priv(ar); int pipe_num; + del_timer_sync(&ar_snoc->rx_post_retry); for (pipe_num = 0; pipe_num < CE_COUNT; pipe_num++) { struct ath10k_snoc_pipe *pipe_info; @@ -873,7 +847,6 @@ static void ath10k_snoc_buffer_cleanup(struct ath10k *ar) static void ath10k_snoc_flush(struct ath10k *ar) { - ath10k_snoc_kill_tasklet(ar); ath10k_snoc_buffer_cleanup(ar); } @@ -921,6 +894,12 @@ static void ath10k_snoc_free_pipes(struct ath10k *ar) ath10k_ce_free_pipe(ar, i); } +static void ath10k_snoc_release_resource(struct ath10k *ar) +{ + netif_napi_del(&ar->napi); + ath10k_snoc_free_pipes(ar); +} + static int ath10k_snoc_init_pipes(struct ath10k *ar) { int i, ret; @@ -944,14 +923,6 @@ static void ath10k_snoc_hif_power_down(struct ath10k *ar) icnss_wlan_disable(ICNSS_OFF); } -static void ath10k_snoc_ce_tasklet(unsigned long ptr) -{ - struct ath10k_snoc_pipe *pipe = (struct ath10k_snoc_pipe *)ptr; - struct ath10k_snoc *ar_snoc = pipe->ar_snoc; - - ath10k_ce_per_engine_service(ar_snoc->ar, pipe->pipe_num); -} - int ath10k_snoc_get_ce_id(struct ath10k *ar, int irq) { int i; @@ -1015,30 +986,6 @@ static void ath10k_snoc_free_irq(struct ath10k *ar) free_irq(ar_snoc->ce_irqs[id], ar); } -static void ath10k_snoc_init_irq_tasklets(struct ath10k *ar) -{ - struct ath10k_snoc *ar_snoc = ath10k_snoc_priv(ar); - int i; - - for (i = 0; i < CE_COUNT; i++) { - ar_snoc->pipe_info[i].ar_snoc = ar_snoc; - tasklet_init(&ar_snoc->pipe_info[i].intr, - ath10k_snoc_ce_tasklet, - (unsigned long)&ar_snoc->pipe_info[i]); - } -} - -static int ath10k_snoc_init_irq(struct ath10k *ar) -{ - ath10k_snoc_init_irq_tasklets(ar); - return 0; -} - -static int ath10k_snoc_deinit_irq(struct ath10k *ar) -{ - ath10k_snoc_irq_disable(ar); - return 0; -} static int ath10k_snoc_get_soc_info(struct ath10k *ar) { @@ -1282,16 +1229,10 @@ static int ath10k_snoc_probe(struct platform_device *pdev) netif_napi_add(&ar->napi_dev, &ar->napi, ath10k_snoc_napi_poll, ATH10K_NAPI_BUDGET); - ret = ath10k_snoc_init_irq(ar); - if (ret) { - ath10k_err(ar, "failed to init irqs: %d\n", ret); - goto err_free_pipes; - } - ret = ath10k_snoc_request_irq(ar); if (ret) { ath10k_warn(ar, "failed to request irqs: %d\n", ret); - goto err_deinit_irq; + goto err_free_pipes; } chip_id = ar_snoc->target_info.soc_version; @@ -1307,10 +1248,6 @@ static int ath10k_snoc_probe(struct platform_device *pdev) err_free_irq: ath10k_snoc_free_irq(ar); - ath10k_snoc_kill_tasklet(ar); - -err_deinit_irq: - ath10k_snoc_deinit_irq(ar); err_free_pipes: ath10k_snoc_free_pipes(ar); @@ -1334,8 +1271,6 @@ static int ath10k_snoc_remove(struct platform_device *pdev) ath10k_core_unregister(ar); ath10k_snoc_free_irq(ar); - ath10k_snoc_kill_tasklet(ar); - ath10k_snoc_deinit_irq(ar); ath10k_snoc_release_resource(ar); ath10k_snoc_free_pipes(ar); ath10k_core_destroy(ar); diff --git a/drivers/net/wireless/ath/ath10k/snoc.h b/drivers/net/wireless/ath/ath10k/snoc.h index 7c8a3ca8fabf..1754a3e91a00 100644 --- a/drivers/net/wireless/ath/ath10k/snoc.h +++ b/drivers/net/wireless/ath/ath10k/snoc.h @@ -35,7 +35,6 @@ struct snoc_state { * @buf_sz: buffer size * @pipe_lock: pipe lock * @ar_snoc: snoc private structure - * @intr: tasklet structure */ struct ath10k_snoc_pipe { @@ -46,7 +45,6 @@ struct ath10k_snoc_pipe { /* protect ce info */ spinlock_t pipe_lock; struct ath10k_snoc *ar_snoc; - struct tasklet_struct intr; }; /* struct ath10k_snoc_supp_chip: supported chip set @@ -97,7 +95,6 @@ struct ath10k_target_info { * @mem_pa: mem base physical address * @target_info: snoc target info * @mem_len: mempry map length - * @intr_tq: rx tasklet handle * @pipe_info: pipe info struct * @ce_lock: protect ce structures * @ce_states: maps ce id to ce state @@ -112,7 +109,6 @@ struct ath10k_snoc { dma_addr_t mem_pa; struct ath10k_target_info target_info; size_t mem_len; - struct tasklet_struct intr_tq; struct ath10k_snoc_pipe pipe_info[CE_COUNT_MAX]; /* protects CE info */ spinlock_t ce_lock; |