瀏覽代碼

esp_eth: Reduce internal deps onto netif-glue

David Cermak 3 年之前
父節點
當前提交
343cf2696e

+ 1 - 1
components/esp_eth/include/esp_eth_netif_glue.h

@@ -5,7 +5,7 @@
  */
  */
 #pragma once
 #pragma once
 
 
-#include "esp_eth.h"
+#include "esp_eth_driver.h"
 
 
 #ifdef __cplusplus
 #ifdef __cplusplus
 extern "C" {
 extern "C" {

+ 1 - 1
components/esp_eth/src/esp_eth.c

@@ -8,7 +8,7 @@
 #include <stdatomic.h>
 #include <stdatomic.h>
 #include "esp_log.h"
 #include "esp_log.h"
 #include "esp_check.h"
 #include "esp_check.h"
-#include "esp_eth.h"
+#include "esp_eth_driver.h"
 #include "esp_event.h"
 #include "esp_event.h"
 #include "esp_heap_caps.h"
 #include "esp_heap_caps.h"
 #include "esp_timer.h"
 #include "esp_timer.h"

+ 1 - 1
components/esp_eth/src/esp_eth_mac_dm9051.c

@@ -12,7 +12,7 @@
 #include "esp_attr.h"
 #include "esp_attr.h"
 #include "esp_log.h"
 #include "esp_log.h"
 #include "esp_check.h"
 #include "esp_check.h"
-#include "esp_eth.h"
+#include "esp_eth_driver.h"
 #include "esp_timer.h"
 #include "esp_timer.h"
 #include "esp_system.h"
 #include "esp_system.h"
 #include "esp_intr_alloc.h"
 #include "esp_intr_alloc.h"

+ 1 - 1
components/esp_eth/src/esp_eth_mac_esp.c

@@ -12,7 +12,7 @@
 #include "esp_attr.h"
 #include "esp_attr.h"
 #include "esp_log.h"
 #include "esp_log.h"
 #include "esp_check.h"
 #include "esp_check.h"
-#include "esp_eth.h"
+#include "esp_eth_driver.h"
 #include "esp_pm.h"
 #include "esp_pm.h"
 #include "esp_mac.h"
 #include "esp_mac.h"
 #include "esp_heap_caps.h"
 #include "esp_heap_caps.h"

+ 2 - 2
components/esp_eth/src/esp_eth_mac_ksz8851snl.c

@@ -3,7 +3,7 @@
  *
  *
  * SPDX-License-Identifier: MIT
  * SPDX-License-Identifier: MIT
  *
  *
- * SPDX-FileContributor: 2021 Espressif Systems (Shanghai) CO LTD
+ * SPDX-FileContributor: 2021-2022 Espressif Systems (Shanghai) CO LTD
  */
  */
 
 
 #include <string.h>
 #include <string.h>
@@ -15,7 +15,7 @@
 #include "freertos/FreeRTOS.h"
 #include "freertos/FreeRTOS.h"
 #include "freertos/task.h"
 #include "freertos/task.h"
 #include "freertos/semphr.h"
 #include "freertos/semphr.h"
-#include "esp_eth.h"
+#include "esp_eth_driver.h"
 #include "ksz8851.h"
 #include "ksz8851.h"
 
 
 
 

+ 1 - 1
components/esp_eth/src/esp_eth_mac_openeth.c

@@ -19,7 +19,7 @@
 #include <sys/param.h>
 #include <sys/param.h>
 #include "esp_log.h"
 #include "esp_log.h"
 #include "esp_check.h"
 #include "esp_check.h"
-#include "esp_eth.h"
+#include "esp_eth_driver.h"
 #include "esp_intr_alloc.h"
 #include "esp_intr_alloc.h"
 #include "freertos/FreeRTOS.h"
 #include "freertos/FreeRTOS.h"
 #include "freertos/task.h"
 #include "freertos/task.h"

+ 6 - 14
components/esp_eth/src/esp_eth_mac_w5500.c

@@ -1,16 +1,8 @@
-// Copyright 2020 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: 2020-2022 Espressif Systems (Shanghai) CO LTD
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ */
 #include <string.h>
 #include <string.h>
 #include <stdlib.h>
 #include <stdlib.h>
 #include <sys/cdefs.h>
 #include <sys/cdefs.h>
@@ -19,7 +11,7 @@
 #include "esp_attr.h"
 #include "esp_attr.h"
 #include "esp_log.h"
 #include "esp_log.h"
 #include "esp_check.h"
 #include "esp_check.h"
-#include "esp_eth.h"
+#include "esp_eth_driver.h"
 #include "esp_system.h"
 #include "esp_system.h"
 #include "esp_intr_alloc.h"
 #include "esp_intr_alloc.h"
 #include "esp_heap_caps.h"
 #include "esp_heap_caps.h"

+ 1 - 1
components/esp_eth/src/esp_eth_netif_glue.c

@@ -5,7 +5,7 @@
  */
  */
 #include <stdlib.h>
 #include <stdlib.h>
 #include "esp_netif.h"
 #include "esp_netif.h"
-#include "esp_eth.h"
+#include "esp_eth_driver.h"
 #include "esp_eth_netif_glue.h"
 #include "esp_eth_netif_glue.h"
 #include "esp_event.h"
 #include "esp_event.h"
 #include "esp_log.h"
 #include "esp_log.h"

+ 6 - 14
components/esp_eth/src/esp_eth_phy.c

@@ -1,20 +1,12 @@
-// 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-2022 Espressif Systems (Shanghai) CO LTD
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ */
 #include <string.h>
 #include <string.h>
 #include <stdlib.h>
 #include <stdlib.h>
 #include "esp_log.h"
 #include "esp_log.h"
-#include "esp_eth.h"
+#include "esp_eth_driver.h"
 #include "eth_phy_regs_struct.h"
 #include "eth_phy_regs_struct.h"
 
 
 static const char *TAG = "esp_eth.phy";
 static const char *TAG = "esp_eth.phy";

+ 1 - 1
components/esp_eth/src/esp_eth_phy_dm9051.c

@@ -8,7 +8,7 @@
 #include <sys/cdefs.h>
 #include <sys/cdefs.h>
 #include "esp_log.h"
 #include "esp_log.h"
 #include "esp_check.h"
 #include "esp_check.h"
-#include "esp_eth.h"
+#include "esp_eth_driver.h"
 #include "eth_phy_regs_struct.h"
 #include "eth_phy_regs_struct.h"
 #include "freertos/FreeRTOS.h"
 #include "freertos/FreeRTOS.h"
 #include "freertos/task.h"
 #include "freertos/task.h"

+ 1 - 1
components/esp_eth/src/esp_eth_phy_dp83848.c

@@ -8,7 +8,7 @@
 #include <sys/cdefs.h>
 #include <sys/cdefs.h>
 #include "esp_log.h"
 #include "esp_log.h"
 #include "esp_check.h"
 #include "esp_check.h"
-#include "esp_eth.h"
+#include "esp_eth_driver.h"
 #include "eth_phy_regs_struct.h"
 #include "eth_phy_regs_struct.h"
 #include "freertos/FreeRTOS.h"
 #include "freertos/FreeRTOS.h"
 #include "freertos/task.h"
 #include "freertos/task.h"

+ 1 - 1
components/esp_eth/src/esp_eth_phy_ip101.c

@@ -8,7 +8,7 @@
 #include <sys/cdefs.h>
 #include <sys/cdefs.h>
 #include "esp_log.h"
 #include "esp_log.h"
 #include "esp_check.h"
 #include "esp_check.h"
-#include "esp_eth.h"
+#include "esp_eth_driver.h"
 #include "eth_phy_regs_struct.h"
 #include "eth_phy_regs_struct.h"
 #include "freertos/FreeRTOS.h"
 #include "freertos/FreeRTOS.h"
 #include "freertos/task.h"
 #include "freertos/task.h"

+ 1 - 1
components/esp_eth/src/esp_eth_phy_ksz80xx.c

@@ -8,7 +8,7 @@
 #include <sys/cdefs.h>
 #include <sys/cdefs.h>
 #include "esp_log.h"
 #include "esp_log.h"
 #include "esp_check.h"
 #include "esp_check.h"
-#include "esp_eth.h"
+#include "esp_eth_driver.h"
 #include "eth_phy_regs_struct.h"
 #include "eth_phy_regs_struct.h"
 #include "freertos/FreeRTOS.h"
 #include "freertos/FreeRTOS.h"
 #include "freertos/task.h"
 #include "freertos/task.h"

+ 2 - 2
components/esp_eth/src/esp_eth_phy_ksz8851snl.c

@@ -3,7 +3,7 @@
  *
  *
  * SPDX-License-Identifier: MIT
  * SPDX-License-Identifier: MIT
  *
  *
- * SPDX-FileContributor: 2021 Espressif Systems (Shanghai) CO LTD
+ * SPDX-FileContributor: 2021-2022 Espressif Systems (Shanghai) CO LTD
  */
  */
 #include <stdlib.h>
 #include <stdlib.h>
 #include "esp_check.h"
 #include "esp_check.h"
@@ -13,7 +13,7 @@
 #include "esp_rom_gpio.h"
 #include "esp_rom_gpio.h"
 #include "freertos/FreeRTOS.h"
 #include "freertos/FreeRTOS.h"
 #include "freertos/task.h"
 #include "freertos/task.h"
-#include "esp_eth.h"
+#include "esp_eth_driver.h"
 #include "ksz8851.h"
 #include "ksz8851.h"
 
 
 
 

+ 1 - 1
components/esp_eth/src/esp_eth_phy_lan87xx.c

@@ -8,7 +8,7 @@
 #include <sys/cdefs.h>
 #include <sys/cdefs.h>
 #include "esp_log.h"
 #include "esp_log.h"
 #include "esp_check.h"
 #include "esp_check.h"
-#include "esp_eth.h"
+#include "esp_eth_driver.h"
 #include "eth_phy_regs_struct.h"
 #include "eth_phy_regs_struct.h"
 #include "freertos/FreeRTOS.h"
 #include "freertos/FreeRTOS.h"
 #include "freertos/task.h"
 #include "freertos/task.h"

+ 1 - 1
components/esp_eth/src/esp_eth_phy_rtl8201.c

@@ -9,7 +9,7 @@
 #include <sys/cdefs.h>
 #include <sys/cdefs.h>
 #include "esp_log.h"
 #include "esp_log.h"
 #include "esp_check.h"
 #include "esp_check.h"
-#include "esp_eth.h"
+#include "esp_eth_driver.h"
 #include "eth_phy_regs_struct.h"
 #include "eth_phy_regs_struct.h"
 #include "freertos/FreeRTOS.h"
 #include "freertos/FreeRTOS.h"
 #include "freertos/task.h"
 #include "freertos/task.h"

+ 1 - 1
components/esp_eth/src/esp_eth_phy_w5500.c

@@ -8,7 +8,7 @@
 #include <sys/cdefs.h>
 #include <sys/cdefs.h>
 #include "esp_log.h"
 #include "esp_log.h"
 #include "esp_check.h"
 #include "esp_check.h"
-#include "esp_eth.h"
+#include "esp_eth_driver.h"
 #include "freertos/FreeRTOS.h"
 #include "freertos/FreeRTOS.h"
 #include "freertos/task.h"
 #include "freertos/task.h"
 #include "driver/gpio.h"
 #include "driver/gpio.h"

+ 1 - 1
components/esp_netif/vfs_l2tap/esp_vfs_l2tap.c

@@ -19,7 +19,7 @@
 #include "esp_log.h"
 #include "esp_log.h"
 #include "esp_check.h"
 #include "esp_check.h"
 #include "esp_netif.h"
 #include "esp_netif.h"
-#include "esp_eth.h"
+#include "esp_eth_driver.h"
 
 
 #include "freertos/FreeRTOS.h"
 #include "freertos/FreeRTOS.h"
 #include "freertos/semphr.h"
 #include "freertos/semphr.h"

+ 1 - 1
components/lwip/port/esp32/netif/ethernetif.c

@@ -48,7 +48,7 @@
 #include <stdio.h>
 #include <stdio.h>
 #include <string.h>
 #include <string.h>
 
 
-#include "esp_eth.h"
+#include "esp_eth_driver.h"
 #include "esp_netif.h"
 #include "esp_netif.h"
 #include "esp_netif_net_stack.h"
 #include "esp_netif_net_stack.h"
 #include "esp_compiler.h"
 #include "esp_compiler.h"

+ 1 - 1
examples/network/simple_sniffer/main/cmd_sniffer.h

@@ -8,7 +8,7 @@
 */
 */
 #pragma once
 #pragma once
 
 
-#include "esp_eth.h"
+#include "esp_eth_driver.h"
 
 
 #ifdef __cplusplus
 #ifdef __cplusplus
 extern "C" {
 extern "C" {

+ 7 - 0
tools/ci/check_copyright_config.yaml

@@ -81,6 +81,13 @@ freertos_component:
     - Apache-2.0    #Files added to the freertos added by us
     - Apache-2.0    #Files added to the freertos added by us
     - MIT           #FreeRTOS sources and port files
     - MIT           #FreeRTOS sources and port files
 
 
+ethernet_component:
+  include:
+    - 'components/esp_eth/**'
+  allowed_licenses:
+    - Apache-2.0
+    - MIT           # To allow contributed drivers
+
 systemview:
 systemview:
   include:
   include:
     - 'components/app_trace/sys_view'
     - 'components/app_trace/sys_view'

+ 0 - 2
tools/ci/check_copyright_ignore.txt

@@ -419,8 +419,6 @@ components/esp32/include/rom/tjpgd.h
 components/esp32/include/rom/uart.h
 components/esp32/include/rom/uart.h
 components/esp_eth/include/eth_phy_regs_struct.h
 components/esp_eth/include/eth_phy_regs_struct.h
 components/esp_eth/src/dm9051.h
 components/esp_eth/src/dm9051.h
-components/esp_eth/src/esp_eth_mac_w5500.c
-components/esp_eth/src/esp_eth_phy.c
 components/esp_eth/src/ksz8851.h
 components/esp_eth/src/ksz8851.h
 components/esp_eth/src/openeth.h
 components/esp_eth/src/openeth.h
 components/esp_eth/src/w5500.h
 components/esp_eth/src/w5500.h