OSDN Git Service

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)
commit27b808cbc2ad72608fb2fd9abd81930d32464546
tree2d5891cfb91eaaabbcf68e561dcad2dc22da24f6
parent66e5133f19e901a044fa5eaeeb6ecff4545839e5
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