mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-10-02 23:27:06 +00:00
staging: wilc1000: fix to set correct value for 'vif_num'
commitdda037057a
upstream. Set correct value in '->vif_num' for the total number of interfaces and set '->idx' value using 'i'. Fixes:735bb39ca3
("staging: wilc1000: simplify vif[i]->ndev accesses") Fixes:0e490657c7
("staging: wilc1000: Fix problem with wrong vif index") Cc: <stable@vger.kernel.org> Suggested-by: Dan Carpenter <dan.carpenter@oracle.com> Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
af742361d1
commit
5762d86d5b
1 changed files with 2 additions and 2 deletions
|
@ -1263,8 +1263,8 @@ int wilc_netdev_init(struct wilc **wilc, struct device *dev, int io_type,
|
|||
vif->wilc = *wilc;
|
||||
vif->ndev = ndev;
|
||||
wl->vif[i] = vif;
|
||||
wl->vif_num = i;
|
||||
vif->idx = wl->vif_num;
|
||||
wl->vif_num = i + 1;
|
||||
vif->idx = i;
|
||||
|
||||
ndev->netdev_ops = &wilc_netdev_ops;
|
||||
|
||||
|
|
Loading…
Reference in a new issue