Skip to contentSkip to conversation

VLAN patch: Export symbols as non GPL symbols.

PATCH Applied Ben Greear 3 participants 3 messages Jan 26, 2009

Subsystems (2)
lore
Share & tools
lore

Ben Greear

author
#0 lore raw

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.

Thanks,
Ben

Signature · 1 line
Ben Greear <[email protected]> Candela Technologies Inc  http://www.candelatech.com
net/8021q/vlan_core.c +2 -2
index 6c13239..e9db889 100644
@@ -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)
#1 lore raw
Quoted 9 lines · Ben Greear

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.

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.

maintainer Applied
#2 lore raw

From: Patrick McHardy <[email protected]>
Date: Mon, 26 Jan 2009 18:05:53 +0100

Quoted 9 lines
Quoted 7 lines · Ben Greear

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.

Quoted 5 lines

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.

Applied, thanks.