From: Arend van Spriel <ar...@broadcom.com>

The macro FOREACH_BSS did an assignment inside the if condition. The
macro has been modified to get rid of the error.

Signed-off-by: Arend van Spriel <ar...@broadcom.com>
Reviewed-by: Roland Vossen <rvos...@broadcom.com>
---
 drivers/staging/brcm80211/brcmsmac/main.c |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/brcm80211/brcmsmac/main.c 
b/drivers/staging/brcm80211/brcmsmac/main.c
index f7ebaf1..9aa74df 100644
--- a/drivers/staging/brcm80211/brcmsmac/main.c
+++ b/drivers/staging/brcm80211/brcmsmac/main.c
@@ -254,8 +254,9 @@ const u8 wlc_prio2prec_map[] = {
 
 /* As above for all non-NULL BSS configs */
 #define FOREACH_BSS(wlc, idx, cfg) \
-       for (idx = 0; (int) idx < WLC_MAXBSSCFG; idx++) \
-               if ((cfg = (wlc)->bsscfg[idx]))
+       for (idx = 0, cfg = (wlc)->bsscfg[idx]; \
+            idx < WLC_MAXBSSCFG; cfg = (wlc)->bsscfg[++idx]) \
+               if (cfg)
 
 /* Sanity check for tx_prec_map and fifo synchup
  * Either there are some packets pending for the fifo, else if fifo is empty 
then
-- 
1.7.1


_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/devel

Reply via email to