Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Functions | Variables
common.c File Reference
#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/init.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"

Go to the source code of this file.

Data Structures

struct  il_power_vec_entry
 

Macros

#define HOST_COMPLETE_TIMEOUT   (HZ / 2)
 
#define CHECK_AND_PRINT(x)
 
#define CHECK_AND_PRINT_I(x)
 
#define IL_ACTIVE_DWELL_TIME_24   (30) /* all times in msec */
 
#define IL_ACTIVE_DWELL_TIME_52   (20)
 
#define IL_ACTIVE_DWELL_FACTOR_24GHZ   (3)
 
#define IL_ACTIVE_DWELL_FACTOR_52GHZ   (2)
 
#define IL_PASSIVE_DWELL_TIME_24   (20) /* all times in msec */
 
#define IL_PASSIVE_DWELL_TIME_52   (10)
 
#define IL_PASSIVE_DWELL_BASE   (100)
 
#define IL_CHANNEL_TUNE_TIME   5
 
#define STA_WAIT_TIMEOUT   (HZ/2)
 
#define MAX_BIT_RATE_40_MHZ   150 /* Mbps */
 
#define MAX_BIT_RATE_20_MHZ   72 /* Mbps */
 
#define CHK(cond)
 
#define CHK_NEQ(c1, c2)
 
#define IL_WD_TICK(timeout)   ((timeout) / 4)
 

Functions

int _il_poll_bit (struct il_priv *il, u32 addr, u32 bits, u32 mask, int timeout)
 
 EXPORT_SYMBOL (_il_poll_bit)
 
void il_set_bit (struct il_priv *p, u32 r, u32 m)
 
 EXPORT_SYMBOL (il_set_bit)
 
void il_clear_bit (struct il_priv *p, u32 r, u32 m)
 
 EXPORT_SYMBOL (il_clear_bit)
 
bool _il_grab_nic_access (struct il_priv *il)
 
 EXPORT_SYMBOL_GPL (_il_grab_nic_access)
 
int il_poll_bit (struct il_priv *il, u32 addr, u32 mask, int timeout)
 
 EXPORT_SYMBOL (il_poll_bit)
 
u32 il_rd_prph (struct il_priv *il, u32 reg)
 
 EXPORT_SYMBOL (il_rd_prph)
 
void il_wr_prph (struct il_priv *il, u32 addr, u32 val)
 
 EXPORT_SYMBOL (il_wr_prph)
 
u32 il_read_targ_mem (struct il_priv *il, u32 addr)
 
 EXPORT_SYMBOL (il_read_targ_mem)
 
void il_write_targ_mem (struct il_priv *il, u32 addr, u32 val)
 
 EXPORT_SYMBOL (il_write_targ_mem)
 
const charil_get_cmd_string (u8 cmd)
 
 EXPORT_SYMBOL (il_get_cmd_string)
 
int il_send_cmd_sync (struct il_priv *il, struct il_host_cmd *cmd)
 
 EXPORT_SYMBOL (il_send_cmd_sync)
 
int il_send_cmd (struct il_priv *il, struct il_host_cmd *cmd)
 
 EXPORT_SYMBOL (il_send_cmd)
 
int il_send_cmd_pdu (struct il_priv *il, u8 id, u16 len, const void *data)
 
 EXPORT_SYMBOL (il_send_cmd_pdu)
 
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 (il_send_cmd_pdu_async)
 
 module_param (led_mode, int, S_IRUGO)
 
 MODULE_PARM_DESC (led_mode,"0=system default, ""1=On(RF On)/Off(RF Off), 2=blinking")
 
void il_leds_init (struct il_priv *il)
 
 EXPORT_SYMBOL (il_leds_init)
 
void il_leds_exit (struct il_priv *il)
 
 EXPORT_SYMBOL (il_leds_exit)
 
const u8il_eeprom_query_addr (const struct il_priv *il, size_t offset)
 
 EXPORT_SYMBOL (il_eeprom_query_addr)
 
u16 il_eeprom_query16 (const struct il_priv *il, size_t offset)
 
 EXPORT_SYMBOL (il_eeprom_query16)
 
int il_eeprom_init (struct il_priv *il)
 
 EXPORT_SYMBOL (il_eeprom_init)
 
void il_eeprom_free (struct il_priv *il)
 
 EXPORT_SYMBOL (il_eeprom_free)
 
int il_init_channel_map (struct il_priv *il)
 
 EXPORT_SYMBOL (il_init_channel_map)
 
void il_free_channel_map (struct il_priv *il)
 
 EXPORT_SYMBOL (il_free_channel_map)
 
struct il_channel_infoil_get_channel_info (const struct il_priv *il, enum ieee80211_band band, u16 channel)
 
 EXPORT_SYMBOL (il_get_channel_info)
 
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 (il_power_update_mode)
 
void il_power_initialize (struct il_priv *il)
 
 EXPORT_SYMBOL (il_power_initialize)
 
void il_force_scan_end (struct il_priv *il)
 
int il_scan_cancel (struct il_priv *il)
 
 EXPORT_SYMBOL (il_scan_cancel)
 
int il_scan_cancel_timeout (struct il_priv *il, unsigned long ms)
 
 EXPORT_SYMBOL (il_scan_cancel_timeout)
 
void il_setup_rx_scan_handlers (struct il_priv *il)
 
 EXPORT_SYMBOL (il_setup_rx_scan_handlers)
 
u16 il_get_active_dwell_time (struct il_priv *il, enum ieee80211_band band, u8 n_probes)
 
 EXPORT_SYMBOL (il_get_active_dwell_time)
 
u16 il_get_passive_dwell_time (struct il_priv *il, enum ieee80211_band band, struct ieee80211_vif *vif)
 
 EXPORT_SYMBOL (il_get_passive_dwell_time)
 
void il_init_scan_params (struct il_priv *il)
 
 EXPORT_SYMBOL (il_init_scan_params)
 
int il_mac_hw_scan (struct ieee80211_hw *hw, struct ieee80211_vif *vif, struct cfg80211_scan_request *req)
 
 EXPORT_SYMBOL (il_mac_hw_scan)
 
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 (il_fill_probe_req)
 
void il_setup_scan_deferred_work (struct il_priv *il)
 
 EXPORT_SYMBOL (il_setup_scan_deferred_work)
 
void il_cancel_scan_deferred_work (struct il_priv *il)
 
 EXPORT_SYMBOL (il_cancel_scan_deferred_work)
 
int il_send_add_sta (struct il_priv *il, struct il_addsta_cmd *sta, u8 flags)
 
 EXPORT_SYMBOL (il_send_add_sta)
 
u8 il_prep_station (struct il_priv *il, const u8 *addr, bool is_ap, struct ieee80211_sta *sta)
 
 EXPORT_SYMBOL_GPL (il_prep_station)
 
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 (il_add_station_common)
 
int il_remove_station (struct il_priv *il, const u8 sta_id, const u8 *addr)
 
 EXPORT_SYMBOL_GPL (il_remove_station)
 
void il_clear_ucode_stations (struct il_priv *il)
 
 EXPORT_SYMBOL (il_clear_ucode_stations)
 
void il_restore_stations (struct il_priv *il)
 
 EXPORT_SYMBOL (il_restore_stations)
 
int il_get_free_ucode_key_idx (struct il_priv *il)
 
 EXPORT_SYMBOL (il_get_free_ucode_key_idx)
 
void il_dealloc_bcast_stations (struct il_priv *il)
 
 EXPORT_SYMBOL_GPL (il_dealloc_bcast_stations)
 
int il_send_lq_cmd (struct il_priv *il, struct il_link_quality_cmd *lq, u8 flags, bool init)
 
 EXPORT_SYMBOL (il_send_lq_cmd)
 
int il_mac_sta_remove (struct ieee80211_hw *hw, struct ieee80211_vif *vif, struct ieee80211_sta *sta)
 
 EXPORT_SYMBOL (il_mac_sta_remove)
 
int il_rx_queue_space (const struct il_rx_queue *q)
 
 EXPORT_SYMBOL (il_rx_queue_space)
 
void il_rx_queue_update_write_ptr (struct il_priv *il, struct il_rx_queue *q)
 
 EXPORT_SYMBOL (il_rx_queue_update_write_ptr)
 
int il_rx_queue_alloc (struct il_priv *il)
 
 EXPORT_SYMBOL (il_rx_queue_alloc)
 
void il_hdl_spectrum_measurement (struct il_priv *il, struct il_rx_buf *rxb)
 
 EXPORT_SYMBOL (il_hdl_spectrum_measurement)
 
int il_set_decrypted_flag (struct il_priv *il, struct ieee80211_hdr *hdr, u32 decrypt_res, struct ieee80211_rx_status *stats)
 
 EXPORT_SYMBOL (il_set_decrypted_flag)
 
void il_txq_update_write_ptr (struct il_priv *il, struct il_tx_queue *txq)
 
 EXPORT_SYMBOL (il_txq_update_write_ptr)
 
void il_tx_queue_unmap (struct il_priv *il, int txq_id)
 
 EXPORT_SYMBOL (il_tx_queue_unmap)
 
void il_tx_queue_free (struct il_priv *il, int txq_id)
 
 EXPORT_SYMBOL (il_tx_queue_free)
 
void il_cmd_queue_unmap (struct il_priv *il)
 
 EXPORT_SYMBOL (il_cmd_queue_unmap)
 
void il_cmd_queue_free (struct il_priv *il)
 
 EXPORT_SYMBOL (il_cmd_queue_free)
 
int il_queue_space (const struct il_queue *q)
 
 EXPORT_SYMBOL (il_queue_space)
 
int il_tx_queue_init (struct il_priv *il, u32 txq_id)
 
 EXPORT_SYMBOL (il_tx_queue_init)
 
void il_tx_queue_reset (struct il_priv *il, u32 txq_id)
 
 EXPORT_SYMBOL (il_tx_queue_reset)
 
int il_enqueue_hcmd (struct il_priv *il, struct il_host_cmd *cmd)
 
void il_tx_cmd_complete (struct il_priv *il, struct il_rx_buf *rxb)
 
 EXPORT_SYMBOL (il_tx_cmd_complete)
 
 MODULE_DESCRIPTION ("iwl-legacy: common functions for 3945 and 4965")
 
 MODULE_VERSION (IWLWIFI_VERSION)
 
 MODULE_AUTHOR (DRV_COPYRIGHT" "DRV_AUTHOR)
 
 MODULE_LICENSE ("GPL")
 
 module_param (bt_coex_active, bool, S_IRUGO)
 
 MODULE_PARM_DESC (bt_coex_active,"enable wifi/bluetooth co-exist")
 
 EXPORT_SYMBOL (il_debug_level)
 
 EXPORT_SYMBOL (il_bcast_addr)
 
int il_init_geos (struct il_priv *il)
 
 EXPORT_SYMBOL (il_init_geos)
 
void il_free_geos (struct il_priv *il)
 
 EXPORT_SYMBOL (il_free_geos)
 
bool il_is_ht40_tx_allowed (struct il_priv *il, struct ieee80211_sta_ht_cap *ht_cap)
 
 EXPORT_SYMBOL (il_is_ht40_tx_allowed)
 
int il_send_rxon_timing (struct il_priv *il)
 
 EXPORT_SYMBOL (il_send_rxon_timing)
 
void il_set_rxon_hwcrypto (struct il_priv *il, int hw_decrypt)
 
 EXPORT_SYMBOL (il_set_rxon_hwcrypto)
 
int il_check_rxon_cmd (struct il_priv *il)
 
 EXPORT_SYMBOL (il_check_rxon_cmd)
 
int il_full_rxon_required (struct il_priv *il)
 
 EXPORT_SYMBOL (il_full_rxon_required)
 
u8 il_get_lowest_plcp (struct il_priv *il)
 
 EXPORT_SYMBOL (il_get_lowest_plcp)
 
void il_set_rxon_ht (struct il_priv *il, struct il_ht_config *ht_conf)
 
 EXPORT_SYMBOL (il_set_rxon_ht)
 
u8 il_get_single_channel_number (struct il_priv *il, enum ieee80211_band band)
 
 EXPORT_SYMBOL (il_get_single_channel_number)
 
int il_set_rxon_channel (struct il_priv *il, struct ieee80211_channel *ch)
 
 EXPORT_SYMBOL (il_set_rxon_channel)
 
void il_set_flags_for_band (struct il_priv *il, enum ieee80211_band band, struct ieee80211_vif *vif)
 
 EXPORT_SYMBOL (il_set_flags_for_band)
 
void il_connection_init_rx_config (struct il_priv *il)
 
 EXPORT_SYMBOL (il_connection_init_rx_config)
 
void il_set_rate (struct il_priv *il)
 
 EXPORT_SYMBOL (il_set_rate)
 
void il_chswitch_done (struct il_priv *il, bool is_success)
 
 EXPORT_SYMBOL (il_chswitch_done)
 
void il_hdl_csa (struct il_priv *il, struct il_rx_buf *rxb)
 
 EXPORT_SYMBOL (il_hdl_csa)
 
void il_irq_handle_error (struct il_priv *il)
 
 EXPORT_SYMBOL (il_irq_handle_error)
 
void _il_apm_stop (struct il_priv *il)
 
 EXPORT_SYMBOL (_il_apm_stop)
 
void il_apm_stop (struct il_priv *il)
 
 EXPORT_SYMBOL (il_apm_stop)
 
int il_apm_init (struct il_priv *il)
 
 EXPORT_SYMBOL (il_apm_init)
 
int il_set_tx_power (struct il_priv *il, s8 tx_power, bool force)
 
 EXPORT_SYMBOL (il_set_tx_power)
 
void il_send_bt_config (struct il_priv *il)
 
 EXPORT_SYMBOL (il_send_bt_config)
 
int il_send_stats_request (struct il_priv *il, u8 flags, bool clear)
 
 EXPORT_SYMBOL (il_send_stats_request)
 
void il_hdl_pm_sleep (struct il_priv *il, struct il_rx_buf *rxb)
 
 EXPORT_SYMBOL (il_hdl_pm_sleep)
 
void il_hdl_pm_debug_stats (struct il_priv *il, struct il_rx_buf *rxb)
 
 EXPORT_SYMBOL (il_hdl_pm_debug_stats)
 
void il_hdl_error (struct il_priv *il, struct il_rx_buf *rxb)
 
 EXPORT_SYMBOL (il_hdl_error)
 
void il_clear_isr_stats (struct il_priv *il)
 
int il_mac_conf_tx (struct ieee80211_hw *hw, struct ieee80211_vif *vif, u16 queue, const struct ieee80211_tx_queue_params *params)
 
 EXPORT_SYMBOL (il_mac_conf_tx)
 
int il_mac_tx_last_beacon (struct ieee80211_hw *hw)
 
 EXPORT_SYMBOL_GPL (il_mac_tx_last_beacon)
 
int il_mac_add_interface (struct ieee80211_hw *hw, struct ieee80211_vif *vif)
 
 EXPORT_SYMBOL (il_mac_add_interface)
 
void il_mac_remove_interface (struct ieee80211_hw *hw, struct ieee80211_vif *vif)
 
 EXPORT_SYMBOL (il_mac_remove_interface)
 
int il_alloc_txq_mem (struct il_priv *il)
 
 EXPORT_SYMBOL (il_alloc_txq_mem)
 
void il_free_txq_mem (struct il_priv *il)
 
 EXPORT_SYMBOL (il_free_txq_mem)
 
int il_force_reset (struct il_priv *il, bool external)
 
int il_mac_change_interface (struct ieee80211_hw *hw, struct ieee80211_vif *vif, enum nl80211_iftype newtype, bool newp2p)
 
 EXPORT_SYMBOL (il_mac_change_interface)
 
void il_bg_watchdog (unsigned long data)
 
 EXPORT_SYMBOL (il_bg_watchdog)
 
void il_setup_watchdog (struct il_priv *il)
 
 EXPORT_SYMBOL (il_setup_watchdog)
 
u32 il_usecs_to_beacons (struct il_priv *il, u32 usec, u32 beacon_interval)
 
 EXPORT_SYMBOL (il_usecs_to_beacons)
 
__le32 il_add_beacon_time (struct il_priv *il, u32 base, u32 addon, u32 beacon_interval)
 
 EXPORT_SYMBOL (il_add_beacon_time)
 
int il_mac_config (struct ieee80211_hw *hw, u32 changed)
 
 EXPORT_SYMBOL (il_mac_config)
 
void il_mac_reset_tsf (struct ieee80211_hw *hw, struct ieee80211_vif *vif)
 
 EXPORT_SYMBOL (il_mac_reset_tsf)
 
void il_mac_bss_info_changed (struct ieee80211_hw *hw, struct ieee80211_vif *vif, struct ieee80211_bss_conf *bss_conf, u32 changes)
 
 EXPORT_SYMBOL (il_mac_bss_info_changed)
 
irqreturn_t il_isr (int irq, void *data)
 
 EXPORT_SYMBOL (il_isr)
 
void il_tx_cmd_protection (struct il_priv *il, struct ieee80211_tx_info *info, __le16 fc, __le32 *tx_flags)
 
 EXPORT_SYMBOL (il_tx_cmd_protection)
 

Variables

const u8 il_eeprom_band_1 [14]
 
u32 il_debug_level
 
const u8 il_bcast_addr [ETH_ALEN] = { 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF }
 

Macro Definition Documentation

#define CHECK_AND_PRINT (   x)
Value:
((eeprom_ch->flags & EEPROM_CHANNEL_##x) \
? # x " " : "")

Definition at line 858 of file common.c.

#define CHECK_AND_PRINT_I (   x)
Value:
((eeprom_ch_info[ch].flags & EEPROM_CHANNEL_##x) \
? # x " " : "")

Definition at line 898 of file common.c.

#define CHK (   cond)
Value:
if ((cond)) { \
D_INFO("need full RXON - " #cond "\n"); \
return 1; \
}
#define CHK_NEQ (   c1,
  c2 
)
Value:
if ((c1) != (c2)) { \
D_INFO("need full RXON - " \
#c1 " != " #c2 " - %d != %d\n", \
(c1), (c2)); \
return 1; \
}
#define HOST_COMPLETE_TIMEOUT   (HZ / 2)

Definition at line 257 of file common.c.

#define IL_ACTIVE_DWELL_FACTOR_24GHZ   (3)

Definition at line 1202 of file common.c.

#define IL_ACTIVE_DWELL_FACTOR_52GHZ   (2)

Definition at line 1203 of file common.c.

#define IL_ACTIVE_DWELL_TIME_24   (30) /* all times in msec */

Definition at line 1199 of file common.c.

#define IL_ACTIVE_DWELL_TIME_52   (20)

Definition at line 1200 of file common.c.

#define IL_CHANNEL_TUNE_TIME   5

Definition at line 1211 of file common.c.

#define IL_PASSIVE_DWELL_BASE   (100)

Definition at line 1210 of file common.c.

#define IL_PASSIVE_DWELL_TIME_24   (20) /* all times in msec */

Definition at line 1208 of file common.c.

#define IL_PASSIVE_DWELL_TIME_52   (10)

Definition at line 1209 of file common.c.

#define IL_WD_TICK (   timeout)    ((timeout) / 4)

Definition at line 4746 of file common.c.

#define MAX_BIT_RATE_20_MHZ   72 /* Mbps */

Definition at line 3320 of file common.c.

#define MAX_BIT_RATE_40_MHZ   150 /* Mbps */

Definition at line 3319 of file common.c.

#define STA_WAIT_TIMEOUT   (HZ/2)

Definition at line 1964 of file common.c.

Function Documentation

void _il_apm_stop ( struct il_priv il)

Definition at line 4154 of file common.c.

bool _il_grab_nic_access ( struct il_priv il)

Definition at line 85 of file common.c.

int _il_poll_bit ( struct il_priv il,
u32  addr,
u32  bits,
u32  mask,
int  timeout 
)

Definition at line 46 of file common.c.

EXPORT_SYMBOL ( _il_poll_bit  )
EXPORT_SYMBOL ( il_set_bit  )
EXPORT_SYMBOL ( il_clear_bit  )
EXPORT_SYMBOL ( il_poll_bit  )
EXPORT_SYMBOL ( il_rd_prph  )
EXPORT_SYMBOL ( il_wr_prph  )
EXPORT_SYMBOL ( il_read_targ_mem  )
EXPORT_SYMBOL ( il_write_targ_mem  )
EXPORT_SYMBOL ( il_get_cmd_string  )
EXPORT_SYMBOL ( il_send_cmd_sync  )
EXPORT_SYMBOL ( il_send_cmd  )
EXPORT_SYMBOL ( il_send_cmd_pdu  )
EXPORT_SYMBOL ( il_send_cmd_pdu_async  )
EXPORT_SYMBOL ( il_leds_init  )
EXPORT_SYMBOL ( il_leds_exit  )
EXPORT_SYMBOL ( il_eeprom_query_addr  )
EXPORT_SYMBOL ( il_eeprom_query16  )
EXPORT_SYMBOL ( il_eeprom_init  )
EXPORT_SYMBOL ( il_eeprom_free  )
EXPORT_SYMBOL ( il_init_channel_map  )
EXPORT_SYMBOL ( il_free_channel_map  )
EXPORT_SYMBOL ( il_get_channel_info  )
EXPORT_SYMBOL ( il_power_update_mode  )
EXPORT_SYMBOL ( il_power_initialize  )
EXPORT_SYMBOL ( il_scan_cancel  )
EXPORT_SYMBOL ( il_scan_cancel_timeout  )
EXPORT_SYMBOL ( il_setup_rx_scan_handlers  )
EXPORT_SYMBOL ( il_get_active_dwell_time  )
EXPORT_SYMBOL ( il_get_passive_dwell_time  )
EXPORT_SYMBOL ( il_init_scan_params  )
EXPORT_SYMBOL ( il_mac_hw_scan  )
EXPORT_SYMBOL ( il_fill_probe_req  )
EXPORT_SYMBOL ( il_setup_scan_deferred_work  )
EXPORT_SYMBOL ( il_cancel_scan_deferred_work  )
EXPORT_SYMBOL ( il_send_add_sta  )
EXPORT_SYMBOL ( il_add_station_common  )
EXPORT_SYMBOL ( il_clear_ucode_stations  )
EXPORT_SYMBOL ( il_restore_stations  )
EXPORT_SYMBOL ( il_get_free_ucode_key_idx  )
EXPORT_SYMBOL ( il_send_lq_cmd  )
EXPORT_SYMBOL ( il_mac_sta_remove  )
EXPORT_SYMBOL ( il_rx_queue_space  )
EXPORT_SYMBOL ( il_rx_queue_update_write_ptr  )
EXPORT_SYMBOL ( il_rx_queue_alloc  )
EXPORT_SYMBOL ( il_hdl_spectrum_measurement  )
EXPORT_SYMBOL ( il_set_decrypted_flag  )
EXPORT_SYMBOL ( il_txq_update_write_ptr  )
EXPORT_SYMBOL ( il_tx_queue_unmap  )
EXPORT_SYMBOL ( il_tx_queue_free  )
EXPORT_SYMBOL ( il_cmd_queue_unmap  )
EXPORT_SYMBOL ( il_cmd_queue_free  )
EXPORT_SYMBOL ( il_queue_space  )
EXPORT_SYMBOL ( il_tx_queue_init  )
EXPORT_SYMBOL ( il_tx_queue_reset  )
EXPORT_SYMBOL ( il_tx_cmd_complete  )
EXPORT_SYMBOL ( il_debug_level  )
EXPORT_SYMBOL ( il_bcast_addr  )
EXPORT_SYMBOL ( il_init_geos  )
EXPORT_SYMBOL ( il_free_geos  )
EXPORT_SYMBOL ( il_is_ht40_tx_allowed  )
EXPORT_SYMBOL ( il_send_rxon_timing  )
EXPORT_SYMBOL ( il_set_rxon_hwcrypto  )
EXPORT_SYMBOL ( il_check_rxon_cmd  )
EXPORT_SYMBOL ( il_full_rxon_required  )
EXPORT_SYMBOL ( il_get_lowest_plcp  )
EXPORT_SYMBOL ( il_set_rxon_ht  )
EXPORT_SYMBOL ( il_get_single_channel_number  )
EXPORT_SYMBOL ( il_set_rxon_channel  )
EXPORT_SYMBOL ( il_set_flags_for_band  )
EXPORT_SYMBOL ( il_connection_init_rx_config  )
EXPORT_SYMBOL ( il_set_rate  )
EXPORT_SYMBOL ( il_chswitch_done  )
EXPORT_SYMBOL ( il_hdl_csa  )
EXPORT_SYMBOL ( il_irq_handle_error  )
EXPORT_SYMBOL ( _il_apm_stop  )
EXPORT_SYMBOL ( il_apm_stop  )
EXPORT_SYMBOL ( il_apm_init  )
EXPORT_SYMBOL ( il_set_tx_power  )
EXPORT_SYMBOL ( il_send_bt_config  )
EXPORT_SYMBOL ( il_send_stats_request  )
EXPORT_SYMBOL ( il_hdl_pm_sleep  )
EXPORT_SYMBOL ( il_hdl_pm_debug_stats  )
EXPORT_SYMBOL ( il_hdl_error  )
EXPORT_SYMBOL ( il_mac_conf_tx  )
EXPORT_SYMBOL ( il_mac_add_interface  )
EXPORT_SYMBOL ( il_mac_remove_interface  )
EXPORT_SYMBOL ( il_alloc_txq_mem  )
EXPORT_SYMBOL ( il_free_txq_mem  )
EXPORT_SYMBOL ( il_mac_change_interface  )
EXPORT_SYMBOL ( il_bg_watchdog  )
EXPORT_SYMBOL ( il_setup_watchdog  )
EXPORT_SYMBOL ( il_usecs_to_beacons  )
EXPORT_SYMBOL ( il_add_beacon_time  )
EXPORT_SYMBOL ( il_mac_config  )
EXPORT_SYMBOL ( il_mac_reset_tsf  )
EXPORT_SYMBOL ( il_mac_bss_info_changed  )
EXPORT_SYMBOL ( il_isr  )
EXPORT_SYMBOL ( il_tx_cmd_protection  )
EXPORT_SYMBOL_GPL ( _il_grab_nic_access  )
EXPORT_SYMBOL_GPL ( il_prep_station  )
EXPORT_SYMBOL_GPL ( il_remove_station  )
EXPORT_SYMBOL_GPL ( il_dealloc_bcast_stations  )
EXPORT_SYMBOL_GPL ( il_mac_tx_last_beacon  )
__le32 il_add_beacon_time ( struct il_priv il,
u32  base,
u32  addon,
u32  beacon_interval 
)

Definition at line 4832 of file common.c.

int il_add_station_common ( struct il_priv il,
const u8 addr,
bool  is_ap,
struct ieee80211_sta sta,
u8 sta_id_r 
)

il_add_station_common -

Definition at line 1970 of file common.c.

int il_alloc_txq_mem ( struct il_priv il)

Definition at line 4588 of file common.c.

int il_apm_init ( struct il_priv il)

Definition at line 4193 of file common.c.

void il_apm_stop ( struct il_priv il)

Definition at line 4177 of file common.c.

void il_bg_watchdog ( unsigned long  data)

Definition at line 4753 of file common.c.

void il_cancel_scan_deferred_work ( struct il_priv il)

Definition at line 1685 of file common.c.

int il_check_rxon_cmd ( struct il_priv il)

Definition at line 3646 of file common.c.

void il_chswitch_done ( struct il_priv il,
bool  is_success 
)

Definition at line 4043 of file common.c.

void il_clear_bit ( struct il_priv p,
u32  r,
u32  m 
)

Definition at line 74 of file common.c.

void il_clear_isr_stats ( struct il_priv il)

Definition at line 4434 of file common.c.

void il_clear_ucode_stations ( struct il_priv il)

il_clear_ucode_stations - clear ucode station table bits

This function clears all the bits in the driver indicating which stations are active in the ucode. Call when something other than explicit station management would cause this in the ucode, e.g. unassociated RXON.

Definition at line 2167 of file common.c.

void il_cmd_queue_free ( struct il_priv il)

il_cmd_queue_free - Deallocate DMA queue. : Transmit queue to deallocate.

Empty queue by removing and destroying all BD's. Free all buffers. 0-fill, but do not free "txq" descriptor structure.

Definition at line 2816 of file common.c.

void il_cmd_queue_unmap ( struct il_priv il)

il_cmd_queue_unmap - Unmap any remaining DMA mappings from command queue

Definition at line 2773 of file common.c.

void il_connection_init_rx_config ( struct il_priv il)

Definition at line 3954 of file common.c.

void il_dealloc_bcast_stations ( struct il_priv il)

Definition at line 2283 of file common.c.

void il_eeprom_free ( struct il_priv il)

Definition at line 788 of file common.c.

int il_eeprom_init ( struct il_priv il)

il_eeprom_init - read EEPROM contents

Load the EEPROM contents from adapter into il->eeprom

NOTE: This routine uses the non-debug IO access functions.

Definition at line 715 of file common.c.

u16 il_eeprom_query16 ( const struct il_priv il,
size_t  offset 
)

Definition at line 699 of file common.c.

const u8* il_eeprom_query_addr ( const struct il_priv il,
size_t  offset 
)

Definition at line 691 of file common.c.

int il_enqueue_hcmd ( struct il_priv il,
struct il_host_cmd cmd 
)

il_enqueue_hcmd - enqueue a uCode command : device ilate data point : a point to the ucode command structure

The function returns < 0 values to indicate the operation is failed. On success, it turns the idx (> 0) of command in the command queue.

Definition at line 3075 of file common.c.

u16 il_fill_probe_req ( struct il_priv il,
struct ieee80211_mgmt frame,
const u8 ta,
const u8 ies,
int  ie_len,
int  left 
)

il_fill_probe_req - fill in all required fields and IE for probe request

Definition at line 1576 of file common.c.

int il_force_reset ( struct il_priv il,
bool  external 
)

Definition at line 4611 of file common.c.

void il_force_scan_end ( struct il_priv il)

Definition at line 1267 of file common.c.

void il_free_channel_map ( struct il_priv il)

Definition at line 1041 of file common.c.

void il_free_geos ( struct il_priv il)

Definition at line 3496 of file common.c.

void il_free_txq_mem ( struct il_priv il)

Definition at line 4603 of file common.c.

int il_full_rxon_required ( struct il_priv il)

il_full_rxon_required - check if full RXON (vs RXON_ASSOC) cmd is needed : staging_rxon is compared to active_rxon

If the RXON structure is changing enough to require a new tune, or is clearing the RXON_FILTER_ASSOC_MSK, then return 1 to indicate that a new tune (full RXON command, rather than RXON_ASSOC cmd) is required.

Definition at line 3726 of file common.c.

u16 il_get_active_dwell_time ( struct il_priv il,
enum ieee80211_band  band,
u8  n_probes 
)
inline

Definition at line 1426 of file common.c.

struct il_channel_info* il_get_channel_info ( const struct il_priv il,
enum ieee80211_band  band,
u16  channel 
)
read

il_get_channel_info - Find driver's ilate channel info

Based on band and channel number.

Definition at line 1054 of file common.c.

const char* il_get_cmd_string ( u8  cmd)

Definition at line 206 of file common.c.

int il_get_free_ucode_key_idx ( struct il_priv il)

Definition at line 2270 of file common.c.

u8 il_get_lowest_plcp ( struct il_priv il)

Definition at line 3780 of file common.c.

u16 il_get_passive_dwell_time ( struct il_priv il,
enum ieee80211_band  band,
struct ieee80211_vif vif 
)

Definition at line 1439 of file common.c.

u8 il_get_single_channel_number ( struct il_priv il,
enum ieee80211_band  band 
)

Definition at line 3868 of file common.c.

void il_hdl_csa ( struct il_priv il,
struct il_rx_buf rxb 
)

Definition at line 4054 of file common.c.

void il_hdl_error ( struct il_priv il,
struct il_rx_buf rxb 
)

Definition at line 4419 of file common.c.

void il_hdl_pm_debug_stats ( struct il_priv il,
struct il_rx_buf rxb 
)

Definition at line 4408 of file common.c.

void il_hdl_pm_sleep ( struct il_priv il,
struct il_rx_buf rxb 
)

Definition at line 4396 of file common.c.

void il_hdl_spectrum_measurement ( struct il_priv il,
struct il_rx_buf rxb 
)

Definition at line 2603 of file common.c.

int il_init_channel_map ( struct il_priv il)

il_init_channel_map - Set up driver's info for all possible channels

Definition at line 905 of file common.c.

int il_init_geos ( struct il_priv il)

il_init_geos - Initialize mac80211's geo/channel info based from eeprom

Definition at line 3375 of file common.c.

void il_init_scan_params ( struct il_priv il)

Definition at line 1468 of file common.c.

void il_irq_handle_error ( struct il_priv il)

il_irq_handle_error - called for HW or SW error interrupt from card

Definition at line 4100 of file common.c.

bool il_is_ht40_tx_allowed ( struct il_priv il,
struct ieee80211_sta_ht_cap ht_cap 
)

Definition at line 3525 of file common.c.

irqreturn_t il_isr ( int  irq,
void data 
)

Definition at line 5396 of file common.c.

void il_leds_exit ( struct il_priv il)

Definition at line 594 of file common.c.

void il_leds_init ( struct il_priv il)

Definition at line 553 of file common.c.

int il_mac_add_interface ( struct ieee80211_hw hw,
struct ieee80211_vif vif 
)

Definition at line 4507 of file common.c.

void il_mac_bss_info_changed ( struct ieee80211_hw hw,
struct ieee80211_vif vif,
struct ieee80211_bss_conf bss_conf,
u32  changes 
)

Definition at line 5245 of file common.c.

int il_mac_change_interface ( struct ieee80211_hw hw,
struct ieee80211_vif vif,
enum nl80211_iftype  newtype,
bool  newp2p 
)

Definition at line 4663 of file common.c.

int il_mac_conf_tx ( struct ieee80211_hw hw,
struct ieee80211_vif vif,
u16  queue,
const struct ieee80211_tx_queue_params params 
)

Definition at line 4440 of file common.c.

int il_mac_config ( struct ieee80211_hw hw,
u32  changed 
)

il_mac_config - mac80211 config callback

Definition at line 4940 of file common.c.

int il_mac_hw_scan ( struct ieee80211_hw hw,
struct ieee80211_vif vif,
struct cfg80211_scan_request req 
)

Definition at line 1520 of file common.c.

void il_mac_remove_interface ( struct ieee80211_hw hw,
struct ieee80211_vif vif 
)

Definition at line 4569 of file common.c.

void il_mac_reset_tsf ( struct ieee80211_hw hw,
struct ieee80211_vif vif 
)

Definition at line 5091 of file common.c.

int il_mac_sta_remove ( struct ieee80211_hw hw,
struct ieee80211_vif vif,
struct ieee80211_sta sta 
)

Definition at line 2409 of file common.c.

int il_mac_tx_last_beacon ( struct ieee80211_hw hw)

Definition at line 4481 of file common.c.

int il_poll_bit ( struct il_priv il,
u32  addr,
u32  mask,
int  timeout 
)

Definition at line 127 of file common.c.

void il_power_initialize ( struct il_priv il)

Definition at line 1184 of file common.c.

int il_power_set_mode ( struct il_priv il,
struct il_powertable_cmd cmd,
bool  force 
)

Definition at line 1126 of file common.c.

int il_power_update_mode ( struct il_priv il,
bool  force 
)

Definition at line 1173 of file common.c.

u8 il_prep_station ( struct il_priv il,
const u8 addr,
bool  is_ap,
struct ieee80211_sta sta 
)

il_prep_station - Prepare station information for addition

should be called with sta_lock held

Definition at line 1885 of file common.c.

int il_queue_space ( const struct il_queue q)

Definition at line 2868 of file common.c.

u32 il_rd_prph ( struct il_priv il,
u32  reg 
)

Definition at line 144 of file common.c.

u32 il_read_targ_mem ( struct il_priv il,
u32  addr 
)

Definition at line 173 of file common.c.

int il_remove_station ( struct il_priv il,
const u8  sta_id,
const u8 addr 
)

il_remove_station - Remove driver's knowledge of station.

Definition at line 2106 of file common.c.

void il_restore_stations ( struct il_priv il)

il_restore_stations() - Restore driver known stations to device

All stations considered active by driver, but not present in ucode, is restored.

Function sleeps.

Definition at line 2199 of file common.c.

int il_rx_queue_alloc ( struct il_priv il)

Definition at line 2559 of file common.c.

int il_rx_queue_space ( const struct il_rx_queue q)

il_rx_queue_space - Return number of free slots available in queue.

Definition at line 2501 of file common.c.

void il_rx_queue_update_write_ptr ( struct il_priv il,
struct il_rx_queue q 
)

il_rx_queue_update_write_ptr - Update the write pointer for the RX queue

Definition at line 2518 of file common.c.

int il_scan_cancel ( struct il_priv il)

il_scan_cancel - Cancel any currently executing HW scan

Definition at line 1312 of file common.c.

int il_scan_cancel_timeout ( struct il_priv il,
unsigned long  ms 
)

il_scan_cancel_timeout - Cancel any currently executing HW scan : amount of time to wait (in milliseconds) for scan to abort

Definition at line 1326 of file common.c.

int il_send_add_sta ( struct il_priv il,
struct il_addsta_cmd sta,
u8  flags 
)

Definition at line 1789 of file common.c.

void il_send_bt_config ( struct il_priv il)

Definition at line 4357 of file common.c.

int il_send_cmd ( struct il_priv il,
struct il_host_cmd cmd 
)

Definition at line 396 of file common.c.

int il_send_cmd_pdu ( struct il_priv il,
u8  id,
u16  len,
const void data 
)

Definition at line 406 of file common.c.

int il_send_cmd_pdu_async ( struct il_priv il,
u8  id,
u16  len,
const void data,
void(*)(struct il_priv *il, struct il_device_cmd *cmd, struct il_rx_pkt *pkt)  callback 
)

Definition at line 419 of file common.c.

int il_send_cmd_sync ( struct il_priv il,
struct il_host_cmd cmd 
)

Definition at line 309 of file common.c.

int il_send_lq_cmd ( struct il_priv il,
struct il_link_quality_cmd lq,
u8  flags,
bool  init 
)

il_send_lq_cmd() - Send link quality command : This command is sent as part of station initialization right after station has been added.

The link quality command is sent as the last step of station creation. This is the special case in which init is set and we call a callback in this case to clear the state indicating that station creation is in progress.

Definition at line 2362 of file common.c.

int il_send_rxon_timing ( struct il_priv il)

Definition at line 3583 of file common.c.

int il_send_stats_request ( struct il_priv il,
u8  flags,
bool  clear 
)

Definition at line 4380 of file common.c.

void il_set_bit ( struct il_priv p,
u32  r,
u32  m 
)

Definition at line 63 of file common.c.

int il_set_decrypted_flag ( struct il_priv il,
struct ieee80211_hdr hdr,
u32  decrypt_res,
struct ieee80211_rx_status stats 
)

Definition at line 2622 of file common.c.

void il_set_flags_for_band ( struct il_priv il,
enum ieee80211_band  band,
struct ieee80211_vif vif 
)

Definition at line 3928 of file common.c.

void il_set_rate ( struct il_priv il)

Definition at line 4012 of file common.c.

int il_set_rxon_channel ( struct il_priv il,
struct ieee80211_channel ch 
)

il_set_rxon_channel - Set the band and channel values in staging RXON : requested channel as a pointer to struct ieee80211_channel

NOTE: Does not commit to the hardware; it sets appropriate bit fields in the staging RXON flag structure based on the ch->band

Definition at line 3905 of file common.c.

void il_set_rxon_ht ( struct il_priv il,
struct il_ht_config ht_conf 
)

Definition at line 3860 of file common.c.

void il_set_rxon_hwcrypto ( struct il_priv il,
int  hw_decrypt 
)

Definition at line 3632 of file common.c.

int il_set_tx_power ( struct il_priv il,
s8  tx_power,
bool  force 
)

Definition at line 4301 of file common.c.

void il_setup_rx_scan_handlers ( struct il_priv il)

Definition at line 1415 of file common.c.

void il_setup_scan_deferred_work ( struct il_priv il)

Definition at line 1676 of file common.c.

void il_setup_watchdog ( struct il_priv il)

Definition at line 4785 of file common.c.

void il_tx_cmd_complete ( struct il_priv il,
struct il_rx_buf rxb 
)

il_tx_cmd_complete - Pull unused buffers off the queue and reclaim them : Rx buffer to reclaim

If an Rx buffer has an async callback associated with it the callback will be executed. The attached skb (if present) will only be freed if the callback returns 1

Definition at line 3229 of file common.c.

void il_tx_cmd_protection ( struct il_priv il,
struct ieee80211_tx_info info,
__le16  fc,
__le32 tx_flags 
)

Definition at line 5461 of file common.c.

void il_tx_queue_free ( struct il_priv il,
int  txq_id 
)

il_tx_queue_free - Deallocate DMA queue. : Transmit queue to deallocate.

Empty queue by removing and destroying all BD's. Free all buffers. 0-fill, but do not free "txq" descriptor structure.

Definition at line 2737 of file common.c.

int il_tx_queue_init ( struct il_priv il,
u32  txq_id 
)

il_tx_queue_init - Allocate and initialize one tx/cmd queue

Definition at line 2964 of file common.c.

void il_tx_queue_reset ( struct il_priv il,
u32  txq_id 
)

Definition at line 3039 of file common.c.

void il_tx_queue_unmap ( struct il_priv il,
int  txq_id 
)

il_tx_queue_unmap - Unmap any remaining DMA mappings and free skb's

Definition at line 2713 of file common.c.

void il_txq_update_write_ptr ( struct il_priv il,
struct il_tx_queue txq 
)

il_txq_update_write_ptr - Send new write idx to hardware

Definition at line 2673 of file common.c.

u32 il_usecs_to_beacons ( struct il_priv il,
u32  usec,
u32  beacon_interval 
)

Definition at line 4804 of file common.c.

void il_wr_prph ( struct il_priv il,
u32  addr,
u32  val 
)

Definition at line 159 of file common.c.

void il_write_targ_mem ( struct il_priv il,
u32  addr,
u32  val 
)

Definition at line 191 of file common.c.

MODULE_AUTHOR ( DRV_COPYRIGHT" "  DRV_AUTHOR)
MODULE_DESCRIPTION ( "iwl-legacy: common functions for 3945 and 4965"  )
MODULE_LICENSE ( "GPL"  )
module_param ( led_mode  ,
int  ,
S_IRUGO   
)
module_param ( bt_coex_active  ,
bool  ,
S_IRUGO   
)
MODULE_PARM_DESC ( led_mode  ,
0 = system default,
""  1 = On(RF On)/Off(RF Off) 
)
MODULE_PARM_DESC ( bt_coex_active  ,
"enable wifi/bluetooth co-exist"   
)
MODULE_VERSION ( IWLWIFI_VERSION  )

Variable Documentation

const u8 il_bcast_addr[ETH_ALEN] = { 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF }

Definition at line 3316 of file common.c.

u32 il_debug_level

Definition at line 3313 of file common.c.

const u8 il_eeprom_band_1[14]
Initial value:
= {
1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14
}

Definition at line 636 of file common.c.