From: Emil Goode Date: Mon, 22 Sep 2014 22:49:55 +0000 (+0200) Subject: brcmfmac: Fix off by one bug in brcmf_count_20mhz_channels() X-Git-Tag: fixes-for-v3.18-merge-window~72^2~1^2 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f8adaf0ae978252c9f7e29e96aefcd8fcaf806ba;p=pandora-kernel.git brcmfmac: Fix off by one bug in brcmf_count_20mhz_channels() In the brcmf_count_20mhz_channels function we are looping through a list of channels received from firmware. Since the index of the first channel is 0 the condition leads to an off by one bug. This is causing us to hit the WARN_ON_ONCE(1) calls in the brcmu_d11n_decchspec function, which is how I discovered the bug. Introduced by: commit b48d891676f756d48b4d0ee131e4a7a5d43ca417 ("brcmfmac: rework wiphy structure setup") Acked-by: Arend van Spriel Signed-off-by: Emil Goode Signed-off-by: John W. Linville --- Reading git-diff-tree failed