From b22da3d8526a935aa31e086e63f60ff3246cb61c Mon Sep 17 00:00:00 2001
From: hc <hc@nodka.com>
Date: Sat, 09 Dec 2023 07:24:11 +0000
Subject: [PATCH] add stmac read mac form eeprom
---
kernel/drivers/net/wireless/rockchip_wlan/rkwifi/bcmdhd/dhd_pcie.c | 49 ++++++++++---------------------------------------
1 files changed, 10 insertions(+), 39 deletions(-)
diff --git a/kernel/drivers/net/wireless/rockchip_wlan/rkwifi/bcmdhd/dhd_pcie.c b/kernel/drivers/net/wireless/rockchip_wlan/rkwifi/bcmdhd/dhd_pcie.c
old mode 100644
new mode 100755
index 5c10144..035f51b
--- a/kernel/drivers/net/wireless/rockchip_wlan/rkwifi/bcmdhd/dhd_pcie.c
+++ b/kernel/drivers/net/wireless/rockchip_wlan/rkwifi/bcmdhd/dhd_pcie.c
@@ -2367,7 +2367,11 @@
bus->deep_sleep = TRUE;
#endif
+#ifdef CUSTOMER_HW_ROCKCHIP
+ bus->idma_enabled = FALSE;
+#else
bus->idma_enabled = TRUE;
+#endif
bus->ifrm_enabled = TRUE;
#ifdef BCMINTERNAL
bus->dma_chan = 0;
@@ -3557,28 +3561,17 @@
void
dhd_set_bus_params(struct dhd_bus *bus)
{
- struct dhd_conf *conf = bus->dhd->conf;
-
- if (conf->dhd_poll >= 0) {
- bus->poll = conf->dhd_poll;
+ if (bus->dhd->conf->dhd_poll >= 0) {
+ bus->poll = bus->dhd->conf->dhd_poll;
if (!bus->pollrate)
bus->pollrate = 1;
- printf("%s: set polling mode %d\n", __FUNCTION__, conf->dhd_poll);
+ printf("%s: set polling mode %d\n", __FUNCTION__, bus->dhd->conf->dhd_poll);
}
- if (conf->d2h_intr_control >= 0)
- bus->d2h_intr_control = conf->d2h_intr_control;
+ if (bus->dhd->conf->d2h_intr_control >= 0)
+ bus->d2h_intr_control = bus->dhd->conf->d2h_intr_control;
printf("d2h_intr_method -> %s(%d); d2h_intr_control -> %s(%d)\n",
bus->d2h_intr_method ? "PCIE_MSI" : "PCIE_INTX", bus->d2h_intr_method,
bus->d2h_intr_control ? "HOST_IRQ" : "D2H_INTMASK", bus->d2h_intr_control);
-
- if (conf->aspm != -1) {
- bool aspm = conf->aspm ? TRUE : FALSE;
- dhd_bus_aspm_enable_rc_ep(bus, aspm);
- }
- if (conf->l1ss != -1) {
- bool l1ss = conf->l1ss ? TRUE : FALSE;
- dhd_bus_l1ss_enable_rc_ep(bus, l1ss);
- }
}
/**
@@ -9713,7 +9706,7 @@
/* Got D3 Ack. Suspend the bus */
#ifdef OEM_ANDROID
if (active) {
- DHD_ERROR(("%s():Suspend failed because of wakelock "
+ DHD_ERROR(("%s():Suspend failed because of wakelock"
"restoring Dongle to D0\n", __FUNCTION__));
if (bus->dhd->dhd_watchdog_ms_backup) {
@@ -17813,26 +17806,4 @@
addr = apb2_wrapper_reg + apb2_reset_ctrl_offset;
val = 1;
dhd_sbreg_op(dhd, addr, &val, FALSE);
-}
-
-#define BUS_SLEEP_WAIT_CNT 3
-#define BUS_SLEEP_WAIT_MS 20
-int
-dhd_bus_sleep(dhd_pub_t *dhdp, bool sleep, uint32 *intstatus)
-{
- dhd_bus_t *bus = dhdp->bus;
- int active, cnt = 0;
-
- if (bus) {
- while ((active = dhd_os_check_wakelock_all(bus->dhd)) &&
- (cnt < BUS_SLEEP_WAIT_CNT)) {
- OSL_SLEEP(BUS_SLEEP_WAIT_MS);
- cnt++;
- }
- } else {
- DHD_ERROR(("bus is NULL\n"));
- active = -1;
- }
-
- return active;
}
--
Gitblit v1.6.2