aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/iwlwifi/iwl-4965.c
diff options
context:
space:
mode:
authorJohannes Berg <johannes.berg@intel.com>2010-06-16 06:30:27 -0400
committerReinette Chatre <reinette.chatre@intel.com>2010-06-21 13:46:21 -0400
commit4620fefa59d8aeae400b21d60d9a86aa11ebffa7 (patch)
treede4e8f3b4526ca9c8b87c27737c47065e3630494 /drivers/net/wireless/iwlwifi/iwl-4965.c
parent543708be320d7df692d24b349ca01a947b340764 (diff)
iwlagn: use mutex for aggregation
Now that the ampdu_action callback can sleep, we can use the mutex to properly protect the aggregation data, and return useful errors if they should happen. Also, add some sleep and mutex debugging so we won't call any of the functions that now require being able to sleep and/or the mutex to be held in an invalid context. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Acked-by: Wey-Yi Guy <wey-yi.w.guy@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.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-4965.c b/drivers/net/wireless/iwlwifi/iwl-4965.c
index 83e6a42ca2da..fee276bc36fe 100644
--- a/drivers/net/wireless/iwlwifi/iwl-4965.c
+++ b/drivers/net/wireless/iwlwifi/iwl-4965.c
@@ -1785,6 +1785,7 @@ static int iwl4965_txq_agg_enable(struct iwl_priv *priv, int txq_id,
1785{ 1785{
1786 unsigned long flags; 1786 unsigned long flags;
1787 u16 ra_tid; 1787 u16 ra_tid;
1788 int ret;
1788 1789
1789 if ((IWL49_FIRST_AMPDU_QUEUE > txq_id) || 1790 if ((IWL49_FIRST_AMPDU_QUEUE > txq_id) ||
1790 (IWL49_FIRST_AMPDU_QUEUE + priv->cfg->num_of_ampdu_queues 1791 (IWL49_FIRST_AMPDU_QUEUE + priv->cfg->num_of_ampdu_queues
@@ -1800,7 +1801,9 @@ static int iwl4965_txq_agg_enable(struct iwl_priv *priv, int txq_id,
1800 ra_tid = BUILD_RAxTID(sta_id, tid); 1801 ra_tid = BUILD_RAxTID(sta_id, tid);
1801 1802
1802 /* Modify device's station table to Tx this TID */ 1803 /* Modify device's station table to Tx this TID */
1803 iwl_sta_tx_modify_enable_tid(priv, sta_id, tid); 1804 ret = iwl_sta_tx_modify_enable_tid(priv, sta_id, tid);
1805 if (ret)
1806 return ret;
1804 1807
1805 spin_lock_irqsave(&priv->lock, flags); 1808 spin_lock_irqsave(&priv->lock, flags);
1806 1809