diff options
author | Arik Nemtsov <arik@wizery.com> | 2014-06-11 10:18:21 -0400 |
---|---|---|
committer | Johannes Berg <johannes.berg@intel.com> | 2014-06-23 08:24:55 -0400 |
commit | 31fa97c5defca3895dc6c823096d7ba59df76125 (patch) | |
tree | efaa910e95103d25b3228fd96ed2bd71ac473d86 /net/wireless/nl80211.c | |
parent | 17e6a59a365ac993c18f762d3a259635957f1026 (diff) |
cfg80211: pass TDLS initiator in tdls_mgmt operations
The TDLS initiator is set once during link setup. If determines the
address ordering in the link identifier IE.
Fix dependent drivers - mwifiex and mac80211.
Signed-off-by: Arik Nemtsov <arikx.nemtsov@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net/wireless/nl80211.c')
-rw-r--r-- | net/wireless/nl80211.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c index ba4f1723c83a..8f46b8ffbcf6 100644 --- a/net/wireless/nl80211.c +++ b/net/wireless/nl80211.c | |||
@@ -337,6 +337,7 @@ static const struct nla_policy nl80211_policy[NL80211_ATTR_MAX+1] = { | |||
337 | [NL80211_ATTR_TDLS_OPERATION] = { .type = NLA_U8 }, | 337 | [NL80211_ATTR_TDLS_OPERATION] = { .type = NLA_U8 }, |
338 | [NL80211_ATTR_TDLS_SUPPORT] = { .type = NLA_FLAG }, | 338 | [NL80211_ATTR_TDLS_SUPPORT] = { .type = NLA_FLAG }, |
339 | [NL80211_ATTR_TDLS_EXTERNAL_SETUP] = { .type = NLA_FLAG }, | 339 | [NL80211_ATTR_TDLS_EXTERNAL_SETUP] = { .type = NLA_FLAG }, |
340 | [NL80211_ATTR_TDLS_INITIATOR] = { .type = NLA_FLAG }, | ||
340 | [NL80211_ATTR_DONT_WAIT_FOR_ACK] = { .type = NLA_FLAG }, | 341 | [NL80211_ATTR_DONT_WAIT_FOR_ACK] = { .type = NLA_FLAG }, |
341 | [NL80211_ATTR_PROBE_RESP] = { .type = NLA_BINARY, | 342 | [NL80211_ATTR_PROBE_RESP] = { .type = NLA_BINARY, |
342 | .len = IEEE80211_MAX_DATA_LEN }, | 343 | .len = IEEE80211_MAX_DATA_LEN }, |
@@ -7365,6 +7366,7 @@ static int nl80211_tdls_mgmt(struct sk_buff *skb, struct genl_info *info) | |||
7365 | u32 peer_capability = 0; | 7366 | u32 peer_capability = 0; |
7366 | u16 status_code; | 7367 | u16 status_code; |
7367 | u8 *peer; | 7368 | u8 *peer; |
7369 | bool initiator; | ||
7368 | 7370 | ||
7369 | if (!(rdev->wiphy.flags & WIPHY_FLAG_SUPPORTS_TDLS) || | 7371 | if (!(rdev->wiphy.flags & WIPHY_FLAG_SUPPORTS_TDLS) || |
7370 | !rdev->ops->tdls_mgmt) | 7372 | !rdev->ops->tdls_mgmt) |
@@ -7381,12 +7383,14 @@ static int nl80211_tdls_mgmt(struct sk_buff *skb, struct genl_info *info) | |||
7381 | action_code = nla_get_u8(info->attrs[NL80211_ATTR_TDLS_ACTION]); | 7383 | action_code = nla_get_u8(info->attrs[NL80211_ATTR_TDLS_ACTION]); |
7382 | status_code = nla_get_u16(info->attrs[NL80211_ATTR_STATUS_CODE]); | 7384 | status_code = nla_get_u16(info->attrs[NL80211_ATTR_STATUS_CODE]); |
7383 | dialog_token = nla_get_u8(info->attrs[NL80211_ATTR_TDLS_DIALOG_TOKEN]); | 7385 | dialog_token = nla_get_u8(info->attrs[NL80211_ATTR_TDLS_DIALOG_TOKEN]); |
7386 | initiator = nla_get_flag(info->attrs[NL80211_ATTR_TDLS_INITIATOR]); | ||
7384 | if (info->attrs[NL80211_ATTR_TDLS_PEER_CAPABILITY]) | 7387 | if (info->attrs[NL80211_ATTR_TDLS_PEER_CAPABILITY]) |
7385 | peer_capability = | 7388 | peer_capability = |
7386 | nla_get_u32(info->attrs[NL80211_ATTR_TDLS_PEER_CAPABILITY]); | 7389 | nla_get_u32(info->attrs[NL80211_ATTR_TDLS_PEER_CAPABILITY]); |
7387 | 7390 | ||
7388 | return rdev_tdls_mgmt(rdev, dev, peer, action_code, | 7391 | return rdev_tdls_mgmt(rdev, dev, peer, action_code, |
7389 | dialog_token, status_code, peer_capability, | 7392 | dialog_token, status_code, peer_capability, |
7393 | initiator, | ||
7390 | nla_data(info->attrs[NL80211_ATTR_IE]), | 7394 | nla_data(info->attrs[NL80211_ATTR_IE]), |
7391 | nla_len(info->attrs[NL80211_ATTR_IE])); | 7395 | nla_len(info->attrs[NL80211_ATTR_IE])); |
7392 | } | 7396 | } |