iPXE
|
#include <ipxe/malloc.h>
#include <ipxe/pci_io.h>
#include <ipxe/pci.h>
#include <ipxe/ethernet.h>
#include "ath9k.h"
Go to the source code of this file.
Macros | |
#define | CHAN2G(_freq, _idx) |
#define | CHAN5G(_freq, _idx) |
#define | SHPCHECK(__hw_rate, __flags) ((__flags & IEEE80211_TX_RC_USE_SHORT_PREAMBLE) ? (__hw_rate | 0x04 ) : 0) |
#define | RATE(_bitrate, _hw_rate, _flags) |
#define | DS2PHYS(_dd, _ds) ((_dd)->dd_desc_paddr + ((char *)(_ds) - (char *)(_dd)->dd_desc)) |
#define | ATH_DESC_4KB_BOUND_CHECK(_daddr) ((((_daddr) & 0xFFF) > 0xF9F) ? 1 : 0) |
Functions | |
FILE_LICENCE (BSD2) | |
static void | ath9k_deinit_softc (struct ath_softc *sc) |
static void | ath9k_iowrite32 (void *hw_priv, u32 val, u32 reg_offset) |
static unsigned int | ath9k_ioread32 (void *hw_priv, u32 reg_offset) |
static unsigned int | ath9k_reg_rmw (void *hw_priv, u32 reg_offset, u32 set, u32 clr) |
int | ath_descdma_setup (struct ath_softc *sc, struct ath_descdma *dd, struct list_head *head, const char *name, int nbuf, int ndesc, int is_tx) |
void | ath9k_init_crypto (struct ath_softc *sc) |
static int | ath9k_init_queues (struct ath_softc *sc) |
static int | ath9k_init_channels_rates (struct ath_softc *sc) |
static void | ath9k_init_misc (struct ath_softc *sc) |
static int | ath9k_init_softc (u16 devid, struct ath_softc *sc, u16 subsysid, const struct ath_bus_ops *bus_ops) |
static void | ath9k_init_band_txpower (struct ath_softc *sc, int band) |
static void | ath9k_init_txpower_limits (struct ath_softc *sc) |
void | ath9k_set_hw_capab (struct ath_softc *sc, struct net80211_device *dev __unused) |
int | ath9k_init_device (u16 devid, struct ath_softc *sc, u16 subsysid, const struct ath_bus_ops *bus_ops) |
void | ath9k_deinit_device (struct ath_softc *sc) |
void | ath_descdma_cleanup (struct ath_softc *sc __unused, struct ath_descdma *dd, struct list_head *head) |
Variables | |
int | is_ath9k_unloaded |
static const struct net80211_channel | ath9k_2ghz_chantable [] |
static const struct net80211_channel | ath9k_5ghz_chantable [] |
static struct ath9k_legacy_rate | ath9k_legacy_rates [] |
#define CHAN2G | ( | _freq, | |
_idx | |||
) |
Definition at line 32 of file ath9k_init.c.
#define CHAN5G | ( | _freq, | |
_idx | |||
) |
Definition at line 39 of file ath9k_init.c.
#define SHPCHECK | ( | __hw_rate, | |
__flags | |||
) | ((__flags & IEEE80211_TX_RC_USE_SHORT_PREAMBLE) ? (__hw_rate | 0x04 ) : 0) |
Definition at line 103 of file ath9k_init.c.
#define RATE | ( | _bitrate, | |
_hw_rate, | |||
_flags | |||
) |
Definition at line 106 of file ath9k_init.c.
#define DS2PHYS | ( | _dd, | |
_ds | |||
) | ((_dd)->dd_desc_paddr + ((char *)(_ds) - (char *)(_dd)->dd_desc)) |
#define ATH_DESC_4KB_BOUND_CHECK | ( | _daddr | ) | ((((_daddr) & 0xFFF) > 0xF9F) ? 1 : 0) |
FILE_LICENCE | ( | BSD2 | ) |
|
static |
Definition at line 561 of file ath9k_init.c.
References ath9k_hw_deinit(), ATH9K_NUM_TX_QUEUES, ath_tx_cleanupq(), ATH_TXQ_SETUP, free, ath_softc::hwinfo, NULL, ath_softc::sc_ah, ath_softc::tx, and ath_tx::txq.
Referenced by ath9k_deinit_device(), and ath9k_init_device().
Definition at line 136 of file ath9k_init.c.
References ah, ath9k_hw_common(), common, ath_softc::mem, val, and writel().
Referenced by ath9k_init_softc().
|
static |
Definition at line 145 of file ath9k_init.c.
References ah, ath9k_hw_common(), common, ath_softc::mem, readl(), and val.
Referenced by ath9k_init_softc().
Definition at line 156 of file ath9k_init.c.
References ah, ath9k_hw_common(), common, ath_softc::mem, readl(), set, val, and writel().
Referenced by ath9k_init_softc().
int ath_descdma_setup | ( | struct ath_softc * | sc, |
struct ath_descdma * | dd, | ||
struct list_head * | head, | ||
const char * | name, | ||
int | nbuf, | ||
int | ndesc, | ||
int | is_tx | ||
) |
Definition at line 180 of file ath9k_init.c.
References ATH9K_HW_CAP_4KB_SPLITTRANS, ATH_DESC_4KB_BOUND_CHECK, ath_buf::bf_desc, ath_hw::caps, DBG, DBG2, ath_descdma::dd_bufptr, ath_descdma::dd_desc, ath_descdma::dd_desc_len, ath_descdma::dd_desc_paddr, ds, DS2PHYS, ENOMEM, error, free_phys(), head, ath9k_hw_capabilities::hw_caps, INIT_LIST_HEAD, ito64, list_add_tail, malloc_phys(), memset(), name, NULL, ath_softc::sc_ah, ath9k_hw_capabilities::tx_desc_len, u32, virt_to_bus(), and zalloc().
Referenced by ath_rx_init(), and ath_tx_init().
void ath9k_init_crypto | ( | struct ath_softc * | sc | ) |
Definition at line 275 of file ath9k_init.c.
References AR_KEYTABLE_SIZE, AR_PCU_MIC_NEW_LOC_ENA, ath9k_hw_common(), ATH_CRYPT_CAP_MIC_COMBINED, ath_hw_keyreset(), common, ath_hw::misc_mode, and ath_softc::sc_ah.
Referenced by ath9k_init_softc().
|
static |
Definition at line 300 of file ath9k_init.c.
References ATH9K_TX_QUEUE_DATA, ath_txq_setup(), ath_txq::mac80211_qnum, ath_softc::tx, ath_tx::txq_map, and WME_NUM_AC.
Referenced by ath9k_init_softc().
|
static |
Definition at line 311 of file ath9k_init.c.
References ARRAY_SIZE, ath9k_2ghz_chantable, ath9k_5ghz_chantable, ATH9K_HW_CAP_2GHZ, ATH9K_HW_CAP_5GHZ, ath9k_legacy_rates, ath9k_legacy_rate::bitrate, ath_hw::caps, net80211_hw_info::channels, ath9k_hw_capabilities::hw_caps, ath_softc::hwinfo, memcpy(), NET80211_BAND_2GHZ, NET80211_BAND_5GHZ, net80211_hw_info::nr_channels, net80211_hw_info::nr_rates, ath_softc::rates, net80211_hw_info::rates, and ath_softc::sc_ah.
Referenced by ath9k_init_softc().
|
static |
Definition at line 339 of file ath9k_init.c.
References ath9k_hw_common(), ath9k_hw_getdefantenna(), ath9k_hw_set_diversity(), ATH_TXPOWER_MAX, ath_hw::caps, common, ath_softc::config, ath_rx::defant, ETH_ALEN, eth_broadcast, memcpy(), ath_softc::rx, ath9k_hw_capabilities::rx_chainmask, ath_softc::sc_ah, ath9k_hw_capabilities::tx_chainmask, and ath_config::txpowlimit.
Referenced by ath9k_init_softc().
|
static |
Definition at line 356 of file ath9k_init.c.
References ah, AH_USE_EEPROM, ath9k_hw_common(), ath9k_hw_deinit(), ath9k_hw_init(), ath9k_init_channels_rates(), ath9k_init_crypto(), ath9k_init_misc(), ath9k_init_queues(), ath9k_ioread32(), ath9k_iowrite32(), ATH9K_NUM_TX_QUEUES, ath9k_reg_rmw(), ath9k_tasklet(), ath_read_cachesize(), ath_tx_cleanupq(), ATH_TXQ_SETUP, ath_common::bus_ops, common, DBG, ath_softc::dev, ENOMEM, ETH_ALEN, free, net80211_hw_info::hwaddr, ath_softc::hwinfo, ath_softc::intr_tq, ath_hw::led_pin, memcpy(), NULL, ath_softc::sc_ah, ath_softc::tx, ath_tx::txq, and zalloc().
Referenced by ath9k_init_device().
|
static |
Definition at line 437 of file ath9k_init.c.
References ah, ath9k_hw_regulatory(), ath9k_hw_set_txpowerlimit(), net80211_channel::band, net80211_hw_info::channels, net80211_channel::hw_value, ath_softc::hwinfo, MAX_RATE_POWER, net80211_channel::maxpower, net80211_hw_info::nr_channels, reg, and ath_softc::sc_ah.
Referenced by ath9k_init_txpower_limits().
|
static |
Definition at line 454 of file ath9k_init.c.
References ah, ATH9K_HW_CAP_2GHZ, ATH9K_HW_CAP_5GHZ, ath9k_init_band_txpower(), NET80211_BAND_2GHZ, NET80211_BAND_5GHZ, and ath_softc::sc_ah.
Referenced by ath9k_init_device().
void ath9k_set_hw_capab | ( | struct ath_softc * | sc, |
struct net80211_device *dev | __unused | ||
) |
Definition at line 467 of file ath9k_init.c.
References ATH9K_HW_CAP_2GHZ, ATH9K_HW_CAP_5GHZ, net80211_hw_info::bands, ath_hw::caps, net80211_hw_info::channel_change_time, net80211_hw_info::flags, ath9k_hw_capabilities::hw_caps, ath_softc::hwinfo, net80211_hw_info::modes, NET80211_BAND_BIT_2GHZ, NET80211_BAND_BIT_5GHZ, NET80211_MODE_A, NET80211_MODE_B, NET80211_MODE_G, ath_softc::sc_ah, net80211_hw_info::signal_max, and net80211_hw_info::signal_type.
Referenced by ath9k_init_device().
int ath9k_init_device | ( | u16 | devid, |
struct ath_softc * | sc, | ||
u16 | subsysid, | ||
const struct ath_bus_ops * | bus_ops | ||
) |
Definition at line 486 of file ath9k_init.c.
References ath9k_deinit_softc(), ath9k_init_softc(), ath9k_init_txpower_limits(), ath9k_ops, ath9k_set_hw_capab(), ath_hw_pll_work(), ATH_RSSI_DUMMY_MARKER, ath_rx_cleanup(), ath_rx_init(), ATH_RXBUF, ath_tx_cleanup(), ath_tx_init(), ATH_TXBUF, ath_softc::dev, error, ath_softc::hw_pll_work, ath_softc::hwinfo, ath_softc::last_rssi, and net80211_register().
Referenced by ath_pci_probe().
void ath9k_deinit_device | ( | struct ath_softc * | sc | ) |
Definition at line 577 of file ath9k_init.c.
References ath9k_deinit_softc(), ath_rx_cleanup(), ath_tx_cleanup(), ath_softc::dev, and net80211_unregister().
Referenced by ath_pci_remove().
void ath_descdma_cleanup | ( | struct ath_softc *sc | __unused, |
struct ath_descdma * | dd, | ||
struct list_head * | head | ||
) |
Definition at line 587 of file ath9k_init.c.
References ath_descdma::dd_bufptr, ath_descdma::dd_desc, ath_descdma::dd_desc_len, free, free_phys(), head, INIT_LIST_HEAD, and memset().
int is_ath9k_unloaded |
Definition at line 29 of file ath9k_init.c.
Referenced by ath_pci_remove().
|
static |
Definition at line 50 of file ath9k_init.c.
Referenced by ath9k_init_channels_rates().
|
static |
Definition at line 71 of file ath9k_init.c.
Referenced by ath9k_init_channels_rates().
|
static |
Definition at line 113 of file ath9k_init.c.
Referenced by ath9k_init_channels_rates().