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