Lines Matching refs:kw41z

368 	struct kw41z_context *kw41z = dev->data;  in kw41z_cca()  local
372 k_sem_init(&kw41z->seq_sync, 0, 1); in kw41z_cca()
380 k_sem_take(&kw41z->seq_sync, K_FOREVER); in kw41z_cca()
382 return kw41z->seq_retval; in kw41z_cca()
497 static inline void kw41z_rx(struct kw41z_context *kw41z, uint8_t len) in kw41z_rx() argument
515 pkt = net_pkt_rx_alloc_with_buffer(kw41z->iface, pkt_len, in kw41z_rx()
561 rslt = net_recv_data(kw41z->iface, pkt); in kw41z_rx()
578 static void handle_ack(struct kw41z_context *kw41z, uint8_t seq_number) in handle_ack() argument
583 ack_pkt = net_pkt_rx_alloc_with_buffer(kw41z->iface, ACK_FRAME_LEN, in handle_ack()
607 if (ieee802154_handle_ack(kw41z->iface, ack_pkt) != NET_OK) { in handle_ack()
618 struct kw41z_context *kw41z = dev->data; in kw41z_tx() local
669 tx_timeout = kw41z->tx_warmup_time + KW41Z_SHR_PHY_TIME + in kw41z_tx()
698 k_sem_take(&kw41z->seq_sync, K_FOREVER); in kw41z_tx()
700 if ((kw41z->seq_retval == 0) && ieee802154_is_ar_flag_set(frag)) { in kw41z_tx()
701 handle_ack(kw41z, frag->data[2]); in kw41z_tx()
704 LOG_DBG("seq_retval: %ld", kw41z->seq_retval); in kw41z_tx()
705 return kw41z->seq_retval; in kw41z_tx()
925 struct kw41z_context *kw41z = dev->data; in get_mac() local
938 uint32_t *ptr = (uint32_t *)(kw41z->mac_addr); in get_mac()
941 ptr = (uint32_t *)(kw41z->mac_addr + 4); in get_mac()
949 kw41z->mac_addr[0] = (kw41z->mac_addr[0] & ~0x01) | 0x02; in get_mac()
951 return kw41z->mac_addr; in get_mac()
956 struct kw41z_context *kw41z = dev->data; in kw41z_init() local
1006 kw41z->rx_warmup_time = (XCVR_TSM->END_OF_SEQ & in kw41z_init()
1009 kw41z->tx_warmup_time = (XCVR_TSM->END_OF_SEQ & in kw41z_init()
1013 if (kw41z->rx_warmup_time & 0x0F) { in kw41z_init()
1014 kw41z->rx_warmup_time = 1 + (kw41z->rx_warmup_time >> 4); in kw41z_init()
1016 kw41z->rx_warmup_time = kw41z->rx_warmup_time >> 4; in kw41z_init()
1019 if (kw41z->tx_warmup_time & 0x0F) { in kw41z_init()
1020 kw41z->tx_warmup_time = 1 + (kw41z->tx_warmup_time >> 4); in kw41z_init()
1022 kw41z->tx_warmup_time = kw41z->tx_warmup_time >> 4; in kw41z_init()
1062 struct kw41z_context *kw41z = dev->data; in kw41z_iface_init() local
1070 kw41z->iface = iface; in kw41z_iface_init()