Skip to content

Commit

Permalink
mac80211: check sta_apply_parameters() return value
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Eliad Peller authored and John W. Linville committed Jan 24, 2012
1 parent c3b5003 commit 35b8862
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion net/mac80211/cfg.c
Original file line number Diff line number Diff line change
Expand Up @@ -1001,6 +1001,7 @@ static int ieee80211_change_station(struct wiphy *wiphy,
struct ieee80211_local *local = wiphy_priv(wiphy);
struct sta_info *sta;
struct ieee80211_sub_if_data *vlansdata;
int err;

mutex_lock(&local->sta_mtx);

Expand Down Expand Up @@ -1040,7 +1041,11 @@ static int ieee80211_change_station(struct wiphy *wiphy,
ieee80211_send_layer2_update(sta);
}

sta_apply_parameters(local, sta, params);
err = sta_apply_parameters(local, sta, params);
if (err) {
mutex_unlock(&local->sta_mtx);
return err;
}

if (test_sta_flag(sta, WLAN_STA_TDLS_PEER) && params->supported_rates)
rate_control_rate_init(sta);
Expand Down

0 comments on commit 35b8862

Please sign in to comment.