|
@@ -436,6 +436,11 @@ static int btmrvl_send_frame(struct hci_dev *hdev, struct sk_buff *skb)
|
|
|
|
|
|
BT_DBG("type=%d, len=%d", hci_skb_pkt_type(skb), skb->len);
|
|
|
|
|
|
+ if (priv->adapter->is_suspending || priv->adapter->is_suspended) {
|
|
|
+ BT_ERR("%s: Device is suspending or suspended", __func__);
|
|
|
+ return -EBUSY;
|
|
|
+ }
|
|
|
+
|
|
|
switch (hci_skb_pkt_type(skb)) {
|
|
|
case HCI_COMMAND_PKT:
|
|
|
hdev->stat.cmd_tx++;
|
|
@@ -452,7 +457,8 @@ static int btmrvl_send_frame(struct hci_dev *hdev, struct sk_buff *skb)
|
|
|
|
|
|
skb_queue_tail(&priv->adapter->tx_queue, skb);
|
|
|
|
|
|
- wake_up_interruptible(&priv->main_thread.wait_q);
|
|
|
+ if (!priv->adapter->is_suspended)
|
|
|
+ wake_up_interruptible(&priv->main_thread.wait_q);
|
|
|
|
|
|
return 0;
|
|
|
}
|
|
@@ -643,7 +649,8 @@ static int btmrvl_service_main_thread(void *data)
|
|
|
if (adapter->ps_state == PS_SLEEP)
|
|
|
continue;
|
|
|
|
|
|
- if (!priv->btmrvl_dev.tx_dnld_rdy)
|
|
|
+ if (!priv->btmrvl_dev.tx_dnld_rdy ||
|
|
|
+ priv->adapter->is_suspended)
|
|
|
continue;
|
|
|
|
|
|
skb = skb_dequeue(&adapter->tx_queue);
|