diff options
author | Ansuel Smith <ansuelsmth@gmail.com> | 2021-11-23 16:44:46 +0100 |
---|---|---|
committer | Jakub Kicinski <kuba@kernel.org> | 2021-11-24 17:28:34 -0800 |
commit | 0898ca67b86e14207d4feb3f3fea8b87cec5aab1 (patch) | |
tree | 1c3e011629d3a8226be86fc0119fe38504c62ad1 /drivers/net | |
parent | e670e1e86beb82a6eef0d9b451829a32cfa23c81 (diff) | |
download | linux-0898ca67b86e14207d4feb3f3fea8b87cec5aab1.tar.bz2 |
net: dsa: qca8k: fix warning in LAG feature
Fix warning reported by bot.
Make sure hash is init to 0 and fix wrong logic for hash_type in
qca8k_lag_can_offload.
Reported-by: kernel test robot <lkp@intel.com>
Fixes: def975307c01 ("net: dsa: qca8k: add LAG support")
Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
Link: https://lore.kernel.org/r/20211123154446.31019-1-ansuelsmth@gmail.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'drivers/net')
-rw-r--r-- | drivers/net/dsa/qca8k.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/dsa/qca8k.c b/drivers/net/dsa/qca8k.c index 6516df08a5d5..d04b25eca250 100644 --- a/drivers/net/dsa/qca8k.c +++ b/drivers/net/dsa/qca8k.c @@ -2228,7 +2228,7 @@ qca8k_lag_can_offload(struct dsa_switch *ds, if (info->tx_type != NETDEV_LAG_TX_TYPE_HASH) return false; - if (info->hash_type != NETDEV_LAG_HASH_L2 || + if (info->hash_type != NETDEV_LAG_HASH_L2 && info->hash_type != NETDEV_LAG_HASH_L23) return false; @@ -2242,8 +2242,8 @@ qca8k_lag_setup_hash(struct dsa_switch *ds, { struct qca8k_priv *priv = ds->priv; bool unique_lag = true; + u32 hash = 0; int i, id; - u32 hash; id = dsa_lag_id(ds->dst, lag); |