wilc1000: increase firmware version array size
authorAjay Singh <ajay.kathat@microchip.com>
Wed, 4 May 2022 16:19:25 +0000 (16:19 +0000)
committerKalle Valo <kvalo@kernel.org>
Wed, 11 May 2022 05:25:33 +0000 (08:25 +0300)
Increase firmware version array size to hold complete version information.
The firmware commit id(Build:) information is also part of the firmware
version string.

Firmware version format:
WILC_WIFI_FW_REL_XX_XX Build: XXXXX

e.g.
WILC_WIFI_FW_REL_15_6 Build: 12804

Signed-off-by: Ajay Singh <ajay.kathat@microchip.com>
Signed-off-by: Kalle Valo <kvalo@kernel.org>
Link: https://lore.kernel.org/r/20220504161924.2146601-1-ajay.kathat@microchip.com
drivers/net/wireless/microchip/wilc1000/netdev.c

index 643bdda..3c292e3 100644 (file)
@@ -14,6 +14,7 @@
 #include "wlan_cfg.h"
 
 #define WILC_MULTICAST_TABLE_SIZE      8
+#define WILC_MAX_FW_VERSION_STR_SIZE   50
 
 /* latest API version supported */
 #define WILC1000_API_VER               1
@@ -522,7 +523,7 @@ static int wilc_wlan_initialize(struct net_device *dev, struct wilc_vif *vif)
 
                if (wilc_wlan_cfg_get(vif, 1, WID_FIRMWARE_VERSION, 1, 0)) {
                        int size;
-                       char firmware_ver[20];
+                       char firmware_ver[WILC_MAX_FW_VERSION_STR_SIZE];
 
                        size = wilc_wlan_cfg_get_val(wl, WID_FIRMWARE_VERSION,
                                                     firmware_ver,