#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/etherdevice.h>
#include <linux/sched.h>
#include <linux/slab.h>
#include <linux/types.h>
#include <linux/lockdep.h>
#include <linux/pci.h>
#include <linux/dma-mapping.h>
#include <linux/delay.h>
#include <linux/skbuff.h>
#include <net/mac80211.h>
#include "common.h"
int
_il_poll_bit(struct il_priv *il, u32 addr, u32 bits, u32 mask, int timeout)
{ … }
EXPORT_SYMBOL(…);
void
il_set_bit(struct il_priv *p, u32 r, u32 m)
{ … }
EXPORT_SYMBOL(…);
void
il_clear_bit(struct il_priv *p, u32 r, u32 m)
{ … }
EXPORT_SYMBOL(…);
bool
_il_grab_nic_access(struct il_priv *il)
{ … }
EXPORT_SYMBOL_GPL(…);
int
il_poll_bit(struct il_priv *il, u32 addr, u32 mask, int timeout)
{ … }
EXPORT_SYMBOL(…);
u32
il_rd_prph(struct il_priv *il, u32 reg)
{ … }
EXPORT_SYMBOL(…);
void
il_wr_prph(struct il_priv *il, u32 addr, u32 val)
{ … }
EXPORT_SYMBOL(…);
u32
il_read_targ_mem(struct il_priv *il, u32 addr)
{ … }
EXPORT_SYMBOL(…);
void
il_write_targ_mem(struct il_priv *il, u32 addr, u32 val)
{ … }
EXPORT_SYMBOL(…);
const char *
il_get_cmd_string(u8 cmd)
{ … }
EXPORT_SYMBOL(…);
#define HOST_COMPLETE_TIMEOUT …
static void
il_generic_cmd_callback(struct il_priv *il, struct il_device_cmd *cmd,
struct il_rx_pkt *pkt)
{ … }
static int
il_send_cmd_async(struct il_priv *il, struct il_host_cmd *cmd)
{ … }
int
il_send_cmd_sync(struct il_priv *il, struct il_host_cmd *cmd)
{ … }
EXPORT_SYMBOL(…);
int
il_send_cmd(struct il_priv *il, struct il_host_cmd *cmd)
{ … }
EXPORT_SYMBOL(…);
int
il_send_cmd_pdu(struct il_priv *il, u8 id, u16 len, const void *data)
{ … }
EXPORT_SYMBOL(…);
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))
{ … }
EXPORT_SYMBOL(…);
static int led_mode;
module_param(led_mode, int, 0444);
MODULE_PARM_DESC(…) …;
static const struct ieee80211_tpt_blink il_blink[] = …;
static inline u8
il_blink_compensation(struct il_priv *il, u8 time, u16 compensation)
{ … }
static int
il_led_cmd(struct il_priv *il, unsigned long on, unsigned long off)
{ … }
static void
il_led_brightness_set(struct led_classdev *led_cdev,
enum led_brightness brightness)
{ … }
static int
il_led_blink_set(struct led_classdev *led_cdev, unsigned long *delay_on,
unsigned long *delay_off)
{ … }
void
il_leds_init(struct il_priv *il)
{ … }
EXPORT_SYMBOL(…);
void
il_leds_exit(struct il_priv *il)
{ … }
EXPORT_SYMBOL(…);
const u8 il_eeprom_band_1[14] = …;
static const u8 il_eeprom_band_2[] = …;
static const u8 il_eeprom_band_3[] = …;
static const u8 il_eeprom_band_4[] = …;
static const u8 il_eeprom_band_5[] = …;
static const u8 il_eeprom_band_6[] = …;
static const u8 il_eeprom_band_7[] = …;
static int
il_eeprom_verify_signature(struct il_priv *il)
{ … }
const u8 *
il_eeprom_query_addr(const struct il_priv *il, size_t offset)
{ … }
EXPORT_SYMBOL(…);
u16
il_eeprom_query16(const struct il_priv *il, size_t offset)
{ … }
EXPORT_SYMBOL(…);
int
il_eeprom_init(struct il_priv *il)
{ … }
EXPORT_SYMBOL(…);
void
il_eeprom_free(struct il_priv *il)
{ … }
EXPORT_SYMBOL(…);
static void
il_init_band_reference(const struct il_priv *il, int eep_band,
int *eeprom_ch_count,
const struct il_eeprom_channel **eeprom_ch_info,
const u8 **eeprom_ch_idx)
{ … }
#define CHECK_AND_PRINT(x) …
static int
il_mod_ht40_chan_info(struct il_priv *il, enum nl80211_band band, u16 channel,
const struct il_eeprom_channel *eeprom_ch,
u8 clear_ht40_extension_channel)
{ … }
#define CHECK_AND_PRINT_I(x) …
int
il_init_channel_map(struct il_priv *il)
{ … }
EXPORT_SYMBOL(…);
void
il_free_channel_map(struct il_priv *il)
{ … }
EXPORT_SYMBOL(…);
const struct il_channel_info *
il_get_channel_info(const struct il_priv *il, enum nl80211_band band,
u16 channel)
{ … }
EXPORT_SYMBOL(…);
#define SLP_VEC(X0, X1, X2, X3, X4) …
static void
il_build_powertable_cmd(struct il_priv *il, struct il_powertable_cmd *cmd)
{ … }
static int
il_set_power(struct il_priv *il, struct il_powertable_cmd *cmd)
{ … }
static int
il_power_set_mode(struct il_priv *il, struct il_powertable_cmd *cmd, bool force)
{ … }
int
il_power_update_mode(struct il_priv *il, bool force)
{ … }
EXPORT_SYMBOL(…);
void
il_power_initialize(struct il_priv *il)
{ … }
EXPORT_SYMBOL(…);
#define IL_ACTIVE_DWELL_TIME_24 …
#define IL_ACTIVE_DWELL_TIME_52 …
#define IL_ACTIVE_DWELL_FACTOR_24GHZ …
#define IL_ACTIVE_DWELL_FACTOR_52GHZ …
#define IL_PASSIVE_DWELL_TIME_24 …
#define IL_PASSIVE_DWELL_TIME_52 …
#define IL_PASSIVE_DWELL_BASE …
#define IL_CHANNEL_TUNE_TIME …
static int
il_send_scan_abort(struct il_priv *il)
{ … }
static void
il_complete_scan(struct il_priv *il, bool aborted)
{ … }
void
il_force_scan_end(struct il_priv *il)
{ … }
static void
il_do_scan_abort(struct il_priv *il)
{ … }
int
il_scan_cancel(struct il_priv *il)
{ … }
EXPORT_SYMBOL(…);
int
il_scan_cancel_timeout(struct il_priv *il, unsigned long ms)
{ … }
EXPORT_SYMBOL(…);
static void
il_hdl_scan(struct il_priv *il, struct il_rx_buf *rxb)
{ … }
static void
il_hdl_scan_start(struct il_priv *il, struct il_rx_buf *rxb)
{ … }
static void
il_hdl_scan_results(struct il_priv *il, struct il_rx_buf *rxb)
{ … }
static void
il_hdl_scan_complete(struct il_priv *il, struct il_rx_buf *rxb)
{ … }
void
il_setup_rx_scan_handlers(struct il_priv *il)
{ … }
EXPORT_SYMBOL(…);
u16
il_get_active_dwell_time(struct il_priv *il, enum nl80211_band band,
u8 n_probes)
{ … }
EXPORT_SYMBOL(…);
u16
il_get_passive_dwell_time(struct il_priv *il, enum nl80211_band band,
struct ieee80211_vif *vif)
{ … }
EXPORT_SYMBOL(…);
void
il_init_scan_params(struct il_priv *il)
{ … }
EXPORT_SYMBOL(…);
static int
il_scan_initiate(struct il_priv *il, struct ieee80211_vif *vif)
{ … }
int
il_mac_hw_scan(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
struct ieee80211_scan_request *hw_req)
{ … }
EXPORT_SYMBOL(…);
static void
il_bg_scan_check(struct work_struct *data)
{ … }
u16
il_fill_probe_req(struct il_priv *il, struct ieee80211_mgmt *frame,
const u8 *ta, const u8 *ies, int ie_len, int left)
{ … }
EXPORT_SYMBOL(…);
static void
il_bg_abort_scan(struct work_struct *work)
{ … }
static void
il_bg_scan_completed(struct work_struct *work)
{ … }
void
il_setup_scan_deferred_work(struct il_priv *il)
{ … }
EXPORT_SYMBOL(…);
void
il_cancel_scan_deferred_work(struct il_priv *il)
{ … }
EXPORT_SYMBOL(…);
static void
il_sta_ucode_activate(struct il_priv *il, u8 sta_id)
{ … }
static int
il_process_add_sta_resp(struct il_priv *il, struct il_addsta_cmd *addsta,
struct il_rx_pkt *pkt, bool sync)
{ … }
static void
il_add_sta_callback(struct il_priv *il, struct il_device_cmd *cmd,
struct il_rx_pkt *pkt)
{ … }
int
il_send_add_sta(struct il_priv *il, struct il_addsta_cmd *sta, u8 flags)
{ … }
EXPORT_SYMBOL(…);
static void
il_set_ht_add_station(struct il_priv *il, u8 idx, struct ieee80211_sta *sta)
{ … }
u8
il_prep_station(struct il_priv *il, const u8 *addr, bool is_ap,
struct ieee80211_sta *sta)
{ … }
EXPORT_SYMBOL_GPL(…);
#define STA_WAIT_TIMEOUT …
int
il_add_station_common(struct il_priv *il, const u8 *addr, bool is_ap,
struct ieee80211_sta *sta, u8 *sta_id_r)
{ … }
EXPORT_SYMBOL(…);
static void
il_sta_ucode_deactivate(struct il_priv *il, u8 sta_id)
{ … }
static int
il_send_remove_station(struct il_priv *il, const u8 * addr, int sta_id,
bool temporary)
{ … }
int
il_remove_station(struct il_priv *il, const u8 sta_id, const u8 * addr)
{ … }
EXPORT_SYMBOL_GPL(…);
void
il_clear_ucode_stations(struct il_priv *il)
{ … }
EXPORT_SYMBOL(…);
void
il_restore_stations(struct il_priv *il)
{ … }
EXPORT_SYMBOL(…);
int
il_get_free_ucode_key_idx(struct il_priv *il)
{ … }
EXPORT_SYMBOL(…);
void
il_dealloc_bcast_stations(struct il_priv *il)
{ … }
EXPORT_SYMBOL_GPL(…);
#ifdef CONFIG_IWLEGACY_DEBUG
static void
il_dump_lq_cmd(struct il_priv *il, struct il_link_quality_cmd *lq)
{ … }
#else
static inline void
il_dump_lq_cmd(struct il_priv *il, struct il_link_quality_cmd *lq)
{
}
#endif
static bool
il_is_lq_table_valid(struct il_priv *il, struct il_link_quality_cmd *lq)
{ … }
int
il_send_lq_cmd(struct il_priv *il, struct il_link_quality_cmd *lq,
u8 flags, bool init)
{ … }
EXPORT_SYMBOL(…);
int
il_mac_sta_remove(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
struct ieee80211_sta *sta)
{ … }
EXPORT_SYMBOL(…);
int
il_rx_queue_space(const struct il_rx_queue *q)
{ … }
EXPORT_SYMBOL(…);
void
il_rx_queue_update_write_ptr(struct il_priv *il, struct il_rx_queue *q)
{ … }
EXPORT_SYMBOL(…);
int
il_rx_queue_alloc(struct il_priv *il)
{ … }
EXPORT_SYMBOL(…);
void
il_hdl_spectrum_measurement(struct il_priv *il, struct il_rx_buf *rxb)
{ … }
EXPORT_SYMBOL(…);
int
il_set_decrypted_flag(struct il_priv *il, struct ieee80211_hdr *hdr,
u32 decrypt_res, struct ieee80211_rx_status *stats)
{ … }
EXPORT_SYMBOL(…);
void
il_txq_update_write_ptr(struct il_priv *il, struct il_tx_queue *txq)
{ … }
EXPORT_SYMBOL(…);
void
il_tx_queue_unmap(struct il_priv *il, int txq_id)
{ … }
EXPORT_SYMBOL(…);
void
il_tx_queue_free(struct il_priv *il, int txq_id)
{ … }
EXPORT_SYMBOL(…);
void
il_cmd_queue_unmap(struct il_priv *il)
{ … }
EXPORT_SYMBOL(…);
void
il_cmd_queue_free(struct il_priv *il)
{ … }
EXPORT_SYMBOL(…);
int
il_queue_space(const struct il_queue *q)
{ … }
EXPORT_SYMBOL(…);
static int
il_queue_init(struct il_priv *il, struct il_queue *q, int slots, u32 id)
{ … }
static int
il_tx_queue_alloc(struct il_priv *il, struct il_tx_queue *txq, u32 id)
{ … }
int
il_tx_queue_init(struct il_priv *il, u32 txq_id)
{ … }
EXPORT_SYMBOL(…);
void
il_tx_queue_reset(struct il_priv *il, u32 txq_id)
{ … }
EXPORT_SYMBOL(…);
int
il_enqueue_hcmd(struct il_priv *il, struct il_host_cmd *cmd)
{ … }
static void
il_hcmd_queue_reclaim(struct il_priv *il, int txq_id, int idx, int cmd_idx)
{ … }
void
il_tx_cmd_complete(struct il_priv *il, struct il_rx_buf *rxb)
{ … }
EXPORT_SYMBOL(…);
MODULE_DESCRIPTION(…) …;
MODULE_VERSION(…);
MODULE_AUTHOR(…) …;
MODULE_LICENSE(…) …;
static bool bt_coex_active = …;
module_param(bt_coex_active, bool, 0444);
MODULE_PARM_DESC(…) …;
u32 il_debug_level;
EXPORT_SYMBOL(…);
const u8 il_bcast_addr[ETH_ALEN] = …;
EXPORT_SYMBOL(…);
#define MAX_BIT_RATE_40_MHZ …
#define MAX_BIT_RATE_20_MHZ …
static void
il_init_ht_hw_capab(const struct il_priv *il,
struct ieee80211_sta_ht_cap *ht_info,
enum nl80211_band band)
{ … }
int
il_init_geos(struct il_priv *il)
{ … }
EXPORT_SYMBOL(…);
void
il_free_geos(struct il_priv *il)
{ … }
EXPORT_SYMBOL(…);
static bool
il_is_channel_extension(struct il_priv *il, enum nl80211_band band,
u16 channel, u8 extension_chan_offset)
{ … }
bool
il_is_ht40_tx_allowed(struct il_priv *il, struct ieee80211_sta_ht_cap *ht_cap)
{ … }
EXPORT_SYMBOL(…);
static u16 noinline
il_adjust_beacon_interval(u16 beacon_val, u16 max_beacon_val)
{ … }
int
il_send_rxon_timing(struct il_priv *il)
{ … }
EXPORT_SYMBOL(…);
void
il_set_rxon_hwcrypto(struct il_priv *il, int hw_decrypt)
{ … }
EXPORT_SYMBOL(…);
int
il_check_rxon_cmd(struct il_priv *il)
{ … }
EXPORT_SYMBOL(…);
int
il_full_rxon_required(struct il_priv *il)
{ … }
EXPORT_SYMBOL(…);
u8
il_get_lowest_plcp(struct il_priv *il)
{ … }
EXPORT_SYMBOL(…);
static void
_il_set_rxon_ht(struct il_priv *il, struct il_ht_config *ht_conf)
{ … }
void
il_set_rxon_ht(struct il_priv *il, struct il_ht_config *ht_conf)
{ … }
EXPORT_SYMBOL(…);
u8
il_get_single_channel_number(struct il_priv *il, enum nl80211_band band)
{ … }
EXPORT_SYMBOL(…);
int
il_set_rxon_channel(struct il_priv *il, struct ieee80211_channel *ch)
{ … }
EXPORT_SYMBOL(…);
void
il_set_flags_for_band(struct il_priv *il, enum nl80211_band band,
struct ieee80211_vif *vif)
{ … }
EXPORT_SYMBOL(…);
void
il_connection_init_rx_config(struct il_priv *il)
{ … }
EXPORT_SYMBOL(…);
void
il_set_rate(struct il_priv *il)
{ … }
EXPORT_SYMBOL(…);
void
il_chswitch_done(struct il_priv *il, bool is_success)
{ … }
EXPORT_SYMBOL(…);
void
il_hdl_csa(struct il_priv *il, struct il_rx_buf *rxb)
{ … }
EXPORT_SYMBOL(…);
#ifdef CONFIG_IWLEGACY_DEBUG
void
il_print_rx_config_cmd(struct il_priv *il)
{ … }
EXPORT_SYMBOL(…);
#endif
void
il_irq_handle_error(struct il_priv *il)
{ … }
EXPORT_SYMBOL(…);
static int
_il_apm_stop_master(struct il_priv *il)
{ … }
void
_il_apm_stop(struct il_priv *il)
{ … }
EXPORT_SYMBOL(…);
void
il_apm_stop(struct il_priv *il)
{ … }
EXPORT_SYMBOL(…);
int
il_apm_init(struct il_priv *il)
{ … }
EXPORT_SYMBOL(…);
int
il_set_tx_power(struct il_priv *il, s8 tx_power, bool force)
{ … }
EXPORT_SYMBOL(…);
void
il_send_bt_config(struct il_priv *il)
{ … }
EXPORT_SYMBOL(…);
int
il_send_stats_request(struct il_priv *il, u8 flags, bool clear)
{ … }
EXPORT_SYMBOL(…);
void
il_hdl_pm_sleep(struct il_priv *il, struct il_rx_buf *rxb)
{ … }
EXPORT_SYMBOL(…);
void
il_hdl_pm_debug_stats(struct il_priv *il, struct il_rx_buf *rxb)
{ … }
EXPORT_SYMBOL(…);
void
il_hdl_error(struct il_priv *il, struct il_rx_buf *rxb)
{ … }
EXPORT_SYMBOL(…);
void
il_clear_isr_stats(struct il_priv *il)
{ … }
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)
{ … }
EXPORT_SYMBOL(…);
int
il_mac_tx_last_beacon(struct ieee80211_hw *hw)
{ … }
EXPORT_SYMBOL_GPL(…);
static int
il_set_mode(struct il_priv *il)
{ … }
int
il_mac_add_interface(struct ieee80211_hw *hw, struct ieee80211_vif *vif)
{ … }
EXPORT_SYMBOL(…);
static void
il_teardown_interface(struct il_priv *il, struct ieee80211_vif *vif)
{ … }
void
il_mac_remove_interface(struct ieee80211_hw *hw, struct ieee80211_vif *vif)
{ … }
EXPORT_SYMBOL(…);
int
il_alloc_txq_mem(struct il_priv *il)
{ … }
EXPORT_SYMBOL(…);
void
il_free_txq_mem(struct il_priv *il)
{ … }
EXPORT_SYMBOL(…);
int
il_force_reset(struct il_priv *il, bool external)
{ … }
EXPORT_SYMBOL(…);
int
il_mac_change_interface(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
enum nl80211_iftype newtype, bool newp2p)
{ … }
EXPORT_SYMBOL(…);
void il_mac_flush(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
u32 queues, bool drop)
{ … }
EXPORT_SYMBOL(…);
static int
il_check_stuck_queue(struct il_priv *il, int cnt)
{ … }
#define IL_WD_TICK(timeout) …
void
il_bg_watchdog(struct timer_list *t)
{ … }
EXPORT_SYMBOL(…);
void
il_setup_watchdog(struct il_priv *il)
{ … }
EXPORT_SYMBOL(…);
u32
il_usecs_to_beacons(struct il_priv *il, u32 usec, u32 beacon_interval)
{ … }
EXPORT_SYMBOL(…);
__le32
il_add_beacon_time(struct il_priv *il, u32 base, u32 addon,
u32 beacon_interval)
{ … }
EXPORT_SYMBOL(…);
#ifdef CONFIG_PM_SLEEP
static int
il_pci_suspend(struct device *device)
{ … }
static int
il_pci_resume(struct device *device)
{ … }
SIMPLE_DEV_PM_OPS(il_pm_ops, il_pci_suspend, il_pci_resume);
EXPORT_SYMBOL(…);
#endif
static void
il_update_qos(struct il_priv *il)
{ … }
int
il_mac_config(struct ieee80211_hw *hw, u32 changed)
{ … }
EXPORT_SYMBOL(…);
void
il_mac_reset_tsf(struct ieee80211_hw *hw, struct ieee80211_vif *vif)
{ … }
EXPORT_SYMBOL(…);
static void
il_ht_conf(struct il_priv *il, struct ieee80211_vif *vif)
{ … }
static inline void
il_set_no_assoc(struct il_priv *il, struct ieee80211_vif *vif)
{ … }
static void
il_beacon_update(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)
{ … }
EXPORT_SYMBOL(…);
irqreturn_t
il_isr(int irq, void *data)
{ … }
EXPORT_SYMBOL(…);
void
il_tx_cmd_protection(struct il_priv *il, struct ieee80211_tx_info *info,
__le16 fc, __le32 *tx_flags)
{ … }
EXPORT_SYMBOL(…);