.. | .. |
---|
3557 | 3557 | void |
---|
3558 | 3558 | dhd_set_bus_params(struct dhd_bus *bus) |
---|
3559 | 3559 | { |
---|
3560 | | - if (bus->dhd->conf->dhd_poll >= 0) { |
---|
3561 | | - bus->poll = bus->dhd->conf->dhd_poll; |
---|
| 3560 | + struct dhd_conf *conf = bus->dhd->conf; |
---|
| 3561 | + |
---|
| 3562 | + if (conf->dhd_poll >= 0) { |
---|
| 3563 | + bus->poll = conf->dhd_poll; |
---|
3562 | 3564 | if (!bus->pollrate) |
---|
3563 | 3565 | bus->pollrate = 1; |
---|
3564 | | - printf("%s: set polling mode %d\n", __FUNCTION__, bus->dhd->conf->dhd_poll); |
---|
| 3566 | + printf("%s: set polling mode %d\n", __FUNCTION__, conf->dhd_poll); |
---|
3565 | 3567 | } |
---|
3566 | | - if (bus->dhd->conf->d2h_intr_control >= 0) |
---|
3567 | | - bus->d2h_intr_control = bus->dhd->conf->d2h_intr_control; |
---|
| 3568 | + if (conf->d2h_intr_control >= 0) |
---|
| 3569 | + bus->d2h_intr_control = conf->d2h_intr_control; |
---|
3568 | 3570 | printf("d2h_intr_method -> %s(%d); d2h_intr_control -> %s(%d)\n", |
---|
3569 | 3571 | bus->d2h_intr_method ? "PCIE_MSI" : "PCIE_INTX", bus->d2h_intr_method, |
---|
3570 | 3572 | 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 | + } |
---|
3571 | 3582 | } |
---|
3572 | 3583 | |
---|
3573 | 3584 | /** |
---|
.. | .. |
---|
17803 | 17814 | val = 1; |
---|
17804 | 17815 | dhd_sbreg_op(dhd, addr, &val, FALSE); |
---|
17805 | 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; |
---|
| 17838 | +} |
---|