Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Macros | Functions
mac.c File Reference
#include "hw.h"
#include "hw-ops.h"
#include <linux/export.h>

Go to the source code of this file.

Macros

#define ATH9K_TX_STOP_DMA_TIMEOUT   1000 /* usec */
 
#define ATH9K_TIME_QUANTUM   100 /* usec */
 
#define AH_RX_STOP_DMA_TIMEOUT   10000 /* usec */
 

Functions

u32 ath9k_hw_gettxbuf (struct ath_hw *ah, u32 q)
 
 EXPORT_SYMBOL (ath9k_hw_gettxbuf)
 
void ath9k_hw_puttxbuf (struct ath_hw *ah, u32 q, u32 txdp)
 
 EXPORT_SYMBOL (ath9k_hw_puttxbuf)
 
void ath9k_hw_txstart (struct ath_hw *ah, u32 q)
 
 EXPORT_SYMBOL (ath9k_hw_txstart)
 
u32 ath9k_hw_numtxpending (struct ath_hw *ah, u32 q)
 
 EXPORT_SYMBOL (ath9k_hw_numtxpending)
 
bool ath9k_hw_updatetxtriglevel (struct ath_hw *ah, bool bIncTrigLevel)
 
 EXPORT_SYMBOL (ath9k_hw_updatetxtriglevel)
 
void ath9k_hw_abort_tx_dma (struct ath_hw *ah)
 
 EXPORT_SYMBOL (ath9k_hw_abort_tx_dma)
 
bool ath9k_hw_stop_dma_queue (struct ath_hw *ah, u32 q)
 
 EXPORT_SYMBOL (ath9k_hw_stop_dma_queue)
 
bool ath9k_hw_set_txq_props (struct ath_hw *ah, int q, const struct ath9k_tx_queue_info *qinfo)
 
 EXPORT_SYMBOL (ath9k_hw_set_txq_props)
 
bool ath9k_hw_get_txq_props (struct ath_hw *ah, int q, struct ath9k_tx_queue_info *qinfo)
 
 EXPORT_SYMBOL (ath9k_hw_get_txq_props)
 
int ath9k_hw_setuptxqueue (struct ath_hw *ah, enum ath9k_tx_queue type, const struct ath9k_tx_queue_info *qinfo)
 
 EXPORT_SYMBOL (ath9k_hw_setuptxqueue)
 
bool ath9k_hw_releasetxqueue (struct ath_hw *ah, u32 q)
 
 EXPORT_SYMBOL (ath9k_hw_releasetxqueue)
 
bool ath9k_hw_resettxqueue (struct ath_hw *ah, u32 q)
 
 EXPORT_SYMBOL (ath9k_hw_resettxqueue)
 
int ath9k_hw_rxprocdesc (struct ath_hw *ah, struct ath_desc *ds, struct ath_rx_status *rs)
 
 EXPORT_SYMBOL (ath9k_hw_rxprocdesc)
 
bool ath9k_hw_setrxabort (struct ath_hw *ah, bool set)
 
 EXPORT_SYMBOL (ath9k_hw_setrxabort)
 
void ath9k_hw_putrxbuf (struct ath_hw *ah, u32 rxdp)
 
 EXPORT_SYMBOL (ath9k_hw_putrxbuf)
 
void ath9k_hw_startpcureceive (struct ath_hw *ah, bool is_scanning)
 
 EXPORT_SYMBOL (ath9k_hw_startpcureceive)
 
void ath9k_hw_abortpcurecv (struct ath_hw *ah)
 
 EXPORT_SYMBOL (ath9k_hw_abortpcurecv)
 
bool ath9k_hw_stopdmarecv (struct ath_hw *ah, bool *reset)
 
 EXPORT_SYMBOL (ath9k_hw_stopdmarecv)
 
int ath9k_hw_beaconq_setup (struct ath_hw *ah)
 
 EXPORT_SYMBOL (ath9k_hw_beaconq_setup)
 
bool ath9k_hw_intrpend (struct ath_hw *ah)
 
 EXPORT_SYMBOL (ath9k_hw_intrpend)
 
void ath9k_hw_kill_interrupts (struct ath_hw *ah)
 
 EXPORT_SYMBOL (ath9k_hw_kill_interrupts)
 
void ath9k_hw_disable_interrupts (struct ath_hw *ah)
 
 EXPORT_SYMBOL (ath9k_hw_disable_interrupts)
 
void ath9k_hw_enable_interrupts (struct ath_hw *ah)
 
 EXPORT_SYMBOL (ath9k_hw_enable_interrupts)
 
void ath9k_hw_set_interrupts (struct ath_hw *ah)
 
 EXPORT_SYMBOL (ath9k_hw_set_interrupts)
 

Macro Definition Documentation

#define AH_RX_STOP_DMA_TIMEOUT   10000 /* usec */
#define ATH9K_TIME_QUANTUM   100 /* usec */
#define ATH9K_TX_STOP_DMA_TIMEOUT   1000 /* usec */

Function Documentation

void ath9k_hw_abort_tx_dma ( struct ath_hw ah)

Definition at line 134 of file mac.c.

void ath9k_hw_abortpcurecv ( struct ath_hw ah)

Definition at line 680 of file mac.c.

int ath9k_hw_beaconq_setup ( struct ath_hw ah)

Definition at line 737 of file mac.c.

void ath9k_hw_disable_interrupts ( struct ath_hw ah)

Definition at line 793 of file mac.c.

void ath9k_hw_enable_interrupts ( struct ath_hw ah)

Definition at line 804 of file mac.c.

bool ath9k_hw_get_txq_props ( struct ath_hw ah,
int  q,
struct ath9k_tx_queue_info qinfo 
)

Definition at line 261 of file mac.c.

u32 ath9k_hw_gettxbuf ( struct ath_hw ah,
u32  q 
)

Definition at line 46 of file mac.c.

bool ath9k_hw_intrpend ( struct ath_hw ah)

Definition at line 753 of file mac.c.

void ath9k_hw_kill_interrupts ( struct ath_hw ah)

Definition at line 776 of file mac.c.

u32 ath9k_hw_numtxpending ( struct ath_hw ah,
u32  q 
)

Definition at line 65 of file mac.c.

void ath9k_hw_putrxbuf ( struct ath_hw ah,
u32  rxdp 
)

Definition at line 664 of file mac.c.

void ath9k_hw_puttxbuf ( struct ath_hw ah,
u32  q,
u32  txdp 
)

Definition at line 52 of file mac.c.

bool ath9k_hw_releasetxqueue ( struct ath_hw ah,
u32  q 
)

Definition at line 353 of file mac.c.

bool ath9k_hw_resettxqueue ( struct ath_hw ah,
u32  q 
)

Definition at line 374 of file mac.c.

int ath9k_hw_rxprocdesc ( struct ath_hw ah,
struct ath_desc ds,
struct ath_rx_status rs 
)

Definition at line 536 of file mac.c.

void ath9k_hw_set_interrupts ( struct ath_hw ah)

Definition at line 841 of file mac.c.

bool ath9k_hw_set_txq_props ( struct ath_hw ah,
int  q,
const struct ath9k_tx_queue_info qinfo 
)

Definition at line 196 of file mac.c.

bool ath9k_hw_setrxabort ( struct ath_hw ah,
bool  set 
)

Definition at line 634 of file mac.c.

int ath9k_hw_setuptxqueue ( struct ath_hw ah,
enum ath9k_tx_queue  type,
const struct ath9k_tx_queue_info qinfo 
)

Definition at line 293 of file mac.c.

void ath9k_hw_startpcureceive ( struct ath_hw ah,
bool  is_scanning 
)

Definition at line 670 of file mac.c.

bool ath9k_hw_stop_dma_queue ( struct ath_hw ah,
u32  q 
)

Definition at line 170 of file mac.c.

bool ath9k_hw_stopdmarecv ( struct ath_hw ah,
bool reset 
)

Definition at line 688 of file mac.c.

void ath9k_hw_txstart ( struct ath_hw ah,
u32  q 
)

Definition at line 58 of file mac.c.

bool ath9k_hw_updatetxtriglevel ( struct ath_hw ah,
bool  bIncTrigLevel 
)

ath9k_hw_updatetxtriglevel - adjusts the frame trigger level

: atheros hardware struct : whether or not the frame trigger level should be updated

The frame trigger level specifies the minimum number of bytes, in units of 64 bytes, that must be DMA'ed into the PCU TX FIFO before the PCU will initiate sending the frame on the air. This can mean we initiate transmit before a full frame is on the PCU TX FIFO. Resets to 0x1 (meaning 64 bytes or a full frame, whichever occurs first)

Caution must be taken to ensure to set the frame trigger level based on the DMA request size. For example if the DMA request size is set to 128 bytes the trigger level cannot exceed 6 * 64 = 384. This is because there need to be enough space in the tx FIFO for the requested transfer size. Hence the tx FIFO will stop with 512 - 128 = 384 bytes. If we set the threshold to a value beyond 6, then the transmit will hang.

Current dual stream devices have a PCU TX FIFO size of 8 KB. Current single stream devices have a PCU TX FIFO size of 4 KB, however, there is a hardware issue which forces us to use 2 KB instead so the frame trigger level must not exceed 2 KB for these chipsets.

Definition at line 105 of file mac.c.

EXPORT_SYMBOL ( ath9k_hw_gettxbuf  )
EXPORT_SYMBOL ( ath9k_hw_puttxbuf  )
EXPORT_SYMBOL ( ath9k_hw_txstart  )
EXPORT_SYMBOL ( ath9k_hw_numtxpending  )
EXPORT_SYMBOL ( ath9k_hw_updatetxtriglevel  )
EXPORT_SYMBOL ( ath9k_hw_abort_tx_dma  )
EXPORT_SYMBOL ( ath9k_hw_stop_dma_queue  )
EXPORT_SYMBOL ( ath9k_hw_set_txq_props  )
EXPORT_SYMBOL ( ath9k_hw_get_txq_props  )
EXPORT_SYMBOL ( ath9k_hw_setuptxqueue  )
EXPORT_SYMBOL ( ath9k_hw_releasetxqueue  )
EXPORT_SYMBOL ( ath9k_hw_resettxqueue  )
EXPORT_SYMBOL ( ath9k_hw_rxprocdesc  )
EXPORT_SYMBOL ( ath9k_hw_setrxabort  )
EXPORT_SYMBOL ( ath9k_hw_putrxbuf  )
EXPORT_SYMBOL ( ath9k_hw_startpcureceive  )
EXPORT_SYMBOL ( ath9k_hw_abortpcurecv  )
EXPORT_SYMBOL ( ath9k_hw_stopdmarecv  )
EXPORT_SYMBOL ( ath9k_hw_beaconq_setup  )
EXPORT_SYMBOL ( ath9k_hw_intrpend  )
EXPORT_SYMBOL ( ath9k_hw_kill_interrupts  )
EXPORT_SYMBOL ( ath9k_hw_disable_interrupts  )
EXPORT_SYMBOL ( ath9k_hw_enable_interrupts  )
EXPORT_SYMBOL ( ath9k_hw_set_interrupts  )