tg3: fix ring init when there are more TX than RX channels

commit a620a6bc1c upstream.

If TX channels are set to 4 and RX channels are set to less than 4,
using ethtool -L, the driver will try to initialize more RX channels
than it has allocated, causing an oops.

This fix only initializes the RX ring if it has been allocated.

Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@linux.vnet.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Luis Henriques <luis.henriques@canonical.com>
This commit is contained in:
Thadeu Lima de Souza Cascardo 2014-11-25 14:21:11 -02:00 • committed by Luis Henriques
commit eb930c4acc