From patchwork Thu Aug 8 13:02:58 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maharaja Kennadyrajan X-Patchwork-Id: 11084107 X-Patchwork-Delegate: kvalo@adurom.com Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 58EF414DB for ; Thu, 8 Aug 2019 13:03:28 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 4626028409 for ; Thu, 8 Aug 2019 13:03:28 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 39AFB289BD; Thu, 8 Aug 2019 13:03:28 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 44E7C28409 for ; Thu, 8 Aug 2019 13:03:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References: In-Reply-To:Message-Id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=ecBUPVG55o/Nyzo1pldq3YcNQ3ZIsc8TxqIROewFXGw=; b=MR5se/h1QfRzY7auyF8deKOPG1 KJ4KKp9mVEsFGVYjBSGVMEcKP9zQTk5Skm/ful74Z+mbmUTwGH5F7HuhXit/RfWSoVheViIiJSbD6 DFPWlEr0EQNSw/aRfQstX34c9ToKTCmUF4+nAMnl50/wNBZYXutzpm8CfMOUVZlrnVkSHEKkZGCJr Kn8XqH+AKSmqXoIkVMA0HC6bIB199iGVbDY6uJ50yPMCuNhNvPCf9FVLmGoAnCtrziibd+N4Tz1P1 ivhMPjFpnbv4iTWA7dCr4IRacx9XGEldjdYwpx4DTxTwUYwkvjnG9Qhhlxh/s/U8dm22ur8RtI8Ev FqhHPddw==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92 #3 (Red Hat Linux)) id 1hvi4j-00089Y-DP; Thu, 08 Aug 2019 13:03:25 +0000 Received: from smtp.codeaurora.org ([198.145.29.96]) by bombadil.infradead.org with esmtps (Exim 4.92 #3 (Red Hat Linux)) id 1hvi4Y-00082M-Qb for ath11k@lists.infradead.org; Thu, 08 Aug 2019 13:03:17 +0000 Received: by smtp.codeaurora.org (Postfix, from userid 1000) id 5CDE5602F1; Thu, 8 Aug 2019 13:03:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1565269393; bh=SXhVO5VG4dq17qEnYfxE37aHP1pMK0DhLUMwFogbU5c=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ONmiThKdZnjskoJNYtSUDjOAxysBDqyoqw2+synSrBqsCiOGDzldaZNRCAa4Dieng dz/rHoZj7ULfFJ35yEQ1xZSWlaqmbyJUCrnE4IFnrPWOLKT7OxYuJab85veOtGRwjj 8TQS0yJUdMiFf2VHegNgSKYAKdEOiQYDBPdgyGos= Received: from che-swdbs-01.qca.qualcomm.com (blr-c-bdr-fw-01_globalnat_allzones-outside.qualcomm.com [103.229.19.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) (Authenticated sender: mkenna@codeaurora.org) by smtp.codeaurora.org (Postfix) with ESMTPSA id 37D3060208; Thu, 8 Aug 2019 13:03:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1565269392; bh=SXhVO5VG4dq17qEnYfxE37aHP1pMK0DhLUMwFogbU5c=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=jYu8tXKtmKwCnwnKmbxMvrjiuFyVgq2nBSmTtteR7gkVX+DVhYugPuWFdmZdlovAm GyVXX6xXxe2gQLlFaPRphKcxwEKARznAV3mntSN88Ig2E5p/YvadHJU0sxgGtUvnsQ YutRoXA542MfwcEfPH/FUiDXFIUvAptcinOcCsmI= DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org 37D3060208 Authentication-Results: pdx-caf-mail.web.codeaurora.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: pdx-caf-mail.web.codeaurora.org; spf=none smtp.mailfrom=mkenna@codeaurora.org From: Maharaja Kennadyrajan To: ath11k@lists.infradead.org Subject: [PATCH 01/15] ath11k: Rename ath11k_base struct from 'sc' to 'ab in ahb.c Date: Thu, 8 Aug 2019 18:32:58 +0530 Message-Id: <1565269392-2838-2-git-send-email-mkenna@codeaurora.org> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1565269392-2838-1-git-send-email-mkenna@codeaurora.org> References: <1565269392-2838-1-git-send-email-mkenna@codeaurora.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190808_060314_900668_FA90B930 X-CRM114-Status: GOOD ( 14.20 ) X-BeenThere: ath11k@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Maharaja Kennadyrajan MIME-Version: 1.0 Sender: "ath11k" Errors-To: ath11k-bounces+patchwork-ath11k=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP To avoid confusion and better readability, renamed the ath11k_base struct from 'sc' to 'ab'. Signed-off-by: Maharaja Kennadyrajan --- drivers/net/wireless/ath/ath11k/ahb.c | 202 +++++++++++++------------- 1 file changed, 101 insertions(+), 101 deletions(-) diff --git a/drivers/net/wireless/ath/ath11k/ahb.c b/drivers/net/wireless/ath/ath11k/ahb.c index a2c697b97bdf..e1fee70055a6 100644 --- a/drivers/net/wireless/ath/ath11k/ahb.c +++ b/drivers/net/wireless/ath/ath11k/ahb.c @@ -463,22 +463,22 @@ enum ext_irq_num { tcl2host_status_ring, }; -inline u32 ath11k_ahb_read32(struct ath11k_base *sc, u32 offset) +inline u32 ath11k_ahb_read32(struct ath11k_base *ab, u32 offset) { - return ioread32(sc->mem + offset); + return ioread32(ab->mem + offset); } -inline void ath11k_ahb_write32(struct ath11k_base *sc, u32 offset, u32 value) +inline void ath11k_ahb_write32(struct ath11k_base *ab, u32 offset, u32 value) { - iowrite32(value, sc->mem + offset); + iowrite32(value, ab->mem + offset); } -static void ath11k_ahb_kill_tasklets(struct ath11k_base *sc) +static void ath11k_ahb_kill_tasklets(struct ath11k_base *ab) { int i; for (i = 0; i < CE_COUNT; i++) { - struct ath11k_ce_pipe *ce_pipe = &sc->ce.ce_pipe[i]; + struct ath11k_ce_pipe *ce_pipe = &ab->ce.ce_pipe[i]; if (ath11k_ce_get_attr_flags(i) & CE_ATTR_DIS_INTR) continue; @@ -492,16 +492,16 @@ static void ath11k_ahb_ext_grp_disable(struct ath11k_ext_irq_grp *irq_grp) int i; for (i = 0; i < irq_grp->num_irq; i++) - disable_irq_nosync(irq_grp->sc->irq_num[irq_grp->irqs[i]]); + disable_irq_nosync(irq_grp->ab->irq_num[irq_grp->irqs[i]]); } -static void __ath11k_ahb_ext_irq_disable(struct ath11k_base *sc) +static void __ath11k_ahb_ext_irq_disable(struct ath11k_base *ab) { struct sk_buff *skb; int i; for (i = 0; i < ATH11K_EXT_IRQ_GRP_NUM_MAX; i++) { - struct ath11k_ext_irq_grp *irq_grp = &sc->ext_irq_grp[i]; + struct ath11k_ext_irq_grp *irq_grp = &ab->ext_irq_grp[i]; ath11k_ahb_ext_grp_disable(irq_grp); @@ -518,52 +518,52 @@ static void ath11k_ahb_ext_grp_enable(struct ath11k_ext_irq_grp *irq_grp) int i; for (i = 0; i < irq_grp->num_irq; i++) - enable_irq(irq_grp->sc->irq_num[irq_grp->irqs[i]]); + enable_irq(irq_grp->ab->irq_num[irq_grp->irqs[i]]); } -static void ath11k_ahb_ce_irq_enable(struct ath11k_base *sc, u16 ce_id) +static void ath11k_ahb_ce_irq_enable(struct ath11k_base *ab, u16 ce_id) { const struct ce_pipe_config *ce_config; u32 val; ce_config = &target_ce_config_wlan[ce_id]; if (__le32_to_cpu(ce_config->pipedir) & PIPEDIR_OUT) { - val = ath11k_ahb_read32(sc, CE_HOST_IE_ADDRESS); + val = ath11k_ahb_read32(ab, CE_HOST_IE_ADDRESS); val |= BIT(ce_id); - ath11k_ahb_write32(sc, CE_HOST_IE_ADDRESS, val); + ath11k_ahb_write32(ab, CE_HOST_IE_ADDRESS, val); } if (__le32_to_cpu(ce_config->pipedir) & PIPEDIR_IN) { - val = ath11k_ahb_read32(sc, CE_HOST_IE_2_ADDRESS); + val = ath11k_ahb_read32(ab, CE_HOST_IE_2_ADDRESS); val |= BIT(ce_id); - ath11k_ahb_write32(sc, CE_HOST_IE_2_ADDRESS, val); + ath11k_ahb_write32(ab, CE_HOST_IE_2_ADDRESS, val); - val = ath11k_ahb_read32(sc, CE_HOST_IE_3_ADDRESS); + val = ath11k_ahb_read32(ab, CE_HOST_IE_3_ADDRESS); val |= BIT(ce_id + CE_HOST_IE_3_SHIFT); - ath11k_ahb_write32(sc, CE_HOST_IE_3_ADDRESS, val); + ath11k_ahb_write32(ab, CE_HOST_IE_3_ADDRESS, val); } } -static void ath11k_ahb_ce_irq_disable(struct ath11k_base *sc, u16 ce_id) +static void ath11k_ahb_ce_irq_disable(struct ath11k_base *ab, u16 ce_id) { const struct ce_pipe_config *ce_config; u32 val; ce_config = &target_ce_config_wlan[ce_id]; if (__le32_to_cpu(ce_config->pipedir) & PIPEDIR_OUT) { - val = ath11k_ahb_read32(sc, CE_HOST_IE_ADDRESS); + val = ath11k_ahb_read32(ab, CE_HOST_IE_ADDRESS); val &= ~BIT(ce_id); - ath11k_ahb_write32(sc, CE_HOST_IE_ADDRESS, val); + ath11k_ahb_write32(ab, CE_HOST_IE_ADDRESS, val); } if (__le32_to_cpu(ce_config->pipedir) & PIPEDIR_IN) { - val = ath11k_ahb_read32(sc, CE_HOST_IE_2_ADDRESS); + val = ath11k_ahb_read32(ab, CE_HOST_IE_2_ADDRESS); val &= ~BIT(ce_id); - ath11k_ahb_write32(sc, CE_HOST_IE_2_ADDRESS, val); + ath11k_ahb_write32(ab, CE_HOST_IE_2_ADDRESS, val); - val = ath11k_ahb_read32(sc, CE_HOST_IE_3_ADDRESS); + val = ath11k_ahb_read32(ab, CE_HOST_IE_3_ADDRESS); val &= ~BIT(ce_id + CE_HOST_IE_3_SHIFT); - ath11k_ahb_write32(sc, CE_HOST_IE_3_ADDRESS, val); + ath11k_ahb_write32(ab, CE_HOST_IE_3_ADDRESS, val); } } @@ -596,32 +596,32 @@ static void ath11k_ahb_sync_ext_irqs(struct ath11k_base *ab) } } -static void ath11k_ahb_ce_irqs_enable(struct ath11k_base *sc) +static void ath11k_ahb_ce_irqs_enable(struct ath11k_base *ab) { int i; for (i = 0; i < CE_COUNT; i++) { if (ath11k_ce_get_attr_flags(i) & CE_ATTR_DIS_INTR) continue; - ath11k_ahb_ce_irq_enable(sc, i); + ath11k_ahb_ce_irq_enable(ab, i); } } -static void ath11k_ahb_ce_irqs_disable(struct ath11k_base *sc) +static void ath11k_ahb_ce_irqs_disable(struct ath11k_base *ab) { int i; for (i = 0; i < CE_COUNT; i++) { if (ath11k_ce_get_attr_flags(i) & CE_ATTR_DIS_INTR) continue; - ath11k_ahb_ce_irq_disable(sc, i); + ath11k_ahb_ce_irq_disable(ab, i); } } -int ath11k_ahb_start(struct ath11k_base *sc) +int ath11k_ahb_start(struct ath11k_base *ab) { - ath11k_ahb_ce_irqs_enable(sc); - ath11k_ce_rx_post_buf(sc); + ath11k_ahb_ce_irqs_enable(ab); + ath11k_ce_rx_post_buf(ab); /* Bring up other components as appropriate */ @@ -646,36 +646,36 @@ void ath11k_ahb_ext_irq_disable(struct ath11k_base *ab) ath11k_ahb_sync_ext_irqs(ab); } -void ath11k_ahb_stop(struct ath11k_base *sc) +void ath11k_ahb_stop(struct ath11k_base *ab) { - if (!test_bit(ATH11K_FLAG_CRASH_FLUSH, &sc->dev_flags)) - ath11k_ahb_ce_irqs_disable(sc); - ath11k_ahb_sync_ce_irqs(sc); - ath11k_ahb_kill_tasklets(sc); - del_timer_sync(&sc->rx_replenish_retry); - ath11k_ce_cleanup_pipes(sc); + if (!test_bit(ATH11K_FLAG_CRASH_FLUSH, &ab->dev_flags)) + ath11k_ahb_ce_irqs_disable(ab); + ath11k_ahb_sync_ce_irqs(ab); + ath11k_ahb_kill_tasklets(ab); + del_timer_sync(&ab->rx_replenish_retry); + ath11k_ce_cleanup_pipes(ab); /* Shutdown other components as appropriate */ } -int ath11k_ahb_power_up(struct ath11k_base *sc) +int ath11k_ahb_power_up(struct ath11k_base *ab) { int ret; - ret = rproc_boot(sc->tgt_rproc); + ret = rproc_boot(ab->tgt_rproc); if (ret) - ath11k_err(sc, "failed to boot the remote processor Q6\n"); + ath11k_err(ab, "failed to boot the remote processor Q6\n"); return ret; } -void ath11k_ahb_power_down(struct ath11k_base *sc) +void ath11k_ahb_power_down(struct ath11k_base *ab) { - rproc_shutdown(sc->tgt_rproc); + rproc_shutdown(ab->tgt_rproc); } -static void ath11k_ahb_init_qmi_ce_config(struct ath11k_base *sc) +static void ath11k_ahb_init_qmi_ce_config(struct ath11k_base *ab) { - struct ath11k_qmi_ce_cfg *cfg = &sc->qmi.ce_cfg; + struct ath11k_qmi_ce_cfg *cfg = &ab->qmi.ce_cfg; cfg->tgt_ce = (u8 *)target_ce_config_wlan; cfg->tgt_ce_len = sizeof(target_ce_config_wlan); @@ -684,19 +684,19 @@ static void ath11k_ahb_init_qmi_ce_config(struct ath11k_base *sc) cfg->svc_to_ce_map_len = sizeof(target_service_to_ce_map_wlan); } -static void ath11k_ahb_free_ext_irq(struct ath11k_base *sc) +static void ath11k_ahb_free_ext_irq(struct ath11k_base *ab) { int i, j; for (i = 0; i < ATH11K_EXT_IRQ_GRP_NUM_MAX; i++) { - struct ath11k_ext_irq_grp *irq_grp = &sc->ext_irq_grp[i]; + struct ath11k_ext_irq_grp *irq_grp = &ab->ext_irq_grp[i]; for (j = 0; j < irq_grp->num_irq; j++) - free_irq(sc->irq_num[irq_grp->irqs[j]], irq_grp); + free_irq(ab->irq_num[irq_grp->irqs[j]], irq_grp); } } -static void ath11k_ahb_free_irq(struct ath11k_base *sc) +static void ath11k_ahb_free_irq(struct ath11k_base *ab) { int irq_idx; int i; @@ -705,26 +705,26 @@ static void ath11k_ahb_free_irq(struct ath11k_base *sc) if (ath11k_ce_get_attr_flags(i) & CE_ATTR_DIS_INTR) continue; irq_idx = ATH11K_IRQ_CE0_OFFSET + i; - free_irq(sc->irq_num[irq_idx], &sc->ce.ce_pipe[i]); + free_irq(ab->irq_num[irq_idx], &ab->ce.ce_pipe[i]); } - ath11k_ahb_free_ext_irq(sc); + ath11k_ahb_free_ext_irq(ab); } static void ath11k_ahb_ce_tasklet(unsigned long data) { struct ath11k_ce_pipe *ce_pipe = (struct ath11k_ce_pipe *)data; - ath11k_ce_per_engine_service(ce_pipe->sc, ce_pipe->pipe_num); + ath11k_ce_per_engine_service(ce_pipe->ab, ce_pipe->pipe_num); - ath11k_ahb_ce_irq_enable(ce_pipe->sc, ce_pipe->pipe_num); + ath11k_ahb_ce_irq_enable(ce_pipe->ab, ce_pipe->pipe_num); } static irqreturn_t ath11k_ahb_ce_interrupt_handler(int irq, void *arg) { struct ath11k_ce_pipe *ce_pipe = arg; - ath11k_ahb_ce_irq_disable(ce_pipe->sc, ce_pipe->pipe_num); + ath11k_ahb_ce_irq_disable(ce_pipe->ab, ce_pipe->pipe_num); tasklet_schedule(&ce_pipe->intr_tq); @@ -736,7 +736,7 @@ static int ath11k_ahb_ext_grp_napi_poll(struct napi_struct *napi, int budget) struct ath11k_ext_irq_grp *irq_grp = container_of(napi, struct ath11k_ext_irq_grp, napi); - struct ath11k_base *ab = irq_grp->sc; + struct ath11k_base *ab = irq_grp->ab; int work_done; work_done = ath11k_dp_service_srng(ab, irq_grp, budget); @@ -762,17 +762,17 @@ static irqreturn_t ath11k_ahb_ext_interrupt_handler(int irq, void *arg) return IRQ_HANDLED; } -static int ath11k_ahb_ext_irq_config(struct ath11k_base *sc) +static int ath11k_ahb_ext_irq_config(struct ath11k_base *ab) { int i, j; int irq; int ret; for (i = 0; i < ATH11K_EXT_IRQ_GRP_NUM_MAX; i++) { - struct ath11k_ext_irq_grp *irq_grp = &sc->ext_irq_grp[i]; + struct ath11k_ext_irq_grp *irq_grp = &ab->ext_irq_grp[i]; u32 num_irq = 0; - irq_grp->sc = sc; + irq_grp->ab = ab; irq_grp->grp_id = i; init_dummy_netdev(&irq_grp->napi_ndev); netif_napi_add(&irq_grp->napi_ndev, &irq_grp->napi, @@ -803,22 +803,22 @@ static int ath11k_ahb_ext_irq_config(struct ath11k_base *sc) if (ath11k_rxdma2host_ring_mask[i] & BIT(j)) { irq_grp->irqs[num_irq++] = rxdma2host_destination_ring_mac1 - - ath11k_core_get_hw_mac_id(sc, j); + - ath11k_core_get_hw_mac_id(ab, j); } if (ath11k_host2rxdma_ring_mask[i] & BIT(j)) { irq_grp->irqs[num_irq++] = host2rxdma_host_buf_ring_mac1 - - ath11k_core_get_hw_mac_id(sc, j); + - ath11k_core_get_hw_mac_id(ab, j); } if (rx_mon_status_ring_mask[i] & BIT(j)) { irq_grp->irqs[num_irq++] = ppdu_end_interrupts_mac1 - - ath11k_core_get_hw_mac_id(sc, j); + ath11k_core_get_hw_mac_id(ab, j); irq_grp->irqs[num_irq++] = rxdma2host_monitor_status_ring_mac1 - - ath11k_core_get_hw_mac_id(sc, j); + ath11k_core_get_hw_mac_id(ab, j); } } } @@ -827,15 +827,15 @@ static int ath11k_ahb_ext_irq_config(struct ath11k_base *sc) for (j = 0; j < irq_grp->num_irq; j++) { int irq_idx = irq_grp->irqs[j]; - irq = platform_get_irq_byname(sc->pdev, + irq = platform_get_irq_byname(ab->pdev, irq_name[irq_idx]); - sc->irq_num[irq_idx] = irq; + ab->irq_num[irq_idx] = irq; irq_set_status_flags(irq, IRQ_NOAUTOEN); ret = request_irq(irq, ath11k_ahb_ext_interrupt_handler, IRQF_TRIGGER_RISING, irq_name[irq_idx], irq_grp); if (ret) { - ath11k_err(sc, "failed request_irq for %d\n", + ath11k_err(ab, "failed request_irq for %d\n", irq); } } @@ -844,14 +844,14 @@ static int ath11k_ahb_ext_irq_config(struct ath11k_base *sc) return 0; } -static int ath11k_ahb_config_irq(struct ath11k_base *sc) +static int ath11k_ahb_config_irq(struct ath11k_base *ab) { int irq, irq_idx, i; int ret; /* Configure CE irqs */ for (i = 0; i < CE_COUNT; i++) { - struct ath11k_ce_pipe *ce_pipe = &sc->ce.ce_pipe[i]; + struct ath11k_ce_pipe *ce_pipe = &ab->ce.ce_pipe[i]; if (ath11k_ce_get_attr_flags(i) & CE_ATTR_DIS_INTR) continue; @@ -860,23 +860,23 @@ static int ath11k_ahb_config_irq(struct ath11k_base *sc) tasklet_init(&ce_pipe->intr_tq, ath11k_ahb_ce_tasklet, (unsigned long)ce_pipe); - irq = platform_get_irq_byname(sc->pdev, irq_name[irq_idx]); + irq = platform_get_irq_byname(ab->pdev, irq_name[irq_idx]); ret = request_irq(irq, ath11k_ahb_ce_interrupt_handler, IRQF_TRIGGER_RISING, irq_name[irq_idx], ce_pipe); if (ret) return ret; - sc->irq_num[irq_idx] = irq; + ab->irq_num[irq_idx] = irq; } /* Configure external interrupts */ - ret = ath11k_ahb_ext_irq_config(sc); + ret = ath11k_ahb_ext_irq_config(ab); return ret; } -int ath11k_ahb_map_service_to_pipe(struct ath11k_base *sc, u16 service_id, +int ath11k_ahb_map_service_to_pipe(struct ath11k_base *ab, u16 service_id, u8 *ul_pipe, u8 *dl_pipe) { const struct service_to_pipe *entry; @@ -921,7 +921,7 @@ int ath11k_ahb_map_service_to_pipe(struct ath11k_base *sc, u16 service_id, static int ath11k_ahb_probe(struct platform_device *pdev) { - struct ath11k_base *sc; + struct ath11k_base *ab; const struct of_device_id *of_id; struct resource *mem_res; void __iomem *mem; @@ -951,52 +951,52 @@ static int ath11k_ahb_probe(struct platform_device *pdev) return ret; } - sc = ath11k_core_alloc(&pdev->dev); - if (!sc) { + ab = ath11k_core_alloc(&pdev->dev); + if (!ab) { dev_err(&pdev->dev, "failed to allocate ath11k base\n"); return -ENOMEM; } - sc->pdev = pdev; - sc->hw_rev = (enum ath11k_hw_rev)of_id->data; - sc->mem = mem; - sc->mem_len = resource_size(mem_res); - platform_set_drvdata(pdev, sc); + ab->pdev = pdev; + ab->hw_rev = (enum ath11k_hw_rev)of_id->data; + ab->mem = mem; + ab->mem_len = resource_size(mem_res); + platform_set_drvdata(pdev, ab); - ret = ath11k_hal_srng_init(sc); + ret = ath11k_hal_srng_init(ab); if (ret) goto err_core_free; - ret = ath11k_ce_alloc_pipes(sc); + ret = ath11k_ce_alloc_pipes(ab); if (ret) { - ath11k_err(sc, "failed to allocate ce pipes: %d\n", ret); + ath11k_err(ab, "failed to allocate ce pipes: %d\n", ret); goto err_hal_srng_deinit; } - ath11k_ahb_init_qmi_ce_config(sc); + ath11k_ahb_init_qmi_ce_config(ab); - ret = ath11k_ahb_config_irq(sc); + ret = ath11k_ahb_config_irq(ab); if (ret) { - ath11k_err(sc, "failed to configure irq: %d\n", ret); + ath11k_err(ab, "failed to configure irq: %d\n", ret); goto err_ce_free; } - ret = ath11k_core_init(sc); + ret = ath11k_core_init(ab); if (ret) { - ath11k_err(sc, "failed to init core: %d\n", ret); + ath11k_err(ab, "failed to init core: %d\n", ret); goto err_ce_free; } return 0; err_ce_free: - ath11k_ce_free_pipes(sc); + ath11k_ce_free_pipes(ab); err_hal_srng_deinit: - ath11k_hal_srng_deinit(sc); + ath11k_hal_srng_deinit(ab); err_core_free: - ath11k_core_free(sc); + ath11k_core_free(ab); platform_set_drvdata(pdev, NULL); return ret; @@ -1004,23 +1004,23 @@ static int ath11k_ahb_probe(struct platform_device *pdev) static int ath11k_ahb_remove(struct platform_device *pdev) { - struct ath11k_base *sc = platform_get_drvdata(pdev); + struct ath11k_base *ab = platform_get_drvdata(pdev); - reinit_completion(&sc->driver_recovery); + reinit_completion(&ab->driver_recovery); - if (test_bit(ATH11K_FLAG_RECOVERY, &sc->dev_flags)) - wait_for_completion_timeout(&sc->driver_recovery, + if (test_bit(ATH11K_FLAG_RECOVERY, &ab->dev_flags)) + wait_for_completion_timeout(&ab->driver_recovery, ATH11K_AHB_RECOVERY_TIMEOUT); - set_bit(ATH11K_FLAG_UNREGISTERING, &sc->dev_flags); - cancel_work_sync(&sc->restart_work); + set_bit(ATH11K_FLAG_UNREGISTERING, &ab->dev_flags); + cancel_work_sync(&ab->restart_work); - ath11k_core_deinit(sc); - ath11k_ahb_free_irq(sc); + ath11k_core_deinit(ab); + ath11k_ahb_free_irq(ab); - ath11k_hal_srng_deinit(sc); - ath11k_ce_free_pipes(sc); - ath11k_core_free(sc); + ath11k_hal_srng_deinit(ab); + ath11k_ce_free_pipes(ab); + ath11k_core_free(ab); platform_set_drvdata(pdev, NULL); return 0; From patchwork Thu Aug 8 13:02:59 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maharaja Kennadyrajan X-Patchwork-Id: 11084105 X-Patchwork-Delegate: kvalo@adurom.com Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 2203D14DB for ; Thu, 8 Aug 2019 13:03:27 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 10B2F2873C for ; Thu, 8 Aug 2019 13:03:27 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id F0F85289BD; Thu, 8 Aug 2019 13:03:26 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 03F3628876 for ; Thu, 8 Aug 2019 13:03:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References: In-Reply-To:Message-Id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=IkAFvlVAOWXqTxyGuxHTn2R9LGk3TDsI6YLBOUTxPD8=; b=VZ7uuofNinX26VlMtF50uFTYhf hp8wQpcldLvt9hvEIco3bYq7rvreV9o3I0M+/8kBc8M6e6pf2eSNnIMfJ97E7MYPcP1zTfRZ3lALM mL3o3RcrS2oW+XaAMDZko9ynfI+ODLHqQN9o86YEnHJqOWCrbFQLXLb7IShlkQHgMOdlmSDqweYCr essphjtEGFP86zKYptsiOJDIbFFPdYEP79IBptvniRSKU4/ClqN6UVfG73kd5xPiUUmhT+cp3KzDy COLuGFfWGEe8DTzQD6vDKOjwtttpV9PzFS33V4TC1GtXI1rX247a1Kv8v1JJls2LDFnJbEhPpvtIz 8zgMqekw==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92 #3 (Red Hat Linux)) id 1hvi4i-000886-Ba; Thu, 08 Aug 2019 13:03:24 +0000 Received: from smtp.codeaurora.org ([198.145.29.96]) by bombadil.infradead.org with esmtps (Exim 4.92 #3 (Red Hat Linux)) id 1hvi4Z-00082a-35 for ath11k@lists.infradead.org; Thu, 08 Aug 2019 13:03:17 +0000 Received: by smtp.codeaurora.org (Postfix, from userid 1000) id 7BAF160770; Thu, 8 Aug 2019 13:03:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1565269394; bh=q/wO72gFkSEjskRF72+1+BbjlIwuxzEmsafQj5wKYRI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=MgCv9PIJxyyL8FkJ93r22s0Jq8Mb4jKw02WTD+cJ+RMcHgFihBLomahtUDX/iBecy 4QLkaSs9s0r6Zpowzy8oczI2EcJwrPJEWPz2HmBeoon4Q2rkGkj7m7IKdD4N+3h7NR TJwsnCsL6eRvUnVIXDHvs1vtzggo+fCBQszmfKAA= Received: from che-swdbs-01.qca.qualcomm.com (blr-c-bdr-fw-01_globalnat_allzones-outside.qualcomm.com [103.229.19.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) (Authenticated sender: mkenna@codeaurora.org) by smtp.codeaurora.org (Postfix) with ESMTPSA id CAEDC60256; Thu, 8 Aug 2019 13:03:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1565269393; bh=q/wO72gFkSEjskRF72+1+BbjlIwuxzEmsafQj5wKYRI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=mh73t6+ggvcECXzlLWkc79ZHVjLU6T7uFxH9JlUPPJuZBD86BYpORlM/PP0/48dkZ WCOCEyMPh4Gsm/QZnDuB9F+VwQIaPwHsruOQchmpGHfISHpEDJlabSnVHHqO6r2lof wrdqnVQczA/O+BnwvNz6quQOnVkHVnHoZBrHNIX4= DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org CAEDC60256 Authentication-Results: pdx-caf-mail.web.codeaurora.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: pdx-caf-mail.web.codeaurora.org; spf=none smtp.mailfrom=mkenna@codeaurora.org From: Maharaja Kennadyrajan To: ath11k@lists.infradead.org Subject: [PATCH 02/15] ath11k: Rename ath11k_base struct from 'sc' to 'ab in ce.c Date: Thu, 8 Aug 2019 18:32:59 +0530 Message-Id: <1565269392-2838-3-git-send-email-mkenna@codeaurora.org> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1565269392-2838-1-git-send-email-mkenna@codeaurora.org> References: <1565269392-2838-1-git-send-email-mkenna@codeaurora.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190808_060315_168301_E0F47473 X-CRM114-Status: GOOD ( 15.07 ) X-BeenThere: ath11k@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Maharaja Kennadyrajan MIME-Version: 1.0 Sender: "ath11k" Errors-To: ath11k-bounces+patchwork-ath11k=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP To avoid confusion and better readability, renamed the ath11k_base struct from 'sc' to 'ab' in ce.c file. Signed-off-by: Maharaja Kennadyrajan --- drivers/net/wireless/ath/ath11k/ce.c | 96 ++++++++++++++-------------- 1 file changed, 48 insertions(+), 48 deletions(-) diff --git a/drivers/net/wireless/ath/ath11k/ce.c b/drivers/net/wireless/ath/ath11k/ce.c index 626e7d264a63..4ac65a16d72f 100644 --- a/drivers/net/wireless/ath/ath11k/ce.c +++ b/drivers/net/wireless/ath/ath11k/ce.c @@ -111,7 +111,7 @@ static const struct ce_attr host_ce_config_wlan[] = { static int ath11k_ce_rx_buf_enqueue_pipe(struct ath11k_ce_pipe *pipe, struct sk_buff *skb, dma_addr_t paddr) { - struct ath11k_base *ab = pipe->sc; + struct ath11k_base *ab = pipe->ab; struct ath11k_ce_ring *ring = pipe->dest_ring; struct hal_srng *srng; unsigned int write_index; @@ -164,7 +164,7 @@ static int ath11k_ce_rx_buf_enqueue_pipe(struct ath11k_ce_pipe *pipe, static int ath11k_ce_rx_post_pipe(struct ath11k_ce_pipe *pipe) { - struct ath11k_base *sc = pipe->sc; + struct ath11k_base *ab = pipe->ab; struct sk_buff *skb; dma_addr_t paddr; int ret = 0; @@ -172,7 +172,7 @@ static int ath11k_ce_rx_post_pipe(struct ath11k_ce_pipe *pipe) if (!(pipe->dest_ring || pipe->status_ring)) return 0; - spin_lock_bh(&sc->ce.ce_lock); + spin_lock_bh(&ab->ce.ce_lock); while (pipe->rx_buf_needed) { skb = dev_alloc_skb(pipe->buf_sz); if (!skb) { @@ -182,11 +182,11 @@ static int ath11k_ce_rx_post_pipe(struct ath11k_ce_pipe *pipe) WARN_ON_ONCE(!IS_ALIGNED((unsigned long)skb->data, 4)); - paddr = dma_map_single(sc->dev, skb->data, + paddr = dma_map_single(ab->dev, skb->data, skb->len + skb_tailroom(skb), DMA_FROM_DEVICE); - if (unlikely(dma_mapping_error(sc->dev, paddr))) { - ath11k_warn(sc, "failed to dma map ce rx buf\n"); + if (unlikely(dma_mapping_error(ab->dev, paddr))) { + ath11k_warn(ab, "failed to dma map ce rx buf\n"); dev_kfree_skb_any(skb); ret = -EIO; goto exit; @@ -197,8 +197,8 @@ static int ath11k_ce_rx_post_pipe(struct ath11k_ce_pipe *pipe) ret = ath11k_ce_rx_buf_enqueue_pipe(pipe, skb, paddr); if (ret) { - ath11k_warn(sc, "failed to enqueue rx buf: %d\n", ret); - dma_unmap_single(sc->dev, paddr, + ath11k_warn(ab, "failed to enqueue rx buf: %d\n", ret); + dma_unmap_single(ab->dev, paddr, skb->len + skb_tailroom(skb), DMA_FROM_DEVICE); dev_kfree_skb_any(skb); @@ -207,14 +207,14 @@ static int ath11k_ce_rx_post_pipe(struct ath11k_ce_pipe *pipe) } exit: - spin_unlock_bh(&sc->ce.ce_lock); + spin_unlock_bh(&ab->ce.ce_lock); return ret; } static int ath11k_ce_completed_recv_next(struct ath11k_ce_pipe *pipe, struct sk_buff **context, int *nbytes) { - struct ath11k_base *ab = pipe->sc; + struct ath11k_base *ab = pipe->ab; struct hal_srng *srng; unsigned int sw_index; unsigned int nentries_mask; @@ -263,7 +263,7 @@ static int ath11k_ce_completed_recv_next(struct ath11k_ce_pipe *pipe, static void ath11k_ce_recv_process_cb(struct ath11k_ce_pipe *pipe) { - struct ath11k_base *ab = pipe->sc; + struct ath11k_base *ab = pipe->ab; struct sk_buff *skb; struct sk_buff_head list; unsigned int nbytes, max_nbytes; @@ -304,7 +304,7 @@ static void ath11k_ce_recv_process_cb(struct ath11k_ce_pipe *pipe) static int ath11k_ce_completed_send_next(struct ath11k_ce_pipe *pipe, struct sk_buff **transfer_contextp) { - struct ath11k_base *ab = pipe->sc; + struct ath11k_base *ab = pipe->ab; struct hal_srng *srng; unsigned int sw_index; unsigned int nentries_mask; @@ -345,7 +345,7 @@ static int ath11k_ce_completed_send_next(struct ath11k_ce_pipe *pipe, static void ath11k_ce_send_done_cb(struct ath11k_ce_pipe *pipe) { - struct ath11k_base *ab = pipe->sc; + struct ath11k_base *ab = pipe->ab; struct sk_buff *skb; while (ath11k_ce_completed_send_next(pipe, &skb) == 0) { @@ -358,7 +358,7 @@ static void ath11k_ce_send_done_cb(struct ath11k_ce_pipe *pipe) } } -static int ath11k_ce_init_ring(struct ath11k_base *sc, +static int ath11k_ce_init_ring(struct ath11k_base *ab, struct ath11k_ce_ring *ce_ring, int ce_id, enum hal_ring_type type) { @@ -389,15 +389,15 @@ static int ath11k_ce_init_ring(struct ath11k_base *sc, } break; default: - ath11k_warn(sc, "Invalid CE ring type %d\n", type); + ath11k_warn(ab, "Invalid CE ring type %d\n", type); return -EINVAL; } /* TODO: Init other params needed by HAL to init the ring */ - ret = ath11k_hal_srng_setup(sc, type, ce_id, 0, ¶ms); + ret = ath11k_hal_srng_setup(ab, type, ce_id, 0, ¶ms); if (ret < 0) { - ath11k_warn(sc, "failed to setup srng: %d ring_id %d\n", + ath11k_warn(ab, "failed to setup srng: %d ring_id %d\n", ret, ce_id); return ret; } @@ -407,7 +407,7 @@ static int ath11k_ce_init_ring(struct ath11k_base *sc, } static struct ath11k_ce_ring * -ath11k_ce_alloc_ring(struct ath11k_base *sc, int nentries, int desc_sz) +ath11k_ce_alloc_ring(struct ath11k_base *ab, int nentries, int desc_sz) { struct ath11k_ce_ring *ce_ring; dma_addr_t base_addr; @@ -426,7 +426,7 @@ ath11k_ce_alloc_ring(struct ath11k_base *sc, int nentries, int desc_sz) * coherent DMA are unsupported */ ce_ring->base_addr_owner_space_unaligned = - dma_alloc_coherent(sc->dev, + dma_alloc_coherent(ab->dev, nentries * desc_sz + CE_DESC_RING_ALIGN, &base_addr, GFP_KERNEL); if (!ce_ring->base_addr_owner_space_unaligned) { @@ -446,9 +446,9 @@ ath11k_ce_alloc_ring(struct ath11k_base *sc, int nentries, int desc_sz) return ce_ring; } -static int ath11k_ce_alloc_pipe(struct ath11k_base *sc, int ce_id) +static int ath11k_ce_alloc_pipe(struct ath11k_base *ab, int ce_id) { - struct ath11k_ce_pipe *pipe = &sc->ce.ce_pipe[ce_id]; + struct ath11k_ce_pipe *pipe = &ab->ce.ce_pipe[ce_id]; const struct ce_attr *attr = &host_ce_config_wlan[ce_id]; int nentries; int desc_sz; @@ -459,7 +459,7 @@ static int ath11k_ce_alloc_pipe(struct ath11k_base *sc, int ce_id) pipe->send_cb = ath11k_ce_send_done_cb; nentries = roundup_pow_of_two(attr->src_nentries); desc_sz = ath11k_hal_ce_get_desc_size(HAL_CE_DESC_SRC); - pipe->src_ring = ath11k_ce_alloc_ring(sc, nentries, desc_sz); + pipe->src_ring = ath11k_ce_alloc_ring(ab, nentries, desc_sz); if (!pipe->src_ring) return -ENOMEM; } @@ -468,13 +468,13 @@ static int ath11k_ce_alloc_pipe(struct ath11k_base *sc, int ce_id) pipe->recv_cb = attr->recv_cb; nentries = roundup_pow_of_two(attr->dest_nentries); desc_sz = ath11k_hal_ce_get_desc_size(HAL_CE_DESC_DST); - pipe->dest_ring = ath11k_ce_alloc_ring(sc, nentries, desc_sz); + pipe->dest_ring = ath11k_ce_alloc_ring(ab, nentries, desc_sz); if (!pipe->dest_ring) return -ENOMEM; desc_sz = ath11k_hal_ce_get_desc_size(HAL_CE_DESC_DST_STATUS); - pipe->status_ring = ath11k_ce_alloc_ring(sc, nentries, desc_sz); + pipe->status_ring = ath11k_ce_alloc_ring(ab, nentries, desc_sz); if (!pipe->status_ring) return -ENOMEM; } @@ -590,7 +590,7 @@ int ath11k_ce_send(struct ath11k_base *ab, struct sk_buff *skb, u8 pipe_id, static void ath11k_ce_rx_pipe_cleanup(struct ath11k_ce_pipe *pipe) { - struct ath11k_base *ab = pipe->sc; + struct ath11k_base *ab = pipe->ab; struct ath11k_ce_ring *ring = pipe->dest_ring; struct sk_buff *skb; int i; @@ -626,22 +626,22 @@ void ath11k_ce_cleanup_pipes(struct ath11k_base *ab) } } -void ath11k_ce_rx_post_buf(struct ath11k_base *sc) +void ath11k_ce_rx_post_buf(struct ath11k_base *ab) { struct ath11k_ce_pipe *pipe; int i; int ret; for (i = 0; i < CE_COUNT; i++) { - pipe = &sc->ce.ce_pipe[i]; + pipe = &ab->ce.ce_pipe[i]; ret = ath11k_ce_rx_post_pipe(pipe); if (ret) { if (ret == -ENOSPC) continue; - ath11k_warn(sc, "failed to post rx buf to pipe: %d err: %d\n", + ath11k_warn(ab, "failed to post rx buf to pipe: %d err: %d\n", i, ret); - mod_timer(&sc->rx_replenish_retry, + mod_timer(&ab->rx_replenish_retry, jiffies + ATH11K_CE_RX_POST_RETRY_JIFFIES); return; @@ -656,20 +656,20 @@ void ath11k_ce_rx_replenish_retry(struct timer_list *t) ath11k_ce_rx_post_buf(ab); } -int ath11k_ce_init_pipes(struct ath11k_base *sc) +int ath11k_ce_init_pipes(struct ath11k_base *ab) { struct ath11k_ce_pipe *pipe; int i; int ret; for (i = 0; i < CE_COUNT; i++) { - pipe = &sc->ce.ce_pipe[i]; + pipe = &ab->ce.ce_pipe[i]; if (pipe->src_ring) { - ret = ath11k_ce_init_ring(sc, pipe->src_ring, i, + ret = ath11k_ce_init_ring(ab, pipe->src_ring, i, HAL_CE_SRC); if (ret) { - ath11k_warn(sc, "failed to init src ring: %d\n", + ath11k_warn(ab, "failed to init src ring: %d\n", ret); /* Should we clear any partial init */ return ret; @@ -680,10 +680,10 @@ int ath11k_ce_init_pipes(struct ath11k_base *sc) } if (pipe->dest_ring) { - ret = ath11k_ce_init_ring(sc, pipe->dest_ring, i, + ret = ath11k_ce_init_ring(ab, pipe->dest_ring, i, HAL_CE_DST); if (ret) { - ath11k_warn(sc, "failed to init dest ring: %d\n", + ath11k_warn(ab, "failed to init dest ring: %d\n", ret); /* Should we clear any partial init */ return ret; @@ -697,10 +697,10 @@ int ath11k_ce_init_pipes(struct ath11k_base *sc) } if (pipe->status_ring) { - ret = ath11k_ce_init_ring(sc, pipe->status_ring, i, + ret = ath11k_ce_init_ring(ab, pipe->status_ring, i, HAL_CE_DST_STATUS); if (ret) { - ath11k_warn(sc, "failed to init dest status ing: %d\n", + ath11k_warn(ab, "failed to init dest status ing: %d\n", ret); /* Should we clear any partial init */ return ret; @@ -714,18 +714,18 @@ int ath11k_ce_init_pipes(struct ath11k_base *sc) return 0; } -void ath11k_ce_free_pipes(struct ath11k_base *sc) +void ath11k_ce_free_pipes(struct ath11k_base *ab) { struct ath11k_ce_pipe *pipe; int desc_sz; int i; for (i = 0; i < CE_COUNT; i++) { - pipe = &sc->ce.ce_pipe[i]; + pipe = &ab->ce.ce_pipe[i]; if (pipe->src_ring) { desc_sz = ath11k_hal_ce_get_desc_size(HAL_CE_DESC_SRC); - dma_free_coherent(sc->dev, + dma_free_coherent(ab->dev, pipe->src_ring->nentries * desc_sz + CE_DESC_RING_ALIGN, pipe->src_ring->base_addr_owner_space, @@ -736,7 +736,7 @@ void ath11k_ce_free_pipes(struct ath11k_base *sc) if (pipe->dest_ring) { desc_sz = ath11k_hal_ce_get_desc_size(HAL_CE_DESC_DST); - dma_free_coherent(sc->dev, + dma_free_coherent(ab->dev, pipe->dest_ring->nentries * desc_sz + CE_DESC_RING_ALIGN, pipe->dest_ring->base_addr_owner_space, @@ -748,7 +748,7 @@ void ath11k_ce_free_pipes(struct ath11k_base *sc) if (pipe->status_ring) { desc_sz = ath11k_hal_ce_get_desc_size(HAL_CE_DESC_DST_STATUS); - dma_free_coherent(sc->dev, + dma_free_coherent(ab->dev, pipe->status_ring->nentries * desc_sz + CE_DESC_RING_ALIGN, pipe->status_ring->base_addr_owner_space, @@ -759,26 +759,26 @@ void ath11k_ce_free_pipes(struct ath11k_base *sc) } } -int ath11k_ce_alloc_pipes(struct ath11k_base *sc) +int ath11k_ce_alloc_pipes(struct ath11k_base *ab) { struct ath11k_ce_pipe *pipe; int i; int ret; const struct ce_attr *attr; - spin_lock_init(&sc->ce.ce_lock); + spin_lock_init(&ab->ce.ce_lock); for (i = 0; i < CE_COUNT; i++) { attr = &host_ce_config_wlan[i]; - pipe = &sc->ce.ce_pipe[i]; + pipe = &ab->ce.ce_pipe[i]; pipe->pipe_num = i; - pipe->sc = sc; + pipe->ab = ab; pipe->buf_sz = attr->src_sz_max; - ret = ath11k_ce_alloc_pipe(sc, i); + ret = ath11k_ce_alloc_pipe(ab, i); if (ret) { /* Free any parial successful allocation */ - ath11k_ce_free_pipes(sc); + ath11k_ce_free_pipes(ab); return ret; } } From patchwork Thu Aug 8 13:03:00 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maharaja Kennadyrajan X-Patchwork-Id: 11084103 X-Patchwork-Delegate: kvalo@adurom.com Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 4749917E0 for ; Thu, 8 Aug 2019 13:03:25 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3617C289BD for ; Thu, 8 Aug 2019 13:03:25 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 2AA2B28B3B; Thu, 8 Aug 2019 13:03:25 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id C6C19289BD for ; Thu, 8 Aug 2019 13:03:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References: In-Reply-To:Message-Id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=l3iWzG7FnCtxlYtHdsR3M6QjZvdpozJj06OJcgdk2Oo=; b=BUg9uYC9tWgCxrUI0fMRf/cpx5 T8NfY3yZYFnuKUVQU8+v0rQVt6+jlzU4XPp+Kfwo7cstzULi1sc8H5C6HSQJxurhBD7Baw8EUIouz 3S+RySZRwZZc5uDbXeLicySgKMzjQeUNNl/8oKC9RchWgTi9KlGSOdXmqjt/1CKyTeRaQZgY1QPaI lWafygAVT20KakMAUMRJCxAU3LbxqDyLBNnXyLZJgNiT+4OGFbKkniJnrlwfEu2r8L0zasCY8ERQD Z+HlmZ5Kf8w3ZOSH9IRMWpDPf2ZbhETHXzeYb08+XcvoDcvVwKXiKEFKaBoEOPmZL1433uXVFjicZ hVx7ir2A==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92 #3 (Red Hat Linux)) id 1hvi4h-00086w-5w; Thu, 08 Aug 2019 13:03:23 +0000 Received: from smtp.codeaurora.org ([198.145.29.96]) by bombadil.infradead.org with esmtps (Exim 4.92 #3 (Red Hat Linux)) id 1hvi4Z-00083C-Px for ath11k@lists.infradead.org; Thu, 08 Aug 2019 13:03:17 +0000 Received: by smtp.codeaurora.org (Postfix, from userid 1000) id 7E75760795; Thu, 8 Aug 2019 13:03:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1565269395; bh=4dcx53SihBh0SwNFgo7/EpT1qRZDin9h0GYqU0WUw/g=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Am9mG0D23B502RSq17dFFv6ksrVBv1YOOzfpUPEGSuc6bMgunVyNIFbaG7QEKXfBM kVoo0CH9hlecJXclWG+EkcAWvePDBQnrdUHfy4E2xIyTUlNF80khqXIcj180r5zRuj tUhVLHArWO4WN/YabNL91U74v0gLRbOK032Jn9Eo= Received: from che-swdbs-01.qca.qualcomm.com (blr-c-bdr-fw-01_globalnat_allzones-outside.qualcomm.com [103.229.19.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) (Authenticated sender: mkenna@codeaurora.org) by smtp.codeaurora.org (Postfix) with ESMTPSA id 4A47F60452; Thu, 8 Aug 2019 13:03:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1565269395; bh=4dcx53SihBh0SwNFgo7/EpT1qRZDin9h0GYqU0WUw/g=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Am9mG0D23B502RSq17dFFv6ksrVBv1YOOzfpUPEGSuc6bMgunVyNIFbaG7QEKXfBM kVoo0CH9hlecJXclWG+EkcAWvePDBQnrdUHfy4E2xIyTUlNF80khqXIcj180r5zRuj tUhVLHArWO4WN/YabNL91U74v0gLRbOK032Jn9Eo= DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org 4A47F60452 Authentication-Results: pdx-caf-mail.web.codeaurora.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: pdx-caf-mail.web.codeaurora.org; spf=none smtp.mailfrom=mkenna@codeaurora.org From: Maharaja Kennadyrajan To: ath11k@lists.infradead.org Subject: [PATCH 03/15] ath11k: Rename ath11k_base struct from 'sc' to 'ab in ce.h Date: Thu, 8 Aug 2019 18:33:00 +0530 Message-Id: <1565269392-2838-4-git-send-email-mkenna@codeaurora.org> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1565269392-2838-1-git-send-email-mkenna@codeaurora.org> References: <1565269392-2838-1-git-send-email-mkenna@codeaurora.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190808_060315_863366_B73E473C X-CRM114-Status: UNSURE ( 9.67 ) X-CRM114-Notice: Please train this message. X-BeenThere: ath11k@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Maharaja Kennadyrajan MIME-Version: 1.0 Sender: "ath11k" Errors-To: ath11k-bounces+patchwork-ath11k=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP To avoid confusion and better readability, renamed the ath11k_base struct from 'sc' to 'ab' in ce.h file. Signed-off-by: Maharaja Kennadyrajan --- drivers/net/wireless/ath/ath11k/ce.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/net/wireless/ath/ath11k/ce.h b/drivers/net/wireless/ath/ath11k/ce.h index 9f25bad504e9..5cc3fea55e0f 100644 --- a/drivers/net/wireless/ath/ath11k/ce.h +++ b/drivers/net/wireless/ath/ath11k/ce.h @@ -143,7 +143,7 @@ struct ath11k_ce_ring { }; struct ath11k_ce_pipe { - struct ath11k_base *sc; + struct ath11k_base *ab; u16 pipe_num; unsigned int attr_flags; unsigned int buf_sz; @@ -177,10 +177,10 @@ void ath11k_ce_rx_replenish_retry(struct timer_list *t); void ath11k_ce_per_engine_service(struct ath11k_base *ab, u16 ce_id); int ath11k_ce_send(struct ath11k_base *ab, struct sk_buff *skb, u8 pipe_id, u16 transfer_id); -void ath11k_ce_rx_post_buf(struct ath11k_base *sc); -int ath11k_ce_init_pipes(struct ath11k_base *sc); -int ath11k_ce_alloc_pipes(struct ath11k_base *sc); -void ath11k_ce_free_pipes(struct ath11k_base *sc); +void ath11k_ce_rx_post_buf(struct ath11k_base *ab); +int ath11k_ce_init_pipes(struct ath11k_base *ab); +int ath11k_ce_alloc_pipes(struct ath11k_base *ab); +void ath11k_ce_free_pipes(struct ath11k_base *ab); int ath11k_ce_get_attr_flags(int ce_id); void ath11k_ce_poll_send_completed(struct ath11k_base *ab, u8 pipe_id); #endif From patchwork Thu Aug 8 13:03:01 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maharaja Kennadyrajan X-Patchwork-Id: 11084111 X-Patchwork-Delegate: kvalo@adurom.com Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 2FB7E14E5 for ; Thu, 8 Aug 2019 13:03:31 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 17ECE2873C for ; Thu, 8 Aug 2019 13:03:31 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 0C56F28B20; Thu, 8 Aug 2019 13:03:31 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id BA1152873C for ; Thu, 8 Aug 2019 13:03:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References: In-Reply-To:Message-Id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=gLqp99GzhoB4EmKRqXEIv6TWRV4kvuwA2KbPFkf/b48=; b=O6MPkJ/oUzMCeBph0gh6FH7Ax1 ce5E7UAYNUKJYx9jTr3LHvsN3TMLoQd7AqYxPpahfjTt7OLQFsg7HNZw5ruj8Tj6UIbXWjwCLaJPc 3mc8Zh0fEixqtytu895BX0zQVqi6tsmj97BTGphjA/K7xSrUndDki5Y0q5MXFCOfLL8Sfs3+EFUI6 +HTNqplqOhli9QjzeIc5u+OO0dY5VHqklSCmPxeTOZP23V9aB9E0kGeGZA5FpCd3cwZvOx7cqXTq7 2neVTUHQXRwCbEKVhOxREDTNMEalPZkr2wXu8wVU0HQniyPxJQGGXwxO+ZDCFDV+p850adHM23Q/E 4wkamVfw==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92 #3 (Red Hat Linux)) id 1hvi4l-0008CY-Ll; Thu, 08 Aug 2019 13:03:27 +0000 Received: from smtp.codeaurora.org ([198.145.29.96]) by bombadil.infradead.org with esmtps (Exim 4.92 #3 (Red Hat Linux)) id 1hvi4c-00084C-58 for ath11k@lists.infradead.org; Thu, 08 Aug 2019 13:03:20 +0000 Received: by smtp.codeaurora.org (Postfix, from userid 1000) id D28836083E; Thu, 8 Aug 2019 13:03:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1565269397; bh=2OkDcG9G8VawEm2U7b3JIUh/ybQsyGBhLq7PJB/6mQE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=hZn4spaxAhb/VepdbD9vkXWJF6LNSu7LH2vGjqsW+GCLZzJukG9HW1N9D2eXQUR9K xcIM8zV51juAo7c7HHr9ZLkgaw0r4Vldw87naxBsSBic0MkFS6SA0lS4r0zXRFFZ0H lc4eSPOivnxLGs3hqMzzLP9EClWWju4a2au+JTPI= Received: from che-swdbs-01.qca.qualcomm.com (blr-c-bdr-fw-01_globalnat_allzones-outside.qualcomm.com [103.229.19.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) (Authenticated sender: mkenna@codeaurora.org) by smtp.codeaurora.org (Postfix) with ESMTPSA id BC74660256; Thu, 8 Aug 2019 13:03:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1565269396; bh=2OkDcG9G8VawEm2U7b3JIUh/ybQsyGBhLq7PJB/6mQE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=TbDgdZR2Imu9dSfHbAnYPXK1TFSvEGU9/e2GGDowiF44J6LLRm9ToXbxSnJK1ob8s d2ImnasVMfEgv1jZuHV0zbSTJMXphb3jPO5oYVqEpZNyFZ5ZA9NQqxNsMP1LmwF/e4 iTAb5eo0AYLSTAzVQduHx1GgxIhIXxF+76zIMdPE= DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org BC74660256 Authentication-Results: pdx-caf-mail.web.codeaurora.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: pdx-caf-mail.web.codeaurora.org; spf=none smtp.mailfrom=mkenna@codeaurora.org From: Maharaja Kennadyrajan To: ath11k@lists.infradead.org Subject: [PATCH 04/15] ath11k: Rename ath11k_base struct from 'sc' to 'ab in core.c Date: Thu, 8 Aug 2019 18:33:01 +0530 Message-Id: <1565269392-2838-5-git-send-email-mkenna@codeaurora.org> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1565269392-2838-1-git-send-email-mkenna@codeaurora.org> References: <1565269392-2838-1-git-send-email-mkenna@codeaurora.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190808_060318_541340_38DAB6B3 X-CRM114-Status: GOOD ( 14.82 ) X-BeenThere: ath11k@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Maharaja Kennadyrajan MIME-Version: 1.0 Sender: "ath11k" Errors-To: ath11k-bounces+patchwork-ath11k=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP To avoid confusion and better readability, renamed the ath11k_base struct from 'sc' to 'ab' in core.c file. Signed-off-by: Maharaja Kennadyrajan --- drivers/net/wireless/ath/ath11k/core.c | 328 ++++++++++++------------- 1 file changed, 164 insertions(+), 164 deletions(-) diff --git a/drivers/net/wireless/ath/ath11k/core.c b/drivers/net/wireless/ath/ath11k/core.c index 2e523afc4da8..9324dcb45bbe 100644 --- a/drivers/net/wireless/ath/ath11k/core.c +++ b/drivers/net/wireless/ath/ath11k/core.c @@ -43,7 +43,7 @@ u8 ath11k_core_get_hw_mac_id(struct ath11k_base *ab, int pdev_idx) } } -static int ath11k_core_create_board_name(struct ath11k_base *sc, char *name, +static int ath11k_core_create_board_name(struct ath11k_base *ab, char *name, size_t name_len) { /* Note: bus is fixed to ahb. When other bus type supported, @@ -51,15 +51,15 @@ static int ath11k_core_create_board_name(struct ath11k_base *sc, char *name, */ scnprintf(name, name_len, "bus=ahb,qmi-chip-id=%d,qmi-board-id=%d", - sc->qmi.target.chip_id, - sc->qmi.target.board_id); + ab->qmi.target.chip_id, + ab->qmi.target.board_id); - ath11k_dbg(sc, ATH11K_DBG_BOOT, "boot using board name '%s'\n", name); + ath11k_dbg(ab, ATH11K_DBG_BOOT, "boot using board name '%s'\n", name); return 0; } -static const struct firmware *ath11k_fetch_fw_file(struct ath11k_base *sc, +static const struct firmware *ath11k_fetch_fw_file(struct ath11k_base *ab, const char *dir, const char *file) { @@ -74,19 +74,19 @@ static const struct firmware *ath11k_fetch_fw_file(struct ath11k_base *sc, dir = "."; snprintf(filename, sizeof(filename), "%s/%s", dir, file); - ret = firmware_request_nowarn(&fw, filename, sc->dev); - ath11k_dbg(sc, ATH11K_DBG_BOOT, "boot fw request '%s': %d\n", + ret = firmware_request_nowarn(&fw, filename, ab->dev); + ath11k_dbg(ab, ATH11K_DBG_BOOT, "boot fw request '%s': %d\n", filename, ret); if (ret) return ERR_PTR(ret); - ath11k_warn(sc, "Downloading BDF: %s, size: %zu\n", + ath11k_warn(ab, "Downloading BDF: %s, size: %zu\n", filename, fw->size); return fw; } -void ath11k_core_free_bdf(struct ath11k_base *sc, struct ath11k_board_data *bd) +void ath11k_core_free_bdf(struct ath11k_base *ab, struct ath11k_board_data *bd) { if (!IS_ERR(bd->fw)) release_firmware(bd->fw); @@ -94,7 +94,7 @@ void ath11k_core_free_bdf(struct ath11k_base *sc, struct ath11k_board_data *bd) memset(bd, 0, sizeof(*bd)); } -static int ath11k_core_parse_bd_ie_board(struct ath11k_base *sc, +static int ath11k_core_parse_bd_ie_board(struct ath11k_base *ab, struct ath11k_board_data *bd, const void *buf, size_t buf_len, const char *boardname, @@ -119,7 +119,7 @@ static int ath11k_core_parse_bd_ie_board(struct ath11k_base *sc, buf += sizeof(*hdr); if (buf_len < ALIGN(board_ie_len, 4)) { - ath11k_err(sc, "invalid ATH11K_BD_IE_BOARD length: %zu < %zu\n", + ath11k_err(ab, "invalid ATH11K_BD_IE_BOARD length: %zu < %zu\n", buf_len, ALIGN(board_ie_len, 4)); ret = -EINVAL; goto out; @@ -127,7 +127,7 @@ static int ath11k_core_parse_bd_ie_board(struct ath11k_base *sc, switch (board_ie_id) { case ATH11K_BD_IE_BOARD_NAME: - ath11k_dbg_dump(sc, ATH11K_DBG_BOOT, "board name", "", + ath11k_dbg_dump(ab, ATH11K_DBG_BOOT, "board name", "", board_ie_data, board_ie_len); if (board_ie_len != strlen(boardname)) @@ -138,7 +138,7 @@ static int ath11k_core_parse_bd_ie_board(struct ath11k_base *sc, break; name_match_found = true; - ath11k_dbg(sc, ATH11K_DBG_BOOT, + ath11k_dbg(ab, ATH11K_DBG_BOOT, "boot found match for name '%s'", boardname); break; @@ -147,7 +147,7 @@ static int ath11k_core_parse_bd_ie_board(struct ath11k_base *sc, /* no match found */ break; - ath11k_dbg(sc, ATH11K_DBG_BOOT, + ath11k_dbg(ab, ATH11K_DBG_BOOT, "boot found board data for '%s'", boardname); bd->data = board_ie_data; @@ -156,7 +156,7 @@ static int ath11k_core_parse_bd_ie_board(struct ath11k_base *sc, ret = 0; goto out; default: - ath11k_warn(sc, "unknown ATH11K_BD_IE_BOARD found: %d\n", + ath11k_warn(ab, "unknown ATH11K_BD_IE_BOARD found: %d\n", board_ie_id); break; } @@ -175,7 +175,7 @@ static int ath11k_core_parse_bd_ie_board(struct ath11k_base *sc, return ret; } -static int ath11k_core_fetch_board_data_api_n(struct ath11k_base *sc, +static int ath11k_core_fetch_board_data_api_n(struct ath11k_base *ab, struct ath11k_board_data *bd, const char *boardname) { @@ -187,8 +187,8 @@ static int ath11k_core_fetch_board_data_api_n(struct ath11k_base *sc, int ret, ie_id; if (!bd->fw) - bd->fw = ath11k_fetch_fw_file(sc, - sc->hw_params.fw.dir, + bd->fw = ath11k_fetch_fw_file(ab, + ab->hw_params.fw.dir, filename); if (IS_ERR(bd->fw)) return PTR_ERR(bd->fw); @@ -199,14 +199,14 @@ static int ath11k_core_fetch_board_data_api_n(struct ath11k_base *sc, /* magic has extra null byte padded */ magic_len = strlen(ATH11K_BOARD_MAGIC) + 1; if (len < magic_len) { - ath11k_err(sc, "failed to find magic value in %s/%s, file too short: %zu\n", - sc->hw_params.fw.dir, filename, len); + ath11k_err(ab, "failed to find magic value in %s/%s, file too short: %zu\n", + ab->hw_params.fw.dir, filename, len); ret = -EINVAL; goto err; } if (memcmp(data, ATH11K_BOARD_MAGIC, magic_len)) { - ath11k_err(sc, "found invalid board magic\n"); + ath11k_err(ab, "found invalid board magic\n"); ret = -EINVAL; goto err; } @@ -214,8 +214,8 @@ static int ath11k_core_fetch_board_data_api_n(struct ath11k_base *sc, /* magic is padded to 4 bytes */ magic_len = ALIGN(magic_len, 4); if (len < magic_len) { - ath11k_err(sc, "failed: %s/%s too small to contain board data, len: %zu\n", - sc->hw_params.fw.dir, filename, len); + ath11k_err(ab, "failed: %s/%s too small to contain board data, len: %zu\n", + ab->hw_params.fw.dir, filename, len); ret = -EINVAL; goto err; } @@ -232,14 +232,14 @@ static int ath11k_core_fetch_board_data_api_n(struct ath11k_base *sc, data = hdr->data; if (len < ALIGN(ie_len, 4)) { - ath11k_err(sc, "invalid length for board ie_id %d ie_len %zu len %zu\n", + ath11k_err(ab, "invalid length for board ie_id %d ie_len %zu len %zu\n", ie_id, ie_len, len); return -EINVAL; } switch (ie_id) { case ATH11K_BD_IE_BOARD: - ret = ath11k_core_parse_bd_ie_board(sc, bd, data, + ret = ath11k_core_parse_bd_ie_board(ab, bd, data, ie_len, boardname, ATH11K_BD_IE_BOARD); @@ -262,9 +262,9 @@ static int ath11k_core_fetch_board_data_api_n(struct ath11k_base *sc, out: if (!bd->data || !bd->len) { - ath11k_err(sc, + ath11k_err(ab, "failed to fetch board data for %s from %s/%s\n", - boardname, sc->hw_params.fw.dir, filename); + boardname, ab->hw_params.fw.dir, filename); ret = -ENODATA; goto err; } @@ -272,15 +272,15 @@ static int ath11k_core_fetch_board_data_api_n(struct ath11k_base *sc, return 0; err: - ath11k_core_free_bdf(sc, bd); + ath11k_core_free_bdf(ab, bd); return ret; } -static int ath11k_core_fetch_board_data_api_1(struct ath11k_base *sc, +static int ath11k_core_fetch_board_data_api_1(struct ath11k_base *ab, struct ath11k_board_data *bd) { - bd->fw = ath11k_fetch_fw_file(sc, - sc->hw_params.fw.dir, + bd->fw = ath11k_fetch_fw_file(ab, + ab->hw_params.fw.dir, ATH11K_DEFAULT_BOARD_FILE); if (IS_ERR(bd->fw)) return PTR_ERR(bd->fw); @@ -292,192 +292,192 @@ static int ath11k_core_fetch_board_data_api_1(struct ath11k_base *sc, } #define BOARD_NAME_SIZE 100 -int ath11k_core_fetch_bdf(struct ath11k_base *sc, struct ath11k_board_data *bd) +int ath11k_core_fetch_bdf(struct ath11k_base *ab, struct ath11k_board_data *bd) { char boardname[BOARD_NAME_SIZE]; int ret; - ret = ath11k_core_create_board_name(sc, boardname, BOARD_NAME_SIZE); + ret = ath11k_core_create_board_name(ab, boardname, BOARD_NAME_SIZE); if (ret) { - ath11k_err(sc, "failed to create board name: %d", ret); + ath11k_err(ab, "failed to create board name: %d", ret); return ret; } - sc->bd_api = 2; - ret = ath11k_core_fetch_board_data_api_n(sc, bd, boardname); + ab->bd_api = 2; + ret = ath11k_core_fetch_board_data_api_n(ab, bd, boardname); if (!ret) goto success; - sc->bd_api = 1; - ret = ath11k_core_fetch_board_data_api_1(sc, bd); + ab->bd_api = 1; + ret = ath11k_core_fetch_board_data_api_1(ab, bd); if (ret) { - ath11k_err(sc, "failed to fetch board-2.bin or board.bin from %s\n", - sc->hw_params.fw.dir); + ath11k_err(ab, "failed to fetch board-2.bin or board.bin from %s\n", + ab->hw_params.fw.dir); return ret; } success: - ath11k_dbg(sc, ATH11K_DBG_BOOT, "using board api %d\n", sc->bd_api); + ath11k_dbg(ab, ATH11K_DBG_BOOT, "using board api %d\n", ab->bd_api); return 0; } -static void ath11k_core_stop(struct ath11k_base *sc) +static void ath11k_core_stop(struct ath11k_base *ab) { - if (!test_bit(ATH11K_FLAG_CRASH_FLUSH, &sc->dev_flags)) - ath11k_qmi_firmware_stop(sc); - ath11k_ahb_stop(sc); - ath11k_wmi_detach(sc); + if (!test_bit(ATH11K_FLAG_CRASH_FLUSH, &ab->dev_flags)) + ath11k_qmi_firmware_stop(ab); + ath11k_ahb_stop(ab); + ath11k_wmi_detach(ab); /* De-Init of components as needed */ } -static int ath11k_core_soc_create(struct ath11k_base *sc) +static int ath11k_core_soc_create(struct ath11k_base *ab) { int ret; - ret = ath11k_qmi_init_service(sc); + ret = ath11k_qmi_init_service(ab); if (ret) { - ath11k_err(sc, "failed to initialize qmi :%d\n", ret); + ath11k_err(ab, "failed to initialize qmi :%d\n", ret); return ret; } - ret = ath11k_debug_soc_create(sc); + ret = ath11k_debug_soc_create(ab); if (ret) { - ath11k_err(sc, "failed to create ath11k debugfs\n"); + ath11k_err(ab, "failed to create ath11k debugfs\n"); goto err_qmi_deinit; } - ret = ath11k_ahb_power_up(sc); + ret = ath11k_ahb_power_up(ab); if (ret) { - ath11k_err(sc, "failed to power up :%d\n", ret); + ath11k_err(ab, "failed to power up :%d\n", ret); goto err_debugfs_reg; } return 0; err_debugfs_reg: - ath11k_debug_soc_destroy(sc); + ath11k_debug_soc_destroy(ab); err_qmi_deinit: - ath11k_qmi_deinit_service(sc); + ath11k_qmi_deinit_service(ab); return ret; } -static void ath11k_core_soc_destroy(struct ath11k_base *sc) +static void ath11k_core_soc_destroy(struct ath11k_base *ab) { - ath11k_debug_soc_destroy(sc); - ath11k_dp_free(sc); - ath11k_reg_free(sc); - ath11k_qmi_deinit_service(sc); + ath11k_debug_soc_destroy(ab); + ath11k_dp_free(ab); + ath11k_reg_free(ab); + ath11k_qmi_deinit_service(ab); } -static int ath11k_core_pdev_create(struct ath11k_base *sc) +static int ath11k_core_pdev_create(struct ath11k_base *ab) { int ret; - ret = ath11k_mac_create(sc); + ret = ath11k_mac_create(ab); if (ret) { - ath11k_err(sc, "failed to create new hw device with mac80211 :%d\n", + ath11k_err(ab, "failed to create new hw device with mac80211 :%d\n", ret); return ret; } - ret = ath11k_dp_pdev_alloc(sc); + ret = ath11k_dp_pdev_alloc(ab); if (ret) { - ath11k_err(sc, "failed to attach DP pdev: %d\n", ret); + ath11k_err(ab, "failed to attach DP pdev: %d\n", ret); goto err_mac_destroy; } return 0; err_mac_destroy: - ath11k_mac_destroy(sc); + ath11k_mac_destroy(ab); return ret; } -static void ath11k_core_pdev_destroy(struct ath11k_base *sc) +static void ath11k_core_pdev_destroy(struct ath11k_base *ab) { - ath11k_mac_unregister(sc); - ath11k_ahb_ext_irq_disable(sc); - ath11k_dp_pdev_free(sc); + ath11k_mac_unregister(ab); + ath11k_ahb_ext_irq_disable(ab); + ath11k_dp_pdev_free(ab); } -static int ath11k_core_start(struct ath11k_base *sc, +static int ath11k_core_start(struct ath11k_base *ab, enum ath11k_firmware_mode mode) { int ret; - ret = ath11k_qmi_firmware_start(sc, mode); + ret = ath11k_qmi_firmware_start(ab, mode); if (ret) { - ath11k_err(sc, "failed to attach wmi: %d\n", ret); + ath11k_err(ab, "failed to attach wmi: %d\n", ret); return ret; } - ret = ath11k_wmi_attach(sc); + ret = ath11k_wmi_attach(ab); if (ret) { - ath11k_err(sc, "failed to attach wmi: %d\n", ret); + ath11k_err(ab, "failed to attach wmi: %d\n", ret); goto err_firmware_stop; } - ret = ath11k_htc_init(sc); + ret = ath11k_htc_init(ab); if (ret) { - ath11k_err(sc, "failed to init htc: %d\n", ret); + ath11k_err(ab, "failed to init htc: %d\n", ret); goto err_wmi_detach; } - ret = ath11k_ahb_start(sc); + ret = ath11k_ahb_start(ab); if (ret) { - ath11k_err(sc, "failed to start HIF: %d\n", ret); + ath11k_err(ab, "failed to start HIF: %d\n", ret); goto err_wmi_detach; } - ret = ath11k_htc_wait_target(&sc->htc); + ret = ath11k_htc_wait_target(&ab->htc); if (ret) { - ath11k_err(sc, "failed to connect to HTC: %d\n", ret); + ath11k_err(ab, "failed to connect to HTC: %d\n", ret); goto err_hif_stop; } - ret = ath11k_dp_htt_connect(&sc->dp); + ret = ath11k_dp_htt_connect(&ab->dp); if (ret) { - ath11k_err(sc, "failed to connect to HTT: %d\n", ret); + ath11k_err(ab, "failed to connect to HTT: %d\n", ret); goto err_hif_stop; } - ret = ath11k_wmi_connect(sc); + ret = ath11k_wmi_connect(ab); if (ret) { - ath11k_err(sc, "failed to connect wmi: %d\n", ret); + ath11k_err(ab, "failed to connect wmi: %d\n", ret); goto err_hif_stop; } - ret = ath11k_htc_start(&sc->htc); + ret = ath11k_htc_start(&ab->htc); if (ret) { - ath11k_err(sc, "failed to start HTC: %d\n", ret); + ath11k_err(ab, "failed to start HTC: %d\n", ret); goto err_hif_stop; } - ret = ath11k_wmi_wait_for_service_ready(sc); + ret = ath11k_wmi_wait_for_service_ready(ab); if (ret) { - ath11k_err(sc, "failed to receive wmi service ready event: %d\n", + ath11k_err(ab, "failed to receive wmi service ready event: %d\n", ret); goto err_hif_stop; } - ret = ath11k_wmi_cmd_init(sc); + ret = ath11k_wmi_cmd_init(ab); if (ret) { - ath11k_err(sc, "failed to send wmi init cmd: %d\n", ret); + ath11k_err(ab, "failed to send wmi init cmd: %d\n", ret); goto err_hif_stop; } - ret = ath11k_wmi_wait_for_unified_ready(sc); + ret = ath11k_wmi_wait_for_unified_ready(ab); if (ret) { - ath11k_err(sc, "failed to receive wmi unified ready event: %d\n", + ath11k_err(ab, "failed to receive wmi unified ready event: %d\n", ret); goto err_hif_stop; } - ret = ath11k_dp_tx_htt_h2t_ver_req_msg(sc); + ret = ath11k_dp_tx_htt_h2t_ver_req_msg(ab); if (ret) { - ath11k_err(sc, "failed to send htt version request message: %d\n", + ath11k_err(ab, "failed to send htt version request message: %d\n", ret); goto err_hif_stop; } @@ -485,11 +485,11 @@ static int ath11k_core_start(struct ath11k_base *sc, return 0; err_hif_stop: - ath11k_ahb_stop(sc); + ath11k_ahb_stop(ab); err_wmi_detach: - ath11k_wmi_detach(sc); + ath11k_wmi_detach(ab); err_firmware_stop: - ath11k_qmi_firmware_stop(sc); + ath11k_qmi_firmware_stop(ab); return ret; } @@ -534,44 +534,44 @@ int ath11k_core_qmi_firmware_ready(struct ath11k_base *ab) return ret; } -static int ath11k_core_reconfigure_on_crash(struct ath11k_base *sc) +static int ath11k_core_reconfigure_on_crash(struct ath11k_base *ab) { int ret; - mutex_lock(&sc->core_lock); - ath11k_ahb_ext_irq_disable(sc); - ath11k_dp_pdev_free(sc); - ath11k_ahb_stop(sc); - ath11k_wmi_detach(sc); - mutex_unlock(&sc->core_lock); + mutex_lock(&ab->core_lock); + ath11k_ahb_ext_irq_disable(ab); + ath11k_dp_pdev_free(ab); + ath11k_ahb_stop(ab); + ath11k_wmi_detach(ab); + mutex_unlock(&ab->core_lock); - ath11k_dp_free(sc); - ath11k_hal_srng_deinit(sc); + ath11k_dp_free(ab); + ath11k_hal_srng_deinit(ab); - sc->free_vdev_map = (1LL << (sc->num_radios * TARGET_NUM_VDEVS)) - 1; + ab->free_vdev_map = (1LL << (ab->num_radios * TARGET_NUM_VDEVS)) - 1; - ret = ath11k_hal_srng_init(sc); + ret = ath11k_hal_srng_init(ab); if (ret) return ret; - clear_bit(ATH11K_FLAG_CRASH_FLUSH, &sc->dev_flags); + clear_bit(ATH11K_FLAG_CRASH_FLUSH, &ab->dev_flags); - ret = ath11k_core_qmi_firmware_ready(sc); + ret = ath11k_core_qmi_firmware_ready(ab); if (ret) goto err_hal_srng_deinit; - clear_bit(ATH11K_FLAG_RECOVERY, &sc->dev_flags); + clear_bit(ATH11K_FLAG_RECOVERY, &ab->dev_flags); return 0; err_hal_srng_deinit: - ath11k_hal_srng_deinit(sc); + ath11k_hal_srng_deinit(ab); return ret; } void ath11k_core_halt(struct ath11k *ar) { - struct ath11k_base *sc = ar->ab; + struct ath11k_base *ab = ar->ab; lockdep_assert_held(&ar->conf_mutex); @@ -582,7 +582,7 @@ void ath11k_core_halt(struct ath11k *ar) cancel_delayed_work_sync(&ar->scan.timeout); cancel_work_sync(&ar->regd_update_work); - rcu_assign_pointer(sc->pdevs_active[ar->pdev_idx], NULL); + rcu_assign_pointer(ab->pdevs_active[ar->pdev_idx], NULL); synchronize_rcu(); INIT_LIST_HEAD(&ar->arvifs); idr_init(&ar->txmgmt_idr); @@ -590,17 +590,17 @@ void ath11k_core_halt(struct ath11k *ar) static void ath11k_core_restart(struct work_struct *work) { - struct ath11k_base *sc = container_of(work, struct ath11k_base, restart_work); + struct ath11k_base *ab = container_of(work, struct ath11k_base, restart_work); struct ath11k *ar; struct ath11k_pdev *pdev; int i, ret = 0; - spin_lock_bh(&sc->base_lock); - sc->stats.fw_crash_counter++; - spin_unlock_bh(&sc->base_lock); + spin_lock_bh(&ab->base_lock); + ab->stats.fw_crash_counter++; + spin_unlock_bh(&ab->base_lock); - for (i = 0; i < sc->num_radios; i++) { - pdev = &sc->pdevs[i]; + for (i = 0; i < ab->num_radios; i++) { + pdev = &ab->pdevs[i]; ar = pdev->ar; if (!ar || ar->state == ATH11K_STATE_OFF) continue; @@ -620,17 +620,17 @@ static void ath11k_core_restart(struct work_struct *work) idr_destroy(&ar->txmgmt_idr); } - wake_up(&sc->wmi_sc.tx_credits_wq); - wake_up(&sc->peer_mapping_wq); + wake_up(&ab->wmi_sc.tx_credits_wq); + wake_up(&ab->peer_mapping_wq); - ret = ath11k_core_reconfigure_on_crash(sc); + ret = ath11k_core_reconfigure_on_crash(ab); if (ret) { - ath11k_err(sc, "failed to reconfigure driver on crash recovery\n"); + ath11k_err(ab, "failed to reconfigure driver on crash recovery\n"); return; } - for (i = 0; i < sc->num_radios; i++) { - pdev = &sc->pdevs[i]; + for (i = 0; i < ab->num_radios; i++) { + pdev = &ab->pdevs[i]; ar = pdev->ar; if (!ar || ar->state == ATH11K_STATE_OFF) continue; @@ -644,7 +644,7 @@ static void ath11k_core_restart(struct work_struct *work) ieee80211_restart_hw(ar->hw); break; case ATH11K_STATE_OFF: - ath11k_warn(sc, + ath11k_warn(ab, "cannot restart radio %d that hasn't been started\n", i); break; @@ -654,91 +654,91 @@ static void ath11k_core_restart(struct work_struct *work) ar->state = ATH11K_STATE_WEDGED; /* fall through */ case ATH11K_STATE_WEDGED: - ath11k_warn(sc, + ath11k_warn(ab, "device is wedged, will not restart radio %d\n", i); break; } mutex_unlock(&ar->conf_mutex); } - complete(&sc->driver_recovery); + complete(&ab->driver_recovery); } -int ath11k_core_init(struct ath11k_base *sc) +int ath11k_core_init(struct ath11k_base *ab) { - struct device *dev = sc->dev; + struct device *dev = ab->dev; struct rproc *prproc; phandle rproc_phandle; int ret; if (of_property_read_u32(dev->of_node, "qcom,rproc", &rproc_phandle)) { - ath11k_err(sc, "failed to get q6_rproc handle\n"); + ath11k_err(ab, "failed to get q6_rproc handle\n"); return -ENOENT; } prproc = rproc_get_by_phandle(rproc_phandle); if (!prproc) { - ath11k_err(sc, "failed to get rproc\n"); + ath11k_err(ab, "failed to get rproc\n"); return -EINVAL; } - sc->tgt_rproc = prproc; - sc->hw_params = ath11k_hw_params; + ab->tgt_rproc = prproc; + ab->hw_params = ath11k_hw_params; - ret = ath11k_core_soc_create(sc); + ret = ath11k_core_soc_create(ab); if (ret) { - ath11k_err(sc, "failed to create soc core: %d\n", ret); + ath11k_err(ab, "failed to create soc core: %d\n", ret); return ret; } return 0; } -void ath11k_core_deinit(struct ath11k_base *sc) +void ath11k_core_deinit(struct ath11k_base *ab) { - mutex_lock(&sc->core_lock); + mutex_lock(&ab->core_lock); - ath11k_core_pdev_destroy(sc); - ath11k_core_stop(sc); + ath11k_core_pdev_destroy(ab); + ath11k_core_stop(ab); - mutex_unlock(&sc->core_lock); + mutex_unlock(&ab->core_lock); - ath11k_ahb_power_down(sc); - ath11k_mac_destroy(sc); - ath11k_core_soc_destroy(sc); + ath11k_ahb_power_down(ab); + ath11k_mac_destroy(ab); + ath11k_core_soc_destroy(ab); } -void ath11k_core_free(struct ath11k_base *sc) +void ath11k_core_free(struct ath11k_base *ab) { - kfree(sc); + kfree(ab); } struct ath11k_base *ath11k_core_alloc(struct device *dev) { - struct ath11k_base *sc; + struct ath11k_base *ab; - sc = kzalloc(sizeof(*sc), GFP_KERNEL); - if (!sc) + ab = kzalloc(sizeof(*ab), GFP_KERNEL); + if (!ab) return NULL; - init_completion(&sc->driver_recovery); + init_completion(&ab->driver_recovery); - sc->workqueue = create_singlethread_workqueue("ath11k_wq"); - if (!sc->workqueue) + ab->workqueue = create_singlethread_workqueue("ath11k_wq"); + if (!ab->workqueue) goto err_sc_free; - mutex_init(&sc->core_lock); - spin_lock_init(&sc->base_lock); + mutex_init(&ab->core_lock); + spin_lock_init(&ab->base_lock); - INIT_LIST_HEAD(&sc->peers); - init_waitqueue_head(&sc->peer_mapping_wq); - init_waitqueue_head(&sc->wmi_sc.tx_credits_wq); - INIT_WORK(&sc->restart_work, ath11k_core_restart); - timer_setup(&sc->rx_replenish_retry, ath11k_ce_rx_replenish_retry, 0); - sc->dev = dev; + INIT_LIST_HEAD(&ab->peers); + init_waitqueue_head(&ab->peer_mapping_wq); + init_waitqueue_head(&ab->wmi_sc.tx_credits_wq); + INIT_WORK(&ab->restart_work, ath11k_core_restart); + timer_setup(&ab->rx_replenish_retry, ath11k_ce_rx_replenish_retry, 0); + ab->dev = dev; - return sc; + return ab; err_sc_free: - kfree(sc); + kfree(ab); return NULL; } From patchwork Thu Aug 8 13:03:02 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maharaja Kennadyrajan X-Patchwork-Id: 11084109 X-Patchwork-Delegate: kvalo@adurom.com Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id CBC5E17E0 for ; Thu, 8 Aug 2019 13:03:28 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id BB14C288B5 for ; Thu, 8 Aug 2019 13:03:28 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id B940D28B20; Thu, 8 Aug 2019 13:03:28 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 6E83D289BD for ; Thu, 8 Aug 2019 13:03:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References: In-Reply-To:Message-Id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=lsgE92Yeu2eyhsGQxmJRy1RxaswvmbVrirFOpZt4omY=; b=g4ZoZc/AVm3/USV6yTTr9zE9hK Uol9h4m0y0iZNMHQ5LHDnKDZ3mB+WF5evm5Q7QCyvuusdV5Ech95xDrDaBrRebBIwNUPhW16rCcBb xvF5nKbDyWcXSTu2TOKh/aze2MKfL4YcGNP7mXW7mZyTJvkrVpY6P2zIx54fVpNfKONZSCRWGmlrv NoM9zsnEz2KIS0XKLS7lF5/LQnjreha9loh7zy1gq6yR/F6/e5roz/k9kSdywmpAsqHJ/AhUNtqhi 0v61b3/xnzD3+/NdtNFFDzzcKlOmGgUVr0dsU0qSJjxWmFNVqhWMRqNZLKHTeMb59cGkToG45J3JU ZnoIMTRQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92 #3 (Red Hat Linux)) id 1hvi4k-0008BF-PE; Thu, 08 Aug 2019 13:03:26 +0000 Received: from smtp.codeaurora.org ([198.145.29.96]) by bombadil.infradead.org with esmtps (Exim 4.92 #3 (Red Hat Linux)) id 1hvi4c-00084N-Np for ath11k@lists.infradead.org; Thu, 08 Aug 2019 13:03:20 +0000 Received: by smtp.codeaurora.org (Postfix, from userid 1000) id 710CF608A5; Thu, 8 Aug 2019 13:03:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1565269398; bh=4t6NEf9TRfx9Pq9ZaNgkm8dn1MBzXLjlMWunEK167bY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=gatq+IB9wwF1hSpvsHrjM2Dm3P1YeKo6oR7t7EHBtWVpI7ErAY0w/ohfXZ5ZK0aBr dCqh13WFf1nY/pDpKZRhjreXy9uPdt9HIA40d7al+iji/YNBY/M2J85tLDL2XkZHQY cYumGClbk8TZsG2KruJlSex0+/nLAUsENLW2XP/4= Received: from che-swdbs-01.qca.qualcomm.com (blr-c-bdr-fw-01_globalnat_allzones-outside.qualcomm.com [103.229.19.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) (Authenticated sender: mkenna@codeaurora.org) by smtp.codeaurora.org (Postfix) with ESMTPSA id 3CD1A6074F; Thu, 8 Aug 2019 13:03:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1565269398; bh=4t6NEf9TRfx9Pq9ZaNgkm8dn1MBzXLjlMWunEK167bY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=gatq+IB9wwF1hSpvsHrjM2Dm3P1YeKo6oR7t7EHBtWVpI7ErAY0w/ohfXZ5ZK0aBr dCqh13WFf1nY/pDpKZRhjreXy9uPdt9HIA40d7al+iji/YNBY/M2J85tLDL2XkZHQY cYumGClbk8TZsG2KruJlSex0+/nLAUsENLW2XP/4= DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org 3CD1A6074F Authentication-Results: pdx-caf-mail.web.codeaurora.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: pdx-caf-mail.web.codeaurora.org; spf=none smtp.mailfrom=mkenna@codeaurora.org From: Maharaja Kennadyrajan To: ath11k@lists.infradead.org Subject: [PATCH 05/15] ath11k: Rename ath11k_base struct from 'sc' to 'ab in core.h Date: Thu, 8 Aug 2019 18:33:02 +0530 Message-Id: <1565269392-2838-6-git-send-email-mkenna@codeaurora.org> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1565269392-2838-1-git-send-email-mkenna@codeaurora.org> References: <1565269392-2838-1-git-send-email-mkenna@codeaurora.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190808_060319_252947_28CB1E0E X-CRM114-Status: UNSURE ( 9.16 ) X-CRM114-Notice: Please train this message. X-BeenThere: ath11k@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Maharaja Kennadyrajan MIME-Version: 1.0 Sender: "ath11k" Errors-To: ath11k-bounces+patchwork-ath11k=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP To avoid confusion and better readability, renamed the ath11k_base struct from 'sc' to 'ab' in core.h file. Signed-off-by: Maharaja Kennadyrajan --- drivers/net/wireless/ath/ath11k/core.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/wireless/ath/ath11k/core.h b/drivers/net/wireless/ath/ath11k/core.h index 79134c4fb2e7..55c636e33367 100644 --- a/drivers/net/wireless/ath/ath11k/core.h +++ b/drivers/net/wireless/ath/ath11k/core.h @@ -104,7 +104,7 @@ extern const u8 ath11k_host2rxdma_ring_mask[ATH11K_EXT_IRQ_GRP_NUM_MAX]; extern const u8 rx_mon_status_ring_mask[ATH11K_EXT_IRQ_GRP_NUM_MAX]; struct ath11k_ext_irq_grp { - struct ath11k_base *sc; + struct ath11k_base *ab; u32 irqs[ATH11K_EXT_IRQ_NUM_MAX]; u32 num_irq; u32 grp_id; @@ -783,7 +783,7 @@ struct ath11k_base *ath11k_core_alloc(struct device *dev); void ath11k_core_free(struct ath11k_base *ath11k); int ath11k_core_fetch_bdf(struct ath11k_base *ath11k, struct ath11k_board_data *bd); -void ath11k_core_free_bdf(struct ath11k_base *sc, struct ath11k_board_data *bd); +void ath11k_core_free_bdf(struct ath11k_base *ab, struct ath11k_board_data *bd); void ath11k_core_halt(struct ath11k *ar); u8 ath11k_core_get_hw_mac_id(struct ath11k_base *ab, int pdev_idx); From patchwork Thu Aug 8 13:03:03 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maharaja Kennadyrajan X-Patchwork-Id: 11084113 X-Patchwork-Delegate: kvalo@adurom.com Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 79AE617E0 for ; Thu, 8 Aug 2019 13:03:31 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 673DD28409 for ; Thu, 8 Aug 2019 13:03:31 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 5BFA828B20; Thu, 8 Aug 2019 13:03:31 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id ED66928849 for ; Thu, 8 Aug 2019 13:03:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References: In-Reply-To:Message-Id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=DDWusmOg3Ux7ORLLAtoReVRU1NhhuBtsjbMNWM1r8rs=; b=CU9L1kfMwCvKr7THP16sR9WyRx uyQYUim05IxmQrEfreL2TyA5V7wMsM58DgcAVcNuBbWRAAfUSyd4+isNKEr7pPHn+I+vBFI35socv vD88bvTjr9CCCXvkvVQzxU6QmEi7g5IPRIZJQ/2i+x9J1mfGgUOiUmJp14BeIizYwVyXJ2tDeP4YB SSkpuD6VQ7MPG+uMqGTdMbBGeA4wqiwfl0cAdVV31ohF9kg/ai0CzlF1JLI2UTvAxjMoiahbdnDMJ CKCyAej+CpdJyOdX8ex72Fp4zDVJjeLgs0HgV90nNVHTKY32ZBe9MXSyHFw/esqjRnP8l8h4BG0DJ tVqLO7uw==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92 #3 (Red Hat Linux)) id 1hvi4m-0008Dc-O2; Thu, 08 Aug 2019 13:03:28 +0000 Received: from smtp.codeaurora.org ([198.145.29.96]) by bombadil.infradead.org with esmtps (Exim 4.92 #3 (Red Hat Linux)) id 1hvi4e-00085D-8O for ath11k@lists.infradead.org; Thu, 08 Aug 2019 13:03:22 +0000 Received: by smtp.codeaurora.org (Postfix, from userid 1000) id EF5A7608FF; Thu, 8 Aug 2019 13:03:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1565269400; bh=87VYN6lpSyGktz6cowrb+nb2rSHcuJhV60MJdN9JwIs=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=JYXct5+KAbUk6QDftN9Ohnwe4u0QCKPvbyuxHNHlp/tNPr1NaPfrG5T4HqFaN6UgP Wy6MLXycsuHMJlNvOT45tkCmAfU4C32fyLGR+PkF8H5nbicWwHA3kyaM3NRn40/7rH T6E0N0VhG1IKyzBFLzMh98bf262e71gXxPVGa89w= Received: from che-swdbs-01.qca.qualcomm.com (blr-c-bdr-fw-01_globalnat_allzones-outside.qualcomm.com [103.229.19.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) (Authenticated sender: mkenna@codeaurora.org) by smtp.codeaurora.org (Postfix) with ESMTPSA id AEFEE607DE; Thu, 8 Aug 2019 13:03:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1565269399; bh=87VYN6lpSyGktz6cowrb+nb2rSHcuJhV60MJdN9JwIs=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=jaK9vM1ChASnvlS3A6S21xZrV0C7JaJyMlF9KGa7TnevotpUNZ1tBeGHi2z5836B5 SOSW1G6EHwOAxq+0Z8I0eEoTHPeuy/jxyu+tMMuEPRRcD9rTNLnbW48nSlX2Be98hF idrH1ogYQEaiC0cbxTalTZFMYiLab54R3Oy5wPXw= DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org AEFEE607DE Authentication-Results: pdx-caf-mail.web.codeaurora.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: pdx-caf-mail.web.codeaurora.org; spf=none smtp.mailfrom=mkenna@codeaurora.org From: Maharaja Kennadyrajan To: ath11k@lists.infradead.org Subject: [PATCH 06/15] ath11k: Rename ath11k_base struct from 'sc' to 'ab in debug.c Date: Thu, 8 Aug 2019 18:33:03 +0530 Message-Id: <1565269392-2838-7-git-send-email-mkenna@codeaurora.org> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1565269392-2838-1-git-send-email-mkenna@codeaurora.org> References: <1565269392-2838-1-git-send-email-mkenna@codeaurora.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190808_060321_000113_EE21336F X-CRM114-Status: UNSURE ( 8.62 ) X-CRM114-Notice: Please train this message. X-BeenThere: ath11k@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Maharaja Kennadyrajan MIME-Version: 1.0 Sender: "ath11k" Errors-To: ath11k-bounces+patchwork-ath11k=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP To avoid confusion and better readability, renamed the ath11k_base struct from 'sc' to 'ab' in debug.c file. Signed-off-by: Maharaja Kennadyrajan --- drivers/net/wireless/ath/ath11k/debug.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/net/wireless/ath/ath11k/debug.c b/drivers/net/wireless/ath/ath11k/debug.c index 4fd99417585c..e62a409185f4 100644 --- a/drivers/net/wireless/ath/ath11k/debug.c +++ b/drivers/net/wireless/ath/ath11k/debug.c @@ -12,7 +12,7 @@ #include "debug_htt_stats.h" #include "peer.h" -void ath11k_info(struct ath11k_base *sc, const char *fmt, ...) +void ath11k_info(struct ath11k_base *ab, const char *fmt, ...) { struct va_format vaf = { .fmt = fmt, @@ -21,12 +21,12 @@ void ath11k_info(struct ath11k_base *sc, const char *fmt, ...) va_start(args, fmt); vaf.va = &args; - dev_info(sc->dev, "%pV", &vaf); + dev_info(ab->dev, "%pV", &vaf); /* TODO: Trace the log */ va_end(args); } -void ath11k_err(struct ath11k_base *sc, const char *fmt, ...) +void ath11k_err(struct ath11k_base *ab, const char *fmt, ...) { struct va_format vaf = { .fmt = fmt, @@ -35,12 +35,12 @@ void ath11k_err(struct ath11k_base *sc, const char *fmt, ...) va_start(args, fmt); vaf.va = &args; - dev_err(sc->dev, "%pV", &vaf); + dev_err(ab->dev, "%pV", &vaf); /* TODO: Trace the log */ va_end(args); } -void ath11k_warn(struct ath11k_base *sc, const char *fmt, ...) +void ath11k_warn(struct ath11k_base *ab, const char *fmt, ...) { struct va_format vaf = { .fmt = fmt, @@ -49,7 +49,7 @@ void ath11k_warn(struct ath11k_base *sc, const char *fmt, ...) va_start(args, fmt); vaf.va = &args; - dev_warn_ratelimited(sc->dev, "%pV", &vaf); + dev_warn_ratelimited(ab->dev, "%pV", &vaf); /* TODO: Trace the log */ va_end(args); } From patchwork Thu Aug 8 13:03:04 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maharaja Kennadyrajan X-Patchwork-Id: 11084115 X-Patchwork-Delegate: kvalo@adurom.com Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 6A5E214DB for ; Thu, 8 Aug 2019 13:03:33 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 5885B28703 for ; Thu, 8 Aug 2019 13:03:33 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 4D44B28876; Thu, 8 Aug 2019 13:03:33 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id C27FA28849 for ; Thu, 8 Aug 2019 13:03:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References: In-Reply-To:Message-Id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=sCHkDopVgCWInLnkRK1WXgB/vBoAEgPr2AadWvKLmwU=; b=jJ9FwnANnvuj9AYbRPYNkqOIn7 1lQ/dUc+Symka0WQKeov+ua2seWSZvkDAbGC4N48LN17w/DgOxVWbsv9Z12rsgBie6Gccux98o9ua oLQpJGYHIdpcmmSQyCTWFCdONSSeUYihSOCunvbzz5nOpUvuX7nc5Y3r4giozU7OYWz4I9ZBYRIJa mOUI+RBtE3rXC2IU9g40CD7SvK0iY/Et3zxkPjJHA1R6DkXHm5juUveDCaS8fRknPfq27yIERg2vu oWoMm7ZagS3EttVH1OG5cllv2lzC9TB4Otnt9jV8RKWK8+6lR4hwzfrlvOQKdlc84II+qDGBDq3LV XBU8x5eA==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92 #3 (Red Hat Linux)) id 1hvi4o-0008Fh-67; Thu, 08 Aug 2019 13:03:30 +0000 Received: from smtp.codeaurora.org ([198.145.29.96]) by bombadil.infradead.org with esmtps (Exim 4.92 #3 (Red Hat Linux)) id 1hvi4f-00086A-NZ for ath11k@lists.infradead.org; Thu, 08 Aug 2019 13:03:23 +0000 Received: by smtp.codeaurora.org (Postfix, from userid 1000) id 75F0D6074F; Thu, 8 Aug 2019 13:03:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1565269401; bh=3sDwfCsqyQ2NiHmeNp2WBz6qRBcdD/3t29aGPVhd4JA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Xie5yACXfKE0cGxR2eoWZXzDPmPUNU9db/RHDjdYPd67sRc0/wV5X1m4WECQKjJc6 HYRg0s6OmKoWbMWWhQmnzi1Hpy6hIw6BTmTMca8taTywpV+0Hh64RGcooiXlg8s4Cn bnTsVfzHGJ47KvjgOAMoIMjqCfQCwG5GgVY4qUow= Received: from che-swdbs-01.qca.qualcomm.com (blr-c-bdr-fw-01_globalnat_allzones-outside.qualcomm.com [103.229.19.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) (Authenticated sender: mkenna@codeaurora.org) by smtp.codeaurora.org (Postfix) with ESMTPSA id 2D42D607DE; Thu, 8 Aug 2019 13:03:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1565269401; bh=3sDwfCsqyQ2NiHmeNp2WBz6qRBcdD/3t29aGPVhd4JA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Xie5yACXfKE0cGxR2eoWZXzDPmPUNU9db/RHDjdYPd67sRc0/wV5X1m4WECQKjJc6 HYRg0s6OmKoWbMWWhQmnzi1Hpy6hIw6BTmTMca8taTywpV+0Hh64RGcooiXlg8s4Cn bnTsVfzHGJ47KvjgOAMoIMjqCfQCwG5GgVY4qUow= DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org 2D42D607DE Authentication-Results: pdx-caf-mail.web.codeaurora.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: pdx-caf-mail.web.codeaurora.org; spf=none smtp.mailfrom=mkenna@codeaurora.org From: Maharaja Kennadyrajan To: ath11k@lists.infradead.org Subject: [PATCH 07/15] ath11k: Rename ath11k_base struct from 'sc' to 'ab in debug.h Date: Thu, 8 Aug 2019 18:33:04 +0530 Message-Id: <1565269392-2838-8-git-send-email-mkenna@codeaurora.org> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1565269392-2838-1-git-send-email-mkenna@codeaurora.org> References: <1565269392-2838-1-git-send-email-mkenna@codeaurora.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190808_060322_329304_377C8F8B X-CRM114-Status: UNSURE ( 8.74 ) X-CRM114-Notice: Please train this message. X-BeenThere: ath11k@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Maharaja Kennadyrajan MIME-Version: 1.0 Sender: "ath11k" Errors-To: ath11k-bounces+patchwork-ath11k=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP To avoid confusion and better readability, renamed the ath11k_base struct from 'sc' to 'ab' in debug.h file. Signed-off-by: Maharaja Kennadyrajan --- drivers/net/wireless/ath/ath11k/debug.h | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/drivers/net/wireless/ath/ath11k/debug.h b/drivers/net/wireless/ath/ath11k/debug.h index ce1f414a95e9..fac6cb4aa597 100644 --- a/drivers/net/wireless/ath/ath11k/debug.h +++ b/drivers/net/wireless/ath/ath11k/debug.h @@ -100,9 +100,9 @@ enum ath11k_pktlog_enum { ATH11K_PKTLOG_TYPE_LITE_RX = 24, }; -__printf(2, 3) void ath11k_info(struct ath11k_base *sc, const char *fmt, ...); -__printf(2, 3) void ath11k_err(struct ath11k_base *sc, const char *fmt, ...); -__printf(2, 3) void ath11k_warn(struct ath11k_base *sc, const char *fmt, ...); +__printf(2, 3) void ath11k_info(struct ath11k_base *ab, const char *fmt, ...); +__printf(2, 3) void ath11k_err(struct ath11k_base *ab, const char *fmt, ...); +__printf(2, 3) void ath11k_warn(struct ath11k_base *ab, const char *fmt, ...); extern unsigned int ath11k_debug_mask; @@ -131,8 +131,8 @@ static inline void ath11k_dbg_dump(struct ath11k_base *ab, #endif /* CONFIG_ATH11K_DEBUG */ #ifdef CONFIG_ATH11K_DEBUGFS -int ath11k_debug_soc_create(struct ath11k_base *sc); -void ath11k_debug_soc_destroy(struct ath11k_base *sc); +int ath11k_debug_soc_create(struct ath11k_base *ab); +void ath11k_debug_soc_destroy(struct ath11k_base *ab); int ath11k_debug_register(struct ath11k *ar); void ath11k_debug_unregister(struct ath11k *ar); void ath11k_dbg_htt_ext_stats_handler(struct ath11k_base *ab, @@ -168,12 +168,12 @@ static inline int ath11k_debug_is_extd_rx_stats_enabled(struct ath11k *ar) return ar->debug.extd_rx_stats; } #else -static inline int ath11k_debug_soc_create(struct ath11k_base *sc) +static inline int ath11k_debug_soc_create(struct ath11k_base *ab) { return 0; } -static inline void ath11k_debug_soc_destroy(struct ath11k_base *sc) +static inline void ath11k_debug_soc_destroy(struct ath11k_base *ab) { } From patchwork Thu Aug 8 13:03:05 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maharaja Kennadyrajan X-Patchwork-Id: 11084119 X-Patchwork-Delegate: kvalo@adurom.com Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id C3E8817E0 for ; Thu, 8 Aug 2019 13:03:35 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B07BD28B4D for ; Thu, 8 Aug 2019 13:03:35 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id A507C288D4; Thu, 8 Aug 2019 13:03:35 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 328E7288B5 for ; Thu, 8 Aug 2019 13:03:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References: In-Reply-To:Message-Id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=rEw+7Wbbhe5UmSARBlP0DLZpnIKAxpPCxAAo3nek5LM=; b=JYlTqgTuCupCKIJAOi63nBNr9C Wey3IhAzOvWo2b62QiFN0Ai6ukwH/J0OfzGaSrgx0VhgOsp4yp/K0ZotDjKB3nsIRMkNVoMXa5meB 9zcTHCyYvKYgjltLsDbPasPXnTzGKCFzm1QwV2RUXlolsc/SETa3R1K34LC0VvNQOK2/OO6EufiOi yhYhrRwXcjLXED4Gsjy5aGQIm6IZ3ZGoCol1lwFAGdraffqSISCWhYvN81U+VEXn5qGyPbJa+TcFg +wL9/OObEQGEiKPgt+OpGvKVGigONKgS3OkdxxF5cItBWu7kmunmPgfIuzKbOWi3GsauwOVUEJVQa DOuIUfrA==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92 #3 (Red Hat Linux)) id 1hvi4p-0008Gv-GO; Thu, 08 Aug 2019 13:03:31 +0000 Received: from smtp.codeaurora.org ([198.145.29.96]) by bombadil.infradead.org with esmtps (Exim 4.92 #3 (Red Hat Linux)) id 1hvi4h-00087K-Hm for ath11k@lists.infradead.org; Thu, 08 Aug 2019 13:03:25 +0000 Received: by smtp.codeaurora.org (Postfix, from userid 1000) id 44F1060A42; Thu, 8 Aug 2019 13:03:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1565269403; bh=5a5DrhfV2kWByBRqBoSTo0NBNqDfYRw+6m4hRhZEt+E=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=J++1hmigxHwyaT2QIJrq5VdWCAXA1IdFFOJYh4gb15QHEqPiEPa+D2Oxs9qWKFmn2 uznlnqjQaggGK3OSfN0xl0OtMyi18adA6iAf5/t1+XjTM+o5E0qElop4T1fobopgkT 1mbVTy8kR8ODp+QcnfAigykuDAJOOG1tAXyiulZc= Received: from che-swdbs-01.qca.qualcomm.com (blr-c-bdr-fw-01_globalnat_allzones-outside.qualcomm.com [103.229.19.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) (Authenticated sender: mkenna@codeaurora.org) by smtp.codeaurora.org (Postfix) with ESMTPSA id 9F69060867; Thu, 8 Aug 2019 13:03:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1565269402; bh=5a5DrhfV2kWByBRqBoSTo0NBNqDfYRw+6m4hRhZEt+E=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Ti66zQvkG82isdMOBkWwsco/6aQG5EsqLkokjM/BCyFNpJ/91dbHZNhwWO4avWR8f 7Cj7eagG30dowbOkxtHLv/rPVDOYRaCUkk+1vdeBpkXyGwn9m4d4QHKxYbO5RMPeY3 X4+5h0BWHHkWetyZ5r+pvNfjLEEYUdFXXGsuKT5M= DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org 9F69060867 Authentication-Results: pdx-caf-mail.web.codeaurora.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: pdx-caf-mail.web.codeaurora.org; spf=none smtp.mailfrom=mkenna@codeaurora.org From: Maharaja Kennadyrajan To: ath11k@lists.infradead.org Subject: [PATCH 08/15] ath11k: Rename ath11k_base struct from 'sc' to 'ab in dp.c Date: Thu, 8 Aug 2019 18:33:05 +0530 Message-Id: <1565269392-2838-9-git-send-email-mkenna@codeaurora.org> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1565269392-2838-1-git-send-email-mkenna@codeaurora.org> References: <1565269392-2838-1-git-send-email-mkenna@codeaurora.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190808_060323_756397_5A5CB910 X-CRM114-Status: GOOD ( 12.51 ) X-BeenThere: ath11k@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Maharaja Kennadyrajan MIME-Version: 1.0 Sender: "ath11k" Errors-To: ath11k-bounces+patchwork-ath11k=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP To avoid confusion and better readability, renamed the ath11k_base struct from 'sc' to 'ab' in dp.c file. Signed-off-by: Maharaja Kennadyrajan --- drivers/net/wireless/ath/ath11k/dp.c | 40 ++++++++++++++-------------- 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/drivers/net/wireless/ath/ath11k/dp.c b/drivers/net/wireless/ath/ath11k/dp.c index 18a354d75d00..b55d9d023a55 100644 --- a/drivers/net/wireless/ath/ath11k/dp.c +++ b/drivers/net/wireless/ath/ath11k/dp.c @@ -11,7 +11,7 @@ #include "dp_rx.h" #include "peer.h" -static void ath11k_dp_htt_htc_tx_complete(struct ath11k_base *sc, +static void ath11k_dp_htt_htc_tx_complete(struct ath11k_base *ab, struct sk_buff *skb) { dev_kfree_skb_any(skb); @@ -745,7 +745,7 @@ int ath11k_dp_htt_connect(struct ath11k_dp *dp) /* connect to control service */ conn_req.service_id = ATH11K_HTC_SVC_ID_HTT_DATA_MSG; - status = ath11k_htc_connect_service(&dp->sc->htc, &conn_req, + status = ath11k_htc_connect_service(&dp->ab->htc, &conn_req, &conn_resp); if (status) @@ -805,22 +805,22 @@ static int ath11k_dp_tx_pending_cleanup(int buf_id, void *skb, void *ctx) return 0; } -void ath11k_dp_free(struct ath11k_base *sc) +void ath11k_dp_free(struct ath11k_base *ab) { - struct ath11k_dp *dp = &sc->dp; + struct ath11k_dp *dp = &ab->dp; int i; - ath11k_dp_link_desc_cleanup(sc, dp->link_desc_banks, + ath11k_dp_link_desc_cleanup(ab, dp->link_desc_banks, HAL_WBM_IDLE_LINK, &dp->wbm_idle_ring); - ath11k_dp_srng_common_cleanup(sc); + ath11k_dp_srng_common_cleanup(ab); - ath11k_dp_reo_cmd_list_cleanup(sc); + ath11k_dp_reo_cmd_list_cleanup(ab); for (i = 0; i < DP_TCL_NUM_RING_MAX; i++) { spin_lock_bh(&dp->tx_ring[i].tx_idr_lock); idr_for_each(&dp->tx_ring[i].txbuf_idr, - ath11k_dp_tx_pending_cleanup, sc); + ath11k_dp_tx_pending_cleanup, ab); idr_destroy(&dp->tx_ring[i].txbuf_idr); spin_unlock_bh(&dp->tx_ring[i].tx_idr_lock); @@ -832,37 +832,37 @@ void ath11k_dp_free(struct ath11k_base *sc) /* Deinit any SOC level resource */ } -int ath11k_dp_alloc(struct ath11k_base *sc) +int ath11k_dp_alloc(struct ath11k_base *ab) { - struct ath11k_dp *dp = &sc->dp; + struct ath11k_dp *dp = &ab->dp; struct hal_srng *srng = NULL; size_t size = 0; u32 n_link_desc = 0; int ret; int i; - dp->sc = sc; + dp->ab = ab; INIT_LIST_HEAD(&dp->reo_cmd_list); INIT_LIST_HEAD(&dp->reo_cmd_cache_flush_list); spin_lock_init(&dp->reo_cmd_lock); - ret = ath11k_wbm_idle_ring_setup(sc, &n_link_desc); + ret = ath11k_wbm_idle_ring_setup(ab, &n_link_desc); if (ret) { - ath11k_warn(sc, "failed to setup wbm_idle_ring: %d\n", ret); + ath11k_warn(ab, "failed to setup wbm_idle_ring: %d\n", ret); return ret; } - srng = &sc->hal.srng_list[dp->wbm_idle_ring.ring_id]; + srng = &ab->hal.srng_list[dp->wbm_idle_ring.ring_id]; - ret = ath11k_dp_link_desc_setup(sc, dp->link_desc_banks, + ret = ath11k_dp_link_desc_setup(ab, dp->link_desc_banks, HAL_WBM_IDLE_LINK, srng, n_link_desc); if (ret) { - ath11k_warn(sc, "failed to setup link desc: %d\n", ret); + ath11k_warn(ab, "failed to setup link desc: %d\n", ret); return ret; } - ret = ath11k_dp_srng_common_setup(sc); + ret = ath11k_dp_srng_common_setup(ab); if (ret) goto fail_link_desc_cleanup; @@ -881,17 +881,17 @@ int ath11k_dp_alloc(struct ath11k_base *sc) } for (i = 0; i < HAL_DSCP_TID_MAP_TBL_NUM_ENTRIES_MAX; i++) - ath11k_hal_tx_set_dscp_tid_map(sc, i); + ath11k_hal_tx_set_dscp_tid_map(ab, i); /* Init any SOC level resource for DP */ return 0; fail_cmn_srng_cleanup: - ath11k_dp_srng_common_cleanup(sc); + ath11k_dp_srng_common_cleanup(ab); fail_link_desc_cleanup: - ath11k_dp_link_desc_cleanup(sc, dp->link_desc_banks, + ath11k_dp_link_desc_cleanup(ab, dp->link_desc_banks, HAL_WBM_IDLE_LINK, &dp->wbm_idle_ring); return ret; From patchwork Thu Aug 8 13:03:06 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maharaja Kennadyrajan X-Patchwork-Id: 11084117 X-Patchwork-Delegate: kvalo@adurom.com Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 98CAF14DB for ; Thu, 8 Aug 2019 13:03:35 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 88E2328B20 for ; Thu, 8 Aug 2019 13:03:35 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 7DA0428B45; Thu, 8 Aug 2019 13:03:35 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id E2D1828B20 for ; Thu, 8 Aug 2019 13:03:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References: In-Reply-To:Message-Id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=MdguzpUtPD2zJV+va4roLQEaEa+R2QNw5fsiWwM4dqI=; b=N1YV5zZLKXZlVTXn5HDnY6mA6N ECEIiH9RN0QVF7VjwMmxr+kzdyS6zQIVRlYVh9RqIncN9iGk7+u0BOTU+85WVCff4l/OOtRexQtM+ 2y18LiiNpmqXlR+BJL5M0ka5gx3DDdAoKwexEisy14e5zv5dTa6qOfhiqbWFGB+E+O5j0n6h0Plwp i1RqsitCIeaiA1tM0hykTob5BHmAk73JJGGo3royjvzx3jFsAL4s7FZ8o9XZwzjeFdnrUEALmTGRM eAVeK6Nw/3Jty7KPu/PoxHhynaklhQLZlndU5N10MTV+aUM5NTvifJYHBmyBx7elp6iqoU/JAEih5 +GyFByig==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92 #3 (Red Hat Linux)) id 1hvi4q-0008He-7Y; Thu, 08 Aug 2019 13:03:32 +0000 Received: from smtp.codeaurora.org ([198.145.29.96]) by bombadil.infradead.org with esmtps (Exim 4.92 #3 (Red Hat Linux)) id 1hvi4i-00088v-TP for ath11k@lists.infradead.org; Thu, 08 Aug 2019 13:03:26 +0000 Received: by smtp.codeaurora.org (Postfix, from userid 1000) id 9BD6560A50; Thu, 8 Aug 2019 13:03:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1565269404; bh=Ij7XRwLrwLh4uP1APulCWIVFVaYjV0XO+S3KijynESI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=dDWpPrbfzkXFLp+S7xx3kwML9tVib7sqJ5A7Gv8qCQtXZiqiq01PE7YS1x9TnINvi wHxleAIWmC0JjzAgDcxfmVk1Y1yQkVtVUXNeyMpX4aJV4HIP5nI7KKvEWQRjV4YCmE qfkfLD4YEMD/V2wtp1DGF2fds0skXO8Pzk6OcWpU= Received: from che-swdbs-01.qca.qualcomm.com (blr-c-bdr-fw-01_globalnat_allzones-outside.qualcomm.com [103.229.19.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) (Authenticated sender: mkenna@codeaurora.org) by smtp.codeaurora.org (Postfix) with ESMTPSA id 1DEFE609CD; Thu, 8 Aug 2019 13:03:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1565269404; bh=Ij7XRwLrwLh4uP1APulCWIVFVaYjV0XO+S3KijynESI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=dDWpPrbfzkXFLp+S7xx3kwML9tVib7sqJ5A7Gv8qCQtXZiqiq01PE7YS1x9TnINvi wHxleAIWmC0JjzAgDcxfmVk1Y1yQkVtVUXNeyMpX4aJV4HIP5nI7KKvEWQRjV4YCmE qfkfLD4YEMD/V2wtp1DGF2fds0skXO8Pzk6OcWpU= DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org 1DEFE609CD Authentication-Results: pdx-caf-mail.web.codeaurora.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: pdx-caf-mail.web.codeaurora.org; spf=none smtp.mailfrom=mkenna@codeaurora.org From: Maharaja Kennadyrajan To: ath11k@lists.infradead.org Subject: [PATCH 09/15] ath11k: Rename ath11k_base struct from 'sc' to 'ab in dp.h Date: Thu, 8 Aug 2019 18:33:06 +0530 Message-Id: <1565269392-2838-10-git-send-email-mkenna@codeaurora.org> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1565269392-2838-1-git-send-email-mkenna@codeaurora.org> References: <1565269392-2838-1-git-send-email-mkenna@codeaurora.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190808_060325_034350_908A9CBB X-CRM114-Status: UNSURE ( 9.57 ) X-CRM114-Notice: Please train this message. X-BeenThere: ath11k@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Maharaja Kennadyrajan MIME-Version: 1.0 Sender: "ath11k" Errors-To: ath11k-bounces+patchwork-ath11k=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP To avoid confusion and better readability, renamed the ath11k_base struct from 'sc' to 'ab' in dp.h file. Signed-off-by: Maharaja Kennadyrajan --- drivers/net/wireless/ath/ath11k/dp.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/net/wireless/ath/ath11k/dp.h b/drivers/net/wireless/ath/ath11k/dp.h index bda5ac27f20d..c968d5a6217e 100644 --- a/drivers/net/wireless/ath/ath11k/dp.h +++ b/drivers/net/wireless/ath/ath11k/dp.h @@ -193,7 +193,7 @@ struct ath11k_pdev_dp { #define DP_TX_DESC_ID_POOL_ID GENMASK(20, 19) struct ath11k_dp { - struct ath11k_base *sc; + struct ath11k_base *ab; enum ath11k_htc_ep_id eid; struct completion htt_tgt_version_received; u8 htt_tgt_ver_major; @@ -1498,13 +1498,13 @@ static inline void ath11k_dp_get_mac_addr(u32 addr_l32, u16 addr_h16, u8 *addr) memcpy(addr + 4, &addr_h16, ETH_ALEN - 4); } -int ath11k_dp_service_srng(struct ath11k_base *sc, +int ath11k_dp_service_srng(struct ath11k_base *ab, struct ath11k_ext_irq_grp *irq_grp, int budget); int ath11k_dp_htt_connect(struct ath11k_dp *dp); void ath11k_dp_vdev_tx_attach(struct ath11k *ar, struct ath11k_vif *arvif); -void ath11k_dp_free(struct ath11k_base *sc); -int ath11k_dp_alloc(struct ath11k_base *sc); +void ath11k_dp_free(struct ath11k_base *ab); +int ath11k_dp_alloc(struct ath11k_base *ab); int ath11k_dp_pdev_alloc(struct ath11k_base *ab); void ath11k_dp_pdev_free(struct ath11k_base *ab); int ath11k_dp_tx_htt_srng_setup(struct ath11k_base *ab, u32 ring_id, From patchwork Thu Aug 8 13:03:07 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maharaja Kennadyrajan X-Patchwork-Id: 11084121 X-Patchwork-Delegate: kvalo@adurom.com Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 7598214DB for ; Thu, 8 Aug 2019 13:03:37 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 64BE028B4A for ; Thu, 8 Aug 2019 13:03:37 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 594752874C; Thu, 8 Aug 2019 13:03:37 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 045DD288D4 for ; Thu, 8 Aug 2019 13:03:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References: In-Reply-To:Message-Id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=NLhgQmwvn8puHd2nr4+VKjpwW9f/fe4tHIYUFWxEMAI=; b=nsRJkewZqwCpzlwInhx01rumV4 K4YWClJZ5JCEX4qTMI7eAYiG4COp9irTeGRaW9ygcAOM1Q/eK4tW89RZzFLtqeMYZQcaJHg6Dq6np fVY+d9g0tPwZzDwZBkbQh7TFuwBs9/PyhLaIGOdg1iTC0KGbdc0tluns3wVj6MJbpsEZJYSmKHK69 K4hMx7/lFRZYrdJtE6N34ekSLqA/PjL8scHeKg864SEH6qrwiKGrQWE8tmL5zlju7F0sX0cDZhaZQ Tesr+spqqSS22AabVqX4f/ThdCJNbwV/C1unZrp7zHcGrAZWv2xa1mz3eIQYGleKqWdPD64UEXEez jKz/Bvsg==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92 #3 (Red Hat Linux)) id 1hvi4s-0008IW-LU; Thu, 08 Aug 2019 13:03:34 +0000 Received: from smtp.codeaurora.org ([198.145.29.96]) by bombadil.infradead.org with esmtps (Exim 4.92 #3 (Red Hat Linux)) id 1hvi4k-0008BH-Kz for ath11k@lists.infradead.org; Thu, 08 Aug 2019 13:03:28 +0000 Received: by smtp.codeaurora.org (Postfix, from userid 1000) id 4C4D060E3F; Thu, 8 Aug 2019 13:03:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1565269406; bh=3XEJlXBytrE6hEK9HMM6YZScvXQzkG/fAN9Hg+e9hZM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Vd5H+iG9IggIH3XwtYoWt19VKSUEzx1qUIQGi0l2xeSGABjTLcgL+jpLorqe0CCI+ wVvEhu9mYIbYKm29n4Nhz5Ig6NhnWWKZEWizJ24/xFuvBw2yLh5XDBYv6ToQ9TGbZE pB/8GF7OEfAxrgJ0Pu4Rd+8XT9qY1a4yKfmtyCJw= Received: from che-swdbs-01.qca.qualcomm.com (blr-c-bdr-fw-01_globalnat_allzones-outside.qualcomm.com [103.229.19.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) (Authenticated sender: mkenna@codeaurora.org) by smtp.codeaurora.org (Postfix) with ESMTPSA id 9018C60C5F; Thu, 8 Aug 2019 13:03:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1565269405; bh=3XEJlXBytrE6hEK9HMM6YZScvXQzkG/fAN9Hg+e9hZM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=diU8vkpGz2IevrWQTSKdUB1FjEX5lAjMO8+t2MZqCrZoioJxYK9Q04fu0qOkIxwoP 6UF1B/SHDnRu5SsBz7i+urehfAf/1TGaGIJ4rEx85jjBBwueYl7Ogc4TmgzsU6t4+7 rfAt9l+mg1zVNL3o7hMi9Ed7dH9rj/bRn+Om0S6M= DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org 9018C60C5F Authentication-Results: pdx-caf-mail.web.codeaurora.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: pdx-caf-mail.web.codeaurora.org; spf=none smtp.mailfrom=mkenna@codeaurora.org From: Maharaja Kennadyrajan To: ath11k@lists.infradead.org Subject: [PATCH 10/15] ath11k: Rename ath11k_base struct from 'sc' to 'ab in dp_rx.c Date: Thu, 8 Aug 2019 18:33:07 +0530 Message-Id: <1565269392-2838-11-git-send-email-mkenna@codeaurora.org> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1565269392-2838-1-git-send-email-mkenna@codeaurora.org> References: <1565269392-2838-1-git-send-email-mkenna@codeaurora.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190808_060326_748607_9D44ABF5 X-CRM114-Status: GOOD ( 10.43 ) X-BeenThere: ath11k@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Maharaja Kennadyrajan MIME-Version: 1.0 Sender: "ath11k" Errors-To: ath11k-bounces+patchwork-ath11k=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP To avoid confusion and better readability, renamed the ath11k_base struct from 'sc' to 'ab' in dp_rx.c file. Signed-off-by: Maharaja Kennadyrajan --- drivers/net/wireless/ath/ath11k/dp_rx.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/net/wireless/ath/ath11k/dp_rx.c b/drivers/net/wireless/ath/ath11k/dp_rx.c index 7d6b0c3689b9..cc3bf25c9a91 100644 --- a/drivers/net/wireless/ath/ath11k/dp_rx.c +++ b/drivers/net/wireless/ath/ath11k/dp_rx.c @@ -505,10 +505,10 @@ static void ath11k_dp_reo_cmd_free(struct ath11k_dp *dp, void *ctx, struct dp_rx_tid *rx_tid = ctx; if (status != HAL_REO_CMD_SUCCESS) - ath11k_warn(dp->sc, "failed to flush rx tid hw desc, tid %d status %d\n", + ath11k_warn(dp->ab, "failed to flush rx tid hw desc, tid %d status %d\n", rx_tid->tid, status); - dma_unmap_single(dp->sc->dev, rx_tid->paddr, rx_tid->size, + dma_unmap_single(dp->ab->dev, rx_tid->paddr, rx_tid->size, DMA_BIDIRECTIONAL); kfree(rx_tid->vaddr); } @@ -555,7 +555,7 @@ static void ath11k_dp_reo_cache_flush(struct ath11k_base *ab, static void ath11k_dp_rx_tid_del_func(struct ath11k_dp *dp, void *ctx, enum hal_reo_cmd_status status) { - struct ath11k_base *ab = dp->sc; + struct ath11k_base *ab = dp->ab; struct dp_rx_tid *rx_tid = ctx; struct dp_reo_cache_flush_elem *elem, *tmp; From patchwork Thu Aug 8 13:03:08 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maharaja Kennadyrajan X-Patchwork-Id: 11084123 X-Patchwork-Delegate: kvalo@adurom.com Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id F236214DB for ; Thu, 8 Aug 2019 13:03:39 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id DF1D528876 for ; Thu, 8 Aug 2019 13:03:39 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id D321E289BD; Thu, 8 Aug 2019 13:03:39 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id EDD0C28876 for ; Thu, 8 Aug 2019 13:03:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References: In-Reply-To:Message-Id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=ARAo1HP/5jRkwRUWxXAW39F3YJ5vNP29bhJWaNNoulI=; b=JnaQct8A7d7sWNbZaDhmd9w+wW D1IpEqjrahguQG2/YYQdURbIr//tM7efv8Tfp2zUgCotIeSFWLrormrwrWnYg/eJgROPDjcOMQS5d 3d1n2q70G0iRC6SO2/SM1FjZxSp5JwLfAIY7Ta6OD8bVf3X8HQRLRe+VzV0jBXnK9sIsvN/k4F694 mQcdrFv+Rec+AugCfTb2zx97zS92XLuq5C5U7kobRWjt6UlvMWDVM/kopR+OqzOZpAikvcdpOEptM t5Bny53s8XX4p030X3TG9j+rEnm2eabdH6aAUZ/B4tr43LQjogKbXTOHZR8jkq8d0Zu+wqC2oJwkS LxY3NDCA==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92 #3 (Red Hat Linux)) id 1hvi4u-0008Ls-V2; Thu, 08 Aug 2019 13:03:36 +0000 Received: from smtp.codeaurora.org ([198.145.29.96]) by bombadil.infradead.org with esmtps (Exim 4.92 #3 (Red Hat Linux)) id 1hvi4m-0008Do-Sm for ath11k@lists.infradead.org; Thu, 08 Aug 2019 13:03:30 +0000 Received: by smtp.codeaurora.org (Postfix, from userid 1000) id 773F260DB6; Thu, 8 Aug 2019 13:03:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1565269408; bh=JbSCl64HGKc/iWEMoMObDda89BCNUxq4FLHOpzW6QCo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Ki57T3ZPc9ImzT0JrOxYz29zTw2iqOza/Pm9rVCfbgaO6xAmI1Z/KwZWJY531gbo8 +t91JrJWS/pPthfZcjx9gQ136dG4twiZnsJTJHJIJC1KMm+cU+vzhV2OLFdAlxdiSs BwVOq5K1B7Ov6YTyLh6YvNKaC8w9wLKjgvicavqA= Received: from che-swdbs-01.qca.qualcomm.com (blr-c-bdr-fw-01_globalnat_allzones-outside.qualcomm.com [103.229.19.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) (Authenticated sender: mkenna@codeaurora.org) by smtp.codeaurora.org (Postfix) with ESMTPSA id 110AA60E57; Thu, 8 Aug 2019 13:03:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1565269407; bh=JbSCl64HGKc/iWEMoMObDda89BCNUxq4FLHOpzW6QCo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=bl/wyfRp/m6b+4COhzzepOhqPAL9gtLo31Eazw+8KE2qaV2TBga7QWDz3/qD9TYNH sJ07YIsDHay946vQOvPXeYYsXO+Rza+EgU7apq4z/Ccbj3YY0+yjkNOzJHfaOPW+7e sXL1YpEqzpxfZpiBMWTSDnpT1NEOHbZWSiLHDSb0= DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org 110AA60E57 Authentication-Results: pdx-caf-mail.web.codeaurora.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: pdx-caf-mail.web.codeaurora.org; spf=none smtp.mailfrom=mkenna@codeaurora.org From: Maharaja Kennadyrajan To: ath11k@lists.infradead.org Subject: [PATCH 11/15] ath11k: Rename ath11k_base struct from 'sc' to 'ab in hal.c Date: Thu, 8 Aug 2019 18:33:08 +0530 Message-Id: <1565269392-2838-12-git-send-email-mkenna@codeaurora.org> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1565269392-2838-1-git-send-email-mkenna@codeaurora.org> References: <1565269392-2838-1-git-send-email-mkenna@codeaurora.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190808_060329_038907_C48DF7B4 X-CRM114-Status: GOOD ( 12.39 ) X-BeenThere: ath11k@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Maharaja Kennadyrajan MIME-Version: 1.0 Sender: "ath11k" Errors-To: ath11k-bounces+patchwork-ath11k=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP To avoid confusion and better readability, renamed the ath11k_base struct from 'sc' to 'ab' in hal.c file. Signed-off-by: Maharaja Kennadyrajan --- drivers/net/wireless/ath/ath11k/hal.c | 134 +++++++++++++------------- 1 file changed, 67 insertions(+), 67 deletions(-) diff --git a/drivers/net/wireless/ath/ath11k/hal.c b/drivers/net/wireless/ath/ath11k/hal.c index 9eac3113de23..e0ec7c5f8112 100644 --- a/drivers/net/wireless/ath/ath11k/hal.c +++ b/drivers/net/wireless/ath/ath11k/hal.c @@ -285,13 +285,13 @@ static const struct hal_srng_config hw_srng_config[] = { }, }; -static int ath11k_hal_alloc_cont_rdp(struct ath11k_base *sc) +static int ath11k_hal_alloc_cont_rdp(struct ath11k_base *ab) { - struct ath11k_hal *hal = &sc->hal; + struct ath11k_hal *hal = &ab->hal; size_t size; size = sizeof(u32) * HAL_SRNG_RING_ID_MAX; - hal->rdp.vaddr = dma_alloc_coherent(sc->dev, size, &hal->rdp.paddr, + hal->rdp.vaddr = dma_alloc_coherent(ab->dev, size, &hal->rdp.paddr, GFP_KERNEL); if (!hal->rdp.vaddr) return -ENOMEM; @@ -299,27 +299,27 @@ static int ath11k_hal_alloc_cont_rdp(struct ath11k_base *sc) return 0; } -static void ath11k_hal_free_cont_rdp(struct ath11k_base *sc) +static void ath11k_hal_free_cont_rdp(struct ath11k_base *ab) { - struct ath11k_hal *hal = &sc->hal; + struct ath11k_hal *hal = &ab->hal; size_t size; if (!hal->rdp.vaddr) return; size = sizeof(u32) * HAL_SRNG_RING_ID_MAX; - dma_free_coherent(sc->dev, size, + dma_free_coherent(ab->dev, size, hal->rdp.vaddr, hal->rdp.paddr); hal->rdp.vaddr = NULL; } -static int ath11k_hal_alloc_cont_wrp(struct ath11k_base *sc) +static int ath11k_hal_alloc_cont_wrp(struct ath11k_base *ab) { - struct ath11k_hal *hal = &sc->hal; + struct ath11k_hal *hal = &ab->hal; size_t size; size = sizeof(u32) * HAL_SRNG_NUM_LMAC_RINGS; - hal->wrp.vaddr = dma_alloc_coherent(sc->dev, size, &hal->wrp.paddr, + hal->wrp.vaddr = dma_alloc_coherent(ab->dev, size, &hal->wrp.paddr, GFP_KERNEL); if (!hal->wrp.vaddr) return -ENOMEM; @@ -327,21 +327,21 @@ static int ath11k_hal_alloc_cont_wrp(struct ath11k_base *sc) return 0; } -static void ath11k_hal_free_cont_wrp(struct ath11k_base *sc) +static void ath11k_hal_free_cont_wrp(struct ath11k_base *ab) { - struct ath11k_hal *hal = &sc->hal; + struct ath11k_hal *hal = &ab->hal; size_t size; if (!hal->wrp.vaddr) return; size = sizeof(u32) * HAL_SRNG_NUM_LMAC_RINGS; - dma_free_coherent(sc->dev, size, + dma_free_coherent(ab->dev, size, hal->wrp.vaddr, hal->wrp.paddr); hal->wrp.vaddr = NULL; } -static void ath11k_hal_ce_dst_setup(struct ath11k_base *sc, +static void ath11k_hal_ce_dst_setup(struct ath11k_base *ab, struct hal_srng *srng, int ring_num) { const struct hal_srng_config *srng_config = &hw_srng_config[HAL_CE_DST]; @@ -351,17 +351,17 @@ static void ath11k_hal_ce_dst_setup(struct ath11k_base *sc, addr = HAL_CE_DST_RING_CTRL + srng_config->reg_start[HAL_SRNG_REG_GRP_R0] + ring_num * srng_config->reg_size[HAL_SRNG_REG_GRP_R0]; - val = ath11k_ahb_read32(sc, addr); + val = ath11k_ahb_read32(ab, addr); val &= ~HAL_CE_DST_R0_DEST_CTRL_MAX_LEN; val |= FIELD_PREP(HAL_CE_DST_R0_DEST_CTRL_MAX_LEN, srng->u.dst_ring.max_buffer_length); - ath11k_ahb_write32(sc, addr, val); + ath11k_ahb_write32(ab, addr, val); } -static void ath11k_hal_srng_dst_hw_init(struct ath11k_base *sc, +static void ath11k_hal_srng_dst_hw_init(struct ath11k_base *ab, struct hal_srng *srng) { - struct ath11k_hal *hal = &sc->hal; + struct ath11k_hal *hal = &ab->hal; u32 val; u64 hp_addr; u32 reg_base; @@ -369,7 +369,7 @@ static void ath11k_hal_srng_dst_hw_init(struct ath11k_base *sc, reg_base = srng->hwreg_base[HAL_SRNG_REG_GRP_R0]; if (srng->flags & HAL_SRNG_FLAGS_MSI_INTR) { - ath11k_ahb_write32(sc, reg_base + + ath11k_ahb_write32(ab, reg_base + HAL_REO1_RING_MSI1_BASE_LSB_OFFSET, (u32)srng->msi_addr); @@ -377,26 +377,26 @@ static void ath11k_hal_srng_dst_hw_init(struct ath11k_base *sc, ((u64)srng->msi_addr >> HAL_ADDR_MSB_REG_SHIFT)) | HAL_REO1_RING_MSI1_BASE_MSB_MSI1_ENABLE; - ath11k_ahb_write32(sc, reg_base + + ath11k_ahb_write32(ab, reg_base + HAL_REO1_RING_MSI1_BASE_MSB_OFFSET, val); - ath11k_ahb_write32(sc, + ath11k_ahb_write32(ab, reg_base + HAL_REO1_RING_MSI1_DATA_OFFSET, srng->msi_data); } - ath11k_ahb_write32(sc, reg_base, (u32)srng->ring_base_paddr); + ath11k_ahb_write32(ab, reg_base, (u32)srng->ring_base_paddr); val = FIELD_PREP(HAL_REO1_RING_BASE_MSB_RING_BASE_ADDR_MSB, ((u64)srng->ring_base_paddr >> HAL_ADDR_MSB_REG_SHIFT)) | FIELD_PREP(HAL_REO1_RING_BASE_MSB_RING_SIZE, (srng->entry_size * srng->num_entries)); - ath11k_ahb_write32(sc, reg_base + HAL_REO1_RING_BASE_MSB_OFFSET, val); + ath11k_ahb_write32(ab, reg_base + HAL_REO1_RING_BASE_MSB_OFFSET, val); val = FIELD_PREP(HAL_REO1_RING_ID_RING_ID, srng->ring_id) | FIELD_PREP(HAL_REO1_RING_ID_ENTRY_SIZE, srng->entry_size); - ath11k_ahb_write32(sc, reg_base + HAL_REO1_RING_ID_OFFSET, val); + ath11k_ahb_write32(ab, reg_base + HAL_REO1_RING_ID_OFFSET, val); /* interrupt setup */ val = FIELD_PREP(HAL_REO1_RING_PRDR_INT_SETUP_INTR_TMR_THOLD, @@ -406,22 +406,22 @@ static void ath11k_hal_srng_dst_hw_init(struct ath11k_base *sc, (srng->intr_batch_cntr_thres_entries * srng->entry_size)); - ath11k_ahb_write32(sc, + ath11k_ahb_write32(ab, reg_base + HAL_REO1_RING_PRODUCER_INT_SETUP_OFFSET, val); hp_addr = hal->rdp.paddr + ((unsigned long)srng->u.dst_ring.hp_addr - (unsigned long)hal->rdp.vaddr); - ath11k_ahb_write32(sc, reg_base + HAL_REO1_RING_HP_ADDR_LSB_OFFSET, + ath11k_ahb_write32(ab, reg_base + HAL_REO1_RING_HP_ADDR_LSB_OFFSET, hp_addr & HAL_ADDR_LSB_REG_MASK); - ath11k_ahb_write32(sc, reg_base + HAL_REO1_RING_HP_ADDR_MSB_OFFSET, + ath11k_ahb_write32(ab, reg_base + HAL_REO1_RING_HP_ADDR_MSB_OFFSET, hp_addr >> HAL_ADDR_MSB_REG_SHIFT); /* Initialize head and tail pointers to indicate ring is empty */ reg_base = srng->hwreg_base[HAL_SRNG_REG_GRP_R2]; - ath11k_ahb_write32(sc, reg_base, 0); - ath11k_ahb_write32(sc, reg_base + HAL_REO1_RING_TP_OFFSET, 0); + ath11k_ahb_write32(ab, reg_base, 0); + ath11k_ahb_write32(ab, reg_base + HAL_REO1_RING_TP_OFFSET, 0); *srng->u.dst_ring.hp_addr = 0; reg_base = srng->hwreg_base[HAL_SRNG_REG_GRP_R0]; @@ -434,13 +434,13 @@ static void ath11k_hal_srng_dst_hw_init(struct ath11k_base *sc, val |= HAL_REO1_RING_MISC_MSI_SWAP; val |= HAL_REO1_RING_MISC_SRNG_ENABLE; - ath11k_ahb_write32(sc, reg_base + HAL_REO1_RING_MISC_OFFSET, val); + ath11k_ahb_write32(ab, reg_base + HAL_REO1_RING_MISC_OFFSET, val); } -static void ath11k_hal_srng_src_hw_init(struct ath11k_base *sc, +static void ath11k_hal_srng_src_hw_init(struct ath11k_base *ab, struct hal_srng *srng) { - struct ath11k_hal *hal = &sc->hal; + struct ath11k_hal *hal = &ab->hal; u32 val; u64 tp_addr; u32 reg_base; @@ -448,7 +448,7 @@ static void ath11k_hal_srng_src_hw_init(struct ath11k_base *sc, reg_base = srng->hwreg_base[HAL_SRNG_REG_GRP_R0]; if (srng->flags & HAL_SRNG_FLAGS_MSI_INTR) { - ath11k_ahb_write32(sc, reg_base + + ath11k_ahb_write32(ab, reg_base + HAL_TCL1_RING_MSI1_BASE_LSB_OFFSET, (u32)srng->msi_addr); @@ -456,26 +456,26 @@ static void ath11k_hal_srng_src_hw_init(struct ath11k_base *sc, ((u64)srng->msi_addr >> HAL_ADDR_MSB_REG_SHIFT)) | HAL_TCL1_RING_MSI1_BASE_MSB_MSI1_ENABLE; - ath11k_ahb_write32(sc, reg_base + + ath11k_ahb_write32(ab, reg_base + HAL_TCL1_RING_MSI1_BASE_MSB_OFFSET, val); - ath11k_ahb_write32(sc, reg_base + + ath11k_ahb_write32(ab, reg_base + HAL_TCL1_RING_MSI1_DATA_OFFSET, srng->msi_data); } - ath11k_ahb_write32(sc, reg_base, (u32)srng->ring_base_paddr); + ath11k_ahb_write32(ab, reg_base, (u32)srng->ring_base_paddr); val = FIELD_PREP(HAL_TCL1_RING_BASE_MSB_RING_BASE_ADDR_MSB, ((u64)srng->ring_base_paddr >> HAL_ADDR_MSB_REG_SHIFT)) | FIELD_PREP(HAL_TCL1_RING_BASE_MSB_RING_SIZE, (srng->entry_size * srng->num_entries)); - ath11k_ahb_write32(sc, reg_base + HAL_TCL1_RING_BASE_MSB_OFFSET, val); + ath11k_ahb_write32(ab, reg_base + HAL_TCL1_RING_BASE_MSB_OFFSET, val); val = FIELD_PREP(HAL_REO1_RING_ID_ENTRY_SIZE, srng->entry_size); - ath11k_ahb_write32(sc, reg_base + HAL_TCL1_RING_ID_OFFSET, val); + ath11k_ahb_write32(ab, reg_base + HAL_TCL1_RING_ID_OFFSET, val); /* interrupt setup */ /* NOTE: IPQ8074 v2 requires the interrupt timer threshold in the @@ -488,7 +488,7 @@ static void ath11k_hal_srng_src_hw_init(struct ath11k_base *sc, (srng->intr_batch_cntr_thres_entries * srng->entry_size)); - ath11k_ahb_write32(sc, + ath11k_ahb_write32(ab, reg_base + HAL_TCL1_RING_CONSR_INT_SETUP_IX0_OFFSET, val); @@ -497,7 +497,7 @@ static void ath11k_hal_srng_src_hw_init(struct ath11k_base *sc, val |= FIELD_PREP(HAL_TCL1_RING_CONSR_INT_SETUP_IX1_LOW_THOLD, srng->u.src_ring.low_threshold); } - ath11k_ahb_write32(sc, + ath11k_ahb_write32(ab, reg_base + HAL_TCL1_RING_CONSR_INT_SETUP_IX1_OFFSET, val); @@ -505,18 +505,18 @@ static void ath11k_hal_srng_src_hw_init(struct ath11k_base *sc, tp_addr = hal->rdp.paddr + ((unsigned long)srng->u.src_ring.tp_addr - (unsigned long)hal->rdp.vaddr); - ath11k_ahb_write32(sc, + ath11k_ahb_write32(ab, reg_base + HAL_TCL1_RING_TP_ADDR_LSB_OFFSET, tp_addr & HAL_ADDR_LSB_REG_MASK); - ath11k_ahb_write32(sc, + ath11k_ahb_write32(ab, reg_base + HAL_TCL1_RING_TP_ADDR_MSB_OFFSET, tp_addr >> HAL_ADDR_MSB_REG_SHIFT); } /* Initialize head and tail pointers to indicate ring is empty */ reg_base = srng->hwreg_base[HAL_SRNG_REG_GRP_R2]; - ath11k_ahb_write32(sc, reg_base, 0); - ath11k_ahb_write32(sc, reg_base + HAL_TCL1_RING_TP_OFFSET, 0); + ath11k_ahb_write32(ab, reg_base, 0); + ath11k_ahb_write32(ab, reg_base + HAL_TCL1_RING_TP_OFFSET, 0); *srng->u.src_ring.tp_addr = 0; reg_base = srng->hwreg_base[HAL_SRNG_REG_GRP_R0]; @@ -533,19 +533,19 @@ static void ath11k_hal_srng_src_hw_init(struct ath11k_base *sc, val |= HAL_TCL1_RING_MISC_SRNG_ENABLE; - ath11k_ahb_write32(sc, reg_base + HAL_TCL1_RING_MISC_OFFSET, val); + ath11k_ahb_write32(ab, reg_base + HAL_TCL1_RING_MISC_OFFSET, val); } -static void ath11k_hal_srng_hw_init(struct ath11k_base *sc, +static void ath11k_hal_srng_hw_init(struct ath11k_base *ab, struct hal_srng *srng) { if (srng->ring_dir == HAL_SRNG_DIR_SRC) - ath11k_hal_srng_src_hw_init(sc, srng); + ath11k_hal_srng_src_hw_init(ab, srng); else - ath11k_hal_srng_dst_hw_init(sc, srng); + ath11k_hal_srng_dst_hw_init(ab, srng); } -static int ath11k_hal_srng_get_ring_id(struct ath11k_base *sc, +static int ath11k_hal_srng_get_ring_id(struct ath11k_base *ab, enum hal_ring_type type, int ring_num, int mac_id) { @@ -553,7 +553,7 @@ static int ath11k_hal_srng_get_ring_id(struct ath11k_base *sc, int ring_id; if (ring_num >= srng_config->max_rings) { - ath11k_warn(sc, "invalid ring number :%d\n", ring_num); + ath11k_warn(ab, "invalid ring number :%d\n", ring_num); return -EINVAL; } @@ -806,7 +806,7 @@ u32 *ath11k_hal_srng_src_get_next_entry(struct ath11k_base *ab, return desc; } -u32 *ath11k_hal_srng_src_reap_next(struct ath11k_base *sc, +u32 *ath11k_hal_srng_src_reap_next(struct ath11k_base *ab, struct hal_srng *srng) { u32 *desc; @@ -826,7 +826,7 @@ u32 *ath11k_hal_srng_src_reap_next(struct ath11k_base *sc, return desc; } -u32 *ath11k_hal_srng_src_get_next_reaped(struct ath11k_base *sc, +u32 *ath11k_hal_srng_src_get_next_reaped(struct ath11k_base *ab, struct hal_srng *srng) { u32 *desc; @@ -843,7 +843,7 @@ u32 *ath11k_hal_srng_src_get_next_reaped(struct ath11k_base *sc, return desc; } -u32 *ath11k_hal_srng_src_peek(struct ath11k_base *sc, struct hal_srng *srng) +u32 *ath11k_hal_srng_src_peek(struct ath11k_base *ab, struct hal_srng *srng) { lockdep_assert_held(&srng->lock); @@ -988,11 +988,11 @@ void ath11k_hal_setup_link_idle_list(struct ath11k_base *ab, HAL_WBM_IDLE_LINK_RING_MISC_ADDR, 0x40); } -int ath11k_hal_srng_setup(struct ath11k_base *sc, enum hal_ring_type type, +int ath11k_hal_srng_setup(struct ath11k_base *ab, enum hal_ring_type type, int ring_num, int mac_id, struct hal_srng_params *params) { - struct ath11k_hal *hal = &sc->hal; + struct ath11k_hal *hal = &ab->hal; const struct hal_srng_config *srng_config = &hw_srng_config[type]; struct hal_srng *srng; int ring_id; @@ -1000,7 +1000,7 @@ int ath11k_hal_srng_setup(struct ath11k_base *sc, enum hal_ring_type type, int i; u32 reg_base; - ring_id = ath11k_hal_srng_get_ring_id(sc, type, ring_num, mac_id); + ring_id = ath11k_hal_srng_get_ring_id(ab, type, ring_num, mac_id); if (ring_id < 0) return ring_id; @@ -1048,7 +1048,7 @@ int ath11k_hal_srng_setup(struct ath11k_base *sc, enum hal_ring_type type, srng->flags |= HAL_SRNG_FLAGS_LMAC_RING; } else { srng->u.src_ring.hp_addr = - (u32 *)((unsigned long)sc->mem + reg_base); + (u32 *)((unsigned long)ab->mem + reg_base); } } else { /* During initialization loop count in all the descriptors @@ -1073,7 +1073,7 @@ int ath11k_hal_srng_setup(struct ath11k_base *sc, enum hal_ring_type type, srng->flags |= HAL_SRNG_FLAGS_LMAC_RING; } else { srng->u.dst_ring.tp_addr = - (u32 *)((unsigned long)sc->mem + reg_base + + (u32 *)((unsigned long)ab->mem + reg_base + (HAL_REO1_RING_TP - HAL_REO1_RING_HP)); } } @@ -1081,44 +1081,44 @@ int ath11k_hal_srng_setup(struct ath11k_base *sc, enum hal_ring_type type, if (srng_config->lmac_ring) return ring_id; - ath11k_hal_srng_hw_init(sc, srng); + ath11k_hal_srng_hw_init(ab, srng); if (type == HAL_CE_DST) { srng->u.dst_ring.max_buffer_length = params->max_buffer_len; - ath11k_hal_ce_dst_setup(sc, srng, ring_num); + ath11k_hal_ce_dst_setup(ab, srng, ring_num); } return ring_id; } -int ath11k_hal_srng_init(struct ath11k_base *sc) +int ath11k_hal_srng_init(struct ath11k_base *ab) { - struct ath11k_hal *hal = &sc->hal; + struct ath11k_hal *hal = &ab->hal; int ret; memset(hal, 0, sizeof(*hal)); hal->srng_config = hw_srng_config; - ret = ath11k_hal_alloc_cont_rdp(sc); + ret = ath11k_hal_alloc_cont_rdp(ab); if (ret) goto err_hal; - ret = ath11k_hal_alloc_cont_wrp(sc); + ret = ath11k_hal_alloc_cont_wrp(ab); if (ret) goto err_free_cont_rdp; return 0; err_free_cont_rdp: - ath11k_hal_free_cont_rdp(sc); + ath11k_hal_free_cont_rdp(ab); err_hal: return ret; } -void ath11k_hal_srng_deinit(struct ath11k_base *sc) +void ath11k_hal_srng_deinit(struct ath11k_base *ab) { - ath11k_hal_free_cont_rdp(sc); - ath11k_hal_free_cont_wrp(sc); + ath11k_hal_free_cont_rdp(ab); + ath11k_hal_free_cont_wrp(ab); } From patchwork Thu Aug 8 13:03:09 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maharaja Kennadyrajan X-Patchwork-Id: 11084125 X-Patchwork-Delegate: kvalo@adurom.com Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 4B7DB17E0 for ; Thu, 8 Aug 2019 13:03:40 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3A2182874C for ; Thu, 8 Aug 2019 13:03:40 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 2E732289BD; Thu, 8 Aug 2019 13:03:40 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id CF2A62874C for ; Thu, 8 Aug 2019 13:03:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References: In-Reply-To:Message-Id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=yItT4Yj4HnnF4p7aa9LZJMkGtoaUXq8C243A6gJgomM=; b=ZskcLs0+yIuovpbJdk0Ojw9PT7 c26qBLJm1vN5BCc4h8jo9l97cvyJynNo9BbxGA1sOoFnedWC46UHNkuoKNL3A9nymNMinBVN5tHqv KUJx1xrZnZsHTLEg+O/7TGthzI5AWPoi9qefiJ8QrQrpVdiaJTfrT+VU2j76YbKxN/y/gdTJDJp83 tMNLV8Oy37Wf7v2OVrT0D16hRCZEoMmWAtkER3JimzpONxPMAPAzO9zTeXVsC+W1PCze0OFOe4WCe 05glHe4TL27sOukJmqYgb7LCTqFPUD8le2xyY31dm+E/Nz4flLWcwcT19hy1DBoI5vypYgUL5qh26 TW8jKmvw==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92 #3 (Red Hat Linux)) id 1hvi4v-0008Mq-R4; Thu, 08 Aug 2019 13:03:37 +0000 Received: from smtp.codeaurora.org ([198.145.29.96]) by bombadil.infradead.org with esmtps (Exim 4.92 #3 (Red Hat Linux)) id 1hvi4o-0008Fy-JL for ath11k@lists.infradead.org; Thu, 08 Aug 2019 13:03:32 +0000 Received: by smtp.codeaurora.org (Postfix, from userid 1000) id E5EF561195; Thu, 8 Aug 2019 13:03:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1565269410; bh=MISlkilZ/qoeppfPyi+dsRNPTYC338z5bYc8RBQWgeU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=esJyVNUFv6vIyh9OmENGOOVZufD87u1fB/bK5mdOXo6O24/w9at+1wx2JWUnT6QhD oy1z09/T4OTjBPuhFwMg4GY+smeG4+luQy0jf+IaH8bgTjASOl5yOtciGoAEma9lN4 kwJ0rRl0W6TmoVhc0Vb4TKDLtYt22mmT0NRPx4pU= Received: from che-swdbs-01.qca.qualcomm.com (blr-c-bdr-fw-01_globalnat_allzones-outside.qualcomm.com [103.229.19.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) (Authenticated sender: mkenna@codeaurora.org) by smtp.codeaurora.org (Postfix) with ESMTPSA id 8A76E60E40; Thu, 8 Aug 2019 13:03:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1565269408; bh=MISlkilZ/qoeppfPyi+dsRNPTYC338z5bYc8RBQWgeU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=luXVawe2IkH4R7WaCMraXO31nwqKu6dX6B/ppGhuSLxiOhvoLGEsq+i/qf515Z+hY Oth5TV+1Gcox3s9YkYZ8rlsMBZ78hPDZjAa3FG4VWgOgQHiIkqIrs77xwHEPTx2zjY Ca+qpz2ueBl0nnrjZnCGcBB+8GbcJB0nDH1bufpw= DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org 8A76E60E40 Authentication-Results: pdx-caf-mail.web.codeaurora.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: pdx-caf-mail.web.codeaurora.org; spf=none smtp.mailfrom=mkenna@codeaurora.org From: Maharaja Kennadyrajan To: ath11k@lists.infradead.org Subject: [PATCH 12/15] ath11k: Rename ath11k_base struct from 'sc' to 'ab in hal.h Date: Thu, 8 Aug 2019 18:33:09 +0530 Message-Id: <1565269392-2838-13-git-send-email-mkenna@codeaurora.org> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1565269392-2838-1-git-send-email-mkenna@codeaurora.org> References: <1565269392-2838-1-git-send-email-mkenna@codeaurora.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190808_060330_696818_05B2EEA9 X-CRM114-Status: UNSURE ( 8.04 ) X-CRM114-Notice: Please train this message. X-BeenThere: ath11k@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Maharaja Kennadyrajan MIME-Version: 1.0 Sender: "ath11k" Errors-To: ath11k-bounces+patchwork-ath11k=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP To avoid confusion and better readability, renamed the ath11k_base struct from 'sc' to 'ab' in hal.h file. Signed-off-by: Maharaja Kennadyrajan --- drivers/net/wireless/ath/ath11k/hal.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/net/wireless/ath/ath11k/hal.h b/drivers/net/wireless/ath/ath11k/hal.h index c57f683f8c84..c80b068f0baf 100644 --- a/drivers/net/wireless/ath/ath11k/hal.h +++ b/drivers/net/wireless/ath/ath11k/hal.h @@ -876,10 +876,10 @@ u32 *ath11k_hal_srng_dst_get_next_entry(struct ath11k_base *ab, u32 *ath11k_hal_srng_dst_peek(struct ath11k_base *ab, struct hal_srng *srng); int ath11k_hal_srng_dst_num_free(struct ath11k_base *ab, struct hal_srng *srng, bool sync_hw_ptr); -u32 *ath11k_hal_srng_src_peek(struct ath11k_base *sc, struct hal_srng *srng); -u32 *ath11k_hal_srng_src_get_next_reaped(struct ath11k_base *sc, +u32 *ath11k_hal_srng_src_peek(struct ath11k_base *ab, struct hal_srng *srng); +u32 *ath11k_hal_srng_src_get_next_reaped(struct ath11k_base *ab, struct hal_srng *srng); -u32 *ath11k_hal_srng_src_reap_next(struct ath11k_base *sc, +u32 *ath11k_hal_srng_src_reap_next(struct ath11k_base *ab, struct hal_srng *srng); u32 *ath11k_hal_srng_src_get_next_entry(struct ath11k_base *ab, struct hal_srng *srng); @@ -888,7 +888,7 @@ int ath11k_hal_srng_src_num_free(struct ath11k_base *ab, struct hal_srng *srng, void ath11k_hal_srng_access_begin(struct ath11k_base *ab, struct hal_srng *srng); void ath11k_hal_srng_access_end(struct ath11k_base *ab, struct hal_srng *srng); -int ath11k_hal_srng_setup(struct ath11k_base *sc, enum hal_ring_type type, +int ath11k_hal_srng_setup(struct ath11k_base *ab, enum hal_ring_type type, int ring_num, int mac_id, struct hal_srng_params *params); int ath11k_hal_srng_init(struct ath11k_base *ath11k); From patchwork Thu Aug 8 13:03:10 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maharaja Kennadyrajan X-Patchwork-Id: 11084127 X-Patchwork-Delegate: kvalo@adurom.com Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id A80CB14DB for ; Thu, 8 Aug 2019 13:03:41 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9750D28B45 for ; Thu, 8 Aug 2019 13:03:41 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 8BDBF2874C; Thu, 8 Aug 2019 13:03:41 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 877F528718 for ; Thu, 8 Aug 2019 13:03:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References: In-Reply-To:Message-Id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=ctfRefeGOiW7Y+hoS0kni3CxCyN3IMeQKyvG3FutjoY=; b=auXN1Ehe9wnJY/UIAnAmKJOTtL 22RJtZl7CWfD6joyrquRqwC2Q6mZYR2y9dR+oq42vityfWNPBg8D7GckNDgkB0hZc75FoCl+KuKvl CPqBEpFlIZzMg2oNiFRzUzr0bcItIOabKqLDpM3aC6bGMCPKjF6kv63w/mOG69rbpOXW9wu/+2bv4 ApqqF7iNo1ne0+XPatPEQyZ175OSZzKx9UnlMY4FmV7r/9LTDCpXrlslbbvPP6IdbIVfjt6/wbta5 Ye0rxqyy3WlZr7SnbQiPfZedIiIesXqEA3x4LO+7outMAG6p5TmT+enKW+fcGTCwmZcvredugXaM5 i1VgIX1w==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92 #3 (Red Hat Linux)) id 1hvi4w-0008OC-Sg; Thu, 08 Aug 2019 13:03:38 +0000 Received: from smtp.codeaurora.org ([198.145.29.96]) by bombadil.infradead.org with esmtps (Exim 4.92 #3 (Red Hat Linux)) id 1hvi4s-0008It-BI for ath11k@lists.infradead.org; Thu, 08 Aug 2019 13:03:36 +0000 Received: by smtp.codeaurora.org (Postfix, from userid 1000) id 0ADFD60F3D; Thu, 8 Aug 2019 13:03:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1565269414; bh=Kgy0Ii42zZzRWGs/r6JqcqSWyGpV41NpM0A1JFKoiA4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=IHr4cYFqm0cq+Fg2AAd3Qurh7ewCBTY19bnZnSawJVXTl9N3ybh8MWoBPrk0JgL5z SPw8NTIJwaMy7e6AnaoQmLAEjJK55DgHJLp3B6wK7lEcBf+MDtnwjm0xK42tJPOXgO R8fpFrnUNIJd+teUA/btd2yiDoHMTGzpbD0z2i4M= Received: from che-swdbs-01.qca.qualcomm.com (blr-c-bdr-fw-01_globalnat_allzones-outside.qualcomm.com [103.229.19.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) (Authenticated sender: mkenna@codeaurora.org) by smtp.codeaurora.org (Postfix) with ESMTPSA id 1A9C760E40; Thu, 8 Aug 2019 13:03:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1565269410; bh=Kgy0Ii42zZzRWGs/r6JqcqSWyGpV41NpM0A1JFKoiA4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=NT6YfvpOZN52NcrmBdJmnHnz8k+zPJv92JThgSQdorjiftUJYwhBLB6AyW2LNmm6d bN0YaK7tZljZCGWF5BlD2Bs8HCYoHaW98ahHHMNyfFiXiVvD/2lCGF2xUjOGxOo+fv nHLOUJa/eK2WyOTSy2uKQzgvAqyAGWR6w6Fl3lnw= DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org 1A9C760E40 Authentication-Results: pdx-caf-mail.web.codeaurora.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: pdx-caf-mail.web.codeaurora.org; spf=none smtp.mailfrom=mkenna@codeaurora.org From: Maharaja Kennadyrajan To: ath11k@lists.infradead.org Subject: [PATCH 13/15] ath11k: Rename ath11k_base struct from 'sc' to 'ab in qmi.h Date: Thu, 8 Aug 2019 18:33:10 +0530 Message-Id: <1565269392-2838-14-git-send-email-mkenna@codeaurora.org> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1565269392-2838-1-git-send-email-mkenna@codeaurora.org> References: <1565269392-2838-1-git-send-email-mkenna@codeaurora.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190808_060334_840386_EEF323F8 X-CRM114-Status: UNSURE ( 8.04 ) X-CRM114-Notice: Please train this message. X-BeenThere: ath11k@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Maharaja Kennadyrajan MIME-Version: 1.0 Sender: "ath11k" Errors-To: ath11k-bounces+patchwork-ath11k=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP To avoid confusion and better readability, renamed the ath11k_base struct from 'sc' to 'ab' in qmi.h file. Signed-off-by: Maharaja Kennadyrajan --- drivers/net/wireless/ath/ath11k/qmi.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/net/wireless/ath/ath11k/qmi.h b/drivers/net/wireless/ath/ath11k/qmi.h index ff9203d46810..f388dc6030a4 100644 --- a/drivers/net/wireless/ath/ath11k/qmi.h +++ b/drivers/net/wireless/ath/ath11k/qmi.h @@ -432,12 +432,12 @@ struct qmi_wlanfw_wlan_cfg_resp_msg_v01 { struct qmi_response_type_v01 resp; }; -int ath11k_qmi_firmware_start(struct ath11k_base *sc, +int ath11k_qmi_firmware_start(struct ath11k_base *ab, u32 mode); -void ath11k_qmi_firmware_stop(struct ath11k_base *sc); +void ath11k_qmi_firmware_stop(struct ath11k_base *ab); void ath11k_qmi_event_work(struct work_struct *work); void ath11k_qmi_msg_recv_work(struct work_struct *work); -void ath11k_qmi_deinit_service(struct ath11k_base *sc); -int ath11k_qmi_init_service(struct ath11k_base *sc); +void ath11k_qmi_deinit_service(struct ath11k_base *ab); +int ath11k_qmi_init_service(struct ath11k_base *ab); #endif From patchwork Thu Aug 8 13:03:11 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maharaja Kennadyrajan X-Patchwork-Id: 11084131 X-Patchwork-Delegate: kvalo@adurom.com Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id CD46014E5 for ; Thu, 8 Aug 2019 13:03:43 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B704328409 for ; Thu, 8 Aug 2019 13:03:43 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id ABBE228B20; Thu, 8 Aug 2019 13:03:43 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id E503D2874C for ; Thu, 8 Aug 2019 13:03:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References: In-Reply-To:Message-Id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=yeimqIZG3BkJKJfwPuAoj1+UJeUrPUTJ84xxS0S4pFc=; b=MJl0BBjxYF971oNbhvs6pBNtMl pKpOrLEsW0jH8k2MEYQV4F1uI/cOcWGNCsT4V7j4TdLTjp4aLAM3rd2qUrg8R/x3S8lgPUIWkrEPD M+Oor4atMYowDsmxqMT9nvRHepD2a1ckwGSXhvoQOnDiKri0lp/5pU8rDbzaBQMvmp0X9lioJ8vT/ 5g43kkEQG77Xu6//xhPvsLwrpTCN72O5m9BzQRN3PLUzP6RDFIUTl8SbAWYcg4f7G69OBmD8XjFOY af5nAR+UUQqCPpWmN5DInmz1pKoSgNZsv2/AeIjfZSuBlhFWhULw0KFD2N9XZBzFMsUVWOqA3sK8x q5la0IYg==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92 #3 (Red Hat Linux)) id 1hvi4y-0008QN-Jo; Thu, 08 Aug 2019 13:03:40 +0000 Received: from smtp.codeaurora.org ([198.145.29.96]) by bombadil.infradead.org with esmtps (Exim 4.92 #3 (Red Hat Linux)) id 1hvi4u-0008Kn-9t for ath11k@lists.infradead.org; Thu, 08 Aug 2019 13:03:38 +0000 Received: by smtp.codeaurora.org (Postfix, from userid 1000) id D51E461213; Thu, 8 Aug 2019 13:03:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1565269415; bh=aWr0ZALmD5mrgk4GkE5Vc1t6+5KGXP12phLANKfXec4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=VIy+liCHn2KOVVo4HzgSztGbolECACrbDg8/t9QymAg55hkkdtUDrvfCPg5E58y+W FWR7Bh6CpzNdPAZHg4rHGgSTpRTnZ2dDwJmmkC7iC//IGqEevV2C2w5s3umNRJk05L ZgggqQtK4eo1/q73/HxnYArDuzg6WCTSrrvt3yf4= Received: from che-swdbs-01.qca.qualcomm.com (blr-c-bdr-fw-01_globalnat_allzones-outside.qualcomm.com [103.229.19.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) (Authenticated sender: mkenna@codeaurora.org) by smtp.codeaurora.org (Postfix) with ESMTPSA id B046260F3F; Thu, 8 Aug 2019 13:03:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1565269411; bh=aWr0ZALmD5mrgk4GkE5Vc1t6+5KGXP12phLANKfXec4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=gdTTi+Zcwb3dyi/+f5T3hDkQQaBlgVZGvn62HT4BGTua/UfjDz7t8NzNRQoKeydC5 q9dSV1Tq8UhSFBQbQhcXxXiAceTg/dqR0GM5HJ5xIImeiuUqd9exu0e2DiFZpM2OG+ Bf2X0+87fxWCMKuClBZejecw5pt/wMk1WGlcZK+Q= DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org B046260F3F Authentication-Results: pdx-caf-mail.web.codeaurora.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: pdx-caf-mail.web.codeaurora.org; spf=none smtp.mailfrom=mkenna@codeaurora.org From: Maharaja Kennadyrajan To: ath11k@lists.infradead.org Subject: [PATCH 14/15] ath11k: Rename ath11k_base struct from 'sc' to 'ab in wmi.c Date: Thu, 8 Aug 2019 18:33:11 +0530 Message-Id: <1565269392-2838-15-git-send-email-mkenna@codeaurora.org> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1565269392-2838-1-git-send-email-mkenna@codeaurora.org> References: <1565269392-2838-1-git-send-email-mkenna@codeaurora.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190808_060336_473274_E5252000 X-CRM114-Status: GOOD ( 15.28 ) X-BeenThere: ath11k@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Maharaja Kennadyrajan MIME-Version: 1.0 Sender: "ath11k" Errors-To: ath11k-bounces+patchwork-ath11k=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP To avoid confusion and better readability, renamed the ath11k_base struct from 'sc' to 'ab' in wmi.c file. Signed-off-by: Maharaja Kennadyrajan --- drivers/net/wireless/ath/ath11k/wmi.c | 94 +++++++++++++-------------- 1 file changed, 47 insertions(+), 47 deletions(-) diff --git a/drivers/net/wireless/ath/ath11k/wmi.c b/drivers/net/wireless/ath/ath11k/wmi.c index e7a74e0e0b80..a873ca1782c8 100644 --- a/drivers/net/wireless/ath/ath11k/wmi.c +++ b/drivers/net/wireless/ath/ath11k/wmi.c @@ -205,7 +205,7 @@ static int ath11k_wmi_cmd_send_nowait(struct ath11k_pdev_wmi *wmi, struct sk_buf u32 cmd_id) { struct ath11k_skb_cb *skb_cb = ATH11K_SKB_CB(skb); - struct ath11k_base *sc = wmi->wmi_sc->sc; + struct ath11k_base *ab = wmi->wmi_sc->ab; struct wmi_cmd_hdr *cmd_hdr; int ret; u32 cmd = 0; @@ -219,7 +219,7 @@ static int ath11k_wmi_cmd_send_nowait(struct ath11k_pdev_wmi *wmi, struct sk_buf cmd_hdr->cmd_id = cmd; memset(skb_cb, 0, sizeof(*skb_cb)); - ret = ath11k_htc_send(&sc->htc, wmi->eid, skb); + ret = ath11k_htc_send(&ab->htc, wmi->eid, skb); if (ret) goto err_pull; @@ -242,14 +242,14 @@ int ath11k_wmi_cmd_send(struct ath11k_pdev_wmi *wmi, struct sk_buff *skb, wait_event_timeout(wmi_sc->tx_credits_wq, ({ ret = ath11k_wmi_cmd_send_nowait(wmi, skb, cmd_id); - if (ret && test_bit(ATH11K_FLAG_CRASH_FLUSH, &wmi_sc->sc->dev_flags)) + if (ret && test_bit(ATH11K_FLAG_CRASH_FLUSH, &wmi_sc->ab->dev_flags)) ret = -ESHUTDOWN; (ret != -EAGAIN); }), WMI_SEND_TIMEOUT_HZ); if (ret == -EAGAIN) - ath11k_warn(wmi_sc->sc, "wmi command %d timeout\n", cmd_id); + ath11k_warn(wmi_sc->ab, "wmi command %d timeout\n", cmd_id); return ret; } @@ -506,7 +506,7 @@ static int ath11k_service_ready_event(struct ath11k_base *ab, struct sk_buff *sk struct sk_buff *ath11k_wmi_alloc_skb(struct ath11k_wmi_base *wmi_sc, u32 len) { struct sk_buff *skb; - struct ath11k_base *ab = wmi_sc->sc; + struct ath11k_base *ab = wmi_sc->ab; u32 round_len = roundup(len, 4); skb = ath11k_htc_alloc_skb(ab, WMI_SKB_HEADROOM + round_len); @@ -1346,7 +1346,7 @@ int ath11k_wmi_set_sta_ps_param(struct ath11k *ar, u32 vdev_id, int ath11k_send_crash_inject_cmd(struct ath11k_pdev_wmi *wmi_handle, struct crash_inject *param) { - struct ath11k_base *ab = wmi_handle->wmi_sc->sc; + struct ath11k_base *ab = wmi_handle->wmi_sc->ab; struct wmi_force_fw_hang_cmd *cmd; struct sk_buff *skb; int ret, len; @@ -2551,7 +2551,7 @@ ath11k_wmi_copy_resource_config(struct wmi_resource_config *wmi_cfg, static int ath11k_init_cmd_send(struct ath11k_pdev_wmi *wmi, struct wmi_init_cmd_param *param) { - struct ath11k_base *ab = wmi->wmi_sc->sc; + struct ath11k_base *ab = wmi->wmi_sc->ab; struct sk_buff *skb; struct wmi_init_cmd *cmd; struct wmi_resource_config *cfg; @@ -2662,11 +2662,11 @@ static int ath11k_init_cmd_send(struct ath11k_pdev_wmi *wmi, return ret; } -int ath11k_wmi_wait_for_service_ready(struct ath11k_base *sc) +int ath11k_wmi_wait_for_service_ready(struct ath11k_base *ab) { unsigned long time_left; - time_left = wait_for_completion_timeout(&sc->wmi_sc.service_ready, + time_left = wait_for_completion_timeout(&ab->wmi_sc.service_ready, WMI_SERVICE_READY_TIMEOUT_HZ); if (!time_left) return -ETIMEDOUT; @@ -2674,11 +2674,11 @@ int ath11k_wmi_wait_for_service_ready(struct ath11k_base *sc) return 0; } -int ath11k_wmi_wait_for_unified_ready(struct ath11k_base *sc) +int ath11k_wmi_wait_for_unified_ready(struct ath11k_base *ab) { unsigned long time_left; - time_left = wait_for_completion_timeout(&sc->wmi_sc.unified_ready, + time_left = wait_for_completion_timeout(&ab->wmi_sc.unified_ready, WMI_SERVICE_READY_TIMEOUT_HZ); if (!time_left) return -ETIMEDOUT; @@ -2686,21 +2686,21 @@ int ath11k_wmi_wait_for_unified_ready(struct ath11k_base *sc) return 0; } -int ath11k_wmi_cmd_init(struct ath11k_base *sc) +int ath11k_wmi_cmd_init(struct ath11k_base *ab) { - struct ath11k_wmi_base *wmi_sc = &sc->wmi_sc; + struct ath11k_wmi_base *wmi_sc = &ab->wmi_sc; struct wmi_init_cmd_param init_param; struct target_resource_config config; memset(&init_param, 0, sizeof(init_param)); memset(&config, 0, sizeof(config)); - config.num_vdevs = sc->num_radios * TARGET_NUM_VDEVS; + config.num_vdevs = ab->num_radios * TARGET_NUM_VDEVS; - if (sc->num_radios == 2) { + if (ab->num_radios == 2) { config.num_peers = TARGET_NUM_PEERS(DBS); config.num_tids = TARGET_NUM_TIDS(DBS); - } else if (sc->num_radios == 3) { + } else if (ab->num_radios == 3) { config.num_peers = TARGET_NUM_PEERS(DBS_SBS); config.num_tids = TARGET_NUM_TIDS(DBS_SBS); } else { @@ -2712,8 +2712,8 @@ int ath11k_wmi_cmd_init(struct ath11k_base *sc) config.num_offload_reorder_buffs = TARGET_NUM_OFFLD_REORDER_BUFFS; config.num_peer_keys = TARGET_NUM_PEER_KEYS; config.ast_skid_limit = TARGET_AST_SKID_LIMIT; - config.tx_chain_mask = (1 << sc->target_caps.num_rf_chains) - 1; - config.rx_chain_mask = (1 << sc->target_caps.num_rf_chains) - 1; + config.tx_chain_mask = (1 << ab->target_caps.num_rf_chains) - 1; + config.rx_chain_mask = (1 << ab->target_caps.num_rf_chains) - 1; config.rx_timeout_pri[0] = TARGET_RX_TIMEOUT_LO_PRI; config.rx_timeout_pri[1] = TARGET_RX_TIMEOUT_LO_PRI; config.rx_timeout_pri[2] = TARGET_RX_TIMEOUT_LO_PRI; @@ -2734,7 +2734,7 @@ int ath11k_wmi_cmd_init(struct ath11k_base *sc) config.vow_config = TARGET_VOW_CONFIG; config.gtk_offload_max_vdev = TARGET_GTK_OFFLOAD_MAX_VDEV; config.num_msdu_desc = TARGET_NUM_MSDU_DESC; - config.beacon_tx_offload_max_vdev = sc->num_radios * TARGET_MAX_BCN_OFFLD; + config.beacon_tx_offload_max_vdev = ab->num_radios * TARGET_MAX_BCN_OFFLD; config.rx_batchmode = TARGET_RX_BATCHMODE; config.peer_map_unmap_v2_support = 1; @@ -2748,9 +2748,9 @@ int ath11k_wmi_cmd_init(struct ath11k_base *sc) if (wmi_sc->preferred_hw_mode == WMI_HOST_HW_MODE_SINGLE) init_param.hw_mode_id = WMI_HOST_HW_MODE_MAX; - init_param.num_band_to_mac = sc->num_radios; + init_param.num_band_to_mac = ab->num_radios; - ath11k_fill_band_to_mac_param(sc, init_param.band_to_mac); + ath11k_fill_band_to_mac_param(ab, init_param.band_to_mac); return ath11k_init_cmd_send(&wmi_sc->wmi[0], &init_param); } @@ -4322,13 +4322,13 @@ void ath11k_wmi_fw_stats_fill(struct ath11k *ar, buf[len] = 0; } -static void ath11k_wmi_op_ep_tx_credits(struct ath11k_base *sc) +static void ath11k_wmi_op_ep_tx_credits(struct ath11k_base *ab) { /* try to send pending beacons first. they take priority */ - wake_up(&sc->wmi_sc.tx_credits_wq); + wake_up(&ab->wmi_sc.tx_credits_wq); } -static void ath11k_wmi_htc_tx_complete(struct ath11k_base *sc, +static void ath11k_wmi_htc_tx_complete(struct ath11k_base *ab, struct sk_buff *skb) { dev_kfree_skb(skb); @@ -5434,7 +5434,7 @@ static void ath11k_wmi_tlv_op_rx(struct ath11k_base *ab, struct sk_buff *skb) dev_kfree_skb(skb); } -static int ath11k_connect_pdev_htc_service(struct ath11k_base *sc, +static int ath11k_connect_pdev_htc_service(struct ath11k_base *ab, u32 pdev_idx) { int status; @@ -5456,16 +5456,16 @@ static int ath11k_connect_pdev_htc_service(struct ath11k_base *sc, /* connect to control service */ conn_req.service_id = svc_id[pdev_idx]; - status = ath11k_htc_connect_service(&sc->htc, &conn_req, &conn_resp); + status = ath11k_htc_connect_service(&ab->htc, &conn_req, &conn_resp); if (status) { - ath11k_warn(sc, "failed to connect to WMI CONTROL service status: %d\n", + ath11k_warn(ab, "failed to connect to WMI CONTROL service status: %d\n", status); return status; } - sc->wmi_sc.wmi_endpoint_id[pdev_idx] = conn_resp.eid; - sc->wmi_sc.wmi[pdev_idx].eid = conn_resp.eid; - sc->wmi_sc.max_msg_len[pdev_idx] = conn_resp.max_msg_len; + ab->wmi_sc.wmi_endpoint_id[pdev_idx] = conn_resp.eid; + ab->wmi_sc.wmi[pdev_idx].eid = conn_resp.eid; + ab->wmi_sc.max_msg_len[pdev_idx] = conn_resp.max_msg_len; return 0; } @@ -5564,22 +5564,22 @@ int ath11k_wmi_simulate_radar(struct ath11k *ar) return ath11k_wmi_send_unit_test_cmd(ar, wmi_ut, dfs_args); } -int ath11k_wmi_connect(struct ath11k_base *sc) +int ath11k_wmi_connect(struct ath11k_base *ab) { u32 i; u8 wmi_ep_count; - wmi_ep_count = sc->htc.wmi_ep_count; + wmi_ep_count = ab->htc.wmi_ep_count; if (wmi_ep_count > MAX_RADIOS) return -1; for (i = 0; i < wmi_ep_count; i++) - ath11k_connect_pdev_htc_service(sc, i); + ath11k_connect_pdev_htc_service(ab, i); return 0; } -static void ath11k_wmi_pdev_detach(struct ath11k_base *sc, u8 pdev_id) +static void ath11k_wmi_pdev_detach(struct ath11k_base *ab, u8 pdev_id) { if (WARN_ON(pdev_id >= MAX_RADIOS)) return; @@ -5587,7 +5587,7 @@ static void ath11k_wmi_pdev_detach(struct ath11k_base *sc, u8 pdev_id) /* TODO: Deinit any pdev specific wmi resource */ } -int ath11k_wmi_pdev_attach(struct ath11k_base *sc, +int ath11k_wmi_pdev_attach(struct ath11k_base *ab, u8 pdev_id) { struct ath11k_pdev_wmi *wmi_handle; @@ -5595,40 +5595,40 @@ int ath11k_wmi_pdev_attach(struct ath11k_base *sc, if (pdev_id >= MAX_RADIOS) return -EINVAL; - wmi_handle = &sc->wmi_sc.wmi[pdev_id]; + wmi_handle = &ab->wmi_sc.wmi[pdev_id]; - wmi_handle->wmi_sc = &sc->wmi_sc; + wmi_handle->wmi_sc = &ab->wmi_sc; - sc->wmi_sc.sc = sc; + ab->wmi_sc.ab = ab; /* TODO: Init remaining resource specific to pdev */ return 0; } -int ath11k_wmi_attach(struct ath11k_base *sc) +int ath11k_wmi_attach(struct ath11k_base *ab) { int ret; - ret = ath11k_wmi_pdev_attach(sc, 0); + ret = ath11k_wmi_pdev_attach(ab, 0); if (ret) return ret; - sc->wmi_sc.sc = sc; - sc->wmi_sc.preferred_hw_mode = WMI_HOST_HW_MODE_MAX; + ab->wmi_sc.ab = ab; + ab->wmi_sc.preferred_hw_mode = WMI_HOST_HW_MODE_MAX; /* TODO: Init remaining wmi soc resources required */ - init_completion(&sc->wmi_sc.service_ready); - init_completion(&sc->wmi_sc.unified_ready); + init_completion(&ab->wmi_sc.service_ready); + init_completion(&ab->wmi_sc.unified_ready); return 0; } -void ath11k_wmi_detach(struct ath11k_base *sc) +void ath11k_wmi_detach(struct ath11k_base *ab) { int i; /* TODO: Deinit wmi resource specific to SOC as required */ - for (i = 0; i < sc->htc.wmi_ep_count; i++) - ath11k_wmi_pdev_detach(sc, i); + for (i = 0; i < ab->htc.wmi_ep_count; i++) + ath11k_wmi_pdev_detach(ab, i); } From patchwork Thu Aug 8 13:03:12 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maharaja Kennadyrajan X-Patchwork-Id: 11084129 X-Patchwork-Delegate: kvalo@adurom.com Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 54CA114DB for ; Thu, 8 Aug 2019 13:03:42 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 447C42873B for ; Thu, 8 Aug 2019 13:03:42 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 3901228876; Thu, 8 Aug 2019 13:03:42 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id DCC612874C for ; Thu, 8 Aug 2019 13:03:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References: In-Reply-To:Message-Id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=K2BttFzNwpqV4anZ1jtXfgh6jk1hi23DKWCt/8v/8ko=; b=UACFWlkqfohggd2GXR9LNUmltf drXW7GqQ5l210BkR1r1i7LlZyXwr1onHwGyNqCkif2RoUwzkl97EfMftZKMp49+7vaFvQI82g6fY3 X+qk/Rqsu8CovL8ui4Gvm1hIk53Vs1SAGzyoQDecySkvkh+mDYLCkbdn1vl9oUr/keNVUOxZGq/7p L8s50lMEf8zPrkFzOocf2R6ZLm3FZNYoTiyrSoHBhhE0Hx0gUgYFjqNA0YXtiLDAWvooi9OW0Aaky 3Y3ZSmqyHj6yUu0A7VNGAHxd36yD6hKmCVlaZQF2EzvPtmtnYTYVst+SuCjWkLdIvKYUl5o9OGvi/ MFf3DgUw==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92 #3 (Red Hat Linux)) id 1hvi4x-0008PV-U4; Thu, 08 Aug 2019 13:03:40 +0000 Received: from smtp.codeaurora.org ([198.145.29.96]) by bombadil.infradead.org with esmtps (Exim 4.92 #3 (Red Hat Linux)) id 1hvi4t-0008Jy-D4 for ath11k@lists.infradead.org; Thu, 08 Aug 2019 13:03:37 +0000 Received: by smtp.codeaurora.org (Postfix, from userid 1000) id 149C961378; Thu, 8 Aug 2019 13:03:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1565269415; bh=siTXE/vctffJ6Ckn1cXXtPMWKtzaR5IJyutNW8TShKU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=bnAbVwbmrTBZSqQm3UKD1KlK3q7n2Tt4Nwx1mXSklvYEmrwPp1HlOusrfQpEUIEVH tqxZyfmzG1Ea+NjHqB1oNMYLN5a3DlAXIWn/QV5hi1mOibn3vLy4734wHdUmwe6b93 gHmZuA9dO8fqMScsVWWCDqj6VwMIpyUSbC7xx3HM= Received: from che-swdbs-01.qca.qualcomm.com (blr-c-bdr-fw-01_globalnat_allzones-outside.qualcomm.com [103.229.19.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) (Authenticated sender: mkenna@codeaurora.org) by smtp.codeaurora.org (Postfix) with ESMTPSA id 4697761213; Thu, 8 Aug 2019 13:03:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1565269413; bh=siTXE/vctffJ6Ckn1cXXtPMWKtzaR5IJyutNW8TShKU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=oUIGtZJLlK35jFPhWfuChQgCTjvnKxefIFvBkWvPaWhKGF/KA1/bVh2JZ3YSCsIRI tDl2yM21gRmZROIFp4PAQCv1vaShK+L6gHVFeSdG0LZ6lDrWfb+LaoAfBUOGlfRWwp rH1D9bOoPcBK90tnWR4aSsqbRvSZKzpK2u35Hm8g= DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org 4697761213 Authentication-Results: pdx-caf-mail.web.codeaurora.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: pdx-caf-mail.web.codeaurora.org; spf=none smtp.mailfrom=mkenna@codeaurora.org From: Maharaja Kennadyrajan To: ath11k@lists.infradead.org Subject: [PATCH 15/15] ath11k: Rename ath11k_base struct from 'sc' to 'ab in wmi.h Date: Thu, 8 Aug 2019 18:33:12 +0530 Message-Id: <1565269392-2838-16-git-send-email-mkenna@codeaurora.org> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1565269392-2838-1-git-send-email-mkenna@codeaurora.org> References: <1565269392-2838-1-git-send-email-mkenna@codeaurora.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190808_060335_635330_EF25879C X-CRM114-Status: UNSURE ( 8.79 ) X-CRM114-Notice: Please train this message. X-BeenThere: ath11k@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Maharaja Kennadyrajan MIME-Version: 1.0 Sender: "ath11k" Errors-To: ath11k-bounces+patchwork-ath11k=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP To avoid confusion and better readability, renamed the ath11k_base struct from 'sc' to 'ab' in wmi.h file. Signed-off-by: Maharaja Kennadyrajan --- drivers/net/wireless/ath/ath11k/wmi.h | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/drivers/net/wireless/ath/ath11k/wmi.h b/drivers/net/wireless/ath/ath11k/wmi.h index f1930339e633..ff31aa7d8058 100644 --- a/drivers/net/wireless/ath/ath11k/wmi.h +++ b/drivers/net/wireless/ath/ath11k/wmi.h @@ -4553,7 +4553,7 @@ struct target_resource_config { #define WMI_SEND_TIMEOUT_HZ (3 * HZ) struct ath11k_wmi_base { - struct ath11k_base *sc; + struct ath11k_base *ab; struct ath11k_pdev_wmi wmi[MAX_RADIOS]; enum ath11k_htc_ep_id wmi_endpoint_id[MAX_RADIOS]; u32 max_msg_len[MAX_RADIOS]; @@ -4591,14 +4591,14 @@ int ath11k_wmi_set_peer_param(struct ath11k *ar, const u8 *peer_addr, u32 vdev_id, u32 param_id, u32 param_val); int ath11k_wmi_pdev_set_param(struct ath11k *ar, u32 param_id, u32 param_value, u8 pdev_id); -int ath11k_wmi_wait_for_unified_ready(struct ath11k_base *sc); -int ath11k_wmi_cmd_init(struct ath11k_base *sc); -int ath11k_wmi_wait_for_service_ready(struct ath11k_base *sc); -int ath11k_wmi_connect(struct ath11k_base *sc); -int ath11k_wmi_pdev_attach(struct ath11k_base *sc, +int ath11k_wmi_wait_for_unified_ready(struct ath11k_base *ab); +int ath11k_wmi_cmd_init(struct ath11k_base *ab); +int ath11k_wmi_wait_for_service_ready(struct ath11k_base *ab); +int ath11k_wmi_connect(struct ath11k_base *ab); +int ath11k_wmi_pdev_attach(struct ath11k_base *ab, u8 pdev_id); -int ath11k_wmi_attach(struct ath11k_base *sc); -void ath11k_wmi_detach(struct ath11k_base *sc); +int ath11k_wmi_attach(struct ath11k_base *ab); +void ath11k_wmi_detach(struct ath11k_base *ab); int ath11k_wmi_vdev_create(struct ath11k *ar, u8 *macaddr, struct vdev_create_params *param); int ath11k_wmi_peer_rx_reorder_queue_setup(struct ath11k *ar, int vdev_id,