]> git.baikalelectronics.ru Git - kernel.git/commit
net/ncsi: Don't limit vids based on hot_channel
authorSamuel Mendoza-Jonas <sam@mendozajonas.com>
Wed, 11 Oct 2017 05:54:27 +0000 (16:54 +1100)
committerDavid S. Miller <davem@davemloft.net>
Thu, 12 Oct 2017 03:10:37 +0000 (20:10 -0700)
commit5c2f9b356a06999460377a905ceb3e0ed2bd3c39
tree581473860a778dc30a19cbf9a9026bc639af517a
parent26f400c6c38f6ca2fdec8d9e91a377c5d50fe212
net/ncsi: Don't limit vids based on hot_channel

Currently we drop any new VLAN ids if there are more than the current
(or last used) channel can support. Most importantly this is a problem
if no channel has been selected yet, resulting in a segfault.

Secondly this does not necessarily reflect the capabilities of any other
channels. Instead only drop a new VLAN id if we are already tracking the
maximum allowed by the NCSI specification. Per-channel limits are
already handled by ncsi_add_filter(), but add a message to set_one_vid()
to make it obvious that the channel can not support any more VLAN ids.

Signed-off-by: Samuel Mendoza-Jonas <sam@mendozajonas.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ncsi/internal.h
net/ncsi/ncsi-manage.c