#include <linux/version.h>
#include <linux/module.h>
#include <linux/delay.h>
#include <linux/if.h>
#include <linux/netdevice.h>
#include <linux/cache.h>
#include <linux/pci.h>
#include <linux/ethtool.h>
#include <linux/uaccess.h>
#include <linux/if_arp.h>
#include <linux/etherdevice.h>
#include <asm/unaligned.h>
#include "base.h"
#include "reg.h"
#include "debug.h"
#include <linux/semaphore.h>
#include <linux/spinlock.h>
Go to the source code of this file.
Classes | |
struct | rx_queue |
Defines | |
#define | ieee80211chan2mhz(x) |
Functions | |
static int | ath5k_attach (struct ath5k_softc *sc) |
static const char * | ath5k_chip_name (enum ath5k_srev_type type, u_int16_t val) |
static int | ath5k_close (struct net_device *netdev) |
static int | ath5k_config (struct ath5k_softc *sc, unsigned short channel, enum rates rate, unsigned char power, enum ath5k_ant_mode antenna_mode) |
static int | ath5k_config_disable_ack (struct ath5k_softc *sc, bool disable) |
static void | ath5k_config_filter (struct ath5k_softc *sc, bool broadcast, bool control, bool promisc) |
static int | ath5k_config_tx_control (struct ath5k_softc *sc, unsigned char count, bool wait_for_ack, bool use_short_preamble) |
static unsigned int | ath5k_copy_channels (struct ath5k_hw *ah, struct ieee80211_channel *channels, unsigned int mode, unsigned int max) |
static int | ath5k_desc_alloc (struct ath5k_softc *sc, struct pci_dev *pdev) |
static void | ath5k_desc_free (struct ath5k_softc *sc, struct pci_dev *pdev) |
static void | ath5k_detach (struct pci_dev *pdev, struct ath5k_softc *sc) |
static struct ieee80211_channel * | ath5k_get_channel (struct ath5k_softc *sc, unsigned int freq) |
static int | ath5k_get_rate_idx (struct ath5k_softc *sc, enum ieee80211_band band, enum rates rate) |
static short | ath5k_ieee2mhz (short chan) |
static int | ath5k_init (struct ath5k_softc *sc) |
static irqreturn_t | ath5k_intr (int irq, void *dev_id) |
static int | ath5k_ioctl (struct net_device *dev, struct ifreq *ifr, int cmd) |
static bool | ath5k_is_standard_channel (short chan) |
static void | ath5k_mode_setup (struct ath5k_softc *sc) |
static int | ath5k_open (struct net_device *netdev) |
static int __devinit | ath5k_pci_probe (struct pci_dev *pdev, const struct pci_device_id *id) |
static void __devexit | ath5k_pci_remove (struct pci_dev *pdev) |
static int | ath5k_reset (struct ath5k_softc *sc, struct ieee80211_channel *chan) |
static int | ath5k_reset_wake (struct ath5k_softc *sc) |
int | ath5k_rx (struct sk_buff **skb) |
static void | ath5k_rx_done (struct ath5k_softc *sc) |
static struct sk_buff * | ath5k_rx_skb_alloc (struct ath5k_softc *sc, dma_addr_t *skb_addr) |
static int | ath5k_rx_start (struct ath5k_softc *sc) |
static void | ath5k_rx_stop (struct ath5k_softc *sc) |
int | ath5k_rx_timeout (struct sk_buff **skb, int timeout) |
static void | ath5k_rxbuf_free (struct ath5k_softc *sc, struct ath5k_buf *bf) |
static int | ath5k_rxbuf_setup (struct ath5k_softc *sc, struct ath5k_buf *bf) |
static int | ath5k_setup_bands (struct ath5k_softc *sc) |
static int | ath5k_start (struct ath5k_softc *sc) |
static void | ath5k_stop (struct ath5k_softc *sc) |
static int | ath5k_stop_hw (struct ath5k_softc *sc) |
static int | ath5k_stop_locked (struct ath5k_softc *sc) |
static void | ath5k_tasklet_reset (unsigned long data) |
static int | ath5k_tx (struct sk_buff *skb, struct net_device *netdev) |
static void | ath5k_tx_done (struct ath5k_softc *sc, struct ath5k_txq *txq) |
static void | ath5k_txbuf_free (struct ath5k_softc *sc, struct ath5k_buf *bf) |
static int | ath5k_txbuf_setup (struct ath5k_softc *sc, struct ath5k_buf *bf) |
static void | ath5k_txq_cleanup (struct ath5k_softc *sc) |
static void | ath5k_txq_drainq (struct ath5k_softc *sc, struct ath5k_txq *txq) |
static void | ath5k_txq_release (struct ath5k_softc *sc) |
static struct ath5k_txq * | ath5k_txq_setup (struct ath5k_softc *sc, int qtype, int subtype) |
int | conf_ath5k (struct net_device *netdev, union ath5k_ioctl_info *info, int cmd) |
static struct sk_buff * | dequeue_rx_queue (struct rx_queue *q, long timeout) |
static void | enqueue_rx_queue (struct rx_queue *q, struct sk_buff *skb) |
static void __exit | exit_ath5k_pci (void) |
EXPORT_SYMBOL (get_ath5k_slave_dev) | |
EXPORT_SYMBOL (ath5k_rx) | |
EXPORT_SYMBOL (ath5k_rx_timeout) | |
EXPORT_SYMBOL (unlock_rx_sem) | |
EXPORT_SYMBOL (conf_ath5k) | |
void | get_ath5k_slave_dev (struct net_device **netdev) |
static int | ieee80211_copy_snap (u8 *data, unsigned short h_proto) |
static int __init | init_ath5k_pci (void) |
static void | init_rx_queue (struct rx_queue *q) |
MODULE_AUTHOR ("Jiri Slaby") | |
MODULE_AUTHOR ("Nick Kossifidis") | |
MODULE_AUTHOR ("Samuel Cabrero") | |
MODULE_DESCRIPTION ("Modified version of the ath5k driver for use with RT-WMP protocol.") | |
module_exit (exit_ath5k_pci) | |
module_init (init_ath5k_pci) | |
MODULE_LICENSE ("Dual BSD/GPL") | |
MODULE_SUPPORTED_DEVICE ("Atheros 5xxx WLAN cards") | |
MODULE_VERSION ("0.6.0 (EXPERIMENTAL)") | |
static void | purge_rx_queue (struct rx_queue *q) |
void | unlock_rx_sem (void) |
Variables | |
static u8 | ath5k_calinterval = 10 |
static struct net_device_ops | ath5k_netdev_ops |
static struct pci_driver | ath5k_pci_driver |
static struct pci_device_id | ath5k_pci_id_table [] |
static struct ieee80211_rate | ath5k_rates [] |
static struct net_device * | ath5k_slave_dev = NULL |
static int | modparam_all_channels = true |
static u8 | P802_1H_OUI [P80211_OUI_LEN] = { 0x00, 0x00, 0xf8 } |
static u8 | RFC1042_OUI [P80211_OUI_LEN] = { 0x00, 0x00, 0x00 } |
static struct rx_queue | rx_rtwmp_queue |
static struct ath5k_srev_name | srev_names [] |
static int | use_beacon_frames = 0 |
#define ieee80211chan2mhz | ( | x | ) |
(((x) <= 14) ? \ (((x) == 14) ? 2484 : ((x) * 5) + 2407) : \ ((x) + 1000) * 5)
Definition at line 943 of file linux_ks/hwi/ath5k_raw/module/base.c.
static int ath5k_attach | ( | struct ath5k_softc * | sc | ) | [static] |
Definition at line 841 of file linux_ks/hwi/ath5k_raw/module/base.c.
static const char* ath5k_chip_name | ( | enum ath5k_srev_type | type, |
u_int16_t | val | ||
) | [static] |
Definition at line 482 of file linux_ks/hwi/ath5k_raw/module/base.c.
static int ath5k_close | ( | struct net_device * | netdev | ) | [static] |
Definition at line 822 of file linux_ks/hwi/ath5k_raw/module/base.c.
static int ath5k_config | ( | struct ath5k_softc * | sc, |
unsigned short | channel, | ||
enum rates | rate, | ||
unsigned char | power, | ||
enum ath5k_ant_mode | antenna_mode | ||
) | [static] |
Definition at line 2447 of file linux_ks/hwi/ath5k_raw/module/base.c.
static int ath5k_config_disable_ack | ( | struct ath5k_softc * | sc, |
bool | disable | ||
) | [static] |
Definition at line 2427 of file linux_ks/hwi/ath5k_raw/module/base.c.
static void ath5k_config_filter | ( | struct ath5k_softc * | sc, |
bool | broadcast, | ||
bool | control, | ||
bool | promisc | ||
) | [static] |
Definition at line 2315 of file linux_ks/hwi/ath5k_raw/module/base.c.
static int ath5k_config_tx_control | ( | struct ath5k_softc * | sc, |
unsigned char | count, | ||
bool | wait_for_ack, | ||
bool | use_short_preamble | ||
) | [static] |
Definition at line 2403 of file linux_ks/hwi/ath5k_raw/module/base.c.
static unsigned int ath5k_copy_channels | ( | struct ath5k_hw * | ah, |
struct ieee80211_channel * | channels, | ||
unsigned int | mode, | ||
unsigned int | max | ||
) | [static] |
Definition at line 975 of file linux_ks/hwi/ath5k_raw/module/base.c.
static int ath5k_desc_alloc | ( | struct ath5k_softc * | sc, |
struct pci_dev * | pdev | ||
) | [static] |
Definition at line 1300 of file linux_ks/hwi/ath5k_raw/module/base.c.
static void ath5k_desc_free | ( | struct ath5k_softc * | sc, |
struct pci_dev * | pdev | ||
) | [static] |
Definition at line 1356 of file linux_ks/hwi/ath5k_raw/module/base.c.
static void ath5k_detach | ( | struct pci_dev * | pdev, |
struct ath5k_softc * | sc | ||
) | [static] |
Definition at line 915 of file linux_ks/hwi/ath5k_raw/module/base.c.
static struct ieee80211_channel * ath5k_get_channel | ( | struct ath5k_softc * | sc, |
unsigned int | freq | ||
) | [static, read] |
Definition at line 2351 of file linux_ks/hwi/ath5k_raw/module/base.c.
static int ath5k_get_rate_idx | ( | struct ath5k_softc * | sc, |
enum ieee80211_band | band, | ||
enum rates | rate | ||
) | [static] |
Definition at line 2378 of file linux_ks/hwi/ath5k_raw/module/base.c.
static short ath5k_ieee2mhz | ( | short | chan | ) | [inline, static] |
Definition at line 952 of file linux_ks/hwi/ath5k_raw/module/base.c.
static int ath5k_init | ( | struct ath5k_softc * | sc | ) | [static] |
Definition at line 1857 of file linux_ks/hwi/ath5k_raw/module/base.c.
static irqreturn_t ath5k_intr | ( | int | irq, |
void * | dev_id | ||
) | [static] |
Definition at line 1986 of file linux_ks/hwi/ath5k_raw/module/base.c.
static int ath5k_ioctl | ( | struct net_device * | dev, |
struct ifreq * | ifr, | ||
int | cmd | ||
) | [static] |
Definition at line 2514 of file linux_ks/hwi/ath5k_raw/module/base.c.
static bool ath5k_is_standard_channel | ( | short | chan | ) | [static] |
Definition at line 963 of file linux_ks/hwi/ath5k_raw/module/base.c.
static void ath5k_mode_setup | ( | struct ath5k_softc * | sc | ) | [static] |
Definition at line 1116 of file linux_ks/hwi/ath5k_raw/module/base.c.
static int ath5k_open | ( | struct net_device * | netdev | ) | [static] |
Definition at line 794 of file linux_ks/hwi/ath5k_raw/module/base.c.
static int __devinit ath5k_pci_probe | ( | struct pci_dev * | pdev, |
const struct pci_device_id * | id | ||
) | [static] |
Definition at line 504 of file linux_ks/hwi/ath5k_raw/module/base.c.
static void __devexit ath5k_pci_remove | ( | struct pci_dev * | pdev | ) | [static] |
Definition at line 774 of file linux_ks/hwi/ath5k_raw/module/base.c.
static int ath5k_reset | ( | struct ath5k_softc * | sc, |
struct ieee80211_channel * | chan | ||
) | [static] |
Definition at line 2258 of file linux_ks/hwi/ath5k_raw/module/base.c.
static int ath5k_reset_wake | ( | struct ath5k_softc * | sc | ) | [static] |
Definition at line 2294 of file linux_ks/hwi/ath5k_raw/module/base.c.
Attempts to dequeue a RT-WMP packet from the reception queue. If the queue is empty, the task will be put to sleep until there is a packet to be dequeued or until it is interrupted. On a successful reception, the function returns the packet length. If no packet has been dequeued, the return value is 0.
Definition at line 2662 of file linux_ks/hwi/ath5k_raw/module/base.c.
static void ath5k_rx_done | ( | struct ath5k_softc * | sc | ) | [static] |
Definition at line 1590 of file linux_ks/hwi/ath5k_raw/module/base.c.
static struct sk_buff* ath5k_rx_skb_alloc | ( | struct ath5k_softc * | sc, |
dma_addr_t * | skb_addr | ||
) | [static, read] |
Definition at line 1140 of file linux_ks/hwi/ath5k_raw/module/base.c.
static int ath5k_rx_start | ( | struct ath5k_softc * | sc | ) | [static] |
Definition at line 1525 of file linux_ks/hwi/ath5k_raw/module/base.c.
static void ath5k_rx_stop | ( | struct ath5k_softc * | sc | ) | [static] |
Definition at line 1562 of file linux_ks/hwi/ath5k_raw/module/base.c.
int ath5k_rx_timeout | ( | struct sk_buff ** | skb, |
int | timeout | ||
) |
Attempts to dequeue a RT-WMP packet from the reception queue. If the queue is empty, the task will be put to sleep until there is a packet to be dequeued or until at least 'timeout' milliseconds have passed. On a successful reception, the function returns the packet length. If no packet has been dequeued, the return value is 0.
Definition at line 2683 of file linux_ks/hwi/ath5k_raw/module/base.c.
static void ath5k_rxbuf_free | ( | struct ath5k_softc * | sc, |
struct ath5k_buf * | bf | ||
) | [inline, static] |
Definition at line 286 of file linux_ks/hwi/ath5k_raw/module/base.c.
static int ath5k_rxbuf_setup | ( | struct ath5k_softc * | sc, |
struct ath5k_buf * | bf | ||
) | [static] |
Definition at line 1180 of file linux_ks/hwi/ath5k_raw/module/base.c.
static int ath5k_setup_bands | ( | struct ath5k_softc * | sc | ) | [static] |
Definition at line 1040 of file linux_ks/hwi/ath5k_raw/module/base.c.
static int ath5k_start | ( | struct ath5k_softc * | sc | ) | [static] |
Definition at line 2305 of file linux_ks/hwi/ath5k_raw/module/base.c.
static void ath5k_stop | ( | struct ath5k_softc * | sc | ) | [static] |
Definition at line 2310 of file linux_ks/hwi/ath5k_raw/module/base.c.
static int ath5k_stop_hw | ( | struct ath5k_softc * | sc | ) | [static] |
Definition at line 1943 of file linux_ks/hwi/ath5k_raw/module/base.c.
static int ath5k_stop_locked | ( | struct ath5k_softc * | sc | ) | [static] |
Definition at line 1898 of file linux_ks/hwi/ath5k_raw/module/base.c.
static void ath5k_tasklet_reset | ( | unsigned long | data | ) | [static] |
Definition at line 2051 of file linux_ks/hwi/ath5k_raw/module/base.c.
Definition at line 2140 of file linux_ks/hwi/ath5k_raw/module/base.c.
static void ath5k_tx_done | ( | struct ath5k_softc * | sc, |
struct ath5k_txq * | txq | ||
) | [static] |
Definition at line 1808 of file linux_ks/hwi/ath5k_raw/module/base.c.
static void ath5k_txbuf_free | ( | struct ath5k_softc * | sc, |
struct ath5k_buf * | bf | ||
) | [inline, static] |
Definition at line 274 of file linux_ks/hwi/ath5k_raw/module/base.c.
static int ath5k_txbuf_setup | ( | struct ath5k_softc * | sc, |
struct ath5k_buf * | bf | ||
) | [static] |
Definition at line 1227 of file linux_ks/hwi/ath5k_raw/module/base.c.
static void ath5k_txq_cleanup | ( | struct ath5k_softc * | sc | ) | [static] |
Definition at line 1468 of file linux_ks/hwi/ath5k_raw/module/base.c.
static void ath5k_txq_drainq | ( | struct ath5k_softc * | sc, |
struct ath5k_txq * | txq | ||
) | [static] |
Definition at line 1441 of file linux_ks/hwi/ath5k_raw/module/base.c.
static void ath5k_txq_release | ( | struct ath5k_softc * | sc | ) | [static] |
Definition at line 1495 of file linux_ks/hwi/ath5k_raw/module/base.c.
static struct ath5k_txq * ath5k_txq_setup | ( | struct ath5k_softc * | sc, |
int | qtype, | ||
int | subtype | ||
) | [static, read] |
Definition at line 1381 of file linux_ks/hwi/ath5k_raw/module/base.c.
int conf_ath5k | ( | struct net_device * | netdev, |
union ath5k_ioctl_info * | info, | ||
int | cmd | ||
) |
Function used to configure an ath5k_raw interface from within another kernel module It works like ath5k_ioctl but is designed to be called from within the kernel context
Definition at line 2710 of file linux_ks/hwi/ath5k_raw/module/base.c.
static struct sk_buff* dequeue_rx_queue | ( | struct rx_queue * | q, |
long | timeout | ||
) | [static, read] |
Definition at line 382 of file linux_ks/hwi/ath5k_raw/module/base.c.
static void enqueue_rx_queue | ( | struct rx_queue * | q, |
struct sk_buff * | skb | ||
) | [static] |
Definition at line 369 of file linux_ks/hwi/ath5k_raw/module/base.c.
static void __exit exit_ath5k_pci | ( | void | ) | [static] |
Definition at line 463 of file linux_ks/hwi/ath5k_raw/module/base.c.
void get_ath5k_slave_dev | ( | struct net_device ** | netdev | ) |
'netdev' will point to the ath5k_raw interface that must be used by RT-WMP
Definition at line 2649 of file linux_ks/hwi/ath5k_raw/module/base.c.
static int ieee80211_copy_snap | ( | u8 * | data, |
unsigned short | h_proto | ||
) | [static] |
Definition at line 2107 of file linux_ks/hwi/ath5k_raw/module/base.c.
static int __init init_ath5k_pci | ( | void | ) | [static] |
Definition at line 433 of file linux_ks/hwi/ath5k_raw/module/base.c.
static void init_rx_queue | ( | struct rx_queue * | q | ) | [static] |
Definition at line 357 of file linux_ks/hwi/ath5k_raw/module/base.c.
MODULE_AUTHOR | ( | "Jiri Slaby" | ) |
MODULE_AUTHOR | ( | "Nick Kossifidis" | ) |
MODULE_AUTHOR | ( | "Samuel Cabrero" | ) |
MODULE_DESCRIPTION | ( | "Modified version of the ath5k driver for use with RT-WMP protocol." | ) |
MODULE_LICENSE | ( | "Dual BSD/GPL" | ) |
MODULE_SUPPORTED_DEVICE | ( | "Atheros 5xxx WLAN cards" | ) |
MODULE_VERSION | ( | "0.6.0 (EXPERIMENTAL)" | ) |
static void purge_rx_queue | ( | struct rx_queue * | q | ) | [static] |
Definition at line 364 of file linux_ks/hwi/ath5k_raw/module/base.c.
void unlock_rx_sem | ( | void | ) |
Unlocks the reception semaphore
Definition at line 2700 of file linux_ks/hwi/ath5k_raw/module/base.c.
u8 ath5k_calinterval = 10 [static] |
Definition at line 100 of file linux_ks/hwi/ath5k_raw/module/base.c.
struct net_device_ops ath5k_netdev_ops [static] |
{ .ndo_open = ath5k_open, .ndo_stop = ath5k_close, .ndo_start_xmit = ath5k_tx, .ndo_do_ioctl = ath5k_ioctl, }
Definition at line 335 of file linux_ks/hwi/ath5k_raw/module/base.c.
struct pci_driver ath5k_pci_driver [static] |
{ .name = "ath5k_pci", .id_table = ath5k_pci_id_table, .probe = ath5k_pci_probe, .remove = __devexit_p(ath5k_pci_remove), }
Definition at line 231 of file linux_ks/hwi/ath5k_raw/module/base.c.
struct pci_device_id ath5k_pci_id_table[] [static] |
{ { PCI_VDEVICE(ATHEROS, 0x0207) }, { PCI_VDEVICE(ATHEROS, 0x0007) }, { PCI_VDEVICE(ATHEROS, 0x0011) }, { PCI_VDEVICE(ATHEROS, 0x0012) }, { PCI_VDEVICE(ATHEROS, 0x0013) }, { PCI_VDEVICE(3COM_2, 0x0013) }, { PCI_VDEVICE(3COM, 0x0013) }, { PCI_VDEVICE(ATHEROS, 0x1014) }, { PCI_VDEVICE(ATHEROS, 0x0014) }, { PCI_VDEVICE(ATHEROS, 0x0015) }, { PCI_VDEVICE(ATHEROS, 0x0016) }, { PCI_VDEVICE(ATHEROS, 0x0017) }, { PCI_VDEVICE(ATHEROS, 0x0018) }, { PCI_VDEVICE(ATHEROS, 0x0019) }, { PCI_VDEVICE(ATHEROS, 0x001a) }, { PCI_VDEVICE(ATHEROS, 0x001b) }, { PCI_VDEVICE(ATHEROS, 0x001c) }, { PCI_VDEVICE(ATHEROS, 0x001d) }, { 0 } }
Definition at line 118 of file linux_ks/hwi/ath5k_raw/module/base.c.
struct ieee80211_rate ath5k_rates[] [static] |
Definition at line 181 of file linux_ks/hwi/ath5k_raw/module/base.c.
struct net_device* ath5k_slave_dev = NULL [static] |
Definition at line 347 of file linux_ks/hwi/ath5k_raw/module/base.c.
int modparam_all_channels = true [static] |
Definition at line 101 of file linux_ks/hwi/ath5k_raw/module/base.c.
u8 P802_1H_OUI[P80211_OUI_LEN] = { 0x00, 0x00, 0xf8 } [static] |
Definition at line 2104 of file linux_ks/hwi/ath5k_raw/module/base.c.
u8 RFC1042_OUI[P80211_OUI_LEN] = { 0x00, 0x00, 0x00 } [static] |
Definition at line 2105 of file linux_ks/hwi/ath5k_raw/module/base.c.
struct rx_queue rx_rtwmp_queue [static] |
struct ath5k_srev_name srev_names[] [static] |
Definition at line 142 of file linux_ks/hwi/ath5k_raw/module/base.c.
int use_beacon_frames = 0 [static] |
Definition at line 102 of file linux_ks/hwi/ath5k_raw/module/base.c.