Some drivers (like ath9k_htc) will take a mutex in
rate_control_rate_update(), so drop the sta lock before we
get there.

Signed-off-by: Thomas Pedersen <[email protected]>

Can go towards 3.9.
---
 net/mac80211/mesh_plink.c |    9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/net/mac80211/mesh_plink.c b/net/mac80211/mesh_plink.c
index cdd4183..ca284ee 100644
--- a/net/mac80211/mesh_plink.c
+++ b/net/mac80211/mesh_plink.c
@@ -379,8 +379,10 @@ static void mesh_sta_info_init(struct 
ieee80211_sub_if_data *sdata,
        sta->last_rx = jiffies;
 
        /* rates and capabilities don't change during peering */
-       if (sta->plink_state == NL80211_PLINK_ESTAB)
-               goto out;
+       if (sta->plink_state == NL80211_PLINK_ESTAB) {
+               spin_unlock_bh(&sta->lock);
+               return;
+       }
 
        if (sta->sta.supp_rates[band] != rates)
                changed |= IEEE80211_RC_SUPP_RATES_CHANGED;
@@ -398,13 +400,12 @@ static void mesh_sta_info_init(struct 
ieee80211_sub_if_data *sdata,
                        changed |= IEEE80211_RC_BW_CHANGED;
                sta->sta.bandwidth = IEEE80211_STA_RX_BW_20;
        }
+       spin_unlock_bh(&sta->lock);
 
        if (insert)
                rate_control_rate_init(sta);
        else
                rate_control_rate_update(local, sband, sta, changed);
-out:
-       spin_unlock_bh(&sta->lock);
 }
 
 static struct sta_info *
-- 
1.7.10.4

_______________________________________________
Devel mailing list
[email protected]
http://lists.open80211s.org/cgi-bin/mailman/listinfo/devel

Reply via email to