/*
* DHD Bus Module for SDIO
*
- * Copyright (C) 1999-2018, Broadcom.
+ * Copyright (C) 1999-2019, Broadcom.
*
* Unless you and Broadcom execute a separate written software license
* agreement governing use of this software, this software is licensed to you
*
* <<Broadcom-WL-IPTag/Open:>>
*
- * $Id: dhd_sdio.c 771911 2018-07-12 12:35:33Z $
+ * $Id: dhd_sdio.c 825481 2019-06-14 10:06:03Z $
*/
#include <typedefs.h>
/* Device console log buffer state */
#define CONSOLE_LINE_MAX 192
-#define CONSOLE_BUFFER_MAX 2024
+#define CONSOLE_BUFFER_MAX 8192
typedef struct dhd_console {
uint count; /* Poll interval msec counter */
uint log_addr; /* Log struct address (fixed) */
bool usebufpool;
int32 txinrx_thres; /* num of in-queued pkts */
int32 dotxinrx; /* tx first in dhdsdio_readframes */
+#ifdef BCMSDIO_RXLIM_POST
+ bool rxlim_en;
+ uint32 rxlim_addr;
+#endif /* BCMSDIO_RXLIM_POST */
#ifdef SDTEST
/* external loopback */
bool ext_loop;
#if defined(DHD_FW_COREDUMP)
static int dhdsdio_mem_dump(dhd_bus_t *bus);
+static int dhdsdio_get_mem_dump(dhd_bus_t *bus);
#endif /* DHD_FW_COREDUMP */
static int dhdsdio_devcap_set(dhd_bus_t *bus, uint8 cap);
static int dhdsdio_download_state(dhd_bus_t *bus, bool enter);
(bus->sih->chip == BCM4362_CHIP_ID) ||
(bus->sih->chip == BCM43012_CHIP_ID) ||
(bus->sih->chip == BCM43014_CHIP_ID) ||
- (bus->sih->chip == BCM43751_CHIP_ID)) {
+ (bus->sih->chip == BCM43751_CHIP_ID) ||
+ (bus->sih->chip == BCM43752_CHIP_ID)) {
core_capext = TRUE;
} else {
core_capext = bcmsdh_reg_read(bus->sdh,
CHIPID(bus->sih->chip) == BCM43012_CHIP_ID ||
CHIPID(bus->sih->chip) == BCM4362_CHIP_ID ||
CHIPID(bus->sih->chip) == BCM43014_CHIP_ID ||
- CHIPID(bus->sih->chip) == BCM43751_CHIP_ID)
+ CHIPID(bus->sih->chip) == BCM43751_CHIP_ID ||
+ CHIPID(bus->sih->chip) == BCM43752_CHIP_ID)
dhdsdio_devcap_set(bus, SDIOD_CCCR_BRCM_CARDCAP_CMD_NODEC);
if (bus->sih->chip == BCM43012_CHIP_ID) {
DHD_ERROR(("%s: HT Avail request error: %d\n", __FUNCTION__, err));
}
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 27)
else if (ht_avail_error == HT_AVAIL_ERROR_MAX) {
bus->dhd->hang_reason = HANG_REASON_HT_AVAIL_ERROR;
dhd_os_send_hang_message(bus->dhd);
}
-#endif /* LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 27) */
return BCME_ERROR;
} else {
ht_avail_error = 0;
}
#endif /* BT_OVER_SDIO */
+#ifdef USE_DYNAMIC_F2_BLKSIZE
int dhdsdio_func_blocksize(dhd_pub_t *dhd, int function_num, int block_size)
{
int func_blk_size = function_num;
bcmerr = dhd_bus_iovar_op(dhd, "sd_blocksize", NULL,
0, &func_blk_size, sizeof(int32), IOV_SET);
if (bcmerr != BCME_OK) {
- DHD_ERROR(("%s: Set F2 Block size error\n", __FUNCTION__));
+ DHD_ERROR(("%s: Set F%d Block size error\n", __FUNCTION__, function_num));
return BCME_ERROR;
}
}
return BCME_OK;
}
+#endif /* USE_DYNAMIC_F2_BLKSIZE */
#if defined(OOB_INTR_ONLY) || defined(BCMSPI_ANDROID) || defined(FORCE_WOWLAN)
void
prec = PRIO2PREC((PKTPRIO(pkt) & PRIOMASK));
/* move from dhdsdio_sendfromq(), try to orphan skb early */
- if (bus->dhd->conf->orphan_move)
+ if (bus->dhd->conf->orphan_move == 1)
PKTORPHAN(pkt, bus->dhd->conf->tsq);
/* Check for existing queue, current flow-control, pending event, or pending clock */
#ifdef DHD_LOSSLESS_ROAMING
uint8 *pktdata;
struct ether_header *eh;
+#ifdef BDC
+ struct bdc_header *bdc_header;
+ uint8 data_offset;
+#endif // endif
#endif /* DHD_LOSSLESS_ROAMING */
DHD_TRACE(("%s: Enter\n", __FUNCTION__));
pktdata = (uint8 *)PKTDATA(osh, pkts[i]);
#ifdef BDC
/* Skip BDC header */
- pktdata += BDC_HEADER_LEN + ((struct bdc_header *)pktdata)->dataOffset;
+ bdc_header = (struct bdc_header *)pktdata;
+ data_offset = bdc_header->dataOffset;
+ pktdata += BDC_HEADER_LEN + (data_offset << 2);
#endif // endif
eh = (struct ether_header *)pktdata;
if (eh->ether_type == hton16(ETHER_TYPE_802_1X)) {
/* Restore to original priority for 802.1X packet */
if (prio == PRIO_8021D_NC) {
PKTSETPRIO(pkts[i], dhd->prio_8021x);
+#ifdef BDC
+ /* Restore to original priority in BDC header */
+ bdc_header->priority =
+ (dhd->prio_8021x & BDC_PRIORITY_MASK);
+#endif // endif
}
}
#endif /* DHD_LOSSLESS_ROAMING */
} else {
bus->dhd->txcnt_timeout++;
if (!bus->dhd->hang_was_sent) {
- DHD_ERROR(("%s: ctrl_frame_stat == TRUE txcnt_timeout=%d, bus->tx_max %d, bus->tx_seq %d\n",
- __FUNCTION__, bus->dhd->txcnt_timeout, bus->tx_max, bus->tx_seq));
+ DHD_ERROR(("%s: ctrl_frame_stat == TRUE txcnt_timeout=%d\n",
+ __FUNCTION__, bus->dhd->txcnt_timeout));
+#ifdef BCMSDIO_RXLIM_POST
+ DHD_ERROR(("%s: rxlim_en=%d, rxlim enable=%d, rxlim_addr=%d\n",
+ __FUNCTION__,
+ bus->dhd->conf->rxlim_en, bus->rxlim_en, bus->rxlim_addr));
+#endif /* BCMSDIO_RXLIM_POST */
}
#ifdef DHD_FW_COREDUMP
/* Collect socram dump */
return -EIO;
/* Wait until control frame is available */
- timeleft = dhd_os_ioctl_resp_wait(bus->dhd, &bus->rxlen, false);
+ timeleft = dhd_os_ioctl_resp_wait(bus->dhd, &bus->rxlen);
dhd_os_sdlock(bus->dhd);
rxlen = bus->rxlen;
dhd_sched_dpc(bus->dhd);
/* Wait until control frame is available */
- timeleft = dhd_os_ioctl_resp_wait(bus->dhd, &bus->rxlen, true);
+ timeleft = dhd_os_ioctl_resp_wait(bus->dhd, &bus->rxlen);
dhd_os_sdlock(bus->dhd);
rxlen = bus->rxlen;
sh->console_addr = ltoh32(sh->console_addr);
sh->msgtrace_addr = ltoh32(sh->msgtrace_addr);
+#ifdef BCMSDIO_RXLIM_POST
+ if (sh->flags & SDPCM_SHARED_RXLIM_POST) {
+ if (bus->dhd->conf->rxlim_en)
+ bus->rxlim_en = !!sh->msgtrace_addr;
+ bus->rxlim_addr = sh->msgtrace_addr;
+ DHD_INFO(("%s: rxlim_en=%d, rxlim enable=%d, rxlim_addr=%d\n",
+ __FUNCTION__,
+ bus->dhd->conf->rxlim_en, bus->rxlim_en, bus->rxlim_addr));
+ sh->flags &= ~SDPCM_SHARED_RXLIM_POST;
+ } else {
+ bus->rxlim_en = 0;
+ DHD_INFO(("%s: FW has no rx limit post support\n", __FUNCTION__));
+ }
+#endif /* BCMSDIO_RXLIM_POST */
+
if ((sh->flags & SDPCM_SHARED_VERSION_MASK) == 3 && SDPCM_SHARED_VERSION == 1)
return BCME_OK;
return dhdsdio_mem_dump(bus);
}
+int
+dhd_bus_get_mem_dump(dhd_pub_t *dhdp)
+{
+ if (!dhdp) {
+ DHD_ERROR(("%s: dhdp is NULL\n", __FUNCTION__));
+ return BCME_ERROR;
+ }
+
+ return dhdsdio_get_mem_dump(dhdp->bus);
+}
+
static int
-dhdsdio_mem_dump(dhd_bus_t *bus)
+dhdsdio_get_mem_dump(dhd_bus_t *bus)
{
- int ret = 0;
- int size; /* Full mem size */
+ int ret = BCME_ERROR;
+ int size = bus->ramsize; /* Full mem size */
uint32 start = bus->dongle_ram_base; /* Start address */
uint read_size = 0; /* Read size of each iteration */
- uint8 *buf = NULL, *databuf = NULL;
+ uint8 *p_buf = NULL, *databuf = NULL;
/* Get full mem size */
- size = bus->ramsize;
- buf = dhd_get_fwdump_buf(bus->dhd, size);
- if (!buf) {
- DHD_ERROR(("%s: Out of memory (%d bytes)\n", __FUNCTION__, size));
- return -1;
+ p_buf = dhd_get_fwdump_buf(bus->dhd, size);
+ if (!p_buf) {
+ DHD_ERROR(("%s: Out of memory (%d bytes)\n",
+ __FUNCTION__, size));
+ return BCME_ERROR;
}
dhd_os_sdlock(bus->dhd);
/* Read mem content */
DHD_ERROR(("Dump dongle memory\n"));
- databuf = buf;
- while (size)
- {
+ databuf = p_buf;
+ while (size) {
read_size = MIN(MEMBLOCK, size);
- if ((ret = dhdsdio_membytes(bus, FALSE, start, databuf, read_size)))
- {
+ ret = dhdsdio_membytes(bus, FALSE, start, databuf, read_size);
+ if (ret) {
DHD_ERROR(("%s: Error membytes %d\n", __FUNCTION__, ret));
ret = BCME_ERROR;
break;
dhd_os_sdunlock(bus->dhd);
- /* schedule a work queue to perform actual memdump. dhd_mem_dump() performs the job */
- if (!ret) {
- /* buf, actually soc_ram free handled in dhd_{free,clear} */
- dhd_schedule_memdump(bus->dhd, buf, bus->ramsize);
+ return ret;
+}
+
+static int
+dhdsdio_mem_dump(dhd_bus_t *bus)
+{
+ dhd_pub_t *dhdp;
+ int ret = BCME_ERROR;
+
+ dhdp = bus->dhd;
+ if (!dhdp) {
+ DHD_ERROR(("%s: dhdp is NULL\n", __FUNCTION__));
+ return ret;
+ }
+
+ ret = dhdsdio_get_mem_dump(bus);
+ if (ret) {
+ DHD_ERROR(("%s: failed to get mem dump, err=%d\n",
+ __FUNCTION__, ret));
+ } else {
+ /* schedule a work queue to perform actual memdump.
+ * dhd_mem_dump() performs the job
+ */
+ dhd_schedule_memdump(dhdp, dhdp->soc_ram, dhdp->soc_ram_length);
+ /* soc_ram free handled in dhd_{free,clear} */
}
return ret;
return bcmerror;
}
+bool
+dhd_bus_is_multibp_capable(struct dhd_bus *bus)
+{
+ return MULTIBP_CAP(bus->sih);
+}
+
static int
dhdsdio_download_state(dhd_bus_t *bus, bool enter)
{
if (bcmsdh_iovar_op(bus->sdh, "sd_blocksize", &fnum, sizeof(int32),
&bus->blocksize, sizeof(int32), FALSE) != BCME_OK) {
bus->blocksize = 0;
- DHD_ERROR(("%s: fail on %s get\n", __FUNCTION__, "sd_blocksize"));
+ DHD_ERROR(("%s: fail on fn %d %s get\n",
+ __FUNCTION__, fnum, "sd_blocksize"));
} else {
- DHD_INFO(("%s: noted %s update, value now %d\n",
- __FUNCTION__, "sd_blocksize", bus->blocksize));
+ DHD_INFO(("%s: noted fn %d %s update, value now %d\n",
+ __FUNCTION__, fnum, "sd_blocksize", bus->blocksize));
dhdsdio_tune_fifoparam(bus);
}
if ((bus->dhd->busstate == DHD_BUS_DOWN) || bus->dhd->hang_was_sent) {
/* if Firmware already hangs disbale any interrupt */
+ DHD_ERROR(("%s: making DHD_BUS_DOWN\n", __FUNCTION__));
bus->dhd->busstate = DHD_BUS_DOWN;
bus->hostintmask = 0;
bcmsdh_intr_disable(bus->sdh);
/* Change our idea of bus state */
DHD_LINUX_GENERAL_LOCK(bus->dhd, flags);
+ DHD_ERROR(("%s: making DHD_BUS_DOWN\n", __FUNCTION__));
bus->dhd->busstate = DHD_BUS_DOWN;
DHD_LINUX_GENERAL_UNLOCK(bus->dhd, flags);
}
#else /* BCMSPI */
uint8 saveclk;
#endif /* BCMSPI */
+#if defined(SDIO_ISR_THREAD)
+ int intr_extn;
+#endif
DHD_TRACE(("%s: Enter\n", __FUNCTION__));
DHD_ERROR(("%s: enable 0x%02x, ready 0x%02x (waited %uus)\n",
__FUNCTION__, enable, ready, tmo.elapsed));
+#if defined(SDIO_ISR_THREAD)
+ if (dhdp->conf->intr_extn) {
+ intr_extn = bcmsdh_cfg_read(bus->sdh, SDIO_FUNC_0, SDIOD_CCCR_INTR_EXTN, NULL);
+ if (intr_extn & 0x1) {
+ intr_extn |= 0x2;
+ bcmsdh_cfg_write(bus->sdh, SDIO_FUNC_0, SDIOD_CCCR_INTR_EXTN, intr_extn, NULL);
+ }
+ }
+#endif
+
/* If F2 successfully enabled, set core and enable interrupts */
if (ready == enable) {
/* Make sure we're talking to the core. */
fail:
/* If we can't reach the device, signal failure */
- if (err || bcmsdh_regfail(sdh))
+ if (err || bcmsdh_regfail(sdh)) {
+ DHD_ERROR(("%s: making DHD_BUS_DOWN\n", __FUNCTION__));
bus->dhd->busstate = DHD_BUS_DOWN;
+ }
}
static void
/* Check window for sanity */
if ((uint8)(txmax - bus->tx_seq) > 0x70) {
- DHD_ERROR(("%s: got unlikely tx max %d with tx_seq %d\n",
+ DHD_INFO(("%s: got unlikely tx max %d with tx_seq %d\n",
__FUNCTION__, txmax, bus->tx_seq));
txmax = bus->tx_max;
}
if ((uint8)(txmax - bus->tx_seq) > 0x70) {
#ifdef BCMSPI
if ((bus->bus == SPI_BUS) && !(dstatus & STATUS_F2_RX_READY)) {
- DHD_ERROR(("%s: got unlikely tx max %d with tx_seq %d\n",
+ DHD_INFO(("%s: got unlikely tx max %d with tx_seq %d\n",
__FUNCTION__, txmax, bus->tx_seq));
txmax = bus->tx_seq + 2;
} else {
#endif /* BCMSPI */
- DHD_ERROR(("%s: got unlikely tx max %d with tx_seq %d\n",
+ DHD_INFO(("%s: got unlikely tx max %d with tx_seq %d\n",
__FUNCTION__, txmax, bus->tx_seq));
txmax = bus->tx_max;
#ifdef BCMSPI
/* Check window for sanity */
if ((uint8)(txmax - bus->tx_seq) > 0x70) {
- DHD_ERROR(("%s: got unlikely tx max %d with tx_seq %d\n",
+ DHD_INFO(("%s: got unlikely tx max %d with tx_seq %d\n",
__FUNCTION__, txmax, bus->tx_seq));
txmax = bus->tx_max;
}
devctl = bcmsdh_cfg_read(sdh, SDIO_FUNC_1, SBSDIO_DEVICE_CTL, &err);
if (err) {
DHD_ERROR(("%s: error reading DEVCTL: %d\n", __FUNCTION__, err));
+ DHD_ERROR(("%s: making DHD_BUS_DOWN\n", __FUNCTION__));
bus->dhd->busstate = DHD_BUS_DOWN;
} else {
ASSERT(devctl & SBSDIO_DEVCTL_CA_INT_ONLY);
clkctl = bcmsdh_cfg_read(sdh, SDIO_FUNC_1, SBSDIO_FUNC1_CHIPCLKCSR, &err);
if (err) {
DHD_ERROR(("%s: error reading CSR: %d\n", __FUNCTION__, err));
+ DHD_ERROR(("%s: making DHD_BUS_DOWN\n", __FUNCTION__));
bus->dhd->busstate = DHD_BUS_DOWN;
}
if (err) {
DHD_ERROR(("%s: error reading DEVCTL: %d\n",
__FUNCTION__, err));
+ DHD_ERROR(("%s: making DHD_BUS_DOWN\n", __FUNCTION__));
bus->dhd->busstate = DHD_BUS_DOWN;
}
devctl &= ~SBSDIO_DEVCTL_CA_INT_ONLY;
if (err) {
DHD_ERROR(("%s: error writing DEVCTL: %d\n",
__FUNCTION__, err));
+ DHD_ERROR(("%s: making DHD_BUS_DOWN\n", __FUNCTION__));
bus->dhd->busstate = DHD_BUS_DOWN;
}
bus->clkstate = CLK_AVAIL;
}
#endif /* defined(OOB_INTR_ONLY) && !defined(HW_OOB) */
+#ifdef BCMSDIO_RXLIM_POST
+ if (!DATAOK(bus) && bus->rxlim_en) {
+ uint8 rxlim = 0;
+ if (0 == dhdsdio_membytes(bus, FALSE, bus->rxlim_addr, (uint8 *)&rxlim, 1)) {
+ if (bus->tx_max != rxlim) {
+ DHD_INFO(("%s: bus->tx_max/rxlim=%d/%d\n", __FUNCTION__,
+ bus->tx_max, rxlim));
+ bus->tx_max = rxlim;
+ }
+ }
+ }
+#endif /* BCMSDIO_RXLIM_POST */
+
#ifdef PROP_TXSTATUS
dhd_wlfc_commit_packets(bus->dhd, (f_commitpkt_t)dhd_bus_txdata, (void *)bus, NULL, FALSE);
#endif // endif
} else {
DHD_ERROR(("%s: failed backplane access over SDIO, halting operation\n",
__FUNCTION__));
+ DHD_ERROR(("%s: making DHD_BUS_DOWN\n", __FUNCTION__));
bus->dhd->busstate = DHD_BUS_DOWN;
bus->intstatus = 0;
}
dhd_bus_t *bus = (dhd_bus_t*)arg;
bcmsdh_info_t *sdh;
- DHD_TRACE(("%s: Enter\n", __FUNCTION__));
-
if (!bus) {
DHD_ERROR(("%s : bus is null pointer , exit \n", __FUNCTION__));
return;
if (chipid == BCM4369_CHIP_ID)
return TRUE;
-
if (chipid == BCM4362_CHIP_ID)
return TRUE;
if (chipid == BCM43751_CHIP_ID)
return TRUE;
+ if (chipid == BCM43752_CHIP_ID)
+ return TRUE;
return FALSE;
}
#endif /* GET_CUSTOM_MAC_ENABLE */
/* Ok, have the per-port tell the stack we're open for business */
- if (dhd_register_if(bus->dhd, 0, TRUE) != 0) {
+ if (dhd_attach_net(bus->dhd, TRUE) != 0)
+ {
DHD_ERROR(("%s: Net attach failed!!\n", __FUNCTION__));
goto fail;
}
value = F0_BLOCK_SIZE;
else
value = (cis[fn][25]<<8) | cis[fn][24] | (fn<<16);
+ /* Get block size from sd */
+ if (bcmsdh_iovar_op(sdh, "sd_blocksize", &fn, sizeof(int32),
+ &size, sizeof(int32), FALSE) != BCME_OK) {
+ size = 0;
+ DHD_ERROR(("%s: fail on fn %d %s get\n",
+ __FUNCTION__, fn, "sd_blocksize"));
+ } else {
+ DHD_INFO(("%s: Initial value for fn %d %s is %d\n",
+ __FUNCTION__, fn, "sd_blocksize", size));
+ }
+ if (size != 0 && size < value) {
+ value = size;
+ }
+ value = fn << 16 | value;
if (bcmsdh_iovar_op(sdh, "sd_blocksize", NULL, 0, &value,
sizeof(value), TRUE) != BCME_OK) {
bus->blocksize = 0;
- DHD_ERROR(("%s: fail on %s get\n", __FUNCTION__,
- "sd_blocksize"));
+ DHD_ERROR(("%s: fail on fn %d %s set\n", __FUNCTION__,
+ fn, "sd_blocksize"));
}
#endif
#ifdef DHD_DEBUG
case BCM43751_CHIP_ID:
bus->dongle_ram_base = CR4_43751_RAM_BASE;
break;
+ case BCM43752_CHIP_ID:
+ bus->dongle_ram_base = CR4_43752_RAM_BASE;
+ break;
case BCM4369_CHIP_ID:
bus->dongle_ram_base = CR4_4369_RAM_BASE;
break;
bcmsdh_cfg_write(sdh, SDIO_FUNC_0, SDIOD_CCCR_IOEN, SDIO_FUNC_ENABLE_1, NULL);
#endif /* !BCMSPI */
+ DHD_ERROR(("%s: making DHD_BUS_DOWN\n", __FUNCTION__));
bus->dhd->busstate = DHD_BUS_DOWN;
bus->sleeping = FALSE;
bus->rxflow = FALSE;
if (bcmsdh_iovar_op(sdh, "sd_blocksize", &fnum, sizeof(int32),
&bus->blocksize, sizeof(int32), FALSE) != BCME_OK) {
bus->blocksize = 0;
- DHD_ERROR(("%s: fail on %s get\n", __FUNCTION__, "sd_blocksize"));
+ DHD_ERROR(("%s: fail on fn %d %s get\n", __FUNCTION__, fnum, "sd_blocksize"));
} else {
- DHD_INFO(("%s: Initial value for %s is %d\n",
- __FUNCTION__, "sd_blocksize", bus->blocksize));
+ DHD_INFO(("%s: Initial value for fn %d %s is %d\n",
+ __FUNCTION__, fnum, "sd_blocksize", bus->blocksize));
dhdsdio_tune_fifoparam(bus);
}
return ret;
}
-void
-dhd_set_path_params(struct dhd_bus *bus)
-{
- /* External conf takes precedence if specified */
- dhd_conf_preinit(bus->dhd);
-
- if (bus->dhd->conf_path[0] == '\0') {
- dhd_conf_set_path(bus->dhd, "config.txt", bus->dhd->conf_path, bus->nv_path);
- }
- if (bus->dhd->clm_path[0] == '\0') {
- dhd_conf_set_path(bus->dhd, "clm.blob", bus->dhd->clm_path, bus->fw_path);
- }
-#ifdef CONFIG_PATH_AUTO_SELECT
- dhd_conf_set_conf_name_by_chip(bus->dhd, bus->dhd->conf_path);
-#endif
-
- dhd_conf_read_config(bus->dhd, bus->dhd->conf_path);
-
- dhd_conf_set_fw_name_by_chip(bus->dhd, bus->fw_path);
- dhd_conf_set_nv_name_by_chip(bus->dhd, bus->nv_path);
- dhd_conf_set_clm_name_by_chip(bus->dhd, bus->dhd->clm_path);
-
- dhd_conf_set_fw_name_by_mac(bus->dhd, bus->sdh, bus->sih, bus->fw_path);
- dhd_conf_set_nv_name_by_mac(bus->dhd, bus->sdh, bus->sih, bus->nv_path);
-
- printf("Final fw_path=%s\n", bus->fw_path);
- printf("Final nv_path=%s\n", bus->nv_path);
- printf("Final clm_path=%s\n", bus->dhd->clm_path);
- printf("Final conf_path=%s\n", bus->dhd->conf_path);
-
-}
-
void
dhd_set_bus_params(struct dhd_bus *bus)
{
/* Download the firmware */
dhdsdio_clkctl(bus, CLK_AVAIL, FALSE);
- dhd_set_path_params(bus);
+ dhd_conf_set_path_params(bus->dhd, bus->sdh, bus->sih, bus->fw_path, bus->nv_path);
dhd_set_bus_params(bus);
ret = _dhdsdio_download_firmware(bus);
}
DHD_LINUX_GENERAL_LOCK(bus->dhd, flags);
+ /* stop all interface network queue. */
+ dhd_txflowcontrol(bus->dhd, ALL_INTERFACES, ON);
bus->dhd->busstate = DHD_BUS_SUSPEND;
if (DHD_BUS_BUSY_CHECK_IN_TX(bus->dhd)) {
DHD_ERROR(("Tx Request is not ended\n"));
bus->dhd->busstate = DHD_BUS_DATA;
+ /* resume all interface network queue. */
+ dhd_txflowcontrol(bus->dhd, ALL_INTERFACES, OFF);
DHD_LINUX_GENERAL_UNLOCK(bus->dhd, flags);
return -EBUSY;
}
DHD_LINUX_GENERAL_LOCK(bus->dhd, flags);
if (ret) {
bus->dhd->busstate = DHD_BUS_DATA;
+ /* resume all interface network queue. */
+ dhd_txflowcontrol(bus->dhd, ALL_INTERFACES, OFF);
}
DHD_BUS_BUSY_CLEAR_SUSPEND_IN_PROGRESS(bus->dhd);
dhd_os_busbusy_wake(bus->dhd);
DHD_BUS_BUSY_CLEAR_RESUME_IN_PROGRESS(bus->dhd);
bus->dhd->busstate = DHD_BUS_DATA;
dhd_os_busbusy_wake(bus->dhd);
+ /* resume all interface network queue. */
+ dhd_txflowcontrol(bus->dhd, ALL_INTERFACES, OFF);
DHD_LINUX_GENERAL_UNLOCK(bus->dhd, flags);
return 0;
dhdsdio_release_dongle(bus, bus->dhd->osh, TRUE, TRUE);
bus->dhd->dongle_reset = TRUE;
+ DHD_ERROR(("%s: making dhdpub up FALSE\n", __FUNCTION__));
bus->dhd->up = FALSE;
dhd_txglom_enable(dhdp, FALSE);
dhd_os_sdunlock(dhdp);
DHD_LINUX_GENERAL_LOCK(bus->dhd, flags);
+ DHD_ERROR(("%s: making DHD_BUS_DOWN\n", __FUNCTION__));
bus->dhd->busstate = DHD_BUS_DOWN;
DHD_LINUX_GENERAL_UNLOCK(bus->dhd, flags);
} else {
/* App must have restored power to device before calling */
- printf("\n\n%s: == WLAN ON ==\n", __FUNCTION__);
+ printf("\n\n%s: == Power ON ==\n", __FUNCTION__);
if (bus->dhd->dongle_reset) {
/* Turn on WLAN */
bus->cl_devid)) {
DHD_LINUX_GENERAL_LOCK(bus->dhd, flags);
+ DHD_ERROR(("%s: making DHD_BUS_DOWN\n", __FUNCTION__));
bus->dhd->busstate = DHD_BUS_DOWN;
DHD_LINUX_GENERAL_UNLOCK(bus->dhd, flags);