summaryrefslogtreecommitdiffstats
path: root/net/mac80211
diff options
context:
space:
mode:
authorArik Nemtsov <arik@wizery.com>2011-11-07 23:24:39 +0200
committerJohn W. Linville <linville@tuxdriver.com>2011-11-11 12:32:47 -0500
commitd64cf63e062f6741f80c393f19c9706358489cc7 (patch)
tree4fdd104411270b7e4a7eb339cd457870bd413d82 /net/mac80211
parentdd9dfb9f95e2141db672eb12a1d71892e9e481fb (diff)
downloadblackbird-op-linux-d64cf63e062f6741f80c393f19c9706358489cc7.tar.gz
blackbird-op-linux-d64cf63e062f6741f80c393f19c9706358489cc7.zip
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>
Diffstat (limited to 'net/mac80211')
-rw-r--r--net/mac80211/cfg.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/net/mac80211/cfg.c b/net/mac80211/cfg.c
index 02a43234b91c..eb54b6cf85c6 100644
--- a/net/mac80211/cfg.c
+++ b/net/mac80211/cfg.c
@@ -869,7 +869,12 @@ static int ieee80211_add_station(struct wiphy *wiphy, struct net_device *dev,
sta_apply_parameters(local, sta, params);
- rate_control_rate_init(sta);
+ /*
+ * 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);
layer2_update = sdata->vif.type == NL80211_IFTYPE_AP_VLAN ||
sdata->vif.type == NL80211_IFTYPE_AP;
@@ -953,6 +958,9 @@ static int ieee80211_change_station(struct wiphy *wiphy,
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();
if (sdata->vif.type == NL80211_IFTYPE_STATION &&
OpenPOWER on IntegriCloud