[qca-ssdk-shell]: Move the shell command of port counter to debug.

Change-Id: I0df9bf1fb1c14eb33e4c7874f3519431a1ebbdda
Signed-off-by: Liu Zhongjian <zhongjia@codeaurora.org>
diff --git a/include/api/api_desc.h b/include/api/api_desc.h
index 40c8076..234e08e 100755
--- a/include/api/api_desc.h
+++ b/include/api/api_desc.h
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014, 2015, The Linux Foundation. All rights reserved.
+ * Copyright (c) 2014, 2015, 2017, The Linux Foundation. All rights reserved.
  * Permission to use, copy, modify, and/or distribute this software for
  * any purpose with or without fee is hereby granted, provided that the
  * above copyright notice and this permission notice appear in all copies.
@@ -399,21 +399,21 @@
     SW_PARAM_DEF(SW_API_PT_INTERFACE_MODE_STATUS_GET, SW_INTERFACE_MODE, sizeof(fal_port_interface_mode_t), SW_PARAM_PTR|SW_PARAM_OUT, \
               "Interface Status"),
 
-#define SW_API_PT_COUNTER_SET_DESC \
-			SW_PARAM_DEF(SW_API_PT_COUNTER_SET, SW_UINT32, 4, SW_PARAM_IN, "Dev ID"), \
-			SW_PARAM_DEF(SW_API_PT_COUNTER_SET, SW_UINT32, 4, SW_PARAM_IN, "Port ID"), \
-			SW_PARAM_DEF(SW_API_PT_COUNTER_SET, SW_ENABLE, 4, SW_PARAM_IN, "Counter Status"),
+#define SW_API_DEBUG_PHYCOUNTER_SET_DESC \
+			SW_PARAM_DEF(SW_API_DEBUG_PHYCOUNTER_SET, SW_UINT32, 4, SW_PARAM_IN, "Dev ID"), \
+			SW_PARAM_DEF(SW_API_DEBUG_PHYCOUNTER_SET, SW_UINT32, 4, SW_PARAM_IN, "Port ID"), \
+			SW_PARAM_DEF(SW_API_DEBUG_PHYCOUNTER_SET, SW_ENABLE, 4, SW_PARAM_IN, "Counter Status"),
 
-#define SW_API_PT_COUNTER_GET_DESC \
-			SW_PARAM_DEF(SW_API_PT_COUNTER_GET, SW_UINT32, 4, SW_PARAM_IN, "Dev ID"), \
-			SW_PARAM_DEF(SW_API_PT_COUNTER_GET, SW_UINT32, 4, SW_PARAM_IN, "Port ID"), \
-			SW_PARAM_DEF(SW_API_PT_COUNTER_GET, SW_ENABLE, 4, SW_PARAM_PTR|SW_PARAM_OUT, "Counter Status"),
+#define SW_API_DEBUG_PHYCOUNTER_GET_DESC \
+			SW_PARAM_DEF(SW_API_DEBUG_PHYCOUNTER_GET, SW_UINT32, 4, SW_PARAM_IN, "Dev ID"), \
+			SW_PARAM_DEF(SW_API_DEBUG_PHYCOUNTER_GET, SW_UINT32, 4, SW_PARAM_IN, "Port ID"), \
+			SW_PARAM_DEF(SW_API_DEBUG_PHYCOUNTER_GET, SW_ENABLE, 4, SW_PARAM_PTR|SW_PARAM_OUT, "Counter Status"),
 
-#define SW_API_PT_COUNTER_SHOW_DESC \
-		SW_PARAM_DEF(SW_API_PT_COUNTER_SHOW, SW_UINT32, 4, SW_PARAM_IN, "Dev ID"), \
-		SW_PARAM_DEF(SW_API_PT_COUNTER_SHOW, SW_UINT32, 4, SW_PARAM_IN, "Port ID"), \
-		SW_PARAM_DEF(SW_API_PT_COUNTER_SHOW, SW_COUNTER_INFO, sizeof(fal_port_counter_info_t), SW_PARAM_PTR|SW_PARAM_OUT, \
-				  "Phy Statistics"),
+#define SW_API_DEBUG_PHYCOUNTER_SHOW_DESC \
+		SW_PARAM_DEF(SW_API_DEBUG_PHYCOUNTER_SHOW, SW_UINT32, 4, SW_PARAM_IN, "Dev ID"), \
+		SW_PARAM_DEF(SW_API_DEBUG_PHYCOUNTER_SHOW, SW_UINT32, 4, SW_PARAM_IN, "Port ID"), \
+		SW_PARAM_DEF(SW_API_DEBUG_PHYCOUNTER_SHOW, SW_COUNTER_INFO, sizeof(fal_port_counter_info_t), SW_PARAM_PTR|SW_PARAM_OUT, \
+				  "Phy Counter Statistics On port"),
 
 #define SW_API_VLAN_ADD_DESC \
     SW_PARAM_DEF(SW_API_VLAN_ADD, SW_UINT32, 4, SW_PARAM_IN, "Dev ID"), \
diff --git a/include/api/sw_ioctl.h b/include/api/sw_ioctl.h
index a2a1685..344dc85 100755
--- a/include/api/sw_ioctl.h
+++ b/include/api/sw_ioctl.h
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014, 2015, The Linux Foundation. All rights reserved.
+ * Copyright (c) 2014, 2015, 2017, The Linux Foundation. All rights reserved.
  * Permission to use, copy, modify, and/or distribute this software for
  * any purpose with or without fee is hereby granted, provided that the
  * above copyright notice and this permission notice appear in all copies.
@@ -100,10 +100,9 @@
 #define SW_API_PT_INTERFACE_MODE_SET  (68 + SW_API_PORT_OFFSET)
 #define SW_API_PT_INTERFACE_MODE_GET  (69 + SW_API_PORT_OFFSET)
 #define SW_API_PT_INTERFACE_MODE_STATUS_GET  (70 + SW_API_PORT_OFFSET)
-#define SW_API_PT_COUNTER_SET  (71 + SW_API_PORT_OFFSET)
-#define SW_API_PT_COUNTER_GET  (72 + SW_API_PORT_OFFSET)
-#define SW_API_PT_COUNTER_SHOW  (73 + SW_API_PORT_OFFSET)
-
+#define SW_API_DEBUG_PHYCOUNTER_SET  (71 + SW_API_PORT_OFFSET)
+#define SW_API_DEBUG_PHYCOUNTER_GET  (72 + SW_API_PORT_OFFSET)
+#define SW_API_DEBUG_PHYCOUNTER_SHOW  (73 + SW_API_PORT_OFFSET)
     /*vlan*/
 #define SW_API_VLAN_OFFSET         110
 #define SW_API_VLAN_ADD            (0 + SW_API_VLAN_OFFSET)
diff --git a/include/fal/fal_api.h b/include/fal/fal_api.h
index b84d77e..c4d1f1d 100755
--- a/include/fal/fal_api.h
+++ b/include/fal/fal_api.h
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014, 2015, The Linux Foundation. All rights reserved.
+ * Copyright (c) 2014-2017, The Linux Foundation. All rights reserved.
  * Permission to use, copy, modify, and/or distribute this software for
  * any purpose with or without fee is hereby granted, provided that the
  * above copyright notice and this permission notice appear in all copies.
@@ -94,9 +94,9 @@
     SW_API_DEF(SW_API_PT_INTERFACE_MODE_SET, fal_port_interface_mode_set), \
     SW_API_DEF(SW_API_PT_INTERFACE_MODE_GET, fal_port_interface_mode_get), \
     SW_API_DEF(SW_API_PT_INTERFACE_MODE_STATUS_GET, fal_port_interface_mode_status_get), \
-    SW_API_DEF(SW_API_PT_COUNTER_SET, fal_port_counter_set), \
-    SW_API_DEF(SW_API_PT_COUNTER_GET, fal_port_counter_get), \
-    SW_API_DEF(SW_API_PT_COUNTER_SHOW, fal_port_counter_show),
+    SW_API_DEF(SW_API_DEBUG_PHYCOUNTER_SET, fal_debug_phycounter_set), \
+    SW_API_DEF(SW_API_DEBUG_PHYCOUNTER_GET, fal_debug_phycounter_get), \
+    SW_API_DEF(SW_API_DEBUG_PHYCOUNTER_SHOW, fal_debug_phycounter_show),
 
 #define PORTCONTROL_API_PARAM \
     SW_API_DESC(SW_API_PT_DUPLEX_GET) \
@@ -170,9 +170,9 @@
     SW_API_DESC(SW_API_PT_INTERFACE_MODE_SET) \
     SW_API_DESC(SW_API_PT_INTERFACE_MODE_GET) \
     SW_API_DESC(SW_API_PT_INTERFACE_MODE_STATUS_GET) \
-    SW_API_DESC(SW_API_PT_COUNTER_SET) \
-    SW_API_DESC(SW_API_PT_COUNTER_GET) \
-    SW_API_DESC(SW_API_PT_COUNTER_SHOW)
+    SW_API_DESC(SW_API_DEBUG_PHYCOUNTER_SET) \
+    SW_API_DESC(SW_API_DEBUG_PHYCOUNTER_GET) \
+    SW_API_DESC(SW_API_DEBUG_PHYCOUNTER_SHOW)
 
 #else
 #define PORTCONTROL_API
diff --git a/include/fal/fal_port_ctrl.h b/include/fal/fal_port_ctrl.h
index cd0ca19..560f5b3 100755
--- a/include/fal/fal_port_ctrl.h
+++ b/include/fal/fal_port_ctrl.h
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014, The Linux Foundation. All rights reserved.
+ * Copyright (c) 2014, 2017, The Linux Foundation. All rights reserved.
  * Permission to use, copy, modify, and/or distribute this software for
  * any purpose with or without fee is hereby granted, provided that the
  * above copyright notice and this permission notice appear in all copies.
@@ -509,15 +509,15 @@
     fal_port_interface_mode_status_get (a_uint32_t dev_id, fal_port_t port_id,
 			      fal_port_interface_mode_t * mode);
  sw_error_t
-	fal_port_counter_set(a_uint32_t dev_id, fal_port_t port_id,
+	fal_debug_phycounter_set(a_uint32_t dev_id, fal_port_t port_id,
 			a_bool_t enable);
  
  sw_error_t
-	fal_port_counter_get(a_uint32_t dev_id, fal_port_t port_id,
+	fal_debug_phycounter_get(a_uint32_t dev_id, fal_port_t port_id,
 			a_bool_t * enable);
  sw_error_t
-	fal_port_counter_show (a_uint32_t dev_id, fal_port_t port_id,
-				  fal_port_counter_info_t * counter_info);
+	fal_debug_phycounter_show (a_uint32_t dev_id, fal_port_t port_id,
+				  fal_port_counter_info_t * port_counter_info);
 
 #ifdef __cplusplus
 }
diff --git a/src/fal_uk/fal_port_ctrl.c b/src/fal_uk/fal_port_ctrl.c
index 8e1f56b..e728a26 100755
--- a/src/fal_uk/fal_port_ctrl.c
+++ b/src/fal_uk/fal_port_ctrl.c
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014, The Linux Foundation. All rights reserved.
+ * Copyright (c) 2014, 2017, The Linux Foundation. All rights reserved.
  * Permission to use, copy, modify, and/or distribute this software for
  * any purpose with or without fee is hereby granted, provided that the
  * above copyright notice and this permission notice appear in all copies.
@@ -723,35 +723,35 @@
 }
 
 sw_error_t
-fal_port_counter_set(a_uint32_t dev_id, fal_port_t port_id,
+fal_debug_phycounter_set(a_uint32_t dev_id, fal_port_t port_id,
                        a_bool_t enable)
 {
     sw_error_t rv;
 
-    rv = sw_uk_exec(SW_API_PT_COUNTER_SET, dev_id, port_id,
+    rv = sw_uk_exec(SW_API_DEBUG_PHYCOUNTER_SET, dev_id, port_id,
                     (a_uint32_t) enable);
     return rv;
 }
 
 sw_error_t
-fal_port_counter_get(a_uint32_t dev_id, fal_port_t port_id,
+fal_debug_phycounter_get(a_uint32_t dev_id, fal_port_t port_id,
                        a_bool_t * enable)
 {
     sw_error_t rv;
 
-    rv = sw_uk_exec(SW_API_PT_COUNTER_GET, dev_id, port_id,
+    rv = sw_uk_exec(SW_API_DEBUG_PHYCOUNTER_GET, dev_id, port_id,
                     (a_uint32_t) enable);
     return rv;
 }
 
 sw_error_t
-fal_port_counter_show(a_uint32_t dev_id, fal_port_t port_id,
-                       fal_port_counter_info_t * counter_info)
+fal_debug_phycounter_show(a_uint32_t dev_id, fal_port_t port_id,
+                       fal_port_counter_info_t * port_counter_info)
 {
     sw_error_t rv;
 
-    rv = sw_uk_exec(SW_API_PT_COUNTER_SHOW, dev_id, port_id,
-                    (a_uint32_t) counter_info);
+    rv = sw_uk_exec(SW_API_DEBUG_PHYCOUNTER_SHOW, dev_id, port_id,
+                    (a_uint32_t) port_counter_info);
     return rv;
 }
 
diff --git a/src/shell/shell_config.c b/src/shell/shell_config.c
index 4bf2cdd..2ef4dc2 100755
--- a/src/shell/shell_config.c
+++ b/src/shell/shell_config.c
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014, 2015, The Linux Foundation. All rights reserved.
+ * Copyright (c) 2014, 2015, 2017, The Linux Foundation. All rights reserved.
  * Permission to use, copy, modify, and/or distribute this software for
  * any purpose with or without fee is hereby granted, provided that the
  * above copyright notice and this permission notice appear in all copies.
@@ -95,9 +95,6 @@
             {"interfaceMode", "set", "set interface mode of phy", "<port_id> <psgmii_baset|psgmii_bx1000|psgmii_fx100|psgmii_amdet|sgmii_baset>", SW_API_PT_INTERFACE_MODE_SET, NULL},
             {"interfaceMode", "get", "get interface mode of phy", "<port_id>", SW_API_PT_INTERFACE_MODE_GET, NULL},
             {"interfaceMode", "status", "get current interface mode of phy", "<port_id>", SW_API_PT_INTERFACE_MODE_STATUS_GET, NULL},
-	        {"counter", "set", "set counter status of a port", "<port_id> <enable|disable>", SW_API_PT_COUNTER_SET, NULL},
-	        {"counter", "get", "get counter status of a port", "<port_id>", SW_API_PT_COUNTER_GET, NULL},
-	        {"counter", "show", "show counter statistics of a port", "<port_id>", SW_API_PT_COUNTER_SHOW, NULL},
             {NULL, NULL, NULL, NULL, (int)NULL, NULL},/*end of desc*/
         },
     },
@@ -742,6 +739,9 @@
             {"aclRule", "dump", "dump all acl rule", "", SW_API_ACL_RULE_DUMP, NULL},
             {"device",  "reset", "reset device",     "", SW_API_SWITCH_RESET, NULL},
             {"ssdk",  "config", "show ssdk configuration",     "", SW_API_SSDK_CFG, NULL},
+            {"phycounter",  "set", "set counter status of a port",   "<port_id> <enable|disable>", SW_API_DEBUG_PHYCOUNTER_SET, NULL},
+            {"phycounter",  "get", "get counter status of a port",   "<port_id>", SW_API_DEBUG_PHYCOUNTER_GET, NULL},
+            {"phycounter",  "show", "show counter of a port",   "<port_id>", SW_API_DEBUG_PHYCOUNTER_SHOW, NULL},
             {NULL, NULL, NULL, NULL, (int)NULL, NULL}/*end of desc*/
         },
     },