wifi: support ap6212 ap6354
authorhwg <hwg@rock-chips.com>
Tue, 10 Mar 2015 08:23:07 +0000 (16:23 +0800)
committerhwg <hwg@rock-chips.com>
Tue, 10 Mar 2015 08:23:18 +0000 (16:23 +0800)
drivers/net/wireless/rockchip_wlan/rkwifi/rk_wifi_config.c
drivers/net/wireless/rockchip_wlan/wifi_sys/rkwifi_sys_iface.c
include/linux/rfkill-wlan.h
net/rfkill/rfkill-wlan.c

index dce8eb14b396b264dccfbb00b1957fc9292ed164..db94e7e79f68b531fc0c4df394a52bbfd9aaac0b 100755 (executable)
@@ -52,6 +52,11 @@ if (chip == WIFI_AP6210) {
        sprintf(nvram, "%s%s", ANDROID_FW_PATH, "nvram_AP6210.txt");
 }
 
+if (chip == WIFI_AP6212) {
+    sprintf(fw, "%s%s", ANDROID_FW_PATH, "fw_bcm43438a0.bin");
+        sprintf(nvram, "%s%s", ANDROID_FW_PATH, "nvram_ap6212.txt");
+}
+
 if (chip == WIFI_AP6234) {
     sprintf(fw, "%s%s", ANDROID_FW_PATH, "fw_bcm43341b0_ag.bin");
        sprintf(nvram, "%s%s", ANDROID_FW_PATH, "nvram_AP6234.txt");
@@ -67,6 +72,11 @@ if (chip == WIFI_AP6335) {
        sprintf(nvram, "%s%s", ANDROID_FW_PATH, "nvram_AP6335.txt");
 }
 
+if (chip == WIFI_AP6354) {
+    sprintf(fw, "%s%s", ANDROID_FW_PATH, "fw_bcm4354a1_ag.bin");
+        sprintf(nvram, "%s%s", ANDROID_FW_PATH, "nvram_ap6354.txt");
+}
+
 if (chip == WIFI_AP6476) {
     sprintf(fw, "%s%s", ANDROID_FW_PATH, "fw_RK901.bin");
        sprintf(nvram, "%s%s", ANDROID_FW_PATH, "nvram_AP6476.txt");
index 795d4b8407d09efa3ff314d4bfc23f15f570d87d..d9f05c81e38b7c6ec25e24037cc131c316e7c064 100755 (executable)
@@ -36,6 +36,11 @@ static ssize_t wifi_chip_read(struct class *cls, struct class_attribute *attr, c
            count = sprintf(_buf, "%s", "AP6210");
            printk("Current WiFi chip is AP6210.\n");
        }
+
+        if(type == WIFI_AP6212) {
+            count = sprintf(_buf, "%s", "AP6212");
+            printk("Current WiFi chip is AP6212.\n");
+        }
        
        if(type == WIFI_AP6234) {
            count = sprintf(_buf, "%s", "AP6234");
@@ -52,6 +57,11 @@ static ssize_t wifi_chip_read(struct class *cls, struct class_attribute *attr, c
            printk("Current WiFi chip is AP6335.\n");
        }
 
+        if(type == WIFI_AP6354) {
+            count = sprintf(_buf, "%s", "AP6354");
+            printk("Current WiFi chip is AP6354.\n");
+        }
+
        if(type == WIFI_AP6441) {
            count = sprintf(_buf, "%s", "AP6441");
            printk("Current WiFi chip is AP6441.\n");
index 6e85cf9b7010c8386cb3fac4adf4bb6a9a2b6a9d..3fd89a421d536ea52e0d8fd11b742b7b3baa1a83 100755 (executable)
@@ -47,9 +47,11 @@ enum {
     WIFI_RK903,
     WIFI_AP6181,
     WIFI_AP6210,
+    WIFI_AP6212,
     WIFI_AP6234,
     WIFI_AP6330,
     WIFI_AP6335,
+    WIFI_AP6354,
     WIFI_AP6441,
     WIFI_AP6476,
     WIFI_AP6493,
index 75d7fe4b7ff1f721b5a7ae1dacb77f59d2527c79..a49bd3052ffd383ed986032e6db3e0a9e8b7e3de 100755 (executable)
@@ -103,6 +103,8 @@ int get_wifi_chip_type(void)
     int type;
     if (strcmp(wifi_chip_type_string, "ap6210") == 0) {
         type = WIFI_AP6210;
+    } else if (strcmp(wifi_chip_type_string, "ap6212") == 0) {
+        type = WIFI_AP6212;
     } else if (strcmp(wifi_chip_type_string, "rk901") == 0) {
         type = WIFI_RK901;    
     } else if (strcmp(wifi_chip_type_string, "rk903") == 0) {
@@ -115,6 +117,8 @@ int get_wifi_chip_type(void)
         type = WIFI_AP6330;
     } else if (strcmp(wifi_chip_type_string, "ap6335") == 0) {
         type = WIFI_AP6335;
+    } else if (strcmp(wifi_chip_type_string, "ap6354") == 0) {
+        type = WIFI_AP6354;
     } else if (strcmp(wifi_chip_type_string, "ap6441") == 0) {
         type = WIFI_AP6441;
     } else if (strcmp(wifi_chip_type_string, "ap6476") == 0) {