iwlagn: Remove un-necessary indirect call
authorWey-Yi Guy <wey-yi.w.guy@intel.com>
Sat, 18 Jun 2011 15:03:18 +0000 (08:03 -0700)
committerWey-Yi Guy <wey-yi.w.guy@intel.com>
Sat, 18 Jun 2011 15:03:18 +0000 (08:03 -0700)
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
drivers/net/wireless/iwlwifi/iwl-2000.c
drivers/net/wireless/iwlwifi/iwl-5000.c
drivers/net/wireless/iwlwifi/iwl-6000.c
drivers/net/wireless/iwlwifi/iwl-agn-lib.c
drivers/net/wireless/iwlwifi/iwl-agn.c
drivers/net/wireless/iwlwifi/iwl-core.h
drivers/net/wireless/iwlwifi/iwl-debugfs.c

index 7aa240e6ba1c57e13f5ec2c3979c0ef89b24c198..454b5410b708f9a8382c6279bd3500131777b926 100644 (file)
@@ -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 = {
index 5484ab712da80c7145f1d5faf172c84635321306..a6a259b7cbe71ca4006368d99edcb88ce042e58c 100644 (file)
@@ -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 = {
index 4353a658de25db60822d48638f40189913befa6a..c71fa4495d88acca8299751e8badfb0447560680 100644 (file)
@@ -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 = {
index 6e5ce44784906e30b13ba318a71e8b1056cea569..b3785ec3f4aff294901ad7a8398023b67abdaed6 100644 (file)
@@ -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 = {
index a8c1e2493dc71b90e86f86167477791fadb42ddb..3d9e1e867429123b67f85d54813d34066012153a 100644 (file)
@@ -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;
        }
index 0acf92919048d6970b9eb7018978b8402799edbe..d66f1c29232e19cb3d5131f61073077831153add 100644 (file)
@@ -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;
                }
index 83ec5eb64ede07b2dbfa35a29f241a2da269e690..84f28e106316c89577ad3750a10cb26746f17855 100644 (file)
@@ -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 */
index 5f335c7815b51c404a5f54e11988db9a5e1e08b8..6f9ebae8ca06cc8ea02043a7bbfc451bc999c935 100644 (file)
@@ -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);