Patchwork VLAN patch: Export symbols as non GPL symbols.

login
register
mail settings
Submitter Ben Greear
Date Jan. 26, 2009, 5:01 p.m.
Message ID <497DEC7A.1040405@candelatech.com>
Download mbox | patch
Permalink /patch/20299/
State Accepted
Delegated to: David Miller
Headers show

Comments

Ben Greear - Jan. 26, 2009, 5:01 p.m.
In previous kernels, any kernel module could get access to the 
'real-device' and the
VLAN-ID for a particular VLAN.  In more recent kernels, the code was 
restructured
such that this is hard to do without accessing private .h files for any 
module that cannot
use GPL-only symbols.

Attached is a patch to once again allow non-GPL modules the ability to 
access the
real-device and VLAN id for VLANs.  This patch is against 2.6.29-rc2.

Signed-Off-By:  Ben Greear<greearb@candelatech.com>

Thanks,
Ben
Patrick McHardy - Jan. 26, 2009, 5:05 p.m.
Ben Greear wrote:
> In previous kernels, any kernel module could get access to the 
> 'real-device' and the
> VLAN-ID for a particular VLAN.  In more recent kernels, the code was 
> restructured
> such that this is hard to do without accessing private .h files for any 
> module that cannot
> use GPL-only symbols.
> 
> Attached is a patch to once again allow non-GPL modules the ability to 
> access the
> real-device and VLAN id for VLANs.  This patch is against 2.6.29-rc2.
> 
> Signed-Off-By:  Ben Greear<greearb@candelatech.com>

I added that export after moving the code from a header file, but
there's no reason from my side not to export this to non-GPLed
drivers, using _GPL was merely a habit.

Acked-by: Patrick McHardy <kaber@trash.net>
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
David Miller - Jan. 26, 2009, 8:37 p.m.
From: Patrick McHardy <kaber@trash.net>
Date: Mon, 26 Jan 2009 18:05:53 +0100

> Ben Greear wrote:
> > In previous kernels, any kernel module could get access to the 'real-device' and the
> > VLAN-ID for a particular VLAN.  In more recent kernels, the code was restructured
> > such that this is hard to do without accessing private .h files for any module that cannot
> > use GPL-only symbols.
> > Attached is a patch to once again allow non-GPL modules the ability to access the
> > real-device and VLAN id for VLANs.  This patch is against 2.6.29-rc2.
> > Signed-Off-By:  Ben Greear<greearb@candelatech.com>
> 
> I added that export after moving the code from a header file, but
> there's no reason from my side not to export this to non-GPLed
> drivers, using _GPL was merely a habit.
> 
> Acked-by: Patrick McHardy <kaber@trash.net>

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

Patch

diff --git a/net/8021q/vlan_core.c b/net/8021q/vlan_core.c
index 6c13239..e9db889 100644
--- a/net/8021q/vlan_core.c
+++ b/net/8021q/vlan_core.c
@@ -62,13 +62,13 @@  struct net_device *vlan_dev_real_dev(const struct net_device *dev)
 {
 	return vlan_dev_info(dev)->real_dev;
 }
-EXPORT_SYMBOL_GPL(vlan_dev_real_dev);
+EXPORT_SYMBOL(vlan_dev_real_dev);
 
 u16 vlan_dev_vlan_id(const struct net_device *dev)
 {
 	return vlan_dev_info(dev)->vlan_id;
 }
-EXPORT_SYMBOL_GPL(vlan_dev_vlan_id);
+EXPORT_SYMBOL(vlan_dev_vlan_id);
 
 static int vlan_gro_common(struct napi_struct *napi, struct vlan_group *grp,
 			   unsigned int vlan_tci, struct sk_buff *skb)