Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

legal: Replace and relocate Apache-2.0 LICENSE to comply reuse #17

Open
wants to merge 54 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
54 commits
Select commit Hold shift + click to select a range
ab23dc0
wsbrd: fix waste of CPU when 6lowpan queue is full
jerome-pouiller May 28, 2024
1926045
tbu: fix metric version in /config/borderRouter/joinMetrics
MathisMARION May 27, 2024
750611d
wsbrd: replace signal() with sigaction()
MathisMARION Feb 21, 2024
5d46665
utils: introduce uart_tx_flush()
MathisMARION Feb 21, 2024
b87e60a
rcp: flush TX queue on SIGINT
MathisMARION Feb 21, 2024
ce57d90
rcp: ignore CRC errors before IND_RESET
MathisMARION Feb 21, 2024
cfad740
hwping: fix ping requests
MathisMARION Feb 21, 2024
a5e86d3
hwping: fix hif tx traces for RCPv2
MathisMARION Feb 21, 2024
1d3ec54
hwping: trace hif during protocol detection
MathisMARION Feb 21, 2024
feb6039
hwping: trace hif in from read_data()
MathisMARION Feb 21, 2024
d61c8db
hwping: wait for reset indication before starting the test
MathisMARION Feb 21, 2024
7c18865
hwping: support IND_FATAL
MathisMARION Feb 21, 2024
d84178f
tbu: use -k instead of -d for dnsmasq
MathisMARION May 28, 2024
c71fa82
tbu: insert JM-IE in data frames
MathisMARION May 27, 2024
2939199
tbu: insert JM-IE even with no metrics
MathisMARION Jun 5, 2024
5ba1972
doc: update CHANGES with v2.1.1
MathisMARION Jun 5, 2024
fdefe9b
tbu: move up jm_list and jm_version declarations
MathisMARION Jun 13, 2024
872b6f9
tbu: make /config/borderRouter/joinMetrics idempotent
MathisMARION Jun 13, 2024
b84bbfe
tbu: make /config/borderRouter/informationElements idempotent
MathisMARION Jun 13, 2024
7091cee
utils: pass void * to iobuf_push_data()
MathisMARION May 13, 2024
1dcb2ad
15.4: add frame type definitions to specs/ieee80215.4
MathisMARION Apr 8, 2024
815f27b
15.4: introduce ieee802154_frame.[ch]
MathisMARION Apr 8, 2024
bf577dd
15.4: introduce ieee802154_frame_write_hdr()
MathisMARION May 6, 2024
e3cfd50
tbu: rework pcapng.[ch]
MathisMARION Jun 14, 2024
ff0944c
tbu: drop wsbr_data_ind_rebuild()
MathisMARION Jun 14, 2024
32784d2
tbu: include ACK frames in pcap_file
MathisMARION Jun 14, 2024
db12f2e
ipv6: do not copy hop limit when creating tunnels
MathisMARION Jun 11, 2024
5a138e3
doc: update CHANGES with v2.1.2
MathisMARION Jun 17, 2024
b8f2842
15.4: support no source address in ieee802154_frame.[ch]
MathisMARION Jun 19, 2024
a24dad0
wsbrd: fix EDFE with FAN 1.0
MathisMARION Jun 19, 2024
6fbbd7e
doc: fix link to PKI section
MathisMARION Jun 20, 2024
9f65b70
fixup! tbu: include ACK frames in pcap_file
MathisMARION Jun 21, 2024
d22dfdf
utils: fix oob read in hif_pop_str()
MathisMARION Jun 20, 2024
338aad7
rpl: rename "nvm_store"
MathisMARION Jun 21, 2024
ab18e71
rpl: introduce on_target_update() callback
MathisMARION Jun 26, 2024
325d9b8
rpl: always remove ARO if DAO indicates BR is no longer a parent
MathisMARION Jun 26, 2024
a7c8eab
rpl: introduce on_target_add() callback
MathisMARION Jun 26, 2024
f3600fa
rpl: introduce on_target_del() callback
MathisMARION Jun 26, 2024
7125a37
rpl: remove rpl.c dependency on rpl_storage.[ch]
MathisMARION Jun 27, 2024
acac7e1
ipv6: fix neighbor proxy for nodes more than 1 hop away
MathisMARION Jun 26, 2024
1ed152d
ws: do not advertise excluded channels in fixed channel
MathisMARION Jul 5, 2024
780dbaf
fixup! rpl: always remove ARO if DAO indicates BR is no longer a parent
MathisMARION Jul 5, 2024
8a90810
doc: update CHANGES with v2.1.3
MathisMARION Jul 5, 2024
3ad8901
ws: do not include base PhyModeId in POM-IE
MathisMARION Jul 8, 2024
016c230
wsbrd: write UTC time instead of RCP time in pcap_file
MathisMARION Jul 8, 2024
876f7a3
wsbrd: fix pcap time overflow on 32bit hosts
jerome-pouiller Jul 12, 2024
fd873c7
utils: FATAL on invalid FCS after init phase
Kilio22 Jul 16, 2024
66c473a
utils: trace invalid HCS during init phase, FATAL otherwise
Kilio22 Jul 17, 2024
ff64e70
doc: removed the reference to wsbrd docker container
silabs-ThibautC Apr 22, 2024
c7c4a74
legal: Add SPDX header for MSLA licensed code
rzr May 16, 2024
a3e4846
legal: Add LICENSES directory with MSLA Snapshot to comply reuse
rzr May 29, 2024
869daad
doc: update CHANGES with v2.1.4
MathisMARION Aug 6, 2024
9a79519
legal: Replace and relocate Apache-2.0 LICENSE to comply reuse
rzr Aug 22, 2024
4391966
legal: Replace Apache-2.0 with apache version
rzr Nov 19, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions 6lbr/6lowpan/lowpan_mtu.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
/*
* SPDX-License-Identifier: LicenseRef-MSLA
* Copyright (c) 2024 Silicon Laboratories Inc. (www.silabs.com)
*
* The licensor of this software is Silicon Laboratories Inc. Your use of this
Expand Down
1 change: 1 addition & 0 deletions 6lbr/app/commandline.c
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
/*
* SPDX-License-Identifier: LicenseRef-MSLA
* Copyright (c) 2021-2023 Silicon Laboratories Inc. (www.silabs.com)
*
* The licensor of this software is Silicon Laboratories Inc. Your use of this
Expand Down
1 change: 1 addition & 0 deletions 6lbr/app/commandline.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
/*
* SPDX-License-Identifier: LicenseRef-MSLA
* Copyright (c) 2021-2023 Silicon Laboratories Inc. (www.silabs.com)
*
* The licensor of this software is Silicon Laboratories Inc. Your use of this
Expand Down
1 change: 1 addition & 0 deletions 6lbr/app/commandline_values.c
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
/*
* SPDX-License-Identifier: LicenseRef-MSLA
* Copyright (c) 2021-2023 Silicon Laboratories Inc. (www.silabs.com)
*
* The licensor of this software is Silicon Laboratories Inc. Your use of this
Expand Down
1 change: 1 addition & 0 deletions 6lbr/app/commandline_values.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
/*
* SPDX-License-Identifier: LicenseRef-MSLA
* Copyright (c) 2021-2023 Silicon Laboratories Inc. (www.silabs.com)
*
* The licensor of this software is Silicon Laboratories Inc. Your use of this
Expand Down
2 changes: 2 additions & 0 deletions 6lbr/app/dbus.c
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
/*
* SPDX-License-Identifier: LicenseRef-MSLA
* Copyright (c) 2021-2023 Silicon Laboratories Inc. (www.silabs.com)
*
* The licensor of this software is Silicon Laboratories Inc. Your use of this
Expand Down Expand Up @@ -358,6 +359,7 @@ static int dbus_ie_custom_insert(sd_bus_message *m, void *userdata, sd_bus_error
case WS_FT_PA:
case WS_FT_PC:
case WS_FT_EAPOL:
case WS_FT_DATA:
case WS_FT_LPA:
case WS_FT_LPC:
break;
Expand Down
1 change: 1 addition & 0 deletions 6lbr/app/dbus.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
/*
* SPDX-License-Identifier: LicenseRef-MSLA
* Copyright (c) 2021-2023 Silicon Laboratories Inc. (www.silabs.com)
*
* The licensor of this software is Silicon Laboratories Inc. Your use of this
Expand Down
1 change: 1 addition & 0 deletions 6lbr/app/drop_privileges.c
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
/*
* SPDX-License-Identifier: LicenseRef-MSLA
* Copyright (c) 2023 Silicon Laboratories Inc. (www.silabs.com)
*
* The licensor of this software is Silicon Laboratories Inc. Your use of this
Expand Down
1 change: 1 addition & 0 deletions 6lbr/app/drop_privileges.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
/*
* SPDX-License-Identifier: LicenseRef-MSLA
* Copyright (c) 2023 Silicon Laboratories Inc. (www.silabs.com)
*
* The licensor of this software is Silicon Laboratories Inc. Your use of this
Expand Down
63 changes: 1 addition & 62 deletions 6lbr/app/frame_helpers.c
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
/*
* SPDX-License-Identifier: LicenseRef-MSLA
* Copyright (c) 2023 Silicon Laboratories Inc. (www.silabs.com)
*
* The licensor of this software is Silicon Laboratories Inc. Your use of this
Expand Down Expand Up @@ -45,10 +46,6 @@
#define IEEE802154_SECURITY_FRAME_COUNT_SUPPR 0b00100000
#define IEEE802154_SECURITY_ASN_IN_NONCE 0b01000000

// IEEE 802.15.4-2020 Table 7-1 Values of the Frame Type field
#define IEEE802154_FRAME_TYPE_DATA 0b001
#define IEEE802154_FRAME_TYPE_ACK 0b010

// IEEE 802.15.4-2020 Figure 7-21 Format of Header IEs
#define IEEE802154_HEADER_IE_LEN_MASK 0b0000000001111111
#define IEEE802154_HEADER_IE_ID_MASK 0b0111111110000000
Expand Down Expand Up @@ -111,64 +108,6 @@ static const struct {
{ MAC_ADDR_MODE_16_BIT, MAC_ADDR_MODE_16_BIT, true, false, 1 },
};

int wsbr_data_ind_rebuild(uint8_t frame[],
const struct mcps_data_ind *ind,
const struct mcps_data_rx_ie_list *ie)
{
uint8_t *start = frame;
uint16_t fcf;
int i;

BUG_ON(ind->msduLength);
fcf = FIELD_PREP(IEEE802154_FCF_FRAME_TYPE, IEEE802154_FRAME_TYPE_DATA)
| FIELD_PREP(IEEE802154_FCF_SECURITY_ENABLED, false)
| FIELD_PREP(IEEE802154_FCF_FRAME_PENDING, ind->PendingBit)
| FIELD_PREP(IEEE802154_FCF_ACK_REQ, ind->TxAckReq)
| FIELD_PREP(IEEE802154_FCF_PAN_ID_COMPRESSION, ind->PanIdSuppressed)
| FIELD_PREP(IEEE802154_FCF_SEQ_NUM_SUPPR, ind->DSN_suppressed)
| FIELD_PREP(IEEE802154_FCF_IE_PRESENT, ie->headerIeListLength || ie->payloadIeListLength)
| FIELD_PREP(IEEE802154_FCF_DST_ADDR_MODE, ind->DstAddrMode)
| FIELD_PREP(IEEE802154_FCF_FRAME_VERSION, MAC_FRAME_VERSION_2015)
| FIELD_PREP(IEEE802154_FCF_SRC_ADDR_MODE, ind->SrcAddrMode);
frame = write_le16(frame, fcf);
if (!ind->DSN_suppressed)
*frame++ = ind->DSN;

for (i = 0; i < ARRAY_SIZE(ieee802154_table_pan_id_comp); i++)
if (ieee802154_table_pan_id_comp[i].dst_addr_mode == ind->DstAddrMode &&
ieee802154_table_pan_id_comp[i].src_addr_mode == ind->SrcAddrMode &&
ieee802154_table_pan_id_comp[i].pan_id_compression == ind->PanIdSuppressed)
break;
BUG_ON(i == ARRAY_SIZE(ieee802154_table_pan_id_comp), "invalid address mode");
if (ieee802154_table_pan_id_comp[i].dst_pan_id)
frame = write_le16(frame, ind->DstPANId);
if (ind->DstAddrMode == MAC_ADDR_MODE_64_BIT) {
memrcpy(frame, ind->DstAddr, 8);
frame += 8;
} else if (ind->DstAddrMode == MAC_ADDR_MODE_16_BIT) {
memrcpy(frame, ind->DstAddr, 2);
frame += 2;
}
if (ieee802154_table_pan_id_comp[i].src_pan_id)
frame = write_le16(frame, ind->SrcPANId);
if (ind->SrcAddrMode == MAC_ADDR_MODE_64_BIT) {
memrcpy(frame, ind->SrcAddr, 8);
frame += 8;
} else if (ind->SrcAddrMode == MAC_ADDR_MODE_16_BIT) {
memrcpy(frame, ind->SrcAddr, 2);
frame += 2;
}

memcpy(frame, ie->headerIeList, ie->headerIeListLength);
frame += ie->headerIeListLength;
if (ie->payloadIeListLength)
frame = write_le16(frame, IEEE802154_IE_HT1);
memcpy(frame, ie->payloadIeList, ie->payloadIeListLength);
frame += ie->payloadIeListLength;

return frame - start;
}

static int wsbr_data_sec_parse(struct iobuf_read *iobuf, struct mlme_security *sec)
{
uint8_t scf;
Expand Down
7 changes: 1 addition & 6 deletions 6lbr/app/frame_helpers.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
/*
* SPDX-License-Identifier: LicenseRef-MSLA
* Copyright (c) 2023 Silicon Laboratories Inc. (www.silabs.com)
*
* The licensor of this software is Silicon Laboratories Inc. Your use of this
Expand All @@ -20,16 +21,10 @@ struct iobuf_write;
struct rcp;
struct arm_15_4_mac_parameters;
struct mcps_data_cnf;
struct mcps_data_ind;
struct mcps_data_rx_ie_list;
struct mcps_data_req;
struct mcps_data_req_ie_list;

// FIXME: Unify prototypes of wsbr_data_ind_rebuild() and wsbr_data_req_rebuild()
int wsbr_data_ind_rebuild(uint8_t frame[],
const struct mcps_data_ind *ind,
const struct mcps_data_rx_ie_list *ie);

void wsbr_data_req_rebuild(struct iobuf_write *frame,
const struct rcp *rcp,
const struct mcps_data_req *req,
Expand Down
1 change: 1 addition & 0 deletions 6lbr/app/libwsbrd.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
/*
* SPDX-License-Identifier: LicenseRef-MSLA
* Copyright (c) 2024 Silicon Laboratories Inc. (www.silabs.com)
*
* The licensor of this software is Silicon Laboratories Inc. Your use of this
Expand Down
1 change: 1 addition & 0 deletions 6lbr/app/mbedtls_config_check.c
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
/*
* SPDX-License-Identifier: LicenseRef-MSLA
* Copyright (c) 2021-2023 Silicon Laboratories Inc. (www.silabs.com)
*
* The licensor of this software is Silicon Laboratories Inc. Your use of this
Expand Down
1 change: 1 addition & 0 deletions 6lbr/app/mbedtls_config_check.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
/*
* SPDX-License-Identifier: LicenseRef-MSLA
* Copyright (c) 2021-2023 Silicon Laboratories Inc. (www.silabs.com)
*
* The licensor of this software is Silicon Laboratories Inc. Your use of this
Expand Down
12 changes: 8 additions & 4 deletions 6lbr/app/rail_config.c
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
/*
* SPDX-License-Identifier: LicenseRef-MSLA
* Copyright (c) 2021-2023 Silicon Laboratories Inc. (www.silabs.com)
*
* The licensor of this software is Silicon Laboratories Inc. Your use of this
Expand Down Expand Up @@ -83,15 +84,17 @@ static void rail_fill_pom_auto(struct wsbr_ctxt *ctxt)
rail_fill_pom_disabled(ctxt);
return;
}
i = 1;
i = 0;
phy_config->rcp_rail_config_index = base_rail_params->index;
phy_config->phy_op_modes[0] = ctxt->config.ws_phy_mode_id;
for (rail_params = ctxt->rcp.rail_config_list; rail_params->chan0_freq; rail_params++) {
for (chan_params = chan_params_table; chan_params->chan0_freq; chan_params++) {
for (phy_mode = chan_params->valid_phy_modes; *phy_mode; phy_mode++) {
phy_params = ws_regdb_phy_params(*phy_mode, 0);
if (i >= ARRAY_SIZE(phy_config->phy_op_modes) - 1)
continue;
// Ignore base mode
if (phy_params->phy_mode_id == ctxt->config.ws_phy_mode_id)
continue;
// Ignore FAN1.0
if (!chan_params->chan_plan_id)
continue;
Expand Down Expand Up @@ -132,11 +135,12 @@ static void rail_fill_pom_manual(struct wsbr_ctxt *ctxt)
// any group
if (!base_rail_params->phy_mode_group)
continue;
i = 1;
i = 0;
phy_config->rcp_rail_config_index = base_rail_params->index;
phy_config->phy_op_modes[0] = ctxt->config.ws_phy_mode_id;
for (phy_mode = ctxt->config.ws_phy_op_modes; *phy_mode; phy_mode++) {
phy_params = ws_regdb_phy_params(*phy_mode, 0);
if (phy_params->phy_mode_id == ctxt->config.ws_phy_mode_id)
WARN("base \"phy_mode_id\" should not be present in \"phy_operating_modes\"");
found = 0;
if (base_phy_params->modulation == MODULATION_OFDM &&
base_phy_params->rail_phy_mode_id != phy_params->rail_phy_mode_id)
Expand Down
1 change: 1 addition & 0 deletions 6lbr/app/rail_config.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
/*
* SPDX-License-Identifier: LicenseRef-MSLA
* Copyright (c) 2023 Silicon Laboratories Inc. (www.silabs.com)
*
* The licensor of this software is Silicon Laboratories Inc. Your use of this
Expand Down
6 changes: 6 additions & 0 deletions 6lbr/app/rcp_api.c
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
/*
* SPDX-License-Identifier: LicenseRef-MSLA
* Copyright (c) 2023 Silicon Laboratories Inc. (www.silabs.com)
*
* The licensor of this software is Silicon Laboratories Inc. Your use of this
Expand Down Expand Up @@ -85,6 +86,11 @@ static void rcp_ind_fatal(struct rcp *rcp, struct iobuf_read *buf)
msg = hif_pop_str(buf);
BUG_ON(buf->err);

// CRC errors can happen during init if a previous frame transmission was
// interrupted.
if (err == HIF_ECRC && !rcp->has_reset)
return;

if (msg)
FATAL(3, "rcp error %s: %s", hif_fatal_str(err), msg);
else
Expand Down
1 change: 1 addition & 0 deletions 6lbr/app/rcp_api.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
/*
* SPDX-License-Identifier: LicenseRef-MSLA
* Copyright (c) 2023 Silicon Laboratories Inc. (www.silabs.com)
*
* The licensor of this software is Silicon Laboratories Inc. Your use of this
Expand Down
1 change: 1 addition & 0 deletions 6lbr/app/rcp_api_legacy.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
/*
* SPDX-License-Identifier: LicenseRef-MSLA
* Copyright (c) 2023 Silicon Laboratories Inc. (www.silabs.com)
*
* The licensor of this software is Silicon Laboratories Inc. Your use of this
Expand Down
1 change: 1 addition & 0 deletions 6lbr/app/timers.c
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
/*
* SPDX-License-Identifier: LicenseRef-MSLA
* Copyright (c) 2024 Silicon Laboratories Inc. (www.silabs.com)
*
* The licensor of this software is Silicon Laboratories Inc. Your use of this
Expand Down
1 change: 1 addition & 0 deletions 6lbr/app/timers.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
/*
* SPDX-License-Identifier: LicenseRef-MSLA
* Copyright (c) 2024 Silicon Laboratories Inc. (www.silabs.com)
*
* The licensor of this software is Silicon Laboratories Inc. Your use of this
Expand Down
3 changes: 1 addition & 2 deletions 6lbr/app/tun.c
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
/*
* SPDX-License-Identifier: LicenseRef-MSLA
* Copyright (c) 2021-2023 Silicon Laboratories Inc. (www.silabs.com)
*
* The licensor of this software is Silicon Laboratories Inc. Your use of this
Expand Down Expand Up @@ -405,8 +406,6 @@ void wsbr_tun_read(struct wsbr_ctxt *ctxt)
buffer_t *buf_6lowpan;
uint8_t type;

if (lowpan_adaptation_queue_size(ctxt->net_if.id) > 2)
return;
iobuf.data_size = xread(ctxt->tun_fd, buf, sizeof(buf));
if (iobuf.data_size < 0) {
WARN("%s: read: %m", __func__);
Expand Down
1 change: 1 addition & 0 deletions 6lbr/app/tun.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
/*
* SPDX-License-Identifier: LicenseRef-MSLA
* Copyright (c) 2021-2023 Silicon Laboratories Inc. (www.silabs.com)
*
* The licensor of this software is Silicon Laboratories Inc. Your use of this
Expand Down
1 change: 1 addition & 0 deletions 6lbr/app/version.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
/*
* SPDX-License-Identifier: LicenseRef-MSLA
* Copyright (c) 2021-2023 Silicon Laboratories Inc. (www.silabs.com)
*
* The licensor of this software is Silicon Laboratories Inc. Your use of this
Expand Down
Loading