diff options
author | Jiri Benc <jbenc@suse.cz> | 2005-08-25 20:04:43 -0400 |
---|---|---|
committer | Jeff Garzik <jgarzik@pobox.com> | 2005-08-25 20:04:43 -0400 |
commit | c4aee8c21ff5d8d6f9a27112468f5e840d5ced1b (patch) | |
tree | 8bbd4c06bcbcb94083b6424dcd592f7245833e89 /drivers/net | |
parent | 797b4f7652a4dcf06bdf6a8c870991acdf56c03d (diff) |
ipw2100: minor cleanups
From: Adrian Bunk <bunk@stusta.de>
This patch contains the following possible cleanups:
- make needlessly global code static
- remove the unused IPW_DEBUG_ENABLED
Signed-off-by: Adrian Bunk <bunk@stusta.de>
Signed-off-by: Jiri Benc <jbenc@suse.cz>
Diffstat (limited to 'drivers/net')
-rw-r--r-- | drivers/net/wireless/ipw2100.c | 136 | ||||
-rw-r--r-- | drivers/net/wireless/ipw2100.h | 28 |
2 files changed, 86 insertions, 78 deletions
diff --git a/drivers/net/wireless/ipw2100.c b/drivers/net/wireless/ipw2100.c index 1ff41afa4214..24fc6ef7516a 100644 --- a/drivers/net/wireless/ipw2100.c +++ b/drivers/net/wireless/ipw2100.c | |||
@@ -207,7 +207,20 @@ MODULE_PARM_DESC(channel, "channel"); | |||
207 | MODULE_PARM_DESC(associate, "auto associate when scanning (default on)"); | 207 | MODULE_PARM_DESC(associate, "auto associate when scanning (default on)"); |
208 | MODULE_PARM_DESC(disable, "manually disable the radio (default 0 [radio on])"); | 208 | MODULE_PARM_DESC(disable, "manually disable the radio (default 0 [radio on])"); |
209 | 209 | ||
210 | u32 ipw2100_debug_level = IPW_DL_NONE; | 210 | static u32 ipw2100_debug_level = IPW_DL_NONE; |
211 | |||
212 | #ifdef CONFIG_IPW_DEBUG | ||
213 | #define IPW_DEBUG(level, message...) \ | ||
214 | do { \ | ||
215 | if (ipw2100_debug_level & (level)) { \ | ||
216 | printk(KERN_DEBUG "ipw2100: %c %s ", \ | ||
217 | in_interrupt() ? 'I' : 'U', __FUNCTION__); \ | ||
218 | printk(message); \ | ||
219 | } \ | ||
220 | } while (0) | ||
221 | #else | ||
222 | #define IPW_DEBUG(level, message...) do {} while (0) | ||
223 | #endif /* CONFIG_IPW_DEBUG */ | ||
211 | 224 | ||
212 | #ifdef CONFIG_IPW_DEBUG | 225 | #ifdef CONFIG_IPW_DEBUG |
213 | static const char *command_types[] = { | 226 | static const char *command_types[] = { |
@@ -295,6 +308,22 @@ static void ipw2100_queues_initialize(struct ipw2100_priv *priv); | |||
295 | static void ipw2100_queues_free(struct ipw2100_priv *priv); | 308 | static void ipw2100_queues_free(struct ipw2100_priv *priv); |
296 | static int ipw2100_queues_allocate(struct ipw2100_priv *priv); | 309 | static int ipw2100_queues_allocate(struct ipw2100_priv *priv); |
297 | 310 | ||
311 | static int ipw2100_fw_download(struct ipw2100_priv *priv, | ||
312 | struct ipw2100_fw *fw); | ||
313 | static int ipw2100_get_firmware(struct ipw2100_priv *priv, | ||
314 | struct ipw2100_fw *fw); | ||
315 | static int ipw2100_get_fwversion(struct ipw2100_priv *priv, char *buf, | ||
316 | size_t max); | ||
317 | static int ipw2100_get_ucodeversion(struct ipw2100_priv *priv, char *buf, | ||
318 | size_t max); | ||
319 | static void ipw2100_release_firmware(struct ipw2100_priv *priv, | ||
320 | struct ipw2100_fw *fw); | ||
321 | static int ipw2100_ucode_download(struct ipw2100_priv *priv, | ||
322 | struct ipw2100_fw *fw); | ||
323 | static void ipw2100_wx_event_work(struct ipw2100_priv *priv); | ||
324 | static struct iw_statistics *ipw2100_wx_wireless_stats(struct net_device * dev); | ||
325 | static struct iw_handler_def ipw2100_wx_handler_def; | ||
326 | |||
298 | 327 | ||
299 | static inline void read_register(struct net_device *dev, u32 reg, u32 *val) | 328 | static inline void read_register(struct net_device *dev, u32 reg, u32 *val) |
300 | { | 329 | { |
@@ -473,8 +502,8 @@ static inline int ipw2100_hw_is_adapter_in_system(struct net_device *dev) | |||
473 | == IPW_DATA_DOA_DEBUG_VALUE)); | 502 | == IPW_DATA_DOA_DEBUG_VALUE)); |
474 | } | 503 | } |
475 | 504 | ||
476 | int ipw2100_get_ordinal(struct ipw2100_priv *priv, u32 ord, | 505 | static int ipw2100_get_ordinal(struct ipw2100_priv *priv, u32 ord, |
477 | void *val, u32 *len) | 506 | void *val, u32 *len) |
478 | { | 507 | { |
479 | struct ipw2100_ordinals *ordinals = &priv->ordinals; | 508 | struct ipw2100_ordinals *ordinals = &priv->ordinals; |
480 | u32 addr; | 509 | u32 addr; |
@@ -1586,7 +1615,7 @@ fail_up: | |||
1586 | return err; | 1615 | return err; |
1587 | } | 1616 | } |
1588 | 1617 | ||
1589 | int ipw2100_set_scan_options(struct ipw2100_priv *priv) | 1618 | static int ipw2100_set_scan_options(struct ipw2100_priv *priv) |
1590 | { | 1619 | { |
1591 | struct host_command cmd = { | 1620 | struct host_command cmd = { |
1592 | .host_command = SET_SCAN_OPTIONS, | 1621 | .host_command = SET_SCAN_OPTIONS, |
@@ -1618,7 +1647,7 @@ int ipw2100_set_scan_options(struct ipw2100_priv *priv) | |||
1618 | return err; | 1647 | return err; |
1619 | } | 1648 | } |
1620 | 1649 | ||
1621 | int ipw2100_start_scan(struct ipw2100_priv *priv) | 1650 | static int ipw2100_start_scan(struct ipw2100_priv *priv) |
1622 | { | 1651 | { |
1623 | struct host_command cmd = { | 1652 | struct host_command cmd = { |
1624 | .host_command = BROADCAST_SCAN, | 1653 | .host_command = BROADCAST_SCAN, |
@@ -1833,7 +1862,7 @@ static void ipw2100_down(struct ipw2100_priv *priv) | |||
1833 | netif_stop_queue(priv->net_dev); | 1862 | netif_stop_queue(priv->net_dev); |
1834 | } | 1863 | } |
1835 | 1864 | ||
1836 | void ipw2100_reset_adapter(struct ipw2100_priv *priv) | 1865 | static void ipw2100_reset_adapter(struct ipw2100_priv *priv) |
1837 | { | 1866 | { |
1838 | unsigned long flags; | 1867 | unsigned long flags; |
1839 | union iwreq_data wrqu = { | 1868 | union iwreq_data wrqu = { |
@@ -1963,8 +1992,8 @@ static void isr_indicate_associated(struct ipw2100_priv *priv, u32 status) | |||
1963 | } | 1992 | } |
1964 | 1993 | ||
1965 | 1994 | ||
1966 | int ipw2100_set_essid(struct ipw2100_priv *priv, char *essid, | 1995 | static int ipw2100_set_essid(struct ipw2100_priv *priv, char *essid, |
1967 | int length, int batch_mode) | 1996 | int length, int batch_mode) |
1968 | { | 1997 | { |
1969 | int ssid_len = min(length, IW_ESSID_MAX_SIZE); | 1998 | int ssid_len = min(length, IW_ESSID_MAX_SIZE); |
1970 | struct host_command cmd = { | 1999 | struct host_command cmd = { |
@@ -2095,7 +2124,7 @@ static void isr_indicate_scanning(struct ipw2100_priv *priv, u32 status) | |||
2095 | priv->status |= STATUS_SCANNING; | 2124 | priv->status |= STATUS_SCANNING; |
2096 | } | 2125 | } |
2097 | 2126 | ||
2098 | const struct ipw2100_status_indicator status_handlers[] = { | 2127 | static const struct ipw2100_status_indicator status_handlers[] = { |
2099 | IPW2100_HANDLER(IPW_STATE_INITIALIZED, 0), | 2128 | IPW2100_HANDLER(IPW_STATE_INITIALIZED, 0), |
2100 | IPW2100_HANDLER(IPW_STATE_COUNTRY_FOUND, 0), | 2129 | IPW2100_HANDLER(IPW_STATE_COUNTRY_FOUND, 0), |
2101 | IPW2100_HANDLER(IPW_STATE_ASSOCIATED, isr_indicate_associated), | 2130 | IPW2100_HANDLER(IPW_STATE_ASSOCIATED, isr_indicate_associated), |
@@ -2163,7 +2192,7 @@ static void isr_rx_complete_command( | |||
2163 | } | 2192 | } |
2164 | 2193 | ||
2165 | #ifdef CONFIG_IPW_DEBUG | 2194 | #ifdef CONFIG_IPW_DEBUG |
2166 | const char *frame_types[] = { | 2195 | static const char *frame_types[] = { |
2167 | "COMMAND_STATUS_VAL", | 2196 | "COMMAND_STATUS_VAL", |
2168 | "STATUS_CHANGE_VAL", | 2197 | "STATUS_CHANGE_VAL", |
2169 | "P80211_DATA_VAL", | 2198 | "P80211_DATA_VAL", |
@@ -2283,7 +2312,7 @@ static inline u32 ipw2100_match_buf(struct ipw2100_priv *priv, u8 *in_buf, | |||
2283 | * | 2312 | * |
2284 | */ | 2313 | */ |
2285 | #ifdef CONFIG_IPW2100_RX_DEBUG | 2314 | #ifdef CONFIG_IPW2100_RX_DEBUG |
2286 | u8 packet_data[IPW_RX_NIC_BUFFER_LENGTH]; | 2315 | static u8 packet_data[IPW_RX_NIC_BUFFER_LENGTH]; |
2287 | #endif | 2316 | #endif |
2288 | 2317 | ||
2289 | static inline void ipw2100_corruption_detected(struct ipw2100_priv *priv, | 2318 | static inline void ipw2100_corruption_detected(struct ipw2100_priv *priv, |
@@ -3427,7 +3456,7 @@ static DEVICE_ATTR(capability, S_IRUGO, show_capability, NULL); | |||
3427 | 3456 | ||
3428 | 3457 | ||
3429 | #define IPW2100_REG(x) { IPW_ ##x, #x } | 3458 | #define IPW2100_REG(x) { IPW_ ##x, #x } |
3430 | const struct { | 3459 | static const struct { |
3431 | u32 addr; | 3460 | u32 addr; |
3432 | const char *name; | 3461 | const char *name; |
3433 | } hw_data[] = { | 3462 | } hw_data[] = { |
@@ -3438,7 +3467,7 @@ const struct { | |||
3438 | IPW2100_REG(REG_RESET_REG), | 3467 | IPW2100_REG(REG_RESET_REG), |
3439 | }; | 3468 | }; |
3440 | #define IPW2100_NIC(x, s) { x, #x, s } | 3469 | #define IPW2100_NIC(x, s) { x, #x, s } |
3441 | const struct { | 3470 | static const struct { |
3442 | u32 addr; | 3471 | u32 addr; |
3443 | const char *name; | 3472 | const char *name; |
3444 | size_t size; | 3473 | size_t size; |
@@ -3448,7 +3477,7 @@ const struct { | |||
3448 | IPW2100_NIC(0x210000, 1), | 3477 | IPW2100_NIC(0x210000, 1), |
3449 | }; | 3478 | }; |
3450 | #define IPW2100_ORD(x, d) { IPW_ORD_ ##x, #x, d } | 3479 | #define IPW2100_ORD(x, d) { IPW_ORD_ ##x, #x, d } |
3451 | const struct { | 3480 | static const struct { |
3452 | u8 index; | 3481 | u8 index; |
3453 | const char *name; | 3482 | const char *name; |
3454 | const char *desc; | 3483 | const char *desc; |
@@ -3813,7 +3842,7 @@ static ssize_t show_stats(struct device *d, struct device_attribute *attr, | |||
3813 | static DEVICE_ATTR(stats, S_IRUGO, show_stats, NULL); | 3842 | static DEVICE_ATTR(stats, S_IRUGO, show_stats, NULL); |
3814 | 3843 | ||
3815 | 3844 | ||
3816 | int ipw2100_switch_mode(struct ipw2100_priv *priv, u32 mode) | 3845 | static int ipw2100_switch_mode(struct ipw2100_priv *priv, u32 mode) |
3817 | { | 3846 | { |
3818 | int err; | 3847 | int err; |
3819 | 3848 | ||
@@ -4537,7 +4566,7 @@ static int ipw2100_read_mac_address(struct ipw2100_priv *priv) | |||
4537 | * | 4566 | * |
4538 | ********************************************************************/ | 4567 | ********************************************************************/ |
4539 | 4568 | ||
4540 | int ipw2100_set_mac_address(struct ipw2100_priv *priv, int batch_mode) | 4569 | static int ipw2100_set_mac_address(struct ipw2100_priv *priv, int batch_mode) |
4541 | { | 4570 | { |
4542 | struct host_command cmd = { | 4571 | struct host_command cmd = { |
4543 | .host_command = ADAPTER_ADDRESS, | 4572 | .host_command = ADAPTER_ADDRESS, |
@@ -4564,7 +4593,7 @@ int ipw2100_set_mac_address(struct ipw2100_priv *priv, int batch_mode) | |||
4564 | return err; | 4593 | return err; |
4565 | } | 4594 | } |
4566 | 4595 | ||
4567 | int ipw2100_set_port_type(struct ipw2100_priv *priv, u32 port_type, | 4596 | static int ipw2100_set_port_type(struct ipw2100_priv *priv, u32 port_type, |
4568 | int batch_mode) | 4597 | int batch_mode) |
4569 | { | 4598 | { |
4570 | struct host_command cmd = { | 4599 | struct host_command cmd = { |
@@ -4605,7 +4634,8 @@ int ipw2100_set_port_type(struct ipw2100_priv *priv, u32 port_type, | |||
4605 | } | 4634 | } |
4606 | 4635 | ||
4607 | 4636 | ||
4608 | int ipw2100_set_channel(struct ipw2100_priv *priv, u32 channel, int batch_mode) | 4637 | static int ipw2100_set_channel(struct ipw2100_priv *priv, u32 channel, |
4638 | int batch_mode) | ||
4609 | { | 4639 | { |
4610 | struct host_command cmd = { | 4640 | struct host_command cmd = { |
4611 | .host_command = CHANNEL, | 4641 | .host_command = CHANNEL, |
@@ -4655,7 +4685,7 @@ int ipw2100_set_channel(struct ipw2100_priv *priv, u32 channel, int batch_mode) | |||
4655 | return 0; | 4685 | return 0; |
4656 | } | 4686 | } |
4657 | 4687 | ||
4658 | int ipw2100_system_config(struct ipw2100_priv *priv, int batch_mode) | 4688 | static int ipw2100_system_config(struct ipw2100_priv *priv, int batch_mode) |
4659 | { | 4689 | { |
4660 | struct host_command cmd = { | 4690 | struct host_command cmd = { |
4661 | .host_command = SYSTEM_CONFIG, | 4691 | .host_command = SYSTEM_CONFIG, |
@@ -4717,7 +4747,8 @@ int ipw2100_system_config(struct ipw2100_priv *priv, int batch_mode) | |||
4717 | return 0; | 4747 | return 0; |
4718 | } | 4748 | } |
4719 | 4749 | ||
4720 | int ipw2100_set_tx_rates(struct ipw2100_priv *priv, u32 rate, int batch_mode) | 4750 | static int ipw2100_set_tx_rates(struct ipw2100_priv *priv, u32 rate, |
4751 | int batch_mode) | ||
4721 | { | 4752 | { |
4722 | struct host_command cmd = { | 4753 | struct host_command cmd = { |
4723 | .host_command = BASIC_TX_RATES, | 4754 | .host_command = BASIC_TX_RATES, |
@@ -4756,8 +4787,8 @@ int ipw2100_set_tx_rates(struct ipw2100_priv *priv, u32 rate, int batch_mode) | |||
4756 | return 0; | 4787 | return 0; |
4757 | } | 4788 | } |
4758 | 4789 | ||
4759 | int ipw2100_set_power_mode(struct ipw2100_priv *priv, | 4790 | static int ipw2100_set_power_mode(struct ipw2100_priv *priv, |
4760 | int power_level) | 4791 | int power_level) |
4761 | { | 4792 | { |
4762 | struct host_command cmd = { | 4793 | struct host_command cmd = { |
4763 | .host_command = POWER_MODE, | 4794 | .host_command = POWER_MODE, |
@@ -4794,7 +4825,7 @@ int ipw2100_set_power_mode(struct ipw2100_priv *priv, | |||
4794 | } | 4825 | } |
4795 | 4826 | ||
4796 | 4827 | ||
4797 | int ipw2100_set_rts_threshold(struct ipw2100_priv *priv, u32 threshold) | 4828 | static int ipw2100_set_rts_threshold(struct ipw2100_priv *priv, u32 threshold) |
4798 | { | 4829 | { |
4799 | struct host_command cmd = { | 4830 | struct host_command cmd = { |
4800 | .host_command = RTS_THRESHOLD, | 4831 | .host_command = RTS_THRESHOLD, |
@@ -4858,7 +4889,7 @@ int ipw2100_set_fragmentation_threshold(struct ipw2100_priv *priv, | |||
4858 | } | 4889 | } |
4859 | #endif | 4890 | #endif |
4860 | 4891 | ||
4861 | int ipw2100_set_short_retry(struct ipw2100_priv *priv, u32 retry) | 4892 | static int ipw2100_set_short_retry(struct ipw2100_priv *priv, u32 retry) |
4862 | { | 4893 | { |
4863 | struct host_command cmd = { | 4894 | struct host_command cmd = { |
4864 | .host_command = SHORT_RETRY_LIMIT, | 4895 | .host_command = SHORT_RETRY_LIMIT, |
@@ -4878,7 +4909,7 @@ int ipw2100_set_short_retry(struct ipw2100_priv *priv, u32 retry) | |||
4878 | return 0; | 4909 | return 0; |
4879 | } | 4910 | } |
4880 | 4911 | ||
4881 | int ipw2100_set_long_retry(struct ipw2100_priv *priv, u32 retry) | 4912 | static int ipw2100_set_long_retry(struct ipw2100_priv *priv, u32 retry) |
4882 | { | 4913 | { |
4883 | struct host_command cmd = { | 4914 | struct host_command cmd = { |
4884 | .host_command = LONG_RETRY_LIMIT, | 4915 | .host_command = LONG_RETRY_LIMIT, |
@@ -4899,8 +4930,8 @@ int ipw2100_set_long_retry(struct ipw2100_priv *priv, u32 retry) | |||
4899 | } | 4930 | } |
4900 | 4931 | ||
4901 | 4932 | ||
4902 | int ipw2100_set_mandatory_bssid(struct ipw2100_priv *priv, u8 *bssid, | 4933 | static int ipw2100_set_mandatory_bssid(struct ipw2100_priv *priv, u8 *bssid, |
4903 | int batch_mode) | 4934 | int batch_mode) |
4904 | { | 4935 | { |
4905 | struct host_command cmd = { | 4936 | struct host_command cmd = { |
4906 | .host_command = MANDATORY_BSSID, | 4937 | .host_command = MANDATORY_BSSID, |
@@ -5037,11 +5068,11 @@ struct security_info_params { | |||
5037 | u8 unicast_using_group; | 5068 | u8 unicast_using_group; |
5038 | } __attribute__ ((packed)); | 5069 | } __attribute__ ((packed)); |
5039 | 5070 | ||
5040 | int ipw2100_set_security_information(struct ipw2100_priv *priv, | 5071 | static int ipw2100_set_security_information(struct ipw2100_priv *priv, |
5041 | int auth_mode, | 5072 | int auth_mode, |
5042 | int security_level, | 5073 | int security_level, |
5043 | int unicast_using_group, | 5074 | int unicast_using_group, |
5044 | int batch_mode) | 5075 | int batch_mode) |
5045 | { | 5076 | { |
5046 | struct host_command cmd = { | 5077 | struct host_command cmd = { |
5047 | .host_command = SET_SECURITY_INFORMATION, | 5078 | .host_command = SET_SECURITY_INFORMATION, |
@@ -5103,8 +5134,8 @@ int ipw2100_set_security_information(struct ipw2100_priv *priv, | |||
5103 | return err; | 5134 | return err; |
5104 | } | 5135 | } |
5105 | 5136 | ||
5106 | int ipw2100_set_tx_power(struct ipw2100_priv *priv, | 5137 | static int ipw2100_set_tx_power(struct ipw2100_priv *priv, |
5107 | u32 tx_power) | 5138 | u32 tx_power) |
5108 | { | 5139 | { |
5109 | struct host_command cmd = { | 5140 | struct host_command cmd = { |
5110 | .host_command = TX_POWER_INDEX, | 5141 | .host_command = TX_POWER_INDEX, |
@@ -5123,8 +5154,8 @@ int ipw2100_set_tx_power(struct ipw2100_priv *priv, | |||
5123 | return 0; | 5154 | return 0; |
5124 | } | 5155 | } |
5125 | 5156 | ||
5126 | int ipw2100_set_ibss_beacon_interval(struct ipw2100_priv *priv, | 5157 | static int ipw2100_set_ibss_beacon_interval(struct ipw2100_priv *priv, |
5127 | u32 interval, int batch_mode) | 5158 | u32 interval, int batch_mode) |
5128 | { | 5159 | { |
5129 | struct host_command cmd = { | 5160 | struct host_command cmd = { |
5130 | .host_command = BEACON_INTERVAL, | 5161 | .host_command = BEACON_INTERVAL, |
@@ -6883,7 +6914,7 @@ module_exit(ipw2100_exit); | |||
6883 | 6914 | ||
6884 | #define WEXT_USECHANNELS 1 | 6915 | #define WEXT_USECHANNELS 1 |
6885 | 6916 | ||
6886 | const long ipw2100_frequencies[] = { | 6917 | static const long ipw2100_frequencies[] = { |
6887 | 2412, 2417, 2422, 2427, | 6918 | 2412, 2417, 2422, 2427, |
6888 | 2432, 2437, 2442, 2447, | 6919 | 2432, 2437, 2442, 2447, |
6889 | 2452, 2457, 2462, 2467, | 6920 | 2452, 2457, 2462, 2467, |
@@ -6893,7 +6924,7 @@ const long ipw2100_frequencies[] = { | |||
6893 | #define FREQ_COUNT (sizeof(ipw2100_frequencies) / \ | 6924 | #define FREQ_COUNT (sizeof(ipw2100_frequencies) / \ |
6894 | sizeof(ipw2100_frequencies[0])) | 6925 | sizeof(ipw2100_frequencies[0])) |
6895 | 6926 | ||
6896 | const long ipw2100_rates_11b[] = { | 6927 | static const long ipw2100_rates_11b[] = { |
6897 | 1000000, | 6928 | 1000000, |
6898 | 2000000, | 6929 | 2000000, |
6899 | 5500000, | 6930 | 5500000, |
@@ -7052,7 +7083,7 @@ static int ipw2100_wx_get_mode(struct net_device *dev, | |||
7052 | #define POWER_MODES 5 | 7083 | #define POWER_MODES 5 |
7053 | 7084 | ||
7054 | /* Values are in microsecond */ | 7085 | /* Values are in microsecond */ |
7055 | const s32 timeout_duration[POWER_MODES] = { | 7086 | static const s32 timeout_duration[POWER_MODES] = { |
7056 | 350000, | 7087 | 350000, |
7057 | 250000, | 7088 | 250000, |
7058 | 75000, | 7089 | 75000, |
@@ -7060,7 +7091,7 @@ const s32 timeout_duration[POWER_MODES] = { | |||
7060 | 25000, | 7091 | 25000, |
7061 | }; | 7092 | }; |
7062 | 7093 | ||
7063 | const s32 period_duration[POWER_MODES] = { | 7094 | static const s32 period_duration[POWER_MODES] = { |
7064 | 400000, | 7095 | 400000, |
7065 | 700000, | 7096 | 700000, |
7066 | 1000000, | 7097 | 1000000, |
@@ -8125,7 +8156,7 @@ static iw_handler ipw2100_private_handler[] = { | |||
8125 | ipw2100_wx_get_preamble, | 8156 | ipw2100_wx_get_preamble, |
8126 | }; | 8157 | }; |
8127 | 8158 | ||
8128 | struct iw_handler_def ipw2100_wx_handler_def = | 8159 | static struct iw_handler_def ipw2100_wx_handler_def = |
8129 | { | 8160 | { |
8130 | .standard = ipw2100_wx_handlers, | 8161 | .standard = ipw2100_wx_handlers, |
8131 | .num_standard = sizeof(ipw2100_wx_handlers) / sizeof(iw_handler), | 8162 | .num_standard = sizeof(ipw2100_wx_handlers) / sizeof(iw_handler), |
@@ -8141,7 +8172,7 @@ struct iw_handler_def ipw2100_wx_handler_def = | |||
8141 | * Called by /proc/net/wireless | 8172 | * Called by /proc/net/wireless |
8142 | * Also called by SIOCGIWSTATS | 8173 | * Also called by SIOCGIWSTATS |
8143 | */ | 8174 | */ |
8144 | struct iw_statistics *ipw2100_wx_wireless_stats(struct net_device * dev) | 8175 | static struct iw_statistics *ipw2100_wx_wireless_stats(struct net_device * dev) |
8145 | { | 8176 | { |
8146 | enum { | 8177 | enum { |
8147 | POOR = 30, | 8178 | POOR = 30, |
@@ -8277,7 +8308,7 @@ struct iw_statistics *ipw2100_wx_wireless_stats(struct net_device * dev) | |||
8277 | return (struct iw_statistics *) NULL; | 8308 | return (struct iw_statistics *) NULL; |
8278 | } | 8309 | } |
8279 | 8310 | ||
8280 | void ipw2100_wx_event_work(struct ipw2100_priv *priv) | 8311 | static void ipw2100_wx_event_work(struct ipw2100_priv *priv) |
8281 | { | 8312 | { |
8282 | union iwreq_data wrqu; | 8313 | union iwreq_data wrqu; |
8283 | int len = ETH_ALEN; | 8314 | int len = ETH_ALEN; |
@@ -8392,7 +8423,8 @@ static int ipw2100_mod_firmware_load(struct ipw2100_fw *fw) | |||
8392 | } | 8423 | } |
8393 | 8424 | ||
8394 | 8425 | ||
8395 | int ipw2100_get_firmware(struct ipw2100_priv *priv, struct ipw2100_fw *fw) | 8426 | static int ipw2100_get_firmware(struct ipw2100_priv *priv, |
8427 | struct ipw2100_fw *fw) | ||
8396 | { | 8428 | { |
8397 | char *fw_name; | 8429 | char *fw_name; |
8398 | int rc; | 8430 | int rc; |
@@ -8431,8 +8463,8 @@ int ipw2100_get_firmware(struct ipw2100_priv *priv, struct ipw2100_fw *fw) | |||
8431 | return 0; | 8463 | return 0; |
8432 | } | 8464 | } |
8433 | 8465 | ||
8434 | void ipw2100_release_firmware(struct ipw2100_priv *priv, | 8466 | static void ipw2100_release_firmware(struct ipw2100_priv *priv, |
8435 | struct ipw2100_fw *fw) | 8467 | struct ipw2100_fw *fw) |
8436 | { | 8468 | { |
8437 | fw->version = 0; | 8469 | fw->version = 0; |
8438 | if (fw->fw_entry) | 8470 | if (fw->fw_entry) |
@@ -8441,7 +8473,8 @@ void ipw2100_release_firmware(struct ipw2100_priv *priv, | |||
8441 | } | 8473 | } |
8442 | 8474 | ||
8443 | 8475 | ||
8444 | int ipw2100_get_fwversion(struct ipw2100_priv *priv, char *buf, size_t max) | 8476 | static int ipw2100_get_fwversion(struct ipw2100_priv *priv, char *buf, |
8477 | size_t max) | ||
8445 | { | 8478 | { |
8446 | char ver[MAX_FW_VERSION_LEN]; | 8479 | char ver[MAX_FW_VERSION_LEN]; |
8447 | u32 len = MAX_FW_VERSION_LEN; | 8480 | u32 len = MAX_FW_VERSION_LEN; |
@@ -8460,7 +8493,8 @@ int ipw2100_get_fwversion(struct ipw2100_priv *priv, char *buf, size_t max) | |||
8460 | return tmp; | 8493 | return tmp; |
8461 | } | 8494 | } |
8462 | 8495 | ||
8463 | int ipw2100_get_ucodeversion(struct ipw2100_priv *priv, char *buf, size_t max) | 8496 | static int ipw2100_get_ucodeversion(struct ipw2100_priv *priv, char *buf, |
8497 | size_t max) | ||
8464 | { | 8498 | { |
8465 | u32 ver; | 8499 | u32 ver; |
8466 | u32 len = sizeof(ver); | 8500 | u32 len = sizeof(ver); |
@@ -8474,7 +8508,8 @@ int ipw2100_get_ucodeversion(struct ipw2100_priv *priv, char *buf, size_t max) | |||
8474 | /* | 8508 | /* |
8475 | * On exit, the firmware will have been freed from the fw list | 8509 | * On exit, the firmware will have been freed from the fw list |
8476 | */ | 8510 | */ |
8477 | int ipw2100_fw_download(struct ipw2100_priv *priv, struct ipw2100_fw *fw) | 8511 | static int ipw2100_fw_download(struct ipw2100_priv *priv, |
8512 | struct ipw2100_fw *fw) | ||
8478 | { | 8513 | { |
8479 | /* firmware is constructed of N contiguous entries, each entry is | 8514 | /* firmware is constructed of N contiguous entries, each entry is |
8480 | * structured as: | 8515 | * structured as: |
@@ -8531,7 +8566,8 @@ struct symbol_alive_response { | |||
8531 | u8 ucode_valid; | 8566 | u8 ucode_valid; |
8532 | }; | 8567 | }; |
8533 | 8568 | ||
8534 | int ipw2100_ucode_download(struct ipw2100_priv *priv, struct ipw2100_fw *fw) | 8569 | static int ipw2100_ucode_download(struct ipw2100_priv *priv, |
8570 | struct ipw2100_fw *fw) | ||
8535 | { | 8571 | { |
8536 | struct net_device *dev = priv->net_dev; | 8572 | struct net_device *dev = priv->net_dev; |
8537 | const unsigned char *microcode_data = fw->uc.data; | 8573 | const unsigned char *microcode_data = fw->uc.data; |
diff --git a/drivers/net/wireless/ipw2100.h b/drivers/net/wireless/ipw2100.h index 95a05b554c1a..2a3cdbd50168 100644 --- a/drivers/net/wireless/ipw2100.h +++ b/drivers/net/wireless/ipw2100.h | |||
@@ -48,22 +48,6 @@ struct ipw2100_priv; | |||
48 | struct ipw2100_tx_packet; | 48 | struct ipw2100_tx_packet; |
49 | struct ipw2100_rx_packet; | 49 | struct ipw2100_rx_packet; |
50 | 50 | ||
51 | #ifdef CONFIG_IPW_DEBUG | ||
52 | enum { IPW_DEBUG_ENABLED = 1 }; | ||
53 | extern u32 ipw2100_debug_level; | ||
54 | #define IPW_DEBUG(level, message...) \ | ||
55 | do { \ | ||
56 | if (ipw2100_debug_level & (level)) { \ | ||
57 | printk(KERN_DEBUG "ipw2100: %c %s ", \ | ||
58 | in_interrupt() ? 'I' : 'U', __FUNCTION__); \ | ||
59 | printk(message); \ | ||
60 | } \ | ||
61 | } while (0) | ||
62 | #else | ||
63 | enum { IPW_DEBUG_ENABLED = 0 }; | ||
64 | #define IPW_DEBUG(level, message...) do {} while (0) | ||
65 | #endif /* CONFIG_IPW_DEBUG */ | ||
66 | |||
67 | #define IPW_DL_UNINIT 0x80000000 | 51 | #define IPW_DL_UNINIT 0x80000000 |
68 | #define IPW_DL_NONE 0x00000000 | 52 | #define IPW_DL_NONE 0x00000000 |
69 | #define IPW_DL_ALL 0x7FFFFFFF | 53 | #define IPW_DL_ALL 0x7FFFFFFF |
@@ -1144,10 +1128,6 @@ typedef enum _ORDINAL_TABLE_2 { // NS - means Not Supported by FW | |||
1144 | #define WIRELESS_SPY // enable iwspy support | 1128 | #define WIRELESS_SPY // enable iwspy support |
1145 | #endif | 1129 | #endif |
1146 | 1130 | ||
1147 | extern struct iw_handler_def ipw2100_wx_handler_def; | ||
1148 | extern struct iw_statistics *ipw2100_wx_wireless_stats(struct net_device * dev); | ||
1149 | extern void ipw2100_wx_event_work(struct ipw2100_priv *priv); | ||
1150 | |||
1151 | #define IPW_HOST_FW_SHARED_AREA0 0x0002f200 | 1131 | #define IPW_HOST_FW_SHARED_AREA0 0x0002f200 |
1152 | #define IPW_HOST_FW_SHARED_AREA0_END 0x0002f510 // 0x310 bytes | 1132 | #define IPW_HOST_FW_SHARED_AREA0_END 0x0002f510 // 0x310 bytes |
1153 | 1133 | ||
@@ -1182,14 +1162,6 @@ struct ipw2100_fw { | |||
1182 | const struct firmware *fw_entry; | 1162 | const struct firmware *fw_entry; |
1183 | }; | 1163 | }; |
1184 | 1164 | ||
1185 | int ipw2100_get_firmware(struct ipw2100_priv *priv, struct ipw2100_fw *fw); | ||
1186 | void ipw2100_release_firmware(struct ipw2100_priv *priv, struct ipw2100_fw *fw); | ||
1187 | int ipw2100_fw_download(struct ipw2100_priv *priv, struct ipw2100_fw *fw); | ||
1188 | int ipw2100_ucode_download(struct ipw2100_priv *priv, struct ipw2100_fw *fw); | ||
1189 | |||
1190 | #define MAX_FW_VERSION_LEN 14 | 1165 | #define MAX_FW_VERSION_LEN 14 |
1191 | 1166 | ||
1192 | int ipw2100_get_fwversion(struct ipw2100_priv *priv, char *buf, size_t max); | ||
1193 | int ipw2100_get_ucodeversion(struct ipw2100_priv *priv, char *buf, size_t max); | ||
1194 | |||
1195 | #endif /* _IPW2100_H */ | 1167 | #endif /* _IPW2100_H */ |