From: Jiri Pirko Date: Fri, 20 Jul 2012 02:28:50 +0000 (+0000) Subject: bond_sysfs: use real_num_tx_queues rather than params.tx_queue X-Git-Tag: v3.6-rc1~125^2~48^2~1 X-Git-Url: https://openfabrics.org/gitweb/?a=commitdiff_plain;h=8a540ff9e1d685b5feb0a9df5d2b74db1e0b4d39;p=~emulex%2Finfiniband.git 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 Signed-off-by: David S. Miller --- diff --git a/drivers/net/bonding/bond_sysfs.c b/drivers/net/bonding/bond_sysfs.c index 485bedb8278..dc15d248443 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, /* Check buffer length, valid ifname and queue id */ if (strlen(buffer) > IFNAMSIZ || !dev_valid_name(buffer) || - qid > bond->params.tx_queues) + qid > bond->dev->real_num_tx_queues) goto err_no_cmd; /* Get the pointer to that interface if it exists */