aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorJohannes Berg <johannes.berg@intel.com>2012-03-05 14:24:21 -0500
committerJohn W. Linville <linville@tuxdriver.com>2012-03-06 15:16:08 -0500
commit71cb99241d63b26a41c9cce6ed441bc30f90224a (patch)
tree3c35d75ba7ff93cfa42675e32b6d68e60c048f14 /drivers
parentf2b69ef022aba3fe436bb03664cf12b261cb64d1 (diff)
iwlwifi: reduce sta_lock hold time in TX
When we TX, we hold the sta_lock for a long time, a lot of which isn't needed. Reduce the time we hold the lock. Note that this doesn't really change anything as the code is already under the other spinlock, but it makes the code easier to read. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-agn-tx.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn-tx.c b/drivers/net/wireless/iwlwifi/iwl-agn-tx.c
index 81a3b0e3a8e0..59509d80f73f 100644
--- a/drivers/net/wireless/iwlwifi/iwl-agn-tx.c
+++ b/drivers/net/wireless/iwlwifi/iwl-agn-tx.c
@@ -341,13 +341,10 @@ int iwlagn_tx_skb(struct iwl_priv *priv, struct sk_buff *skb)
341 if (info->flags & IEEE80211_TX_CTL_AMPDU) 341 if (info->flags & IEEE80211_TX_CTL_AMPDU)
342 is_agg = true; 342 is_agg = true;
343 343
344 /* irqs already disabled/saved above when locking priv->shrd->lock */
345 spin_lock(&priv->shrd->sta_lock);
346
347 dev_cmd = kmem_cache_alloc(priv->tx_cmd_pool, GFP_ATOMIC); 344 dev_cmd = kmem_cache_alloc(priv->tx_cmd_pool, GFP_ATOMIC);
348 345
349 if (unlikely(!dev_cmd)) 346 if (unlikely(!dev_cmd))
350 goto drop_unlock_sta; 347 goto drop_unlock_priv;
351 348
352 memset(dev_cmd, 0, sizeof(*dev_cmd)); 349 memset(dev_cmd, 0, sizeof(*dev_cmd));
353 tx_cmd = (struct iwl_tx_cmd *) dev_cmd->payload; 350 tx_cmd = (struct iwl_tx_cmd *) dev_cmd->payload;
@@ -372,6 +369,9 @@ int iwlagn_tx_skb(struct iwl_priv *priv, struct sk_buff *skb)
372 info->driver_data[0] = ctx; 369 info->driver_data[0] = ctx;
373 info->driver_data[1] = dev_cmd; 370 info->driver_data[1] = dev_cmd;
374 371
372 /* irqs already disabled/saved above when locking priv->shrd->lock */
373 spin_lock(&priv->shrd->sta_lock);
374
375 if (ieee80211_is_data_qos(fc) && !ieee80211_is_qos_nullfunc(fc)) { 375 if (ieee80211_is_data_qos(fc) && !ieee80211_is_qos_nullfunc(fc)) {
376 u8 *qc = NULL; 376 u8 *qc = NULL;
377 struct iwl_tid_data *tid_data; 377 struct iwl_tid_data *tid_data;