ath5k_interface.h
Go to the documentation of this file.
00001 #ifndef _ATH5K_INTERFACE_H_
00002 #define _ATH5K_INTERFACE_H_
00003 
00004 #include <stdbool.h>
00005 
00006 /* Private ioctl's */
00007 #define SIO_SEND_PACKET     (SIOCDEVPRIVATE + 0)
00008 #define SIO_RECV_PACKET     (SIOCDEVPRIVATE + 1)
00009 #define SIO_SET_CONFIG      (SIOCDEVPRIVATE + 2)
00010 #define SIO_SET_DEBUG       (SIOCDEVPRIVATE + 3)
00011 #define SIO_SET_RXFILTER    (SIOCDEVPRIVATE + 4)
00012 #define SIO_SET_TXCONTROL   (SIOCDEVPRIVATE + 5)
00013 #define SIO_SET_DISABLEACK          (SIOCDEVPRIVATE + 6)
00014 #define SIO_SET_BSSID                   (SIOCDEVPRIVATE + 7)
00015 #define SIO_SET_BSSIDFILTER             (SIOCDEVPRIVATE + 8)
00016 #define SIO_SET_USE_BEACON_FRAMES       (SIOCDEVPRIVATE + 9)
00017 /*
00018  * Data rates in 100 kbps units
00019  */
00020 enum rates
00021 {
00022         RATE_1M   = 10,         /* Valid for mode B/G */
00023         RATE_2M   = 20,         /* Valid for mode B/G */
00024         RATE_5_5M = 55,         /* Valid for mode B/G */
00025         RATE_11M  = 110,        /* Valid for mode B/G */
00026         RATE_6M   = 60,         /* Valid for mode A */
00027         RATE_9M   = 90,         /* Valid for mode A */
00028         RATE_12M  = 120,        /* Valid for mode A/B/G */
00029         RATE_18M  = 180,        /* Valid for mode A/B/G */
00030         RATE_24M  = 240,        /* Valid for mode A/B/G */
00031         RATE_36M  = 360,        /* Valid for mode A/B/G */
00032         RATE_48M  = 480,        /* Valid for mode A/B/G */
00033         RATE_54M  = 540         /* Valid for mode A/B/G */
00034 };
00035 
00036 enum ath5k_ant_mode {
00037         AR5K_ANTMODE_DEFAULT    = 0,    /* default antenna setup */
00038         AR5K_ANTMODE_FIXED_A    = 1,    /* only antenna A is present */
00039         AR5K_ANTMODE_FIXED_B    = 2,    /* only antenna B is present */
00040         AR5K_ANTMODE_SINGLE_AP  = 3,    /* sta locked on a single ap */
00041         AR5K_ANTMODE_SECTOR_AP  = 4,    /* AP with tx antenna set on tx desc */
00042         AR5K_ANTMODE_SECTOR_STA = 5,    /* STA with tx antenna set on tx desc */
00043         AR5K_ANTMODE_DEBUG      = 6,    /* Debug mode -A -> Rx, B-> Tx- */
00044         AR5K_ANTMODE_MAX,
00045 };
00046 
00047 
00072 enum ath5k_debug_level {
00073         ATH5K_DEBUG_NONE        = 0x00000000,
00074         ATH5K_DEBUG_RESET       = 0x00000001,
00075         ATH5K_DEBUG_INTR        = 0x00000002,
00076         ATH5K_DEBUG_MODE        = 0x00000004,
00077         ATH5K_DEBUG_XMIT        = 0x00000008,
00078         ATH5K_DEBUG_BEACON      = 0x00000010,
00079         ATH5K_DEBUG_CALIBRATE   = 0x00000020,
00080         ATH5K_DEBUG_TXPOWER     = 0x00000040,
00081         ATH5K_DEBUG_LED         = 0x00000080,
00082         ATH5K_DEBUG_DUMP_RX     = 0x00000100,
00083         ATH5K_DEBUG_DUMP_TX     = 0x00000200,
00084         ATH5K_DEBUG_DUMPBANDS   = 0x00000400,
00085         ATH5K_DEBUG_TRACE       = 0x00001000,
00086         ATH5K_DEBUG_ANY         = 0xffffffff
00087 };
00088 
00089 /*
00090  * Interface configuration
00091  *  @freq: Frecuency to use in Mhz units. There are no regulatory domain
00092  *                 restrictions, be carefull about legality. Available frequencies 
00093  *                 depend on chipset.
00094  *  @rate: Data rate used to tx frames in 100 kbps units. Not all rates are valid 
00095  *         for each mode.
00096  *  @tx_power_dbm: Tx power in dBm units. Please read your card specifications,
00097  *                                 you can burn the transmitter. Also note that some hi-power
00098  *                                 cards have a hardware coded offset abobe this value.
00099  *      @antenna_mode: Antenna mode control some things such diversity.
00100  */
00101 struct ath5k_config_info
00102 {
00103         unsigned short frequency;
00104         enum rates rate;
00105         unsigned char tx_power_dbm;
00106         enum ath5k_ant_mode antenna_mode;
00107 };
00108 
00109 /* 
00110  * Hardware RX filter configuration.
00111  *      @broadcast: Allow broadcast frames.
00112  *      @control: Allow control frames.
00113  *      @promisc: Pomiscuous mode.
00114  */
00115 struct ath5k_rxfilter_info
00116 {
00117         bool broadcast;
00118         bool control;
00119         bool promisc;
00120 };
00121 
00122 /* 
00123  * TX parameters configuration.
00124  *      @count: if wait_for_ack is enabled the frames are transmitted up to count +
00125  *              AR5K_TUNE_HWTXTRIES in the case that ack won't be received. Minimun
00126  *              value is 1.
00127  *      @wait_for_ack: Wait for ack after TX a frame. Be careful when sending broadcast 
00128  *                     frames becouse the receptor won't send ACK.
00129  *      @use_short_preamble: Use short preamble if it is available for the current
00130  *                           data rate.
00131  */
00132 struct ath5k_txcontrol_info
00133 {
00134         unsigned char count;
00135         bool wait_for_ack;
00136         bool use_short_preamble;
00137 };
00138 
00139 /*
00140  * Ioctl data.
00141  *  @debug_level: Configure debug level (values defined in debug.h).
00142  *  @disable_ack: Disable the ACK sending when a unicast frame is received.
00143  */
00144 union ath5k_ioctl_info
00145 {
00146         unsigned int debug_level;
00147         struct ath5k_config_info config_info;
00148         struct ath5k_rxfilter_info rxfilter_info;
00149         struct ath5k_txcontrol_info txcontrol_info;
00150         bool disable_ack;
00151 };
00152 
00153 #endif


ros_rt_wmp
Author(s): Danilo Tardioli, dantard@unizar.es
autogenerated on Mon Oct 6 2014 08:27:09