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); }