mirror of
https://github.com/Ansuel/openwrt.git
synced 2025-12-16 06:59:40 +00:00
realtek: Fix block comment style
In net code, it is preferred to have block comments which * either are one line: `/* ... */` * multiple lines with: - starting with the first comment line directly: `/* ...` - each line is intended with the first asterisk: ` * ...` - the last line is just the end of the comment: ` */` Signed-off-by: Sven Eckelmann <sven@narfation.org> Link: https://github.com/openwrt/openwrt/pull/20906 Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
This commit is contained in:
parent
c6e0638ed1
commit
7704e500e5
@ -1349,8 +1349,8 @@ static int rtl83xx_fib_event(struct notifier_block *this, unsigned long event, v
|
||||
|
||||
memcpy(&fib_work->fen_info, ptr, sizeof(fib_work->fen_info));
|
||||
/* Take referece on fib_info to prevent it from being
|
||||
* freed while work is queued. Release it afterwards.
|
||||
*/
|
||||
* freed while work is queued. Release it afterwards.
|
||||
*/
|
||||
fib_info_hold(fib_work->fen_info.fi);
|
||||
|
||||
} else if (info->family == AF_INET6) {
|
||||
|
||||
@ -251,7 +251,8 @@ static void rtl839x_rate_control_init(struct rtl838x_switch_priv *priv)
|
||||
/* Set default burst rates on all ports (the same for 1G / 10G) with a PHY
|
||||
* for UC, MC and BC
|
||||
* For 1G port, the minimum burst rate is 1700, maximum 65535,
|
||||
* For 10G ports it is 2650 and 1048575 respectively */
|
||||
* For 10G ports it is 2650 and 1048575 respectively
|
||||
*/
|
||||
for (int p = 0; p < priv->cpu_port; p++) {
|
||||
if (priv->ports[p].phy && !priv->ports[p].is10G) {
|
||||
sw_w32_mask(0xffff, 0x8000, RTL839X_STORM_CTRL_PORT_UC_1(p));
|
||||
|
||||
@ -511,11 +511,13 @@ static void rtl838x_l2_learning_setup(void)
|
||||
{
|
||||
/* Set portmask for broadcast traffic and unknown unicast address flooding
|
||||
* to the reserved entry in the portmask table used also for
|
||||
* multicast flooding */
|
||||
* multicast flooding
|
||||
*/
|
||||
sw_w32(UNKNOWN_MC_PMASK << 9 | UNKNOWN_MC_PMASK, RTL838X_L2_FLD_PMSK);
|
||||
|
||||
/* Enable learning constraint system-wide (bit 0), per-port (bit 1)
|
||||
* and per vlan (bit 2) */
|
||||
* and per vlan (bit 2)
|
||||
*/
|
||||
sw_w32(0x7, RTL838X_L2_LRN_CONSTRT_EN);
|
||||
|
||||
/* Limit learning to maximum: 16k entries, after that just flood (bits 0-1) */
|
||||
@ -1115,7 +1117,8 @@ static int rtl838x_write_pie_action(u32 r[], struct pie_rule *pr)
|
||||
* they have different precedence depending on their type and this precedence
|
||||
* defines which Action Information Field (0-4) in the IACL table stores
|
||||
* the additional data of the action (like e.g. the port number a packet is
|
||||
* forwarded to) */
|
||||
* forwarded to)
|
||||
*/
|
||||
/* TODO: count bits in selectors to limit to a maximum number of actions */
|
||||
if (pr->fwd_sel) { /* Forwarding action */
|
||||
data = pr->fwd_act << 13;
|
||||
|
||||
@ -885,7 +885,8 @@ enum egr_filter {
|
||||
/* Intermediate representation of a Packet Inspection Engine Rule
|
||||
* as suggested by the Kernel's tc flower offload subsystem
|
||||
* Field meaning is universal across SoC families, but data content is specific
|
||||
* to SoC family (e.g. because of different port ranges) */
|
||||
* to SoC family (e.g. because of different port ranges)
|
||||
*/
|
||||
struct pie_rule {
|
||||
int id;
|
||||
enum pie_phase phase; /* Phase in which this template is applied */
|
||||
|
||||
@ -556,7 +556,8 @@ static void rtl839x_l2_learning_setup(void)
|
||||
{
|
||||
/* Set portmask for broadcast (offset bit 12) and unknown unicast (offset 0)
|
||||
* address flooding to the reserved entry in the portmask table used
|
||||
* also for multicast flooding */
|
||||
* also for multicast flooding
|
||||
*/
|
||||
sw_w32(UNKNOWN_MC_PMASK << 12 | UNKNOWN_MC_PMASK, RTL839X_L2_FLD_PMSK);
|
||||
|
||||
/* Limit learning to maximum: 32k entries, after that just flood (bits 0-1) */
|
||||
|
||||
@ -1472,11 +1472,11 @@ static void rtl930x_get_l3_nexthop(int idx, u16 *dmac_id, u16 *interface)
|
||||
|
||||
|
||||
// Currently not used
|
||||
// /* Creates an interface for a route by setting up the HW tables in the SoC
|
||||
// /* Creates an interface for a route by setting up the HW tables in the SoC */
|
||||
// static int rtl930x_l3_intf_add(struct rtl838x_switch_priv *priv, struct rtl838x_l3_intf *intf)
|
||||
// {
|
||||
// int i, intf_id, mtu_id;
|
||||
// /* number of MTU-values < 16384 *\/
|
||||
// /* number of MTU-values < 16384 */
|
||||
|
||||
// /* Use the same IPv6 mtu as the ip4 mtu for this route if unset */
|
||||
// intf->ip6_mtu = intf->ip6_mtu ? intf->ip6_mtu : intf->ip4_mtu;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user