From 8cf1dce428b11740d8335d167b9c1f297d1752d0 Mon Sep 17 00:00:00 2001 From: Paul Donald Date: Tue, 2 Apr 2024 13:42:20 +0200 Subject: [PATCH 01/21] lldpd: fix restart Redirection broke in 5364fe0f01ca ("lldpd: shellcheck fixes") redirects to /dev/null shall be handled correctly (i.e. last). This fixes these errors on `/etc/init.d/lldpd reload`: 2024-03-16T20:39:00 [WARN/lldpctl] unknown command from argument 1: `/dev/null` 2024-03-16T20:39:00 [WARN/lldpctl] unknown command from argument 1: `/dev/null` 2024-03-16T20:39:00 [WARN/lldpctl] unknown command from argument 1: `/dev/null` 2024-03-16T20:39:00 [WARN/lldpctl] unknown command from argument 1: `/dev/null` Tested-on: 22.03.6 Fixes: 5364fe0f01ca ("lldpd: shellcheck fixes") Signed-off-by: Paul Donald [ improve commit description, add fixes tag ] Signed-off-by: Christian Marangi --- package/network/services/lldpd/files/lldpd.init | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/package/network/services/lldpd/files/lldpd.init b/package/network/services/lldpd/files/lldpd.init index 67ee011ae2..ca09a501f6 100644 --- a/package/network/services/lldpd/files/lldpd.init +++ b/package/network/services/lldpd/files/lldpd.init @@ -349,7 +349,7 @@ reload_service() { return 0 fi - $LLDPCLI -u "$LLDPSOCKET" 2>&1 /dev/null <<-EOF + $LLDPCLI -u "$LLDPSOCKET" >/dev/null 2>&1 <<-EOF pause unconfigure lldp custom-tlv unconfigure system interface pattern @@ -359,7 +359,7 @@ reload_service() { unconfigure system platform EOF if [ "$CONFIG_LLDPD_WITH_LLDPMED" = "y" ]; then - $LLDPCLI -u "$LLDPSOCKET" 2>&1 /dev/null <<-EOF + $LLDPCLI -u "$LLDPSOCKET" >/dev/null 2>&1 <<-EOF unconfigure med fast-start EOF @@ -367,9 +367,9 @@ reload_service() { # Rewrite lldpd.conf # If something changed it should be included by the lldpcli call write_lldpd_conf - $LLDPCLI -u "$LLDPSOCKET" -c "$LLDPD_CONF" -c "$LLDPD_CONFS_DIR" 2>&1 /dev/null + $LLDPCLI -u "$LLDPSOCKET" -c "$LLDPD_CONF" -c "$LLDPD_CONFS_DIR" >/dev/null 2>&1 # Broadcast update over the wire - $LLDPCLI -u "$LLDPSOCKET" 2>&1 /dev/null <<-EOF + $LLDPCLI -u "$LLDPSOCKET" >/dev/null 2>&1 <<-EOF resume update EOF @@ -377,6 +377,6 @@ reload_service() { } stop_service() { - rm -rf ${LLDPD_RUN} "$LLDPSOCKET" 2> /dev/null + rm -rf ${LLDPD_RUN} "$LLDPSOCKET" >/dev/null 2>&1 } From b4769175029ad23833b21960d1b605f629537ad7 Mon Sep 17 00:00:00 2001 From: Paul Donald Date: Tue, 2 Apr 2024 13:42:35 +0200 Subject: [PATCH 02/21] lldpd: note about capabilities only available from >= 1.0.15 Comments are useful. Apparently this config parameter was committed when openwrt used an older version of lldpd which did not yet support it. Signed-off-by: Paul Donald --- package/network/services/lldpd/files/lldpd.init | 1 + 1 file changed, 1 insertion(+) diff --git a/package/network/services/lldpd/files/lldpd.init b/package/network/services/lldpd/files/lldpd.init index ca09a501f6..6707476e55 100644 --- a/package/network/services/lldpd/files/lldpd.init +++ b/package/network/services/lldpd/files/lldpd.init @@ -106,6 +106,7 @@ write_lldpd_conf() local lldp_mgmt_ip config_get lldp_mgmt_ip 'config' 'lldp_mgmt_ip' + # Configurable capabilities in lldpd >= v1.0.15 local lldp_syscapabilities config_get lldp_syscapabilities 'config' 'lldp_syscapabilities' From 849ebc905bf9c994ccfcec379a51ff51479f1215 Mon Sep 17 00:00:00 2001 From: Sean Khan Date: Mon, 8 Apr 2024 23:11:37 -0400 Subject: [PATCH 03/21] qualcommax: enhance smp_affinity (log, uci, syntax) 1.) Changed logic of `set_affinity` to now use physical cores rather than knowing the bitmask. Rather than having to know a bitmask, users can provide a numerical instance of one or more CPU cores (numbered 0-63). This is done via function `cpus_to_bitmask`. Functions Added: a.) bitmask_to_cpus - Takes a bitmask of CPUs and returns a list of CPU numbers. (i.e. `bitmask_to_cpus "f"` -> 0,1,2,3) b.) cpus_to_bitmask - Takes a comma/space or range list of CPUs and returns a bitmask. Example: `cpus_to_bitmask "2,3"` -> c `cpus_to_bitmask "0,1,2,3"` -> f `cpus_to_bitmask "1,3"` -> a With or without quotes `cpus_to_bitmask "1 3"` -> a `cpus_to_bitmask 1 3` -> a 2.) Added UCI options: enable - to enable/disable the script from running. [default 1 (on)] enable_log - to enable/disable logging output to `logger`.[default 1 (on)] Log output: ``` Mon Apr 8 23:00:01 2024 user.notice smp_affinity: Pinning IRQ(87) reo2host-destination-ring1 to CPU 0 Mon Apr 8 23:00:01 2024 user.notice smp_affinity: Pinning IRQ(88) reo2host-destination-ring2 to CPU 1 Mon Apr 8 23:00:01 2024 user.notice smp_affinity: Pinning IRQ(89) reo2host-destination-ring3 to CPU 2 Mon Apr 8 23:00:01 2024 user.notice smp_affinity: Pinning IRQ(90) reo2host-destination-ring4 to CPU 3 Mon Apr 8 23:00:01 2024 user.notice smp_affinity: Pinning IRQ(79) wbm2host-tx-completions-ring1 to CPU 1 Mon Apr 8 23:00:01 2024 user.notice smp_affinity: Pinning IRQ(83) wbm2host-tx-completions-ring2 to CPU 2 Mon Apr 8 23:00:01 2024 user.notice smp_affinity: Pinning IRQ(85) wbm2host-tx-completions-ring3 to CPU 3 Mon Apr 8 23:00:01 2024 user.notice smp_affinity: Pinning IRQ(73) ppdu-end-interrupts-mac1 to CPU 1 Mon Apr 8 23:00:01 2024 user.notice smp_affinity: Pinning IRQ(77) ppdu-end-interrupts-mac2 to CPU 2 Mon Apr 8 23:00:01 2024 user.notice smp_affinity: Pinning IRQ(75) ppdu-end-interrupts-mac3 to CPU 3 Mon Apr 8 23:00:01 2024 user.notice smp_affinity: Pinning IRQ(32) edma_txcmpl to CPU 3 Mon Apr 8 23:00:01 2024 user.notice smp_affinity: Pinning IRQ(33) edma_rxfill to CPU 3 Mon Apr 8 23:00:01 2024 user.notice smp_affinity: Pinning IRQ(35) edma_rxdesc to CPU 3 Mon Apr 8 23:00:01 2024 user.notice smp_affinity: Pinning IRQ(36) edma_misc to CPU 3 ``` Output of `/proc/interrupts`: ``` 69: 0 0 0 0 GIC-0 209 Edge rxdma2host-destination-ring-mac1 70: 0 0 0 0 GIC-0 211 Edge rxdma2host-destination-ring-mac3 71: 0 0 0 0 GIC-0 210 Edge rxdma2host-destination-ring-mac2 72: 2435 0 0 0 GIC-0 321 Edge reo2host-status 73: 268427 8011 0 0 GIC-0 261 Edge ppdu-end-interrupts-mac1 74: 2 0 0 0 GIC-0 255 Edge rxdma2host-monitor-status-ring-mac1 75: 176169 0 4 10035 GIC-0 263 Edge ppdu-end-interrupts-mac3 76: 2 0 0 0 GIC-0 260 Edge rxdma2host-monitor-status-ring-mac3 77: 0 0 0 0 GIC-0 262 Edge ppdu-end-interrupts-mac2 78: 0 0 0 0 GIC-0 256 Edge rxdma2host-monitor-status-ring-mac2 79: 3428 3123 0 0 GIC-0 189 Edge wbm2host-tx-completions-ring1 80: 0 0 0 0 GIC-0 323 Edge reo2ost-exception 81: 178 0 0 0 GIC-0 322 Edge wbm2host-rx-release 82: 0 0 0 0 GIC-0 212 Edge host2rxdma-host-buf-ring-mac1 83: 6524 0 13712 0 GIC-0 190 Edge wbm2host-tx-completions-ring2 84: 4 0 0 0 GIC-0 235 Edge host2rxdma-host-buf-ring-mac3 85: 560 0 0 1979 GIC-0 191 Edge wbm2host-tx-completions-ring3 86: 0 0 0 0 GIC-0 215 Edge host2rxdma-host-buf-ring-mac2 87: 4520 0 0 0 GIC-0 267 Edge reo2host-destination-ring1 88: 2231 2811 0 0 GIC-0 268 Edge reo2host-destination-ring2 89: 2180 0 2512 0 GIC-0 271 Edge reo2host-destination-ring3 90: 1990 0 0 2321 GIC-0 320 Edge reo2host-destination-ring4 ``` 3.) Added `uci-defaults` script `15_smp_affinity` to configure defaults options on first boot. Signed-off-by: Sean Khan --- .../base-files/etc/init.d/smp_affinity | 132 +++++++++++++++--- .../etc/uci-defaults/15_smp_affinity | 11 ++ 2 files changed, 120 insertions(+), 23 deletions(-) create mode 100644 target/linux/qualcommax/ipq807x/base-files/etc/uci-defaults/15_smp_affinity diff --git a/target/linux/qualcommax/ipq807x/base-files/etc/init.d/smp_affinity b/target/linux/qualcommax/ipq807x/base-files/etc/init.d/smp_affinity index 05d13fff63..ecf88aea09 100755 --- a/target/linux/qualcommax/ipq807x/base-files/etc/init.d/smp_affinity +++ b/target/linux/qualcommax/ipq807x/base-files/etc/init.d/smp_affinity @@ -1,36 +1,122 @@ #!/bin/sh /etc/rc.common +###################################################################### +# vim: set ft=bash +# shellcheck disable=2155,3019,3043,3057,3060 +###################################################################### START=93 +PROG=smp_affinity + +log_msg() { + + local irq_name="$1" affinity="$2" irq="$3" + + msg="$(printf "Pinning IRQ($irq) %-24s to CPU ${affinity}\n" "$irq_name")" + + logger -t "$PROG" "$msg" +} + +###################################################################### +### Takes a comma, space separated, or range list of CPU numbers and +## returns a bitmask of CPUs. +## cpus_to_bitmask "0,1,2,3" -> f +## cpus_to_bitmask "0 1 2 3" -> f +## cpus_to_bitmask "0-3" -> f +## cpus_to_bitmask "3" -> 8 +####################################################################### + +cpus_to_bitmask() { + + local bitmask=0 + # shellcheck disable=2048 + for range in ${*//,/ }; do + start="${range%-*}" + end="${range#*-}" + if [ -z "$end" ]; then + bitmask="$((bitmask | 1 << start))" + else + bitmask="$((bitmask | (2 ** (end - start + 1) - 1) << start))" + fi + done + printf '%x' $bitmask +} + +###################################################################### +### Takes a bitmask of CPUs and returns a space separated list of +## CPU numbers. +## bitmask_to_cpus f -> 0 1 2 3 +###################################################################### + +bitmask_to_cpus() { + + [ "${1:0:2}" != "0x" ] && set -- "0x$1" + local bitmask="$(printf '%d' "$1")" + + local cpus="" + for i in $(seq 0 63); do + if [ $((bitmask & 1)) -ne 0 ]; then + cpus="$cpus $i" + fi + bitmask=$((bitmask >> 1)) + done + echo "${cpus# }" +} + +###################################################################### +### Sets the affinity of the IRQs with the given name to the given CPU. +## 1st argument: IRQ name ("reo2host-destination-ring1") (req) +## 2nd argument: CPU number (req) +###################################################################### + +set_affinity() { + + local irq_name="$1" affinity="$2" bitmask irq + awk -v irq_name="$1" '$0 ~ irq_name { print substr($1, 1, length($1)-1); exit }' /proc/interrupts \ + | while read -r irq; do + $enable_log && { + log_msg "$irq_name" "$affinity" "$irq" + } + bitmask=$(cpus_to_bitmask "$affinity") && echo "$bitmask" > "/proc/irq/$irq/smp_affinity" + done +} + enable_affinity_ipq807x() { - set_affinity() { - irq=$(awk "/$1/{ print substr(\$1, 1, length(\$1)-1); exit }" /proc/interrupts) - [ -n "$irq" ] && echo $2 > /proc/irq/$irq/smp_affinity - } - # assign 4 rx interrupts to each core - set_affinity 'reo2host-destination-ring1' 1 - set_affinity 'reo2host-destination-ring2' 2 - set_affinity 'reo2host-destination-ring3' 4 - set_affinity 'reo2host-destination-ring4' 8 + # assign 4 rx interrupts to each core + set_affinity 'reo2host-destination-ring1' 0 + set_affinity 'reo2host-destination-ring2' 1 + set_affinity 'reo2host-destination-ring3' 2 + set_affinity 'reo2host-destination-ring4' 3 - # assign 3 tcl completions to last 3 CPUs - set_affinity 'wbm2host-tx-completions-ring1' 2 - set_affinity 'wbm2host-tx-completions-ring2' 4 - set_affinity 'wbm2host-tx-completions-ring3' 8 + # assign 3 tcl completions to last 3 CPUs + set_affinity 'wbm2host-tx-completions-ring1' 1 + set_affinity 'wbm2host-tx-completions-ring2' 2 + set_affinity 'wbm2host-tx-completions-ring3' 3 - # assign 3 ppdu mac interrupts to last 3 cores - set_affinity 'ppdu-end-interrupts-mac1' 2 - set_affinity 'ppdu-end-interrupts-mac2' 4 - set_affinity 'ppdu-end-interrupts-mac3' 8 + # assign 3 ppdu mac interrupts to last 3 cores + set_affinity 'ppdu-end-interrupts-mac1' 1 + set_affinity 'ppdu-end-interrupts-mac2' 2 + set_affinity 'ppdu-end-interrupts-mac3' 3 - # assign lan/wan to core 4 - set_affinity 'edma_txcmpl' 8 - set_affinity 'edma_rxfill' 8 - set_affinity 'edma_rxdesc' 8 - set_affinity 'edma_misc' 8 + # assign 4 lan/wan to core 4 + set_affinity 'edma_txcmpl' 3 + set_affinity 'edma_rxfill' 3 + set_affinity 'edma_rxdesc' 3 + set_affinity 'edma_misc' 3 } boot() { - enable_affinity_ipq807x + + local enable + + config_load smp_affinity + + config_get_bool enable "general" enable 1 + config_get_bool enable_log "general" enable_log 1 + + [ "$enable" -eq 1 ] && enable=true || enable=false + [ "$enable_log" -eq 1 ] && enable_log=true || enable_log=false + + $enable && enable_affinity_ipq807x } diff --git a/target/linux/qualcommax/ipq807x/base-files/etc/uci-defaults/15_smp_affinity b/target/linux/qualcommax/ipq807x/base-files/etc/uci-defaults/15_smp_affinity new file mode 100644 index 0000000000..3ec0adc44c --- /dev/null +++ b/target/linux/qualcommax/ipq807x/base-files/etc/uci-defaults/15_smp_affinity @@ -0,0 +1,11 @@ +#!/bin/sh + +uci -q get smp_affinity && exit 0 +touch /etc/config/smp_affinity + +uci -q batch << EOF + set smp_affinity.general=smp_affinity + set smp_affinity.general.enable='1' + set smp_affinity.general.enable_log='1' + commit smp_affinity +EOF From 4d8f56bd59f457fd815e2bb4f87df8c7dad2d4fd Mon Sep 17 00:00:00 2001 From: Paul Donald Date: Wed, 3 Apr 2024 14:06:29 +0200 Subject: [PATCH 04/21] lldpd: make capabilities advertisement controllable Defaults to off. Only available from >= 1.0.15 These capabilities are sent in TLV. Signed-off-by: Paul Donald --- package/network/services/lldpd/files/lldpd.init | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/package/network/services/lldpd/files/lldpd.init b/package/network/services/lldpd/files/lldpd.init index 6707476e55..6685aa11af 100644 --- a/package/network/services/lldpd/files/lldpd.init +++ b/package/network/services/lldpd/files/lldpd.init @@ -110,6 +110,10 @@ write_lldpd_conf() local lldp_syscapabilities config_get lldp_syscapabilities 'config' 'lldp_syscapabilities' + # Configurable capabilities in lldpd >= v1.0.15 + local lldp_capability_advertisements + config_get_bool lldp_capability_advertisements 'config' 'lldp_capability_advertisements' 0 + if [ "$CONFIG_LLDPD_WITH_LLDPMED" = "y" ]; then local lldpmed_fast_start config_get_bool lldpmed_fast_start 'config' 'lldpmed_fast_start' 0 @@ -150,6 +154,7 @@ write_lldpd_conf() [ -n "$lldp_hostname" ] && echo "configure system hostname" "\"$lldp_hostname\"" >> "$LLDPD_CONF" [ -n "$lldp_mgmt_ip" ] && echo "configure system ip management pattern" "\"$lldp_mgmt_ip\"" >> "$LLDPD_CONF" [ -n "$lldp_syscapabilities" ] && echo "configure system capabilities enabled $lldp_syscapabilities" >> "$LLDPD_CONF" + if [ "$CONFIG_LLDPD_WITH_LLDPMED" = "y" ] && [ "$lldpmed_fast_start" -gt 0 ]; then if [ "$lldpmed_fast_start_tx_interval" -gt 0 ]; then echo "configure med fast-start tx-interval $lldpmed_fast_start_tx_interval" >> "$LLDPD_CONF" @@ -175,6 +180,7 @@ write_lldpd_conf() [ -n "$lldp_platform" ] && echo "configure system platform" "\"$lldp_platform\"" >> "$LLDPD_CONF" [ -n "$lldp_tx_interval" ] && echo "configure lldp tx-interval $lldp_tx_interval" >> "$LLDPD_CONF" [ "$lldp_tx_hold" -gt 0 ] && echo "configure lldp tx-hold $lldp_tx_hold" >> "$LLDPD_CONF" + [ "$lldp_capability_advertisements" -gt 0 ] && echo "configure lldp capabilities-advertisements" >> "$LLDPD_CONF" # Since lldpd's sysconfdir is /tmp, we'll symlink /etc/lldpd.d to /tmp/$LLDPD_CONFS_DIR [ -e "$LLDPD_CONFS_DIR" ] || ln -s /etc/lldpd.d "$LLDPD_CONFS_DIR" @@ -353,6 +359,7 @@ reload_service() { $LLDPCLI -u "$LLDPSOCKET" >/dev/null 2>&1 <<-EOF pause unconfigure lldp custom-tlv + unconfigure lldp capabilities-advertisements unconfigure system interface pattern unconfigure system description unconfigure system hostname From 50021d3222667a9a239451de0422f0508aef4419 Mon Sep 17 00:00:00 2001 From: Paul Donald Date: Tue, 2 Apr 2024 13:43:03 +0200 Subject: [PATCH 05/21] lldpd: make management address advertisement controllable Defaults to off. Available from >= 0.7.15 These are sent in TLV Signed-off-by: Paul Donald --- package/network/services/lldpd/files/lldpd.init | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/package/network/services/lldpd/files/lldpd.init b/package/network/services/lldpd/files/lldpd.init index 6685aa11af..31cd7fd389 100644 --- a/package/network/services/lldpd/files/lldpd.init +++ b/package/network/services/lldpd/files/lldpd.init @@ -114,6 +114,10 @@ write_lldpd_conf() local lldp_capability_advertisements config_get_bool lldp_capability_advertisements 'config' 'lldp_capability_advertisements' 0 + # Broadcast management address in lldpd >= 0.7.15 + local lldp_mgmt_addr_advertisements + config_get_bool lldp_mgmt_addr_advertisements 'config' 'lldp_mgmt_addr_advertisements' 0 + if [ "$CONFIG_LLDPD_WITH_LLDPMED" = "y" ]; then local lldpmed_fast_start config_get_bool lldpmed_fast_start 'config' 'lldpmed_fast_start' 0 @@ -181,6 +185,7 @@ write_lldpd_conf() [ -n "$lldp_tx_interval" ] && echo "configure lldp tx-interval $lldp_tx_interval" >> "$LLDPD_CONF" [ "$lldp_tx_hold" -gt 0 ] && echo "configure lldp tx-hold $lldp_tx_hold" >> "$LLDPD_CONF" [ "$lldp_capability_advertisements" -gt 0 ] && echo "configure lldp capabilities-advertisements" >> "$LLDPD_CONF" + [ "$lldp_mgmt_addr_advertisements" -gt 0 ] && echo "configure lldp management-addresses-advertisements" >> "$LLDPD_CONF" # Since lldpd's sysconfdir is /tmp, we'll symlink /etc/lldpd.d to /tmp/$LLDPD_CONFS_DIR [ -e "$LLDPD_CONFS_DIR" ] || ln -s /etc/lldpd.d "$LLDPD_CONFS_DIR" @@ -360,6 +365,7 @@ reload_service() { pause unconfigure lldp custom-tlv unconfigure lldp capabilities-advertisements + unconfigure lldp management-addresses-advertisements unconfigure system interface pattern unconfigure system description unconfigure system hostname From a2b94afc0df04d82b653509fd88815437fc236ca Mon Sep 17 00:00:00 2001 From: Paul Donald Date: Wed, 3 Apr 2024 16:10:55 +0200 Subject: [PATCH 06/21] mediatek: mt7622: rtl8367c: source comment fixes Improves indexing and searches Signed-off-by: Paul Donald --- .../files/drivers/net/phy/rtk/rtl8367c/acl.c | 30 +++++------ .../files/drivers/net/phy/rtk/rtl8367c/cpu.c | 4 +- .../files/drivers/net/phy/rtk/rtl8367c/igmp.c | 10 ++-- .../net/phy/rtk/rtl8367c/include/acl.h | 32 ++++++------ .../net/phy/rtk/rtl8367c/include/cpu.h | 6 +-- .../net/phy/rtk/rtl8367c/include/dot1x.h | 2 +- .../net/phy/rtk/rtl8367c/include/eee.h | 2 +- .../net/phy/rtk/rtl8367c/include/i2c.h | 2 +- .../net/phy/rtk/rtl8367c/include/igmp.h | 12 ++--- .../net/phy/rtk/rtl8367c/include/interrupt.h | 2 +- .../drivers/net/phy/rtk/rtl8367c/include/l2.h | 50 +++++++++---------- .../net/phy/rtk/rtl8367c/include/leaky.h | 2 +- .../net/phy/rtk/rtl8367c/include/led.h | 20 ++++---- .../net/phy/rtk/rtl8367c/include/mirror.h | 8 +-- .../net/phy/rtk/rtl8367c/include/port.h | 34 ++++++------- .../net/phy/rtk/rtl8367c/include/ptp.h | 4 +- .../net/phy/rtk/rtl8367c/include/qos.h | 8 +-- .../net/phy/rtk/rtl8367c/include/rate.h | 2 +- .../net/phy/rtk/rtl8367c/include/rtk_error.h | 8 +-- .../net/phy/rtk/rtl8367c/include/rtk_switch.h | 8 +-- .../net/phy/rtk/rtl8367c/include/rtk_types.h | 4 +- .../rtl8367c/include/rtl8367c_asicdrv_green.h | 2 +- .../rtl8367c/include/rtl8367c_asicdrv_qos.h | 2 +- .../rtl8367c_asicdrv_unknownMulticast.h | 2 +- .../phy/rtk/rtl8367c/include/rtl8367c_base.h | 2 +- .../files/drivers/net/phy/rtk/rtl8367c/l2.c | 48 +++++++++--------- .../files/drivers/net/phy/rtk/rtl8367c/led.c | 16 +++--- .../drivers/net/phy/rtk/rtl8367c/mirror.c | 4 +- .../files/drivers/net/phy/rtk/rtl8367c/port.c | 38 +++++++------- .../files/drivers/net/phy/rtk/rtl8367c/ptp.c | 2 +- .../files/drivers/net/phy/rtk/rtl8367c/qos.c | 8 +-- .../files/drivers/net/phy/rtk/rtl8367c/rldp.c | 2 +- .../drivers/net/phy/rtk/rtl8367c/rtk_switch.c | 10 ++-- .../phy/rtk/rtl8367c/rtl8367c_asicdrv_acl.c | 34 ++++++------- .../rtk/rtl8367c/rtl8367c_asicdrv_cputag.c | 22 ++++---- .../phy/rtk/rtl8367c/rtl8367c_asicdrv_eav.c | 18 +++---- .../phy/rtk/rtl8367c/rtl8367c_asicdrv_fc.c | 4 +- .../phy/rtk/rtl8367c/rtl8367c_asicdrv_green.c | 16 +++--- .../phy/rtk/rtl8367c/rtl8367c_asicdrv_hsb.c | 2 +- .../phy/rtk/rtl8367c/rtl8367c_asicdrv_igmp.c | 16 +++--- .../rtk/rtl8367c/rtl8367c_asicdrv_inbwctrl.c | 4 +- .../rtk/rtl8367c/rtl8367c_asicdrv_interrupt.c | 4 +- .../phy/rtk/rtl8367c/rtl8367c_asicdrv_led.c | 2 +- .../phy/rtk/rtl8367c/rtl8367c_asicdrv_lut.c | 40 +++++++-------- .../phy/rtk/rtl8367c/rtl8367c_asicdrv_mib.c | 18 +++---- .../phy/rtk/rtl8367c/rtl8367c_asicdrv_qos.c | 2 +- .../rtl8367c/rtl8367c_asicdrv_scheduling.c | 8 +-- .../phy/rtk/rtl8367c/rtl8367c_asicdrv_svlan.c | 16 +++--- .../rtl8367c_asicdrv_unknownMulticast.c | 2 +- .../files/drivers/net/phy/rtk/rtl8367c/smi.c | 4 +- .../files/drivers/net/phy/rtk/rtl8367c/stat.c | 4 +- .../drivers/net/phy/rtk/rtl8367c/storm.c | 24 ++++----- .../drivers/net/phy/rtk/rtl8367c/svlan.c | 40 +++++++-------- .../files/drivers/net/phy/rtk/rtl8367c/vlan.c | 6 +-- .../files/drivers/net/phy/rtk/rtl8367s_mdio.c | 4 +- 55 files changed, 338 insertions(+), 338 deletions(-) diff --git a/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/acl.c b/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/acl.c index 75e5a5e740..85c12b000f 100644 --- a/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/acl.c +++ b/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/acl.c @@ -144,7 +144,7 @@ static rtk_api_ret_t _rtk_filter_igrAcl_writeDataField(rtl8367c_aclrule *aclRule * RT_ERR_SMI - SMI access error * RT_ERR_NULL_POINTER - Pointer pFilter_field or pFilter_cfg point to NULL. * Note: - * This function enable and intialize ACL function + * This function enable and initialize ACL function */ rtk_api_ret_t rtk_filter_igrAcl_init(void) { @@ -204,7 +204,7 @@ rtk_api_ret_t rtk_filter_igrAcl_init(void) * This function add a comparison rule (*pFilter_field) to an ACL configuration (*pFilter_cfg). * Pointer pFilter_cfg points to an ACL configuration structure, this structure keeps multiple ACL * comparison rules by means of linked list. Pointer pFilter_field will be added to linked - * list keeped by structure that pFilter_cfg points to. + * list kept by structure that pFilter_cfg points to. */ rtk_api_ret_t rtk_filter_igrAcl_field_add(rtk_filter_cfg_t* pFilter_cfg, rtk_filter_field_t* pFilter_field) { @@ -348,7 +348,7 @@ static rtk_api_ret_t _rtk_filter_igrAcl_writeDataField(rtl8367c_aclrule *aclRule } else { - /*default acl template for ipv6 address supports MSB 32-bits and LSB 32-bits only*/ + /*default ACL template for ipv6 address supports MSB 32-bits and LSB 32-bits only*/ aclRule[tempIdx].data_bits.field[fieldIdx] = ((ip6addr[3] & (0xFFFF << ((i&1) * 16))) >> ((i&1) * 16)); aclRule[tempIdx].care_bits.field[fieldIdx] = ((ip6mask[3] & (0xFFFF << ((i&1) * 16))) >> ((i&1) * 16)); } @@ -557,7 +557,7 @@ static rtk_api_ret_t _rtk_filter_igrAcl_writeDataField(rtl8367c_aclrule *aclRule * pFilter_cfg - The ACL configuration that this function will add comparison rule * pFilter_action - Action(s) of ACL configuration. * Output: - * ruleNum - number of rules written in acl table + * ruleNum - number of rules written in ACL table * Return: * RT_ERR_OK - OK * RT_ERR_FAILED - Failed @@ -1140,12 +1140,12 @@ rtk_api_ret_t rtk_filter_igrAcl_cfg_delAll(void) /* Function Name: * rtk_filter_igrAcl_cfg_get * Description: - * Get one ingress acl configuration from ASIC. + * Get one ingress ACL configuration from ASIC. * Input: * filter_id - Start index of ACL configuration. * Output: - * pFilter_cfg - buffer pointer of ingress acl data - * pFilter_action - buffer pointer of ingress acl action + * pFilter_cfg - buffer pointer of ingress ACL data + * pFilter_action - buffer pointer of ingress ACL action * Return: * RT_ERR_OK - OK * RT_ERR_FAILED - Failed @@ -1462,7 +1462,7 @@ rtk_api_ret_t rtk_filter_igrAcl_cfg_get(rtk_filter_id_t filter_id, rtk_filter_cf * RT_ERR_PORT_ID - Invalid port id. * RT_ERR_INPUT - Invalid input parameters. * Note: - * This function sets action of packets when no ACL configruation matches. + * This function sets action of packets when no ACL configuration matches. */ rtk_api_ret_t rtk_filter_igrAcl_unmatchAction_set(rtk_port_t port, rtk_filter_unmatch_action_t action) { @@ -1535,7 +1535,7 @@ rtk_api_ret_t rtk_filter_igrAcl_unmatchAction_get(rtk_port_t port, rtk_filter_un * RT_ERR_PORT_ID - Invalid port id. * RT_ERR_INPUT - Invalid input parameters. * Note: - * This function gets action of packets when no ACL configruation matches. + * This function gets action of packets when no ACL configuration matches. */ rtk_api_ret_t rtk_filter_igrAcl_state_set(rtk_port_t port, rtk_filter_state_t state) { @@ -1571,7 +1571,7 @@ rtk_api_ret_t rtk_filter_igrAcl_state_set(rtk_port_t port, rtk_filter_state_t st * RT_ERR_PORT_ID - Invalid port id. * RT_ERR_INPUT - Invalid input parameters. * Note: - * This function gets action of packets when no ACL configruation matches. + * This function gets action of packets when no ACL configuration matches. */ rtk_api_ret_t rtk_filter_igrAcl_state_get(rtk_port_t port, rtk_filter_state_t* pState) { @@ -1699,7 +1699,7 @@ rtk_api_ret_t rtk_filter_igrAcl_template_get(rtk_filter_template_t *aclTemplate) * RT_ERR_FAILED - Failed * RT_ERR_SMI - SMI access error * Note: - * System support 16 user defined field selctors. + * System support 16 user defined field selectors. * Each selector can be enabled or disable. * User can defined retrieving 16-bits in many predefiend * standard l2/l3/l4 payload. @@ -1928,7 +1928,7 @@ rtk_api_ret_t rtk_filter_vidrange_get(rtk_uint32 index, rtk_filter_vidrange_t *p * Set Port Range check * Input: * index - index of Port Range 0-15 - * type - IP Range check type, 0:Delete a entry, 1: Source Port, 2: Destnation Port + * type - IP Range check type, 0:Delete a entry, 1: Source Port, 2: Destination Port * upperPort - The upper bound of Port range * lowerPort - The lower Bound of Port range * Output: @@ -1977,7 +1977,7 @@ rtk_api_ret_t rtk_filter_portrange_set(rtk_uint32 index, rtk_filter_portrange_t * Input: * index - index of Port Range 0-15 * Output: - * pType - IP Range check type, 0:Delete a entry, 1: Source Port, 2: Destnation Port + * pType - IP Range check type, 0:Delete a entry, 1: Source Port, 2: Destination Port * pUpperPort - The upper bound of Port range * pLowerPort - The lower Bound of Port range * Return: @@ -2011,7 +2011,7 @@ rtk_api_ret_t rtk_filter_portrange_get(rtk_uint32 index, rtk_filter_portrange_t /* Function Name: * rtk_filter_igrAclPolarity_set * Description: - * Set ACL Goip control palarity + * Set ACL Goip control polarity * Input: * polarity - 1: High, 0: Low * Output: @@ -2034,7 +2034,7 @@ rtk_api_ret_t rtk_filter_igrAclPolarity_set(rtk_uint32 polarity) /* Function Name: * rtk_filter_igrAclPolarity_get * Description: - * Get ACL Goip control palarity + * Get ACL Goip control polarity * Input: * pPolarity - 1: High, 0: Low * Output: diff --git a/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/cpu.c b/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/cpu.c index d1cd95b37a..b031cbe920 100644 --- a/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/cpu.c +++ b/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/cpu.c @@ -113,7 +113,7 @@ rtk_api_ret_t rtk_cpu_enable_get(rtk_enable_t *pEnable) * Note: * The API can set CPU port and inserting proprietary CPU tag mode (Length/Type 0x8899) * to the frame that transmitting to CPU port. - * The inset cpu tag mode is as following: + * The insert CPU tag mode is as following: * - CPU_INSERT_TO_ALL * - CPU_INSERT_TO_TRAPPING * - CPU_INSERT_TO_NONE @@ -160,7 +160,7 @@ rtk_api_ret_t rtk_cpu_tagPort_set(rtk_port_t port, rtk_cpu_insert_t mode) * RT_ERR_L2_NO_CPU_PORT - CPU port is not exist * Note: * The API can get configured CPU port and its setting. - * The inset cpu tag mode is as following: + * The insert CPU tag mode is as following: * - CPU_INSERT_TO_ALL * - CPU_INSERT_TO_TRAPPING * - CPU_INSERT_TO_NONE diff --git a/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/igmp.c b/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/igmp.c index 170cbdaaf0..18e145a21c 100644 --- a/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/igmp.c +++ b/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/igmp.c @@ -233,7 +233,7 @@ rtk_api_ret_t rtk_igmp_static_router_port_get(rtk_portmask_t *pPortmask) * Input: * port - Port ID * protocol - IGMP/MLD protocol - * action - Per-port and per-protocol IGMP action seeting + * action - Per-port and per-protocol IGMP action setting * Output: * None. * Return: @@ -321,7 +321,7 @@ rtk_api_ret_t rtk_igmp_protocol_set(rtk_port_t port, rtk_igmp_protocol_t protoco * Input: * port - Port ID * protocol - IGMP/MLD protocol - * action - Per-port and per-protocol IGMP action seeting + * action - Per-port and per-protocol IGMP action setting * Output: * None. * Return: @@ -1217,7 +1217,7 @@ rtk_api_ret_t rtk_igmp_portRxPktEnable_get(rtk_port_t port, rtk_igmp_rxPktEnable * Description: * Get IGMP/MLD Group database * Input: - * indes - Index (0~255) + * index - Index (0~255) * Output: * pGroup - Group database information. * Return: @@ -1418,7 +1418,7 @@ rtk_api_ret_t rtk_igmp_ReportLeaveFwdAction_get(rtk_igmp_ReportLeaveFwdAct_t *pA /* Function Name: * rtk_igmp_dropLeaveZeroEnable_set * Description: - * Set the function of droppping Leave packet with group IP = 0.0.0.0 + * Set the function of dropping Leave packet with group IP = 0.0.0.0 * Input: * enabled - Action 1: drop, 0:pass * Output: @@ -1451,7 +1451,7 @@ rtk_api_ret_t rtk_igmp_dropLeaveZeroEnable_set(rtk_enable_t enabled) /* Function Name: * rtk_igmp_dropLeaveZeroEnable_get * Description: - * Get the function of droppping Leave packet with group IP = 0.0.0.0 + * Get the function of dropping Leave packet with group IP = 0.0.0.0 * Input: * None * Output: diff --git a/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/include/acl.h b/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/include/acl.h index 6308da8d42..634e7325d6 100644 --- a/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/include/acl.h +++ b/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/include/acl.h @@ -9,7 +9,7 @@ * * Purpose : RTL8367/RTL8367C switch high-level API * - * Feature : The file includes ACL module high-layer API defination + * Feature : The file includes ACL module high-layer API definition * */ @@ -566,7 +566,7 @@ typedef enum rtk_filter_portrange_e * RT_ERR_SMI - SMI access error * RT_ERR_NULL_POINTER - Pointer pFilter_field or pFilter_cfg point to NULL. * Note: - * This function enable and intialize ACL function + * This function enable and initialize ACL function */ extern rtk_api_ret_t rtk_filter_igrAcl_init(void); @@ -589,7 +589,7 @@ extern rtk_api_ret_t rtk_filter_igrAcl_init(void); * This function add a comparison rule (*pFilter_field) to an ACL configuration (*pFilter_cfg). * Pointer pFilter_cfg points to an ACL configuration structure, this structure keeps multiple ACL * comparison rules by means of linked list. Pointer pFilter_field will be added to linked - * list keeped by structure that pFilter_cfg points to. + * list kept by structure that pFilter_cfg points to. */ extern rtk_api_ret_t rtk_filter_igrAcl_field_add(rtk_filter_cfg_t *pFilter_cfg, rtk_filter_field_t *pFilter_field); @@ -602,7 +602,7 @@ extern rtk_api_ret_t rtk_filter_igrAcl_field_add(rtk_filter_cfg_t *pFilter_cfg, * pFilter_cfg - The ACL configuration that this function will add comparison rule * pFilter_action - Action(s) of ACL configuration. * Output: - * ruleNum - number of rules written in acl table + * ruleNum - number of rules written in ACL table * Return: * RT_ERR_OK - OK * RT_ERR_FAILED - Failed @@ -657,12 +657,12 @@ extern rtk_api_ret_t rtk_filter_igrAcl_cfg_delAll(void); /* Function Name: * rtk_filter_igrAcl_cfg_get * Description: - * Get one ingress acl configuration from ASIC. + * Get one ingress ACL configuration from ASIC. * Input: * filter_id - Start index of ACL configuration. * Output: - * pFilter_cfg - buffer pointer of ingress acl data - * pFilter_action - buffer pointer of ingress acl action + * pFilter_cfg - buffer pointer of ingress ACL data + * pFilter_action - buffer pointer of ingress ACL action * Return: * RT_ERR_OK - OK * RT_ERR_FAILED - Failed @@ -690,7 +690,7 @@ extern rtk_api_ret_t rtk_filter_igrAcl_cfg_get(rtk_filter_id_t filter_id, rtk_fi * RT_ERR_PORT_ID - Invalid port id. * RT_ERR_INPUT - Invalid input parameters. * Note: - * This function sets action of packets when no ACL configruation matches. + * This function sets action of packets when no ACL configuration matches. */ extern rtk_api_ret_t rtk_filter_igrAcl_unmatchAction_set(rtk_port_t port, rtk_filter_unmatch_action_t action); @@ -709,7 +709,7 @@ extern rtk_api_ret_t rtk_filter_igrAcl_unmatchAction_set(rtk_port_t port, rtk_fi * RT_ERR_PORT_ID - Invalid port id. * RT_ERR_INPUT - Invalid input parameters. * Note: - * This function gets action of packets when no ACL configruation matches. + * This function gets action of packets when no ACL configuration matches. */ extern rtk_api_ret_t rtk_filter_igrAcl_unmatchAction_get(rtk_port_t port, rtk_filter_unmatch_action_t* action); @@ -729,7 +729,7 @@ extern rtk_api_ret_t rtk_filter_igrAcl_unmatchAction_get(rtk_port_t port, rtk_fi * RT_ERR_PORT_ID - Invalid port id. * RT_ERR_INPUT - Invalid input parameters. * Note: - * This function gets action of packets when no ACL configruation matches. + * This function gets action of packets when no ACL configuration matches. */ extern rtk_api_ret_t rtk_filter_igrAcl_state_set(rtk_port_t port, rtk_filter_state_t state); @@ -748,7 +748,7 @@ extern rtk_api_ret_t rtk_filter_igrAcl_state_set(rtk_port_t port, rtk_filter_sta * RT_ERR_PORT_ID - Invalid port id. * RT_ERR_INPUT - Invalid input parameters. * Note: - * This function gets action of packets when no ACL configruation matches. + * This function gets action of packets when no ACL configuration matches. */ extern rtk_api_ret_t rtk_filter_igrAcl_state_get(rtk_port_t port, rtk_filter_state_t* state); @@ -802,7 +802,7 @@ extern rtk_api_ret_t rtk_filter_igrAcl_template_get(rtk_filter_template_t *aclTe * RT_ERR_FAILED - Failed * RT_ERR_SMI - SMI access error * Note: - * System support 16 user defined field selctors. + * System support 16 user defined field selectors. * Each selector can be enabled or disable. * User can defined retrieving 16-bits in many predefiend * standard l2/l3/l4 payload. @@ -917,7 +917,7 @@ extern rtk_api_ret_t rtk_filter_vidrange_get(rtk_uint32 index, rtk_filter_vidran * Set Port Range check * Input: * index - index of Port Range 0-15 - * type - IP Range check type, 0:Delete a entry, 1: Source Port, 2: Destnation Port + * type - IP Range check type, 0:Delete a entry, 1: Source Port, 2: Destination Port * upperPort - The upper bound of Port range * lowerPort - The lower Bound of Port range * Output: @@ -940,7 +940,7 @@ extern rtk_api_ret_t rtk_filter_portrange_set(rtk_uint32 index, rtk_filter_portr * Input: * index - index of Port Range 0-15 * Output: - * pType - IP Range check type, 0:Delete a entry, 1: Source Port, 2: Destnation Port + * pType - IP Range check type, 0:Delete a entry, 1: Source Port, 2: Destination Port * pUpperPort - The upper bound of Port range * pLowerPort - The lower Bound of Port range * Return: @@ -957,7 +957,7 @@ extern rtk_api_ret_t rtk_filter_portrange_get(rtk_uint32 index, rtk_filter_portr /* Function Name: * rtk_filter_igrAclPolarity_set * Description: - * Set ACL Goip control palarity + * Set ACL Goip control polarity * Input: * polarity - 1: High, 0: Low * Output: @@ -973,7 +973,7 @@ extern rtk_api_ret_t rtk_filter_igrAclPolarity_set(rtk_uint32 polarity); /* Function Name: * rtk_filter_igrAclPolarity_get * Description: - * Get ACL Goip control palarity + * Get ACL Goip control polarity * Input: * pPolarity - 1: High, 0: Low * Output: diff --git a/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/include/cpu.h b/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/include/cpu.h index 5544aca7b2..67aa1e3d88 100644 --- a/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/include/cpu.h +++ b/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/include/cpu.h @@ -9,7 +9,7 @@ * * Purpose : RTL8367/RTL8367C switch high-level API * - * Feature : The file includes CPU module high-layer API defination + * Feature : The file includes CPU module high-layer API definition * */ @@ -107,7 +107,7 @@ extern rtk_api_ret_t rtk_cpu_enable_get(rtk_enable_t *pEnable); * Note: * The API can set CPU port and inserting proprietary CPU tag mode (Length/Type 0x8899) * to the frame that transmitting to CPU port. - * The inset cpu tag mode is as following: + * The insert CPU tag mode is as following: * - CPU_INSERT_TO_ALL * - CPU_INSERT_TO_TRAPPING * - CPU_INSERT_TO_NONE @@ -131,7 +131,7 @@ extern rtk_api_ret_t rtk_cpu_tagPort_set(rtk_port_t port, rtk_cpu_insert_t mode) * RT_ERR_L2_NO_CPU_PORT - CPU port is not exist * Note: * The API can get configured CPU port and its setting. - * The inset cpu tag mode is as following: + * The insert CPU tag mode is as following: * - CPU_INSERT_TO_ALL * - CPU_INSERT_TO_TRAPPING * - CPU_INSERT_TO_NONE diff --git a/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/include/dot1x.h b/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/include/dot1x.h index ef0a05a04b..082ee2569e 100644 --- a/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/include/dot1x.h +++ b/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/include/dot1x.h @@ -9,7 +9,7 @@ * * Purpose : RTL8367/RTL8367C switch high-level API * - * Feature : The file includes 1X module high-layer API defination + * Feature : The file includes 1X module high-layer API definition * */ diff --git a/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/include/eee.h b/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/include/eee.h index b670998c8c..e3920363d1 100644 --- a/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/include/eee.h +++ b/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/include/eee.h @@ -9,7 +9,7 @@ * * Purpose : RTL8367/RTL8367C switch high-level API * - * Feature : The file includes EEE module high-layer API defination + * Feature : The file includes EEE module high-layer API definition * */ diff --git a/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/include/i2c.h b/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/include/i2c.h index 2c7f0756ae..110f41e818 100644 --- a/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/include/i2c.h +++ b/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/include/i2c.h @@ -9,7 +9,7 @@ * * Purpose : RTL8367/RTL8367C switch high-level API * - * Feature : The file includes I2C module high-layer API defination + * Feature : The file includes I2C module high-layer API definition * */ diff --git a/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/include/igmp.h b/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/include/igmp.h index f088b0ccdd..b36db43d83 100644 --- a/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/include/igmp.h +++ b/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/include/igmp.h @@ -9,7 +9,7 @@ * * Purpose : RTL8367/RTL8367C switch high-level API * - * Feature : The file includes IGMP module high-layer API defination + * Feature : The file includes IGMP module high-layer API definition * */ @@ -205,7 +205,7 @@ extern rtk_api_ret_t rtk_igmp_static_router_port_get(rtk_portmask_t *pPortmask); * Input: * port - Port ID * protocol - IGMP/MLD protocol - * action - Per-port and per-protocol IGMP action seeting + * action - Per-port and per-protocol IGMP action setting * Output: * None. * Return: @@ -225,7 +225,7 @@ extern rtk_api_ret_t rtk_igmp_protocol_set(rtk_port_t port, rtk_igmp_protocol_t * Input: * port - Port ID * protocol - IGMP/MLD protocol - * action - Per-port and per-protocol IGMP action seeting + * action - Per-port and per-protocol IGMP action setting * Output: * None. * Return: @@ -640,7 +640,7 @@ extern rtk_api_ret_t rtk_igmp_portRxPktEnable_get(rtk_port_t port, rtk_igmp_rxPk * Description: * Get IGMP/MLD Group database * Input: - * indes - Index (0~255) + * index - Index (0~255) * Output: * pGroup - Group database information. * Return: @@ -694,7 +694,7 @@ extern rtk_api_ret_t rtk_igmp_ReportLeaveFwdAction_get(rtk_igmp_ReportLeaveFwdAc /* Function Name: * rtk_igmp_dropLeaveZeroEnable_set * Description: - * Set the function of droppping Leave packet with group IP = 0.0.0.0 + * Set the function of dropping Leave packet with group IP = 0.0.0.0 * Input: * enabled - Action 1: drop, 0:pass * Output: @@ -712,7 +712,7 @@ extern rtk_api_ret_t rtk_igmp_dropLeaveZeroEnable_set(rtk_enable_t enabled); /* Function Name: * rtk_igmp_dropLeaveZeroEnable_get * Description: - * Get the function of droppping Leave packet with group IP = 0.0.0.0 + * Get the function of dropping Leave packet with group IP = 0.0.0.0 * Input: * None * Output: diff --git a/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/include/interrupt.h b/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/include/interrupt.h index f2689ebc70..20625fff52 100644 --- a/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/include/interrupt.h +++ b/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/include/interrupt.h @@ -9,7 +9,7 @@ * * Purpose : RTL8367/RTL8367C switch high-level API * - * Feature : The file includes Interrupt module high-layer API defination + * Feature : The file includes Interrupt module high-layer API definition * */ diff --git a/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/include/l2.h b/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/include/l2.h index e0ccdbe3d7..ec5aad2e30 100644 --- a/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/include/l2.h +++ b/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/include/l2.h @@ -9,7 +9,7 @@ * * Purpose : RTL8367/RTL8367C switch high-level API * - * Feature : The file includes L2 module high-layer API defination + * Feature : The file includes L2 module high-layer API definition * */ @@ -209,7 +209,7 @@ extern rtk_api_ret_t rtk_l2_init(void); * RT_ERR_L2_INDEXTBL_FULL - hashed index is full of entries. * RT_ERR_INPUT - Invalid input parameters. * Note: - * If the unicast mac address already existed in LUT, it will udpate the status of the entry. + * If the unicast mac address already existed in LUT, it will update the status of the entry. * Otherwise, it will find an empty or asic auto learned entry to write. If all the entries * with the same hash value can't be replaced, ASIC will return a RT_ERR_L2_INDEXTBL_FULL error. */ @@ -307,7 +307,7 @@ extern rtk_api_ret_t rtk_l2_addr_del(rtk_mac_t *pMac, rtk_l2_ucastAddr_t *pL2_da * RT_ERR_PORT_MASK - Invalid portmask. * RT_ERR_INPUT - Invalid input parameters. * Note: - * If the multicast mac address already existed in the LUT, it will udpate the + * If the multicast mac address already existed in the LUT, it will update the * port mask of the entry. Otherwise, it will find an empty or asic auto learned * entry to write. If all the entries with the same hash value can't be replaced, * ASIC will return a RT_ERR_L2_INDEXTBL_FULL error. @@ -383,7 +383,7 @@ extern rtk_api_ret_t rtk_l2_mcastAddr_del(rtk_l2_mcastAddr_t *pMcastAddr); /* Function Name: * rtk_l2_ipMcastAddr_add * Description: - * Add Lut IP multicast entry + * Add LUT IP multicast entry * Input: * pIpMcastAddr - IP Multicast entry * Output: @@ -418,7 +418,7 @@ extern rtk_api_ret_t rtk_l2_ipMcastAddr_add(rtk_l2_ipMcastAddr_t *pIpMcastAddr); * RT_ERR_L2_ENTRY_NOTFOUND - No such LUT entry. * RT_ERR_INPUT - Invalid input parameters. * Note: - * The API can get Lut table of IP multicast entry. + * The API can get LUT table of IP multicast entry. */ extern rtk_api_ret_t rtk_l2_ipMcastAddr_get(rtk_l2_ipMcastAddr_t *pIpMcastAddr); @@ -465,7 +465,7 @@ extern rtk_api_ret_t rtk_l2_ipMcastAddr_del(rtk_l2_ipMcastAddr_t *pIpMcastAddr); /* Function Name: * rtk_l2_ipVidMcastAddr_add * Description: - * Add Lut IP multicast+VID entry + * Add LUT IP multicast+VID entry * Input: * pIpVidMcastAddr - IP & VID multicast Entry * Output: @@ -913,7 +913,7 @@ extern rtk_api_ret_t rtk_l2_learningCnt_get(rtk_port_t port, rtk_mac_cnt_t *pMac * Set flooding portmask * Input: * type - flooding type. - * pFlood_portmask - flooding porkmask + * pFlood_portmask - flooding portmask * Output: * None * Return: @@ -938,7 +938,7 @@ extern rtk_api_ret_t rtk_l2_floodPortMask_set(rtk_l2_flood_type_t floood_type, r * Input: * type - flooding type. * Output: - * pFlood_portmask - flooding porkmask + * pFlood_portmask - flooding portmask * Return: * RT_ERR_OK - OK * RT_ERR_FAILED - Failed @@ -956,10 +956,10 @@ extern rtk_api_ret_t rtk_l2_floodPortMask_get(rtk_l2_flood_type_t floood_type, r /* Function Name: * rtk_l2_localPktPermit_set * Description: - * Set permittion of frames if source port and destination port are the same. + * Set permission of frames if source port and destination port are the same. * Input: * port - Port id. - * permit - permittion status + * permit - permission status * Output: * None * Return: @@ -969,34 +969,34 @@ extern rtk_api_ret_t rtk_l2_floodPortMask_get(rtk_l2_flood_type_t floood_type, r * RT_ERR_PORT_ID - Invalid port number. * RT_ERR_ENABLE - Invalid permit value. * Note: - * This API is setted to permit frame if its source port is equal to destination port. + * This API is set to permit frame if its source port is equal to destination port. */ extern rtk_api_ret_t rtk_l2_localPktPermit_set(rtk_port_t port, rtk_enable_t permit); /* Function Name: * rtk_l2_localPktPermit_get * Description: - * Get permittion of frames if source port and destination port are the same. + * Get permission of frames if source port and destination port are the same. * Input: * port - Port id. * Output: - * pPermit - permittion status + * pPermit - permission status * Return: * RT_ERR_OK - OK * RT_ERR_FAILED - Failed * RT_ERR_SMI - SMI access error * RT_ERR_PORT_ID - Invalid port number. * Note: - * This API is to get permittion status for frames if its source port is equal to destination port. + * This API is to get permission status for frames if its source port is equal to destination port. */ extern rtk_api_ret_t rtk_l2_localPktPermit_get(rtk_port_t port, rtk_enable_t *pPermit); /* Function Name: * rtk_l2_aging_set * Description: - * Set LUT agging out speed + * Set LUT ageing out speed * Input: - * aging_time - Agging out time. + * aging_time - Ageing out time. * Output: * None * Return: @@ -1005,14 +1005,14 @@ extern rtk_api_ret_t rtk_l2_localPktPermit_get(rtk_port_t port, rtk_enable_t *pP * RT_ERR_SMI - SMI access error * RT_ERR_OUT_OF_RANGE - input out of range. * Note: - * The API can set LUT agging out period for each entry and the range is from 14s to 800s. + * The API can set LUT ageing out period for each entry and the range is from 14s to 800s. */ extern rtk_api_ret_t rtk_l2_aging_set(rtk_l2_age_time_t aging_time); /* Function Name: * rtk_l2_aging_get * Description: - * Get LUT agging out time + * Get LUT ageing out time * Input: * None * Output: @@ -1023,14 +1023,14 @@ extern rtk_api_ret_t rtk_l2_aging_set(rtk_l2_age_time_t aging_time); * RT_ERR_SMI - SMI access error * RT_ERR_PORT_ID - Invalid port number. * Note: - * The API can get LUT agging out period for each entry. + * The API can get LUT ageing out period for each entry. */ extern rtk_api_ret_t rtk_l2_aging_get(rtk_l2_age_time_t *pAging_time); /* Function Name: * rtk_l2_ipMcastAddrLookup_set * Description: - * Set Lut IP multicast lookup function + * Set LUT IP multicast lookup function * Input: * type - Lookup type for IPMC packet. * Output: @@ -1051,7 +1051,7 @@ extern rtk_api_ret_t rtk_l2_ipMcastAddrLookup_set(rtk_l2_ipmc_lookup_type_t type /* Function Name: * rtk_l2_ipMcastAddrLookup_get * Description: - * Get Lut IP multicast lookup function + * Get LUT IP multicast lookup function * Input: * None. * Output: @@ -1068,9 +1068,9 @@ extern rtk_api_ret_t rtk_l2_ipMcastAddrLookup_get(rtk_l2_ipmc_lookup_type_t *pTy /* Function Name: * rtk_l2_ipMcastForwardRouterPort_set * Description: - * Set IPMC packet forward to rounter port also or not + * Set IPMC packet forward to router port also or not * Input: - * enabled - 1: Inlcude router port, 0, exclude router port + * enabled - 1: Include router port, 0, exclude router port * Output: * None. * Return: @@ -1085,11 +1085,11 @@ extern rtk_api_ret_t rtk_l2_ipMcastForwardRouterPort_set(rtk_enable_t enabled); /* Function Name: * rtk_l2_ipMcastForwardRouterPort_get * Description: - * Get IPMC packet forward to rounter port also or not + * Get IPMC packet forward to router port also or not * Input: * None. * Output: - * pEnabled - 1: Inlcude router port, 0, exclude router port + * pEnabled - 1: Include router port, 0, exclude router port * Return: * RT_ERR_OK - OK * RT_ERR_FAILED - Failed diff --git a/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/include/leaky.h b/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/include/leaky.h index 13ef60df83..e5b22e2878 100644 --- a/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/include/leaky.h +++ b/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/include/leaky.h @@ -9,7 +9,7 @@ * * Purpose : RTL8367/RTL8367C switch high-level API * - * Feature : The file includes Leaky module high-layer API defination + * Feature : The file includes Leaky module high-layer API definition * */ diff --git a/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/include/led.h b/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/include/led.h index 71acc7c92c..7706107ef4 100644 --- a/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/include/led.h +++ b/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/include/led.h @@ -9,7 +9,7 @@ * * Purpose : RTL8367/RTL8367C switch high-level API * - * Feature : The file includes LED module high-layer API defination + * Feature : The file includes LED module high-layer API definition * */ @@ -107,7 +107,7 @@ typedef enum rtk_led_serialOutput_e /* Function Name: * rtk_led_enable_set * Description: - * Set Led enable congiuration + * Set Led enable configuration * Input: * group - LED group id. * pPortmask - LED enable port mask. @@ -126,7 +126,7 @@ extern rtk_api_ret_t rtk_led_enable_set(rtk_led_group_t group, rtk_portmask_t *p /* Function Name: * rtk_led_enable_get * Description: - * Get Led enable congiuration + * Get Led enable configuration * Input: * group - LED group id. * Output: @@ -188,7 +188,7 @@ extern rtk_api_ret_t rtk_led_operation_get(rtk_led_operation_t *pMode); /* Function Name: * rtk_led_modeForce_set * Description: - * Set Led group to congiuration force mode + * Set Led group to configuration force mode * Input: * port - port ID * group - Support LED group id. @@ -214,7 +214,7 @@ extern rtk_api_ret_t rtk_led_modeForce_set(rtk_port_t port, rtk_led_group_t grou /* Function Name: * rtk_led_modeForce_get * Description: - * Get Led group to congiuration force mode + * Get Led group to configuration force mode * Input: * port - port ID * group - Support LED group id. @@ -276,7 +276,7 @@ extern rtk_api_ret_t rtk_led_blinkRate_get(rtk_led_blink_rate_t *pBlinkRate); /* Function Name: * rtk_led_groupConfig_set * Description: - * Set per group Led to congiuration mode + * Set per group Led to configuration mode * Input: * group - LED group. * config - LED configuration @@ -312,7 +312,7 @@ extern rtk_api_ret_t rtk_led_groupConfig_set(rtk_led_group_t group, rtk_led_cong /* Function Name: * rtk_led_groupConfig_get * Description: - * Get Led group congiuration mode + * Get Led group configuration mode * Input: * group - LED group. * Output: @@ -370,7 +370,7 @@ extern rtk_api_ret_t rtk_led_groupAbility_get(rtk_led_group_t group, rtk_led_abi /* Function Name: * rtk_led_serialMode_set * Description: - * Set Led serial mode active congiuration + * Set Led serial mode active configuration * Input: * active - LED group. * Output: @@ -381,14 +381,14 @@ extern rtk_api_ret_t rtk_led_groupAbility_get(rtk_led_group_t group, rtk_led_abi * RT_ERR_SMI - SMI access error * RT_ERR_INPUT - Invalid input parameters. * Note: - * The API can set LED serial mode active congiuration. + * The API can set LED serial mode active configuration. */ extern rtk_api_ret_t rtk_led_serialMode_set(rtk_led_active_t active); /* Function Name: * rtk_led_serialMode_get * Description: - * Get Led group congiuration mode + * Get Led group configuration mode * Input: * group - LED group. * Output: diff --git a/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/include/mirror.h b/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/include/mirror.h index 1e984b7d80..8d179ce2df 100644 --- a/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/include/mirror.h +++ b/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/include/mirror.h @@ -9,7 +9,7 @@ * * Purpose : RTL8367/RTL8367C switch high-level API * - * Feature : The file includes Mirror module high-layer API defination + * Feature : The file includes Mirror module high-layer API definition * */ @@ -81,7 +81,7 @@ extern rtk_api_ret_t rtk_mirror_portBased_get(rtk_port_t* pMirroring_port, rtk_p * RT_ERR_SMI - SMI access error * RT_ERR_ENABLE - Invalid enable input * Note: - * The API is to set mirror isolation function that prevent normal forwarding packets to miror port. + * The API is to set mirror isolation function that prevent normal forwarding packets to mirror port. */ extern rtk_api_ret_t rtk_mirror_portIso_set(rtk_enable_t enable); @@ -118,7 +118,7 @@ extern rtk_api_ret_t rtk_mirror_portIso_get(rtk_enable_t *pEnable); * RT_ERR_SMI - SMI access error * RT_ERR_ENABLE - Invalid enable input * Note: - * The API is to set mirror VLAN leaky function forwarding packets to miror port. + * The API is to set mirror VLAN leaky function forwarding packets to mirror port. */ extern rtk_api_ret_t rtk_mirror_vlanLeaky_set(rtk_enable_t txenable, rtk_enable_t rxenable); @@ -157,7 +157,7 @@ extern rtk_api_ret_t rtk_mirror_vlanLeaky_get(rtk_enable_t *pTxenable, rtk_enabl * RT_ERR_SMI - SMI access error * RT_ERR_ENABLE - Invalid enable input * Note: - * The API is to set mirror VLAN leaky function forwarding packets to miror port. + * The API is to set mirror VLAN leaky function forwarding packets to mirror port. */ extern rtk_api_ret_t rtk_mirror_isolationLeaky_set(rtk_enable_t txenable, rtk_enable_t rxenable); diff --git a/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/include/port.h b/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/include/port.h index fcac1bcb84..458f16bf6d 100644 --- a/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/include/port.h +++ b/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/include/port.h @@ -9,7 +9,7 @@ * * Purpose : RTL8367/RTL8367C switch high-level API * - * Feature : The file includes port module high-layer API defination + * Feature : The file includes port module high-layer API definition * */ @@ -222,7 +222,7 @@ typedef struct rtk_rtctResult_s /* Function Name: * rtk_port_phyAutoNegoAbility_set * Description: - * Set ethernet PHY auto-negotiation desired ability. + * Set Ethernet PHY auto-negotiation desired ability. * Input: * port - port id. * pAbility - Ability structure @@ -259,7 +259,7 @@ extern rtk_api_ret_t rtk_port_phyAutoNegoAbility_set(rtk_port_t port, rtk_port_p * RT_ERR_INPUT - Invalid input parameters. * RT_ERR_BUSYWAIT_TIMEOUT - PHY access busy * Note: - * Get the capablity of specified PHY. + * Get the capability of specified PHY. */ extern rtk_api_ret_t rtk_port_phyAutoNegoAbility_get(rtk_port_t port, rtk_port_phy_ability_t *pAbility); @@ -303,14 +303,14 @@ extern rtk_api_ret_t rtk_port_phyForceModeAbility_set(rtk_port_t port, rtk_port_ * RT_ERR_INPUT - Invalid input parameters. * RT_ERR_BUSYWAIT_TIMEOUT - PHY access busy * Note: - * Get the capablity of specified PHY. + * Get the capability of specified PHY. */ extern rtk_api_ret_t rtk_port_phyForceModeAbility_get(rtk_port_t port, rtk_port_phy_ability_t *pAbility); /* Function Name: * rtk_port_phyStatus_get * Description: - * Get ethernet PHY linking status + * Get Ethernet PHY linking status * Input: * port - Port id. * Output: @@ -459,7 +459,7 @@ extern rtk_api_ret_t rtk_port_macStatus_get(rtk_port_t port, rtk_port_mac_abilit * For UTP port, This API will also enable the digital * loopback bit in PHY register for sync of speed between * PHY and MAC. For EXT port, users need to force the - * link state by themself. + * link state by themselves. */ extern rtk_api_ret_t rtk_port_macLocalLoopbackEnable_set(rtk_port_t port, rtk_enable_t enable); @@ -527,7 +527,7 @@ extern rtk_api_ret_t rtk_port_phyReg_get(rtk_port_t port, rtk_port_phy_reg_t reg /* Function Name: * rtk_port_backpressureEnable_set * Description: - * Set the half duplex backpressure enable status of the specific port. + * Set the half duplex back-pressure enable status of the specific port. * Input: * port - port id. * enable - Back pressure status. @@ -540,8 +540,8 @@ extern rtk_api_ret_t rtk_port_phyReg_get(rtk_port_t port, rtk_port_phy_reg_t reg * RT_ERR_PORT_ID - Invalid port number. * RT_ERR_ENABLE - Invalid enable input. * Note: - * This API can set the half duplex backpressure enable status of the specific port. - * The half duplex backpressure enable status of the port is as following: + * This API can set the half duplex back-pressure enable status of the specific port. + * The half duplex back-pressure enable status of the port is as following: * - DISABLE * - ENABLE */ @@ -550,7 +550,7 @@ extern rtk_api_ret_t rtk_port_backpressureEnable_set(rtk_port_t port, rtk_enable /* Function Name: * rtk_port_backpressureEnable_get * Description: - * Get the half duplex backpressure enable status of the specific port. + * Get the half duplex back-pressure enable status of the specific port. * Input: * port - Port id. * Output: @@ -561,8 +561,8 @@ extern rtk_api_ret_t rtk_port_backpressureEnable_set(rtk_port_t port, rtk_enable * RT_ERR_SMI - SMI access error * RT_ERR_PORT_ID - Invalid port number. * Note: - * This API can get the half duplex backpressure enable status of the specific port. - * The half duplex backpressure enable status of the port is as following: + * This API can get the half duplex back-pressure enable status of the specific port. + * The half duplex back-pressure enable status of the port is as following: * - DISABLE * - ENABLE */ @@ -594,7 +594,7 @@ extern rtk_api_ret_t rtk_port_adminEnable_set(rtk_port_t port, rtk_enable_t enab /* Function Name: * rtk_port_adminEnable_get * Description: - * Get port admin configurationof the specific port. + * Get port admin configuration of the specific port. * Input: * port - Port id. * Output: @@ -628,7 +628,7 @@ extern rtk_api_ret_t rtk_port_adminEnable_get(rtk_port_t port, rtk_enable_t *pEn * RT_ERR_PORT_ID - Invalid port number. * RT_ERR_PORT_MASK - Invalid portmask. * Note: - * This API set the port mask that a port can trasmit packet to of each port + * This API set the port mask that a port can transmit packet to of each port * A port can only transmit packet to ports included in permitted portmask */ extern rtk_api_ret_t rtk_port_isolation_set(rtk_port_t port, rtk_portmask_t *pPortmask); @@ -647,7 +647,7 @@ extern rtk_api_ret_t rtk_port_isolation_set(rtk_port_t port, rtk_portmask_t *pPo * RT_ERR_SMI - SMI access error * RT_ERR_PORT_ID - Invalid port number. * Note: - * This API get the port mask that a port can trasmit packet to of each port + * This API get the port mask that a port can transmit packet to of each port * A port can only transmit packet to ports included in permitted portmask */ extern rtk_api_ret_t rtk_port_isolation_get(rtk_port_t port, rtk_portmask_t *pPortmask); @@ -669,7 +669,7 @@ extern rtk_api_ret_t rtk_port_isolation_get(rtk_port_t port, rtk_portmask_t *pPo * Note: * This API can set external interface 2 RGMII delay. * In TX delay, there are 2 selection: no-delay and 2ns delay. - * In RX dekay, there are 8 steps for delay tunning. 0 for no-delay, and 7 for maximum delay. + * In RX delay, there are 8 steps for delay tuning. 0 for no-delay, and 7 for maximum delay. */ extern rtk_api_ret_t rtk_port_rgmiiDelayExt_set(rtk_port_t port, rtk_data_t txDelay, rtk_data_t rxDelay); @@ -690,7 +690,7 @@ extern rtk_api_ret_t rtk_port_rgmiiDelayExt_set(rtk_port_t port, rtk_data_t txDe * Note: * This API can set external interface 2 RGMII delay. * In TX delay, there are 2 selection: no-delay and 2ns delay. - * In RX dekay, there are 8 steps for delay tunning. 0 for n0-delay, and 7 for maximum delay. + * In RX delay, there are 8 steps for delay tuning. 0 for n0-delay, and 7 for maximum delay. */ extern rtk_api_ret_t rtk_port_rgmiiDelayExt_get(rtk_port_t port, rtk_data_t *pTxDelay, rtk_data_t *pRxDelay); diff --git a/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/include/ptp.h b/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/include/ptp.h index 6c4aca5a58..d18c4a01ed 100644 --- a/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/include/ptp.h +++ b/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/include/ptp.h @@ -9,7 +9,7 @@ * * Purpose : RTL8367/RTL8367C switch high-level API * - * Feature : The file includes time module high-layer API defination + * Feature : The file includes time module high-layer API definition * */ @@ -310,7 +310,7 @@ extern rtk_api_ret_t rtk_ptp_portEnable_get(rtk_port_t port, rtk_enable_t *pEnab /* Function Name: * rtk_ptp_portTimestamp_get * Description: - * Get PTP timstamp according to the PTP identifier on the dedicated port from the specified device. + * Get PTP timestamp according to the PTP identifier on the dedicated port from the specified device. * Input: * unit - unit id * port - port id diff --git a/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/include/qos.h b/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/include/qos.h index 4be417486f..d2d8fac24a 100644 --- a/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/include/qos.h +++ b/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/include/qos.h @@ -9,7 +9,7 @@ * * Purpose : RTL8367/RTL8367C switch high-level API * - * Feature : The file includes QoS module high-layer API defination + * Feature : The file includes QoS module high-layer API definition * */ @@ -123,7 +123,7 @@ typedef rtk_uint32 rtk_queue_num_t; /* queue number*/ /* Function Name: * rtk_qos_init * Description: - * Configure Qos default settings with queue number assigment to each port. + * Configure QoS default settings with queue number assignment to each port. * Input: * queueNum - Queue number of each port. * Output: @@ -135,7 +135,7 @@ typedef rtk_uint32 rtk_queue_num_t; /* queue number*/ * RT_ERR_QUEUE_NUM - Invalid queue number. * RT_ERR_INPUT - Invalid input parameters. * Note: - * This API will initialize related Qos setting with queue number assigment. + * This API will initialize related QoS setting with queue number assignment. * The queue number is from 1 to 8. */ extern rtk_api_ret_t rtk_qos_init(rtk_queue_num_t queueNum); @@ -235,7 +235,7 @@ extern rtk_api_ret_t rtk_qos_1pPriRemap_set(rtk_pri_t dot1p_pri, rtk_pri_t int_p * RT_ERR_VLAN_PRIORITY - Invalid priority. * RT_ERR_QOS_INT_PRIORITY - Invalid priority. * Note: - * Priority of 802.1Q assigment for internal asic priority, and it is uesed for queue usage and packet scheduling. + * Priority of 802.1Q assignment for internal asic priority, and it is used for queue usage and packet scheduling. */ extern rtk_api_ret_t rtk_qos_1pPriRemap_get(rtk_pri_t dot1p_pri, rtk_pri_t *pInt_pri); diff --git a/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/include/rate.h b/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/include/rate.h index 231ed01bb0..b3cdf432f7 100644 --- a/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/include/rate.h +++ b/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/include/rate.h @@ -9,7 +9,7 @@ * * Purpose : RTL8367/RTL8367C switch high-level API * - * Feature : The file includes rate module high-layer API defination + * Feature : The file includes rate module high-layer API definition * */ diff --git a/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/include/rtk_error.h b/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/include/rtk_error.h index dc9c0bed35..54d1a13f3b 100644 --- a/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/include/rtk_error.h +++ b/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/include/rtk_error.h @@ -40,7 +40,7 @@ typedef enum rt_error_code_e RT_ERR_NULL_POINTER, /* 0x00000007, input parameter is null pointer */ RT_ERR_QUEUE_ID, /* 0x00000008, invalid queue id */ RT_ERR_QUEUE_NUM, /* 0x00000009, invalid queue number */ - RT_ERR_BUSYWAIT_TIMEOUT, /* 0x0000000a, busy watting time out */ + RT_ERR_BUSYWAIT_TIMEOUT, /* 0x0000000a, busy waiting time out */ RT_ERR_MAC, /* 0x0000000b, invalid mac address */ RT_ERR_OUT_OF_RANGE, /* 0x0000000c, input parameter out of range */ RT_ERR_CHIP_NOT_SUPPORTED, /* 0x0000000d, functions not supported by this chip model */ @@ -57,7 +57,7 @@ typedef enum rt_error_code_e /* 0x0001xxxx for vlan */ RT_ERR_VLAN_VID = 0x00010000, /* 0x00010000, invalid vid */ RT_ERR_VLAN_PRIORITY, /* 0x00010001, invalid 1p priority */ - RT_ERR_VLAN_EMPTY_ENTRY, /* 0x00010002, emtpy entry of vlan table */ + RT_ERR_VLAN_EMPTY_ENTRY, /* 0x00010002, empty entry of vlan table */ RT_ERR_VLAN_ACCEPT_FRAME_TYPE, /* 0x00010003, invalid accept frame type */ RT_ERR_VLAN_EXIST, /* 0x00010004, vlan is exist */ RT_ERR_VLAN_ENTRY_NOT_FOUND, /* 0x00010005, specified vlan entry not found */ @@ -165,7 +165,7 @@ typedef enum rt_error_code_e RT_ERR_INBW_TOKEN_AMOUNT, /* 0x000c0001, invalid amount of token for input bandwidth control */ RT_ERR_INBW_FCON_VALUE, /* 0x000c0002, invalid flow control ON threshold value for input bandwidth control */ RT_ERR_INBW_FCOFF_VALUE, /* 0x000c0003, invalid flow control OFF threshold value for input bandwidth control */ - RT_ERR_INBW_FC_ALLOWANCE, /* 0x000c0004, invalid allowance of incomming packet for input bandwidth control */ + RT_ERR_INBW_FC_ALLOWANCE, /* 0x000c0004, invalid allowance of incoming packet for input bandwidth control */ RT_ERR_INBW_RATE, /* 0x000c0005, invalid input bandwidth */ /* 0x000dxxxx for QoS */ @@ -220,7 +220,7 @@ typedef enum rt_error_code_e RT_ERR_DOT1X_PROC, /* 0x00110006, unauthorized behavior error */ RT_ERR_DOT1X_GVLANIDX, /* 0x00110007, guest vlan index error */ RT_ERR_DOT1X_GVLANTALK, /* 0x00110008, guest vlan OPDIR error */ - RT_ERR_DOT1X_MAC_PORT_MISMATCH, /* 0x00110009, Auth MAC and port mismatch eror */ + RT_ERR_DOT1X_MAC_PORT_MISMATCH, /* 0x00110009, Auth MAC and port mismatch error */ RT_ERR_END /* The symbol is the latest symbol */ } rt_error_code_t; diff --git a/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/include/rtk_switch.h b/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/include/rtk_switch.h index b0ca13682c..0a43c0dbd3 100644 --- a/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/include/rtk_switch.h +++ b/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/include/rtk_switch.h @@ -185,10 +185,10 @@ typedef enum rtk_switch_maxPktLen_linkSpeed_e { #define RTK_SCAN_ALL_LOG_PORT(__port__) for(__port__ = 0; __port__ < RTK_SWITCH_PORT_NUM; __port__++) if( rtk_switch_logicalPortCheck(__port__) == RT_ERR_OK) #define RTK_SCAN_ALL_LOG_PORTMASK(__portmask__) for((__portmask__).bits[0] = 0; (__portmask__).bits[0] < 0x7FFFF; (__portmask__).bits[0]++) if( rtk_switch_isPortMaskValid(&__portmask__) == RT_ERR_OK) -/* Port mask defination */ +/* Port mask definition */ #define RTK_PHY_PORTMASK_ALL (rtk_switch_phyPortMask_get()) -/* Port defination*/ +/* Port definition*/ #define RTK_MAX_LOGICAL_PORT_ID (rtk_switch_maxLogicalPort_get()) /* Function Name: @@ -477,7 +477,7 @@ extern rtk_api_ret_t rtk_switch_isPortMaskExt(rtk_portmask_t *pPmask); /* Function Name: * rtk_switch_portmask_L2P_get * Description: - * Get physicl portmask from logical portmask + * Get physical portmask from logical portmask * Input: * pLogicalPmask - logical port mask * Output: @@ -546,7 +546,7 @@ rtk_api_ret_t rtk_switch_logPortMask_get(rtk_portmask_t *pPortmask); /* Function Name: * rtk_switch_init * Description: - * Set chip to default configuration enviroment + * Set chip to default configuration environment * Input: * None * Output: diff --git a/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/include/rtk_types.h b/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/include/rtk_types.h index 589ecb7811..cafc7ff9da 100644 --- a/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/include/rtk_types.h +++ b/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/include/rtk_types.h @@ -56,13 +56,13 @@ typedef enum rtk_enable_e #define ETHER_ADDR_LEN 6 #endif -/* ethernet address type */ +/* Ethernet address type */ typedef struct rtk_mac_s { rtk_uint8 octet[ETHER_ADDR_LEN]; } rtk_mac_t; -typedef rtk_uint32 rtk_pri_t; /* priority vlaue */ +typedef rtk_uint32 rtk_pri_t; /* priority value */ typedef rtk_uint32 rtk_qid_t; /* queue id type */ typedef rtk_uint32 rtk_data_t; typedef rtk_uint32 rtk_dscp_t; /* dscp vlaue */ diff --git a/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/include/rtl8367c_asicdrv_green.h b/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/include/rtl8367c_asicdrv_green.h index 38fd085d06..95c1b20bd4 100644 --- a/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/include/rtl8367c_asicdrv_green.h +++ b/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/include/rtl8367c_asicdrv_green.h @@ -11,7 +11,7 @@ * $Date: 2017-03-08 15:13:58 +0800 (gT, 08 T 2017) $ * * Purpose : RTL8367C switch high-level API for RTL8367C - * Feature : Green ethernet related functions + * Feature : Green Ethernet related functions * */ diff --git a/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/include/rtl8367c_asicdrv_qos.h b/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/include/rtl8367c_asicdrv_qos.h index 26042bfa13..d0a8995879 100644 --- a/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/include/rtl8367c_asicdrv_qos.h +++ b/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/include/rtl8367c_asicdrv_qos.h @@ -11,7 +11,7 @@ * $Date: 2017-03-08 15:13:58 +0800 (gT, 08 T 2017) $ * * Purpose : RTL8367C switch high-level API for RTL8367C - * Feature : Qos related functions + * Feature : QoS related functions * */ diff --git a/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/include/rtl8367c_asicdrv_unknownMulticast.h b/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/include/rtl8367c_asicdrv_unknownMulticast.h index d142d25cff..e492e715b3 100644 --- a/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/include/rtl8367c_asicdrv_unknownMulticast.h +++ b/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/include/rtl8367c_asicdrv_unknownMulticast.h @@ -11,7 +11,7 @@ * $Date: 2017-03-08 15:13:58 +0800 (gT, 08 T 2017) $ * * Purpose : RTL8367C switch high-level API for RTL8367C - * Feature : Unkown multicast related functions + * Feature : Unknown multicast related functions * */ diff --git a/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/include/rtl8367c_base.h b/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/include/rtl8367c_base.h index 676ca8ed74..7a70e158fa 100644 --- a/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/include/rtl8367c_base.h +++ b/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/include/rtl8367c_base.h @@ -11,7 +11,7 @@ * $Date: 2017-03-08 15:13:58 +0800 (gT, 08 T 2017) $ * * Purpose : RTL8367C switch high-level API for RTL8367C - * Feature : Regsiter MACRO related definition + * Feature : Register MACRO related definition * */ diff --git a/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/l2.c b/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/l2.c index feff0b240b..e73199a4e9 100644 --- a/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/l2.c +++ b/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/l2.c @@ -86,7 +86,7 @@ rtk_api_ret_t rtk_l2_init(void) * RT_ERR_L2_INDEXTBL_FULL - hashed index is full of entries. * RT_ERR_INPUT - Invalid input parameters. * Note: - * If the unicast mac address already existed in LUT, it will udpate the status of the entry. + * If the unicast mac address already existed in LUT, it will update the status of the entry. * Otherwise, it will find an empty or asic auto learned entry to write. If all the entries * with the same hash value can't be replaced, ASIC will return a RT_ERR_L2_INDEXTBL_FULL error. */ @@ -453,7 +453,7 @@ rtk_api_ret_t rtk_l2_addr_del(rtk_mac_t *pMac, rtk_l2_ucastAddr_t *pL2_data) * RT_ERR_PORT_MASK - Invalid portmask. * RT_ERR_INPUT - Invalid input parameters. * Note: - * If the multicast mac address already existed in the LUT, it will udpate the + * If the multicast mac address already existed in the LUT, it will update the * port mask of the entry. Otherwise, it will find an empty or asic auto learned * entry to write. If all the entries with the same hash value can't be replaced, * ASIC will return a RT_ERR_L2_INDEXTBL_FULL error. @@ -800,7 +800,7 @@ rtk_api_ret_t rtk_l2_mcastAddr_del(rtk_l2_mcastAddr_t *pMcastAddr) /* Function Name: * rtk_l2_ipMcastAddr_add * Description: - * Add Lut IP multicast entry + * Add LUT IP multicast entry * Input: * pIpMcastAddr - IP Multicast entry * Output: @@ -914,7 +914,7 @@ rtk_api_ret_t rtk_l2_ipMcastAddr_add(rtk_l2_ipMcastAddr_t *pIpMcastAddr) * RT_ERR_L2_ENTRY_NOTFOUND - No such LUT entry. * RT_ERR_INPUT - Invalid input parameters. * Note: - * The API can get Lut table of IP multicast entry. + * The API can get LUT table of IP multicast entry. */ rtk_api_ret_t rtk_l2_ipMcastAddr_get(rtk_l2_ipMcastAddr_t *pIpMcastAddr) { @@ -1080,7 +1080,7 @@ rtk_api_ret_t rtk_l2_ipMcastAddr_del(rtk_l2_ipMcastAddr_t *pIpMcastAddr) /* Function Name: * rtk_l2_ipVidMcastAddr_add * Description: - * Add Lut IP multicast+VID entry + * Add LUT IP multicast+VID entry * Input: * pIpVidMcastAddr - IP & VID multicast Entry * Output: @@ -2143,7 +2143,7 @@ rtk_api_ret_t rtk_l2_learningCnt_get(rtk_port_t port, rtk_mac_cnt_t *pMac_cnt) * Set flooding portmask * Input: * type - flooding type. - * pFlood_portmask - flooding porkmask + * pFlood_portmask - flooding portmask * Output: * None * Return: @@ -2204,7 +2204,7 @@ rtk_api_ret_t rtk_l2_floodPortMask_set(rtk_l2_flood_type_t floood_type, rtk_port * Input: * type - flooding type. * Output: - * pFlood_portmask - flooding porkmask + * pFlood_portmask - flooding portmask * Return: * RT_ERR_OK - OK * RT_ERR_FAILED - Failed @@ -2259,10 +2259,10 @@ rtk_api_ret_t rtk_l2_floodPortMask_get(rtk_l2_flood_type_t floood_type, rtk_port /* Function Name: * rtk_l2_localPktPermit_set * Description: - * Set permittion of frames if source port and destination port are the same. + * Set permission of frames if source port and destination port are the same. * Input: * port - Port id. - * permit - permittion status + * permit - permission status * Output: * None * Return: @@ -2272,7 +2272,7 @@ rtk_api_ret_t rtk_l2_floodPortMask_get(rtk_l2_flood_type_t floood_type, rtk_port * RT_ERR_PORT_ID - Invalid port number. * RT_ERR_ENABLE - Invalid permit value. * Note: - * This API is setted to permit frame if its source port is equal to destination port. + * This API is set to permit frame if its source port is equal to destination port. */ rtk_api_ret_t rtk_l2_localPktPermit_set(rtk_port_t port, rtk_enable_t permit) { @@ -2296,18 +2296,18 @@ rtk_api_ret_t rtk_l2_localPktPermit_set(rtk_port_t port, rtk_enable_t permit) /* Function Name: * rtk_l2_localPktPermit_get * Description: - * Get permittion of frames if source port and destination port are the same. + * Get permission of frames if source port and destination port are the same. * Input: * port - Port id. * Output: - * pPermit - permittion status + * pPermit - permission status * Return: * RT_ERR_OK - OK * RT_ERR_FAILED - Failed * RT_ERR_SMI - SMI access error * RT_ERR_PORT_ID - Invalid port number. * Note: - * This API is to get permittion status for frames if its source port is equal to destination port. + * This API is to get permission status for frames if its source port is equal to destination port. */ rtk_api_ret_t rtk_l2_localPktPermit_get(rtk_port_t port, rtk_enable_t *pPermit) { @@ -2331,9 +2331,9 @@ rtk_api_ret_t rtk_l2_localPktPermit_get(rtk_port_t port, rtk_enable_t *pPermit) /* Function Name: * rtk_l2_aging_set * Description: - * Set LUT agging out speed + * Set LUT ageing out speed * Input: - * aging_time - Agging out time. + * aging_time - Ageing out time. * Output: * None * Return: @@ -2342,7 +2342,7 @@ rtk_api_ret_t rtk_l2_localPktPermit_get(rtk_port_t port, rtk_enable_t *pPermit) * RT_ERR_SMI - SMI access error * RT_ERR_OUT_OF_RANGE - input out of range. * Note: - * The API can set LUT agging out period for each entry and the range is from 45s to 458s. + * The API can set LUT ageing out period for each entry and the range is from 45s to 458s. */ rtk_api_ret_t rtk_l2_aging_set(rtk_l2_age_time_t aging_time) { @@ -2371,7 +2371,7 @@ rtk_api_ret_t rtk_l2_aging_set(rtk_l2_age_time_t aging_time) /* Function Name: * rtk_l2_aging_get * Description: - * Get LUT agging out time + * Get LUT ageing out time * Input: * None * Output: @@ -2382,7 +2382,7 @@ rtk_api_ret_t rtk_l2_aging_set(rtk_l2_age_time_t aging_time) * RT_ERR_SMI - SMI access error * RT_ERR_PORT_ID - Invalid port number. * Note: - * The API can get LUT agging out period for each entry. + * The API can get LUT ageing out period for each entry. */ rtk_api_ret_t rtk_l2_aging_get(rtk_l2_age_time_t *pAging_time) { @@ -2416,7 +2416,7 @@ rtk_api_ret_t rtk_l2_aging_get(rtk_l2_age_time_t *pAging_time) /* Function Name: * rtk_l2_ipMcastAddrLookup_set * Description: - * Set Lut IP multicast lookup function + * Set LUT IP multicast lookup function * Input: * type - Lookup type for IPMC packet. * Output: @@ -2473,7 +2473,7 @@ rtk_api_ret_t rtk_l2_ipMcastAddrLookup_set(rtk_l2_ipmc_lookup_type_t type) /* Function Name: * rtk_l2_ipMcastAddrLookup_get * Description: - * Get Lut IP multicast lookup function + * Get LUT IP multicast lookup function * Input: * None. * Output: @@ -2518,9 +2518,9 @@ rtk_api_ret_t rtk_l2_ipMcastAddrLookup_get(rtk_l2_ipmc_lookup_type_t *pType) /* Function Name: * rtk_l2_ipMcastForwardRouterPort_set * Description: - * Set IPMC packet forward to rounter port also or not + * Set IPMC packet forward to router port also or not * Input: - * enabled - 1: Inlcude router port, 0, exclude router port + * enabled - 1: Include router port, 0, exclude router port * Output: * None. * Return: @@ -2549,11 +2549,11 @@ rtk_api_ret_t rtk_l2_ipMcastForwardRouterPort_set(rtk_enable_t enabled) /* Function Name: * rtk_l2_ipMcastForwardRouterPort_get * Description: - * Get IPMC packet forward to rounter port also or not + * Get IPMC packet forward to router port also or not * Input: * None. * Output: - * pEnabled - 1: Inlcude router port, 0, exclude router port + * pEnabled - 1: Include router port, 0, exclude router port * Return: * RT_ERR_OK - OK * RT_ERR_FAILED - Failed diff --git a/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/led.c b/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/led.c index c00c331d8a..02e0829dc6 100644 --- a/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/led.c +++ b/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/led.c @@ -27,7 +27,7 @@ /* Function Name: * rtk_led_enable_set * Description: - * Set Led enable congiuration + * Set Led enable configuration * Input: * group - LED group id. * pPortmask - LED enable port mask. @@ -74,7 +74,7 @@ rtk_api_ret_t rtk_led_enable_set(rtk_led_group_t group, rtk_portmask_t *pPortmas /* Function Name: * rtk_led_enable_get * Description: - * Get Led enable congiuration + * Get Led enable configuration * Input: * group - LED group id. * Output: @@ -205,7 +205,7 @@ rtk_api_ret_t rtk_led_operation_get(rtk_led_operation_t *pMode) /* Function Name: * rtk_led_modeForce_set * Description: - * Set Led group to congiuration force mode + * Set Led group to configuration force mode * Input: * port - port ID * group - Support LED group id. @@ -255,7 +255,7 @@ rtk_api_ret_t rtk_led_modeForce_set(rtk_port_t port, rtk_led_group_t group, rtk_ /* Function Name: * rtk_led_modeForce_get * Description: - * Get Led group to congiuration force mode + * Get Led group to configuration force mode * Input: * port - port ID * group - Support LED group id. @@ -369,7 +369,7 @@ rtk_api_ret_t rtk_led_blinkRate_get(rtk_led_blink_rate_t *pBlinkRate) /* Function Name: * rtk_led_groupConfig_set * Description: - * Set per group Led to congiuration mode + * Set per group Led to configuration mode * Input: * group - LED group. * config - LED configuration @@ -422,7 +422,7 @@ rtk_api_ret_t rtk_led_groupConfig_set(rtk_led_group_t group, rtk_led_congig_t co /* Function Name: * rtk_led_groupConfig_get * Description: - * Get Led group congiuration mode + * Get Led group configuration mode * Input: * group - LED group. * Output: @@ -583,7 +583,7 @@ rtk_api_ret_t rtk_led_groupAbility_get(rtk_led_group_t group, rtk_led_ability_t /* Function Name: * rtk_led_serialMode_set * Description: - * Set Led serial mode active congiuration + * Set Led serial mode active configuration * Input: * active - LED group. * Output: @@ -594,7 +594,7 @@ rtk_api_ret_t rtk_led_groupAbility_get(rtk_led_group_t group, rtk_led_ability_t * RT_ERR_SMI - SMI access error * RT_ERR_INPUT - Invalid input parameters. * Note: - * The API can set LED serial mode active congiuration. + * The API can set LED serial mode active configuration. */ rtk_api_ret_t rtk_led_serialMode_set(rtk_led_active_t active) { diff --git a/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/mirror.c b/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/mirror.c index 1921d1a5af..3bbad8adb6 100644 --- a/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/mirror.c +++ b/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/mirror.c @@ -66,7 +66,7 @@ rtk_api_ret_t rtk_mirror_portBased_set(rtk_port_t mirroring_port, rtk_portmask_t RTK_CHK_PORTMASK_VALID(pMirrored_tx_portmask); - /*Mirror Sorce Port Mask Check*/ + /*Mirror Source Port Mask Check*/ if (pMirrored_tx_portmask->bits[0]!=pMirrored_rx_portmask->bits[0]&&pMirrored_tx_portmask->bits[0]!=0&&pMirrored_rx_portmask->bits[0]!=0) return RT_ERR_PORT_MASK; @@ -353,7 +353,7 @@ rtk_api_ret_t rtk_mirror_vlanLeaky_get(rtk_enable_t *pTxenable, rtk_enable_t *pR * RT_ERR_SMI - SMI access error * RT_ERR_ENABLE - Invalid enable input * Note: - * The API is to set mirror VLAN leaky function forwarding packets to miror port. + * The API is to set mirror VLAN leaky function forwarding packets to mirror port. */ rtk_api_ret_t rtk_mirror_isolationLeaky_set(rtk_enable_t txenable, rtk_enable_t rxenable) { diff --git a/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/port.c b/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/port.c index 9f99d1b3dc..9c7bcd0e38 100644 --- a/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/port.c +++ b/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/port.c @@ -410,7 +410,7 @@ static rtk_api_ret_t _rtk_port_FiberModeAbility_get(rtk_port_t port, rtk_port_ph /* Function Name: * rtk_port_phyAutoNegoAbility_set * Description: - * Set ethernet PHY auto-negotiation desired ability. + * Set Ethernet PHY auto-negotiation desired ability. * Input: * port - port id. * pAbility - Ability structure @@ -618,7 +618,7 @@ rtk_api_ret_t rtk_port_phyAutoNegoAbility_set(rtk_port_t port, rtk_port_phy_abil * RT_ERR_INPUT - Invalid input parameters. * RT_ERR_BUSYWAIT_TIMEOUT - PHY access busy * Note: - * Get the capablity of specified PHY. + * Get the capability of specified PHY. */ rtk_api_ret_t rtk_port_phyAutoNegoAbility_get(rtk_port_t port, rtk_port_phy_ability_t *pAbility) { @@ -836,7 +836,7 @@ rtk_api_ret_t rtk_port_phyForceModeAbility_set(rtk_port_t port, rtk_port_phy_abi if (1 == pAbility->AsyFC) { - /*Asymetric flow control in reg 4.11*/ + /*Asymmetric flow control in reg 4.11*/ phyEnMsk4 = phyEnMsk4 | (1 << 11); } if (1 == pAbility->FC) @@ -892,7 +892,7 @@ rtk_api_ret_t rtk_port_phyForceModeAbility_set(rtk_port_t port, rtk_port_phy_abi * RT_ERR_INPUT - Invalid input parameters. * RT_ERR_BUSYWAIT_TIMEOUT - PHY access busy * Note: - * Get the capablity of specified PHY. + * Get the capability of specified PHY. */ rtk_api_ret_t rtk_port_phyForceModeAbility_get(rtk_port_t port, rtk_port_phy_ability_t *pAbility) { @@ -982,7 +982,7 @@ rtk_api_ret_t rtk_port_phyForceModeAbility_get(rtk_port_t port, rtk_port_phy_abi /* Function Name: * rtk_port_phyStatus_get * Description: - * Get ethernet PHY linking status + * Get Ethernet PHY linking status * Input: * port - Port id. * Output: @@ -1363,7 +1363,7 @@ rtk_api_ret_t rtk_port_macStatus_get(rtk_port_t port, rtk_port_mac_ability_t *pP * For UTP port, This API will also enable the digital * loopback bit in PHY register for sync of speed between * PHY and MAC. For EXT port, users need to force the - * link state by themself. + * link state by themselves. */ rtk_api_ret_t rtk_port_macLocalLoopbackEnable_set(rtk_port_t port, rtk_enable_t enable) { @@ -1508,7 +1508,7 @@ rtk_api_ret_t rtk_port_phyReg_get(rtk_port_t port, rtk_port_phy_reg_t reg, rtk_p /* Function Name: * rtk_port_backpressureEnable_set * Description: - * Set the half duplex backpressure enable status of the specific port. + * Set the half duplex back-pressure enable status of the specific port. * Input: * port - port id. * enable - Back pressure status. @@ -1521,10 +1521,10 @@ rtk_api_ret_t rtk_port_phyReg_get(rtk_port_t port, rtk_port_phy_reg_t reg, rtk_p * RT_ERR_PORT_ID - Invalid port number. * RT_ERR_ENABLE - Invalid enable input. * Note: - * This API can set the half duplex backpressure enable status of the specific port. - * The half duplex backpressure enable status of the port is as following: + * This API can set the half duplex back-pressure enable status of the specific port. + * The half duplex back-pressure enable status of the port is as following: * - DISABLE(Defer) - * - ENABLE (Backpressure) + * - ENABLE (Back-pressure) */ rtk_api_ret_t rtk_port_backpressureEnable_set(rtk_port_t port, rtk_enable_t enable) { @@ -1548,7 +1548,7 @@ rtk_api_ret_t rtk_port_backpressureEnable_set(rtk_port_t port, rtk_enable_t enab /* Function Name: * rtk_port_backpressureEnable_get * Description: - * Get the half duplex backpressure enable status of the specific port. + * Get the half duplex back-pressure enable status of the specific port. * Input: * port - Port id. * Output: @@ -1559,10 +1559,10 @@ rtk_api_ret_t rtk_port_backpressureEnable_set(rtk_port_t port, rtk_enable_t enab * RT_ERR_SMI - SMI access error * RT_ERR_PORT_ID - Invalid port number. * Note: - * This API can get the half duplex backpressure enable status of the specific port. - * The half duplex backpressure enable status of the port is as following: + * This API can get the half duplex back-pressure enable status of the specific port. + * The half duplex back-pressure enable status of the port is as following: * - DISABLE(Defer) - * - ENABLE (Backpressure) + * - ENABLE (Back-pressure) */ rtk_api_ret_t rtk_port_backpressureEnable_get(rtk_port_t port, rtk_enable_t *pEnable) { @@ -1643,7 +1643,7 @@ rtk_api_ret_t rtk_port_adminEnable_set(rtk_port_t port, rtk_enable_t enable) /* Function Name: * rtk_port_adminEnable_get * Description: - * Get port admin configurationof the specific port. + * Get port admin configuration of the specific port. * Input: * port - Port id. * Output: @@ -1704,7 +1704,7 @@ rtk_api_ret_t rtk_port_adminEnable_get(rtk_port_t port, rtk_enable_t *pEnable) * RT_ERR_PORT_ID - Invalid port number. * RT_ERR_PORT_MASK - Invalid portmask. * Note: - * This API set the port mask that a port can trasmit packet to of each port + * This API set the port mask that a port can transmit packet to of each port * A port can only transmit packet to ports included in permitted portmask */ rtk_api_ret_t rtk_port_isolation_set(rtk_port_t port, rtk_portmask_t *pPortmask) @@ -1747,7 +1747,7 @@ rtk_api_ret_t rtk_port_isolation_set(rtk_port_t port, rtk_portmask_t *pPortmask) * RT_ERR_SMI - SMI access error * RT_ERR_PORT_ID - Invalid port number. * Note: - * This API get the port mask that a port can trasmit packet to of each port + * This API get the port mask that a port can transmit packet to of each port * A port can only transmit packet to ports included in permitted portmask */ rtk_api_ret_t rtk_port_isolation_get(rtk_port_t port, rtk_portmask_t *pPortmask) @@ -1790,7 +1790,7 @@ rtk_api_ret_t rtk_port_isolation_get(rtk_port_t port, rtk_portmask_t *pPortmask) * Note: * This API can set external interface 2 RGMII delay. * In TX delay, there are 2 selection: no-delay and 2ns delay. - * In RX dekay, there are 8 steps for delay tunning. 0 for no-delay, and 7 for maximum delay. + * In RX delay, there are 8 steps for delay tuning. 0 for no-delay, and 7 for maximum delay. */ rtk_api_ret_t rtk_port_rgmiiDelayExt_set(rtk_port_t port, rtk_data_t txDelay, rtk_data_t rxDelay) { @@ -1841,7 +1841,7 @@ rtk_api_ret_t rtk_port_rgmiiDelayExt_set(rtk_port_t port, rtk_data_t txDelay, rt * Note: * This API can set external interface 2 RGMII delay. * In TX delay, there are 2 selection: no-delay and 2ns delay. - * In RX dekay, there are 8 steps for delay tunning. 0 for n0-delay, and 7 for maximum delay. + * In RX delay, there are 8 steps for delay tuning. 0 for n0-delay, and 7 for maximum delay. */ rtk_api_ret_t rtk_port_rgmiiDelayExt_get(rtk_port_t port, rtk_data_t *pTxDelay, rtk_data_t *pRxDelay) { diff --git a/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/ptp.c b/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/ptp.c index 40962a0e69..af8ce30912 100644 --- a/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/ptp.c +++ b/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/ptp.c @@ -401,7 +401,7 @@ rtk_api_ret_t rtk_ptp_portEnable_get(rtk_port_t port, rtk_enable_t *pEnable) /* Function Name: * rtk_ptp_portTimestamp_get * Description: - * Get PTP timstamp according to the PTP identifier on the dedicated port from the specified device. + * Get PTP timestamp according to the PTP identifier on the dedicated port from the specified device. * Input: * unit - unit id * port - port id diff --git a/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/qos.c b/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/qos.c index 70067a3016..9bcb49cfbd 100644 --- a/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/qos.c +++ b/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/qos.c @@ -28,7 +28,7 @@ /* Function Name: * rtk_qos_init * Description: - * Configure Qos default settings with queue number assigment to each port. + * Configure QoS default settings with queue number assignment to each port. * Input: * queueNum - Queue number of each port. * Output: @@ -40,7 +40,7 @@ * RT_ERR_QUEUE_NUM - Invalid queue number. * RT_ERR_INPUT - Invalid input parameters. * Note: - * This API will initialize related Qos setting with queue number assigment. + * This API will initialize related QoS setting with queue number assignment. * The queue number is from 1 to 8. */ rtk_api_ret_t rtk_qos_init(rtk_queue_num_t queueNum) @@ -143,7 +143,7 @@ rtk_api_ret_t rtk_qos_init(rtk_queue_num_t queueNum) return retVal; } - /* Finetune B/T value */ + /* Fine-tune B/T value */ if((retVal = rtl8367c_setAsicReg(0x1722, 0x1158)) != RT_ERR_OK) return retVal; @@ -455,7 +455,7 @@ rtk_api_ret_t rtk_qos_1pPriRemap_set(rtk_pri_t dot1p_pri, rtk_pri_t int_pri) * RT_ERR_VLAN_PRIORITY - Invalid priority. * RT_ERR_QOS_INT_PRIORITY - Invalid priority. * Note: - * Priority of 802.1Q assigment for internal asic priority, and it is uesed for queue usage and packet scheduling. + * Priority of 802.1Q assignment for internal asic priority, and it is used for queue usage and packet scheduling. */ rtk_api_ret_t rtk_qos_1pPriRemap_get(rtk_pri_t dot1p_pri, rtk_pri_t *pInt_pri) { diff --git a/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/rldp.c b/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/rldp.c index d3ca029751..c39421e57c 100644 --- a/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/rldp.c +++ b/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/rldp.c @@ -404,7 +404,7 @@ rtk_api_ret_t rtk_rldp_portStatus_get(rtk_port_t port, rtk_rldp_portStatus_t *pP * RT_ERR_NULL_POINTER * Note: * Clear operation effect loop_enter and loop_leave only, other field in - * the structure are don't care. Loop status cab't be clean. + * the structure are don't care. Loop status can't be clean. */ rtk_api_ret_t rtk_rldp_portStatus_set(rtk_port_t port, rtk_rldp_portStatus_t *pPortStatus) { diff --git a/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/rtk_switch.c b/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/rtk_switch.c index 0bb0db0776..20542f259f 100644 --- a/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/rtk_switch.c +++ b/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/rtk_switch.c @@ -152,7 +152,7 @@ static rtk_switch_halCtrl_t rtl8370b_hal_Ctrl = /* Minimum physical port number */ 0, - /* Maxmum physical port number */ + /* Maximum physical port number */ 10, /* Physical port mask */ @@ -221,7 +221,7 @@ static rtk_switch_halCtrl_t rtl8364b_hal_Ctrl = /* Minimum physical port number */ 0, - /* Maxmum physical port number */ + /* Maximum physical port number */ 7, /* Physical port mask */ @@ -290,7 +290,7 @@ static rtk_switch_halCtrl_t rtl8363sc_vb_hal_Ctrl = /* Minimum physical port number */ 0, - /* Maxmum physical port number */ + /* Maximum physical port number */ 7, /* Physical port mask */ @@ -1215,7 +1215,7 @@ rtk_api_ret_t rtk_switch_isPortMaskExt(rtk_portmask_t *pPmask) /* Function Name: * rtk_switch_portmask_L2P_get * Description: - * Get physicl portmask from logical portmask + * Get physical portmask from logical portmask * Input: * pLogicalPmask - logical port mask * Output: @@ -1351,7 +1351,7 @@ rtk_api_ret_t rtk_switch_logPortMask_get(rtk_portmask_t *pPortmask) /* Function Name: * rtk_switch_init * Description: - * Set chip to default configuration enviroment + * Set chip to default configuration environment * Input: * None * Output: diff --git a/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/rtl8367c_asicdrv_acl.c b/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/rtl8367c_asicdrv_acl.c index d9ccd97118..1e4d2961e7 100644 --- a/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/rtl8367c_asicdrv_acl.c +++ b/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/rtl8367c_asicdrv_acl.c @@ -173,7 +173,7 @@ static void _rtl8367c_aclActStUser2Smi(rtl8367c_acl_act_t *pAclUser, rtk_uint16 /* Function Name: * rtl8367c_setAsicAcl * Description: - * Set port acl function enable/disable + * Set port ACL function enable/disable * Input: * port - Physical port number (0~10) * enabled - 1: enabled, 0: disabled @@ -196,7 +196,7 @@ ret_t rtl8367c_setAsicAcl(rtk_uint32 port, rtk_uint32 enabled) /* Function Name: * rtl8367c_getAsicAcl * Description: - * Get port acl function enable/disable + * Get port ACL function enable/disable * Input: * port - Physical port number (0~10) * enabled - 1: enabled, 0: disabled @@ -219,7 +219,7 @@ ret_t rtl8367c_getAsicAcl(rtk_uint32 port, rtk_uint32* pEnabled) /* Function Name: * rtl8367c_setAsicAclUnmatchedPermit * Description: - * Set port acl function unmatched permit action + * Set port ACL function unmatched permit action * Input: * port - Physical port number (0~10) * enabled - 1: enabled, 0: disabled @@ -242,7 +242,7 @@ ret_t rtl8367c_setAsicAclUnmatchedPermit(rtk_uint32 port, rtk_uint32 enabled) /* Function Name: * rtl8367c_getAsicAclUnmatchedPermit * Description: - * Get port acl function unmatched permit action + * Get port ACL function unmatched permit action * Input: * port - Physical port number (0~10) * enabled - 1: enabled, 0: disabled @@ -266,10 +266,10 @@ ret_t rtl8367c_getAsicAclUnmatchedPermit(rtk_uint32 port, rtk_uint32* pEnabled) /* Function Name: * rtl8367c_setAsicAclRule * Description: - * Set acl rule content + * Set ACL rule content * Input: * index - ACL rule index (0-95) of 96 ACL rules - * pAclRule - ACL rule stucture for setting + * pAclRule - ACL rule structure for setting * Output: * None * Return: @@ -278,8 +278,8 @@ ret_t rtl8367c_getAsicAclUnmatchedPermit(rtk_uint32 port, rtk_uint32* pEnabled) * RT_ERR_OUT_OF_RANGE - Invalid ACL rule index (0-95) * Note: * System supported 95 shared 289-bit ACL ingress rule. Index was available at range 0-95 only. - * If software want to modify ACL rule, the ACL function should be disable at first or unspecify - * acl action will be executed. + * If software want to modify ACL rule, the ACL function should be disabled at first or unspecified + * ACL action will be executed. * One ACL rule structure has three parts setting: * Bit 0-147 Data Bits of this Rule * Bit 148 Valid Bit @@ -410,10 +410,10 @@ ret_t rtl8367c_setAsicAclRule(rtk_uint32 index, rtl8367c_aclrule* pAclRule) /* Function Name: * rtl8367c_getAsicAclRule * Description: - * Get acl rule content + * Get ACL rule content * Input: * index - ACL rule index (0-63) of 64 ACL rules - * pAclRule - ACL rule stucture for setting + * pAclRule - ACL rule structure for setting * Output: * None * Return: @@ -588,7 +588,7 @@ ret_t rtl8367c_getAsicAclNot(rtk_uint32 index, rtk_uint32* pNot) * Set fields of a ACL Template * Input: * index - ACL template index(0~4) - * pAclType - ACL type stucture for setting + * pAclType - ACL type structure for setting * Output: * None * Return: @@ -598,7 +598,7 @@ ret_t rtl8367c_getAsicAclNot(rtk_uint32 index, rtk_uint32* pNot) * Note: * The API can set type field of the 5 ACL rule templates. * Each type has 8 fields. One field means what data in one field of a ACL rule means - * 8 fields of ACL rule 0~95 is descripted by one type in ACL group + * 8 fields of ACL rule 0~95 is described by one type in ACL group */ ret_t rtl8367c_setAsicAclTemplate(rtk_uint32 index, rtl8367c_acltemplate_t* pAclType) { @@ -630,7 +630,7 @@ ret_t rtl8367c_setAsicAclTemplate(rtk_uint32 index, rtl8367c_acltemplate_t* pAcl * Get fields of a ACL Template * Input: * index - ACL template index(0~4) - * pAclType - ACL type stucture for setting + * pAclType - ACL type structure for setting * Output: * None * Return: @@ -669,7 +669,7 @@ ret_t rtl8367c_getAsicAclTemplate(rtk_uint32 index, rtl8367c_acltemplate_t *pAcl * Set ACL rule matched Action * Input: * index - ACL rule index (0-95) of 96 ACL rules - * pAclAct - ACL action stucture for setting + * pAclAct - ACL action structure for setting * Output: * None * Return: @@ -734,7 +734,7 @@ ret_t rtl8367c_setAsicAclAct(rtk_uint32 index, rtl8367c_acl_act_t* pAclAct) * Get ACL rule matched Action * Input: * index - ACL rule index (0-95) of 96 ACL rules - * pAclAct - ACL action stucture for setting + * pAclAct - ACL action structure for setting * Output: * None * Return: @@ -1137,7 +1137,7 @@ ret_t rtl8367c_getAsicAclIpRange(rtk_uint32 index, rtk_uint32* pType, ipaddr_t* /* Function Name: * rtl8367c_setAsicAclGpioPolarity * Description: - * Set ACL Goip control palarity + * Set ACL Goip control polarity * Input: * polarity - 1: High, 0: Low * Output: @@ -1155,7 +1155,7 @@ ret_t rtl8367c_setAsicAclGpioPolarity(rtk_uint32 polarity) /* Function Name: * rtl8367c_getAsicAclGpioPolarity * Description: - * Get ACL Goip control palarity + * Get ACL Goip control polarity * Input: * pPolarity - 1: High, 0: Low * Output: diff --git a/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/rtl8367c_asicdrv_cputag.c b/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/rtl8367c_asicdrv_cputag.c index d22bf65eaa..4b01a11617 100644 --- a/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/rtl8367c_asicdrv_cputag.c +++ b/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/rtl8367c_asicdrv_cputag.c @@ -18,7 +18,7 @@ /* Function Name: * rtl8367c_setAsicCputagEnable * Description: - * Set cpu tag function enable/disable + * Set CPU tag function enable/disable * Input: * enabled - 1: enabled, 0: disabled * Output: @@ -41,7 +41,7 @@ ret_t rtl8367c_setAsicCputagEnable(rtk_uint32 enabled) /* Function Name: * rtl8367c_getAsicCputagEnable * Description: - * Get cpu tag function enable/disable + * Get CPU tag function enable/disable * Input: * pEnabled - 1: enabled, 0: disabled * Output: @@ -59,7 +59,7 @@ ret_t rtl8367c_getAsicCputagEnable(rtk_uint32 *pEnabled) /* Function Name: * rtl8367c_setAsicCputagTrapPort * Description: - * Set cpu tag trap port + * Set CPU tag trap port * Input: * port - port number * Output: @@ -91,7 +91,7 @@ ret_t rtl8367c_setAsicCputagTrapPort(rtk_uint32 port) /* Function Name: * rtl8367c_getAsicCputagTrapPort * Description: - * Get cpu tag trap port + * Get CPU tag trap port * Input: * pPort - port number * Output: @@ -248,9 +248,9 @@ ret_t rtl8367c_getAsicCputagPriorityRemapping(rtk_uint32 srcPri, rtk_uint32 *pNe /* Function Name: * rtl8367c_setAsicCputagPosition * Description: - * Set cpu tag insert position + * Set CPU tag insert position * Input: - * postion - 1: After entire packet(before CRC field), 0: After MAC_SA (Default) + * position - 1: After entire packet(before CRC field), 0: After MAC_SA (Default) * Output: * None * Return: @@ -266,7 +266,7 @@ ret_t rtl8367c_setAsicCputagPosition(rtk_uint32 postion) /* Function Name: * rtl8367c_getAsicCputagPosition * Description: - * Get cpu tag insert position + * Get CPU tag insert position * Input: * pPostion - 1: After entire packet(before CRC field), 0: After MAC_SA (Default) * Output: @@ -285,7 +285,7 @@ ret_t rtl8367c_getAsicCputagPosition(rtk_uint32* pPostion) /* Function Name: * rtl8367c_setAsicCputagMode * Description: - * Set cpu tag mode + * Set CPU tag mode * Input: * mode - 1: 4bytes mode, 0: 8bytes mode * Output: @@ -308,7 +308,7 @@ ret_t rtl8367c_setAsicCputagMode(rtk_uint32 mode) /* Function Name: * rtl8367c_getAsicCputagMode * Description: - * Get cpu tag mode + * Get CPU tag mode * Input: * pMode - 1: 4bytes mode, 0: 8bytes mode * Output: @@ -326,7 +326,7 @@ ret_t rtl8367c_getAsicCputagMode(rtk_uint32 *pMode) /* Function Name: * rtl8367c_setAsicCputagRxMinLength * Description: - * Set cpu tag mode + * Set CPU tag mode * Input: * mode - 1: 64bytes, 0: 72bytes * Output: @@ -349,7 +349,7 @@ ret_t rtl8367c_setAsicCputagRxMinLength(rtk_uint32 mode) /* Function Name: * rtl8367c_getAsicCputagRxMinLength * Description: - * Get cpu tag mode + * Get CPU tag mode * Input: * pMode - 1: 64bytes, 0: 72bytes * Output: diff --git a/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/rtl8367c_asicdrv_eav.c b/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/rtl8367c_asicdrv_eav.c index 370b7c6f3a..811ee47954 100644 --- a/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/rtl8367c_asicdrv_eav.c +++ b/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/rtl8367c_asicdrv_eav.c @@ -100,7 +100,7 @@ ret_t rtl8367c_getAsicEavMacAddress(ether_addr_t *pMac) * Description: * Set PTP parser tag TPID. * Input: - * outerTag - outter tag TPID + * outerTag - outer tag TPID * innerTag - inner tag TPID * Output: * None @@ -128,7 +128,7 @@ ret_t rtl8367c_setAsicEavTpid(rtk_uint32 outerTag, rtk_uint32 innerTag) * Input: * None * Output: - * pOuterTag - outter tag TPID + * pOuterTag - outer tag TPID * pInnerTag - inner tag TPID * Return: * RT_ERR_OK - Success @@ -161,7 +161,7 @@ ret_t rtl8367c_getAsicEavTpid(rtk_uint32* pOuterTag, rtk_uint32* pInnerTag) * RT_ERR_OK - Success * RT_ERR_SMI - SMI access error * Note: - * The time granuality is 8 nano seconds. + * The time granularity is 8 nano seconds. */ ret_t rtl8367c_setAsicEavSysTime(rtk_uint32 second, rtk_uint32 nanoSecond) { @@ -218,7 +218,7 @@ ret_t rtl8367c_setAsicEavSysTime(rtk_uint32 second, rtk_uint32 nanoSecond) * RT_ERR_OK - Success * RT_ERR_SMI - SMI access error * Note: - * The time granuality is 8 nano seconds. + * The time granularity is 8 nano seconds. */ ret_t rtl8367c_getAsicEavSysTime(rtk_uint32* pSecond, rtk_uint32* pNanoSecond) { @@ -265,7 +265,7 @@ ret_t rtl8367c_getAsicEavSysTime(rtk_uint32* pSecond, rtk_uint32* pNanoSecond) * Description: * Set PTP system time adjust * Input: - * type - incresae or decrease + * type - increase or decrease * second - seconds * nanoSecond - nano seconds * Output: @@ -481,7 +481,7 @@ ret_t rtl8367c_getAsicEavInterruptStatus(rtk_uint32* pIms) * RT_ERR_OK - Success * RT_ERR_SMI - SMI access error * Note: - * This API can be used to clear ASIC interrupt status and register will be cleared by writting 1. + * This API can be used to clear ASIC interrupt status and register will be cleared by writing 1. * [0]:TX_SYNC, * [1]:TX_DELAY, * [2]:TX_PDELAY_REQ, @@ -570,7 +570,7 @@ ret_t rtl8367c_getAsicEavPortInterruptStatus(rtk_uint32 port, rtk_uint32* pIms) * RT_ERR_SMI - SMI access error * RT_ERR_PORT_ID - Invalid port number * Note: - * If EAV function is enabled, PTP event messgae packet will be attached PTP timestamp for trapping + * If EAV function is enabled, PTP event message packet will be attached PTP timestamp for trapping */ ret_t rtl8367c_setAsicEavPortEnable(rtk_uint32 port, rtk_uint32 enabled) { @@ -646,7 +646,7 @@ ret_t rtl8367c_getAsicEavPortEnable(rtk_uint32 port, rtk_uint32 *pEnabled) * RT_ERR_OK - Success * RT_ERR_SMI - SMI access error * Note: - * The time granuality is 8 nano seconds. + * The time granularity is 8 nano seconds. */ ret_t rtl8367c_getAsicEavPortTimeStamp(rtk_uint32 port, rtk_uint32 type, rtl8367c_ptp_time_stamp_t* timeStamp) { @@ -796,7 +796,7 @@ ret_t rtl8367c_getAsicEavTrap(rtk_uint32 port, rtk_uint32 *pEnabled) * RT_ERR_SMI - SMI access error * RT_ERR_PORT_ID - Invalid port number * Note: - * If EAV function is enabled, PTP event messgae packet will be attached PTP timestamp for trapping + * If EAV function is enabled, PTP event message packet will be attached PTP timestamp for trapping */ ret_t rtl8367c_setAsicEavEnable(rtk_uint32 port, rtk_uint32 enabled) { diff --git a/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/rtl8367c_asicdrv_fc.c b/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/rtl8367c_asicdrv_fc.c index 28f49b1ba7..b7b1022439 100644 --- a/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/rtl8367c_asicdrv_fc.c +++ b/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/rtl8367c_asicdrv_fc.c @@ -55,7 +55,7 @@ ret_t rtl8367c_getAsicFlowControlSelect(rtk_uint32 *pSelect) /* Function Name: * rtl8367c_setAsicFlowControlJumboMode * Description: - * Set Jumbo threhsold for flow control + * Set Jumbo threshold for flow control * Input: * enabled - Jumbo mode flow control 1: Enable 0:Disable * Output: @@ -73,7 +73,7 @@ ret_t rtl8367c_setAsicFlowControlJumboMode(rtk_uint32 enabled) /* Function Name: * rtl8367c_getAsicFlowControlJumboMode * Description: - * Get Jumbo threhsold for flow control + * Get Jumbo threshold for flow control * Input: * pEnabled - Jumbo mode flow control 1: Enable 0:Disable * Output: diff --git a/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/rtl8367c_asicdrv_green.c b/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/rtl8367c_asicdrv_green.c index a38623850b..3fb5f57b91 100644 --- a/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/rtl8367c_asicdrv_green.c +++ b/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/rtl8367c_asicdrv_green.c @@ -11,7 +11,7 @@ * $Date: 2017-03-08 15:13:58 +0800 (週三, 08 三月 2017) $ * * Purpose : RTL8367C switch high-level API for RTL8367C - * Feature : Green ethernet related functions + * Feature : Green Ethernet related functions * */ #include @@ -22,7 +22,7 @@ * Get per-Port ingress page usage per second * Input: * port - Physical port number (0~7) - * pPage - page number of ingress packet occuping per second + * pPage - page number of ingress packet occurring per second * Output: * None * Return: @@ -30,7 +30,7 @@ * RT_ERR_SMI - SMI access error * RT_ERR_PORT_ID - Invalid port number * Note: - * Ingress traffic occuping page number per second for high layer green feature usage + * Ingress traffic occurring page number per second for high layer green feature usage */ ret_t rtl8367c_getAsicGreenPortPage(rtk_uint32 port, rtk_uint32* pPage) { @@ -134,7 +134,7 @@ ret_t rtl8367c_setAsicGreenHighPriorityTraffic(rtk_uint32 port) * Get indicator which ASIC had received high priority traffic or not * Input: * port - Physical port number (0~7) - * pIndicator - Have received high priority traffic indicator. If 1 means ASCI had received high priority in 1second checking priod + * pIndicator - Have received high priority traffic indicator. If 1 means ASCI had received high priority in 1second checking period * Output: * None * Return: @@ -153,14 +153,14 @@ ret_t rtl8367c_getAsicGreenHighPriorityTraffic(rtk_uint32 port, rtk_uint32* pInd } /* -@func rtk_int32 | rtl8367c_setAsicGreenEthernet | Set green ethernet function. +@func rtk_int32 | rtl8367c_setAsicGreenEthernet | Set green Ethernet function. @parm rtk_uint32 | green | Green feature function usage 1:enable 0:disable. @rvalue RT_ERR_OK | Success. @rvalue RT_ERR_SMI | SMI access error. @comm The API can set Green Ethernet function to reduce power consumption. While green feature is enabled, ASIC will automatic detect the cable length and then select different power mode for best performance with minimums power consumption. Link down - ports will enter power savining mode in 10 seconds after the cable disconnected if power saving function is enabled. + ports will enter power saving mode in 10 seconds after the cable disconnected if power saving function is enabled. */ ret_t rtl8367c_setAsicGreenEthernet(rtk_uint32 port, rtk_uint32 green) { @@ -286,14 +286,14 @@ ret_t rtl8367c_setAsicGreenEthernet(rtk_uint32 port, rtk_uint32 green) } /* -@func rtk_int32 | rtl8367c_getAsicGreenEthernet | Get green ethernet function. +@func rtk_int32 | rtl8367c_getAsicGreenEthernet | Get green Ethernet function. @parm rtk_uint32 | *green | Green feature function usage 1:enable 0:disable. @rvalue RT_ERR_OK | Success. @rvalue RT_ERR_SMI | SMI access error. @comm The API can set Green Ethernet function to reduce power consumption. While green feature is enabled, ASIC will automatic detect the cable length and then select different power mode for best performance with minimums power consumption. Link down - ports will enter power savining mode in 10 seconds after the cable disconnected if power saving function is enabled. + ports will enter power saving mode in 10 seconds after the cable disconnected if power saving function is enabled. */ ret_t rtl8367c_getAsicGreenEthernet(rtk_uint32 port, rtk_uint32* green) { diff --git a/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/rtl8367c_asicdrv_hsb.c b/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/rtl8367c_asicdrv_hsb.c index 435368d51b..1b8ef59d95 100644 --- a/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/rtl8367c_asicdrv_hsb.c +++ b/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/rtl8367c_asicdrv_hsb.c @@ -30,7 +30,7 @@ * RT_ERR_SMI - SMI access error * RT_ERR_OUT_OF_RANGE - input parameter out of range * Note: - * System support 16 user defined field selctors. + * System support 16 user defined field selectors. * Each selector can be enabled or disable. User can defined retrieving 16-bits in many predefiend * standard l2/l3/l4 payload. */ diff --git a/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/rtl8367c_asicdrv_igmp.c b/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/rtl8367c_asicdrv_igmp.c index e0e734d61e..050f4bbc57 100644 --- a/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/rtl8367c_asicdrv_igmp.c +++ b/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/rtl8367c_asicdrv_igmp.c @@ -429,8 +429,8 @@ ret_t rtl8367c_setAsicIGMPRobVar(rtk_uint32 rob_var) if(rob_var > RTL8367C_MAX_ROB_VAR) return RT_ERR_OUT_OF_RANGE; - /* Bourstness variable */ retVal = rtl8367c_setAsicRegBits(RTL8367C_REG_IGMP_MLD_CFG0, RTL8367C_ROBURSTNESS_VAR_MASK, rob_var); + /* Robustness variable */ if(retVal != RT_ERR_OK) return retVal; @@ -456,8 +456,8 @@ ret_t rtl8367c_getAsicIGMPRobVar(rtk_uint32 *prob_var) ret_t retVal; rtk_uint32 value; - /* Bourstness variable */ retVal = rtl8367c_getAsicRegBits(RTL8367C_REG_IGMP_MLD_CFG0, RTL8367C_ROBURSTNESS_VAR_MASK, &value); + /* Robustness variable */ if(retVal != RT_ERR_OK) return retVal; @@ -1813,7 +1813,7 @@ ret_t rtl8367c_getAsicIGMPReportLeaveFlood(rtk_uint32 *pFlood) /* Function Name: * rtl8367c_setAsicIGMPDropLeaveZero * Description: - * Set the function of droppping Leave packet with group IP = 0.0.0.0 + * Set the function of dropping Leave packet with group IP = 0.0.0.0 * Input: * drop - 1: Drop, 0:Bypass * Output: @@ -1838,7 +1838,7 @@ ret_t rtl8367c_setAsicIGMPDropLeaveZero(rtk_uint32 drop) /* Function Name: * rtl8367c_getAsicIGMPDropLeaveZero * Description: - * Get the function of droppping Leave packet with group IP = 0.0.0.0 + * Get the function of dropping Leave packet with group IP = 0.0.0.0 * Input: * None * Output: @@ -1865,7 +1865,7 @@ ret_t rtl8367c_getAsicIGMPDropLeaveZero(rtk_uint32 *pDrop) /* Function Name: * rtl8367c_setAsicIGMPBypassStormCTRL * Description: - * Set the function of bypass strom control for IGMP/MLD packet + * Set the function of bypass storm control for IGMP/MLD packet * Input: * bypass - 1: Bypass, 0:not bypass * Output: @@ -1890,7 +1890,7 @@ ret_t rtl8367c_setAsicIGMPBypassStormCTRL(rtk_uint32 bypass) /* Function Name: * rtl8367c_getAsicIGMPBypassStormCTRL * Description: - * Set the function of bypass strom control for IGMP/MLD packet + * Set the function of bypass storm control for IGMP/MLD packet * Input: * None * Output: @@ -1944,7 +1944,7 @@ ret_t rtl8367c_setAsicIGMPIsoLeaky(rtk_uint32 leaky) * Description: * Get Port Isolation leaky for IGMP/MLD packet * Input: - * Noen + * None * Output: * pLeaky - 1: Leaky, 0:not leaky * Return: @@ -1996,7 +1996,7 @@ ret_t rtl8367c_setAsicIGMPVLANLeaky(rtk_uint32 leaky) * Description: * Get VLAN leaky for IGMP/MLD packet * Input: - * Noen + * None * Output: * pLeaky - 1: Leaky, 0:not leaky * Return: diff --git a/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/rtl8367c_asicdrv_inbwctrl.c b/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/rtl8367c_asicdrv_inbwctrl.c index abb36bec2d..13a7b14246 100644 --- a/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/rtl8367c_asicdrv_inbwctrl.c +++ b/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/rtl8367c_asicdrv_inbwctrl.c @@ -128,7 +128,7 @@ ret_t rtl8367c_getAsicPortIngressBandwidth(rtk_uint32 port, rtk_uint32* pBandwid /* Function Name: * rtl8367c_setAsicPortIngressBandwidthBypass * Description: - * Set ingress bandwidth control bypasss 8899, RMA 01-80-C2-00-00-xx and IGMP + * Set ingress bandwidth control bypass 8899, RMA 01-80-C2-00-00-xx and IGMP * Input: * enabled - 1: enabled, 0: disabled * Output: @@ -146,7 +146,7 @@ ret_t rtl8367c_setAsicPortIngressBandwidthBypass(rtk_uint32 enabled) /* Function Name: * rtl8367c_getAsicPortIngressBandwidthBypass * Description: - * Set ingress bandwidth control bypasss 8899, RMA 01-80-C2-00-00-xx and IGMP + * Set ingress bandwidth control bypass 8899, RMA 01-80-C2-00-00-xx and IGMP * Input: * pEnabled - 1: enabled, 0: disabled * Output: diff --git a/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/rtl8367c_asicdrv_interrupt.c b/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/rtl8367c_asicdrv_interrupt.c index fb6cbcdf1f..1d5ccfc904 100644 --- a/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/rtl8367c_asicdrv_interrupt.c +++ b/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/rtl8367c_asicdrv_interrupt.c @@ -99,10 +99,10 @@ ret_t rtl8367c_getAsicInterruptMask(rtk_uint32* pImr) * RT_ERR_OK - Success * RT_ERR_SMI - SMI access error * Note: - * This API can be used to clear ASIC interrupt status and register will be cleared by writting 1. + * This API can be used to clear ASIC interrupt status and register will be cleared by writing 1. * [0]:Link change, * [1]:Share meter exceed, - * [2]:Learn number overed, + * [2]:Learn number over, * [3]:Speed Change, * [4]:Tx special congestion * [5]:1 second green feature diff --git a/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/rtl8367c_asicdrv_led.c b/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/rtl8367c_asicdrv_led.c index 1189028161..6f2617f5aa 100644 --- a/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/rtl8367c_asicdrv_led.c +++ b/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/rtl8367c_asicdrv_led.c @@ -607,7 +607,7 @@ ret_t rtl8367c_getAsicLedSerialModeConfig(rtk_uint32 *active, rtk_uint32 *serimo /* @func ret_t | rtl8367c_setAsicLedOutputEnable | Set LED output enable -@parm rtk_uint32 | enabled | enable or disalbe. +@parm rtk_uint32 | enabled | enable or disable. @rvalue RT_ERR_OK | Success. @rvalue RT_ERR_SMI | SMI access error. @rvalue RT_ERR_INPUT | Invalid input value. diff --git a/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/rtl8367c_asicdrv_lut.c b/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/rtl8367c_asicdrv_lut.c index 343a6f159c..f9f592ae72 100644 --- a/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/rtl8367c_asicdrv_lut.c +++ b/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/rtl8367c_asicdrv_lut.c @@ -207,7 +207,7 @@ static void _rtl8367c_fdbStSmi2User( rtl8367c_luttb *pLutSt, rtk_uint16 *pFdbSmi /* Function Name: * rtl8367c_setAsicLutIpMulticastLookup * Description: - * Set Lut IP multicast lookup function + * Set LUT IP multicast lookup function * Input: * enabled - 1: enabled, 0: disabled * Output: @@ -225,7 +225,7 @@ ret_t rtl8367c_setAsicLutIpMulticastLookup(rtk_uint32 enabled) /* Function Name: * rtl8367c_getAsicLutIpMulticastLookup * Description: - * Get Lut IP multicast lookup function + * Get LUT IP multicast lookup function * Input: * pEnabled - 1: enabled, 0: disabled * Output: @@ -244,7 +244,7 @@ ret_t rtl8367c_getAsicLutIpMulticastLookup(rtk_uint32* pEnabled) /* Function Name: * rtl8367c_setAsicLutIpMulticastLookup * Description: - * Set Lut IP multicast + VID lookup function + * Set LUT IP multicast + VID lookup function * Input: * enabled - 1: enabled, 0: disabled * Output: @@ -263,7 +263,7 @@ ret_t rtl8367c_setAsicLutIpMulticastVidLookup(rtk_uint32 enabled) /* Function Name: * rtl8367c_getAsicLutIpMulticastVidLookup * Description: - * Get Lut IP multicast lookup function + * Get LUT IP multicast lookup function * Input: * pEnabled - 1: enabled, 0: disabled * Output: @@ -282,7 +282,7 @@ ret_t rtl8367c_getAsicLutIpMulticastVidLookup(rtk_uint32* pEnabled) /* Function Name: * rtl8367c_setAsicLutIpLookupMethod * Description: - * Set Lut IP lookup hash with DIP or {DIP,SIP} pair + * Set LUT IP lookup hash with DIP or {DIP,SIP} pair * Input: * type - 1: When DIP can be found in IPMC_GROUP_TABLE, use DIP+SIP Hash, otherwise, use DIP+(SIP=0.0.0.0) Hash. * 0: When DIP can be found in IPMC_GROUP_TABLE, use DIP+(SIP=0.0.0.0) Hash, otherwise use DIP+SIP Hash. @@ -301,7 +301,7 @@ ret_t rtl8367c_setAsicLutIpLookupMethod(rtk_uint32 type) /* Function Name: * rtl8367c_getAsicLutIpLookupMethod * Description: - * Get Lut IP lookup hash with DIP or {DIP,SIP} pair + * Get LUT IP lookup hash with DIP or {DIP,SIP} pair * Input: * pType - 1: When DIP can be found in IPMC_GROUP_TABLE, use DIP+SIP Hash, otherwise, use DIP+(SIP=0.0.0.0) Hash. * 0: When DIP can be found in IPMC_GROUP_TABLE, use DIP+(SIP=0.0.0.0) Hash, otherwise use DIP+SIP Hash. @@ -320,10 +320,10 @@ ret_t rtl8367c_getAsicLutIpLookupMethod(rtk_uint32* pType) /* Function Name: * rtl8367c_setAsicLutAgeTimerSpeed * Description: - * Set LUT agging out speed + * Set LUT ageing out speed * Input: - * timer - Agging out timer 0:Has been aged out - * speed - Agging out speed 0-fastest 3-slowest + * timer - Ageing out timer 0:Has been aged out + * speed - Ageing out speed 0-fastest 3-slowest * Output: * None * Return: @@ -346,10 +346,10 @@ ret_t rtl8367c_setAsicLutAgeTimerSpeed(rtk_uint32 timer, rtk_uint32 speed) /* Function Name: * rtl8367c_getAsicLutAgeTimerSpeed * Description: - * Get LUT agging out speed + * Get LUT ageing out speed * Input: - * pTimer - Agging out timer 0:Has been aged out - * pSpeed - Agging out speed 0-fastest 3-slowest + * pTimer - Ageing out timer 0:Has been aged out + * pSpeed - Ageing out speed 0-fastest 3-slowest * Output: * None * Return: @@ -378,7 +378,7 @@ ret_t rtl8367c_getAsicLutAgeTimerSpeed(rtk_uint32* pTimer, rtk_uint32* pSpeed) /* Function Name: * rtl8367c_setAsicLutCamTbUsage * Description: - * Configure Lut CAM table usage + * Configure LUT CAM table usage * Input: * enabled - L2 CAM table usage 1: enabled, 0: disabled * Output: @@ -400,7 +400,7 @@ ret_t rtl8367c_setAsicLutCamTbUsage(rtk_uint32 enabled) /* Function Name: * rtl8367c_getAsicLutCamTbUsage * Description: - * Get Lut CAM table usage + * Get LUT CAM table usage * Input: * pEnabled - L2 CAM table usage 1: enabled, 0: disabled * Output: @@ -1142,7 +1142,7 @@ ret_t rtl8367c_getAsicLutFlushMode(rtk_uint32* pMode) * Description: * Get L2 LUT flush type * Input: - * type - 0: dynamice unicast; 1: both dynamic and static unicast entry + * type - 0: dynamic unicast; 1: both dynamic and static unicast entry * Output: * None * Return: @@ -1160,7 +1160,7 @@ ret_t rtl8367c_setAsicLutFlushType(rtk_uint32 type) * Description: * Set L2 LUT flush type * Input: - * pType - 0: dynamice unicast; 1: both dynamic and static unicast entry + * pType - 0: dynamic unicast; 1: both dynamic and static unicast entry * Output: * None * Return: @@ -1504,9 +1504,9 @@ ret_t rtl8367c_getAsicLutLinkDownForceAging(rtk_uint32 *pEnable) /* Function Name: * rtl8367c_setAsicLutIpmcFwdRouterPort * Description: - * Set IPMC packet forward to rounter port also or not + * Set IPMC packet forward to router port also or not * Input: - * enable - 1: Inlcude router port, 0, exclude router port + * enable - 1: Include router port, 0, exclude router port * Output: * None * Return: @@ -1527,11 +1527,11 @@ ret_t rtl8367c_setAsicLutIpmcFwdRouterPort(rtk_uint32 enable) /* Function Name: * rtl8367c_getAsicLutIpmcFwdRouterPort * Description: - * Get IPMC packet forward to rounter port also or not + * Get IPMC packet forward to router port also or not * Input: * None * Output: - * pEnable - 1: Inlcude router port, 0, exclude router port + * pEnable - 1: Include router port, 0, exclude router port * Return: * RT_ERR_OK - Success * RT_ERR_SMI - SMI access error diff --git a/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/rtl8367c_asicdrv_mib.c b/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/rtl8367c_asicdrv_mib.c index c9aaa01d3e..7da098c49f 100644 --- a/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/rtl8367c_asicdrv_mib.c +++ b/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/rtl8367c_asicdrv_mib.c @@ -22,7 +22,7 @@ * Reset global/queue manage or per-port MIB counter * Input: * greset - Global reset - * qmreset - Queue maganement reset + * qmreset - Queue management reset * portmask - Port reset mask * Output: * None @@ -59,7 +59,7 @@ ret_t rtl8367c_setAsicMIBsCounterReset(rtk_uint32 greset, rtk_uint32 qmreset, rt * Input: * port - Physical port number (0~7) * mibIdx - MIB counter index - * pCounter - MIB retrived counter + * pCounter - MIB retrieved counter * Output: * None * Return: @@ -69,9 +69,9 @@ ret_t rtl8367c_setAsicMIBsCounterReset(rtk_uint32 greset, rtk_uint32 qmreset, rt * RT_ERR_BUSYWAIT_TIMEOUT - MIB is busy at retrieving * RT_ERR_STAT_CNTR_FAIL - MIB is resetting * Note: - * Before MIBs counter retrieving, writting accessing address to ASIC at first and check the MIB + * Before MIBs counter retrieving, writing accessing address to ASIC at first and check the MIB * control register status. If busy bit of MIB control is set, that means MIB counter have been - * waiting for preparing, then software must wait atfer this busy flag reset by ASIC. This driver + * waiting for preparing, then software must wait after this busy flag reset by ASIC. This driver * did not recycle reading user desired counter. Software must use driver again to get MIB counter * if return value is not RT_ERR_OK. */ @@ -124,7 +124,7 @@ ret_t rtl8367c_getAsicMIBsCounter(rtk_uint32 port, RTL8367C_MIBCOUNTER mibIdx, r /*writing access counter address first*/ /*This address is SRAM address, and SRAM address = MIB register address >> 2*/ - /*then ASIC will prepare 64bits counter wait for being retrived*/ + /*then ASIC will prepare 64bits counter wait for being retrieved*/ /*Write Mib related address to access control register*/ retVal = rtl8367c_setAsicReg(RTL8367C_REG_MIB_ADDRESS, (mibAddr >> 2)); if(retVal != RT_ERR_OK) @@ -183,7 +183,7 @@ ret_t rtl8367c_getAsicMIBsCounter(rtk_uint32 port, RTL8367C_MIBCOUNTER mibIdx, r /* Function Name: * rtl8367c_getAsicMIBsLogCounter * Description: - * Get MIBs Loggin counter + * Get MIBs Logging counter * Input: * index - The index of 32 logging counter (0 ~ 31) * Output: @@ -260,7 +260,7 @@ ret_t rtl8367c_getAsicMIBsLogCounter(rtk_uint32 index, rtk_uint32 *pCounter) * RT_ERR_OK - Success * RT_ERR_SMI - SMI access error * Note: - * Software need to check this control register atfer doing port resetting or global resetting + * Software need to check this control register after doing port resetting or global resetting */ ret_t rtl8367c_getAsicMIBsControl(rtk_uint32* pMask) { @@ -513,7 +513,7 @@ ret_t rtl8367c_setAsicMIBsResetLoggingCounter(rtk_uint32 index) /* Function Name: * rtl8367c_setAsicMIBsLength * Description: - * Set MIB length couting mode + * Set MIB length counting mode * Input: * txLengthMode - 0: tag length doesn't be counted. 1: tag length is counted. * rxLengthMode - 0: tag length doesn't be counted. 1: tag length is counted. @@ -542,7 +542,7 @@ ret_t rtl8367c_setAsicMIBsLength(rtk_uint32 txLengthMode, rtk_uint32 rxLengthMod /* Function Name: * rtl8367c_setAsicMIBsLength * Description: - * Set MIB length couting mode + * Set MIB length counting mode * Input: * None. * Output: diff --git a/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/rtl8367c_asicdrv_qos.c b/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/rtl8367c_asicdrv_qos.c index 89c3c3e02e..69081049e3 100644 --- a/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/rtl8367c_asicdrv_qos.c +++ b/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/rtl8367c_asicdrv_qos.c @@ -11,7 +11,7 @@ * $Date: 2017-03-08 15:13:58 +0800 (週三, 08 三月 2017) $ * * Purpose : RTL8367C switch high-level API for RTL8367C - * Feature : Qos related functions + * Feature : QoS related functions * */ diff --git a/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/rtl8367c_asicdrv_scheduling.c b/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/rtl8367c_asicdrv_scheduling.c index 8ebd6796dc..32d9b20840 100644 --- a/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/rtl8367c_asicdrv_scheduling.c +++ b/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/rtl8367c_asicdrv_scheduling.c @@ -19,7 +19,7 @@ /* Function Name: * rtl8367c_setAsicLeakyBucketParameter * Description: - * Set Leaky Bucket Paramters + * Set Leaky Bucket Parameters * Input: * tick - Tick is used for time slot size unit * token - Token is used for adding budget in each time slot @@ -55,7 +55,7 @@ ret_t rtl8367c_setAsicLeakyBucketParameter(rtk_uint32 tick, rtk_uint32 token) /* Function Name: * rtl8367c_getAsicLeakyBucketParameter * Description: - * Get Leaky Bucket Paramters + * Get Leaky Bucket Parameters * Input: * tick - Tick is used for time slot size unit * token - Token is used for adding budget in each time slot @@ -166,7 +166,7 @@ ret_t rtl8367c_getAsicAprMeter(rtk_uint32 port, rtk_uint32 qid, rtk_uint32 *apri * Set per-port APR enable * Input: * port - Physical port number (0~7) - * aprEnable - APR enable seting 1:enable 0:disable + * aprEnable - APR enable setting 1:enable 0:disable * Output: * None * Return: @@ -193,7 +193,7 @@ ret_t rtl8367c_setAsicAprEnable(rtk_uint32 port, rtk_uint32 aprEnable) * Get per-port APR enable * Input: * port - Physical port number (0~7) - * aprEnable - APR enable seting 1:enable 0:disable + * aprEnable - APR enable setting 1:enable 0:disable * Output: * None * Return: diff --git a/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/rtl8367c_asicdrv_svlan.c b/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/rtl8367c_asicdrv_svlan.c index f19ceba5a9..e199664b5e 100644 --- a/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/rtl8367c_asicdrv_svlan.c +++ b/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/rtl8367c_asicdrv_svlan.c @@ -140,7 +140,7 @@ ret_t rtl8367c_getAsicSvlanUplinkPortMask(rtk_uint32* pPortmask) * RT_ERR_SMI - SMI access error * Note: * Ether type of S-tag in 802.1ad is 0x88a8 and there are existed ether type 0x9100 and 0x9200 - * for Q-in-Q SLAN design. User can set mathced ether type as service provider supported protocol + * for Q-in-Q SLAN design. User can set matched ether type as service provider supported protocol */ ret_t rtl8367c_setAsicSvlanTpid(rtk_uint32 protocolType) { @@ -344,7 +344,7 @@ ret_t rtl8367c_getAsicSvlanDefaultVlan(rtk_uint32 port, rtk_uint32* pIndex) /* Function Name: * rtl8367c_setAsicSvlanIngressUntag * Description: - * Set action received un-Stag frame from unplink port + * Set action received un-Stag frame from uplink port * Input: * mode - 0:Drop 1:Trap 2:Assign SVLAN * Output: @@ -362,7 +362,7 @@ ret_t rtl8367c_setAsicSvlanIngressUntag(rtk_uint32 mode) /* Function Name: * rtl8367c_getAsicSvlanIngressUntag * Description: - * Get action received un-Stag frame from unplink port + * Get action received un-Stag frame from uplink port * Input: * pMode - 0:Drop 1:Trap 2:Assign SVLAN * Output: @@ -380,7 +380,7 @@ ret_t rtl8367c_getAsicSvlanIngressUntag(rtk_uint32* pMode) /* Function Name: * rtl8367c_setAsicSvlanIngressUnmatch * Description: - * Set action received unmatched Stag frame from unplink port + * Set action received unmatched Stag frame from uplink port * Input: * mode - 0:Drop 1:Trap 2:Assign SVLAN * Output: @@ -398,7 +398,7 @@ ret_t rtl8367c_setAsicSvlanIngressUnmatch(rtk_uint32 mode) /* Function Name: * rtl8367c_getAsicSvlanIngressUnmatch * Description: - * Get action received unmatched Stag frame from unplink port + * Get action received unmatched Stag frame from uplink port * Input: * pMode - 0:Drop 1:Trap 2:Assign SVLAN * Output: @@ -417,7 +417,7 @@ ret_t rtl8367c_getAsicSvlanIngressUnmatch(rtk_uint32* pMode) /* Function Name: * rtl8367c_setAsicSvlanEgressUnassign * Description: - * Set unplink stream without egress SVID action + * Set uplink stream without egress SVID action * Input: * enabled - 1:Trap egress unassigned frames to CPU, 0: Use SVLAN setup in VS_CPSVIDX as egress SVID * Output: @@ -435,7 +435,7 @@ ret_t rtl8367c_setAsicSvlanEgressUnassign(rtk_uint32 enabled) /* Function Name: * rtl8367c_getAsicSvlanEgressUnassign * Description: - * Get unplink stream without egress SVID action + * Get uplink stream without egress SVID action * Input: * pEnabled - 1:Trap egress unassigned frames to CPU, 0: Use SVLAN setup in VS_CPSVIDX as egress SVID * Output: @@ -580,7 +580,7 @@ ret_t rtl8367c_getAsicSvlanMemberConfiguration(rtk_uint32 index,rtl8367c_svlan_m * RT_ERR_SMI - SMI access error * RT_ERR_ENTRY_INDEX - Invalid entry index * Note: - * ASIC will check upstream's VID and assign related SVID to mathed packet + * ASIC will check upstream's VID and assign related SVID to matched packet */ ret_t rtl8367c_setAsicSvlanC2SConf(rtk_uint32 index, rtk_uint32 evid, rtk_uint32 portmask, rtk_uint32 svidx) { diff --git a/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/rtl8367c_asicdrv_unknownMulticast.c b/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/rtl8367c_asicdrv_unknownMulticast.c index fcebd1b7f7..a3455bbebd 100644 --- a/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/rtl8367c_asicdrv_unknownMulticast.c +++ b/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/rtl8367c_asicdrv_unknownMulticast.c @@ -11,7 +11,7 @@ * $Date: 2017-03-08 15:13:58 +0800 (週三, 08 三月 2017) $ * * Purpose : RTL8367C switch high-level API for RTL8367C - * Feature : Unkown multicast related functions + * Feature : Unknown multicast related functions * */ diff --git a/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/smi.c b/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/smi.c index c272cad48e..70e767f422 100644 --- a/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/smi.c +++ b/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/smi.c @@ -421,7 +421,7 @@ rtk_int32 smi_write(rtk_uint32 mAddrs, rtk_uint32 rData) con = 0; do { con++; - _smi_readBit(1, &ACK); /* ACK for writting data [7:0] */ + _smi_readBit(1, &ACK); /* ACK for writing data [7:0] */ } while ((ACK != 0) && (con < ack_timer)); if (ACK != 0) ret = RT_ERR_FAILED; @@ -430,7 +430,7 @@ rtk_int32 smi_write(rtk_uint32 mAddrs, rtk_uint32 rData) con = 0; do { con++; - _smi_readBit(1, &ACK); /* ACK for writting data [15:8] */ + _smi_readBit(1, &ACK); /* ACK for writing data [15:8] */ } while ((ACK != 0) && (con < ack_timer)); if (ACK != 0) ret = RT_ERR_FAILED; diff --git a/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/stat.c b/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/stat.c index 2fed6d9fc8..3fd028a296 100644 --- a/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/stat.c +++ b/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/stat.c @@ -265,7 +265,7 @@ static rtk_api_ret_t _get_asic_mib_idx(rtk_stat_port_type_t cnt_idx, RTL8367C_MI * port - port id. * cntr_idx - port counter index. * Output: - * pCntr - MIB retrived counter. + * pCntr - MIB retrieved counter. * Return: * RT_ERR_OK - OK * RT_ERR_FAILED - Failed @@ -592,7 +592,7 @@ rtk_api_ret_t rtk_stat_lengthMode_set(rtk_stat_lengthMode_t txMode, rtk_stat_len /* Function Name: * rtk_stat_lengthMode_get * Description: - * Get Legnth mode. + * Get Length mode. * Input: * None. * Output: diff --git a/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/storm.c b/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/storm.c index 13cf4e3cb4..68063cdfa7 100644 --- a/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/storm.c +++ b/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/storm.c @@ -279,7 +279,7 @@ rtk_api_ret_t rtk_rate_stormControlPortEnable_get(rtk_port_t port, rtk_rate_stor * RT_ERR_ENABLE - Invalid IFG parameter * Note: * - * This API can set per-port bypass stomr filter control frame type including RMA and igmp. + * This API can set per-port bypass storm filter control frame type including RMA and IGMP. * The bypass frame type is as following: * - BYPASS_BRG_GROUP, * - BYPASS_FD_PAUSE, @@ -414,7 +414,7 @@ rtk_api_ret_t rtk_storm_bypass_set(rtk_storm_bypass_t type, rtk_enable_t enable) * RT_ERR_SMI - SMI access error * RT_ERR_INPUT - Invalid input parameters. * Note: - * This API can get per-port bypass stomr filter control frame type including RMA and igmp. + * This API can get per-port bypass storm filter control frame type including RMA and IGMP. * The bypass frame type is as following: * - BYPASS_BRG_GROUP, * - BYPASS_FD_PAUSE, @@ -526,7 +526,7 @@ rtk_api_ret_t rtk_storm_bypass_get(rtk_storm_bypass_t type, rtk_enable_t *pEnabl /* Function Name: * rtk_rate_stormControlExtPortmask_set * Description: - * Set externsion storm control port mask + * Set extension storm control port mask * Input: * pPortmask - port mask * Output: @@ -562,7 +562,7 @@ rtk_api_ret_t rtk_rate_stormControlExtPortmask_set(rtk_portmask_t *pPortmask) /* Function Name: * rtk_rate_stormControlExtPortmask_get * Description: - * Set externsion storm control port mask + * Set extension storm control port mask * Input: * None * Output: @@ -598,10 +598,10 @@ rtk_api_ret_t rtk_rate_stormControlExtPortmask_get(rtk_portmask_t *pPortmask) /* Function Name: * rtk_rate_stormControlExtEnable_set * Description: - * Set externsion storm control state + * Set extension storm control state * Input: * stormType - storm group type - * enable - externsion storm control state + * enable - extension storm control state * Output: * None * Return: @@ -653,11 +653,11 @@ rtk_api_ret_t rtk_rate_stormControlExtEnable_set(rtk_rate_storm_group_t stormTyp /* Function Name: * rtk_rate_stormControlExtEnable_get * Description: - * Get externsion storm control state + * Get extension storm control state * Input: * stormType - storm group type * Output: - * pEnable - externsion storm control state + * pEnable - extension storm control state * Return: * RT_ERR_OK * RT_ERR_FAILED @@ -707,10 +707,10 @@ rtk_api_ret_t rtk_rate_stormControlExtEnable_get(rtk_rate_storm_group_t stormTyp /* Function Name: * rtk_rate_stormControlExtMeterIdx_set * Description: - * Set externsion storm control meter index + * Set extension storm control meter index * Input: * stormType - storm group type - * index - externsion storm control state + * index - extension storm control state * Output: * None * Return: @@ -762,10 +762,10 @@ rtk_api_ret_t rtk_rate_stormControlExtMeterIdx_set(rtk_rate_storm_group_t stormT /* Function Name: * rtk_rate_stormControlExtMeterIdx_get * Description: - * Get externsion storm control meter index + * Get extension storm control meter index * Input: * stormType - storm group type - * pIndex - externsion storm control state + * pIndex - extension storm control state * Output: * None * Return: diff --git a/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/svlan.c b/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/svlan.c index bf4ef044d1..067291526a 100644 --- a/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/svlan.c +++ b/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/svlan.c @@ -41,7 +41,7 @@ rtk_svlan_lookupType_t svlan_lookupType; * RT_ERR_SMI - SMI access error * Note: * Ether type of S-tag in 802.1ad is 0x88a8 and there are existed ether type 0x9100 and 0x9200 for Q-in-Q SLAN design. - * User can set mathced ether type as service provider supported protocol. + * User can set matched ether type as service provider supported protocol. */ rtk_api_ret_t rtk_svlan_init(void) { @@ -250,7 +250,7 @@ rtk_api_ret_t rtk_svlan_servicePort_del(rtk_port_t port) * RT_ERR_INPUT - Invalid input parameter. * Note: * Ether type of S-tag in 802.1ad is 0x88a8 and there are existed ether type 0x9100 and 0x9200 for Q-in-Q SLAN design. - * User can set mathced ether type as service provider supported protocol. + * User can set matched ether type as service provider supported protocol. */ rtk_api_ret_t rtk_svlan_tpidEntry_set(rtk_svlan_tpid_t svlan_tag_id) { @@ -391,8 +391,8 @@ rtk_api_ret_t rtk_svlan_priorityRef_get(rtk_svlan_pri_ref_t *pRef) * RT_ERR_PORT_MASK - Invalid portmask. * RT_ERR_SVLAN_TABLE_FULL - SVLAN configuration is full. * Note: - * The API can set system 64 accepted s-tag frame format. Only 64 SVID S-tag frame will be accpeted - * to receiving from uplink ports. Other SVID S-tag frame or S-untagged frame will be droped by default setup. + * The API can set system 64 accepted s-tag frame format. Only 64 SVID S-tag frame will be accepted + * to receiving from uplink ports. Other SVID S-tag frame or S-untagged frame will be dropped by default setup. * - rtk_svlan_memberCfg_t->svid is SVID of SVLAN member configuration. * - rtk_svlan_memberCfg_t->memberport is member port mask of SVLAN member configuration. * - rtk_svlan_memberCfg_t->fid is filtering database of SVLAN member configuration. @@ -626,8 +626,8 @@ rtk_api_ret_t rtk_svlan_memberPortEntry_set(rtk_vlan_t svid, rtk_svlan_memberCfg * RT_ERR_SVLAN_ENTRY_NOT_FOUND - specified svlan entry not found. * RT_ERR_INPUT - Invalid input parameters. * Note: - * The API can get system 64 accepted s-tag frame format. Only 64 SVID S-tag frame will be accpeted - * to receiving from uplink ports. Other SVID S-tag frame or S-untagged frame will be droped. + * The API can get system 64 accepted s-tag frame format. Only 64 SVID S-tag frame will be accepted + * to receiving from uplink ports. Other SVID S-tag frame or S-untagged frame will be dropped. */ rtk_api_ret_t rtk_svlan_memberPortEntry_get(rtk_vlan_t svid, rtk_svlan_memberCfg_t *pSvlan_cfg) { @@ -794,8 +794,8 @@ rtk_api_ret_t rtk_svlan_memberPortEntry_adv_set(rtk_uint32 idx, rtk_svlan_member * RT_ERR_SVLAN_ENTRY_NOT_FOUND - specified svlan entry not found. * RT_ERR_INPUT - Invalid input parameters. * Note: - * The API can get system 64 accepted s-tag frame format. Only 64 SVID S-tag frame will be accpeted - * to receiving from uplink ports. Other SVID S-tag frame or S-untagged frame will be droped. + * The API can get system 64 accepted s-tag frame format. Only 64 SVID S-tag frame will be accepted + * to receiving from uplink ports. Other SVID S-tag frame or S-untagged frame will be dropped. */ rtk_api_ret_t rtk_svlan_memberPortEntry_adv_get(rtk_uint32 idx, rtk_svlan_memberCfg_t *pSvlan_cfg) { @@ -948,7 +948,7 @@ rtk_api_ret_t rtk_svlan_defaultSvlan_get(rtk_port_t port, rtk_vlan_t *pSvid) * RT_ERR_INPUT - Invalid input parameters. * Note: * The API can set system C2S configuration. ASIC will check upstream's VID and assign related - * SVID to mathed packet. There are 128 SVLAN C2S configurations. + * SVID to matched packet. There are 128 SVLAN C2S configurations. */ rtk_api_ret_t rtk_svlan_c2s_add(rtk_vlan_t vid, rtk_port_t src_port, rtk_vlan_t svid) { @@ -1011,7 +1011,7 @@ rtk_api_ret_t rtk_svlan_c2s_add(rtk_vlan_t vid, rtk_port_t src_port, rtk_vlan_t } else { - /* New svidx, remove src_port and find a new slot to add a new enrty */ + /* New svidx, remove src_port and find a new slot to add a new entry */ pmsk = pmsk & ~(1 << phyPort); if(pmsk == 0) c2s_svidx = 0; @@ -1263,7 +1263,7 @@ rtk_api_ret_t rtk_svlan_untag_action_set(rtk_svlan_untag_action_t action, rtk_vl * Note: * The API can Get action of downstream Un-Stag packet. A SVID assigned * to the un-stag is also retrieved by this API. The parameter pSvid is - * only refernced when the action is UNTAG_ASSIGN + * only referenced when the action is UNTAG_ASSIGN */ rtk_api_ret_t rtk_svlan_untag_action_get(rtk_svlan_untag_action_t *pAction, rtk_vlan_t *pSvid) { @@ -1313,8 +1313,8 @@ rtk_api_ret_t rtk_svlan_untag_action_get(rtk_svlan_untag_action_t *pAction, rtk_ * RT_ERR_INPUT - Invalid input parameters. * Note: * The API can configure action of downstream Un-match packet. A SVID assigned - * to the un-match is also supported by this API. The parameter od svid is - * only refernced when the action is set to UNMATCH_ASSIGN + * to the un-match is also supported by this API. The parameter of svid is + * only referenced when the action is set to UNMATCH_ASSIGN */ rtk_api_ret_t rtk_svlan_unmatch_action_set(rtk_svlan_unmatch_action_t action, rtk_vlan_t svid) { @@ -1379,7 +1379,7 @@ rtk_api_ret_t rtk_svlan_unmatch_action_set(rtk_svlan_unmatch_action_t action, rt * Note: * The API can Get action of downstream Un-match packet. A SVID assigned * to the un-match is also retrieved by this API. The parameter pSvid is - * only refernced when the action is UNMATCH_ASSIGN + * only referenced when the action is UNMATCH_ASSIGN */ rtk_api_ret_t rtk_svlan_unmatch_action_get(rtk_svlan_unmatch_action_t *pAction, rtk_vlan_t *pSvid) { @@ -1567,7 +1567,7 @@ rtk_api_ret_t rtk_svlan_dmac_vidsel_get(rtk_port_t port, rtk_enable_t *pEnable) * RT_ERR_OUT_OF_RANGE - input out of range. * RT_ERR_INPUT - Invalid input parameters. * Note: - * The API can set IP mutlicast to SVID configuration. If upstream packet is IPv4 multicast + * The API can set IP multicast to SVID configuration. If upstream packet is IPv4 multicast * packet and DIP is matched MC2S configuration, ASIC will assign egress SVID to the packet. * There are 32 SVLAN multicast configurations for IP and L2 multicast. */ @@ -1662,7 +1662,7 @@ rtk_api_ret_t rtk_svlan_ipmc2s_add(ipaddr_t ipmc, ipaddr_t ipmcMsk,rtk_vlan_t sv * RT_ERR_SVLAN_VID - Invalid SVLAN VID parameter. * RT_ERR_OUT_OF_RANGE - input out of range. * Note: - * The API can delete IP mutlicast to SVID configuration. There are 32 SVLAN multicast configurations for IP and L2 multicast. + * The API can delete IP multicast to SVID configuration. There are 32 SVLAN multicast configurations for IP and L2 multicast. */ rtk_api_ret_t rtk_svlan_ipmc2s_del(ipaddr_t ipmc, ipaddr_t ipmcMsk) { @@ -1714,7 +1714,7 @@ rtk_api_ret_t rtk_svlan_ipmc2s_del(ipaddr_t ipmc, ipaddr_t ipmcMsk) * RT_ERR_INPUT - Invalid input parameters. * RT_ERR_OUT_OF_RANGE - input out of range. * Note: - * The API can get IP mutlicast to SVID configuration. There are 32 SVLAN multicast configurations for IP and L2 multicast. + * The API can get IP multicast to SVID configuration. There are 32 SVLAN multicast configurations for IP and L2 multicast. */ rtk_api_ret_t rtk_svlan_ipmc2s_get(ipaddr_t ipmc, ipaddr_t ipmcMsk, rtk_vlan_t *pSvid) { @@ -1771,7 +1771,7 @@ rtk_api_ret_t rtk_svlan_ipmc2s_get(ipaddr_t ipmc, ipaddr_t ipmcMsk, rtk_vlan_t * * RT_ERR_OUT_OF_RANGE - input out of range. * RT_ERR_INPUT - Invalid input parameters. * Note: - * The API can set L2 Mutlicast to SVID configuration. If upstream packet is L2 multicast + * The API can set L2 Multicast to SVID configuration. If upstream packet is L2 multicast * packet and DMAC is matched, ASIC will assign egress SVID to the packet. There are 32 * SVLAN multicast configurations for IP and L2 multicast. */ @@ -1868,7 +1868,7 @@ rtk_api_ret_t rtk_svlan_l2mc2s_add(rtk_mac_t mac, rtk_mac_t macMsk, rtk_vlan_t s * RT_ERR_SVLAN_VID - Invalid SVLAN VID parameter. * RT_ERR_OUT_OF_RANGE - input out of range. * Note: - * The API can delete Mutlicast to SVID configuration. There are 32 SVLAN multicast configurations for IP and L2 multicast. + * The API can delete Multicast to SVID configuration. There are 32 SVLAN multicast configurations for IP and L2 multicast. */ rtk_api_ret_t rtk_svlan_l2mc2s_del(rtk_mac_t mac, rtk_mac_t macMsk) { @@ -1924,7 +1924,7 @@ rtk_api_ret_t rtk_svlan_l2mc2s_del(rtk_mac_t mac, rtk_mac_t macMsk) * RT_ERR_INPUT - Invalid input parameters. * RT_ERR_OUT_OF_RANGE - input out of range. * Note: - * The API can get L2 mutlicast to SVID configuration. There are 32 SVLAN multicast configurations for IP and L2 multicast. + * The API can get L2 multicast to SVID configuration. There are 32 SVLAN multicast configurations for IP and L2 multicast. */ rtk_api_ret_t rtk_svlan_l2mc2s_get(rtk_mac_t mac, rtk_mac_t macMsk, rtk_vlan_t *pSvid) { diff --git a/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/vlan.c b/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/vlan.c index 031eabf2ef..b407c3008c 100644 --- a/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/vlan.c +++ b/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/vlan.c @@ -106,7 +106,7 @@ rtk_api_ret_t rtk_vlan_init(void) return retVal; } - /* Updata Databse */ + /* Update Database */ vlan_mbrCfgUsage[0] = MBRCFG_USED_BY_VLAN; vlan_mbrCfgVid[0] = 1; @@ -1576,7 +1576,7 @@ rtk_api_ret_t rtk_vlan_stg_get(rtk_vlan_t vid, rtk_stp_msti_id_t *pStg) * Set port-based filtering database * Input: * port - Port id. - * enable - ebable port-based FID + * enable - enable port-based FID * fid - Specified filtering database. * Output: * None @@ -1624,7 +1624,7 @@ rtk_api_ret_t rtk_vlan_portFid_set(rtk_port_t port, rtk_enable_t enable, rtk_fid * Input: * port - Port id. * Output: - * pEnable - ebable port-based FID + * pEnable - enable port-based FID * pFid - Specified filtering database. * Return: * RT_ERR_OK - OK diff --git a/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367s_mdio.c b/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367s_mdio.c index 08d2b57d43..b4d4554d4f 100644 --- a/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367s_mdio.c +++ b/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367s_mdio.c @@ -211,7 +211,7 @@ void init_gsw(void) set_rtl8367s_rgmii(); } -// bleow are platform driver +// below are platform driver static const struct of_device_id rtk_gsw_match[] = { { .compatible = "mediatek,rtk-gsw" }, {}, @@ -258,7 +258,7 @@ static int rtk_gsw_probe(struct platform_device *pdev) init_gsw(); - //init default vlan or init swocnfig + //init default vlan or init swconfig if(!of_property_read_string(pdev->dev.of_node, "mediatek,port_map", &pm)) { From afad4e8ab68093544d9e5f2d09104251bf6c7686 Mon Sep 17 00:00:00 2001 From: Paul Donald Date: Wed, 3 Apr 2024 17:23:16 +0200 Subject: [PATCH 07/21] mediatek: mt7622: rtl8367c: source comment fixes Fix also some Chinese -> UTF8 encoding problems Improves indexing and searches Signed-off-by: Paul Donald --- .../drivers/net/phy/rtk/rtl8367c/rtl8367c_asicdrv_port.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/rtl8367c_asicdrv_port.c b/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/rtl8367c_asicdrv_port.c index 78e80a0b20..fae046639d 100644 --- a/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/rtl8367c_asicdrv_port.c +++ b/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/rtl8367c_asicdrv_port.c @@ -951,7 +951,7 @@ rtk_uint8 Sgmii_Init[SGMII_INIT_SIZE] = { * Set UNDA behavior * Input: * port - port ID - * behavior - 0: flooding to unknwon DA portmask; 1: drop; 2:trap; 3: flooding + * behavior - 0: flooding to unknown DA portmask; 1: drop; 2:trap; 3: flooding * Output: * None * Return: @@ -981,7 +981,7 @@ ret_t rtl8367c_setAsicPortUnknownDaBehavior(rtk_uint32 port, rtk_uint32 behavior * Input: * port - port ID * Output: - * pBehavior - 0: flooding to unknwon DA portmask; 1: drop; 2:trap; 3: flooding + * pBehavior - 0: flooding to unknown DA portmask; 1: drop; 2:trap; 3: flooding * Return: * RT_ERR_OK - Success * RT_ERR_SMI - SMI access error @@ -3724,7 +3724,7 @@ ret_t rtl8367c_setAsicPortExtMode(rtk_uint32 id, rtk_uint32 mode) return retVal; /* 1: MAC link = SGMII SerDes link - 0: MAC link = SGMII config link cfg_sgmii_link + 0: MAC link = SGMII config link (cfg_sgmii_link) */ if ((retVal = rtl8367c_setAsicRegBit(0x1d95, 2, 0)) != RT_ERR_OK) return retVal; @@ -4032,7 +4032,7 @@ ret_t rtl8367c_setAsicPortExtMode(rtk_uint32 id, rtk_uint32 mode) if ((retVal = rtl8367c_setAsicRegBits(0x1d95, 0x1f00, 0x2)) != RT_ERR_OK) return retVal; - /*select MAC link source when port6/7 be set sgmii mode cfg_sgmii_link*/ + /*select MAC link source when port6/7 be set sgmii mode (cfg_sgmii_link)*/ if ((retVal = rtl8367c_setAsicRegBit(0x1d95, 2, 0)) != RT_ERR_OK) return retVal; } From 90488d274ec9ebcc461385cc1d40aa60a4059656 Mon Sep 17 00:00:00 2001 From: Paul Donald Date: Wed, 3 Apr 2024 17:55:15 +0200 Subject: [PATCH 08/21] mediatek: mt7622: rtl8367c: source comment fixes MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fix also some Chinese GB18030 -> UTF-8 encoding problems (translated the Chinese strings to English): 修改 -> modification port8~port10的设置在另外一个register -> port8~port10 setup is done in a separate register You are in the correct (UTF-8) encoding when you see: * $Date: 2017-03-08 15:13:58 +0800 (週三, 08 三月 2017) $ e.g. week 3, 08 third month, 2017 But not if you see: * $Date: 2017-03-08 15:13:58 +0800 (閫变笁, 08 涓夋湀 2017) $ rtl8367c/rtl8367c_asicdrv_lut.c should be read as UTF-8, despite having some earlier Chinese text lost to GB18030 encoding. Improves indexing and searches Signed-off-by: Paul Donald --- .../phy/rtk/rtl8367c/rtl8367c_asicdrv_lut.c | 20 +++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/rtl8367c_asicdrv_lut.c b/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/rtl8367c_asicdrv_lut.c index f9f592ae72..1521467aa8 100644 --- a/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/rtl8367c_asicdrv_lut.c +++ b/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/rtl8367c_asicdrv_lut.c @@ -439,7 +439,7 @@ ret_t rtl8367c_getAsicLutCamTbUsage(rtk_uint32* pEnabled) * Note: * None */ - /*޸: RTL8367C_PORTIDMAX, RTL8367C_LUT_LEARNLIMITMAX, RTL8367C_LUT_PORT_LEARN_LIMITNO_REG*/ + /*modification: RTL8367C_PORTIDMAX, RTL8367C_LUT_LEARNLIMITMAX, RTL8367C_LUT_PORT_LEARN_LIMITNO_REG*/ ret_t rtl8367c_setAsicLutLearnLimitNo(rtk_uint32 port, rtk_uint32 number) { if(port > RTL8367C_PORTIDMAX) @@ -470,7 +470,7 @@ ret_t rtl8367c_setAsicLutLearnLimitNo(rtk_uint32 port, rtk_uint32 number) * Note: * None */ - /*޸: RTL8367C_PORTIDMAX, RTL8367C_LUT_PORT_LEARN_LIMITNO_REG*/ + /*modification: RTL8367C_PORTIDMAX, RTL8367C_LUT_PORT_LEARN_LIMITNO_REG*/ ret_t rtl8367c_getAsicLutLearnLimitNo(rtk_uint32 port, rtk_uint32* pNumber) { if(port > RTL8367C_PORTIDMAX) @@ -498,7 +498,7 @@ ret_t rtl8367c_getAsicLutLearnLimitNo(rtk_uint32 port, rtk_uint32* pNumber) * Note: * None */ - /*޸: RTL8367C_LUT_LEARNLIMITMAX*/ + /*modification: RTL8367C_LUT_LEARNLIMITMAX*/ ret_t rtl8367c_setAsicSystemLutLearnLimitNo(rtk_uint32 number) { if(number > RTL8367C_LUT_LEARNLIMITMAX) @@ -632,7 +632,7 @@ ret_t rtl8367c_getAsicSystemLutLearnOverAct(rtk_uint32 *pAction) * Note: * None */ - /*޸: RTL8367C_LUT_SYSTEM_LEARN_PMASK_MASK*/ + /*modification: RTL8367C_LUT_SYSTEM_LEARN_PMASK_MASK*/ ret_t rtl8367c_setAsicSystemLutLearnPortMask(rtk_uint32 portmask) { ret_t retVal; @@ -666,7 +666,7 @@ ret_t rtl8367c_setAsicSystemLutLearnPortMask(rtk_uint32 portmask) * Note: * None */ - /*޸: RTL8367C_LUT_SYSTEM_LEARN_PMASK_MASK*/ + /*modification: RTL8367C_LUT_SYSTEM_LEARN_PMASK_MASK*/ ret_t rtl8367c_getAsicSystemLutLearnPortMask(rtk_uint32 *pPortmask) { rtk_uint32 tmpmask; @@ -966,7 +966,7 @@ ret_t rtl8367c_getAsicL2LookupTb(rtk_uint32 method, rtl8367c_luttb *pL2Table) * Note: * None */ - /*޸RTL8367C_PORTIDMAX, RTL8367C_REG_L2_LRN_CNT_REG, port10 reg is not contnious, wait for updating of base.h*/ + /*modification:RTL8367C_PORTIDMAX, RTL8367C_REG_L2_LRN_CNT_REG, port10 reg is not continuous, wait for updating of base.h*/ ret_t rtl8367c_getAsicLutLearnNo(rtk_uint32 port, rtk_uint32* pNumber) { ret_t retVal; @@ -1047,7 +1047,7 @@ ret_t rtl8367c_getAsicLutFlushAllStatus(rtk_uint32 *pBusyStatus) * Note: * None */ - /*port8~port10һregister, wait for updating of base.h, reg.h*/ + /*port8~port10 setup is done in a separate register, wait for updating of base.h, reg.h*/ ret_t rtl8367c_setAsicLutForceFlush(rtk_uint32 portmask) { ret_t retVal; @@ -1079,7 +1079,7 @@ ret_t rtl8367c_setAsicLutForceFlush(rtk_uint32 portmask) * Note: * None */ - /*port8~port10һregister, wait for updating of base.h, reg.h*/ + /*port8~port10 setup is done in a separate register, wait for updating of base.h, reg.h*/ ret_t rtl8367c_getAsicLutForceFlushStatus(rtk_uint32 *pPortmask) { rtk_uint32 tmpMask; @@ -1271,7 +1271,7 @@ ret_t rtl8367c_getAsicLutFlushFid(rtk_uint32* pFid) * Note: * None */ - /*޸RTL8367C_PORTIDMAX*/ + /*modification:RTL8367C_PORTIDMAX*/ ret_t rtl8367c_setAsicLutDisableAging(rtk_uint32 port, rtk_uint32 disabled) { if(port > RTL8367C_PORTIDMAX) @@ -1295,7 +1295,7 @@ ret_t rtl8367c_setAsicLutDisableAging(rtk_uint32 port, rtk_uint32 disabled) * Note: * None */ - /*޸RTL8367C_PORTIDMAX*/ + /*modification:RTL8367C_PORTIDMAX*/ ret_t rtl8367c_getAsicLutDisableAging(rtk_uint32 port, rtk_uint32 *pDisabled) { if(port > RTL8367C_PORTIDMAX) From 81e4aabac3a1bf51959c1568d7a4463fe5ab68ce Mon Sep 17 00:00:00 2001 From: Paul Donald Date: Wed, 3 Apr 2024 18:04:40 +0200 Subject: [PATCH 09/21] mediatek: mt7622: rtl8367c: source comment fixes Fix also some Chinese -> UTF8 encoding problems Improves indexing and searches Signed-off-by: Paul Donald --- target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/rldp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/rldp.c b/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/rldp.c index c39421e57c..0ecc32a6b5 100644 --- a/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/rldp.c +++ b/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/rldp.c @@ -8,7 +8,7 @@ * available at https://www.gnu.org/licenses/old-licenses/gpl-2.0.txt * * $Revision: 76306 $ - * $Date: 2017-03-08 15:13:58 +0800 (gT, 08 T 2017) $ + * $Date: 2017-03-08 15:13:58 +0800 (週三, 08 三月 2017) $ * * Purpose : Declaration of RLDP and RLPP API * From ae192c042c2beca490c9f5fbd7c6192124631f51 Mon Sep 17 00:00:00 2001 From: Paul Donald Date: Wed, 3 Apr 2024 17:07:06 +0200 Subject: [PATCH 10/21] mediatek: mt7622: rtl8367c: source code spell fixes Improves indexing and searches Signed-off-by: Paul Donald --- .../net/phy/rtk/rtl8367c/include/rtl8367c_asicdrv_cputag.h | 2 +- .../files/drivers/net/phy/rtk/rtl8367c/include/rtl8367c_reg.h | 4 ++-- .../drivers/net/phy/rtk/rtl8367c/rtl8367c_asicdrv_cputag.c | 4 ++-- .../drivers/net/phy/rtk/rtl8367c/rtl8367c_asicdrv_igmp.c | 4 ++-- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/include/rtl8367c_asicdrv_cputag.h b/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/include/rtl8367c_asicdrv_cputag.h index f7a460145e..982e2c4bfc 100644 --- a/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/include/rtl8367c_asicdrv_cputag.h +++ b/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/include/rtl8367c_asicdrv_cputag.h @@ -38,7 +38,7 @@ extern ret_t rtl8367c_setAsicCputagInsertMode(rtk_uint32 mode); extern ret_t rtl8367c_getAsicCputagInsertMode(rtk_uint32 *pMode); extern ret_t rtl8367c_setAsicCputagPriorityRemapping(rtk_uint32 srcPri, rtk_uint32 newPri); extern ret_t rtl8367c_getAsicCputagPriorityRemapping(rtk_uint32 srcPri, rtk_uint32 *pNewPri); -extern ret_t rtl8367c_setAsicCputagPosition(rtk_uint32 postion); +extern ret_t rtl8367c_setAsicCputagPosition(rtk_uint32 position); extern ret_t rtl8367c_getAsicCputagPosition(rtk_uint32* pPostion); extern ret_t rtl8367c_setAsicCputagMode(rtk_uint32 mode); extern ret_t rtl8367c_getAsicCputagMode(rtk_uint32 *pMode); diff --git a/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/include/rtl8367c_reg.h b/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/include/rtl8367c_reg.h index eb4f48b83e..f973c7bcb6 100644 --- a/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/include/rtl8367c_reg.h +++ b/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/include/rtl8367c_reg.h @@ -20357,8 +20357,8 @@ auto-generated register address and field data #define RTL8367C_IGMP_MLD_DISCARD_STORM_FILTER_MASK 0x2000 #define RTL8367C_REPORT_FORWARD_OFFSET 12 #define RTL8367C_REPORT_FORWARD_MASK 0x1000 -#define RTL8367C_ROBURSTNESS_VAR_OFFSET 9 -#define RTL8367C_ROBURSTNESS_VAR_MASK 0xE00 +#define RTL8367C_ROBUSTNESS_VAR_OFFSET 9 +#define RTL8367C_ROBUSTNESS_VAR_MASK 0xE00 #define RTL8367C_LEAVE_SUPPRESSION_OFFSET 8 #define RTL8367C_LEAVE_SUPPRESSION_MASK 0x100 #define RTL8367C_REPORT_SUPPRESSION_OFFSET 7 diff --git a/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/rtl8367c_asicdrv_cputag.c b/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/rtl8367c_asicdrv_cputag.c index 4b01a11617..ec9c332e16 100644 --- a/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/rtl8367c_asicdrv_cputag.c +++ b/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/rtl8367c_asicdrv_cputag.c @@ -259,9 +259,9 @@ ret_t rtl8367c_getAsicCputagPriorityRemapping(rtk_uint32 srcPri, rtk_uint32 *pNe * Note: * None */ -ret_t rtl8367c_setAsicCputagPosition(rtk_uint32 postion) +ret_t rtl8367c_setAsicCputagPosition(rtk_uint32 position) { - return rtl8367c_setAsicRegBit(RTL8367C_REG_CPU_CTRL, RTL8367C_CPU_TAG_POSITION_OFFSET, postion); + return rtl8367c_setAsicRegBit(RTL8367C_REG_CPU_CTRL, RTL8367C_CPU_TAG_POSITION_OFFSET, position); } /* Function Name: * rtl8367c_getAsicCputagPosition diff --git a/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/rtl8367c_asicdrv_igmp.c b/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/rtl8367c_asicdrv_igmp.c index 050f4bbc57..c915d2d618 100644 --- a/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/rtl8367c_asicdrv_igmp.c +++ b/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/rtl8367c_asicdrv_igmp.c @@ -429,8 +429,8 @@ ret_t rtl8367c_setAsicIGMPRobVar(rtk_uint32 rob_var) if(rob_var > RTL8367C_MAX_ROB_VAR) return RT_ERR_OUT_OF_RANGE; - retVal = rtl8367c_setAsicRegBits(RTL8367C_REG_IGMP_MLD_CFG0, RTL8367C_ROBURSTNESS_VAR_MASK, rob_var); /* Robustness variable */ + retVal = rtl8367c_setAsicRegBits(RTL8367C_REG_IGMP_MLD_CFG0, RTL8367C_ROBUSTNESS_VAR_MASK, rob_var); if(retVal != RT_ERR_OK) return retVal; @@ -456,8 +456,8 @@ ret_t rtl8367c_getAsicIGMPRobVar(rtk_uint32 *prob_var) ret_t retVal; rtk_uint32 value; - retVal = rtl8367c_getAsicRegBits(RTL8367C_REG_IGMP_MLD_CFG0, RTL8367C_ROBURSTNESS_VAR_MASK, &value); /* Robustness variable */ + retVal = rtl8367c_getAsicRegBits(RTL8367C_REG_IGMP_MLD_CFG0, RTL8367C_ROBUSTNESS_VAR_MASK, &value); if(retVal != RT_ERR_OK) return retVal; From 7b7f17021639ff737d66377762a8ba90944b5ed2 Mon Sep 17 00:00:00 2001 From: Olliver Schinagl Date: Sun, 17 Mar 2024 08:46:08 +0100 Subject: [PATCH 11/21] scripts/kernel_bump: Avoid potential copyright claim Due to potential fears of copyright infringement noted by Elliott Mitchell [0], rewrite our message to belong to OpenWRT. Note, AI was used to aid in construction of this sentence. [0]: https://lists.openwrt.org/pipermail/openwrt-devel/2024-March/042422.html Signed-off-by: Olliver Schinagl --- scripts/kernel_bump.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/kernel_bump.sh b/scripts/kernel_bump.sh index 5896bfc48f..829cd250e1 100755 --- a/scripts/kernel_bump.sh +++ b/scripts/kernel_bump.sh @@ -134,7 +134,7 @@ bump_kernel() --signoff \ --message "kernel/${platform_name}: Create kernel files for v${target_version} (from v${source_version})" \ --message 'This is an automatically generated commit.' \ - --message 'During a `git bisect` session, `git bisect --skip` is recommended.' + --message 'When doing `git bisect`, consider `git bisect --skip`.' git checkout 'HEAD~' "${_target_dir}" git commit \ From 1bbc24926618898ec33ceb421d6571f1fa8f2b73 Mon Sep 17 00:00:00 2001 From: Olliver Schinagl Date: Mon, 18 Mar 2024 13:08:44 +0100 Subject: [PATCH 12/21] scripts/kernel_bump: Drop unused function No need to keep unused empty functions. A left over from early development. Signed-off-by: Olliver Schinagl --- scripts/kernel_bump.sh | 7 ------- 1 file changed, 7 deletions(-) diff --git a/scripts/kernel_bump.sh b/scripts/kernel_bump.sh index 829cd250e1..bbf6747fc1 100755 --- a/scripts/kernel_bump.sh +++ b/scripts/kernel_bump.sh @@ -80,13 +80,6 @@ init() trap cleanup EXIT HUP INT QUIT ABRT ALRM TERM } -do_source_target() -{ - _target_dir="${1:?Missing argument to function}" - _op="${2:?Missing argument to function}" - -} - bump_kernel() { platform_name="${platform_name##*'/'}" From 03f2f530a00a55e6580733cd6ccd01a018a473ee Mon Sep 17 00:00:00 2001 From: Olliver Schinagl Date: Fri, 22 Mar 2024 08:38:02 +0100 Subject: [PATCH 13/21] scripts/kernel_bump: Always drop v prefix Naivly and lazyly the leading v was only dropped from optarg, not from any environment variable. Lets do this properly and ensure a leading 'v' is always dropped. Signed-off-by: Olliver Schinagl --- scripts/kernel_bump.sh | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/scripts/kernel_bump.sh b/scripts/kernel_bump.sh index bbf6747fc1..82ee3f3eff 100755 --- a/scripts/kernel_bump.sh +++ b/scripts/kernel_bump.sh @@ -77,6 +77,9 @@ init() initial_branch="$(git rev-parse --abbrev-ref HEAD)" initial_commitish="$(git rev-parse HEAD)" + source_version="${source_version#v}" + target_version="${target_version#v}" + trap cleanup EXIT HUP INT QUIT ABRT ALRM TERM } @@ -180,10 +183,10 @@ main() platform_name="${OPTARG}" ;; 's') - source_version="${OPTARG#v}" + source_version="${OPTARG}" ;; 't') - target_version="${OPTARG#v}" + target_version="${OPTARG}" ;; ':') e_err "Option -${OPTARG} requires an argument." From ed896c32b09e3adfaa5fdda5c584ef776e395b09 Mon Sep 17 00:00:00 2001 From: Olliver Schinagl Date: Thu, 21 Mar 2024 09:41:54 +0100 Subject: [PATCH 14/21] scripts/kernel_bump: Improve omitted version error If a version string was not supplied, we currently print an empty string. We can do better here. Also by popular demand, print the usage information in case of error. Signed-off-by: Olliver Schinagl --- scripts/kernel_bump.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/scripts/kernel_bump.sh b/scripts/kernel_bump.sh index 82ee3f3eff..90e47789c3 100755 --- a/scripts/kernel_bump.sh +++ b/scripts/kernel_bump.sh @@ -205,7 +205,9 @@ main() target_version="${target_version:-${TARGET_VERSION:-}}" if [ -z "${source_version:-}" ] || [ -z "${target_version:-}" ]; then - e_err "Source (${source_version}) and target (${target_version}) versions need to be defined." + e_err "Source (${source_version:-missing source version}) and target (${target_version:-missing target version}) versions need to be defined." + echo + usage exit 1 fi From f9ac106779022c41b393c80c0e1ac3e079db1343 Mon Sep 17 00:00:00 2001 From: Olliver Schinagl Date: Mon, 18 Mar 2024 13:09:23 +0100 Subject: [PATCH 15/21] scripts/kernel_bump: Do no run on dirty repositories We want to avoid starting a process when we know it will fail later. Signed-off-by: Olliver Schinagl --- scripts/kernel_bump.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/scripts/kernel_bump.sh b/scripts/kernel_bump.sh index 90e47789c3..5c147d78a5 100755 --- a/scripts/kernel_bump.sh +++ b/scripts/kernel_bump.sh @@ -77,6 +77,11 @@ init() initial_branch="$(git rev-parse --abbrev-ref HEAD)" initial_commitish="$(git rev-parse HEAD)" + if [ -n "$(git status --porcelain | grep -v '^?? .*')" ]; then + echo 'Git respository not in a clean state, will not continue.' + exit 1 + fi + source_version="${source_version#v}" target_version="${target_version#v}" From 9f0cc3eb11074773f683ccd570991a0c74b17d72 Mon Sep 17 00:00:00 2001 From: Olliver Schinagl Date: Thu, 21 Mar 2024 10:27:44 +0100 Subject: [PATCH 16/21] scripts/kernel_bump: Run script relative to the script dir Determine the target directory based on the script location, which might work better in some cases, but at least also allows the script to be ran from with any location in the OpenWRT repository. Signed-off-by: Olliver Schinagl --- scripts/kernel_bump.sh | 24 ++++++++++++++---------- 1 file changed, 14 insertions(+), 10 deletions(-) diff --git a/scripts/kernel_bump.sh b/scripts/kernel_bump.sh index 5c147d78a5..69045946e9 100755 --- a/scripts/kernel_bump.sh +++ b/scripts/kernel_bump.sh @@ -59,6 +59,7 @@ usage() echo " -t Target version of kernel (e.g. 'v6.6' [TARGET_VERSION]')" echo echo 'All options can also be passed in environment variables (listed between [BRACKETS]).' + echo 'Note that this script must be run from within the OpenWrt git repository.' echo 'Example: scripts/kernel_bump.sh -p realtek -s v6.1 -t v6.6' } @@ -74,6 +75,8 @@ cleanup() init() { + src_file="$(readlink -f "${0}")" + src_dir="${src_file%%"${src_file##*'/'}"}" initial_branch="$(git rev-parse --abbrev-ref HEAD)" initial_commitish="$(git rev-parse HEAD)" @@ -82,6 +85,11 @@ init() exit 1 fi + if [ -n "${src_dir##*'/scripts/'}" ]; then + echo "This script '${src_file}' is not in the scripts subdirectory, this is unexpected, cannot continue." + exit 1 + fi + source_version="${source_version#v}" target_version="${target_version#v}" @@ -90,20 +98,16 @@ init() bump_kernel() { + if [ -z "${platform_name}" ] || \ + [ -d "${PWD}/image" ]; then + platform_name="${PWD}" + fi platform_name="${platform_name##*'/'}" - if [ -z "${platform_name:-}" ]; then - platform_name="${PWD##*'/'}" - fi - - if [ "${PWD##*'/'}" = "${platform_name}" ]; then - _target_dir='./' - else - _target_dir="target/linux/${platform_name}" - fi + _target_dir="${src_dir}/../target/linux/${platform_name}" if [ ! -d "${_target_dir}/image" ]; then - e_err 'Cannot find target linux directory.' + e_err "Cannot find target linux directory '${_target_dir:-not defined}'. Not in a platform directory, or -p not set." exit 1 fi From 9e6c4392f85f9123fda8ef8690c2a36599fe334c Mon Sep 17 00:00:00 2001 From: Olliver Schinagl Date: Mon, 18 Mar 2024 13:10:31 +0100 Subject: [PATCH 17/21] scripts/kernel_bump: Allow for migrating only configuration files In some cases, we want to only migrate configuration files, e.g. if the kernel was bumped already. Lets add a flag for this case to offer flexibility. By default we will migrate configuration flags as before. Signed-off-by: Olliver Schinagl --- scripts/kernel_bump.sh | 36 +++++++++++++++++++++--------------- 1 file changed, 21 insertions(+), 15 deletions(-) diff --git a/scripts/kernel_bump.sh b/scripts/kernel_bump.sh index 69045946e9..069f53bb77 100755 --- a/scripts/kernel_bump.sh +++ b/scripts/kernel_bump.sh @@ -54,6 +54,7 @@ usage() { echo "Usage: ${0}" echo 'Helper script to bump the target kernel version, whilst keeping history.' + echo ' -c Migrate config files (e.g. subtargets) only.' echo " -p Optional Platform name (e.g. 'ath79' [PLATFORM_NAME]" echo " -s Source version of kernel (e.g. 'v6.1' [SOURCE_VERSION])" echo " -t Target version of kernel (e.g. 'v6.6' [TARGET_VERSION]')" @@ -113,22 +114,24 @@ bump_kernel() git switch --force-create '__openwrt_kernel_files_mover' - for _path in "${_target_dir}/"*; do - if [ ! -s "${_path}" ] || \ - [ "${_path}" = "${_path%%"-${source_version}"}" ]; then - continue - fi + if [ "${config_only:-false}" != 'true' ]; then + for _path in "${_target_dir}/"*; do + if [ ! -e "${_path}" ] || \ + [ "${_path}" = "${_path%%"-${source_version}"}" ]; then + continue + fi - _target_path="${_path%%"-${source_version}"}-${target_version}" - if [ -s "${_target_path}" ]; then - e_err "Target '${_target_path}' already exists!" - exit 1 - fi + _target_path="${_path%%"-${source_version}"}-${target_version}" + if [ -e "${_target_path}" ]; then + e_err "Target '${_target_path}' already exists!" + exit 1 + fi - git mv \ - "${_path}" \ - "${_target_path}" - done + git mv \ + "${_path}" \ + "${_target_path}" + done + fi find "${_target_dir}" -iname "config-${source_version}" | while read -r _config; do _path="${_config%%"/config-${source_version}"}" @@ -182,8 +185,11 @@ check_requirements() main() { - while getopts 'hp:s:t:' _options; do + while getopts 'chp:s:t:' _options; do case "${_options}" in + 'c') + config_only='true' + ;; 'h') usage exit 0 From 8ed187e471b0f7622c8791bf688302cdfe484868 Mon Sep 17 00:00:00 2001 From: Olliver Schinagl Date: Mon, 18 Mar 2024 13:24:12 +0100 Subject: [PATCH 18/21] scripts/kernel_bump: Use git to obtain the list of files Instead of looping of a directory to find directories related to kernel changes, use the git index instead. Signed-off-by: Olliver Schinagl --- scripts/kernel_bump.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/scripts/kernel_bump.sh b/scripts/kernel_bump.sh index 069f53bb77..d9fc5287df 100755 --- a/scripts/kernel_bump.sh +++ b/scripts/kernel_bump.sh @@ -18,8 +18,10 @@ REQUIRED_COMMANDS=' exit git printf + sed set shift + sort ' _msg() @@ -115,7 +117,9 @@ bump_kernel() git switch --force-create '__openwrt_kernel_files_mover' if [ "${config_only:-false}" != 'true' ]; then - for _path in "${_target_dir}/"*; do + for _path in $(git ls-tree -d -r --name-only '__openwrt_kernel_files_mover' "${_target_dir}" | + sed -n "s|^\(.*-${source_version}\).*|\1|p" | + sort -u); do if [ ! -e "${_path}" ] || \ [ "${_path}" = "${_path%%"-${source_version}"}" ]; then continue From b62aafc99a6f00032c0486d96bb7b6cc0a77a84c Mon Sep 17 00:00:00 2001 From: Olliver Schinagl Date: Mon, 18 Mar 2024 13:28:11 +0100 Subject: [PATCH 19/21] scripts/kernel_bump: Use the git index to find the needed config files The current solution using `find` introduces a racecondition, where `find` and `git mv` get in each others way. While this could be fixed with more-utils sponge command (or even sort -u) to buffer the output of find. However, a much better approach, is to query the git index directly, which will not change, and is far more accurate. Signed-off-by: Olliver Schinagl --- scripts/kernel_bump.sh | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/scripts/kernel_bump.sh b/scripts/kernel_bump.sh index d9fc5287df..7ce3b6256f 100755 --- a/scripts/kernel_bump.sh +++ b/scripts/kernel_bump.sh @@ -137,9 +137,15 @@ bump_kernel() done fi - find "${_target_dir}" -iname "config-${source_version}" | while read -r _config; do - _path="${_config%%"/config-${source_version}"}" - git mv "${_config}" "${_path}/config-${target_version}" + for _config in $(git ls-files "${_target_dir}" | + sed -n "s|^\(.*config-${source_version}\).*|\1|p" | + sort -u); do + if [ ! -e "${_config}" ]; then + continue + fi + + _subtarget="${_config%%"/config-${source_version}"}" + git mv "${_config}" "${_subtarget}/config-${target_version}" done git commit \ From 71c663bcfd6e7839ef3a21482ee939bc0b1ff65c Mon Sep 17 00:00:00 2001 From: Olliver Schinagl Date: Mon, 18 Mar 2024 13:40:50 +0100 Subject: [PATCH 20/21] scripts/kernel_bump: Allow bumping sub-targets Some targets may need to bump specific sub-targets only. So lets offer this as an option. Signed-off-by: Olliver Schinagl --- scripts/kernel_bump.sh | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/scripts/kernel_bump.sh b/scripts/kernel_bump.sh index 7ce3b6256f..1a6e5e5ea7 100755 --- a/scripts/kernel_bump.sh +++ b/scripts/kernel_bump.sh @@ -58,6 +58,7 @@ usage() echo 'Helper script to bump the target kernel version, whilst keeping history.' echo ' -c Migrate config files (e.g. subtargets) only.' echo " -p Optional Platform name (e.g. 'ath79' [PLATFORM_NAME]" + echo " -r Optional comma separated list of sub-targets (e.g. 'rtl930x' [SUBTARGET_NAMES]" echo " -s Source version of kernel (e.g. 'v6.1' [SOURCE_VERSION])" echo " -t Target version of kernel (e.g. 'v6.6' [TARGET_VERSION]')" echo @@ -145,7 +146,15 @@ bump_kernel() fi _subtarget="${_config%%"/config-${source_version}"}" - git mv "${_config}" "${_subtarget}/config-${target_version}" + if [ -n "${subtarget_names:-}" ]; then + echo "${subtarget_names:-}" | while IFS=',' read -r _subtarget_name; do + if [ "${_subtarget_name}" = "${_subtarget##*'/'}" ]; then + git mv "${_config}" "${_subtarget}/config-${target_version}" + fi + done + else + git mv "${_config}" "${_subtarget}/config-${target_version}" + fi done git commit \ @@ -195,7 +204,7 @@ check_requirements() main() { - while getopts 'chp:s:t:' _options; do + while getopts 'chp:r:s:t:' _options; do case "${_options}" in 'c') config_only='true' @@ -207,6 +216,9 @@ main() 'p') platform_name="${OPTARG}" ;; + 'r') + subtarget_names="${OPTARG}" + ;; 's') source_version="${OPTARG}" ;; @@ -226,6 +238,7 @@ main() shift "$((OPTIND - 1))" platform_name="${platform_name:-${PLATFORM_NAME:-}}" + subtarget_names="${subtarget_names:-${SUBTARGET_NAMES:-}}" source_version="${source_version:-${SOURCE_VERSION:-}}" target_version="${target_version:-${TARGET_VERSION:-}}" From 98235e60ed8436ca9476c3bc84a8f1feb553a764 Mon Sep 17 00:00:00 2001 From: Olliver Schinagl Date: Mon, 18 Mar 2024 14:03:59 +0100 Subject: [PATCH 21/21] scripts/kernel_bump: Delete merge commit While we have included the needed changes via a merge commit, there is no need to keep it. Lets drop the merge commit, which we can do as we haven't pushed anything. Signed-off-by: Olliver Schinagl --- scripts/kernel_bump.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/scripts/kernel_bump.sh b/scripts/kernel_bump.sh index 1a6e5e5ea7..0a123ea95a 100755 --- a/scripts/kernel_bump.sh +++ b/scripts/kernel_bump.sh @@ -171,6 +171,8 @@ bump_kernel() git switch "${initial_branch:?Unable to switch back to original branch. Quitting.}" GIT_EDITOR=true git merge --no-ff '__openwrt_kernel_files_mover' git branch --delete '__openwrt_kernel_files_mover' + echo "Deleting merge commit ($(git rev-parse HEAD))." + git rebase HEAD~1 echo "Original commitish was '${initial_commitish}'." echo 'Kernel bump complete. Remember to use `git log --follow`.'