rtl8723bs wifi: add wifi diver select
authorhwg <hwg@rock-chips.com>
Wed, 20 Aug 2014 11:51:38 +0000 (19:51 +0800)
committerhwg <hwg@rock-chips.com>
Wed, 20 Aug 2014 11:51:38 +0000 (19:51 +0800)
include/linux/rfkill-wlan.h
net/rfkill/rfkill-wlan.c

index 22ccd6d645a6273a7ecdbde803e0993c0b29febd..3754099a9780f2027c4dfec835d0c55d91a6b44c 100755 (executable)
@@ -43,7 +43,8 @@ struct rksdmmc_gpio_wifi_moudle {
 enum {
     WIFI_RKWIFI,
     WIFI_RTL8188EU,
-    WIFI_ESP8089
+    WIFI_ESP8089,
+    WIFI_RTL8723BS
 };
 
 int rfkill_get_wifi_power_state(int *power, int *vref_ctrl_enable);
index f91a4912ca82cfb25033952caa7bbda2b9987393..79ea0fc726fd1aee8bd852eaa0dc0dce0d23753f 100755 (executable)
@@ -101,6 +101,8 @@ int get_wifi_chip_type(void)
         type = WIFI_RTL8188EU;
     } else if (strcmp(wifi_chip_type_string, "esp8089") == 0) {
         type = WIFI_ESP8089;
+    } else if (strcmp(wifi_chip_type_string, "rtl8723bs") == 0) {
+        type = WIFI_RTL8723BS; 
     } else {
         type = WIFI_RKWIFI;
     }
@@ -443,10 +445,10 @@ int rockchip_wifi_set_carddetect(int val)
        chip = get_wifi_chip_type();
 
        /*  irq_type : 0, oob; 1, cap-sdio-irq */
-       if (chip == WIFI_ESP8089)
-               irq_type = 1;
-       else
+       if (chip == WIFI_RKWIFI)
                irq_type = 0;
+       else
+               irq_type = 1;
 
        return mmc_host_rescan(NULL, val, irq_type);//NULL => SDIO host
 }