Skip to content

Commit a9f6e88

Browse files
author
Arto Kinnunen
committed
Merge branch 'master' into release_internal
* master: (87 commits) Fixed typo: 'lenght' in ns_crc.h Wi-sun border router DHCPv6 server address alocation update Allow buffer_dyn to handle more data (ARMmbed#2311) Copy IE unicast channel function from WS info instead of FHSS configu… (ARMmbed#2310) Wi-sun RPL memory soft and hard limit update Updated RPL default memory sof and hard limit to 2/4 from 1/2. Update MPL parameters to follow Specification Support for handle CRC error which will automatically change a channel. Corrected EUI-64 address bit flip on supplicant Corrected bitfield definition Improved initial EAPOL-key send stop logic on supplicant Improved EAPOL key update retry logic Wi-sun boot fix DIO advertisment fix Aro Registation and Dao update Iotthd 3963 2 (ARMmbed#2301) Randomize fixed channel when making new parent selection Wi-sun address registartion update Allow unicast TX to overlap with MC (ARMmbed#2298) MAC: Updated calling FHSS TX done (ARMmbed#2295) ...
2 parents c536960 + 01e7e82 commit a9f6e88

File tree

112 files changed

+2233
-806
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

112 files changed

+2233
-806
lines changed

nanostack/fhss_api.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,9 +122,10 @@ typedef void fhss_data_tx_done(const fhss_api_t *api, bool waiting_ack, bool tx_
122122
* @param api FHSS instance.
123123
* @param handle Handle of the data request.
124124
* @param frame_type Frame type of packet (Frames types are defined by FHSS api).
125+
* @param channel Channel wanted to black list temporarily.
125126
* @return true if frame has to be queued for retransmission, false otherwise.
126127
*/
127-
typedef bool fhss_data_tx_fail(const fhss_api_t *api, uint8_t handle, int frame_type);
128+
typedef bool fhss_data_tx_fail(const fhss_api_t *api, uint8_t handle, int frame_type, uint8_t channel);
128129

129130
/**
130131
* @brief Change synchronization state.

nanostack/fhss_test_api.h

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
/*
2+
* Copyright (c) 2020, Arm Limited and affiliates.
3+
* SPDX-License-Identifier: Apache-2.0
4+
*
5+
* Licensed under the Apache License, Version 2.0 (the "License");
6+
* you may not use this file except in compliance with the License.
7+
* You may obtain a copy of the License at
8+
*
9+
* http://www.apache.org/licenses/LICENSE-2.0
10+
*
11+
* Unless required by applicable law or agreed to in writing, software
12+
* distributed under the License is distributed on an "AS IS" BASIS,
13+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
* See the License for the specific language governing permissions and
15+
* limitations under the License.
16+
*/
17+
18+
/**
19+
* \file fhss_test_api.h
20+
* \brief
21+
*/
22+
23+
#ifndef FHSS_TEST_API_H
24+
#define FHSS_TEST_API_H
25+
26+
27+
#ifdef __cplusplus
28+
extern "C" {
29+
#endif
30+
31+
/**
32+
* \brief Set optimal packet length
33+
*
34+
* \param fhss_api FHSS instance.
35+
* \param packet_length Optimal packet length
36+
*
37+
* \return 0 Success
38+
* \return -1 Failure
39+
*/
40+
int8_t fhss_set_optimal_packet_length(const fhss_api_t *fhss_api, uint16_t packet_length);
41+
42+
#ifdef __cplusplus
43+
}
44+
#endif
45+
46+
#endif // FHSS_TEST_API_H

nanostack/platform/arm_hal_phy.h

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,8 @@ typedef enum {
161161
CHANNEL_PAGE_5 = 5, ///< Page 5
162162
CHANNEL_PAGE_6 = 6, ///< Page 6
163163
CHANNEL_PAGE_9 = 9, ///< Page 9
164-
CHANNEL_PAGE_10 = 10 ///< Page 10
164+
CHANNEL_PAGE_10 = 10, ///< Page 10
165+
CHANNEL_PAGE_UNDEFINED ///< Undefined
165166
} channel_page_e;
166167

167168
/** Modulation index */
@@ -192,6 +193,10 @@ typedef struct phy_rf_statistics_s {
192193
uint32_t crc_fails; ///< CRC failures
193194
uint32_t tx_timeouts; ///< transmission timeouts
194195
uint32_t rx_timeouts; ///< reception timeouts
196+
uint64_t tx_active_time; ///< transmission active time
197+
uint64_t rx_active_time; ///< reception active time
198+
uint32_t tx_bytes; ///< transmitted bytes
199+
uint32_t rx_bytes; ///< received bytes
195200
} phy_rf_statistics_s;
196201

197202
/** Virtual data request */

nanostack/sw_mac.h

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,13 @@ extern int8_t ns_sw_mac_virtual_client_unregister(struct mac_api_s *api);
6767
*/
6868
extern int ns_sw_mac_fhss_register(struct mac_api_s *mac_api, struct fhss_api *fhss_api);
6969

70+
/**
71+
* @brief Unregister FHSS API instance from given software MAC instance.
72+
* @param mac_api MAC instance.
73+
* @return 0 on success, -1 on fail.
74+
*/
75+
extern int ns_sw_mac_fhss_unregister(struct mac_api_s *mac_api);
76+
7077
/**
7178
* @brief Request registered FHSS API instance from software MAC instance.
7279
* @param mac_api MAC instance.

nanostack/ws_bbr_api.h

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -48,14 +48,10 @@ int ws_bbr_start(int8_t interface_id, int8_t backbone_interface_id);
4848
/**
4949
* Border router configuration options
5050
*/
51-
#define BBR_ULA_C 0x0001 /**< Static ULA prefix created automatically */
52-
#define BBR_GUA_ROUTE 0x0002 /**< More specific route is added for GUA prefix */
53-
#define BBR_BB_WAIT 0x0004 /**< Wait backbone availability before starting Wi-SUN network */
54-
55-
/*Deprecated configuration values */
56-
#define BBR_GUA_C 0x0000 /**< Routable prefix is learned from the backbone */
57-
#define BBR_GUA_SLAAC 0x0000 /**< Use SLAAC addressing in routable prefix */
58-
#define BBR_GUA_WAIT 0x0000 /**< Wait backbone availability before startingRPL dodag */
51+
#define BBR_ULA_C 0x0001 /**< Static ULA prefix created automatically */
52+
#define BBR_GUA_ROUTE 0x0002 /**< More specific route is added for GUA prefix */
53+
#define BBR_BB_WAIT 0x0004 /**< Wait backbone availability before starting Wi-SUN network */
54+
#define BBR_DEFAULT_ROUTE 0x0008 /**< Add default route parameter to DIO */
5955

6056
/**
6157
* Configure border router features.

source/6LoWPAN/Bootstraps/Generic/protocol_6lowpan_bootstrap.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1379,6 +1379,8 @@ static int8_t arm_6lowpan_bootstrap_down(protocol_interface_info_entry_t *cur)
13791379
}
13801380
cur->if_lowpan_security_params->mle_security_frame_counter = mle_service_security_get_frame_counter(cur->id);
13811381
mle_service_interface_receiver_handler_update(cur->id, mle_6lowpan_message_handler);
1382+
// Reset MAC for safe upper layer memory free
1383+
protocol_mac_reset(cur);
13821384
return nwk_6lowpan_down(cur);
13831385
}
13841386
#ifdef HAVE_6LOWPAN_ND
@@ -1593,7 +1595,7 @@ static void lowpan_neighbor_entry_remove_notify(mac_neighbor_table_entry_t *entr
15931595
{
15941596

15951597
protocol_interface_info_entry_t *cur_interface = user_data;
1596-
lowpan_adaptation_remove_free_indirect_table(cur_interface, entry_ptr);
1598+
lowpan_adaptation_neigh_remove_free_tx_tables(cur_interface, entry_ptr);
15971599
// Sleepy host
15981600
if (cur_interface->lowpan_info & INTERFACE_NWK_CONF_MAC_RX_OFF_IDLE) {
15991601
mac_data_poll_protocol_poll_mode_decrement(cur_interface);

source/6LoWPAN/Bootstraps/Generic/protocol_6lowpan_interface.c

Lines changed: 14 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,15 @@
7272
#include "6LoWPAN/Fragmentation/cipv6_fragmenter.h"
7373
#include "libNET/src/net_load_balance_internal.h"
7474

75+
void protocol_mac_reset(protocol_interface_info_entry_t *cur)
76+
{
77+
if (cur->mac_api) {
78+
mlme_reset_t reset;
79+
reset.SetDefaultPIB = true;
80+
cur->mac_api->mlme_req(cur->mac_api, MLME_RESET, &reset);
81+
}
82+
}
83+
7584

7685

7786
static int8_t set_6lowpan_nwk_down(protocol_interface_info_entry_t *cur)
@@ -96,15 +105,11 @@ static int8_t set_6lowpan_nwk_down(protocol_interface_info_entry_t *cur)
96105
}
97106

98107
if (cur->interface_mode == INTERFACE_UP) {
99-
if (cur->mac_api) {
100-
mlme_reset_t reset;
101-
reset.SetDefaultPIB = true;
102-
cur->mac_parameters->pan_id = 0xffff;
103-
cur->mac_parameters->SecurityEnabled = false;
104-
cur->mac_parameters->security_frame_counter = 0;
105-
cur->mac_parameters->mac_security_level = 0;
106-
cur->mac_api->mlme_req(cur->mac_api, MLME_RESET, &reset);
107-
}
108+
cur->mac_parameters->pan_id = 0xffff;
109+
cur->mac_parameters->SecurityEnabled = false;
110+
cur->mac_parameters->security_frame_counter = 0;
111+
cur->mac_parameters->mac_security_level = 0;
112+
protocol_mac_reset(cur);
108113
cur->interface_mode = INTERFACE_IDLE;
109114
net_load_balance_internal_state_activate(cur, false);
110115
}

source/6LoWPAN/Bootstraps/protocol_6lowpan_interface.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,5 +31,7 @@ extern int8_t nwk_6lowpan_up(struct protocol_interface_info_entry *cur);
3131
*/
3232
extern int8_t nwk_6lowpan_down(struct protocol_interface_info_entry *cur);
3333

34+
extern void protocol_mac_reset(struct protocol_interface_info_entry *cur);
35+
3436

3537
#endif /* PROTOCOL_6LOWPAN_INTERFACE_H_ */

source/6LoWPAN/MAC/mac_helper.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -887,6 +887,7 @@ int8_t mac_helper_key_link_frame_counter_set(int8_t interface_id, uint32_t seq_p
887887

888888
void mac_helper_devicetable_remove(mac_api_t *mac_api, uint8_t attribute_index, uint8_t *mac64)
889889
{
890+
(void) mac64;
890891
if (!mac_api) {
891892
return;
892893
}

source/6LoWPAN/MAC/mac_response_handler.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,7 @@ void mcps_data_indication_handler(const mac_api_t *api, const mcps_data_ind_t *d
120120
void mcps_purge_confirm_handler(const mac_api_t *api, mcps_purge_conf_t *data)
121121
{
122122
(void)api;
123+
(void)data;
123124
tr_info("MCPS Data Purge confirm status %u, for handle %u", data->status, data->msduHandle);
124125
}
125126

0 commit comments

Comments
 (0)