diff mbox series

[v5,net-next,2/5] net: cdc_ether: export usbnet_cdc_update_filter

Message ID 20200715184100.109349-3-bjorn@mork.no (mailing list archive)
State Mainlined
Commit e506addeff844237d60545ef4f6141de21471caf
Headers show
Series usbnet: multicast filter support for cdc ncm devices | expand

Commit Message

Bjørn Mork July 15, 2020, 6:40 p.m. UTC
From: Miguel Rodríguez Pérez <miguel@det.uvigo.gal>

This makes the function available to other drivers, like cdc_ncm.

Signed-off-by: Miguel Rodríguez Pérez <miguel@det.uvigo.gal>
Acked-by: Oliver Neukum <oneukum@suse.com>
Signed-off-by: Bjørn Mork <bjorn@mork.no>
---
 drivers/net/usb/cdc_ether.c | 3 ++-
 include/linux/usb/usbnet.h  | 1 +
 2 files changed, 3 insertions(+), 1 deletion(-)

Comments

Oliver Neukum July 21, 2020, 9 a.m. UTC | #1
Am Mittwoch, den 15.07.2020, 20:40 +0200 schrieb Bjørn Mork:
> 
> @@ -90,6 +90,7 @@ static void usbnet_cdc_update_filter(struct usbnet *dev)
>  			USB_CTRL_SET_TIMEOUT
>  		);
>  }
> +EXPORT_SYMBOL_GPL(usbnet_cdc_update_filter);

Hi,

this function is pretty primitive. In fact it more or less
is a straight take from the spec. Can this justify the _GPL
version?

	Regards
		Oliver
Bjørn Mork July 24, 2020, 2:18 p.m. UTC | #2
On July 21, 2020 11:00:08 AM GMT+02:00, Oliver Neukum <oneukum@suse.de> wrote:
>Am Mittwoch, den 15.07.2020, 20:40 +0200 schrieb Bjørn Mork:
>> 
>> @@ -90,6 +90,7 @@ static void usbnet_cdc_update_filter(struct usbnet
>*dev)
>>  			USB_CTRL_SET_TIMEOUT
>>  		);
>>  }
>> +EXPORT_SYMBOL_GPL(usbnet_cdc_update_filter);
>
>Hi,
>
>this function is pretty primitive. In fact it more or less
>is a straight take from the spec. Can this justify the _GPL
>version?

Maybe not? I must admit I didn't put much thought into it. 

I will not object to changing it. And you're the boss anyway :-)


Bjørn
Oliver Neukum July 27, 2020, 1:03 p.m. UTC | #3
Am Freitag, den 24.07.2020, 16:18 +0200 schrieb Bjørn Mork:
> 
> On July 21, 2020 11:00:08 AM GMT+02:00, Oliver Neukum <oneukum@suse.de> wrote:
> > Am Mittwoch, den 15.07.2020, 20:40 +0200 schrieb Bjørn Mork:
> > > 
> > > @@ -90,6 +90,7 @@ static void usbnet_cdc_update_filter(struct usbnet
> > 
> > *dev)
> > >  			USB_CTRL_SET_TIMEOUT
> > >  		);
> > >  }
> > > +EXPORT_SYMBOL_GPL(usbnet_cdc_update_filter);
> > 
> > Hi,
> > 
> > this function is pretty primitive. In fact it more or less
> > is a straight take from the spec. Can this justify the _GPL
> > version?
> 
> Maybe not? I must admit I didn't put much thought into it. 
> 
> I will not object to changing it. And you're the boss anyway :-)

Well,

it has been applied. I don't care enough to change it unless
we are violating a policy. I am looking for some ground rules
on that issue.

Leading us to the thorny issue of binary modules, yes I know.
Yet up to now it was my understanding that plain EXPORT_SYMBOL
is the default and EXPORT_SYMBOL_GPL needs a reason.
Now, I like the GPL as much as everybody else and I will
not challenge people on their reason if they state it
and I am willing to assume that there is a reason if the code
behind the symbol is substantial.
My job as maintainer is to check things and to ensure some
consistency. And I am seeing a certain lack of consistency here.
As I do not want to make developers unhappy I would very much
appreciate some guide lines I can point at.

I really want to preclude some lawyers sending me conflicting
patches in the future. I fear this coming.

	Regards
		Oliver
diff mbox series

Patch

diff --git a/drivers/net/usb/cdc_ether.c b/drivers/net/usb/cdc_ether.c
index 2afe258e3648..8c1d61c2cbac 100644
--- a/drivers/net/usb/cdc_ether.c
+++ b/drivers/net/usb/cdc_ether.c
@@ -63,7 +63,7 @@  static const u8 mbm_guid[16] = {
 	0xa6, 0x07, 0xc0, 0xff, 0xcb, 0x7e, 0x39, 0x2a,
 };
 
-static void usbnet_cdc_update_filter(struct usbnet *dev)
+void usbnet_cdc_update_filter(struct usbnet *dev)
 {
 	struct net_device	*net = dev->net;
 
@@ -90,6 +90,7 @@  static void usbnet_cdc_update_filter(struct usbnet *dev)
 			USB_CTRL_SET_TIMEOUT
 		);
 }
+EXPORT_SYMBOL_GPL(usbnet_cdc_update_filter);
 
 /* probes control interface, claims data interface, collects the bulk
  * endpoints, activates data interface (if needed), maybe sets MTU.
diff --git a/include/linux/usb/usbnet.h b/include/linux/usb/usbnet.h
index b0bff3083278..3a856963a363 100644
--- a/include/linux/usb/usbnet.h
+++ b/include/linux/usb/usbnet.h
@@ -207,6 +207,7 @@  struct cdc_state {
 	struct usb_interface		*data;
 };
 
+extern void usbnet_cdc_update_filter(struct usbnet *dev);
 extern int usbnet_generic_cdc_bind(struct usbnet *, struct usb_interface *);
 extern int usbnet_ether_cdc_bind(struct usbnet *dev, struct usb_interface *intf);
 extern int usbnet_cdc_bind(struct usbnet *, struct usb_interface *);