Commit 0b3dd675 authored by Ajay Singh's avatar Ajay Singh Committed by Kalle Valo

wilc1000: use unified single wilc1000 FW binary

Modify WILC1000 binary filename to use single unified wilc1000 FW.
A single wilc1000 binary is used for different wilc1000 revisions.
Signed-off-by: default avatarAjay Singh <ajay.kathat@microchip.com>
Signed-off-by: default avatarKalle Valo <kvalo@codeaurora.org>
Link: https://lore.kernel.org/r/20200710051826.3267-5-ajay.kathat@microchip.com
parent 9bdcbdaf
# SPDX-License-Identifier: GPL-2.0 # SPDX-License-Identifier: GPL-2.0
obj-$(CONFIG_WILC1000) += wilc1000.o obj-$(CONFIG_WILC1000) += wilc1000.o
ccflags-y += -DFIRMWARE_1002=\"atmel/wilc1002_firmware.bin\" \ ccflags-y += -DFIRMWARE_WILC1000=\"atmel/wilc1000_wifi_firmware.bin\"
-DFIRMWARE_1003=\"atmel/wilc1003_firmware.bin\"
wilc1000-objs := cfg80211.o netdev.o mon.o \ wilc1000-objs := cfg80211.o netdev.o mon.o \
hif.o wlan_cfg.o wlan.o hif.o wlan_cfg.o wlan.o
......
...@@ -176,23 +176,19 @@ static int wilc_wlan_get_firmware(struct net_device *dev) ...@@ -176,23 +176,19 @@ static int wilc_wlan_get_firmware(struct net_device *dev)
struct wilc_vif *vif = netdev_priv(dev); struct wilc_vif *vif = netdev_priv(dev);
struct wilc *wilc = vif->wilc; struct wilc *wilc = vif->wilc;
int chip_id; int chip_id;
const struct firmware *wilc_firmware; const struct firmware *wilc_fw;
char *firmware;
chip_id = wilc_get_chipid(wilc, false); chip_id = wilc_get_chipid(wilc, false);
if (chip_id < 0x1003a0) netdev_info(dev, "ChipID [%x] loading firmware [%s]\n", chip_id,
firmware = FIRMWARE_1002; FIRMWARE_WILC1000);
else
firmware = FIRMWARE_1003;
netdev_info(dev, "loading firmware %s\n", firmware);
if (request_firmware(&wilc_firmware, firmware, wilc->dev) != 0) { if (request_firmware(&wilc_fw, FIRMWARE_WILC1000, wilc->dev) != 0) {
netdev_err(dev, "%s - firmware not available\n", firmware); netdev_err(dev, "%s - firmware not available\n",
FIRMWARE_WILC1000);
return -EINVAL; return -EINVAL;
} }
wilc->firmware = wilc_firmware; wilc->firmware = wilc_fw;
return 0; return 0;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment