old mode 100644new mode 100755.. | .. |
---|
1 | | -/* SPDX-License-Identifier: GPL-2.0 */ |
---|
2 | | - |
---|
3 | | -#ifndef _wl_escan_ |
---|
4 | | -#define _wl_escan_ |
---|
5 | | -#include <linuxver.h> |
---|
6 | | -#if defined(WL_WIRELESS_EXT) |
---|
7 | | -#include <wl_iw.h> |
---|
| 1 | +/* SPDX-License-Identifier: GPL-2.0 */
|
---|
| 2 | +#ifndef _wl_escan_
|
---|
| 3 | +#define _wl_escan_
|
---|
| 4 | +#include <linuxver.h>
|
---|
| 5 | +#if defined(WL_WIRELESS_EXT)
|
---|
| 6 | +#include <wl_iw.h>
|
---|
8 | 7 | #endif /* WL_WIRELESS_EXT */ |
---|
9 | 8 | #include <wl_android_ext.h> |
---|
10 | | -#include <wl_iapsta.h> |
---|
| 9 | +#include <wl_iapsta.h>
|
---|
11 | 10 | #include <dhd_config.h> |
---|
12 | | - |
---|
13 | | -#define ESCAN_BUF_SIZE (64 * 1024) |
---|
14 | | - |
---|
15 | | -#define WL_ESCAN_TIMER_INTERVAL_MS 10000 /* Scan timeout */ |
---|
16 | | - |
---|
17 | | -/* donlge escan state */ |
---|
18 | | -enum escan_state { |
---|
19 | | - ESCAN_STATE_DOWN, |
---|
20 | | - ESCAN_STATE_IDLE, |
---|
21 | | - ESCAN_STATE_SCANING |
---|
22 | | -}; |
---|
23 | | - |
---|
| 11 | +
|
---|
| 12 | +#define ESCAN_BUF_SIZE (64 * 1024)
|
---|
| 13 | +
|
---|
| 14 | +#define WL_ESCAN_TIMER_INTERVAL_MS 10000 /* Scan timeout */
|
---|
| 15 | +
|
---|
| 16 | +/* donlge escan state */
|
---|
| 17 | +enum escan_state {
|
---|
| 18 | + ESCAN_STATE_DOWN,
|
---|
| 19 | + ESCAN_STATE_IDLE,
|
---|
| 20 | + ESCAN_STATE_SCANING
|
---|
| 21 | +};
|
---|
| 22 | +
|
---|
24 | 23 | typedef struct wl_scan_info { |
---|
25 | 24 | bool bcast_ssid; |
---|
26 | 25 | wlc_ssid_t ssid; |
---|
.. | .. |
---|
28 | 27 | int scan_time; |
---|
29 | 28 | } wl_scan_info_t; |
---|
30 | 29 | |
---|
31 | | -typedef struct wl_escan_info { |
---|
32 | | - struct net_device *dev; |
---|
| 30 | +typedef struct wl_escan_info {
|
---|
| 31 | + struct net_device *dev;
|
---|
33 | 32 | bool scan_params_v2; |
---|
34 | | - dhd_pub_t *pub; |
---|
| 33 | + dhd_pub_t *pub;
|
---|
35 | 34 | timer_list_compat_t scan_timeout; /* Timer for catch scan event timeout */ |
---|
36 | | - int escan_state; |
---|
37 | | - int ioctl_ver; |
---|
38 | | - u8 escan_buf[ESCAN_BUF_SIZE]; |
---|
39 | | - wl_scan_results_v109_t *bss_list; |
---|
40 | | - u8 *escan_ioctl_buf; |
---|
| 35 | + int escan_state;
|
---|
| 36 | + int ioctl_ver;
|
---|
| 37 | + u8 escan_buf[ESCAN_BUF_SIZE];
|
---|
| 38 | + wl_scan_results_t *bss_list; |
---|
| 39 | + u8 *escan_ioctl_buf;
|
---|
41 | 40 | struct mutex usr_sync; /* maily for up/down synchronization */ |
---|
42 | | - int autochannel; |
---|
43 | | - int best_2g_ch; |
---|
44 | | - int best_5g_ch; |
---|
45 | | - int best_6g_ch; |
---|
46 | | -#if defined(RSSIAVG) |
---|
47 | | - wl_rssi_cache_ctrl_t g_rssi_cache_ctrl; |
---|
48 | | - wl_rssi_cache_ctrl_t g_connected_rssi_cache_ctrl; |
---|
49 | | -#endif |
---|
50 | | -#if defined(BSSCACHE) |
---|
51 | | - wl_bss_cache_ctrl_t g_bss_cache_ctrl; |
---|
52 | | -#endif |
---|
53 | | -} wl_escan_info_t; |
---|
54 | | - |
---|
55 | | -#if defined(WLMESH) |
---|
56 | | -enum mesh_info_id { |
---|
57 | | - MESH_INFO_MASTER_BSSID = 1, |
---|
58 | | - MESH_INFO_MASTER_CHANNEL, |
---|
59 | | - MESH_INFO_HOP_CNT, |
---|
60 | | - MESH_INFO_PEER_BSSID |
---|
61 | | -}; |
---|
62 | | - |
---|
| 41 | + int autochannel;
|
---|
| 42 | + int best_2g_ch;
|
---|
| 43 | + int best_5g_ch;
|
---|
| 44 | + int best_6g_ch;
|
---|
| 45 | +#if defined(RSSIAVG)
|
---|
| 46 | + wl_rssi_cache_ctrl_t g_rssi_cache_ctrl;
|
---|
| 47 | + wl_rssi_cache_ctrl_t g_connected_rssi_cache_ctrl;
|
---|
| 48 | +#endif
|
---|
| 49 | +#if defined(BSSCACHE)
|
---|
| 50 | + wl_bss_cache_ctrl_t g_bss_cache_ctrl;
|
---|
| 51 | +#endif
|
---|
| 52 | +} wl_escan_info_t;
|
---|
| 53 | +
|
---|
| 54 | +#if defined(WLMESH)
|
---|
| 55 | +enum mesh_info_id {
|
---|
| 56 | + MESH_INFO_MASTER_BSSID = 1,
|
---|
| 57 | + MESH_INFO_MASTER_CHANNEL,
|
---|
| 58 | + MESH_INFO_HOP_CNT,
|
---|
| 59 | + MESH_INFO_PEER_BSSID
|
---|
| 60 | +};
|
---|
| 61 | +
|
---|
63 | 62 | #define MAX_HOP_LIST 10 |
---|
64 | | -typedef struct wl_mesh_params { |
---|
65 | | - struct ether_addr master_bssid; |
---|
66 | | - uint16 master_channel; |
---|
67 | | - uint hop_cnt; |
---|
| 63 | +typedef struct wl_mesh_params {
|
---|
| 64 | + struct ether_addr master_bssid;
|
---|
| 65 | + uint16 master_channel;
|
---|
| 66 | + uint hop_cnt;
|
---|
68 | 67 | struct ether_addr peer_bssid[MAX_HOP_LIST]; |
---|
69 | | - uint32 scan_channel; |
---|
70 | | -} wl_mesh_params_t; |
---|
| 68 | + uint32 scan_channel;
|
---|
| 69 | +} wl_mesh_params_t;
|
---|
71 | 70 | bool wl_escan_mesh_info(struct net_device *dev, |
---|
72 | | - struct wl_escan_info *escan, struct ether_addr *peer_bssid, |
---|
73 | | - struct wl_mesh_params *mesh_info); |
---|
| 71 | + struct wl_escan_info *escan, struct ether_addr *peer_bssid,
|
---|
| 72 | + struct wl_mesh_params *mesh_info);
|
---|
74 | 73 | bool wl_escan_mesh_peer(struct net_device *dev, |
---|
75 | | - struct wl_escan_info *escan, wlc_ssid_t *cur_ssid, uint16 cur_chan, bool sae, |
---|
76 | | - struct wl_mesh_params *mesh_info); |
---|
77 | | -#endif /* WLMESH */ |
---|
78 | | - |
---|
| 74 | + struct wl_escan_info *escan, wlc_ssid_t *cur_ssid, uint16 cur_chan, bool sae,
|
---|
| 75 | + struct wl_mesh_params *mesh_info);
|
---|
| 76 | +#endif /* WLMESH */
|
---|
| 77 | +
|
---|
79 | 78 | int wl_escan_set_scan(struct net_device *dev, wl_scan_info_t *scan_info); |
---|
80 | | -#if defined(WL_WIRELESS_EXT) |
---|
| 79 | +#if defined(WL_WIRELESS_EXT)
|
---|
81 | 80 | int wl_escan_get_scan(struct net_device *dev, |
---|
82 | | - struct iw_request_info *info, struct iw_point *dwrq, char *extra); |
---|
83 | | -#endif |
---|
| 81 | + struct iw_request_info *info, struct iw_point *dwrq, char *extra);
|
---|
| 82 | +#endif
|
---|
84 | 83 | int wl_escan_attach(struct net_device *dev); |
---|
85 | 84 | void wl_escan_detach(struct net_device *dev); |
---|
86 | 85 | int wl_escan_event_attach(struct net_device *dev, int ifidx); |
---|
87 | 86 | int wl_escan_event_dettach(struct net_device *dev, int ifidx); |
---|
88 | 87 | int wl_escan_up(struct net_device *dev); |
---|
89 | 88 | void wl_escan_down(struct net_device *dev); |
---|
90 | | - |
---|
91 | | -#endif /* _wl_escan_ */ |
---|
| 89 | +
|
---|
| 90 | +#endif /* _wl_escan_ */
|
---|