【MTK平台】【wpa_supplicant】关于wpa_supplicant_8/src/p2p/p2p_go_neg.c文件的介绍

本文主要介绍external/wpa_supplicant_8/src/p2p/p2p_go_neg.c文件

 这里主要介绍2个方法

1. p2p_connect_send接受来自 p2p.c 文件中调用p2p_connect方法发送的GON Request帧

2. p2p_process_go_neg_resp处理来自GON Response帧的处理流程

先看下p2p_connect_send方法

int p2p_connect_send(struct p2p_data *p2p, struct p2p_device *dev)
{
	struct wpabuf *req;
	int freq;

	if (dev->flags & P2P_DEV_PD_BEFORE_GO_NEG) {
		u16 config_method;
		p2p_dbg(p2p, "Use PD-before-GO-Neg workaround for " MACSTR,
			MAC2STR(dev->info.p2p_device_addr));
		if (dev->wps_method == WPS_PIN_DISPLAY)
			config_method = WPS_CONFIG_KEYPAD;
		else if (dev->wps_method == WPS_PIN_KEYPAD)
			config_method = WPS_CONFIG_DISPLAY;
		else if (dev->wps_method == WPS_PBC)
			config_method = WPS_CONFIG_PUSHBUTTON;
		else if (dev->wps_method == WPS_P2PS)
			config_method = WPS_CONFIG_P2PS;
		else
			return -1;
		return p2p_prov_disc_req(p2p, d

你可能感兴趣的:(WIFI,p2p,服务器,网络协议)