[riot-notifications] [RIOT-OS/RIOT] drivers/cc110x: Fixed MTU calculation (#10918)
notifications at github.com
Fri Feb 1 12:35:11 CET 2019
### Contribution description
- The MTU of `cc110x` is reported incorrectly when used without 6LoWPAN:
- `netdev_driver_t::get(NETOPT_MAX_PACKET_SIZE)` returns the maximum frame size including layer 2 header, not the maximum layer 2 PDU
- The MUT of`cc110x` is reported incorrectly when used with 6LoWPAN:
- `gnrc_netif_ipv6_init_mtu()` does not yet handle the `CC110X`
This PR fixes both
### Testing procedure
Using the MSB-A2:
Flash `examples/gnrc_networking` and run `ifconfig`. The MTU should be 1280, as 6LoWPAN is used with this PR (but is 255 without this PR).
Flash `examples/default` and run `ifconfig`. The MTU should be 255-3 = 252 with this PR (but is 255 without this PR).
Also, `ping6` should still work. (Please keep in mind to change the address of one of the MSB-A2s, e.g. by `ifconfig 7 set addr 42`, `ifconfig 7 del fe80::ff:fe00:22`, and `ifconfig 7 add fe80::ff:fe00:42`.)
### Issues/PRs references
Partly a split off of PR https://github.com/RIOT-OS/RIOT/pull/10340
You can view, comment on, or merge this pull request online at:
-- Commit Summary --
* drivers/cc110x: Replaced magic number
* drivers/cc110x: Fixed get NETOPT_MAX_PACKET_SIZE
* sys/net: Added NETDEV_TYPE_CC110X to MTU init
-- File Changes --
M drivers/cc110x/cc110x-netdev.c (2)
M drivers/cc110x/cc110x-rxtx.c (8)
M drivers/cc110x/include/cc110x-internal.h (1)
M sys/net/gnrc/netif/gnrc_netif_device_type.c (3)
-- Patch Links --
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the notifications