WS63 SDK 文档 7021f4f@fbb_ws63
ws63 和 ws63e 解决方案的 SDK 文档
载入中...
搜索中...
未找到
oal_netbuf.h
浏览该文件的文档.
1/*
2 * Copyright (c) HiSilicon (Shanghai) Technologies Co., Ltd. 2022-2022. All rights reserved.
3 * Description: header file for oal_netbuf.c
4 * Create: 2022-04-26
5 */
6#ifndef __OAL_NETBUF_H__
7#define __OAL_NETBUF_H__
8
9/*****************************************************************************
10 1 其他头文件包含
11*****************************************************************************/
12#include "osal_types.h"
13#include "oal_net.h"
14#include "wlan_spec.h"
15#include "oal_net.h"
16
17#ifdef __cplusplus
18#if __cplusplus
19extern "C" {
20#endif
21#endif
22static inline oal_netbuf_stru* oal_netbuf_copy(oal_netbuf_stru *pst_netbuf, oal_gfp_enum_uint8 priority)
23{
24 return skb_copy(pst_netbuf, priority);
25}
26
27static inline oal_netbuf_stru* oal_netbuf_delist_nolock(oal_netbuf_head_stru *list_head)
28{
29 return __skb_dequeue(list_head);
30}
31
32static inline td_u32 oal_netbuf_free_list(oal_netbuf_head_stru *head, td_u32 num)
33{
34 td_u32 index;
35 td_u32 ul_ret;
36
37 for (index = 0; index < num; index++) {
38 ul_ret = oal_netbuf_free(oal_netbuf_delist(head));
39 if (OAL_SUCC != ul_ret) {
40 return ul_ret;
41 }
42 }
43
44 return OAL_SUCC;
45}
46
47typedef union {
49 struct {
51 low : 4;
52 } bits;
53} bitfield;
54
55static inline td_u8 oal_netbuf_get_bitfield(td_void)
56{
57 bitfield un_bitfield;
58 un_bitfield.byte = 0x12;
59 if (un_bitfield.bits.low == 0x2) {
61 } else {
63 }
64}
65#ifdef __cplusplus
66#if __cplusplus
67}
68#endif
69#endif
70#endif /* end of oal_netbuf.h */
@ OAL_SUCC
Definition common_error_code_rom.h:18
gfp_t oal_gfp_enum_uint8
Definition oal_netbuf.h:21
#define OAL_BITFIELD_LITTLE_ENDIAN
Definition oal_net_rom.h:33
#define OAL_BITFIELD_BIG_ENDIAN
Definition oal_net_rom.h:34
td_u32 oal_netbuf_free(oal_netbuf_stru *netbuf)
Definition list.h:18
Definition oal_skbuff.h:73
Definition oal_skbuff.h:82
unsigned char td_u8
Definition td_type.h:36
void td_void
Definition td_type.h:49
unsigned int td_u32
Definition td_type.h:38
Definition oal_netbuf.h:47
td_u8 byte
Definition oal_netbuf.h:48
td_u8 low
Definition oal_netbuf.h:51
struct bitfield::@452 bits
td_u8 high
Definition oal_netbuf.h:50