diff --git a/sys/include/net/netopt.h b/sys/include/net/netopt.h index 15744b27ca..5646d2db32 100644 --- a/sys/include/net/netopt.h +++ b/sys/include/net/netopt.h @@ -539,6 +539,21 @@ typedef enum { */ NETOPT_BLE_CTX, + /** + * @brief (@ref netopt_enable_t) enable hardware checksumming + * + * If enabled, enable hardware checksumming of incoming frames. + */ + NETOPT_CHECKSUM, + + /** + * @brief (@ref netopt_enable_t) enable busy mode + * + * When set, the PHY will enter busy mode, in which it will not accept + * incoming frames until unset. + */ + NETOPT_PHY_BUSY, + /* add more options if needed */ /** diff --git a/sys/net/crosslayer/netopt/netopt.c b/sys/net/crosslayer/netopt/netopt.c index e9ba46d5a4..ac04811054 100644 --- a/sys/net/crosslayer/netopt/netopt.c +++ b/sys/net/crosslayer/netopt/netopt.c @@ -90,6 +90,8 @@ static const char *_netopt_strmap[] = { [NETOPT_TX_RETRIES_NEEDED] = "NETOPT_TX_RETRIES_NEEDED", [NETOPT_6LO_IPHC] = "NETOPT_6LO_IPHC", [NETOPT_BLE_CTX] = "NETOPT_BLE_CTX", + [NETOPT_CHECKSUM] = "NETOPT_CHECKSUM", + [NETOPT_PHY_BUSY] = "NETOPT_PHY_BUSY", [NETOPT_NUMOF] = "NETOPT_NUMOF", }; diff --git a/sys/shell/commands/sc_gnrc_netif.c b/sys/shell/commands/sc_gnrc_netif.c index 403fbadb8f..39e37bbfe8 100644 --- a/sys/shell/commands/sc_gnrc_netif.c +++ b/sys/shell/commands/sc_gnrc_netif.c @@ -67,11 +67,13 @@ static const struct { { "iphc", NETOPT_6LO_IPHC }, { "preload", NETOPT_PRELOADING }, { "promisc", NETOPT_PROMISCUOUSMODE }, + { "phy_busy", NETOPT_PHY_BUSY }, { "raw", NETOPT_RAWMODE }, { "rtr_adv", NETOPT_IPV6_SND_RTR_ADV }, { "iq_invert", NETOPT_IQ_INVERT }, { "rx_single", NETOPT_SINGLE_RECEIVE }, - { "chan_hop", NETOPT_CHANNEL_HOP } + { "chan_hop", NETOPT_CHANNEL_HOP }, + { "checksum", NETOPT_CHECKSUM }, }; /* utility functions */ @@ -150,6 +152,7 @@ static void _set_usage(char *cmd_name) " * \"freq\" - sets the \"channel\" center frequency\n" " * \"channel\" - sets the frequency channel\n" " * \"chan\" - alias for \"channel\"\n" + " * \"checksum\" - set checksumming on-off\n" " * \"csma_retries\" - set max. number of channel access attempts\n" " * \"encrypt\" - set the encryption on-off\n" " * \"hop_limit\" - set hop limit\n" @@ -160,6 +163,7 @@ static void _set_usage(char *cmd_name) " * \"page\" - set the channel page (IEEE 802.15.4)\n" " * \"pan\" - alias for \"nid\"\n" " * \"pan_id\" - alias for \"nid\"\n" + " * \"phy_busy\" - set busy mode on-off\n" " * \"bw\" - alias for channel bandwidth\n" " * \"sf\" - alias for spreading factor\n" " * \"cr\" - alias for coding rate\n" @@ -276,6 +280,14 @@ static void _print_netopt(netopt_t opt) printf("coding rate"); break; + case NETOPT_CHECKSUM: + printf("checksum"); + break; + + case NETOPT_PHY_BUSY: + printf("PHY busy"); + break; + default: /* we don't serve these options here */ break;