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
838b18e8
Commit
838b18e8
authored
6 years ago
by
Peter Kietzmann
Browse files
Options
Downloads
Patches
Plain Diff
drivers/cc2420: add netopt NETOPT_MAX_PACKET_SIZE
parent
7f6fe21b
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
drivers/cc2420/cc2420_netdev.c
+6
-0
6 additions, 0 deletions
drivers/cc2420/cc2420_netdev.c
with
6 additions
and
0 deletions
drivers/cc2420/cc2420_netdev.c
+
6
−
0
View file @
838b18e8
...
@@ -38,6 +38,7 @@
...
@@ -38,6 +38,7 @@
#define ENABLE_DEBUG (0)
#define ENABLE_DEBUG (0)
#include
"debug.h"
#include
"debug.h"
#define _MAX_MHR_OVERHEAD (25)
static
int
_send
(
netdev_t
*
netdev
,
const
iolist_t
*
iolist
);
static
int
_send
(
netdev_t
*
netdev
,
const
iolist_t
*
iolist
);
static
int
_recv
(
netdev_t
*
netdev
,
void
*
buf
,
size_t
len
,
void
*
info
);
static
int
_recv
(
netdev_t
*
netdev
,
void
*
buf
,
size_t
len
,
void
*
info
);
...
@@ -187,6 +188,11 @@ static int _get(netdev_t *netdev, netopt_t opt, void *val, size_t max_len)
...
@@ -187,6 +188,11 @@ static int _get(netdev_t *netdev, netopt_t opt, void *val, size_t max_len)
cc2420_get_addr_long
(
dev
,
val
);
cc2420_get_addr_long
(
dev
,
val
);
return
8
;
return
8
;
case
NETOPT_MAX_PACKET_SIZE
:
assert
(
max_len
>=
sizeof
(
int16_t
));
*
((
uint16_t
*
)
val
)
=
CC2420_PKT_MAXLEN
-
_MAX_MHR_OVERHEAD
;
return
sizeof
(
int16_t
);
case
NETOPT_NID
:
case
NETOPT_NID
:
assert
(
max_len
>=
sizeof
(
uint16_t
));
assert
(
max_len
>=
sizeof
(
uint16_t
));
return
w_u16
(
val
,
cc2420_get_pan
(
dev
));
return
w_u16
(
val
,
cc2420_get_pan
(
dev
));
...
...
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