Commit 1722f8e1 authored by Stanislaw Gruszka's avatar Stanislaw Gruszka

iwlegacy: checkpatch.pl fixes

Fix most checkpatch.pl ERRORs and some WARNINGs.
Signed-off-by: default avatarStanislaw Gruszka <sgruszka@redhat.com>
parent e7392364
...@@ -49,8 +49,8 @@ il3945_stats_flag(struct il_priv *il, char *buf, int bufsz) ...@@ -49,8 +49,8 @@ il3945_stats_flag(struct il_priv *il, char *buf, int bufsz)
} }
ssize_t ssize_t
il3945_ucode_rx_stats_read(struct file * file, char __user * user_buf, il3945_ucode_rx_stats_read(struct file *file, char __user *user_buf,
size_t count, loff_t * ppos) size_t count, loff_t *ppos)
{ {
struct il_priv *il = file->private_data; struct il_priv *il = file->private_data;
int pos = 0; int pos = 0;
...@@ -314,8 +314,8 @@ il3945_ucode_rx_stats_read(struct file * file, char __user * user_buf, ...@@ -314,8 +314,8 @@ il3945_ucode_rx_stats_read(struct file * file, char __user * user_buf,
} }
ssize_t ssize_t
il3945_ucode_tx_stats_read(struct file * file, char __user * user_buf, il3945_ucode_tx_stats_read(struct file *file, char __user *user_buf,
size_t count, loff_t * ppos) size_t count, loff_t *ppos)
{ {
struct il_priv *il = file->private_data; struct il_priv *il = file->private_data;
int pos = 0; int pos = 0;
...@@ -404,8 +404,8 @@ il3945_ucode_tx_stats_read(struct file * file, char __user * user_buf, ...@@ -404,8 +404,8 @@ il3945_ucode_tx_stats_read(struct file * file, char __user * user_buf,
} }
ssize_t ssize_t
il3945_ucode_general_stats_read(struct file * file, char __user * user_buf, il3945_ucode_general_stats_read(struct file *file, char __user *user_buf,
size_t count, loff_t * ppos) size_t count, loff_t *ppos)
{ {
struct il_priv *il = file->private_data; struct il_priv *il = file->private_data;
int pos = 0; int pos = 0;
......
...@@ -1033,11 +1033,9 @@ il3945_rx_allocate(struct il_priv *il, gfp_t priority) ...@@ -1033,11 +1033,9 @@ il3945_rx_allocate(struct il_priv *il, gfp_t priority)
D_INFO("Failed to allocate SKB buffer.\n"); D_INFO("Failed to allocate SKB buffer.\n");
if (rxq->free_count <= RX_LOW_WATERMARK && if (rxq->free_count <= RX_LOW_WATERMARK &&
net_ratelimit()) net_ratelimit())
IL_ERR IL_ERR("Failed to allocate SKB buffer with %0x."
("Failed to allocate SKB buffer with %s. Only %u free buffers remaining.\n", "Only %u free buffers remaining.\n",
priority == priority, rxq->free_count);
GFP_ATOMIC ? "GFP_ATOMIC" : "GFP_KERNEL",
rxq->free_count);
/* We don't reschedule replenish work here -- we will /* We don't reschedule replenish work here -- we will
* call the restock method and if it still needs * call the restock method and if it still needs
* more buffers it will schedule replenish */ * more buffers it will schedule replenish */
...@@ -3250,7 +3248,7 @@ il3945_show_measurement(struct device *d, struct device_attribute *attr, ...@@ -3250,7 +3248,7 @@ il3945_show_measurement(struct device *d, struct device_attribute *attr,
struct il_priv *il = dev_get_drvdata(d); struct il_priv *il = dev_get_drvdata(d);
struct il_spectrum_notification measure_report; struct il_spectrum_notification measure_report;
u32 size = sizeof(measure_report), len = 0, ofs = 0; u32 size = sizeof(measure_report), len = 0, ofs = 0;
u8 *data = (u8 *) & measure_report; u8 *data = (u8 *) &measure_report;
unsigned long flags; unsigned long flags;
spin_lock_irqsave(&il->lock, flags); spin_lock_irqsave(&il->lock, flags);
......
...@@ -837,8 +837,8 @@ il3945_open_file_generic(struct inode *inode, struct file *file) ...@@ -837,8 +837,8 @@ il3945_open_file_generic(struct inode *inode, struct file *file)
} }
static ssize_t static ssize_t
il3945_sta_dbgfs_stats_table_read(struct file *file, char __user * user_buf, il3945_sta_dbgfs_stats_table_read(struct file *file, char __user *user_buf,
size_t count, loff_t * ppos) size_t count, loff_t *ppos)
{ {
char *buff; char *buff;
int desc = 0; int desc = 0;
......
...@@ -381,10 +381,10 @@ il3945_accumulative_stats(struct il_priv *il, __le32 * stats) ...@@ -381,10 +381,10 @@ il3945_accumulative_stats(struct il_priv *il, __le32 * stats)
u32 *accum_stats; u32 *accum_stats;
u32 *delta, *max_delta; u32 *delta, *max_delta;
prev_stats = (__le32 *) & il->_3945.stats; prev_stats = (__le32 *) &il->_3945.stats;
accum_stats = (u32 *) & il->_3945.accum_stats; accum_stats = (u32 *) &il->_3945.accum_stats;
delta = (u32 *) & il->_3945.delta_stats; delta = (u32 *) &il->_3945.delta_stats;
max_delta = (u32 *) & il->_3945.max_delta; max_delta = (u32 *) &il->_3945.max_delta;
for (i = sizeof(__le32); i < sizeof(struct il3945_notif_stats); for (i = sizeof(__le32); i < sizeof(struct il3945_notif_stats);
i += i +=
...@@ -416,7 +416,7 @@ il3945_hdl_stats(struct il_priv *il, struct il_rx_buf *rxb) ...@@ -416,7 +416,7 @@ il3945_hdl_stats(struct il_priv *il, struct il_rx_buf *rxb)
(int)sizeof(struct il3945_notif_stats), (int)sizeof(struct il3945_notif_stats),
le32_to_cpu(pkt->len_n_flags) & IL_RX_FRAME_SIZE_MSK); le32_to_cpu(pkt->len_n_flags) & IL_RX_FRAME_SIZE_MSK);
#ifdef CONFIG_IWLEGACY_DEBUGFS #ifdef CONFIG_IWLEGACY_DEBUGFS
il3945_accumulative_stats(il, (__le32 *) & pkt->u.raw); il3945_accumulative_stats(il, (__le32 *) &pkt->u.raw);
#endif #endif
memcpy(&il->_3945.stats, pkt->u.raw, sizeof(il->_3945.stats)); memcpy(&il->_3945.stats, pkt->u.raw, sizeof(il->_3945.stats));
...@@ -426,7 +426,7 @@ void ...@@ -426,7 +426,7 @@ void
il3945_hdl_c_stats(struct il_priv *il, struct il_rx_buf *rxb) il3945_hdl_c_stats(struct il_priv *il, struct il_rx_buf *rxb)
{ {
struct il_rx_pkt *pkt = rxb_addr(rxb); struct il_rx_pkt *pkt = rxb_addr(rxb);
__le32 *flag = (__le32 *) & pkt->u.raw; __le32 *flag = (__le32 *) &pkt->u.raw;
if (le32_to_cpu(*flag) & UCODE_STATS_CLEAR_MSK) { if (le32_to_cpu(*flag) & UCODE_STATS_CLEAR_MSK) {
#ifdef CONFIG_IWLEGACY_DEBUGFS #ifdef CONFIG_IWLEGACY_DEBUGFS
...@@ -775,7 +775,8 @@ il3945_set_pwr_vmain(struct il_priv *il) ...@@ -775,7 +775,8 @@ il3945_set_pwr_vmain(struct il_priv *il)
APMG_PS_CTRL_VAL_PWR_SRC_VMAIN, APMG_PS_CTRL_VAL_PWR_SRC_VMAIN,
~APMG_PS_CTRL_MSK_PWR_SRC); ~APMG_PS_CTRL_MSK_PWR_SRC);
_il_poll_bit(il, CSR_GPIO_IN, CSR_GPIO_IN_VAL_VMAIN_PWR_SRC, CSR_GPIO_IN_BIT_AUX_POWER, 5000); /* uS */ _il_poll_bit(il, CSR_GPIO_IN, CSR_GPIO_IN_VAL_VMAIN_PWR_SRC,
CSR_GPIO_IN_BIT_AUX_POWER, 5000);
} }
static int static int
...@@ -1228,7 +1229,8 @@ static struct il3945_tx_power power_gain_table[2][IL_MAX_GAIN_ENTRIES] = { ...@@ -1228,7 +1229,8 @@ static struct il3945_tx_power power_gain_table[2][IL_MAX_GAIN_ENTRIES] = {
{3, 113}, {3, 113},
{3, 106}, {3, 106},
{3, 102}, {3, 102},
{3, 95}}, /* 2.4 GHz, lowest power */ {3, 95} /* 2.4 GHz, lowest power */
},
{ {
{251, 127}, /* 5.x GHz, highest power */ {251, 127}, /* 5.x GHz, highest power */
{251, 120}, {251, 120},
...@@ -1307,7 +1309,8 @@ static struct il3945_tx_power power_gain_table[2][IL_MAX_GAIN_ENTRIES] = { ...@@ -1307,7 +1309,8 @@ static struct il3945_tx_power power_gain_table[2][IL_MAX_GAIN_ENTRIES] = {
{35, 113}, {35, 113},
{35, 107}, {35, 107},
{35, 99}, {35, 99},
{3, 120}} /* 5.x GHz, lowest power */ {3, 120} /* 5.x GHz, lowest power */
}
}; };
static inline u8 static inline u8
...@@ -1331,7 +1334,7 @@ il3945_hw_reg_fix_power_idx(int idx) ...@@ -1331,7 +1334,7 @@ il3945_hw_reg_fix_power_idx(int idx)
*/ */
static void static void
il3945_hw_reg_set_scan_power(struct il_priv *il, u32 scan_tbl_idx, s32 rate_idx, il3945_hw_reg_set_scan_power(struct il_priv *il, u32 scan_tbl_idx, s32 rate_idx,
const s8 * clip_pwrs, const s8 *clip_pwrs,
struct il_channel_info *ch_info, int band_idx) struct il_channel_info *ch_info, int band_idx)
{ {
struct il3945_scan_power_info *scan_power_info; struct il3945_scan_power_info *scan_power_info;
...@@ -1883,8 +1886,7 @@ il3945_bg_reg_txpower_periodic(struct work_struct *work) ...@@ -1883,8 +1886,7 @@ il3945_bg_reg_txpower_periodic(struct work_struct *work)
} }
/** /**
* il3945_hw_reg_get_ch_grp_idx - find the channel-group idx (0-4) * il3945_hw_reg_get_ch_grp_idx - find the channel-group idx (0-4) for channel.
* for the channel.
* *
* This function is used when initializing channel-info structs. * This function is used when initializing channel-info structs.
* *
...@@ -1930,7 +1932,7 @@ il3945_hw_reg_get_ch_grp_idx(struct il_priv *il, ...@@ -1930,7 +1932,7 @@ il3945_hw_reg_get_ch_grp_idx(struct il_priv *il,
*/ */
static int static int
il3945_hw_reg_get_matched_power_idx(struct il_priv *il, s8 requested_power, il3945_hw_reg_get_matched_power_idx(struct il_priv *il, s8 requested_power,
s32 setting_idx, s32 * new_idx) s32 setting_idx, s32 *new_idx)
{ {
const struct il3945_eeprom_txpower_group *chnl_grp = NULL; const struct il3945_eeprom_txpower_group *chnl_grp = NULL;
struct il3945_eeprom *eeprom = (struct il3945_eeprom *)il->eeprom; struct il3945_eeprom *eeprom = (struct il3945_eeprom *)il->eeprom;
...@@ -2735,14 +2737,13 @@ static struct il_cfg il3945_abg_cfg = { ...@@ -2735,14 +2737,13 @@ static struct il_cfg il3945_abg_cfg = {
}; };
DEFINE_PCI_DEVICE_TABLE(il3945_hw_card_ids) = { DEFINE_PCI_DEVICE_TABLE(il3945_hw_card_ids) = {
{ {IL_PCI_DEVICE(0x4222, 0x1005, il3945_bg_cfg)},
IL_PCI_DEVICE(0x4222, 0x1005, il3945_bg_cfg)}, { {IL_PCI_DEVICE(0x4222, 0x1034, il3945_bg_cfg)},
IL_PCI_DEVICE(0x4222, 0x1034, il3945_bg_cfg)}, { {IL_PCI_DEVICE(0x4222, 0x1044, il3945_bg_cfg)},
IL_PCI_DEVICE(0x4222, 0x1044, il3945_bg_cfg)}, { {IL_PCI_DEVICE(0x4227, 0x1014, il3945_bg_cfg)},
IL_PCI_DEVICE(0x4227, 0x1014, il3945_bg_cfg)}, { {IL_PCI_DEVICE(0x4222, PCI_ANY_ID, il3945_abg_cfg)},
IL_PCI_DEVICE(0x4222, PCI_ANY_ID, il3945_abg_cfg)}, { {IL_PCI_DEVICE(0x4227, PCI_ANY_ID, il3945_abg_cfg)},
IL_PCI_DEVICE(0x4227, PCI_ANY_ID, il3945_abg_cfg)}, { {0}
0}
}; };
MODULE_DEVICE_TABLE(pci, il3945_hw_card_ids); MODULE_DEVICE_TABLE(pci, il3945_hw_card_ids);
...@@ -269,11 +269,6 @@ extern int il3945_init_hw_rate_table(struct il_priv *il); ...@@ -269,11 +269,6 @@ extern int il3945_init_hw_rate_table(struct il_priv *il);
extern void il3945_reg_txpower_periodic(struct il_priv *il); extern void il3945_reg_txpower_periodic(struct il_priv *il);
extern int il3945_txpower_set_from_eeprom(struct il_priv *il); extern int il3945_txpower_set_from_eeprom(struct il_priv *il);
extern const struct il_channel_info *il3945_get_channel_info(const struct
il_priv *il,
enum ieee80211_band
band, u16 channel);
extern int il3945_rs_next_rate(struct il_priv *il, int rate); extern int il3945_rs_next_rate(struct il_priv *il, int rate);
/* scanning */ /* scanning */
...@@ -619,31 +614,31 @@ struct il3945_tfd { ...@@ -619,31 +614,31 @@ struct il3945_tfd {
} __packed; } __packed;
#ifdef CONFIG_IWLEGACY_DEBUGFS #ifdef CONFIG_IWLEGACY_DEBUGFS
ssize_t il3945_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 il3945_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 il3945_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 static ssize_t
il3945_ucode_rx_stats_read(struct file *file, char __user * user_buf, il3945_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
il3945_ucode_tx_stats_read(struct file *file, char __user * user_buf, il3945_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
il3945_ucode_general_stats_read(struct file *file, char __user * user_buf, il3945_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;
} }
......
...@@ -366,7 +366,7 @@ il4965_sens_auto_corr_ofdm(struct il_priv *il, u32 norm_fa, u32 rx_enable_time) ...@@ -366,7 +366,7 @@ il4965_sens_auto_corr_ofdm(struct il_priv *il, u32 norm_fa, u32 rx_enable_time)
static void static void
il4965_prepare_legacy_sensitivity_tbl(struct il_priv *il, il4965_prepare_legacy_sensitivity_tbl(struct il_priv *il,
struct il_sensitivity_data *data, struct il_sensitivity_data *data,
__le16 * tbl) __le16 *tbl)
{ {
tbl[HD_AUTO_CORR32_X4_TH_ADD_MIN_IDX] = tbl[HD_AUTO_CORR32_X4_TH_ADD_MIN_IDX] =
cpu_to_le16((u16) data->auto_corr_ofdm); cpu_to_le16((u16) data->auto_corr_ofdm);
...@@ -707,9 +707,8 @@ il4965_find_disconn_antenna(struct il_priv *il, u32 * average_sig, ...@@ -707,9 +707,8 @@ il4965_find_disconn_antenna(struct il_priv *il, u32 * average_sig,
il4965_find_first_chain(il->cfg->valid_tx_ant); il4965_find_first_chain(il->cfg->valid_tx_ant);
data->disconn_array[first_chain] = 0; data->disconn_array[first_chain] = 0;
active_chains |= BIT(first_chain); active_chains |= BIT(first_chain);
D_CALIB D_CALIB("All Tx chains are disconnected"
("All Tx chains are disconnected W/A - declare %d as connected\n", "- declare %d as connected\n", first_chain);
first_chain);
break; break;
} }
} }
......
...@@ -56,8 +56,8 @@ il4965_stats_flag(struct il_priv *il, char *buf, int bufsz) ...@@ -56,8 +56,8 @@ il4965_stats_flag(struct il_priv *il, char *buf, int bufsz)
} }
ssize_t ssize_t
il4965_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)
{ {
struct il_priv *il = file->private_data; struct il_priv *il = file->private_data;
int pos = 0; int pos = 0;
...@@ -468,8 +468,8 @@ il4965_ucode_rx_stats_read(struct file * file, char __user * user_buf, ...@@ -468,8 +468,8 @@ il4965_ucode_rx_stats_read(struct file * file, char __user * user_buf,
} }
ssize_t ssize_t
il4965_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)
{ {
struct il_priv *il = file->private_data; struct il_priv *il = file->private_data;
int pos = 0; int pos = 0;
...@@ -634,8 +634,8 @@ il4965_ucode_tx_stats_read(struct file * file, char __user * user_buf, ...@@ -634,8 +634,8 @@ il4965_ucode_tx_stats_read(struct file * file, char __user * user_buf,
} }
ssize_t ssize_t
il4965_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 il_priv *il = file->private_data; struct il_priv *il = file->private_data;
int pos = 0; int pos = 0;
......
...@@ -163,10 +163,10 @@ il4965_rx_init(struct il_priv *il, struct il_rx_queue *rxq) ...@@ -163,10 +163,10 @@ il4965_rx_init(struct il_priv *il, struct il_rx_queue *rxq)
il_wr(il, FH49_MEM_RCSR_CHNL0_CONFIG_REG, il_wr(il, FH49_MEM_RCSR_CHNL0_CONFIG_REG,
FH49_RCSR_RX_CONFIG_CHNL_EN_ENABLE_VAL | FH49_RCSR_RX_CONFIG_CHNL_EN_ENABLE_VAL |
FH49_RCSR_CHNL0_RX_CONFIG_IRQ_DEST_INT_HOST_VAL | FH49_RCSR_CHNL0_RX_CONFIG_IRQ_DEST_INT_HOST_VAL |
FH49_RCSR_CHNL0_RX_CONFIG_SINGLE_FRAME_MSK | rb_size | (rb_timeout FH49_RCSR_CHNL0_RX_CONFIG_SINGLE_FRAME_MSK |
<< rb_size |
FH49_RCSR_RX_CONFIG_REG_IRQ_RBTH_POS) (rb_timeout << FH49_RCSR_RX_CONFIG_REG_IRQ_RBTH_POS) |
| (rfdnlog << FH49_RCSR_RX_CONFIG_RBDCB_SIZE_POS)); (rfdnlog << FH49_RCSR_RX_CONFIG_RBDCB_SIZE_POS));
/* Set interrupt coalescing timer to default (2048 usecs) */ /* Set interrupt coalescing timer to default (2048 usecs) */
il_write8(il, CSR_INT_COALESCING, IL_HOST_INT_TIMEOUT_DEF); il_write8(il, CSR_INT_COALESCING, IL_HOST_INT_TIMEOUT_DEF);
...@@ -1235,9 +1235,8 @@ il4965_dump_fh(struct il_priv *il, char **buf, bool display) ...@@ -1235,9 +1235,8 @@ il4965_dump_fh(struct il_priv *il, char **buf, bool display)
pos += pos +=
scnprintf(*buf + pos, bufsz - pos, scnprintf(*buf + pos, bufsz - pos,
" %34s: 0X%08x\n", " %34s: 0X%08x\n",
il4965_get_fh_string(fh_tbl[i]), il_rd(il, il4965_get_fh_string(fh_tbl[i]),
fh_tbl il_rd(il, fh_tbl[i]));
[i]));
} }
return pos; return pos;
} }
...@@ -1328,15 +1327,15 @@ il4965_accumulative_stats(struct il_priv *il, __le32 * stats) ...@@ -1328,15 +1327,15 @@ il4965_accumulative_stats(struct il_priv *il, __le32 * stats)
struct stats_general_common *general, *accum_general; struct stats_general_common *general, *accum_general;
struct stats_tx *tx, *accum_tx; struct stats_tx *tx, *accum_tx;
prev_stats = (__le32 *) & il->_4965.stats; prev_stats = (__le32 *) &il->_4965.stats;
accum_stats = (u32 *) & il->_4965.accum_stats; accum_stats = (u32 *) &il->_4965.accum_stats;
size = sizeof(struct il_notif_stats); size = sizeof(struct il_notif_stats);
general = &il->_4965.stats.general.common; general = &il->_4965.stats.general.common;
accum_general = &il->_4965.accum_stats.general.common; accum_general = &il->_4965.accum_stats.general.common;
tx = &il->_4965.stats.tx; tx = &il->_4965.stats.tx;
accum_tx = &il->_4965.accum_stats.tx; accum_tx = &il->_4965.accum_stats.tx;
delta = (u32 *) & il->_4965.delta_stats; delta = (u32 *) &il->_4965.delta_stats;
max_delta = (u32 *) & il->_4965.max_delta; max_delta = (u32 *) &il->_4965.max_delta;
for (i = sizeof(__le32); i < size; for (i = sizeof(__le32); i < size;
i += i +=
...@@ -1375,7 +1374,7 @@ il4965_hdl_stats(struct il_priv *il, struct il_rx_buf *rxb) ...@@ -1375,7 +1374,7 @@ il4965_hdl_stats(struct il_priv *il, struct il_rx_buf *rxb)
((il->_4965.stats.flag & STATS_REPLY_FLG_HT40_MODE_MSK) != ((il->_4965.stats.flag & STATS_REPLY_FLG_HT40_MODE_MSK) !=
(pkt->u.stats.flag & STATS_REPLY_FLG_HT40_MODE_MSK))); (pkt->u.stats.flag & STATS_REPLY_FLG_HT40_MODE_MSK)));
#ifdef CONFIG_IWLEGACY_DEBUGFS #ifdef CONFIG_IWLEGACY_DEBUGFS
il4965_accumulative_stats(il, (__le32 *) & pkt->u.stats); il4965_accumulative_stats(il, (__le32 *) &pkt->u.stats);
#endif #endif
/* TODO: reading some of stats is unneeded */ /* TODO: reading some of stats is unneeded */
...@@ -2093,8 +2092,8 @@ il4965_txq_ctx_stop(struct il_priv *il) ...@@ -2093,8 +2092,8 @@ il4965_txq_ctx_stop(struct il_priv *il)
(il, FH49_TSSR_TX_STATUS_REG, (il, FH49_TSSR_TX_STATUS_REG,
FH49_TSSR_TX_STATUS_REG_MSK_CHNL_IDLE(ch), 1000)) FH49_TSSR_TX_STATUS_REG_MSK_CHNL_IDLE(ch), 1000))
IL_ERR("Failing on timeout while stopping" IL_ERR("Failing on timeout while stopping"
" DMA channel %d [0x%08x]", ch, il_rd(il, " DMA channel %d [0x%08x]", ch,
FH49_TSSR_TX_STATUS_REG)); il_rd(il, FH49_TSSR_TX_STATUS_REG));
} }
spin_unlock_irqrestore(&il->lock, flags); spin_unlock_irqrestore(&il->lock, flags);
...@@ -2135,8 +2134,8 @@ il4965_tx_queue_stop_scheduler(struct il_priv *il, u16 txq_id) ...@@ -2135,8 +2134,8 @@ il4965_tx_queue_stop_scheduler(struct il_priv *il, u16 txq_id)
/* Simply stop the queue, but don't change any configuration; /* Simply stop the queue, but don't change any configuration;
* the SCD_ACT_EN bit is the write-enable mask for the ACTIVE bit. */ * the SCD_ACT_EN bit is the write-enable mask for the ACTIVE bit. */
il_wr_prph(il, IL49_SCD_QUEUE_STATUS_BITS(txq_id), il_wr_prph(il, IL49_SCD_QUEUE_STATUS_BITS(txq_id),
(0 << IL49_SCD_QUEUE_STTS_REG_POS_ACTIVE) | (1 << (0 << IL49_SCD_QUEUE_STTS_REG_POS_ACTIVE) |
IL49_SCD_QUEUE_STTS_REG_POS_SCD_ACT_EN)); (1 << IL49_SCD_QUEUE_STTS_REG_POS_SCD_ACT_EN));
} }
/** /**
...@@ -2451,7 +2450,7 @@ il4965_txq_check_empty(struct il_priv *il, int sta_id, u8 tid, int txq_id) ...@@ -2451,7 +2450,7 @@ il4965_txq_check_empty(struct il_priv *il, int sta_id, u8 tid, int txq_id)
static void static void
il4965_non_agg_tx_status(struct il_priv *il, struct il_rxon_context *ctx, il4965_non_agg_tx_status(struct il_priv *il, struct il_rxon_context *ctx,
const u8 * addr1) const u8 *addr1)
{ {
struct ieee80211_sta *sta; struct ieee80211_sta *sta;
struct il_station_priv *sta_priv; struct il_station_priv *sta_priv;
...@@ -2661,7 +2660,7 @@ il4965_hdl_compressed_ba(struct il_priv *il, struct il_rx_buf *rxb) ...@@ -2661,7 +2660,7 @@ il4965_hdl_compressed_ba(struct il_priv *il, struct il_rx_buf *rxb)
spin_lock_irqsave(&il->sta_lock, flags); spin_lock_irqsave(&il->sta_lock, flags);
D_TX_REPLY("N_COMPRESSED_BA [%d] Received from %pM, " "sta_id = %d\n", D_TX_REPLY("N_COMPRESSED_BA [%d] Received from %pM, " "sta_id = %d\n",
agg->wait_for_ba, (u8 *) & ba_resp->sta_addr_lo32, agg->wait_for_ba, (u8 *) &ba_resp->sta_addr_lo32,
ba_resp->sta_id); ba_resp->sta_id);
D_TX_REPLY("TID = %d, SeqCtl = %d, bitmap = 0x%llx," "scd_flow = " D_TX_REPLY("TID = %d, SeqCtl = %d, bitmap = 0x%llx," "scd_flow = "
"%d, scd_ssn = %d\n", ba_resp->tid, ba_resp->seq_ctl, "%d, scd_ssn = %d\n", ba_resp->tid, ba_resp->seq_ctl,
...@@ -2791,7 +2790,7 @@ il4965_sta_alloc_lq(struct il_priv *il, u8 sta_id) ...@@ -2791,7 +2790,7 @@ il4965_sta_alloc_lq(struct il_priv *il, u8 sta_id)
*/ */
int int
il4965_add_bssid_station(struct il_priv *il, struct il_rxon_context *ctx, il4965_add_bssid_station(struct il_priv *il, struct il_rxon_context *ctx,
const u8 * addr, u8 * sta_id_r) const u8 *addr, u8 *sta_id_r)
{ {
int ret; int ret;
u8 sta_id; u8 sta_id;
...@@ -3277,8 +3276,7 @@ il4965_update_bcast_station(struct il_priv *il, struct il_rxon_context *ctx) ...@@ -3277,8 +3276,7 @@ il4965_update_bcast_station(struct il_priv *il, struct il_rxon_context *ctx)
link_cmd = il4965_sta_alloc_lq(il, sta_id); link_cmd = il4965_sta_alloc_lq(il, sta_id);
if (!link_cmd) { if (!link_cmd) {
IL_ERR IL_ERR("Unable to initialize rate scaling for bcast sta.\n");
("Unable to initialize rate scaling for bcast station.\n");
return -ENOMEM; return -ENOMEM;
} }
...@@ -3286,8 +3284,7 @@ il4965_update_bcast_station(struct il_priv *il, struct il_rxon_context *ctx) ...@@ -3286,8 +3284,7 @@ il4965_update_bcast_station(struct il_priv *il, struct il_rxon_context *ctx)
if (il->stations[sta_id].lq) if (il->stations[sta_id].lq)
kfree(il->stations[sta_id].lq); kfree(il->stations[sta_id].lq);
else else
D_INFO D_INFO("Bcast sta rate scaling has not been initialized.\n");
("Bcast station rate scaling has not been initialized yet.\n");
il->stations[sta_id].lq = link_cmd; il->stations[sta_id].lq = link_cmd;
spin_unlock_irqrestore(&il->sta_lock, flags); spin_unlock_irqrestore(&il->sta_lock, flags);
...@@ -4819,11 +4816,10 @@ il4965_dump_nic_error_log(struct il_priv *il) ...@@ -4819,11 +4816,10 @@ il4965_dump_nic_error_log(struct il_priv *il)
u32 blink1, blink2, ilink1, ilink2; u32 blink1, blink2, ilink1, ilink2;
u32 pc, hcmd; u32 pc, hcmd;
if (il->ucode_type == UCODE_INIT) { if (il->ucode_type == UCODE_INIT)
base = le32_to_cpu(il->card_alive_init.error_event_table_ptr); base = le32_to_cpu(il->card_alive_init.error_event_table_ptr);
} else { else
base = le32_to_cpu(il->card_alive.error_event_table_ptr); base = le32_to_cpu(il->card_alive.error_event_table_ptr);
}
if (!il->cfg->ops->lib->is_valid_rtc_data_addr(base)) { if (!il->cfg->ops->lib->is_valid_rtc_data_addr(base)) {
IL_ERR("Not valid error log pointer 0x%08X for %s uCode\n", IL_ERR("Not valid error log pointer 0x%08X for %s uCode\n",
...@@ -6026,13 +6022,11 @@ il4965_tx_queue_set_status(struct il_priv *il, struct il_tx_queue *txq, ...@@ -6026,13 +6022,11 @@ il4965_tx_queue_set_status(struct il_priv *il, struct il_tx_queue *txq,
/* Set up and activate */ /* Set up and activate */
il_wr_prph(il, IL49_SCD_QUEUE_STATUS_BITS(txq_id), il_wr_prph(il, IL49_SCD_QUEUE_STATUS_BITS(txq_id),
(active << IL49_SCD_QUEUE_STTS_REG_POS_ACTIVE) | (tx_fifo_id (active << IL49_SCD_QUEUE_STTS_REG_POS_ACTIVE) |
<< (tx_fifo_id << IL49_SCD_QUEUE_STTS_REG_POS_TXF) |
IL49_SCD_QUEUE_STTS_REG_POS_TXF) (scd_retry << IL49_SCD_QUEUE_STTS_REG_POS_WSL) |
| (scd_retry << IL49_SCD_QUEUE_STTS_REG_POS_WSL) | (scd_retry (scd_retry << IL49_SCD_QUEUE_STTS_REG_POS_SCD_ACK) |
<< IL49_SCD_QUEUE_STTS_REG_MSK);
IL49_SCD_QUEUE_STTS_REG_POS_SCD_ACK)
| IL49_SCD_QUEUE_STTS_REG_MSK);
txq->sched_retry = scd_retry; txq->sched_retry = scd_retry;
......
...@@ -96,18 +96,18 @@ static const u8 ant_toggle_lookup[] = { ...@@ -96,18 +96,18 @@ static const u8 ant_toggle_lookup[] = {
*/ */
const struct il_rate_info il_rates[RATE_COUNT] = { const struct il_rate_info il_rates[RATE_COUNT] = {
IL_DECLARE_RATE_INFO(1, INV, INV, 2, INV, 2, INV, 2), /* 1mbps */ IL_DECLARE_RATE_INFO(1, INV, INV, 2, INV, 2, INV, 2), /* 1mbps */
IL_DECLARE_RATE_INFO(2, INV, 1, 5, 1, 5, 1, 5), /* 2mbps */ IL_DECLARE_RATE_INFO(2, INV, 1, 5, 1, 5, 1, 5), /* 2mbps */
IL_DECLARE_RATE_INFO(5, INV, 2, 6, 2, 11, 2, 11), /*5.5mbps */ IL_DECLARE_RATE_INFO(5, INV, 2, 6, 2, 11, 2, 11), /*5.5mbps */
IL_DECLARE_RATE_INFO(11, INV, 9, 12, 9, 12, 5, 18), /* 11mbps */ IL_DECLARE_RATE_INFO(11, INV, 9, 12, 9, 12, 5, 18), /* 11mbps */
IL_DECLARE_RATE_INFO(6, 6, 5, 9, 5, 11, 5, 11), /* 6mbps */ IL_DECLARE_RATE_INFO(6, 6, 5, 9, 5, 11, 5, 11), /* 6mbps */
IL_DECLARE_RATE_INFO(9, 6, 6, 11, 6, 11, 5, 11), /* 9mbps */ IL_DECLARE_RATE_INFO(9, 6, 6, 11, 6, 11, 5, 11), /* 9mbps */
IL_DECLARE_RATE_INFO(12, 12, 11, 18, 11, 18, 11, 18), /* 12mbps */ IL_DECLARE_RATE_INFO(12, 12, 11, 18, 11, 18, 11, 18), /* 12mbps */
IL_DECLARE_RATE_INFO(18, 18, 12, 24, 12, 24, 11, 24), /* 18mbps */ IL_DECLARE_RATE_INFO(18, 18, 12, 24, 12, 24, 11, 24), /* 18mbps */
IL_DECLARE_RATE_INFO(24, 24, 18, 36, 18, 36, 18, 36), /* 24mbps */ IL_DECLARE_RATE_INFO(24, 24, 18, 36, 18, 36, 18, 36), /* 24mbps */
IL_DECLARE_RATE_INFO(36, 36, 24, 48, 24, 48, 24, 48), /* 36mbps */ IL_DECLARE_RATE_INFO(36, 36, 24, 48, 24, 48, 24, 48), /* 36mbps */
IL_DECLARE_RATE_INFO(48, 48, 36, 54, 36, 54, 36, 54), /* 48mbps */ IL_DECLARE_RATE_INFO(48, 48, 36, 54, 36, 54, 36, 54), /* 48mbps */
IL_DECLARE_RATE_INFO(54, 54, 48, INV, 48, INV, 48, INV), /* 54mbps */ IL_DECLARE_RATE_INFO(54, 54, 48, INV, 48, INV, 48, INV),/* 54mbps */
IL_DECLARE_RATE_INFO(60, 60, 48, INV, 48, INV, 48, INV), /* 60mbps */ IL_DECLARE_RATE_INFO(60, 60, 48, INV, 48, INV, 48, INV),/* 60mbps */
}; };
static int static int
...@@ -150,7 +150,7 @@ static void il4965_rs_stay_in_table(struct il_lq_sta *lq_sta, ...@@ -150,7 +150,7 @@ static void il4965_rs_stay_in_table(struct il_lq_sta *lq_sta,
#ifdef CONFIG_MAC80211_DEBUGFS #ifdef CONFIG_MAC80211_DEBUGFS
static void il4965_rs_dbgfs_set_mcs(struct il_lq_sta *lq_sta, static void il4965_rs_dbgfs_set_mcs(struct il_lq_sta *lq_sta,
u32 * rate_n_flags, int idx); u32 *rate_n_flags, int idx);
#else #else
static void static void
il4965_rs_dbgfs_set_mcs(struct il_lq_sta *lq_sta, u32 * rate_n_flags, int idx) il4965_rs_dbgfs_set_mcs(struct il_lq_sta *lq_sta, u32 * rate_n_flags, int idx)
...@@ -610,7 +610,7 @@ il4965_rs_get_tbl_info_from_mcs(const u32 rate_n_flags, ...@@ -610,7 +610,7 @@ il4965_rs_get_tbl_info_from_mcs(const u32 rate_n_flags,
/* switch to another antenna/antennas and return 1 */ /* switch to another antenna/antennas and return 1 */
/* if no other valid antenna found, return 0 */ /* if no other valid antenna found, return 0 */
static int static int
il4965_rs_toggle_antenna(u32 valid_ant, u32 * rate_n_flags, il4965_rs_toggle_antenna(u32 valid_ant, u32 *rate_n_flags,
struct il_scale_tbl_info *tbl) struct il_scale_tbl_info *tbl)
{ {
u8 new_ant_type; u8 new_ant_type;
...@@ -1082,7 +1082,8 @@ il4965_rs_set_expected_tpt_table(struct il_lq_sta *lq_sta, ...@@ -1082,7 +1082,8 @@ il4965_rs_set_expected_tpt_table(struct il_lq_sta *lq_sta,
* bit rate will typically need to increase, but not if performance was bad. * bit rate will typically need to increase, but not if performance was bad.
*/ */
static s32 static s32
il4965_rs_get_best_rate(struct il_priv *il, struct il_lq_sta *lq_sta, struct il_scale_tbl_info *tbl, /* "search" */ il4965_rs_get_best_rate(struct il_priv *il, struct il_lq_sta *lq_sta,
struct il_scale_tbl_info *tbl, /* "search" */
u16 rate_mask, s8 idx) u16 rate_mask, s8 idx)
{ {
/* "active" values */ /* "active" values */
...@@ -2012,11 +2013,10 @@ il4965_rs_rate_scale_perform(struct il_priv *il, struct sk_buff *skb, ...@@ -2012,11 +2013,10 @@ il4965_rs_rate_scale_perform(struct il_priv *il, struct sk_buff *skb,
/* Higher adjacent rate's throughput is measured */ /* Higher adjacent rate's throughput is measured */
if (high_tpt != IL_INVALID_VALUE) { if (high_tpt != IL_INVALID_VALUE) {
/* Higher rate has better throughput */ /* Higher rate has better throughput */
if (high_tpt > current_tpt && sr >= RATE_INCREASE_TH) { if (high_tpt > current_tpt && sr >= RATE_INCREASE_TH)
scale_action = 1; scale_action = 1;
} else { else
scale_action = 0; scale_action = 0;
}
/* Lower adjacent rate's throughput is measured */ /* Lower adjacent rate's throughput is measured */
} else if (low_tpt != IL_INVALID_VALUE) { } else if (low_tpt != IL_INVALID_VALUE) {
...@@ -2583,8 +2583,8 @@ il4965_rs_dbgfs_set_mcs(struct il_lq_sta *lq_sta, u32 * rate_n_flags, int idx) ...@@ -2583,8 +2583,8 @@ il4965_rs_dbgfs_set_mcs(struct il_lq_sta *lq_sta, u32 * rate_n_flags, int idx)
static ssize_t static ssize_t
il4965_rs_sta_dbgfs_scale_table_write(struct file *file, il4965_rs_sta_dbgfs_scale_table_write(struct file *file,
const char __user * user_buf, const char __user *user_buf,
size_t count, loff_t * ppos) size_t count, loff_t *ppos)
{ {
struct il_lq_sta *lq_sta = file->private_data; struct il_lq_sta *lq_sta = file->private_data;
struct il_priv *il; struct il_priv *il;
...@@ -2622,8 +2622,8 @@ il4965_rs_sta_dbgfs_scale_table_write(struct file *file, ...@@ -2622,8 +2622,8 @@ il4965_rs_sta_dbgfs_scale_table_write(struct file *file,
} }
static ssize_t static ssize_t
il4965_rs_sta_dbgfs_scale_table_read(struct file *file, char __user * user_buf, il4965_rs_sta_dbgfs_scale_table_read(struct file *file, char __user *user_buf,
size_t count, loff_t * ppos) size_t count, loff_t *ppos)
{ {
char *buff; char *buff;
int desc = 0; int desc = 0;
...@@ -2730,8 +2730,8 @@ static const struct file_operations rs_sta_dbgfs_scale_table_ops = { ...@@ -2730,8 +2730,8 @@ static const struct file_operations rs_sta_dbgfs_scale_table_ops = {
}; };
static ssize_t static ssize_t
il4965_rs_sta_dbgfs_stats_table_read(struct file *file, char __user * user_buf, il4965_rs_sta_dbgfs_stats_table_read(struct file *file, char __user *user_buf,
size_t count, loff_t * ppos) size_t count, loff_t *ppos)
{ {
char *buff; char *buff;
int desc = 0; int desc = 0;
...@@ -2776,8 +2776,8 @@ static const struct file_operations rs_sta_dbgfs_stats_table_ops = { ...@@ -2776,8 +2776,8 @@ static const struct file_operations rs_sta_dbgfs_stats_table_ops = {
static ssize_t static ssize_t
il4965_rs_sta_dbgfs_rate_scale_data_read(struct file *file, il4965_rs_sta_dbgfs_rate_scale_data_read(struct file *file,
char __user * user_buf, size_t count, char __user *user_buf, size_t count,
loff_t * ppos) loff_t *ppos)
{ {
char buff[120]; char buff[120];
int desc = 0; int desc = 0;
......
...@@ -533,8 +533,8 @@ il4965_nic_config(struct il_priv *il) ...@@ -533,8 +533,8 @@ il4965_nic_config(struct il_priv *il)
CSR_HW_IF_CONFIG_REG_BIT_MAC_SI); CSR_HW_IF_CONFIG_REG_BIT_MAC_SI);
il->calib_info = il->calib_info =
(struct il_eeprom_calib_info *)il_eeprom_query_addr(il, (struct il_eeprom_calib_info *)
EEPROM_4965_CALIB_TXPOWER_OFFSET); il_eeprom_query_addr(il, EEPROM_4965_CALIB_TXPOWER_OFFSET);
spin_unlock_irqrestore(&il->lock, flags); spin_unlock_irqrestore(&il->lock, flags);
} }
......
...@@ -138,7 +138,7 @@ il4965_get_tx_fail_reason(u32 status) ...@@ -138,7 +138,7 @@ il4965_get_tx_fail_reason(u32 status)
/* station management */ /* station management */
int il4965_alloc_bcast_station(struct il_priv *il, struct il_rxon_context *ctx); int il4965_alloc_bcast_station(struct il_priv *il, struct il_rxon_context *ctx);
int il4965_add_bssid_station(struct il_priv *il, struct il_rxon_context *ctx, int il4965_add_bssid_station(struct il_priv *il, struct il_rxon_context *ctx,
const u8 * addr, u8 * sta_id_r); const u8 *addr, u8 *sta_id_r);
int il4965_remove_default_wep_key(struct il_priv *il, int il4965_remove_default_wep_key(struct il_priv *il,
struct il_rxon_context *ctx, struct il_rxon_context *ctx,
struct ieee80211_key_conf *key); struct ieee80211_key_conf *key);
...@@ -153,7 +153,7 @@ int il4965_remove_dynamic_key(struct il_priv *il, struct il_rxon_context *ctx, ...@@ -153,7 +153,7 @@ int il4965_remove_dynamic_key(struct il_priv *il, struct il_rxon_context *ctx,
void il4965_update_tkip_key(struct il_priv *il, struct il_rxon_context *ctx, void il4965_update_tkip_key(struct il_priv *il, struct il_rxon_context *ctx,
struct ieee80211_key_conf *keyconf, struct ieee80211_key_conf *keyconf,
struct ieee80211_sta *sta, u32 iv32, struct ieee80211_sta *sta, u32 iv32,
u16 * phase1key); u16 *phase1key);
int il4965_sta_tx_modify_enable_tid(struct il_priv *il, int sta_id, int tid); int il4965_sta_tx_modify_enable_tid(struct il_priv *il, int sta_id, int tid);
int il4965_sta_rx_agg_start(struct il_priv *il, struct ieee80211_sta *sta, int il4965_sta_rx_agg_start(struct il_priv *il, struct ieee80211_sta *sta,
int tid, u16 ssn); int tid, u16 ssn);
...@@ -195,7 +195,7 @@ void il4965_mac_update_tkip_key(struct ieee80211_hw *hw, ...@@ -195,7 +195,7 @@ void il4965_mac_update_tkip_key(struct ieee80211_hw *hw,
struct ieee80211_vif *vif, struct ieee80211_vif *vif,
struct ieee80211_key_conf *keyconf, struct ieee80211_key_conf *keyconf,
struct ieee80211_sta *sta, u32 iv32, struct ieee80211_sta *sta, u32 iv32,
u16 * phase1key); u16 *phase1key);
int il4965_mac_ampdu_action(struct ieee80211_hw *hw, struct ieee80211_vif *vif, int il4965_mac_ampdu_action(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
enum ieee80211_ampdu_mlme_action action, enum ieee80211_ampdu_mlme_action action,
struct ieee80211_sta *sta, u16 tid, u16 * ssn, struct ieee80211_sta *sta, u16 tid, u16 * ssn,
...@@ -949,31 +949,31 @@ void il4965_calib_free_results(struct il_priv *il); ...@@ -949,31 +949,31 @@ void il4965_calib_free_results(struct il_priv *il);
/* Debug */ /* Debug */
#ifdef CONFIG_IWLEGACY_DEBUGFS #ifdef CONFIG_IWLEGACY_DEBUGFS
ssize_t il4965_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 il4965_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 il4965_ucode_general_stats_read(struct file *file, ssize_t il4965_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 static ssize_t
il4965_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
il4965_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
il4965_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;
} }
......
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