Back to home page

OSCL-LXR

 
 

    


0001 /* SPDX-License-Identifier: GPL-2.0 */
0002 /******************************************************************************
0003  *
0004  * Copyright(c) 2007 - 2010 Realtek Corporation. All rights reserved.
0005  *
0006  * Modifications for inclusion into the Linux staging tree are
0007  * Copyright(c) 2010 Larry Finger. All rights reserved.
0008  *
0009  * Contact information:
0010  * WLAN FAE <wlanfae@realtek.com>
0011  * Larry Finger <Larry.Finger@lwfinger.net>
0012  *
0013  ******************************************************************************/
0014 #ifndef _RTL871x_EVENT_H_
0015 #define _RTL871x_EVENT_H_
0016 
0017 #include "osdep_service.h"
0018 
0019 #include "wlan_bssdef.h"
0020 #include <linux/semaphore.h>
0021 #include <linux/sem.h>
0022 
0023 /*
0024  * Used to report a bss has been scanned
0025  */
0026 struct survey_event {
0027     struct wlan_bssid_ex bss;
0028 };
0029 
0030 /*
0031  * Used to report that the requested site survey has been done.
0032  * bss_cnt indicates the number of bss that has been reported.
0033  */
0034 struct surveydone_event {
0035     unsigned int    bss_cnt;
0036 
0037 };
0038 
0039 /*
0040  * Used to report the link result of joinning the given bss
0041  * join_res:
0042  *  -1: authentication fail
0043  *  -2: association fail
0044  *  > 0: TID
0045  */
0046 struct joinbss_event {
0047     struct  wlan_network    network;
0048 };
0049 
0050 /*
0051  * Used to report a given STA has joinned the created BSS.
0052  * It is used in AP/Ad-HoC(M) mode.
0053  */
0054 struct stassoc_event {
0055     unsigned char macaddr[6];
0056     unsigned char rsvd[2];
0057     __le32    cam_id;
0058 };
0059 
0060 struct stadel_event {
0061     unsigned char macaddr[6];
0062     unsigned char rsvd[2];
0063 };
0064 
0065 struct addba_event {
0066     unsigned int tid;
0067 };
0068 
0069 #define GEN_EVT_CODE(event) event ## _EVT_
0070 
0071 struct fwevent {
0072     u32 parmsize;
0073     void (*event_callback)(struct _adapter *dev, u8 *pbuf);
0074 };
0075 
0076 #define C2HEVENT_SZ         32
0077 struct event_node {
0078     unsigned char *node;
0079     unsigned char evt_code;
0080     unsigned short evt_sz;
0081     /*volatile*/ int *caller_ff_tail;
0082     int caller_ff_sz;
0083 };
0084 
0085 struct c2hevent_queue {
0086     /*volatile*/ int    head;
0087     /*volatile*/ int    tail;
0088     struct  event_node  nodes[C2HEVENT_SZ];
0089     unsigned char   seq;
0090 };
0091 
0092 #define NETWORK_QUEUE_SZ    4
0093 
0094 struct network_queue {
0095     /*volatile*/ int    head;
0096     /*volatile*/ int    tail;
0097     struct wlan_bssid_ex networks[NETWORK_QUEUE_SZ];
0098 };
0099 
0100 struct ADDBA_Req_Report_parm {
0101     unsigned char MacAddress[ETH_ALEN];
0102     unsigned short StartSeqNum;
0103     unsigned char tid;
0104 };
0105 
0106 #include "rtl8712_event.h"
0107 
0108 #endif /* _WLANEVENT_H_ */
0109