diff mbox

[net-next,3/6] 6lowpan: move 6lowpan.c to 6lowpan_rtnl.c

Message ID 1392995711-19563-4-git-send-email-alex.aring@gmail.com
State Changes Requested, archived
Delegated to: David Miller
Headers show

Commit Message

Alexander Aring Feb. 21, 2014, 3:15 p.m. UTC
We have a 6lowpan.c file and 6lowpan.ko file. To avoid confusing we
should move 6lowpan.c to 6lowpan.ko. Then we can support multiple source
files for 6lowpan module.

Signed-off-by: Alexander Aring <alex.aring@gmail.com>
Tested-by: Martin Townsend <martin.townsend@xsilon.com>
---
 net/ieee802154/{6lowpan.c => 6lowpan_rtnl.c} | 0
 net/ieee802154/Makefile                      | 1 +
 2 files changed, 1 insertion(+)
 rename net/ieee802154/{6lowpan.c => 6lowpan_rtnl.c} (100%)

Comments

Ben Hutchings Feb. 22, 2014, 1:40 p.m. UTC | #1
On Fri, 2014-02-21 at 16:15 +0100, Alexander Aring wrote:
> We have a 6lowpan.c file and 6lowpan.ko file. To avoid confusing we
> should move 6lowpan.c to 6lowpan.ko. Then we can support multiple source

You put the wrong filename here ^

Ben.

> files for 6lowpan module.
> 
> Signed-off-by: Alexander Aring <alex.aring@gmail.com>
> Tested-by: Martin Townsend <martin.townsend@xsilon.com>
> ---
>  net/ieee802154/{6lowpan.c => 6lowpan_rtnl.c} | 0
>  net/ieee802154/Makefile                      | 1 +
>  2 files changed, 1 insertion(+)
>  rename net/ieee802154/{6lowpan.c => 6lowpan_rtnl.c} (100%)
> 
> diff --git a/net/ieee802154/6lowpan.c b/net/ieee802154/6lowpan_rtnl.c
> similarity index 100%
> rename from net/ieee802154/6lowpan.c
> rename to net/ieee802154/6lowpan_rtnl.c
> diff --git a/net/ieee802154/Makefile b/net/ieee802154/Makefile
> index e8f0588..3d08adf 100644
> --- a/net/ieee802154/Makefile
> +++ b/net/ieee802154/Makefile
> @@ -2,5 +2,6 @@ obj-$(CONFIG_IEEE802154) += ieee802154.o af_802154.o
>  obj-$(CONFIG_IEEE802154_6LOWPAN) += 6lowpan.o
>  obj-$(CONFIG_6LOWPAN_IPHC) += 6lowpan_iphc.o
>  
> +6lowpan-y := 6lowpan_rtnl.o
>  ieee802154-y := netlink.o nl-mac.o nl-phy.o nl_policy.o wpan-class.o
>  af_802154-y := af_ieee802154.o raw.o dgram.o
Alexander Aring Feb. 22, 2014, 2:03 p.m. UTC | #2
Hi Ben,

thanks for your reply.

On Sat, Feb 22, 2014 at 01:40:52PM +0000, Ben Hutchings wrote:
> On Fri, 2014-02-21 at 16:15 +0100, Alexander Aring wrote:
> > We have a 6lowpan.c file and 6lowpan.ko file. To avoid confusing we
> > should move 6lowpan.c to 6lowpan.ko. Then we can support multiple source
> 
> You put the wrong filename here ^
> 
mhh, I meant here:

Currently we have only one-file supporting like:

obj-$(CONFIG_IEEE802154_6LOWPAN) += 6lowpan.o


It's generate a 6lowpan.ko from a 6lowpan.c file.

Now we need some multiple-file supporting and I change it to:

obj-$(CONFIG_IEEE802154_6LOWPAN) += 6lowpan.o
6lowpan-y := 6lowpan_rtnl.o reassembly.o


to generate a still the 6lowpan.ko module with object files of
6lowpan_rtnl.o (which contains mostly some rtnl callbacks implementations
now) and reassembly.o file.

It's to support multiple files for a module only.


I can't do something like:

obj-$(CONFIG_IEEE802154_6LOWPAN) += 6lowpan.o
6lowpan-y := 6lowpan.o reassembly.o

because I have the same name for 6lowpan.c and 6lowpan.ko.

Is there maybe a better solution for this?



btw.

I also detected:

obj-$(CONFIG_6LOWPAN_IPHC) += 6lowpan_iphc.o

which is a seperate module. (if you selected it as module) but this
makes no sense, we should built it in 6lowpan.ko like:

6lowpan-y := 6lowpan_rtnl.o 6lowpan_iphc.o reassembly.o

aswell.


- Alex
--
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
Ben Hutchings Feb. 22, 2014, 2:07 p.m. UTC | #3
On Sat, 2014-02-22 at 15:03 +0100, Alexander Aring wrote:
> Hi Ben,
> 
> thanks for your reply.
> 
> On Sat, Feb 22, 2014 at 01:40:52PM +0000, Ben Hutchings wrote:
> > On Fri, 2014-02-21 at 16:15 +0100, Alexander Aring wrote:
> > > We have a 6lowpan.c file and 6lowpan.ko file. To avoid confusing we
> > > should move 6lowpan.c to 6lowpan.ko. Then we can support multiple source
> > 
> > You put the wrong filename here ^
> > 
> mhh, I meant here:
[...]

I know what you mean, but the second '6lowpan.ko' in the description
should surely be '6lowpan_rtnl.c' like in the subject.

Ben.
Alexander Aring Feb. 22, 2014, 2:25 p.m. UTC | #4
On Sat, Feb 22, 2014 at 02:07:15PM +0000, Ben Hutchings wrote:
> On Sat, 2014-02-22 at 15:03 +0100, Alexander Aring wrote:
> > Hi Ben,
> > 
> > thanks for your reply.
> > 
> > On Sat, Feb 22, 2014 at 01:40:52PM +0000, Ben Hutchings wrote:
> > > On Fri, 2014-02-21 at 16:15 +0100, Alexander Aring wrote:
> > > > We have a 6lowpan.c file and 6lowpan.ko file. To avoid confusing we
> > > > should move 6lowpan.c to 6lowpan.ko. Then we can support multiple source
> > > 
> > > You put the wrong filename here ^
> > > 
> > mhh, I meant here:
> [...]
> 
> I know what you mean, but the second '6lowpan.ko' in the description
> should surely be '6lowpan_rtnl.c' like in the subject.
> 
oh yes. Thanks. :-)

- Alex
--
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
diff mbox

Patch

diff --git a/net/ieee802154/6lowpan.c b/net/ieee802154/6lowpan_rtnl.c
similarity index 100%
rename from net/ieee802154/6lowpan.c
rename to net/ieee802154/6lowpan_rtnl.c
diff --git a/net/ieee802154/Makefile b/net/ieee802154/Makefile
index e8f0588..3d08adf 100644
--- a/net/ieee802154/Makefile
+++ b/net/ieee802154/Makefile
@@ -2,5 +2,6 @@  obj-$(CONFIG_IEEE802154) += ieee802154.o af_802154.o
 obj-$(CONFIG_IEEE802154_6LOWPAN) += 6lowpan.o
 obj-$(CONFIG_6LOWPAN_IPHC) += 6lowpan_iphc.o
 
+6lowpan-y := 6lowpan_rtnl.o
 ieee802154-y := netlink.o nl-mac.o nl-phy.o nl_policy.o wpan-class.o
 af_802154-y := af_ieee802154.o raw.o dgram.o