static int bluesleep_lpm_btwrite(const char *val, const struct kernel_param *kp) { int ret; ret = param_set_int(val, kp); if (ret) { BT_ERR("HCIATH3K: lpm btwrite parameter set failed"); return ret; } BT_DBG("btwrite : %d", lpm_btwrite); if (is_lpm_enabled) { if (lpm_btwrite == 0) { /*Setting TXEXPIRED bit to make it compatible with current solution*/ set_bit(BT_TXEXPIRED, &flags); hsuart_serial_clock_off(bsi->uport); } else if (lpm_btwrite == 1) { ath_wakeup_ar3k(); clear_bit(BT_TXEXPIRED, &flags); } else { BT_ERR("HCIATH3K invalid btwrite value"); return -EINVAL; } } return 0; }
static void bluesleep_tx_timer_expire(unsigned long data) { if (!test_bit(BT_SLEEPENABLE, &flags)) return; BT_INFO("Tx timer expired\n"); set_bit(BT_TXEXPIRED, &flags); hsuart_serial_clock_off(bsi->uport); }
static void bluesleep_tx_timer_expire(unsigned long data) { struct hci_uart *hu = (struct hci_uart *) data; if (!test_bit(BT_SLEEPENABLE, &flags)) return; BT_INFO("Tx timer expired\n"); set_bit(BT_TXEXPIRED, &flags); hsuart_serial_clock_off(hu->tty); }