Commit bf4277c7 authored by Andrzej Pietrasiewicz's avatar Andrzej Pietrasiewicz Committed by Felipe Balbi

usb: gadget: u_ether: allow getting binary-form host address

helper function to copy MAC address to proper place.
Signed-off-by: default avatarAndrzej Pietrasiewicz <andrzej.p@samsung.com>
Signed-off-by: default avatarKyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: default avatarFelipe Balbi <balbi@ti.com>
parent 83408745
...@@ -963,6 +963,15 @@ int gether_get_host_addr_cdc(struct net_device *net, char *host_addr, int len) ...@@ -963,6 +963,15 @@ int gether_get_host_addr_cdc(struct net_device *net, char *host_addr, int len)
} }
EXPORT_SYMBOL(gether_get_host_addr_cdc); EXPORT_SYMBOL(gether_get_host_addr_cdc);
void gether_get_host_addr_u8(struct net_device *net, u8 host_mac[ETH_ALEN])
{
struct eth_dev *dev;
dev = netdev_priv(net);
memcpy(host_mac, dev->host_mac, ETH_ALEN);
}
EXPORT_SYMBOL(gether_get_host_addr_u8);
void gether_set_qmult(struct net_device *net, unsigned qmult) void gether_set_qmult(struct net_device *net, unsigned qmult)
{ {
struct eth_dev *dev; struct eth_dev *dev;
......
...@@ -209,6 +209,16 @@ int gether_get_host_addr(struct net_device *net, char *host_addr, int len); ...@@ -209,6 +209,16 @@ int gether_get_host_addr(struct net_device *net, char *host_addr, int len);
*/ */
int gether_get_host_addr_cdc(struct net_device *net, char *host_addr, int len); int gether_get_host_addr_cdc(struct net_device *net, char *host_addr, int len);
/**
* gether_get_host_addr_u8 - get an ethernet-over-usb link host address
* @net: device representing this link
* @host_mac: place to store the eth address of the host
*
* This gets the binary formatted host-side Ethernet address of this
* ethernet-over-usb link.
*/
void gether_get_host_addr_u8(struct net_device *net, u8 host_mac[ETH_ALEN]);
/** /**
* gether_set_qmult - initialize an ethernet-over-usb link with a multiplier * gether_set_qmult - initialize an ethernet-over-usb link with a multiplier
* @net: device representing this link * @net: device representing this link
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment