1 /* 2 * Copyright (C) 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 16 #ifndef OHOS_WIFI_HAL_CHBA_STRUCT_H 17 #define OHOS_WIFI_HAL_CHBA_STRUCT_H 18 19 #include "wifi_hal_define.h" 20 21 #ifdef __cplusplus 22 extern "C" { 23 #endif 24 25 #define MAC_SIZE 7 26 #define CHBA_SSID_LEN 32 27 #define PASSPHRASE_LEN 64 28 #define BSSID_SIZE MAC_SIZE 29 30 typedef enum ChbaSupplicantErrCode { 31 CHBA_SUP_ERRCODE_SUCCESS = 0, 32 CHBA_SUP_ERRCODE_FAILED = 1, 33 CHBA_SUP_ERRCODE_TIMEOUT = 2, 34 CHBA_SUP_ERRCODE_PBC_OVERLAP = 3, 35 CHBA_SUP_ERRCODE_UNKNOWN = 4, 36 CHBA_SUP_ERRCODE_INPUT_ERROR = 5, 37 CHBA_SUP_ERRCODE_INVALID = 0XFF, 38 } ChbaSupplicantErrCode; 39 40 typedef struct ChbaConnNotifyInfo { 41 int32_t id; 42 uint8_t peerAddress[MAC_SIZE]; 43 int32_t centerFreq20M; 44 int32_t centetFreq1; 45 int32_t centetFreq2; 46 int32_t bandwidth; 47 uint32_t expireTime; 48 } ChbaConnNotifyInfo; 49 50 typedef struct ChbaConnectInfo { 51 int8_t ssid[CHBA_SSID_LEN + 1]; 52 int8_t passphrase[PASSPHRASE_LEN + 1]; 53 uint8_t bssid[BSSID_SIZE]; 54 int32_t freq; 55 int32_t centerFreq1; 56 int32_t centerFreq2; 57 int32_t bandwidth; 58 }ChbaConnectInfo; 59 60 #ifdef __cplusplus 61 } 62 #endif 63 #endif // OHOS_WIFI_HAL_CHBA_STRUCT_H