Functions
pcu.c File Reference
#include "ath5k.h"
#include "reg.h"
#include "debug.h"
#include "base.h"
Include dependency graph for linux_ks/hwi/ath5k_raw/module/pcu.c:

Go to the source code of this file.

Functions

int ath5k_hw_clear_mcast_filter_idx (struct ath5k_hw *ah, u32 index)
unsigned int ath5k_hw_get_ack_timeout (struct ath5k_hw *ah)
unsigned int ath5k_hw_get_cts_timeout (struct ath5k_hw *ah)
void ath5k_hw_get_lladdr (struct ath5k_hw *ah, u8 *mac)
u32 ath5k_hw_get_rx_filter (struct ath5k_hw *ah)
void ath5k_hw_set_ack_bitrate_high (struct ath5k_hw *ah, bool high)
int ath5k_hw_set_ack_timeout (struct ath5k_hw *ah, unsigned int timeout)
void ath5k_hw_set_associd (struct ath5k_hw *ah, const u8 *bssid, u16 assoc_id)
int ath5k_hw_set_bssid_mask (struct ath5k_hw *ah, const u8 *mask)
int ath5k_hw_set_cts_timeout (struct ath5k_hw *ah, unsigned int timeout)
int ath5k_hw_set_lladdr (struct ath5k_hw *ah, const u8 *mac)
void ath5k_hw_set_mcast_filter (struct ath5k_hw *ah, u32 filter0, u32 filter1)
int ath5k_hw_set_mcast_filter_idx (struct ath5k_hw *ah, u32 index)
int ath5k_hw_set_opmode (struct ath5k_hw *ah)
void ath5k_hw_set_rx_filter (struct ath5k_hw *ah, u32 filter)
void ath5k_hw_start_rx_pcu (struct ath5k_hw *ah)
void ath5k_hw_stop_rx_pcu (struct ath5k_hw *ah)
void ath5k_hw_update_mib_counters (struct ath5k_hw *ah, struct ieee80211_low_level_stats *stats)

Function Documentation

int ath5k_hw_clear_mcast_filter_idx ( struct ath5k_hw ah,
u32  index 
)

Definition at line 492 of file linux_ks/hwi/ath5k_raw/module/pcu.c.

unsigned int ath5k_hw_get_ack_timeout ( struct ath5k_hw ah)

ath5k_hw_het_ack_timeout - Get ACK timeout from PCU in usec

: The &struct ath5k_hw

Definition at line 154 of file linux_ks/hwi/ath5k_raw/module/pcu.c.

unsigned int ath5k_hw_get_cts_timeout ( struct ath5k_hw ah)

ath5k_hw_get_cts_timeout - Get CTS timeout from PCU in usec

: The &struct ath5k_hw

Definition at line 186 of file linux_ks/hwi/ath5k_raw/module/pcu.c.

void ath5k_hw_get_lladdr ( struct ath5k_hw ah,
u8 mac 
)

ath5k_hw_get_lladdr - Get station id

: The &struct ath5k_hw : The card's mac address

Initialize ah->ah_sta_id using the mac address provided (just a memcpy).

TODO: Remove it once we merge ath5k_softc and ath5k_hw

Definition at line 228 of file linux_ks/hwi/ath5k_raw/module/pcu.c.

ath5k_hw_get_rx_filter - Get current rx filter

: The &struct ath5k_hw

Returns the RX filter by reading rx filter and phy error filter registers. RX filter is used to set the allowed frame types that PCU will accept and pass to the driver. For a list of frame types check out reg.h.

Definition at line 518 of file linux_ks/hwi/ath5k_raw/module/pcu.c.

void ath5k_hw_set_ack_bitrate_high ( struct ath5k_hw ah,
bool  high 
)

ath5k_hw_set_ack_bitrate - set bitrate for ACKs

: The &struct ath5k_hw : Flag to determine if we want to use high transmition rate for ACKs or not

If high flag is set, we tell hw to use a set of control rates based on the current transmition rate (check out control_rates array inside reset.c). If not hw just uses the lowest rate available for the current modulation scheme being used (1Mbit for CCK and 6Mbits for OFDM).

Definition at line 131 of file linux_ks/hwi/ath5k_raw/module/pcu.c.

int ath5k_hw_set_ack_timeout ( struct ath5k_hw ah,
unsigned int  timeout 
)

ath5k_hw_set_ack_timeout - Set ACK timeout on PCU

: The &struct ath5k_hw : Timeout in usec

Definition at line 168 of file linux_ks/hwi/ath5k_raw/module/pcu.c.

void ath5k_hw_set_associd ( struct ath5k_hw ah,
const u8 bssid,
u16  assoc_id 
)

ath5k_hw_set_associd - Set BSSID for association

: The &struct ath5k_hw : BSSID : Assoc id

Sets the BSSID which trigers the "SME Join" operation

Definition at line 271 of file linux_ks/hwi/ath5k_raw/module/pcu.c.

int ath5k_hw_set_bssid_mask ( struct ath5k_hw ah,
const u8 mask 
)

ath5k_hw_set_bssid_mask - filter out bssids we listen

: the &struct ath5k_hw : the bssid_mask, a u8 array of size ETH_ALEN

BSSID masking is a method used by AR5212 and newer hardware to inform PCU which bits of the interface's MAC address should be looked at when trying to decide which packets to ACK. In station mode and AP mode with a single BSS every bit matters since we lock to only one BSS. In AP mode with multiple BSSes (virtual interfaces) not every bit matters because hw must accept frames for all BSSes and so we tweak some bits of our mac address in order to have multiple BSSes.

NOTE: This is a simple filter and does *not* filter out all relevant frames. Some frames that are not for us might get ACKed from us by PCU because they just match the mask.

When handling multiple BSSes you can get the BSSID mask by computing the set of ~ ( MAC XOR BSSID ) for all bssids we handle.

When you do this you are essentially computing the common bits of all your BSSes. Later it is assumed the harware will "and" (&) the BSSID mask with the MAC address to obtain the relevant bits and compare the result with (frame's BSSID & mask) to see if they match.

Definition at line 402 of file linux_ks/hwi/ath5k_raw/module/pcu.c.

int ath5k_hw_set_cts_timeout ( struct ath5k_hw ah,
unsigned int  timeout 
)

ath5k_hw_set_cts_timeout - Set CTS timeout on PCU

: The &struct ath5k_hw : Timeout in usec

Definition at line 199 of file linux_ks/hwi/ath5k_raw/module/pcu.c.

int ath5k_hw_set_lladdr ( struct ath5k_hw ah,
const u8 mac 
)

ath5k_hw_set_lladdr - Set station id

: The &struct ath5k_hw : The card's mac address

Set station id on hw using the provided mac address

Definition at line 242 of file linux_ks/hwi/ath5k_raw/module/pcu.c.

void ath5k_hw_set_mcast_filter ( struct ath5k_hw ah,
u32  filter0,
u32  filter1 
)

Definition at line 463 of file linux_ks/hwi/ath5k_raw/module/pcu.c.

int ath5k_hw_set_mcast_filter_idx ( struct ath5k_hw ah,
u32  index 
)

Definition at line 474 of file linux_ks/hwi/ath5k_raw/module/pcu.c.

int ath5k_hw_set_opmode ( struct ath5k_hw ah)

ath5k_hw_set_opmode - Set PCU operating mode

: The &struct ath5k_hw

Initialize PCU for the various operating modes (AP/STA etc)

NOTE: ah->ah_op_mode must be set before calling this.

Definition at line 45 of file linux_ks/hwi/ath5k_raw/module/pcu.c.

void ath5k_hw_set_rx_filter ( struct ath5k_hw ah,
u32  filter 
)

ath5k_hw_set_rx_filter - Set rx filter

: The &struct ath5k_hw : RX filter mask (see reg.h)

Sets RX filter register and also handles PHY error filter register on 5212 and newer chips so that we have proper PHY error reporting.

Definition at line 548 of file linux_ks/hwi/ath5k_raw/module/pcu.c.

void ath5k_hw_start_rx_pcu ( struct ath5k_hw ah)

ath5k_hw_start_rx_pcu - Start RX engine

: The &struct ath5k_hw

Starts RX engine on PCU so that hw can process RXed frames (ACK etc).

NOTE: RX DMA should be already enabled using ath5k_hw_start_rx_dma TODO: Init ANI here

Definition at line 439 of file linux_ks/hwi/ath5k_raw/module/pcu.c.

void ath5k_hw_stop_rx_pcu ( struct ath5k_hw ah)

at5k_hw_stop_rx_pcu - Stop RX engine

: The &struct ath5k_hw

Stops RX engine on PCU

TODO: Detach ANI here

Definition at line 454 of file linux_ks/hwi/ath5k_raw/module/pcu.c.

void ath5k_hw_update_mib_counters ( struct ath5k_hw ah,
struct ieee80211_low_level_stats stats 
)

ath5k_hw_update - Update mib counters (mac layer statistics)

: The &struct ath5k_hw : The &struct ieee80211_low_level_stats we use to track statistics on the driver

Reads MIB counters from PCU and updates sw statistics. Must be called after a MIB interrupt.

Definition at line 93 of file linux_ks/hwi/ath5k_raw/module/pcu.c.



ros_rt_wmp
Author(s): Danilo Tardioli, dantard@unizar.es
autogenerated on Fri Jan 3 2014 12:07:57