1 /* 2 * Copyright (c) 2025 Huawei Device Co., Ltd. 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 */ 15 16 #ifndef LNN_LANE_DEF_STRUCT_H 17 #define LNN_LANE_DEF_STRUCT_H 18 19 #include <stdint.h> 20 21 #include "lnn_lane_interface_struct.h" 22 23 #ifdef __cplusplus 24 extern "C" { 25 #endif 26 27 #define LNN_LANE_P2P_MAX_NUM 4 28 29 typedef enum { 30 LANE_BW_RANDOM = 0x0, 31 LANE_BW_20M, 32 LANE_BW_40M, 33 LANE_BW_80M, 34 LANE_BW_80P80M, 35 LANE_BW_160M, 36 LANE_BW_BUTT = 0xFF, 37 } LaneBandwidth; 38 39 typedef enum { 40 LANE_TS_RANDOM = 0x0, 41 LANE_TS_BUTT = 0xFF, 42 } LaneTimeSlotPolicy; 43 44 typedef enum { 45 LANE_POWER_RANDOM = 0x0, 46 LANE_POWER_SMART, 47 LANE_POWER_VSR, 48 LANE_POWER_BUTT = 0xFF, 49 } LanePowerType; 50 51 typedef enum { 52 LANE_PRI_LOW = 0x0, 53 LANE_PRI_HIGH, 54 LANE_PRI_BUTT = 0xFF, 55 } LaneTransPriority; 56 57 typedef struct { 58 uint16_t baseProfileNum; 59 LaneLinkType linkType; 60 LaneBandwidth bw; 61 LaneTimeSlotPolicy ts; 62 LanePowerType energy; 63 LaneTransType content; 64 LaneTransPriority priority; 65 uint32_t serialNum; 66 int32_t phyChannel; 67 uint32_t maxSpeed; 68 } LaneProfile; 69 70 typedef struct { 71 char localIp[IP_LEN]; 72 char peerIp[IP_LEN]; 73 } LnnLaneP2pInfo; 74 75 typedef enum { 76 LNN_LINK_TYPE_WLAN_5G = 0x0, 77 LNN_LINK_TYPE_WLAN_2P4G, 78 LNN_LINK_TYPE_BR, 79 LNN_LINK_TYPE_P2P, 80 LNN_LINK_TYPE_P2P_MAX = LNN_LINK_TYPE_P2P + LNN_LANE_P2P_MAX_NUM, 81 LNN_LINK_TYPE_BUTT, 82 } LnnLaneLinkType; 83 84 #ifdef __cplusplus 85 } 86 #endif 87 #endif // LNN_LANE_DEF_STRUCT_H