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


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