sh_eth: Fix promiscuous mode on chips without TSU
authorBen Hutchings <ben.hutchings@codethink.co.uk>
Fri, 16 Jan 2015 17:51:12 +0000 (17:51 +0000)
committerDavid S. Miller <davem@davemloft.net>
Mon, 19 Jan 2015 20:37:40 +0000 (15:37 -0500)
commitb37feed7c2803cce71a746623594f19bbb5a21aa
tree555eac27573c32dc946084ab483be1f015a16d52
parent9d289715eb5c252ae15bd547cb252ca547a3c4f2
sh_eth: Fix promiscuous mode on chips without TSU

Currently net_device_ops::set_rx_mode is only implemented for
chips with a TSU (multiple address table).  However we do need
to turn the PRM (promiscuous) flag on and off for other chips.

- Remove the unlikely() from the TSU functions that we may safely
  call for chips without a TSU
- Make setting of the MCT flag conditional on the tsu capability flag
- Rename sh_eth_set_multicast_list() to sh_eth_set_rx_mode() and plumb
  it into both net_device_ops structures
- Remove the previously-unreachable branch in sh_eth_rx_mode() that
  would otherwise reset the flags to defaults for non-TSU chips

Signed-off-by: Ben Hutchings <ben.hutchings@codethink.co.uk>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/renesas/sh_eth.c