mac80211.h
Go to the documentation of this file.
00001 /*------------------------------------------------------------------------------
00002  *-------------------------        ATH5K Driver          -----------------------
00003  *------------------------------------------------------------------------------
00004  *                                                           V1.0  08/02/2010
00005  *
00006  *
00007  *  Feb 2010 - Samuel Cabrero <samuelcabrero@gmail.com>
00008  *              Initial release
00009  *
00010  *  ----------------------------------------------------------------------------
00011  *  Copyright (C) 2000-2010, Universidad de Zaragoza, SPAIN
00012  *
00013  *  Autors:
00014  *              Samuel Cabrero        <samuelcabrero@gmail.com>
00015  *              Danilo Tardioli       <dantard@unizar.es>
00016  *              Jose Luis Villarroel  <jlvilla@unizar.es>
00017  *
00018  *  This is a simplified version of the original ath5k driver. It should work 
00019  *  with all Atheros 5xxx WLAN cards. The 802.11 layer have been removed so it
00020  *  just send and receive frames over the air, as if it were an Ethernet bus
00021  *  interface.
00022  *
00023  *  Please read ath5k_interface.h for instructions.
00024  *
00025  *  This program is distributed under the terms of GPL version 2 and in the 
00026  *  hope that it will be useful, but WITHOUT ANY WARRANTY; without even the 
00027  *  implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  
00028  *  See the GNU General Public License for more details.
00029  *
00030  *----------------------------------------------------------------------------*/
00031 
00032 
00033 /*
00034  * mac80211 <-> driver interface
00035  *
00036  * Copyright 2002-2005, Devicescape Software, Inc.
00037  * Copyright 2006-2007  Jiri Benc <jbenc@suse.cz>
00038  * Copyright 2007       Johannes Berg <johannes@sipsolutions.net>
00039  *
00040  * This program is free software; you can redistribute it and/or modify
00041  * it under the terms of the GNU General Public License version 2 as
00042  * published by the Free Software Foundation.
00043  */
00044 
00045 #ifndef MAC80211_H
00046 #define MAC80211_H
00047 
00048 #include "ath5k_linux_layer.h"
00049 #include "ieee80211.h"
00050 #include "ath5k_interface.h"
00051 
00061 enum ieee80211_band {
00062         IEEE80211_BAND_2GHZ,
00063         IEEE80211_BAND_5GHZ,
00064 
00065         /* keep last */
00066         IEEE80211_NUM_BANDS
00067 };
00068 
00079 struct ieee80211_channel {
00080                 enum ieee80211_band band;
00081         u16 center_freq; /* frequency in MHz */
00082         u16 hw_value; /* hw specific value for the channel */
00083 };
00084 
00106 enum ieee80211_rate_flags {
00107         IEEE80211_RATE_SHORT_PREAMBLE   = 1<<0,
00108 //        IEEE80211_RATE_MANDATORY_A      = 1<<1,
00109 //        IEEE80211_RATE_MANDATORY_B      = 1<<2,
00110 //        IEEE80211_RATE_MANDATORY_G      = 1<<3,
00111 //        IEEE80211_RATE_ERP_G            = 1<<4,
00112 };
00113 
00128 struct ieee80211_rate {
00129         u32 flags;
00130         u16 bitrate;
00131         u16 hw_value, hw_value_short;
00132 };
00133 
00134 struct ieee80211_tx_info {
00135         u8 band;
00136         s8 rate_idx;
00137         u8 count;
00138         bool use_short_preamble;
00139         bool wait_for_ack;
00140 };
00141 
00163 struct ieee80211_rx_status {
00164         u64 mactime;
00165         enum ieee80211_band band;
00166         int freq;
00167         int signal;
00168         int noise;
00169         int qual;
00170         int antenna;
00171         int rate_idx;
00172         int flag;
00173 };
00174 
00193 enum nl80211_iftype {
00194         NL80211_IFTYPE_UNSPECIFIED,
00195         NL80211_IFTYPE_ADHOC,
00196         NL80211_IFTYPE_STATION,
00197         NL80211_IFTYPE_AP,
00198         NL80211_IFTYPE_AP_VLAN,
00199         NL80211_IFTYPE_WDS,
00200         NL80211_IFTYPE_MONITOR,
00201         NL80211_IFTYPE_MESH_POINT,
00202 
00203         /* keep last */
00204         __NL80211_IFTYPE_AFTER_LAST,
00205         NL80211_IFTYPE_MAX = __NL80211_IFTYPE_AFTER_LAST - 1
00206 };
00207 
00223 struct ieee80211_supported_band {
00224         struct ieee80211_channel *channels;
00225         struct ieee80211_rate *bitrates;
00226         enum ieee80211_band band;
00227         int n_channels;
00228         int n_bitrates;
00229 };
00230 
00231 struct ieee80211_low_level_stats {
00232         unsigned int dot11ACKFailureCount;
00233         unsigned int dot11RTSFailureCount;
00234         unsigned int dot11FCSErrorCount;
00235         unsigned int dot11RTSSuccessCount;
00236 };
00237 
00248 __le16 ath5k_generic_frame_duration(unsigned int mode,
00249                                                                                 bool short_preamble,
00250                                         size_t frame_len,
00251                                         int rate);
00262 int ath5k_get_hdrlen_from_skb(const struct sk_buff *skb);
00263 
00267 extern int ath5k_frequency_to_channel(int freq);
00268 
00269 
00270 #endif /* MAC80211_H */
00271 


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