team: use function team_port_txable() for determing enabled and up port
[linux-2.6-block.git] / drivers / net / team / team.c
index 9b94f53a9d4bc313dc63d0690a02c457e4199c70..bc7afa51d05234c555dae350d23b83a1ba72d3ec 100644 (file)
@@ -677,6 +677,12 @@ bool team_port_enabled(struct team_port *port)
 }
 EXPORT_SYMBOL(team_port_enabled);
 
+bool team_port_txable(struct team_port *port)
+{
+       return port->linkup && team_port_enabled(port);
+}
+EXPORT_SYMBOL(team_port_txable);
+
 /*
  * Enable/disable port by adding to enabled port hashlist and setting
  * port->index (Might be racy so reader could see incorrect ifindex when