From patchwork Sun Jan 6 12:12:51 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jiri Pirko X-Patchwork-Id: 1937641 Return-Path: X-Original-To: patchwork-linux-wireless@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork2.kernel.org (Postfix) with ESMTP id 53BE8DF2A2 for ; Sun, 6 Jan 2013 12:13:00 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755284Ab3AFMM6 (ORCPT ); Sun, 6 Jan 2013 07:12:58 -0500 Received: from mail-ea0-f177.google.com ([209.85.215.177]:48700 "EHLO mail-ea0-f177.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751997Ab3AFMM5 (ORCPT ); Sun, 6 Jan 2013 07:12:57 -0500 Received: by mail-ea0-f177.google.com with SMTP id c10so7265092eaa.36 for ; Sun, 06 Jan 2013 04:12:56 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:from:to:cc:subject:date:message-id:x-mailer :x-gm-message-state; bh=sK5k94tgSirEH6V87KJvPlppSb/0+I1ZREMHkAdsfxQ=; b=JUAM14NyhVGZ5Lrs0rxwBe/R0KuYDgf4A/3etMisMhAGuJzx9zD3tE2srUONo00XWO va82Q6cZe7H4eniYLH2BfAOrtVbh/wk7PUDfDjkf5GWMy3M5u+D5UqVDAWDtBWtx4jnN lTwe/C5wAurRxMVAAI8R0xnG+CGjkpeo7D291Z+ECgi1EFm8V0gD6NTHvUSTojbpt5bp E30ALvS9/1qCwsHTirCCBwyy4J+nvDTkmAUfqKEk4bIb5rosiyYLycVfS6kjuuCbq/cA CeNXJ2eBj7qIyq+2akMZTmaHFwFFg/+CHkySJHlpdGemx8HfawWu74k+iJJjouJwlsfe f75A== X-Received: by 10.14.209.193 with SMTP id s41mr159779492eeo.9.1357474376177; Sun, 06 Jan 2013 04:12:56 -0800 (PST) Received: from localhost (ip-89-102-9-37.net.upcbroadband.cz. [89.102.9.37]) by mx.google.com with ESMTPS id f6sm123920945eeo.7.2013.01.06.04.12.53 (version=TLSv1/SSLv3 cipher=OTHER); Sun, 06 Jan 2013 04:12:55 -0800 (PST) From: Jiri Pirko To: netdev@vger.kernel.org Cc: davem@davemloft.net, linville@tuxdriver.com, linux-wireless@vger.kernel.org Subject: [patch net-next] net: use ETHTOOL_FWVERS_LEN instead of ETHTOOL_BUSINFO_LEN for fw_ver strings Date: Sun, 6 Jan 2013 13:12:51 +0100 Message-Id: <1357474371-30887-1-git-send-email-jiri@resnulli.us> X-Mailer: git-send-email 1.8.1 X-Gm-Message-State: ALoCoQlpar8sy42HfmlybCaNjnqlIdj+BNK4fujggko7EV/lBFxC4cEZkyY0+lA3Vg7OONFmz0nP Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org Signed-off-by: Jiri Pirko Acked-by: Luciano Coelho --- drivers/net/wireless/ath/ath9k/htc_drv_init.c | 2 +- drivers/net/wireless/iwlwifi/iwl-fw.h | 2 +- drivers/net/wireless/ti/wlcore/wlcore_i.h | 4 ++-- include/net/cfg80211.h | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/net/wireless/ath/ath9k/htc_drv_init.c b/drivers/net/wireless/ath/ath9k/htc_drv_init.c index 05d5ba6..b2f85cb 100644 --- a/drivers/net/wireless/ath/ath9k/htc_drv_init.c +++ b/drivers/net/wireless/ath/ath9k/htc_drv_init.c @@ -783,7 +783,7 @@ static int ath9k_init_firmware_version(struct ath9k_htc_priv *priv) priv->fw_version_major = be16_to_cpu(cmd_rsp.major); priv->fw_version_minor = be16_to_cpu(cmd_rsp.minor); - snprintf(hw->wiphy->fw_version, ETHTOOL_BUSINFO_LEN, "%d.%d", + snprintf(hw->wiphy->fw_version, sizeof(hw->wiphy->fw_version), "%d.%d", priv->fw_version_major, priv->fw_version_minor); diff --git a/drivers/net/wireless/iwlwifi/iwl-fw.h b/drivers/net/wireless/iwlwifi/iwl-fw.h index d1a86b6..715291e 100644 --- a/drivers/net/wireless/iwlwifi/iwl-fw.h +++ b/drivers/net/wireless/iwlwifi/iwl-fw.h @@ -157,7 +157,7 @@ struct fw_img { struct iwl_fw { u32 ucode_ver; - char fw_version[ETHTOOL_BUSINFO_LEN]; + char fw_version[ETHTOOL_FWVERS_LEN]; /* ucode images */ struct fw_img img[IWL_UCODE_TYPE_MAX]; diff --git a/drivers/net/wireless/ti/wlcore/wlcore_i.h b/drivers/net/wireless/ti/wlcore/wlcore_i.h index 6678d4b..5ce26cf 100644 --- a/drivers/net/wireless/ti/wlcore/wlcore_i.h +++ b/drivers/net/wireless/ti/wlcore/wlcore_i.h @@ -122,9 +122,9 @@ enum { struct wl1271_chip { u32 id; - char fw_ver_str[ETHTOOL_BUSINFO_LEN]; + char fw_ver_str[ETHTOOL_FWVERS_LEN]; unsigned int fw_ver[NUM_FW_VER]; - char phy_fw_ver_str[ETHTOOL_BUSINFO_LEN]; + char phy_fw_ver_str[ETHTOOL_FWVERS_LEN]; }; #define NUM_TX_QUEUES 4 diff --git a/include/net/cfg80211.h b/include/net/cfg80211.h index 8e6a6b7..f78fa19 100644 --- a/include/net/cfg80211.h +++ b/include/net/cfg80211.h @@ -2333,7 +2333,7 @@ struct wiphy { u32 rts_threshold; u8 coverage_class; - char fw_version[ETHTOOL_BUSINFO_LEN]; + char fw_version[ETHTOOL_FWVERS_LEN]; u32 hw_version; #ifdef CONFIG_PM