nss-clients: fix mgr

This commit is contained in:
breeze303 2024-12-03 21:08:53 +08:00
parent c5815cd5db
commit 02135827f5

View File

@ -0,0 +1,95 @@
--- a/bridge/nss_bridge_mgr.c
+++ b/bridge/nss_bridge_mgr.c
@@ -177,14 +177,16 @@ static int nss_bridge_mgr_enable_fdb_lea
disable_fdb_learning:
newaddr_lrn.lrn_en = 0;
newaddr_lrn.action = FAL_MAC_FRWRD;
- if (fal_vsi_newaddr_lrn_set(NSS_BRIDGE_MGR_SWITCH_ID, br->vsi, &newaddr_lrn))
+ if (fal_vsi_newaddr_lrn_set(NSS_BRIDGE_MGR_SWITCH_ID, br->vsi, &newaddr_lrn)) {
nss_bridge_mgr_warn("%px: Failed to disable FDB learning for Bridge vsi\n", br);
+ }
disable_sta_move:
sta_move.stamove_en = 0;
sta_move.action = FAL_MAC_FRWRD;
- if (fal_vsi_stamove_set(NSS_BRIDGE_MGR_SWITCH_ID, br->vsi, &sta_move))
+ if (fal_vsi_stamove_set(NSS_BRIDGE_MGR_SWITCH_ID, br->vsi, &sta_move)) {
nss_bridge_mgr_warn("%px: Failed to disable station move for Bridge vsi\n", br);
+ }
return -1;
}
@@ -242,14 +244,16 @@ static int nss_bridge_mgr_disable_fdb_le
enable_fdb_learning:
newaddr_lrn.lrn_en = 1;
newaddr_lrn.action = FAL_MAC_FRWRD;
- if (fal_vsi_newaddr_lrn_set(NSS_BRIDGE_MGR_SWITCH_ID, br->vsi, &newaddr_lrn))
+ if (fal_vsi_newaddr_lrn_set(NSS_BRIDGE_MGR_SWITCH_ID, br->vsi, &newaddr_lrn)) {
nss_bridge_mgr_warn("%px: Failed to enable FDB learning for Bridge vsi\n", br);
+ }
enable_sta_move:
sta_move.stamove_en = 1;
sta_move.action = FAL_MAC_FRWRD;
- if (fal_vsi_stamove_set(NSS_BRIDGE_MGR_SWITCH_ID, br->vsi, &sta_move))
+ if (fal_vsi_stamove_set(NSS_BRIDGE_MGR_SWITCH_ID, br->vsi, &sta_move)) {
nss_bridge_mgr_warn("%px: Failed to enable station move for Bridge vsi\n", br);
+ }
return -1;
}
@@ -323,10 +327,10 @@ static int nss_bridge_mgr_add_bond_slave
if (nss_bridge_tx_join_msg(b_pvt->ifnum,
slave) != NSS_TX_SUCCESS) {
- if (ppe_port_vsi_set(NSS_BRIDGE_MGR_SWITCH_ID, port_id, *port_vsi))
+ if (ppe_port_vsi_set(NSS_BRIDGE_MGR_SWITCH_ID, port_id, *port_vsi)) {
nss_bridge_mgr_warn("%px: Couldn't set bridge VSI for port %d\n", b_pvt, port_id);
- nss_bridge_mgr_warn("%px: Couldn't add port %d in bridge",
- b_pvt, port_id);
+ }
+ nss_bridge_mgr_warn("%px: Couldn't add port %d in bridge", b_pvt, port_id);
return -1;
}
@@ -1005,9 +1009,9 @@ int nss_bridge_mgr_unregister_br(struct
* Please refer to the function bridge_configure_vsi_unassign
* in NSS firmware for detailed operation.
*/
- if (nss_bridge_tx_vsi_unassign_msg(b_pvt->ifnum, b_pvt->vsi) != NSS_TX_SUCCESS)
+ if (nss_bridge_tx_vsi_unassign_msg(b_pvt->ifnum, b_pvt->vsi) != NSS_TX_SUCCESS) {
nss_bridge_mgr_warn("%px: failed to unassign vsi\n", b_pvt);
-
+ }
ppe_vsi_free(NSS_BRIDGE_MGR_SWITCH_ID, b_pvt->vsi);
/*
@@ -1486,7 +1490,7 @@ static struct notifier_block nss_bridge_
* nss_bridge_mgr_wan_inf_add_handler
* Marks an interface as a WAN interface for special handling by bridge.
*/
-static int nss_bridge_mgr_wan_intf_add_handler(struct ctl_table *table,
+static int nss_bridge_mgr_wan_intf_add_handler(const struct ctl_table *table,
int write, void __user *buffer,
size_t *lenp, loff_t *ppos)
{
@@ -1535,7 +1539,7 @@ static int nss_bridge_mgr_wan_intf_add_h
* nss_bridge_mgr_wan_inf_del_handler
* Un-marks an interface as a WAN interface.
*/
-static int nss_bridge_mgr_wan_intf_del_handler(struct ctl_table *table,
+static int nss_bridge_mgr_wan_intf_del_handler(const struct ctl_table *table,
int write, void __user *buffer,
size_t *lenp, loff_t *ppos)
{
--- a/vlan/nss_vlan_mgr.c
+++ b/vlan/nss_vlan_mgr.c
@@ -1549,7 +1549,7 @@ static int nss_vlan_mgr_update_ppe_tpid(
* nss_vlan_mgr_tpid_proc_handler()
* Sets customer TPID and service TPID
*/
-static int nss_vlan_mgr_tpid_proc_handler(struct ctl_table *ctl,
+static int nss_vlan_mgr_tpid_proc_handler(const struct ctl_table *ctl,
int write, void __user *buffer,
size_t *lenp, loff_t *ppos)
{