usb: gadget: f_ecm: fix host mac address for multiple instances
authorLukasz Nowak <lukasz.nowak@exablue.com>
Sun, 6 May 2018 23:36:45 +0000 (01:36 +0200)
committerFelipe Balbi <felipe.balbi@linux.intel.com>
Tue, 15 May 2018 07:17:18 +0000 (10:17 +0300)
commitd3ac41bb330bea3a2929a70b8f4df20a0fa55d18
treea3a4debf3d07d76fc2e87d3d00d6f7066adcc867
parenteea52743eb5654ec6f52b0e8b4aefec952543697
usb: gadget: f_ecm: fix host mac address for multiple instances

In case there are multiple ecm instances, either for multiple
otg controllers, or multiple virtual links using libcomposite,
each instance needs to have its own host mac address string
value for iMACAddress.

Update the source array (ecm_string_defs), every time before
usb_gstrings_attach(). Without that, all links wrongly were
getting the same, last allocated, host mac address, rather
than the correct one, as requested via configfs.

Signed-off-by: Lukasz Nowak <lukasz.nowak@exablue.com>
Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
drivers/usb/gadget/function/f_ecm.c