staging: wilc1000: fix to set correct value for 'vif_num'
authorAjay Singh <ajay.kathat@microchip.com>
Thu, 7 Feb 2019 11:28:58 +0000 (11:28 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 10 Mar 2019 06:17:16 +0000 (07:17 +0100)
commit14af4eff14c2d079d1dede5eb2771815a9db8100
tree73c6310449b04d58c13c64ae3f6f0135176a7ac8
parent63efda29f359591c43d52cc4a3e86b7f693e2269
staging: wilc1000: fix to set correct value for 'vif_num'

commit dda037057a572f5c82ac2499eb4e6fb17600ba3e upstream.

Set correct value in '->vif_num' for the total number of interfaces and
set '->idx' value using 'i'.

Fixes: 735bb39ca3be ("staging: wilc1000: simplify vif[i]->ndev accesses")
Fixes: 0e490657c721 ("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>
drivers/staging/wilc1000/linux_wlan.c