aboutsummaryrefslogtreecommitdiffstats
path: root/net/wireless/nl80211.c
diff options
context:
space:
mode:
authorSunil Dutt Undekari <usdutt@qti.qualcomm.com>2014-02-20 05:52:09 -0500
committerJohannes Berg <johannes.berg@intel.com>2014-02-20 05:55:25 -0500
commitdf942e7ba70cd0a7aa9e0432b8a6a328de2c5574 (patch)
tree943599f26af1396618079dc1c789df49e7b1c654 /net/wireless/nl80211.c
parentbf5f48339a019c9b4b42284c3f45d58942cbda27 (diff)
cfg80211: Pass TDLS peer capability information in tdls_mgmt
While framing the TDLS Setup Confirmation frame, the driver needs to know if the TDLS peer is VHT/HT/WMM capable and thus shall construct the VHT/HT operation / WMM parameter elements accordingly. Supplicant determines if the TDLS peer is VHT/HT/WMM capable based on the presence of the respective IEs in the received TDLS Setup Response frame. The host driver should not need to parse the received TDLS Response frame and thus, should be able to rely on the supplicant to indicate the capability of the peer through additional flags while transmitting the TDLS Setup Confirmation frame through tdls_mgmt operations. Signed-off-by: Sunil Dutt Undekari <usdutt@qti.qualcomm.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net/wireless/nl80211.c')
-rw-r--r--net/wireless/nl80211.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c
index 058aa0e1a462..be836098d342 100644
--- a/net/wireless/nl80211.c
+++ b/net/wireless/nl80211.c
@@ -384,6 +384,7 @@ static const struct nla_policy nl80211_policy[NL80211_ATTR_MAX+1] = {
384 .len = IEEE80211_QOS_MAP_LEN_MAX }, 384 .len = IEEE80211_QOS_MAP_LEN_MAX },
385 [NL80211_ATTR_MAC_HINT] = { .len = ETH_ALEN }, 385 [NL80211_ATTR_MAC_HINT] = { .len = ETH_ALEN },
386 [NL80211_ATTR_WIPHY_FREQ_HINT] = { .type = NLA_U32 }, 386 [NL80211_ATTR_WIPHY_FREQ_HINT] = { .type = NLA_U32 },
387 [NL80211_ATTR_TDLS_PEER_CAPABILITY] = { .type = NLA_U32 },
387}; 388};
388 389
389/* policy for the key attributes */ 390/* policy for the key attributes */
@@ -7269,6 +7270,7 @@ static int nl80211_tdls_mgmt(struct sk_buff *skb, struct genl_info *info)
7269 struct cfg80211_registered_device *rdev = info->user_ptr[0]; 7270 struct cfg80211_registered_device *rdev = info->user_ptr[0];
7270 struct net_device *dev = info->user_ptr[1]; 7271 struct net_device *dev = info->user_ptr[1];
7271 u8 action_code, dialog_token; 7272 u8 action_code, dialog_token;
7273 u32 peer_capability = 0;
7272 u16 status_code; 7274 u16 status_code;
7273 u8 *peer; 7275 u8 *peer;
7274 7276
@@ -7287,9 +7289,12 @@ static int nl80211_tdls_mgmt(struct sk_buff *skb, struct genl_info *info)
7287 action_code = nla_get_u8(info->attrs[NL80211_ATTR_TDLS_ACTION]); 7289 action_code = nla_get_u8(info->attrs[NL80211_ATTR_TDLS_ACTION]);
7288 status_code = nla_get_u16(info->attrs[NL80211_ATTR_STATUS_CODE]); 7290 status_code = nla_get_u16(info->attrs[NL80211_ATTR_STATUS_CODE]);
7289 dialog_token = nla_get_u8(info->attrs[NL80211_ATTR_TDLS_DIALOG_TOKEN]); 7291 dialog_token = nla_get_u8(info->attrs[NL80211_ATTR_TDLS_DIALOG_TOKEN]);
7292 if (info->attrs[NL80211_ATTR_TDLS_PEER_CAPABILITY])
7293 peer_capability =
7294 nla_get_u32(info->attrs[NL80211_ATTR_TDLS_PEER_CAPABILITY]);
7290 7295
7291 return rdev_tdls_mgmt(rdev, dev, peer, action_code, 7296 return rdev_tdls_mgmt(rdev, dev, peer, action_code,
7292 dialog_token, status_code, 7297 dialog_token, status_code, peer_capability,
7293 nla_data(info->attrs[NL80211_ATTR_IE]), 7298 nla_data(info->attrs[NL80211_ATTR_IE]),
7294 nla_len(info->attrs[NL80211_ATTR_IE])); 7299 nla_len(info->attrs[NL80211_ATTR_IE]));
7295} 7300}