33#define CHAN2G(_freq, _idx) { \
34 .band = NET80211_BAND_2GHZ, \
35 .center_freq = (_freq), \
40#define CHAN5G(_freq, _idx) { \
41 .band = NET80211_BAND_5GHZ, \
42 .center_freq = (_freq), \
104#define SHPCHECK(__hw_rate, __flags) \
105 ((__flags & IEEE80211_TX_RC_USE_SHORT_PREAMBLE) ? (__hw_rate | 0x04 ) : 0)
107#define RATE(_bitrate, _hw_rate, _flags) { \
108 .bitrate = (_bitrate), \
110 .hw_value = (_hw_rate), \
111 .hw_value_short = (SHPCHECK(_hw_rate, _flags)) \
183 int nbuf,
int ndesc,
int is_tx)
185#define DS2PHYS(_dd, _ds) \
186 ((_dd)->dd_desc_paddr + ((char *)(_ds) - (char *)(_dd)->dd_desc))
187#define ATH_DESC_4KB_BOUND_CHECK(_daddr) ((((_daddr) & 0xFFF) > 0xF9F) ? 1 : 0)
190 int i, bsize,
error, desc_len;
192 DBG2(
"ath9k: %s DMA: %d buffers %d desc/buf\n",
203 if ((desc_len % 4) != 0) {
204 DBG(
"ath9k: ath_desc not DWORD aligned\n");
219 u32 ndesc_skipped = 1;
222 dma_len = ndesc_skipped * desc_len;
223 dd->dd_desc_len += dma_len;
234 DBG2(
"ath9k: %s DMA map: %p (%d) -> %llx (%d)\n",
239 bsize =
sizeof(
struct ath_buf) * nbuf;
247 for (i = 0; i < nbuf; i++, bf++,
ds += (desc_len * ndesc)) {
259 ds += (desc_len * ndesc);
270 memset(dd, 0,
sizeof(*dd));
272#undef ATH_DESC_4KB_BOUND_CHECK
288 for (i = 0; i <
common->keymax; i++)
370 ah->hw_version.devid = devid;
371 ah->hw_version.subsysid = subsysid;
379 DBG(
"ath9k: cannot allocate 802.11 hardware info structure\n");
400 common->cachelsz = csz << 2;
447 if(chan->
band != band)
465 ah->curchan = curchan;
596 memset(dd, 0,
sizeof(*dd));
#define NULL
NULL pointer (VOID *)
struct arbelprm_completion_with_error error
#define AR_PCU_MIC_NEW_LOC_ENA
int ath_tx_init(struct ath_softc *sc, int nbufs)
void ath9k_tasklet(struct ath_softc *sc)
void ath_tx_cleanupq(struct ath_softc *sc, struct ath_txq *txq)
int ath_rx_init(struct ath_softc *sc, int nbufs)
#define ATH_TXQ_SETUP(sc, i)
@ IEEE80211_TX_RC_USE_SHORT_PREAMBLE
void ath_hw_pll_work(struct ath_softc *sc)
static void ath_read_cachesize(struct ath_common *common, int *csz)
void ath_tx_cleanup(struct ath_softc *sc)
struct ath_txq * ath_txq_setup(struct ath_softc *sc, int qtype, int subtype)
struct net80211_device_operations ath9k_ops
void ath_rx_cleanup(struct ath_softc *sc)
void ath9k_hw_deinit(struct ath_hw *ah)
u32 ath9k_hw_getdefantenna(struct ath_hw *ah)
int ath9k_hw_init(struct ath_hw *ah)
void ath9k_hw_set_txpowerlimit(struct ath_hw *ah, u32 limit, int test)
static const struct net80211_channel ath9k_5ghz_chantable[]
static void ath9k_init_txpower_limits(struct ath_softc *sc)
static unsigned int ath9k_ioread32(void *hw_priv, u32 reg_offset)
#define DS2PHYS(_dd, _ds)
void ath9k_set_hw_capab(struct ath_softc *sc, struct net80211_device *dev __unused)
#define RATE(_bitrate, _hw_rate, _flags)
#define ATH_DESC_4KB_BOUND_CHECK(_daddr)
static int ath9k_init_channels_rates(struct ath_softc *sc)
static void ath9k_iowrite32(void *hw_priv, u32 val, u32 reg_offset)
#define CHAN5G(_freq, _idx)
static void ath9k_init_band_txpower(struct ath_softc *sc, int band)
#define CHAN2G(_freq, _idx)
static void ath9k_deinit_softc(struct ath_softc *sc)
static struct ath9k_legacy_rate ath9k_legacy_rates[]
void ath9k_deinit_device(struct ath_softc *sc)
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)
static int ath9k_init_queues(struct ath_softc *sc)
void ath9k_init_crypto(struct ath_softc *sc)
void ath_descdma_cleanup(struct ath_softc *sc __unused, struct ath_descdma *dd, struct list_head *head)
static int ath9k_init_softc(u16 devid, struct ath_softc *sc, u16 subsysid, const struct ath_bus_ops *bus_ops)
static const struct net80211_channel ath9k_2ghz_chantable[]
static void ath9k_init_misc(struct ath_softc *sc)
int ath9k_init_device(u16 devid, struct ath_softc *sc, u16 subsysid, const struct ath_bus_ops *bus_ops)
int ath_hw_keyreset(struct ath_common *common, u16 entry)
@ ATH_CRYPT_CAP_MIC_COMBINED
#define ATH_RSSI_DUMMY_MARKER
uint8_t eth_broadcast[ETH_ALEN]
Ethernet broadcast MAC address.
#define __unused
Declare a variable or data structure as unused.
#define DBG(...)
Print a debugging message.
#define FILE_LICENCE(_licence)
Declare a particular licence as applying to a file.
#define NET80211_BAND_BIT_2GHZ
Bitmask for the 2GHz band.
#define NET80211_BAND_2GHZ
The 2.4 GHz ISM band, unlicensed in most countries.
#define NET80211_BAND_5GHZ
The band from 4.9 GHz to 5.7 GHz, which tends to be more restricted.
#define NET80211_BAND_BIT_5GHZ
Bitmask for the 5GHz band.
int net80211_register(struct net80211_device *dev, struct net80211_device_operations *ops, struct net80211_hw_info *hw)
Register 802.11 device with network stack.
void net80211_unregister(struct net80211_device *dev)
Unregister 802.11 device from network stack.
#define NET80211_MODE_A
802.11a: 54 Mbps operation using OFDM signaling on the 5GHz band
#define NET80211_MODE_G
802.11g: 54 Mbps operation using ERP/OFDM signaling on the 2.4GHz band
#define NET80211_MODE_B
802.11b: 1-11 Mbps operation using DSSS/CCK signaling on the 2.4GHz band
#define ENOMEM
Not enough space.
#define FILE_SECBOOT(_status)
Declare a file's UEFI Secure Boot permission status.
static void ath9k_hw_set_diversity(struct ath_hw *ah, int value)
@ ATH9K_HW_CAP_4KB_SPLITTRANS
static struct ath_regulatory * ath9k_hw_regulatory(struct ath_hw *ah)
static struct ath_common * ath9k_hw_common(struct ath_hw *ah)
struct ib_cm_common common
static __always_inline unsigned long virt_to_bus(volatile const void *addr)
Convert virtual address to a bus address.
void * memcpy(void *dest, const void *src, size_t len) __nonnull
void * memset(void *dest, int character, size_t len) __nonnull
#define list_add_tail(new, head)
Add a new entry to the tail of a list.
#define INIT_LIST_HEAD(list)
Initialise a list head.
#define ATH9K_NUM_TX_QUEUES
void * zalloc(size_t size)
Allocate cleared memory.
void * malloc_phys(size_t size, size_t phys_align)
Allocate memory with specified physical alignment.
void free_phys(void *ptr, size_t size)
Free memory allocated with malloc_phys()
Dynamic memory allocation.
static unsigned int unsigned int reg
if(natsemi->flags &NATSEMI_64BIT) return 1
struct option_descriptor set[0]
static void(* free)(struct refcnt *refcnt))
const struct ath_bus_ops * bus_ops
struct ath_buf * dd_bufptr
struct ath9k_hw_capabilities caps
void(* intr_tq)(struct ath_softc *sc)
void(* hw_pll_work)(struct ath_softc *sc)
struct net80211_device * dev
struct net80211_hw_info * hwinfo
struct ath9k_legacy_rate rates[NET80211_MAX_RATES]
struct ath_txq txq[ATH9K_NUM_TX_QUEUES]
struct ath_txq * txq_map[WME_NUM_AC]
A doubly-linked list entry (or list head)
u16 hw_value
Hardware channel value.
u8 maxpower
Maximum allowable transmit power, in dBm.
u8 band
The band with which this channel is associated.
Structure encapsulating the complete state of an 802.11 device.
int modes
A bitwise OR of the 802.11x modes supported by this device.
enum net80211_hw_info::@277203366166200071173154201003141076360026365126 flags
A set of flags indicating peculiarities of this device.
int nr_rates[NET80211_NR_BANDS]
Number of supported rates, indexed by band.
int bands
A bitwise OR of the bands on which this device can communicate.
unsigned channel_change_time
Estimate of the time required to change channels, in microseconds.
struct net80211_channel channels[NET80211_MAX_CHANNELS]
List of RF channels supported by the card.
u8 hwaddr[ETH_ALEN]
Default hardware MAC address.
unsigned signal_max
Maximum signal in arbitrary cases.
int nr_channels
Number of supported channels.
enum net80211_hw_info::@160150106134320172247032061203111226300065160315 signal_type
Signal strength information that can be provided by the device.
u16 rates[NET80211_NR_BANDS][NET80211_MAX_RATES]
List of transmission rates supported by the card, indexed by band.