diff options
author | Denis Cheng <crquan@gmail.com> | 2007-09-02 06:30:18 -0400 |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2007-10-10 19:51:15 -0400 |
commit | ff8ac60948ba819b89e9c87083e8050fc2f89999 (patch) | |
tree | 611975d22d7ddd8c49a073c61e6e4b7c9523fedb /drivers/net/wireless | |
parent | 10d024c1b2fd58af8362670d7d6e5ae52fc33353 (diff) |
drivers/net/: all drivers/net/ cleanup with ARRAY_SIZE
Signed-off-by: Denis Cheng <crquan@gmail.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
Diffstat (limited to 'drivers/net/wireless')
-rw-r--r-- | drivers/net/wireless/airo.c | 6 | ||||
-rw-r--r-- | drivers/net/wireless/hostap/hostap_ioctl.c | 6 | ||||
-rw-r--r-- | drivers/net/wireless/ipw2100.c | 7 | ||||
-rw-r--r-- | drivers/net/wireless/libertas/main.c | 14 | ||||
-rw-r--r-- | drivers/net/wireless/libertas/wext.c | 4 | ||||
-rw-r--r-- | drivers/net/wireless/netwave_cs.c | 6 | ||||
-rw-r--r-- | drivers/net/wireless/prism54/isl_ioctl.c | 7 | ||||
-rw-r--r-- | drivers/net/wireless/ray_cs.c | 6 | ||||
-rw-r--r-- | drivers/net/wireless/wavelan.c | 6 | ||||
-rw-r--r-- | drivers/net/wireless/wavelan_cs.c | 6 | ||||
-rw-r--r-- | drivers/net/wireless/wl3501_cs.c | 2 |
11 files changed, 34 insertions, 36 deletions
diff --git a/drivers/net/wireless/airo.c b/drivers/net/wireless/airo.c index 80ae75999536..7d717c4d9845 100644 --- a/drivers/net/wireless/airo.c +++ b/drivers/net/wireless/airo.c | |||
@@ -7578,9 +7578,9 @@ static const iw_handler airo_private_handler[] = | |||
7578 | 7578 | ||
7579 | static const struct iw_handler_def airo_handler_def = | 7579 | static const struct iw_handler_def airo_handler_def = |
7580 | { | 7580 | { |
7581 | .num_standard = sizeof(airo_handler)/sizeof(iw_handler), | 7581 | .num_standard = ARRAY_SIZE(airo_handler), |
7582 | .num_private = sizeof(airo_private_handler)/sizeof(iw_handler), | 7582 | .num_private = ARRAY_SIZE(airo_private_handler), |
7583 | .num_private_args = sizeof(airo_private_args)/sizeof(struct iw_priv_args), | 7583 | .num_private_args = ARRAY_SIZE(airo_private_args), |
7584 | .standard = airo_handler, | 7584 | .standard = airo_handler, |
7585 | .private = airo_private_handler, | 7585 | .private = airo_private_handler, |
7586 | .private_args = airo_private_args, | 7586 | .private_args = airo_private_args, |
diff --git a/drivers/net/wireless/hostap/hostap_ioctl.c b/drivers/net/wireless/hostap/hostap_ioctl.c index d58ac84f4e9e..730b3541e325 100644 --- a/drivers/net/wireless/hostap/hostap_ioctl.c +++ b/drivers/net/wireless/hostap/hostap_ioctl.c | |||
@@ -3976,9 +3976,9 @@ static const iw_handler prism2_private_handler[] = | |||
3976 | 3976 | ||
3977 | const struct iw_handler_def hostap_iw_handler_def = | 3977 | const struct iw_handler_def hostap_iw_handler_def = |
3978 | { | 3978 | { |
3979 | .num_standard = sizeof(prism2_handler) / sizeof(iw_handler), | 3979 | .num_standard = ARRAY_SIZE(prism2_handler), |
3980 | .num_private = sizeof(prism2_private_handler) / sizeof(iw_handler), | 3980 | .num_private = ARRAY_SIZE(prism2_private_handler), |
3981 | .num_private_args = sizeof(prism2_priv) / sizeof(struct iw_priv_args), | 3981 | .num_private_args = ARRAY_SIZE(prism2_priv), |
3982 | .standard = (iw_handler *) prism2_handler, | 3982 | .standard = (iw_handler *) prism2_handler, |
3983 | .private = (iw_handler *) prism2_private_handler, | 3983 | .private = (iw_handler *) prism2_private_handler, |
3984 | .private_args = (struct iw_priv_args *) prism2_priv, | 3984 | .private_args = (struct iw_priv_args *) prism2_priv, |
diff --git a/drivers/net/wireless/ipw2100.c b/drivers/net/wireless/ipw2100.c index 12a6887cb9f1..b3c07b93afce 100644 --- a/drivers/net/wireless/ipw2100.c +++ b/drivers/net/wireless/ipw2100.c | |||
@@ -8277,10 +8277,9 @@ static struct iw_statistics *ipw2100_wx_wireless_stats(struct net_device *dev) | |||
8277 | 8277 | ||
8278 | static struct iw_handler_def ipw2100_wx_handler_def = { | 8278 | static struct iw_handler_def ipw2100_wx_handler_def = { |
8279 | .standard = ipw2100_wx_handlers, | 8279 | .standard = ipw2100_wx_handlers, |
8280 | .num_standard = sizeof(ipw2100_wx_handlers) / sizeof(iw_handler), | 8280 | .num_standard = ARRAY_SIZE(ipw2100_wx_handlers), |
8281 | .num_private = sizeof(ipw2100_private_handler) / sizeof(iw_handler), | 8281 | .num_private = ARRAY_SIZE(ipw2100_private_handler), |
8282 | .num_private_args = sizeof(ipw2100_private_args) / | 8282 | .num_private_args = ARRAY_SIZE(ipw2100_private_args), |
8283 | sizeof(struct iw_priv_args), | ||
8284 | .private = (iw_handler *) ipw2100_private_handler, | 8283 | .private = (iw_handler *) ipw2100_private_handler, |
8285 | .private_args = (struct iw_priv_args *)ipw2100_private_args, | 8284 | .private_args = (struct iw_priv_args *)ipw2100_private_args, |
8286 | .get_wireless_stats = ipw2100_wx_wireless_stats, | 8285 | .get_wireless_stats = ipw2100_wx_wireless_stats, |
diff --git a/drivers/net/wireless/libertas/main.c b/drivers/net/wireless/libertas/main.c index cb0359df355e..a54171af7b97 100644 --- a/drivers/net/wireless/libertas/main.c +++ b/drivers/net/wireless/libertas/main.c | |||
@@ -123,28 +123,28 @@ struct region_cfp_table { | |||
123 | static struct region_cfp_table region_cfp_table[] = { | 123 | static struct region_cfp_table region_cfp_table[] = { |
124 | {0x10, /*US FCC */ | 124 | {0x10, /*US FCC */ |
125 | channel_freq_power_US_BG, | 125 | channel_freq_power_US_BG, |
126 | sizeof(channel_freq_power_US_BG) / sizeof(struct chan_freq_power), | 126 | ARRAY_SIZE(channel_freq_power_US_BG), |
127 | } | 127 | } |
128 | , | 128 | , |
129 | {0x20, /*CANADA IC */ | 129 | {0x20, /*CANADA IC */ |
130 | channel_freq_power_US_BG, | 130 | channel_freq_power_US_BG, |
131 | sizeof(channel_freq_power_US_BG) / sizeof(struct chan_freq_power), | 131 | ARRAY_SIZE(channel_freq_power_US_BG), |
132 | } | 132 | } |
133 | , | 133 | , |
134 | {0x30, /*EU*/ channel_freq_power_EU_BG, | 134 | {0x30, /*EU*/ channel_freq_power_EU_BG, |
135 | sizeof(channel_freq_power_EU_BG) / sizeof(struct chan_freq_power), | 135 | ARRAY_SIZE(channel_freq_power_EU_BG), |
136 | } | 136 | } |
137 | , | 137 | , |
138 | {0x31, /*SPAIN*/ channel_freq_power_SPN_BG, | 138 | {0x31, /*SPAIN*/ channel_freq_power_SPN_BG, |
139 | sizeof(channel_freq_power_SPN_BG) / sizeof(struct chan_freq_power), | 139 | ARRAY_SIZE(channel_freq_power_SPN_BG), |
140 | } | 140 | } |
141 | , | 141 | , |
142 | {0x32, /*FRANCE*/ channel_freq_power_FR_BG, | 142 | {0x32, /*FRANCE*/ channel_freq_power_FR_BG, |
143 | sizeof(channel_freq_power_FR_BG) / sizeof(struct chan_freq_power), | 143 | ARRAY_SIZE(channel_freq_power_FR_BG), |
144 | } | 144 | } |
145 | , | 145 | , |
146 | {0x40, /*JAPAN*/ channel_freq_power_JPN_BG, | 146 | {0x40, /*JAPAN*/ channel_freq_power_JPN_BG, |
147 | sizeof(channel_freq_power_JPN_BG) / sizeof(struct chan_freq_power), | 147 | ARRAY_SIZE(channel_freq_power_JPN_BG), |
148 | } | 148 | } |
149 | , | 149 | , |
150 | /*Add new region here */ | 150 | /*Add new region here */ |
@@ -1422,7 +1422,7 @@ struct chan_freq_power *libertas_get_region_cfp_table(u8 region, u8 band, int *c | |||
1422 | 1422 | ||
1423 | lbs_deb_enter(LBS_DEB_MAIN); | 1423 | lbs_deb_enter(LBS_DEB_MAIN); |
1424 | 1424 | ||
1425 | end = sizeof(region_cfp_table)/sizeof(struct region_cfp_table); | 1425 | end = ARRAY_SIZE(region_cfp_table); |
1426 | 1426 | ||
1427 | for (i = 0; i < end ; i++) { | 1427 | for (i = 0; i < end ; i++) { |
1428 | lbs_deb_main("region_cfp_table[i].region=%d\n", | 1428 | lbs_deb_main("region_cfp_table[i].region=%d\n", |
diff --git a/drivers/net/wireless/libertas/wext.c b/drivers/net/wireless/libertas/wext.c index 3f628223bc6c..f8036efd7294 100644 --- a/drivers/net/wireless/libertas/wext.c +++ b/drivers/net/wireless/libertas/wext.c | |||
@@ -2149,13 +2149,13 @@ static const iw_handler mesh_wlan_handler[] = { | |||
2149 | (iw_handler) NULL, /* SIOCSIWPMKSA */ | 2149 | (iw_handler) NULL, /* SIOCSIWPMKSA */ |
2150 | }; | 2150 | }; |
2151 | struct iw_handler_def libertas_handler_def = { | 2151 | struct iw_handler_def libertas_handler_def = { |
2152 | .num_standard = sizeof(wlan_handler) / sizeof(iw_handler), | 2152 | .num_standard = ARRAY_SIZE(wlan_handler), |
2153 | .standard = (iw_handler *) wlan_handler, | 2153 | .standard = (iw_handler *) wlan_handler, |
2154 | .get_wireless_stats = wlan_get_wireless_stats, | 2154 | .get_wireless_stats = wlan_get_wireless_stats, |
2155 | }; | 2155 | }; |
2156 | 2156 | ||
2157 | struct iw_handler_def mesh_handler_def = { | 2157 | struct iw_handler_def mesh_handler_def = { |
2158 | .num_standard = sizeof(mesh_wlan_handler) / sizeof(iw_handler), | 2158 | .num_standard = ARRAY_SIZE(mesh_wlan_handler), |
2159 | .standard = (iw_handler *) mesh_wlan_handler, | 2159 | .standard = (iw_handler *) mesh_wlan_handler, |
2160 | .get_wireless_stats = wlan_get_wireless_stats, | 2160 | .get_wireless_stats = wlan_get_wireless_stats, |
2161 | }; | 2161 | }; |
diff --git a/drivers/net/wireless/netwave_cs.c b/drivers/net/wireless/netwave_cs.c index 389fdd313c7e..d8a59afa7178 100644 --- a/drivers/net/wireless/netwave_cs.c +++ b/drivers/net/wireless/netwave_cs.c | |||
@@ -709,9 +709,9 @@ static const iw_handler netwave_private_handler[] = | |||
709 | 709 | ||
710 | static const struct iw_handler_def netwave_handler_def = | 710 | static const struct iw_handler_def netwave_handler_def = |
711 | { | 711 | { |
712 | .num_standard = sizeof(netwave_handler)/sizeof(iw_handler), | 712 | .num_standard = ARRAY_SIZE(netwave_handler), |
713 | .num_private = sizeof(netwave_private_handler)/sizeof(iw_handler), | 713 | .num_private = ARRAY_SIZE(netwave_private_handler), |
714 | .num_private_args = sizeof(netwave_private_args)/sizeof(struct iw_priv_args), | 714 | .num_private_args = ARRAY_SIZE(netwave_private_args), |
715 | .standard = (iw_handler *) netwave_handler, | 715 | .standard = (iw_handler *) netwave_handler, |
716 | .private = (iw_handler *) netwave_private_handler, | 716 | .private = (iw_handler *) netwave_private_handler, |
717 | .private_args = (struct iw_priv_args *) netwave_private_args, | 717 | .private_args = (struct iw_priv_args *) netwave_private_args, |
diff --git a/drivers/net/wireless/prism54/isl_ioctl.c b/drivers/net/wireless/prism54/isl_ioctl.c index f1066614dc31..77ea13bf0c02 100644 --- a/drivers/net/wireless/prism54/isl_ioctl.c +++ b/drivers/net/wireless/prism54/isl_ioctl.c | |||
@@ -3239,10 +3239,9 @@ static const iw_handler prism54_private_handler[] = { | |||
3239 | }; | 3239 | }; |
3240 | 3240 | ||
3241 | const struct iw_handler_def prism54_handler_def = { | 3241 | const struct iw_handler_def prism54_handler_def = { |
3242 | .num_standard = sizeof (prism54_handler) / sizeof (iw_handler), | 3242 | .num_standard = ARRAY_SIZE(prism54_handler), |
3243 | .num_private = sizeof (prism54_private_handler) / sizeof (iw_handler), | 3243 | .num_private = ARRAY_SIZE(prism54_private_handler), |
3244 | .num_private_args = | 3244 | .num_private_args = ARRAY_SIZE(prism54_private_args), |
3245 | sizeof (prism54_private_args) / sizeof (struct iw_priv_args), | ||
3246 | .standard = (iw_handler *) prism54_handler, | 3245 | .standard = (iw_handler *) prism54_handler, |
3247 | .private = (iw_handler *) prism54_private_handler, | 3246 | .private = (iw_handler *) prism54_private_handler, |
3248 | .private_args = (struct iw_priv_args *) prism54_private_args, | 3247 | .private_args = (struct iw_priv_args *) prism54_private_args, |
diff --git a/drivers/net/wireless/ray_cs.c b/drivers/net/wireless/ray_cs.c index 1b0e9707049a..429bca8d0b5f 100644 --- a/drivers/net/wireless/ray_cs.c +++ b/drivers/net/wireless/ray_cs.c | |||
@@ -1567,9 +1567,9 @@ static const struct iw_priv_args ray_private_args[] = { | |||
1567 | 1567 | ||
1568 | static const struct iw_handler_def ray_handler_def = | 1568 | static const struct iw_handler_def ray_handler_def = |
1569 | { | 1569 | { |
1570 | .num_standard = sizeof(ray_handler)/sizeof(iw_handler), | 1570 | .num_standard = ARRAY_SIZE(ray_handler), |
1571 | .num_private = sizeof(ray_private_handler)/sizeof(iw_handler), | 1571 | .num_private = ARRAY_SIZE(ray_private_handler), |
1572 | .num_private_args = sizeof(ray_private_args)/sizeof(struct iw_priv_args), | 1572 | .num_private_args = ARRAY_SIZE(ray_private_args), |
1573 | .standard = ray_handler, | 1573 | .standard = ray_handler, |
1574 | .private = ray_private_handler, | 1574 | .private = ray_private_handler, |
1575 | .private_args = ray_private_args, | 1575 | .private_args = ray_private_args, |
diff --git a/drivers/net/wireless/wavelan.c b/drivers/net/wireless/wavelan.c index b876bf65935b..33ed9fe95f3d 100644 --- a/drivers/net/wireless/wavelan.c +++ b/drivers/net/wireless/wavelan.c | |||
@@ -2400,9 +2400,9 @@ static const struct iw_priv_args wavelan_private_args[] = { | |||
2400 | 2400 | ||
2401 | static const struct iw_handler_def wavelan_handler_def = | 2401 | static const struct iw_handler_def wavelan_handler_def = |
2402 | { | 2402 | { |
2403 | .num_standard = sizeof(wavelan_handler)/sizeof(iw_handler), | 2403 | .num_standard = ARRAY_SIZE(wavelan_handler), |
2404 | .num_private = sizeof(wavelan_private_handler)/sizeof(iw_handler), | 2404 | .num_private = ARRAY_SIZE(wavelan_private_handler), |
2405 | .num_private_args = sizeof(wavelan_private_args)/sizeof(struct iw_priv_args), | 2405 | .num_private_args = ARRAY_SIZE(wavelan_private_args), |
2406 | .standard = wavelan_handler, | 2406 | .standard = wavelan_handler, |
2407 | .private = wavelan_private_handler, | 2407 | .private = wavelan_private_handler, |
2408 | .private_args = wavelan_private_args, | 2408 | .private_args = wavelan_private_args, |
diff --git a/drivers/net/wireless/wavelan_cs.c b/drivers/net/wireless/wavelan_cs.c index 1cc5180ab1e7..9b7f44957869 100644 --- a/drivers/net/wireless/wavelan_cs.c +++ b/drivers/net/wireless/wavelan_cs.c | |||
@@ -2719,9 +2719,9 @@ static const iw_handler wavelan_private_handler[] = | |||
2719 | 2719 | ||
2720 | static const struct iw_handler_def wavelan_handler_def = | 2720 | static const struct iw_handler_def wavelan_handler_def = |
2721 | { | 2721 | { |
2722 | .num_standard = sizeof(wavelan_handler)/sizeof(iw_handler), | 2722 | .num_standard = ARRAY_SIZE(wavelan_handler), |
2723 | .num_private = sizeof(wavelan_private_handler)/sizeof(iw_handler), | 2723 | .num_private = ARRAY_SIZE(wavelan_private_handler), |
2724 | .num_private_args = sizeof(wavelan_private_args)/sizeof(struct iw_priv_args), | 2724 | .num_private_args = ARRAY_SIZE(wavelan_private_args), |
2725 | .standard = wavelan_handler, | 2725 | .standard = wavelan_handler, |
2726 | .private = wavelan_private_handler, | 2726 | .private = wavelan_private_handler, |
2727 | .private_args = wavelan_private_args, | 2727 | .private_args = wavelan_private_args, |
diff --git a/drivers/net/wireless/wl3501_cs.c b/drivers/net/wireless/wl3501_cs.c index cfde68cff94c..2690f291e3f7 100644 --- a/drivers/net/wireless/wl3501_cs.c +++ b/drivers/net/wireless/wl3501_cs.c | |||
@@ -1893,7 +1893,7 @@ static const iw_handler wl3501_handler[] = { | |||
1893 | }; | 1893 | }; |
1894 | 1894 | ||
1895 | static const struct iw_handler_def wl3501_handler_def = { | 1895 | static const struct iw_handler_def wl3501_handler_def = { |
1896 | .num_standard = sizeof(wl3501_handler) / sizeof(iw_handler), | 1896 | .num_standard = ARRAY_SIZE(wl3501_handler), |
1897 | .standard = (iw_handler *)wl3501_handler, | 1897 | .standard = (iw_handler *)wl3501_handler, |
1898 | .get_wireless_stats = wl3501_get_wireless_stats, | 1898 | .get_wireless_stats = wl3501_get_wireless_stats, |
1899 | }; | 1899 | }; |