root/drivers/staging/rtl8188eu/include/drv_types.h

/* [<][>][^][v][top][bottom][index][help] */

INCLUDED FROM


DEFINITIONS

This source file includes following definitions.
  1. dvobj_to_dev
  2. myid

   1 /* SPDX-License-Identifier: GPL-2.0 */
   2 /******************************************************************************
   3  *
   4  * Copyright(c) 2007 - 2012 Realtek Corporation. All rights reserved.
   5  *
   6  ******************************************************************************/
   7 /*-----------------------------------------------------------------------------
   8 
   9         For type defines and data structure defines
  10 
  11 ------------------------------------------------------------------------------*/
  12 
  13 
  14 #ifndef __DRV_TYPES_H__
  15 #define __DRV_TYPES_H__
  16 
  17 #define DRV_NAME "r8188eu"
  18 
  19 #include <osdep_service.h>
  20 #include <wlan_bssdef.h>
  21 #include <rtw_ht.h>
  22 #include <rtw_cmd.h>
  23 #include <rtw_xmit.h>
  24 #include <rtw_recv.h>
  25 #include <hal_intf.h>
  26 #include <hal_com.h>
  27 #include <rtw_security.h>
  28 #include <rtw_pwrctrl.h>
  29 #include <rtw_eeprom.h>
  30 #include <sta_info.h>
  31 
  32 struct qos_priv {
  33         /* bit mask option: u-apsd, s-apsd, ts, block ack... */
  34         unsigned int qos_option;
  35 };
  36 
  37 #include <rtw_mlme.h>
  38 #include <rtw_debug.h>
  39 #include <rtw_rf.h>
  40 #include <rtw_event.h>
  41 #include <rtw_led.h>
  42 #include <rtw_mlme_ext.h>
  43 #include <rtw_ap.h>
  44 
  45 #define SPEC_DEV_ID_NONE                BIT(0)
  46 #define SPEC_DEV_ID_DISABLE_HT          BIT(1)
  47 #define SPEC_DEV_ID_ENABLE_PS           BIT(2)
  48 #define SPEC_DEV_ID_RF_CONFIG_1T1R      BIT(3)
  49 #define SPEC_DEV_ID_RF_CONFIG_2T2R      BIT(4)
  50 #define SPEC_DEV_ID_ASSIGN_IFNAME       BIT(5)
  51 
  52 struct registry_priv {
  53         struct ndis_802_11_ssid ssid;
  54         u8      channel;/* ad-hoc support requirement */
  55         u8      wireless_mode;/* A, B, G, auto */
  56         u8      preamble;/* long, short, auto */
  57         u8      vrtl_carrier_sense;/* Enable, Disable, Auto */
  58         u8      vcs_type;/* RTS/CTS, CTS-to-self */
  59         u16     rts_thresh;
  60         u16     frag_thresh;
  61         u8      power_mgnt;
  62         u8      ips_mode;
  63         u8      smart_ps;
  64         u8      mp_mode;
  65         u8      acm_method;
  66           /* UAPSD */
  67         u8      wmm_enable;
  68         u8      uapsd_enable;
  69 
  70         struct wlan_bssid_ex    dev_network;
  71 
  72         u8      ht_enable;
  73         u8      cbw40_enable;
  74         u8      ampdu_enable;/* for tx */
  75         u8      rx_stbc;
  76         u8      ampdu_amsdu;/* A-MPDU Supports A-MSDU is permitted */
  77 
  78         u8      wifi_spec;/*  !turbo_mode */
  79 
  80         u8      channel_plan;
  81         bool    accept_addba_req; /* true = accept AP's Add BA req */
  82 
  83         u8      antdiv_cfg;
  84         u8      antdiv_type;
  85 
  86         u8      usbss_enable;/* 0:disable,1:enable */
  87         u8      hwpdn_mode;/* 0:disable,1:enable,2:decide by EFUSE config */
  88 
  89         u8      max_roaming_times; /*  the max number driver will try */
  90 
  91         u8      fw_iol; /* enable iol without other concern */
  92 
  93         u8      enable80211d;
  94 
  95         u8      ifname[16];
  96         u8      if2name[16];
  97 
  98         u8      notch_filter;
  99         bool    monitor_enable;
 100 };
 101 
 102 #define MAX_CONTINUAL_URB_ERR           4
 103 
 104 struct dvobj_priv {
 105         struct adapter *if1;
 106         /* For 92D, DMDP have 2 interface. */
 107         u8      InterfaceNumber;
 108         u8      NumInterfaces;
 109 
 110         /* In /Out Pipe information */
 111         int     RtInPipe[2];
 112         int     RtOutPipe[3];
 113         u8      Queue2Pipe[HW_QUEUE_ENTRY];/* for out pipe mapping */
 114 
 115 /*-------- below is for USB INTERFACE --------*/
 116         u8      ishighspeed;
 117         u8      RtNumInPipes;
 118         u8      RtNumOutPipes;
 119         struct mutex  usb_vendor_req_mutex;
 120 
 121         struct usb_interface *pusbintf;
 122         struct usb_device *pusbdev;
 123 };
 124 
 125 static inline struct device *dvobj_to_dev(struct dvobj_priv *dvobj)
 126 {
 127         /* todo: get interface type from dvobj and the return
 128          * the dev accordingly
 129          */
 130         return &dvobj->pusbintf->dev;
 131 };
 132 
 133 struct adapter {
 134         struct dvobj_priv *dvobj;
 135         struct  mlme_priv mlmepriv;
 136         struct  mlme_ext_priv mlmeextpriv;
 137         struct  cmd_priv        cmdpriv;
 138         struct  xmit_priv       xmitpriv;
 139         struct  recv_priv       recvpriv;
 140         struct  sta_priv        stapriv;
 141         struct  security_priv   securitypriv;
 142         struct  registry_priv   registrypriv;
 143         struct  pwrctrl_priv    pwrctrlpriv;
 144         struct  eeprom_priv eeprompriv;
 145         struct  led_priv        ledpriv;
 146 
 147         struct hal_data_8188e *HalData;
 148 
 149         s32     bDriverStopped;
 150         s32     bSurpriseRemoved;
 151 
 152         u8      hw_init_completed;
 153 
 154         void *cmdThread;
 155         struct  net_device *pnetdev;
 156         struct  net_device *pmondev;
 157 
 158         int bup;
 159         struct net_device_stats stats;
 160         struct iw_statistics iwstats;
 161         struct proc_dir_entry *dir_dev;/*  for proc directory */
 162 
 163         int net_closed;
 164         u8 bFWReady;
 165         u8 bReadPortCancel;
 166         u8 bWritePortCancel;
 167 
 168         struct mutex hw_init_mutex;
 169 };
 170 
 171 #define adapter_to_dvobj(adapter) (adapter->dvobj)
 172 
 173 static inline u8 *myid(struct eeprom_priv *peepriv)
 174 {
 175         return peepriv->mac_addr;
 176 }
 177 
 178 #endif /* __DRV_TYPES_H__ */

/* [<][>][^][v][top][bottom][index][help] */