2019-04-22 11:31:01 +00:00
|
|
|
/* SPDX-License-Identifier: GPL-2.0 */
|
|
|
|
/* Copyright(c) 2007 - 2016 Realtek Corporation. All rights reserved. */
|
|
|
|
|
2013-05-08 21:45:39 +00:00
|
|
|
#ifndef _RTW_EVENT_H_
|
|
|
|
#define _RTW_EVENT_H_
|
2014-12-11 21:15:04 +00:00
|
|
|
|
|
|
|
#ifdef CONFIG_H2CLBK
|
2018-10-15 00:07:45 +00:00
|
|
|
#include <h2clbk.h>
|
2014-12-11 21:15:04 +00:00
|
|
|
#endif
|
2013-05-08 21:45:39 +00:00
|
|
|
|
|
|
|
/*
|
|
|
|
Used to report a bss has been scanned
|
2014-12-11 21:15:04 +00:00
|
|
|
|
2013-05-08 21:45:39 +00:00
|
|
|
*/
|
|
|
|
struct survey_event {
|
2018-10-15 00:07:45 +00:00
|
|
|
WLAN_BSSID_EX bss;
|
2013-05-08 21:45:39 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
/*
|
|
|
|
Used to report that the requested site survey has been done.
|
|
|
|
|
|
|
|
bss_cnt indicates the number of bss that has been reported.
|
|
|
|
|
2014-12-11 21:15:04 +00:00
|
|
|
|
2013-05-08 21:45:39 +00:00
|
|
|
*/
|
|
|
|
struct surveydone_event {
|
2014-12-19 06:59:46 +00:00
|
|
|
unsigned int bss_cnt;
|
|
|
|
|
2013-05-08 21:45:39 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
/*
|
|
|
|
Used to report the link result of joinning the given bss
|
|
|
|
|
2014-12-11 21:15:04 +00:00
|
|
|
|
2013-05-08 21:45:39 +00:00
|
|
|
join_res:
|
|
|
|
-1: authentication fail
|
|
|
|
-2: association fail
|
|
|
|
> 0: TID
|
|
|
|
|
|
|
|
*/
|
|
|
|
struct joinbss_event {
|
|
|
|
struct wlan_network network;
|
|
|
|
};
|
|
|
|
|
|
|
|
/*
|
|
|
|
Used to report a given STA has joinned the created BSS.
|
|
|
|
It is used in AP/Ad-HoC(M) mode.
|
2013-08-15 21:11:51 +00:00
|
|
|
|
2014-12-11 21:15:04 +00:00
|
|
|
|
|
|
|
*/
|
2013-05-08 21:45:39 +00:00
|
|
|
struct stassoc_event {
|
|
|
|
unsigned char macaddr[6];
|
|
|
|
};
|
|
|
|
|
|
|
|
struct stadel_event {
|
2018-10-15 00:07:45 +00:00
|
|
|
unsigned char macaddr[6];
|
|
|
|
unsigned char rsvd[2]; /* for reason */
|
|
|
|
unsigned char locally_generated;
|
|
|
|
int mac_id;
|
2013-05-08 21:45:39 +00:00
|
|
|
};
|
|
|
|
|
2018-10-15 00:07:45 +00:00
|
|
|
struct addba_event {
|
2014-12-19 06:59:46 +00:00
|
|
|
unsigned int tid;
|
2014-12-11 21:15:04 +00:00
|
|
|
};
|
|
|
|
|
2018-10-15 00:07:45 +00:00
|
|
|
struct wmm_event {
|
|
|
|
unsigned char wmm;
|
|
|
|
};
|
2014-12-11 21:15:04 +00:00
|
|
|
|
|
|
|
#ifdef CONFIG_H2CLBK
|
2018-10-15 00:07:45 +00:00
|
|
|
struct c2hlbk_event {
|
2014-12-11 21:15:04 +00:00
|
|
|
unsigned char mac[6];
|
|
|
|
unsigned short s0;
|
|
|
|
unsigned short s1;
|
|
|
|
unsigned int w0;
|
|
|
|
unsigned char b0;
|
|
|
|
unsigned short s2;
|
|
|
|
unsigned char b1;
|
2014-12-19 06:59:46 +00:00
|
|
|
unsigned int w1;
|
2013-05-08 21:45:39 +00:00
|
|
|
};
|
2015-03-16 14:43:53 +00:00
|
|
|
#endif/* CONFIG_H2CLBK */
|
2013-05-08 21:45:39 +00:00
|
|
|
|
|
|
|
#define GEN_EVT_CODE(event) event ## _EVT_
|
|
|
|
|
2014-12-11 21:15:04 +00:00
|
|
|
|
|
|
|
|
2013-05-08 21:45:39 +00:00
|
|
|
struct fwevent {
|
|
|
|
u32 parmsize;
|
2018-10-15 00:07:45 +00:00
|
|
|
void (*event_callback)(_adapter *dev, u8 *pbuf);
|
2013-05-08 21:45:39 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
|
2014-12-19 06:59:46 +00:00
|
|
|
#define C2HEVENT_SZ 32
|
2014-12-11 21:15:04 +00:00
|
|
|
|
2018-10-15 00:07:45 +00:00
|
|
|
struct event_node {
|
2013-05-08 21:45:39 +00:00
|
|
|
unsigned char *node;
|
|
|
|
unsigned char evt_code;
|
|
|
|
unsigned short evt_sz;
|
2014-12-11 21:15:04 +00:00
|
|
|
volatile int *caller_ff_tail;
|
2013-05-08 21:45:39 +00:00
|
|
|
int caller_ff_sz;
|
|
|
|
};
|
|
|
|
|
|
|
|
struct c2hevent_queue {
|
2014-12-11 21:15:04 +00:00
|
|
|
volatile int head;
|
|
|
|
volatile int tail;
|
2013-05-08 21:45:39 +00:00
|
|
|
struct event_node nodes[C2HEVENT_SZ];
|
|
|
|
unsigned char seq;
|
|
|
|
};
|
|
|
|
|
|
|
|
#define NETWORK_QUEUE_SZ 4
|
|
|
|
|
|
|
|
struct network_queue {
|
2014-12-11 21:15:04 +00:00
|
|
|
volatile int head;
|
|
|
|
volatile int tail;
|
2018-10-15 00:07:45 +00:00
|
|
|
WLAN_BSSID_EX networks[NETWORK_QUEUE_SZ];
|
2013-05-08 21:45:39 +00:00
|
|
|
};
|
|
|
|
|
2014-12-11 21:15:04 +00:00
|
|
|
|
2018-10-15 00:07:45 +00:00
|
|
|
#endif /* _WLANEVENT_H_ */
|