summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/staging/brcm80211/sys/wlc_event.c2
-rw-r--r--drivers/staging/brcm80211/sys/wlc_key.h3
2 files changed, 3 insertions, 2 deletions
diff --git a/drivers/staging/brcm80211/sys/wlc_event.c b/drivers/staging/brcm80211/sys/wlc_event.c
index 7c17e5f67c5..7e1bf0e2ecd 100644
--- a/drivers/staging/brcm80211/sys/wlc_event.c
+++ b/drivers/staging/brcm80211/sys/wlc_event.c
@@ -47,7 +47,7 @@ struct wlc_eventq {
bool workpending;
struct wl_timer *timer;
wlc_eventq_cb_t cb;
- u8 event_inds_mask[roundup(WLC_E_LAST, NBBY) / NBBY];
+ u8 event_inds_mask[broken_roundup(WLC_E_LAST, NBBY) / NBBY];
};
/*
diff --git a/drivers/staging/brcm80211/sys/wlc_key.h b/drivers/staging/brcm80211/sys/wlc_key.h
index d4f1b91f4de..6678c69f1e1 100644
--- a/drivers/staging/brcm80211/sys/wlc_key.h
+++ b/drivers/staging/brcm80211/sys/wlc_key.h
@@ -105,8 +105,9 @@ typedef struct wsec_key {
} wsec_key_t;
+#define broken_roundup(x, y) ((((x) + ((y) - 1)) / (y)) * (y))
typedef struct {
- u8 vec[roundup(WSEC_MAX_KEYS, NBBY) / NBBY]; /* bitvec of wsec_key indexes */
+ u8 vec[broken_roundup(WSEC_MAX_KEYS, NBBY) / NBBY]; /* bitvec of wsec_key indexes */
} wsec_key_vec_t;
/* For use with wsec_key_t.flags */