aboutsummaryrefslogtreecommitdiffstats
path: root/net/dsa
diff options
context:
space:
mode:
authorAndrew Lunn <andrew@lunn.ch>2016-04-12 20:40:44 -0400
committerDavid S. Miller <davem@davemloft.net>2016-04-13 18:15:23 -0400
commit74c3e2a54b7d9eb57f23fb0e157b90bb6dae629f (patch)
tree31a0d1f055d42843bfbc47ba25d0c707a9e7d8ed /net/dsa
parente49bad319630dedeeda3a638a707ec7b5d402ad5 (diff)
dsa: Rename phys_port_mask to enabled_port_mask
The phys in phys_port_mask suggests this mask is about PHYs. In fact, it means physical ports. Rename to enabled_port_mask, indicating external enabled ports of the switch, which is hopefully less confusing. Signed-off-by: Andrew Lunn <andrew@lunn.ch> Tested-by: Vivien Didelot <vivien.didelot@savoirfairelinux.com> Acked-by: Florian Fainelli <f.fainelli@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/dsa')
-rw-r--r--net/dsa/dsa.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/net/dsa/dsa.c b/net/dsa/dsa.c
index 14bf12f637d2..60ea98481806 100644
--- a/net/dsa/dsa.c
+++ b/net/dsa/dsa.c
@@ -246,7 +246,7 @@ static int dsa_switch_setup_one(struct dsa_switch *ds, struct device *parent)
246 } else if (!strcmp(name, "dsa")) { 246 } else if (!strcmp(name, "dsa")) {
247 ds->dsa_port_mask |= 1 << i; 247 ds->dsa_port_mask |= 1 << i;
248 } else { 248 } else {
249 ds->phys_port_mask |= 1 << i; 249 ds->enabled_port_mask |= 1 << i;
250 } 250 }
251 valid_name_found = true; 251 valid_name_found = true;
252 } 252 }
@@ -259,7 +259,7 @@ static int dsa_switch_setup_one(struct dsa_switch *ds, struct device *parent)
259 /* Make the built-in MII bus mask match the number of ports, 259 /* Make the built-in MII bus mask match the number of ports,
260 * switch drivers can override this later 260 * switch drivers can override this later
261 */ 261 */
262 ds->phys_mii_mask = ds->phys_port_mask; 262 ds->phys_mii_mask = ds->enabled_port_mask;
263 263
264 /* 264 /*
265 * If the CPU connects to this switch, set the switch tree 265 * If the CPU connects to this switch, set the switch tree
@@ -325,7 +325,7 @@ static int dsa_switch_setup_one(struct dsa_switch *ds, struct device *parent)
325 * Create network devices for physical switch ports. 325 * Create network devices for physical switch ports.
326 */ 326 */
327 for (i = 0; i < DSA_MAX_PORTS; i++) { 327 for (i = 0; i < DSA_MAX_PORTS; i++) {
328 if (!(ds->phys_port_mask & (1 << i))) 328 if (!(ds->enabled_port_mask & (1 << i)))
329 continue; 329 continue;
330 330
331 ret = dsa_slave_create(ds, parent, i, pd->port_names[i]); 331 ret = dsa_slave_create(ds, parent, i, pd->port_names[i]);
@@ -435,7 +435,7 @@ static void dsa_switch_destroy(struct dsa_switch *ds)
435 435
436 /* Destroy network devices for physical switch ports. */ 436 /* Destroy network devices for physical switch ports. */
437 for (port = 0; port < DSA_MAX_PORTS; port++) { 437 for (port = 0; port < DSA_MAX_PORTS; port++) {
438 if (!(ds->phys_port_mask & (1 << port))) 438 if (!(ds->enabled_port_mask & (1 << port)))
439 continue; 439 continue;
440 440
441 if (!ds->ports[port]) 441 if (!ds->ports[port])