From patchwork Fri Aug 9 09:26:23 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kalle Valo X-Patchwork-Id: 11085999 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 DBEB214D5 for ; Fri, 9 Aug 2019 09:26:31 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C68A828C2D for ; Fri, 9 Aug 2019 09:26:31 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id B488C28C42; Fri, 9 Aug 2019 09:26: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 43CB728C2D for ; Fri, 9 Aug 2019 09:26:31 +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:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:To:From:Subject:Reply-To:Cc:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=W65+pi9jczxY6TUi4alWsnwMuP//tHFHfMqnqvoUYNs=; b=VyWEQmaqo6L5Q7 UmTIthfNNb2MqowC0duMblnlg/qkd9ouYlgkRbfjdalYoNo9WdUdFccE4KTpeuA08nx88OJbv5qmV 46VLkK6hBNRhJKay9qZ2SWXaWP/wfCMjDS4d5hRBZDduFIq9LVObW7EipzlnpH8lWAnPvLCVsLg4H 0IJX/yk2Ltou01qjDsnqO632WQwQIAtkdUxPxky1tIyKN3n6dJTMbtkjDQcOi/qGNkNwdMZYo+DnS tOBBabYic/BS3oW62JqBzeXtLYaAlIbKQBbxsMFK4twbaTH1V55Y7UYTnoJt3tvKQ5qiPFdvY4t6u A9UDG9mM766cWK9hsYpw==; 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 1hw1AL-0000e4-T2; Fri, 09 Aug 2019 09:26:29 +0000 Received: from smtp.codeaurora.org ([198.145.29.96]) by bombadil.infradead.org with esmtps (Exim 4.92 #3 (Red Hat Linux)) id 1hw1AJ-0000dl-8n for ath11k@lists.infradead.org; Fri, 09 Aug 2019 09:26:28 +0000 Received: by smtp.codeaurora.org (Postfix, from userid 1000) id EC8546090E; Fri, 9 Aug 2019 09:26:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1565342787; bh=OQCEB4QGloqmufgqcUaJto7MwvHidT8nYn7VqyBCkPM=; h=Subject:From:To:Date:In-Reply-To:References:From; b=fZo917+6uEnNekGpFJbnqoNIxQYScESWfj+f8kuzQRq84xoCxZjNBTRoKUNzmmqUH b+WK9lAEHLivvkuwkv7Akun4zLYhxx8wAnZIJ1NllNiyOT1BvGVhTYwgx4M/Li3lD0 yJvEcp17bHsGr7R8IbNoOygGL5aC+Za0lZlEhaCA= Received: from [127.0.1.1] (88-114-240-156.elisa-laajakaista.fi [88.114.240.156]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) (Authenticated sender: kvalo@smtp.codeaurora.org) by smtp.codeaurora.org (Postfix) with ESMTPSA id 0437F608FF for ; Fri, 9 Aug 2019 09:26:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1565342786; bh=OQCEB4QGloqmufgqcUaJto7MwvHidT8nYn7VqyBCkPM=; h=Subject:From:To:Date:In-Reply-To:References:From; b=GxyAaJNKfom9wSTxOdw1d0FLpEwnxtty6X3j3aZOoPckWapbSomxWOPTVyXg0Tb3d 5HAjHZk9EqkBbGsg6jSJ5minBuhPntGZajVqsb2kWmU7Q1OVnwrcDa4KEbjYK3nYa9 MZQfnEaMuAC6yMSQp4Bm68BXzaM8XkQq0c/VT7lM= DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org 0437F608FF 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=kvalo@codeaurora.org Subject: [PATCH 03/15] ath11k: cleanup and rename ath11k_send_crash_inject_cmd() From: Kalle Valo To: ath11k@lists.infradead.org Date: Fri, 09 Aug 2019 12:26:23 +0300 Message-ID: <156534278378.30736.15842499109433409233.stgit@x230> In-Reply-To: <156534276745.30736.11736417077894270794.stgit@x230> References: <156534276745.30736.11736417077894270794.stgit@x230> User-Agent: StGit/0.19 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190809_022627_347323_E51EB8C7 X-CRM114-Status: GOOD ( 10.92 ) 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: , Sender: "ath11k" Errors-To: ath11k-bounces+patchwork-ath11k=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP Instead use the common style used in WMI functions in general. No functional changes, compile tested only. Signed-off-by: Kalle Valo --- drivers/net/wireless/ath/ath11k/debug.c | 7 +++---- drivers/net/wireless/ath/ath11k/wmi.c | 16 +++++++--------- drivers/net/wireless/ath/ath11k/wmi.h | 8 +------- 3 files changed, 11 insertions(+), 20 deletions(-) diff --git a/drivers/net/wireless/ath/ath11k/debug.c b/drivers/net/wireless/ath/ath11k/debug.c index e62a409185f4..2e3798cd7e99 100644 --- a/drivers/net/wireless/ath/ath11k/debug.c +++ b/drivers/net/wireless/ath/ath11k/debug.c @@ -539,7 +539,6 @@ static ssize_t ath11k_write_simulate_fw_crash(struct file *file, struct ath11k_base *ab = file->private_data; struct ath11k_pdev *pdev; struct ath11k *ar = ab->pdevs[0].ar; - struct crash_inject param; char buf[32] = {0}; ssize_t rc; int i, ret, radioup; @@ -571,9 +570,9 @@ static ssize_t ath11k_write_simulate_fw_crash(struct file *file, if (!strcmp(buf, "assert")) { ath11k_info(ab, "simulating firmware assert crash\n"); - param.type = ATH11K_WMI_FW_HANG_ASSERT_TYPE; - param.delay_time_ms = ATH11K_WMI_FW_HANG_DELAY; - ret = ath11k_send_crash_inject_cmd(&ab->wmi_sc.wmi[0], ¶m); + ret = ath11k_wmi_force_fw_hang_cmd(ar, + ATH11K_WMI_FW_HANG_ASSERT_TYPE, + ATH11K_WMI_FW_HANG_DELAY); } else { ret = -EINVAL; goto exit; diff --git a/drivers/net/wireless/ath/ath11k/wmi.c b/drivers/net/wireless/ath/ath11k/wmi.c index 464c57e59a54..24058ab1f5fd 100644 --- a/drivers/net/wireless/ath/ath11k/wmi.c +++ b/drivers/net/wireless/ath/ath11k/wmi.c @@ -1343,17 +1343,16 @@ int ath11k_wmi_set_sta_ps_param(struct ath11k *ar, u32 vdev_id, return ret; } -int ath11k_send_crash_inject_cmd(struct ath11k_pdev_wmi *wmi_handle, - struct crash_inject *param) +int ath11k_wmi_force_fw_hang_cmd(struct ath11k *ar, u32 type, u32 delay_time_ms) { - struct ath11k_base *ab = wmi_handle->wmi_sc->ab; + struct ath11k_pdev_wmi *wmi = ar->wmi; struct wmi_force_fw_hang_cmd *cmd; struct sk_buff *skb; int ret, len; len = sizeof(*cmd); - skb = ath11k_wmi_alloc_skb(wmi_handle->wmi_sc, len); + skb = ath11k_wmi_alloc_skb(wmi->wmi_sc, len); if (!skb) return -ENOMEM; @@ -1361,14 +1360,13 @@ int ath11k_send_crash_inject_cmd(struct ath11k_pdev_wmi *wmi_handle, cmd->tlv_header = FIELD_PREP(WMI_TLV_TAG, WMI_TAG_FORCE_FW_HANG_CMD) | FIELD_PREP(WMI_TLV_LEN, len - TLV_HDR_SIZE); - cmd->type = param->type; - cmd->delay_time_ms = param->delay_time_ms; + cmd->type = type; + cmd->delay_time_ms = delay_time_ms; - ret = ath11k_wmi_cmd_send(wmi_handle, skb, - WMI_FORCE_FW_HANG_CMDID); + ret = ath11k_wmi_cmd_send(wmi, skb, WMI_FORCE_FW_HANG_CMDID); if (ret) { - ath11k_warn(ab, "Failed to send WMI_FORCE_FW_HANG_CMDID"); + ath11k_warn(ar->ab, "Failed to send WMI_FORCE_FW_HANG_CMDID"); dev_kfree_skb(skb); } return ret; diff --git a/drivers/net/wireless/ath/ath11k/wmi.h b/drivers/net/wireless/ath/ath11k/wmi.h index ff31aa7d8058..96be01972aef 100644 --- a/drivers/net/wireless/ath/ath11k/wmi.h +++ b/drivers/net/wireless/ath/ath11k/wmi.h @@ -3521,11 +3521,6 @@ struct ap_ps_params { u32 value; }; -struct crash_inject { - u32 type; - u32 delay_time_ms; -}; - struct vdev_set_params { u32 if_id; u32 param_id; @@ -4612,8 +4607,7 @@ int ath11k_wmi_vdev_set_param_cmd(struct ath11k *ar, u32 vdev_id, int ath11k_wmi_set_sta_ps_param(struct ath11k *ar, u32 vdev_id, u32 param, u32 param_value); -int ath11k_send_crash_inject_cmd(struct ath11k_pdev_wmi *wmi_handle, - struct crash_inject *param); +int ath11k_wmi_force_fw_hang_cmd(struct ath11k *ar, u32 type, u32 delay_time_ms); int ath11k_wmi_send_peer_delete_cmd(struct ath11k *ar, const u8 *peer_addr, u8 vdev_id); int ath11k_wmi_vdev_delete(struct ath11k *ar, u8 vdev_id);