Re: [PATCH 01/17] usb/gadget: u_ether: allow getting binary-form host address

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello.

On 24-05-2013 16:17, Andrzej Pietrasiewicz wrote:

Signed-off-by: Andrzej Pietrasiewicz <andrzej.p@xxxxxxxxxxx>
Signed-off-by: Kyungmin Park <kyungmin.park@xxxxxxxxxxx>
---
  drivers/usb/gadget/u_ether.c |   11 +++++++++++
  drivers/usb/gadget/u_ether.h |   10 ++++++++++
  2 files changed, 21 insertions(+), 0 deletions(-)

diff --git a/drivers/usb/gadget/u_ether.c b/drivers/usb/gadget/u_ether.c
index 6d3ccdc..aa7ed15 100644
--- a/drivers/usb/gadget/u_ether.c
+++ b/drivers/usb/gadget/u_ether.c
@@ -963,6 +963,17 @@ int gether_get_host_addr_cdc(struct net_device *net, char *host_addr, int len)
  }
  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);
+	host_mac[0] = dev->host_mac[0]; host_mac[1] = dev->host_mac[1];
+	host_mac[2] = dev->host_mac[2]; host_mac[3] = dev->host_mac[3];
+	host_mac[4] = dev->host_mac[4]; host_mac[5] = dev->host_mac[5];

   Documentation/CodingStyle, chapter 1:

<<
Don't put multiple statements on a single line unless you have
something to hide:

	if (condition) do_this;
	  do_something_everytime;

Don't put multiple assignments on a single line either. Kernel coding style is super simple. Avoid tricky expressions.
>>

WBR, Sergei

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux