aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorArik Nemtsov <arik@wizery.com>2014-05-01 03:17:27 -0400
committerJohannes Berg <johannes.berg@intel.com>2014-05-05 09:56:02 -0400
commit0c4972ccaa27620fe4281ac5c8c536978a563345 (patch)
tree1e0d4a847fc36eab53cc459a392fe9580450210b
parent8c5bb1fad0bb9c29f7d817c1e2fdb052b76f04e9 (diff)
mac80211: set an external flag for TDLS stations
Expose a new tdls flag for the public ieee80211_sta struct. This can be used in some rate control decisions. Signed-off-by: Arik Nemtsov <arikx.nemtsov@intel.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
-rw-r--r--include/net/mac80211.h2
-rw-r--r--net/mac80211/cfg.c2
2 files changed, 4 insertions, 0 deletions
diff --git a/include/net/mac80211.h b/include/net/mac80211.h
index 451c1bf00df9..bdb4a7cbab31 100644
--- a/include/net/mac80211.h
+++ b/include/net/mac80211.h
@@ -1374,6 +1374,7 @@ struct ieee80211_sta_rates {
1374 * the station moves to associated state. 1374 * the station moves to associated state.
1375 * @smps_mode: current SMPS mode (off, static or dynamic) 1375 * @smps_mode: current SMPS mode (off, static or dynamic)
1376 * @rates: rate control selection table 1376 * @rates: rate control selection table
1377 * @tdls: indicates whether the STA is a TDLS peer
1377 */ 1378 */
1378struct ieee80211_sta { 1379struct ieee80211_sta {
1379 u32 supp_rates[IEEE80211_NUM_BANDS]; 1380 u32 supp_rates[IEEE80211_NUM_BANDS];
@@ -1388,6 +1389,7 @@ struct ieee80211_sta {
1388 enum ieee80211_sta_rx_bandwidth bandwidth; 1389 enum ieee80211_sta_rx_bandwidth bandwidth;
1389 enum ieee80211_smps_mode smps_mode; 1390 enum ieee80211_smps_mode smps_mode;
1390 struct ieee80211_sta_rates __rcu *rates; 1391 struct ieee80211_sta_rates __rcu *rates;
1392 bool tdls;
1391 1393
1392 /* must be last */ 1394 /* must be last */
1393 u8 drv_priv[0] __aligned(sizeof(void *)); 1395 u8 drv_priv[0] __aligned(sizeof(void *));
diff --git a/net/mac80211/cfg.c b/net/mac80211/cfg.c
index 7b8d3cf89574..d8b236633ca3 100644
--- a/net/mac80211/cfg.c
+++ b/net/mac80211/cfg.c
@@ -1459,6 +1459,8 @@ static int ieee80211_add_station(struct wiphy *wiphy, struct net_device *dev,
1459 if (!(params->sta_flags_set & BIT(NL80211_STA_FLAG_TDLS_PEER))) { 1459 if (!(params->sta_flags_set & BIT(NL80211_STA_FLAG_TDLS_PEER))) {
1460 sta_info_pre_move_state(sta, IEEE80211_STA_AUTH); 1460 sta_info_pre_move_state(sta, IEEE80211_STA_AUTH);
1461 sta_info_pre_move_state(sta, IEEE80211_STA_ASSOC); 1461 sta_info_pre_move_state(sta, IEEE80211_STA_ASSOC);
1462 } else {
1463 sta->sta.tdls = true;
1462 } 1464 }
1463 1465
1464 err = sta_apply_parameters(local, sta, params); 1466 err = sta_apply_parameters(local, sta, params);