return err;
  }
  
 +static struct sk_buff *
 +__cfg80211_alloc_vendor_skb(struct cfg80211_registered_device *rdev,
 +                          int approxlen, u32 portid, u32 seq,
 +                          enum nl80211_commands cmd,
 +                          enum nl80211_attrs attr, gfp_t gfp)
 +{
 +      struct sk_buff *skb;
 +      void *hdr;
 +      struct nlattr *data;
 +
 +      skb = nlmsg_new(approxlen + 100, gfp);
 +      if (!skb)
 +              return NULL;
 +
 +      hdr = nl80211hdr_put(skb, portid, seq, 0, cmd);
 +      if (!hdr) {
 +              kfree_skb(skb);
 +              return NULL;
 +      }
 +
 +      if (nla_put_u32(skb, NL80211_ATTR_WIPHY, rdev->wiphy_idx))
 +              goto nla_put_failure;
 +      data = nla_nest_start(skb, attr);
 +
 +      ((void **)skb->cb)[0] = rdev;
 +      ((void **)skb->cb)[1] = hdr;
 +      ((void **)skb->cb)[2] = data;
 +
 +      return skb;
 +
 + nla_put_failure:
 +      kfree_skb(skb);
 +      return NULL;
 +}
  
  #ifdef CONFIG_NL80211_TESTMODE
- static struct genl_multicast_group nl80211_testmode_mcgrp = {
-       .name = "testmode",
- };
- 
  static int nl80211_testmode_do(struct sk_buff *skb, struct genl_info *info)
  {
        struct cfg80211_registered_device *rdev = info->user_ptr[0];
                .internal_flags = NL80211_FLAG_NEED_NETDEV_UP |
                                  NL80211_FLAG_NEED_RTNL,
        },
 +      {
 +              .cmd = NL80211_CMD_VENDOR,
 +              .doit = nl80211_vendor_cmd,
 +              .policy = nl80211_policy,
 +              .flags = GENL_ADMIN_PERM,
 +              .internal_flags = NL80211_FLAG_NEED_WIPHY |
 +                                NL80211_FLAG_NEED_RTNL,
 +      },
  };
  
- static struct genl_multicast_group nl80211_mlme_mcgrp = {
-       .name = "mlme",
- };
- 
- /* multicast groups */
- static struct genl_multicast_group nl80211_config_mcgrp = {
-       .name = "config",
- };
- static struct genl_multicast_group nl80211_scan_mcgrp = {
-       .name = "scan",
- };
- static struct genl_multicast_group nl80211_regulatory_mcgrp = {
-       .name = "regulatory",
- };
- 
  /* notification functions */
  
  void nl80211_notify_dev_rename(struct cfg80211_registered_device *rdev)