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

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
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
# SPDX-License-Identifier: GPL-2.0
obj-$(CONFIG_WILC1000) += wilc1000.o

ccflags-y += -DFIRMWARE_1002=\"atmel/wilc1002_firmware.bin\" \
		-DFIRMWARE_1003=\"atmel/wilc1003_firmware.bin\"
ccflags-y += -DFIRMWARE_WILC1000=\"atmel/wilc1000_wifi_firmware.bin\"

wilc1000-objs := cfg80211.o netdev.o mon.o \
			hif.o wlan_cfg.o wlan.o
+7 −11
Original line number Diff line number Diff line
@@ -176,23 +176,19 @@ static int wilc_wlan_get_firmware(struct net_device *dev)
	struct wilc_vif *vif = netdev_priv(dev);
	struct wilc *wilc = vif->wilc;
	int chip_id;
	const struct firmware *wilc_firmware;
	char *firmware;
	const struct firmware *wilc_fw;

	chip_id = wilc_get_chipid(wilc, false);

	if (chip_id < 0x1003a0)
		firmware = FIRMWARE_1002;
	else
		firmware = FIRMWARE_1003;

	netdev_info(dev, "loading firmware %s\n", firmware);
	netdev_info(dev, "ChipID [%x] loading firmware [%s]\n", chip_id,
		    FIRMWARE_WILC1000);

	if (request_firmware(&wilc_firmware, firmware, wilc->dev) != 0) {
		netdev_err(dev, "%s - firmware not available\n", firmware);
	if (request_firmware(&wilc_fw, FIRMWARE_WILC1000, wilc->dev) != 0) {
		netdev_err(dev, "%s - firmware not available\n",
			   FIRMWARE_WILC1000);
		return -EINVAL;
	}
	wilc->firmware = wilc_firmware;
	wilc->firmware = wilc_fw;

	return 0;
}