2022-06-08 23:46:35 +00:00
|
|
|
/* SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause */
|
|
|
|
/* Copyright(c) 2007 - 2011 Realtek Corporation. */
|
|
|
|
|
2013-05-08 21:45:39 +00:00
|
|
|
#ifndef _RTW_EVENT_H_
|
|
|
|
#define _RTW_EVENT_H_
|
2013-07-21 18:00:05 +00:00
|
|
|
|
2022-06-08 23:46:35 +00:00
|
|
|
#include "osdep_service.h"
|
2013-05-08 21:45:39 +00:00
|
|
|
|
2022-06-08 23:46:35 +00:00
|
|
|
#include "wlan_bssdef.h"
|
2013-05-08 21:45:39 +00:00
|
|
|
#include <linux/semaphore.h>
|
|
|
|
#include <linux/sem.h>
|
|
|
|
|
|
|
|
/*
|
|
|
|
Used to report a bss has been scanned
|
|
|
|
*/
|
|
|
|
struct survey_event {
|
2013-07-24 02:31:04 +00:00
|
|
|
struct 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.
|
|
|
|
|
|
|
|
*/
|
|
|
|
struct surveydone_event {
|
2013-05-19 04:28:07 +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
|
|
|
|
|
|
|
|
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
|
|
|
|
2013-05-08 21:45:39 +00:00
|
|
|
struct stassoc_event {
|
|
|
|
unsigned char macaddr[6];
|
|
|
|
unsigned char rsvd[2];
|
|
|
|
int cam_id;
|
|
|
|
};
|
|
|
|
|
|
|
|
struct stadel_event {
|
2013-08-15 21:11:51 +00:00
|
|
|
unsigned char macaddr[6];
|
|
|
|
unsigned char rsvd[2]; /* for reason */
|
|
|
|
int mac_id;
|
2013-05-08 21:45:39 +00:00
|
|
|
};
|
|
|
|
|
2013-08-15 21:11:51 +00:00
|
|
|
struct addba_event {
|
2013-05-19 04:28:07 +00:00
|
|
|
unsigned int tid;
|
2013-05-08 21:45:39 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
#define GEN_EVT_CODE(event) event ## _EVT_
|
|
|
|
|
|
|
|
struct fwevent {
|
|
|
|
u32 parmsize;
|
2013-07-27 01:08:39 +00:00
|
|
|
void (*event_callback)(struct adapter *dev, u8 *pbuf);
|
2013-05-08 21:45:39 +00:00
|
|
|
};
|
|
|
|
|
2013-05-19 04:28:07 +00:00
|
|
|
#define C2HEVENT_SZ 32
|
2013-05-08 21:45:39 +00:00
|
|
|
|
2013-08-15 21:11:51 +00:00
|
|
|
struct event_node {
|
2013-05-08 21:45:39 +00:00
|
|
|
unsigned char *node;
|
|
|
|
unsigned char evt_code;
|
|
|
|
unsigned short evt_sz;
|
2013-08-15 21:11:51 +00:00
|
|
|
int *caller_ff_tail;
|
2013-05-08 21:45:39 +00:00
|
|
|
int caller_ff_sz;
|
|
|
|
};
|
|
|
|
|
|
|
|
struct c2hevent_queue {
|
2013-08-15 21:11:51 +00:00
|
|
|
int head;
|
|
|
|
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 {
|
2013-08-15 21:11:51 +00:00
|
|
|
int head;
|
|
|
|
int tail;
|
2013-07-24 02:31:04 +00:00
|
|
|
struct wlan_bssid_ex networks[NETWORK_QUEUE_SZ];
|
2013-05-08 21:45:39 +00:00
|
|
|
};
|
|
|
|
|
2013-08-12 04:36:23 +00:00
|
|
|
#endif /* _WLANEVENT_H_ */
|