1 /* 2 * hdf_bdh_event.h 3 * 4 * hdf driver 5 * 6 * Copyright (c) 2020-2021 Huawei Device Co., Ltd. 7 * 8 * This software is licensed under the terms of the GNU General Public 9 * License version 2, as published by the Free Software Foundation, and 10 * may be copied, distributed, and modified under those terms. 11 * 12 * This program is distributed in the hope that it will be useful, 13 * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 * GNU General Public License for more details. 16 * 17 */ 18 #ifndef WAL_MAC80211_STA_EVENT_H_ 19 #define WAL_MAC80211_STA_EVENT_H_ 20 21 #define HDF_ETHER_ADDR_LEN (6) 22 #include <net/cfg80211.h> 23 24 typedef struct _HdfConnetResult { 25 uint8_t bssid[HDF_ETHER_ADDR_LEN]; /**< MAC address of the AP associated with the station */ 26 uint16_t statusCode; /**< 16-bit status code defined in the IEEE protocol */ 27 uint8_t *rspIe; /**< Association response IE */ 28 uint8_t *reqIe; /**< Association request IE */ 29 uint32_t reqIeLen; /**< Length of the association request IE */ 30 uint32_t rspIeLen; /**< Length of the association response IE */ 31 uint16_t connectStatus; /**< Connection status */ 32 uint16_t freq; /**< Frequency of the AP */ 33 } HdfConnetResult; 34 35 typedef enum { 36 HDF_WIFI_SCAN_SUCCESS, 37 HDF_WIFI_SCAN_FAILED, 38 HDF_WIFI_SCAN_REFUSED, 39 HDF_WIFI_SCAN_TIMEOUT 40 } HdfWifiScanStatus; 41 extern int32_t HdfScanEventCallback(struct net_device *ndev, HdfWifiScanStatus _status); 42 extern int32_t HdfDisconnectedEventCallback(struct net_device *ndev, uint16_t reason, uint8_t *ie, uint32_t len); 43 void WifiScanFree(struct cfg80211_scan_request **request); 44 #endif 45 46