Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
R
RIOT
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
cm-projects
RIOT
Commits
bbf4f1e4
Commit
bbf4f1e4
authored
6 years ago
by
Joakim Nohlgård
Browse files
Options
Downloads
Patches
Plain Diff
gnrc_netif: Enable RX and TX complete events after netdev init
parent
4b7f85de
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
sys/net/gnrc/netif/gnrc_netif.c
+17
-0
17 additions, 0 deletions
sys/net/gnrc/netif/gnrc_netif.c
with
17 additions
and
0 deletions
sys/net/gnrc/netif/gnrc_netif.c
+
17
−
0
View file @
bbf4f1e4
...
...
@@ -1226,6 +1226,22 @@ static void _init_from_device(gnrc_netif_t *netif)
_update_l2addr_from_dev
(
netif
);
}
static
void
_configure_netdev
(
netdev_t
*
dev
)
{
/* Enable RX- and TX-complete interrupts */
static
const
netopt_enable_t
enable
=
NETOPT_ENABLE
;
int
res
=
dev
->
driver
->
set
(
dev
,
NETOPT_RX_END_IRQ
,
&
enable
,
sizeof
(
enable
));
if
(
res
<
0
)
{
LOG_ERROR
(
"gnrc_netif: enable NETOPT_RX_END_IRQ failed: %d
\n
"
,
res
);
}
#ifdef MODULE_NETSTATS_L2
res
=
dev
->
driver
->
set
(
dev
,
NETOPT_TX_END_IRQ
,
&
enable
,
sizeof
(
enable
));
if
(
res
<
0
)
{
LOG_ERROR
(
"gnrc_netif: enable NETOPT_TX_END_IRQ failed: %d
\n
"
,
res
);
}
#endif
}
static
void
*
_gnrc_netif_thread
(
void
*
args
)
{
gnrc_netapi_opt_t
*
opt
;
...
...
@@ -1247,6 +1263,7 @@ static void *_gnrc_netif_thread(void *args)
dev
->
context
=
netif
;
/* initialize low-level driver */
dev
->
driver
->
init
(
dev
);
_configure_netdev
(
dev
);
_init_from_device
(
netif
);
netif
->
cur_hl
=
GNRC_NETIF_DEFAULT_HL
;
#ifdef MODULE_GNRC_IPV6_NIB
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment