diff options
author | Jiri Pirko <jiri@resnulli.us> | 2012-07-19 22:28:50 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2012-07-20 14:07:00 -0400 |
commit | 8a540ff9e1d685b5feb0a9df5d2b74db1e0b4d39 (patch) | |
tree | e15f4ee726e166d5df599d7621a909985be566b2 /drivers/net/bonding/bond_sysfs.c | |
parent | df4ab5b3c295050da09153fa9760042e4de3ffff (diff) |
bond_sysfs: use real_num_tx_queues rather than params.tx_queue
Since now number of tx queues can be specified during bond instance
creation and therefore it may differ from params.tx_queues, use rather
real_num_tx_queues for boundary check.
Signed-off-by: Jiri Pirko <jiri@resnulli.us>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/bonding/bond_sysfs.c')
-rw-r--r-- | drivers/net/bonding/bond_sysfs.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/bonding/bond_sysfs.c b/drivers/net/bonding/bond_sysfs.c index 485bedb8278c..dc15d248443f 100644 --- a/drivers/net/bonding/bond_sysfs.c +++ b/drivers/net/bonding/bond_sysfs.c | |||
@@ -1495,7 +1495,7 @@ static ssize_t bonding_store_queue_id(struct device *d, | |||
1495 | /* Check buffer length, valid ifname and queue id */ | 1495 | /* Check buffer length, valid ifname and queue id */ |
1496 | if (strlen(buffer) > IFNAMSIZ || | 1496 | if (strlen(buffer) > IFNAMSIZ || |
1497 | !dev_valid_name(buffer) || | 1497 | !dev_valid_name(buffer) || |
1498 | qid > bond->params.tx_queues) | 1498 | qid > bond->dev->real_num_tx_queues) |
1499 | goto err_no_cmd; | 1499 | goto err_no_cmd; |
1500 | 1500 | ||
1501 | /* Get the pointer to that interface if it exists */ | 1501 | /* Get the pointer to that interface if it exists */ |