Lines Matching full:wilc
17 static inline void acquire_bus(struct wilc *wilc, enum bus_acquire acquire) in acquire_bus() argument
19 mutex_lock(&wilc->hif_cs); in acquire_bus()
21 chip_wakeup(wilc); in acquire_bus()
24 static inline void release_bus(struct wilc *wilc, enum bus_release release) in release_bus() argument
27 chip_allow_sleep(wilc); in release_bus()
28 mutex_unlock(&wilc->hif_cs); in release_bus()
31 static void wilc_wlan_txq_remove(struct wilc *wilc, struct txq_entry_t *tqe) in wilc_wlan_txq_remove() argument
34 wilc->txq_entries -= 1; in wilc_wlan_txq_remove()
43 struct wilc *wilc = vif->wilc; in wilc_wlan_txq_remove_from_head() local
45 spin_lock_irqsave(&wilc->txq_spinlock, flags); in wilc_wlan_txq_remove_from_head()
47 if (!list_empty(&wilc->txq_head.list)) { in wilc_wlan_txq_remove_from_head()
48 tqe = list_first_entry(&wilc->txq_head.list, struct txq_entry_t, in wilc_wlan_txq_remove_from_head()
51 wilc->txq_entries -= 1; in wilc_wlan_txq_remove_from_head()
53 spin_unlock_irqrestore(&wilc->txq_spinlock, flags); in wilc_wlan_txq_remove_from_head()
62 struct wilc *wilc = vif->wilc; in wilc_wlan_txq_add_to_tail() local
64 spin_lock_irqsave(&wilc->txq_spinlock, flags); in wilc_wlan_txq_add_to_tail()
66 list_add_tail(&tqe->list, &wilc->txq_head.list); in wilc_wlan_txq_add_to_tail()
67 wilc->txq_entries += 1; in wilc_wlan_txq_add_to_tail()
69 spin_unlock_irqrestore(&wilc->txq_spinlock, flags); in wilc_wlan_txq_add_to_tail()
71 complete(&wilc->txq_event); in wilc_wlan_txq_add_to_tail()
78 struct wilc *wilc = vif->wilc; in wilc_wlan_txq_add_to_head() local
80 mutex_lock(&wilc->txq_add_to_head_cs); in wilc_wlan_txq_add_to_head()
82 spin_lock_irqsave(&wilc->txq_spinlock, flags); in wilc_wlan_txq_add_to_head()
84 list_add(&tqe->list, &wilc->txq_head.list); in wilc_wlan_txq_add_to_head()
85 wilc->txq_entries += 1; in wilc_wlan_txq_add_to_head()
87 spin_unlock_irqrestore(&wilc->txq_spinlock, flags); in wilc_wlan_txq_add_to_head()
88 mutex_unlock(&wilc->txq_add_to_head_cs); in wilc_wlan_txq_add_to_head()
89 complete(&wilc->txq_event); in wilc_wlan_txq_add_to_head()
140 struct wilc *wilc = vif->wilc; in tcp_process() local
146 spin_lock_irqsave(&wilc->txq_spinlock, flags); in tcp_process()
182 spin_unlock_irqrestore(&wilc->txq_spinlock, flags); in tcp_process()
188 struct wilc *wilc = vif->wilc; in wilc_wlan_txq_filter_dup_tcp_ack() local
194 spin_lock_irqsave(&wilc->txq_spinlock, flags); in wilc_wlan_txq_filter_dup_tcp_ack()
215 wilc_wlan_txq_remove(wilc, tqe); in wilc_wlan_txq_filter_dup_tcp_ack()
233 spin_unlock_irqrestore(&wilc->txq_spinlock, flags); in wilc_wlan_txq_filter_dup_tcp_ack()
236 wait_for_completion_timeout(&wilc->txq_event, in wilc_wlan_txq_filter_dup_tcp_ack()
251 struct wilc *wilc = vif->wilc; in wilc_wlan_txq_add_cfg_pkt() local
254 if (wilc->quit) { in wilc_wlan_txq_add_cfg_pkt()
256 complete(&wilc->cfg_event); in wilc_wlan_txq_add_cfg_pkt()
283 struct wilc *wilc; in wilc_wlan_txq_add_net_pkt() local
285 wilc = vif->wilc; in wilc_wlan_txq_add_net_pkt()
287 if (wilc->quit) in wilc_wlan_txq_add_net_pkt()
305 return wilc->txq_entries; in wilc_wlan_txq_add_net_pkt()
314 struct wilc *wilc; in wilc_wlan_txq_add_mgmt_pkt() local
316 wilc = vif->wilc; in wilc_wlan_txq_add_mgmt_pkt()
318 if (wilc->quit) in wilc_wlan_txq_add_mgmt_pkt()
336 static struct txq_entry_t *wilc_wlan_txq_get_first(struct wilc *wilc) in wilc_wlan_txq_get_first() argument
341 spin_lock_irqsave(&wilc->txq_spinlock, flags); in wilc_wlan_txq_get_first()
343 if (!list_empty(&wilc->txq_head.list)) in wilc_wlan_txq_get_first()
344 tqe = list_first_entry(&wilc->txq_head.list, struct txq_entry_t, in wilc_wlan_txq_get_first()
347 spin_unlock_irqrestore(&wilc->txq_spinlock, flags); in wilc_wlan_txq_get_first()
352 static struct txq_entry_t *wilc_wlan_txq_get_next(struct wilc *wilc, in wilc_wlan_txq_get_next() argument
357 spin_lock_irqsave(&wilc->txq_spinlock, flags); in wilc_wlan_txq_get_next()
359 if (!list_is_last(&tqe->list, &wilc->txq_head.list)) in wilc_wlan_txq_get_next()
363 spin_unlock_irqrestore(&wilc->txq_spinlock, flags); in wilc_wlan_txq_get_next()
368 static void wilc_wlan_rxq_add(struct wilc *wilc, struct rxq_entry_t *rqe) in wilc_wlan_rxq_add() argument
370 if (wilc->quit) in wilc_wlan_rxq_add()
373 mutex_lock(&wilc->rxq_cs); in wilc_wlan_rxq_add()
374 list_add_tail(&rqe->list, &wilc->rxq_head.list); in wilc_wlan_rxq_add()
375 mutex_unlock(&wilc->rxq_cs); in wilc_wlan_rxq_add()
378 static struct rxq_entry_t *wilc_wlan_rxq_remove(struct wilc *wilc) in wilc_wlan_rxq_remove() argument
382 mutex_lock(&wilc->rxq_cs); in wilc_wlan_rxq_remove()
383 if (!list_empty(&wilc->rxq_head.list)) { in wilc_wlan_rxq_remove()
384 rqe = list_first_entry(&wilc->rxq_head.list, struct rxq_entry_t, in wilc_wlan_rxq_remove()
388 mutex_unlock(&wilc->rxq_cs); in wilc_wlan_rxq_remove()
392 void chip_allow_sleep(struct wilc *wilc) in chip_allow_sleep() argument
396 wilc->hif_func->hif_read_reg(wilc, WILC_SDIO_WAKEUP_REG, ®); in chip_allow_sleep()
398 wilc->hif_func->hif_write_reg(wilc, WILC_SDIO_WAKEUP_REG, in chip_allow_sleep()
400 wilc->hif_func->hif_write_reg(wilc, WILC_SDIO_HOST_TO_FW_REG, 0); in chip_allow_sleep()
404 void chip_wakeup(struct wilc *wilc) in chip_wakeup() argument
407 const struct wilc_hif_func *h = wilc->hif_func; in chip_wakeup()
409 if (wilc->io_type == WILC_HIF_SPI) { in chip_wakeup()
411 h->hif_read_reg(wilc, WILC_SPI_WAKEUP_REG, ®); in chip_wakeup()
412 h->hif_write_reg(wilc, WILC_SPI_WAKEUP_REG, in chip_wakeup()
414 h->hif_write_reg(wilc, WILC_SPI_WAKEUP_REG, in chip_wakeup()
419 wilc_get_chipid(wilc, true); in chip_wakeup()
420 } while (wilc_get_chipid(wilc, true) == 0); in chip_wakeup()
421 } while (wilc_get_chipid(wilc, true) == 0); in chip_wakeup()
422 } else if (wilc->io_type == WILC_HIF_SDIO) { in chip_wakeup()
423 h->hif_write_reg(wilc, WILC_SDIO_HOST_TO_FW_REG, in chip_wakeup()
426 h->hif_read_reg(wilc, WILC_SDIO_WAKEUP_REG, ®); in chip_wakeup()
428 h->hif_write_reg(wilc, WILC_SDIO_WAKEUP_REG, in chip_wakeup()
430 h->hif_read_reg(wilc, WILC_SDIO_CLK_STATUS_REG, in chip_wakeup()
436 h->hif_read_reg(wilc, WILC_SDIO_CLK_STATUS_REG, in chip_wakeup()
440 h->hif_write_reg(wilc, WILC_SDIO_WAKEUP_REG, in chip_wakeup()
446 if (wilc->chip_ps_state == WILC_CHIP_SLEEPING_MANUAL) { in chip_wakeup()
447 if (wilc_get_chipid(wilc, false) < WILC_1000_BASE_ID_2B) { in chip_wakeup()
450 h->hif_read_reg(wilc, WILC_REG_4_TO_1_RX, &val32); in chip_wakeup()
452 h->hif_write_reg(wilc, WILC_REG_4_TO_1_RX, val32); in chip_wakeup()
454 h->hif_read_reg(wilc, WILC_REG_4_TO_1_TX_BANK0, &val32); in chip_wakeup()
456 h->hif_write_reg(wilc, WILC_REG_4_TO_1_TX_BANK0, val32); in chip_wakeup()
459 wilc->chip_ps_state = WILC_CHIP_WAKEDUP; in chip_wakeup()
463 void host_wakeup_notify(struct wilc *wilc) in host_wakeup_notify() argument
465 acquire_bus(wilc, WILC_BUS_ACQUIRE_ONLY); in host_wakeup_notify()
466 wilc->hif_func->hif_write_reg(wilc, WILC_CORTUS_INTERRUPT_2, 1); in host_wakeup_notify()
467 release_bus(wilc, WILC_BUS_RELEASE_ONLY); in host_wakeup_notify()
471 void host_sleep_notify(struct wilc *wilc) in host_sleep_notify() argument
473 acquire_bus(wilc, WILC_BUS_ACQUIRE_ONLY); in host_sleep_notify()
474 wilc->hif_func->hif_write_reg(wilc, WILC_CORTUS_INTERRUPT_1, 1); in host_sleep_notify()
475 release_bus(wilc, WILC_BUS_RELEASE_ONLY); in host_sleep_notify()
479 int wilc_wlan_handle_txq(struct wilc *wilc, u32 *txq_count) in wilc_wlan_handle_txq() argument
492 u8 *txb = wilc->tx_buffer; in wilc_wlan_handle_txq()
496 if (wilc->quit) in wilc_wlan_handle_txq()
499 mutex_lock(&wilc->txq_add_to_head_cs); in wilc_wlan_handle_txq()
500 tqe = wilc_wlan_txq_get_first(wilc); in wilc_wlan_handle_txq()
528 tqe = wilc_wlan_txq_get_next(wilc, tqe); in wilc_wlan_handle_txq()
535 acquire_bus(wilc, WILC_BUS_ACQUIRE_AND_WAKEUP); in wilc_wlan_handle_txq()
537 func = wilc->hif_func; in wilc_wlan_handle_txq()
539 ret = func->hif_read_reg(wilc, WILC_HOST_TX_CTRL, ®); in wilc_wlan_handle_txq()
549 ret = func->hif_write_reg(wilc, WILC_HOST_TX_CTRL, 0); in wilc_wlan_handle_txq()
552 } while (!wilc->quit); in wilc_wlan_handle_txq()
559 ret = func->hif_block_tx(wilc, in wilc_wlan_handle_txq()
566 ret = func->hif_write_reg(wilc, WILC_HOST_VMM_CTL, 0x2); in wilc_wlan_handle_txq()
571 ret = func->hif_read_reg(wilc, WILC_HOST_VMM_CTL, ®); in wilc_wlan_handle_txq()
580 ret = func->hif_write_reg(wilc, WILC_HOST_VMM_CTL, 0x0); in wilc_wlan_handle_txq()
588 ret = func->hif_read_reg(wilc, WILC_HOST_TX_CTRL, ®); in wilc_wlan_handle_txq()
592 ret = func->hif_write_reg(wilc, WILC_HOST_TX_CTRL, reg); in wilc_wlan_handle_txq()
608 release_bus(wilc, WILC_BUS_RELEASE_ALLOW_SLEEP); in wilc_wlan_handle_txq()
662 acquire_bus(wilc, WILC_BUS_ACQUIRE_AND_WAKEUP); in wilc_wlan_handle_txq()
664 ret = func->hif_clear_int_ext(wilc, ENABLE_TX_VMM); in wilc_wlan_handle_txq()
668 ret = func->hif_block_tx_ext(wilc, 0, txb, offset); in wilc_wlan_handle_txq()
671 release_bus(wilc, WILC_BUS_RELEASE_ALLOW_SLEEP); in wilc_wlan_handle_txq()
674 mutex_unlock(&wilc->txq_add_to_head_cs); in wilc_wlan_handle_txq()
677 *txq_count = wilc->txq_entries; in wilc_wlan_handle_txq()
681 static void wilc_wlan_handle_rx_buff(struct wilc *wilc, u8 *buffer, int size) in wilc_wlan_handle_rx_buff() argument
703 wilc_wfi_mgmt_rx(wilc, buff_ptr, pkt_len); in wilc_wlan_handle_rx_buff()
706 wilc_frmw_to_host(wilc, buff_ptr, pkt_len, in wilc_wlan_handle_rx_buff()
713 wilc_wlan_cfg_indicate_rx(wilc, buff_ptr, in wilc_wlan_handle_rx_buff()
717 if (wilc->cfg_seq_no == rsp.seq_no) in wilc_wlan_handle_rx_buff()
718 complete(&wilc->cfg_event); in wilc_wlan_handle_rx_buff()
720 wilc_mac_indicate(wilc); in wilc_wlan_handle_rx_buff()
728 static void wilc_wlan_handle_rxq(struct wilc *wilc) in wilc_wlan_handle_rxq() argument
734 while (!wilc->quit) { in wilc_wlan_handle_rxq()
735 rqe = wilc_wlan_rxq_remove(wilc); in wilc_wlan_handle_rxq()
741 wilc_wlan_handle_rx_buff(wilc, buffer, size); in wilc_wlan_handle_rxq()
745 if (wilc->quit) in wilc_wlan_handle_rxq()
746 complete(&wilc->cfg_event); in wilc_wlan_handle_rxq()
749 static void wilc_unknown_isr_ext(struct wilc *wilc) in wilc_unknown_isr_ext() argument
751 wilc->hif_func->hif_clear_int_ext(wilc, 0); in wilc_unknown_isr_ext()
754 static void wilc_wlan_handle_isr_ext(struct wilc *wilc, u32 int_status) in wilc_wlan_handle_isr_ext() argument
756 u32 offset = wilc->rx_buffer_offset; in wilc_wlan_handle_isr_ext()
766 wilc->hif_func->hif_read_size(wilc, &size); in wilc_wlan_handle_isr_ext()
777 buffer = &wilc->rx_buffer[offset]; in wilc_wlan_handle_isr_ext()
779 wilc->hif_func->hif_clear_int_ext(wilc, DATA_INT_CLR | ENABLE_RX_VMM); in wilc_wlan_handle_isr_ext()
780 ret = wilc->hif_func->hif_block_rx_ext(wilc, 0, buffer, size); in wilc_wlan_handle_isr_ext()
785 wilc->rx_buffer_offset = offset; in wilc_wlan_handle_isr_ext()
792 wilc_wlan_rxq_add(wilc, rqe); in wilc_wlan_handle_isr_ext()
793 wilc_wlan_handle_rxq(wilc); in wilc_wlan_handle_isr_ext()
796 void wilc_handle_isr(struct wilc *wilc) in wilc_handle_isr() argument
800 acquire_bus(wilc, WILC_BUS_ACQUIRE_AND_WAKEUP); in wilc_handle_isr()
801 wilc->hif_func->hif_read_int(wilc, &int_status); in wilc_handle_isr()
804 wilc_wlan_handle_isr_ext(wilc, int_status); in wilc_handle_isr()
807 wilc_unknown_isr_ext(wilc); in wilc_handle_isr()
809 release_bus(wilc, WILC_BUS_RELEASE_ALLOW_SLEEP); in wilc_handle_isr()
813 int wilc_wlan_firmware_download(struct wilc *wilc, const u8 *buffer, in wilc_wlan_firmware_download() argument
831 acquire_bus(wilc, WILC_BUS_ACQUIRE_ONLY); in wilc_wlan_firmware_download()
840 ret = wilc->hif_func->hif_block_tx(wilc, addr, in wilc_wlan_firmware_download()
849 release_bus(wilc, WILC_BUS_RELEASE_ONLY); in wilc_wlan_firmware_download()
862 int wilc_wlan_start(struct wilc *wilc) in wilc_wlan_start() argument
868 if (wilc->io_type == WILC_HIF_SDIO) { in wilc_wlan_start()
871 } else if (wilc->io_type == WILC_HIF_SPI) { in wilc_wlan_start()
874 acquire_bus(wilc, WILC_BUS_ACQUIRE_ONLY); in wilc_wlan_start()
875 ret = wilc->hif_func->hif_write_reg(wilc, WILC_VMM_CORE_CFG, reg); in wilc_wlan_start()
877 release_bus(wilc, WILC_BUS_RELEASE_ONLY); in wilc_wlan_start()
881 if (wilc->io_type == WILC_HIF_SDIO && wilc->dev_irq_num) in wilc_wlan_start()
884 ret = wilc->hif_func->hif_write_reg(wilc, WILC_GP_REG_1, reg); in wilc_wlan_start()
886 release_bus(wilc, WILC_BUS_RELEASE_ONLY); in wilc_wlan_start()
890 wilc->hif_func->hif_sync_ext(wilc, NUM_INT_EXT); in wilc_wlan_start()
892 ret = wilc->hif_func->hif_read_reg(wilc, WILC_CHIPID, &chipid); in wilc_wlan_start()
894 release_bus(wilc, WILC_BUS_RELEASE_ONLY); in wilc_wlan_start()
898 wilc->hif_func->hif_read_reg(wilc, WILC_GLB_RESET_0, ®); in wilc_wlan_start()
901 wilc->hif_func->hif_write_reg(wilc, WILC_GLB_RESET_0, reg); in wilc_wlan_start()
902 wilc->hif_func->hif_read_reg(wilc, WILC_GLB_RESET_0, ®); in wilc_wlan_start()
906 ret = wilc->hif_func->hif_write_reg(wilc, WILC_GLB_RESET_0, reg); in wilc_wlan_start()
907 wilc->hif_func->hif_read_reg(wilc, WILC_GLB_RESET_0, ®); in wilc_wlan_start()
908 release_bus(wilc, WILC_BUS_RELEASE_ONLY); in wilc_wlan_start()
913 int wilc_wlan_stop(struct wilc *wilc, struct wilc_vif *vif) in wilc_wlan_stop() argument
918 acquire_bus(wilc, WILC_BUS_ACQUIRE_AND_WAKEUP); in wilc_wlan_stop()
920 ret = wilc->hif_func->hif_read_reg(wilc, WILC_GP_REG_0, ®); in wilc_wlan_stop()
923 release_bus(wilc, WILC_BUS_RELEASE_ALLOW_SLEEP); in wilc_wlan_stop()
927 ret = wilc->hif_func->hif_write_reg(wilc, WILC_GP_REG_0, in wilc_wlan_stop()
931 release_bus(wilc, WILC_BUS_RELEASE_ALLOW_SLEEP); in wilc_wlan_stop()
935 ret = wilc->hif_func->hif_read_reg(wilc, WILC_FW_HOST_COMM, ®); in wilc_wlan_stop()
938 release_bus(wilc, WILC_BUS_RELEASE_ALLOW_SLEEP); in wilc_wlan_stop()
943 ret = wilc->hif_func->hif_write_reg(wilc, WILC_FW_HOST_COMM, reg); in wilc_wlan_stop()
946 release_bus(wilc, WILC_BUS_RELEASE_ALLOW_SLEEP); in wilc_wlan_stop()
950 release_bus(wilc, WILC_BUS_RELEASE_ALLOW_SLEEP); in wilc_wlan_stop()
960 struct wilc *wilc = vif->wilc; in wilc_wlan_cleanup() local
962 wilc->quit = 1; in wilc_wlan_cleanup()
969 while ((rqe = wilc_wlan_rxq_remove(wilc))) in wilc_wlan_cleanup()
972 kfree(wilc->rx_buffer); in wilc_wlan_cleanup()
973 wilc->rx_buffer = NULL; in wilc_wlan_cleanup()
974 kfree(wilc->tx_buffer); in wilc_wlan_cleanup()
975 wilc->tx_buffer = NULL; in wilc_wlan_cleanup()
976 wilc->hif_func->hif_deinit(NULL); in wilc_wlan_cleanup()
982 struct wilc *wilc = vif->wilc; in wilc_wlan_cfg_commit() local
983 struct wilc_cfg_frame *cfg = &wilc->cfg_frame; in wilc_wlan_cfg_commit()
984 int t_len = wilc->cfg_frame_offset + sizeof(struct wilc_cfg_cmd_hdr); in wilc_wlan_cfg_commit()
991 cfg->hdr.seq_no = wilc->cfg_seq_no % 256; in wilc_wlan_cfg_commit()
994 wilc->cfg_seq_no = cfg->hdr.seq_no; in wilc_wlan_cfg_commit()
1007 struct wilc *wilc = vif->wilc; in wilc_wlan_cfg_set() local
1009 mutex_lock(&wilc->cfg_cmd_lock); in wilc_wlan_cfg_set()
1012 wilc->cfg_frame_offset = 0; in wilc_wlan_cfg_set()
1014 offset = wilc->cfg_frame_offset; in wilc_wlan_cfg_set()
1015 ret_size = wilc_wlan_cfg_set_wid(wilc->cfg_frame.frame, offset, in wilc_wlan_cfg_set()
1018 wilc->cfg_frame_offset = offset; in wilc_wlan_cfg_set()
1021 mutex_unlock(&wilc->cfg_cmd_lock); in wilc_wlan_cfg_set()
1025 netdev_dbg(vif->ndev, "%s: seqno[%d]\n", __func__, wilc->cfg_seq_no); in wilc_wlan_cfg_set()
1030 if (!wait_for_completion_timeout(&wilc->cfg_event, in wilc_wlan_cfg_set()
1036 wilc->cfg_frame_offset = 0; in wilc_wlan_cfg_set()
1037 wilc->cfg_seq_no += 1; in wilc_wlan_cfg_set()
1038 mutex_unlock(&wilc->cfg_cmd_lock); in wilc_wlan_cfg_set()
1048 struct wilc *wilc = vif->wilc; in wilc_wlan_cfg_get() local
1050 mutex_lock(&wilc->cfg_cmd_lock); in wilc_wlan_cfg_get()
1053 wilc->cfg_frame_offset = 0; in wilc_wlan_cfg_get()
1055 offset = wilc->cfg_frame_offset; in wilc_wlan_cfg_get()
1056 ret_size = wilc_wlan_cfg_get_wid(wilc->cfg_frame.frame, offset, wid); in wilc_wlan_cfg_get()
1058 wilc->cfg_frame_offset = offset; in wilc_wlan_cfg_get()
1061 mutex_unlock(&wilc->cfg_cmd_lock); in wilc_wlan_cfg_get()
1068 if (!wait_for_completion_timeout(&wilc->cfg_event, in wilc_wlan_cfg_get()
1073 wilc->cfg_frame_offset = 0; in wilc_wlan_cfg_get()
1074 wilc->cfg_seq_no += 1; in wilc_wlan_cfg_get()
1075 mutex_unlock(&wilc->cfg_cmd_lock); in wilc_wlan_cfg_get()
1098 wids[i].size = wilc_wlan_cfg_get_val(vif->wilc, in wilc_send_config_pkt()
1126 struct wilc *wilc = vif->wilc; in init_chip() local
1128 acquire_bus(wilc, WILC_BUS_ACQUIRE_ONLY); in init_chip()
1130 chipid = wilc_get_chipid(wilc, true); in init_chip()
1133 ret = wilc->hif_func->hif_read_reg(wilc, in init_chip()
1141 ret = wilc->hif_func->hif_write_reg(wilc, in init_chip()
1148 ret = wilc->hif_func->hif_write_reg(wilc, in init_chip()
1158 release_bus(wilc, WILC_BUS_RELEASE_ONLY); in init_chip()
1163 u32 wilc_get_chipid(struct wilc *wilc, bool update) in wilc_get_chipid() argument
1170 wilc->hif_func->hif_read_reg(wilc, WILC_CHIPID, &tempchipid); in wilc_get_chipid()
1171 wilc->hif_func->hif_read_reg(wilc, WILC_RF_REVISION_ID, in wilc_get_chipid()
1196 struct wilc *wilc; in wilc_wlan_init() local
1198 wilc = vif->wilc; in wilc_wlan_init()
1200 wilc->quit = 0; in wilc_wlan_init()
1202 if (wilc->hif_func->hif_init(wilc, false)) { in wilc_wlan_init()
1207 if (!wilc->tx_buffer) in wilc_wlan_init()
1208 wilc->tx_buffer = kmalloc(WILC_TX_BUFF_SIZE, GFP_KERNEL); in wilc_wlan_init()
1210 if (!wilc->tx_buffer) { in wilc_wlan_init()
1215 if (!wilc->rx_buffer) in wilc_wlan_init()
1216 wilc->rx_buffer = kmalloc(WILC_RX_BUFF_SIZE, GFP_KERNEL); in wilc_wlan_init()
1218 if (!wilc->rx_buffer) { in wilc_wlan_init()
1232 kfree(wilc->rx_buffer); in wilc_wlan_init()
1233 wilc->rx_buffer = NULL; in wilc_wlan_init()
1234 kfree(wilc->tx_buffer); in wilc_wlan_init()
1235 wilc->tx_buffer = NULL; in wilc_wlan_init()