1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00

Merge pull request #16023 from maribu/max_pdu_size

sys/net/netopt: Drop deprecated NETOPT_MAX_PACKET_SIZE
This commit is contained in:
benpicco 2021-08-26 14:40:18 +02:00 committed by GitHub
commit 0b69747389
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
25 changed files with 14 additions and 18 deletions

View File

@ -24,6 +24,7 @@ PKG_LICENSE=Apache-2
# Store the cloned repositories under the stm32 directory to prevent downloads
# for each builds.
PKG_SOURCE_DIR = $(RIOTBASE)/cpu/stm32/include/vendor/cmsis/$(CPU_FAM)
PKG_PATCH_DIR = $(CURDIR)/patches/$(CPU_FAM)
include $(RIOTBASE)/pkg/pkg.mk

View File

@ -1,6 +1,6 @@
PKG_NAME=ccn-lite
PKG_URL=https://github.com/cn-uofbasel/ccn-lite/
PKG_VERSION=ee0bff932b5ee3f1c7835e787b2d47d2b26e18c7
PKG_VERSION=da0d9de8d82349dff845acc62d37242dd09b3d3d
PKG_LICENSE=ISC
include $(RIOTBASE)/pkg/pkg.mk

View File

@ -25,6 +25,7 @@ ifeq (,$(PKG_LICENSE))
endif
PKG_DIR ?= $(CURDIR)
PKG_PATCH_DIR ?= $(PKG_DIR)/patches
PKG_BUILD_OUT_OF_SOURCE ?= 1
ifeq (1,$(PKG_BUILD_OUT_OF_SOURCE))
@ -60,7 +61,7 @@ GITAMFLAGS ?= $(GIT_QUIET) --no-gpg-sign --ignore-whitespace --whitespace=nowarn
.PHONY: all prepare clean distclean FORCE
PKG_PATCHES = $(sort $(wildcard $(PKG_DIR)/patches/*.patch))
PKG_PATCHES = $(sort $(wildcard $(PKG_PATCH_DIR)/*.patch))
PKG_STATE_FILE = .pkg-state.git
PKG_STATE = $(PKG_SOURCE_DIR)/$(PKG_STATE_FILE)

View File

@ -29,14 +29,6 @@
extern "C" {
#endif
/**
* @brief A deprecated alias for @ref NETOPT_MAX_PDU_SIZE
*
* @deprecated Please use @ref NETOPT_MAX_PDU_SIZE instead of
* `NETOPT_MAX_PACKET_SIZE`
*/
#define NETOPT_MAX_PACKET_SIZE NETOPT_MAX_PDU_SIZE
/**
* @brief Global list of configuration options available throughout the
* network stack, e.g. by netdev and netapi
@ -411,7 +403,8 @@ typedef enum {
NETOPT_CCA_MODE,
/**
* @brief (@ref netstats_t*) get statistics about sent and received packets and data of the device or protocol
* @brief (@ref netstats_t*) get statistics about sent and received packets and data of the
* device or protocol
*
* Expects a pointer to a @ref netstats_t struct that will be pointed to
* the corresponding @ref netstats_t of the module.
@ -431,7 +424,8 @@ typedef enum {
NETOPT_ENCRYPTION_KEY,
/**
* @brief (@ref netopt_rf_testmode_t) Test mode for the radio, e.g. for CE or FCC certification
* @brief (@ref netopt_rf_testmode_t) Test mode for the radio, e.g. for CE or FCC
* certification
*
* Get/set the test mode as type @ref netopt_rf_testmode_t or as uint8_t if
* the radio supports other vendor specific test modes.

View File

@ -59,7 +59,7 @@ static int _get_netdev_proto(netdev_t *netdev, void *value, size_t max_len)
return sizeof(gnrc_nettype_t);
}
int _get_max_packet_size(netdev_t *dev, void *value, size_t max_len)
int _get_max_pdu_size(netdev_t *dev, void *value, size_t max_len)
{
(void)dev;
assert(max_len == sizeof(uint16_t));
@ -104,8 +104,8 @@ void _tests_init(void)
_get_device_type);
netdev_test_set_get_cb(&_mock_netdev, NETOPT_PROTO,
_get_netdev_proto);
netdev_test_set_get_cb(&_mock_netdev, NETOPT_MAX_PACKET_SIZE,
_get_max_packet_size);
netdev_test_set_get_cb(&_mock_netdev, NETOPT_MAX_PDU_SIZE,
_get_max_pdu_size);
netdev_test_set_get_cb(&_mock_netdev, NETOPT_SRC_LEN,
_get_src_len);
netdev_test_set_get_cb(&_mock_netdev, NETOPT_ADDRESS_LONG,

View File

@ -59,7 +59,7 @@ static int _get_netdev_proto(netdev_t *netdev, void *value, size_t max_len)
return sizeof(gnrc_nettype_t);
}
int _get_max_packet_size(netdev_t *dev, void *value, size_t max_len)
int _get_max_pdu_size(netdev_t *dev, void *value, size_t max_len)
{
(void)dev;
assert(max_len == sizeof(uint16_t));
@ -104,8 +104,8 @@ void _tests_init(void)
_get_device_type);
netdev_test_set_get_cb(&_mock_netdev, NETOPT_PROTO,
_get_netdev_proto);
netdev_test_set_get_cb(&_mock_netdev, NETOPT_MAX_PACKET_SIZE,
_get_max_packet_size);
netdev_test_set_get_cb(&_mock_netdev, NETOPT_MAX_PDU_SIZE,
_get_max_pdu_size);
netdev_test_set_get_cb(&_mock_netdev, NETOPT_SRC_LEN,
_get_src_len);
netdev_test_set_get_cb(&_mock_netdev, NETOPT_ADDRESS_LONG,