diff options
author | Razvan Stefanescu <razvan.stefanescu@nxp.com> | 2019-07-05 17:27:11 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2019-07-22 07:34:12 +0200 |
commit | 543ba01d99cc6b4007c1f9a475c1d572c46a5543 (patch) | |
tree | af57662012101ec2ad2a29cd32e9f2a26003bb16 /drivers/staging/fsl-dpaa2 | |
parent | staging: wlan-ng: use "%*pE" for serial number (diff) | |
download | linux-dev-543ba01d99cc6b4007c1f9a475c1d572c46a5543.tar.xz linux-dev-543ba01d99cc6b4007c1f9a475c1d572c46a5543.zip |
staging: fsl-dpaa2/ethsw: Fix setting port learning/flooding flags
ethsw_set_learning()/ethsw_set_flood() use flags parameter as an
enable/disable (1/0) indicator. Previous usage sent incorrect values.
Signed-off-by: Razvan Stefanescu <razvan.stefanescu@nxp.com>
Signed-off-by: Ioana Ciornei <ioana.ciornei@nxp.com>
Link: https://lore.kernel.org/r/1562336836-17119-2-git-send-email-ioana.ciornei@nxp.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/fsl-dpaa2')
-rw-r--r-- | drivers/staging/fsl-dpaa2/ethsw/ethsw.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/staging/fsl-dpaa2/ethsw/ethsw.c b/drivers/staging/fsl-dpaa2/ethsw/ethsw.c index f73edaf6ce87..87470070c3a5 100644 --- a/drivers/staging/fsl-dpaa2/ethsw/ethsw.c +++ b/drivers/staging/fsl-dpaa2/ethsw/ethsw.c @@ -673,11 +673,12 @@ static int port_attr_br_flags_set(struct net_device *netdev, return 0; /* Learning is enabled per switch */ - err = ethsw_set_learning(port_priv->ethsw_data, flags & BR_LEARNING); + err = ethsw_set_learning(port_priv->ethsw_data, + !!(flags & BR_LEARNING)); if (err) goto exit; - err = ethsw_port_set_flood(port_priv, flags & BR_FLOOD); + err = ethsw_port_set_flood(port_priv, !!(flags & BR_FLOOD)); exit: return err; |