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