Message ID | 1452584395-24910-10-git-send-email-glen.lee@atmel.com (mailing list archive) |
---|---|
State | Not Applicable |
Delegated to: | Kalle Valo |
Headers | show |
Hi Glen, On Tue, Jan 12, 2016 at 6:39 PM, Glen Lee <glen.lee@atmel.com> wrote: > Use a unified firmware for all mode of operations which are station, ap and > p2p. Two firmware are introduced for 1002 and 1003 chipset. > > Signed-off-by: Glen Lee <glen.lee@atmel.com> > --- > drivers/staging/wilc1000/Makefile | 5 ++--- > drivers/staging/wilc1000/linux_wlan.c | 18 +++++++++--------- > 2 files changed, 11 insertions(+), 12 deletions(-) > > diff --git a/drivers/staging/wilc1000/Makefile b/drivers/staging/wilc1000/Makefile > index 20a5cb9..90c3760 100644 > --- a/drivers/staging/wilc1000/Makefile > +++ b/drivers/staging/wilc1000/Makefile > @@ -1,8 +1,7 @@ > obj-$(CONFIG_WILC1000) += wilc1000.o > > -ccflags-y += -DSTA_FIRMWARE=\"atmel/wilc1000_fw.bin\" \ > - -DAP_FIRMWARE=\"atmel/wilc1000_ap_fw.bin\" \ > - -DP2P_CONCURRENCY_FIRMWARE=\"atmel/wilc1000_p2p_fw.bin\" > +ccflags-y += -DFIRMWARE_1002=\"atmel/wilc1002_firmware.bin\" \ > + -DFIRMWARE_1003=\"atmel/wilc1003_firmware.bin\" You can probably put these defines in a header somewhere instead of here. Also, are these firmwares publicly available and have they been submitted to linux-firmware? Thanks,
On 2016? 01? 13? 08:18, Julian Calaby wrote: > Hi Glen, > > On Tue, Jan 12, 2016 at 6:39 PM, Glen Lee <glen.lee@atmel.com> wrote: >> Use a unified firmware for all mode of operations which are station, ap and >> p2p. Two firmware are introduced for 1002 and 1003 chipset. >> >> Signed-off-by: Glen Lee <glen.lee@atmel.com> >> --- >> drivers/staging/wilc1000/Makefile | 5 ++--- >> drivers/staging/wilc1000/linux_wlan.c | 18 +++++++++--------- >> 2 files changed, 11 insertions(+), 12 deletions(-) >> >> diff --git a/drivers/staging/wilc1000/Makefile b/drivers/staging/wilc1000/Makefile >> index 20a5cb9..90c3760 100644 >> --- a/drivers/staging/wilc1000/Makefile >> +++ b/drivers/staging/wilc1000/Makefile >> @@ -1,8 +1,7 @@ >> obj-$(CONFIG_WILC1000) += wilc1000.o >> >> -ccflags-y += -DSTA_FIRMWARE=\"atmel/wilc1000_fw.bin\" \ >> - -DAP_FIRMWARE=\"atmel/wilc1000_ap_fw.bin\" \ >> - -DP2P_CONCURRENCY_FIRMWARE=\"atmel/wilc1000_p2p_fw.bin\" >> +ccflags-y += -DFIRMWARE_1002=\"atmel/wilc1002_firmware.bin\" \ >> + -DFIRMWARE_1003=\"atmel/wilc1003_firmware.bin\" > You can probably put these defines in a header somewhere instead of here. Hi Julian, It's better to define in header as you say. I'll do this later. > > Also, are these firmwares publicly available and have they been > submitted to linux-firmware? Not yet. We will patch new firmware as soon as possible. Thanks, Glen lee. > > Thanks, > -- To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
diff --git a/drivers/staging/wilc1000/Makefile b/drivers/staging/wilc1000/Makefile index 20a5cb9..90c3760 100644 --- a/drivers/staging/wilc1000/Makefile +++ b/drivers/staging/wilc1000/Makefile @@ -1,8 +1,7 @@ obj-$(CONFIG_WILC1000) += wilc1000.o -ccflags-y += -DSTA_FIRMWARE=\"atmel/wilc1000_fw.bin\" \ - -DAP_FIRMWARE=\"atmel/wilc1000_ap_fw.bin\" \ - -DP2P_CONCURRENCY_FIRMWARE=\"atmel/wilc1000_p2p_fw.bin\" +ccflags-y += -DFIRMWARE_1002=\"atmel/wilc1002_firmware.bin\" \ + -DFIRMWARE_1003=\"atmel/wilc1003_firmware.bin\" ccflags-y += -I$(src)/ -DWILC_ASIC_A0 -DWILC_DEBUGFS #ccflags-y += -DTCP_ACK_FILTER diff --git a/drivers/staging/wilc1000/linux_wlan.c b/drivers/staging/wilc1000/linux_wlan.c index 58837d7..9dccfd8 100644 --- a/drivers/staging/wilc1000/linux_wlan.c +++ b/drivers/staging/wilc1000/linux_wlan.c @@ -416,21 +416,21 @@ int wilc_wlan_get_firmware(struct net_device *dev) { struct wilc_vif *vif; struct wilc *wilc; - int ret = 0; + int chip_id, ret = 0; const struct firmware *wilc_firmware; char *firmware; vif = netdev_priv(dev); wilc = vif->wilc; - if (vif->iftype == AP_MODE) { - firmware = AP_FIRMWARE; - } else if (vif->iftype == STATION_MODE) { - firmware = STA_FIRMWARE; - } else { - PRINT_D(INIT_DBG, "Get P2P_CONCURRENCY_FIRMWARE\n"); - firmware = P2P_CONCURRENCY_FIRMWARE; - } + chip_id = wilc_get_chipid(wilc, 0); + + if(chip_id < 0x1003a0) + firmware = FIRMWARE_1002; + else + firmware = FIRMWARE_1003; + + netdev_info(dev, "loading firmware %s\n", firmware); if (!vif) { PRINT_ER("vif is NULL\n");
Use a unified firmware for all mode of operations which are station, ap and p2p. Two firmware are introduced for 1002 and 1003 chipset. Signed-off-by: Glen Lee <glen.lee@atmel.com> --- drivers/staging/wilc1000/Makefile | 5 ++--- drivers/staging/wilc1000/linux_wlan.c | 18 +++++++++--------- 2 files changed, 11 insertions(+), 12 deletions(-)