]> git.baikalelectronics.ru Git - kernel.git/commit
rocker: zero allocate ports array
authorScott Feldman <sfeldma@gmail.com>
Mon, 1 Jun 2015 18:39:02 +0000 (11:39 -0700)
committerDavid S. Miller <davem@davemloft.net>
Tue, 2 Jun 2015 00:00:08 +0000 (17:00 -0700)
commit1385e4f13ccde7acbc9644c0dc68d81de2454432
tree2d5891cfb91eaaabbcf68e561dcad2dc22da24f6
parent9c38ed48afcb7b111e630e22206d3bdee861e810
rocker: zero allocate ports array

When allocating the array of rocker port pointers, zero the array values so
we can test for !NULL to see if port is allocated/registered.  We'll need
this later when installing untagged VLAN support for each port, during port
probe.  It's a long story, but to install a VLAN (vid=0 for untagged, in
this case) on a port, we'll need to scan other ports to see if the VLAN
group for that VLAN has been setup.  To scan the other ports, we need to
walk the port array.

Signed-off-by: Scott Feldman <sfeldma@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/rocker/rocker.c