提交 f03ee2a8 编写于 作者: S Stanislaw Gruszka 提交者: John W. Linville

iwlegacy: remove il_apm_ops

Signed-off-by: NStanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
上级 a89268e8
...@@ -3672,7 +3672,7 @@ il3945_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent) ...@@ -3672,7 +3672,7 @@ il3945_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
* PCI Tx retries from interfering with C3 CPU state */ * PCI Tx retries from interfering with C3 CPU state */
pci_write_config_byte(pdev, 0x41, 0x00); pci_write_config_byte(pdev, 0x41, 0x00);
/* these spin locks will be used in apm_ops.init and EEPROM access /* these spin locks will be used in apm_init and EEPROM access
* we should init now * we should init now
*/ */
spin_lock_init(&il->reg_lock); spin_lock_init(&il->reg_lock);
......
...@@ -958,12 +958,11 @@ il3945_hw_nic_init(struct il_priv *il) ...@@ -958,12 +958,11 @@ il3945_hw_nic_init(struct il_priv *il)
struct il_rx_queue *rxq = &il->rxq; struct il_rx_queue *rxq = &il->rxq;
spin_lock_irqsave(&il->lock, flags); spin_lock_irqsave(&il->lock, flags);
il->ops->lib->apm_ops.init(il); il3945_apm_init(il);
spin_unlock_irqrestore(&il->lock, flags); spin_unlock_irqrestore(&il->lock, flags);
il3945_set_pwr_vmain(il); il3945_set_pwr_vmain(il);
il3945_nic_config(il);
il->ops->lib->apm_ops.config(il);
/* Allocate the RX queue, or reset if it is already allocated */ /* Allocate the RX queue, or reset if it is already allocated */
if (!rxq->bd) { if (!rxq->bd) {
...@@ -2641,10 +2640,7 @@ static struct il_lib_ops il3945_lib = { ...@@ -2641,10 +2640,7 @@ static struct il_lib_ops il3945_lib = {
.txq_init = il3945_hw_tx_queue_init, .txq_init = il3945_hw_tx_queue_init,
.load_ucode = il3945_load_bsm, .load_ucode = il3945_load_bsm,
.dump_nic_error_log = il3945_dump_nic_error_log, .dump_nic_error_log = il3945_dump_nic_error_log,
.apm_ops = { .apm_init = il3945_apm_init,
.init = il3945_apm_init,
.config = il3945_nic_config,
},
.send_tx_power = il3945_send_tx_power, .send_tx_power = il3945_send_tx_power,
.is_valid_rtc_data_addr = il3945_hw_valid_rtc_data_addr, .is_valid_rtc_data_addr = il3945_hw_valid_rtc_data_addr,
.eeprom_acquire_semaphore = il3945_eeprom_acquire_semaphore, .eeprom_acquire_semaphore = il3945_eeprom_acquire_semaphore,
......
...@@ -199,18 +199,14 @@ il4965_hw_nic_init(struct il_priv *il) ...@@ -199,18 +199,14 @@ il4965_hw_nic_init(struct il_priv *il)
struct il_rx_queue *rxq = &il->rxq; struct il_rx_queue *rxq = &il->rxq;
int ret; int ret;
/* nic_init */
spin_lock_irqsave(&il->lock, flags); spin_lock_irqsave(&il->lock, flags);
il->ops->lib->apm_ops.init(il); il_apm_init(il);
/* Set interrupt coalescing calibration timer to default (512 usecs) */ /* Set interrupt coalescing calibration timer to default (512 usecs) */
il_write8(il, CSR_INT_COALESCING, IL_HOST_INT_CALIB_TIMEOUT_DEF); il_write8(il, CSR_INT_COALESCING, IL_HOST_INT_CALIB_TIMEOUT_DEF);
spin_unlock_irqrestore(&il->lock, flags); spin_unlock_irqrestore(&il->lock, flags);
il4965_set_pwr_vmain(il); il4965_set_pwr_vmain(il);
il4965_nic_config(il);
il->ops->lib->apm_ops.config(il);
/* Allocate the RX queue, or reset if it is already allocated */ /* Allocate the RX queue, or reset if it is already allocated */
if (!rxq->bd) { if (!rxq->bd) {
......
...@@ -508,7 +508,7 @@ iw4965_is_ht40_channel(__le32 rxon_flags) ...@@ -508,7 +508,7 @@ iw4965_is_ht40_channel(__le32 rxon_flags)
chan_mod == CHANNEL_MODE_MIXED); chan_mod == CHANNEL_MODE_MIXED);
} }
static void void
il4965_nic_config(struct il_priv *il) il4965_nic_config(struct il_priv *il)
{ {
unsigned long flags; unsigned long flags;
...@@ -1900,10 +1900,7 @@ static struct il_lib_ops il4965_lib = { ...@@ -1900,10 +1900,7 @@ static struct il_lib_ops il4965_lib = {
.dump_nic_error_log = il4965_dump_nic_error_log, .dump_nic_error_log = il4965_dump_nic_error_log,
.dump_fh = il4965_dump_fh, .dump_fh = il4965_dump_fh,
.set_channel_switch = il4965_hw_channel_switch, .set_channel_switch = il4965_hw_channel_switch,
.apm_ops = { .apm_init = il_apm_init,
.init = il_apm_init,
.config = il4965_nic_config,
},
.send_tx_power = il4965_send_tx_power, .send_tx_power = il4965_send_tx_power,
.update_chain_flags = il4965_update_chain_flags, .update_chain_flags = il4965_update_chain_flags,
.eeprom_acquire_semaphore = il4965_eeprom_acquire_semaphore, .eeprom_acquire_semaphore = il4965_eeprom_acquire_semaphore,
......
...@@ -60,6 +60,8 @@ int il4965_rx_init(struct il_priv *il, struct il_rx_queue *rxq); ...@@ -60,6 +60,8 @@ int il4965_rx_init(struct il_priv *il, struct il_rx_queue *rxq);
int il4965_hw_nic_init(struct il_priv *il); int il4965_hw_nic_init(struct il_priv *il);
int il4965_dump_fh(struct il_priv *il, char **buf, bool display); int il4965_dump_fh(struct il_priv *il, char **buf, bool display);
void il4965_nic_config(struct il_priv *il);
/* rx */ /* rx */
void il4965_rx_queue_restock(struct il_priv *il); void il4965_rx_queue_restock(struct il_priv *il);
void il4965_rx_replenish(struct il_priv *il); void il4965_rx_replenish(struct il_priv *il);
......
...@@ -730,7 +730,7 @@ il_eeprom_init(struct il_priv *il) ...@@ -730,7 +730,7 @@ il_eeprom_init(struct il_priv *il)
} }
e = (__le16 *) il->eeprom; e = (__le16 *) il->eeprom;
il->ops->lib->apm_ops.init(il); il->ops->lib->apm_init(il);
ret = il_eeprom_verify_signature(il); ret = il_eeprom_verify_signature(il);
if (ret < 0) { if (ret < 0) {
......
...@@ -1566,11 +1566,6 @@ struct il_hcmd_utils_ops { ...@@ -1566,11 +1566,6 @@ struct il_hcmd_utils_ops {
void (*post_scan) (struct il_priv *il); void (*post_scan) (struct il_priv *il);
}; };
struct il_apm_ops {
int (*init) (struct il_priv *il);
void (*config) (struct il_priv *il);
};
#ifdef CONFIG_IWLEGACY_DEBUGFS #ifdef CONFIG_IWLEGACY_DEBUGFS
struct il_debugfs_ops { struct il_debugfs_ops {
ssize_t(*rx_stats_read) (struct file *file, char __user *user_buf, ssize_t(*rx_stats_read) (struct file *file, char __user *user_buf,
...@@ -1605,9 +1600,9 @@ struct il_lib_ops { ...@@ -1605,9 +1600,9 @@ struct il_lib_ops {
int (*set_channel_switch) (struct il_priv *il, int (*set_channel_switch) (struct il_priv *il,
struct ieee80211_channel_switch *ch_switch); struct ieee80211_channel_switch *ch_switch);
/* power management */ /* power management */
struct il_apm_ops apm_ops; int (*apm_init) (struct il_priv *il);
/* power */ /* tx power */
int (*send_tx_power) (struct il_priv *il); int (*send_tx_power) (struct il_priv *il);
void (*update_chain_flags) (struct il_priv *il); void (*update_chain_flags) (struct il_priv *il);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册