From: Ben Hutchings Date: Tue, 28 Sep 2010 05:11:51 +0000 (-0700) Subject: tg3: Use netif_set_real_num_{rx,tx}_queues() X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=2ddaad397c47de012dfb956b0c05540da1a0dde5;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git tg3: Use netif_set_real_num_{rx,tx}_queues() Signed-off-by: Ben Hutchings Signed-off-by: David S. Miller --- diff --git a/drivers/net/tg3.c b/drivers/net/tg3.c index fdb438dca9b3..54fff5bb6f98 100644 --- a/drivers/net/tg3.c +++ b/drivers/net/tg3.c @@ -8821,7 +8821,12 @@ static bool tg3_enable_msix(struct tg3 *tp) for (i = 0; i < tp->irq_max; i++) tp->napi[i].irq_vec = msix_ent[i].vector; - tp->dev->real_num_tx_queues = 1; + netif_set_real_num_tx_queues(tp->dev, 1); + rc = tp->irq_cnt > 1 ? tp->irq_cnt - 1 : 1; + if (netif_set_real_num_rx_queues(tp->dev, rc)) { + pci_disable_msix(tp->pdev); + return false; + } if (tp->irq_cnt > 1) tp->tg3_flags3 |= TG3_FLG3_ENABLE_RSS; @@ -8856,7 +8861,7 @@ defcfg: if (!(tp->tg3_flags2 & TG3_FLG2_USING_MSIX)) { tp->irq_cnt = 1; tp->napi[0].irq_vec = tp->pdev->irq; - tp->dev->real_num_tx_queues = 1; + netif_set_real_num_tx_queues(tp->dev, 1); } }