Skip to content

Commit

Permalink
nrf_wifi: Add ops to set and get checksum status
Browse files Browse the repository at this point in the history
Add helpers to get/set checksum status in the network buffer.
This are missing in linux driver.

Signed-off-by: Kapil Bhatt <kapil.bhatt@nordicsemi.no>
  • Loading branch information
kapbh committed Mar 11, 2024
1 parent 90215f7 commit fdc6409
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions src/shim.c
Original file line number Diff line number Diff line change
Expand Up @@ -336,6 +336,20 @@ static unsigned char shim_nbuf_get_priority(void *nbuf)
return skb->priority;
}

static unsigned char shim_nbuf_get_chksum_done(void *nbuf)
{
struct sk_buff *skb = (struct sk_buff *)nbuf;

return skb->csum_complete_sw;
}

static void shim_nbuf_set_chksum_done(void *nbuf, unsigned char chksum_done)
{
struct sk_buff *skb = (struct sk_buff *)nbuf;

skb->csum_complete_sw = (bool)chksum_done;
}

static void *shim_llist_node_alloc(void)
{
struct shim_llist_node *llist_node = NULL;
Expand Down Expand Up @@ -1080,6 +1094,8 @@ const struct nrf_wifi_osal_ops nrf_wifi_os_ops = {
.nbuf_data_push = shim_nbuf_data_push,
.nbuf_data_pull = shim_nbuf_data_pull,
.nbuf_get_priority = shim_nbuf_get_priority,
.nbuf_get_chksum_done = shim_nbuf_get_chksum_done,
.nbuf_set_chksum_done = shim_nbuf_set_chksum_done,

.tasklet_alloc = shim_tasklet_alloc,
.tasklet_free = shim_tasklet_free,
Expand Down

0 comments on commit fdc6409

Please sign in to comment.