tg3: fix ring init when there are more TX than RX channels
authorThadeu Lima de Souza Cascardo <cascardo@linux.vnet.ibm.com>
Tue, 25 Nov 2014 16:21:11 +0000 (14:21 -0200)
committerDavid S. Miller <davem@davemloft.net>
Tue, 25 Nov 2014 20:18:45 +0000 (15:18 -0500)
commita620a6bc1c94c22d6c312892be1e0ae171523125
tree31093d51e496a0cc052c73a4f57e3141bd233d96
parentc3658e8d0f10147fc86018be7f11668246c156d3
tg3: fix ring init when there are more TX than RX channels

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>
drivers/net/ethernet/broadcom/tg3.c