forked from ~ljy/RK356X_SDK_RELEASE

hc
2024-05-13 9d77db3c730780c8ef5ccd4b66403ff5675cfe4e
kernel/drivers/net/wireless/rockchip_wlan/rkwifi/bcmdhd/dhd_pcie.c
old mode 100644new mode 100755
....@@ -2367,7 +2367,11 @@
23672367 bus->deep_sleep = TRUE;
23682368 #endif
23692369
2370
+#ifdef CUSTOMER_HW_ROCKCHIP
2371
+ bus->idma_enabled = FALSE;
2372
+#else
23702373 bus->idma_enabled = TRUE;
2374
+#endif
23712375 bus->ifrm_enabled = TRUE;
23722376 #ifdef BCMINTERNAL
23732377 bus->dma_chan = 0;
....@@ -3557,28 +3561,17 @@
35573561 void
35583562 dhd_set_bus_params(struct dhd_bus *bus)
35593563 {
3560
- struct dhd_conf *conf = bus->dhd->conf;
3561
-
3562
- if (conf->dhd_poll >= 0) {
3563
- bus->poll = conf->dhd_poll;
3564
+ if (bus->dhd->conf->dhd_poll >= 0) {
3565
+ bus->poll = bus->dhd->conf->dhd_poll;
35643566 if (!bus->pollrate)
35653567 bus->pollrate = 1;
3566
- printf("%s: set polling mode %d\n", __FUNCTION__, conf->dhd_poll);
3568
+ printf("%s: set polling mode %d\n", __FUNCTION__, bus->dhd->conf->dhd_poll);
35673569 }
3568
- if (conf->d2h_intr_control >= 0)
3569
- bus->d2h_intr_control = conf->d2h_intr_control;
3570
+ if (bus->dhd->conf->d2h_intr_control >= 0)
3571
+ bus->d2h_intr_control = bus->dhd->conf->d2h_intr_control;
35703572 printf("d2h_intr_method -> %s(%d); d2h_intr_control -> %s(%d)\n",
35713573 bus->d2h_intr_method ? "PCIE_MSI" : "PCIE_INTX", bus->d2h_intr_method,
35723574 bus->d2h_intr_control ? "HOST_IRQ" : "D2H_INTMASK", bus->d2h_intr_control);
3573
-
3574
- if (conf->aspm != -1) {
3575
- bool aspm = conf->aspm ? TRUE : FALSE;
3576
- dhd_bus_aspm_enable_rc_ep(bus, aspm);
3577
- }
3578
- if (conf->l1ss != -1) {
3579
- bool l1ss = conf->l1ss ? TRUE : FALSE;
3580
- dhd_bus_l1ss_enable_rc_ep(bus, l1ss);
3581
- }
35823575 }
35833576
35843577 /**
....@@ -9713,7 +9706,7 @@
97139706 /* Got D3 Ack. Suspend the bus */
97149707 #ifdef OEM_ANDROID
97159708 if (active) {
9716
- DHD_ERROR(("%s():Suspend failed because of wakelock "
9709
+ DHD_ERROR(("%s():Suspend failed because of wakelock"
97179710 "restoring Dongle to D0\n", __FUNCTION__));
97189711
97199712 if (bus->dhd->dhd_watchdog_ms_backup) {
....@@ -17813,26 +17806,4 @@
1781317806 addr = apb2_wrapper_reg + apb2_reset_ctrl_offset;
1781417807 val = 1;
1781517808 dhd_sbreg_op(dhd, addr, &val, FALSE);
17816
-}
17817
-
17818
-#define BUS_SLEEP_WAIT_CNT 3
17819
-#define BUS_SLEEP_WAIT_MS 20
17820
-int
17821
-dhd_bus_sleep(dhd_pub_t *dhdp, bool sleep, uint32 *intstatus)
17822
-{
17823
- dhd_bus_t *bus = dhdp->bus;
17824
- int active, cnt = 0;
17825
-
17826
- if (bus) {
17827
- while ((active = dhd_os_check_wakelock_all(bus->dhd)) &&
17828
- (cnt < BUS_SLEEP_WAIT_CNT)) {
17829
- OSL_SLEEP(BUS_SLEEP_WAIT_MS);
17830
- cnt++;
17831
- }
17832
- } else {
17833
- DHD_ERROR(("bus is NULL\n"));
17834
- active = -1;
17835
- }
17836
-
17837
- return active;
1783817809 }