Lines Matching refs:mrvl

65 	struct mrvl_data *mrvl;  in mrvl_open()  local
69 mrvl = kzalloc(sizeof(*mrvl), GFP_KERNEL); in mrvl_open()
70 if (!mrvl) in mrvl_open()
73 skb_queue_head_init(&mrvl->txq); in mrvl_open()
74 skb_queue_head_init(&mrvl->rawq); in mrvl_open()
76 set_bit(STATE_CHIP_VER_PENDING, &mrvl->flags); in mrvl_open()
78 hu->priv = mrvl; in mrvl_open()
84 struct mrvl_data *mrvl = hu->priv; in mrvl_close() local
88 skb_queue_purge(&mrvl->txq); in mrvl_close()
89 skb_queue_purge(&mrvl->rawq); in mrvl_close()
90 kfree_skb(mrvl->rx_skb); in mrvl_close()
91 kfree(mrvl); in mrvl_close()
99 struct mrvl_data *mrvl = hu->priv; in mrvl_flush() local
103 skb_queue_purge(&mrvl->txq); in mrvl_flush()
104 skb_queue_purge(&mrvl->rawq); in mrvl_flush()
111 struct mrvl_data *mrvl = hu->priv; in mrvl_dequeue() local
114 skb = skb_dequeue(&mrvl->txq); in mrvl_dequeue()
117 skb = skb_dequeue(&mrvl->rawq); in mrvl_dequeue()
128 struct mrvl_data *mrvl = hu->priv; in mrvl_enqueue() local
130 skb_queue_tail(&mrvl->txq, skb); in mrvl_enqueue()
136 struct mrvl_data *mrvl = hu->priv; in mrvl_send_ack() local
147 skb_queue_tail(&mrvl->txq, skb); in mrvl_send_ack()
155 struct mrvl_data *mrvl = hu->priv; in mrvl_recv_fw_req() local
166 if (!test_bit(STATE_FW_REQ_PENDING, &mrvl->flags)) { in mrvl_recv_fw_req()
172 mrvl->tx_len = le16_to_cpu(pkt->lhs); in mrvl_recv_fw_req()
174 clear_bit(STATE_FW_REQ_PENDING, &mrvl->flags); in mrvl_recv_fw_req()
176 wake_up_bit(&mrvl->flags, STATE_FW_REQ_PENDING); in mrvl_recv_fw_req()
187 struct mrvl_data *mrvl = hu->priv; in mrvl_recv_chip_ver() local
199 if (!test_bit(STATE_CHIP_VER_PENDING, &mrvl->flags)) { in mrvl_recv_chip_ver()
204 mrvl->id = version; in mrvl_recv_chip_ver()
205 mrvl->rev = version >> 8; in mrvl_recv_chip_ver()
207 bt_dev_info(hdev, "Controller id = %x, rev = %x", mrvl->id, mrvl->rev); in mrvl_recv_chip_ver()
209 clear_bit(STATE_CHIP_VER_PENDING, &mrvl->flags); in mrvl_recv_chip_ver()
211 wake_up_bit(&mrvl->flags, STATE_CHIP_VER_PENDING); in mrvl_recv_chip_ver()
242 struct mrvl_data *mrvl = hu->priv; in mrvl_recv() local
247 mrvl->rx_skb = h4_recv_buf(hu->hdev, mrvl->rx_skb, data, count, in mrvl_recv()
250 if (IS_ERR(mrvl->rx_skb)) { in mrvl_recv()
251 int err = PTR_ERR(mrvl->rx_skb); in mrvl_recv()
253 mrvl->rx_skb = NULL; in mrvl_recv()
263 struct mrvl_data *mrvl = hu->priv; in mrvl_load_firmware() local
279 set_bit(STATE_FW_REQ_PENDING, &mrvl->flags); in mrvl_load_firmware()
287 err = wait_on_bit_timeout(&mrvl->flags, STATE_FW_REQ_PENDING, in mrvl_load_firmware()
301 mrvl->tx_len); in mrvl_load_firmware()
308 if (!mrvl->tx_len) { in mrvl_load_firmware()
317 if (fw_ptr + mrvl->tx_len > fw_max) { in mrvl_load_firmware()
318 mrvl->tx_len = fw_max - fw_ptr; in mrvl_load_firmware()
320 mrvl->tx_len); in mrvl_load_firmware()
323 skb = bt_skb_alloc(mrvl->tx_len, GFP_KERNEL); in mrvl_load_firmware()
331 skb_put_data(skb, fw_ptr, mrvl->tx_len); in mrvl_load_firmware()
332 fw_ptr += mrvl->tx_len; in mrvl_load_firmware()
334 set_bit(STATE_FW_REQ_PENDING, &mrvl->flags); in mrvl_load_firmware()
336 skb_queue_tail(&mrvl->rawq, skb); in mrvl_load_firmware()