cfg80211: Pass TDLS peer capability information in tdls_mgmt
[deliverable/linux.git] / net / wireless / nl80211.c
index 058aa0e1a462304e5e414a5f6eb4dfdac0dfa1cf..be836098d342dc132b46c339f0fdfdf1dafd5264 100644 (file)
@@ -384,6 +384,7 @@ static const struct nla_policy nl80211_policy[NL80211_ATTR_MAX+1] = {
                                   .len = IEEE80211_QOS_MAP_LEN_MAX },
        [NL80211_ATTR_MAC_HINT] = { .len = ETH_ALEN },
        [NL80211_ATTR_WIPHY_FREQ_HINT] = { .type = NLA_U32 },
+       [NL80211_ATTR_TDLS_PEER_CAPABILITY] = { .type = NLA_U32 },
 };
 
 /* policy for the key attributes */
@@ -7269,6 +7270,7 @@ static int nl80211_tdls_mgmt(struct sk_buff *skb, struct genl_info *info)
        struct cfg80211_registered_device *rdev = info->user_ptr[0];
        struct net_device *dev = info->user_ptr[1];
        u8 action_code, dialog_token;
+       u32 peer_capability = 0;
        u16 status_code;
        u8 *peer;
 
@@ -7287,9 +7289,12 @@ static int nl80211_tdls_mgmt(struct sk_buff *skb, struct genl_info *info)
        action_code = nla_get_u8(info->attrs[NL80211_ATTR_TDLS_ACTION]);
        status_code = nla_get_u16(info->attrs[NL80211_ATTR_STATUS_CODE]);
        dialog_token = nla_get_u8(info->attrs[NL80211_ATTR_TDLS_DIALOG_TOKEN]);
+       if (info->attrs[NL80211_ATTR_TDLS_PEER_CAPABILITY])
+               peer_capability =
+                       nla_get_u32(info->attrs[NL80211_ATTR_TDLS_PEER_CAPABILITY]);
 
        return rdev_tdls_mgmt(rdev, dev, peer, action_code,
-                             dialog_token, status_code,
+                             dialog_token, status_code, peer_capability,
                              nla_data(info->attrs[NL80211_ATTR_IE]),
                              nla_len(info->attrs[NL80211_ATTR_IE]));
 }
This page took 0.029898 seconds and 5 git commands to generate.