提交 1722f8e1 编写于 作者: S Stanislaw Gruszka

iwlegacy: checkpatch.pl fixes

Fix most checkpatch.pl ERRORs and some WARNINGs.
Signed-off-by: NStanislaw Gruszka <sgruszka@redhat.com>
上级 e7392364
......@@ -49,8 +49,8 @@ il3945_stats_flag(struct il_priv *il, char *buf, int bufsz)
}
ssize_t
il3945_ucode_rx_stats_read(struct file * file, char __user * user_buf,
size_t count, loff_t * ppos)
il3945_ucode_rx_stats_read(struct file *file, char __user *user_buf,
size_t count, loff_t *ppos)
{
struct il_priv *il = file->private_data;
int pos = 0;
......@@ -314,8 +314,8 @@ il3945_ucode_rx_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)
il3945_ucode_tx_stats_read(struct file *file, char __user *user_buf,
size_t count, loff_t *ppos)
{
struct il_priv *il = file->private_data;
int pos = 0;
......@@ -404,8 +404,8 @@ il3945_ucode_tx_stats_read(struct file * file, char __user * user_buf,
}
ssize_t
il3945_ucode_general_stats_read(struct file * file, char __user * user_buf,
size_t count, loff_t * ppos)
il3945_ucode_general_stats_read(struct file *file, char __user *user_buf,
size_t count, loff_t *ppos)
{
struct il_priv *il = file->private_data;
int pos = 0;
......
......@@ -1033,11 +1033,9 @@ il3945_rx_allocate(struct il_priv *il, gfp_t priority)
D_INFO("Failed to allocate SKB buffer.\n");
if (rxq->free_count <= RX_LOW_WATERMARK &&
net_ratelimit())
IL_ERR
("Failed to allocate SKB buffer with %s. Only %u free buffers remaining.\n",
priority ==
GFP_ATOMIC ? "GFP_ATOMIC" : "GFP_KERNEL",
rxq->free_count);
IL_ERR("Failed to allocate SKB buffer with %0x."
"Only %u free buffers remaining.\n",
priority, rxq->free_count);
/* We don't reschedule replenish work here -- we will
* call the restock method and if it still needs
* more buffers it will schedule replenish */
......@@ -3250,7 +3248,7 @@ il3945_show_measurement(struct device *d, struct device_attribute *attr,
struct il_priv *il = dev_get_drvdata(d);
struct il_spectrum_notification measure_report;
u32 size = sizeof(measure_report), len = 0, ofs = 0;
u8 *data = (u8 *) & measure_report;
u8 *data = (u8 *) &measure_report;
unsigned long flags;
spin_lock_irqsave(&il->lock, flags);
......
......@@ -837,8 +837,8 @@ il3945_open_file_generic(struct inode *inode, struct file *file)
}
static ssize_t
il3945_sta_dbgfs_stats_table_read(struct file *file, char __user * user_buf,
size_t count, loff_t * ppos)
il3945_sta_dbgfs_stats_table_read(struct file *file, char __user *user_buf,
size_t count, loff_t *ppos)
{
char *buff;
int desc = 0;
......
......@@ -381,10 +381,10 @@ il3945_accumulative_stats(struct il_priv *il, __le32 * stats)
u32 *accum_stats;
u32 *delta, *max_delta;
prev_stats = (__le32 *) & il->_3945.stats;
accum_stats = (u32 *) & il->_3945.accum_stats;
delta = (u32 *) & il->_3945.delta_stats;
max_delta = (u32 *) & il->_3945.max_delta;
prev_stats = (__le32 *) &il->_3945.stats;
accum_stats = (u32 *) &il->_3945.accum_stats;
delta = (u32 *) &il->_3945.delta_stats;
max_delta = (u32 *) &il->_3945.max_delta;
for (i = sizeof(__le32); i < sizeof(struct il3945_notif_stats);
i +=
......@@ -416,7 +416,7 @@ il3945_hdl_stats(struct il_priv *il, struct il_rx_buf *rxb)
(int)sizeof(struct il3945_notif_stats),
le32_to_cpu(pkt->len_n_flags) & IL_RX_FRAME_SIZE_MSK);
#ifdef CONFIG_IWLEGACY_DEBUGFS
il3945_accumulative_stats(il, (__le32 *) & pkt->u.raw);
il3945_accumulative_stats(il, (__le32 *) &pkt->u.raw);
#endif
memcpy(&il->_3945.stats, pkt->u.raw, sizeof(il->_3945.stats));
......@@ -426,7 +426,7 @@ void
il3945_hdl_c_stats(struct il_priv *il, struct il_rx_buf *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) {
#ifdef CONFIG_IWLEGACY_DEBUGFS
......@@ -775,7 +775,8 @@ il3945_set_pwr_vmain(struct il_priv *il)
APMG_PS_CTRL_VAL_PWR_SRC_VMAIN,
~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
......@@ -1228,7 +1229,8 @@ static struct il3945_tx_power power_gain_table[2][IL_MAX_GAIN_ENTRIES] = {
{3, 113},
{3, 106},
{3, 102},
{3, 95}}, /* 2.4 GHz, lowest power */
{3, 95} /* 2.4 GHz, lowest power */
},
{
{251, 127}, /* 5.x GHz, highest power */
{251, 120},
......@@ -1307,7 +1309,8 @@ static struct il3945_tx_power power_gain_table[2][IL_MAX_GAIN_ENTRIES] = {
{35, 113},
{35, 107},
{35, 99},
{3, 120}} /* 5.x GHz, lowest power */
{3, 120} /* 5.x GHz, lowest power */
}
};
static inline u8
......@@ -1331,7 +1334,7 @@ il3945_hw_reg_fix_power_idx(int idx)
*/
static void
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 il3945_scan_power_info *scan_power_info;
......@@ -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)
* for the channel.
* il3945_hw_reg_get_ch_grp_idx - find the channel-group idx (0-4) for channel.
*
* This function is used when initializing channel-info structs.
*
......@@ -1930,7 +1932,7 @@ il3945_hw_reg_get_ch_grp_idx(struct il_priv *il,
*/
static int
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;
struct il3945_eeprom *eeprom = (struct il3945_eeprom *)il->eeprom;
......@@ -2735,14 +2737,13 @@ static struct il_cfg il3945_abg_cfg = {
};
DEFINE_PCI_DEVICE_TABLE(il3945_hw_card_ids) = {
{
IL_PCI_DEVICE(0x4222, 0x1005, il3945_bg_cfg)}, {
IL_PCI_DEVICE(0x4222, 0x1034, il3945_bg_cfg)}, {
IL_PCI_DEVICE(0x4222, 0x1044, il3945_bg_cfg)}, {
IL_PCI_DEVICE(0x4227, 0x1014, il3945_bg_cfg)}, {
IL_PCI_DEVICE(0x4222, PCI_ANY_ID, il3945_abg_cfg)}, {
IL_PCI_DEVICE(0x4227, PCI_ANY_ID, il3945_abg_cfg)}, {
0}
{IL_PCI_DEVICE(0x4222, 0x1005, il3945_bg_cfg)},
{IL_PCI_DEVICE(0x4222, 0x1034, il3945_bg_cfg)},
{IL_PCI_DEVICE(0x4222, 0x1044, il3945_bg_cfg)},
{IL_PCI_DEVICE(0x4227, 0x1014, il3945_bg_cfg)},
{IL_PCI_DEVICE(0x4222, PCI_ANY_ID, il3945_abg_cfg)},
{IL_PCI_DEVICE(0x4227, PCI_ANY_ID, il3945_abg_cfg)},
{0}
};
MODULE_DEVICE_TABLE(pci, il3945_hw_card_ids);
......@@ -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 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);
/* scanning */
......@@ -619,31 +614,31 @@ struct il3945_tfd {
} __packed;
#ifdef CONFIG_IWLEGACY_DEBUGFS
ssize_t il3945_ucode_rx_stats_read(struct file *file, char __user * user_buf,
size_t count, loff_t * ppos);
ssize_t il3945_ucode_tx_stats_read(struct file *file, char __user * user_buf,
size_t count, loff_t * ppos);
ssize_t il3945_ucode_rx_stats_read(struct file *file, char __user *user_buf,
size_t count, loff_t *ppos);
ssize_t il3945_ucode_tx_stats_read(struct file *file, char __user *user_buf,
size_t count, loff_t *ppos);
ssize_t il3945_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
static ssize_t
il3945_ucode_rx_stats_read(struct file *file, char __user * user_buf,
size_t count, loff_t * ppos)
il3945_ucode_rx_stats_read(struct file *file, char __user *user_buf,
size_t count, loff_t *ppos)
{
return 0;
}
static ssize_t
il3945_ucode_tx_stats_read(struct file *file, char __user * user_buf,
size_t count, loff_t * ppos)
il3945_ucode_tx_stats_read(struct file *file, char __user *user_buf,
size_t count, loff_t *ppos)
{
return 0;
}
static ssize_t
il3945_ucode_general_stats_read(struct file *file, char __user * user_buf,
size_t count, loff_t * ppos)
il3945_ucode_general_stats_read(struct file *file, char __user *user_buf,
size_t count, loff_t *ppos)
{
return 0;
}
......
......@@ -366,7 +366,7 @@ il4965_sens_auto_corr_ofdm(struct il_priv *il, u32 norm_fa, u32 rx_enable_time)
static void
il4965_prepare_legacy_sensitivity_tbl(struct il_priv *il,
struct il_sensitivity_data *data,
__le16 * tbl)
__le16 *tbl)
{
tbl[HD_AUTO_CORR32_X4_TH_ADD_MIN_IDX] =
cpu_to_le16((u16) data->auto_corr_ofdm);
......@@ -707,9 +707,8 @@ il4965_find_disconn_antenna(struct il_priv *il, u32 * average_sig,
il4965_find_first_chain(il->cfg->valid_tx_ant);
data->disconn_array[first_chain] = 0;
active_chains |= BIT(first_chain);
D_CALIB
("All Tx chains are disconnected W/A - declare %d as connected\n",
first_chain);
D_CALIB("All Tx chains are disconnected"
"- declare %d as connected\n", first_chain);
break;
}
}
......
......@@ -56,8 +56,8 @@ il4965_stats_flag(struct il_priv *il, char *buf, int bufsz)
}
ssize_t
il4965_ucode_rx_stats_read(struct file * file, char __user * user_buf,
size_t count, loff_t * ppos)
il4965_ucode_rx_stats_read(struct file *file, char __user *user_buf,
size_t count, loff_t *ppos)
{
struct il_priv *il = file->private_data;
int pos = 0;
......@@ -468,8 +468,8 @@ il4965_ucode_rx_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)
il4965_ucode_tx_stats_read(struct file *file, char __user *user_buf,
size_t count, loff_t *ppos)
{
struct il_priv *il = file->private_data;
int pos = 0;
......@@ -634,8 +634,8 @@ il4965_ucode_tx_stats_read(struct file * file, char __user * user_buf,
}
ssize_t
il4965_ucode_general_stats_read(struct file * file, char __user * user_buf,
size_t count, loff_t * ppos)
il4965_ucode_general_stats_read(struct file *file, char __user *user_buf,
size_t count, loff_t *ppos)
{
struct il_priv *il = file->private_data;
int pos = 0;
......
......@@ -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,
FH49_RCSR_RX_CONFIG_CHNL_EN_ENABLE_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_RX_CONFIG_REG_IRQ_RBTH_POS)
| (rfdnlog << FH49_RCSR_RX_CONFIG_RBDCB_SIZE_POS));
FH49_RCSR_CHNL0_RX_CONFIG_SINGLE_FRAME_MSK |
rb_size |
(rb_timeout << FH49_RCSR_RX_CONFIG_REG_IRQ_RBTH_POS) |
(rfdnlog << FH49_RCSR_RX_CONFIG_RBDCB_SIZE_POS));
/* Set interrupt coalescing timer to default (2048 usecs) */
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)
pos +=
scnprintf(*buf + pos, bufsz - pos,
" %34s: 0X%08x\n",
il4965_get_fh_string(fh_tbl[i]), il_rd(il,
fh_tbl
[i]));
il4965_get_fh_string(fh_tbl[i]),
il_rd(il, fh_tbl[i]));
}
return pos;
}
......@@ -1328,15 +1327,15 @@ il4965_accumulative_stats(struct il_priv *il, __le32 * stats)
struct stats_general_common *general, *accum_general;
struct stats_tx *tx, *accum_tx;
prev_stats = (__le32 *) & il->_4965.stats;
accum_stats = (u32 *) & il->_4965.accum_stats;
prev_stats = (__le32 *) &il->_4965.stats;
accum_stats = (u32 *) &il->_4965.accum_stats;
size = sizeof(struct il_notif_stats);
general = &il->_4965.stats.general.common;
accum_general = &il->_4965.accum_stats.general.common;
tx = &il->_4965.stats.tx;
accum_tx = &il->_4965.accum_stats.tx;
delta = (u32 *) & il->_4965.delta_stats;
max_delta = (u32 *) & il->_4965.max_delta;
delta = (u32 *) &il->_4965.delta_stats;
max_delta = (u32 *) &il->_4965.max_delta;
for (i = sizeof(__le32); i < size;
i +=
......@@ -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) !=
(pkt->u.stats.flag & STATS_REPLY_FLG_HT40_MODE_MSK)));
#ifdef CONFIG_IWLEGACY_DEBUGFS
il4965_accumulative_stats(il, (__le32 *) & pkt->u.stats);
il4965_accumulative_stats(il, (__le32 *) &pkt->u.stats);
#endif
/* TODO: reading some of stats is unneeded */
......@@ -2093,8 +2092,8 @@ il4965_txq_ctx_stop(struct il_priv *il)
(il, FH49_TSSR_TX_STATUS_REG,
FH49_TSSR_TX_STATUS_REG_MSK_CHNL_IDLE(ch), 1000))
IL_ERR("Failing on timeout while stopping"
" DMA channel %d [0x%08x]", ch, il_rd(il,
FH49_TSSR_TX_STATUS_REG));
" DMA channel %d [0x%08x]", ch,
il_rd(il, FH49_TSSR_TX_STATUS_REG));
}
spin_unlock_irqrestore(&il->lock, flags);
......@@ -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;
* 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),
(0 << IL49_SCD_QUEUE_STTS_REG_POS_ACTIVE) | (1 <<
IL49_SCD_QUEUE_STTS_REG_POS_SCD_ACT_EN));
(0 << IL49_SCD_QUEUE_STTS_REG_POS_ACTIVE) |
(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)
static void
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 il_station_priv *sta_priv;
......@@ -2661,7 +2660,7 @@ il4965_hdl_compressed_ba(struct il_priv *il, struct il_rx_buf *rxb)
spin_lock_irqsave(&il->sta_lock, flags);
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);
D_TX_REPLY("TID = %d, SeqCtl = %d, bitmap = 0x%llx," "scd_flow = "
"%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)
*/
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 ret;
u8 sta_id;
......@@ -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);
if (!link_cmd) {
IL_ERR
("Unable to initialize rate scaling for bcast station.\n");
IL_ERR("Unable to initialize rate scaling for bcast sta.\n");
return -ENOMEM;
}
......@@ -3286,8 +3284,7 @@ il4965_update_bcast_station(struct il_priv *il, struct il_rxon_context *ctx)
if (il->stations[sta_id].lq)
kfree(il->stations[sta_id].lq);
else
D_INFO
("Bcast station rate scaling has not been initialized yet.\n");
D_INFO("Bcast sta rate scaling has not been initialized.\n");
il->stations[sta_id].lq = link_cmd;
spin_unlock_irqrestore(&il->sta_lock, flags);
......@@ -4819,11 +4816,10 @@ il4965_dump_nic_error_log(struct il_priv *il)
u32 blink1, blink2, ilink1, ilink2;
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);
} else {
else
base = le32_to_cpu(il->card_alive.error_event_table_ptr);
}
if (!il->cfg->ops->lib->is_valid_rtc_data_addr(base)) {
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,
/* Set up and activate */
il_wr_prph(il, IL49_SCD_QUEUE_STATUS_BITS(txq_id),
(active << IL49_SCD_QUEUE_STTS_REG_POS_ACTIVE) | (tx_fifo_id
<<
IL49_SCD_QUEUE_STTS_REG_POS_TXF)
| (scd_retry << IL49_SCD_QUEUE_STTS_REG_POS_WSL) | (scd_retry
<<
IL49_SCD_QUEUE_STTS_REG_POS_SCD_ACK)
| IL49_SCD_QUEUE_STTS_REG_MSK);
(active << IL49_SCD_QUEUE_STTS_REG_POS_ACTIVE) |
(tx_fifo_id << IL49_SCD_QUEUE_STTS_REG_POS_TXF) |
(scd_retry << IL49_SCD_QUEUE_STTS_REG_POS_WSL) |
(scd_retry << IL49_SCD_QUEUE_STTS_REG_POS_SCD_ACK) |
IL49_SCD_QUEUE_STTS_REG_MSK);
txq->sched_retry = scd_retry;
......
......@@ -96,18 +96,18 @@ static const u8 ant_toggle_lookup[] = {
*/
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(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(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(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(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(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(60, 60, 48, INV, 48, INV, 48, INV), /* 60mbps */
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 */
};
static int
......@@ -150,7 +150,7 @@ static void il4965_rs_stay_in_table(struct il_lq_sta *lq_sta,
#ifdef CONFIG_MAC80211_DEBUGFS
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
static void
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,
/* switch to another antenna/antennas and return 1 */
/* if no other valid antenna found, return 0 */
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)
{
u8 new_ant_type;
......@@ -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.
*/
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)
{
/* "active" values */
......@@ -2012,11 +2013,10 @@ il4965_rs_rate_scale_perform(struct il_priv *il, struct sk_buff *skb,
/* Higher adjacent rate's throughput is measured */
if (high_tpt != IL_INVALID_VALUE) {
/* 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;
} else {
else
scale_action = 0;
}
/* Lower adjacent rate's throughput is measured */
} 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)
static ssize_t
il4965_rs_sta_dbgfs_scale_table_write(struct file *file,
const char __user * user_buf,
size_t count, loff_t * ppos)
const char __user *user_buf,
size_t count, loff_t *ppos)
{
struct il_lq_sta *lq_sta = file->private_data;
struct il_priv *il;
......@@ -2622,8 +2622,8 @@ il4965_rs_sta_dbgfs_scale_table_write(struct file *file,
}
static ssize_t
il4965_rs_sta_dbgfs_scale_table_read(struct file *file, char __user * user_buf,
size_t count, loff_t * ppos)
il4965_rs_sta_dbgfs_scale_table_read(struct file *file, char __user *user_buf,
size_t count, loff_t *ppos)
{
char *buff;
int desc = 0;
......@@ -2730,8 +2730,8 @@ static const struct file_operations rs_sta_dbgfs_scale_table_ops = {
};
static ssize_t
il4965_rs_sta_dbgfs_stats_table_read(struct file *file, char __user * user_buf,
size_t count, loff_t * ppos)
il4965_rs_sta_dbgfs_stats_table_read(struct file *file, char __user *user_buf,
size_t count, loff_t *ppos)
{
char *buff;
int desc = 0;
......@@ -2776,8 +2776,8 @@ static const struct file_operations rs_sta_dbgfs_stats_table_ops = {
static ssize_t
il4965_rs_sta_dbgfs_rate_scale_data_read(struct file *file,
char __user * user_buf, size_t count,
loff_t * ppos)
char __user *user_buf, size_t count,
loff_t *ppos)
{
char buff[120];
int desc = 0;
......
......@@ -533,8 +533,8 @@ il4965_nic_config(struct il_priv *il)
CSR_HW_IF_CONFIG_REG_BIT_MAC_SI);
il->calib_info =
(struct il_eeprom_calib_info *)il_eeprom_query_addr(il,
EEPROM_4965_CALIB_TXPOWER_OFFSET);
(struct il_eeprom_calib_info *)
il_eeprom_query_addr(il, EEPROM_4965_CALIB_TXPOWER_OFFSET);
spin_unlock_irqrestore(&il->lock, flags);
}
......
......@@ -138,7 +138,7 @@ il4965_get_tx_fail_reason(u32 status)
/* station management */
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,
const u8 * addr, u8 * sta_id_r);
const u8 *addr, u8 *sta_id_r);
int il4965_remove_default_wep_key(struct il_priv *il,
struct il_rxon_context *ctx,
struct ieee80211_key_conf *key);
......@@ -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,
struct ieee80211_key_conf *keyconf,
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_rx_agg_start(struct il_priv *il, struct ieee80211_sta *sta,
int tid, u16 ssn);
......@@ -195,7 +195,7 @@ void il4965_mac_update_tkip_key(struct ieee80211_hw *hw,
struct ieee80211_vif *vif,
struct ieee80211_key_conf *keyconf,
struct ieee80211_sta *sta, u32 iv32,
u16 * phase1key);
u16 *phase1key);
int il4965_mac_ampdu_action(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
enum ieee80211_ampdu_mlme_action action,
struct ieee80211_sta *sta, u16 tid, u16 * ssn,
......@@ -949,31 +949,31 @@ void il4965_calib_free_results(struct il_priv *il);
/* Debug */
#ifdef CONFIG_IWLEGACY_DEBUGFS
ssize_t il4965_ucode_rx_stats_read(struct file *file, char __user * user_buf,
size_t count, loff_t * ppos);
ssize_t il4965_ucode_tx_stats_read(struct file *file, char __user * user_buf,
size_t count, loff_t * ppos);
ssize_t il4965_ucode_rx_stats_read(struct file *file, char __user *user_buf,
size_t count, loff_t *ppos);
ssize_t il4965_ucode_tx_stats_read(struct file *file, char __user *user_buf,
size_t count, loff_t *ppos);
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
static ssize_t
il4965_ucode_rx_stats_read(struct file *file, char __user * user_buf,
size_t count, loff_t * ppos)
il4965_ucode_rx_stats_read(struct file *file, char __user *user_buf,
size_t count, loff_t *ppos)
{
return 0;
}
static ssize_t
il4965_ucode_tx_stats_read(struct file *file, char __user * user_buf,
size_t count, loff_t * ppos)
il4965_ucode_tx_stats_read(struct file *file, char __user *user_buf,
size_t count, loff_t *ppos)
{
return 0;
}
static ssize_t
il4965_ucode_general_stats_read(struct file *file, char __user * user_buf,
size_t count, loff_t * ppos)
il4965_ucode_general_stats_read(struct file *file, char __user *user_buf,
size_t count, loff_t *ppos)
{
return 0;
}
......
......@@ -112,8 +112,8 @@ struct il_cmd_meta {
* invoked for SYNC commands, if it were and its result passed
* through it would be simpler...)
*/
void (*callback) (struct il_priv * il, struct il_device_cmd * cmd,
struct il_rx_pkt * pkt);
void (*callback) (struct il_priv *il, struct il_device_cmd *cmd,
struct il_rx_pkt *pkt);
/* The CMD_SIZE_HUGE flag bit indicates that the command
* structure is stored at the end of the shared queue memory. */
......@@ -432,8 +432,8 @@ struct il_eeprom_calib_info {
struct il_eeprom_ops {
const u32 regulatory_bands[7];
int (*acquire_semaphore) (struct il_priv * il);
void (*release_semaphore) (struct il_priv * il);
int (*acquire_semaphore) (struct il_priv *il);
void (*release_semaphore) (struct il_priv *il);
};
int il_eeprom_init(struct il_priv *il);
......@@ -592,8 +592,8 @@ struct il_device_cmd {
struct il_host_cmd {
const void *data;
unsigned long reply_page;
void (*callback) (struct il_priv * il, struct il_device_cmd * cmd,
struct il_rx_pkt * pkt);
void (*callback) (struct il_priv *il, struct il_device_cmd *cmd,
struct il_rx_pkt *pkt);
u32 flags;
u16 len;
u8 id;
......@@ -1224,8 +1224,8 @@ struct il_priv {
enum ieee80211_band band;
int alloc_rxb_page;
void (*handlers[IL_CN_MAX]) (struct il_priv * il,
struct il_rx_buf * rxb);
void (*handlers[IL_CN_MAX]) (struct il_priv *il,
struct il_rx_buf *rxb);
struct ieee80211_supported_band bands[IEEE80211_NUM_BANDS];
......@@ -1613,69 +1613,69 @@ il_free_pages(struct il_priv *il, unsigned long page)
#define IL_RX_BUF_SIZE_8K (8 * 1024)
struct il_hcmd_ops {
int (*rxon_assoc) (struct il_priv * il, struct il_rxon_context * ctx);
int (*commit_rxon) (struct il_priv * il, struct il_rxon_context * ctx);
void (*set_rxon_chain) (struct il_priv * il,
struct il_rxon_context * ctx);
int (*rxon_assoc) (struct il_priv *il, struct il_rxon_context *ctx);
int (*commit_rxon) (struct il_priv *il, struct il_rxon_context *ctx);
void (*set_rxon_chain) (struct il_priv *il,
struct il_rxon_context *ctx);
};
struct il_hcmd_utils_ops {
u16(*get_hcmd_size) (u8 cmd_id, u16 len);
u16(*build_addsta_hcmd) (const struct il_addsta_cmd * cmd, u8 * data);
int (*request_scan) (struct il_priv * il, struct ieee80211_vif * vif);
void (*post_scan) (struct il_priv * il);
u16(*build_addsta_hcmd) (const struct il_addsta_cmd *cmd, u8 *data);
int (*request_scan) (struct il_priv *il, struct ieee80211_vif *vif);
void (*post_scan) (struct il_priv *il);
};
struct il_apm_ops {
int (*init) (struct il_priv * il);
void (*config) (struct il_priv * il);
int (*init) (struct il_priv *il);
void (*config) (struct il_priv *il);
};
struct il_debugfs_ops {
ssize_t(*rx_stats_read) (struct file * file, char __user * user_buf,
size_t count, loff_t * ppos);
ssize_t(*tx_stats_read) (struct file * file, char __user * user_buf,
size_t count, loff_t * ppos);
ssize_t(*general_stats_read) (struct file * file,
char __user * user_buf, size_t count,
loff_t * ppos);
ssize_t(*rx_stats_read) (struct file *file, char __user *user_buf,
size_t count, loff_t *ppos);
ssize_t(*tx_stats_read) (struct file *file, char __user *user_buf,
size_t count, loff_t *ppos);
ssize_t(*general_stats_read) (struct file *file,
char __user *user_buf, size_t count,
loff_t *ppos);
};
struct il_temp_ops {
void (*temperature) (struct il_priv * il);
void (*temperature) (struct il_priv *il);
};
struct il_lib_ops {
/* set hw dependent parameters */
int (*set_hw_params) (struct il_priv * il);
int (*set_hw_params) (struct il_priv *il);
/* Handling TX */
void (*txq_update_byte_cnt_tbl) (struct il_priv * il,
struct il_tx_queue * txq,
void (*txq_update_byte_cnt_tbl) (struct il_priv *il,
struct il_tx_queue *txq,
u16 byte_cnt);
int (*txq_attach_buf_to_tfd) (struct il_priv * il,
struct il_tx_queue * txq, dma_addr_t addr,
int (*txq_attach_buf_to_tfd) (struct il_priv *il,
struct il_tx_queue *txq, dma_addr_t addr,
u16 len, u8 reset, u8 pad);
void (*txq_free_tfd) (struct il_priv * il, struct il_tx_queue * txq);
int (*txq_init) (struct il_priv * il, struct il_tx_queue * txq);
void (*txq_free_tfd) (struct il_priv *il, struct il_tx_queue *txq);
int (*txq_init) (struct il_priv *il, struct il_tx_queue *txq);
/* setup Rx handler */
void (*handler_setup) (struct il_priv * il);
void (*handler_setup) (struct il_priv *il);
/* alive notification after init uCode load */
void (*init_alive_start) (struct il_priv * il);
void (*init_alive_start) (struct il_priv *il);
/* check validity of rtc data address */
int (*is_valid_rtc_data_addr) (u32 addr);
/* 1st ucode load */
int (*load_ucode) (struct il_priv * il);
int (*load_ucode) (struct il_priv *il);
void (*dump_nic_error_log) (struct il_priv * il);
int (*dump_fh) (struct il_priv * il, char **buf, bool display);
int (*set_channel_switch) (struct il_priv * il,
struct ieee80211_channel_switch * ch_switch);
void (*dump_nic_error_log) (struct il_priv *il);
int (*dump_fh) (struct il_priv *il, char **buf, bool display);
int (*set_channel_switch) (struct il_priv *il,
struct ieee80211_channel_switch *ch_switch);
/* power management */
struct il_apm_ops apm_ops;
/* power */
int (*send_tx_power) (struct il_priv * il);
void (*update_chain_flags) (struct il_priv * il);
int (*send_tx_power) (struct il_priv *il);
void (*update_chain_flags) (struct il_priv *il);
/* eeprom operations */
struct il_eeprom_ops eeprom_ops;
......@@ -1688,16 +1688,16 @@ struct il_lib_ops {
};
struct il_led_ops {
int (*cmd) (struct il_priv * il, struct il_led_cmd * led_cmd);
int (*cmd) (struct il_priv *il, struct il_led_cmd *led_cmd);
};
struct il_legacy_ops {
void (*post_associate) (struct il_priv * il);
void (*config_ap) (struct il_priv * il);
void (*post_associate) (struct il_priv *il);
void (*config_ap) (struct il_priv *il);
/* station management */
int (*update_bcast_stations) (struct il_priv * il);
int (*manage_ibss_station) (struct il_priv * il,
struct ieee80211_vif * vif, bool add);
int (*update_bcast_stations) (struct il_priv *il);
int (*manage_ibss_station) (struct il_priv *il,
struct ieee80211_vif *vif, bool add);
};
struct il_ops {
......@@ -1965,7 +1965,7 @@ int il_mac_hw_scan(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
void il_internal_short_hw_scan(struct il_priv *il);
int il_force_reset(struct il_priv *il, bool external);
u16 il_fill_probe_req(struct il_priv *il, struct ieee80211_mgmt *frame,
const u8 * ta, const u8 * ie, int ie_len, int left);
const u8 *ta, const u8 *ie, int ie_len, int left);
void il_setup_rx_scan_handlers(struct il_priv *il);
u16 il_get_active_dwell_time(struct il_priv *il, enum ieee80211_band band,
u8 n_probes);
......@@ -1995,9 +1995,9 @@ int il_send_cmd(struct il_priv *il, struct il_host_cmd *cmd);
int __must_check il_send_cmd_pdu(struct il_priv *il, u8 id, u16 len,
const void *data);
int il_send_cmd_pdu_async(struct il_priv *il, u8 id, u16 len, const void *data,
void (*callback) (struct il_priv * il,
struct il_device_cmd * cmd,
struct il_rx_pkt * pkt));
void (*callback) (struct il_priv *il,
struct il_device_cmd *cmd,
struct il_rx_pkt *pkt));
int il_enqueue_hcmd(struct il_priv *il, struct il_host_cmd *cmd);
......@@ -2155,7 +2155,7 @@ void il_mac_reset_tsf(struct ieee80211_hw *hw, struct ieee80211_vif *vif);
void il_mac_bss_info_changed(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
struct ieee80211_bss_conf *bss_conf, u32 changes);
void il_tx_cmd_protection(struct il_priv *il, struct ieee80211_tx_info *info,
__le16 fc, __le32 * tx_flags);
__le16 fc, __le32 *tx_flags);
irqreturn_t il_isr(int irq, void *data);
......@@ -2191,8 +2191,7 @@ _il_poll_bit(struct il_priv *il, u32 addr, u32 bits, u32 mask, int timeout)
return t;
udelay(IL_POLL_INTERVAL);
t += IL_POLL_INTERVAL;
}
while (t < timeout);
} while (t < timeout);
return -ETIMEDOUT;
}
......@@ -2324,8 +2323,7 @@ il_poll_bit(struct il_priv *il, u32 addr, u32 mask, int timeout)
return t;
udelay(IL_POLL_INTERVAL);
t += IL_POLL_INTERVAL;
}
while (t < timeout);
} while (t < timeout);
return -ETIMEDOUT;
}
......@@ -2485,14 +2483,14 @@ void il_dealloc_bcast_stations(struct il_priv *il);
int il_get_free_ucode_key_idx(struct il_priv *il);
int il_send_add_sta(struct il_priv *il, struct il_addsta_cmd *sta, u8 flags);
int il_add_station_common(struct il_priv *il, struct il_rxon_context *ctx,
const u8 * addr, bool is_ap,
struct ieee80211_sta *sta, u8 * sta_id_r);
const u8 *addr, bool is_ap,
struct ieee80211_sta *sta, u8 *sta_id_r);
int il_remove_station(struct il_priv *il, const u8 sta_id, const u8 * addr);
int il_mac_sta_remove(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
struct ieee80211_sta *sta);
u8 il_prep_station(struct il_priv *il, struct il_rxon_context *ctx,
const u8 * addr, bool is_ap, struct ieee80211_sta *sta);
const u8 *addr, bool is_ap, struct ieee80211_sta *sta);
int il_send_lq_cmd(struct il_priv *il, struct il_rxon_context *ctx,
struct il_link_quality_cmd *lq, u8 flags, bool init);
......@@ -2758,10 +2756,10 @@ il_get_dma_hi_addr(dma_addr_t addr)
*
* This structure contains dma address and length of transmission address
*
* @lo: low [31:0] portion of the dma address of TX buffer
* every even is unaligned on 16 bit boundary
* @hi_n_len 0-3 [35:32] portion of dma
* 4-15 length of the tx buffer
* @lo: low [31:0] portion of the dma address of TX buffer every even is
* unaligned on 16 bit boundary
* @hi_n_len: 0-3 [35:32] portion of dma
* 4-15 length of the tx buffer
*/
struct il_tfd_tb {
__le32 lo;
......@@ -2778,7 +2776,7 @@ struct il_tfd_tb {
* 5 reserved
* 6-7 padding (not used)
* @ tbs[20] transmit frame buffer descriptors
* @ __pad padding
* @ __pad padding
*
* Each Tx queue uses a circular buffer of 256 TFDs stored in host DRAM.
* Both driver and device share these circular buffers, each of which must be
......@@ -3295,7 +3293,7 @@ do { \
__func__ , ## args); \
} while (0)
#define il_print_hex_dump(il, level, p, len) \
#define il_print_hex_dump(il, level, p, len) \
do { \
if (il_get_debug_level(il) & level) \
print_hex_dump(KERN_DEBUG, "iwl data: ", \
......@@ -3342,9 +3340,9 @@ il_dbgfs_unregister(struct il_priv *il)
*
* The active debug levels can be accessed via files
*
* /sys/module/iwl4965/parameters/debug
* /sys/module/iwl4965/parameters/debug
* /sys/module/iwl3945/parameters/debug
* /sys/class/net/wlan0/device/debug_level
* /sys/class/net/wlan0/device/debug_level
*
* when CONFIG_IWLEGACY_DEBUG=y.
*/
......
......@@ -71,35 +71,35 @@ il_dbgfs_open_file_generic(struct inode *inode, struct file *file)
return 0;
}
#define DEBUGFS_READ_FILE_OPS(name) \
DEBUGFS_READ_FUNC(name); \
#define DEBUGFS_READ_FILE_OPS(name) \
DEBUGFS_READ_FUNC(name); \
static const struct file_operations il_dbgfs_##name##_ops = { \
.read = il_dbgfs_##name##_read, \
.open = il_dbgfs_open_file_generic, \
.llseek = generic_file_llseek, \
.open = il_dbgfs_open_file_generic, \
.llseek = generic_file_llseek, \
};
#define DEBUGFS_WRITE_FILE_OPS(name) \
DEBUGFS_WRITE_FUNC(name); \
#define DEBUGFS_WRITE_FILE_OPS(name) \
DEBUGFS_WRITE_FUNC(name); \
static const struct file_operations il_dbgfs_##name##_ops = { \
.write = il_dbgfs_##name##_write, \
.open = il_dbgfs_open_file_generic, \
.llseek = generic_file_llseek, \
.open = il_dbgfs_open_file_generic, \
.llseek = generic_file_llseek, \
};
#define DEBUGFS_READ_WRITE_FILE_OPS(name) \
DEBUGFS_READ_FUNC(name); \
DEBUGFS_WRITE_FUNC(name); \
#define DEBUGFS_READ_WRITE_FILE_OPS(name) \
DEBUGFS_READ_FUNC(name); \
DEBUGFS_WRITE_FUNC(name); \
static const struct file_operations il_dbgfs_##name##_ops = { \
.write = il_dbgfs_##name##_write, \
.read = il_dbgfs_##name##_read, \
.open = il_dbgfs_open_file_generic, \
.llseek = generic_file_llseek, \
.llseek = generic_file_llseek, \
};
static ssize_t
il_dbgfs_tx_stats_read(struct file *file, char __user * user_buf, size_t count,
loff_t * ppos)
il_dbgfs_tx_stats_read(struct file *file, char __user *user_buf, size_t count,
loff_t *ppos)
{
struct il_priv *il = file->private_data;
......@@ -139,8 +139,8 @@ il_dbgfs_tx_stats_read(struct file *file, char __user * user_buf, size_t count,
static ssize_t
il_dbgfs_clear_traffic_stats_write(struct file *file,
const char __user * user_buf, size_t count,
loff_t * ppos)
const char __user *user_buf, size_t count,
loff_t *ppos)
{
struct il_priv *il = file->private_data;
u32 clear_flag;
......@@ -159,8 +159,8 @@ il_dbgfs_clear_traffic_stats_write(struct file *file,
}
static ssize_t
il_dbgfs_rx_stats_read(struct file *file, char __user * user_buf, size_t count,
loff_t * ppos)
il_dbgfs_rx_stats_read(struct file *file, char __user *user_buf, size_t count,
loff_t *ppos)
{
struct il_priv *il = file->private_data;
......@@ -203,8 +203,8 @@ il_dbgfs_rx_stats_read(struct file *file, char __user * user_buf, size_t count,
#define BYTE2_MASK 0x0000ffff;
#define BYTE3_MASK 0x00ffffff;
static ssize_t
il_dbgfs_sram_read(struct file *file, char __user * user_buf, size_t count,
loff_t * ppos)
il_dbgfs_sram_read(struct file *file, char __user *user_buf, size_t count,
loff_t *ppos)
{
u32 val;
char *buf;
......@@ -262,8 +262,8 @@ il_dbgfs_sram_read(struct file *file, char __user * user_buf, size_t count,
}
static ssize_t
il_dbgfs_sram_write(struct file *file, const char __user * user_buf,
size_t count, loff_t * ppos)
il_dbgfs_sram_write(struct file *file, const char __user *user_buf,
size_t count, loff_t *ppos)
{
struct il_priv *il = file->private_data;
char buf[64];
......@@ -287,8 +287,8 @@ il_dbgfs_sram_write(struct file *file, const char __user * user_buf,
}
static ssize_t
il_dbgfs_stations_read(struct file *file, char __user * user_buf, size_t count,
loff_t * ppos)
il_dbgfs_stations_read(struct file *file, char __user *user_buf, size_t count,
loff_t *ppos)
{
struct il_priv *il = file->private_data;
struct il_station_entry *station;
......@@ -351,8 +351,8 @@ il_dbgfs_stations_read(struct file *file, char __user * user_buf, size_t count,
}
static ssize_t
il_dbgfs_nvm_read(struct file *file, char __user * user_buf, size_t count,
loff_t * ppos)
il_dbgfs_nvm_read(struct file *file, char __user *user_buf, size_t count,
loff_t *ppos)
{
ssize_t ret;
struct il_priv *il = file->private_data;
......@@ -399,8 +399,8 @@ il_dbgfs_nvm_read(struct file *file, char __user * user_buf, size_t count,
}
static ssize_t
il_dbgfs_channels_read(struct file *file, char __user * user_buf, size_t count,
loff_t * ppos)
il_dbgfs_channels_read(struct file *file, char __user *user_buf, size_t count,
loff_t *ppos)
{
struct il_priv *il = file->private_data;
struct ieee80211_channel *channels = NULL;
......@@ -478,8 +478,8 @@ il_dbgfs_channels_read(struct file *file, char __user * user_buf, size_t count,
}
static ssize_t
il_dbgfs_status_read(struct file *file, char __user * user_buf, size_t count,
loff_t * ppos)
il_dbgfs_status_read(struct file *file, char __user *user_buf, size_t count,
loff_t *ppos)
{
struct il_priv *il = file->private_data;
......@@ -539,8 +539,8 @@ il_dbgfs_status_read(struct file *file, char __user * user_buf, size_t count,
}
static ssize_t
il_dbgfs_interrupt_read(struct file *file, char __user * user_buf, size_t count,
loff_t * ppos)
il_dbgfs_interrupt_read(struct file *file, char __user *user_buf, size_t count,
loff_t *ppos)
{
struct il_priv *il = file->private_data;
......@@ -618,8 +618,8 @@ il_dbgfs_interrupt_read(struct file *file, char __user * user_buf, size_t count,
}
static ssize_t
il_dbgfs_interrupt_write(struct file *file, const char __user * user_buf,
size_t count, loff_t * ppos)
il_dbgfs_interrupt_write(struct file *file, const char __user *user_buf,
size_t count, loff_t *ppos)
{
struct il_priv *il = file->private_data;
char buf[8];
......@@ -639,8 +639,8 @@ il_dbgfs_interrupt_write(struct file *file, const char __user * user_buf,
}
static ssize_t
il_dbgfs_qos_read(struct file *file, char __user * user_buf, size_t count,
loff_t * ppos)
il_dbgfs_qos_read(struct file *file, char __user *user_buf, size_t count,
loff_t *ppos)
{
struct il_priv *il = file->private_data;
struct il_rxon_context *ctx = &il->ctx;
......@@ -666,8 +666,8 @@ il_dbgfs_qos_read(struct file *file, char __user * user_buf, size_t count,
}
static ssize_t
il_dbgfs_disable_ht40_write(struct file *file, const char __user * user_buf,
size_t count, loff_t * ppos)
il_dbgfs_disable_ht40_write(struct file *file, const char __user *user_buf,
size_t count, loff_t *ppos)
{
struct il_priv *il = file->private_data;
char buf[8];
......@@ -692,8 +692,8 @@ il_dbgfs_disable_ht40_write(struct file *file, const char __user * user_buf,
}
static ssize_t
il_dbgfs_disable_ht40_read(struct file *file, char __user * user_buf,
size_t count, loff_t * ppos)
il_dbgfs_disable_ht40_read(struct file *file, char __user *user_buf,
size_t count, loff_t *ppos)
{
struct il_priv *il = file->private_data;
char buf[100];
......@@ -716,8 +716,8 @@ DEBUGFS_READ_FILE_OPS(qos);
DEBUGFS_READ_WRITE_FILE_OPS(disable_ht40);
static ssize_t
il_dbgfs_traffic_log_read(struct file *file, char __user * user_buf,
size_t count, loff_t * ppos)
il_dbgfs_traffic_log_read(struct file *file, char __user *user_buf,
size_t count, loff_t *ppos)
{
struct il_priv *il = file->private_data;
int pos = 0, ofs = 0;
......@@ -801,8 +801,8 @@ il_dbgfs_traffic_log_read(struct file *file, char __user * user_buf,
}
static ssize_t
il_dbgfs_traffic_log_write(struct file *file, const char __user * user_buf,
size_t count, loff_t * ppos)
il_dbgfs_traffic_log_write(struct file *file, const char __user *user_buf,
size_t count, loff_t *ppos)
{
struct il_priv *il = file->private_data;
char buf[8];
......@@ -822,8 +822,8 @@ il_dbgfs_traffic_log_write(struct file *file, const char __user * user_buf,
}
static ssize_t
il_dbgfs_tx_queue_read(struct file *file, char __user * user_buf, size_t count,
loff_t * ppos)
il_dbgfs_tx_queue_read(struct file *file, char __user *user_buf, size_t count,
loff_t *ppos)
{
struct il_priv *il = file->private_data;
......@@ -851,9 +851,8 @@ il_dbgfs_tx_queue_read(struct file *file, char __user * user_buf, size_t count,
scnprintf(buf + pos, bufsz - pos,
"hwq %.2d: read=%u write=%u stop=%d"
" swq_id=%#.2x (ac %d/hwq %d)\n", cnt,
q->read_ptr, q->write_ptr, !!test_bit(cnt,
il->
queue_stopped),
q->read_ptr, q->write_ptr,
!!test_bit(cnt, il->queue_stopped),
txq->swq_id, txq->swq_id & 3,
(txq->swq_id >> 2) & 0x1f);
if (cnt >= 4)
......@@ -870,8 +869,8 @@ il_dbgfs_tx_queue_read(struct file *file, char __user * user_buf, size_t count,
}
static ssize_t
il_dbgfs_rx_queue_read(struct file *file, char __user * user_buf, size_t count,
loff_t * ppos)
il_dbgfs_rx_queue_read(struct file *file, char __user *user_buf, size_t count,
loff_t *ppos)
{
struct il_priv *il = file->private_data;
......@@ -899,8 +898,8 @@ il_dbgfs_rx_queue_read(struct file *file, char __user * user_buf, size_t count,
}
static ssize_t
il_dbgfs_ucode_rx_stats_read(struct file *file, char __user * user_buf,
size_t count, loff_t * ppos)
il_dbgfs_ucode_rx_stats_read(struct file *file, char __user *user_buf,
size_t count, loff_t *ppos)
{
struct il_priv *il = file->private_data;
return il->cfg->ops->lib->debugfs_ops.rx_stats_read(file, user_buf,
......@@ -908,8 +907,8 @@ il_dbgfs_ucode_rx_stats_read(struct file *file, char __user * user_buf,
}
static ssize_t
il_dbgfs_ucode_tx_stats_read(struct file *file, char __user * user_buf,
size_t count, loff_t * ppos)
il_dbgfs_ucode_tx_stats_read(struct file *file, char __user *user_buf,
size_t count, loff_t *ppos)
{
struct il_priv *il = file->private_data;
return il->cfg->ops->lib->debugfs_ops.tx_stats_read(file, user_buf,
......@@ -917,8 +916,8 @@ il_dbgfs_ucode_tx_stats_read(struct file *file, char __user * user_buf,
}
static ssize_t
il_dbgfs_ucode_general_stats_read(struct file *file, char __user * user_buf,
size_t count, loff_t * ppos)
il_dbgfs_ucode_general_stats_read(struct file *file, char __user *user_buf,
size_t count, loff_t *ppos)
{
struct il_priv *il = file->private_data;
return il->cfg->ops->lib->debugfs_ops.general_stats_read(file, user_buf,
......@@ -926,8 +925,8 @@ il_dbgfs_ucode_general_stats_read(struct file *file, char __user * user_buf,
}
static ssize_t
il_dbgfs_sensitivity_read(struct file *file, char __user * user_buf,
size_t count, loff_t * ppos)
il_dbgfs_sensitivity_read(struct file *file, char __user *user_buf,
size_t count, loff_t *ppos)
{
struct il_priv *il = file->private_data;
......@@ -1025,8 +1024,8 @@ il_dbgfs_sensitivity_read(struct file *file, char __user * user_buf,
}
static ssize_t
il_dbgfs_chain_noise_read(struct file *file, char __user * user_buf,
size_t count, loff_t * ppos)
il_dbgfs_chain_noise_read(struct file *file, char __user *user_buf,
size_t count, loff_t *ppos)
{
struct il_priv *il = file->private_data;
......@@ -1096,8 +1095,8 @@ il_dbgfs_chain_noise_read(struct file *file, char __user * user_buf,
}
static ssize_t
il_dbgfs_power_save_status_read(struct file *file, char __user * user_buf,
size_t count, loff_t * ppos)
il_dbgfs_power_save_status_read(struct file *file, char __user *user_buf,
size_t count, loff_t *ppos)
{
struct il_priv *il = file->private_data;
char buf[60];
......@@ -1111,19 +1110,18 @@ il_dbgfs_power_save_status_read(struct file *file, char __user * user_buf,
pos += scnprintf(buf + pos, bufsz - pos, "Power Save Status: ");
pos +=
scnprintf(buf + pos, bufsz - pos, "%s\n",
(pwrsave_status ==
CSR_GP_REG_NO_POWER_SAVE) ? "none" : (pwrsave_status ==
CSR_GP_REG_MAC_POWER_SAVE)
? "MAC" : (pwrsave_status ==
CSR_GP_REG_PHY_POWER_SAVE) ? "PHY" : "error");
(pwrsave_status == CSR_GP_REG_NO_POWER_SAVE) ? "none" :
(pwrsave_status == CSR_GP_REG_MAC_POWER_SAVE) ? "MAC" :
(pwrsave_status == CSR_GP_REG_PHY_POWER_SAVE) ? "PHY" :
"error");
return simple_read_from_buffer(user_buf, count, ppos, buf, pos);
}
static ssize_t
il_dbgfs_clear_ucode_stats_write(struct file *file,
const char __user * user_buf, size_t count,
loff_t * ppos)
const char __user *user_buf, size_t count,
loff_t *ppos)
{
struct il_priv *il = file->private_data;
char buf[8];
......@@ -1146,8 +1144,8 @@ il_dbgfs_clear_ucode_stats_write(struct file *file,
}
static ssize_t
il_dbgfs_rxon_flags_read(struct file *file, char __user * user_buf,
size_t count, loff_t * ppos)
il_dbgfs_rxon_flags_read(struct file *file, char __user *user_buf,
size_t count, loff_t *ppos)
{
struct il_priv *il = file->private_data;
......@@ -1159,8 +1157,8 @@ il_dbgfs_rxon_flags_read(struct file *file, char __user * user_buf,
}
static ssize_t
il_dbgfs_rxon_filter_flags_read(struct file *file, char __user * user_buf,
size_t count, loff_t * ppos)
il_dbgfs_rxon_filter_flags_read(struct file *file, char __user *user_buf,
size_t count, loff_t *ppos)
{
struct il_priv *il = file->private_data;
......@@ -1173,8 +1171,8 @@ il_dbgfs_rxon_filter_flags_read(struct file *file, char __user * user_buf,
}
static ssize_t
il_dbgfs_fh_reg_read(struct file *file, char __user * user_buf, size_t count,
loff_t * ppos)
il_dbgfs_fh_reg_read(struct file *file, char __user *user_buf, size_t count,
loff_t *ppos)
{
struct il_priv *il = file->private_data;
char *buf;
......@@ -1195,8 +1193,8 @@ il_dbgfs_fh_reg_read(struct file *file, char __user * user_buf, size_t count,
}
static ssize_t
il_dbgfs_missed_beacon_read(struct file *file, char __user * user_buf,
size_t count, loff_t * ppos)
il_dbgfs_missed_beacon_read(struct file *file, char __user *user_buf,
size_t count, loff_t *ppos)
{
struct il_priv *il = file->private_data;
......@@ -1212,8 +1210,8 @@ il_dbgfs_missed_beacon_read(struct file *file, char __user * user_buf,
}
static ssize_t
il_dbgfs_missed_beacon_write(struct file *file, const char __user * user_buf,
size_t count, loff_t * ppos)
il_dbgfs_missed_beacon_write(struct file *file, const char __user *user_buf,
size_t count, loff_t *ppos)
{
struct il_priv *il = file->private_data;
char buf[8];
......@@ -1237,8 +1235,8 @@ il_dbgfs_missed_beacon_write(struct file *file, const char __user * user_buf,
}
static ssize_t
il_dbgfs_force_reset_read(struct file *file, char __user * user_buf,
size_t count, loff_t * ppos)
il_dbgfs_force_reset_read(struct file *file, char __user *user_buf,
size_t count, loff_t *ppos)
{
struct il_priv *il = file->private_data;
......@@ -1268,8 +1266,8 @@ il_dbgfs_force_reset_read(struct file *file, char __user * user_buf,
}
static ssize_t
il_dbgfs_force_reset_write(struct file *file, const char __user * user_buf,
size_t count, loff_t * ppos)
il_dbgfs_force_reset_write(struct file *file, const char __user *user_buf,
size_t count, loff_t *ppos)
{
int ret;
......@@ -1281,8 +1279,8 @@ il_dbgfs_force_reset_write(struct file *file, const char __user * user_buf,
}
static ssize_t
il_dbgfs_wd_timeout_write(struct file *file, const char __user * user_buf,
size_t count, loff_t * ppos)
il_dbgfs_wd_timeout_write(struct file *file, const char __user *user_buf,
size_t count, loff_t *ppos)
{
struct il_priv *il = file->private_data;
......@@ -1394,7 +1392,6 @@ il_dbgfs_register(struct il_priv *il, const char *name)
il_dbgfs_unregister(il);
return -ENOMEM;
}
EXPORT_SYMBOL(il_dbgfs_register);
/**
......@@ -1410,5 +1407,4 @@ il_dbgfs_unregister(struct il_priv *il)
debugfs_remove_recursive(il->debugfs_dir);
il->debugfs_dir = NULL;
}
EXPORT_SYMBOL(il_dbgfs_unregister);
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册