net: Use NULL to signal lack of promisc/multicast
authorBarret Rhoden <brho@cs.berkeley.edu>
Tue, 14 Feb 2017 17:28:27 +0000 (12:28 -0500)
committerBarret Rhoden <brho@cs.berkeley.edu>
Tue, 14 Feb 2017 17:28:27 +0000 (12:28 -0500)
commitf22822fdf4d709efa2cdf62fbe768784b5227d94
tree8a5e34aaadd314aa2a924b066132dc5b79a1d97d
parent6fd7915c26e499d1712a308476887a12fdf649c9
net: Use NULL to signal lack of promisc/multicast

The network stack is designed such that the absence of a function pointer
for promisc or multicast means "unsupported."  We should do that instead of
adding functions that just throw errors.

This is necessary for snoopy and promisc mode.  Promisc for devether is
both "give me all packets" (aka, actually promiscuous) and "give me packets
I sent."  snoopy requires the latter, even if the NIC can't support the
former.

Signed-off-by: Barret Rhoden <brho@cs.berkeley.edu>
kern/drivers/net/bnx2x/bnx2x_dev.c
kern/drivers/net/mlx4/main.c
kern/src/net/netif.c