summaryrefslogtreecommitdiff
path: root/scripts/const_structs.checkpatch
diff options
context:
space:
mode:
authorAditya Shankar <aditya.shankar@microchip.com>2017-04-07 14:54:58 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2017-04-08 14:00:44 +0300
commit0e490657c7214cce33fbca3d88227298c5c968ae (patch)
tree3c91914da23ab5402440d5bd0446e3be2979f6c0 /scripts/const_structs.checkpatch
parent5600da662e18caa475b2648d645099890cc74216 (diff)
downloadlinux-0e490657c7214cce33fbca3d88227298c5c968ae.tar.xz
staging: wilc1000: Fix problem with wrong vif index
The vif->idx value is always 0 for two interfaces. wl->vif_num = 0; loop { ... vif->idx = wl->vif_num; ... wl->vif_num = i; .... i++; ... } At present, vif->idx is assigned the value of wl->vif_num at the beginning of this block and device is initialized based on this index value. In the next iteration, wl->vif_num is still 0 as it is only updated later but gets assigned to vif->idx in the beginning. This causes problems later when we try to reference a particular interface and also while configuring the firmware. This patch moves the assignment to vif->idx from the beginning of the block to after wl->vif_num is updated with latest value of i. Fixes: commit 735bb39ca3be ("staging: wilc1000: simplify vif[i]->ndev accesses") Cc: <stable@vger.kernel.org> Signed-off-by: Aditya Shankar <aditya.shankar@microchip.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'scripts/const_structs.checkpatch')
0 files changed, 0 insertions, 0 deletions