WiFi连接流程
2022-09-22 09:21:18 0 举报
WiFi Connect流程图
作者其他创作
大纲/内容
1: addOrUpdateNetwork
SupplicantStaNetworkHal
17: wpa_config_add_network
9:startConnectToNetwork
34: do_process_drv_event
接收来自kernel的消息NL80211_CMD_NEW_SCAN_RESULTS
11:connectToNetwork
57:wpa_supplicant_rx_eapol
24:select
33: process_global_event
47:wpas_start_assoc_cb
67: wpa_supplicant_validate_ie
13:addNetwork
设置WPAS的状态为WPA_4WAY_HANDSHAKE
收到MessageA(Ap发给Station)
Settings
45:wpa_supplicant_connect
51:wpa_driver_nl80211_connect
39:wpa_supplicant_get_scan_results
71: wpa_supplicant_pairwise_gtk
向驱动发送NL80211_CMD_GET_SCAN
42: 更新bss
56: wpa_supplicant_set_state
58: wpa_sm_rx_eapol
进入mL2ConnectingState状态机
scan.c
设置WPAS的状态为WPA_ASSOCIATING
50:wpa_driver_nl80211_associate
10:connectToNetwork
wap.c
向驱动发送NL80211_CMD_TRIGGER_SCAN
7: connectNetwork
30: wpa_supplicant_set_state
40:wpa_driver_nl80211_get_scan_results
12:connectToNetwork
73: wpa_driver_nl80211_set_key
7: triggerConnectAndReturnStatus
55:wpa_supplicant_event_associnfo
ClientModeImpl
超时任务触发
38:_wpa_supplicant_event_scan_results
返回wpa_scan_results对象
31: wpa_supplicant_trigger_scan
config.c
16: wpa_config_add_network
44:wpa_supplicant_pick_network
WifiConfigManager
20: wpas_notify_network_added
driver_nl80211_scan
74: wpa_supplicant_install_gtk
32: wpa_driver_nl80211_scan
wpa_supplicant.c
4:addOrUpdateNetworkInternal
41: nl80211_get_scan_results
2: addOrUpdateNetworkInternal
43:wpas_select_network_from_last_scan
22:select
62: wpa_supplicant_send_2_of_4
61: wpa_derive_ptk
向驱动发送NL80211_CMD_CONNECT
WifiNative
WifiServiceImp
65: wpa_supplicant_process_3_of_4
将GTK发送给Kernel
创建StaNetwork,并且回调ISupplicantStaIfaceCallback::onNetworkAdded
kernel
53:wpa_supplicant_event
46:wpa_supplicant_associate
将PTK发送给Kernel
72: wpa_supplicant_install_gtk
CMD_CONNECT_NETWORK
36: wpa_supplicant_event
向WPAS中发送EVENT_ASSOC消息
SupplicantStaIfaceHal
创建Message D 并发送给AP
70: wpa_supplicant_set_state
通过l2_packet接收类型为EAPOL的数据包
5:saveToStore
注册一个超时任务,对应函数为 wpa_supplicant_scan
8:connectToUserSelectNetwork
49:wpa_supplicant_set_state
15:wpa_supplicant_add_network
48:wpa_supplicant_cancel_scan
18: wpa_config_update_prio_list
66: wpa_supplicant_set_state
69: wpa_supplicant_install_ptk
创建Message B 并发送给AP
14:addNetworkInternal
37:wpa_supplicant_event_scan_results
event.c
21: wpa_config_set_network_defaults
设置WPAS的状态为WPA_ASSOCIATED
ISupplicantStaNetwork
接收来自kernel的消息NL80211_CMD_CONNECT
StaNetwork
64: wpa_supplicant_decrypt_key_data
35: send_san_event
driver_nl80211.c
69: wpa_driver_nl80211_set_key
StaIface
ISupplicantStaIface
52:mlme_event_connect
6: enableNetwork
通过radio work回调
59:wpa_supplicant_process_1_of_4
29: wpa_supplicant_scan
25:selectInternal
CMD_START_CONNECT
28: eloop_register_timeout
68: wpa_supplicant_send_4_of_4
向WPAS发送EVENT_SCAN_RESULTS
通过注册callback的方式回调wpa_supplicant中的数据,并且通过WifiMonitor回传给注册监听者
26:wpa_supplicant_select_network
27: wpa_supplicant_req_scan
54:wpa_supplicant_event_assoc
设置WPAS的状态为SCANNING
3: addOrUpdateNetwork
19: wpas_notify_network_added
23:select
60: wpa_supplicant_set_state
准备扫描请求参数wpa_driver_scan_params,包括:1、填充扫描ssid数组2、对频率进行排序3、获取Probe Request所需的information Element4、构建ssid过滤表
63: wpa_supplicant_verify_eapol_key_mic
0 条评论
下一页
为你推荐
查看更多