aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/iwlwifi/iwl-drv.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/wireless/iwlwifi/iwl-drv.c')
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-drv.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-drv.c b/drivers/net/wireless/iwlwifi/iwl-drv.c
index c3728163be46..b3bc30b4292b 100644
--- a/drivers/net/wireless/iwlwifi/iwl-drv.c
+++ b/drivers/net/wireless/iwlwifi/iwl-drv.c
@@ -128,7 +128,7 @@ struct iwl_drv {
128 const struct iwl_cfg *cfg; 128 const struct iwl_cfg *cfg;
129 129
130 int fw_index; /* firmware we're trying to load */ 130 int fw_index; /* firmware we're trying to load */
131 char firmware_name[25]; /* name of firmware file to load */ 131 char firmware_name[32]; /* name of firmware file to load */
132 132
133 struct completion request_firmware_complete; 133 struct completion request_firmware_complete;
134 134
@@ -237,7 +237,8 @@ static int iwl_request_firmware(struct iwl_drv *drv, bool first)
237 return -ENOENT; 237 return -ENOENT;
238 } 238 }
239 239
240 sprintf(drv->firmware_name, "%s%s%s", name_pre, tag, ".ucode"); 240 snprintf(drv->firmware_name, sizeof(drv->firmware_name), "%s%s.ucode",
241 name_pre, tag);
241 242
242 IWL_DEBUG_INFO(drv, "attempting to load firmware %s'%s'\n", 243 IWL_DEBUG_INFO(drv, "attempting to load firmware %s'%s'\n",
243 (drv->fw_index == UCODE_EXPERIMENTAL_INDEX) 244 (drv->fw_index == UCODE_EXPERIMENTAL_INDEX)