diff options
-rw-r--r-- | net/mac80211/cfg.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/net/mac80211/cfg.c b/net/mac80211/cfg.c index bc83a6605ea6..3acda35df5cb 100644 --- a/net/mac80211/cfg.c +++ b/net/mac80211/cfg.c | |||
@@ -954,11 +954,11 @@ static int ieee80211_change_station(struct wiphy *wiphy, | |||
954 | struct sta_info *sta; | 954 | struct sta_info *sta; |
955 | struct ieee80211_sub_if_data *vlansdata; | 955 | struct ieee80211_sub_if_data *vlansdata; |
956 | 956 | ||
957 | rcu_read_lock(); | 957 | mutex_lock(&local->sta_mtx); |
958 | 958 | ||
959 | sta = sta_info_get_bss(sdata, mac); | 959 | sta = sta_info_get_bss(sdata, mac); |
960 | if (!sta) { | 960 | if (!sta) { |
961 | rcu_read_unlock(); | 961 | mutex_unlock(&local->sta_mtx); |
962 | return -ENOENT; | 962 | return -ENOENT; |
963 | } | 963 | } |
964 | 964 | ||
@@ -966,7 +966,7 @@ static int ieee80211_change_station(struct wiphy *wiphy, | |||
966 | if (sdata->vif.type == NL80211_IFTYPE_STATION && | 966 | if (sdata->vif.type == NL80211_IFTYPE_STATION && |
967 | params->supported_rates && | 967 | params->supported_rates && |
968 | !test_sta_flag(sta, WLAN_STA_TDLS_PEER)) { | 968 | !test_sta_flag(sta, WLAN_STA_TDLS_PEER)) { |
969 | rcu_read_unlock(); | 969 | mutex_unlock(&local->sta_mtx); |
970 | return -EINVAL; | 970 | return -EINVAL; |
971 | } | 971 | } |
972 | 972 | ||
@@ -975,13 +975,13 @@ static int ieee80211_change_station(struct wiphy *wiphy, | |||
975 | 975 | ||
976 | if (vlansdata->vif.type != NL80211_IFTYPE_AP_VLAN && | 976 | if (vlansdata->vif.type != NL80211_IFTYPE_AP_VLAN && |
977 | vlansdata->vif.type != NL80211_IFTYPE_AP) { | 977 | vlansdata->vif.type != NL80211_IFTYPE_AP) { |
978 | rcu_read_unlock(); | 978 | mutex_unlock(&local->sta_mtx); |
979 | return -EINVAL; | 979 | return -EINVAL; |
980 | } | 980 | } |
981 | 981 | ||
982 | if (params->vlan->ieee80211_ptr->use_4addr) { | 982 | if (params->vlan->ieee80211_ptr->use_4addr) { |
983 | if (vlansdata->u.vlan.sta) { | 983 | if (vlansdata->u.vlan.sta) { |
984 | rcu_read_unlock(); | 984 | mutex_unlock(&local->sta_mtx); |
985 | return -EBUSY; | 985 | return -EBUSY; |
986 | } | 986 | } |
987 | 987 | ||
@@ -997,7 +997,7 @@ static int ieee80211_change_station(struct wiphy *wiphy, | |||
997 | if (test_sta_flag(sta, WLAN_STA_TDLS_PEER) && params->supported_rates) | 997 | if (test_sta_flag(sta, WLAN_STA_TDLS_PEER) && params->supported_rates) |
998 | rate_control_rate_init(sta); | 998 | rate_control_rate_init(sta); |
999 | 999 | ||
1000 | rcu_read_unlock(); | 1000 | mutex_unlock(&local->sta_mtx); |
1001 | 1001 | ||
1002 | if (sdata->vif.type == NL80211_IFTYPE_STATION && | 1002 | if (sdata->vif.type == NL80211_IFTYPE_STATION && |
1003 | params->sta_flags_mask & BIT(NL80211_STA_FLAG_AUTHORIZED)) | 1003 | params->sta_flags_mask & BIT(NL80211_STA_FLAG_AUTHORIZED)) |