Lines Matching refs:from

56 			   int from, int to, bool allow)
59 l2_fwd[from].reach_port |= BIT(to);
61 l2_fwd[from].reach_port &= ~BIT(to);
65 int from, int to)
67 return !!(l2_fwd[from].reach_port & BIT(to));
138 * deliberately removing the RX VLAN from the port's VMEMB_PORT list,
139 * to prevent DSA tag spoofing from the link partner. Untagged packets
237 /* Disallow untagged packets from being received on the
403 * Maybe correlate with no_linklocal_learn from bridge driver?
453 /* Set up a default VLAN for untagged traffic injected from the CPU
457 * Frames from this VLAN will always be transmitted as untagged, and
515 int from, to;
548 for (from = 0; from < ds->num_ports; from++) {
549 if (!dsa_is_user_port(ds, from))
557 l2fwd[from].bc_domain |= BIT(to);
558 l2fwd[from].fl_domain |= BIT(to);
560 sja1105_port_allow_traffic(l2fwd, from, to, true);
568 for (from = 0; from < ds->num_ports; from++) {
569 if (!dsa_is_cpu_port(ds, from) && !dsa_is_dsa_port(ds, from))
576 if (from == to)
579 l2fwd[from].bc_domain |= BIT(to);
580 l2fwd[from].fl_domain |= BIT(to);
582 sja1105_port_allow_traffic(l2fwd, from, to, true);
588 * back into the system (they are flooded from CPU port 1 to the DSA
589 * link, and from there to CPU port 2). Prevent this from happening by
590 * cutting RX from DSA links towards our CPU port, if the remote switch
600 from = dl->dp->index;
601 to = dsa_upstream_port(ds, from);
604 "H topology detected, cutting RX from DSA link %d to CPU port %d to prevent TX packet loops\n",
605 from, to);
607 sja1105_port_allow_traffic(l2fwd, from, to, false);
609 l2fwd[from].bc_domain &= ~BIT(to);
610 l2fwd[from].fl_domain &= ~BIT(to);
624 /* Next 8 entries define VLAN PCP mapping from ingress to egress.
863 * (both ingress to and egress from CPU - PTP, STP etc)
1125 * the reverse interpretation of the phy-mode. This is a deviation from the
1197 /* Get switch port number from DT */
1205 /* Get PHY mode from DT */
1264 /* Convert link speed from SJA1105 to ethtool encoding */
1288 /* On P/Q/R/S, one can read from the device via the MAC reconfiguration
1324 /* Overwrite SJA1105_SPEED_AUTO from the static MAC configuration
1506 * holds the FDB entries. An FDB index spans from 0 to 1023 and is comprised of
1704 * every possible position from 0 to 1023.
1780 /* Decide whether we remove just this port from the FDB entry,
1898 /* We need to hide the dsa_8021q VLANs from the user. */
1977 * enable flooding towards this port from all ingress ports that are in the
1984 int from, to, rc;
1988 for (from = 0; from < ds->num_ports; from++) {
1992 if (!sja1105_can_forward(l2_fwd, from, to))
2002 if (l2_fwd[from].fl_domain == fl_domain &&
2003 l2_fwd[from].bc_domain == bc_domain)
2006 l2_fwd[from].fl_domain = fl_domain;
2007 l2_fwd[from].bc_domain = bc_domain;
2010 from, &l2_fwd[from], true);
2229 * but deduce the port transmit rate from idleslope - sendslope.
2236 /* Convert the negative values from 64-bit 2's complement
2615 /* Prevent attackers from trying to inject a DSA tag from
2728 * route cannot be done from atomit context (SPI transfer takes a sleepable
2834 * mirroring on all other (@from) ports.
2836 * same, and we need to unset the @to port from mirr_port only when there is no
2839 static int sja1105_mirror_apply(struct sja1105_private *priv, int from, int to,
2889 mac[from].ing_mirr = enabled;
2891 mac[from].egr_mirr = enabled;
2893 return sja1105_dynamic_config_write(priv, BLK_IDX_MAC_CONFIG, from,
2894 &mac[from], true);