iwl3945: use iwl_mac_get_tx_stats from iwlwifi
authorAbhijeet Kolekar <abhijeet.kolekar@intel.com>
Wed, 8 Apr 2009 18:26:51 +0000 (11:26 -0700)
committerJohn W. Linville <linville@tuxdriver.com>
Wed, 22 Apr 2009 20:54:43 +0000 (16:54 -0400)
3945 can now use iwl_mac_get_tx_stats from iwlwifi.

Signed-off-by: Abhijeet Kolekar <abhijeet.kolekar@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/iwlwifi/iwl-agn.c
drivers/net/wireless/iwlwifi/iwl-core.c
drivers/net/wireless/iwlwifi/iwl-core.h
drivers/net/wireless/iwlwifi/iwl3945-base.c

index edfece6e0d4cebbc0676331cdc19414dc8836558..3ebf80fbebabc63f8f23aed8c2c79739969262bf 100644 (file)
@@ -2223,41 +2223,6 @@ static int iwl_mac_ampdu_action(struct ieee80211_hw *hw,
        return 0;
 }
 
-static int iwl_mac_get_tx_stats(struct ieee80211_hw *hw,
-                               struct ieee80211_tx_queue_stats *stats)
-{
-       struct iwl_priv *priv = hw->priv;
-       int i, avail;
-       struct iwl_tx_queue *txq;
-       struct iwl_queue *q;
-       unsigned long flags;
-
-       IWL_DEBUG_MAC80211(priv, "enter\n");
-
-       if (!iwl_is_ready_rf(priv)) {
-               IWL_DEBUG_MAC80211(priv, "leave - RF not ready\n");
-               return -EIO;
-       }
-
-       spin_lock_irqsave(&priv->lock, flags);
-
-       for (i = 0; i < AC_NUM; i++) {
-               txq = &priv->txq[i];
-               q = &txq->q;
-               avail = iwl_queue_space(q);
-
-               stats[i].len = q->n_window - avail;
-               stats[i].limit = q->n_window - q->high_mark;
-               stats[i].count = q->n_window;
-
-       }
-       spin_unlock_irqrestore(&priv->lock, flags);
-
-       IWL_DEBUG_MAC80211(priv, "leave\n");
-
-       return 0;
-}
-
 static int iwl_mac_get_stats(struct ieee80211_hw *hw,
                             struct ieee80211_low_level_stats *stats)
 {
index e8b74fc82515bf2936bde271168a3fa356d0487f..144630b25491284054b3cc683e31f57489778282 100644 (file)
@@ -2679,6 +2679,42 @@ int iwl_mac_config_interface(struct ieee80211_hw *hw,
 }
 EXPORT_SYMBOL(iwl_mac_config_interface);
 
+int iwl_mac_get_tx_stats(struct ieee80211_hw *hw,
+                        struct ieee80211_tx_queue_stats *stats)
+{
+       struct iwl_priv *priv = hw->priv;
+       int i, avail;
+       struct iwl_tx_queue *txq;
+       struct iwl_queue *q;
+       unsigned long flags;
+
+       IWL_DEBUG_MAC80211(priv, "enter\n");
+
+       if (!iwl_is_ready_rf(priv)) {
+               IWL_DEBUG_MAC80211(priv, "leave - RF not ready\n");
+               return -EIO;
+       }
+
+       spin_lock_irqsave(&priv->lock, flags);
+
+       for (i = 0; i < AC_NUM; i++) {
+               txq = &priv->txq[i];
+               q = &txq->q;
+               avail = iwl_queue_space(q);
+
+               stats[i].len = q->n_window - avail;
+               stats[i].limit = q->n_window - q->high_mark;
+               stats[i].count = q->n_window;
+
+       }
+       spin_unlock_irqrestore(&priv->lock, flags);
+
+       IWL_DEBUG_MAC80211(priv, "leave\n");
+
+       return 0;
+}
+EXPORT_SYMBOL(iwl_mac_get_tx_stats);
+
 #ifdef CONFIG_PM
 
 int iwl_pci_suspend(struct pci_dev *pdev, pm_message_t state)
index 92a42c8804881918bd2cc9fa049335f01f0c9d94..7e0d0ed0a5db7108d2f4b527fccc5518b5062ffd 100644 (file)
@@ -284,6 +284,8 @@ void iwl_config_ap(struct iwl_priv *priv);
 int iwl_mac_config_interface(struct ieee80211_hw *hw,
                                struct ieee80211_vif *vif,
                                struct ieee80211_if_conf *conf);
+int iwl_mac_get_tx_stats(struct ieee80211_hw *hw,
+                        struct ieee80211_tx_queue_stats *stats);
 
 /*****************************************************
  * RX handlers.
index 3461768e5a2b3dc0e9ed3eaedffff4fcec87c5a4..07883b264b7ec0e892627afb2e774832654e2529 100644 (file)
@@ -3494,41 +3494,6 @@ static int iwl3945_mac_set_key(struct ieee80211_hw *hw, enum set_key_cmd cmd,
        return ret;
 }
 
-static int iwl3945_mac_get_tx_stats(struct ieee80211_hw *hw,
-                               struct ieee80211_tx_queue_stats *stats)
-{
-       struct iwl_priv *priv = hw->priv;
-       int i, avail;
-       struct iwl_tx_queue *txq;
-       struct iwl_queue *q;
-       unsigned long flags;
-
-       IWL_DEBUG_MAC80211(priv, "enter\n");
-
-       if (!iwl_is_ready_rf(priv)) {
-               IWL_DEBUG_MAC80211(priv, "leave - RF not ready\n");
-               return -EIO;
-       }
-
-       spin_lock_irqsave(&priv->lock, flags);
-
-       for (i = 0; i < AC_NUM; i++) {
-               txq = &priv->txq[i];
-               q = &txq->q;
-               avail = iwl_queue_space(q);
-
-               stats[i].len = q->n_window - avail;
-               stats[i].limit = q->n_window - q->high_mark;
-               stats[i].count = q->n_window;
-
-       }
-       spin_unlock_irqrestore(&priv->lock, flags);
-
-       IWL_DEBUG_MAC80211(priv, "leave\n");
-
-       return 0;
-}
-
 static void iwl3945_mac_reset_tsf(struct ieee80211_hw *hw)
 {
        struct iwl_priv *priv = hw->priv;
@@ -4116,7 +4081,7 @@ static struct ieee80211_ops iwl3945_hw_ops = {
        .config_interface = iwl_mac_config_interface,
        .configure_filter = iwl_configure_filter,
        .set_key = iwl3945_mac_set_key,
-       .get_tx_stats = iwl3945_mac_get_tx_stats,
+       .get_tx_stats = iwl_mac_get_tx_stats,
        .conf_tx = iwl_mac_conf_tx,
        .reset_tsf = iwl3945_mac_reset_tsf,
        .bss_info_changed = iwl_bss_info_changed,