1/*
2 * WPS AP
3 *
4 * Copyright (C) 2013, Broadcom Corporation
5 * All Rights Reserved.
6 *
7 * This is UNPUBLISHED PROPRIETARY SOURCE CODE of Broadcom Corporation;
8 * the contents of this file may not be disclosed to third parties, copied
9 * or duplicated in any form, in whole or in part, without the prior
10 * written permission of Broadcom Corporation.
11 *
12 * $Id: wps_ap.h 295985 2011-11-13 02:57:31Z $
13 */
14
15#ifndef __WPS_AP_H__
16#define __WPS_AP_H__
17
18
19#define WPS_OVERALL_TIMEOUT	140 /* 120 + 20 for VISTA testing tolerance */
20#define WPS_MSG_TIMEOUT	30
21
22#ifndef IFNAMSIZ
23#define IFNAMSIZ 16
24#endif
25
26typedef struct {
27	int sc_mode;
28	int ess_id;
29	char ifname[IFNAMSIZ];
30	unsigned char mac_ap[6];
31	unsigned char mac_sta[6];
32	unsigned char *pre_nonce;
33	unsigned char *pre_privkey;
34
35	bool config_state;
36
37	void *mc;			/* state machine context */
38
39	unsigned long pkt_count;
40	unsigned long pkt_count_prv;
41
42	int wps_state;			/* state machine operating state */
43	unsigned long start_time;	/* workspace init time */
44	unsigned long touch_time;	/* workspace latest operating time */
45
46	int return_code;
47
48	/* WSC 2.0 */
49	bool b_wps_version2;
50	bool b_reqToEnroll;
51	bool b_nwKeyShareable;
52	uint32 authorizedMacs_len;
53	uint8 authorizedMacs[SIZE_MAC_ADDR * SIZE_AUTHORIZEDMACS_NUM];
54	int eap_frag_threshold;
55} wpsap_wksp_t;
56
57/*
58 * implemented in wps_ap.c
59 */
60uint32 wpsap_osl_eapol_send_data(char *dataBuffer, uint32 dataLen);
61char* wpsap_osl_eapol_parse_msg(char *msg, int msg_len, int *len);
62
63
64#endif /* __WPS_AP_H__ */
65