#ifndef __il_core_h__
#define __il_core_h__
#include <linux/interrupt.h>
#include <linux/pci.h>
#include <linux/kernel.h>
#include <linux/leds.h>
#include <linux/wait.h>
#include <linux/io.h>
#include <net/mac80211.h>
#include <net/ieee80211_radiotap.h>
#include "commands.h"
#include "csr.h"
#include "prph.h"
struct il_host_cmd;
struct il_cmd;
struct il_tx_queue;
#define IL_ERR(f, a...) …
#define IL_WARN(f, a...) …
#define IL_WARN_ONCE(f, a...) …
#define IL_INFO(f, a...) …
#define RX_QUEUE_SIZE …
#define RX_QUEUE_MASK …
#define RX_QUEUE_SIZE_LOG …
#define RX_FREE_BUFFERS …
#define RX_LOW_WATERMARK …
#define U32_PAD(n) …
#define CT_KILL_THRESHOLD_LEGACY …
#define IL_NOISE_MEAS_NOT_AVAILABLE …
#define DEFAULT_RTS_THRESHOLD …
#define MIN_RTS_THRESHOLD …
#define MAX_RTS_THRESHOLD …
#define MAX_MSDU_SIZE …
#define MAX_MPDU_SIZE …
#define DEFAULT_BEACON_INTERVAL …
#define DEFAULT_SHORT_RETRY_LIMIT …
#define DEFAULT_LONG_RETRY_LIMIT …
struct il_rx_buf { … };
#define rxb_addr(r) …
struct il_device_cmd;
struct il_cmd_meta { … };
struct il_queue { … };
#define TFD_TX_CMD_SLOTS …
#define TFD_CMD_SLOTS …
struct il_tx_queue { … };
#define IL_EEPROM_ACCESS_TIMEOUT …
#define IL_EEPROM_SEM_TIMEOUT …
#define IL_EEPROM_SEM_RETRY_LIMIT …
#define IL_NUM_TX_CALIB_GROUPS …
enum { … };
#define EEPROM_SKU_CAP_SW_RF_KILL_ENABLE …
#define EEPROM_SKU_CAP_HW_RF_KILL_ENABLE …
struct il_eeprom_channel { … } __packed;
#define EEPROM_3945_EEPROM_VERSION …
#define EEPROM_TX_POWER_TX_CHAINS …
#define EEPROM_TX_POWER_BANDS …
#define EEPROM_TX_POWER_MEASUREMENTS …
#define EEPROM_4965_TX_POWER_VERSION …
#define EEPROM_4965_EEPROM_VERSION …
#define EEPROM_4965_CALIB_VERSION_OFFSET …
#define EEPROM_4965_CALIB_TXPOWER_OFFSET …
#define EEPROM_4965_BOARD_REVISION …
#define EEPROM_4965_BOARD_PBA …
extern const u8 il_eeprom_band_1[14];
struct il_eeprom_calib_measure { … } __packed;
struct il_eeprom_calib_ch_info { … } __packed;
struct il_eeprom_calib_subband_info { … } __packed;
struct il_eeprom_calib_info { … } __packed;
#define EEPROM_DEVICE_ID …
#define EEPROM_MAC_ADDRESS …
#define EEPROM_BOARD_REVISION …
#define EEPROM_BOARD_PBA_NUMBER …
#define EEPROM_VERSION …
#define EEPROM_SKU_CAP …
#define EEPROM_OEM_MODE …
#define EEPROM_WOWLAN_MODE …
#define EEPROM_RADIO_CONFIG …
#define EEPROM_NUM_MAC_ADDRESS …
#define EEPROM_RF_CFG_TYPE_MSK(x) …
#define EEPROM_RF_CFG_STEP_MSK(x) …
#define EEPROM_RF_CFG_DASH_MSK(x) …
#define EEPROM_RF_CFG_PNUM_MSK(x) …
#define EEPROM_RF_CFG_TX_ANT_MSK(x) …
#define EEPROM_RF_CFG_RX_ANT_MSK(x) …
#define EEPROM_3945_RF_CFG_TYPE_MAX …
#define EEPROM_4965_RF_CFG_TYPE_MAX …
#define EEPROM_REGULATORY_SKU_ID …
#define EEPROM_REGULATORY_BAND_1 …
#define EEPROM_REGULATORY_BAND_1_CHANNELS …
#define EEPROM_REGULATORY_BAND_2 …
#define EEPROM_REGULATORY_BAND_2_CHANNELS …
#define EEPROM_REGULATORY_BAND_3 …
#define EEPROM_REGULATORY_BAND_3_CHANNELS …
#define EEPROM_REGULATORY_BAND_4 …
#define EEPROM_REGULATORY_BAND_4_CHANNELS …
#define EEPROM_REGULATORY_BAND_5 …
#define EEPROM_REGULATORY_BAND_5_CHANNELS …
#define EEPROM_4965_REGULATORY_BAND_24_HT40_CHANNELS …
#define EEPROM_4965_REGULATORY_BAND_52_HT40_CHANNELS …
#define EEPROM_REGULATORY_BAND_NO_HT40 …
int il_eeprom_init(struct il_priv *il);
void il_eeprom_free(struct il_priv *il);
const u8 *il_eeprom_query_addr(const struct il_priv *il, size_t offset);
u16 il_eeprom_query16(const struct il_priv *il, size_t offset);
int il_init_channel_map(struct il_priv *il);
void il_free_channel_map(struct il_priv *il);
const struct il_channel_info *il_get_channel_info(const struct il_priv *il,
enum nl80211_band band,
u16 channel);
#define IL_NUM_SCAN_RATES …
struct il4965_channel_tgd_info { … };
struct il4965_channel_tgh_info { … };
#define IL4965_MAX_RATE …
struct il3945_clip_group { … };
struct il3945_channel_power_info { … };
struct il3945_scan_power_info { … };
struct il_channel_info { … };
#define IL_TX_FIFO_BK …
#define IL_TX_FIFO_BE …
#define IL_TX_FIFO_VI …
#define IL_TX_FIFO_VO …
#define IL_TX_FIFO_UNUSED …
#define IL_MIN_NUM_QUEUES …
#define IL_DEFAULT_CMD_QUEUE_NUM …
#define IEEE80211_DATA_LEN …
#define IEEE80211_4ADDR_LEN …
#define IEEE80211_HLEN …
#define IEEE80211_FRAME_LEN …
struct il_frame { … };
enum { … };
#define DEF_CMD_PAYLOAD_SIZE …
struct il_device_cmd { … } __packed;
#define TFD_MAX_PAYLOAD_SIZE …
struct il_host_cmd { … };
#define SUP_RATE_11A_MAX_NUM_CHANNELS …
#define SUP_RATE_11B_MAX_NUM_CHANNELS …
#define SUP_RATE_11G_MAX_NUM_CHANNELS …
struct il_rx_queue { … };
#define IL_SUPPORTED_RATES_IE_LEN …
#define MAX_TID_COUNT …
#define IL_INVALID_RATE …
#define IL_INVALID_VALUE …
struct il_ht_agg { … };
struct il_tid_data { … };
struct il_hw_key { … };
il_ht_rate_supp;
#define CFG_HT_RX_AMPDU_FACTOR_8K …
#define CFG_HT_RX_AMPDU_FACTOR_16K …
#define CFG_HT_RX_AMPDU_FACTOR_32K …
#define CFG_HT_RX_AMPDU_FACTOR_64K …
#define CFG_HT_RX_AMPDU_FACTOR_DEF …
#define CFG_HT_RX_AMPDU_FACTOR_MAX …
#define CFG_HT_RX_AMPDU_FACTOR_MIN …
#define CFG_HT_MPDU_DENSITY_2USEC …
#define CFG_HT_MPDU_DENSITY_4USEC …
#define CFG_HT_MPDU_DENSITY_8USEC …
#define CFG_HT_MPDU_DENSITY_16USEC …
#define CFG_HT_MPDU_DENSITY_DEF …
#define CFG_HT_MPDU_DENSITY_MAX …
#define CFG_HT_MPDU_DENSITY_MIN …
struct il_ht_config { … };
struct il_qos_info { … };
struct il_station_entry { … };
struct il_station_priv_common { … };
struct il_vif_priv { … };
struct fw_desc { … };
struct il_ucode_header { … };
struct il4965_ibss_seq { … };
struct il_sensitivity_ranges { … };
struct il_hw_params { … };
void il4965_update_chain_flags(struct il_priv *il);
extern const u8 il_bcast_addr[ETH_ALEN];
int il_queue_space(const struct il_queue *q);
static inline int
il_queue_used(const struct il_queue *q, int i)
{ … }
static inline u8
il_get_cmd_idx(struct il_queue *q, u32 idx, int is_huge)
{ … }
struct il_dma_ptr { … };
#define IL_OPERATION_MODE_AUTO …
#define IL_OPERATION_MODE_HT_ONLY …
#define IL_OPERATION_MODE_MIXED …
#define IL_OPERATION_MODE_20MHZ …
#define IL_TX_CRC_SIZE …
#define IL_TX_DELIMITER_SIZE …
#define TX_POWER_IL_ILLEGAL_VOLTAGE …
#define INITIALIZATION_VALUE …
#define IL4965_CAL_NUM_BEACONS …
#define IL_CAL_NUM_BEACONS …
#define MAXIMUM_ALLOWED_PATHLOSS …
#define CHAIN_NOISE_MAX_DELTA_GAIN_CODE …
#define MAX_FA_OFDM …
#define MIN_FA_OFDM …
#define MAX_FA_CCK …
#define MIN_FA_CCK …
#define AUTO_CORR_STEP_OFDM …
#define AUTO_CORR_STEP_CCK …
#define AUTO_CORR_MAX_TH_CCK …
#define NRG_DIFF …
#define NRG_STEP_CCK …
#define NRG_MARGIN …
#define MAX_NUMBER_CCK_NO_FA …
#define AUTO_CORR_CCK_MIN_VAL_DEF …
#define CHAIN_A …
#define CHAIN_B …
#define CHAIN_C …
#define CHAIN_NOISE_DELTA_GAIN_INIT_VAL …
#define ALL_BAND_FILTER …
#define IN_BAND_FILTER …
#define MIN_AVERAGE_NOISE_MAX_VALUE …
#define NRG_NUM_PREV_STAT_L …
#define NUM_RX_CHAINS …
enum il4965_false_alarm_state { … };
enum il4965_chain_noise_state { … };
enum ucode_type { … };
struct il_sensitivity_data { … };
struct il_chain_noise_data { … };
#define EEPROM_SEM_TIMEOUT …
#define EEPROM_SEM_RETRY_LIMIT …
#define IL_TRAFFIC_ENTRIES …
#define IL_TRAFFIC_ENTRY_SIZE …
enum { … };
struct isr_stats { … };
enum il_mgmt_stats { … };
enum il_ctrl_stats { … };
struct traffic_stats { … };
#define IL_HOST_INT_TIMEOUT_MAX …
#define IL_HOST_INT_TIMEOUT_DEF …
#define IL_HOST_INT_TIMEOUT_MIN …
#define IL_HOST_INT_CALIB_TIMEOUT_MAX …
#define IL_HOST_INT_CALIB_TIMEOUT_DEF …
#define IL_HOST_INT_CALIB_TIMEOUT_MIN …
#define IL_DELAY_NEXT_FORCE_FW_RELOAD …
#define IL_DEF_WD_TIMEOUT …
#define IL_LONG_WD_TIMEOUT …
#define IL_MAX_WD_TIMEOUT …
struct il_force_reset { … };
#define IL3945_EXT_BEACON_TIME_POS …
#define IL4965_EXT_BEACON_TIME_POS …
struct il_rxon_context { … };
struct il_power_mgr { … };
struct il_priv { … };
static inline void
il_txq_ctx_activate(struct il_priv *il, int txq_id)
{ … }
static inline void
il_txq_ctx_deactivate(struct il_priv *il, int txq_id)
{ … }
static inline int
il_is_associated(struct il_priv *il)
{ … }
static inline int
il_is_any_associated(struct il_priv *il)
{ … }
static inline int
il_is_channel_valid(const struct il_channel_info *ch_info)
{ … }
static inline int
il_is_channel_radar(const struct il_channel_info *ch_info)
{ … }
static inline u8
il_is_channel_a_band(const struct il_channel_info *ch_info)
{ … }
static inline int
il_is_channel_passive(const struct il_channel_info *ch)
{ … }
static inline int
il_is_channel_ibss(const struct il_channel_info *ch)
{ … }
static inline void
__il_free_pages(struct il_priv *il, struct page *page)
{ … }
static inline void
il_free_pages(struct il_priv *il, unsigned long page)
{ … }
#define IWLWIFI_VERSION …
#define DRV_COPYRIGHT …
#define DRV_AUTHOR …
#define IL_PCI_DEVICE(dev, subdev, cfg) …
#define TIME_UNIT …
#define IL_SKU_G …
#define IL_SKU_A …
#define IL_SKU_N …
#define IL_CMD(x) …
#define IL_RX_BUF_SIZE_3K …
#define IL_RX_BUF_SIZE_4K …
#define IL_RX_BUF_SIZE_8K …
#ifdef CONFIG_IWLEGACY_DEBUGFS
struct il_debugfs_ops { … };
#endif
struct il_ops { … };
struct il_mod_params { … };
#define IL_LED_SOLID …
#define IL_DEF_LED_INTRVL …
#define IL_LED_ACTIVITY …
#define IL_LED_LINK …
enum il_led_mode { … };
void il_leds_init(struct il_priv *il);
void il_leds_exit(struct il_priv *il);
struct il_cfg { … };
int il_mac_conf_tx(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
unsigned int link_id, u16 queue,
const struct ieee80211_tx_queue_params *params);
int il_mac_tx_last_beacon(struct ieee80211_hw *hw);
void il_set_rxon_hwcrypto(struct il_priv *il, int hw_decrypt);
int il_check_rxon_cmd(struct il_priv *il);
int il_full_rxon_required(struct il_priv *il);
int il_set_rxon_channel(struct il_priv *il, struct ieee80211_channel *ch);
void il_set_flags_for_band(struct il_priv *il, enum nl80211_band band,
struct ieee80211_vif *vif);
u8 il_get_single_channel_number(struct il_priv *il, enum nl80211_band band);
void il_set_rxon_ht(struct il_priv *il, struct il_ht_config *ht_conf);
bool il_is_ht40_tx_allowed(struct il_priv *il,
struct ieee80211_sta_ht_cap *ht_cap);
void il_connection_init_rx_config(struct il_priv *il);
void il_set_rate(struct il_priv *il);
int il_set_decrypted_flag(struct il_priv *il, struct ieee80211_hdr *hdr,
u32 decrypt_res, struct ieee80211_rx_status *stats);
void il_irq_handle_error(struct il_priv *il);
int il_mac_add_interface(struct ieee80211_hw *hw, struct ieee80211_vif *vif);
void il_mac_remove_interface(struct ieee80211_hw *hw,
struct ieee80211_vif *vif);
int il_mac_change_interface(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
enum nl80211_iftype newtype, bool newp2p);
void il_mac_flush(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
u32 queues, bool drop);
int il_alloc_txq_mem(struct il_priv *il);
void il_free_txq_mem(struct il_priv *il);
#ifdef CONFIG_IWLEGACY_DEBUGFS
void il_update_stats(struct il_priv *il, bool is_tx, __le16 fc, u16 len);
#else
static inline void
il_update_stats(struct il_priv *il, bool is_tx, __le16 fc, u16 len)
{
}
#endif
void il_hdl_pm_sleep(struct il_priv *il, struct il_rx_buf *rxb);
void il_hdl_pm_debug_stats(struct il_priv *il, struct il_rx_buf *rxb);
void il_hdl_error(struct il_priv *il, struct il_rx_buf *rxb);
void il_hdl_csa(struct il_priv *il, struct il_rx_buf *rxb);
void il_cmd_queue_unmap(struct il_priv *il);
void il_cmd_queue_free(struct il_priv *il);
int il_rx_queue_alloc(struct il_priv *il);
void il_rx_queue_update_write_ptr(struct il_priv *il, struct il_rx_queue *q);
int il_rx_queue_space(const struct il_rx_queue *q);
void il_tx_cmd_complete(struct il_priv *il, struct il_rx_buf *rxb);
void il_hdl_spectrum_measurement(struct il_priv *il, struct il_rx_buf *rxb);
void il_recover_from_stats(struct il_priv *il, struct il_rx_pkt *pkt);
void il_chswitch_done(struct il_priv *il, bool is_success);
void il_txq_update_write_ptr(struct il_priv *il, struct il_tx_queue *txq);
int il_tx_queue_init(struct il_priv *il, u32 txq_id);
void il_tx_queue_reset(struct il_priv *il, u32 txq_id);
void il_tx_queue_unmap(struct il_priv *il, int txq_id);
void il_tx_queue_free(struct il_priv *il, int txq_id);
void il_setup_watchdog(struct il_priv *il);
int il_set_tx_power(struct il_priv *il, s8 tx_power, bool force);
u8 il_get_lowest_plcp(struct il_priv *il);
void il_init_scan_params(struct il_priv *il);
int il_scan_cancel(struct il_priv *il);
int il_scan_cancel_timeout(struct il_priv *il, unsigned long ms);
void il_force_scan_end(struct il_priv *il);
int il_mac_hw_scan(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
struct ieee80211_scan_request *hw_req);
void il_internal_short_hw_scan(struct il_priv *il);
int il_force_reset(struct il_priv *il, bool external);
u16 il_fill_probe_req(struct il_priv *il, struct ieee80211_mgmt *frame,
const u8 *ta, const u8 *ie, int ie_len, int left);
void il_setup_rx_scan_handlers(struct il_priv *il);
u16 il_get_active_dwell_time(struct il_priv *il, enum nl80211_band band,
u8 n_probes);
u16 il_get_passive_dwell_time(struct il_priv *il, enum nl80211_band band,
struct ieee80211_vif *vif);
void il_setup_scan_deferred_work(struct il_priv *il);
void il_cancel_scan_deferred_work(struct il_priv *il);
#define IL_ACTIVE_QUIET_TIME …
#define IL_PLCP_QUIET_THRESH …
#define IL_SCAN_CHECK_WATCHDOG …
const char *il_get_cmd_string(u8 cmd);
int __must_check il_send_cmd_sync(struct il_priv *il, struct il_host_cmd *cmd);
int il_send_cmd(struct il_priv *il, struct il_host_cmd *cmd);
int __must_check il_send_cmd_pdu(struct il_priv *il, u8 id, u16 len,
const void *data);
int il_send_cmd_pdu_async(struct il_priv *il, u8 id, u16 len, const void *data,
void (*callback) (struct il_priv *il,
struct il_device_cmd *cmd,
struct il_rx_pkt *pkt));
int il_enqueue_hcmd(struct il_priv *il, struct il_host_cmd *cmd);
void il_bg_watchdog(struct timer_list *t);
u32 il_usecs_to_beacons(struct il_priv *il, u32 usec, u32 beacon_interval);
__le32 il_add_beacon_time(struct il_priv *il, u32 base, u32 addon,
u32 beacon_interval);
#ifdef CONFIG_PM_SLEEP
extern const struct dev_pm_ops il_pm_ops;
#define IL_LEGACY_PM_OPS …
#else
#define IL_LEGACY_PM_OPS …
#endif
void il4965_dump_nic_error_log(struct il_priv *il);
#ifdef CONFIG_IWLEGACY_DEBUG
void il_print_rx_config_cmd(struct il_priv *il);
#else
static inline void
il_print_rx_config_cmd(struct il_priv *il)
{
}
#endif
void il_clear_isr_stats(struct il_priv *il);
int il_init_geos(struct il_priv *il);
void il_free_geos(struct il_priv *il);
#define S_HCMD_ACTIVE …
#define S_INT_ENABLED …
#define S_RFKILL …
#define S_CT_KILL …
#define S_INIT …
#define S_ALIVE …
#define S_READY …
#define S_TEMPERATURE …
#define S_GEO_CONFIGURED …
#define S_EXIT_PENDING …
#define S_STATS …
#define S_SCANNING …
#define S_SCAN_ABORTING …
#define S_SCAN_HW …
#define S_POWER_PMI …
#define S_FW_ERROR …
#define S_CHANNEL_SWITCH_PENDING …
static inline int
il_is_ready(struct il_priv *il)
{ … }
static inline int
il_is_alive(struct il_priv *il)
{ … }
static inline int
il_is_init(struct il_priv *il)
{ … }
static inline int
il_is_rfkill(struct il_priv *il)
{ … }
static inline int
il_is_ctkill(struct il_priv *il)
{ … }
static inline int
il_is_ready_rf(struct il_priv *il)
{ … }
void il_send_bt_config(struct il_priv *il);
int il_send_stats_request(struct il_priv *il, u8 flags, bool clear);
void il_apm_stop(struct il_priv *il);
void _il_apm_stop(struct il_priv *il);
int il_apm_init(struct il_priv *il);
int il_send_rxon_timing(struct il_priv *il);
static inline int
il_send_rxon_assoc(struct il_priv *il)
{ … }
static inline int
il_commit_rxon(struct il_priv *il)
{ … }
static inline const struct ieee80211_supported_band *
il_get_hw_mode(struct il_priv *il, enum nl80211_band band)
{ … }
int il_mac_config(struct ieee80211_hw *hw, u32 changed);
void il_mac_reset_tsf(struct ieee80211_hw *hw, struct ieee80211_vif *vif);
void il_mac_bss_info_changed(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
struct ieee80211_bss_conf *bss_conf, u64 changes);
void il_tx_cmd_protection(struct il_priv *il, struct ieee80211_tx_info *info,
__le16 fc, __le32 *tx_flags);
irqreturn_t il_isr(int irq, void *data);
void il_set_bit(struct il_priv *p, u32 r, u32 m);
void il_clear_bit(struct il_priv *p, u32 r, u32 m);
bool _il_grab_nic_access(struct il_priv *il);
int _il_poll_bit(struct il_priv *il, u32 addr, u32 bits, u32 mask, int timeout);
int il_poll_bit(struct il_priv *il, u32 addr, u32 mask, int timeout);
u32 il_rd_prph(struct il_priv *il, u32 reg);
void il_wr_prph(struct il_priv *il, u32 addr, u32 val);
u32 il_read_targ_mem(struct il_priv *il, u32 addr);
void il_write_targ_mem(struct il_priv *il, u32 addr, u32 val);
static inline bool il_need_reclaim(struct il_priv *il, struct il_rx_pkt *pkt)
{ … }
static inline void
_il_write8(struct il_priv *il, u32 ofs, u8 val)
{ … }
#define il_write8(il, ofs, val) …
static inline void
_il_wr(struct il_priv *il, u32 ofs, u32 val)
{ … }
static inline u32
_il_rd(struct il_priv *il, u32 ofs)
{ … }
static inline void
_il_clear_bit(struct il_priv *il, u32 reg, u32 mask)
{ … }
static inline void
_il_set_bit(struct il_priv *il, u32 reg, u32 mask)
{ … }
static inline void
_il_release_nic_access(struct il_priv *il)
{ … }
static inline u32
il_rd(struct il_priv *il, u32 reg)
{ … }
static inline void
il_wr(struct il_priv *il, u32 reg, u32 value)
{ … }
static inline u32
_il_rd_prph(struct il_priv *il, u32 reg)
{ … }
static inline void
_il_wr_prph(struct il_priv *il, u32 addr, u32 val)
{ … }
static inline void
il_set_bits_prph(struct il_priv *il, u32 reg, u32 mask)
{ … }
static inline void
il_set_bits_mask_prph(struct il_priv *il, u32 reg, u32 bits, u32 mask)
{ … }
static inline void
il_clear_bits_prph(struct il_priv *il, u32 reg, u32 mask)
{ … }
#define HW_KEY_DYNAMIC …
#define HW_KEY_DEFAULT …
#define IL_STA_DRIVER_ACTIVE …
#define IL_STA_UCODE_ACTIVE …
#define IL_STA_UCODE_INPROGRESS …
#define IL_STA_LOCAL …
#define IL_STA_BCAST …
void il_restore_stations(struct il_priv *il);
void il_clear_ucode_stations(struct il_priv *il);
void il_dealloc_bcast_stations(struct il_priv *il);
int il_get_free_ucode_key_idx(struct il_priv *il);
int il_send_add_sta(struct il_priv *il, struct il_addsta_cmd *sta, u8 flags);
int il_add_station_common(struct il_priv *il, const u8 *addr, bool is_ap,
struct ieee80211_sta *sta, u8 *sta_id_r);
int il_remove_station(struct il_priv *il, const u8 sta_id, const u8 * addr);
int il_mac_sta_remove(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
struct ieee80211_sta *sta);
u8 il_prep_station(struct il_priv *il, const u8 *addr, bool is_ap,
struct ieee80211_sta *sta);
int il_send_lq_cmd(struct il_priv *il, struct il_link_quality_cmd *lq,
u8 flags, bool init);
static inline void
il_clear_driver_stations(struct il_priv *il)
{ … }
static inline int
il_sta_id(struct ieee80211_sta *sta)
{ … }
static inline int
il_sta_id_or_broadcast(struct il_priv *il, struct ieee80211_sta *sta)
{ … }
static inline int
il_queue_inc_wrap(int idx, int n_bd)
{ … }
static inline int
il_queue_dec_wrap(int idx, int n_bd)
{ … }
static inline void
il_free_fw_desc(struct pci_dev *pci_dev, struct fw_desc *desc)
{ … }
static inline int
il_alloc_fw_desc(struct pci_dev *pci_dev, struct fw_desc *desc)
{ … }
static inline void
il_set_swq_id(struct il_tx_queue *txq, u8 ac, u8 hwq)
{ … }
static inline void
_il_wake_queue(struct il_priv *il, u8 ac)
{ … }
static inline void
_il_stop_queue(struct il_priv *il, u8 ac)
{ … }
static inline void
il_wake_queue(struct il_priv *il, struct il_tx_queue *txq)
{ … }
static inline void
il_stop_queue(struct il_priv *il, struct il_tx_queue *txq)
{ … }
static inline void
il_wake_queues_by_reason(struct il_priv *il, int reason)
{ … }
static inline void
il_stop_queues_by_reason(struct il_priv *il, int reason)
{ … }
#ifdef ieee80211_stop_queue
#undef ieee80211_stop_queue
#endif
#define ieee80211_stop_queue …
#ifdef ieee80211_wake_queue
#undef ieee80211_wake_queue
#endif
#define ieee80211_wake_queue …
static inline void
il_disable_interrupts(struct il_priv *il)
{ … }
static inline void
il_enable_rfkill_int(struct il_priv *il)
{ … }
static inline void
il_enable_interrupts(struct il_priv *il)
{ … }
static inline u32
il_beacon_time_mask_low(struct il_priv *il, u16 tsf_bits)
{ … }
static inline u32
il_beacon_time_mask_high(struct il_priv *il, u16 tsf_bits)
{ … }
struct il_rb_status { … } __packed;
#define TFD_QUEUE_SIZE_MAX …
#define TFD_QUEUE_SIZE_BC_DUP …
#define TFD_QUEUE_BC_SIZE …
#define IL_TX_DMA_MASK …
#define IL_NUM_OF_TBS …
static inline u8
il_get_dma_hi_addr(dma_addr_t addr)
{ … }
struct il_tfd_tb { … } __packed;
struct il_tfd { … } __packed;
#define PCI_CFG_RETRY_TIMEOUT …
struct il_rate_info { … };
struct il3945_rate_info { … };
enum { … };
enum { … };
enum { … };
#define RATE_6M_MASK …
#define RATE_9M_MASK …
#define RATE_12M_MASK …
#define RATE_18M_MASK …
#define RATE_24M_MASK …
#define RATE_36M_MASK …
#define RATE_48M_MASK …
#define RATE_54M_MASK …
#define RATE_60M_MASK …
#define RATE_1M_MASK …
#define RATE_2M_MASK …
#define RATE_5M_MASK …
#define RATE_11M_MASK …
enum { … };
enum { … };
enum { … };
#define IL_CCK_BASIC_RATES_MASK …
#define IL_CCK_RATES_MASK …
#define IL_OFDM_BASIC_RATES_MASK …
#define IL_OFDM_RATES_MASK …
#define IL_BASIC_RATES_MASK …
#define RATES_MASK …
#define RATES_MASK_3945 …
#define IL_INVALID_VALUE …
#define IL_MIN_RSSI_VAL …
#define IL_MAX_RSSI_VAL …
#define IL_LEGACY_FAILURE_LIMIT …
#define IL_LEGACY_SUCCESS_LIMIT …
#define IL_LEGACY_TBL_COUNT …
#define IL_NONE_LEGACY_FAILURE_LIMIT …
#define IL_NONE_LEGACY_SUCCESS_LIMIT …
#define IL_NONE_LEGACY_TBL_COUNT …
#define IL_RS_GOOD_RATIO …
#define RATE_SCALE_SWITCH …
#define RATE_HIGH_TH …
#define RATE_INCREASE_TH …
#define RATE_DECREASE_TH …
#define IL_LEGACY_SWITCH_ANTENNA1 …
#define IL_LEGACY_SWITCH_ANTENNA2 …
#define IL_LEGACY_SWITCH_SISO …
#define IL_LEGACY_SWITCH_MIMO2_AB …
#define IL_LEGACY_SWITCH_MIMO2_AC …
#define IL_LEGACY_SWITCH_MIMO2_BC …
#define IL_SISO_SWITCH_ANTENNA1 …
#define IL_SISO_SWITCH_ANTENNA2 …
#define IL_SISO_SWITCH_MIMO2_AB …
#define IL_SISO_SWITCH_MIMO2_AC …
#define IL_SISO_SWITCH_MIMO2_BC …
#define IL_SISO_SWITCH_GI …
#define IL_MIMO2_SWITCH_ANTENNA1 …
#define IL_MIMO2_SWITCH_ANTENNA2 …
#define IL_MIMO2_SWITCH_SISO_A …
#define IL_MIMO2_SWITCH_SISO_B …
#define IL_MIMO2_SWITCH_SISO_C …
#define IL_MIMO2_SWITCH_GI …
#define IL_MAX_SEARCH …
#define IL_ACTION_LIMIT …
#define LQ_SIZE …
#define IL_AGG_TPT_THREHOLD …
#define IL_AGG_LOAD_THRESHOLD …
#define IL_AGG_ALL_TID …
#define TID_QUEUE_CELL_SPACING …
#define TID_QUEUE_MAX_SIZE …
#define TID_ROUND_VALUE …
#define TID_MAX_LOAD_COUNT …
#define TID_MAX_TIME_DIFF …
#define TIME_WRAP_AROUND(x, y) …
extern const struct il_rate_info il_rates[RATE_COUNT];
enum il_table_type { … };
#define is_legacy(tbl) …
#define is_siso(tbl) …
#define is_mimo2(tbl) …
#define is_mimo(tbl) …
#define is_Ht(tbl) …
#define is_a_band(tbl) …
#define is_g_and(tbl) …
#define ANT_NONE …
#define ANT_A …
#define ANT_B …
#define ANT_AB …
#define ANT_C …
#define ANT_AC …
#define ANT_BC …
#define ANT_ABC …
#define IL_MAX_MCS_DISPLAY_SIZE …
struct il_rate_mcs_info { … };
struct il_rate_scale_data { … };
struct il_scale_tbl_info { … };
struct il_traffic_load { … };
struct il_lq_sta { … };
struct il_station_priv { … };
static inline u8
il4965_num_of_ant(u8 m)
{ … }
static inline u8
il4965_first_antenna(u8 mask)
{ … }
void il3945_rate_scale_init(struct ieee80211_hw *hw, s32 sta_id);
void il4965_rs_rate_init(struct il_priv *il, struct ieee80211_sta *sta,
u8 sta_id);
void il3945_rs_rate_init(struct il_priv *il, struct ieee80211_sta *sta,
u8 sta_id);
int il4965_rate_control_register(void);
int il3945_rate_control_register(void);
void il4965_rate_control_unregister(void);
void il3945_rate_control_unregister(void);
int il_power_update_mode(struct il_priv *il, bool force);
void il_power_initialize(struct il_priv *il);
extern u32 il_debug_level;
#ifdef CONFIG_IWLEGACY_DEBUG
static inline u32
il_get_debug_level(struct il_priv *il)
{ … }
#else
static inline u32
il_get_debug_level(struct il_priv *il)
{
return il_debug_level;
}
#endif
#define il_print_hex_error(il, p, len) …
#ifdef CONFIG_IWLEGACY_DEBUG
#define IL_DBG(level, fmt, args...) …
#define il_print_hex_dump(il, level, p, len) …
#else
#define IL_DBG …
static inline void
il_print_hex_dump(struct il_priv *il, int level, const void *p, u32 len)
{
}
#endif
#ifdef CONFIG_IWLEGACY_DEBUGFS
void il_dbgfs_register(struct il_priv *il, const char *name);
void il_dbgfs_unregister(struct il_priv *il);
#else
static inline void il_dbgfs_register(struct il_priv *il, const char *name)
{
}
static inline void
il_dbgfs_unregister(struct il_priv *il)
{
}
#endif
#define IL_DL_INFO …
#define IL_DL_MAC80211 …
#define IL_DL_HCMD …
#define IL_DL_STATE …
#define IL_DL_MACDUMP …
#define IL_DL_HCMD_DUMP …
#define IL_DL_EEPROM …
#define IL_DL_RADIO …
#define IL_DL_POWER …
#define IL_DL_TEMP …
#define IL_DL_NOTIF …
#define IL_DL_SCAN …
#define IL_DL_ASSOC …
#define IL_DL_DROP …
#define IL_DL_TXPOWER …
#define IL_DL_AP …
#define IL_DL_FW …
#define IL_DL_RF_KILL …
#define IL_DL_FW_ERRORS …
#define IL_DL_LED …
#define IL_DL_RATE …
#define IL_DL_CALIB …
#define IL_DL_WEP …
#define IL_DL_TX …
#define IL_DL_RX …
#define IL_DL_ISR …
#define IL_DL_HT …
#define IL_DL_11H …
#define IL_DL_STATS …
#define IL_DL_TX_REPLY …
#define IL_DL_QOS …
#define D_INFO(f, a...) …
#define D_MAC80211(f, a...) …
#define D_MACDUMP(f, a...) …
#define D_TEMP(f, a...) …
#define D_SCAN(f, a...) …
#define D_RX(f, a...) …
#define D_TX(f, a...) …
#define D_ISR(f, a...) …
#define D_LED(f, a...) …
#define D_WEP(f, a...) …
#define D_HC(f, a...) …
#define D_HC_DUMP(f, a...) …
#define D_EEPROM(f, a...) …
#define D_CALIB(f, a...) …
#define D_FW(f, a...) …
#define D_RF_KILL(f, a...) …
#define D_DROP(f, a...) …
#define D_AP(f, a...) …
#define D_TXPOWER(f, a...) …
#define D_RATE(f, a...) …
#define D_NOTIF(f, a...) …
#define D_ASSOC(f, a...) …
#define D_HT(f, a...) …
#define D_STATS(f, a...) …
#define D_TX_REPLY(f, a...) …
#define D_QOS(f, a...) …
#define D_RADIO(f, a...) …
#define D_POWER(f, a...) …
#define D_11H(f, a...) …
#endif