linux/drivers/staging/r8188eu/include/rtw_event.h
<<
>>
Prefs
   1/* SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause */
   2/* Copyright(c) 2007 - 2011 Realtek Corporation. */
   3
   4#ifndef _RTW_EVENT_H_
   5#define _RTW_EVENT_H_
   6
   7#include "osdep_service.h"
   8
   9#include "wlan_bssdef.h"
  10#include <linux/semaphore.h>
  11#include <linux/sem.h>
  12
  13/*
  14Used to report a bss has been scanned
  15*/
  16struct survey_event     {
  17        struct wlan_bssid_ex bss;
  18};
  19
  20/*
  21Used to report that the requested site survey has been done.
  22
  23bss_cnt indicates the number of bss that has been reported.
  24
  25*/
  26struct surveydone_event {
  27        unsigned int    bss_cnt;
  28
  29};
  30
  31/*
  32Used to report the link result of joinning the given bss
  33
  34join_res:
  35-1: authentication fail
  36-2: association fail
  37> 0: TID
  38
  39*/
  40struct joinbss_event {
  41        struct  wlan_network    network;
  42};
  43
  44/*
  45Used to report a given STA has joinned the created BSS.
  46It is used in AP/Ad-HoC(M) mode.
  47*/
  48
  49struct stassoc_event {
  50        unsigned char macaddr[6];
  51        unsigned char rsvd[2];
  52        int    cam_id;
  53};
  54
  55struct stadel_event {
  56        unsigned char macaddr[6];
  57        unsigned char rsvd[2]; /* for reason */
  58        int mac_id;
  59};
  60
  61struct addba_event {
  62        unsigned int tid;
  63};
  64
  65#define GEN_EVT_CODE(event)     event ## _EVT_
  66
  67struct fwevent {
  68        u32     parmsize;
  69        void (*event_callback)(struct adapter *dev, u8 *pbuf);
  70};
  71
  72#define C2HEVENT_SZ                     32
  73
  74struct event_node {
  75        unsigned char *node;
  76        unsigned char evt_code;
  77        unsigned short evt_sz;
  78        int     *caller_ff_tail;
  79        int     caller_ff_sz;
  80};
  81
  82struct c2hevent_queue {
  83        int     head;
  84        int     tail;
  85        struct  event_node      nodes[C2HEVENT_SZ];
  86        unsigned char   seq;
  87};
  88
  89#define NETWORK_QUEUE_SZ        4
  90
  91struct network_queue {
  92        int     head;
  93        int     tail;
  94        struct wlan_bssid_ex networks[NETWORK_QUEUE_SZ];
  95};
  96
  97#endif /*  _WLANEVENT_H_ */
  98