Lines Matching full:mrvl
59 struct mrvl_data *mrvl; in mrvl_open() local
67 mrvl = kzalloc(sizeof(*mrvl), GFP_KERNEL); in mrvl_open()
68 if (!mrvl) in mrvl_open()
71 skb_queue_head_init(&mrvl->txq); in mrvl_open()
72 skb_queue_head_init(&mrvl->rawq); in mrvl_open()
74 set_bit(STATE_CHIP_VER_PENDING, &mrvl->flags); in mrvl_open()
76 hu->priv = mrvl; in mrvl_open()
86 kfree(mrvl); in mrvl_open()
93 struct mrvl_data *mrvl = hu->priv; in mrvl_close() local
100 skb_queue_purge(&mrvl->txq); in mrvl_close()
101 skb_queue_purge(&mrvl->rawq); in mrvl_close()
102 kfree_skb(mrvl->rx_skb); in mrvl_close()
103 kfree(mrvl); in mrvl_close()
111 struct mrvl_data *mrvl = hu->priv; in mrvl_flush() local
115 skb_queue_purge(&mrvl->txq); in mrvl_flush()
116 skb_queue_purge(&mrvl->rawq); in mrvl_flush()
123 struct mrvl_data *mrvl = hu->priv; in mrvl_dequeue() local
126 skb = skb_dequeue(&mrvl->txq); in mrvl_dequeue()
129 skb = skb_dequeue(&mrvl->rawq); in mrvl_dequeue()
140 struct mrvl_data *mrvl = hu->priv; in mrvl_enqueue() local
142 skb_queue_tail(&mrvl->txq, skb); in mrvl_enqueue()
148 struct mrvl_data *mrvl = hu->priv; in mrvl_send_ack() local
159 skb_queue_tail(&mrvl->txq, skb); in mrvl_send_ack()
167 struct mrvl_data *mrvl = hu->priv; in mrvl_recv_fw_req() local
171 bt_dev_err(hdev, "Corrupted mrvl header"); in mrvl_recv_fw_req()
178 if (!test_bit(STATE_FW_REQ_PENDING, &mrvl->flags)) { in mrvl_recv_fw_req()
184 mrvl->tx_len = le16_to_cpu(pkt->lhs); in mrvl_recv_fw_req()
186 clear_bit(STATE_FW_REQ_PENDING, &mrvl->flags); in mrvl_recv_fw_req()
188 wake_up_bit(&mrvl->flags, STATE_FW_REQ_PENDING); in mrvl_recv_fw_req()
199 struct mrvl_data *mrvl = hu->priv; in mrvl_recv_chip_ver() local
204 bt_dev_err(hdev, "Corrupted mrvl header"); in mrvl_recv_chip_ver()
211 if (!test_bit(STATE_CHIP_VER_PENDING, &mrvl->flags)) { in mrvl_recv_chip_ver()
216 mrvl->id = version; in mrvl_recv_chip_ver()
217 mrvl->rev = version >> 8; in mrvl_recv_chip_ver()
219 bt_dev_info(hdev, "Controller id = %x, rev = %x", mrvl->id, mrvl->rev); in mrvl_recv_chip_ver()
221 clear_bit(STATE_CHIP_VER_PENDING, &mrvl->flags); in mrvl_recv_chip_ver()
223 wake_up_bit(&mrvl->flags, STATE_CHIP_VER_PENDING); in mrvl_recv_chip_ver()
254 struct mrvl_data *mrvl = hu->priv; in mrvl_recv() local
263 if (!test_bit(STATE_FW_REQ_PENDING, &mrvl->flags) && in mrvl_recv()
264 !test_bit(STATE_FW_LOADED, &mrvl->flags)) in mrvl_recv()
267 mrvl->rx_skb = h4_recv_buf(hu->hdev, mrvl->rx_skb, data, count, in mrvl_recv()
270 if (IS_ERR(mrvl->rx_skb)) { in mrvl_recv()
271 int err = PTR_ERR(mrvl->rx_skb); in mrvl_recv()
273 mrvl->rx_skb = NULL; in mrvl_recv()
283 struct mrvl_data *mrvl = hu->priv; in mrvl_load_firmware() local
299 set_bit(STATE_FW_REQ_PENDING, &mrvl->flags); in mrvl_load_firmware()
307 err = wait_on_bit_timeout(&mrvl->flags, STATE_FW_REQ_PENDING, in mrvl_load_firmware()
321 mrvl->tx_len); in mrvl_load_firmware()
328 if (!mrvl->tx_len) { in mrvl_load_firmware()
337 if (fw_ptr + mrvl->tx_len > fw_max) { in mrvl_load_firmware()
338 mrvl->tx_len = fw_max - fw_ptr; in mrvl_load_firmware()
340 mrvl->tx_len); in mrvl_load_firmware()
343 skb = bt_skb_alloc(mrvl->tx_len, GFP_KERNEL); in mrvl_load_firmware()
351 skb_put_data(skb, fw_ptr, mrvl->tx_len); in mrvl_load_firmware()
352 fw_ptr += mrvl->tx_len; in mrvl_load_firmware()
354 set_bit(STATE_FW_REQ_PENDING, &mrvl->flags); in mrvl_load_firmware()
356 skb_queue_tail(&mrvl->rawq, skb); in mrvl_load_firmware()
367 struct mrvl_data *mrvl = hu->priv; in mrvl_setup() local
371 err = mrvl_load_firmware(hu->hdev, "mrvl/helper_uart_3000000.bin"); in mrvl_setup()
387 err = mrvl_load_firmware(hu->hdev, "mrvl/uart8897_bt.bin"); in mrvl_setup()
391 set_bit(STATE_FW_LOADED, &mrvl->flags); in mrvl_setup()
399 struct mrvl_data *mrvl = hu->priv; in mrvl_set_baudrate() local
412 set_bit(STATE_FW_LOADED, &mrvl->flags); in mrvl_set_baudrate()
489 { .compatible = "mrvl,88w8897", .data = &mrvl_proto_8897},
490 { .compatible = "mrvl,88w8997", .data = &mrvl_proto_8997},