Skip to content

sys/net/gnrc_netif2: port sx127x to netif2#7950

Closed
aabadie wants to merge 8 commits intoRIOT-OS:gnrc_netif2_integration/masterfrom
aabadie:pr/auto_init_sx127x_netif2
Closed

sys/net/gnrc_netif2: port sx127x to netif2#7950
aabadie wants to merge 8 commits intoRIOT-OS:gnrc_netif2_integration/masterfrom
aabadie:pr/auto_init_sx127x_netif2

Conversation

@aabadie
Copy link
Copy Markdown
Contributor

@aabadie aabadie commented Nov 7, 2017

This is an attempt to port the SX127x driver to gnrc_netdev and gnrc_netif2 in the mean time.

This PR is adaption of #7356 for netif2.

Building the default example for b-l072z-lrwan1 fails and I don't understand why. Any help would be highly appreciated.

@aabadie aabadie added Area: LoRa Area: LoRa radio support Area: network Area: Networking labels Nov 7, 2017
@aabadie aabadie requested a review from miri64 November 7, 2017 16:20
@aabadie aabadie changed the title Pr/auto init sx127x netif2 Port sx127x to netif2 Nov 7, 2017
@miri64
Copy link
Copy Markdown
Member

miri64 commented Nov 7, 2017

Can you give this PR a proper name, please.

"sx127x", (netdev_t *)&sx127x_devs[i]);
#else
gnrc_netdev_init(sx127x_stacks[i], SX127X_STACKSIZE, SX127X_PRIO,
"sx127x", &sx127x_netdevs[i]);
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This isn't necessary anymore, please remove all the #ifdefs

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

@aabadie aabadie changed the title Port sx127x to netif2 sys/net/gnrc_netif2: port sx127x to netif2 Nov 7, 2017
@aabadie
Copy link
Copy Markdown
Contributor Author

aabadie commented Nov 7, 2017

Can you give this PR a proper name, please.

PR title updated, not sure if it's ok now ;)

Copy link
Copy Markdown
Member

@miri64 miri64 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please remove the gnrc_netdev related stuff. It will not exist anymore after #7925 was merged. Also please put the non-netif2 related stuff into a separate PR please.

sx127x_setup(&sx127x_devs[i], &sx127x_params[i]);
#ifdef MODULE_GNRC_NETIF2
gnrc_netif2_raw_create(sx127x_stacks[i], SX127X_STACKSIZE, SX127X_PRIO,
"sx127x", (netdev_t *)&sx127x_devs[i]);
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think you want to use raw, but the LoRA layer. Otherwise you don't get any link-layer headers.

@aabadie aabadie force-pushed the pr/auto_init_sx127x_netif2 branch from 65b0625 to a03f06e Compare November 7, 2017 16:48
@aabadie
Copy link
Copy Markdown
Contributor Author

aabadie commented Nov 7, 2017

Please remove the gnrc_netdev related stuff

Done, I think.

Copy link
Copy Markdown
Member

@miri64 miri64 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Still some unrelated changes.

@@ -1,3 +1,7 @@
ifneq (,$(filter gnrc_netdev_default netdev_default,$(USEMODULE)))
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The gnrc_netdev_default case isn't required anymore, even in master ;-)

*/
#define SX127X_STACKSIZE (THREAD_STACKSIZE_DEFAULT)
#ifndef SX127X_PRIO
#define SX127X_PRIO (GNRC_NETDEV_MAC_PRIO)
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please use GNRC_NETIF2_MAC_PRIO instead.

@miri64 miri64 self-assigned this Nov 7, 2017
@miri64 miri64 added the GNRC label Nov 15, 2017
@aabadie aabadie force-pushed the pr/auto_init_sx127x_netif2 branch from a03f06e to c6fc4ad Compare November 17, 2017 09:09
@aabadie
Copy link
Copy Markdown
Contributor Author

aabadie commented Nov 17, 2017

@miri64, is it fine if I close this one and wait for the new gnrc netif to arrive in master ?

@miri64
Copy link
Copy Markdown
Member

miri64 commented Nov 17, 2017

You can close it or adapt it as soon as it is in master. As you prefer :-).

@aabadie
Copy link
Copy Markdown
Contributor Author

aabadie commented Nov 17, 2017

You can close it or adapt it as soon as it is in master

Since it's targeting another branch than master, I think I'll have to close it in both cases. So let's do it now :)

@miri64
Copy link
Copy Markdown
Member

miri64 commented Nov 27, 2017

(I know why, but for posterity) Why did you close this PR?

@aabadie
Copy link
Copy Markdown
Contributor Author

aabadie commented Nov 27, 2017

Why did you close this PR?

I think it's not possible to change the target branch in a PR on GitHub (but maybe I'm wrong).

@miri64
Copy link
Copy Markdown
Member

miri64 commented Nov 27, 2017

It is. Just click on "Edit" next to the PR title above and change it ;-).

@aabadie
Copy link
Copy Markdown
Contributor Author

aabadie commented Nov 27, 2017

just click on "Edit" next to the PR title above and change it

Ah ! Thanks for the tip :)
Anyway, I could make some cleanup in the initial branches.

@miri64
Copy link
Copy Markdown
Member

miri64 commented Nov 27, 2017

What I actually wanted to see was: Superseded by #8158 and #8159 ;-)

@aabadie aabadie deleted the pr/auto_init_sx127x_netif2 branch July 4, 2019 17:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Area: LoRa Area: LoRa radio support Area: network Area: Networking

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants