diff options
author | Arik Nemtsov <arik@wizery.com> | 2014-10-22 05:32:48 -0400 |
---|---|---|
committer | Johannes Berg <johannes.berg@intel.com> | 2014-10-23 14:40:02 -0400 |
commit | 8b94148cfec4c40f4c55308fdcd816bbfe2b4016 (patch) | |
tree | 838ee7d02e37999303a621c2382130ec968755f7 /net | |
parent | 452218d9fd22505ed790e95b460b0f40cebb95a0 (diff) |
mac80211: expose TDLS-initiator value to low level driver
Some drivers need to know which station is the TDLS link initiator.
Expose this value via the mac80211 ieee80211_sta structure.
Signed-off-by: Arik Nemtsov <arikx.nemtsov@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net')
-rw-r--r-- | net/mac80211/tdls.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/net/mac80211/tdls.c b/net/mac80211/tdls.c index 4ea25dec0698..b4f368e2cb3b 100644 --- a/net/mac80211/tdls.c +++ b/net/mac80211/tdls.c | |||
@@ -562,8 +562,10 @@ ieee80211_tdls_prep_mgmt_packet(struct wiphy *wiphy, struct net_device *dev, | |||
562 | /* infer the initiator if we can, to support old userspace */ | 562 | /* infer the initiator if we can, to support old userspace */ |
563 | switch (action_code) { | 563 | switch (action_code) { |
564 | case WLAN_TDLS_SETUP_REQUEST: | 564 | case WLAN_TDLS_SETUP_REQUEST: |
565 | if (sta) | 565 | if (sta) { |
566 | set_sta_flag(sta, WLAN_STA_TDLS_INITIATOR); | 566 | set_sta_flag(sta, WLAN_STA_TDLS_INITIATOR); |
567 | sta->sta.tdls_initiator = false; | ||
568 | } | ||
567 | /* fall-through */ | 569 | /* fall-through */ |
568 | case WLAN_TDLS_SETUP_CONFIRM: | 570 | case WLAN_TDLS_SETUP_CONFIRM: |
569 | case WLAN_TDLS_DISCOVERY_REQUEST: | 571 | case WLAN_TDLS_DISCOVERY_REQUEST: |
@@ -575,8 +577,10 @@ ieee80211_tdls_prep_mgmt_packet(struct wiphy *wiphy, struct net_device *dev, | |||
575 | * Make the last packet sent take effect for the initiator | 577 | * Make the last packet sent take effect for the initiator |
576 | * value. | 578 | * value. |
577 | */ | 579 | */ |
578 | if (sta) | 580 | if (sta) { |
579 | clear_sta_flag(sta, WLAN_STA_TDLS_INITIATOR); | 581 | clear_sta_flag(sta, WLAN_STA_TDLS_INITIATOR); |
582 | sta->sta.tdls_initiator = true; | ||
583 | } | ||
580 | /* fall-through */ | 584 | /* fall-through */ |
581 | case WLAN_PUB_ACTION_TDLS_DISCOVER_RES: | 585 | case WLAN_PUB_ACTION_TDLS_DISCOVER_RES: |
582 | initiator = false; | 586 | initiator = false; |