Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Macros | Functions
qcu.c File Reference
#include "ath5k.h"
#include "reg.h"
#include "debug.h"
#include <linux/log2.h>

Go to the source code of this file.

Macros

#define pr_fmt(fmt)   KBUILD_MODNAME ": " fmt
 

Functions

u32 ath5k_hw_num_tx_pending (struct ath5k_hw *ah, unsigned int queue)
 
void ath5k_hw_release_tx_queue (struct ath5k_hw *ah, unsigned int queue)
 
int ath5k_hw_get_tx_queueprops (struct ath5k_hw *ah, int queue, struct ath5k_txq_info *queue_info)
 
int ath5k_hw_set_tx_queueprops (struct ath5k_hw *ah, int queue, const struct ath5k_txq_info *qinfo)
 
int ath5k_hw_setup_tx_queue (struct ath5k_hw *ah, enum ath5k_tx_queue queue_type, struct ath5k_txq_info *queue_info)
 
void ath5k_hw_set_tx_retry_limits (struct ath5k_hw *ah, unsigned int queue)
 
int ath5k_hw_reset_tx_queue (struct ath5k_hw *ah, unsigned int queue)
 
int ath5k_hw_set_ifs_intervals (struct ath5k_hw *ah, unsigned int slot_time)
 
int ath5k_hw_init_queues (struct ath5k_hw *ah)
 

Macro Definition Documentation

#define pr_fmt (   fmt)    KBUILD_MODNAME ": " fmt

Definition at line 23 of file qcu.c.

Function Documentation

int ath5k_hw_get_tx_queueprops ( struct ath5k_hw ah,
int  queue,
struct ath5k_txq_info queue_info 
)

ath5k_hw_get_tx_queueprops() - Get properties for a transmit queue : The &struct ath5k_hw : One of enum ath5k_tx_queue_id : The &struct ath5k_txq_info to fill

Definition at line 138 of file qcu.c.

int ath5k_hw_init_queues ( struct ath5k_hw ah)

ath5k_hw_init_queues() - Initialize tx queues : The &struct ath5k_hw

Initializes all tx queues based on information on ah->ah_txq* set by the driver

Definition at line 673 of file qcu.c.

u32 ath5k_hw_num_tx_pending ( struct ath5k_hw ah,
unsigned int  queue 
)

DOC: Queue Control Unit (QCU)/DCF Control Unit (DCU) functions

Here we setup parameters for the 12 available TX queues. Note that on the various registers we can usually only map the first 10 of them so basically we have 10 queues to play with. Each queue has a matching QCU that controls when the queue will get triggered and multiple QCUs can be mapped to a single DCU that controls the various DFS parameters for the various queues. In our setup we have a 1:1 mapping between QCUs and DCUs allowing us to have different DFS settings for each queue.

When a frame goes into a TX queue, QCU decides when it'll trigger a transmission based on various criteria (such as how many data we have inside it's buffer or -if it's a beacon queue- if it's time to fire up the queue based on TSF etc), DCU adds backoff, IFSes etc and then a scheduler (arbitrator) decides the priority of each QCU based on it's configuration (e.g. beacons are always transmitted when they leave DCU bypassing all other frames from other queues waiting to be transmitted). After a frame leaves the DCU it goes to PCU for further processing and then to PHY for the actual transmission. ath5k_hw_num_tx_pending() - Get number of pending frames for a given queue : The &struct ath5k_hw : One of enum ath5k_tx_queue_id

Definition at line 63 of file qcu.c.

void ath5k_hw_release_tx_queue ( struct ath5k_hw ah,
unsigned int  queue 
)

ath5k_hw_release_tx_queue() - Set a transmit queue inactive : The &struct ath5k_hw : One of enum ath5k_tx_queue_id

Definition at line 94 of file qcu.c.

int ath5k_hw_reset_tx_queue ( struct ath5k_hw ah,
unsigned int  queue 
)

ath5k_hw_reset_tx_queue() - Initialize a single hw queue : The &struct ath5k_hw : One of enum ath5k_tx_queue_id

Set DCF properties for the given transmit queue on DCU and configures all queue-specific parameters.

Definition at line 330 of file qcu.c.

int ath5k_hw_set_ifs_intervals ( struct ath5k_hw ah,
unsigned int  slot_time 
)

ath5k_hw_set_ifs_intervals() - Set global inter-frame spaces on DCU : The &struct ath5k_hw : Slot time in us

Sets the global IFS intervals on DCU (also works on AR5210) for the given slot time and the current bwmode.

Definition at line 565 of file qcu.c.

int ath5k_hw_set_tx_queueprops ( struct ath5k_hw ah,
int  queue,
const struct ath5k_txq_info qinfo 
)

ath5k_hw_set_tx_queueprops() - Set properties for a transmit queue : The &struct ath5k_hw : One of enum ath5k_tx_queue_id : The &struct ath5k_txq_info to use

Returns 0 on success or -EIO if queue is inactive

Definition at line 154 of file qcu.c.

void ath5k_hw_set_tx_retry_limits ( struct ath5k_hw ah,
unsigned int  queue 
)

ath5k_hw_set_tx_retry_limits() - Set tx retry limits on DCU : The &struct ath5k_hw : One of enum ath5k_tx_queue_id

This function is used when initializing a queue, to set retry limits based on ah->ah_retry_* and the chipset used.

Definition at line 287 of file qcu.c.

int ath5k_hw_setup_tx_queue ( struct ath5k_hw ah,
enum ath5k_tx_queue  queue_type,
struct ath5k_txq_info queue_info 
)

ath5k_hw_setup_tx_queue() - Initialize a transmit queue : The &struct ath5k_hw : One of enum ath5k_tx_queue : The &struct ath5k_txq_info to use

Returns 0 on success, -EINVAL on invalid arguments

Definition at line 203 of file qcu.c.