Lines Matching refs:ipw
65 struct ipw_dev *ipw = container_of(work_reboot, struct ipw_dev, in signalled_reboot_work() local
67 struct pcmcia_device *link = ipw->link; in signalled_reboot_work()
73 struct ipw_dev *ipw = (struct ipw_dev *) callback_data; in signalled_reboot_callback() local
76 schedule_work(&ipw->work_reboot); in signalled_reboot_callback()
81 struct ipw_dev *ipw = priv_data; in ipwireless_probe() local
113 ipw->is_v2_card = resource_size(p_dev->resource[2]) == 0x100; in ipwireless_probe()
115 ipw->common_memory = ioremap(p_dev->resource[2]->start, in ipwireless_probe()
117 if (!ipw->common_memory) { in ipwireless_probe()
139 ipw->attr_memory = ioremap(p_dev->resource[3]->start, in ipwireless_probe()
141 if (!ipw->attr_memory) { in ipwireless_probe()
155 iounmap(ipw->attr_memory); in ipwireless_probe()
160 iounmap(ipw->common_memory); in ipwireless_probe()
169 static int config_ipwireless(struct ipw_dev *ipw) in config_ipwireless() argument
171 struct pcmcia_device *link = ipw->link; in config_ipwireless()
174 ipw->is_v2_card = 0; in config_ipwireless()
178 ret = pcmcia_loop_config(link, ipwireless_probe, ipw); in config_ipwireless()
182 INIT_WORK(&ipw->work_reboot, signalled_reboot_work); in config_ipwireless()
184 ipwireless_init_hardware_v1(ipw->hardware, link->resource[0]->start, in config_ipwireless()
185 ipw->attr_memory, ipw->common_memory, in config_ipwireless()
186 ipw->is_v2_card, signalled_reboot_callback, in config_ipwireless()
187 ipw); in config_ipwireless()
194 ipw->is_v2_card ? "V2/V3" : "V1"); in config_ipwireless()
198 if (ipw->attr_memory && ipw->common_memory) in config_ipwireless()
204 ipw->network = ipwireless_network_create(ipw->hardware); in config_ipwireless()
205 if (!ipw->network) in config_ipwireless()
208 ipw->tty = ipwireless_tty_create(ipw->hardware, ipw->network); in config_ipwireless()
209 if (!ipw->tty) in config_ipwireless()
212 ipwireless_init_hardware_v2_v3(ipw->hardware); in config_ipwireless()
225 if (ipw->common_memory) { in config_ipwireless()
228 iounmap(ipw->common_memory); in config_ipwireless()
230 if (ipw->attr_memory) { in config_ipwireless()
233 iounmap(ipw->attr_memory); in config_ipwireless()
239 static void release_ipwireless(struct ipw_dev *ipw) in release_ipwireless() argument
241 release_region(ipw->link->resource[0]->start, in release_ipwireless()
242 resource_size(ipw->link->resource[0])); in release_ipwireless()
243 if (ipw->common_memory) { in release_ipwireless()
244 release_mem_region(ipw->link->resource[2]->start, in release_ipwireless()
245 resource_size(ipw->link->resource[2])); in release_ipwireless()
246 iounmap(ipw->common_memory); in release_ipwireless()
248 if (ipw->attr_memory) { in release_ipwireless()
249 release_mem_region(ipw->link->resource[3]->start, in release_ipwireless()
250 resource_size(ipw->link->resource[3])); in release_ipwireless()
251 iounmap(ipw->attr_memory); in release_ipwireless()
253 pcmcia_disable_device(ipw->link); in release_ipwireless()
267 struct ipw_dev *ipw; in ipwireless_attach() local
270 ipw = kzalloc(sizeof(struct ipw_dev), GFP_KERNEL); in ipwireless_attach()
271 if (!ipw) in ipwireless_attach()
274 ipw->link = link; in ipwireless_attach()
275 link->priv = ipw; in ipwireless_attach()
277 ipw->hardware = ipwireless_hardware_create(); in ipwireless_attach()
278 if (!ipw->hardware) { in ipwireless_attach()
279 kfree(ipw); in ipwireless_attach()
284 ret = config_ipwireless(ipw); in ipwireless_attach()
302 struct ipw_dev *ipw = link->priv; in ipwireless_detach() local
304 release_ipwireless(ipw); in ipwireless_detach()
306 if (ipw->tty != NULL) in ipwireless_detach()
307 ipwireless_tty_free(ipw->tty); in ipwireless_detach()
308 if (ipw->network != NULL) in ipwireless_detach()
309 ipwireless_network_free(ipw->network); in ipwireless_detach()
310 if (ipw->hardware != NULL) in ipwireless_detach()
311 ipwireless_hardware_free(ipw->hardware); in ipwireless_detach()
312 kfree(ipw); in ipwireless_detach()