]> git.baikalelectronics.ru Git - kernel.git/commit
net: systemport: Simplify queue mapping logic
authorFlorian Fainelli <f.fainelli@gmail.com>
Tue, 6 Nov 2018 23:15:17 +0000 (15:15 -0800)
committerDavid S. Miller <davem@davemloft.net>
Tue, 6 Nov 2018 23:39:48 +0000 (15:39 -0800)
commitd63961dd9b95d7b95bfb912e9c113965902ac54d
tree10de63594ed4e886a6c50e72629d1252062b6571
parentb237d012181dd8b03d211b2c8ac2292270b5c07a
net: systemport: Simplify queue mapping logic

The use of a bitmap speeds up the finding of the first available queue
to which we could start establishing the mapping for, but we still have
to loop over all slave network devices to set them up. Simplify the
logic to have a single loop, and use the fact that a correctly
configured ring has inspect set to true. This will make things simpler
to unwind during device unregistration.

Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/broadcom/bcmsysport.c
drivers/net/ethernet/broadcom/bcmsysport.h