Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Macros | Functions
rt2x00link.c File Reference
#include <linux/kernel.h>
#include <linux/module.h>
#include "rt2x00.h"
#include "rt2x00lib.h"

Go to the source code of this file.

Macros

#define DEFAULT_RSSI   -128
 
#define AVG_SAMPLES   8
 
#define AVG_FACTOR   1000
 
#define MOVING_AVERAGE(__avg, __val)
 

Functions

void rt2x00link_update_stats (struct rt2x00_dev *rt2x00dev, struct sk_buff *skb, struct rxdone_entry_desc *rxdesc)
 
void rt2x00link_start_tuner (struct rt2x00_dev *rt2x00dev)
 
void rt2x00link_stop_tuner (struct rt2x00_dev *rt2x00dev)
 
void rt2x00link_reset_tuner (struct rt2x00_dev *rt2x00dev, bool antenna)
 
void rt2x00link_start_watchdog (struct rt2x00_dev *rt2x00dev)
 
void rt2x00link_stop_watchdog (struct rt2x00_dev *rt2x00dev)
 
void rt2x00link_start_agc (struct rt2x00_dev *rt2x00dev)
 
void rt2x00link_start_vcocal (struct rt2x00_dev *rt2x00dev)
 
void rt2x00link_stop_agc (struct rt2x00_dev *rt2x00dev)
 
void rt2x00link_stop_vcocal (struct rt2x00_dev *rt2x00dev)
 
void rt2x00link_register (struct rt2x00_dev *rt2x00dev)
 

Macro Definition Documentation

#define AVG_FACTOR   1000

Definition at line 62 of file rt2x00link.c.

#define AVG_SAMPLES   8

Definition at line 61 of file rt2x00link.c.

#define DEFAULT_RSSI   -128

Definition at line 36 of file rt2x00link.c.

#define MOVING_AVERAGE (   __avg,
  __val 
)
Value:
({ \
struct avg_val __new; \
__new.avg_weight = \
(__avg).avg_weight ? \
((((__avg).avg_weight * ((AVG_SAMPLES) - 1)) + \
((__val) * (AVG_FACTOR))) / \
(AVG_SAMPLES)) : \
((__val) * (AVG_FACTOR)); \
__new.avg = __new.avg_weight / (AVG_FACTOR); \
__new; \
})

Definition at line 63 of file rt2x00link.c.

Function Documentation

void rt2x00link_register ( struct rt2x00_dev rt2x00dev)

rt2x00link_register - Initialize link tuning & watchdog functionality : Pointer to &struct rt2x00_dev.

Initialize work structure and all link tuning and watchdog related parameters. This will not start the periodic work itself.

Definition at line 513 of file rt2x00link.c.

void rt2x00link_reset_tuner ( struct rt2x00_dev rt2x00dev,
bool  antenna 
)

rt2x00link_reset_tuner - Reset periodic link tuner work : Pointer to &struct rt2x00_dev. : Should the antenna tuning also be reset

The VGC limit configured in the hardware will be reset to 0 which forces the driver to rediscover the correct value for the current association. This is needed when configuration options have changed which could drastically change the SNR level or link quality (i.e. changing the antenna setting).

Resetting the link tuner will also cause the periodic work counter to be reset. Any driver which has a fixed limit on the number of rounds the link tuner is supposed to work will accept the tuner actions again if this limit was previously reached.

If is set to true a the software antenna diversity tuning will also be reset.

Definition at line 294 of file rt2x00link.c.

void rt2x00link_start_agc ( struct rt2x00_dev rt2x00dev)

rt2x00link_start_agc - Start periodic gain calibration : Pointer to &struct rt2x00_dev.

Definition at line 439 of file rt2x00link.c.

void rt2x00link_start_tuner ( struct rt2x00_dev rt2x00dev)

rt2x00link_start_tuner - Start periodic link tuner work : Pointer to &struct rt2x00_dev.

This start the link tuner periodic work, this work will be executed periodically until &rt2x00link_stop_tuner has been called.

While scanning, link tuning is disabled. By default the most sensitive settings will be used to make sure that all beacons and probe responses will be received during the scan.

Definition at line 260 of file rt2x00link.c.

void rt2x00link_start_vcocal ( struct rt2x00_dev rt2x00dev)

rt2x00link_start_vcocal - Start periodic VCO calibration : Pointer to &struct rt2x00_dev.

Definition at line 450 of file rt2x00link.c.

void rt2x00link_start_watchdog ( struct rt2x00_dev rt2x00dev)

rt2x00link_start_watchdog - Start periodic watchdog monitoring : Pointer to &struct rt2x00_dev.

This start the watchdog periodic work, this work will *be executed periodically until &rt2x00link_stop_watchdog has been called.

Definition at line 402 of file rt2x00link.c.

void rt2x00link_stop_agc ( struct rt2x00_dev rt2x00dev)

rt2x00link_stop_agc - Stop periodic gain calibration : Pointer to &struct rt2x00_dev.

Definition at line 461 of file rt2x00link.c.

void rt2x00link_stop_tuner ( struct rt2x00_dev rt2x00dev)

rt2x00link_stop_tuner - Stop periodic link tuner work : Pointer to &struct rt2x00_dev.

After this function completed the link tuner will not be running until &rt2x00link_start_tuner is called.

Definition at line 289 of file rt2x00link.c.

void rt2x00link_stop_vcocal ( struct rt2x00_dev rt2x00dev)

rt2x00link_stop_vcocal - Stop periodic VCO calibration : Pointer to &struct rt2x00_dev.

Definition at line 466 of file rt2x00link.c.

void rt2x00link_stop_watchdog ( struct rt2x00_dev rt2x00dev)

rt2x00link_stop_watchdog - Stop periodic watchdog monitoring : Pointer to &struct rt2x00_dev.

After this function completed the watchdog monitoring will not be running until &rt2x00link_start_watchdog is called.

Definition at line 413 of file rt2x00link.c.

void rt2x00link_update_stats ( struct rt2x00_dev rt2x00dev,
struct sk_buff skb,
struct rxdone_entry_desc rxdesc 
)

rt2x00link_update_stats - Update link statistics from RX frame : Pointer to &struct rt2x00_dev. : Received frame : Received frame descriptor

Update link statistics based on the information from the received frame descriptor.

Definition at line 219 of file rt2x00link.c.