mac80211: don't call conf_tx under RCU lock
authorJohannes Berg <johannes@sipsolutions.net>
Wed, 5 Mar 2008 19:39:31 +0000 (20:39 +0100)
committerJohn W. Linville <linville@tuxdriver.com>
Fri, 7 Mar 2008 21:02:59 +0000 (16:02 -0500)
Reinette pointed out that with the sta_info RCU-ification
the behaviour here changed and the conf_tx callback is
now invoked under RCU read lock. That is not necessary so
this patch restores the original behaviour

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Tested-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
net/mac80211/ieee80211_sta.c

index bece28b3eba5abf9ede6695ff27d769b3782835a..8b991ebcbb4ed7b682fd1dbad4663d3a6ca3c466 100644 (file)
@@ -1930,16 +1930,16 @@ static void ieee80211_rx_mgmt_assoc_resp(struct ieee80211_sub_if_data *sdata,
 
        if (elems.wmm_param && (ifsta->flags & IEEE80211_STA_WMM_ENABLED)) {
                sta->flags |= WLAN_STA_WME;
+               rcu_read_unlock();
                ieee80211_sta_wmm_params(dev, ifsta, elems.wmm_param,
                                         elems.wmm_param_len);
-       }
+       } else
+               rcu_read_unlock();
 
        /* set AID, ieee80211_set_associated() will tell the driver */
        bss_conf->aid = aid;
        ieee80211_set_associated(dev, ifsta, 1);
 
-       rcu_read_unlock();
-
        ieee80211_associated(dev, ifsta);
 }