Fix most checkpatch.pl ERRORs and some WARNINGs.
Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
}
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;
}
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;
}
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;
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 */
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);
}
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;
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 +=
(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));
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
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
{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},
{35, 113},
{35, 107},
{35, 99},
- {3, 120}} /* 5.x GHz, lowest power */
+ {3, 120} /* 5.x GHz, lowest power */
+ }
};
static inline u8
*/
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;
}
/**
- * 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.
*
*/
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;
};
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);
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 */
} __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;
}
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);
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;
}
}
}
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;
}
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;
}
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;
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);
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;
}
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 +=
((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 */
(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);
/* 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));
}
/**
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;
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,
*/
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;
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;
}
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);
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",
/* 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;
*/
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
#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)
/* 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;
* 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 */
/* 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) {
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;
}
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;
};
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;
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;
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);
}
/* 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);
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);
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,
/* 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;
}
}
}
-
EXPORT_SYMBOL(il_get_cmd_string);
#define HOST_COMPLETE_TIMEOUT (HZ / 2)
out:
return ret;
}
-
EXPORT_SYMBOL(il_send_cmd_sync);
int
return il_send_cmd_sync(il, cmd);
}
-
EXPORT_SYMBOL(il_send_cmd);
int
return il_send_cmd_sync(il, &cmd);
}
-
EXPORT_SYMBOL(il_send_cmd_pdu);
int
il_send_cmd_pdu_async(struct il_priv *il, u8 id, u16 len, const void *data,
- void (*callback) (struct il_priv * il,
- struct il_device_cmd * cmd,
- struct il_rx_pkt * pkt))
+ void (*callback) (struct il_priv *il,
+ struct il_device_cmd *cmd,
+ struct il_rx_pkt *pkt))
{
struct il_host_cmd cmd = {
.id = id,
return il_send_cmd_async(il, &cmd);
}
-
EXPORT_SYMBOL(il_send_cmd_pdu_async);
/* default: IL_LED_BLINK(0) using blinking idx table */
* <=0 SOLID ON
*/
static const struct ieee80211_tpt_blink il_blink[] = {
- {.throughput = 0,.blink_time = 334},
- {.throughput = 1 * 1024 - 1,.blink_time = 260},
- {.throughput = 5 * 1024 - 1,.blink_time = 220},
- {.throughput = 10 * 1024 - 1,.blink_time = 190},
- {.throughput = 20 * 1024 - 1,.blink_time = 170},
- {.throughput = 50 * 1024 - 1,.blink_time = 150},
- {.throughput = 70 * 1024 - 1,.blink_time = 130},
- {.throughput = 100 * 1024 - 1,.blink_time = 110},
- {.throughput = 200 * 1024 - 1,.blink_time = 80},
- {.throughput = 300 * 1024 - 1,.blink_time = 50},
+ {.throughput = 0, .blink_time = 334},
+ {.throughput = 1 * 1024 - 1, .blink_time = 260},
+ {.throughput = 5 * 1024 - 1, .blink_time = 220},
+ {.throughput = 10 * 1024 - 1, .blink_time = 190},
+ {.throughput = 20 * 1024 - 1, .blink_time = 170},
+ {.throughput = 50 * 1024 - 1, .blink_time = 150},
+ {.throughput = 70 * 1024 - 1, .blink_time = 130},
+ {.throughput = 100 * 1024 - 1, .blink_time = 110},
+ {.throughput = 200 * 1024 - 1, .blink_time = 80},
+ {.throughput = 300 * 1024 - 1, .blink_time = 50},
};
/*
il->led_registered = true;
}
-
EXPORT_SYMBOL(il_leds_init);
void
led_classdev_unregister(&il->led);
kfree(il->led.name);
}
-
EXPORT_SYMBOL(il_leds_exit);
/************************** EEPROM BANDS ****************************
BUG_ON(offset >= il->cfg->base_params->eeprom_size);
return &il->eeprom[offset];
}
-
EXPORT_SYMBOL(il_eeprom_query_addr);
u16
-il_eeprom_query16(const struct il_priv * il, size_t offset)
+il_eeprom_query16(const struct il_priv *il, size_t offset)
{
if (!il->eeprom)
return 0;
return (u16) il->eeprom[offset] | ((u16) il->eeprom[offset + 1] << 8);
}
-
EXPORT_SYMBOL(il_eeprom_query16);
/**
alloc_err:
return ret;
}
-
EXPORT_SYMBOL(il_eeprom_init);
void
kfree(il->eeprom);
il->eeprom = NULL;
}
-
EXPORT_SYMBOL(il_eeprom_free);
static void
il_init_band_reference(const struct il_priv *il, int eep_band,
int *eeprom_ch_count,
const struct il_eeprom_channel **eeprom_ch_info,
- const u8 ** eeprom_ch_idx)
+ const u8 **eeprom_ch_idx)
{
u32 offset =
il->cfg->ops->lib->eeprom_ops.regulatory_bands[eep_band - 1];
return 0;
}
-
EXPORT_SYMBOL(il_init_channel_map);
/*
kfree(il->channel_info);
il->channel_count = 0;
}
-
EXPORT_SYMBOL(il_free_channel_map);
/**
return NULL;
}
-
EXPORT_SYMBOL(il_get_channel_info);
/*
il_power_sleep_cam_cmd(il, &cmd);
return il_power_set_mode(il, &cmd, force);
}
-
EXPORT_SYMBOL(il_power_update_mode);
/* initialize to default */
queue_work(il->workqueue, &il->abort_scan);
return 0;
}
-
EXPORT_SYMBOL(il_scan_cancel);
/**
return test_bit(S_SCAN_HW, &il->status);
}
-
EXPORT_SYMBOL(il_scan_cancel_timeout);
/* Service response to C_SCAN (0x80) */
il->handlers[N_SCAN_RESULTS] = il_hdl_scan_results;
il->handlers[N_SCAN_COMPLETE] = il_hdl_scan_complete;
}
-
EXPORT_SYMBOL(il_setup_rx_scan_handlers);
inline u16
return IL_ACTIVE_DWELL_TIME_24 +
IL_ACTIVE_DWELL_FACTOR_24GHZ * (n_probes + 1);
}
-
EXPORT_SYMBOL(il_get_active_dwell_time);
u16
-il_get_passive_dwell_time(struct il_priv * il, enum ieee80211_band band,
- struct ieee80211_vif * vif)
+il_get_passive_dwell_time(struct il_priv *il, enum ieee80211_band band,
+ struct ieee80211_vif *vif)
{
struct il_rxon_context *ctx = &il->ctx;
u16 value;
return passive;
}
-
EXPORT_SYMBOL(il_get_passive_dwell_time);
void
if (!il->scan_tx_ant[IEEE80211_BAND_2GHZ])
il->scan_tx_ant[IEEE80211_BAND_2GHZ] = ant_idx;
}
-
EXPORT_SYMBOL(il_init_scan_params);
static int
return ret;
}
-
EXPORT_SYMBOL(il_mac_hw_scan);
static void
u16
il_fill_probe_req(struct il_priv *il, struct ieee80211_mgmt *frame,
- const u8 * ta, const u8 * ies, int ie_len, int left)
+ const u8 *ta, const u8 *ies, int ie_len, int left)
{
int len = 0;
u8 *pos = NULL;
return (u16) len;
}
-
EXPORT_SYMBOL(il_fill_probe_req);
static void
INIT_WORK(&il->abort_scan, il_bg_abort_scan);
INIT_DELAYED_WORK(&il->scan_check, il_bg_scan_check);
}
-
EXPORT_SYMBOL(il_setup_scan_deferred_work);
void
mutex_unlock(&il->mutex);
}
}
-
EXPORT_SYMBOL(il_cancel_scan_deferred_work);
/* il->sta_lock must be held */
return ret;
}
-
EXPORT_SYMBOL(il_send_add_sta);
static void
mimo_ps_mode = (sta_ht_inf->cap & IEEE80211_HT_CAP_SM_PS) >> 2;
D_ASSOC("spatial multiplexing power save mode: %s\n",
- (mimo_ps_mode ==
- WLAN_HT_CAP_SM_PS_STATIC) ? "static" : (mimo_ps_mode ==
- WLAN_HT_CAP_SM_PS_DYNAMIC)
- ? "dynamic" : "disabled");
+ (mimo_ps_mode == WLAN_HT_CAP_SM_PS_STATIC) ? "static" :
+ (mimo_ps_mode == WLAN_HT_CAP_SM_PS_DYNAMIC) ? "dynamic" :
+ "disabled");
sta_flags = il->stations[idx].sta.station_flags;
* should be called with sta_lock held
*/
u8
-il_prep_station(struct il_priv * il, struct il_rxon_context * ctx,
- const u8 * addr, bool is_ap, struct ieee80211_sta * sta)
+il_prep_station(struct il_priv *il, struct il_rxon_context *ctx,
+ const u8 *addr, bool is_ap, struct ieee80211_sta *sta)
{
struct il_station_entry *station;
int i;
return sta_id;
}
-
EXPORT_SYMBOL_GPL(il_prep_station);
#define STA_WAIT_TIMEOUT (HZ/2)
*/
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)
{
unsigned long flags_spin;
int ret = 0;
*sta_id_r = sta_id;
return ret;
}
-
EXPORT_SYMBOL(il_add_station_common);
/**
spin_unlock_irqrestore(&il->sta_lock, flags);
return -EINVAL;
}
-
EXPORT_SYMBOL_GPL(il_remove_station);
/**
if (!cleared)
D_INFO("No active stations found to be cleared\n");
}
-
EXPORT_SYMBOL(il_clear_ucode_stations);
/**
else
D_INFO("Restoring all known stations" " .... complete.\n");
}
-
EXPORT_SYMBOL(il_restore_stations);
int
return WEP_INVALID_OFFSET;
}
-
EXPORT_SYMBOL(il_get_free_ucode_key_idx);
void
}
spin_unlock_irqrestore(&il->sta_lock, flags);
}
-
EXPORT_SYMBOL_GPL(il_dealloc_bcast_stations);
#ifdef CONFIG_IWLEGACY_DEBUG
}
return ret;
}
-
EXPORT_SYMBOL(il_send_lq_cmd);
int
mutex_unlock(&il->mutex);
return ret;
}
-
EXPORT_SYMBOL(il_mac_sta_remove);
/************************** RX-FUNCTIONS ****************************/
s = 0;
return s;
}
-
EXPORT_SYMBOL(il_rx_queue_space);
/**
exit_unlock:
spin_unlock_irqrestore(&q->lock, flags);
}
-
EXPORT_SYMBOL(il_rx_queue_update_write_ptr);
int
err_bd:
return -ENOMEM;
}
-
EXPORT_SYMBOL(il_rx_queue_alloc);
void
memcpy(&il->measure_report, report, sizeof(*report));
il->measurement_status |= MEASUREMENT_READY;
}
-
EXPORT_SYMBOL(il_hdl_spectrum_measurement);
/*
}
return 0;
}
-
EXPORT_SYMBOL(il_set_decrypted_flag);
/**
_il_wr(il, HBUS_TARG_WRPTR, txq->q.write_ptr | (txq_id << 8));
txq->need_update = 0;
}
-
EXPORT_SYMBOL(il_txq_update_write_ptr);
/**
q->read_ptr = il_queue_inc_wrap(q->read_ptr, q->n_bd);
}
}
-
EXPORT_SYMBOL(il_tx_queue_unmap);
/**
/* 0-fill queue descriptor structure */
memset(txq, 0, sizeof(*txq));
}
-
EXPORT_SYMBOL(il_tx_queue_free);
/**
txq->meta[i].flags = 0;
}
}
-
EXPORT_SYMBOL(il_cmd_queue_unmap);
/**
/* 0-fill queue descriptor structure */
memset(txq, 0, sizeof(*txq));
}
-
EXPORT_SYMBOL(il_cmd_queue_free);
/*************** DMA-QUEUE-GENERAL-FUNCTIONS *****
s = 0;
return s;
}
-
EXPORT_SYMBOL(il_queue_space);
return -ENOMEM;
}
-
EXPORT_SYMBOL(il_tx_queue_init);
void
/* Tell device where to find queue */
il->cfg->ops->lib->txq_init(il, txq);
}
-
EXPORT_SYMBOL(il_tx_queue_reset);
/*************** HOST COMMAND QUEUE FUNCTIONS *****/
EXPORT_SYMBOL(il_debug_level);
const u8 il_bcast_addr[ETH_ALEN] = { 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF };
-
EXPORT_SYMBOL(il_bcast_addr);
/* This function both allocates and initializes hw and il. */
out:
return hw;
}
-
EXPORT_SYMBOL(il_alloc_all);
#define MAX_BIT_RATE_40_MHZ 150 /* Mbps */
return 0;
}
-
EXPORT_SYMBOL(il_init_geos);
/*
kfree(il->ieee_rates);
clear_bit(S_GEO_CONFIGURED, &il->status);
}
-
EXPORT_SYMBOL(il_free_geos);
static bool
}
bool
-il_is_ht40_tx_allowed(struct il_priv * il, struct il_rxon_context * ctx,
- struct ieee80211_sta_ht_cap * ht_cap)
+il_is_ht40_tx_allowed(struct il_priv *il, struct il_rxon_context *ctx,
+ struct ieee80211_sta_ht_cap *ht_cap)
{
if (!ctx->ht.enabled || !ctx->ht.is_40mhz)
return false;
le16_to_cpu(ctx->staging.channel),
ctx->ht.extension_chan_offset);
}
-
EXPORT_SYMBOL(il_is_ht40_tx_allowed);
static u16
return il_send_cmd_pdu(il, ctx->rxon_timing_cmd, sizeof(ctx->timing),
&ctx->timing);
}
-
EXPORT_SYMBOL(il_send_rxon_timing);
void
rxon->filter_flags |= RXON_FILTER_DIS_DECRYPT_MSK;
}
-
EXPORT_SYMBOL(il_set_rxon_hwcrypto);
/* validate RXON structure is valid */
}
return 0;
}
-
EXPORT_SYMBOL(il_check_rxon_cmd);
/**
return 0;
}
-
EXPORT_SYMBOL(il_full_rxon_required);
u8
-il_get_lowest_plcp(struct il_priv * il, struct il_rxon_context * ctx)
+il_get_lowest_plcp(struct il_priv *il, struct il_rxon_context *ctx)
{
/*
* Assign the lowest rate -- should really get this from
else
return RATE_6M_PLCP;
}
-
EXPORT_SYMBOL(il_get_lowest_plcp);
static void
{
_il_set_rxon_ht(il, ht_conf, &il->ctx);
}
-
EXPORT_SYMBOL(il_set_rxon_ht);
/* Return valid, unused, channel for a passive scan to reset the RF */
return channel;
}
-
EXPORT_SYMBOL(il_get_single_channel_number);
/**
return 0;
}
-
EXPORT_SYMBOL(il_set_rxon_channel);
void
ctx->staging.flags &= ~RXON_FLG_CCK_MSK;
}
}
-
EXPORT_SYMBOL(il_set_flags_for_band);
/*
ctx->staging.ofdm_ht_single_stream_basic_rates = 0xff;
ctx->staging.ofdm_ht_dual_stream_basic_rates = 0xff;
}
-
EXPORT_SYMBOL(il_connection_init_rx_config);
void
il->ctx.staging.ofdm_basic_rates =
(IL_OFDM_BASIC_RATES_MASK >> IL_FIRST_OFDM_RATE) & 0xFF;
}
-
EXPORT_SYMBOL(il_set_rate);
void
if (test_and_clear_bit(S_CHANNEL_SWITCH_PENDING, &il->status))
ieee80211_chswitch_done(ctx->vif, is_success);
}
-
EXPORT_SYMBOL(il_chswitch_done);
void
il_chswitch_done(il, false);
}
}
-
EXPORT_SYMBOL(il_hdl_csa);
#ifdef CONFIG_IWLEGACY_DEBUG
D_RADIO("u8[6] bssid_addr: %pM\n", rxon->bssid_addr);
D_RADIO("u16 assoc_id: 0x%x\n", le16_to_cpu(rxon->assoc_id));
}
-
EXPORT_SYMBOL(il_print_rx_config_cmd);
#endif
/**
queue_work(il->workqueue, &il->restart);
}
}
-
EXPORT_SYMBOL(il_irq_handle_error);
static int
*/
il_clear_bit(il, CSR_GP_CNTRL, CSR_GP_CNTRL_REG_FLAG_INIT_DONE);
}
-
EXPORT_SYMBOL(il_apm_stop);
/*
out:
return ret;
}
-
EXPORT_SYMBOL(il_apm_init);
int
}
return ret;
}
-
EXPORT_SYMBOL(il_set_tx_power);
void
struct il_rx_pkt *pkt = rxb_addr(rxb);
struct il_sleep_notification *sleep = &(pkt->u.sleep_notif);
D_RX("sleep mode: %d, src: %d\n",
- sleep->pm_sleep_mode, sleep->pm_wakeup_src);
+ sleep->pm_sleep_mode, sleep->pm_wakeup_src);
#endif
}
EXPORT_SYMBOL(il_hdl_pm_sleep);
D_MAC80211("leave\n");
return 0;
}
-
EXPORT_SYMBOL(il_mac_conf_tx);
int
return il->ibss_manager == IL_IBSS_MANAGER;
}
-
EXPORT_SYMBOL_GPL(il_mac_tx_last_beacon);
static int
D_MAC80211("leave\n");
return err;
}
-
EXPORT_SYMBOL(il_mac_add_interface);
static void
D_MAC80211("leave\n");
}
-
EXPORT_SYMBOL(il_mac_remove_interface);
int
}
return 0;
}
-
EXPORT_SYMBOL(il_alloc_txq_mem);
void
kfree(il->txq);
il->txq = NULL;
}
-
EXPORT_SYMBOL(il_txq_mem);
#ifdef CONFIG_IWLEGACY_DEBUGFS
il_reset_traffic_log(il);
return 0;
}
-
EXPORT_SYMBOL(il_alloc_traffic_mem);
void
kfree(il->rx_traffic);
il->rx_traffic = NULL;
}
-
EXPORT_SYMBOL(il_free_traffic_mem);
void
(il->tx_traffic_idx + 1) % IL_TRAFFIC_ENTRIES;
}
}
-
EXPORT_SYMBOL(il_dbg_log_tx_data_frame);
void
(il->rx_traffic_idx + 1) % IL_TRAFFIC_ENTRIES;
}
}
-
EXPORT_SYMBOL(il_dbg_log_rx_data_frame);
const char *
stats->data_bytes += len;
}
}
-
EXPORT_SYMBOL(il_update_stats);
#endif
mutex_unlock(&il->mutex);
return err;
}
-
EXPORT_SYMBOL(il_mac_change_interface);
/*
mod_timer(&il->watchdog,
jiffies + msecs_to_jiffies(IL_WD_TICK(timeout)));
}
-
EXPORT_SYMBOL(il_bg_watchdog);
void
else
del_timer(&il->watchdog);
}
-
EXPORT_SYMBOL(il_setup_watchdog);
/*
return (quot << il->hw_params.beacon_time_tsf_bits) + rem;
}
-
EXPORT_SYMBOL(il_usecs_to_beacons);
/* base is usually what we get from ucode with each received frame,
* the same as HW timer counter counting down
*/
__le32
-il_add_beacon_time(struct il_priv * il, u32 base, u32 addon,
+il_add_beacon_time(struct il_priv *il, u32 base, u32 addon,
u32 beacon_interval)
{
u32 base_low = base & il_beacon_time_mask_low(il,
return cpu_to_le32(res);
}
-
EXPORT_SYMBOL(il_add_beacon_time);
#ifdef CONFIG_PM
return 0;
}
-
EXPORT_SYMBOL(il_pci_suspend);
int
return 0;
}
-
EXPORT_SYMBOL(il_pci_resume);
const struct dev_pm_ops il_pm_ops = {
.poweroff = il_pci_suspend,
.restore = il_pci_resume,
};
-
EXPORT_SYMBOL(il_pm_ops);
#endif /* CONFIG_PM */
D_MAC80211("leave\n");
}
-
EXPORT_SYMBOL(il_mac_reset_tsf);
static void
D_MAC80211("leave\n");
}
-
EXPORT_SYMBOL(il_mac_bss_info_changed);
irqreturn_t
spin_unlock_irqrestore(&il->lock, flags);
return IRQ_NONE;
}
-
EXPORT_SYMBOL(il_isr);
/*
*/
void
il_tx_cmd_protection(struct il_priv *il, struct ieee80211_tx_info *info,
- __le16 fc, __le32 * tx_flags)
+ __le16 fc, __le32 *tx_flags)
{
if (info->control.rates[0].flags & IEEE80211_TX_RC_USE_RTS_CTS) {
*tx_flags |= TX_CMD_FLG_RTS_MSK;
*tx_flags |= TX_CMD_FLG_FULL_TXOP_PROT_MSK;
}
}
-
EXPORT_SYMBOL(il_tx_cmd_protection);
* 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. */
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);
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;
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];
#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;
};
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 {
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);
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);
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);
return t;
udelay(IL_POLL_INTERVAL);
t += IL_POLL_INTERVAL;
- }
- while (t < timeout);
+ } while (t < timeout);
return -ETIMEDOUT;
}
return t;
udelay(IL_POLL_INTERVAL);
t += IL_POLL_INTERVAL;
- }
- while (t < timeout);
+ } while (t < timeout);
return -ETIMEDOUT;
}
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);
*
* 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;
* 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
__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: ", \
*
* 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.
*/
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;
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;
}
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;
#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;
}
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];
}
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;
}
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;
}
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;
}
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;
}
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;
}
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];
}
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;
}
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];
}
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];
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;
}
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];
}
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;
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)
}
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;
}
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,
}
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,
}
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,
}
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;
}
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;
}
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];
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];
}
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;
}
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;
}
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;
}
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;
}
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];
}
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;
}
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;
}
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;
il_dbgfs_unregister(il);
return -ENOMEM;
}
-
EXPORT_SYMBOL(il_dbgfs_register);
/**
debugfs_remove_recursive(il->debugfs_dir);
il->debugfs_dir = NULL;
}
-
EXPORT_SYMBOL(il_dbgfs_unregister);