1 /* 2 * Copyright (c) 2014-2017,2019 The Linux Foundation. All rights reserved. 3 * 4 * Permission to use, copy, modify, and/or distribute this software for 5 * any purpose with or without fee is hereby granted, provided that the 6 * above copyright notice and this permission notice appear in all 7 * copies. 8 * 9 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL 10 * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED 11 * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE 12 * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL 13 * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR 14 * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER 15 * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR 16 * PERFORMANCE OF THIS SOFTWARE. 17 */ 18 19 /** 20 * DOC: i_qdf_nbuf_api_w.h 21 * 22 * Platform specific qdf_nbuf_public network buffer API 23 * This file defines the network buffer abstraction. 24 * Included by qdf_nbuf.h and should not be included 25 * directly from other files. 26 */ 27 28 #ifndef _QDF_NBUF_W_H 29 #define _QDF_NBUF_W_H 30 31 static inline void *qdf_nbuf_get_tx_fctx(qdf_nbuf_t buf) 32 { 33 return __qdf_nbuf_get_tx_fctx(buf); 34 } 35 36 static inline void *qdf_nbuf_get_rx_fctx(qdf_nbuf_t buf) 37 { 38 return __qdf_nbuf_get_rx_fctx(buf); 39 } 40 41 42 static inline void 43 qdf_nbuf_set_tx_fctx_type(qdf_nbuf_t buf, void *ctx, uint8_t type) 44 { 45 __qdf_nbuf_set_tx_fctx_type(buf, ctx, type); 46 } 47 48 static inline void 49 qdf_nbuf_set_rx_fctx_type(qdf_nbuf_t buf, void *ctx, uint8_t type) 50 { 51 __qdf_nbuf_set_rx_fctx_type(buf, ctx, type); 52 } 53 54 55 static inline void * 56 qdf_nbuf_get_ext_cb(qdf_nbuf_t buf) 57 { 58 return __qdf_nbuf_get_ext_cb(buf); 59 } 60 61 static inline void 62 qdf_nbuf_set_ext_cb(qdf_nbuf_t buf, void *ref) 63 { 64 __qdf_nbuf_set_ext_cb(buf, ref); 65 } 66 67 /** 68 * qdf_nbuf_set_rx_protocol_tag() - set given value in protocol_tag 69 * field of buf(skb->cb) 70 * @buf: Network buffer 71 * @val: Value to be set 72 * Return: void 73 */ 74 static inline void qdf_nbuf_set_rx_protocol_tag(qdf_nbuf_t buf, uint32_t val) 75 { 76 __qdf_nbuf_set_rx_protocol_tag(buf, val); 77 } 78 79 /** 80 * qdf_nbuf_get_rx_protocol_tag() - Get the value of protocol_tag 81 * field of buf(skb->cb) 82 * @buf: Network buffer 83 * Return: void 84 */ 85 static inline int qdf_nbuf_get_rx_protocol_tag(qdf_nbuf_t buf) 86 { 87 return __qdf_nbuf_get_rx_protocol_tag(buf); 88 } 89 #endif /* _QDF_NBUF_W_H */ 90