Skip to content

Commit 24a0b69

Browse files
committed
License headers
1 parent d52aace commit 24a0b69

18 files changed

+50
-156
lines changed

components/Ethdriver/include/plat/imx8mm-evk/plat/eth_devices.h

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,7 @@
11
/*
2-
* Copyright 2019, Data61
3-
* Commonwealth Scientific and Industrial Research Organisation (CSIRO)
4-
* ABN 41 687 119 230.
2+
* Copyright 2022, UNSW (ABN 57 195 873 179)
53
*
6-
* This software may be distributed and modified according to the terms of
7-
* the GNU General Public License version 2. Note that NO WARRANTY is provided.
8-
* See "LICENSE_GPLv2.txt" for details.
9-
*
10-
* @TAG(DATA61_GPL)
4+
* SPDX-License-Identifier: GPL-2.0-only
115
*/
126
#pragma once
137

components/modules/lwip-base/CMakeLists.txt

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,10 @@
11
#
2-
# Copyright 2020, Data61
3-
# Commonwealth Scientific and Industrial Research Organisation (CSIRO)
4-
# ABN 41 687 119 230.
2+
# Copyright 2020, Data61, CSIRO (ABN 41 687 119 230)
53
#
6-
# This software may be distributed and modified according to the terms of
7-
# the BSD 2-Clause license. Note that NO WARRANTY is provided.
8-
# See "LICENSE_BSD2.txt" for details.
9-
#
10-
# @TAG(DATA61_BSD)
4+
# SPDX-License-Identifier: BSD-2-Clause
115
#
126

7+
138
cmake_minimum_required(VERSION 3.8.2)
149

1510
project(lwip-base-package C)

components/modules/lwip-base/camkes-include/camkes-lwip-base.h

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,10 @@
11
/*
2-
* Copyright 2020, Data61
3-
* Commonwealth Scientific and Industrial Research Organisation (CSIRO)
4-
* ABN 41 687 119 230.
2+
* Copyright 2020, Data61, CSIRO (ABN 41 687 119 230)
53
*
6-
* This software may be distributed and modified according to the terms of
7-
* the BSD 2-Clause license. Note that NO WARRANTY is provided.
8-
* See "LICENSE_BSD2.txt" for details.
9-
*
10-
* @TAG(DATA61_BSD)
4+
* SPDX-License-Identifier: BSD-2-Clause
115
*/
126

7+
138
#define _VAR_STRINGIZE(...) #__VA_ARGS__
149
#define VAR_STRINGIZE(...) _VAR_STRINGIZE(__VA_ARGS__)
1510

components/modules/lwip-base/camkes-include/lwip-base.camkes

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,7 @@
11
/*
2-
* Copyright 2020, Data61
3-
* Commonwealth Scientific and Industrial Research Organisation (CSIRO)
4-
* ABN 41 687 119 230.
2+
* Copyright 2020, Data61, CSIRO (ABN 41 687 119 230)
53
*
6-
* This software may be distributed and modified according to the terms of
7-
* the BSD 2-Clause license. Note that NO WARRANTY is provided.
8-
* See "LICENSE_BSD2.txt" for details.
9-
*
10-
* @TAG(DATA61_BSD)
4+
* SPDX-License-Identifier: BSD-2-Clause
115
*/
126

137
import <Timer.idl4>;

components/modules/lwip-base/lwip-init.c

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,8 @@
11
/*
2-
* Copyright 2019, Data61
3-
* Commonwealth Scientific and Industrial Research Organisation (CSIRO)
4-
* ABN 41 687 119 230.
2+
* Copyright 2019, Data61, CSIRO (ABN 41 687 119 230)
53
*
6-
* This software may be distributed and modified according to the terms of
7-
* the GNU General Public License version 2. Note that NO WARRANTY is provided.
8-
* See "LICENSE_GPLv2.txt" for details.
9-
*
10-
* @TAG(DATA61_GPL)
4+
* SPDX-License-Identifier: GPL-2.0-only
115
*/
12-
136
#include <autoconf.h>
147

158
#include <string.h>
@@ -25,7 +18,7 @@
2518

2619
#define LWIP_TICK_MS 10
2720

28-
bool timers_initialised;
21+
bool timers_initialised = false;
2922

3023
uint64_t (*timer_get_time_fn)(void);
3124

@@ -90,7 +83,7 @@ int init_lwip_post(ps_io_ops_t *io_ops, seL4_Word timer_badge, int (*timer_perio
9083

9184
struct netif *netif = netif_find("e0");
9285
if (netif == NULL) {
93-
ZF_LOGE("No device registered to call dhcp on or start");
86+
ZF_LOGF("No device registered to call dhcp on or start");
9487
}
9588

9689
timer_get_time_fn = timer_get_time;

components/modules/lwip-base/templates/lwip-init.template.c

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,10 @@
11
/*
2-
* Copyright 2020, Data61
3-
* Commonwealth Scientific and Industrial Research Organisation (CSIRO)
4-
* ABN 41 687 119 230.
2+
* Copyright 2020, Data61, CSIRO (ABN 41 687 119 230)
53
*
6-
* This software may be distributed and modified according to the terms of
7-
* the BSD 2-Clause license. Note that NO WARRANTY is provided.
8-
* See "LICENSE_BSD2.txt" for details.
9-
*
10-
* @TAG(DATA61_BSD)
4+
* SPDX-License-Identifier: BSD-2-Clause
115
*/
126

7+
138
#include <camkes.h>
149

1510
/*- set connection_name = configuration[me.parent.name].get('connection_name') -*/

interfaces/LWIPControl.idl4

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,7 @@
11
/*
2-
* Copyright 2020, Data61
3-
* Commonwealth Scientific and Industrial Research Organisation (CSIRO)
4-
* ABN 41 687 119 230.
2+
* Copyright 2020, Data61, CSIRO (ABN 41 687 119 230)
53
*
6-
* This software may be distributed and modified according to the terms of
7-
* the GNU General Public License version 2. Note that NO WARRANTY is provided.
8-
* See "LICENSE_GPLv2.txt" for details.
9-
*
10-
* @TAG(DATA61_GPL)
4+
* SPDX-License-Identifier: GPL-2.0-only
115
*/
126

137
procedure LWIPControl {

interfaces/LWIPRecv.idl4

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,8 @@
11
/*
2-
* Copyright 2019, Data61
3-
* Commonwealth Scientific and Industrial Research Organisation (CSIRO)
4-
* ABN 41 687 119 230.
2+
* Copyright 2020, Data61, CSIRO (ABN 41 687 119 230)
53
*
6-
* This software may be distributed and modified according to the terms of
7-
* the GNU General Public License version 2. Note that NO WARRANTY is provided.
8-
* See "LICENSE_GPLv2.txt" for details.
9-
*
10-
* @TAG(DATA61_GPL)
4+
* SPDX-License-Identifier: GPL-2.0-only
115
*/
12-
136
procedure LWIPRecv {
147
include "lwip/ip_addr.h";
158
int read(in int socket_fd, in int len, in int buffer_offset);

interfaces/LWIPSend.idl4

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,7 @@
11
/*
2-
* Copyright 2019, Data61
3-
* Commonwealth Scientific and Industrial Research Organisation (CSIRO)
4-
* ABN 41 687 119 230.
2+
* Copyright 2020, Data61, CSIRO (ABN 41 687 119 230)
53
*
6-
* This software may be distributed and modified according to the terms of
7-
* the GNU General Public License version 2. Note that NO WARRANTY is provided.
8-
* See "LICENSE_GPLv2.txt" for details.
9-
*
10-
* @TAG(DATA61_GPL)
4+
* SPDX-License-Identifier: GPL-2.0-only
115
*/
126

137
procedure LWIPSend {

remote-drivers/lwip-ethernet-async/CMakeLists.txt

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,7 @@
11
#
2-
# Copyright 2020, Data61
3-
# Commonwealth Scientific and Industrial Research Organisation (CSIRO)
4-
# ABN 41 687 119 230.
2+
# Copyright 2020, Data61, CSIRO (ABN 41 687 119 230)
53
#
6-
# This software may be distributed and modified according to the terms of
7-
# the BSD 2-Clause license. Note that NO WARRANTY is provided.
8-
# See "LICENSE_BSD2.txt" for details.
9-
#
10-
# @TAG(DATA61_BSD)
4+
# SPDX-License-Identifier: BSD-2-Clause
115
#
126

137
cmake_minimum_required(VERSION 3.8.2)

remote-drivers/lwip-ethernet-async/camkes-include/camkes-lwip-ethernet-async.h

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,7 @@
11
/*
2-
* Copyright 2020, Data61
3-
* Commonwealth Scientific and Industrial Research Organisation (CSIRO)
4-
* ABN 41 687 119 230.
2+
* Copyright 2022, UNSW (ABN 57 195 873 179)
53
*
6-
* This software may be distributed and modified according to the terms of
7-
* the BSD 2-Clause license. Note that NO WARRANTY is provided.
8-
* See "LICENSE_BSD2.txt" for details.
9-
*
10-
* @TAG(DATA61_BSD)
4+
* SPDX-License-Identifier: BSD-2-Clause
115
*/
126

137
#define _VAR_STRINGIZE(...) #__VA_ARGS__

remote-drivers/lwip-ethernet-async/camkes-include/lwip-ethernet-async-control.idl4

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,7 @@
11
/*
2-
* Copyright 2020, Data61
3-
* Commonwealth Scientific and Industrial Research Organisation (CSIRO)
4-
* ABN 41 687 119 230.
2+
* Copyright 2022, UNSW (ABN 57 195 873 179)
53
*
6-
* This software may be distributed and modified according to the terms of
7-
* the BSD 2-Clause license. Note that NO WARRANTY is provided.
8-
* See "LICENSE_BSD2.txt" for details.
9-
*
10-
* @TAG(DATA61_BSD)
4+
* SPDX-License-Identifier: BSD-2-Clause
115
*/
126

137
/* This needs to be here for the mac procedure */

remote-drivers/lwip-ethernet-async/camkes-include/lwip-ethernet-async.camkes

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,7 @@
11
/*
2-
* Copyright 2020, Data61
3-
* Commonwealth Scientific and Industrial Research Organisation (CSIRO)
4-
* ABN 41 687 119 230.
2+
* Copyright 2022, UNSW (ABN 57 195 873 179)
53
*
6-
* This software may be distributed and modified according to the terms of
7-
* the BSD 2-Clause license. Note that NO WARRANTY is provided.
8-
* See "LICENSE_BSD2.txt" for details.
9-
*
10-
* @TAG(DATA61_BSD)
4+
* SPDX-License-Identifier: BSD-2-Clause
115
*/
126

137
import <lwip-ethernet-async-control.idl4>;

remote-drivers/lwip-ethernet-async/client.c

Lines changed: 7 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,8 @@
11
/*
2-
* Copyright 2020, Data61
3-
* Commonwealth Scientific and Industrial Research Organisation (CSIRO)
4-
* ABN 41 687 119 230.
2+
* Copyright 2022, UNSW (ABN 57 195 873 179)
53
*
6-
* This software may be distributed and modified according to the terms of
7-
* the BSD 2-Clause license. Note that NO WARRANTY is provided.
8-
* See "LICENSE_BSD2.txt" for details.
9-
*
10-
* @TAG(DATA61_BSD)
4+
* SPDX-License-Identifier: BSD-2-Clause
115
*/
12-
136
#include <autoconf.h>
147
#include <stdint.h>
158
#include <string.h>
@@ -184,7 +177,7 @@ static struct pbuf *create_interface_buffer(state_t *state, ethernet_buffer_t *b
184177
* @param cookie client state data.
185178
*
186179
*/
187-
static void rx_queue(void *cookie)
180+
static void process_rx_queue(void *cookie)
188181
{
189182
ZF_LOGW("New packets have been received");
190183
state_t *state = cookie;
@@ -199,6 +192,7 @@ static void rx_queue(void *cookie)
199192
/* Little sanity check */
200193
if (buffer->dma_addr != encoded_addr) {
201194
ZF_LOGE("buffer->dma_addr != encoded_addr, dma_addr = %p, encoded_addr = %p", buffer->dma_addr, encoded_addr);
195+
continue;
202196
}
203197

204198
ZF_LOGW("processing packet %p, index %d, of length %d", buffer->dma_addr, buffer->index, len);
@@ -212,7 +206,7 @@ static void rx_queue(void *cookie)
212206
}
213207
}
214208

215-
int error = reg_rx_cb(rx_queue, state);
209+
int error = reg_rx_cb(process_rx_queue, state);
216210
ZF_LOGF_IF(error, "Unable to register handler");
217211
}
218212

@@ -351,10 +345,8 @@ static void client_init_tx(state_t *data, void *tx_avail, void *tx_used, notify_
351345
*/
352346
static void client_init_rx(state_t *data, void *rx_avail, void *rx_used, register_cb_fn reg_rx)
353347
{
354-
int error = reg_rx(rx_queue, data);
355-
if (error) {
356-
ZF_LOGE("Unable to register handler");
357-
}
348+
int error = reg_rx(process_rx_queue, data);
349+
ZF_LOGF_IF(error, "Unable to register handler");
358350

359351
reg_rx_cb = reg_rx;
360352

remote-drivers/lwip-ethernet-async/include/lwip-ethernet-async.h

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,7 @@
11
/*
2-
* Copyright 2020, Data61
3-
* Commonwealth Scientific and Industrial Research Organisation (CSIRO)
4-
* ABN 41 687 119 230.
2+
* Copyright 2022, UNSW (ABN 57 195 873 179)
53
*
6-
* This software may be distributed and modified according to the terms of
7-
* the BSD 2-Clause license. Note that NO WARRANTY is provided.
8-
* See "LICENSE_BSD2.txt" for details.
9-
*
10-
* @TAG(DATA61_BSD)
4+
* SPDX-License-Identifier: BSD-2-Clause
115
*/
126

137
#include <sel4/sel4.h>

remote-drivers/lwip-ethernet-async/server.c

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,8 @@
11
/*
2-
* Copyright 2020, Data61
3-
* Commonwealth Scientific and Industrial Research Organisation (CSIRO)
4-
* ABN 41 687 119 230.
2+
* Copyright 2022, UNSW (ABN 57 195 873 179)
53
*
6-
* This software may be distributed and modified according to the terms of
7-
* the GNU General Public License version 2. Note that NO WARRANTY is provided.
8-
* See "LICENSE_GPLv2.txt" for details.
9-
*
10-
* @TAG(DATA61_GPL)
4+
* SPDX-License-Identifier: BSD-2-Clause
115
*/
12-
136
#include <autoconf.h>
147
#include <stddef.h>
158
#include <stdbool.h>
@@ -34,6 +27,7 @@
3427
#include <shared_ringbuffer/shared_ringbuffer.h>
3528
#include <shared_ringbuffer/gen_config.h>
3629

30+
/* Ethernet MTU is 1500 bytes. 2048 is the next 2^n size */
3731
#define BUF_SIZE 2048
3832

3933
typedef struct data {
@@ -126,6 +120,9 @@ static void eth_rx_complete(void *iface, unsigned int num_bufs, void **cookies,
126120
/* Add buffers to used rx ring. */
127121
buff_desc_t *desc = cookies[i];
128122
int err = enqueue_used(state->rx_ring, desc->encoded_addr, (size_t)lens[i], desc->cookie);
123+
if (err) {
124+
ZF_LOGE(err, "Enqueue failed: the RX used ring is full");
125+
}
129126
}
130127

131128
/* Notify the client */

remote-drivers/lwip-ethernet-async/templates/lwip-ethernet-async-client-init.template.c

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,7 @@
11
/*
2-
* Copyright 2020, Data61
3-
* Commonwealth Scientific and Industrial Research Organisation (CSIRO)
4-
* ABN 41 687 119 230.
2+
* Copyright 2022, UNSW (ABN 57 195 873 179)
53
*
6-
* This software may be distributed and modified according to the terms of
7-
* the BSD 2-Clause license. Note that NO WARRANTY is provided.
8-
* See "LICENSE_BSD2.txt" for details.
9-
*
10-
* @TAG(DATA61_BSD)
4+
* SPDX-License-Identifier: BSD-2-Clause
115
*/
126

137
#include <lwip-ethernet-async.h>

remote-drivers/lwip-ethernet-async/templates/lwip-ethernet-async-server-init.template.c

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,7 @@
11
/*
2-
* Copyright 2020, Data61
3-
* Commonwealth Scientific and Industrial Research Organisation (CSIRO)
4-
* ABN 41 687 119 230.
2+
* Copyright 2022, UNSW (ABN 57 195 873 179)
53
*
6-
* This software may be distributed and modified according to the terms of
7-
* the BSD 2-Clause license. Note that NO WARRANTY is provided.
8-
* See "LICENSE_BSD2.txt" for details.
9-
*
10-
* @TAG(DATA61_BSD)
4+
* SPDX-License-Identifier: BSD-2-Clause
115
*/
126

137
#include <lwip-ethernet-async.h>

0 commit comments

Comments
 (0)