* [PATCH v2 1/8] staging: wilc1000: fix to set correct value for 'vif_num'
[not found] <1549538913-17463-1-git-send-email-ajay.kathat@microchip.com>
@ 2019-02-07 11:28 ` Ajay.Kathat
2019-02-07 11:40 ` Dan Carpenter
0 siblings, 1 reply; 2+ messages in thread
From: Ajay.Kathat @ 2019-02-07 11:28 UTC (permalink / raw)
To: linux-wireless
Cc: devel, gregkh, Adham.Abozaeid, johannes, Ajay.Kathat, stable
From: Ajay Singh <ajay.kathat@microchip.com>
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>
Signed-off-by: Ajay Singh <ajay.kathat@microchip.com>
---
drivers/staging/wilc1000/linux_wlan.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/staging/wilc1000/linux_wlan.c b/drivers/staging/wilc1000/linux_wlan.c
index f096f9e..f3e52af 100644
--- a/drivers/staging/wilc1000/linux_wlan.c
+++ b/drivers/staging/wilc1000/linux_wlan.c
@@ -1020,8 +1020,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;
--
2.7.4
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH v2 1/8] staging: wilc1000: fix to set correct value for 'vif_num'
2019-02-07 11:28 ` [PATCH v2 1/8] staging: wilc1000: fix to set correct value for 'vif_num' Ajay.Kathat
@ 2019-02-07 11:40 ` Dan Carpenter
0 siblings, 0 replies; 2+ messages in thread
From: Dan Carpenter @ 2019-02-07 11:40 UTC (permalink / raw)
To: Ajay.Kathat
Cc: linux-wireless, devel, gregkh, stable, Adham.Abozaeid, johannes
Thanks so much!
Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
regards,
dan carpenter
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2019-02-07 11:40 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <1549538913-17463-1-git-send-email-ajay.kathat@microchip.com>
2019-02-07 11:28 ` [PATCH v2 1/8] staging: wilc1000: fix to set correct value for 'vif_num' Ajay.Kathat
2019-02-07 11:40 ` Dan Carpenter
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).