Lines Matching refs:nrf5_data
65 static struct nrf5_802154_data nrf5_data; variable
112 return net_if_get_device(nrf5_data.iface); in nrf5_get_device()
243 nrf5_data.capabilities = in nrf5_get_capabilities_at_boot()
272 return nrf5_data.capabilities; in nrf5_get_capabilities()
317 if (nrf5_data.energy_scan_done == NULL) { in nrf5_energy_scan_start()
318 nrf5_data.energy_scan_done = done_cb; in nrf5_energy_scan_start()
321 nrf5_data.energy_scan_done = NULL; in nrf5_energy_scan_start()
400 nrf5_data.txpwr = dbm; in nrf5_set_txpower()
475 if (nrf5_data.event_handler) { in nrf5_tx_started()
476 nrf5_data.event_handler(dev, IEEE802154_EVENT_TX_STARTED, in nrf5_tx_started()
491 .power = nrf5_data.txpwr, in nrf5_tx_immediate()
508 .power = nrf5_data.txpwr, in nrf5_tx_csma_ca()
534 max_extra_cca_attempts = nrf5_data.max_extra_cca_attempts; in nrf5_tx_at()
556 .power = nrf5_data.txpwr, in nrf5_tx_at()
635 LOG_DBG("Result: %d", nrf5_data.tx_result); in nrf5_tx()
694 nrf_802154_tx_power_set(nrf5_data.txpwr); in nrf5_start()
711 if (nrf5_data.event_handler) { in nrf5_stop()
712 nrf5_data.event_handler(dev, IEEE802154_EVENT_RX_OFF, NULL); in nrf5_stop()
738 nrf_802154_tx_power_set(nrf5_data.txpwr); in nrf5_continuous_carrier()
755 nrf_802154_tx_power_set(nrf5_data.txpwr); in nrf_modulated_carrier()
919 nrf5_data.event_handler = config->event_handler; in nrf5_configure()
999 net_time_t period_ns = nrf5_data.csl_period * NSEC_PER_TEN_SYMBOLS; in nrf5_configure()
1000 bool changed = (config->expected_rx_time - nrf5_data.csl_rx_time) % period_ns; in nrf5_configure()
1002 nrf5_data.csl_rx_time = config->expected_rx_time; in nrf5_configure()
1029 nrf5_data.csl_period = config->csl_period; in nrf5_configure()
1036 nrf5_data.max_extra_cca_attempts = in nrf5_configure()
1044 nrf5_data.rx_on_when_idle = config->rx_on_when_idle; in nrf5_configure()
1107 for (uint32_t i = 0; i < ARRAY_SIZE(nrf5_data.rx_frames); i++) { in nrf_802154_received_timestamp_raw()
1108 if (nrf5_data.rx_frames[i].psdu != NULL) { in nrf_802154_received_timestamp_raw()
1112 nrf5_data.rx_frames[i].psdu = data; in nrf_802154_received_timestamp_raw()
1113 nrf5_data.rx_frames[i].rssi = power; in nrf_802154_received_timestamp_raw()
1114 nrf5_data.rx_frames[i].lqi = lqi; in nrf_802154_received_timestamp_raw()
1117 nrf5_data.rx_frames[i].time = in nrf_802154_received_timestamp_raw()
1121 nrf5_data.rx_frames[i].ack_fpb = nrf5_data.last_frame_ack_fpb; in nrf_802154_received_timestamp_raw()
1122 nrf5_data.rx_frames[i].ack_seb = nrf5_data.last_frame_ack_seb; in nrf_802154_received_timestamp_raw()
1123 nrf5_data.last_frame_ack_fpb = false; in nrf_802154_received_timestamp_raw()
1124 nrf5_data.last_frame_ack_seb = false; in nrf_802154_received_timestamp_raw()
1126 k_fifo_put(&nrf5_data.rx_fifo, &nrf5_data.rx_frames[i]); in nrf_802154_received_timestamp_raw()
1140 if (!nrf5_data.rx_on_when_idle) { in nrf_802154_receive_failed()
1143 } else if (nrf5_data.event_handler) { in nrf_802154_receive_failed()
1145 nrf5_data.event_handler(dev, IEEE802154_EVENT_RX_OFF, NULL); in nrf_802154_receive_failed()
1177 nrf5_data.last_frame_ack_fpb = false; in nrf_802154_receive_failed()
1178 nrf5_data.last_frame_ack_seb = false; in nrf_802154_receive_failed()
1180 if (nrf5_data.event_handler) { in nrf_802154_receive_failed()
1181 nrf5_data.event_handler(dev, IEEE802154_EVENT_RX_FAILED, (void *)&reason); in nrf_802154_receive_failed()
1187 nrf5_data.last_frame_ack_fpb = data[FRAME_PENDING_OFFSET] & FRAME_PENDING_BIT; in nrf_802154_tx_ack_started()
1188 nrf5_data.last_frame_ack_seb = data[SECURITY_ENABLED_OFFSET] & SECURITY_ENABLED_BIT; in nrf_802154_tx_ack_started()
1196 nrf5_data.tx_result = NRF_802154_TX_ERROR_NONE; in nrf_802154_transmitted_raw()
1197 nrf5_data.tx_frame_is_secured = metadata->frame_props.is_secured; in nrf_802154_transmitted_raw()
1198 nrf5_data.tx_frame_mac_hdr_rdy = metadata->frame_props.dynamic_data_is_set; in nrf_802154_transmitted_raw()
1199 nrf5_data.ack_frame.psdu = metadata->data.transmitted.p_ack; in nrf_802154_transmitted_raw()
1201 if (nrf5_data.ack_frame.psdu) { in nrf_802154_transmitted_raw()
1202 nrf5_data.ack_frame.rssi = metadata->data.transmitted.power; in nrf_802154_transmitted_raw()
1203 nrf5_data.ack_frame.lqi = metadata->data.transmitted.lqi; in nrf_802154_transmitted_raw()
1209 nrf5_data.ack_frame.time = NRF_802154_NO_TIMESTAMP; in nrf_802154_transmitted_raw()
1211 nrf5_data.ack_frame.time = nrf_802154_timestamp_end_to_phr_convert( in nrf_802154_transmitted_raw()
1212 metadata->data.transmitted.time, nrf5_data.ack_frame.psdu[0]); in nrf_802154_transmitted_raw()
1217 k_sem_give(&nrf5_data.tx_wait); in nrf_802154_transmitted_raw()
1226 nrf5_data.tx_result = error; in nrf_802154_transmit_failed()
1227 nrf5_data.tx_frame_is_secured = metadata->frame_props.is_secured; in nrf_802154_transmit_failed()
1228 nrf5_data.tx_frame_mac_hdr_rdy = metadata->frame_props.dynamic_data_is_set; in nrf_802154_transmit_failed()
1230 k_sem_give(&nrf5_data.tx_wait); in nrf_802154_transmit_failed()
1235 nrf5_data.channel_free = channel_free; in nrf_802154_cca_done()
1237 k_sem_give(&nrf5_data.cca_wait); in nrf_802154_cca_done()
1244 nrf5_data.channel_free = false; in nrf_802154_cca_failed()
1246 k_sem_give(&nrf5_data.cca_wait); in nrf_802154_cca_failed()
1251 if (nrf5_data.energy_scan_done != NULL) { in nrf_802154_energy_detected()
1252 energy_scan_done_cb_t callback = nrf5_data.energy_scan_done; in nrf_802154_energy_detected()
1254 nrf5_data.energy_scan_done = NULL; in nrf_802154_energy_detected()
1261 if (nrf5_data.energy_scan_done != NULL) { in nrf_802154_energy_detection_failed()
1262 energy_scan_done_cb_t callback = nrf5_data.energy_scan_done; in nrf_802154_energy_detection_failed()
1264 nrf5_data.energy_scan_done = NULL; in nrf_802154_energy_detection_failed()
1318 NET_DEVICE_DT_INST_DEFINE(0, nrf5_init, NULL, &nrf5_data, &nrf5_radio_cfg,
1322 DEVICE_DT_INST_DEFINE(0, nrf5_init, NULL, &nrf5_data, &nrf5_radio_cfg,