Linux wireless drivers development
 help / color / mirror / Atom feed
From: Wey-Yi Guy <wey-yi.w.guy@intel.com>
To: linville@tuxdriver.com
Cc: linux-wireless@vger.kernel.org, Wey-Yi Guy <wey-yi.w.guy@intel.com>
Subject: [PATCH 01/25] iwlagn: Remove un-necessary indirect call
Date: Sat, 18 Jun 2011 08:34:07 -0700	[thread overview]
Message-ID: <1308411271-26093-2-git-send-email-wey-yi.w.guy@intel.com> (raw)
In-Reply-To: <1308411271-26093-1-git-send-email-wey-yi.w.guy@intel.com>

After driver split, no need to make indirect call to txfifo flush function

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
---
 drivers/net/wireless/iwlwifi/iwl-1000.c    |    2 --
 drivers/net/wireless/iwlwifi/iwl-2000.c    |    2 --
 drivers/net/wireless/iwlwifi/iwl-5000.c    |    4 ----
 drivers/net/wireless/iwlwifi/iwl-6000.c    |    4 ----
 drivers/net/wireless/iwlwifi/iwl-agn-lib.c |    2 +-
 drivers/net/wireless/iwlwifi/iwl-agn.c     |   12 +++---------
 drivers/net/wireless/iwlwifi/iwl-core.h    |    4 ----
 drivers/net/wireless/iwlwifi/iwl-debugfs.c |    5 ++---
 8 files changed, 6 insertions(+), 29 deletions(-)

diff --git a/drivers/net/wireless/iwlwifi/iwl-1000.c b/drivers/net/wireless/iwlwifi/iwl-1000.c
index 7aa240e..454b541 100644
--- a/drivers/net/wireless/iwlwifi/iwl-1000.c
+++ b/drivers/net/wireless/iwlwifi/iwl-1000.c
@@ -194,8 +194,6 @@ static struct iwl_lib_ops iwl1000_lib = {
 	.temp_ops = {
 		.temperature = iwlagn_temperature,
 	 },
-	.txfifo_flush = iwlagn_txfifo_flush,
-	.dev_txfifo_flush = iwlagn_dev_txfifo_flush,
 };
 
 static const struct iwl_ops iwl1000_ops = {
diff --git a/drivers/net/wireless/iwlwifi/iwl-2000.c b/drivers/net/wireless/iwlwifi/iwl-2000.c
index 5484ab7..a6a259b 100644
--- a/drivers/net/wireless/iwlwifi/iwl-2000.c
+++ b/drivers/net/wireless/iwlwifi/iwl-2000.c
@@ -204,8 +204,6 @@ static struct iwl_lib_ops iwl2000_lib = {
 	.temp_ops = {
 		.temperature = iwlagn_temperature,
 	},
-	.txfifo_flush = iwlagn_txfifo_flush,
-	.dev_txfifo_flush = iwlagn_dev_txfifo_flush,
 };
 
 static const struct iwl_ops iwl2000_ops = {
diff --git a/drivers/net/wireless/iwlwifi/iwl-5000.c b/drivers/net/wireless/iwlwifi/iwl-5000.c
index 4353a65..c71fa44 100644
--- a/drivers/net/wireless/iwlwifi/iwl-5000.c
+++ b/drivers/net/wireless/iwlwifi/iwl-5000.c
@@ -361,8 +361,6 @@ static struct iwl_lib_ops iwl5000_lib = {
 	.temp_ops = {
 		.temperature = iwlagn_temperature,
 	 },
-	.txfifo_flush = iwlagn_txfifo_flush,
-	.dev_txfifo_flush = iwlagn_dev_txfifo_flush,
 };
 
 static struct iwl_lib_ops iwl5150_lib = {
@@ -391,8 +389,6 @@ static struct iwl_lib_ops iwl5150_lib = {
 	.temp_ops = {
 		.temperature = iwl5150_temperature,
 	 },
-	.txfifo_flush = iwlagn_txfifo_flush,
-	.dev_txfifo_flush = iwlagn_dev_txfifo_flush,
 };
 
 static const struct iwl_ops iwl5000_ops = {
diff --git a/drivers/net/wireless/iwlwifi/iwl-6000.c b/drivers/net/wireless/iwlwifi/iwl-6000.c
index 6e5ce44..b3785ec 100644
--- a/drivers/net/wireless/iwlwifi/iwl-6000.c
+++ b/drivers/net/wireless/iwlwifi/iwl-6000.c
@@ -301,8 +301,6 @@ static struct iwl_lib_ops iwl6000_lib = {
 	.temp_ops = {
 		.temperature = iwlagn_temperature,
 	 },
-	.txfifo_flush = iwlagn_txfifo_flush,
-	.dev_txfifo_flush = iwlagn_dev_txfifo_flush,
 };
 
 static struct iwl_lib_ops iwl6030_lib = {
@@ -333,8 +331,6 @@ static struct iwl_lib_ops iwl6030_lib = {
 	.temp_ops = {
 		.temperature = iwlagn_temperature,
 	 },
-	.txfifo_flush = iwlagn_txfifo_flush,
-	.dev_txfifo_flush = iwlagn_dev_txfifo_flush,
 };
 
 static struct iwl_nic_ops iwl6050_nic_ops = {
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn-lib.c b/drivers/net/wireless/iwlwifi/iwl-agn-lib.c
index a8c1e24..3d9e1e8 100644
--- a/drivers/net/wireless/iwlwifi/iwl-agn-lib.c
+++ b/drivers/net/wireless/iwlwifi/iwl-agn-lib.c
@@ -1546,7 +1546,7 @@ void iwlagn_dev_txfifo_flush(struct iwl_priv *priv, u16 flush_control)
 {
 	mutex_lock(&priv->mutex);
 	ieee80211_stop_queues(priv->hw);
-	if (priv->cfg->ops->lib->txfifo_flush(priv, IWL_DROP_ALL)) {
+	if (iwlagn_txfifo_flush(priv, IWL_DROP_ALL)) {
 		IWL_ERR(priv, "flush request fail\n");
 		goto done;
 	}
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn.c b/drivers/net/wireless/iwlwifi/iwl-agn.c
index 0acf929..d66f1c2 100644
--- a/drivers/net/wireless/iwlwifi/iwl-agn.c
+++ b/drivers/net/wireless/iwlwifi/iwl-agn.c
@@ -440,10 +440,8 @@ static void iwl_bg_tx_flush(struct work_struct *work)
 	if (!iwl_is_ready_rf(priv))
 		return;
 
-	if (priv->cfg->ops->lib->txfifo_flush) {
-		IWL_DEBUG_INFO(priv, "device request: flush all tx frames\n");
-		iwlagn_dev_txfifo_flush(priv, IWL_DROP_ALL);
-	}
+	IWL_DEBUG_INFO(priv, "device request: flush all tx frames\n");
+	iwlagn_dev_txfifo_flush(priv, IWL_DROP_ALL);
 }
 
 /**
@@ -3052,10 +3050,6 @@ static void iwlagn_mac_flush(struct ieee80211_hw *hw, bool drop)
 	mutex_lock(&priv->mutex);
 	IWL_DEBUG_MAC80211(priv, "enter\n");
 
-	/* do not support "flush" */
-	if (!priv->cfg->ops->lib->txfifo_flush)
-		goto done;
-
 	if (test_bit(STATUS_EXIT_PENDING, &priv->status)) {
 		IWL_DEBUG_TX(priv, "Aborting flush due to device shutdown\n");
 		goto done;
@@ -3071,7 +3065,7 @@ static void iwlagn_mac_flush(struct ieee80211_hw *hw, bool drop)
 	 */
 	if (drop) {
 		IWL_DEBUG_MAC80211(priv, "send flush command\n");
-		if (priv->cfg->ops->lib->txfifo_flush(priv, IWL_DROP_ALL)) {
+		if (iwlagn_txfifo_flush(priv, IWL_DROP_ALL)) {
 			IWL_ERR(priv, "flush request fail\n");
 			goto done;
 		}
diff --git a/drivers/net/wireless/iwlwifi/iwl-core.h b/drivers/net/wireless/iwlwifi/iwl-core.h
index 83ec5eb..84f28e1 100644
--- a/drivers/net/wireless/iwlwifi/iwl-core.h
+++ b/drivers/net/wireless/iwlwifi/iwl-core.h
@@ -142,10 +142,6 @@ struct iwl_lib_ops {
 
 	/* temperature */
 	struct iwl_temp_ops temp_ops;
-
-	int (*txfifo_flush)(struct iwl_priv *priv, u16 flush_control);
-	void (*dev_txfifo_flush)(struct iwl_priv *priv, u16 flush_control);
-
 };
 
 /* NIC specific ops */
diff --git a/drivers/net/wireless/iwlwifi/iwl-debugfs.c b/drivers/net/wireless/iwlwifi/iwl-debugfs.c
index 5f335c7..6f9ebae 100644
--- a/drivers/net/wireless/iwlwifi/iwl-debugfs.c
+++ b/drivers/net/wireless/iwlwifi/iwl-debugfs.c
@@ -2493,7 +2493,7 @@ static ssize_t iwl_dbgfs_txfifo_flush_write(struct file *file,
 	if (iwl_is_rfkill(priv))
 		return -EFAULT;
 
-	priv->cfg->ops->lib->dev_txfifo_flush(priv, IWL_DROP_ALL);
+	iwlagn_dev_txfifo_flush(priv, IWL_DROP_ALL);
 
 	return count;
 }
@@ -2693,8 +2693,7 @@ int iwl_dbgfs_register(struct iwl_priv *priv, const char *name)
 	DEBUGFS_ADD_FILE(ucode_rx_stats, dir_debug, S_IRUSR);
 	DEBUGFS_ADD_FILE(ucode_tx_stats, dir_debug, S_IRUSR);
 	DEBUGFS_ADD_FILE(ucode_general_stats, dir_debug, S_IRUSR);
-	if (priv->cfg->ops->lib->dev_txfifo_flush)
-		DEBUGFS_ADD_FILE(txfifo_flush, dir_debug, S_IWUSR);
+	DEBUGFS_ADD_FILE(txfifo_flush, dir_debug, S_IWUSR);
 	DEBUGFS_ADD_FILE(protection_mode, dir_debug, S_IWUSR | S_IRUSR);
 
 	DEBUGFS_ADD_FILE(sensitivity, dir_debug, S_IRUSR);
-- 
1.7.0.4


  reply	other threads:[~2011-06-18 16:05 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-06-18 15:34 [PATCH 00/25] update for 3.1 Wey-Yi Guy
2011-06-18 15:34 ` Wey-Yi Guy [this message]
2011-06-18 15:34 ` [PATCH 02/25] iwlagn: add PAN to tx flush Wey-Yi Guy
2011-06-18 15:34 ` [PATCH 03/25] iwlagn: Support flush queues for specified interface Wey-Yi Guy
2011-06-18 15:34 ` [PATCH 04/25] iwlagn: don't disable interrupts after the NIC has been reset Wey-Yi Guy
2011-06-18 15:34 ` [PATCH 05/25] iwlagn: add a iwl_pci.[ch] files that will contain all PCI specific code Wey-Yi Guy
2011-06-18 15:34 ` [PATCH 06/25] iwlagn: remove uneeded include to pci.h and dma_mapping.h from a few files Wey-Yi Guy
2011-06-18 15:34 ` [PATCH 07/25] iwlagn: introduce iwl_bus and iwl_bus_ops Wey-Yi Guy
2011-06-18 15:34 ` [PATCH 08/25] iwlagn: add get_dev to iwl_bus_ops Wey-Yi Guy
2011-06-18 15:34 ` [PATCH 09/25] iwlagn: move PCI related operations from probe and remove to PCI layer Wey-Yi Guy
2011-06-18 15:34 ` [PATCH 10/25] iwlagn: don't use the PCI wrappers for DMA operation Wey-Yi Guy
2011-06-18 15:34 ` [PATCH 11/25] iwlagn: move PCI power related functions to the PCI layer Wey-Yi Guy
2011-06-18 15:34 ` [PATCH 12/25] iwlagn: add a method to get the HW ID description as a string to iwl_bus_ops Wey-Yi Guy
2011-06-18 15:34 ` [PATCH 13/25] iwlagn: don't read the PCI_REVISION_ID from iwl-agn.c Wey-Yi Guy
2011-06-18 15:34 ` [PATCH 14/25] iwlagn: add a get_irq method to iwl_bus_ops and use it Wey-Yi Guy
2011-06-18 15:34 ` [PATCH 15/25] iwlagn: finally kill the pointer to pci_dev from iwl-dev.h Wey-Yi Guy
2011-06-18 15:34 ` [PATCH 16/25] iwlagn: waterfall the bus level if prepare card failed Wey-Yi Guy
2011-06-18 15:34 ` [PATCH 17/25] iwlagn: fix misplaced bracket Wey-Yi Guy
2011-06-18 15:34 ` [PATCH 18/25] iwlagn: warn about nested SYNC commands Wey-Yi Guy
2011-06-27  8:40   ` Johannes Berg
2011-06-27  8:42     ` Johannes Berg
2011-06-27  8:43       ` Grumbach, Emmanuel
2011-06-27  8:43     ` Grumbach, Emmanuel
2011-06-18 15:34 ` [PATCH 19/25] iwlagn: store the irq number to iwl_bus just like dev Wey-Yi Guy
2011-06-18 15:34 ` [PATCH 20/25] iwlagn: add power_save module parameter Wey-Yi Guy
2011-06-18 15:34 ` [PATCH 21/25] iwlagn: Add power_level " Wey-Yi Guy
2011-06-18 15:34 ` [PATCH 22/25] iwlagn: add offset define for subsystem id Wey-Yi Guy
2011-06-18 15:34 ` [PATCH 23/25] iwlagn: code alignment Wey-Yi Guy
2011-06-18 15:34 ` [PATCH 24/25] iwlagn: merge duplicate code into single function Wey-Yi Guy
2011-06-18 15:34 ` [PATCH 25/25] iwlagn: remove incorrect define Wey-Yi Guy

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=1308411271-26093-2-git-send-email-wey-yi.w.guy@intel.com \
    --to=wey-yi.w.guy@intel.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