aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/libertas_tf/main.c
diff options
context:
space:
mode:
authorJohn W. Linville <linville@tuxdriver.com>2010-05-05 16:14:16 -0400
committerJohn W. Linville <linville@tuxdriver.com>2010-05-05 16:14:16 -0400
commit83163244f845c296a118ce85c653872dbff6abfe (patch)
treece2eac695a1c198f23d537e20ed86c16ece21f7e /drivers/net/wireless/libertas_tf/main.c
parent0a12761bcd5646691c5d16dd93df84d1b8849285 (diff)
parentadfba3c7c026a6a5560d2a43fefc9b198cb74462 (diff)
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next-2.6 into for-davem
Conflicts: drivers/net/wireless/libertas_tf/cmd.c drivers/net/wireless/libertas_tf/main.c
Diffstat (limited to 'drivers/net/wireless/libertas_tf/main.c')
-rw-r--r--drivers/net/wireless/libertas_tf/main.c91
1 files changed, 85 insertions, 6 deletions
diff --git a/drivers/net/wireless/libertas_tf/main.c b/drivers/net/wireless/libertas_tf/main.c
index 7533a23e0500..60787de56f3a 100644
--- a/drivers/net/wireless/libertas_tf/main.c
+++ b/drivers/net/wireless/libertas_tf/main.c
@@ -7,10 +7,12 @@
7 * the Free Software Foundation; either version 2 of the License, or (at 7 * the Free Software Foundation; either version 2 of the License, or (at
8 * your option) any later version. 8 * your option) any later version.
9 */ 9 */
10#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
11
10#include <linux/slab.h> 12#include <linux/slab.h>
11 13
14#include <linux/etherdevice.h>
12#include "libertas_tf.h" 15#include "libertas_tf.h"
13#include "linux/etherdevice.h"
14 16
15#define DRIVER_RELEASE_VERSION "004.p0" 17#define DRIVER_RELEASE_VERSION "004.p0"
16/* thinfirm version: 5.132.X.pX */ 18/* thinfirm version: 5.132.X.pX */
@@ -18,7 +20,17 @@
18#define LBTF_FW_VER_MAX 0x0584ffff 20#define LBTF_FW_VER_MAX 0x0584ffff
19#define QOS_CONTROL_LEN 2 21#define QOS_CONTROL_LEN 2
20 22
21static const char lbtf_driver_version[] = "THINFIRM-USB8388-" DRIVER_RELEASE_VERSION; 23/* Module parameters */
24unsigned int lbtf_debug;
25EXPORT_SYMBOL_GPL(lbtf_debug);
26module_param_named(libertas_tf_debug, lbtf_debug, int, 0644);
27
28static const char lbtf_driver_version[] = "THINFIRM-USB8388-" DRIVER_RELEASE_VERSION
29#ifdef DEBUG
30 "-dbg"
31#endif
32 "";
33
22struct workqueue_struct *lbtf_wq; 34struct workqueue_struct *lbtf_wq;
23 35
24static const struct ieee80211_channel lbtf_channels[] = { 36static const struct ieee80211_channel lbtf_channels[] = {
@@ -81,6 +93,9 @@ static void lbtf_cmd_work(struct work_struct *work)
81{ 93{
82 struct lbtf_private *priv = container_of(work, struct lbtf_private, 94 struct lbtf_private *priv = container_of(work, struct lbtf_private,
83 cmd_work); 95 cmd_work);
96
97 lbtf_deb_enter(LBTF_DEB_CMD);
98
84 spin_lock_irq(&priv->driver_lock); 99 spin_lock_irq(&priv->driver_lock);
85 /* command response? */ 100 /* command response? */
86 if (priv->cmd_response_rxed) { 101 if (priv->cmd_response_rxed) {
@@ -108,11 +123,16 @@ static void lbtf_cmd_work(struct work_struct *work)
108 priv->cmd_timed_out = 0; 123 priv->cmd_timed_out = 0;
109 spin_unlock_irq(&priv->driver_lock); 124 spin_unlock_irq(&priv->driver_lock);
110 125
111 if (!priv->fw_ready) 126 if (!priv->fw_ready) {
127 lbtf_deb_leave_args(LBTF_DEB_CMD, "fw not ready");
112 return; 128 return;
129 }
130
113 /* Execute the next command */ 131 /* Execute the next command */
114 if (!priv->cur_cmd) 132 if (!priv->cur_cmd)
115 lbtf_execute_next_command(priv); 133 lbtf_execute_next_command(priv);
134
135 lbtf_deb_leave(LBTF_DEB_CMD);
116} 136}
117 137
118/** 138/**
@@ -126,6 +146,7 @@ static int lbtf_setup_firmware(struct lbtf_private *priv)
126{ 146{
127 int ret = -1; 147 int ret = -1;
128 148
149 lbtf_deb_enter(LBTF_DEB_FW);
129 /* 150 /*
130 * Read priv address from HW 151 * Read priv address from HW
131 */ 152 */
@@ -141,6 +162,7 @@ static int lbtf_setup_firmware(struct lbtf_private *priv)
141 162
142 ret = 0; 163 ret = 0;
143done: 164done:
165 lbtf_deb_leave_args(LBTF_DEB_FW, "ret: %d", ret);
144 return ret; 166 return ret;
145} 167}
146 168
@@ -152,6 +174,7 @@ static void command_timer_fn(unsigned long data)
152{ 174{
153 struct lbtf_private *priv = (struct lbtf_private *)data; 175 struct lbtf_private *priv = (struct lbtf_private *)data;
154 unsigned long flags; 176 unsigned long flags;
177 lbtf_deb_enter(LBTF_DEB_CMD);
155 178
156 spin_lock_irqsave(&priv->driver_lock, flags); 179 spin_lock_irqsave(&priv->driver_lock, flags);
157 180
@@ -168,10 +191,12 @@ static void command_timer_fn(unsigned long data)
168 queue_work(lbtf_wq, &priv->cmd_work); 191 queue_work(lbtf_wq, &priv->cmd_work);
169out: 192out:
170 spin_unlock_irqrestore(&priv->driver_lock, flags); 193 spin_unlock_irqrestore(&priv->driver_lock, flags);
194 lbtf_deb_leave(LBTF_DEB_CMD);
171} 195}
172 196
173static int lbtf_init_adapter(struct lbtf_private *priv) 197static int lbtf_init_adapter(struct lbtf_private *priv)
174{ 198{
199 lbtf_deb_enter(LBTF_DEB_MAIN);
175 memset(priv->current_addr, 0xff, ETH_ALEN); 200 memset(priv->current_addr, 0xff, ETH_ALEN);
176 mutex_init(&priv->lock); 201 mutex_init(&priv->lock);
177 202
@@ -188,13 +213,16 @@ static int lbtf_init_adapter(struct lbtf_private *priv)
188 if (lbtf_allocate_cmd_buffer(priv)) 213 if (lbtf_allocate_cmd_buffer(priv))
189 return -1; 214 return -1;
190 215
216 lbtf_deb_leave(LBTF_DEB_MAIN);
191 return 0; 217 return 0;
192} 218}
193 219
194static void lbtf_free_adapter(struct lbtf_private *priv) 220static void lbtf_free_adapter(struct lbtf_private *priv)
195{ 221{
222 lbtf_deb_enter(LBTF_DEB_MAIN);
196 lbtf_free_cmd_buffer(priv); 223 lbtf_free_cmd_buffer(priv);
197 del_timer(&priv->command_timer); 224 del_timer(&priv->command_timer);
225 lbtf_deb_leave(LBTF_DEB_MAIN);
198} 226}
199 227
200static int lbtf_op_tx(struct ieee80211_hw *hw, struct sk_buff *skb) 228static int lbtf_op_tx(struct ieee80211_hw *hw, struct sk_buff *skb)
@@ -221,14 +249,18 @@ static void lbtf_tx_work(struct work_struct *work)
221 struct sk_buff *skb = NULL; 249 struct sk_buff *skb = NULL;
222 int err; 250 int err;
223 251
252 lbtf_deb_enter(LBTF_DEB_MACOPS | LBTF_DEB_TX);
253
224 if ((priv->vif->type == NL80211_IFTYPE_AP) && 254 if ((priv->vif->type == NL80211_IFTYPE_AP) &&
225 (!skb_queue_empty(&priv->bc_ps_buf))) 255 (!skb_queue_empty(&priv->bc_ps_buf)))
226 skb = skb_dequeue(&priv->bc_ps_buf); 256 skb = skb_dequeue(&priv->bc_ps_buf);
227 else if (priv->skb_to_tx) { 257 else if (priv->skb_to_tx) {
228 skb = priv->skb_to_tx; 258 skb = priv->skb_to_tx;
229 priv->skb_to_tx = NULL; 259 priv->skb_to_tx = NULL;
230 } else 260 } else {
261 lbtf_deb_leave(LBTF_DEB_MACOPS | LBTF_DEB_TX);
231 return; 262 return;
263 }
232 264
233 len = skb->len; 265 len = skb->len;
234 info = IEEE80211_SKB_CB(skb); 266 info = IEEE80211_SKB_CB(skb);
@@ -236,6 +268,7 @@ static void lbtf_tx_work(struct work_struct *work)
236 268
237 if (priv->surpriseremoved) { 269 if (priv->surpriseremoved) {
238 dev_kfree_skb_any(skb); 270 dev_kfree_skb_any(skb);
271 lbtf_deb_leave(LBTF_DEB_MACOPS | LBTF_DEB_TX);
239 return; 272 return;
240 } 273 }
241 274
@@ -249,6 +282,7 @@ static void lbtf_tx_work(struct work_struct *work)
249 ETH_ALEN); 282 ETH_ALEN);
250 txpd->tx_packet_length = cpu_to_le16(len); 283 txpd->tx_packet_length = cpu_to_le16(len);
251 txpd->tx_packet_location = cpu_to_le32(sizeof(struct txpd)); 284 txpd->tx_packet_location = cpu_to_le32(sizeof(struct txpd));
285 lbtf_deb_hex(LBTF_DEB_TX, "TX Data", skb->data, min_t(unsigned int, skb->len, 100));
252 BUG_ON(priv->tx_skb); 286 BUG_ON(priv->tx_skb);
253 spin_lock_irq(&priv->driver_lock); 287 spin_lock_irq(&priv->driver_lock);
254 priv->tx_skb = skb; 288 priv->tx_skb = skb;
@@ -257,7 +291,9 @@ static void lbtf_tx_work(struct work_struct *work)
257 if (err) { 291 if (err) {
258 dev_kfree_skb_any(skb); 292 dev_kfree_skb_any(skb);
259 priv->tx_skb = NULL; 293 priv->tx_skb = NULL;
294 pr_err("TX error: %d", err);
260 } 295 }
296 lbtf_deb_leave(LBTF_DEB_MACOPS | LBTF_DEB_TX);
261} 297}
262 298
263static int lbtf_op_start(struct ieee80211_hw *hw) 299static int lbtf_op_start(struct ieee80211_hw *hw)
@@ -266,6 +302,8 @@ static int lbtf_op_start(struct ieee80211_hw *hw)
266 void *card = priv->card; 302 void *card = priv->card;
267 int ret = -1; 303 int ret = -1;
268 304
305 lbtf_deb_enter(LBTF_DEB_MACOPS);
306
269 if (!priv->fw_ready) 307 if (!priv->fw_ready)
270 /* Upload firmware */ 308 /* Upload firmware */
271 if (priv->hw_prog_firmware(card)) 309 if (priv->hw_prog_firmware(card))
@@ -286,10 +324,12 @@ static int lbtf_op_start(struct ieee80211_hw *hw)
286 } 324 }
287 325
288 printk(KERN_INFO "libertastf: Marvell WLAN 802.11 thinfirm adapter\n"); 326 printk(KERN_INFO "libertastf: Marvell WLAN 802.11 thinfirm adapter\n");
327 lbtf_deb_leave(LBTF_DEB_MACOPS);
289 return 0; 328 return 0;
290 329
291err_prog_firmware: 330err_prog_firmware:
292 priv->hw_reset_device(card); 331 priv->hw_reset_device(card);
332 lbtf_deb_leave_args(LBTF_DEB_MACOPS, "error programing fw; ret=%d", ret);
293 return ret; 333 return ret;
294} 334}
295 335
@@ -300,6 +340,9 @@ static void lbtf_op_stop(struct ieee80211_hw *hw)
300 struct sk_buff *skb; 340 struct sk_buff *skb;
301 341
302 struct cmd_ctrl_node *cmdnode; 342 struct cmd_ctrl_node *cmdnode;
343
344 lbtf_deb_enter(LBTF_DEB_MACOPS);
345
303 /* Flush pending command nodes */ 346 /* Flush pending command nodes */
304 spin_lock_irqsave(&priv->driver_lock, flags); 347 spin_lock_irqsave(&priv->driver_lock, flags);
305 list_for_each_entry(cmdnode, &priv->cmdpendingq, list) { 348 list_for_each_entry(cmdnode, &priv->cmdpendingq, list) {
@@ -316,6 +359,7 @@ static void lbtf_op_stop(struct ieee80211_hw *hw)
316 priv->radioon = RADIO_OFF; 359 priv->radioon = RADIO_OFF;
317 lbtf_set_radio_control(priv); 360 lbtf_set_radio_control(priv);
318 361
362 lbtf_deb_leave(LBTF_DEB_MACOPS);
319 return; 363 return;
320} 364}
321 365
@@ -323,6 +367,7 @@ static int lbtf_op_add_interface(struct ieee80211_hw *hw,
323 struct ieee80211_vif *vif) 367 struct ieee80211_vif *vif)
324{ 368{
325 struct lbtf_private *priv = hw->priv; 369 struct lbtf_private *priv = hw->priv;
370 lbtf_deb_enter(LBTF_DEB_MACOPS);
326 if (priv->vif != NULL) 371 if (priv->vif != NULL)
327 return -EOPNOTSUPP; 372 return -EOPNOTSUPP;
328 373
@@ -340,6 +385,7 @@ static int lbtf_op_add_interface(struct ieee80211_hw *hw,
340 return -EOPNOTSUPP; 385 return -EOPNOTSUPP;
341 } 386 }
342 lbtf_set_mac_address(priv, (u8 *) vif->addr); 387 lbtf_set_mac_address(priv, (u8 *) vif->addr);
388 lbtf_deb_leave(LBTF_DEB_MACOPS);
343 return 0; 389 return 0;
344} 390}
345 391
@@ -347,6 +393,7 @@ static void lbtf_op_remove_interface(struct ieee80211_hw *hw,
347 struct ieee80211_vif *vif) 393 struct ieee80211_vif *vif)
348{ 394{
349 struct lbtf_private *priv = hw->priv; 395 struct lbtf_private *priv = hw->priv;
396 lbtf_deb_enter(LBTF_DEB_MACOPS);
350 397
351 if (priv->vif->type == NL80211_IFTYPE_AP || 398 if (priv->vif->type == NL80211_IFTYPE_AP ||
352 priv->vif->type == NL80211_IFTYPE_MESH_POINT) 399 priv->vif->type == NL80211_IFTYPE_MESH_POINT)
@@ -354,17 +401,20 @@ static void lbtf_op_remove_interface(struct ieee80211_hw *hw,
354 lbtf_set_mode(priv, LBTF_PASSIVE_MODE); 401 lbtf_set_mode(priv, LBTF_PASSIVE_MODE);
355 lbtf_set_bssid(priv, 0, NULL); 402 lbtf_set_bssid(priv, 0, NULL);
356 priv->vif = NULL; 403 priv->vif = NULL;
404 lbtf_deb_leave(LBTF_DEB_MACOPS);
357} 405}
358 406
359static int lbtf_op_config(struct ieee80211_hw *hw, u32 changed) 407static int lbtf_op_config(struct ieee80211_hw *hw, u32 changed)
360{ 408{
361 struct lbtf_private *priv = hw->priv; 409 struct lbtf_private *priv = hw->priv;
362 struct ieee80211_conf *conf = &hw->conf; 410 struct ieee80211_conf *conf = &hw->conf;
411 lbtf_deb_enter(LBTF_DEB_MACOPS);
363 412
364 if (conf->channel->center_freq != priv->cur_freq) { 413 if (conf->channel->center_freq != priv->cur_freq) {
365 priv->cur_freq = conf->channel->center_freq; 414 priv->cur_freq = conf->channel->center_freq;
366 lbtf_set_channel(priv, conf->channel->hw_value); 415 lbtf_set_channel(priv, conf->channel->hw_value);
367 } 416 }
417 lbtf_deb_leave(LBTF_DEB_MACOPS);
368 return 0; 418 return 0;
369} 419}
370 420
@@ -395,11 +445,16 @@ static void lbtf_op_configure_filter(struct ieee80211_hw *hw,
395{ 445{
396 struct lbtf_private *priv = hw->priv; 446 struct lbtf_private *priv = hw->priv;
397 int old_mac_control = priv->mac_control; 447 int old_mac_control = priv->mac_control;
448
449 lbtf_deb_enter(LBTF_DEB_MACOPS);
450
398 changed_flags &= SUPPORTED_FIF_FLAGS; 451 changed_flags &= SUPPORTED_FIF_FLAGS;
399 *new_flags &= SUPPORTED_FIF_FLAGS; 452 *new_flags &= SUPPORTED_FIF_FLAGS;
400 453
401 if (!changed_flags) 454 if (!changed_flags) {
455 lbtf_deb_leave(LBTF_DEB_MACOPS);
402 return; 456 return;
457 }
403 458
404 if (*new_flags & (FIF_PROMISC_IN_BSS)) 459 if (*new_flags & (FIF_PROMISC_IN_BSS))
405 priv->mac_control |= CMD_ACT_MAC_PROMISCUOUS_ENABLE; 460 priv->mac_control |= CMD_ACT_MAC_PROMISCUOUS_ENABLE;
@@ -425,6 +480,8 @@ static void lbtf_op_configure_filter(struct ieee80211_hw *hw,
425 480
426 if (priv->mac_control != old_mac_control) 481 if (priv->mac_control != old_mac_control)
427 lbtf_set_mac_control(priv); 482 lbtf_set_mac_control(priv);
483
484 lbtf_deb_leave(LBTF_DEB_MACOPS);
428} 485}
429 486
430static void lbtf_op_bss_info_changed(struct ieee80211_hw *hw, 487static void lbtf_op_bss_info_changed(struct ieee80211_hw *hw,
@@ -434,6 +491,7 @@ static void lbtf_op_bss_info_changed(struct ieee80211_hw *hw,
434{ 491{
435 struct lbtf_private *priv = hw->priv; 492 struct lbtf_private *priv = hw->priv;
436 struct sk_buff *beacon; 493 struct sk_buff *beacon;
494 lbtf_deb_enter(LBTF_DEB_MACOPS);
437 495
438 if (changes & (BSS_CHANGED_BEACON | BSS_CHANGED_BEACON_INT)) { 496 if (changes & (BSS_CHANGED_BEACON | BSS_CHANGED_BEACON_INT)) {
439 switch (priv->vif->type) { 497 switch (priv->vif->type) {
@@ -464,6 +522,8 @@ static void lbtf_op_bss_info_changed(struct ieee80211_hw *hw,
464 priv->preamble = CMD_TYPE_LONG_PREAMBLE; 522 priv->preamble = CMD_TYPE_LONG_PREAMBLE;
465 lbtf_set_radio_control(priv); 523 lbtf_set_radio_control(priv);
466 } 524 }
525
526 lbtf_deb_leave(LBTF_DEB_MACOPS);
467} 527}
468 528
469static const struct ieee80211_ops lbtf_ops = { 529static const struct ieee80211_ops lbtf_ops = {
@@ -486,6 +546,8 @@ int lbtf_rx(struct lbtf_private *priv, struct sk_buff *skb)
486 unsigned int flags; 546 unsigned int flags;
487 struct ieee80211_hdr *hdr; 547 struct ieee80211_hdr *hdr;
488 548
549 lbtf_deb_enter(LBTF_DEB_RX);
550
489 prxpd = (struct rxpd *) skb->data; 551 prxpd = (struct rxpd *) skb->data;
490 552
491 stats.flag = 0; 553 stats.flag = 0;
@@ -494,7 +556,6 @@ int lbtf_rx(struct lbtf_private *priv, struct sk_buff *skb)
494 stats.freq = priv->cur_freq; 556 stats.freq = priv->cur_freq;
495 stats.band = IEEE80211_BAND_2GHZ; 557 stats.band = IEEE80211_BAND_2GHZ;
496 stats.signal = prxpd->snr; 558 stats.signal = prxpd->snr;
497 stats.noise = prxpd->nf;
498 /* Marvell rate index has a hole at value 4 */ 559 /* Marvell rate index has a hole at value 4 */
499 if (prxpd->rx_rate > 4) 560 if (prxpd->rx_rate > 4)
500 --prxpd->rx_rate; 561 --prxpd->rx_rate;
@@ -516,7 +577,15 @@ int lbtf_rx(struct lbtf_private *priv, struct sk_buff *skb)
516 } 577 }
517 578
518 memcpy(IEEE80211_SKB_RXCB(skb), &stats, sizeof(stats)); 579 memcpy(IEEE80211_SKB_RXCB(skb), &stats, sizeof(stats));
580
581 lbtf_deb_rx("rx data: skb->len-sizeof(RxPd) = %d-%zd = %zd\n",
582 skb->len, sizeof(struct rxpd), skb->len - sizeof(struct rxpd));
583 lbtf_deb_hex(LBTF_DEB_RX, "RX Data", skb->data,
584 min_t(unsigned int, skb->len, 100));
585
519 ieee80211_rx_irqsafe(priv->hw, skb); 586 ieee80211_rx_irqsafe(priv->hw, skb);
587
588 lbtf_deb_leave(LBTF_DEB_RX);
520 return 0; 589 return 0;
521} 590}
522EXPORT_SYMBOL_GPL(lbtf_rx); 591EXPORT_SYMBOL_GPL(lbtf_rx);
@@ -533,6 +602,8 @@ struct lbtf_private *lbtf_add_card(void *card, struct device *dmdev)
533 struct ieee80211_hw *hw; 602 struct ieee80211_hw *hw;
534 struct lbtf_private *priv = NULL; 603 struct lbtf_private *priv = NULL;
535 604
605 lbtf_deb_enter(LBTF_DEB_MAIN);
606
536 hw = ieee80211_alloc_hw(sizeof(struct lbtf_private), &lbtf_ops); 607 hw = ieee80211_alloc_hw(sizeof(struct lbtf_private), &lbtf_ops);
537 if (!hw) 608 if (!hw)
538 goto done; 609 goto done;
@@ -575,6 +646,7 @@ err_init_adapter:
575 priv = NULL; 646 priv = NULL;
576 647
577done: 648done:
649 lbtf_deb_leave_args(LBTF_DEB_MAIN, "priv %p", priv);
578 return priv; 650 return priv;
579} 651}
580EXPORT_SYMBOL_GPL(lbtf_add_card); 652EXPORT_SYMBOL_GPL(lbtf_add_card);
@@ -584,6 +656,8 @@ int lbtf_remove_card(struct lbtf_private *priv)
584{ 656{
585 struct ieee80211_hw *hw = priv->hw; 657 struct ieee80211_hw *hw = priv->hw;
586 658
659 lbtf_deb_enter(LBTF_DEB_MAIN);
660
587 priv->surpriseremoved = 1; 661 priv->surpriseremoved = 1;
588 del_timer(&priv->command_timer); 662 del_timer(&priv->command_timer);
589 lbtf_free_adapter(priv); 663 lbtf_free_adapter(priv);
@@ -591,6 +665,7 @@ int lbtf_remove_card(struct lbtf_private *priv)
591 ieee80211_unregister_hw(hw); 665 ieee80211_unregister_hw(hw);
592 ieee80211_free_hw(hw); 666 ieee80211_free_hw(hw);
593 667
668 lbtf_deb_leave(LBTF_DEB_MAIN);
594 return 0; 669 return 0;
595} 670}
596EXPORT_SYMBOL_GPL(lbtf_remove_card); 671EXPORT_SYMBOL_GPL(lbtf_remove_card);
@@ -649,17 +724,21 @@ EXPORT_SYMBOL_GPL(lbtf_bcn_sent);
649 724
650static int __init lbtf_init_module(void) 725static int __init lbtf_init_module(void)
651{ 726{
727 lbtf_deb_enter(LBTF_DEB_MAIN);
652 lbtf_wq = create_workqueue("libertastf"); 728 lbtf_wq = create_workqueue("libertastf");
653 if (lbtf_wq == NULL) { 729 if (lbtf_wq == NULL) {
654 printk(KERN_ERR "libertastf: couldn't create workqueue\n"); 730 printk(KERN_ERR "libertastf: couldn't create workqueue\n");
655 return -ENOMEM; 731 return -ENOMEM;
656 } 732 }
733 lbtf_deb_leave(LBTF_DEB_MAIN);
657 return 0; 734 return 0;
658} 735}
659 736
660static void __exit lbtf_exit_module(void) 737static void __exit lbtf_exit_module(void)
661{ 738{
739 lbtf_deb_enter(LBTF_DEB_MAIN);
662 destroy_workqueue(lbtf_wq); 740 destroy_workqueue(lbtf_wq);
741 lbtf_deb_leave(LBTF_DEB_MAIN);
663} 742}
664 743
665module_init(lbtf_init_module); 744module_init(lbtf_init_module);