aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYogesh Ashok Powar <yogeshp@marvell.com>2012-11-06 08:52:35 -0500
committerJohn W. Linville <linville@tuxdriver.com>2012-11-14 14:56:08 -0500
commitfd712f5f5e0723fbbd3720983b3fa2189b2e10f8 (patch)
treebe59ade3eae69d16446c445e4739ef3129bd616c
parent5d377fcaf48cc38882bb92c3b4a0cfcfb250087b (diff)
mwl8k: recheck if station still has valid rates
We have 6.5 Mbps is minimum rate of the link as the criterion for creation of BA. Although we check this before creating the BA stream, by the time amdpu_action is called from the workqueue, the link can get affected in the meantime. Hence, add an additional check in amdpu_action. Signed-off-by: Yogesh Ashok Powar <yogeshp@marvell.com> Signed-off-by: Nishant Sarmukadam <nishants@marvell.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
-rw-r--r--drivers/net/wireless/mwl8k.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/drivers/net/wireless/mwl8k.c b/drivers/net/wireless/mwl8k.c
index cb5594d433b..996176596e0 100644
--- a/drivers/net/wireless/mwl8k.c
+++ b/drivers/net/wireless/mwl8k.c
@@ -5085,6 +5085,7 @@ mwl8k_ampdu_action(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
5085 struct mwl8k_priv *priv = hw->priv; 5085 struct mwl8k_priv *priv = hw->priv;
5086 struct mwl8k_ampdu_stream *stream; 5086 struct mwl8k_ampdu_stream *stream;
5087 u8 *addr = sta->addr; 5087 u8 *addr = sta->addr;
5088 struct mwl8k_sta *sta_info = MWL8K_STA(sta);
5088 5089
5089 if (!(hw->flags & IEEE80211_HW_AMPDU_AGGREGATION)) 5090 if (!(hw->flags & IEEE80211_HW_AMPDU_AGGREGATION))
5090 return -ENOTSUPP; 5091 return -ENOTSUPP;
@@ -5127,6 +5128,15 @@ mwl8k_ampdu_action(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
5127 /* Release the lock before we do the time consuming stuff */ 5128 /* Release the lock before we do the time consuming stuff */
5128 spin_unlock(&priv->stream_lock); 5129 spin_unlock(&priv->stream_lock);
5129 for (i = 0; i < MAX_AMPDU_ATTEMPTS; i++) { 5130 for (i = 0; i < MAX_AMPDU_ATTEMPTS; i++) {
5131
5132 /* Check if link is still valid */
5133 if (!sta_info->is_ampdu_allowed) {
5134 spin_lock(&priv->stream_lock);
5135 mwl8k_remove_stream(hw, stream);
5136 spin_unlock(&priv->stream_lock);
5137 return -EBUSY;
5138 }
5139
5130 rc = mwl8k_check_ba(hw, stream); 5140 rc = mwl8k_check_ba(hw, stream);
5131 5141
5132 /* If HW restart is in progress mwl8k_post_cmd will 5142 /* If HW restart is in progress mwl8k_post_cmd will