• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (c) 2022-2023 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 #ifndef WLAN_COMMON_CMD_H
16 #define WLAN_COMMON_CMD_H
17 
18 #include "../wlan_impl.h"
19 
20 #define WLAN_MAJOR_VER 1
21 #define WLAN_MINOR_VER 3
22 int32_t WlanInterfaceStart(struct IWlanInterface *self);
23 int32_t WlanInterfaceStop(struct IWlanInterface *self);
24 int32_t WlanInterfaceCreateFeature(struct IWlanInterface *self, int32_t type, struct HdfFeatureInfo *ifeature);
25 int32_t WlanInterfaceDestroyFeature(struct IWlanInterface *self, const struct HdfFeatureInfo *ifeature);
26 int32_t WlanInterfaceGetAssociatedStas(struct IWlanInterface *self, const struct HdfFeatureInfo *ifeature,
27     struct HdfStaInfo *staInfo, uint32_t *staInfoLen, uint32_t *num);
28 int32_t WlanInterfaceGetChipId(struct IWlanInterface *self, const struct HdfFeatureInfo *ifeature, uint8_t *chipId);
29 int32_t WlanInterfaceGetDeviceMacAddress(struct IWlanInterface *self, const struct HdfFeatureInfo *ifeature,
30     uint8_t *mac, uint32_t *macLen, uint8_t len);
31 int32_t WlanInterfaceGetFeatureByIfName(struct IWlanInterface *self, const char *ifName,
32     struct HdfFeatureInfo *ifeature);
33 int32_t WlanInterfaceGetFeatureType(struct IWlanInterface *self, const struct HdfFeatureInfo *ifeature,
34     int32_t *featureType);
35 int32_t WlanInterfaceGetFreqsWithBand(struct IWlanInterface *self, const struct HdfFeatureInfo *ifeature,
36     const struct HdfWifiInfo *wifiInfo, int32_t *freq, uint32_t *freqLen);
37 int32_t WlanInterfaceGetIfNamesByChipId(struct IWlanInterface *self, uint8_t chipId, char *ifName,
38     uint32_t ifNameLen, uint32_t *num);
39 int32_t WlanInterfaceGetNetworkIfaceName(struct IWlanInterface *self, const struct HdfFeatureInfo *ifeature,
40     char *ifName, uint32_t ifNameLen);
41 int32_t WlanInterfaceGetSupportCombo(struct IWlanInterface *self, uint64_t *combo);
42 int32_t WlanInterfaceGetSupportFeature(struct IWlanInterface *self, uint8_t *supType, uint32_t *supTypeLen);
43 int32_t WlanInterfaceRegisterEventCallback(struct IWlanInterface *self, struct IWlanCallback *cbFunc,
44     const char *ifName);
45 int32_t WlanInterfaceUnregisterEventCallback(struct IWlanInterface *self, struct IWlanCallback *cbFunc,
46     const char *ifName);
47 int32_t WlanInterfaceResetDriver(struct IWlanInterface *self, uint8_t chipId, const char *ifName);
48 int32_t WlanInterfaceSetCountryCode(struct IWlanInterface *self, const struct HdfFeatureInfo *ifeature,
49     const char *code, uint32_t len);
50 int32_t WlanInterfaceSetMacAddress(struct IWlanInterface *self, const struct HdfFeatureInfo *ifeature,
51     const uint8_t *mac, uint32_t macLen);
52 int32_t WlanInterfaceSetScanningMacAddress(struct IWlanInterface *self, const struct HdfFeatureInfo *ifeature,
53     const uint8_t *scanMac, uint32_t scanMacLen);
54 int32_t WlanInterfaceSetTxPower(struct IWlanInterface *self, const struct HdfFeatureInfo *ifeature, int32_t power);
55 int32_t WlanInterfaceGetNetDevInfo(struct IWlanInterface *self, struct HdfNetDeviceInfoResult *netDeviceInfoResult);
56 int32_t WlanInterfaceStartScan(struct IWlanInterface *self, const struct HdfFeatureInfo *ifeature,
57     const struct HdfWifiScan *scan);
58 int32_t WlanInterfaceGetPowerMode(struct IWlanInterface *self, const struct HdfFeatureInfo *ifeature, uint8_t *mode);
59 int32_t WlanInterfaceSetPowerMode(struct IWlanInterface *self, const struct HdfFeatureInfo *ifeature, uint8_t mode);
60 int32_t WlanInterfaceSetProjectionScreenParam(struct IWlanInterface *self, const char *ifName,
61     const struct ProjectionScreenCmdParam *param);
62 int32_t WlanInterfaceGetStaInfo(struct IWlanInterface *self, const char *ifName, struct WifiStationInfo *info,
63     const uint8_t *mac, uint32_t macLen);
64 int32_t WlanInterfaceStartPnoScan(struct IWlanInterface *self, const char *ifName,
65     const struct PnoSettings *pnoSettings);
66 int32_t WlanInterfaceStopPnoScan(struct IWlanInterface *self, const char *ifName);
67 int32_t WlanInterfaceGetSignalPollInfo(struct IWlanInterface *self, const char *ifName,
68     struct SignalPollResult *signalResult);
69 int32_t WlanInterfaceGetApBandwidth(struct IWlanInterface *self, const char *ifName,
70     uint8_t *bandwidth);
71 int32_t WlanInterfaceResetToFactoryMacAddress(struct IWlanInterface *self, const char *ifName);
72 int32_t WlanInterfaceSendActionFrame(struct IWlanInterface *self, const char *ifName, uint32_t freq,
73     const uint8_t *frameData, uint32_t frameDataLen);
74 int32_t WlanInterfaceRegisterActionFrameReceiver(struct IWlanInterface *self, const char *ifName,
75     const uint8_t *match, uint32_t matchLen);
76 int32_t WlanInterfaceGetCoexChannelList(struct IWlanInterface *self, const char *ifName,
77     uint8_t *paramBuf, uint32_t *paramBufLen);
78 int32_t WlanInterfaceSetPowerSaveMode(struct IWlanInterface *self, const char *ifName, int32_t frequency,
79     int32_t mode);
80 int32_t WlanInterfaceSetDpiMarkRule(struct IWlanInterface *self, int32_t uid, int32_t protocol, int32_t enable);
81 int32_t WlanInterfaceWifiConstruct(void);
82 int32_t WlanInterfaceWifiDestruct(void);
83 int32_t WlanGetVersion(struct IWlanInterface *self, uint32_t *majorVer, uint32_t *minorVer);
84 #endif
85