diff options
author | Eliad Peller <eliad@wizery.com> | 2011-12-29 07:41:39 -0500 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2012-01-24 14:06:04 -0500 |
commit | 35b88623692f7ffbfdf16e4c2358784a060c20ed (patch) | |
tree | 6f711174a31c415cecf63d54d293de25e2d85e0b /net | |
parent | c3b5003b628d8e373262bee42c7260d6a799c73e (diff) |
mac80211: check sta_apply_parameters() return value
Bail out if sta_apply_parameters() returns an error.
Signed-off-by: Eliad Peller <eliad@wizery.com>
Acked-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'net')
-rw-r--r-- | net/mac80211/cfg.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/net/mac80211/cfg.c b/net/mac80211/cfg.c index 296620d6ca0c..d86730fe75c8 100644 --- a/net/mac80211/cfg.c +++ b/net/mac80211/cfg.c | |||
@@ -1001,6 +1001,7 @@ static int ieee80211_change_station(struct wiphy *wiphy, | |||
1001 | struct ieee80211_local *local = wiphy_priv(wiphy); | 1001 | struct ieee80211_local *local = wiphy_priv(wiphy); |
1002 | struct sta_info *sta; | 1002 | struct sta_info *sta; |
1003 | struct ieee80211_sub_if_data *vlansdata; | 1003 | struct ieee80211_sub_if_data *vlansdata; |
1004 | int err; | ||
1004 | 1005 | ||
1005 | mutex_lock(&local->sta_mtx); | 1006 | mutex_lock(&local->sta_mtx); |
1006 | 1007 | ||
@@ -1040,7 +1041,11 @@ static int ieee80211_change_station(struct wiphy *wiphy, | |||
1040 | ieee80211_send_layer2_update(sta); | 1041 | ieee80211_send_layer2_update(sta); |
1041 | } | 1042 | } |
1042 | 1043 | ||
1043 | sta_apply_parameters(local, sta, params); | 1044 | err = sta_apply_parameters(local, sta, params); |
1045 | if (err) { | ||
1046 | mutex_unlock(&local->sta_mtx); | ||
1047 | return err; | ||
1048 | } | ||
1044 | 1049 | ||
1045 | if (test_sta_flag(sta, WLAN_STA_TDLS_PEER) && params->supported_rates) | 1050 | if (test_sta_flag(sta, WLAN_STA_TDLS_PEER) && params->supported_rates) |
1046 | rate_control_rate_init(sta); | 1051 | rate_control_rate_init(sta); |