Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 149923
b: refs/heads/master
c: aa89f31
h: refs/heads/master
i:
  149921: 9733a56
  149919: 5e441cd
v: v3
  • Loading branch information
Abhijeet Kolekar authored and John W. Linville committed Apr 22, 2009
1 parent d28c920 commit cfd7764
Show file tree
Hide file tree
Showing 5 changed files with 40 additions and 72 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 5ee5811e24b20d49ea553fda568433effbab7a62
refs/heads/master: aa89f31e708d469f5dd824c59c98e4856a2e3572
35 changes: 0 additions & 35 deletions trunk/drivers/net/wireless/iwlwifi/iwl-agn.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
{
Expand Down
36 changes: 36 additions & 0 deletions trunk/drivers/net/wireless/iwlwifi/iwl-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 2 additions & 0 deletions trunk/drivers/net/wireless/iwlwifi/iwl-core.h
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
37 changes: 1 addition & 36 deletions trunk/drivers/net/wireless/iwlwifi/iwl3945-base.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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,
Expand Down

0 comments on commit cfd7764

Please sign in to comment.