diff --git a/qdf/inc/qdf_nbuf.h b/qdf/inc/qdf_nbuf.h index 28f7cb95ea..3225239336 100644 --- a/qdf/inc/qdf_nbuf.h +++ b/qdf/inc/qdf_nbuf.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2020 The Linux Foundation. All rights reserved. + * Copyright (c) 2014-2021 The Linux Foundation. All rights reserved. * * Permission to use, copy, modify, and/or distribute this software for * any purpose with or without fee is hereby granted, provided that the @@ -3371,6 +3371,18 @@ static inline uint32_t qdf_nbuf_get_tso_num_seg(qdf_nbuf_t nbuf) return __qdf_nbuf_get_tso_num_seg(nbuf); } +/** + * qdf_nbuf_get_gso_segs() - Return the number of gso segments in + * nbuf + * @nbuf: Network buffer + * + * Return: number of gso segments in nbuf + */ +static inline uint16_t qdf_nbuf_get_gso_segs(qdf_nbuf_t nbuf) +{ + return __qdf_nbuf_get_gso_segs(nbuf); +} + /** * qdf_nbuf_inc_users() - function to increment the number of * users referencing this network buffer diff --git a/qdf/linux/src/i_qdf_nbuf.h b/qdf/linux/src/i_qdf_nbuf.h index 5d34ad0736..a5d58cd496 100644 --- a/qdf/linux/src/i_qdf_nbuf.h +++ b/qdf/linux/src/i_qdf_nbuf.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2020 The Linux Foundation. All rights reserved. + * Copyright (c) 2014-2021 The Linux Foundation. All rights reserved. * * Permission to use, copy, modify, and/or distribute this software for * any purpose with or without fee is hereby granted, provided that the @@ -2535,6 +2535,17 @@ static inline qdf_size_t __qdf_nbuf_get_data_len(__qdf_nbuf_t nbuf) return (skb_end_pointer(nbuf) - nbuf->data); } +/** + * __qdf_nbuf_get_gso_segs() - Return the number of gso segments + * @skb: Pointer to network buffer + * + * Return: Return the number of gso segments + */ +static inline uint16_t __qdf_nbuf_get_gso_segs(struct sk_buff *skb) +{ + return skb_shinfo(skb)->gso_segs; +} + #ifdef CONFIG_NBUF_AP_PLATFORM #include #else