2 * Copyright (C) 2008, cozybit Inc.
3 * Copyright (C) 2003-2006, Marvell International Ltd.
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; either version 2 of the License, or (at
8 * your option) any later version.
10 #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
12 #include <linux/hardirq.h>
13 #include <linux/slab.h>
15 #include <linux/etherdevice.h>
16 #include <linux/module.h>
17 #include "libertas_tf.h"
19 /* thinfirm version: 5.132.X.pX */
20 #define LBTF_FW_VER_MIN 0x05840300
21 #define LBTF_FW_VER_MAX 0x0584ffff
22 #define QOS_CONTROL_LEN 2
24 /* Module parameters */
25 unsigned int lbtf_debug;
26 EXPORT_SYMBOL_GPL(lbtf_debug);
27 module_param_named(libertas_tf_debug, lbtf_debug, int, 0644);
29 struct workqueue_struct *lbtf_wq;
31 static const struct ieee80211_channel lbtf_channels[] = {
32 { .center_freq = 2412, .hw_value = 1 },
33 { .center_freq = 2417, .hw_value = 2 },
34 { .center_freq = 2422, .hw_value = 3 },
35 { .center_freq = 2427, .hw_value = 4 },
36 { .center_freq = 2432, .hw_value = 5 },
37 { .center_freq = 2437, .hw_value = 6 },
38 { .center_freq = 2442, .hw_value = 7 },
39 { .center_freq = 2447, .hw_value = 8 },
40 { .center_freq = 2452, .hw_value = 9 },
41 { .center_freq = 2457, .hw_value = 10 },
42 { .center_freq = 2462, .hw_value = 11 },
43 { .center_freq = 2467, .hw_value = 12 },
44 { .center_freq = 2472, .hw_value = 13 },
45 { .center_freq = 2484, .hw_value = 14 },
48 /* This table contains the hardware specific values for the modulation rates. */
49 static const struct ieee80211_rate lbtf_rates[] = {
54 .flags = IEEE80211_RATE_SHORT_PREAMBLE },
57 .flags = IEEE80211_RATE_SHORT_PREAMBLE },
60 .flags = IEEE80211_RATE_SHORT_PREAMBLE },
87 static void lbtf_cmd_work(struct work_struct *work)
89 struct lbtf_private *priv = container_of(work, struct lbtf_private,
92 lbtf_deb_enter(LBTF_DEB_CMD);
94 spin_lock_irq(&priv->driver_lock);
95 /* command response? */
96 if (priv->cmd_response_rxed) {
97 priv->cmd_response_rxed = 0;
98 spin_unlock_irq(&priv->driver_lock);
99 lbtf_process_rx_command(priv);
100 spin_lock_irq(&priv->driver_lock);
103 if (priv->cmd_timed_out && priv->cur_cmd) {
104 struct cmd_ctrl_node *cmdnode = priv->cur_cmd;
106 if (++priv->nr_retries > 10) {
107 lbtf_complete_command(priv, cmdnode,
109 priv->nr_retries = 0;
111 priv->cur_cmd = NULL;
113 /* Stick it back at the _top_ of the pending
114 * queue for immediate resubmission */
115 list_add(&cmdnode->list, &priv->cmdpendingq);
118 priv->cmd_timed_out = 0;
119 spin_unlock_irq(&priv->driver_lock);
121 /* Execute the next command */
123 lbtf_execute_next_command(priv);
125 lbtf_deb_leave(LBTF_DEB_CMD);
129 * lbtf_setup_firmware: initialize firmware.
131 * @priv A pointer to struct lbtf_private structure
133 * Returns: 0 on success.
135 static int lbtf_setup_firmware(struct lbtf_private *priv)
139 lbtf_deb_enter(LBTF_DEB_FW);
141 * Read priv address from HW
143 eth_broadcast_addr(priv->current_addr);
144 ret = lbtf_update_hw_spec(priv);
150 lbtf_set_mac_control(priv);
151 lbtf_set_radio_control(priv);
155 lbtf_deb_leave_args(LBTF_DEB_FW, "ret: %d", ret);
160 * This function handles the timeout of command sending.
161 * It will re-send the same command again.
163 static void command_timer_fn(struct timer_list *t)
165 struct lbtf_private *priv = from_timer(priv, t, command_timer);
167 lbtf_deb_enter(LBTF_DEB_CMD);
169 spin_lock_irqsave(&priv->driver_lock, flags);
171 if (!priv->cur_cmd) {
172 printk(KERN_DEBUG "libertastf: command timer expired; "
173 "no pending command\n");
177 printk(KERN_DEBUG "libertas: command %x timed out\n",
178 le16_to_cpu(priv->cur_cmd->cmdbuf->command));
180 priv->cmd_timed_out = 1;
181 queue_work(lbtf_wq, &priv->cmd_work);
183 spin_unlock_irqrestore(&priv->driver_lock, flags);
184 lbtf_deb_leave(LBTF_DEB_CMD);
187 static int lbtf_init_adapter(struct lbtf_private *priv)
189 lbtf_deb_enter(LBTF_DEB_MAIN);
190 eth_broadcast_addr(priv->current_addr);
191 mutex_init(&priv->lock);
194 timer_setup(&priv->command_timer, command_timer_fn, 0);
196 INIT_LIST_HEAD(&priv->cmdfreeq);
197 INIT_LIST_HEAD(&priv->cmdpendingq);
199 spin_lock_init(&priv->driver_lock);
201 /* Allocate the command buffers */
202 if (lbtf_allocate_cmd_buffer(priv))
205 lbtf_deb_leave(LBTF_DEB_MAIN);
209 static void lbtf_free_adapter(struct lbtf_private *priv)
211 lbtf_deb_enter(LBTF_DEB_MAIN);
212 lbtf_free_cmd_buffer(priv);
213 del_timer(&priv->command_timer);
214 lbtf_deb_leave(LBTF_DEB_MAIN);
217 static void lbtf_op_tx(struct ieee80211_hw *hw,
218 struct ieee80211_tx_control *control,
221 struct lbtf_private *priv = hw->priv;
223 priv->skb_to_tx = skb;
224 queue_work(lbtf_wq, &priv->tx_work);
226 * queue will be restarted when we receive transmission feedback if
227 * there are no buffered multicast frames to send
229 ieee80211_stop_queues(priv->hw);
232 static void lbtf_tx_work(struct work_struct *work)
234 struct lbtf_private *priv = container_of(work, struct lbtf_private,
237 struct ieee80211_tx_info *info;
239 struct sk_buff *skb = NULL;
242 lbtf_deb_enter(LBTF_DEB_MACOPS | LBTF_DEB_TX);
244 if ((priv->vif->type == NL80211_IFTYPE_AP) &&
245 (!skb_queue_empty(&priv->bc_ps_buf)))
246 skb = skb_dequeue(&priv->bc_ps_buf);
247 else if (priv->skb_to_tx) {
248 skb = priv->skb_to_tx;
249 priv->skb_to_tx = NULL;
251 lbtf_deb_leave(LBTF_DEB_MACOPS | LBTF_DEB_TX);
256 info = IEEE80211_SKB_CB(skb);
257 txpd = skb_push(skb, sizeof(struct txpd));
259 if (priv->surpriseremoved) {
260 dev_kfree_skb_any(skb);
261 lbtf_deb_leave(LBTF_DEB_MACOPS | LBTF_DEB_TX);
265 memset(txpd, 0, sizeof(struct txpd));
266 /* Activate per-packet rate selection */
267 txpd->tx_control |= cpu_to_le32(MRVL_PER_PACKET_RATE |
268 ieee80211_get_tx_rate(priv->hw, info)->hw_value);
270 /* copy destination address from 802.11 header */
271 memcpy(txpd->tx_dest_addr_high, skb->data + sizeof(struct txpd) + 4,
273 txpd->tx_packet_length = cpu_to_le16(len);
274 txpd->tx_packet_location = cpu_to_le32(sizeof(struct txpd));
275 lbtf_deb_hex(LBTF_DEB_TX, "TX Data", skb->data, min_t(unsigned int, skb->len, 100));
276 BUG_ON(priv->tx_skb);
277 spin_lock_irq(&priv->driver_lock);
279 err = priv->ops->hw_host_to_card(priv, MVMS_DAT, skb->data, skb->len);
280 spin_unlock_irq(&priv->driver_lock);
282 dev_kfree_skb_any(skb);
284 pr_err("TX error: %d", err);
286 lbtf_deb_leave(LBTF_DEB_MACOPS | LBTF_DEB_TX);
289 static int lbtf_op_start(struct ieee80211_hw *hw)
291 struct lbtf_private *priv = hw->priv;
294 lbtf_deb_enter(LBTF_DEB_MACOPS);
296 /* poke the firmware */
297 priv->capability = WLAN_CAPABILITY_SHORT_PREAMBLE;
298 priv->radioon = RADIO_ON;
299 priv->mac_control = CMD_ACT_MAC_RX_ON | CMD_ACT_MAC_TX_ON;
300 ret = lbtf_setup_firmware(priv);
302 goto err_setup_firmware;
304 if ((priv->fwrelease < LBTF_FW_VER_MIN) ||
305 (priv->fwrelease > LBTF_FW_VER_MAX)) {
307 goto err_setup_firmware;
310 lbtf_deb_leave(LBTF_DEB_MACOPS);
314 lbtf_deb_leave_args(LBTF_DEB_MACOPS, "fw setup error; ret=%d", ret);
318 static void lbtf_op_stop(struct ieee80211_hw *hw)
320 struct lbtf_private *priv = hw->priv;
324 struct cmd_ctrl_node *cmdnode;
326 lbtf_deb_enter(LBTF_DEB_MACOPS);
328 /* Flush pending command nodes */
329 spin_lock_irqsave(&priv->driver_lock, flags);
330 list_for_each_entry(cmdnode, &priv->cmdpendingq, list) {
331 cmdnode->result = -ENOENT;
332 cmdnode->cmdwaitqwoken = 1;
333 wake_up_interruptible(&cmdnode->cmdwait_q);
336 spin_unlock_irqrestore(&priv->driver_lock, flags);
337 cancel_work_sync(&priv->cmd_work);
338 cancel_work_sync(&priv->tx_work);
339 while ((skb = skb_dequeue(&priv->bc_ps_buf)))
340 dev_kfree_skb_any(skb);
341 priv->radioon = RADIO_OFF;
342 lbtf_set_radio_control(priv);
344 lbtf_deb_leave(LBTF_DEB_MACOPS);
347 static int lbtf_op_add_interface(struct ieee80211_hw *hw,
348 struct ieee80211_vif *vif)
350 struct lbtf_private *priv = hw->priv;
351 lbtf_deb_enter(LBTF_DEB_MACOPS);
352 if (priv->vif != NULL)
357 case NL80211_IFTYPE_MESH_POINT:
358 case NL80211_IFTYPE_AP:
359 lbtf_set_mode(priv, LBTF_AP_MODE);
361 case NL80211_IFTYPE_STATION:
362 lbtf_set_mode(priv, LBTF_STA_MODE);
368 lbtf_set_mac_address(priv, (u8 *) vif->addr);
369 lbtf_deb_leave(LBTF_DEB_MACOPS);
373 static void lbtf_op_remove_interface(struct ieee80211_hw *hw,
374 struct ieee80211_vif *vif)
376 struct lbtf_private *priv = hw->priv;
377 lbtf_deb_enter(LBTF_DEB_MACOPS);
379 if (priv->vif->type == NL80211_IFTYPE_AP ||
380 priv->vif->type == NL80211_IFTYPE_MESH_POINT)
381 lbtf_beacon_ctrl(priv, 0, 0);
382 lbtf_set_mode(priv, LBTF_PASSIVE_MODE);
383 lbtf_set_bssid(priv, 0, NULL);
385 lbtf_deb_leave(LBTF_DEB_MACOPS);
388 static int lbtf_op_config(struct ieee80211_hw *hw, u32 changed)
390 struct lbtf_private *priv = hw->priv;
391 struct ieee80211_conf *conf = &hw->conf;
392 lbtf_deb_enter(LBTF_DEB_MACOPS);
394 if (conf->chandef.chan->center_freq != priv->cur_freq) {
395 priv->cur_freq = conf->chandef.chan->center_freq;
396 lbtf_set_channel(priv, conf->chandef.chan->hw_value);
398 lbtf_deb_leave(LBTF_DEB_MACOPS);
402 static u64 lbtf_op_prepare_multicast(struct ieee80211_hw *hw,
403 struct netdev_hw_addr_list *mc_list)
405 struct lbtf_private *priv = hw->priv;
407 struct netdev_hw_addr *ha;
408 int mc_count = netdev_hw_addr_list_count(mc_list);
410 if (!mc_count || mc_count > MRVDRV_MAX_MULTICAST_LIST_SIZE)
413 priv->nr_of_multicastmacaddr = mc_count;
415 netdev_hw_addr_list_for_each(ha, mc_list)
416 memcpy(&priv->multicastlist[i++], ha->addr, ETH_ALEN);
421 #define SUPPORTED_FIF_FLAGS FIF_ALLMULTI
422 static void lbtf_op_configure_filter(struct ieee80211_hw *hw,
423 unsigned int changed_flags,
424 unsigned int *new_flags,
427 struct lbtf_private *priv = hw->priv;
428 int old_mac_control = priv->mac_control;
430 lbtf_deb_enter(LBTF_DEB_MACOPS);
432 changed_flags &= SUPPORTED_FIF_FLAGS;
433 *new_flags &= SUPPORTED_FIF_FLAGS;
435 if (!changed_flags) {
436 lbtf_deb_leave(LBTF_DEB_MACOPS);
440 priv->mac_control &= ~CMD_ACT_MAC_PROMISCUOUS_ENABLE;
441 if (*new_flags & (FIF_ALLMULTI) ||
442 multicast > MRVDRV_MAX_MULTICAST_LIST_SIZE) {
443 priv->mac_control |= CMD_ACT_MAC_ALL_MULTICAST_ENABLE;
444 priv->mac_control &= ~CMD_ACT_MAC_MULTICAST_ENABLE;
445 } else if (multicast) {
446 priv->mac_control |= CMD_ACT_MAC_MULTICAST_ENABLE;
447 priv->mac_control &= ~CMD_ACT_MAC_ALL_MULTICAST_ENABLE;
448 lbtf_cmd_set_mac_multicast_addr(priv);
450 priv->mac_control &= ~(CMD_ACT_MAC_MULTICAST_ENABLE |
451 CMD_ACT_MAC_ALL_MULTICAST_ENABLE);
452 if (priv->nr_of_multicastmacaddr) {
453 priv->nr_of_multicastmacaddr = 0;
454 lbtf_cmd_set_mac_multicast_addr(priv);
459 if (priv->mac_control != old_mac_control)
460 lbtf_set_mac_control(priv);
462 lbtf_deb_leave(LBTF_DEB_MACOPS);
465 static void lbtf_op_bss_info_changed(struct ieee80211_hw *hw,
466 struct ieee80211_vif *vif,
467 struct ieee80211_bss_conf *bss_conf,
470 struct lbtf_private *priv = hw->priv;
471 struct sk_buff *beacon;
472 lbtf_deb_enter(LBTF_DEB_MACOPS);
474 if (changes & (BSS_CHANGED_BEACON | BSS_CHANGED_BEACON_INT)) {
475 switch (priv->vif->type) {
476 case NL80211_IFTYPE_AP:
477 case NL80211_IFTYPE_MESH_POINT:
478 beacon = ieee80211_beacon_get(hw, vif);
480 lbtf_beacon_set(priv, beacon);
482 lbtf_beacon_ctrl(priv, 1,
483 bss_conf->beacon_int);
491 if (changes & BSS_CHANGED_BSSID) {
492 bool activate = !is_zero_ether_addr(bss_conf->bssid);
493 lbtf_set_bssid(priv, activate, bss_conf->bssid);
496 if (changes & BSS_CHANGED_ERP_PREAMBLE) {
497 if (bss_conf->use_short_preamble)
498 priv->preamble = CMD_TYPE_SHORT_PREAMBLE;
500 priv->preamble = CMD_TYPE_LONG_PREAMBLE;
501 lbtf_set_radio_control(priv);
504 lbtf_deb_leave(LBTF_DEB_MACOPS);
507 static int lbtf_op_get_survey(struct ieee80211_hw *hw, int idx,
508 struct survey_info *survey)
510 struct lbtf_private *priv = hw->priv;
511 struct ieee80211_conf *conf = &hw->conf;
516 survey->channel = conf->chandef.chan;
517 survey->filled = SURVEY_INFO_NOISE_DBM;
518 survey->noise = priv->noise;
523 static const struct ieee80211_ops lbtf_ops = {
525 .start = lbtf_op_start,
526 .stop = lbtf_op_stop,
527 .add_interface = lbtf_op_add_interface,
528 .remove_interface = lbtf_op_remove_interface,
529 .config = lbtf_op_config,
530 .prepare_multicast = lbtf_op_prepare_multicast,
531 .configure_filter = lbtf_op_configure_filter,
532 .bss_info_changed = lbtf_op_bss_info_changed,
533 .get_survey = lbtf_op_get_survey,
536 int lbtf_rx(struct lbtf_private *priv, struct sk_buff *skb)
538 struct ieee80211_rx_status stats;
541 struct ieee80211_hdr *hdr;
543 lbtf_deb_enter(LBTF_DEB_RX);
545 if (priv->radioon != RADIO_ON) {
546 lbtf_deb_rx("rx before we turned on the radio");
550 prxpd = (struct rxpd *) skb->data;
552 memset(&stats, 0, sizeof(stats));
553 if (!(prxpd->status & cpu_to_le16(MRVDRV_RXPD_STATUS_OK)))
554 stats.flag |= RX_FLAG_FAILED_FCS_CRC;
555 stats.freq = priv->cur_freq;
556 stats.band = NL80211_BAND_2GHZ;
557 stats.signal = prxpd->snr - prxpd->nf;
558 priv->noise = prxpd->nf;
559 /* Marvell rate index has a hole at value 4 */
560 if (prxpd->rx_rate > 4)
562 stats.rate_idx = prxpd->rx_rate;
563 skb_pull(skb, sizeof(struct rxpd));
565 hdr = (struct ieee80211_hdr *)skb->data;
567 need_padding = ieee80211_is_data_qos(hdr->frame_control);
568 need_padding ^= ieee80211_has_a4(hdr->frame_control);
569 need_padding ^= ieee80211_is_data_qos(hdr->frame_control) &&
570 (*ieee80211_get_qos_ctl(hdr) &
571 IEEE80211_QOS_CTL_A_MSDU_PRESENT);
574 memmove(skb->data + 2, skb->data, skb->len);
578 memcpy(IEEE80211_SKB_RXCB(skb), &stats, sizeof(stats));
580 lbtf_deb_rx("rx data: skb->len-sizeof(RxPd) = %d-%zd = %zd\n",
581 skb->len, sizeof(struct rxpd), skb->len - sizeof(struct rxpd));
582 lbtf_deb_hex(LBTF_DEB_RX, "RX Data", skb->data,
583 min_t(unsigned int, skb->len, 100));
585 ieee80211_rx_irqsafe(priv->hw, skb);
588 lbtf_deb_leave(LBTF_DEB_RX);
591 EXPORT_SYMBOL_GPL(lbtf_rx);
594 * lbtf_add_card: Add and initialize the card.
596 * @card A pointer to card
598 * Returns: pointer to struct lbtf_priv.
600 struct lbtf_private *lbtf_add_card(void *card, struct device *dmdev,
601 const struct lbtf_ops *ops)
603 struct ieee80211_hw *hw;
604 struct lbtf_private *priv = NULL;
606 lbtf_deb_enter(LBTF_DEB_MAIN);
608 hw = ieee80211_alloc_hw(sizeof(struct lbtf_private), &lbtf_ops);
613 if (lbtf_init_adapter(priv))
614 goto err_init_adapter;
620 priv->radioon = RADIO_OFF;
623 ieee80211_hw_set(hw, HOST_BROADCAST_PS_BUFFERING);
624 ieee80211_hw_set(hw, SIGNAL_DBM);
625 hw->extra_tx_headroom = sizeof(struct txpd);
626 memcpy(priv->channels, lbtf_channels, sizeof(lbtf_channels));
627 memcpy(priv->rates, lbtf_rates, sizeof(lbtf_rates));
628 priv->band.n_bitrates = ARRAY_SIZE(lbtf_rates);
629 priv->band.bitrates = priv->rates;
630 priv->band.n_channels = ARRAY_SIZE(lbtf_channels);
631 priv->band.channels = priv->channels;
632 hw->wiphy->bands[NL80211_BAND_2GHZ] = &priv->band;
633 hw->wiphy->interface_modes =
634 BIT(NL80211_IFTYPE_STATION) |
635 BIT(NL80211_IFTYPE_ADHOC);
636 skb_queue_head_init(&priv->bc_ps_buf);
638 wiphy_ext_feature_set(hw->wiphy, NL80211_EXT_FEATURE_CQM_RSSI_LIST);
640 SET_IEEE80211_DEV(hw, dmdev);
642 INIT_WORK(&priv->cmd_work, lbtf_cmd_work);
643 INIT_WORK(&priv->tx_work, lbtf_tx_work);
645 if (priv->ops->hw_prog_firmware(priv)) {
646 lbtf_deb_usbd(dmdev, "Error programming the firmware\n");
647 priv->ops->hw_reset_device(priv);
648 goto err_init_adapter;
651 /* The firmware seems to start with the radio enabled. Turn it
652 * off before an actual mac80211 start callback is invoked.
654 lbtf_set_radio_control(priv);
656 if (ieee80211_register_hw(hw))
657 goto err_init_adapter;
659 dev_info(dmdev, "libertastf: Marvell WLAN 802.11 thinfirm adapter\n");
663 lbtf_free_adapter(priv);
664 ieee80211_free_hw(hw);
668 lbtf_deb_leave_args(LBTF_DEB_MAIN, "priv %p", priv);
671 EXPORT_SYMBOL_GPL(lbtf_add_card);
674 int lbtf_remove_card(struct lbtf_private *priv)
676 struct ieee80211_hw *hw = priv->hw;
678 lbtf_deb_enter(LBTF_DEB_MAIN);
680 priv->surpriseremoved = 1;
681 del_timer(&priv->command_timer);
682 lbtf_free_adapter(priv);
684 ieee80211_unregister_hw(hw);
685 ieee80211_free_hw(hw);
687 lbtf_deb_leave(LBTF_DEB_MAIN);
690 EXPORT_SYMBOL_GPL(lbtf_remove_card);
692 void lbtf_send_tx_feedback(struct lbtf_private *priv, u8 retrycnt, u8 fail)
694 struct ieee80211_tx_info *info = IEEE80211_SKB_CB(priv->tx_skb);
696 ieee80211_tx_info_clear_status(info);
698 * Commented out, otherwise we never go beyond 1Mbit/s using mac80211
699 * default pid rc algorithm.
701 * info->status.retry_count = MRVL_DEFAULT_RETRIES - retrycnt;
703 if (!(info->flags & IEEE80211_TX_CTL_NO_ACK) && !fail)
704 info->flags |= IEEE80211_TX_STAT_ACK;
705 skb_pull(priv->tx_skb, sizeof(struct txpd));
706 ieee80211_tx_status_irqsafe(priv->hw, priv->tx_skb);
708 if (!priv->skb_to_tx && skb_queue_empty(&priv->bc_ps_buf))
709 ieee80211_wake_queues(priv->hw);
711 queue_work(lbtf_wq, &priv->tx_work);
713 EXPORT_SYMBOL_GPL(lbtf_send_tx_feedback);
715 void lbtf_bcn_sent(struct lbtf_private *priv)
717 struct sk_buff *skb = NULL;
719 if (priv->vif->type != NL80211_IFTYPE_AP)
722 if (skb_queue_empty(&priv->bc_ps_buf)) {
723 bool tx_buff_bc = false;
725 while ((skb = ieee80211_get_buffered_bc(priv->hw, priv->vif))) {
726 skb_queue_tail(&priv->bc_ps_buf, skb);
730 ieee80211_stop_queues(priv->hw);
731 queue_work(lbtf_wq, &priv->tx_work);
735 skb = ieee80211_beacon_get(priv->hw, priv->vif);
738 lbtf_beacon_set(priv, skb);
742 EXPORT_SYMBOL_GPL(lbtf_bcn_sent);
744 static int __init lbtf_init_module(void)
746 lbtf_deb_enter(LBTF_DEB_MAIN);
747 lbtf_wq = alloc_workqueue("libertastf", WQ_MEM_RECLAIM, 0);
748 if (lbtf_wq == NULL) {
749 printk(KERN_ERR "libertastf: couldn't create workqueue\n");
752 lbtf_deb_leave(LBTF_DEB_MAIN);
756 static void __exit lbtf_exit_module(void)
758 lbtf_deb_enter(LBTF_DEB_MAIN);
759 destroy_workqueue(lbtf_wq);
760 lbtf_deb_leave(LBTF_DEB_MAIN);
763 module_init(lbtf_init_module);
764 module_exit(lbtf_exit_module);
766 MODULE_DESCRIPTION("Libertas WLAN Thinfirm Driver Library");
767 MODULE_AUTHOR("Cozybit Inc.");
768 MODULE_LICENSE("GPL");