From: hwg Date: Thu, 5 Apr 2012 05:35:40 +0000 (+0800) Subject: wifi: add set_firmware_path, update version to 4.01 X-Git-Tag: firefly_0821_release~9482 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=b37e1f56ccb4706dd2f1e59eb38aeb45d81920f4;p=firefly-linux-kernel-4.4.55.git wifi: add set_firmware_path, update version to 4.01 --- diff --git a/drivers/net/wireless/rkwifi/Makefile b/drivers/net/wireless/rkwifi/Makefile index f5eaea6a5b8d..0906752b5758 100644 --- a/drivers/net/wireless/rkwifi/Makefile +++ b/drivers/net/wireless/rkwifi/Makefile @@ -10,7 +10,7 @@ DHDCFLAGS = -Wall -Wstrict-prototypes -Dlinux -DBCMDRIVER \ DHDOFILES = aiutils.o bcmsdh_sdmmc_linux.o dhd_linux.o siutils.o bcmutils.o \ dhd_linux_sched.o bcmwifi.o dhd_sdio.o bcmevent.o dhd_bta.o hndpmu.o \ bcmsdh.o dhd_cdc.o bcmsdh_linux.o dhd_common.o linux_osl.o wl_iw.o \ - bcmsdh_sdmmc.o dhd_custom_gpio.o sbutils.o wldev_common.o wl_android.o + bcmsdh_sdmmc.o dhd_custom_gpio.o sbutils.o wldev_common.o wl_android.o fw_path.o obj-$(CONFIG_RKWIFI) += bcmdhd.o bcmdhd-objs += $(DHDOFILES) diff --git a/drivers/net/wireless/rkwifi/dhd_common.c b/drivers/net/wireless/rkwifi/dhd_common.c index 26129a222113..df7a415189c1 100644 --- a/drivers/net/wireless/rkwifi/dhd_common.c +++ b/drivers/net/wireless/rkwifi/dhd_common.c @@ -169,6 +169,7 @@ const bcm_iovar_t dhd_iovars[] = { {NULL, 0, 0, 0, 0 } }; +extern void set_firmware_path(void); struct dhd_cmn * dhd_common_init(osl_t *osh) { @@ -203,6 +204,9 @@ dhd_common_init(osl_t *osh) #ifdef SOFTAP fw_path2[0] = '\0'; #endif + + set_firmware_path(); + return cmn; } diff --git a/drivers/net/wireless/rkwifi/fw_path.c b/drivers/net/wireless/rkwifi/fw_path.c new file mode 100644 index 000000000000..b15fa76a35ca --- /dev/null +++ b/drivers/net/wireless/rkwifi/fw_path.c @@ -0,0 +1,31 @@ +// +// fw_path.c +// + +#include +#include +#include + +extern char fw_path[]; +extern char nv_path[]; + +void set_firmware_path(void) +{ +#ifdef CONFIG_RK903 + strcpy(fw_path, "/system/etc/firmware/fw_RK903.bin"); + strcpy(nv_path, "/system/etc/firmware/nvram_RK903.txt"); + return; +#endif + +#ifdef CONFIG_RK901 + strcpy(fw_path, "/system/etc/firmware/fw_RK901.bin"); + strcpy(nv_path, "/system/etc/firmware/nvram_RK901.txt"); + return; +#endif + +#ifdef CONFIG_BCM4330 + strcpy(fw_path, "/system/etc/firmware/fw_bcm4330.bin"); + strcpy(nv_path, "/system/etc/firmware/nvram_4330.txt"); + return; +#endif +} diff --git a/drivers/net/wireless/rkwifi/include/rk_wifi_config.h b/drivers/net/wireless/rkwifi/include/rk_wifi_config.h index 3b897a37c168..74e61fe42991 100644 --- a/drivers/net/wireless/rkwifi/include/rk_wifi_config.h +++ b/drivers/net/wireless/rkwifi/include/rk_wifi_config.h @@ -4,7 +4,7 @@ /* * Broadcom BCM4330 driver version. */ -#define BCMDHD_DRV_VERSION "4.00" +#define BCMDHD_DRV_VERSION "4.01" /* Set INIT_COUNTRY_CODE * "US" ---> 11 channels, this is default setting.