u16 pkt_len, pkt_tag, pool_index = 0;
u8 *ptr;
+ spin_lock(&hif_dev->rx_lock);
+
rx_remain_len = hif_dev->rx_remain_len;
rx_pkt_len = hif_dev->rx_transfer_len;
}
}
+ spin_unlock(&hif_dev->rx_lock);
+
while (index < len) {
ptr = (u8 *) skb->data;
index = index + 4 + pkt_len + pad_len;
if (index > MAX_RX_BUF_SIZE) {
+ spin_lock(&hif_dev->rx_lock);
hif_dev->rx_remain_len = index - MAX_RX_BUF_SIZE;
hif_dev->rx_transfer_len =
MAX_RX_BUF_SIZE - chk_idx - 4;
dev_err(&hif_dev->udev->dev,
"ath9k_htc: RX memory allocation"
" error\n");
+ spin_unlock(&hif_dev->rx_lock);
goto err;
}
skb_reserve(nskb, 32);
/* Record the buffer pointer */
hif_dev->remain_skb = nskb;
+ spin_unlock(&hif_dev->rx_lock);
} else {
nskb = __dev_alloc_skb(pkt_len + 32, GFP_ATOMIC);
if (!nskb) {
int i, ret;
init_usb_anchor(&hif_dev->rx_submitted);
+ spin_lock_init(&hif_dev->rx_lock);
for (i = 0; i < MAX_RX_URB_NUM; i++) {