net: use ETHTOOL_FWVERS_LEN instead of ETHTOOL_BUSINFO_LEN for fw_ver strings
Signed-off-by: Jiri Pirko <jiri@resnulli.us> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:

committed by
David S. Miller

parent
7826d43f2d
commit
81135548e6
@@ -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);
|
||||
|
||||
|
Reference in New Issue
Block a user