linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Stanislaw Gruszka <sgruszka@redhat.com>
To: "John W. Linville" <linville@tuxdriver.com>
Cc: linux-wireless@vger.kernel.org, Stanislaw Gruszka <sgruszka@redhat.com>
Subject: [PATCH 10/24] iwlegacy: remove il_apm_ops
Date: Mon, 13 Feb 2012 11:23:17 +0100	[thread overview]
Message-ID: <1329128611-6815-11-git-send-email-sgruszka@redhat.com> (raw)
In-Reply-To: <1329128611-6815-1-git-send-email-sgruszka@redhat.com>

Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
---
 drivers/net/wireless/iwlegacy/3945-mac.c |    2 +-
 drivers/net/wireless/iwlegacy/3945.c     |   10 +++-------
 drivers/net/wireless/iwlegacy/4965-mac.c |    8 ++------
 drivers/net/wireless/iwlegacy/4965.c     |    7 ++-----
 drivers/net/wireless/iwlegacy/4965.h     |    2 ++
 drivers/net/wireless/iwlegacy/common.c   |    2 +-
 drivers/net/wireless/iwlegacy/common.h   |    9 ++-------
 7 files changed, 13 insertions(+), 27 deletions(-)

diff --git a/drivers/net/wireless/iwlegacy/3945-mac.c b/drivers/net/wireless/iwlegacy/3945-mac.c
index b7d5ebc..ba01d2d 100644
--- a/drivers/net/wireless/iwlegacy/3945-mac.c
+++ b/drivers/net/wireless/iwlegacy/3945-mac.c
@@ -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_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
 	 */
 	spin_lock_init(&il->reg_lock);
diff --git a/drivers/net/wireless/iwlegacy/3945.c b/drivers/net/wireless/iwlegacy/3945.c
index 95d88b4..a21ec25 100644
--- a/drivers/net/wireless/iwlegacy/3945.c
+++ b/drivers/net/wireless/iwlegacy/3945.c
@@ -958,12 +958,11 @@ il3945_hw_nic_init(struct il_priv *il)
 	struct il_rx_queue *rxq = &il->rxq;
 
 	spin_lock_irqsave(&il->lock, flags);
-	il->ops->lib->apm_ops.init(il);
+	il3945_apm_init(il);
 	spin_unlock_irqrestore(&il->lock, flags);
 
 	il3945_set_pwr_vmain(il);
-
-	il->ops->lib->apm_ops.config(il);
+	il3945_nic_config(il);
 
 	/* Allocate the RX queue, or reset if it is already allocated */
 	if (!rxq->bd) {
@@ -2641,10 +2640,7 @@ static struct il_lib_ops il3945_lib = {
 	.txq_init = il3945_hw_tx_queue_init,
 	.load_ucode = il3945_load_bsm,
 	.dump_nic_error_log = il3945_dump_nic_error_log,
-	.apm_ops = {
-		    .init = il3945_apm_init,
-		    .config = il3945_nic_config,
-		    },
+	.apm_init = il3945_apm_init,
 	.send_tx_power = il3945_send_tx_power,
 	.is_valid_rtc_data_addr = il3945_hw_valid_rtc_data_addr,
 	.eeprom_acquire_semaphore = il3945_eeprom_acquire_semaphore,
diff --git a/drivers/net/wireless/iwlegacy/4965-mac.c b/drivers/net/wireless/iwlegacy/4965-mac.c
index e113dc5..ebfcfc8 100644
--- a/drivers/net/wireless/iwlegacy/4965-mac.c
+++ b/drivers/net/wireless/iwlegacy/4965-mac.c
@@ -199,18 +199,14 @@ il4965_hw_nic_init(struct il_priv *il)
 	struct il_rx_queue *rxq = &il->rxq;
 	int ret;
 
-	/* nic_init */
 	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) */
 	il_write8(il, CSR_INT_COALESCING, IL_HOST_INT_CALIB_TIMEOUT_DEF);
-
 	spin_unlock_irqrestore(&il->lock, flags);
 
 	il4965_set_pwr_vmain(il);
-
-	il->ops->lib->apm_ops.config(il);
+	il4965_nic_config(il);
 
 	/* Allocate the RX queue, or reset if it is already allocated */
 	if (!rxq->bd) {
diff --git a/drivers/net/wireless/iwlegacy/4965.c b/drivers/net/wireless/iwlegacy/4965.c
index 3ddc31f..e5e5ab2 100644
--- a/drivers/net/wireless/iwlegacy/4965.c
+++ b/drivers/net/wireless/iwlegacy/4965.c
@@ -508,7 +508,7 @@ iw4965_is_ht40_channel(__le32 rxon_flags)
 		chan_mod == CHANNEL_MODE_MIXED);
 }
 
-static void
+void
 il4965_nic_config(struct il_priv *il)
 {
 	unsigned long flags;
@@ -1900,10 +1900,7 @@ static struct il_lib_ops il4965_lib = {
 	.dump_nic_error_log = il4965_dump_nic_error_log,
 	.dump_fh = il4965_dump_fh,
 	.set_channel_switch = il4965_hw_channel_switch,
-	.apm_ops = {
-		    .init = il_apm_init,
-		    .config = il4965_nic_config,
-		    },
+	.apm_init = il_apm_init,
 	.send_tx_power = il4965_send_tx_power,
 	.update_chain_flags = il4965_update_chain_flags,
 	.eeprom_acquire_semaphore = il4965_eeprom_acquire_semaphore,
diff --git a/drivers/net/wireless/iwlegacy/4965.h b/drivers/net/wireless/iwlegacy/4965.h
index 7c6b9b9..208a456 100644
--- a/drivers/net/wireless/iwlegacy/4965.h
+++ b/drivers/net/wireless/iwlegacy/4965.h
@@ -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_dump_fh(struct il_priv *il, char **buf, bool display);
 
+void il4965_nic_config(struct il_priv *il);
+
 /* rx */
 void il4965_rx_queue_restock(struct il_priv *il);
 void il4965_rx_replenish(struct il_priv *il);
diff --git a/drivers/net/wireless/iwlegacy/common.c b/drivers/net/wireless/iwlegacy/common.c
index 5de2340..6e63d9f 100644
--- a/drivers/net/wireless/iwlegacy/common.c
+++ b/drivers/net/wireless/iwlegacy/common.c
@@ -730,7 +730,7 @@ il_eeprom_init(struct il_priv *il)
 	}
 	e = (__le16 *) il->eeprom;
 
-	il->ops->lib->apm_ops.init(il);
+	il->ops->lib->apm_init(il);
 
 	ret = il_eeprom_verify_signature(il);
 	if (ret < 0) {
diff --git a/drivers/net/wireless/iwlegacy/common.h b/drivers/net/wireless/iwlegacy/common.h
index b588a5f..ca68b58 100644
--- a/drivers/net/wireless/iwlegacy/common.h
+++ b/drivers/net/wireless/iwlegacy/common.h
@@ -1566,11 +1566,6 @@ struct il_hcmd_utils_ops {
 	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
 struct il_debugfs_ops {
 	ssize_t(*rx_stats_read) (struct file *file, char __user *user_buf,
@@ -1605,9 +1600,9 @@ struct il_lib_ops {
 	int (*set_channel_switch) (struct il_priv *il,
 				   struct ieee80211_channel_switch *ch_switch);
 	/* 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);
 	void (*update_chain_flags) (struct il_priv *il);
 
-- 
1.7.1


  parent reply	other threads:[~2012-02-13 10:24 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-02-13 10:23 [PATCH 00/24] iwlegacy update 2012-02-13 Stanislaw Gruszka
2012-02-13 10:23 ` [PATCH 01/24] iwlegacy: dump stack when fail to gain access to the device Stanislaw Gruszka
2012-02-13 10:23 ` [PATCH 02/24] iwlegacy: always check if got h/w access before write Stanislaw Gruszka
2012-02-13 10:23 ` [PATCH 03/24] iwlegacy: cleanup/fix memory barriers Stanislaw Gruszka
2012-02-13 10:23 ` [PATCH 04/24] iwlegacy: use writeb,writel,readl directly Stanislaw Gruszka
2012-02-13 10:23 ` [PATCH 05/24] iwlegacy: regulatory_bands is not an ops Stanislaw Gruszka
2012-02-13 10:23 ` [PATCH 06/24] iwlegacy: gather all 4965 handlers in one place Stanislaw Gruszka
2012-02-13 10:23 ` [PATCH 07/24] iwlegacy: move debugfs_ops to il_priv Stanislaw Gruszka
2012-02-13 10:23 ` [PATCH 08/24] iwlegacy: remove temp_ops Stanislaw Gruszka
2012-02-13 10:23 ` [PATCH 09/24] iwlegacy: merge eeprom_ops into lib_ops Stanislaw Gruszka
2012-02-13 10:23 ` Stanislaw Gruszka [this message]
2012-02-13 10:23 ` [PATCH 11/24] iwlegacy: merge il_lib_ops into il_ops Stanislaw Gruszka
2012-02-13 10:23 ` [PATCH 12/24] iwlegacy: merge all ops structures into one Stanislaw Gruszka
2012-02-13 10:23 ` [PATCH 13/24] iwlegacy: get rid of tx/rx traffic log Stanislaw Gruszka
2012-02-13 10:23 ` [PATCH 14/24] iwlegacy: improve mac operation debuggability a bit Stanislaw Gruszka
2012-02-13 10:23 ` [PATCH 15/24] iwleagcy: remove old comments Stanislaw Gruszka
2012-02-13 10:23 ` [PATCH 16/24] iwleagcy: fix ident code damage Stanislaw Gruszka
2012-02-13 10:23 ` [PATCH 17/24] iwlegacy: do not grab nic access if rfkill Stanislaw Gruszka
2012-02-13 10:23 ` [PATCH 18/24] iwlegacy: check correct il_poll_bit error value Stanislaw Gruszka
2012-02-13 10:23 ` [PATCH 19/24] iwlegacy: small il4965_set_hw_ready cleanup Stanislaw Gruszka
2012-02-13 10:23 ` [PATCH 20/24] iwlegacy: only enable rfkill interrupt during UP Stanislaw Gruszka
2012-02-13 16:19   ` Dan Williams
2012-02-13 16:43     ` Stanislaw Gruszka
2012-02-14  7:50   ` [PATCH 20/24 v2] iwlegacy: enable only rfkill interrupt when rfkill switch is on during IFF_UP Stanislaw Gruszka
2012-02-13 10:23 ` [PATCH 21/24] iwlegacy: small queue initializations cleanup Stanislaw Gruszka
2012-02-13 10:23 ` [PATCH 22/24] iwlegacy: s/S_RF_KILL_HW/S_RFKILL/g Stanislaw Gruszka
2012-02-13 10:23 ` [PATCH 23/24] iwlegacy: s/il_txq_mem/il_free_txq_mem/g Stanislaw Gruszka
2012-02-13 10:23 ` [PATCH 24/24] iwlegacy: remove il_is_rfkill_hw Stanislaw Gruszka

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1329128611-6815-11-git-send-email-sgruszka@redhat.com \
    --to=sgruszka@redhat.com \
    --cc=linux-wireless@vger.kernel.org \
    --cc=linville@tuxdriver.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).