[OpenWrt-Devel,1/3,RFC] switch: export swconfig_speed_str()
diff mbox

Message ID 1418152881-7354-1-git-send-email-lynxis@fe80.eu
State Rejected
Headers show

Commit Message

Alexander Couzens Dec. 9, 2014, 7:21 p.m. UTC
swconfig_speed_str convert a switch speed enum to a human readable string.
---
 target/linux/generic/files/drivers/net/phy/swconfig.c | 3 ++-
 target/linux/generic/files/include/linux/switch.h     | 2 ++
 2 files changed, 4 insertions(+), 1 deletion(-)

Patch
diff mbox

diff --git a/target/linux/generic/files/drivers/net/phy/swconfig.c b/target/linux/generic/files/drivers/net/phy/swconfig.c
index 4f2df4c..7f50c03 100644
--- a/target/linux/generic/files/drivers/net/phy/swconfig.c
+++ b/target/linux/generic/files/drivers/net/phy/swconfig.c
@@ -127,7 +127,7 @@  swconfig_get_pvid(struct switch_dev *dev, const struct switch_attr *attr,
 	return dev->ops->get_port_pvid(dev, val->port_vlan, &val->value.i);
 }
 
-static const char *
+const char *
 swconfig_speed_str(enum switch_port_speed speed)
 {
 	switch (speed) {
@@ -143,6 +143,7 @@  swconfig_speed_str(enum switch_port_speed speed)
 
 	return "unknown";
 }
+EXPORT_SYMBOL_GPL(swconfig_speed_str);
 
 static int
 swconfig_get_link(struct switch_dev *dev, const struct switch_attr *attr,
diff --git a/target/linux/generic/files/include/linux/switch.h b/target/linux/generic/files/include/linux/switch.h
index b53431e..d529ccc 100644
--- a/target/linux/generic/files/include/linux/switch.h
+++ b/target/linux/generic/files/include/linux/switch.h
@@ -25,9 +25,11 @@  struct switch_val;
 struct switch_attr;
 struct switch_attrlist;
 struct switch_led_trigger;
+enum switch_port_speed;
 
 int register_switch(struct switch_dev *dev, struct net_device *netdev);
 void unregister_switch(struct switch_dev *dev);
+const char *swconfig_speed_str(enum switch_port_speed speed);
 
 /**
  * struct switch_attrlist - attribute list