Skip to content

Commit

Permalink
mac80211: set an external flag for TDLS stations
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Arik Nemtsov authored and Johannes Berg committed May 5, 2014
1 parent 8c5bb1f commit 0c4972c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions include/net/mac80211.h
Original file line number Diff line number Diff line change
Expand Up @@ -1374,6 +1374,7 @@ struct ieee80211_sta_rates {
* the station moves to associated state.
* @smps_mode: current SMPS mode (off, static or dynamic)
* @rates: rate control selection table
* @tdls: indicates whether the STA is a TDLS peer
*/
struct ieee80211_sta {
u32 supp_rates[IEEE80211_NUM_BANDS];
Expand All @@ -1388,6 +1389,7 @@ struct ieee80211_sta {
enum ieee80211_sta_rx_bandwidth bandwidth;
enum ieee80211_smps_mode smps_mode;
struct ieee80211_sta_rates __rcu *rates;
bool tdls;

/* must be last */
u8 drv_priv[0] __aligned(sizeof(void *));
Expand Down
2 changes: 2 additions & 0 deletions net/mac80211/cfg.c
Original file line number Diff line number Diff line change
Expand Up @@ -1459,6 +1459,8 @@ static int ieee80211_add_station(struct wiphy *wiphy, struct net_device *dev,
if (!(params->sta_flags_set & BIT(NL80211_STA_FLAG_TDLS_PEER))) {
sta_info_pre_move_state(sta, IEEE80211_STA_AUTH);
sta_info_pre_move_state(sta, IEEE80211_STA_ASSOC);
} else {
sta->sta.tdls = true;
}

err = sta_apply_parameters(local, sta, params);
Expand Down

0 comments on commit 0c4972c

Please sign in to comment.