Wifi:bcmdhd: modify to use oob way. reduce rfkill-bt init time.
authorgwl <gwl@rock-chips.com>
Thu, 20 Mar 2014 03:28:00 +0000 (11:28 +0800)
committergwl <gwl@rock-chips.com>
Thu, 20 Mar 2014 03:28:07 +0000 (11:28 +0800)
arch/arm/boot/dts/rk3188-tb.dts
arch/arm/boot/dts/rk3288-tb.dts
drivers/net/wireless/rockchip_wlan/rkwifi/bcmdhd/Makefile
net/rfkill/rfkill-bt.c

index 50592699705f0e1978827aef0beceec2b1df90dd..a9b5be87f7d3d5ed2f86eec05f2dff9eb62376e6 100755 (executable)
                
        supports-highspeed;             
        supports-sdio;
-       //cap-sdio-irq;
+       cap-sdio-irq;
        status = "okay";
 };
 
index 08925d07739b1a312b88717e9cb1d62136a9212e..7f6c9d41eee56df8c67591481a601952bee99098 100755 (executable)
                
        supports-highspeed;             
        supports-sdio;
-       //cap-sdio-irq;
+       cap-sdio-irq;
 
        status = "diabled";
 };
index 2205af16fe36e25070508300d7077e10fc02d631..54f6c9b2b93ed9b5c2f245fe96ca5bb6ab114774 100644 (file)
@@ -6,7 +6,8 @@
 MODULE_NAME = bcmdhd
 #CONFIG_RKWIFI = m
 CONFIG_CFG80211 = y
-#CONFIG_BCMDHD_OOB = y
+CONFIG_BCMDHD_OOB = y
+#CONFIG_BCMDHD_POWER_OFF_IN_SUSPEND = y
 
 DHDCFLAGS = -Wall -Wstrict-prototypes -Dlinux -DBCMDRIVER                 \
        -DBCMDONGLEHOST -DUNRELEASEDCHIP -DBCMDMA32 -DWLBTAMP -DBCMFILEIMAGE  \
@@ -15,7 +16,7 @@ DHDCFLAGS = -Wall -Wstrict-prototypes -Dlinux -DBCMDRIVER                 \
        -DMMC_SDIO_ABORT -DBCMSDIO -DBCMLXSDMMC -DBCMPLATFORM_BUS             \
        -DWIFI_ACT_FRAME -DARP_OFFLOAD_SUPPORT                                \
        -DKEEP_ALIVE -DPKT_FILTER_SUPPORT -DGET_CUSTOM_MAC_ENABLE             \
-       -DEMBEDDED_PLATFORM -DPNO_SUPPORT          \
+       -DEMBEDDED_PLATFORM -DPNO_SUPPORT -DENABLE_INSMOD_NO_FW_LOAD          \
        -DDHD_USE_IDLECOUNT -DSET_RANDOM_MAC_SOFTAP -DVSDB                    \
        -DWL_CFG80211_VSDB_PRIORITIZE_SCAN_REQUEST -DSDIO_CRC_ERROR_FIX       \
        -DESCAN_RESULT_PATCH -DHT40_GO -DPASS_ARP_PACKET -DSUPPORT_PM2_ONLY   \
@@ -24,7 +25,7 @@ DHDCFLAGS = -Wall -Wstrict-prototypes -Dlinux -DBCMDRIVER                 \
        -DWL_SUPPORT_BACKPORTED_KPATCHES                                      \
        -Idrivers/net/wireless/rockchip_wlan/rkwifi/bcmdhd \
     -Idrivers/net/wireless/rockchip_wlan/rkwifi/bcmdhd/include
-#-DENABLE_INSMOD_NO_FW_LOAD
+
 DHDOFILES = aiutils.o bcmsdh_sdmmc_linux.o dhd_linux.o siutils.o bcmutils.o   \
        dhd_linux_sched.o bcmwifi_channels.o dhd_sdio.o bcmevent.o dhd_bta.o hndpmu.o  \
        bcmsdh.o dhd_cdc.o bcmsdh_linux.o dhd_common.o dhd_wlfc.o dhd_ip.o linux_osl.o \
index bcd5ac2068d77d33dce3cf52b34fa16369006184..06c666a598eb88ffe32582919e9ee0d3f045c683 100755 (executable)
@@ -595,7 +595,16 @@ static int rfkill_rk_probe(struct platform_device *pdev)
     wake_lock_init(&(rfkill->bt_irq_wl), WAKE_LOCK_SUSPEND, "rfkill_rk_irq_wl");
     INIT_DELAYED_WORK(&rfkill->bt_sleep_delay_work, rfkill_rk_delay_sleep_bt);
 
-    rfkill_rk_set_power(rfkill, BT_BLOCKED);
+    //rfkill_rk_set_power(rfkill, BT_BLOCKED);
+    // bt turn off power
+    if (gpio_is_valid(pdata->poweron_gpio.io))
+    {
+        gpio_direction_output(pdata->poweron_gpio.io, !pdata->poweron_gpio.enable);
+    }
+    if (gpio_is_valid(pdata->reset_gpio.io))
+    {
+        gpio_direction_output(pdata->reset_gpio.io, !pdata->reset_gpio.enable);
+    }
 
        platform_set_drvdata(pdev, rfkill);