[qca-nss-drv] Enable the transfer of packet priority from NSS to host.
Change-Id: I9ab742de3969529ddbf2ee66e45d7bf4aeca7703
Signed-off-by: Sakthi Vignesh Radhakrishnan <sradhakr@codeaurora.org>
diff --git a/nss_core.c b/nss_core.c
index ebefbc8..99c83b5 100644
--- a/nss_core.c
+++ b/nss_core.c
@@ -547,6 +547,7 @@
printk("\tbuffer_len = %d\n", desc->buffer_len);
printk("\tpayload_offs = %d\n", desc->payload_offs);
printk("\tpayload_len = %d\n", desc->payload_len);
+ printk("\tpri = %d\n", desc->pri);
}
/*
@@ -916,6 +917,7 @@
*/
nbuf->data_len = payload_len;
nbuf->len = payload_len;
+ nbuf->priority = desc->pri;
goto pull;
}
@@ -945,6 +947,7 @@
__skb_fill_page_desc(nbuf, 0, skb_frag_page(&skb_shinfo(nbuf)->frags[0]), payload_offs, payload_len);
nbuf->data_len = payload_len;
nbuf->len = payload_len;
+ nbuf->priority = desc->pri;
/*
* Set jumbo pointer to nbuf
@@ -1046,6 +1049,8 @@
*head_ptr = NULL;
}
+ nbuf->priority = desc->pri;
+
/*
* TODO: Check if there is any issue wrt map and unmap,
* NSS should playaround with data area and should not
@@ -1092,6 +1097,7 @@
skb_frag_list_init(nbuf);
nbuf->data_len = 0;
nbuf->truesize = desc->payload_len;
+ nbuf->priority = desc->pri;
*head_ptr = nbuf;
diff --git a/nss_hlos_if.h b/nss_hlos_if.h
index b9fee95..87acdeb 100644
--- a/nss_hlos_if.h
+++ b/nss_hlos_if.h
@@ -391,7 +391,8 @@
uint16_t bit_flags; /* Bit flags associated with the buffer */
uint8_t buffer_type; /* Type of buffer */
uint8_t response_type; /* Response type if the buffer is a command response */
- uint16_t reserved[3]; /* Reserved for future use */
+ uint8_t pri; /* Packet priority */
+ uint8_t reserved[5]; /* Reserved for future use */
nss_ptr_t opaque; /* 32 or 64-bit value provided by the HLOS to associate with the buffer. The cookie has no meaning to the NSS */
#ifndef __LP64__
uint32_t padding; /* Pad to fit 64 bits, do not reuse */