From patchwork Tue Jan 21 09:21:21 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chun-Yeow Yeoh X-Patchwork-Id: 3515751 Return-Path: X-Original-To: patchwork-linux-wireless@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 1B8A69F2E9 for ; Tue, 21 Jan 2014 09:21:46 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 8109C20108 for ; Tue, 21 Jan 2014 09:21:41 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 8C214200D6 for ; Tue, 21 Jan 2014 09:21:40 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753908AbaAUJVi (ORCPT ); Tue, 21 Jan 2014 04:21:38 -0500 Received: from mail-pd0-f169.google.com ([209.85.192.169]:54514 "EHLO mail-pd0-f169.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753624AbaAUJVg (ORCPT ); Tue, 21 Jan 2014 04:21:36 -0500 Received: by mail-pd0-f169.google.com with SMTP id v10so7972682pde.28 for ; Tue, 21 Jan 2014 01:21:36 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id; bh=Ykze2JzF2EmQ/6JTL9W85DOqKWcsz622OjV5CWwGQxc=; b=H1eW3O2305wUrYrX2nwDRqPhY1nemDh5MUcYSg2XuUWIWVpUeKllwZrrQUJYBnZ7ij FhqCMuwFTLcDhsgJbzE1vAh0v0UCdD9vgMhgsPvq025V4dYGyy4S9Y0cvearq64e4+qh 6VuYx0tGV2Fj17vVYfigQ/hUP+HHRcHMzZiY0BbPNpvmGFMe3OZUPSQcruPb7YilnszY UGqLPsPW/mBJsbKvJ4AWg7H2i6INzrE8d6vX87dHfrRT1EU50iUr8cLkfBixYcKp+1mn +9KotD6FyV6vz/JU06VYH1wm0E+iVmO5KB9NC7gotJtv6diPEqi+v3wFZRN6yImVOXyU K1YQ== X-Received: by 10.68.211.1 with SMTP id my1mr23850905pbc.55.1390296096200; Tue, 21 Jan 2014 01:21:36 -0800 (PST) Received: from localhost.localdomain ([58.26.233.145]) by mx.google.com with ESMTPSA id y9sm21996768pas.10.2014.01.21.01.21.32 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 21 Jan 2014 01:21:35 -0800 (PST) From: Chun-Yeow Yeoh To: ath10k@lists.infradead.org Cc: linux-wireless@vger.kernel.org, kvalo@qca.qualcomm.com, Chun-Yeow Yeoh Subject: [PATCH] ath10k: fix the printing of 10.x FW version when FW crashed Date: Tue, 21 Jan 2014 17:21:21 +0800 Message-Id: <1390296081-22788-1-git-send-email-yeohchunyeow@gmail.com> X-Mailer: git-send-email 1.7.9.5 Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Spam-Status: No, score=-7.3 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 10.x FW has no structure member sw_version_1. Thus, both fw_version_release and fw_version_build are not available. The provided fw_version_major is also wrong. Fix this by using the fw_version from struct wiphy. Signed-off-by: Chun-Yeow Yeoh --- drivers/net/wireless/ath/ath10k/pci.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/net/wireless/ath/ath10k/pci.c b/drivers/net/wireless/ath/ath10k/pci.c index 29fd197..9179c88 100644 --- a/drivers/net/wireless/ath/ath10k/pci.c +++ b/drivers/net/wireless/ath/ath10k/pci.c @@ -833,9 +833,7 @@ static void ath10k_pci_hif_dump_area(struct ath10k *ar) ath10k_err("firmware crashed!\n"); ath10k_err("hardware name %s version 0x%x\n", ar->hw_params.name, ar->target_version); - ath10k_err("firmware version: %u.%u.%u.%u\n", ar->fw_version_major, - ar->fw_version_minor, ar->fw_version_release, - ar->fw_version_build); + ath10k_err("firmware version: %s\n", ar->hw->wiphy->fw_version); host_addr = host_interest_item_address(HI_ITEM(hi_failure_state)); ret = ath10k_pci_diag_read_mem(ar, host_addr,