Skip to content

Commit

Permalink
net: export NET_ADDR_* values to user-space API
Browse files Browse the repository at this point in the history
NET_ADDR_* values are exported in the
/sys/class/net/<iface>/addr_assign_type sysfs attributes, and as such
constitutes an user-space ABI. Move the NET_ADDR_* definitions from
include/linux/netdevice.h to include/uapi/linux/netdevice.h

Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Florian Fainelli authored and David S. Miller committed Mar 31, 2014
1 parent 39f1a2f commit 339e022
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
7 changes: 0 additions & 7 deletions include/linux/netdevice.h
Original file line number Diff line number Diff line change
Expand Up @@ -63,13 +63,6 @@ struct wireless_dev;
void netdev_set_default_ethtool_ops(struct net_device *dev,
const struct ethtool_ops *ops);

/* hardware address assignment types */
#define NET_ADDR_PERM 0 /* address is permanent (default) */
#define NET_ADDR_RANDOM 1 /* address is generated randomly */
#define NET_ADDR_STOLEN 2 /* address is stolen from other device */
#define NET_ADDR_SET 3 /* address is set using
* dev_set_mac_address() */

/* Backlog congestion levels */
#define NET_RX_SUCCESS 0 /* keep 'em coming, baby */
#define NET_RX_DROP 1 /* packet dropped */
Expand Down
6 changes: 6 additions & 0 deletions include/uapi/linux/netdevice.h
Original file line number Diff line number Diff line change
Expand Up @@ -49,5 +49,11 @@ enum {
IF_PORT_100BASEFX
};

/* hardware address assignment types */
#define NET_ADDR_PERM 0 /* address is permanent (default) */
#define NET_ADDR_RANDOM 1 /* address is generated randomly */
#define NET_ADDR_STOLEN 2 /* address is stolen from other device */
#define NET_ADDR_SET 3 /* address is set using
* dev_set_mac_address() */

#endif /* _UAPI_LINUX_NETDEVICE_H */

0 comments on commit 339e022

Please sign in to comment.