1 /* 2 * Copyright (c) 2020 HiSilicon (Shanghai) Technologies CO., LIMITED. 3 * Licensed under the Apache License, Version 2.0 (the "License"); 4 * you may not use this file except in compliance with the License. 5 * You may obtain a copy of the License at 6 * 7 * http://www.apache.org/licenses/LICENSE-2.0 8 * 9 * Unless required by applicable law or agreed to in writing, software 10 * distributed under the License is distributed on an "AS IS" BASIS, 11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 * See the License for the specific language governing permissions and 13 * limitations under the License. 14 * Description: netbuf enum type head file. 15 */ 16 17 #ifndef OAL_NETBUF_COMMON_ROM_H 18 #define OAL_NETBUF_COMMON_ROM_H 19 20 #include "osal_types.h" 21 #include "frw_msg_rom.h" 22 #include "frw_hcc_common_rom.h" 23 #include "oal_net_pkt_rom.h" 24 #include "oal_types_device_rom.h" 25 #ifdef __cplusplus 26 #if __cplusplus 27 extern "C" { 28 #endif 29 #endif 30 31 /* 报文驱动私有扩展头封装格式示意:低地址|HCC头|FRW头|CB头|MAC头|Payload|高地址 */ 32 #define OAL_HCC_HDR_LEN hcc_get_head_len() 33 #define OAL_FRW_HDR_LEN frw_get_head_len() 34 #define OAL_MAX_CB_LEN 32 /* 不能超过48字节,内核的CB数组只有48字节 */ 35 #define OAL_MAX_MAC_HDR_LEN 36 /* 预留给MAC头的最大空间,考虑4地址场景 */ 36 #define OAL_HDR_TOTAL_LEN (OAL_HCC_HDR_LEN + OAL_FRW_HDR_LEN + OAL_MAX_CB_LEN + OAL_MAX_MAC_HDR_LEN) 37 /* 修改OAL_HDR_TOTAL_LEN 需要同步修改 OAL_MACHDR_LEN */ 38 39 #define WLAN_MEM_NETBUF_ALRX 1600 /* 常发常收内存大小 */ 40 41 #ifdef __cplusplus 42 #if __cplusplus 43 } 44 #endif 45 #endif 46 47 #endif /* end of oal_netbuf_common.h */