2 * Intel Wireless WiMAX Connection 2400m
3 * Generic probe/disconnect, reset and message passing
6 * Copyright (C) 2007-2008 Intel Corporation <linux-wimax@intel.com>
7 * Inaky Perez-Gonzalez <inaky.perez-gonzalez@intel.com>
9 * This program is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU General Public License version
11 * 2 as published by the Free Software Foundation.
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
18 * You should have received a copy of the GNU General Public License
19 * along with this program; if not, write to the Free Software
20 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
24 * See i2400m.h for driver documentation. This contains helpers for
25 * the driver model glue [_setup()/_release()], handling device resets
26 * [_dev_reset_handle()], and the backends for the WiMAX stack ops
27 * reset [_op_reset()] and message from user [_op_msg_from_user()].
31 * i2400m_op_msg_from_user()
33 * wimax_msg_to_user_send()
38 * i2400m_dev_reset_handle()
39 * __i2400m_dev_reset_handle()
41 * __i2400m_dev_start()
44 * i2400m_bootrom_init()
47 * __i2400m_dev_start()
48 * i2400m_dev_bootstrap()
50 * i2400m->bus_dev_start()
51 * i2400m_firmware_check()
52 * i2400m_check_mac_addr()
59 * i2400m_dev_shutdown()
60 * i2400m->bus_dev_stop()
65 #include <linux/etherdevice.h>
66 #include <linux/wimax/i2400m.h>
67 #include <linux/module.h>
68 #include <linux/moduleparam.h>
70 #define D_SUBMODULE driver
71 #include "debug-levels.h"
74 int i2400m_idle_mode_disabled; /* 0 (idle mode enabled) by default */
75 module_param_named(idle_mode_disabled, i2400m_idle_mode_disabled, int, 0644);
76 MODULE_PARM_DESC(idle_mode_disabled,
77 "If true, the device will not enable idle mode negotiation "
78 "with the base station (when connected) to save power.");
80 int i2400m_rx_reorder_disabled; /* 0 (rx reorder enabled) by default */
81 module_param_named(rx_reorder_disabled, i2400m_rx_reorder_disabled, int, 0644);
82 MODULE_PARM_DESC(rx_reorder_disabled,
83 "If true, RX reordering will be disabled.");
85 int i2400m_power_save_disabled; /* 0 (power saving enabled) by default */
86 module_param_named(power_save_disabled, i2400m_power_save_disabled, int, 0644);
87 MODULE_PARM_DESC(power_save_disabled,
88 "If true, the driver will not tell the device to enter "
89 "power saving mode when it reports it is ready for it. "
90 "False by default (so the device is told to do power "
94 * i2400m_queue_work - schedule work on a i2400m's queue
96 * @i2400m: device descriptor
98 * @fn: function to run to execute work. It gets passed a 'struct
99 * work_struct' that is wrapped in a 'struct i2400m_work'. Once
100 * done, you have to (1) i2400m_put(i2400m_work->i2400m) and then
101 * (2) kfree(i2400m_work).
103 * @gfp_flags: GFP flags for memory allocation.
105 * @pl: pointer to a payload buffer that you want to pass to the _work
106 * function. Use this to pack (for example) a struct with extra
109 * @pl_size: size of the payload buffer.
111 * We do this quite often, so this just saves typing; allocate a
112 * wrapper for a i2400m, get a ref to it, pack arguments and launch
115 * A usual workflow is:
117 * struct my_work_args {
123 * struct my_work_args my_args = {
127 * i2400m_queue_work(i2400m, 1, my_work_function, GFP_KERNEL,
128 * &args, sizeof(args))
130 * And now the work function can unpack the arguments and call the
131 * real function (or do the job itself):
134 * void my_work_fn((struct work_struct *ws)
136 * struct i2400m_work *iw =
137 * container_of(ws, struct i2400m_work, ws);
138 * struct my_work_args *my_args = (void *) iw->pl;
140 * my_work(iw->i2400m, my_args->something, my_args->whatevert);
143 int i2400m_queue_work(struct i2400m *i2400m,
144 void (*fn)(struct work_struct *), gfp_t gfp_flags,
145 const void *pl, size_t pl_size)
148 struct i2400m_work *iw;
150 BUG_ON(i2400m->work_queue == NULL);
152 iw = kzalloc(sizeof(*iw) + pl_size, gfp_flags);
155 iw->i2400m = i2400m_get(i2400m);
156 memcpy(iw->pl, pl, pl_size);
157 INIT_WORK(&iw->ws, fn);
158 result = queue_work(i2400m->work_queue, &iw->ws);
162 EXPORT_SYMBOL_GPL(i2400m_queue_work);
166 * Schedule i2400m's specific work on the system's queue.
168 * Used for a few cases where we really need it; otherwise, identical
169 * to i2400m_queue_work().
171 * Returns < 0 errno code on error, 1 if ok.
173 * If it returns zero, something really bad happened, as it means the
174 * works struct was already queued, but we have just allocated it, so
175 * it should not happen.
177 int i2400m_schedule_work(struct i2400m *i2400m,
178 void (*fn)(struct work_struct *), gfp_t gfp_flags)
181 struct i2400m_work *iw;
183 BUG_ON(i2400m->work_queue == NULL);
185 iw = kzalloc(sizeof(*iw), gfp_flags);
188 iw->i2400m = i2400m_get(i2400m);
189 INIT_WORK(&iw->ws, fn);
190 result = schedule_work(&iw->ws);
199 * WiMAX stack operation: relay a message from user space
201 * @wimax_dev: device descriptor
202 * @pipe_name: named pipe the message is for
203 * @msg_buf: pointer to the message bytes
204 * @msg_len: length of the buffer
205 * @genl_info: passed by the generic netlink layer
207 * The WiMAX stack will call this function when a message was received
210 * For the i2400m, this is an L3L4 message, as specified in
211 * include/linux/wimax/i2400m.h, and thus prefixed with a 'struct
212 * i2400m_l3l4_hdr'. Driver (and device) expect the messages to be
213 * coded in Little Endian.
215 * This function just verifies that the header declaration and the
216 * payload are consistent and then deals with it, either forwarding it
217 * to the device or procesing it locally.
219 * In the i2400m, messages are basically commands that will carry an
220 * ack, so we use i2400m_msg_to_dev() and then deliver the ack back to
221 * user space. The rx.c code might intercept the response and use it
222 * to update the driver's state, but then it will pass it on so it can
223 * be relayed back to user space.
225 * Note that asynchronous events from the device are processed and
226 * sent to user space in rx.c.
229 int i2400m_op_msg_from_user(struct wimax_dev *wimax_dev,
230 const char *pipe_name,
231 const void *msg_buf, size_t msg_len,
232 const struct genl_info *genl_info)
235 struct i2400m *i2400m = wimax_dev_to_i2400m(wimax_dev);
236 struct device *dev = i2400m_dev(i2400m);
237 struct sk_buff *ack_skb;
239 d_fnstart(4, dev, "(wimax_dev %p [i2400m %p] msg_buf %p "
240 "msg_len %zu genl_info %p)\n", wimax_dev, i2400m,
241 msg_buf, msg_len, genl_info);
242 ack_skb = i2400m_msg_to_dev(i2400m, msg_buf, msg_len);
243 result = PTR_ERR(ack_skb);
245 goto error_msg_to_dev;
246 result = wimax_msg_send(&i2400m->wimax_dev, ack_skb);
248 d_fnend(4, dev, "(wimax_dev %p [i2400m %p] msg_buf %p msg_len %zu "
249 "genl_info %p) = %d\n", wimax_dev, i2400m, msg_buf, msg_len,
256 * Context to wait for a reset to finalize
258 struct i2400m_reset_ctx {
259 struct completion completion;
265 * WiMAX stack operation: reset a device
267 * @wimax_dev: device descriptor
269 * See the documentation for wimax_reset() and wimax_dev->op_reset for
270 * the requirements of this function. The WiMAX stack guarantees
271 * serialization on calls to this function.
273 * Do a warm reset on the device; if it fails, resort to a cold reset
274 * and return -ENODEV. On successful warm reset, we need to block
275 * until it is complete.
277 * The bus-driver implementation of reset takes care of falling back
278 * to cold reset if warm fails.
281 int i2400m_op_reset(struct wimax_dev *wimax_dev)
284 struct i2400m *i2400m = wimax_dev_to_i2400m(wimax_dev);
285 struct device *dev = i2400m_dev(i2400m);
286 struct i2400m_reset_ctx ctx = {
287 .completion = COMPLETION_INITIALIZER_ONSTACK(ctx.completion),
291 d_fnstart(4, dev, "(wimax_dev %p)\n", wimax_dev);
292 mutex_lock(&i2400m->init_mutex);
293 i2400m->reset_ctx = &ctx;
294 mutex_unlock(&i2400m->init_mutex);
295 result = i2400m->bus_reset(i2400m, I2400M_RT_WARM);
298 result = wait_for_completion_timeout(&ctx.completion, 4*HZ);
303 /* if result < 0, pass it on */
304 mutex_lock(&i2400m->init_mutex);
305 i2400m->reset_ctx = NULL;
306 mutex_unlock(&i2400m->init_mutex);
308 d_fnend(4, dev, "(wimax_dev %p) = %d\n", wimax_dev, result);
314 * Check the MAC address we got from boot mode is ok
316 * @i2400m: device descriptor
318 * Returns: 0 if ok, < 0 errno code on error.
321 int i2400m_check_mac_addr(struct i2400m *i2400m)
324 struct device *dev = i2400m_dev(i2400m);
326 const struct i2400m_tlv_detailed_device_info *ddi;
327 struct net_device *net_dev = i2400m->wimax_dev.net_dev;
328 const unsigned char zeromac[ETH_ALEN] = { 0 };
330 d_fnstart(3, dev, "(i2400m %p)\n", i2400m);
331 skb = i2400m_get_device_info(i2400m);
333 result = PTR_ERR(skb);
334 dev_err(dev, "Cannot verify MAC address, error reading: %d\n",
338 /* Extract MAC addresss */
339 ddi = (void *) skb->data;
340 BUILD_BUG_ON(ETH_ALEN != sizeof(ddi->mac_address));
341 d_printf(2, dev, "GET DEVICE INFO: mac addr "
342 "%02x:%02x:%02x:%02x:%02x:%02x\n",
343 ddi->mac_address[0], ddi->mac_address[1],
344 ddi->mac_address[2], ddi->mac_address[3],
345 ddi->mac_address[4], ddi->mac_address[5]);
346 if (!memcmp(net_dev->perm_addr, ddi->mac_address,
347 sizeof(ddi->mac_address)))
349 dev_warn(dev, "warning: device reports a different MAC address "
350 "to that of boot mode's\n");
351 dev_warn(dev, "device reports %02x:%02x:%02x:%02x:%02x:%02x\n",
352 ddi->mac_address[0], ddi->mac_address[1],
353 ddi->mac_address[2], ddi->mac_address[3],
354 ddi->mac_address[4], ddi->mac_address[5]);
355 dev_warn(dev, "boot mode reported %02x:%02x:%02x:%02x:%02x:%02x\n",
356 net_dev->perm_addr[0], net_dev->perm_addr[1],
357 net_dev->perm_addr[2], net_dev->perm_addr[3],
358 net_dev->perm_addr[4], net_dev->perm_addr[5]);
359 if (!memcmp(zeromac, ddi->mac_address, sizeof(zeromac)))
360 dev_err(dev, "device reports an invalid MAC address, "
363 dev_warn(dev, "updating MAC address\n");
364 net_dev->addr_len = ETH_ALEN;
365 memcpy(net_dev->perm_addr, ddi->mac_address, ETH_ALEN);
366 memcpy(net_dev->dev_addr, ddi->mac_address, ETH_ALEN);
372 d_fnend(3, dev, "(i2400m %p) = %d\n", i2400m, result);
378 * __i2400m_dev_start - Bring up driver communication with the device
380 * @i2400m: device descriptor
381 * @flags: boot mode flags
383 * Returns: 0 if ok, < 0 errno code on error.
385 * Uploads firmware and brings up all the resources needed to be able
386 * to communicate with the device.
388 * TX needs to be setup before the bus-specific code (otherwise on
389 * shutdown, the bus-tx code could try to access it).
392 int __i2400m_dev_start(struct i2400m *i2400m, enum i2400m_bri flags)
395 struct wimax_dev *wimax_dev = &i2400m->wimax_dev;
396 struct net_device *net_dev = wimax_dev->net_dev;
397 struct device *dev = i2400m_dev(i2400m);
400 d_fnstart(3, dev, "(i2400m %p)\n", i2400m);
402 result = i2400m_dev_bootstrap(i2400m, flags);
404 dev_err(dev, "cannot bootstrap device: %d\n", result);
405 goto error_bootstrap;
407 result = i2400m_tx_setup(i2400m);
410 result = i2400m_rx_setup(i2400m);
413 result = i2400m->bus_dev_start(i2400m);
415 goto error_bus_dev_start;
416 i2400m->work_queue = create_singlethread_workqueue(wimax_dev->name);
417 if (i2400m->work_queue == NULL) {
419 dev_err(dev, "cannot create workqueue\n");
420 goto error_create_workqueue;
422 result = i2400m_firmware_check(i2400m); /* fw versions ok? */
425 /* At this point is ok to send commands to the device */
426 result = i2400m_check_mac_addr(i2400m);
428 goto error_check_mac_addr;
430 wimax_state_change(wimax_dev, WIMAX_ST_UNINITIALIZED);
431 result = i2400m_dev_initialize(i2400m);
433 goto error_dev_initialize;
434 /* At this point, reports will come for the device and set it
435 * to the right state if it is different than UNINITIALIZED */
436 d_fnend(3, dev, "(net_dev %p [i2400m %p]) = %d\n",
437 net_dev, i2400m, result);
440 error_dev_initialize:
441 error_check_mac_addr:
443 destroy_workqueue(i2400m->work_queue);
444 error_create_workqueue:
445 i2400m->bus_dev_stop(i2400m);
447 i2400m_rx_release(i2400m);
449 i2400m_tx_release(i2400m);
452 if (result == -ERESTARTSYS && times-- > 0) {
453 flags = I2400M_BRI_SOFT;
456 d_fnend(3, dev, "(net_dev %p [i2400m %p]) = %d\n",
457 net_dev, i2400m, result);
463 int i2400m_dev_start(struct i2400m *i2400m, enum i2400m_bri bm_flags)
466 mutex_lock(&i2400m->init_mutex); /* Well, start the device */
467 result = __i2400m_dev_start(i2400m, bm_flags);
470 mutex_unlock(&i2400m->init_mutex);
476 * i2400m_dev_stop - Tear down driver communication with the device
478 * @i2400m: device descriptor
480 * Returns: 0 if ok, < 0 errno code on error.
482 * Releases all the resources allocated to communicate with the device.
485 void __i2400m_dev_stop(struct i2400m *i2400m)
487 struct wimax_dev *wimax_dev = &i2400m->wimax_dev;
488 struct device *dev = i2400m_dev(i2400m);
490 d_fnstart(3, dev, "(i2400m %p)\n", i2400m);
491 wimax_state_change(wimax_dev, __WIMAX_ST_QUIESCING);
492 i2400m_dev_shutdown(i2400m);
494 destroy_workqueue(i2400m->work_queue);
495 i2400m->bus_dev_stop(i2400m);
496 i2400m_rx_release(i2400m);
497 i2400m_tx_release(i2400m);
498 wimax_state_change(wimax_dev, WIMAX_ST_DOWN);
499 d_fnend(3, dev, "(i2400m %p) = 0\n", i2400m);
504 * Watch out -- we only need to stop if there is a need for it. The
505 * device could have reset itself and failed to come up again (see
506 * _i2400m_dev_reset_handle()).
509 void i2400m_dev_stop(struct i2400m *i2400m)
511 mutex_lock(&i2400m->init_mutex);
512 if (i2400m->updown) {
513 __i2400m_dev_stop(i2400m);
516 mutex_unlock(&i2400m->init_mutex);
521 * The device has rebooted; fix up the device and the driver
523 * Tear down the driver communication with the device, reload the
524 * firmware and reinitialize the communication with the device.
526 * If someone calls a reset when the device's firmware is down, in
527 * theory we won't see it because we are not listening. However, just
528 * in case, leave the code to handle it.
530 * If there is a reset context, use it; this means someone is waiting
531 * for us to tell him when the reset operation is complete and the
532 * device is ready to rock again.
534 * NOTE: if we are in the process of bringing up or down the
535 * communication with the device [running i2400m_dev_start() or
536 * _stop()], don't do anything, let it fail and handle it.
538 * This function is ran always in a thread context
541 void __i2400m_dev_reset_handle(struct work_struct *ws)
544 struct i2400m_work *iw = container_of(ws, struct i2400m_work, ws);
545 struct i2400m *i2400m = iw->i2400m;
546 struct device *dev = i2400m_dev(i2400m);
547 enum wimax_st wimax_state;
548 struct i2400m_reset_ctx *ctx = i2400m->reset_ctx;
550 d_fnstart(3, dev, "(ws %p i2400m %p)\n", ws, i2400m);
552 if (mutex_trylock(&i2400m->init_mutex) == 0) {
553 /* We are still in i2400m_dev_start() [let it fail] or
554 * i2400m_dev_stop() [we are shutting down anyway, so
555 * ignore it] or we are resetting somewhere else. */
556 dev_err(dev, "device rebooted\n");
557 i2400m_msg_to_dev_cancel_wait(i2400m, -ERESTARTSYS);
558 complete(&i2400m->msg_completion);
561 wimax_state = wimax_state_get(&i2400m->wimax_dev);
562 if (wimax_state < WIMAX_ST_UNINITIALIZED) {
563 dev_info(dev, "device rebooted: it is down, ignoring\n");
564 goto out_unlock; /* ifconfig up/down wasn't called */
566 dev_err(dev, "device rebooted: reinitializing driver\n");
567 __i2400m_dev_stop(i2400m);
569 result = __i2400m_dev_start(i2400m,
570 I2400M_BRI_SOFT | I2400M_BRI_MAC_REINIT);
572 dev_err(dev, "device reboot: cannot start the device: %d\n",
574 result = i2400m->bus_reset(i2400m, I2400M_RT_BUS);
580 if (i2400m->reset_ctx) {
581 ctx->result = result;
582 complete(&ctx->completion);
584 mutex_unlock(&i2400m->init_mutex);
588 d_fnend(3, dev, "(ws %p i2400m %p) = void\n", ws, i2400m);
594 * i2400m_dev_reset_handle - Handle a device's reset in a thread context
596 * Schedule a device reset handling out on a thread context, so it
597 * is safe to call from atomic context. We can't use the i2400m's
598 * queue as we are going to destroy it and reinitialize it as part of
599 * the driver bringup/bringup process.
601 * See __i2400m_dev_reset_handle() for details; that takes care of
602 * reinitializing the driver to handle the reset, calling into the
603 * bus-specific functions ops as needed.
605 int i2400m_dev_reset_handle(struct i2400m *i2400m)
607 return i2400m_schedule_work(i2400m, __i2400m_dev_reset_handle,
610 EXPORT_SYMBOL_GPL(i2400m_dev_reset_handle);
614 * i2400m_setup - bus-generic setup function for the i2400m device
616 * @i2400m: device descriptor (bus-specific parts have been initialized)
618 * Returns: 0 if ok, < 0 errno code on error.
620 * Initializes the bus-generic parts of the i2400m driver; the
621 * bus-specific parts have been initialized, function pointers filled
622 * out by the bus-specific probe function.
624 * As well, this registers the WiMAX and net device nodes. Once this
625 * function returns, the device is operative and has to be ready to
626 * receive and send network traffic and WiMAX control operations.
628 int i2400m_setup(struct i2400m *i2400m, enum i2400m_bri bm_flags)
630 int result = -ENODEV;
631 struct device *dev = i2400m_dev(i2400m);
632 struct wimax_dev *wimax_dev = &i2400m->wimax_dev;
633 struct net_device *net_dev = i2400m->wimax_dev.net_dev;
635 d_fnstart(3, dev, "(i2400m %p)\n", i2400m);
637 snprintf(wimax_dev->name, sizeof(wimax_dev->name),
638 "i2400m-%s:%s", dev->bus->name, dev_name(dev));
640 i2400m->bm_cmd_buf = kzalloc(I2400M_BM_CMD_BUF_SIZE, GFP_KERNEL);
641 if (i2400m->bm_cmd_buf == NULL) {
642 dev_err(dev, "cannot allocate USB command buffer\n");
643 goto error_bm_cmd_kzalloc;
645 i2400m->bm_ack_buf = kzalloc(I2400M_BM_ACK_BUF_SIZE, GFP_KERNEL);
646 if (i2400m->bm_ack_buf == NULL) {
647 dev_err(dev, "cannot allocate USB ack buffer\n");
648 goto error_bm_ack_buf_kzalloc;
650 result = i2400m_bootrom_init(i2400m, bm_flags);
652 dev_err(dev, "read mac addr: bootrom init "
653 "failed: %d\n", result);
654 goto error_bootrom_init;
656 result = i2400m_read_mac_addr(i2400m);
658 goto error_read_mac_addr;
659 random_ether_addr(i2400m->src_mac_addr);
661 result = register_netdev(net_dev); /* Okey dokey, bring it up */
663 dev_err(dev, "cannot register i2400m network device: %d\n",
665 goto error_register_netdev;
667 netif_carrier_off(net_dev);
669 result = i2400m_dev_start(i2400m, bm_flags);
671 goto error_dev_start;
673 i2400m->wimax_dev.op_msg_from_user = i2400m_op_msg_from_user;
674 i2400m->wimax_dev.op_rfkill_sw_toggle = i2400m_op_rfkill_sw_toggle;
675 i2400m->wimax_dev.op_reset = i2400m_op_reset;
676 result = wimax_dev_add(&i2400m->wimax_dev, net_dev);
678 goto error_wimax_dev_add;
679 /* User space needs to do some init stuff */
680 wimax_state_change(wimax_dev, WIMAX_ST_UNINITIALIZED);
682 /* Now setup all that requires a registered net and wimax device. */
683 result = sysfs_create_group(&net_dev->dev.kobj, &i2400m_dev_attr_group);
685 dev_err(dev, "cannot setup i2400m's sysfs: %d\n", result);
686 goto error_sysfs_setup;
688 result = i2400m_debugfs_add(i2400m);
690 dev_err(dev, "cannot setup i2400m's debugfs: %d\n", result);
691 goto error_debugfs_setup;
693 d_fnend(3, dev, "(i2400m %p) = %d\n", i2400m, result);
697 sysfs_remove_group(&i2400m->wimax_dev.net_dev->dev.kobj,
698 &i2400m_dev_attr_group);
700 wimax_dev_rm(&i2400m->wimax_dev);
702 i2400m_dev_stop(i2400m);
704 unregister_netdev(net_dev);
705 error_register_netdev:
708 kfree(i2400m->bm_ack_buf);
709 error_bm_ack_buf_kzalloc:
710 kfree(i2400m->bm_cmd_buf);
711 error_bm_cmd_kzalloc:
712 d_fnend(3, dev, "(i2400m %p) = %d\n", i2400m, result);
715 EXPORT_SYMBOL_GPL(i2400m_setup);
719 * i2400m_release - release the bus-generic driver resources
721 * Sends a disconnect message and undoes any setup done by i2400m_setup()
723 void i2400m_release(struct i2400m *i2400m)
725 struct device *dev = i2400m_dev(i2400m);
727 d_fnstart(3, dev, "(i2400m %p)\n", i2400m);
728 netif_stop_queue(i2400m->wimax_dev.net_dev);
730 i2400m_debugfs_rm(i2400m);
731 sysfs_remove_group(&i2400m->wimax_dev.net_dev->dev.kobj,
732 &i2400m_dev_attr_group);
733 wimax_dev_rm(&i2400m->wimax_dev);
734 i2400m_dev_stop(i2400m);
735 unregister_netdev(i2400m->wimax_dev.net_dev);
736 kfree(i2400m->bm_ack_buf);
737 kfree(i2400m->bm_cmd_buf);
738 d_fnend(3, dev, "(i2400m %p) = void\n", i2400m);
740 EXPORT_SYMBOL_GPL(i2400m_release);
744 * Debug levels control; see debug.h
746 struct d_level D_LEVEL[] = {
747 D_SUBMODULE_DEFINE(control),
748 D_SUBMODULE_DEFINE(driver),
749 D_SUBMODULE_DEFINE(debugfs),
750 D_SUBMODULE_DEFINE(fw),
751 D_SUBMODULE_DEFINE(netdev),
752 D_SUBMODULE_DEFINE(rfkill),
753 D_SUBMODULE_DEFINE(rx),
754 D_SUBMODULE_DEFINE(tx),
756 size_t D_LEVEL_SIZE = ARRAY_SIZE(D_LEVEL);
760 int __init i2400m_driver_init(void)
764 module_init(i2400m_driver_init);
767 void __exit i2400m_driver_exit(void)
769 /* for scheds i2400m_dev_reset_handle() */
770 flush_scheduled_work();
773 module_exit(i2400m_driver_exit);
775 MODULE_AUTHOR("Intel Corporation <linux-wimax@intel.com>");
776 MODULE_DESCRIPTION("Intel 2400M WiMAX networking bus-generic driver");
777 MODULE_LICENSE("GPL");