diff options
Diffstat (limited to 'drivers/net/wireless/airo_cs.c')
-rw-r--r-- | drivers/net/wireless/airo_cs.c | 71 |
1 files changed, 0 insertions, 71 deletions
diff --git a/drivers/net/wireless/airo_cs.c b/drivers/net/wireless/airo_cs.c index b084278f36b7..df2484d45474 100644 --- a/drivers/net/wireless/airo_cs.c +++ b/drivers/net/wireless/airo_cs.c | |||
@@ -53,42 +53,15 @@ MODULE_SUPPORTED_DEVICE("Aironet 4500, 4800 and Cisco 340 PCMCIA cards"); | |||
53 | 53 | ||
54 | /*====================================================================*/ | 54 | /*====================================================================*/ |
55 | 55 | ||
56 | /* | ||
57 | The event() function is this driver's Card Services event handler. | ||
58 | It will be called by Card Services when an appropriate card status | ||
59 | event is received. The config() and release() entry points are | ||
60 | used to configure or release a socket, in response to card | ||
61 | insertion and ejection events. They are invoked from the airo_cs | ||
62 | event handler. | ||
63 | */ | ||
64 | |||
65 | static int airo_config(struct pcmcia_device *link); | 56 | static int airo_config(struct pcmcia_device *link); |
66 | static void airo_release(struct pcmcia_device *link); | 57 | static void airo_release(struct pcmcia_device *link); |
67 | 58 | ||
68 | /* | ||
69 | The attach() and detach() entry points are used to create and destroy | ||
70 | "instances" of the driver, where each instance represents everything | ||
71 | needed to manage one actual PCMCIA card. | ||
72 | */ | ||
73 | |||
74 | static void airo_detach(struct pcmcia_device *p_dev); | 59 | static void airo_detach(struct pcmcia_device *p_dev); |
75 | 60 | ||
76 | typedef struct local_info_t { | 61 | typedef struct local_info_t { |
77 | struct net_device *eth_dev; | 62 | struct net_device *eth_dev; |
78 | } local_info_t; | 63 | } local_info_t; |
79 | 64 | ||
80 | /*====================================================================== | ||
81 | |||
82 | airo_attach() creates an "instance" of the driver, allocating | ||
83 | local data structures for one device. The device is registered | ||
84 | with Card Services. | ||
85 | |||
86 | The dev_link structure is initialized, but we don't actually | ||
87 | configure the card at this point -- we wait until we receive a | ||
88 | card insertion event. | ||
89 | |||
90 | ======================================================================*/ | ||
91 | |||
92 | static int airo_probe(struct pcmcia_device *p_dev) | 65 | static int airo_probe(struct pcmcia_device *p_dev) |
93 | { | 66 | { |
94 | local_info_t *local; | 67 | local_info_t *local; |
@@ -106,15 +79,6 @@ static int airo_probe(struct pcmcia_device *p_dev) | |||
106 | return airo_config(p_dev); | 79 | return airo_config(p_dev); |
107 | } /* airo_attach */ | 80 | } /* airo_attach */ |
108 | 81 | ||
109 | /*====================================================================== | ||
110 | |||
111 | This deletes a driver "instance". The device is de-registered | ||
112 | with Card Services. If it has been released, all local data | ||
113 | structures are freed. Otherwise, the structures will be freed | ||
114 | when the device is released. | ||
115 | |||
116 | ======================================================================*/ | ||
117 | |||
118 | static void airo_detach(struct pcmcia_device *link) | 82 | static void airo_detach(struct pcmcia_device *link) |
119 | { | 83 | { |
120 | dev_dbg(&link->dev, "airo_detach\n"); | 84 | dev_dbg(&link->dev, "airo_detach\n"); |
@@ -129,14 +93,6 @@ static void airo_detach(struct pcmcia_device *link) | |||
129 | kfree(link->priv); | 93 | kfree(link->priv); |
130 | } /* airo_detach */ | 94 | } /* airo_detach */ |
131 | 95 | ||
132 | /*====================================================================== | ||
133 | |||
134 | airo_config() is scheduled to run after a CARD_INSERTION event | ||
135 | is received, to configure the PCMCIA socket, and to make the | ||
136 | device available to the system. | ||
137 | |||
138 | ======================================================================*/ | ||
139 | |||
140 | static int airo_cs_config_check(struct pcmcia_device *p_dev, void *priv_data) | 96 | static int airo_cs_config_check(struct pcmcia_device *p_dev, void *priv_data) |
141 | { | 97 | { |
142 | if (p_dev->config_index == 0) | 98 | if (p_dev->config_index == 0) |
@@ -158,20 +114,6 @@ static int airo_config(struct pcmcia_device *link) | |||
158 | link->config_flags |= CONF_ENABLE_IRQ | CONF_AUTO_SET_VPP | | 114 | link->config_flags |= CONF_ENABLE_IRQ | CONF_AUTO_SET_VPP | |
159 | CONF_AUTO_AUDIO | CONF_AUTO_SET_IO; | 115 | CONF_AUTO_AUDIO | CONF_AUTO_SET_IO; |
160 | 116 | ||
161 | /* | ||
162 | * In this loop, we scan the CIS for configuration table | ||
163 | * entries, each of which describes a valid card | ||
164 | * configuration, including voltage, IO window, memory window, | ||
165 | * and interrupt settings. | ||
166 | * | ||
167 | * We make no assumptions about the card to be configured: we | ||
168 | * use just the information available in the CIS. In an ideal | ||
169 | * world, this would work for any PCMCIA card, but it requires | ||
170 | * a complete and accurate CIS. In practice, a driver usually | ||
171 | * "knows" most of these things without consulting the CIS, | ||
172 | * and most client drivers will only use the CIS to fill in | ||
173 | * implementation-defined details. | ||
174 | */ | ||
175 | ret = pcmcia_loop_config(link, airo_cs_config_check, NULL); | 117 | ret = pcmcia_loop_config(link, airo_cs_config_check, NULL); |
176 | if (ret) | 118 | if (ret) |
177 | goto failed; | 119 | goto failed; |
@@ -179,11 +121,6 @@ static int airo_config(struct pcmcia_device *link) | |||
179 | if (!link->irq) | 121 | if (!link->irq) |
180 | goto failed; | 122 | goto failed; |
181 | 123 | ||
182 | /* | ||
183 | This actually configures the PCMCIA socket -- setting up | ||
184 | the I/O windows and the interrupt mapping, and putting the | ||
185 | card and host interface into "Memory and IO" mode. | ||
186 | */ | ||
187 | ret = pcmcia_enable_device(link); | 124 | ret = pcmcia_enable_device(link); |
188 | if (ret) | 125 | if (ret) |
189 | goto failed; | 126 | goto failed; |
@@ -200,14 +137,6 @@ static int airo_config(struct pcmcia_device *link) | |||
200 | return -ENODEV; | 137 | return -ENODEV; |
201 | } /* airo_config */ | 138 | } /* airo_config */ |
202 | 139 | ||
203 | /*====================================================================== | ||
204 | |||
205 | After a card is removed, airo_release() will unregister the | ||
206 | device, and release the PCMCIA configuration. If the device is | ||
207 | still open, this will be postponed until it is closed. | ||
208 | |||
209 | ======================================================================*/ | ||
210 | |||
211 | static void airo_release(struct pcmcia_device *link) | 140 | static void airo_release(struct pcmcia_device *link) |
212 | { | 141 | { |
213 | dev_dbg(&link->dev, "airo_release\n"); | 142 | dev_dbg(&link->dev, "airo_release\n"); |