From patchwork Thu Jan 8 11:29:32 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michal Kazior X-Patchwork-Id: 5592221 Return-Path: X-Original-To: patchwork-ath10k@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 48C319F357 for ; Thu, 8 Jan 2015 11:30:21 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 772472037D for ; Thu, 8 Jan 2015 11:30:20 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id A80572037F for ; Thu, 8 Jan 2015 11:30:19 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1Y9BI6-0000Hw-Vk; Thu, 08 Jan 2015 11:30:15 +0000 Received: from mail-wg0-x234.google.com ([2a00:1450:400c:c00::234]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1Y9BI3-0007TB-QX for ath10k@lists.infradead.org; Thu, 08 Jan 2015 11:30:12 +0000 Received: by mail-wg0-f52.google.com with SMTP id x12so2042004wgg.11 for ; Thu, 08 Jan 2015 03:29:50 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tieto.com; s=google; h=from:to:cc:subject:date:message-id; bh=DmZajR3D8Dar+JPp3zPJlt1bJV8QAWWze5EjFNc3yUg=; b=Jdnu/ATdjY5xNaUa3NvXJu2yzMBsX4oIhUr6/lU/pVD/bx4Us6OZX2lV2lWpFpp9qK CA5wDBtY1RtgFVDguf+YlqCHXvfjpVvKt5d9IlMZq9wY6P3WDMdv5Z2B9OG4HoMGPx/h PKuvwmXRoLHA0LZ51AxbPdlwo7NLgG/DOyG8c= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=DmZajR3D8Dar+JPp3zPJlt1bJV8QAWWze5EjFNc3yUg=; b=Z42UQsf+wvORfWM1VFiN77bFt9H9y0GH7homKKYgoKfWvqXdQudsf3u2HrouQY/OVo IPeaCBL/Ncrs5bgNwGft80AduLePyRa8cC4rcuDf4yUGuY6JSYJfNa8t6wzhHeyZ84Em 8hYJI7OR0yBTNVZXtQBL9h/onKASU2zlLvQrzx1zWyOcZF1fFZ/hdNAiHfOjBjunC2ck opj2XhMmOIOiv8GaZh8vChygUeG6vInB7OxA+QkJyQIWzojQQaCgqqdDoqnWheLwy6pk qkivFGTPvuPqR5gIG0tjn5wk3YPV46UTc2gaOfe/20jldX5MYhi6WUktobhEE/n+Eb5Y zFnQ== X-Gm-Message-State: ALoCoQm0gkMxKaK1129Js2A9s8QZj+8zIu4GO1JGQpCSVgIYimEihy07ZDZMHOYKQHZt3pFbq5RWGbfCuIVnEGWrO8yjN/ox1MvUsnKgi00BjePMp+7hmDLLmwKQfqwjqmBJh+X452dB6IKoyjXrISZDZ5KIFFl3tOxzFBPdV90aT/ax6+dJwbA= X-Received: by 10.180.101.98 with SMTP id ff2mr59363626wib.83.1420716590292; Thu, 08 Jan 2015 03:29:50 -0800 (PST) Received: from localhost.localdomain ([91.198.246.8]) by mx.google.com with ESMTPSA id s9sm6192574wiz.12.2015.01.08.03.29.48 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 08 Jan 2015 03:29:49 -0800 (PST) From: Michal Kazior To: ath10k@lists.infradead.org Subject: [PATCH] ath10k: add additional fw build version to info print Date: Thu, 8 Jan 2015 12:29:32 +0100 Message-Id: <1420716572-23826-1-git-send-email-michal.kazior@tieto.com> X-Mailer: git-send-email 1.8.5.3 X-DomainID: tieto.com X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20150108_033012_056082_D89AA19E X-CRM114-Status: UNSURE ( 8.84 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -0.8 (/) Cc: linux-wireless@vger.kernel.org, Michal Kazior X-BeenThere: ath10k@lists.infradead.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: "ath10k" Errors-To: ath10k-bounces+patchwork-ath10k=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-4.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_MED, T_DKIM_INVALID, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable 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 The wmi-tlv firmware contains additional versioning info. It may help reporting/debugging. Signed-off-by: Michal Kazior --- drivers/net/wireless/ath/ath10k/core.h | 4 ++++ drivers/net/wireless/ath/ath10k/debug.c | 8 ++++++-- drivers/net/wireless/ath/ath10k/wmi.c | 4 ++++ 3 files changed, 14 insertions(+), 2 deletions(-) diff --git a/drivers/net/wireless/ath/ath10k/core.h b/drivers/net/wireless/ath/ath10k/core.h index 7b6d9e4..aa12c8a 100644 --- a/drivers/net/wireless/ath/ath10k/core.h +++ b/drivers/net/wireless/ath/ath10k/core.h @@ -458,6 +458,10 @@ struct ath10k { u32 fw_version_minor; u16 fw_version_release; u16 fw_version_build; + u32 fw_build_major; + u32 fw_build_minor; + u32 fw_build_si; + u32 fw_build_crm; u32 phy_capability; u32 hw_min_tx_power; u32 hw_max_tx_power; diff --git a/drivers/net/wireless/ath/ath10k/debug.c b/drivers/net/wireless/ath/ath10k/debug.c index 6ca2442..9a6b358 100644 --- a/drivers/net/wireless/ath/ath10k/debug.c +++ b/drivers/net/wireless/ath/ath10k/debug.c @@ -124,7 +124,7 @@ EXPORT_SYMBOL(ath10k_info); void ath10k_print_driver_info(struct ath10k *ar) { - ath10k_info(ar, "%s (0x%08x, 0x%08x) fw %s api %d htt %d.%d wmi %d cal %s max_sta %d\n", + ath10k_info(ar, "%s (0x%08x, 0x%08x) fw %s api %d htt %d.%d wmi %d cal %s max_sta %d build %u.%u.%u.%u\n", ar->hw_params.name, ar->target_version, ar->chip_id, @@ -134,7 +134,11 @@ void ath10k_print_driver_info(struct ath10k *ar) ar->htt.target_version_minor, ar->wmi.op_version, ath10k_cal_mode_str(ar->cal_mode), - ar->max_num_stations); + ar->max_num_stations, + ar->fw_build_major, + ar->fw_build_minor, + ar->fw_build_si, + ar->fw_build_crm); ath10k_info(ar, "debug %d debugfs %d tracing %d dfs %d testmode %d\n", config_enabled(CONFIG_ATH10K_DEBUG), config_enabled(CONFIG_ATH10K_DEBUGFS), diff --git a/drivers/net/wireless/ath/ath10k/wmi.c b/drivers/net/wireless/ath/ath10k/wmi.c index ac74290..8c26c2a 100644 --- a/drivers/net/wireless/ath/ath10k/wmi.c +++ b/drivers/net/wireless/ath/ath10k/wmi.c @@ -2907,6 +2907,10 @@ void ath10k_wmi_event_service_ready(struct ath10k *ar, struct sk_buff *skb) ar->fw_version_release = (__le32_to_cpu(arg.sw_ver1) & 0xffff0000) >> 16; ar->fw_version_build = (__le32_to_cpu(arg.sw_ver1) & 0x0000ffff); + ar->fw_build_major = (__le32_to_cpu(arg.fw_build) & 0xf0000000) >> 28; + ar->fw_build_minor = (__le32_to_cpu(arg.fw_build) & 0x0f000000) >> 24; + ar->fw_build_si = (__le32_to_cpu(arg.fw_build) & 0x00f00000) >> 20; + ar->fw_build_crm = (__le32_to_cpu(arg.fw_build) & 0x00007fff) >> 0; ar->phy_capability = __le32_to_cpu(arg.phy_capab); ar->num_rf_chains = __le32_to_cpu(arg.num_rf_chains); ar->ath_common.regulatory.current_rd = __le32_to_cpu(arg.eeprom_rd);