diff options
author | Johannes Berg <johannes.berg@intel.com> | 2010-05-17 05:37:34 -0400 |
---|---|---|
committer | Reinette Chatre <reinette.chatre@intel.com> | 2010-06-06 02:18:33 -0400 |
commit | ff0d91c3eea6e25b47258349b455671f98f1b0cd (patch) | |
tree | cc69b1e6603db5c36e6026518882dd1b458c2327 /drivers/net/wireless/iwlwifi/iwl-4965.c | |
parent | 519c7c416870c6e71e9553786a529d89f55ef395 (diff) |
iwlwifi: reduce memory allocation
Currently, the driver allocates up to 19 skb pointers
for each TFD, of which we have 256 per queue. This
means that for each TX queue, we allocate 19k/38k
(an order 4 or 5 allocation on 32/64 bit respectively)
just for each queue's "txb" array, which contains only
the SKB pointers.
However, due to the way we use these pointers only the
first one can ever be assigned. When the driver was
initially written, the idea was that it could be
passed multiple SKBs for each TFD and attach all
those to implement gather DMA. However, due to
constraints in the userspace API and lack of TCP/IP
level checksumming in the device, this is in fact not
possible. And even if it were, the SKBs would be
chained, and we wouldn't need to keep pointers to
each anyway.
Change this to only keep track of one SKB per TFD,
and thereby reduce memory consumption to just one
pointer per TFD, which is an order 0 allocation per
transmit queue.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Diffstat (limited to 'drivers/net/wireless/iwlwifi/iwl-4965.c')
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-4965.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-4965.c b/drivers/net/wireless/iwlwifi/iwl-4965.c index 1e4f1bc515db..a51c4b8e65c7 100644 --- a/drivers/net/wireless/iwlwifi/iwl-4965.c +++ b/drivers/net/wireless/iwlwifi/iwl-4965.c | |||
@@ -1908,7 +1908,7 @@ static int iwl4965_tx_status_reply_tx(struct iwl_priv *priv, | |||
1908 | IWL_DEBUG_TX_REPLY(priv, "FrameCnt = %d, StartIdx=%d idx=%d\n", | 1908 | IWL_DEBUG_TX_REPLY(priv, "FrameCnt = %d, StartIdx=%d idx=%d\n", |
1909 | agg->frame_count, agg->start_idx, idx); | 1909 | agg->frame_count, agg->start_idx, idx); |
1910 | 1910 | ||
1911 | info = IEEE80211_SKB_CB(priv->txq[txq_id].txb[idx].skb[0]); | 1911 | info = IEEE80211_SKB_CB(priv->txq[txq_id].txb[idx].skb); |
1912 | info->status.rates[0].count = tx_resp->failure_frame + 1; | 1912 | info->status.rates[0].count = tx_resp->failure_frame + 1; |
1913 | info->flags &= ~IEEE80211_TX_CTL_AMPDU; | 1913 | info->flags &= ~IEEE80211_TX_CTL_AMPDU; |
1914 | info->flags |= iwl_tx_status_to_mac80211(status); | 1914 | info->flags |= iwl_tx_status_to_mac80211(status); |
@@ -2074,7 +2074,7 @@ static void iwl4965_rx_reply_tx(struct iwl_priv *priv, | |||
2074 | return; | 2074 | return; |
2075 | } | 2075 | } |
2076 | 2076 | ||
2077 | info = IEEE80211_SKB_CB(txq->txb[txq->q.read_ptr].skb[0]); | 2077 | info = IEEE80211_SKB_CB(txq->txb[txq->q.read_ptr].skb); |
2078 | memset(&info->status, 0, sizeof(info->status)); | 2078 | memset(&info->status, 0, sizeof(info->status)); |
2079 | 2079 | ||
2080 | hdr = iwl_tx_queue_get_hdr(priv, txq_id, index); | 2080 | hdr = iwl_tx_queue_get_hdr(priv, txq_id, index); |