wifi: add set_firmware_path, update version to 4.01
authorhwg <hwg@rock-chips.com>
Thu, 5 Apr 2012 05:35:40 +0000 (13:35 +0800)
committerhwg <hwg@rock-chips.com>
Thu, 5 Apr 2012 05:35:40 +0000 (13:35 +0800)
drivers/net/wireless/rkwifi/Makefile
drivers/net/wireless/rkwifi/dhd_common.c
drivers/net/wireless/rkwifi/fw_path.c [new file with mode: 0644]
drivers/net/wireless/rkwifi/include/rk_wifi_config.h

index f5eaea6a5b8dc9d6c1e7710ba72630d4151e6ca1..0906752b5758c0d348faf88c38634132c81e1df1 100644 (file)
@@ -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)
index 26129a2221137d0f0a9b7eeac84ec6503078cd57..df7a415189c158a7f6891f120b2ca9ef5bfba828 100644 (file)
@@ -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 (file)
index 0000000..b15fa76
--- /dev/null
@@ -0,0 +1,31 @@
+//\r
+// fw_path.c\r
+//\r
+\r
+#include <typedefs.h>\r
+#include <linuxver.h>\r
+#include <osl.h>\r
+\r
+extern char fw_path[];\r
+extern char nv_path[];\r
+\r
+void set_firmware_path(void)\r
+{\r
+#ifdef CONFIG_RK903\r
+       strcpy(fw_path, "/system/etc/firmware/fw_RK903.bin");\r
+       strcpy(nv_path, "/system/etc/firmware/nvram_RK903.txt");\r
+       return;\r
+#endif \r
+\r
+#ifdef CONFIG_RK901\r
+       strcpy(fw_path, "/system/etc/firmware/fw_RK901.bin");\r
+       strcpy(nv_path, "/system/etc/firmware/nvram_RK901.txt");\r
+       return;\r
+#endif \r
+\r
+#ifdef CONFIG_BCM4330\r
+       strcpy(fw_path, "/system/etc/firmware/fw_bcm4330.bin");\r
+       strcpy(nv_path, "/system/etc/firmware/nvram_4330.txt");\r
+       return;\r
+#endif \r
+}\r
index 3b897a37c1687f40481835ae34035dd57c468a11..74e61fe42991e953bed00dc44bde0529cfadd295 100644 (file)
@@ -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.