rkwifi: add crystal freq select for 26M and 37.4M
authorhwg <hwg@rock-chips.com>
Wed, 9 May 2012 07:11:42 +0000 (15:11 +0800)
committerhwg <hwg@rock-chips.com>
Wed, 9 May 2012 07:20:54 +0000 (15:20 +0800)
drivers/net/wireless/Kconfig
drivers/net/wireless/rkwifi/rk_wifi_config.c

index 215b659afa191b9507c9ce6550338f4aef645884..d77df10c3b87dae00808a56b25bed1243e6c2d5e 100644 (file)
@@ -97,5 +97,20 @@ choice
 
 endchoice
 
+choice 
+       depends on RKWIFI && WLAN_80211
+       prompt "Select the wifi module crystal freq"
+       default 37_4M
+
+       config 37_4M
+       bool "37_4M"
+           depends on RKWIFI && WLAN_80211
+
+       config 26M
+       bool "26M"
+           depends on RKWIFI && WLAN_80211
+
+endchoice
+
 endif
 
index e94eaa8c42dd8674f4a8aed1ea66b58b33cc7d1c..12471adb4b8ec452feab38f2b05862aa130d5601 100644 (file)
@@ -23,12 +23,6 @@ int rkwifi_set_country_code(char *code)
        return 0;
 }
 
-/* 
- * Set Crystal Freq
- */
-#define CRYSTAL_FREQ 0 // 0: 37.4M; 1: 26M
-
 /* 
  * Set Firmware Path
  */
@@ -39,18 +33,20 @@ int rkwifi_set_firmware(char *fw, char *nvram)
 {
 #ifdef CONFIG_RK903
        sprintf(fw, "%s%s", ANDROID_FW_PATH, "fw_RK903.bin");
-#if CRYSTAL_FREQ       
+#ifdef CONFIG_26M
        sprintf(nvram, "%s%s", ANDROID_FW_PATH, "nvram_RK903_26M.cal");
-#else  
+#endif
+#ifdef CONFIG_37_4M    
        sprintf(nvram, "%s%s", ANDROID_FW_PATH, "nvram_RK903.cal");
 #endif 
 #endif 
 
 #ifdef CONFIG_RK901
        sprintf(fw, "%s%s", ANDROID_FW_PATH, "fw_RK901.bin");
-#if CRYSTAL_FREQ
+#ifdef CONFIG_26M
        sprintf(nvram, "%s%s", ANDROID_FW_PATH, "nvram_RK901_26M.txt");
-#else
+#endif
+#ifdef CONFIG_37_4M
        sprintf(nvram, "%s%s", ANDROID_FW_PATH, "nvram_RK901.txt");
 #endif
 #endif