compatible with factory tool kernel config
authorhwg <hwg@rock-chips.com>
Wed, 24 Jul 2013 10:43:38 +0000 (18:43 +0800)
committerhwg <hwg@rock-chips.com>
Wed, 24 Jul 2013 10:44:03 +0000 (18:44 +0800)
drivers/net/wireless/wifi_sys/rkwifi_sys_iface.c

index 02631fb6d89548f8347a4e4be6da59c9995b349b..9ef75ed993125a1b00a3b4f7f31bc223a14485fb 100755 (executable)
@@ -20,32 +20,33 @@ static ssize_t wifi_chip_read(struct class *cls, char *_buf)
 #endif
 {
     int count = 0;
-#ifdef CONFIG_MACH_RK_CONFIG
-               if(wifi_type==WIFI_TYPE_RTL8188CU)
-               {
-                       count = sprintf(_buf, "%s", "RTL8188CU");
-                       printk("Current WiFi chip is RTL8188CU.\n");
-    }else      if(wifi_type==WIFI_TYPE_RTL8188EU){
-                       count = sprintf(_buf, "%s", "RTL8188EU");
-                       printk("Current WiFi chip is RTL8188EU.\n");
-    }else if(wifi_type==WIFI_TYPE_MT7601){
-                       count = sprintf(_buf, "%s", "MT7601");
-                       printk("Current WiFi chip is MT7601.\n");
-    }else if(wifi_type==WIFI_TYPE_RTL8188ETV)
-               {
-                        count = sprintf(_buf, "%s", "RTL8188ETV");
-        printk("Current WiFi chip is RTL8188ETV.\n");
-    }else if(wifi_type==WIFI_TYPE_MT5370)
-               {
-                        count = sprintf(_buf, "%s", "MT5370");
-        printk("Current WiFi chip is MT5370.\n");
-    }  
-               else    
-         {
-               printk("NOT surpport type %d\n",wifi_type);
-         }
 
-#else
+#ifdef CONFIG_MACH_RK_FAC
+    if(wifi_type==WIFI_TYPE_RTL8188CU) {
+        count = sprintf(_buf, "%s", "RTL8188CU");
+        printk("Current WiFi chip is RTL8188CU.\n");
+        return count;
+    } else if(wifi_type==WIFI_TYPE_RTL8188EU) {
+        count = sprintf(_buf, "%s", "RTL8188EU");
+        printk("Current WiFi chip is RTL8188EU.\n");
+        return count;
+    } else if(wifi_type==WIFI_TYPE_MT7601) {
+        count = sprintf(_buf, "%s", "MT7601");
+        printk("Current WiFi chip is MT7601.\n");
+        return count;
+    } else if(wifi_type==WIFI_TYPE_RTL8188ETV) {
+        count = sprintf(_buf, "%s", "RTL8188ETV");
+        printk("Current WiFi chip is RTL8188ETV.\n");
+        return count;
+    } else if(wifi_type==WIFI_TYPE_MT5370) {
+        count = sprintf(_buf, "%s", "MT5370");
+        printk("Current WiFi chip is MT5370.\n");
+        return count;
+    } else {
+        //printk("NOT surpport type %d\n",wifi_type);
+    }
+#endif
+
 #ifdef CONFIG_BCM4329
     count = sprintf(_buf, "%s", "BCM4329");
     printk("Current WiFi chip is BCM4329.\n");
@@ -192,9 +193,6 @@ static ssize_t wifi_chip_read(struct class *cls, char *_buf)
     printk("Current WiFi chip is ESP8089.\n");
 #endif
        
-       
-
-#endif
     return count;
 }