提交 e2ebc833 编写于 作者: S 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: NStanislaw Gruszka <sgruszka@redhat.com>
上级 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__ */
...@@ -29,15 +29,15 @@ ...@@ -29,15 +29,15 @@
* Please use iwl-3945-hw.h for hardware-related definitions. * Please use iwl-3945-hw.h for hardware-related definitions.
*/ */
#ifndef __iwl_3945_h__ #ifndef __il_3945_h__
#define __iwl_3945_h__ #define __il_3945_h__
#include <linux/pci.h> /* for struct pci_device_id */ #include <linux/pci.h> /* for struct pci_device_id */
#include <linux/kernel.h> #include <linux/kernel.h>
#include <net/ieee80211_radiotap.h> #include <net/ieee80211_radiotap.h>
/* Hardware specific file defines the PCI IDs table for that hardware module */ /* Hardware specific file defines the PCI IDs table for that hardware module */
extern const struct pci_device_id iwl3945_hw_card_ids[]; extern const struct pci_device_id il3945_hw_card_ids[];
#include "iwl-csr.h" #include "iwl-csr.h"
#include "iwl-prph.h" #include "iwl-prph.h"
...@@ -69,12 +69,12 @@ extern const struct pci_device_id iwl3945_hw_card_ids[]; ...@@ -69,12 +69,12 @@ extern const struct pci_device_id iwl3945_hw_card_ids[];
* noise info (e.g. averaging might be done in app); measured dBm values are * noise info (e.g. averaging might be done in app); measured dBm values are
* always negative ... using a negative value as the default keeps all * always negative ... using a negative value as the default keeps all
* averages within an s8's (used in some apps) range of negative values. */ * averages within an s8's (used in some apps) range of negative values. */
#define IWL_NOISE_MEAS_NOT_AVAILABLE (-127) #define IL_NOISE_MEAS_NOT_AVAILABLE (-127)
/* Module parameters accessible from iwl-*.c */ /* Module parameters accessible from iwl-*.c */
extern struct iwl_mod_params iwl3945_mod_params; extern struct il_mod_params il3945_mod_params;
struct iwl3945_rate_scale_data { struct il3945_rate_scale_data {
u64 data; u64 data;
s32 success_counter; s32 success_counter;
s32 success_ratio; s32 success_ratio;
...@@ -83,9 +83,9 @@ struct iwl3945_rate_scale_data { ...@@ -83,9 +83,9 @@ struct iwl3945_rate_scale_data {
unsigned long stamp; unsigned long stamp;
}; };
struct iwl3945_rs_sta { struct il3945_rs_sta {
spinlock_t lock; spinlock_t lock;
struct iwl_priv *priv; struct il_priv *priv;
s32 *expected_tpt; s32 *expected_tpt;
unsigned long last_partial_flush; unsigned long last_partial_flush;
unsigned long last_flush; unsigned long last_flush;
...@@ -96,7 +96,7 @@ struct iwl3945_rs_sta { ...@@ -96,7 +96,7 @@ struct iwl3945_rs_sta {
u8 flush_pending; u8 flush_pending;
u8 start_rate; u8 start_rate;
struct timer_list rate_scale_flush; struct timer_list rate_scale_flush;
struct iwl3945_rate_scale_data win[IWL_RATE_COUNT_3945]; struct il3945_rate_scale_data win[IL_RATE_COUNT_3945];
#ifdef CONFIG_MAC80211_DEBUGFS #ifdef CONFIG_MAC80211_DEBUGFS
struct dentry *rs_sta_dbgfs_stats_table_file; struct dentry *rs_sta_dbgfs_stats_table_file;
#endif #endif
...@@ -110,15 +110,15 @@ struct iwl3945_rs_sta { ...@@ -110,15 +110,15 @@ struct iwl3945_rs_sta {
* The common struct MUST be first because it is shared between * The common struct MUST be first because it is shared between
* 3945 and 4965! * 3945 and 4965!
*/ */
struct iwl3945_sta_priv { struct il3945_sta_priv {
struct iwl_station_priv_common common; struct il_station_priv_common common;
struct iwl3945_rs_sta rs_sta; struct il3945_rs_sta rs_sta;
}; };
enum iwl3945_antenna { enum il3945_antenna {
IWL_ANTENNA_DIVERSITY, IL_ANTENNA_DIVERSITY,
IWL_ANTENNA_MAIN, IL_ANTENNA_MAIN,
IWL_ANTENNA_AUX IL_ANTENNA_AUX
}; };
/* /*
...@@ -138,23 +138,23 @@ enum iwl3945_antenna { ...@@ -138,23 +138,23 @@ enum iwl3945_antenna {
#define DEFAULT_SHORT_RETRY_LIMIT 7U #define DEFAULT_SHORT_RETRY_LIMIT 7U
#define DEFAULT_LONG_RETRY_LIMIT 4U #define DEFAULT_LONG_RETRY_LIMIT 4U
#define IWL_TX_FIFO_AC0 0 #define IL_TX_FIFO_AC0 0
#define IWL_TX_FIFO_AC1 1 #define IL_TX_FIFO_AC1 1
#define IWL_TX_FIFO_AC2 2 #define IL_TX_FIFO_AC2 2
#define IWL_TX_FIFO_AC3 3 #define IL_TX_FIFO_AC3 3
#define IWL_TX_FIFO_HCCA_1 5 #define IL_TX_FIFO_HCCA_1 5
#define IWL_TX_FIFO_HCCA_2 6 #define IL_TX_FIFO_HCCA_2 6
#define IWL_TX_FIFO_NONE 7 #define IL_TX_FIFO_NONE 7
#define IEEE80211_DATA_LEN 2304 #define IEEE80211_DATA_LEN 2304
#define IEEE80211_4ADDR_LEN 30 #define IEEE80211_4ADDR_LEN 30
#define IEEE80211_HLEN (IEEE80211_4ADDR_LEN) #define IEEE80211_HLEN (IEEE80211_4ADDR_LEN)
#define IEEE80211_FRAME_LEN (IEEE80211_DATA_LEN + IEEE80211_HLEN) #define IEEE80211_FRAME_LEN (IEEE80211_DATA_LEN + IEEE80211_HLEN)
struct iwl3945_frame { struct il3945_frame {
union { union {
struct ieee80211_hdr frame; struct ieee80211_hdr frame;
struct iwl3945_tx_beacon_cmd beacon; struct il3945_tx_beacon_cmd beacon;
u8 raw[IEEE80211_FRAME_LEN]; u8 raw[IEEE80211_FRAME_LEN];
u8 cmd[360]; u8 cmd[360];
} u; } u;
...@@ -169,19 +169,19 @@ struct iwl3945_frame { ...@@ -169,19 +169,19 @@ struct iwl3945_frame {
#define SUP_RATE_11B_MAX_NUM_CHANNELS 4 #define SUP_RATE_11B_MAX_NUM_CHANNELS 4
#define SUP_RATE_11G_MAX_NUM_CHANNELS 12 #define SUP_RATE_11G_MAX_NUM_CHANNELS 12
#define IWL_SUPPORTED_RATES_IE_LEN 8 #define IL_SUPPORTED_RATES_IE_LEN 8
#define SCAN_INTERVAL 100 #define SCAN_INTERVAL 100
#define MAX_TID_COUNT 9 #define MAX_TID_COUNT 9
#define IWL_INVALID_RATE 0xFF #define IL_INVALID_RATE 0xFF
#define IWL_INVALID_VALUE -1 #define IL_INVALID_VALUE -1
#define STA_PS_STATUS_WAKE 0 #define STA_PS_STATUS_WAKE 0
#define STA_PS_STATUS_SLEEP 1 #define STA_PS_STATUS_SLEEP 1
struct iwl3945_ibss_seq { struct il3945_ibss_seq {
u8 mac[ETH_ALEN]; u8 mac[ETH_ALEN];
u16 seq_num; u16 seq_num;
u16 frag_num; u16 frag_num;
...@@ -189,14 +189,14 @@ struct iwl3945_ibss_seq { ...@@ -189,14 +189,14 @@ struct iwl3945_ibss_seq {
struct list_head list; struct list_head list;
}; };
#define IWL_RX_HDR(x) ((struct iwl3945_rx_frame_hdr *)(\ #define IL_RX_HDR(x) ((struct il3945_rx_frame_hdr *)(\
x->u.rx_frame.stats.payload + \ x->u.rx_frame.stats.payload + \
x->u.rx_frame.stats.phy_count)) x->u.rx_frame.stats.phy_count))
#define IWL_RX_END(x) ((struct iwl3945_rx_frame_end *)(\ #define IL_RX_END(x) ((struct il3945_rx_frame_end *)(\
IWL_RX_HDR(x)->payload + \ IL_RX_HDR(x)->payload + \
le16_to_cpu(IWL_RX_HDR(x)->len))) le16_to_cpu(IL_RX_HDR(x)->len)))
#define IWL_RX_STATS(x) (&x->u.rx_frame.stats) #define IL_RX_STATS(x) (&x->u.rx_frame.stats)
#define IWL_RX_DATA(x) (IWL_RX_HDR(x)->payload) #define IL_RX_DATA(x) (IL_RX_HDR(x)->payload)
/****************************************************************************** /******************************************************************************
...@@ -205,14 +205,14 @@ struct iwl3945_ibss_seq { ...@@ -205,14 +205,14 @@ struct iwl3945_ibss_seq {
* for use by iwl-*.c * for use by iwl-*.c
* *
*****************************************************************************/ *****************************************************************************/
extern int iwl3945_calc_db_from_ratio(int sig_ratio); extern int il3945_calc_db_from_ratio(int sig_ratio);
extern void iwl3945_rx_replenish(void *data); extern void il3945_rx_replenish(void *data);
extern void iwl3945_rx_queue_reset(struct iwl_priv *priv, struct iwl_rx_queue *rxq); extern void il3945_rx_queue_reset(struct il_priv *priv, struct il_rx_queue *rxq);
extern unsigned int iwl3945_fill_beacon_frame(struct iwl_priv *priv, extern unsigned int il3945_fill_beacon_frame(struct il_priv *priv,
struct ieee80211_hdr *hdr, int left); struct ieee80211_hdr *hdr, int left);
extern int iwl3945_dump_nic_event_log(struct iwl_priv *priv, bool full_log, extern int il3945_dump_nic_event_log(struct il_priv *priv, bool full_log,
char **buf, bool display); char **buf, bool display);
extern void iwl3945_dump_nic_error_log(struct iwl_priv *priv); extern void il3945_dump_nic_error_log(struct il_priv *priv);
/****************************************************************************** /******************************************************************************
* *
...@@ -223,86 +223,86 @@ extern void iwl3945_dump_nic_error_log(struct iwl_priv *priv); ...@@ -223,86 +223,86 @@ extern void iwl3945_dump_nic_error_log(struct iwl_priv *priv);
* which is why they are in the hardware specific files (vs. iwl-base.c) * which is why they are in the hardware specific files (vs. iwl-base.c)
* *
* Naming convention -- * Naming convention --
* iwl3945_ <-- Its part of iwlwifi (should be changed to iwl3945_) * il3945_ <-- Its part of iwlwifi (should be changed to il3945_)
* iwl3945_hw_ <-- Hardware specific (implemented in iwl-XXXX.c by all HW) * il3945_hw_ <-- Hardware specific (implemented in iwl-XXXX.c by all HW)
* iwlXXXX_ <-- Hardware specific (implemented in iwl-XXXX.c for XXXX) * iwlXXXX_ <-- Hardware specific (implemented in iwl-XXXX.c for XXXX)
* iwl3945_bg_ <-- Called from work queue context * il3945_bg_ <-- Called from work queue context
* iwl3945_mac_ <-- mac80211 callback * il3945_mac_ <-- mac80211 callback
* *
****************************************************************************/ ****************************************************************************/
extern void iwl3945_hw_rx_handler_setup(struct iwl_priv *priv); extern void il3945_hw_rx_handler_setup(struct il_priv *priv);
extern void iwl3945_hw_setup_deferred_work(struct iwl_priv *priv); extern void il3945_hw_setup_deferred_work(struct il_priv *priv);
extern void iwl3945_hw_cancel_deferred_work(struct iwl_priv *priv); extern void il3945_hw_cancel_deferred_work(struct il_priv *priv);
extern int iwl3945_hw_rxq_stop(struct iwl_priv *priv); extern int il3945_hw_rxq_stop(struct il_priv *priv);
extern int iwl3945_hw_set_hw_params(struct iwl_priv *priv); extern int il3945_hw_set_hw_params(struct il_priv *priv);
extern int iwl3945_hw_nic_init(struct iwl_priv *priv); extern int il3945_hw_nic_init(struct il_priv *priv);
extern int iwl3945_hw_nic_stop_master(struct iwl_priv *priv); extern int il3945_hw_nic_stop_master(struct il_priv *priv);
extern void iwl3945_hw_txq_ctx_free(struct iwl_priv *priv); extern void il3945_hw_txq_ctx_free(struct il_priv *priv);
extern void iwl3945_hw_txq_ctx_stop(struct iwl_priv *priv); extern void il3945_hw_txq_ctx_stop(struct il_priv *priv);
extern int iwl3945_hw_nic_reset(struct iwl_priv *priv); extern int il3945_hw_nic_reset(struct il_priv *priv);
extern int iwl3945_hw_txq_attach_buf_to_tfd(struct iwl_priv *priv, extern int il3945_hw_txq_attach_buf_to_tfd(struct il_priv *priv,
struct iwl_tx_queue *txq, struct il_tx_queue *txq,
dma_addr_t addr, u16 len, dma_addr_t addr, u16 len,
u8 reset, u8 pad); u8 reset, u8 pad);
extern void iwl3945_hw_txq_free_tfd(struct iwl_priv *priv, extern void il3945_hw_txq_free_tfd(struct il_priv *priv,
struct iwl_tx_queue *txq); struct il_tx_queue *txq);
extern int iwl3945_hw_get_temperature(struct iwl_priv *priv); extern int il3945_hw_get_temperature(struct il_priv *priv);
extern int iwl3945_hw_tx_queue_init(struct iwl_priv *priv, extern int il3945_hw_tx_queue_init(struct il_priv *priv,
struct iwl_tx_queue *txq); struct il_tx_queue *txq);
extern unsigned int iwl3945_hw_get_beacon_cmd(struct iwl_priv *priv, extern unsigned int il3945_hw_get_beacon_cmd(struct il_priv *priv,
struct iwl3945_frame *frame, u8 rate); struct il3945_frame *frame, u8 rate);
void iwl3945_hw_build_tx_cmd_rate(struct iwl_priv *priv, void il3945_hw_build_tx_cmd_rate(struct il_priv *priv,
struct iwl_device_cmd *cmd, struct il_device_cmd *cmd,
struct ieee80211_tx_info *info, struct ieee80211_tx_info *info,
struct ieee80211_hdr *hdr, struct ieee80211_hdr *hdr,
int sta_id, int tx_id); int sta_id, int tx_id);
extern int iwl3945_hw_reg_send_txpower(struct iwl_priv *priv); extern int il3945_hw_reg_send_txpower(struct il_priv *priv);
extern int iwl3945_hw_reg_set_txpower(struct iwl_priv *priv, s8 power); extern int il3945_hw_reg_set_txpower(struct il_priv *priv, s8 power);
extern void iwl3945_hw_rx_statistics(struct iwl_priv *priv, extern void il3945_hw_rx_statistics(struct il_priv *priv,
struct iwl_rx_mem_buffer *rxb); struct il_rx_mem_buffer *rxb);
void iwl3945_reply_statistics(struct iwl_priv *priv, void il3945_reply_statistics(struct il_priv *priv,
struct iwl_rx_mem_buffer *rxb); struct il_rx_mem_buffer *rxb);
extern void iwl3945_disable_events(struct iwl_priv *priv); extern void il3945_disable_events(struct il_priv *priv);
extern int iwl4965_get_temperature(const struct iwl_priv *priv); extern int il4965_get_temperature(const struct il_priv *priv);
extern void iwl3945_post_associate(struct iwl_priv *priv); extern void il3945_post_associate(struct il_priv *priv);
extern void iwl3945_config_ap(struct iwl_priv *priv); extern void il3945_config_ap(struct il_priv *priv);
extern int iwl3945_commit_rxon(struct iwl_priv *priv, extern int il3945_commit_rxon(struct il_priv *priv,
struct iwl_rxon_context *ctx); struct il_rxon_context *ctx);
/** /**
* iwl3945_hw_find_station - Find station id for a given BSSID * il3945_hw_find_station - Find station id for a given BSSID
* @bssid: MAC address of station ID to find * @bssid: MAC address of station ID to find
* *
* NOTE: This should not be hardware specific but the code has * NOTE: This should not be hardware specific but the code has
* not yet been merged into a single common layer for managing the * not yet been merged into a single common layer for managing the
* station tables. * station tables.
*/ */
extern u8 iwl3945_hw_find_station(struct iwl_priv *priv, const u8 *bssid); extern u8 il3945_hw_find_station(struct il_priv *priv, const u8 *bssid);
extern struct ieee80211_ops iwl3945_hw_ops; extern struct ieee80211_ops il3945_hw_ops;
/* /*
* Forward declare iwl-3945.c functions for iwl3945-base.c * Forward declare iwl-3945.c functions for iwl3945-base.c
*/ */
extern __le32 iwl3945_get_antenna_flags(const struct iwl_priv *priv); extern __le32 il3945_get_antenna_flags(const struct il_priv *priv);
extern int iwl3945_init_hw_rate_table(struct iwl_priv *priv); extern int il3945_init_hw_rate_table(struct il_priv *priv);
extern void iwl3945_reg_txpower_periodic(struct iwl_priv *priv); extern void il3945_reg_txpower_periodic(struct il_priv *priv);
extern int iwl3945_txpower_set_from_eeprom(struct iwl_priv *priv); extern int il3945_txpower_set_from_eeprom(struct il_priv *priv);
extern const struct iwl_channel_info *iwl3945_get_channel_info( extern const struct il_channel_info *il3945_get_channel_info(
const struct iwl_priv *priv, enum ieee80211_band band, u16 channel); const struct il_priv *priv, enum ieee80211_band band, u16 channel);
extern int iwl3945_rs_next_rate(struct iwl_priv *priv, int rate); extern int il3945_rs_next_rate(struct il_priv *priv, int rate);
/* scanning */ /* scanning */
int iwl3945_request_scan(struct iwl_priv *priv, struct ieee80211_vif *vif); int il3945_request_scan(struct il_priv *priv, struct ieee80211_vif *vif);
void iwl3945_post_scan(struct iwl_priv *priv); void il3945_post_scan(struct il_priv *priv);
/* rates */ /* rates */
extern const struct iwl3945_rate_info iwl3945_rates[IWL_RATE_COUNT_3945]; extern const struct il3945_rate_info il3945_rates[IL_RATE_COUNT_3945];
/* Requires full declaration of iwl_priv before including */ /* Requires full declaration of il_priv before including */
#include "iwl-io.h" #include "iwl-io.h"
#endif #endif
...@@ -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__ */
...@@ -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;
......
...@@ -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__ */
...@@ -26,8 +26,8 @@ ...@@ -26,8 +26,8 @@
* *
*****************************************************************************/ *****************************************************************************/
#ifndef __iwl_legacy_spectrum_h__ #ifndef __il_spectrum_h__
#define __iwl_legacy_spectrum_h__ #define __il_spectrum_h__
enum { /* ieee80211_basic_report.map */ enum { /* ieee80211_basic_report.map */
IEEE80211_BASIC_MAP_BSS = (1 << 0), IEEE80211_BASIC_MAP_BSS = (1 << 0),
IEEE80211_BASIC_MAP_OFDM = (1 << 1), IEEE80211_BASIC_MAP_OFDM = (1 << 1),
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册