forked from ~ljy/RK356X_SDK_RELEASE

hc
2024-05-14 bedbef8ad3e75a304af6361af235302bcc61d06b
kernel/drivers/net/wireless/rockchip_wlan/rkwifi/bcmdhd/wl_escan.h
old mode 100644new mode 100755
....@@ -1,26 +1,25 @@
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>
87 #endif /* WL_WIRELESS_EXT */
98 #include <wl_android_ext.h>
10
-#include <wl_iapsta.h>
9
+#include <wl_iapsta.h>
1110 #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
+
2423 typedef struct wl_scan_info {
2524 bool bcast_ssid;
2625 wlc_ssid_t ssid;
....@@ -28,64 +27,64 @@
2827 int scan_time;
2928 } wl_scan_info_t;
3029
31
-typedef struct wl_escan_info {
32
- struct net_device *dev;
30
+typedef struct wl_escan_info {
31
+ struct net_device *dev;
3332 bool scan_params_v2;
34
- dhd_pub_t *pub;
33
+ dhd_pub_t *pub;
3534 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;
4140 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
+
6362 #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;
6867 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;
7170 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);
7473 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
+
7978 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)
8180 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
8483 int wl_escan_attach(struct net_device *dev);
8584 void wl_escan_detach(struct net_device *dev);
8685 int wl_escan_event_attach(struct net_device *dev, int ifidx);
8786 int wl_escan_event_dettach(struct net_device *dev, int ifidx);
8887 int wl_escan_up(struct net_device *dev);
8988 void wl_escan_down(struct net_device *dev);
90
-
91
-#endif /* _wl_escan_ */
89
+
90
+#endif /* _wl_escan_ */