xiaoxiang781216 commented on code in PR #11422:
URL: https://github.com/apache/nuttx/pull/11422#discussion_r1431689730


##########
drivers/net/ksz9477.c:
##########
@@ -36,6 +36,21 @@
  * Private Data
  ****************************************************************************/
 
+#ifdef CONFIG_NET_KSZ9477_PORT_VLAN
+
+static uint8_t port_vlan_config[] =

Review Comment:
   ```suggestion
   static uint8_t g_port_vlan_config[] =
   ```



##########
include/nuttx/net/ksz9477.h:
##########
@@ -91,6 +91,62 @@ int ksz9477_i2c_init(struct i2c_master_s *i2c_bus,
 #  error Only I2c interface currently supported
 #endif
 
+/****************************************************************************
+ * Name: ksz9477_enable_port_vlan
+ *
+ * Description:
+ *   Enables static port-based VLAN, which can be configured in the switch
+ *   queue management's port control registers
+ *
+ * Input Parameters:
+ *   None
+ *
+ * Returned Value:
+ *   OK or negative error number
+ *
+ ****************************************************************************/
+
+int ksz9477_enable_port_vlan(void);
+
+/****************************************************************************
+ * Name: ksz9477_disable_port_vlan
+ *
+ * Description:
+ *   Disables the static port-based VLAN
+ *
+ * Input Parameters:
+ *   None
+ *
+ * Returned Value:
+ *   OK or negative error number
+ *
+ ****************************************************************************/
+
+int ksz9477_disable_port_vlan(void);
+
+/****************************************************************************
+ * Name: ksz9477_configure_port_vlan
+ *
+ * Description:
+ *   Configures the static port-based VLAN for a single port
+ *   The change will become effective next time when the switch is
+ *   initialized.
+ *
+ * Input Parameters:
+ *   port: The port being configured (1-7)
+ *   disable: Bitmask of ports where frames may not be forwarded to.
+ *            Bit 0 is for port 1, bit 1 for port 2 etc.
+ *   enable: Bitmask of ports where frames may be forwarded to.
+ *            Bit 0 is for port 1, bit 1 for port 2 etc.
+ *
+ * Returned Value:
+ *   OK or negative error number
+ *
+ ****************************************************************************/
+
+int ksz9477_configure_port_vlan(ksz9477_port_t port, uint8_t disable,

Review Comment:
   why expose these functions publicly



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to