mirror of
https://github.com/followmsi/android_kernel_google_msm.git
synced 2024-11-06 23:17:41 +00:00
mac80211: init rate-control for TDLS sta when supp-rates are known
Initialize rate control algorithms only when supported rates are known for a TDLS peer sta. Direct Tx between peers is not allowed before the link is enabled. In turn, this only occurs after a change_station() call that sets supported rates. Signed-off-by: Arik Nemtsov <arik@wizery.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
This commit is contained in:
parent
dd9dfb9f95
commit
d64cf63e06
1 changed files with 9 additions and 1 deletions
|
@ -869,6 +869,11 @@ static int ieee80211_add_station(struct wiphy *wiphy, struct net_device *dev,
|
||||||
|
|
||||||
sta_apply_parameters(local, sta, params);
|
sta_apply_parameters(local, sta, params);
|
||||||
|
|
||||||
|
/*
|
||||||
|
* for TDLS, rate control should be initialized only when supported
|
||||||
|
* rates are known.
|
||||||
|
*/
|
||||||
|
if (!test_sta_flag(sta, WLAN_STA_TDLS_PEER))
|
||||||
rate_control_rate_init(sta);
|
rate_control_rate_init(sta);
|
||||||
|
|
||||||
layer2_update = sdata->vif.type == NL80211_IFTYPE_AP_VLAN ||
|
layer2_update = sdata->vif.type == NL80211_IFTYPE_AP_VLAN ||
|
||||||
|
@ -953,6 +958,9 @@ static int ieee80211_change_station(struct wiphy *wiphy,
|
||||||
|
|
||||||
sta_apply_parameters(local, sta, params);
|
sta_apply_parameters(local, sta, params);
|
||||||
|
|
||||||
|
if (test_sta_flag(sta, WLAN_STA_TDLS_PEER) && params->supported_rates)
|
||||||
|
rate_control_rate_init(sta);
|
||||||
|
|
||||||
rcu_read_unlock();
|
rcu_read_unlock();
|
||||||
|
|
||||||
if (sdata->vif.type == NL80211_IFTYPE_STATION &&
|
if (sdata->vif.type == NL80211_IFTYPE_STATION &&
|
||||||
|
|
Loading…
Reference in a new issue