From 3e9cdbdedfd47813a55454ff3b9541fb5c9f9a61 Mon Sep 17 00:00:00 2001 From: Andy Carle Date: Tue, 9 Nov 2021 00:58:00 -0800 Subject: [PATCH] enc28j60: allow multicast packets in default enc28j60 configuration --- .../eth_enc28j60/esp_eth_mac_enc28j60.c | 22 ++++++------------- tools/ci/check_copyright_ignore.txt | 1 - 2 files changed, 7 insertions(+), 16 deletions(-) diff --git a/examples/ethernet/enc28j60/components/eth_enc28j60/esp_eth_mac_enc28j60.c b/examples/ethernet/enc28j60/components/eth_enc28j60/esp_eth_mac_enc28j60.c index 76dd464113..b159093655 100644 --- a/examples/ethernet/enc28j60/components/eth_enc28j60/esp_eth_mac_enc28j60.c +++ b/examples/ethernet/enc28j60/components/eth_enc28j60/esp_eth_mac_enc28j60.c @@ -1,16 +1,8 @@ -// Copyright 2019 Espressif Systems (Shanghai) PTE LTD -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +/* + * SPDX-FileCopyrightText: 2019-2021 Espressif Systems (Shanghai) CO LTD + * + * SPDX-License-Identifier: Apache-2.0 + */ #include #include #include @@ -613,8 +605,8 @@ static esp_err_t enc28j60_setup_default(emac_enc28j60_t *emac) MAC_CHECK(enc28j60_register_write(emac, ENC28J60_ETXSTH, (ENC28J60_BUF_TX_START & 0xFF00) >> 8) == ESP_OK, "write ETXSTH failed", out, ESP_FAIL); - // set up default filter mode: (unicast OR broadcast) AND crc valid - MAC_CHECK(enc28j60_register_write(emac, ENC28J60_ERXFCON, ERXFCON_UCEN | ERXFCON_CRCEN | ERXFCON_BCEN) == ESP_OK, + // set up default filter mode: (unicast OR broadcast OR multicast) AND crc valid + MAC_CHECK(enc28j60_register_write(emac, ENC28J60_ERXFCON, ERXFCON_UCEN | ERXFCON_CRCEN | ERXFCON_BCEN | ERXFCON_MCEN) == ESP_OK, "write ERXFCON failed", out, ESP_FAIL); // enable MAC receive, enable pause control frame on Tx and Rx path diff --git a/tools/ci/check_copyright_ignore.txt b/tools/ci/check_copyright_ignore.txt index 3986156750..d29e29c1cc 100644 --- a/tools/ci/check_copyright_ignore.txt +++ b/tools/ci/check_copyright_ignore.txt @@ -3073,7 +3073,6 @@ examples/cxx/rtti/main/rtti_example_main.cpp examples/ethernet/basic/main/ethernet_example_main.c examples/ethernet/enc28j60/components/eth_enc28j60/enc28j60.h examples/ethernet/enc28j60/components/eth_enc28j60/esp_eth_enc28j60.h -examples/ethernet/enc28j60/components/eth_enc28j60/esp_eth_mac_enc28j60.c examples/ethernet/enc28j60/components/eth_enc28j60/esp_eth_phy_enc28j60.c examples/ethernet/enc28j60/main/enc28j60_example_main.c examples/ethernet/eth2ap/main/ethernet_example_main.c