Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Enumerations | Functions | Variables
3945.h File Reference
#include <linux/pci.h>
#include <linux/kernel.h>
#include <net/ieee80211_radiotap.h>
#include "common.h"

Go to the source code of this file.

Data Structures

struct  il3945_rate_scale_data
 
struct  il3945_rs_sta
 
struct  il3945_sta_priv
 
struct  il3945_frame
 
struct  il3945_ibss_seq
 
struct  il3945_eeprom_txpower_sample
 
struct  il3945_eeprom_txpower_group
 
struct  il3945_eeprom_temperature_corr
 
struct  il3945_eeprom
 
struct  il3945_shared
 
struct  il3945_tfd_tb
 
struct  il3945_tfd
 

Macros

#define IL3945_UCODE_API_MAX   2
 
#define IL3945_UCODE_API_MIN   1
 
#define IL3945_FW_PRE   "iwlwifi-3945-"
 
#define _IL3945_MODULE_FIRMWARE(api)   IL3945_FW_PRE #api ".ucode"
 
#define IL3945_MODULE_FIRMWARE(api)   _IL3945_MODULE_FIRMWARE(api)
 
#define IL_NOISE_MEAS_NOT_AVAILABLE   (-127)
 
#define DEFAULT_RTS_THRESHOLD   2347U
 
#define MIN_RTS_THRESHOLD   0U
 
#define MAX_RTS_THRESHOLD   2347U
 
#define MAX_MSDU_SIZE   2304U
 
#define MAX_MPDU_SIZE   2346U
 
#define DEFAULT_BEACON_INTERVAL   100U
 
#define DEFAULT_SHORT_RETRY_LIMIT   7U
 
#define DEFAULT_LONG_RETRY_LIMIT   4U
 
#define IL_TX_FIFO_AC0   0
 
#define IL_TX_FIFO_AC1   1
 
#define IL_TX_FIFO_AC2   2
 
#define IL_TX_FIFO_AC3   3
 
#define IL_TX_FIFO_HCCA_1   5
 
#define IL_TX_FIFO_HCCA_2   6
 
#define IL_TX_FIFO_NONE   7
 
#define IEEE80211_DATA_LEN   2304
 
#define IEEE80211_4ADDR_LEN   30
 
#define IEEE80211_HLEN   (IEEE80211_4ADDR_LEN)
 
#define IEEE80211_FRAME_LEN   (IEEE80211_DATA_LEN + IEEE80211_HLEN)
 
#define SEQ_TO_SN(seq)   (((seq) & IEEE80211_SCTL_SEQ) >> 4)
 
#define SN_TO_SEQ(ssn)   (((ssn) << 4) & IEEE80211_SCTL_SEQ)
 
#define MAX_SN   ((IEEE80211_SCTL_SEQ) >> 4)
 
#define SUP_RATE_11A_MAX_NUM_CHANNELS   8
 
#define SUP_RATE_11B_MAX_NUM_CHANNELS   4
 
#define SUP_RATE_11G_MAX_NUM_CHANNELS   12
 
#define IL_SUPPORTED_RATES_IE_LEN   8
 
#define SCAN_INTERVAL   100
 
#define MAX_TID_COUNT   9
 
#define IL_INVALID_RATE   0xFF
 
#define IL_INVALID_VALUE   -1
 
#define STA_PS_STATUS_WAKE   0
 
#define STA_PS_STATUS_SLEEP   1
 
#define IL_RX_HDR(x)
 
#define IL_RX_END(x)
 
#define IL_RX_STATS(x)   (&x->u.rx_frame.stats)
 
#define IL_RX_DATA(x)   (IL_RX_HDR(x)->payload)
 
#define IL39_RSSI_OFFSET   95
 
#define EEPROM_SKU_CAP_OP_MODE_MRC   (1 << 7)
 
#define IL_NUM_TX_CALIB_GROUPS   5
 
#define IL3945_EEPROM_IMG_SIZE   1024
 
#define PCI_CFG_REV_ID_BIT_BASIC_SKU   (0x40) /* bit 6 */
 
#define PCI_CFG_REV_ID_BIT_RTP   (0x80) /* bit 7 */
 
#define IL39_NUM_QUEUES   5
 
#define IL39_CMD_QUEUE_NUM   4
 
#define IL_DEFAULT_TX_RETRY   15
 
#define RFD_SIZE   4
 
#define NUM_TFD_CHUNKS   4
 
#define TFD_CTL_COUNT_SET(n)   (n << 24)
 
#define TFD_CTL_COUNT_GET(ctl)   ((ctl >> 24) & 7)
 
#define TFD_CTL_PAD_SET(n)   (n << 28)
 
#define TFD_CTL_PAD_GET(ctl)   (ctl >> 28)
 
#define IL39_RTC_INST_LOWER_BOUND   (0x000000)
 
#define IL39_RTC_INST_UPPER_BOUND   (0x014000)
 
#define IL39_RTC_DATA_LOWER_BOUND   (0x800000)
 
#define IL39_RTC_DATA_UPPER_BOUND   (0x808000)
 
#define IL39_RTC_INST_SIZE
 
#define IL39_RTC_DATA_SIZE
 
#define IL39_MAX_INST_SIZE   IL39_RTC_INST_SIZE
 
#define IL39_MAX_DATA_SIZE   IL39_RTC_DATA_SIZE
 
#define IL39_MAX_BSM_SIZE   IL39_RTC_INST_SIZE
 
#define FH39_MEM_LOWER_BOUND   (0x0800)
 
#define FH39_MEM_UPPER_BOUND   (0x1000)
 
#define FH39_CBCC_TBL   (FH39_MEM_LOWER_BOUND + 0x140)
 
#define FH39_TFDB_TBL   (FH39_MEM_LOWER_BOUND + 0x180)
 
#define FH39_RCSR_TBL   (FH39_MEM_LOWER_BOUND + 0x400)
 
#define FH39_RSSR_TBL   (FH39_MEM_LOWER_BOUND + 0x4c0)
 
#define FH39_TCSR_TBL   (FH39_MEM_LOWER_BOUND + 0x500)
 
#define FH39_TSSR_TBL   (FH39_MEM_LOWER_BOUND + 0x680)
 
#define FH39_TFDB(_ch, buf)
 
#define FH39_TFDB_CHNL_BUF_CTRL_REG(_ch)   (FH39_TFDB_TBL + 0x50 * (_ch))
 
#define FH39_CBCC(_ch)   (FH39_CBCC_TBL + (_ch) * 0x8)
 
#define FH39_CBCC_CTRL(_ch)   (FH39_CBCC(_ch) + 0x00)
 
#define FH39_CBCC_BASE(_ch)   (FH39_CBCC(_ch) + 0x04)
 
#define FH39_RCSR(_ch)   (FH39_RCSR_TBL + (_ch) * 0x40)
 
#define FH39_RCSR_CONFIG(_ch)   (FH39_RCSR(_ch) + 0x00)
 
#define FH39_RCSR_RBD_BASE(_ch)   (FH39_RCSR(_ch) + 0x04)
 
#define FH39_RCSR_WPTR(_ch)   (FH39_RCSR(_ch) + 0x20)
 
#define FH39_RCSR_RPTR_ADDR(_ch)   (FH39_RCSR(_ch) + 0x24)
 
#define FH39_RSCSR_CHNL0_WPTR   (FH39_RCSR_WPTR(0))
 
#define FH39_RSSR_CTRL   (FH39_RSSR_TBL + 0x000)
 
#define FH39_RSSR_STATUS   (FH39_RSSR_TBL + 0x004)
 
#define FH39_TCSR(_ch)   (FH39_TCSR_TBL + (_ch) * 0x20)
 
#define FH39_TCSR_CONFIG(_ch)   (FH39_TCSR(_ch) + 0x00)
 
#define FH39_TCSR_CREDIT(_ch)   (FH39_TCSR(_ch) + 0x04)
 
#define FH39_TCSR_BUFF_STTS(_ch)   (FH39_TCSR(_ch) + 0x08)
 
#define FH39_TSSR_CBB_BASE   (FH39_TSSR_TBL + 0x000)
 
#define FH39_TSSR_MSG_CONFIG   (FH39_TSSR_TBL + 0x008)
 
#define FH39_TSSR_TX_STATUS   (FH39_TSSR_TBL + 0x010)
 
#define FH39_SRVC_CHNL   (6)
 
#define FH39_RCSR_RX_CONFIG_REG_POS_RBDC_SIZE   (20)
 
#define FH39_RCSR_RX_CONFIG_REG_POS_IRQ_RBTH   (4)
 
#define FH39_RCSR_RX_CONFIG_REG_BIT_WR_STTS_EN   (0x08000000)
 
#define FH39_RCSR_RX_CONFIG_REG_VAL_DMA_CHNL_EN_ENABLE   (0x80000000)
 
#define FH39_RCSR_RX_CONFIG_REG_VAL_RDRBD_EN_ENABLE   (0x20000000)
 
#define FH39_RCSR_RX_CONFIG_REG_VAL_MAX_FRAG_SIZE_128   (0x01000000)
 
#define FH39_RCSR_RX_CONFIG_REG_VAL_IRQ_DEST_INT_HOST   (0x00001000)
 
#define FH39_RCSR_RX_CONFIG_REG_VAL_MSG_MODE_FH   (0x00000000)
 
#define FH39_TCSR_TX_CONFIG_REG_VAL_MSG_MODE_TXF   (0x00000000)
 
#define FH39_TCSR_TX_CONFIG_REG_VAL_MSG_MODE_DRIVER   (0x00000001)
 
#define FH39_TCSR_TX_CONFIG_REG_VAL_DMA_CREDIT_DISABLE_VAL   (0x00000000)
 
#define FH39_TCSR_TX_CONFIG_REG_VAL_DMA_CREDIT_ENABLE_VAL   (0x00000008)
 
#define FH39_TCSR_TX_CONFIG_REG_VAL_CIRQ_HOST_IFTFD   (0x00200000)
 
#define FH39_TCSR_TX_CONFIG_REG_VAL_CIRQ_RTC_NOINT   (0x00000000)
 
#define FH39_TCSR_TX_CONFIG_REG_VAL_DMA_CHNL_PAUSE   (0x00000000)
 
#define FH39_TCSR_TX_CONFIG_REG_VAL_DMA_CHNL_ENABLE   (0x80000000)
 
#define FH39_TCSR_CHNL_TX_BUF_STS_REG_VAL_TFDB_VALID   (0x00004000)
 
#define FH39_TCSR_CHNL_TX_BUF_STS_REG_BIT_TFDB_WPTR   (0x00000001)
 
#define FH39_TSSR_TX_MSG_CONFIG_REG_VAL_SNOOP_RD_TXPD_ON   (0xFF000000)
 
#define FH39_TSSR_TX_MSG_CONFIG_REG_VAL_ORDER_RD_TXPD_ON   (0x00FF0000)
 
#define FH39_TSSR_TX_MSG_CONFIG_REG_VAL_MAX_FRAG_SIZE_128B   (0x00000400)
 
#define FH39_TSSR_TX_MSG_CONFIG_REG_VAL_SNOOP_RD_TFD_ON   (0x00000100)
 
#define FH39_TSSR_TX_MSG_CONFIG_REG_VAL_ORDER_RD_CBB_ON   (0x00000080)
 
#define FH39_TSSR_TX_MSG_CONFIG_REG_VAL_ORDER_RSP_WAIT_TH   (0x00000020)
 
#define FH39_TSSR_TX_MSG_CONFIG_REG_VAL_RSP_WAIT_TH   (0x00000005)
 
#define FH39_TSSR_TX_STATUS_REG_BIT_BUFS_EMPTY(_ch)   (BIT(_ch) << 24)
 
#define FH39_TSSR_TX_STATUS_REG_BIT_NO_PEND_REQ(_ch)   (BIT(_ch) << 16)
 
#define FH39_TSSR_TX_STATUS_REG_MSK_CHNL_IDLE(_ch)
 
#define FH39_RSSR_CHNL0_RX_STATUS_CHNL_IDLE   (0x01000000)
 

Enumerations

enum  il3945_antenna { IL_ANTENNA_DIVERSITY, IL_ANTENNA_MAIN, IL_ANTENNA_AUX }
 

Functions

int il3945_calc_db_from_ratio (int sig_ratio)
 
void il3945_rx_replenish (void *data)
 
void il3945_rx_queue_reset (struct il_priv *il, struct il_rx_queue *rxq)
 
unsigned int il3945_fill_beacon_frame (struct il_priv *il, struct ieee80211_hdr *hdr, int left)
 
int il3945_dump_nic_event_log (struct il_priv *il, bool full_log, char **buf, bool display)
 
void il3945_dump_nic_error_log (struct il_priv *il)
 
void il3945_hw_handler_setup (struct il_priv *il)
 
void il3945_hw_setup_deferred_work (struct il_priv *il)
 
void il3945_hw_cancel_deferred_work (struct il_priv *il)
 
int il3945_hw_rxq_stop (struct il_priv *il)
 
int il3945_hw_set_hw_params (struct il_priv *il)
 
int il3945_hw_nic_init (struct il_priv *il)
 
int il3945_hw_nic_stop_master (struct il_priv *il)
 
void il3945_hw_txq_ctx_free (struct il_priv *il)
 
void il3945_hw_txq_ctx_stop (struct il_priv *il)
 
int il3945_hw_nic_reset (struct il_priv *il)
 
int il3945_hw_txq_attach_buf_to_tfd (struct il_priv *il, struct il_tx_queue *txq, dma_addr_t addr, u16 len, u8 reset, u8 pad)
 
void il3945_hw_txq_free_tfd (struct il_priv *il, struct il_tx_queue *txq)
 
int il3945_hw_get_temperature (struct il_priv *il)
 
int il3945_hw_tx_queue_init (struct il_priv *il, struct il_tx_queue *txq)
 
unsigned int il3945_hw_get_beacon_cmd (struct il_priv *il, struct il3945_frame *frame, u8 rate)
 
void il3945_hw_build_tx_cmd_rate (struct il_priv *il, struct il_device_cmd *cmd, struct ieee80211_tx_info *info, struct ieee80211_hdr *hdr, int sta_id)
 
int il3945_hw_reg_send_txpower (struct il_priv *il)
 
int il3945_hw_reg_set_txpower (struct il_priv *il, s8 power)
 
void il3945_hdl_stats (struct il_priv *il, struct il_rx_buf *rxb)
 
void il3945_hdl_c_stats (struct il_priv *il, struct il_rx_buf *rxb)
 
void il3945_disable_events (struct il_priv *il)
 
int il4965_get_temperature (const struct il_priv *il)
 
void il3945_post_associate (struct il_priv *il)
 
void il3945_config_ap (struct il_priv *il)
 
int il3945_commit_rxon (struct il_priv *il)
 
u8 il3945_hw_find_station (struct il_priv *il, const u8 *bssid)
 
__le32 il3945_get_antenna_flags (const struct il_priv *il)
 
int il3945_init_hw_rate_table (struct il_priv *il)
 
void il3945_reg_txpower_periodic (struct il_priv *il)
 
int il3945_txpower_set_from_eeprom (struct il_priv *il)
 
int il3945_rs_next_rate (struct il_priv *il, int rate)
 
int il3945_request_scan (struct il_priv *il, struct ieee80211_vif *vif)
 
void il3945_post_scan (struct il_priv *il)
 

Variables

struct pci_device_id il3945_hw_card_ids []
 
struct il_ops il3945_ops
 
struct il_mod_params il3945_mod_params
 
struct il3945_rate_info il3945_rates [RATE_COUNT_3945]
 
struct il3945_eeprom_txpower_sample __packed
 

Macro Definition Documentation

#define _IL3945_MODULE_FIRMWARE (   api)    IL3945_FW_PRE #api ".ucode"

Definition at line 48 of file 3945.h.

#define DEFAULT_BEACON_INTERVAL   100U

Definition at line 126 of file 3945.h.

#define DEFAULT_LONG_RETRY_LIMIT   4U

Definition at line 128 of file 3945.h.

#define DEFAULT_RTS_THRESHOLD   2347U

Definition at line 121 of file 3945.h.

#define DEFAULT_SHORT_RETRY_LIMIT   7U

Definition at line 127 of file 3945.h.

#define EEPROM_SKU_CAP_OP_MODE_MRC   (1 << 7)

Definition at line 286 of file 3945.h.

#define FH39_CBCC (   _ch)    (FH39_CBCC_TBL + (_ch) * 0x8)

Definition at line 502 of file 3945.h.

#define FH39_CBCC_BASE (   _ch)    (FH39_CBCC(_ch) + 0x04)

Definition at line 504 of file 3945.h.

#define FH39_CBCC_CTRL (   _ch)    (FH39_CBCC(_ch) + 0x00)

Definition at line 503 of file 3945.h.

#define FH39_CBCC_TBL   (FH39_MEM_LOWER_BOUND + 0x140)

Definition at line 489 of file 3945.h.

#define FH39_MEM_LOWER_BOUND   (0x0800)

This I/O area is directly read/writable by driver (e.g. Linux uses writel()) Addresses are offsets from device's PCI hardware base address.

Definition at line 486 of file 3945.h.

#define FH39_MEM_UPPER_BOUND   (0x1000)

Definition at line 487 of file 3945.h.

#define FH39_RCSR (   _ch)    (FH39_RCSR_TBL + (_ch) * 0x40)

Definition at line 507 of file 3945.h.

#define FH39_RCSR_CONFIG (   _ch)    (FH39_RCSR(_ch) + 0x00)

Definition at line 508 of file 3945.h.

#define FH39_RCSR_RBD_BASE (   _ch)    (FH39_RCSR(_ch) + 0x04)

Definition at line 509 of file 3945.h.

#define FH39_RCSR_RPTR_ADDR (   _ch)    (FH39_RCSR(_ch) + 0x24)

Definition at line 511 of file 3945.h.

#define FH39_RCSR_RX_CONFIG_REG_BIT_WR_STTS_EN   (0x08000000)

Definition at line 537 of file 3945.h.

#define FH39_RCSR_RX_CONFIG_REG_POS_IRQ_RBTH   (4)

Definition at line 535 of file 3945.h.

#define FH39_RCSR_RX_CONFIG_REG_POS_RBDC_SIZE   (20)

Definition at line 534 of file 3945.h.

#define FH39_RCSR_RX_CONFIG_REG_VAL_DMA_CHNL_EN_ENABLE   (0x80000000)

Definition at line 539 of file 3945.h.

#define FH39_RCSR_RX_CONFIG_REG_VAL_IRQ_DEST_INT_HOST   (0x00001000)

Definition at line 545 of file 3945.h.

#define FH39_RCSR_RX_CONFIG_REG_VAL_MAX_FRAG_SIZE_128   (0x01000000)

Definition at line 543 of file 3945.h.

#define FH39_RCSR_RX_CONFIG_REG_VAL_MSG_MODE_FH   (0x00000000)

Definition at line 547 of file 3945.h.

#define FH39_RCSR_RX_CONFIG_REG_VAL_RDRBD_EN_ENABLE   (0x20000000)

Definition at line 541 of file 3945.h.

#define FH39_RCSR_TBL   (FH39_MEM_LOWER_BOUND + 0x400)

Definition at line 491 of file 3945.h.

#define FH39_RCSR_WPTR (   _ch)    (FH39_RCSR(_ch) + 0x20)

Definition at line 510 of file 3945.h.

#define FH39_RSCSR_CHNL0_WPTR   (FH39_RCSR_WPTR(0))

Definition at line 513 of file 3945.h.

#define FH39_RSSR_CHNL0_RX_STATUS_CHNL_IDLE   (0x01000000)

Definition at line 584 of file 3945.h.

#define FH39_RSSR_CTRL   (FH39_RSSR_TBL + 0x000)

Definition at line 516 of file 3945.h.

#define FH39_RSSR_STATUS   (FH39_RSSR_TBL + 0x004)

Definition at line 517 of file 3945.h.

#define FH39_RSSR_TBL   (FH39_MEM_LOWER_BOUND + 0x4c0)

Definition at line 492 of file 3945.h.

#define FH39_SRVC_CHNL   (6)

Definition at line 532 of file 3945.h.

#define FH39_TCSR (   _ch)    (FH39_TCSR_TBL + (_ch) * 0x20)

Definition at line 520 of file 3945.h.

#define FH39_TCSR_BUFF_STTS (   _ch)    (FH39_TCSR(_ch) + 0x08)

Definition at line 523 of file 3945.h.

#define FH39_TCSR_CHNL_TX_BUF_STS_REG_BIT_TFDB_WPTR   (0x00000001)

Definition at line 564 of file 3945.h.

#define FH39_TCSR_CHNL_TX_BUF_STS_REG_VAL_TFDB_VALID   (0x00004000)

Definition at line 562 of file 3945.h.

#define FH39_TCSR_CONFIG (   _ch)    (FH39_TCSR(_ch) + 0x00)

Definition at line 521 of file 3945.h.

#define FH39_TCSR_CREDIT (   _ch)    (FH39_TCSR(_ch) + 0x04)

Definition at line 522 of file 3945.h.

#define FH39_TCSR_TBL   (FH39_MEM_LOWER_BOUND + 0x500)

Definition at line 493 of file 3945.h.

#define FH39_TCSR_TX_CONFIG_REG_VAL_CIRQ_HOST_IFTFD   (0x00200000)

Definition at line 555 of file 3945.h.

#define FH39_TCSR_TX_CONFIG_REG_VAL_CIRQ_RTC_NOINT   (0x00000000)

Definition at line 557 of file 3945.h.

#define FH39_TCSR_TX_CONFIG_REG_VAL_DMA_CHNL_ENABLE   (0x80000000)

Definition at line 560 of file 3945.h.

#define FH39_TCSR_TX_CONFIG_REG_VAL_DMA_CHNL_PAUSE   (0x00000000)

Definition at line 559 of file 3945.h.

#define FH39_TCSR_TX_CONFIG_REG_VAL_DMA_CREDIT_DISABLE_VAL   (0x00000000)

Definition at line 552 of file 3945.h.

#define FH39_TCSR_TX_CONFIG_REG_VAL_DMA_CREDIT_ENABLE_VAL   (0x00000008)

Definition at line 553 of file 3945.h.

#define FH39_TCSR_TX_CONFIG_REG_VAL_MSG_MODE_DRIVER   (0x00000001)

Definition at line 550 of file 3945.h.

#define FH39_TCSR_TX_CONFIG_REG_VAL_MSG_MODE_TXF   (0x00000000)

Definition at line 549 of file 3945.h.

#define FH39_TFDB (   _ch,
  buf 
)
Value:
((_ch) * 2 + (buf)) * 0x28)

Definition at line 497 of file 3945.h.

#define FH39_TFDB_CHNL_BUF_CTRL_REG (   _ch)    (FH39_TFDB_TBL + 0x50 * (_ch))

Definition at line 499 of file 3945.h.

#define FH39_TFDB_TBL   (FH39_MEM_LOWER_BOUND + 0x180)

Definition at line 490 of file 3945.h.

#define FH39_TSSR_CBB_BASE   (FH39_TSSR_TBL + 0x000)

Definition at line 526 of file 3945.h.

#define FH39_TSSR_MSG_CONFIG   (FH39_TSSR_TBL + 0x008)

Definition at line 527 of file 3945.h.

#define FH39_TSSR_TBL   (FH39_MEM_LOWER_BOUND + 0x680)

Definition at line 494 of file 3945.h.

#define FH39_TSSR_TX_MSG_CONFIG_REG_VAL_MAX_FRAG_SIZE_128B   (0x00000400)

Definition at line 569 of file 3945.h.

#define FH39_TSSR_TX_MSG_CONFIG_REG_VAL_ORDER_RD_CBB_ON   (0x00000080)

Definition at line 572 of file 3945.h.

#define FH39_TSSR_TX_MSG_CONFIG_REG_VAL_ORDER_RD_TXPD_ON   (0x00FF0000)

Definition at line 567 of file 3945.h.

#define FH39_TSSR_TX_MSG_CONFIG_REG_VAL_ORDER_RSP_WAIT_TH   (0x00000020)

Definition at line 574 of file 3945.h.

#define FH39_TSSR_TX_MSG_CONFIG_REG_VAL_RSP_WAIT_TH   (0x00000005)

Definition at line 575 of file 3945.h.

#define FH39_TSSR_TX_MSG_CONFIG_REG_VAL_SNOOP_RD_TFD_ON   (0x00000100)

Definition at line 571 of file 3945.h.

#define FH39_TSSR_TX_MSG_CONFIG_REG_VAL_SNOOP_RD_TXPD_ON   (0xFF000000)

Definition at line 566 of file 3945.h.

#define FH39_TSSR_TX_STATUS   (FH39_TSSR_TBL + 0x010)

Definition at line 528 of file 3945.h.

#define FH39_TSSR_TX_STATUS_REG_BIT_BUFS_EMPTY (   _ch)    (BIT(_ch) << 24)

Definition at line 577 of file 3945.h.

#define FH39_TSSR_TX_STATUS_REG_BIT_NO_PEND_REQ (   _ch)    (BIT(_ch) << 16)

Definition at line 578 of file 3945.h.

#define FH39_TSSR_TX_STATUS_REG_MSK_CHNL_IDLE (   _ch)
Value:
FH39_TSSR_TX_STATUS_REG_BIT_NO_PEND_REQ(_ch))

Definition at line 580 of file 3945.h.

#define IEEE80211_4ADDR_LEN   30

Definition at line 139 of file 3945.h.

#define IEEE80211_DATA_LEN   2304

Definition at line 138 of file 3945.h.

#define IEEE80211_FRAME_LEN   (IEEE80211_DATA_LEN + IEEE80211_HLEN)

Definition at line 141 of file 3945.h.

#define IEEE80211_HLEN   (IEEE80211_4ADDR_LEN)

Definition at line 140 of file 3945.h.

#define IL3945_EEPROM_IMG_SIZE   1024

Definition at line 423 of file 3945.h.

#define IL3945_FW_PRE   "iwlwifi-3945-"

Definition at line 47 of file 3945.h.

#define IL3945_MODULE_FIRMWARE (   api)    _IL3945_MODULE_FIRMWARE(api)

Definition at line 49 of file 3945.h.

#define IL3945_UCODE_API_MAX   2

Definition at line 42 of file 3945.h.

#define IL3945_UCODE_API_MIN   1

Definition at line 45 of file 3945.h.

#define IL39_CMD_QUEUE_NUM   4

Definition at line 432 of file 3945.h.

#define IL39_MAX_BSM_SIZE   IL39_RTC_INST_SIZE

Definition at line 463 of file 3945.h.

#define IL39_MAX_DATA_SIZE   IL39_RTC_DATA_SIZE

Definition at line 460 of file 3945.h.

#define IL39_MAX_INST_SIZE   IL39_RTC_INST_SIZE

Definition at line 459 of file 3945.h.

#define IL39_NUM_QUEUES   5

Definition at line 431 of file 3945.h.

#define IL39_RSSI_OFFSET   95

Definition at line 281 of file 3945.h.

#define IL39_RTC_DATA_LOWER_BOUND   (0x800000)

Definition at line 451 of file 3945.h.

#define IL39_RTC_DATA_SIZE
Value:
IL39_RTC_DATA_LOWER_BOUND)

Definition at line 456 of file 3945.h.

#define IL39_RTC_DATA_UPPER_BOUND   (0x808000)

Definition at line 452 of file 3945.h.

#define IL39_RTC_INST_LOWER_BOUND   (0x000000)

Definition at line 448 of file 3945.h.

#define IL39_RTC_INST_SIZE
Value:
IL39_RTC_INST_LOWER_BOUND)

Definition at line 454 of file 3945.h.

#define IL39_RTC_INST_UPPER_BOUND   (0x014000)

Definition at line 449 of file 3945.h.

#define IL_DEFAULT_TX_RETRY   15

Definition at line 434 of file 3945.h.

#define IL_INVALID_RATE   0xFF

Definition at line 167 of file 3945.h.

#define IL_INVALID_VALUE   -1

Definition at line 168 of file 3945.h.

#define IL_NOISE_MEAS_NOT_AVAILABLE   (-127)

Definition at line 62 of file 3945.h.

#define IL_NUM_TX_CALIB_GROUPS   5

Definition at line 416 of file 3945.h.

#define IL_RX_DATA (   x)    (IL_RX_HDR(x)->payload)

Definition at line 188 of file 3945.h.

#define IL_RX_END (   x)
Value:
((struct il3945_rx_frame_end *)(\
IL_RX_HDR(x)->payload + \
le16_to_cpu(IL_RX_HDR(x)->len)))

Definition at line 184 of file 3945.h.

#define IL_RX_HDR (   x)
Value:
((struct il3945_rx_frame_hdr *)(\
x->u.rx_frame.stats.payload + \
x->u.rx_frame.stats.phy_count))

Definition at line 181 of file 3945.h.

#define IL_RX_STATS (   x)    (&x->u.rx_frame.stats)

Definition at line 187 of file 3945.h.

#define IL_SUPPORTED_RATES_IE_LEN   8

Definition at line 161 of file 3945.h.

#define IL_TX_FIFO_AC0   0

Definition at line 130 of file 3945.h.

#define IL_TX_FIFO_AC1   1

Definition at line 131 of file 3945.h.

#define IL_TX_FIFO_AC2   2

Definition at line 132 of file 3945.h.

#define IL_TX_FIFO_AC3   3

Definition at line 133 of file 3945.h.

#define IL_TX_FIFO_HCCA_1   5

Definition at line 134 of file 3945.h.

#define IL_TX_FIFO_HCCA_2   6

Definition at line 135 of file 3945.h.

#define IL_TX_FIFO_NONE   7

Definition at line 136 of file 3945.h.

#define MAX_MPDU_SIZE   2346U

Definition at line 125 of file 3945.h.

#define MAX_MSDU_SIZE   2304U

Definition at line 124 of file 3945.h.

#define MAX_RTS_THRESHOLD   2347U

Definition at line 123 of file 3945.h.

#define MAX_SN   ((IEEE80211_SCTL_SEQ) >> 4)

Definition at line 155 of file 3945.h.

#define MAX_TID_COUNT   9

Definition at line 165 of file 3945.h.

#define MIN_RTS_THRESHOLD   0U

Definition at line 122 of file 3945.h.

#define NUM_TFD_CHUNKS   4

Definition at line 439 of file 3945.h.

#define PCI_CFG_REV_ID_BIT_BASIC_SKU   (0x40) /* bit 6 */

Definition at line 427 of file 3945.h.

#define PCI_CFG_REV_ID_BIT_RTP   (0x80) /* bit 7 */

Definition at line 428 of file 3945.h.

#define RFD_SIZE   4

Definition at line 438 of file 3945.h.

#define SCAN_INTERVAL   100

Definition at line 163 of file 3945.h.

#define SEQ_TO_SN (   seq)    (((seq) & IEEE80211_SCTL_SEQ) >> 4)

Definition at line 153 of file 3945.h.

#define SN_TO_SEQ (   ssn)    (((ssn) << 4) & IEEE80211_SCTL_SEQ)

Definition at line 154 of file 3945.h.

#define STA_PS_STATUS_SLEEP   1

Definition at line 171 of file 3945.h.

#define STA_PS_STATUS_WAKE   0

Definition at line 170 of file 3945.h.

#define SUP_RATE_11A_MAX_NUM_CHANNELS   8

Definition at line 157 of file 3945.h.

#define SUP_RATE_11B_MAX_NUM_CHANNELS   4

Definition at line 158 of file 3945.h.

#define SUP_RATE_11G_MAX_NUM_CHANNELS   12

Definition at line 159 of file 3945.h.

#define TFD_CTL_COUNT_GET (   ctl)    ((ctl >> 24) & 7)

Definition at line 442 of file 3945.h.

#define TFD_CTL_COUNT_SET (   n)    (n << 24)

Definition at line 441 of file 3945.h.

#define TFD_CTL_PAD_GET (   ctl)    (ctl >> 28)

Definition at line 444 of file 3945.h.

#define TFD_CTL_PAD_SET (   n)    (n << 28)

Definition at line 443 of file 3945.h.

Enumeration Type Documentation

Enumerator:
IL_ANTENNA_DIVERSITY 
IL_ANTENNA_MAIN 
IL_ANTENNA_AUX 

Definition at line 107 of file 3945.h.

Function Documentation

int il3945_calc_db_from_ratio ( int  sig_ratio)

Definition at line 1163 of file 3945-mac.c.

int il3945_commit_rxon ( struct il_priv il)

il3945_commit_rxon - commit staging_rxon to hardware

The RXON command in staging_rxon is committed to the hardware and the active_rxon structure is updated with the new data. This function correctly transitions out of the RXON_ASSOC_MSK state if a HW tune is required based on the RXON structure changes.

Definition at line 1703 of file 3945.c.

void il3945_config_ap ( struct il_priv il)

Definition at line 2882 of file 3945-mac.c.

void il3945_disable_events ( struct il_priv il)

il3945_disable_events - Disable selected events in uCode event log

Disable an event by writing "1"s into "disable" bitmap in SRAM. Bit position corresponds to Event # (id/type). Default values of 0 enable uCode events to be logged. Use for only special debugging. This function is just a placeholder as-is, you'll need to provide the special bits! ... ... and set IL_EVT_DISABLE to 1.

Definition at line 119 of file 3945.c.

void il3945_dump_nic_error_log ( struct il_priv il)

Definition at line 1349 of file 3945-mac.c.

int il3945_dump_nic_event_log ( struct il_priv il,
bool  full_log,
char **  buf,
bool  display 
)
unsigned int il3945_fill_beacon_frame ( struct il_priv il,
struct ieee80211_hdr hdr,
int  left 
)

Definition at line 313 of file 3945-mac.c.

__le32 il3945_get_antenna_flags ( const struct il_priv il)

il3945_get_antenna_flags - Get antenna flags for RXON command : eeprom and antenna fields are used to determine antenna flags

il->eeprom39 is used to determine if antenna AUX/MAIN are reversed il3945_mod_params.antenna specifies the antenna diversity mode:

IL_ANTENNA_DIVERSITY - NIC selects best antenna by itself IL_ANTENNA_MAIN - Force MAIN antenna IL_ANTENNA_AUX - Force AUX antenna

Definition at line 106 of file 3945-mac.c.

void il3945_hdl_c_stats ( struct il_priv il,
struct il_rx_buf rxb 
)

Definition at line 422 of file 3945.c.

void il3945_hdl_stats ( struct il_priv il,
struct il_rx_buf rxb 
)

Definition at line 407 of file 3945.c.

void il3945_hw_build_tx_cmd_rate ( struct il_priv il,
struct il_device_cmd cmd,
struct ieee80211_tx_info info,
struct ieee80211_hdr hdr,
int  sta_id 
)

il3945_hw_build_tx_cmd_rate - Add rate portion to TX_CMD:

Definition at line 674 of file 3945.c.

void il3945_hw_cancel_deferred_work ( struct il_priv il)

Definition at line 2455 of file 3945.c.

u8 il3945_hw_find_station ( struct il_priv il,
const u8 bssid 
)

il3945_hw_find_station - Find station id for a given BSSID : MAC address of station ID to find

NOTE: This should not be hardware specific but the code has not yet been merged into a single common layer for managing the station tables.

unsigned int il3945_hw_get_beacon_cmd ( struct il_priv il,
struct il3945_frame frame,
u8  rate 
)

Definition at line 2408 of file 3945.c.

int il3945_hw_get_temperature ( struct il_priv il)

Definition at line 1048 of file 3945.c.

void il3945_hw_handler_setup ( struct il_priv il)

Definition at line 2441 of file 3945.c.

int il3945_hw_nic_init ( struct il_priv il)

Definition at line 944 of file 3945.c.

int il3945_hw_nic_reset ( struct il_priv il)
int il3945_hw_nic_stop_master ( struct il_priv il)
int il3945_hw_reg_send_txpower ( struct il_priv il)
int il3945_hw_reg_set_txpower ( struct il_priv il,
s8  power 
)

Definition at line 1608 of file 3945.c.

int il3945_hw_rxq_stop ( struct il_priv il)

Definition at line 2173 of file 3945.c.

int il3945_hw_set_hw_params ( struct il_priv il)

Definition at line 2375 of file 3945.c.

void il3945_hw_setup_deferred_work ( struct il_priv il)

Definition at line 2448 of file 3945.c.

int il3945_hw_tx_queue_init ( struct il_priv il,
struct il_tx_queue txq 
)

Definition at line 2189 of file 3945.c.

int il3945_hw_txq_attach_buf_to_tfd ( struct il_priv il,
struct il_tx_queue txq,
dma_addr_t  addr,
u16  len,
u8  reset,
u8  pad 
)

Definition at line 588 of file 3945.c.

void il3945_hw_txq_ctx_free ( struct il_priv il)

il3945_hw_txq_ctx_free - Free TXQ Context

Destroy all TX DMA queues and structures

Definition at line 993 of file 3945.c.

void il3945_hw_txq_ctx_stop ( struct il_priv il)

Definition at line 1010 of file 3945.c.

void il3945_hw_txq_free_tfd ( struct il_priv il,
struct il_tx_queue txq 
)

il3945_hw_txq_free_tfd - Free one TFD, those at idx [txq->q.read_ptr]

Does NOT advance any idxes

Definition at line 627 of file 3945.c.

int il3945_init_hw_rate_table ( struct il_priv il)

il3945_init_hw_rate_table - Initialize the hardware rate fallback table

Definition at line 2304 of file 3945.c.

void il3945_post_associate ( struct il_priv il)

Definition at line 2711 of file 3945-mac.c.

void il3945_post_scan ( struct il_priv il)

Definition at line 2658 of file 3945-mac.c.

void il3945_reg_txpower_periodic ( struct il_priv il)

il3945_reg_txpower_periodic - called when time to check our temperature.

– reset periodic timer – see if temp has changed enough to warrant re-calibration ... if so: – correct coeffs for temp (can reset temp timer) – save this temp as "last", – send new set of gain settings to NIC NOTE: This should continue working, even when we're not associated, so we can keep our internal table of scan powers current.

Definition at line 1836 of file 3945.c.

int il3945_request_scan ( struct il_priv il,
struct ieee80211_vif vif 
)

Definition at line 2514 of file 3945-mac.c.

int il3945_rs_next_rate ( struct il_priv il,
int  rate 
)

Definition at line 254 of file 3945.c.

void il3945_rx_queue_reset ( struct il_priv il,
struct il_rx_queue rxq 
)

Definition at line 1067 of file 3945-mac.c.

void il3945_rx_replenish ( void data)

Definition at line 1097 of file 3945-mac.c.

int il3945_txpower_set_from_eeprom ( struct il_priv il)

il3945_txpower_set_from_eeprom - Set channel power info based on EEPROM

Second pass (during init) to set up il->channel_info

Set up Tx-power settings in our channel info database for each VALID (for this geo/SKU) channel, at all Tx data rates, based on eeprom values and current temperature.

Since this is based on current temperature (at init time), these values may not be valid for very long, but it gives us a starting/default point, and allows us to active (i.e. using Tx) scan.

This does not write values to NIC, just sets up our internal table.

Definition at line 2046 of file 3945.c.

int il4965_get_temperature ( const struct il_priv il)

Variable Documentation

struct pci_device_id il3945_hw_card_ids[]
struct il_mod_params il3945_mod_params

Definition at line 87 of file 3945-mac.c.

struct il_ops il3945_ops

Definition at line 2624 of file 3945.c.

Definition at line 80 of file 3945.c.