summaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet
diff options
context:
space:
mode:
authorRick Farrington <ricardo.farrington@cavium.com>2017-09-22 17:12:51 -0700
committerDavid S. Miller <davem@davemloft.net>2017-09-25 20:25:40 -0700
commit429cbf6bde1adff108171ad4b2387e62f851d609 (patch)
tree48bbe2dc8a2c89373fae56f579e52508607aee5c /drivers/net/ethernet
parentb36e48209157fdd98a5589a3dd60ff3fbf51e16d (diff)
downloadlinux-429cbf6bde1adff108171ad4b2387e62f851d609.tar.bz2
liquidio: update module parameter fw_type to reflect firmware type loaded
Signed-off-by: Rick Farrington <ricardo.farrington@cavium.com> Signed-off-by: Felix Manlunas <felix.manlunas@cavium.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet')
-rw-r--r--drivers/net/ethernet/cavium/liquidio/lio_main.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/net/ethernet/cavium/liquidio/lio_main.c b/drivers/net/ethernet/cavium/liquidio/lio_main.c
index a3c9867c0340..963803bc6633 100644
--- a/drivers/net/ethernet/cavium/liquidio/lio_main.c
+++ b/drivers/net/ethernet/cavium/liquidio/lio_main.c
@@ -1934,10 +1934,12 @@ static int load_firmware(struct octeon_device *oct)
char fw_name[LIO_MAX_FW_FILENAME_LEN];
char *tmp_fw_type;
- if (fw_type_is_auto())
+ if (fw_type_is_auto()) {
tmp_fw_type = LIO_FW_NAME_TYPE_NIC;
- else
+ strncpy(fw_type, tmp_fw_type, sizeof(fw_type));
+ } else {
tmp_fw_type = fw_type;
+ }
sprintf(fw_name, "%s%s%s_%s%s", LIO_FW_DIR, LIO_FW_BASE_NAME,
octeon_get_conf(oct)->card_name, tmp_fw_type,