dev.c (038d49baab571800e3077b9d322a004f95c8aa8f) dev.c (9daae9bd47cff82a2a06aca23c458d6c79d09d52)
1/*
2 * NET3 Protocol independent device support routines.
3 *
4 * This program is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU General Public License
6 * as published by the Free Software Foundation; either version
7 * 2 of the License, or (at your option) any later version.
8 *

--- 1570 unchanged lines hidden (view full) ---

1579 switch (cmd) {
1580 N(UP) N(DOWN) N(REBOOT) N(CHANGE) N(REGISTER) N(UNREGISTER)
1581 N(CHANGEMTU) N(CHANGEADDR) N(GOING_DOWN) N(CHANGENAME) N(FEAT_CHANGE)
1582 N(BONDING_FAILOVER) N(PRE_UP) N(PRE_TYPE_CHANGE) N(POST_TYPE_CHANGE)
1583 N(POST_INIT) N(RELEASE) N(NOTIFY_PEERS) N(JOIN) N(CHANGEUPPER)
1584 N(RESEND_IGMP) N(PRECHANGEMTU) N(CHANGEINFODATA) N(BONDING_INFO)
1585 N(PRECHANGEUPPER) N(CHANGELOWERSTATE) N(UDP_TUNNEL_PUSH_INFO)
1586 N(UDP_TUNNEL_DROP_INFO) N(CHANGE_TX_QUEUE_LEN)
1/*
2 * NET3 Protocol independent device support routines.
3 *
4 * This program is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU General Public License
6 * as published by the Free Software Foundation; either version
7 * 2 of the License, or (at your option) any later version.
8 *

--- 1570 unchanged lines hidden (view full) ---

1579 switch (cmd) {
1580 N(UP) N(DOWN) N(REBOOT) N(CHANGE) N(REGISTER) N(UNREGISTER)
1581 N(CHANGEMTU) N(CHANGEADDR) N(GOING_DOWN) N(CHANGENAME) N(FEAT_CHANGE)
1582 N(BONDING_FAILOVER) N(PRE_UP) N(PRE_TYPE_CHANGE) N(POST_TYPE_CHANGE)
1583 N(POST_INIT) N(RELEASE) N(NOTIFY_PEERS) N(JOIN) N(CHANGEUPPER)
1584 N(RESEND_IGMP) N(PRECHANGEMTU) N(CHANGEINFODATA) N(BONDING_INFO)
1585 N(PRECHANGEUPPER) N(CHANGELOWERSTATE) N(UDP_TUNNEL_PUSH_INFO)
1586 N(UDP_TUNNEL_DROP_INFO) N(CHANGE_TX_QUEUE_LEN)
1587 N(CVLAN_FILTER_PUSH_INFO) N(CVLAN_FILTER_DROP_INFO)
1588 N(SVLAN_FILTER_PUSH_INFO) N(SVLAN_FILTER_DROP_INFO)
1587 };
1588#undef N
1589 return "UNKNOWN_NETDEV_EVENT";
1590}
1591EXPORT_SYMBOL_GPL(netdev_cmd_to_name);
1592
1593static int call_netdevice_notifier(struct notifier_block *nb, unsigned long val,
1594 struct net_device *dev)

--- 6065 unchanged lines hidden (view full) ---

7660 if (features & NETIF_F_RX_UDP_TUNNEL_PORT) {
7661 dev->features = features;
7662 udp_tunnel_get_rx_info(dev);
7663 } else {
7664 udp_tunnel_drop_rx_info(dev);
7665 }
7666 }
7667
1589 };
1590#undef N
1591 return "UNKNOWN_NETDEV_EVENT";
1592}
1593EXPORT_SYMBOL_GPL(netdev_cmd_to_name);
1594
1595static int call_netdevice_notifier(struct notifier_block *nb, unsigned long val,
1596 struct net_device *dev)

--- 6065 unchanged lines hidden (view full) ---

7662 if (features & NETIF_F_RX_UDP_TUNNEL_PORT) {
7663 dev->features = features;
7664 udp_tunnel_get_rx_info(dev);
7665 } else {
7666 udp_tunnel_drop_rx_info(dev);
7667 }
7668 }
7669
7670 if (diff & NETIF_F_HW_VLAN_CTAG_FILTER) {
7671 if (features & NETIF_F_HW_VLAN_CTAG_FILTER) {
7672 dev->features = features;
7673 err |= vlan_get_rx_ctag_filter_info(dev);
7674 } else {
7675 vlan_drop_rx_ctag_filter_info(dev);
7676 }
7677 }
7678
7679 if (diff & NETIF_F_HW_VLAN_STAG_FILTER) {
7680 if (features & NETIF_F_HW_VLAN_STAG_FILTER) {
7681 dev->features = features;
7682 err |= vlan_get_rx_stag_filter_info(dev);
7683 } else {
7684 vlan_drop_rx_stag_filter_info(dev);
7685 }
7686 }
7687
7668 dev->features = features;
7669 }
7670
7671 return err < 0 ? 0 : 1;
7672}
7673
7674/**
7675 * netdev_update_features - recalculate device features

--- 1405 unchanged lines hidden ---
7688 dev->features = features;
7689 }
7690
7691 return err < 0 ? 0 : 1;
7692}
7693
7694/**
7695 * netdev_update_features - recalculate device features

--- 1405 unchanged lines hidden ---