Skip to content

Commit 985d1c0

Browse files
jukkarnashif
authored andcommitted
net: Convert IEEE 802.15.4 drivers to use renamed network APIs
Rename network symbols in IEEE 802.15.4 drivers to use the renamed network APIs. Signed-off-by: Jukka Rissanen <[email protected]>
1 parent e6daacf commit 985d1c0

14 files changed

+20
-19
lines changed

drivers/ieee802154/ieee802154_b91.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,7 @@ static void b91_handle_ack(void)
212212

213213
/* allocate ack packet */
214214
ack_pkt = net_pkt_rx_alloc_with_buffer(data.iface, B91_ACK_FRAME_LEN,
215-
AF_UNSPEC, 0, K_NO_WAIT);
215+
NET_AF_UNSPEC, 0, K_NO_WAIT);
216216
if (!ack_pkt) {
217217
LOG_ERR("No free packet available.");
218218
return;
@@ -308,7 +308,8 @@ static void b91_rf_rx_isr(void)
308308
}
309309

310310
/* get packet pointer from NET stack */
311-
pkt = net_pkt_rx_alloc_with_buffer(data.iface, length, AF_UNSPEC, 0, K_NO_WAIT);
311+
pkt = net_pkt_rx_alloc_with_buffer(data.iface, length,
312+
NET_AF_UNSPEC, 0, K_NO_WAIT);
312313
if (!pkt) {
313314
LOG_ERR("No pkt available");
314315
goto exit;

drivers/ieee802154/ieee802154_cc1200.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -471,7 +471,7 @@ static void cc1200_rx(void *p1, void *p2, void *p3)
471471
}
472472

473473
pkt = net_pkt_rx_alloc_with_buffer(cc1200->iface, pkt_len,
474-
AF_UNSPEC, 0, K_NO_WAIT);
474+
NET_AF_UNSPEC, 0, K_NO_WAIT);
475475
if (!pkt) {
476476
LOG_ERR("No free pkt available");
477477
goto flush;

drivers/ieee802154/ieee802154_cc13xx_cc26xx.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -424,7 +424,7 @@ static void ieee802154_cc13xx_cc26xx_rx_done(
424424
len, seq, rssi, lqi);
425425

426426
pkt = net_pkt_rx_alloc_with_buffer(
427-
drv_data->iface, len, AF_UNSPEC, 0, K_NO_WAIT);
427+
drv_data->iface, len, NET_AF_UNSPEC, 0, K_NO_WAIT);
428428
if (!pkt) {
429429
LOG_WRN("Cannot allocate packet");
430430
continue;

drivers/ieee802154/ieee802154_cc13xx_cc26xx_subg.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -353,7 +353,7 @@ static void drv_rx_done(struct ieee802154_cc13xx_cc26xx_subg_data *drv_data)
353353
len, rssi, status);
354354

355355
pkt = net_pkt_rx_alloc_with_buffer(
356-
drv_data->iface, len, AF_UNSPEC, 0, K_NO_WAIT);
356+
drv_data->iface, len, NET_AF_UNSPEC, 0, K_NO_WAIT);
357357
if (!pkt) {
358358
LOG_WRN("Cannot allocate packet");
359359
continue;

drivers/ieee802154/ieee802154_cc2520.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -618,7 +618,7 @@ static void cc2520_rx(void *p1, void *p2, void *p3)
618618
}
619619

620620
pkt = net_pkt_rx_alloc_with_buffer(cc2520->iface, pkt_len,
621-
AF_UNSPEC, 0, K_NO_WAIT);
621+
NET_AF_UNSPEC, 0, K_NO_WAIT);
622622
if (!pkt) {
623623
LOG_ERR("No pkt available");
624624
goto flush;

drivers/ieee802154/ieee802154_dw1000.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -411,7 +411,7 @@ static inline void dwt_irq_handle_rx(const struct device *dev, uint32_t sys_stat
411411
}
412412

413413
pkt = net_pkt_rx_alloc_with_buffer(ctx->iface, pkt_len,
414-
AF_UNSPEC, 0, K_NO_WAIT);
414+
NET_AF_UNSPEC, 0, K_NO_WAIT);
415415
if (!pkt) {
416416
LOG_ERR("No buf available");
417417
goto rx_out_enable_rx;

drivers/ieee802154/ieee802154_esp32.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ void esp_ieee802154_receive_done(uint8_t *frame, esp_ieee802154_frame_info_t *fr
7777

7878
LOG_HEXDUMP_DBG(payload, len, "RX buffer:");
7979

80-
pkt = net_pkt_rx_alloc_with_buffer(esp32_data.iface, len, AF_UNSPEC, 0, K_NO_WAIT);
80+
pkt = net_pkt_rx_alloc_with_buffer(esp32_data.iface, len, NET_AF_UNSPEC, 0, K_NO_WAIT);
8181
if (!pkt) {
8282
LOG_ERR("No pkt available");
8383
goto exit;

drivers/ieee802154/ieee802154_kw41z.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -513,7 +513,7 @@ static inline void kw41z_rx(struct kw41z_context *kw41z, uint8_t len)
513513
#endif
514514

515515
pkt = net_pkt_rx_alloc_with_buffer(kw41z->iface, pkt_len,
516-
AF_UNSPEC, 0, K_NO_WAIT);
516+
NET_AF_UNSPEC, 0, K_NO_WAIT);
517517
if (!pkt) {
518518
LOG_ERR("No buf available");
519519
goto out;

drivers/ieee802154/ieee802154_mcr20a.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -567,7 +567,7 @@ static inline void mcr20a_rx(const struct device *dev, uint8_t len)
567567
pkt_len = len - MCR20A_FCS_LENGTH;
568568

569569
pkt = net_pkt_rx_alloc_with_buffer(mcr20a->iface, pkt_len,
570-
AF_UNSPEC, 0, K_NO_WAIT);
570+
NET_AF_UNSPEC, 0, K_NO_WAIT);
571571
if (!pkt) {
572572
LOG_ERR("No buf available");
573573
goto out;

drivers/ieee802154/ieee802154_mcxw.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -435,7 +435,7 @@ static int handle_ack(struct mcxw_context *mcxw_radio)
435435
int err = 0;
436436

437437
len = mcxw_radio->rx_ack_frame.length;
438-
pkt = net_pkt_rx_alloc_with_buffer(mcxw_radio->iface, len, AF_UNSPEC, 0, K_NO_WAIT);
438+
pkt = net_pkt_rx_alloc_with_buffer(mcxw_radio->iface, len, NET_AF_UNSPEC, 0, K_NO_WAIT);
439439
if (!pkt) {
440440
LOG_ERR("No free packet available.");
441441
err = -ENOMEM;
@@ -641,8 +641,8 @@ void mcxw_rx_thread(void *arg1, void *arg2, void *arg3)
641641
continue;
642642
}
643643

644-
pkt = net_pkt_rx_alloc_with_buffer(mcxw_radio->iface, rx_frame.length, AF_UNSPEC, 0,
645-
K_FOREVER);
644+
pkt = net_pkt_rx_alloc_with_buffer(mcxw_radio->iface, rx_frame.length,
645+
NET_AF_UNSPEC, 0, K_FOREVER);
646646

647647
if (net_pkt_write(pkt, rx_frame.psdu, rx_frame.length)) {
648648
goto drop;

0 commit comments

Comments
 (0)