net: xen-netback: correctly restart Tx after a VM restore/migrate
[pandora-kernel.git] / drivers / net / niu.c
index cd6c231..ed47585 100644 (file)
@@ -9201,7 +9201,7 @@ static int __devinit niu_ldg_init(struct niu *np)
 
        first_chan = 0;
        for (i = 0; i < port; i++)
-               first_chan += parent->rxchan_per_port[port];
+               first_chan += parent->rxchan_per_port[i];
        num_chan = parent->rxchan_per_port[port];
 
        for (i = first_chan; i < (first_chan + num_chan); i++) {
@@ -9217,7 +9217,7 @@ static int __devinit niu_ldg_init(struct niu *np)
 
        first_chan = 0;
        for (i = 0; i < port; i++)
-               first_chan += parent->txchan_per_port[port];
+               first_chan += parent->txchan_per_port[i];
        num_chan = parent->txchan_per_port[port];
        for (i = first_chan; i < (first_chan + num_chan); i++) {
                err = niu_ldg_assign_ldn(np, parent,