netvsc: group all per-channel state together
Put all the per-channel state together in one data struct. Signed-off-by: Stephen Hemminger <sthemmin@microsoft.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:

committed by
David S. Miller

parent
ceaaea0483
commit
b8b835a89b
@@ -135,7 +135,7 @@ static int netvsc_close(struct net_device *net)
|
||||
while (true) {
|
||||
aread = 0;
|
||||
for (i = 0; i < nvdev->num_chn; i++) {
|
||||
chn = nvdev->chn_table[i];
|
||||
chn = nvdev->chan_table[i].channel;
|
||||
if (!chn)
|
||||
continue;
|
||||
|
||||
@@ -225,7 +225,7 @@ static u16 netvsc_select_queue(struct net_device *ndev, struct sk_buff *skb,
|
||||
q_idx = new_idx;
|
||||
}
|
||||
|
||||
if (unlikely(!nvsc_dev->chn_table[q_idx]))
|
||||
if (unlikely(!nvsc_dev->chan_table[q_idx].channel))
|
||||
q_idx = 0;
|
||||
|
||||
return q_idx;
|
||||
@@ -545,7 +545,6 @@ no_memory:
|
||||
++net_device_ctx->eth_stats.tx_no_memory;
|
||||
goto drop;
|
||||
}
|
||||
|
||||
/*
|
||||
* netvsc_linkstatus_callback - Link up/down notification
|
||||
*/
|
||||
|
Reference in New Issue
Block a user