Commit e2ebc833 authored by Stanislaw Gruszka's avatar Stanislaw Gruszka

iwlegacy: rename iwl to il

iwl_legacy prefix result in long function names, what cause that we
have frequent line split and not readable code. Also iwl_foo symbols
are duplicated in iwlwifi driver, what is annoying when editing
kernel tree with cscope.
Signed-off-by: default avatarStanislaw Gruszka <sgruszka@redhat.com>
parent fee005e5
...@@ -29,7 +29,7 @@ ...@@ -29,7 +29,7 @@
#include "iwl-3945-debugfs.h" #include "iwl-3945-debugfs.h"
static int iwl3945_statistics_flag(struct iwl_priv *priv, char *buf, int bufsz) static int il3945_statistics_flag(struct il_priv *priv, char *buf, int bufsz)
{ {
int p = 0; int p = 0;
...@@ -50,11 +50,11 @@ static int iwl3945_statistics_flag(struct iwl_priv *priv, char *buf, int bufsz) ...@@ -50,11 +50,11 @@ static int iwl3945_statistics_flag(struct iwl_priv *priv, char *buf, int bufsz)
return p; return p;
} }
ssize_t iwl3945_ucode_rx_stats_read(struct file *file, ssize_t il3945_ucode_rx_stats_read(struct file *file,
char __user *user_buf, char __user *user_buf,
size_t count, loff_t *ppos) size_t count, loff_t *ppos)
{ {
struct iwl_priv *priv = file->private_data; struct il_priv *priv = file->private_data;
int pos = 0; int pos = 0;
char *buf; char *buf;
int bufsz = sizeof(struct iwl39_statistics_rx_phy) * 40 + int bufsz = sizeof(struct iwl39_statistics_rx_phy) * 40 +
...@@ -66,12 +66,12 @@ ssize_t iwl3945_ucode_rx_stats_read(struct file *file, ...@@ -66,12 +66,12 @@ ssize_t iwl3945_ucode_rx_stats_read(struct file *file,
struct iwl39_statistics_rx_non_phy *general, *accum_general; struct iwl39_statistics_rx_non_phy *general, *accum_general;
struct iwl39_statistics_rx_non_phy *delta_general, *max_general; struct iwl39_statistics_rx_non_phy *delta_general, *max_general;
if (!iwl_legacy_is_alive(priv)) if (!il_is_alive(priv))
return -EAGAIN; return -EAGAIN;
buf = kzalloc(bufsz, GFP_KERNEL); buf = kzalloc(bufsz, GFP_KERNEL);
if (!buf) { if (!buf) {
IWL_ERR(priv, "Can not allocate Buffer\n"); IL_ERR(priv, "Can not allocate Buffer\n");
return -ENOMEM; return -ENOMEM;
} }
...@@ -93,7 +93,7 @@ ssize_t iwl3945_ucode_rx_stats_read(struct file *file, ...@@ -93,7 +93,7 @@ ssize_t iwl3945_ucode_rx_stats_read(struct file *file,
max_cck = &priv->_3945.max_delta.rx.cck; max_cck = &priv->_3945.max_delta.rx.cck;
max_general = &priv->_3945.max_delta.rx.general; max_general = &priv->_3945.max_delta.rx.general;
pos += iwl3945_statistics_flag(priv, buf, bufsz); pos += il3945_statistics_flag(priv, buf, bufsz);
pos += scnprintf(buf + pos, bufsz - pos, "%-32s current" pos += scnprintf(buf + pos, bufsz - pos, "%-32s current"
"acumulative delta max\n", "acumulative delta max\n",
"Statistics_Rx - OFDM:"); "Statistics_Rx - OFDM:");
...@@ -325,23 +325,23 @@ ssize_t iwl3945_ucode_rx_stats_read(struct file *file, ...@@ -325,23 +325,23 @@ ssize_t iwl3945_ucode_rx_stats_read(struct file *file,
return ret; return ret;
} }
ssize_t iwl3945_ucode_tx_stats_read(struct file *file, ssize_t il3945_ucode_tx_stats_read(struct file *file,
char __user *user_buf, char __user *user_buf,
size_t count, loff_t *ppos) size_t count, loff_t *ppos)
{ {
struct iwl_priv *priv = file->private_data; struct il_priv *priv = file->private_data;
int pos = 0; int pos = 0;
char *buf; char *buf;
int bufsz = (sizeof(struct iwl39_statistics_tx) * 48) + 250; int bufsz = (sizeof(struct iwl39_statistics_tx) * 48) + 250;
ssize_t ret; ssize_t ret;
struct iwl39_statistics_tx *tx, *accum_tx, *delta_tx, *max_tx; struct iwl39_statistics_tx *tx, *accum_tx, *delta_tx, *max_tx;
if (!iwl_legacy_is_alive(priv)) if (!il_is_alive(priv))
return -EAGAIN; return -EAGAIN;
buf = kzalloc(bufsz, GFP_KERNEL); buf = kzalloc(bufsz, GFP_KERNEL);
if (!buf) { if (!buf) {
IWL_ERR(priv, "Can not allocate Buffer\n"); IL_ERR(priv, "Can not allocate Buffer\n");
return -ENOMEM; return -ENOMEM;
} }
...@@ -354,7 +354,7 @@ ssize_t iwl3945_ucode_tx_stats_read(struct file *file, ...@@ -354,7 +354,7 @@ ssize_t iwl3945_ucode_tx_stats_read(struct file *file,
accum_tx = &priv->_3945.accum_statistics.tx; accum_tx = &priv->_3945.accum_statistics.tx;
delta_tx = &priv->_3945.delta_statistics.tx; delta_tx = &priv->_3945.delta_statistics.tx;
max_tx = &priv->_3945.max_delta.tx; max_tx = &priv->_3945.max_delta.tx;
pos += iwl3945_statistics_flag(priv, buf, bufsz); pos += il3945_statistics_flag(priv, buf, bufsz);
pos += scnprintf(buf + pos, bufsz - pos, "%-32s current" pos += scnprintf(buf + pos, bufsz - pos, "%-32s current"
"acumulative delta max\n", "acumulative delta max\n",
"Statistics_Tx:"); "Statistics_Tx:");
...@@ -421,11 +421,11 @@ ssize_t iwl3945_ucode_tx_stats_read(struct file *file, ...@@ -421,11 +421,11 @@ ssize_t iwl3945_ucode_tx_stats_read(struct file *file,
return ret; return ret;
} }
ssize_t iwl3945_ucode_general_stats_read(struct file *file, ssize_t il3945_ucode_general_stats_read(struct file *file,
char __user *user_buf, char __user *user_buf,
size_t count, loff_t *ppos) size_t count, loff_t *ppos)
{ {
struct iwl_priv *priv = file->private_data; struct il_priv *priv = file->private_data;
int pos = 0; int pos = 0;
char *buf; char *buf;
int bufsz = sizeof(struct iwl39_statistics_general) * 10 + 300; int bufsz = sizeof(struct iwl39_statistics_general) * 10 + 300;
...@@ -435,12 +435,12 @@ ssize_t iwl3945_ucode_general_stats_read(struct file *file, ...@@ -435,12 +435,12 @@ ssize_t iwl3945_ucode_general_stats_read(struct file *file,
struct statistics_dbg *dbg, *accum_dbg, *delta_dbg, *max_dbg; struct statistics_dbg *dbg, *accum_dbg, *delta_dbg, *max_dbg;
struct iwl39_statistics_div *div, *accum_div, *delta_div, *max_div; struct iwl39_statistics_div *div, *accum_div, *delta_div, *max_div;
if (!iwl_legacy_is_alive(priv)) if (!il_is_alive(priv))
return -EAGAIN; return -EAGAIN;
buf = kzalloc(bufsz, GFP_KERNEL); buf = kzalloc(bufsz, GFP_KERNEL);
if (!buf) { if (!buf) {
IWL_ERR(priv, "Can not allocate Buffer\n"); IL_ERR(priv, "Can not allocate Buffer\n");
return -ENOMEM; return -ENOMEM;
} }
...@@ -461,7 +461,7 @@ ssize_t iwl3945_ucode_general_stats_read(struct file *file, ...@@ -461,7 +461,7 @@ ssize_t iwl3945_ucode_general_stats_read(struct file *file,
accum_div = &priv->_3945.accum_statistics.general.div; accum_div = &priv->_3945.accum_statistics.general.div;
delta_div = &priv->_3945.delta_statistics.general.div; delta_div = &priv->_3945.delta_statistics.general.div;
max_div = &priv->_3945.max_delta.general.div; max_div = &priv->_3945.max_delta.general.div;
pos += iwl3945_statistics_flag(priv, buf, bufsz); pos += il3945_statistics_flag(priv, buf, bufsz);
pos += scnprintf(buf + pos, bufsz - pos, "%-32s current" pos += scnprintf(buf + pos, bufsz - pos, "%-32s current"
"acumulative delta max\n", "acumulative delta max\n",
"Statistics_General:"); "Statistics_General:");
......
...@@ -31,27 +31,27 @@ ...@@ -31,27 +31,27 @@
#include "iwl-debug.h" #include "iwl-debug.h"
#ifdef CONFIG_IWLWIFI_LEGACY_DEBUGFS #ifdef CONFIG_IWLWIFI_LEGACY_DEBUGFS
ssize_t iwl3945_ucode_rx_stats_read(struct file *file, char __user *user_buf, ssize_t il3945_ucode_rx_stats_read(struct file *file, char __user *user_buf,
size_t count, loff_t *ppos); size_t count, loff_t *ppos);
ssize_t iwl3945_ucode_tx_stats_read(struct file *file, char __user *user_buf, ssize_t il3945_ucode_tx_stats_read(struct file *file, char __user *user_buf,
size_t count, loff_t *ppos); size_t count, loff_t *ppos);
ssize_t iwl3945_ucode_general_stats_read(struct file *file, ssize_t il3945_ucode_general_stats_read(struct file *file,
char __user *user_buf, size_t count, char __user *user_buf, size_t count,
loff_t *ppos); loff_t *ppos);
#else #else
static ssize_t iwl3945_ucode_rx_stats_read(struct file *file, static ssize_t il3945_ucode_rx_stats_read(struct file *file,
char __user *user_buf, size_t count, char __user *user_buf, size_t count,
loff_t *ppos) loff_t *ppos)
{ {
return 0; return 0;
} }
static ssize_t iwl3945_ucode_tx_stats_read(struct file *file, static ssize_t il3945_ucode_tx_stats_read(struct file *file,
char __user *user_buf, size_t count, char __user *user_buf, size_t count,
loff_t *ppos) loff_t *ppos)
{ {
return 0; return 0;
} }
static ssize_t iwl3945_ucode_general_stats_read(struct file *file, static ssize_t il3945_ucode_general_stats_read(struct file *file,
char __user *user_buf, char __user *user_buf,
size_t count, loff_t *ppos) size_t count, loff_t *ppos)
{ {
......
...@@ -60,8 +60,8 @@ ...@@ -60,8 +60,8 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
* *
*****************************************************************************/ *****************************************************************************/
#ifndef __iwl_3945_fh_h__ #ifndef __il_3945_fh_h__
#define __iwl_3945_fh_h__ #define __il_3945_fh_h__
/************************************/ /************************************/
/* iwl3945 Flow Handler Definitions */ /* iwl3945 Flow Handler Definitions */
...@@ -172,16 +172,16 @@ ...@@ -172,16 +172,16 @@
#define FH39_RSSR_CHNL0_RX_STATUS_CHNL_IDLE (0x01000000) #define FH39_RSSR_CHNL0_RX_STATUS_CHNL_IDLE (0x01000000)
struct iwl3945_tfd_tb { struct il3945_tfd_tb {
__le32 addr; __le32 addr;
__le32 len; __le32 len;
} __packed; } __packed;
struct iwl3945_tfd { struct il3945_tfd {
__le32 control_flags; __le32 control_flags;
struct iwl3945_tfd_tb tbs[4]; struct il3945_tfd_tb tbs[4];
u8 __pad[28]; u8 __pad[28];
} __packed; } __packed;
#endif /* __iwl_3945_fh_h__ */ #endif /* __il_3945_fh_h__ */
...@@ -66,8 +66,8 @@ ...@@ -66,8 +66,8 @@
* Please use iwl-3945.h for driver implementation definitions. * Please use iwl-3945.h for driver implementation definitions.
*/ */
#ifndef __iwl_3945_hw__ #ifndef __il_3945_hw__
#define __iwl_3945_hw__ #define __il_3945_hw__
#include "iwl-eeprom.h" #include "iwl-eeprom.h"
...@@ -90,7 +90,7 @@ ...@@ -90,7 +90,7 @@
* Data copied from EEPROM. * Data copied from EEPROM.
* DO NOT ALTER THIS STRUCTURE!!! * DO NOT ALTER THIS STRUCTURE!!!
*/ */
struct iwl3945_eeprom_txpower_sample { struct il3945_eeprom_txpower_sample {
u8 gain_index; /* index into power (gain) setup table ... */ u8 gain_index; /* index into power (gain) setup table ... */
s8 power; /* ... for this pwr level for this chnl group */ s8 power; /* ... for this pwr level for this chnl group */
u16 v_det; /* PA output voltage */ u16 v_det; /* PA output voltage */
...@@ -104,8 +104,8 @@ struct iwl3945_eeprom_txpower_sample { ...@@ -104,8 +104,8 @@ struct iwl3945_eeprom_txpower_sample {
* Data copied from EEPROM. * Data copied from EEPROM.
* DO NOT ALTER THIS STRUCTURE!!! * DO NOT ALTER THIS STRUCTURE!!!
*/ */
struct iwl3945_eeprom_txpower_group { struct il3945_eeprom_txpower_group {
struct iwl3945_eeprom_txpower_sample samples[5]; /* 5 power levels */ struct il3945_eeprom_txpower_sample samples[5]; /* 5 power levels */
s32 a, b, c, d, e; /* coefficients for voltage->power s32 a, b, c, d, e; /* coefficients for voltage->power
* formula (signed) */ * formula (signed) */
s32 Fa, Fb, Fc, Fd, Fe; /* these modify coeffs based on s32 Fa, Fb, Fc, Fd, Fe; /* these modify coeffs based on
...@@ -123,7 +123,7 @@ struct iwl3945_eeprom_txpower_group { ...@@ -123,7 +123,7 @@ struct iwl3945_eeprom_txpower_group {
* difference between current temperature and factory calib temperature. * difference between current temperature and factory calib temperature.
* Data copied from EEPROM. * Data copied from EEPROM.
*/ */
struct iwl3945_eeprom_temperature_corr { struct il3945_eeprom_temperature_corr {
u32 Ta; u32 Ta;
u32 Tb; u32 Tb;
u32 Tc; u32 Tc;
...@@ -134,7 +134,7 @@ struct iwl3945_eeprom_temperature_corr { ...@@ -134,7 +134,7 @@ struct iwl3945_eeprom_temperature_corr {
/* /*
* EEPROM map * EEPROM map
*/ */
struct iwl3945_eeprom { struct il3945_eeprom {
u8 reserved0[16]; u8 reserved0[16];
u16 device_id; /* abs.ofs: 16 */ u16 device_id; /* abs.ofs: 16 */
u8 reserved1[2]; u8 reserved1[2];
...@@ -171,7 +171,7 @@ struct iwl3945_eeprom { ...@@ -171,7 +171,7 @@ struct iwl3945_eeprom {
* 2.4 GHz channels 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14 * 2.4 GHz channels 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14
*/ */
u16 band_1_count; /* abs.ofs: 196 */ u16 band_1_count; /* abs.ofs: 196 */
struct iwl_eeprom_channel band_1_channels[14]; /* abs.ofs: 198 */ struct il_eeprom_channel band_1_channels[14]; /* abs.ofs: 198 */
/* /*
* 4.9 GHz channels 183, 184, 185, 187, 188, 189, 192, 196, * 4.9 GHz channels 183, 184, 185, 187, 188, 189, 192, 196,
...@@ -179,38 +179,38 @@ struct iwl3945_eeprom { ...@@ -179,38 +179,38 @@ struct iwl3945_eeprom {
* (4915-5080MHz) (none of these is ever supported) * (4915-5080MHz) (none of these is ever supported)
*/ */
u16 band_2_count; /* abs.ofs: 226 */ u16 band_2_count; /* abs.ofs: 226 */
struct iwl_eeprom_channel band_2_channels[13]; /* abs.ofs: 228 */ struct il_eeprom_channel band_2_channels[13]; /* abs.ofs: 228 */
/* /*
* 5.2 GHz channels 34, 36, 38, 40, 42, 44, 46, 48, 52, 56, 60, 64 * 5.2 GHz channels 34, 36, 38, 40, 42, 44, 46, 48, 52, 56, 60, 64
* (5170-5320MHz) * (5170-5320MHz)
*/ */
u16 band_3_count; /* abs.ofs: 254 */ u16 band_3_count; /* abs.ofs: 254 */
struct iwl_eeprom_channel band_3_channels[12]; /* abs.ofs: 256 */ struct il_eeprom_channel band_3_channels[12]; /* abs.ofs: 256 */
/* /*
* 5.5 GHz channels 100, 104, 108, 112, 116, 120, 124, 128, 132, 136, 140 * 5.5 GHz channels 100, 104, 108, 112, 116, 120, 124, 128, 132, 136, 140
* (5500-5700MHz) * (5500-5700MHz)
*/ */
u16 band_4_count; /* abs.ofs: 280 */ u16 band_4_count; /* abs.ofs: 280 */
struct iwl_eeprom_channel band_4_channels[11]; /* abs.ofs: 282 */ struct il_eeprom_channel band_4_channels[11]; /* abs.ofs: 282 */
/* /*
* 5.7 GHz channels 145, 149, 153, 157, 161, 165 * 5.7 GHz channels 145, 149, 153, 157, 161, 165
* (5725-5825MHz) * (5725-5825MHz)
*/ */
u16 band_5_count; /* abs.ofs: 304 */ u16 band_5_count; /* abs.ofs: 304 */
struct iwl_eeprom_channel band_5_channels[6]; /* abs.ofs: 306 */ struct il_eeprom_channel band_5_channels[6]; /* abs.ofs: 306 */
u8 reserved9[194]; u8 reserved9[194];
/* /*
* 3945 Txpower calibration data. * 3945 Txpower calibration data.
*/ */
#define IWL_NUM_TX_CALIB_GROUPS 5 #define IL_NUM_TX_CALIB_GROUPS 5
struct iwl3945_eeprom_txpower_group groups[IWL_NUM_TX_CALIB_GROUPS]; struct il3945_eeprom_txpower_group groups[IL_NUM_TX_CALIB_GROUPS];
/* abs.ofs: 512 */ /* abs.ofs: 512 */
struct iwl3945_eeprom_temperature_corr corrections; /* abs.ofs: 832 */ struct il3945_eeprom_temperature_corr corrections; /* abs.ofs: 832 */
u8 reserved16[172]; /* fill out to full 1024 byte block */ u8 reserved16[172]; /* fill out to full 1024 byte block */
} __packed; } __packed;
...@@ -225,7 +225,7 @@ struct iwl3945_eeprom { ...@@ -225,7 +225,7 @@ struct iwl3945_eeprom {
#define IWL39_NUM_QUEUES 5 #define IWL39_NUM_QUEUES 5
#define IWL39_CMD_QUEUE_NUM 4 #define IWL39_CMD_QUEUE_NUM 4
#define IWL_DEFAULT_TX_RETRY 15 #define IL_DEFAULT_TX_RETRY 15
/*********************************************/ /*********************************************/
...@@ -262,29 +262,29 @@ struct iwl3945_eeprom { ...@@ -262,29 +262,29 @@ struct iwl3945_eeprom {
/* Size of uCode instruction memory in bootstrap state machine */ /* Size of uCode instruction memory in bootstrap state machine */
#define IWL39_MAX_BSM_SIZE IWL39_RTC_INST_SIZE #define IWL39_MAX_BSM_SIZE IWL39_RTC_INST_SIZE
static inline int iwl3945_hw_valid_rtc_data_addr(u32 addr) static inline int il3945_hw_valid_rtc_data_addr(u32 addr)
{ {
return (addr >= IWL39_RTC_DATA_LOWER_BOUND) && return (addr >= IWL39_RTC_DATA_LOWER_BOUND) &&
(addr < IWL39_RTC_DATA_UPPER_BOUND); (addr < IWL39_RTC_DATA_UPPER_BOUND);
} }
/* Base physical address of iwl3945_shared is provided to FH_TSSR_CBB_BASE /* Base physical address of il3945_shared is provided to FH_TSSR_CBB_BASE
* and &iwl3945_shared.rx_read_ptr[0] is provided to FH_RCSR_RPTR_ADDR(0) */ * and &il3945_shared.rx_read_ptr[0] is provided to FH_RCSR_RPTR_ADDR(0) */
struct iwl3945_shared { struct il3945_shared {
__le32 tx_base_ptr[8]; __le32 tx_base_ptr[8];
} __packed; } __packed;
static inline u8 iwl3945_hw_get_rate(__le16 rate_n_flags) static inline u8 il3945_hw_get_rate(__le16 rate_n_flags)
{ {
return le16_to_cpu(rate_n_flags) & 0xFF; return le16_to_cpu(rate_n_flags) & 0xFF;
} }
static inline u16 iwl3945_hw_get_rate_n_flags(__le16 rate_n_flags) static inline u16 il3945_hw_get_rate_n_flags(__le16 rate_n_flags)
{ {
return le16_to_cpu(rate_n_flags); return le16_to_cpu(rate_n_flags);
} }
static inline __le16 iwl3945_hw_set_rate_n_flags(u8 rate, u16 flags) static inline __le16 il3945_hw_set_rate_n_flags(u8 rate, u16 flags)
{ {
return cpu_to_le16((u16)rate|flags); return cpu_to_le16((u16)rate|flags);
} }
......
...@@ -44,20 +44,20 @@ ...@@ -44,20 +44,20 @@
/* Send led command */ /* Send led command */
static int iwl3945_send_led_cmd(struct iwl_priv *priv, static int il3945_send_led_cmd(struct il_priv *priv,
struct iwl_led_cmd *led_cmd) struct il_led_cmd *led_cmd)
{ {
struct iwl_host_cmd cmd = { struct il_host_cmd cmd = {
.id = REPLY_LEDS_CMD, .id = REPLY_LEDS_CMD,
.len = sizeof(struct iwl_led_cmd), .len = sizeof(struct il_led_cmd),
.data = led_cmd, .data = led_cmd,
.flags = CMD_ASYNC, .flags = CMD_ASYNC,
.callback = NULL, .callback = NULL,
}; };
return iwl_legacy_send_cmd(priv, &cmd); return il_send_cmd(priv, &cmd);
} }
const struct iwl_led_ops iwl3945_led_ops = { const struct il_led_ops il3945_led_ops = {
.cmd = iwl3945_send_led_cmd, .cmd = il3945_send_led_cmd,
}; };
...@@ -24,9 +24,9 @@ ...@@ -24,9 +24,9 @@
* *
*****************************************************************************/ *****************************************************************************/
#ifndef __iwl_3945_led_h__ #ifndef __il_3945_led_h__
#define __iwl_3945_led_h__ #define __il_3945_led_h__
extern const struct iwl_led_ops iwl3945_led_ops; extern const struct il_led_ops il3945_led_ops;
#endif /* __iwl_3945_led_h__ */ #endif /* __il_3945_led_h__ */
This diff is collapsed.
This source diff could not be displayed because it is too large. You can view the blob instead.
This diff is collapsed.
...@@ -59,17 +59,17 @@ ...@@ -59,17 +59,17 @@
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*****************************************************************************/ *****************************************************************************/
#ifndef __iwl_4965_calib_h__ #ifndef __il_4965_calib_h__
#define __iwl_4965_calib_h__ #define __il_4965_calib_h__
#include "iwl-dev.h" #include "iwl-dev.h"
#include "iwl-core.h" #include "iwl-core.h"
#include "iwl-commands.h" #include "iwl-commands.h"
void iwl4965_chain_noise_calibration(struct iwl_priv *priv, void *stat_resp); void il4965_chain_noise_calibration(struct il_priv *priv, void *stat_resp);
void iwl4965_sensitivity_calibration(struct iwl_priv *priv, void *resp); void il4965_sensitivity_calibration(struct il_priv *priv, void *resp);
void iwl4965_init_sensitivity(struct iwl_priv *priv); void il4965_init_sensitivity(struct il_priv *priv);
void iwl4965_reset_run_time_calib(struct iwl_priv *priv); void il4965_reset_run_time_calib(struct il_priv *priv);
void iwl4965_calib_free_results(struct iwl_priv *priv); void il4965_calib_free_results(struct il_priv *priv);
#endif /* __iwl_4965_calib_h__ */ #endif /* __il_4965_calib_h__ */
...@@ -33,7 +33,7 @@ static const char *fmt_table = " %-30s %10u %10u %10u %10u\n"; ...@@ -33,7 +33,7 @@ static const char *fmt_table = " %-30s %10u %10u %10u %10u\n";
static const char *fmt_header = static const char *fmt_header =
"%-32s current cumulative delta max\n"; "%-32s current cumulative delta max\n";
static int iwl4965_statistics_flag(struct iwl_priv *priv, char *buf, int bufsz) static int il4965_statistics_flag(struct il_priv *priv, char *buf, int bufsz)
{ {
int p = 0; int p = 0;
u32 flag; u32 flag;
...@@ -54,10 +54,10 @@ static int iwl4965_statistics_flag(struct iwl_priv *priv, char *buf, int bufsz) ...@@ -54,10 +54,10 @@ static int iwl4965_statistics_flag(struct iwl_priv *priv, char *buf, int bufsz)
return p; return p;
} }
ssize_t iwl4965_ucode_rx_stats_read(struct file *file, char __user *user_buf, ssize_t il4965_ucode_rx_stats_read(struct file *file, char __user *user_buf,
size_t count, loff_t *ppos) size_t count, loff_t *ppos)
{ {
struct iwl_priv *priv = file->private_data; struct il_priv *priv = file->private_data;
int pos = 0; int pos = 0;
char *buf; char *buf;
int bufsz = sizeof(struct statistics_rx_phy) * 40 + int bufsz = sizeof(struct statistics_rx_phy) * 40 +
...@@ -70,12 +70,12 @@ ssize_t iwl4965_ucode_rx_stats_read(struct file *file, char __user *user_buf, ...@@ -70,12 +70,12 @@ ssize_t iwl4965_ucode_rx_stats_read(struct file *file, char __user *user_buf,
struct statistics_rx_non_phy *delta_general, *max_general; struct statistics_rx_non_phy *delta_general, *max_general;
struct statistics_rx_ht_phy *ht, *accum_ht, *delta_ht, *max_ht; struct statistics_rx_ht_phy *ht, *accum_ht, *delta_ht, *max_ht;
if (!iwl_legacy_is_alive(priv)) if (!il_is_alive(priv))
return -EAGAIN; return -EAGAIN;
buf = kzalloc(bufsz, GFP_KERNEL); buf = kzalloc(bufsz, GFP_KERNEL);
if (!buf) { if (!buf) {
IWL_ERR(priv, "Can not allocate Buffer\n"); IL_ERR(priv, "Can not allocate Buffer\n");
return -ENOMEM; return -ENOMEM;
} }
...@@ -101,7 +101,7 @@ ssize_t iwl4965_ucode_rx_stats_read(struct file *file, char __user *user_buf, ...@@ -101,7 +101,7 @@ ssize_t iwl4965_ucode_rx_stats_read(struct file *file, char __user *user_buf,
max_general = &priv->_4965.max_delta.rx.general; max_general = &priv->_4965.max_delta.rx.general;
max_ht = &priv->_4965.max_delta.rx.ofdm_ht; max_ht = &priv->_4965.max_delta.rx.ofdm_ht;
pos += iwl4965_statistics_flag(priv, buf, bufsz); pos += il4965_statistics_flag(priv, buf, bufsz);
pos += scnprintf(buf + pos, bufsz - pos, pos += scnprintf(buf + pos, bufsz - pos,
fmt_header, "Statistics_Rx - OFDM:"); fmt_header, "Statistics_Rx - OFDM:");
pos += scnprintf(buf + pos, bufsz - pos, pos += scnprintf(buf + pos, bufsz - pos,
...@@ -485,23 +485,23 @@ ssize_t iwl4965_ucode_rx_stats_read(struct file *file, char __user *user_buf, ...@@ -485,23 +485,23 @@ ssize_t iwl4965_ucode_rx_stats_read(struct file *file, char __user *user_buf,
return ret; return ret;
} }
ssize_t iwl4965_ucode_tx_stats_read(struct file *file, ssize_t il4965_ucode_tx_stats_read(struct file *file,
char __user *user_buf, char __user *user_buf,
size_t count, loff_t *ppos) size_t count, loff_t *ppos)
{ {
struct iwl_priv *priv = file->private_data; struct il_priv *priv = file->private_data;
int pos = 0; int pos = 0;
char *buf; char *buf;
int bufsz = (sizeof(struct statistics_tx) * 48) + 250; int bufsz = (sizeof(struct statistics_tx) * 48) + 250;
ssize_t ret; ssize_t ret;
struct statistics_tx *tx, *accum_tx, *delta_tx, *max_tx; struct statistics_tx *tx, *accum_tx, *delta_tx, *max_tx;
if (!iwl_legacy_is_alive(priv)) if (!il_is_alive(priv))
return -EAGAIN; return -EAGAIN;
buf = kzalloc(bufsz, GFP_KERNEL); buf = kzalloc(bufsz, GFP_KERNEL);
if (!buf) { if (!buf) {
IWL_ERR(priv, "Can not allocate Buffer\n"); IL_ERR(priv, "Can not allocate Buffer\n");
return -ENOMEM; return -ENOMEM;
} }
...@@ -514,7 +514,7 @@ ssize_t iwl4965_ucode_tx_stats_read(struct file *file, ...@@ -514,7 +514,7 @@ ssize_t iwl4965_ucode_tx_stats_read(struct file *file,
delta_tx = &priv->_4965.delta_statistics.tx; delta_tx = &priv->_4965.delta_statistics.tx;
max_tx = &priv->_4965.max_delta.tx; max_tx = &priv->_4965.max_delta.tx;
pos += iwl4965_statistics_flag(priv, buf, bufsz); pos += il4965_statistics_flag(priv, buf, bufsz);
pos += scnprintf(buf + pos, bufsz - pos, pos += scnprintf(buf + pos, bufsz - pos,
fmt_header, "Statistics_Tx:"); fmt_header, "Statistics_Tx:");
pos += scnprintf(buf + pos, bufsz - pos, pos += scnprintf(buf + pos, bufsz - pos,
...@@ -661,10 +661,10 @@ ssize_t iwl4965_ucode_tx_stats_read(struct file *file, ...@@ -661,10 +661,10 @@ ssize_t iwl4965_ucode_tx_stats_read(struct file *file,
} }
ssize_t ssize_t
iwl4965_ucode_general_stats_read(struct file *file, char __user *user_buf, il4965_ucode_general_stats_read(struct file *file, char __user *user_buf,
size_t count, loff_t *ppos) size_t count, loff_t *ppos)
{ {
struct iwl_priv *priv = file->private_data; struct il_priv *priv = file->private_data;
int pos = 0; int pos = 0;
char *buf; char *buf;
int bufsz = sizeof(struct statistics_general) * 10 + 300; int bufsz = sizeof(struct statistics_general) * 10 + 300;
...@@ -674,12 +674,12 @@ iwl4965_ucode_general_stats_read(struct file *file, char __user *user_buf, ...@@ -674,12 +674,12 @@ iwl4965_ucode_general_stats_read(struct file *file, char __user *user_buf,
struct statistics_dbg *dbg, *accum_dbg, *delta_dbg, *max_dbg; struct statistics_dbg *dbg, *accum_dbg, *delta_dbg, *max_dbg;
struct statistics_div *div, *accum_div, *delta_div, *max_div; struct statistics_div *div, *accum_div, *delta_div, *max_div;
if (!iwl_legacy_is_alive(priv)) if (!il_is_alive(priv))
return -EAGAIN; return -EAGAIN;
buf = kzalloc(bufsz, GFP_KERNEL); buf = kzalloc(bufsz, GFP_KERNEL);
if (!buf) { if (!buf) {
IWL_ERR(priv, "Can not allocate Buffer\n"); IL_ERR(priv, "Can not allocate Buffer\n");
return -ENOMEM; return -ENOMEM;
} }
...@@ -700,7 +700,7 @@ iwl4965_ucode_general_stats_read(struct file *file, char __user *user_buf, ...@@ -700,7 +700,7 @@ iwl4965_ucode_general_stats_read(struct file *file, char __user *user_buf,
delta_div = &priv->_4965.delta_statistics.general.common.div; delta_div = &priv->_4965.delta_statistics.general.common.div;
max_div = &priv->_4965.max_delta.general.common.div; max_div = &priv->_4965.max_delta.general.common.div;
pos += iwl4965_statistics_flag(priv, buf, bufsz); pos += il4965_statistics_flag(priv, buf, bufsz);
pos += scnprintf(buf + pos, bufsz - pos, pos += scnprintf(buf + pos, bufsz - pos,
fmt_header, "Statistics_General:"); fmt_header, "Statistics_General:");
pos += scnprintf(buf + pos, bufsz - pos, pos += scnprintf(buf + pos, bufsz - pos,
......
...@@ -31,27 +31,27 @@ ...@@ -31,27 +31,27 @@
#include "iwl-debug.h" #include "iwl-debug.h"
#ifdef CONFIG_IWLWIFI_LEGACY_DEBUGFS #ifdef CONFIG_IWLWIFI_LEGACY_DEBUGFS
ssize_t iwl4965_ucode_rx_stats_read(struct file *file, char __user *user_buf, ssize_t il4965_ucode_rx_stats_read(struct file *file, char __user *user_buf,
size_t count, loff_t *ppos); size_t count, loff_t *ppos);
ssize_t iwl4965_ucode_tx_stats_read(struct file *file, char __user *user_buf, ssize_t il4965_ucode_tx_stats_read(struct file *file, char __user *user_buf,
size_t count, loff_t *ppos); size_t count, loff_t *ppos);
ssize_t iwl4965_ucode_general_stats_read(struct file *file, ssize_t il4965_ucode_general_stats_read(struct file *file,
char __user *user_buf, size_t count, loff_t *ppos); char __user *user_buf, size_t count, loff_t *ppos);
#else #else
static ssize_t static ssize_t
iwl4965_ucode_rx_stats_read(struct file *file, char __user *user_buf, il4965_ucode_rx_stats_read(struct file *file, char __user *user_buf,
size_t count, loff_t *ppos) size_t count, loff_t *ppos)
{ {
return 0; return 0;
} }
static ssize_t static ssize_t
iwl4965_ucode_tx_stats_read(struct file *file, char __user *user_buf, il4965_ucode_tx_stats_read(struct file *file, char __user *user_buf,
size_t count, loff_t *ppos) size_t count, loff_t *ppos)
{ {
return 0; return 0;
} }
static ssize_t static ssize_t
iwl4965_ucode_general_stats_read(struct file *file, char __user *user_buf, il4965_ucode_general_stats_read(struct file *file, char __user *user_buf,
size_t count, loff_t *ppos) size_t count, loff_t *ppos)
{ {
return 0; return 0;
......
...@@ -87,23 +87,23 @@ ...@@ -87,23 +87,23 @@
* EEPROM chip, not a single event, so even reads could conflict if they * EEPROM chip, not a single event, so even reads could conflict if they
* weren't arbitrated by the semaphore. * weren't arbitrated by the semaphore.
*/ */
int iwl4965_eeprom_acquire_semaphore(struct iwl_priv *priv) int il4965_eeprom_acquire_semaphore(struct il_priv *priv)
{ {
u16 count; u16 count;
int ret; int ret;
for (count = 0; count < EEPROM_SEM_RETRY_LIMIT; count++) { for (count = 0; count < EEPROM_SEM_RETRY_LIMIT; count++) {
/* Request semaphore */ /* Request semaphore */
iwl_legacy_set_bit(priv, CSR_HW_IF_CONFIG_REG, il_set_bit(priv, CSR_HW_IF_CONFIG_REG,
CSR_HW_IF_CONFIG_REG_BIT_EEPROM_OWN_SEM); CSR_HW_IF_CONFIG_REG_BIT_EEPROM_OWN_SEM);
/* See if we got it */ /* See if we got it */
ret = iwl_poll_bit(priv, CSR_HW_IF_CONFIG_REG, ret = il_poll_bit(priv, CSR_HW_IF_CONFIG_REG,
CSR_HW_IF_CONFIG_REG_BIT_EEPROM_OWN_SEM, CSR_HW_IF_CONFIG_REG_BIT_EEPROM_OWN_SEM,
CSR_HW_IF_CONFIG_REG_BIT_EEPROM_OWN_SEM, CSR_HW_IF_CONFIG_REG_BIT_EEPROM_OWN_SEM,
EEPROM_SEM_TIMEOUT); EEPROM_SEM_TIMEOUT);
if (ret >= 0) { if (ret >= 0) {
IWL_DEBUG_IO(priv, IL_DEBUG_IO(priv,
"Acquired semaphore after %d tries.\n", "Acquired semaphore after %d tries.\n",
count+1); count+1);
return ret; return ret;
...@@ -113,32 +113,32 @@ int iwl4965_eeprom_acquire_semaphore(struct iwl_priv *priv) ...@@ -113,32 +113,32 @@ int iwl4965_eeprom_acquire_semaphore(struct iwl_priv *priv)
return ret; return ret;
} }
void iwl4965_eeprom_release_semaphore(struct iwl_priv *priv) void il4965_eeprom_release_semaphore(struct il_priv *priv)
{ {
iwl_legacy_clear_bit(priv, CSR_HW_IF_CONFIG_REG, il_clear_bit(priv, CSR_HW_IF_CONFIG_REG,
CSR_HW_IF_CONFIG_REG_BIT_EEPROM_OWN_SEM); CSR_HW_IF_CONFIG_REG_BIT_EEPROM_OWN_SEM);
} }
int iwl4965_eeprom_check_version(struct iwl_priv *priv) int il4965_eeprom_check_version(struct il_priv *priv)
{ {
u16 eeprom_ver; u16 eeprom_ver;
u16 calib_ver; u16 calib_ver;
eeprom_ver = iwl_legacy_eeprom_query16(priv, EEPROM_VERSION); eeprom_ver = il_eeprom_query16(priv, EEPROM_VERSION);
calib_ver = iwl_legacy_eeprom_query16(priv, calib_ver = il_eeprom_query16(priv,
EEPROM_4965_CALIB_VERSION_OFFSET); EEPROM_4965_CALIB_VERSION_OFFSET);
if (eeprom_ver < priv->cfg->eeprom_ver || if (eeprom_ver < priv->cfg->eeprom_ver ||
calib_ver < priv->cfg->eeprom_calib_ver) calib_ver < priv->cfg->eeprom_calib_ver)
goto err; goto err;
IWL_INFO(priv, "device EEPROM VER=0x%x, CALIB=0x%x\n", IL_INFO(priv, "device EEPROM VER=0x%x, CALIB=0x%x\n",
eeprom_ver, calib_ver); eeprom_ver, calib_ver);
return 0; return 0;
err: err:
IWL_ERR(priv, "Unsupported (too old) EEPROM VER=0x%x < 0x%x " IL_ERR(priv, "Unsupported (too old) EEPROM VER=0x%x < 0x%x "
"CALIB=0x%x < 0x%x\n", "CALIB=0x%x < 0x%x\n",
eeprom_ver, priv->cfg->eeprom_ver, eeprom_ver, priv->cfg->eeprom_ver,
calib_ver, priv->cfg->eeprom_calib_ver); calib_ver, priv->cfg->eeprom_calib_ver);
...@@ -146,9 +146,9 @@ int iwl4965_eeprom_check_version(struct iwl_priv *priv) ...@@ -146,9 +146,9 @@ int iwl4965_eeprom_check_version(struct iwl_priv *priv)
} }
void iwl4965_eeprom_get_mac(const struct iwl_priv *priv, u8 *mac) void il4965_eeprom_get_mac(const struct il_priv *priv, u8 *mac)
{ {
const u8 *addr = iwl_legacy_eeprom_query_addr(priv, const u8 *addr = il_eeprom_query_addr(priv,
EEPROM_MAC_ADDRESS); EEPROM_MAC_ADDRESS);
memcpy(mac, addr, ETH_ALEN); memcpy(mac, addr, ETH_ALEN);
} }
...@@ -66,8 +66,8 @@ ...@@ -66,8 +66,8 @@
* Use iwl-dev.h for driver implementation definitions. * Use iwl-dev.h for driver implementation definitions.
*/ */
#ifndef __iwl_4965_hw_h__ #ifndef __il_4965_hw_h__
#define __iwl_4965_hw_h__ #define __il_4965_hw_h__
#include "iwl-fh.h" #include "iwl-fh.h"
...@@ -100,7 +100,7 @@ ...@@ -100,7 +100,7 @@
/* Size of uCode instruction memory in bootstrap state machine */ /* Size of uCode instruction memory in bootstrap state machine */
#define IWL49_MAX_BSM_SIZE BSM_SRAM_SIZE #define IWL49_MAX_BSM_SIZE BSM_SRAM_SIZE
static inline int iwl4965_hw_valid_rtc_data_addr(u32 addr) static inline int il4965_hw_valid_rtc_data_addr(u32 addr)
{ {
return (addr >= IWL49_RTC_DATA_LOWER_BOUND) && return (addr >= IWL49_RTC_DATA_LOWER_BOUND) &&
(addr < IWL49_RTC_DATA_UPPER_BOUND); (addr < IWL49_RTC_DATA_UPPER_BOUND);
...@@ -118,7 +118,7 @@ static inline int iwl4965_hw_valid_rtc_data_addr(u32 addr) ...@@ -118,7 +118,7 @@ static inline int iwl4965_hw_valid_rtc_data_addr(u32 addr)
* real-time temperature indicator. * real-time temperature indicator.
* *
* uCode provides all 4 values to the driver via the "initialize alive" * uCode provides all 4 values to the driver via the "initialize alive"
* notification (see struct iwl4965_init_alive_resp). After the runtime uCode * notification (see struct il4965_init_alive_resp). After the runtime uCode
* image loads, uCode updates the R4 value via statistics notifications * image loads, uCode updates the R4 value via statistics notifications
* (see STATISTICS_NOTIFICATION), which occur after each received beacon * (see STATISTICS_NOTIFICATION), which occur after each received beacon
* when associated, or can be requested via REPLY_STATISTICS_CMD. * when associated, or can be requested via REPLY_STATISTICS_CMD.
...@@ -143,12 +143,12 @@ static inline int iwl4965_hw_valid_rtc_data_addr(u32 addr) ...@@ -143,12 +143,12 @@ static inline int iwl4965_hw_valid_rtc_data_addr(u32 addr)
#define TEMPERATURE_CALIB_A_VAL 259 #define TEMPERATURE_CALIB_A_VAL 259
/* Limit range of calculated temperature to be between these Kelvin values */ /* Limit range of calculated temperature to be between these Kelvin values */
#define IWL_TX_POWER_TEMPERATURE_MIN (263) #define IL_TX_POWER_TEMPERATURE_MIN (263)
#define IWL_TX_POWER_TEMPERATURE_MAX (410) #define IL_TX_POWER_TEMPERATURE_MAX (410)
#define IWL_TX_POWER_TEMPERATURE_OUT_OF_RANGE(t) \ #define IL_TX_POWER_TEMPERATURE_OUT_OF_RANGE(t) \
(((t) < IWL_TX_POWER_TEMPERATURE_MIN) || \ (((t) < IL_TX_POWER_TEMPERATURE_MIN) || \
((t) > IWL_TX_POWER_TEMPERATURE_MAX)) ((t) > IL_TX_POWER_TEMPERATURE_MAX))
/********************* END TEMPERATURE ***************************************/ /********************* END TEMPERATURE ***************************************/
...@@ -168,7 +168,7 @@ static inline int iwl4965_hw_valid_rtc_data_addr(u32 addr) ...@@ -168,7 +168,7 @@ static inline int iwl4965_hw_valid_rtc_data_addr(u32 addr)
* 40 MHz wide (.11n HT40) channels are listed separately from 20 MHz * 40 MHz wide (.11n HT40) channels are listed separately from 20 MHz
* (legacy) channels. * (legacy) channels.
* *
* See struct iwl4965_eeprom_channel for format, and struct iwl4965_eeprom * See struct il4965_eeprom_channel for format, and struct il4965_eeprom
* for locations in EEPROM. * for locations in EEPROM.
* *
* 2) Factory txpower calibration information is provided separately for * 2) Factory txpower calibration information is provided separately for
...@@ -177,11 +177,11 @@ static inline int iwl4965_hw_valid_rtc_data_addr(u32 addr) ...@@ -177,11 +177,11 @@ static inline int iwl4965_hw_valid_rtc_data_addr(u32 addr)
* *
* In addition, per-band (2.4 and 5 Ghz) saturation txpowers are provided. * In addition, per-band (2.4 and 5 Ghz) saturation txpowers are provided.
* *
* See struct iwl4965_eeprom_calib_info (and the tree of structures * See struct il4965_eeprom_calib_info (and the tree of structures
* contained within it) for format, and struct iwl4965_eeprom for * contained within it) for format, and struct il4965_eeprom for
* locations in EEPROM. * locations in EEPROM.
* *
* "Initialization alive" notification (see struct iwl4965_init_alive_resp) * "Initialization alive" notification (see struct il4965_init_alive_resp)
* consists of: * consists of:
* *
* 1) Temperature calculation parameters. * 1) Temperature calculation parameters.
...@@ -238,7 +238,7 @@ static inline int iwl4965_hw_valid_rtc_data_addr(u32 addr) ...@@ -238,7 +238,7 @@ static inline int iwl4965_hw_valid_rtc_data_addr(u32 addr)
* *
* 3) Determine (EEPROM) calibration sub band for the target channel, by * 3) Determine (EEPROM) calibration sub band for the target channel, by
* comparing against first and last channels in each sub band * comparing against first and last channels in each sub band
* (see struct iwl4965_eeprom_calib_subband_info). * (see struct il4965_eeprom_calib_subband_info).
* *
* *
* 4) Linearly interpolate (EEPROM) factory calibration measurement sets, * 4) Linearly interpolate (EEPROM) factory calibration measurement sets,
...@@ -254,7 +254,7 @@ static inline int iwl4965_hw_valid_rtc_data_addr(u32 addr) ...@@ -254,7 +254,7 @@ static inline int iwl4965_hw_valid_rtc_data_addr(u32 addr)
* span of the sampled channels. * span of the sampled channels.
* *
* Driver may choose the pair (for 2 Tx chains) of measurements (see * Driver may choose the pair (for 2 Tx chains) of measurements (see
* struct iwl4965_eeprom_calib_ch_info) for which the actual measured * struct il4965_eeprom_calib_ch_info) for which the actual measured
* txpower comes closest to the desired txpower. Usually, though, * txpower comes closest to the desired txpower. Usually, though,
* the middle set of measurements is closest to the regulatory limits, * the middle set of measurements is closest to the regulatory limits,
* and is therefore a good choice for all txpower calculations (this * and is therefore a good choice for all txpower calculations (this
...@@ -370,7 +370,7 @@ static inline int iwl4965_hw_valid_rtc_data_addr(u32 addr) ...@@ -370,7 +370,7 @@ static inline int iwl4965_hw_valid_rtc_data_addr(u32 addr)
* *
* *
* 11) Read gain table entries for DSP and radio gain, place into appropriate * 11) Read gain table entries for DSP and radio gain, place into appropriate
* location(s) in command (struct iwl4965_txpowertable_cmd). * location(s) in command (struct il4965_txpowertable_cmd).
*/ */
/** /**
...@@ -382,7 +382,7 @@ static inline int iwl4965_hw_valid_rtc_data_addr(u32 addr) ...@@ -382,7 +382,7 @@ static inline int iwl4965_hw_valid_rtc_data_addr(u32 addr)
* The value "6" represents number of steps in gain table to reduce power 3 dB. * The value "6" represents number of steps in gain table to reduce power 3 dB.
* Each step is 1/2 dB. * Each step is 1/2 dB.
*/ */
#define IWL_TX_POWER_MIMO_REGULATORY_COMPENSATION (6) #define IL_TX_POWER_MIMO_REGULATORY_COMPENSATION (6)
/** /**
* CCK gain compensation. * CCK gain compensation.
...@@ -394,13 +394,13 @@ static inline int iwl4965_hw_valid_rtc_data_addr(u32 addr) ...@@ -394,13 +394,13 @@ static inline int iwl4965_hw_valid_rtc_data_addr(u32 addr)
* Hardware rev for 4965 can be determined by reading CSR_HW_REV_WA_REG, * Hardware rev for 4965 can be determined by reading CSR_HW_REV_WA_REG,
* bits [3:2], 1 = B, 2 = C. * bits [3:2], 1 = B, 2 = C.
*/ */
#define IWL_TX_POWER_CCK_COMPENSATION_B_STEP (9) #define IL_TX_POWER_CCK_COMPENSATION_B_STEP (9)
#define IWL_TX_POWER_CCK_COMPENSATION_C_STEP (5) #define IL_TX_POWER_CCK_COMPENSATION_C_STEP (5)
/* /*
* 4965 power supply voltage compensation for txpower * 4965 power supply voltage compensation for txpower
*/ */
#define TX_POWER_IWL_VOLTAGE_CODES_PER_03V (7) #define TX_POWER_IL_VOLTAGE_CODES_PER_03V (7)
/** /**
* Gain tables. * Gain tables.
...@@ -668,10 +668,10 @@ static inline int iwl4965_hw_valid_rtc_data_addr(u32 addr) ...@@ -668,10 +668,10 @@ static inline int iwl4965_hw_valid_rtc_data_addr(u32 addr)
* *
* Units are in half-dBm (i.e. "34" means 17 dBm). * Units are in half-dBm (i.e. "34" means 17 dBm).
*/ */
#define IWL_TX_POWER_DEFAULT_REGULATORY_24 (34) #define IL_TX_POWER_DEFAULT_REGULATORY_24 (34)
#define IWL_TX_POWER_DEFAULT_REGULATORY_52 (34) #define IL_TX_POWER_DEFAULT_REGULATORY_52 (34)
#define IWL_TX_POWER_REGULATORY_MIN (0) #define IL_TX_POWER_REGULATORY_MIN (0)
#define IWL_TX_POWER_REGULATORY_MAX (34) #define IL_TX_POWER_REGULATORY_MAX (34)
/** /**
* Sanity checks and default values for EEPROM saturation levels. * Sanity checks and default values for EEPROM saturation levels.
...@@ -689,10 +689,10 @@ static inline int iwl4965_hw_valid_rtc_data_addr(u32 addr) ...@@ -689,10 +689,10 @@ static inline int iwl4965_hw_valid_rtc_data_addr(u32 addr)
* *
* Units are in half-dBm (i.e. "38" means 19 dBm). * Units are in half-dBm (i.e. "38" means 19 dBm).
*/ */
#define IWL_TX_POWER_DEFAULT_SATURATION_24 (38) #define IL_TX_POWER_DEFAULT_SATURATION_24 (38)
#define IWL_TX_POWER_DEFAULT_SATURATION_52 (38) #define IL_TX_POWER_DEFAULT_SATURATION_52 (38)
#define IWL_TX_POWER_SATURATION_MIN (20) #define IL_TX_POWER_SATURATION_MIN (20)
#define IWL_TX_POWER_SATURATION_MAX (50) #define IL_TX_POWER_SATURATION_MAX (50)
/** /**
* Channel groups used for Tx Attenuation calibration (MIMO tx channel balance) * Channel groups used for Tx Attenuation calibration (MIMO tx channel balance)
...@@ -709,24 +709,24 @@ static inline int iwl4965_hw_valid_rtc_data_addr(u32 addr) ...@@ -709,24 +709,24 @@ static inline int iwl4965_hw_valid_rtc_data_addr(u32 addr)
* Different frequency ranges require different compensation, as shown below. * Different frequency ranges require different compensation, as shown below.
*/ */
/* Group 0, 5.2 GHz ch 34-43: 4.5 degrees per 1/2 dB. */ /* Group 0, 5.2 GHz ch 34-43: 4.5 degrees per 1/2 dB. */
#define CALIB_IWL_TX_ATTEN_GR1_FCH 34 #define CALIB_IL_TX_ATTEN_GR1_FCH 34
#define CALIB_IWL_TX_ATTEN_GR1_LCH 43 #define CALIB_IL_TX_ATTEN_GR1_LCH 43
/* Group 1, 5.3 GHz ch 44-70: 4.0 degrees per 1/2 dB. */ /* Group 1, 5.3 GHz ch 44-70: 4.0 degrees per 1/2 dB. */
#define CALIB_IWL_TX_ATTEN_GR2_FCH 44 #define CALIB_IL_TX_ATTEN_GR2_FCH 44
#define CALIB_IWL_TX_ATTEN_GR2_LCH 70 #define CALIB_IL_TX_ATTEN_GR2_LCH 70
/* Group 2, 5.5 GHz ch 71-124: 4.0 degrees per 1/2 dB. */ /* Group 2, 5.5 GHz ch 71-124: 4.0 degrees per 1/2 dB. */
#define CALIB_IWL_TX_ATTEN_GR3_FCH 71 #define CALIB_IL_TX_ATTEN_GR3_FCH 71
#define CALIB_IWL_TX_ATTEN_GR3_LCH 124 #define CALIB_IL_TX_ATTEN_GR3_LCH 124
/* Group 3, 5.7 GHz ch 125-200: 4.0 degrees per 1/2 dB. */ /* Group 3, 5.7 GHz ch 125-200: 4.0 degrees per 1/2 dB. */
#define CALIB_IWL_TX_ATTEN_GR4_FCH 125 #define CALIB_IL_TX_ATTEN_GR4_FCH 125
#define CALIB_IWL_TX_ATTEN_GR4_LCH 200 #define CALIB_IL_TX_ATTEN_GR4_LCH 200
/* Group 4, 2.4 GHz all channels: 3.5 degrees per 1/2 dB. */ /* Group 4, 2.4 GHz all channels: 3.5 degrees per 1/2 dB. */
#define CALIB_IWL_TX_ATTEN_GR5_FCH 1 #define CALIB_IL_TX_ATTEN_GR5_FCH 1
#define CALIB_IWL_TX_ATTEN_GR5_LCH 20 #define CALIB_IL_TX_ATTEN_GR5_LCH 20
enum { enum {
CALIB_CH_GROUP_1 = 0, CALIB_CH_GROUP_1 = 0,
...@@ -767,7 +767,7 @@ enum { ...@@ -767,7 +767,7 @@ enum {
/** /**
* struct iwl4965_schedq_bc_tbl * struct il4965_schedq_bc_tbl
* *
* Byte Count table * Byte Count table
* *
...@@ -784,7 +784,7 @@ enum { ...@@ -784,7 +784,7 @@ enum {
* padding puts each byte count table on a 1024-byte boundary; * padding puts each byte count table on a 1024-byte boundary;
* 4965 assumes tables are separated by 1024 bytes. * 4965 assumes tables are separated by 1024 bytes.
*/ */
struct iwl4965_scd_bc_tbl { struct il4965_scd_bc_tbl {
__le16 tfd_offset[TFD_QUEUE_BC_SIZE]; __le16 tfd_offset[TFD_QUEUE_BC_SIZE];
u8 pad[1024 - (TFD_QUEUE_BC_SIZE) * sizeof(__le16)]; u8 pad[1024 - (TFD_QUEUE_BC_SIZE) * sizeof(__le16)];
} __packed; } __packed;
...@@ -808,4 +808,4 @@ struct iwl4965_scd_bc_tbl { ...@@ -808,4 +808,4 @@ struct iwl4965_scd_bc_tbl {
#define IWL4965_FIRST_AMPDU_QUEUE 10 #define IWL4965_FIRST_AMPDU_QUEUE 10
#endif /* !__iwl_4965_hw_h__ */ #endif /* !__il_4965_hw_h__ */
...@@ -44,30 +44,30 @@ ...@@ -44,30 +44,30 @@
/* Send led command */ /* Send led command */
static int static int
iwl4965_send_led_cmd(struct iwl_priv *priv, struct iwl_led_cmd *led_cmd) il4965_send_led_cmd(struct il_priv *priv, struct il_led_cmd *led_cmd)
{ {
struct iwl_host_cmd cmd = { struct il_host_cmd cmd = {
.id = REPLY_LEDS_CMD, .id = REPLY_LEDS_CMD,
.len = sizeof(struct iwl_led_cmd), .len = sizeof(struct il_led_cmd),
.data = led_cmd, .data = led_cmd,
.flags = CMD_ASYNC, .flags = CMD_ASYNC,
.callback = NULL, .callback = NULL,
}; };
u32 reg; u32 reg;
reg = iwl_read32(priv, CSR_LED_REG); reg = il_read32(priv, CSR_LED_REG);
if (reg != (reg & CSR_LED_BSM_CTRL_MSK)) if (reg != (reg & CSR_LED_BSM_CTRL_MSK))
iwl_write32(priv, CSR_LED_REG, reg & CSR_LED_BSM_CTRL_MSK); il_write32(priv, CSR_LED_REG, reg & CSR_LED_BSM_CTRL_MSK);
return iwl_legacy_send_cmd(priv, &cmd); return il_send_cmd(priv, &cmd);
} }
/* Set led register off */ /* Set led register off */
void iwl4965_led_enable(struct iwl_priv *priv) void il4965_led_enable(struct il_priv *priv)
{ {
iwl_write32(priv, CSR_LED_REG, CSR_LED_REG_TRUN_ON); il_write32(priv, CSR_LED_REG, CSR_LED_REG_TRUN_ON);
} }
const struct iwl_led_ops iwl4965_led_ops = { const struct il_led_ops il4965_led_ops = {
.cmd = iwl4965_send_led_cmd, .cmd = il4965_send_led_cmd,
}; };
...@@ -24,10 +24,10 @@ ...@@ -24,10 +24,10 @@
* *
*****************************************************************************/ *****************************************************************************/
#ifndef __iwl_4965_led_h__ #ifndef __il_4965_led_h__
#define __iwl_4965_led_h__ #define __il_4965_led_h__
extern const struct iwl_led_ops iwl4965_led_ops; extern const struct il_led_ops il4965_led_ops;
void iwl4965_led_enable(struct iwl_priv *priv); void il4965_led_enable(struct il_priv *priv);
#endif /* __iwl_4965_led_h__ */ #endif /* __il_4965_led_h__ */
This diff is collapsed.
...@@ -41,31 +41,31 @@ ...@@ -41,31 +41,31 @@
#include "iwl-4965-hw.h" #include "iwl-4965-hw.h"
#include "iwl-4965.h" #include "iwl-4965.h"
void iwl4965_rx_missed_beacon_notif(struct iwl_priv *priv, void il4965_rx_missed_beacon_notif(struct il_priv *priv,
struct iwl_rx_mem_buffer *rxb) struct il_rx_mem_buffer *rxb)
{ {
struct iwl_rx_packet *pkt = rxb_addr(rxb); struct il_rx_packet *pkt = rxb_addr(rxb);
struct iwl_missed_beacon_notif *missed_beacon; struct il_missed_beacon_notif *missed_beacon;
missed_beacon = &pkt->u.missed_beacon; missed_beacon = &pkt->u.missed_beacon;
if (le32_to_cpu(missed_beacon->consecutive_missed_beacons) > if (le32_to_cpu(missed_beacon->consecutive_missed_beacons) >
priv->missed_beacon_threshold) { priv->missed_beacon_threshold) {
IWL_DEBUG_CALIB(priv, IL_DEBUG_CALIB(priv,
"missed bcn cnsq %d totl %d rcd %d expctd %d\n", "missed bcn cnsq %d totl %d rcd %d expctd %d\n",
le32_to_cpu(missed_beacon->consecutive_missed_beacons), le32_to_cpu(missed_beacon->consecutive_missed_beacons),
le32_to_cpu(missed_beacon->total_missed_becons), le32_to_cpu(missed_beacon->total_missed_becons),
le32_to_cpu(missed_beacon->num_recvd_beacons), le32_to_cpu(missed_beacon->num_recvd_beacons),
le32_to_cpu(missed_beacon->num_expected_beacons)); le32_to_cpu(missed_beacon->num_expected_beacons));
if (!test_bit(STATUS_SCANNING, &priv->status)) if (!test_bit(STATUS_SCANNING, &priv->status))
iwl4965_init_sensitivity(priv); il4965_init_sensitivity(priv);
} }
} }
/* Calculate noise level, based on measurements during network silence just /* Calculate noise level, based on measurements during network silence just
* before arriving beacon. This measurement can be done only if we know * before arriving beacon. This measurement can be done only if we know
* exactly when to expect beacons, therefore only when we're associated. */ * exactly when to expect beacons, therefore only when we're associated. */
static void iwl4965_rx_calc_noise(struct iwl_priv *priv) static void il4965_rx_calc_noise(struct il_priv *priv)
{ {
struct statistics_rx_non_phy *rx_info; struct statistics_rx_non_phy *rx_info;
int num_active_rx = 0; int num_active_rx = 0;
...@@ -98,9 +98,9 @@ static void iwl4965_rx_calc_noise(struct iwl_priv *priv) ...@@ -98,9 +98,9 @@ static void iwl4965_rx_calc_noise(struct iwl_priv *priv)
if (num_active_rx) if (num_active_rx)
last_rx_noise = (total_silence / num_active_rx) - 107; last_rx_noise = (total_silence / num_active_rx) - 107;
else else
last_rx_noise = IWL_NOISE_MEAS_NOT_AVAILABLE; last_rx_noise = IL_NOISE_MEAS_NOT_AVAILABLE;
IWL_DEBUG_CALIB(priv, "inband silence a %u, b %u, c %u, dBm %d\n", IL_DEBUG_CALIB(priv, "inband silence a %u, b %u, c %u, dBm %d\n",
bcn_silence_a, bcn_silence_b, bcn_silence_c, bcn_silence_a, bcn_silence_b, bcn_silence_c,
last_rx_noise); last_rx_noise);
} }
...@@ -111,7 +111,7 @@ static void iwl4965_rx_calc_noise(struct iwl_priv *priv) ...@@ -111,7 +111,7 @@ static void iwl4965_rx_calc_noise(struct iwl_priv *priv)
* FIXME: This function is for debugging, do not deal with * FIXME: This function is for debugging, do not deal with
* the case of counters roll-over. * the case of counters roll-over.
*/ */
static void iwl4965_accumulative_statistics(struct iwl_priv *priv, static void il4965_accumulative_statistics(struct il_priv *priv,
__le32 *stats) __le32 *stats)
{ {
int i, size; int i, size;
...@@ -123,7 +123,7 @@ static void iwl4965_accumulative_statistics(struct iwl_priv *priv, ...@@ -123,7 +123,7 @@ static void iwl4965_accumulative_statistics(struct iwl_priv *priv,
prev_stats = (__le32 *)&priv->_4965.statistics; prev_stats = (__le32 *)&priv->_4965.statistics;
accum_stats = (u32 *)&priv->_4965.accum_statistics; accum_stats = (u32 *)&priv->_4965.accum_statistics;
size = sizeof(struct iwl_notif_statistics); size = sizeof(struct il_notif_statistics);
general = &priv->_4965.statistics.general.common; general = &priv->_4965.statistics.general.common;
accum_general = &priv->_4965.accum_statistics.general.common; accum_general = &priv->_4965.accum_statistics.general.common;
tx = &priv->_4965.statistics.tx; tx = &priv->_4965.statistics.tx;
...@@ -151,15 +151,15 @@ static void iwl4965_accumulative_statistics(struct iwl_priv *priv, ...@@ -151,15 +151,15 @@ static void iwl4965_accumulative_statistics(struct iwl_priv *priv,
#define REG_RECALIB_PERIOD (60) #define REG_RECALIB_PERIOD (60)
void iwl4965_rx_statistics(struct iwl_priv *priv, void il4965_rx_statistics(struct il_priv *priv,
struct iwl_rx_mem_buffer *rxb) struct il_rx_mem_buffer *rxb)
{ {
int change; int change;
struct iwl_rx_packet *pkt = rxb_addr(rxb); struct il_rx_packet *pkt = rxb_addr(rxb);
IWL_DEBUG_RX(priv, IL_DEBUG_RX(priv,
"Statistics notification received (%d vs %d).\n", "Statistics notification received (%d vs %d).\n",
(int)sizeof(struct iwl_notif_statistics), (int)sizeof(struct il_notif_statistics),
le32_to_cpu(pkt->len_n_flags) & le32_to_cpu(pkt->len_n_flags) &
FH_RSCSR_FRAME_SIZE_MSK); FH_RSCSR_FRAME_SIZE_MSK);
...@@ -170,7 +170,7 @@ void iwl4965_rx_statistics(struct iwl_priv *priv, ...@@ -170,7 +170,7 @@ void iwl4965_rx_statistics(struct iwl_priv *priv,
(pkt->u.stats.flag & (pkt->u.stats.flag &
STATISTICS_REPLY_FLG_HT40_MODE_MSK))); STATISTICS_REPLY_FLG_HT40_MODE_MSK)));
#ifdef CONFIG_IWLWIFI_LEGACY_DEBUGFS #ifdef CONFIG_IWLWIFI_LEGACY_DEBUGFS
iwl4965_accumulative_statistics(priv, (__le32 *)&pkt->u.stats); il4965_accumulative_statistics(priv, (__le32 *)&pkt->u.stats);
#endif #endif
/* TODO: reading some of statistics is unneeded */ /* TODO: reading some of statistics is unneeded */
...@@ -188,28 +188,28 @@ void iwl4965_rx_statistics(struct iwl_priv *priv, ...@@ -188,28 +188,28 @@ void iwl4965_rx_statistics(struct iwl_priv *priv,
if (unlikely(!test_bit(STATUS_SCANNING, &priv->status)) && if (unlikely(!test_bit(STATUS_SCANNING, &priv->status)) &&
(pkt->hdr.cmd == STATISTICS_NOTIFICATION)) { (pkt->hdr.cmd == STATISTICS_NOTIFICATION)) {
iwl4965_rx_calc_noise(priv); il4965_rx_calc_noise(priv);
queue_work(priv->workqueue, &priv->run_time_calib_work); queue_work(priv->workqueue, &priv->run_time_calib_work);
} }
if (priv->cfg->ops->lib->temp_ops.temperature && change) if (priv->cfg->ops->lib->temp_ops.temperature && change)
priv->cfg->ops->lib->temp_ops.temperature(priv); priv->cfg->ops->lib->temp_ops.temperature(priv);
} }
void iwl4965_reply_statistics(struct iwl_priv *priv, void il4965_reply_statistics(struct il_priv *priv,
struct iwl_rx_mem_buffer *rxb) struct il_rx_mem_buffer *rxb)
{ {
struct iwl_rx_packet *pkt = rxb_addr(rxb); struct il_rx_packet *pkt = rxb_addr(rxb);
if (le32_to_cpu(pkt->u.stats.flag) & UCODE_STATISTICS_CLEAR_MSK) { if (le32_to_cpu(pkt->u.stats.flag) & UCODE_STATISTICS_CLEAR_MSK) {
#ifdef CONFIG_IWLWIFI_LEGACY_DEBUGFS #ifdef CONFIG_IWLWIFI_LEGACY_DEBUGFS
memset(&priv->_4965.accum_statistics, 0, memset(&priv->_4965.accum_statistics, 0,
sizeof(struct iwl_notif_statistics)); sizeof(struct il_notif_statistics));
memset(&priv->_4965.delta_statistics, 0, memset(&priv->_4965.delta_statistics, 0,
sizeof(struct iwl_notif_statistics)); sizeof(struct il_notif_statistics));
memset(&priv->_4965.max_delta, 0, memset(&priv->_4965.max_delta, 0,
sizeof(struct iwl_notif_statistics)); sizeof(struct il_notif_statistics));
#endif #endif
IWL_DEBUG_RX(priv, "Statistics have been cleared\n"); IL_DEBUG_RX(priv, "Statistics have been cleared\n");
} }
iwl4965_rx_statistics(priv, rxb); il4965_rx_statistics(priv, rxb);
} }
This diff is collapsed.
...@@ -40,30 +40,30 @@ ...@@ -40,30 +40,30 @@
#include "iwl-4965.h" #include "iwl-4965.h"
#include "iwl-4965-calib.h" #include "iwl-4965-calib.h"
#define IWL_AC_UNSET -1 #define IL_AC_UNSET -1
/** /**
* iwl_verify_inst_sparse - verify runtime uCode image in card vs. host, * il_verify_inst_sparse - verify runtime uCode image in card vs. host,
* using sample data 100 bytes apart. If these sample points are good, * using sample data 100 bytes apart. If these sample points are good,
* it's a pretty good bet that everything between them is good, too. * it's a pretty good bet that everything between them is good, too.
*/ */
static int static int
iwl4965_verify_inst_sparse(struct iwl_priv *priv, __le32 *image, u32 len) il4965_verify_inst_sparse(struct il_priv *priv, __le32 *image, u32 len)
{ {
u32 val; u32 val;
int ret = 0; int ret = 0;
u32 errcnt = 0; u32 errcnt = 0;
u32 i; u32 i;
IWL_DEBUG_INFO(priv, "ucode inst image size is %u\n", len); IL_DEBUG_INFO(priv, "ucode inst image size is %u\n", len);
for (i = 0; i < len; i += 100, image += 100/sizeof(u32)) { for (i = 0; i < len; i += 100, image += 100/sizeof(u32)) {
/* read data comes through single port, auto-incr addr */ /* read data comes through single port, auto-incr addr */
/* NOTE: Use the debugless read so we don't flood kernel log /* NOTE: Use the debugless read so we don't flood kernel log
* if IWL_DL_IO is set */ * if IL_DL_IO is set */
iwl_legacy_write_direct32(priv, HBUS_TARG_MEM_RADDR, il_write_direct32(priv, HBUS_TARG_MEM_RADDR,
i + IWL4965_RTC_INST_LOWER_BOUND); i + IWL4965_RTC_INST_LOWER_BOUND);
val = _iwl_legacy_read_direct32(priv, HBUS_TARG_MEM_RDAT); val = _il_read_direct32(priv, HBUS_TARG_MEM_RDAT);
if (val != le32_to_cpu(*image)) { if (val != le32_to_cpu(*image)) {
ret = -EIO; ret = -EIO;
errcnt++; errcnt++;
...@@ -76,10 +76,10 @@ iwl4965_verify_inst_sparse(struct iwl_priv *priv, __le32 *image, u32 len) ...@@ -76,10 +76,10 @@ iwl4965_verify_inst_sparse(struct iwl_priv *priv, __le32 *image, u32 len)
} }
/** /**
* iwl4965_verify_inst_full - verify runtime uCode image in card vs. host, * il4965_verify_inst_full - verify runtime uCode image in card vs. host,
* looking at all data. * looking at all data.
*/ */
static int iwl4965_verify_inst_full(struct iwl_priv *priv, __le32 *image, static int il4965_verify_inst_full(struct il_priv *priv, __le32 *image,
u32 len) u32 len)
{ {
u32 val; u32 val;
...@@ -87,19 +87,19 @@ static int iwl4965_verify_inst_full(struct iwl_priv *priv, __le32 *image, ...@@ -87,19 +87,19 @@ static int iwl4965_verify_inst_full(struct iwl_priv *priv, __le32 *image,
int ret = 0; int ret = 0;
u32 errcnt; u32 errcnt;
IWL_DEBUG_INFO(priv, "ucode inst image size is %u\n", len); IL_DEBUG_INFO(priv, "ucode inst image size is %u\n", len);
iwl_legacy_write_direct32(priv, HBUS_TARG_MEM_RADDR, il_write_direct32(priv, HBUS_TARG_MEM_RADDR,
IWL4965_RTC_INST_LOWER_BOUND); IWL4965_RTC_INST_LOWER_BOUND);
errcnt = 0; errcnt = 0;
for (; len > 0; len -= sizeof(u32), image++) { for (; len > 0; len -= sizeof(u32), image++) {
/* read data comes through single port, auto-incr addr */ /* read data comes through single port, auto-incr addr */
/* NOTE: Use the debugless read so we don't flood kernel log /* NOTE: Use the debugless read so we don't flood kernel log
* if IWL_DL_IO is set */ * if IL_DL_IO is set */
val = _iwl_legacy_read_direct32(priv, HBUS_TARG_MEM_RDAT); val = _il_read_direct32(priv, HBUS_TARG_MEM_RDAT);
if (val != le32_to_cpu(*image)) { if (val != le32_to_cpu(*image)) {
IWL_ERR(priv, "uCode INST section is invalid at " IL_ERR(priv, "uCode INST section is invalid at "
"offset 0x%x, is 0x%x, s/b 0x%x\n", "offset 0x%x, is 0x%x, s/b 0x%x\n",
save_len - len, val, le32_to_cpu(*image)); save_len - len, val, le32_to_cpu(*image));
ret = -EIO; ret = -EIO;
...@@ -110,17 +110,17 @@ static int iwl4965_verify_inst_full(struct iwl_priv *priv, __le32 *image, ...@@ -110,17 +110,17 @@ static int iwl4965_verify_inst_full(struct iwl_priv *priv, __le32 *image,
} }
if (!errcnt) if (!errcnt)
IWL_DEBUG_INFO(priv, IL_DEBUG_INFO(priv,
"ucode image in INSTRUCTION memory is good\n"); "ucode image in INSTRUCTION memory is good\n");
return ret; return ret;
} }
/** /**
* iwl4965_verify_ucode - determine which instruction image is in SRAM, * il4965_verify_ucode - determine which instruction image is in SRAM,
* and verify its contents * and verify its contents
*/ */
int iwl4965_verify_ucode(struct iwl_priv *priv) int il4965_verify_ucode(struct il_priv *priv)
{ {
__le32 *image; __le32 *image;
u32 len; u32 len;
...@@ -129,38 +129,38 @@ int iwl4965_verify_ucode(struct iwl_priv *priv) ...@@ -129,38 +129,38 @@ int iwl4965_verify_ucode(struct iwl_priv *priv)
/* Try bootstrap */ /* Try bootstrap */
image = (__le32 *)priv->ucode_boot.v_addr; image = (__le32 *)priv->ucode_boot.v_addr;
len = priv->ucode_boot.len; len = priv->ucode_boot.len;
ret = iwl4965_verify_inst_sparse(priv, image, len); ret = il4965_verify_inst_sparse(priv, image, len);
if (!ret) { if (!ret) {
IWL_DEBUG_INFO(priv, "Bootstrap uCode is good in inst SRAM\n"); IL_DEBUG_INFO(priv, "Bootstrap uCode is good in inst SRAM\n");
return 0; return 0;
} }
/* Try initialize */ /* Try initialize */
image = (__le32 *)priv->ucode_init.v_addr; image = (__le32 *)priv->ucode_init.v_addr;
len = priv->ucode_init.len; len = priv->ucode_init.len;
ret = iwl4965_verify_inst_sparse(priv, image, len); ret = il4965_verify_inst_sparse(priv, image, len);
if (!ret) { if (!ret) {
IWL_DEBUG_INFO(priv, "Initialize uCode is good in inst SRAM\n"); IL_DEBUG_INFO(priv, "Initialize uCode is good in inst SRAM\n");
return 0; return 0;
} }
/* Try runtime/protocol */ /* Try runtime/protocol */
image = (__le32 *)priv->ucode_code.v_addr; image = (__le32 *)priv->ucode_code.v_addr;
len = priv->ucode_code.len; len = priv->ucode_code.len;
ret = iwl4965_verify_inst_sparse(priv, image, len); ret = il4965_verify_inst_sparse(priv, image, len);
if (!ret) { if (!ret) {
IWL_DEBUG_INFO(priv, "Runtime uCode is good in inst SRAM\n"); IL_DEBUG_INFO(priv, "Runtime uCode is good in inst SRAM\n");
return 0; return 0;
} }
IWL_ERR(priv, "NO VALID UCODE IMAGE IN INSTRUCTION SRAM!!\n"); IL_ERR(priv, "NO VALID UCODE IMAGE IN INSTRUCTION SRAM!!\n");
/* Since nothing seems to match, show first several data entries in /* Since nothing seems to match, show first several data entries in
* instruction SRAM, so maybe visual inspection will give a clue. * instruction SRAM, so maybe visual inspection will give a clue.
* Selection of bootstrap image (vs. other images) is arbitrary. */ * Selection of bootstrap image (vs. other images) is arbitrary. */
image = (__le32 *)priv->ucode_boot.v_addr; image = (__le32 *)priv->ucode_boot.v_addr;
len = priv->ucode_boot.len; len = priv->ucode_boot.len;
ret = iwl4965_verify_inst_full(priv, image, len); ret = il4965_verify_inst_full(priv, image, len);
return ret; return ret;
} }
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
...@@ -60,8 +60,8 @@ ...@@ -60,8 +60,8 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
* *
*****************************************************************************/ *****************************************************************************/
#ifndef __iwl_legacy_csr_h__ #ifndef __il_csr_h__
#define __iwl_legacy_csr_h__ #define __il_csr_h__
/* /*
* CSR (control and status registers) * CSR (control and status registers)
* *
...@@ -70,9 +70,9 @@ ...@@ -70,9 +70,9 @@
* low power states due to driver-invoked device resets * low power states due to driver-invoked device resets
* (e.g. CSR_RESET_REG_FLAG_SW_RESET) or uCode-driven power-saving modes. * (e.g. CSR_RESET_REG_FLAG_SW_RESET) or uCode-driven power-saving modes.
* *
* Use iwl_write32() and iwl_read32() family to access these registers; * Use il_write32() and il_read32() family to access these registers;
* these provide simple PCI bus access, without waking up the MAC. * these provide simple PCI bus access, without waking up the MAC.
* Do not use iwl_legacy_write_direct32() family for these registers; * Do not use il_write_direct32() family for these registers;
* no need to "grab nic access" via CSR_GP_CNTRL_REG_FLAG_MAC_ACCESS_REQ. * no need to "grab nic access" via CSR_GP_CNTRL_REG_FLAG_MAC_ACCESS_REQ.
* The MAC (uCode processor, etc.) does not need to be powered up for accessing * The MAC (uCode processor, etc.) does not need to be powered up for accessing
* the CSR registers. * the CSR registers.
...@@ -91,7 +91,7 @@ ...@@ -91,7 +91,7 @@
#define CSR_RESET (CSR_BASE+0x020) /* busmaster enable, NMI, etc*/ #define CSR_RESET (CSR_BASE+0x020) /* busmaster enable, NMI, etc*/
#define CSR_GP_CNTRL (CSR_BASE+0x024) #define CSR_GP_CNTRL (CSR_BASE+0x024)
/* 2nd byte of CSR_INT_COALESCING, not accessible via iwl_write32()! */ /* 2nd byte of CSR_INT_COALESCING, not accessible via il_write32()! */
#define CSR_INT_PERIODIC_REG (CSR_BASE+0x005) #define CSR_INT_PERIODIC_REG (CSR_BASE+0x005)
/* /*
...@@ -368,13 +368,13 @@ ...@@ -368,13 +368,13 @@
* to indirectly access device's internal memory or registers that * to indirectly access device's internal memory or registers that
* may be powered-down. * may be powered-down.
* *
* Use iwl_legacy_write_direct32()/iwl_legacy_read_direct32() family * Use il_write_direct32()/il_read_direct32() family
* for these registers; * for these registers;
* host must "grab nic access" via CSR_GP_CNTRL_REG_FLAG_MAC_ACCESS_REQ * host must "grab nic access" via CSR_GP_CNTRL_REG_FLAG_MAC_ACCESS_REQ
* to make sure the MAC (uCode processor, etc.) is powered up for accessing * to make sure the MAC (uCode processor, etc.) is powered up for accessing
* internal resources. * internal resources.
* *
* Do not use iwl_write32()/iwl_read32() family to access these registers; * Do not use il_write32()/il_read32() family to access these registers;
* these provide only simple PCI bus access, without waking up the MAC. * these provide only simple PCI bus access, without waking up the MAC.
*/ */
#define HBUS_BASE (0x400) #define HBUS_BASE (0x400)
...@@ -419,4 +419,4 @@ ...@@ -419,4 +419,4 @@
*/ */
#define HBUS_TARG_WRPTR (HBUS_BASE+0x060) #define HBUS_TARG_WRPTR (HBUS_BASE+0x060)
#endif /* !__iwl_legacy_csr_h__ */ #endif /* !__il_csr_h__ */
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment