iwlagn: remove un-necessary function pointer

After driver split, no need to use function pointer for those event and
register dump function.

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
This commit is contained in:
Wey-Yi Guy 2011-03-29 17:53:15 -07:00
parent 1d5cc5559a
commit 3ecccbcd3c
8 changed files with 14 additions and 50 deletions

View File

@ -182,10 +182,6 @@ static struct iwl_lib_ops iwl1000_lib = {
.rx_handler_setup = iwlagn_rx_handler_setup, .rx_handler_setup = iwlagn_rx_handler_setup,
.setup_deferred_work = iwlagn_setup_deferred_work, .setup_deferred_work = iwlagn_setup_deferred_work,
.is_valid_rtc_data_addr = iwlagn_hw_valid_rtc_data_addr, .is_valid_rtc_data_addr = iwlagn_hw_valid_rtc_data_addr,
.dump_nic_event_log = iwl_dump_nic_event_log,
.dump_nic_error_log = iwl_dump_nic_error_log,
.dump_csr = iwl_dump_csr,
.dump_fh = iwl_dump_fh,
.send_tx_power = iwlagn_send_tx_power, .send_tx_power = iwlagn_send_tx_power,
.update_chain_flags = iwl_update_chain_flags, .update_chain_flags = iwl_update_chain_flags,
.apm_ops = { .apm_ops = {

View File

@ -262,10 +262,6 @@ static struct iwl_lib_ops iwl2000_lib = {
.setup_deferred_work = iwlagn_bt_setup_deferred_work, .setup_deferred_work = iwlagn_bt_setup_deferred_work,
.cancel_deferred_work = iwlagn_bt_cancel_deferred_work, .cancel_deferred_work = iwlagn_bt_cancel_deferred_work,
.is_valid_rtc_data_addr = iwlagn_hw_valid_rtc_data_addr, .is_valid_rtc_data_addr = iwlagn_hw_valid_rtc_data_addr,
.dump_nic_event_log = iwl_dump_nic_event_log,
.dump_nic_error_log = iwl_dump_nic_error_log,
.dump_csr = iwl_dump_csr,
.dump_fh = iwl_dump_fh,
.send_tx_power = iwlagn_send_tx_power, .send_tx_power = iwlagn_send_tx_power,
.update_chain_flags = iwl_update_chain_flags, .update_chain_flags = iwl_update_chain_flags,
.set_channel_switch = iwl2030_hw_channel_switch, .set_channel_switch = iwl2030_hw_channel_switch,

View File

@ -350,10 +350,6 @@ static struct iwl_lib_ops iwl5000_lib = {
.rx_handler_setup = iwlagn_rx_handler_setup, .rx_handler_setup = iwlagn_rx_handler_setup,
.setup_deferred_work = iwlagn_setup_deferred_work, .setup_deferred_work = iwlagn_setup_deferred_work,
.is_valid_rtc_data_addr = iwlagn_hw_valid_rtc_data_addr, .is_valid_rtc_data_addr = iwlagn_hw_valid_rtc_data_addr,
.dump_nic_event_log = iwl_dump_nic_event_log,
.dump_nic_error_log = iwl_dump_nic_error_log,
.dump_csr = iwl_dump_csr,
.dump_fh = iwl_dump_fh,
.send_tx_power = iwlagn_send_tx_power, .send_tx_power = iwlagn_send_tx_power,
.update_chain_flags = iwl_update_chain_flags, .update_chain_flags = iwl_update_chain_flags,
.set_channel_switch = iwl5000_hw_channel_switch, .set_channel_switch = iwl5000_hw_channel_switch,
@ -406,9 +402,6 @@ static struct iwl_lib_ops iwl5150_lib = {
.rx_handler_setup = iwlagn_rx_handler_setup, .rx_handler_setup = iwlagn_rx_handler_setup,
.setup_deferred_work = iwlagn_setup_deferred_work, .setup_deferred_work = iwlagn_setup_deferred_work,
.is_valid_rtc_data_addr = iwlagn_hw_valid_rtc_data_addr, .is_valid_rtc_data_addr = iwlagn_hw_valid_rtc_data_addr,
.dump_nic_event_log = iwl_dump_nic_event_log,
.dump_nic_error_log = iwl_dump_nic_error_log,
.dump_csr = iwl_dump_csr,
.send_tx_power = iwlagn_send_tx_power, .send_tx_power = iwlagn_send_tx_power,
.update_chain_flags = iwl_update_chain_flags, .update_chain_flags = iwl_update_chain_flags,
.set_channel_switch = iwl5000_hw_channel_switch, .set_channel_switch = iwl5000_hw_channel_switch,

View File

@ -289,10 +289,6 @@ static struct iwl_lib_ops iwl6000_lib = {
.rx_handler_setup = iwlagn_rx_handler_setup, .rx_handler_setup = iwlagn_rx_handler_setup,
.setup_deferred_work = iwlagn_setup_deferred_work, .setup_deferred_work = iwlagn_setup_deferred_work,
.is_valid_rtc_data_addr = iwlagn_hw_valid_rtc_data_addr, .is_valid_rtc_data_addr = iwlagn_hw_valid_rtc_data_addr,
.dump_nic_event_log = iwl_dump_nic_event_log,
.dump_nic_error_log = iwl_dump_nic_error_log,
.dump_csr = iwl_dump_csr,
.dump_fh = iwl_dump_fh,
.send_tx_power = iwlagn_send_tx_power, .send_tx_power = iwlagn_send_tx_power,
.update_chain_flags = iwl_update_chain_flags, .update_chain_flags = iwl_update_chain_flags,
.set_channel_switch = iwl6000_hw_channel_switch, .set_channel_switch = iwl6000_hw_channel_switch,
@ -347,10 +343,6 @@ static struct iwl_lib_ops iwl6030_lib = {
.setup_deferred_work = iwlagn_bt_setup_deferred_work, .setup_deferred_work = iwlagn_bt_setup_deferred_work,
.cancel_deferred_work = iwlagn_bt_cancel_deferred_work, .cancel_deferred_work = iwlagn_bt_cancel_deferred_work,
.is_valid_rtc_data_addr = iwlagn_hw_valid_rtc_data_addr, .is_valid_rtc_data_addr = iwlagn_hw_valid_rtc_data_addr,
.dump_nic_event_log = iwl_dump_nic_event_log,
.dump_nic_error_log = iwl_dump_nic_error_log,
.dump_csr = iwl_dump_csr,
.dump_fh = iwl_dump_fh,
.send_tx_power = iwlagn_send_tx_power, .send_tx_power = iwlagn_send_tx_power,
.update_chain_flags = iwl_update_chain_flags, .update_chain_flags = iwl_update_chain_flags,
.set_channel_switch = iwl6000_hw_channel_switch, .set_channel_switch = iwl6000_hw_channel_switch,

View File

@ -173,8 +173,6 @@ int iwlagn_hw_nic_init(struct iwl_priv *priv);
int iwlagn_wait_tx_queue_empty(struct iwl_priv *priv); int iwlagn_wait_tx_queue_empty(struct iwl_priv *priv);
int iwlagn_txfifo_flush(struct iwl_priv *priv, u16 flush_control); int iwlagn_txfifo_flush(struct iwl_priv *priv, u16 flush_control);
void iwlagn_dev_txfifo_flush(struct iwl_priv *priv, u16 flush_control); void iwlagn_dev_txfifo_flush(struct iwl_priv *priv, u16 flush_control);
void iwl_dump_csr(struct iwl_priv *priv);
int iwl_dump_fh(struct iwl_priv *priv, char **buf, bool display);
/* rx */ /* rx */
void iwlagn_rx_queue_restock(struct iwl_priv *priv); void iwlagn_rx_queue_restock(struct iwl_priv *priv);

View File

@ -965,12 +965,10 @@ void iwl_irq_handle_error(struct iwl_priv *priv)
IWL_ERR(priv, "Loaded firmware version: %s\n", IWL_ERR(priv, "Loaded firmware version: %s\n",
priv->hw->wiphy->fw_version); priv->hw->wiphy->fw_version);
priv->cfg->ops->lib->dump_nic_error_log(priv); iwl_dump_nic_error_log(priv);
if (priv->cfg->ops->lib->dump_csr) iwl_dump_csr(priv);
priv->cfg->ops->lib->dump_csr(priv); iwl_dump_fh(priv, NULL, false);
if (priv->cfg->ops->lib->dump_fh) iwl_dump_nic_event_log(priv, false, NULL, false);
priv->cfg->ops->lib->dump_fh(priv, NULL, false);
priv->cfg->ops->lib->dump_nic_event_log(priv, false, NULL, false);
#ifdef CONFIG_IWLWIFI_DEBUG #ifdef CONFIG_IWLWIFI_DEBUG
if (iwl_get_debug_level(priv) & IWL_DL_FW_ERRORS) if (iwl_get_debug_level(priv) & IWL_DL_FW_ERRORS)
iwl_print_rx_config_cmd(priv, iwl_print_rx_config_cmd(priv,

View File

@ -171,12 +171,6 @@ struct iwl_lib_ops {
void (*cancel_deferred_work)(struct iwl_priv *priv); void (*cancel_deferred_work)(struct iwl_priv *priv);
/* check validity of rtc data address */ /* check validity of rtc data address */
int (*is_valid_rtc_data_addr)(u32 addr); int (*is_valid_rtc_data_addr)(u32 addr);
int (*dump_nic_event_log)(struct iwl_priv *priv,
bool full_log, char **buf, bool display);
void (*dump_nic_error_log)(struct iwl_priv *priv);
void (*dump_csr)(struct iwl_priv *priv);
int (*dump_fh)(struct iwl_priv *priv, char **buf, bool display);
int (*set_channel_switch)(struct iwl_priv *priv, int (*set_channel_switch)(struct iwl_priv *priv,
struct ieee80211_channel_switch *ch_switch); struct ieee80211_channel_switch *ch_switch);
/* power management */ /* power management */
@ -598,6 +592,8 @@ extern const struct dev_pm_ops iwl_pm_ops;
void iwl_dump_nic_error_log(struct iwl_priv *priv); void iwl_dump_nic_error_log(struct iwl_priv *priv);
int iwl_dump_nic_event_log(struct iwl_priv *priv, int iwl_dump_nic_event_log(struct iwl_priv *priv,
bool full_log, char **buf, bool display); bool full_log, char **buf, bool display);
void iwl_dump_csr(struct iwl_priv *priv);
int iwl_dump_fh(struct iwl_priv *priv, char **buf, bool display);
#ifdef CONFIG_IWLWIFI_DEBUG #ifdef CONFIG_IWLWIFI_DEBUG
void iwl_print_rx_config_cmd(struct iwl_priv *priv, void iwl_print_rx_config_cmd(struct iwl_priv *priv,
struct iwl_rxon_context *ctx); struct iwl_rxon_context *ctx);

View File

@ -437,8 +437,7 @@ static ssize_t iwl_dbgfs_log_event_read(struct file *file,
int pos = 0; int pos = 0;
ssize_t ret = -ENOMEM; ssize_t ret = -ENOMEM;
ret = pos = priv->cfg->ops->lib->dump_nic_event_log( ret = pos = iwl_dump_nic_event_log(priv, true, &buf, true);
priv, true, &buf, true);
if (buf) { if (buf) {
ret = simple_read_from_buffer(user_buf, count, ppos, buf, pos); ret = simple_read_from_buffer(user_buf, count, ppos, buf, pos);
kfree(buf); kfree(buf);
@ -462,8 +461,7 @@ static ssize_t iwl_dbgfs_log_event_write(struct file *file,
if (sscanf(buf, "%d", &event_log_flag) != 1) if (sscanf(buf, "%d", &event_log_flag) != 1)
return -EFAULT; return -EFAULT;
if (event_log_flag == 1) if (event_log_flag == 1)
priv->cfg->ops->lib->dump_nic_event_log(priv, true, iwl_dump_nic_event_log(priv, true, NULL, false);
NULL, false);
return count; return count;
} }
@ -1268,8 +1266,7 @@ static ssize_t iwl_dbgfs_csr_write(struct file *file,
if (sscanf(buf, "%d", &csr) != 1) if (sscanf(buf, "%d", &csr) != 1)
return -EFAULT; return -EFAULT;
if (priv->cfg->ops->lib->dump_csr) iwl_dump_csr(priv);
priv->cfg->ops->lib->dump_csr(priv);
return count; return count;
} }
@ -1359,14 +1356,12 @@ static ssize_t iwl_dbgfs_fh_reg_read(struct file *file,
int pos = 0; int pos = 0;
ssize_t ret = -EFAULT; ssize_t ret = -EFAULT;
if (priv->cfg->ops->lib->dump_fh) { ret = pos = iwl_dump_fh(priv, &buf, true);
ret = pos = priv->cfg->ops->lib->dump_fh(priv, &buf, true);
if (buf) { if (buf) {
ret = simple_read_from_buffer(user_buf, ret = simple_read_from_buffer(user_buf,
count, ppos, buf, pos); count, ppos, buf, pos);
kfree(buf); kfree(buf);
} }
}
return ret; return ret;
} }