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