aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/libertas_tf/main.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/wireless/libertas_tf/main.c')
-rw-r--r--drivers/net/wireless/libertas_tf/main.c106
1 files changed, 91 insertions, 15 deletions
diff --git a/drivers/net/wireless/libertas_tf/main.c b/drivers/net/wireless/libertas_tf/main.c
index 7945ff5aa33..6a04c2157f7 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,13 +359,14 @@ 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
319 return; 362 lbtf_deb_leave(LBTF_DEB_MACOPS);
320} 363}
321 364
322static int lbtf_op_add_interface(struct ieee80211_hw *hw, 365static int lbtf_op_add_interface(struct ieee80211_hw *hw,
323 struct ieee80211_vif *vif) 366 struct ieee80211_vif *vif)
324{ 367{
325 struct lbtf_private *priv = hw->priv; 368 struct lbtf_private *priv = hw->priv;
369 lbtf_deb_enter(LBTF_DEB_MACOPS);
326 if (priv->vif != NULL) 370 if (priv->vif != NULL)
327 return -EOPNOTSUPP; 371 return -EOPNOTSUPP;
328 372
@@ -340,6 +384,7 @@ static int lbtf_op_add_interface(struct ieee80211_hw *hw,
340 return -EOPNOTSUPP; 384 return -EOPNOTSUPP;
341 } 385 }
342 lbtf_set_mac_address(priv, (u8 *) vif->addr); 386 lbtf_set_mac_address(priv, (u8 *) vif->addr);
387 lbtf_deb_leave(LBTF_DEB_MACOPS);
343 return 0; 388 return 0;
344} 389}
345 390
@@ -347,6 +392,7 @@ static void lbtf_op_remove_interface(struct ieee80211_hw *hw,
347 struct ieee80211_vif *vif) 392 struct ieee80211_vif *vif)
348{ 393{
349 struct lbtf_private *priv = hw->priv; 394 struct lbtf_private *priv = hw->priv;
395 lbtf_deb_enter(LBTF_DEB_MACOPS);
350 396
351 if (priv->vif->type == NL80211_IFTYPE_AP || 397 if (priv->vif->type == NL80211_IFTYPE_AP ||
352 priv->vif->type == NL80211_IFTYPE_MESH_POINT) 398 priv->vif->type == NL80211_IFTYPE_MESH_POINT)
@@ -354,37 +400,38 @@ static void lbtf_op_remove_interface(struct ieee80211_hw *hw,
354 lbtf_set_mode(priv, LBTF_PASSIVE_MODE); 400 lbtf_set_mode(priv, LBTF_PASSIVE_MODE);
355 lbtf_set_bssid(priv, 0, NULL); 401 lbtf_set_bssid(priv, 0, NULL);
356 priv->vif = NULL; 402 priv->vif = NULL;
403 lbtf_deb_leave(LBTF_DEB_MACOPS);
357} 404}
358 405
359static int lbtf_op_config(struct ieee80211_hw *hw, u32 changed) 406static int lbtf_op_config(struct ieee80211_hw *hw, u32 changed)
360{ 407{
361 struct lbtf_private *priv = hw->priv; 408 struct lbtf_private *priv = hw->priv;
362 struct ieee80211_conf *conf = &hw->conf; 409 struct ieee80211_conf *conf = &hw->conf;
410 lbtf_deb_enter(LBTF_DEB_MACOPS);
363 411
364 if (conf->channel->center_freq != priv->cur_freq) { 412 if (conf->channel->center_freq != priv->cur_freq) {
365 priv->cur_freq = conf->channel->center_freq; 413 priv->cur_freq = conf->channel->center_freq;
366 lbtf_set_channel(priv, conf->channel->hw_value); 414 lbtf_set_channel(priv, conf->channel->hw_value);
367 } 415 }
416 lbtf_deb_leave(LBTF_DEB_MACOPS);
368 return 0; 417 return 0;
369} 418}
370 419
371static u64 lbtf_op_prepare_multicast(struct ieee80211_hw *hw, 420static u64 lbtf_op_prepare_multicast(struct ieee80211_hw *hw,
372 int mc_count, struct dev_addr_list *mclist) 421 struct netdev_hw_addr_list *mc_list)
373{ 422{
374 struct lbtf_private *priv = hw->priv; 423 struct lbtf_private *priv = hw->priv;
375 int i; 424 int i;
425 struct netdev_hw_addr *ha;
426 int mc_count = netdev_hw_addr_list_count(mc_list);
376 427
377 if (!mc_count || mc_count > MRVDRV_MAX_MULTICAST_LIST_SIZE) 428 if (!mc_count || mc_count > MRVDRV_MAX_MULTICAST_LIST_SIZE)
378 return mc_count; 429 return mc_count;
379 430
380 priv->nr_of_multicastmacaddr = mc_count; 431 priv->nr_of_multicastmacaddr = mc_count;
381 for (i = 0; i < mc_count; i++) { 432 i = 0;
382 if (!mclist) 433 netdev_hw_addr_list_for_each(ha, mc_list)
383 break; 434 memcpy(&priv->multicastlist[i++], ha->addr, ETH_ALEN);
384 memcpy(&priv->multicastlist[i], mclist->da_addr,
385 ETH_ALEN);
386 mclist = mclist->next;
387 }
388 435
389 return mc_count; 436 return mc_count;
390} 437}
@@ -397,11 +444,16 @@ static void lbtf_op_configure_filter(struct ieee80211_hw *hw,
397{ 444{
398 struct lbtf_private *priv = hw->priv; 445 struct lbtf_private *priv = hw->priv;
399 int old_mac_control = priv->mac_control; 446 int old_mac_control = priv->mac_control;
447
448 lbtf_deb_enter(LBTF_DEB_MACOPS);
449
400 changed_flags &= SUPPORTED_FIF_FLAGS; 450 changed_flags &= SUPPORTED_FIF_FLAGS;
401 *new_flags &= SUPPORTED_FIF_FLAGS; 451 *new_flags &= SUPPORTED_FIF_FLAGS;
402 452
403 if (!changed_flags) 453 if (!changed_flags) {
454 lbtf_deb_leave(LBTF_DEB_MACOPS);
404 return; 455 return;
456 }
405 457
406 if (*new_flags & (FIF_PROMISC_IN_BSS)) 458 if (*new_flags & (FIF_PROMISC_IN_BSS))
407 priv->mac_control |= CMD_ACT_MAC_PROMISCUOUS_ENABLE; 459 priv->mac_control |= CMD_ACT_MAC_PROMISCUOUS_ENABLE;
@@ -427,6 +479,8 @@ static void lbtf_op_configure_filter(struct ieee80211_hw *hw,
427 479
428 if (priv->mac_control != old_mac_control) 480 if (priv->mac_control != old_mac_control)
429 lbtf_set_mac_control(priv); 481 lbtf_set_mac_control(priv);
482
483 lbtf_deb_leave(LBTF_DEB_MACOPS);
430} 484}
431 485
432static void lbtf_op_bss_info_changed(struct ieee80211_hw *hw, 486static void lbtf_op_bss_info_changed(struct ieee80211_hw *hw,
@@ -436,6 +490,7 @@ static void lbtf_op_bss_info_changed(struct ieee80211_hw *hw,
436{ 490{
437 struct lbtf_private *priv = hw->priv; 491 struct lbtf_private *priv = hw->priv;
438 struct sk_buff *beacon; 492 struct sk_buff *beacon;
493 lbtf_deb_enter(LBTF_DEB_MACOPS);
439 494
440 if (changes & (BSS_CHANGED_BEACON | BSS_CHANGED_BEACON_INT)) { 495 if (changes & (BSS_CHANGED_BEACON | BSS_CHANGED_BEACON_INT)) {
441 switch (priv->vif->type) { 496 switch (priv->vif->type) {
@@ -466,6 +521,8 @@ static void lbtf_op_bss_info_changed(struct ieee80211_hw *hw,
466 priv->preamble = CMD_TYPE_LONG_PREAMBLE; 521 priv->preamble = CMD_TYPE_LONG_PREAMBLE;
467 lbtf_set_radio_control(priv); 522 lbtf_set_radio_control(priv);
468 } 523 }
524
525 lbtf_deb_leave(LBTF_DEB_MACOPS);
469} 526}
470 527
471static const struct ieee80211_ops lbtf_ops = { 528static const struct ieee80211_ops lbtf_ops = {
@@ -488,6 +545,8 @@ int lbtf_rx(struct lbtf_private *priv, struct sk_buff *skb)
488 unsigned int flags; 545 unsigned int flags;
489 struct ieee80211_hdr *hdr; 546 struct ieee80211_hdr *hdr;
490 547
548 lbtf_deb_enter(LBTF_DEB_RX);
549
491 prxpd = (struct rxpd *) skb->data; 550 prxpd = (struct rxpd *) skb->data;
492 551
493 stats.flag = 0; 552 stats.flag = 0;
@@ -496,7 +555,6 @@ int lbtf_rx(struct lbtf_private *priv, struct sk_buff *skb)
496 stats.freq = priv->cur_freq; 555 stats.freq = priv->cur_freq;
497 stats.band = IEEE80211_BAND_2GHZ; 556 stats.band = IEEE80211_BAND_2GHZ;
498 stats.signal = prxpd->snr; 557 stats.signal = prxpd->snr;
499 stats.noise = prxpd->nf;
500 /* Marvell rate index has a hole at value 4 */ 558 /* Marvell rate index has a hole at value 4 */
501 if (prxpd->rx_rate > 4) 559 if (prxpd->rx_rate > 4)
502 --prxpd->rx_rate; 560 --prxpd->rx_rate;
@@ -518,7 +576,15 @@ int lbtf_rx(struct lbtf_private *priv, struct sk_buff *skb)
518 } 576 }
519 577
520 memcpy(IEEE80211_SKB_RXCB(skb), &stats, sizeof(stats)); 578 memcpy(IEEE80211_SKB_RXCB(skb), &stats, sizeof(stats));
579
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));
584
521 ieee80211_rx_irqsafe(priv->hw, skb); 585 ieee80211_rx_irqsafe(priv->hw, skb);
586
587 lbtf_deb_leave(LBTF_DEB_RX);
522 return 0; 588 return 0;
523} 589}
524EXPORT_SYMBOL_GPL(lbtf_rx); 590EXPORT_SYMBOL_GPL(lbtf_rx);
@@ -535,6 +601,8 @@ struct lbtf_private *lbtf_add_card(void *card, struct device *dmdev)
535 struct ieee80211_hw *hw; 601 struct ieee80211_hw *hw;
536 struct lbtf_private *priv = NULL; 602 struct lbtf_private *priv = NULL;
537 603
604 lbtf_deb_enter(LBTF_DEB_MAIN);
605
538 hw = ieee80211_alloc_hw(sizeof(struct lbtf_private), &lbtf_ops); 606 hw = ieee80211_alloc_hw(sizeof(struct lbtf_private), &lbtf_ops);
539 if (!hw) 607 if (!hw)
540 goto done; 608 goto done;
@@ -577,6 +645,7 @@ err_init_adapter:
577 priv = NULL; 645 priv = NULL;
578 646
579done: 647done:
648 lbtf_deb_leave_args(LBTF_DEB_MAIN, "priv %p", priv);
580 return priv; 649 return priv;
581} 650}
582EXPORT_SYMBOL_GPL(lbtf_add_card); 651EXPORT_SYMBOL_GPL(lbtf_add_card);
@@ -586,6 +655,8 @@ int lbtf_remove_card(struct lbtf_private *priv)
586{ 655{
587 struct ieee80211_hw *hw = priv->hw; 656 struct ieee80211_hw *hw = priv->hw;
588 657
658 lbtf_deb_enter(LBTF_DEB_MAIN);
659
589 priv->surpriseremoved = 1; 660 priv->surpriseremoved = 1;
590 del_timer(&priv->command_timer); 661 del_timer(&priv->command_timer);
591 lbtf_free_adapter(priv); 662 lbtf_free_adapter(priv);
@@ -593,6 +664,7 @@ int lbtf_remove_card(struct lbtf_private *priv)
593 ieee80211_unregister_hw(hw); 664 ieee80211_unregister_hw(hw);
594 ieee80211_free_hw(hw); 665 ieee80211_free_hw(hw);
595 666
667 lbtf_deb_leave(LBTF_DEB_MAIN);
596 return 0; 668 return 0;
597} 669}
598EXPORT_SYMBOL_GPL(lbtf_remove_card); 670EXPORT_SYMBOL_GPL(lbtf_remove_card);
@@ -651,17 +723,21 @@ EXPORT_SYMBOL_GPL(lbtf_bcn_sent);
651 723
652static int __init lbtf_init_module(void) 724static int __init lbtf_init_module(void)
653{ 725{
726 lbtf_deb_enter(LBTF_DEB_MAIN);
654 lbtf_wq = create_workqueue("libertastf"); 727 lbtf_wq = create_workqueue("libertastf");
655 if (lbtf_wq == NULL) { 728 if (lbtf_wq == NULL) {
656 printk(KERN_ERR "libertastf: couldn't create workqueue\n"); 729 printk(KERN_ERR "libertastf: couldn't create workqueue\n");
657 return -ENOMEM; 730 return -ENOMEM;
658 } 731 }
732 lbtf_deb_leave(LBTF_DEB_MAIN);
659 return 0; 733 return 0;
660} 734}
661 735
662static void __exit lbtf_exit_module(void) 736static void __exit lbtf_exit_module(void)
663{ 737{
738 lbtf_deb_enter(LBTF_DEB_MAIN);
664 destroy_workqueue(lbtf_wq); 739 destroy_workqueue(lbtf_wq);
740 lbtf_deb_leave(LBTF_DEB_MAIN);
665} 741}
666 742
667module_init(lbtf_init_module); 743module_init(lbtf_init_module);