linux/drivers/staging/rtl8188eu/include/rtw_event.h
<<
>>
Prefs
   1/******************************************************************************
   2 *
   3 * Copyright(c) 2007 - 2011 Realtek Corporation. All rights reserved.
   4 *
   5 * This program is free software; you can redistribute it and/or modify it
   6 * under the terms of version 2 of the GNU General Public License as
   7 * published by the Free Software Foundation.
   8 *
   9 * This program is distributed in the hope that it will be useful, but WITHOUT
  10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
  12 * more details.
  13 *
  14 * You should have received a copy of the GNU General Public License along with
  15 * this program; if not, write to the Free Software Foundation, Inc.,
  16 * 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA
  17 *
  18 *
  19 ******************************************************************************/
  20#ifndef _RTW_EVENT_H_
  21#define _RTW_EVENT_H_
  22
  23#include <osdep_service.h>
  24
  25#include <wlan_bssdef.h>
  26#include <linux/semaphore.h>
  27#include <linux/sem.h>
  28
  29/*
  30Used to report a bss has been scanned
  31*/
  32struct survey_event     {
  33        struct wlan_bssid_ex bss;
  34};
  35
  36/*
  37Used to report that the requested site survey has been done.
  38
  39bss_cnt indicates the number of bss that has been reported.
  40
  41
  42*/
  43struct surveydone_event {
  44        unsigned int    bss_cnt;
  45
  46};
  47
  48/*
  49Used to report the link result of joinning the given bss
  50
  51
  52join_res:
  53-1: authentication fail
  54-2: association fail
  55> 0: TID
  56
  57*/
  58struct joinbss_event {
  59        struct  wlan_network    network;
  60};
  61
  62/*
  63Used to report a given STA has joinned the created BSS.
  64It is used in AP/Ad-HoC(M) mode.
  65*/
  66
  67struct stassoc_event {
  68        unsigned char macaddr[6];
  69        unsigned char rsvd[2];
  70        int    cam_id;
  71};
  72
  73struct stadel_event {
  74        unsigned char macaddr[6];
  75        unsigned char rsvd[2]; /* for reason */
  76        int mac_id;
  77};
  78
  79struct addba_event {
  80        unsigned int tid;
  81};
  82
  83#define GEN_EVT_CODE(event)     event ## _EVT_
  84
  85struct fwevent {
  86        u32     parmsize;
  87        void (*event_callback)(struct adapter *dev, u8 *pbuf);
  88};
  89
  90#define C2HEVENT_SZ                     32
  91
  92struct event_node {
  93        unsigned char *node;
  94        unsigned char evt_code;
  95        unsigned short evt_sz;
  96        int     *caller_ff_tail;
  97        int     caller_ff_sz;
  98};
  99
 100struct c2hevent_queue {
 101        int     head;
 102        int     tail;
 103        struct  event_node      nodes[C2HEVENT_SZ];
 104        unsigned char   seq;
 105};
 106
 107#define NETWORK_QUEUE_SZ        4
 108
 109struct network_queue {
 110        int     head;
 111        int     tail;
 112        struct wlan_bssid_ex networks[NETWORK_QUEUE_SZ];
 113};
 114
 115#endif /*  _WLANEVENT_H_ */
 116