]> Git Repo - linux.git/blobdiff - drivers/net/wireless/mac80211_hwsim.c
Merge tag 'mac80211-next-for-davem-2016-10-28' of git://git.kernel.org/pub/scm/linux...
[linux.git] / drivers / net / wireless / mac80211_hwsim.c
index f9ba0772e4716cefe51779d3aedbbbf37fc873da..8f366cc097e6f9bd353be3f9729cacaf9452469c 100644 (file)
@@ -587,15 +587,8 @@ struct hwsim_radiotap_ack_hdr {
        __le16 rt_chbitmask;
 } __packed;
 
-/* MAC80211_HWSIM netlinf family */
-static struct genl_family hwsim_genl_family = {
-       .id = GENL_ID_GENERATE,
-       .hdrsize = 0,
-       .name = "MAC80211_HWSIM",
-       .version = 1,
-       .maxattr = HWSIM_ATTR_MAX,
-       .netnsok = true,
-};
+/* MAC80211_HWSIM netlink family */
+static struct genl_family hwsim_genl_family;
 
 enum hwsim_multicast_groups {
        HWSIM_MCGRP_CONFIG,
@@ -2807,7 +2800,6 @@ static void mac80211_hwsim_free(void)
 
 static const struct net_device_ops hwsim_netdev_ops = {
        .ndo_start_xmit         = hwsim_mon_xmit,
-       .ndo_change_mtu         = eth_change_mtu,
        .ndo_set_mac_address    = eth_mac_addr,
        .ndo_validate_addr      = eth_validate_addr,
 };
@@ -3252,6 +3244,18 @@ static const struct genl_ops hwsim_ops[] = {
        },
 };
 
+static struct genl_family hwsim_genl_family __ro_after_init = {
+       .name = "MAC80211_HWSIM",
+       .version = 1,
+       .maxattr = HWSIM_ATTR_MAX,
+       .netnsok = true,
+       .module = THIS_MODULE,
+       .ops = hwsim_ops,
+       .n_ops = ARRAY_SIZE(hwsim_ops),
+       .mcgrps = hwsim_mcgrps,
+       .n_mcgrps = ARRAY_SIZE(hwsim_mcgrps),
+};
+
 static void destroy_radio(struct work_struct *work)
 {
        struct mac80211_hwsim_data *data =
@@ -3299,15 +3303,13 @@ static struct notifier_block hwsim_netlink_notifier = {
        .notifier_call = mac80211_hwsim_netlink_notify,
 };
 
-static int hwsim_init_netlink(void)
+static int __init hwsim_init_netlink(void)
 {
        int rc;
 
        printk(KERN_INFO "mac80211_hwsim: initializing netlink\n");
 
-       rc = genl_register_family_with_ops_groups(&hwsim_genl_family,
-                                                 hwsim_ops,
-                                                 hwsim_mcgrps);
+       rc = genl_register_family(&hwsim_genl_family);
        if (rc)
                goto failure;
 
This page took 0.032959 seconds and 4 git commands to generate.