diff options
author | Abhijeet Kolekar <abhijeet.kolekar@intel.com> | 2009-04-08 14:26:51 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2009-04-22 16:54:43 -0400 |
commit | aa89f31e708d469f5dd824c59c98e4856a2e3572 (patch) | |
tree | 765fc149a8a1f297755fb8c8e8fea52d09a7467f /drivers/net/wireless/iwlwifi/iwl3945-base.c | |
parent | 5ee5811e24b20d49ea553fda568433effbab7a62 (diff) |
iwl3945: use iwl_mac_get_tx_stats from iwlwifi
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>
Diffstat (limited to 'drivers/net/wireless/iwlwifi/iwl3945-base.c')
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl3945-base.c | 37 |
1 files changed, 1 insertions, 36 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl3945-base.c b/drivers/net/wireless/iwlwifi/iwl3945-base.c index 3461768e5a2b..07883b264b7e 100644 --- a/drivers/net/wireless/iwlwifi/iwl3945-base.c +++ b/drivers/net/wireless/iwlwifi/iwl3945-base.c | |||
@@ -3494,41 +3494,6 @@ static int iwl3945_mac_set_key(struct ieee80211_hw *hw, enum set_key_cmd cmd, | |||
3494 | return ret; | 3494 | return ret; |
3495 | } | 3495 | } |
3496 | 3496 | ||
3497 | static int iwl3945_mac_get_tx_stats(struct ieee80211_hw *hw, | ||
3498 | struct ieee80211_tx_queue_stats *stats) | ||
3499 | { | ||
3500 | struct iwl_priv *priv = hw->priv; | ||
3501 | int i, avail; | ||
3502 | struct iwl_tx_queue *txq; | ||
3503 | struct iwl_queue *q; | ||
3504 | unsigned long flags; | ||
3505 | |||
3506 | IWL_DEBUG_MAC80211(priv, "enter\n"); | ||
3507 | |||
3508 | if (!iwl_is_ready_rf(priv)) { | ||
3509 | IWL_DEBUG_MAC80211(priv, "leave - RF not ready\n"); | ||
3510 | return -EIO; | ||
3511 | } | ||
3512 | |||
3513 | spin_lock_irqsave(&priv->lock, flags); | ||
3514 | |||
3515 | for (i = 0; i < AC_NUM; i++) { | ||
3516 | txq = &priv->txq[i]; | ||
3517 | q = &txq->q; | ||
3518 | avail = iwl_queue_space(q); | ||
3519 | |||
3520 | stats[i].len = q->n_window - avail; | ||
3521 | stats[i].limit = q->n_window - q->high_mark; | ||
3522 | stats[i].count = q->n_window; | ||
3523 | |||
3524 | } | ||
3525 | spin_unlock_irqrestore(&priv->lock, flags); | ||
3526 | |||
3527 | IWL_DEBUG_MAC80211(priv, "leave\n"); | ||
3528 | |||
3529 | return 0; | ||
3530 | } | ||
3531 | |||
3532 | static void iwl3945_mac_reset_tsf(struct ieee80211_hw *hw) | 3497 | static void iwl3945_mac_reset_tsf(struct ieee80211_hw *hw) |
3533 | { | 3498 | { |
3534 | struct iwl_priv *priv = hw->priv; | 3499 | struct iwl_priv *priv = hw->priv; |
@@ -4116,7 +4081,7 @@ static struct ieee80211_ops iwl3945_hw_ops = { | |||
4116 | .config_interface = iwl_mac_config_interface, | 4081 | .config_interface = iwl_mac_config_interface, |
4117 | .configure_filter = iwl_configure_filter, | 4082 | .configure_filter = iwl_configure_filter, |
4118 | .set_key = iwl3945_mac_set_key, | 4083 | .set_key = iwl3945_mac_set_key, |
4119 | .get_tx_stats = iwl3945_mac_get_tx_stats, | 4084 | .get_tx_stats = iwl_mac_get_tx_stats, |
4120 | .conf_tx = iwl_mac_conf_tx, | 4085 | .conf_tx = iwl_mac_conf_tx, |
4121 | .reset_tsf = iwl3945_mac_reset_tsf, | 4086 | .reset_tsf = iwl3945_mac_reset_tsf, |
4122 | .bss_info_changed = iwl_bss_info_changed, | 4087 | .bss_info_changed = iwl_bss_info_changed, |