Commit c23e31cf authored by Marek Puzyniak's avatar Marek Puzyniak Committed by Johannes Berg
Browse files

mac80211: initialize rate control earlier for tdls station

Currently when TDLS station in driver goes from authenticated
to associated state it can not use rate control parameters
because rate control is not initialized yet. Some drivers
require parameters already initialized by rate control when
entering associated state. It can be done by initializing
rate control after station transition to associated state but
before notifying driver about that.
Signed-off-by: default avatarMarek Puzyniak <>
Signed-off-by: default avatarArik Nemtsov <>
[fix comment to say 'associated' instead of 'authorized']
Signed-off-by: default avatarJohannes Berg <>
parent f3b0bbb3
......@@ -977,6 +977,14 @@ static int sta_apply_auth_flags(struct ieee80211_local *local,
if (mask & BIT(NL80211_STA_FLAG_ASSOCIATED) &&
!test_sta_flag(sta, WLAN_STA_ASSOC)) {
* When peer becomes associated, init rate control as
* well. Some drivers require rate control initialized
* before drv_sta_state() is called.
if (test_sta_flag(sta, WLAN_STA_TDLS_PEER))
ret = sta_info_move_state(sta, IEEE80211_STA_ASSOC);
if (ret)
return ret;
......@@ -1378,11 +1386,6 @@ static int ieee80211_change_station(struct wiphy *wiphy,
if (err)
goto out_err;
/* When peer becomes authorized, init rate control as well */
if (test_sta_flag(sta, WLAN_STA_TDLS_PEER) &&
test_sta_flag(sta, WLAN_STA_AUTHORIZED))
if ((sdata->vif.type == NL80211_IFTYPE_AP ||
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment