summaryrefslogtreecommitdiffstats
path: root/drivers/staging/brcm80211/sys
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@suse.de>2010-10-08 11:47:11 -0700
committerGreg Kroah-Hartman <gregkh@suse.de>2010-10-08 11:47:11 -0700
commit8d3d6a6945df5c78c7f7882dabdb5638b05b2f5c (patch)
tree4b1c423dda2541ab504c6961752afc41ddf63e0b /drivers/staging/brcm80211/sys
parentce0f1b8cd1526e800b8f3c1e978ac7c23ed91e2f (diff)
downloadop-kernel-dev-8d3d6a6945df5c78c7f7882dabdb5638b05b2f5c.zip
op-kernel-dev-8d3d6a6945df5c78c7f7882dabdb5638b05b2f5c.tar.gz
Staging: brcm80211: remove ARRAYSIZE macro
Use the real 'ARRAY_SIZE' definition instead. Cc: Brett Rudley <brudley@broadcom.com> Cc: Henry Ptasinski <henryp@broadcom.com> Cc: Nohee Ko <noheek@broadcom.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/staging/brcm80211/sys')
-rw-r--r--drivers/staging/brcm80211/sys/wlc_bmac.c10
-rw-r--r--drivers/staging/brcm80211/sys/wlc_channel.c16
2 files changed, 13 insertions, 13 deletions
diff --git a/drivers/staging/brcm80211/sys/wlc_bmac.c b/drivers/staging/brcm80211/sys/wlc_bmac.c
index 33c03f4..871ee99 100644
--- a/drivers/staging/brcm80211/sys/wlc_bmac.c
+++ b/drivers/staging/brcm80211/sys/wlc_bmac.c
@@ -926,7 +926,7 @@ BCMATTACHFN(wlc_bmac_attach) (wlc_info_t *wlc, u16 vendor, u16 device,
/* init tx fifo size */
ASSERT((wlc_hw->corerev - XMTFIFOTBL_STARTREV) <
- ARRAYSIZE(xmtfifo_sz));
+ ARRAY_SIZE(xmtfifo_sz));
wlc_hw->xmtfifo_sz =
xmtfifo_sz[(wlc_hw->corerev - XMTFIFOTBL_STARTREV)];
@@ -1500,7 +1500,7 @@ wlc_bmac_mhf(wlc_hw_info_t *wlc_hw, u8 idx, u16 mask, u16 val,
ASSERT((val & ~mask) == 0);
ASSERT(idx < MHFMAX);
- ASSERT(ARRAYSIZE(addr) == MHFMAX);
+ ASSERT(ARRAY_SIZE(addr) == MHFMAX);
switch (bands) {
/* Current band only or all bands,
@@ -1576,7 +1576,7 @@ static void wlc_write_mhf(wlc_hw_info_t *wlc_hw, u16 *mhfs)
M_HOST_FLAGS5
};
- ASSERT(ARRAYSIZE(addr) == MHFMAX);
+ ASSERT(ARRAY_SIZE(addr) == MHFMAX);
for (idx = 0; idx < MHFMAX; idx++) {
wlc_bmac_write_shm(wlc_hw, addr[idx], mhfs[idx]);
@@ -3595,7 +3595,7 @@ static void wlc_upd_ofdm_pctl1_table(wlc_hw_info_t *wlc_hw)
return;
/* walk the phy rate table and update the entries */
- for (i = 0; i < ARRAYSIZE(rates); i++) {
+ for (i = 0; i < ARRAY_SIZE(rates); i++) {
rate = rates[i];
entry_ptr = wlc_bmac_ofdm_ratetable_offset(wlc_hw, rate);
@@ -3634,7 +3634,7 @@ static u16 wlc_bmac_ofdm_ratetable_offset(wlc_hw_info_t *wlc_hw, u8 rate)
{WLC_RATE_54M, 0xC}
};
- for (i = 0; i < ARRAYSIZE(rate_lookup); i++) {
+ for (i = 0; i < ARRAY_SIZE(rate_lookup); i++) {
if (rate == rate_lookup[i].rate) {
plcp_rate = rate_lookup[i].signal_rate;
break;
diff --git a/drivers/staging/brcm80211/sys/wlc_channel.c b/drivers/staging/brcm80211/sys/wlc_channel.c
index a408bf6..1c3c043 100644
--- a/drivers/staging/brcm80211/sys/wlc_channel.c
+++ b/drivers/staging/brcm80211/sys/wlc_channel.c
@@ -380,7 +380,7 @@ void wlc_locale_get_channels(const locale_info_t *locale, chanvec_t *channels)
bzero(channels, sizeof(chanvec_t));
- for (i = 0; i < ARRAYSIZE(g_table_locale_base); i++) {
+ for (i = 0; i < ARRAY_SIZE(g_table_locale_base); i++) {
if (locale->valid_channels & (1 << i)) {
wlc_locale_add_channels(channels,
g_table_locale_base[i]);
@@ -562,10 +562,10 @@ struct chan20_info chan20_info[] = {
const locale_info_t *wlc_get_locale_2g(u8 locale_idx)
{
- if (locale_idx >= ARRAYSIZE(g_locale_2g_table)) {
+ if (locale_idx >= ARRAY_SIZE(g_locale_2g_table)) {
WL_ERROR(("%s: locale 2g index size out of range %d\n",
__func__, locale_idx));
- ASSERT(locale_idx < ARRAYSIZE(g_locale_2g_table));
+ ASSERT(locale_idx < ARRAY_SIZE(g_locale_2g_table));
return NULL;
}
return g_locale_2g_table[locale_idx];
@@ -573,10 +573,10 @@ const locale_info_t *wlc_get_locale_2g(u8 locale_idx)
const locale_info_t *wlc_get_locale_5g(u8 locale_idx)
{
- if (locale_idx >= ARRAYSIZE(g_locale_5g_table)) {
+ if (locale_idx >= ARRAY_SIZE(g_locale_5g_table)) {
WL_ERROR(("%s: locale 5g index size out of range %d\n",
__func__, locale_idx));
- ASSERT(locale_idx < ARRAYSIZE(g_locale_5g_table));
+ ASSERT(locale_idx < ARRAY_SIZE(g_locale_5g_table));
return NULL;
}
return g_locale_5g_table[locale_idx];
@@ -584,7 +584,7 @@ const locale_info_t *wlc_get_locale_5g(u8 locale_idx)
const locale_mimo_info_t *wlc_get_mimo_2g(u8 locale_idx)
{
- if (locale_idx >= ARRAYSIZE(g_mimo_2g_table)) {
+ if (locale_idx >= ARRAY_SIZE(g_mimo_2g_table)) {
WL_ERROR(("%s: mimo 2g index size out of range %d\n", __func__,
locale_idx));
return NULL;
@@ -594,7 +594,7 @@ const locale_mimo_info_t *wlc_get_mimo_2g(u8 locale_idx)
const locale_mimo_info_t *wlc_get_mimo_5g(u8 locale_idx)
{
- if (locale_idx >= ARRAYSIZE(g_mimo_5g_table)) {
+ if (locale_idx >= ARRAY_SIZE(g_mimo_5g_table)) {
WL_ERROR(("%s: mimo 5g index size out of range %d\n", __func__,
locale_idx));
return NULL;
@@ -886,7 +886,7 @@ static const country_info_t *wlc_country_lookup_direct(const char *ccode,
return NULL;
/* find matched table entry from country code */
- size = ARRAYSIZE(cntry_locales);
+ size = ARRAY_SIZE(cntry_locales);
for (i = 0; i < size; i++) {
if (strcmp(ccode, cntry_locales[i].abbrev) == 0) {
return &cntry_locales[i].country;
OpenPOWER on IntegriCloud