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

Go to the source code of this file.

Macros

#define WAIT_FOR_BBP(__dev, __reg)   rt2800_regbusy_read((__dev), BBP_CSR_CFG, BBP_CSR_CFG_BUSY, (__reg))
 
#define WAIT_FOR_RFCSR(__dev, __reg)   rt2800_regbusy_read((__dev), RF_CSR_CFG, RF_CSR_CFG_BUSY, (__reg))
 
#define WAIT_FOR_RF(__dev, __reg)   rt2800_regbusy_read((__dev), RF_CSR_CFG0, RF_CSR_CFG0_BUSY, (__reg))
 
#define WAIT_FOR_MCU(__dev, __reg)
 
#define POWER_BOUND   0x27
 
#define FREQ_OFFSET_BOUND   0x5f
 

Functions

void rt2800_mcu_request (struct rt2x00_dev *rt2x00dev, const u8 command, const u8 token, const u8 arg0, const u8 arg1)
 
 EXPORT_SYMBOL_GPL (rt2800_mcu_request)
 
int rt2800_wait_csr_ready (struct rt2x00_dev *rt2x00dev)
 
 EXPORT_SYMBOL_GPL (rt2800_wait_csr_ready)
 
int rt2800_wait_wpdma_ready (struct rt2x00_dev *rt2x00dev)
 
 EXPORT_SYMBOL_GPL (rt2800_wait_wpdma_ready)
 
void rt2800_disable_wpdma (struct rt2x00_dev *rt2x00dev)
 
 EXPORT_SYMBOL_GPL (rt2800_disable_wpdma)
 
int rt2800_check_firmware (struct rt2x00_dev *rt2x00dev, const u8 *data, const size_t len)
 
 EXPORT_SYMBOL_GPL (rt2800_check_firmware)
 
int rt2800_load_firmware (struct rt2x00_dev *rt2x00dev, const u8 *data, const size_t len)
 
 EXPORT_SYMBOL_GPL (rt2800_load_firmware)
 
void rt2800_write_tx_data (struct queue_entry *entry, struct txentry_desc *txdesc)
 
 EXPORT_SYMBOL_GPL (rt2800_write_tx_data)
 
void rt2800_process_rxwi (struct queue_entry *entry, struct rxdone_entry_desc *rxdesc)
 
 EXPORT_SYMBOL_GPL (rt2800_process_rxwi)
 
void rt2800_txdone_entry (struct queue_entry *entry, u32 status, __le32 *txwi)
 
 EXPORT_SYMBOL_GPL (rt2800_txdone_entry)
 
void rt2800_write_beacon (struct queue_entry *entry, struct txentry_desc *txdesc)
 
 EXPORT_SYMBOL_GPL (rt2800_write_beacon)
 
void rt2800_clear_beacon (struct queue_entry *entry)
 
 EXPORT_SYMBOL_GPL (rt2800_clear_beacon)
 
int rt2800_rfkill_poll (struct rt2x00_dev *rt2x00dev)
 
 EXPORT_SYMBOL_GPL (rt2800_rfkill_poll)
 
int rt2800_config_shared_key (struct rt2x00_dev *rt2x00dev, struct rt2x00lib_crypto *crypto, struct ieee80211_key_conf *key)
 
 EXPORT_SYMBOL_GPL (rt2800_config_shared_key)
 
int rt2800_config_pairwise_key (struct rt2x00_dev *rt2x00dev, struct rt2x00lib_crypto *crypto, struct ieee80211_key_conf *key)
 
 EXPORT_SYMBOL_GPL (rt2800_config_pairwise_key)
 
int rt2800_sta_add (struct rt2x00_dev *rt2x00dev, struct ieee80211_vif *vif, struct ieee80211_sta *sta)
 
 EXPORT_SYMBOL_GPL (rt2800_sta_add)
 
int rt2800_sta_remove (struct rt2x00_dev *rt2x00dev, int wcid)
 
 EXPORT_SYMBOL_GPL (rt2800_sta_remove)
 
void rt2800_config_filter (struct rt2x00_dev *rt2x00dev, const unsigned int filter_flags)
 
 EXPORT_SYMBOL_GPL (rt2800_config_filter)
 
void rt2800_config_intf (struct rt2x00_dev *rt2x00dev, struct rt2x00_intf *intf, struct rt2x00intf_conf *conf, const unsigned int flags)
 
 EXPORT_SYMBOL_GPL (rt2800_config_intf)
 
void rt2800_config_erp (struct rt2x00_dev *rt2x00dev, struct rt2x00lib_erp *erp, u32 changed)
 
 EXPORT_SYMBOL_GPL (rt2800_config_erp)
 
void rt2800_config_ant (struct rt2x00_dev *rt2x00dev, struct antenna_setup *ant)
 
 EXPORT_SYMBOL_GPL (rt2800_config_ant)
 
void rt2800_gain_calibration (struct rt2x00_dev *rt2x00dev)
 
 EXPORT_SYMBOL_GPL (rt2800_gain_calibration)
 
void rt2800_vco_calibration (struct rt2x00_dev *rt2x00dev)
 
 EXPORT_SYMBOL_GPL (rt2800_vco_calibration)
 
void rt2800_config (struct rt2x00_dev *rt2x00dev, struct rt2x00lib_conf *libconf, const unsigned int flags)
 
 EXPORT_SYMBOL_GPL (rt2800_config)
 
void rt2800_link_stats (struct rt2x00_dev *rt2x00dev, struct link_qual *qual)
 
 EXPORT_SYMBOL_GPL (rt2800_link_stats)
 
void rt2800_reset_tuner (struct rt2x00_dev *rt2x00dev, struct link_qual *qual)
 
 EXPORT_SYMBOL_GPL (rt2800_reset_tuner)
 
void rt2800_link_tuner (struct rt2x00_dev *rt2x00dev, struct link_qual *qual, const u32 count)
 
 EXPORT_SYMBOL_GPL (rt2800_link_tuner)
 
int rt2800_enable_radio (struct rt2x00_dev *rt2x00dev)
 
 EXPORT_SYMBOL_GPL (rt2800_enable_radio)
 
void rt2800_disable_radio (struct rt2x00_dev *rt2x00dev)
 
 EXPORT_SYMBOL_GPL (rt2800_disable_radio)
 
int rt2800_efuse_detect (struct rt2x00_dev *rt2x00dev)
 
 EXPORT_SYMBOL_GPL (rt2800_efuse_detect)
 
void rt2800_read_eeprom_efuse (struct rt2x00_dev *rt2x00dev)
 
 EXPORT_SYMBOL_GPL (rt2800_read_eeprom_efuse)
 
int rt2800_probe_hw (struct rt2x00_dev *rt2x00dev)
 
 EXPORT_SYMBOL_GPL (rt2800_probe_hw)
 
void rt2800_get_tkip_seq (struct ieee80211_hw *hw, u8 hw_key_idx, u32 *iv32, u16 *iv16)
 
 EXPORT_SYMBOL_GPL (rt2800_get_tkip_seq)
 
int rt2800_set_rts_threshold (struct ieee80211_hw *hw, u32 value)
 
 EXPORT_SYMBOL_GPL (rt2800_set_rts_threshold)
 
int rt2800_conf_tx (struct ieee80211_hw *hw, struct ieee80211_vif *vif, u16 queue_idx, const struct ieee80211_tx_queue_params *params)
 
 EXPORT_SYMBOL_GPL (rt2800_conf_tx)
 
u64 rt2800_get_tsf (struct ieee80211_hw *hw, struct ieee80211_vif *vif)
 
 EXPORT_SYMBOL_GPL (rt2800_get_tsf)
 
int rt2800_ampdu_action (struct ieee80211_hw *hw, struct ieee80211_vif *vif, enum ieee80211_ampdu_mlme_action action, struct ieee80211_sta *sta, u16 tid, u16 *ssn, u8 buf_size)
 
 EXPORT_SYMBOL_GPL (rt2800_ampdu_action)
 
int rt2800_get_survey (struct ieee80211_hw *hw, int idx, struct survey_info *survey)
 
 EXPORT_SYMBOL_GPL (rt2800_get_survey)
 
 MODULE_AUTHOR (DRV_PROJECT", Bartlomiej Zolnierkiewicz")
 
 MODULE_VERSION (DRV_VERSION)
 
 MODULE_DESCRIPTION ("Ralink RT2800 library")
 
 MODULE_LICENSE ("GPL")
 

Macro Definition Documentation

#define FREQ_OFFSET_BOUND   0x5f

Definition at line 1992 of file rt2800lib.c.

#define POWER_BOUND   0x27

Definition at line 1991 of file rt2800lib.c.

#define WAIT_FOR_BBP (   __dev,
  __reg 
)    rt2800_regbusy_read((__dev), BBP_CSR_CFG, BBP_CSR_CFG_BUSY, (__reg))

Definition at line 60 of file rt2800lib.c.

#define WAIT_FOR_MCU (   __dev,
  __reg 
)
Value:
rt2800_regbusy_read((__dev), H2M_MAILBOX_CSR, \

Definition at line 66 of file rt2800lib.c.

#define WAIT_FOR_RF (   __dev,
  __reg 
)    rt2800_regbusy_read((__dev), RF_CSR_CFG0, RF_CSR_CFG0_BUSY, (__reg))

Definition at line 64 of file rt2800lib.c.

#define WAIT_FOR_RFCSR (   __dev,
  __reg 
)    rt2800_regbusy_read((__dev), RF_CSR_CFG, RF_CSR_CFG_BUSY, (__reg))

Definition at line 62 of file rt2800lib.c.

Function Documentation

EXPORT_SYMBOL_GPL ( rt2800_mcu_request  )
EXPORT_SYMBOL_GPL ( rt2800_wait_csr_ready  )
EXPORT_SYMBOL_GPL ( rt2800_wait_wpdma_ready  )
EXPORT_SYMBOL_GPL ( rt2800_disable_wpdma  )
EXPORT_SYMBOL_GPL ( rt2800_check_firmware  )
EXPORT_SYMBOL_GPL ( rt2800_load_firmware  )
EXPORT_SYMBOL_GPL ( rt2800_write_tx_data  )
EXPORT_SYMBOL_GPL ( rt2800_process_rxwi  )
EXPORT_SYMBOL_GPL ( rt2800_txdone_entry  )
EXPORT_SYMBOL_GPL ( rt2800_write_beacon  )
EXPORT_SYMBOL_GPL ( rt2800_clear_beacon  )
EXPORT_SYMBOL_GPL ( rt2800_rfkill_poll  )
EXPORT_SYMBOL_GPL ( rt2800_config_shared_key  )
EXPORT_SYMBOL_GPL ( rt2800_config_pairwise_key  )
EXPORT_SYMBOL_GPL ( rt2800_sta_add  )
EXPORT_SYMBOL_GPL ( rt2800_sta_remove  )
EXPORT_SYMBOL_GPL ( rt2800_config_filter  )
EXPORT_SYMBOL_GPL ( rt2800_config_intf  )
EXPORT_SYMBOL_GPL ( rt2800_config_erp  )
EXPORT_SYMBOL_GPL ( rt2800_config_ant  )
EXPORT_SYMBOL_GPL ( rt2800_gain_calibration  )
EXPORT_SYMBOL_GPL ( rt2800_vco_calibration  )
EXPORT_SYMBOL_GPL ( rt2800_config  )
EXPORT_SYMBOL_GPL ( rt2800_link_stats  )
EXPORT_SYMBOL_GPL ( rt2800_reset_tuner  )
EXPORT_SYMBOL_GPL ( rt2800_link_tuner  )
EXPORT_SYMBOL_GPL ( rt2800_enable_radio  )
EXPORT_SYMBOL_GPL ( rt2800_disable_radio  )
EXPORT_SYMBOL_GPL ( rt2800_efuse_detect  )
EXPORT_SYMBOL_GPL ( rt2800_read_eeprom_efuse  )
EXPORT_SYMBOL_GPL ( rt2800_probe_hw  )
EXPORT_SYMBOL_GPL ( rt2800_get_tkip_seq  )
EXPORT_SYMBOL_GPL ( rt2800_set_rts_threshold  )
EXPORT_SYMBOL_GPL ( rt2800_conf_tx  )
EXPORT_SYMBOL_GPL ( rt2800_get_tsf  )
EXPORT_SYMBOL_GPL ( rt2800_ampdu_action  )
EXPORT_SYMBOL_GPL ( rt2800_get_survey  )
MODULE_AUTHOR ( DRV_PROJECT ,
Bartlomiej Zolnierkiewicz"   
)
MODULE_DESCRIPTION ( "Ralink RT2800 library"  )
MODULE_LICENSE ( "GPL"  )
MODULE_VERSION ( DRV_VERSION  )
int rt2800_ampdu_action ( struct ieee80211_hw hw,
struct ieee80211_vif vif,
enum ieee80211_ampdu_mlme_action  action,
struct ieee80211_sta sta,
u16  tid,
u16 ssn,
u8  buf_size 
)

Definition at line 5401 of file rt2800lib.c.

int rt2800_check_firmware ( struct rt2x00_dev rt2x00dev,
const u8 data,
const size_t  len 
)

Definition at line 405 of file rt2800lib.c.

void rt2800_clear_beacon ( struct queue_entry *  entry)

Definition at line 848 of file rt2800lib.c.

int rt2800_conf_tx ( struct ieee80211_hw hw,
struct ieee80211_vif vif,
u16  queue_idx,
const struct ieee80211_tx_queue_params params 
)

Definition at line 5317 of file rt2800lib.c.

void rt2800_config ( struct rt2x00_dev rt2x00dev,
struct rt2x00lib_conf libconf,
const unsigned int  flags 
)

Definition at line 2838 of file rt2800lib.c.

void rt2800_config_ant ( struct rt2x00_dev rt2x00dev,
struct antenna_setup ant 
)

Definition at line 1579 of file rt2800lib.c.

void rt2800_config_erp ( struct rt2x00_dev rt2x00dev,
struct rt2x00lib_erp erp,
u32  changed 
)

Definition at line 1474 of file rt2800lib.c.

void rt2800_config_filter ( struct rt2x00_dev rt2x00dev,
const unsigned int  filter_flags 
)

Definition at line 1263 of file rt2800lib.c.

void rt2800_config_intf ( struct rt2x00_dev rt2x00dev,
struct rt2x00_intf intf,
struct rt2x00intf_conf conf,
const unsigned int  flags 
)

Definition at line 1309 of file rt2800lib.c.

int rt2800_config_pairwise_key ( struct rt2x00_dev rt2x00dev,
struct rt2x00lib_crypto crypto,
struct ieee80211_key_conf key 
)

Definition at line 1179 of file rt2800lib.c.

int rt2800_config_shared_key ( struct rt2x00_dev rt2x00dev,
struct rt2x00lib_crypto crypto,
struct ieee80211_key_conf key 
)

Definition at line 1094 of file rt2800lib.c.

void rt2800_disable_radio ( struct rt2x00_dev rt2x00dev)

Definition at line 4492 of file rt2800lib.c.

void rt2800_disable_wpdma ( struct rt2x00_dev rt2x00dev)

Definition at line 359 of file rt2800lib.c.

int rt2800_efuse_detect ( struct rt2x00_dev rt2x00dev)

Definition at line 4508 of file rt2800lib.c.

int rt2800_enable_radio ( struct rt2x00_dev rt2x00dev)

Definition at line 4423 of file rt2800lib.c.

void rt2800_gain_calibration ( struct rt2x00_dev rt2x00dev)

Definition at line 2711 of file rt2800lib.c.

int rt2800_get_survey ( struct ieee80211_hw hw,
int  idx,
struct survey_info survey 
)

Definition at line 5445 of file rt2800lib.c.

void rt2800_get_tkip_seq ( struct ieee80211_hw hw,
u8  hw_key_idx,
u32 iv32,
u16 iv16 
)

Definition at line 5263 of file rt2800lib.c.

u64 rt2800_get_tsf ( struct ieee80211_hw hw,
struct ieee80211_vif vif 
)

Definition at line 5386 of file rt2800lib.c.

void rt2800_link_stats ( struct rt2x00_dev rt2x00dev,
struct link_qual qual 
)

Definition at line 2864 of file rt2800lib.c.

void rt2800_link_tuner ( struct rt2x00_dev rt2x00dev,
struct link_qual qual,
const u32  count 
)

Definition at line 2922 of file rt2800lib.c.

int rt2800_load_firmware ( struct rt2x00_dev rt2x00dev,
const u8 data,
const size_t  len 
)

Definition at line 459 of file rt2800lib.c.

void rt2800_mcu_request ( struct rt2x00_dev rt2x00dev,
const u8  command,
const u8  token,
const u8  arg0,
const u8  arg1 
)

Definition at line 285 of file rt2800lib.c.

int rt2800_probe_hw ( struct rt2x00_dev rt2x00dev)

Definition at line 5194 of file rt2800lib.c.

void rt2800_process_rxwi ( struct queue_entry *  entry,
struct rxdone_entry_desc rxdesc 
)

Definition at line 639 of file rt2800lib.c.

void rt2800_read_eeprom_efuse ( struct rt2x00_dev rt2x00dev)

Definition at line 4569 of file rt2800lib.c.

void rt2800_reset_tuner ( struct rt2x00_dev rt2x00dev,
struct link_qual qual 
)

Definition at line 2916 of file rt2800lib.c.

int rt2800_rfkill_poll ( struct rt2x00_dev rt2x00dev)

Definition at line 918 of file rt2800lib.c.

int rt2800_set_rts_threshold ( struct ieee80211_hw hw,
u32  value 
)

Definition at line 5279 of file rt2800lib.c.

int rt2800_sta_add ( struct rt2x00_dev rt2x00dev,
struct ieee80211_vif vif,
struct ieee80211_sta sta 
)

Definition at line 1216 of file rt2800lib.c.

int rt2800_sta_remove ( struct rt2x00_dev rt2x00dev,
int  wcid 
)

Definition at line 1251 of file rt2800lib.c.

void rt2800_txdone_entry ( struct queue_entry *  entry,
u32  status,
__le32 txwi 
)

Definition at line 685 of file rt2800lib.c.

void rt2800_vco_calibration ( struct rt2x00_dev rt2x00dev)

Definition at line 2718 of file rt2800lib.c.

int rt2800_wait_csr_ready ( struct rt2x00_dev rt2x00dev)

Definition at line 319 of file rt2800lib.c.

int rt2800_wait_wpdma_ready ( struct rt2x00_dev rt2x00dev)

Definition at line 336 of file rt2800lib.c.

void rt2800_write_beacon ( struct queue_entry *  entry,
struct txentry_desc txdesc 
)

Definition at line 765 of file rt2800lib.c.

void rt2800_write_tx_data ( struct queue_entry *  entry,
struct txentry_desc txdesc 
)

Definition at line 538 of file rt2800lib.c.