staging: wilc1000: use RCU list to maintain vif interfaces list
authorAjay Singh <ajay.kathat@microchip.com>
Thu, 26 Sep 2019 15:14:59 +0000 (15:14 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 30 Sep 2019 19:58:03 +0000 (21:58 +0200)
commit8399918f3056e1033f0f4c08eab437fb38d6f22d
tree22eea083c86152ca8969c129a3fd4c28abf3a16b
parentfb2d74342fedca6074dd3c4ae9339f76d35caac3
staging: wilc1000: use RCU list to maintain vif interfaces list

Make use of RCU list to maintain virtual interfaces instead of an array.
The update operation on 'vif' list is less compare to the read
operations. Mostly the 'vif' list elements are accessed for the read
operation, so RCU list is more suited for this requirement.
The shifting of interface index id's during the delete interface is not
required. As the firmware only supports 2 interfaces so make use of
available free slot index id during add interface.

Signed-off-by: Ajay Singh <ajay.kathat@microchip.com>
Link: https://lore.kernel.org/r/20190926151436.27819-3-ajay.kathat@microchip.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/wilc1000/wilc_hif.c
drivers/staging/wilc1000/wilc_netdev.c
drivers/staging/wilc1000/wilc_wfi_cfgoperations.c
drivers/staging/wilc1000/wilc_wfi_cfgoperations.h
drivers/staging/wilc1000/wilc_wfi_netdevice.h