Lines Matching +full:event +full:- +full:deep

1 // SPDX-License-Identifier: GPL-2.0-only
30 const char lbs_driver_version[] = "COMM-USB8388-" DRIVER_RELEASE_VERSION
32 "-dbg"
71 * lbs_fw_index_to_data_rate - use index to get the data rate
84 * lbs_data_rate_to_fw_index - use rate to get the index
112 if (priv->wdev->iftype == NL80211_IFTYPE_MONITOR) in lbs_set_iface_type()
118 if (priv->wdev->iftype == NL80211_IFTYPE_MONITOR) in lbs_set_iface_type()
124 ret = -ENOTSUPP; in lbs_set_iface_type()
134 if (priv->power_restore) { in lbs_start_iface()
135 ret = priv->power_restore(priv); in lbs_start_iface()
142 memcpy(cmd.macadd, priv->current_addr, ETH_ALEN); in lbs_start_iface()
150 ret = lbs_set_iface_type(priv, priv->wdev->iftype); in lbs_start_iface()
164 priv->iface_running = true; in lbs_start_iface()
168 if (priv->power_save) in lbs_start_iface()
169 priv->power_save(priv); in lbs_start_iface()
174 * lbs_dev_open - open the ethX interface
177 * returns: 0 or -EBUSY if monitor mode active
181 struct lbs_private *priv = dev->ml_priv; in lbs_dev_open()
184 if (!priv->iface_running) { in lbs_dev_open()
190 spin_lock_irq(&priv->driver_lock); in lbs_dev_open()
194 if (!priv->tx_pending_len) in lbs_dev_open()
197 spin_unlock_irq(&priv->driver_lock); in lbs_dev_open()
207 spin_lock_irqsave(&priv->driver_lock, flags); in lbs_command_queue_empty()
208 ret = priv->cur_cmd == NULL && list_empty(&priv->cmdpendingq); in lbs_command_queue_empty()
209 spin_unlock_irqrestore(&priv->driver_lock, flags); in lbs_command_queue_empty()
218 spin_lock_irqsave(&priv->driver_lock, flags); in lbs_stop_iface()
219 priv->iface_running = false; in lbs_stop_iface()
220 kfree_skb(priv->currenttxskb); in lbs_stop_iface()
221 priv->currenttxskb = NULL; in lbs_stop_iface()
222 priv->tx_pending_len = 0; in lbs_stop_iface()
223 spin_unlock_irqrestore(&priv->driver_lock, flags); in lbs_stop_iface()
225 cancel_work_sync(&priv->mcast_work); in lbs_stop_iface()
226 del_timer_sync(&priv->tx_lockup_timer); in lbs_stop_iface()
230 wait_event(priv->waitq, lbs_command_queue_empty(priv)); in lbs_stop_iface()
233 if (priv->power_save) in lbs_stop_iface()
234 ret = priv->power_save(priv); in lbs_stop_iface()
240 * lbs_eth_stop - close the ethX interface
247 struct lbs_private *priv = dev->ml_priv; in lbs_eth_stop()
249 if (priv->connect_status == LBS_CONNECTED) in lbs_eth_stop()
252 spin_lock_irq(&priv->driver_lock); in lbs_eth_stop()
254 spin_unlock_irq(&priv->driver_lock); in lbs_eth_stop()
257 cancel_delayed_work_sync(&priv->scan_work); in lbs_eth_stop()
258 if (priv->scan_req) in lbs_eth_stop()
261 netif_carrier_off(priv->dev); in lbs_eth_stop()
273 spin_lock_irqsave(&priv->driver_lock, flags); in lbs_host_to_card_done()
274 del_timer(&priv->tx_lockup_timer); in lbs_host_to_card_done()
276 priv->dnld_sent = DNLD_RES_RECEIVED; in lbs_host_to_card_done()
279 if (!priv->cur_cmd || priv->tx_pending_len > 0) { in lbs_host_to_card_done()
280 if (!priv->wakeup_dev_required) in lbs_host_to_card_done()
281 wake_up(&priv->waitq); in lbs_host_to_card_done()
284 spin_unlock_irqrestore(&priv->driver_lock, flags); in lbs_host_to_card_done()
291 struct lbs_private *priv = dev->ml_priv; in lbs_set_mac_address()
299 return -EBUSY; in lbs_set_mac_address()
302 dev = priv->dev; in lbs_set_mac_address()
304 memcpy(priv->current_addr, phwaddr->sa_data, ETH_ALEN); in lbs_set_mac_address()
305 memcpy(dev->dev_addr, phwaddr->sa_data, ETH_ALEN); in lbs_set_mac_address()
306 if (priv->mesh_dev) in lbs_set_mac_address()
307 memcpy(priv->mesh_dev->dev_addr, phwaddr->sa_data, ETH_ALEN); in lbs_set_mac_address()
320 list_len--; in mac_in_list()
333 if ((dev->flags & (IFF_UP|IFF_MULTICAST)) != (IFF_UP|IFF_MULTICAST)) in lbs_add_mcast_addrs()
339 if (mac_in_list(cmd->maclist, nr_addrs, ha->addr)) { in lbs_add_mcast_addrs()
340 lbs_deb_net("mcast address %s:%pM skipped\n", dev->name, in lbs_add_mcast_addrs()
341 ha->addr); in lbs_add_mcast_addrs()
342 cnt--; in lbs_add_mcast_addrs()
348 memcpy(&cmd->maclist[6*i], ha->addr, ETH_ALEN); in lbs_add_mcast_addrs()
349 lbs_deb_net("mcast address %s:%pM added to filter\n", dev->name, in lbs_add_mcast_addrs()
350 ha->addr); in lbs_add_mcast_addrs()
352 cnt--; in lbs_add_mcast_addrs()
356 return -EOVERFLOW; in lbs_add_mcast_addrs()
366 int old_mac_control = priv->mac_control; in lbs_update_mcast()
368 if (netif_running(priv->dev)) in lbs_update_mcast()
369 dev_flags |= priv->dev->flags; in lbs_update_mcast()
370 if (priv->mesh_dev && netif_running(priv->mesh_dev)) in lbs_update_mcast()
371 dev_flags |= priv->mesh_dev->flags; in lbs_update_mcast()
374 priv->mac_control |= CMD_ACT_MAC_PROMISCUOUS_ENABLE; in lbs_update_mcast()
375 priv->mac_control &= ~(CMD_ACT_MAC_ALL_MULTICAST_ENABLE | in lbs_update_mcast()
380 priv->mac_control |= CMD_ACT_MAC_ALL_MULTICAST_ENABLE; in lbs_update_mcast()
381 priv->mac_control &= ~(CMD_ACT_MAC_PROMISCUOUS_ENABLE | in lbs_update_mcast()
386 /* Once for priv->dev, again for priv->mesh_dev if it exists */ in lbs_update_mcast()
387 nr_addrs = lbs_add_mcast_addrs(&mcast_cmd, priv->dev, 0); in lbs_update_mcast()
388 if (nr_addrs >= 0 && priv->mesh_dev) in lbs_update_mcast()
389 nr_addrs = lbs_add_mcast_addrs(&mcast_cmd, priv->mesh_dev, nr_addrs); in lbs_update_mcast()
403 priv->mac_control |= CMD_ACT_MAC_MULTICAST_ENABLE; in lbs_update_mcast()
405 priv->mac_control &= ~CMD_ACT_MAC_MULTICAST_ENABLE; in lbs_update_mcast()
407 priv->mac_control &= ~(CMD_ACT_MAC_PROMISCUOUS_ENABLE | in lbs_update_mcast()
410 if (priv->mac_control != old_mac_control) in lbs_update_mcast()
422 struct lbs_private *priv = dev->ml_priv; in lbs_set_multicast_list()
424 schedule_work(&priv->mcast_work); in lbs_set_multicast_list()
428 * lbs_thread - handles the major jobs in the LBS driver.
438 struct lbs_private *priv = dev->ml_priv; in lbs_thread()
448 priv->currenttxskb, priv->dnld_sent); in lbs_thread()
450 add_wait_queue(&priv->waitq, &wait); in lbs_thread()
452 spin_lock_irq(&priv->driver_lock); in lbs_thread()
456 else if (priv->surpriseremoved) in lbs_thread()
458 else if (priv->psstate == PS_STATE_SLEEP) in lbs_thread()
460 else if (priv->cmd_timed_out) in lbs_thread()
462 else if (!priv->fw_ready) in lbs_thread()
464 else if (priv->dnld_sent) in lbs_thread()
466 else if (priv->tx_pending_len > 0) in lbs_thread()
468 else if (priv->resp_len[priv->resp_idx]) in lbs_thread()
470 else if (priv->cur_cmd) in lbs_thread()
472 else if (!list_empty(&priv->cmdpendingq) && in lbs_thread()
473 !(priv->wakeup_dev_required)) in lbs_thread()
475 else if (kfifo_len(&priv->event_fifo)) in lbs_thread()
476 shouldsleep = 0; /* We have an event to process */ in lbs_thread()
483 priv->connect_status, in lbs_thread()
484 priv->psmode, priv->psstate); in lbs_thread()
485 spin_unlock_irq(&priv->driver_lock); in lbs_thread()
488 spin_unlock_irq(&priv->driver_lock); in lbs_thread()
491 priv->currenttxskb, priv->dnld_sent); in lbs_thread()
494 remove_wait_queue(&priv->waitq, &wait); in lbs_thread()
497 priv->currenttxskb, priv->dnld_sent); in lbs_thread()
504 if (priv->surpriseremoved) { in lbs_thread()
510 priv->currenttxskb, priv->dnld_sent); in lbs_thread()
513 spin_lock_irq(&priv->driver_lock); in lbs_thread()
514 resp_idx = priv->resp_idx; in lbs_thread()
515 if (priv->resp_len[resp_idx]) { in lbs_thread()
516 spin_unlock_irq(&priv->driver_lock); in lbs_thread()
518 priv->resp_buf[resp_idx], in lbs_thread()
519 priv->resp_len[resp_idx]); in lbs_thread()
520 spin_lock_irq(&priv->driver_lock); in lbs_thread()
521 priv->resp_len[resp_idx] = 0; in lbs_thread()
523 spin_unlock_irq(&priv->driver_lock); in lbs_thread()
526 spin_lock_irq(&priv->driver_lock); in lbs_thread()
527 while (kfifo_len(&priv->event_fifo)) { in lbs_thread()
528 u32 event; in lbs_thread() local
530 if (kfifo_out(&priv->event_fifo, in lbs_thread()
531 (unsigned char *) &event, sizeof(event)) != in lbs_thread()
532 sizeof(event)) in lbs_thread()
534 spin_unlock_irq(&priv->driver_lock); in lbs_thread()
535 lbs_process_event(priv, event); in lbs_thread()
536 spin_lock_irq(&priv->driver_lock); in lbs_thread()
538 spin_unlock_irq(&priv->driver_lock); in lbs_thread()
540 if (priv->wakeup_dev_required) { in lbs_thread()
543 if (priv->exit_deep_sleep(priv)) in lbs_thread()
549 if (priv->cmd_timed_out && priv->cur_cmd) { in lbs_thread()
550 struct cmd_ctrl_node *cmdnode = priv->cur_cmd; in lbs_thread()
553 le16_to_cpu(cmdnode->cmdbuf->command)); in lbs_thread()
554 lbs_complete_command(priv, cmdnode, -ETIMEDOUT); in lbs_thread()
558 if (!dev->dismantle && priv->reset_card) in lbs_thread()
559 priv->reset_card(priv); in lbs_thread()
561 priv->cmd_timed_out = 0; in lbs_thread()
563 if (!priv->fw_ready) in lbs_thread()
567 if (priv->psstate == PS_STATE_PRE_SLEEP && in lbs_thread()
568 !priv->dnld_sent && !priv->cur_cmd) { in lbs_thread()
569 if (priv->connect_status == LBS_CONNECTED) { in lbs_thread()
570 lbs_deb_thread("pre-sleep, currenttxskb %p, " in lbs_thread()
572 priv->currenttxskb, priv->dnld_sent, in lbs_thread()
573 priv->cur_cmd); in lbs_thread()
578 * deauth/linkloss event immediately in lbs_thread()
582 priv->psstate = PS_STATE_AWAKE; in lbs_thread()
584 "ignore PS_SleepConfirm in non-connected state\n"); in lbs_thread()
589 * event above in lbs_thread()
591 if ((priv->psstate == PS_STATE_SLEEP) || in lbs_thread()
592 (priv->psstate == PS_STATE_PRE_SLEEP)) in lbs_thread()
595 if (priv->is_deep_sleep) in lbs_thread()
599 if (!priv->dnld_sent && !priv->cur_cmd) in lbs_thread()
602 spin_lock_irq(&priv->driver_lock); in lbs_thread()
603 if (!priv->dnld_sent && priv->tx_pending_len > 0) { in lbs_thread()
604 int ret = priv->hw_host_to_card(priv, MVMS_DAT, in lbs_thread()
605 priv->tx_pending_buf, in lbs_thread()
606 priv->tx_pending_len); in lbs_thread()
609 priv->dnld_sent = DNLD_RES_RECEIVED; in lbs_thread()
611 mod_timer(&priv->tx_lockup_timer, in lbs_thread()
614 priv->tx_pending_len = 0; in lbs_thread()
615 if (!priv->currenttxskb) { in lbs_thread()
618 if (priv->connect_status == LBS_CONNECTED) in lbs_thread()
619 netif_wake_queue(priv->dev); in lbs_thread()
620 if (priv->mesh_dev && in lbs_thread()
621 netif_running(priv->mesh_dev)) in lbs_thread()
622 netif_wake_queue(priv->mesh_dev); in lbs_thread()
625 spin_unlock_irq(&priv->driver_lock); in lbs_thread()
628 del_timer(&priv->command_timer); in lbs_thread()
629 del_timer(&priv->tx_lockup_timer); in lbs_thread()
630 del_timer(&priv->auto_deepsleep_timer); in lbs_thread()
636 * lbs_setup_firmware - gets the HW spec from the firmware and sets
640 * returns: 0 or -1
644 int ret = -1; in lbs_setup_firmware()
648 eth_broadcast_addr(priv->current_addr); in lbs_setup_firmware()
656 priv->txpower_cur = curlevel; in lbs_setup_firmware()
657 priv->txpower_min = minlevel; in lbs_setup_firmware()
658 priv->txpower_max = maxlevel; in lbs_setup_firmware()
675 if (priv->is_deep_sleep) { in lbs_suspend()
678 netdev_err(priv->dev, in lbs_suspend()
679 "deep sleep cancellation failed: %d\n", ret); in lbs_suspend()
682 priv->deep_sleep_required = 1; in lbs_suspend()
687 netif_device_detach(priv->dev); in lbs_suspend()
688 if (priv->mesh_dev) in lbs_suspend()
689 netif_device_detach(priv->mesh_dev); in lbs_suspend()
701 netif_device_attach(priv->dev); in lbs_resume()
702 if (priv->mesh_dev) in lbs_resume()
703 netif_device_attach(priv->mesh_dev); in lbs_resume()
705 if (priv->deep_sleep_required) { in lbs_resume()
706 priv->deep_sleep_required = 0; in lbs_resume()
709 netdev_err(priv->dev, in lbs_resume()
710 "deep sleep activation failed: %d\n", ret); in lbs_resume()
713 if (priv->setup_fw_on_resume) in lbs_resume()
721 * lbs_cmd_timeout_handler - handles the timeout of command sending.
722 * It will re-send the same command again.
731 spin_lock_irqsave(&priv->driver_lock, flags); in lbs_cmd_timeout_handler()
733 if (!priv->cur_cmd) in lbs_cmd_timeout_handler()
736 netdev_info(priv->dev, "command 0x%04x timed out\n", in lbs_cmd_timeout_handler()
737 le16_to_cpu(priv->cur_cmd->cmdbuf->command)); in lbs_cmd_timeout_handler()
739 priv->cmd_timed_out = 1; in lbs_cmd_timeout_handler()
745 if (priv->dnld_sent == DNLD_CMD_SENT) in lbs_cmd_timeout_handler()
746 priv->dnld_sent = DNLD_RES_RECEIVED; in lbs_cmd_timeout_handler()
748 wake_up(&priv->waitq); in lbs_cmd_timeout_handler()
750 spin_unlock_irqrestore(&priv->driver_lock, flags); in lbs_cmd_timeout_handler()
754 * lbs_tx_lockup_handler - handles the timeout of the passing of TX frames
756 * waking up after a Wake-on-WLAN-triggered resume.
765 spin_lock_irqsave(&priv->driver_lock, flags); in lbs_tx_lockup_handler()
767 netdev_info(priv->dev, "TX lockup detected\n"); in lbs_tx_lockup_handler()
768 if (priv->reset_card) in lbs_tx_lockup_handler()
769 priv->reset_card(priv); in lbs_tx_lockup_handler()
771 priv->dnld_sent = DNLD_RES_RECEIVED; in lbs_tx_lockup_handler()
772 wake_up_interruptible(&priv->waitq); in lbs_tx_lockup_handler()
774 spin_unlock_irqrestore(&priv->driver_lock, flags); in lbs_tx_lockup_handler()
778 * auto_deepsleep_timer_fn - put the device back to deep sleep mode when
779 * timer expires and no activity (command, event, data etc.) is detected.
787 if (priv->is_activity_detected) { in auto_deepsleep_timer_fn()
788 priv->is_activity_detected = 0; in auto_deepsleep_timer_fn()
790 if (priv->is_auto_deep_sleep_enabled && in auto_deepsleep_timer_fn()
791 (!priv->wakeup_dev_required) && in auto_deepsleep_timer_fn()
792 (priv->connect_status != LBS_CONNECTED)) { in auto_deepsleep_timer_fn()
795 lbs_deb_main("Entering auto deep sleep mode...\n"); in auto_deepsleep_timer_fn()
802 mod_timer(&priv->auto_deepsleep_timer , jiffies + in auto_deepsleep_timer_fn()
803 (priv->auto_deep_sleep_timeout * HZ)/1000); in auto_deepsleep_timer_fn()
808 priv->is_auto_deep_sleep_enabled = 1; in lbs_enter_auto_deep_sleep()
809 if (priv->is_deep_sleep) in lbs_enter_auto_deep_sleep()
810 priv->wakeup_dev_required = 1; in lbs_enter_auto_deep_sleep()
811 mod_timer(&priv->auto_deepsleep_timer , in lbs_enter_auto_deep_sleep()
812 jiffies + (priv->auto_deep_sleep_timeout * HZ)/1000); in lbs_enter_auto_deep_sleep()
819 priv->is_auto_deep_sleep_enabled = 0; in lbs_exit_auto_deep_sleep()
820 priv->auto_deep_sleep_timeout = 0; in lbs_exit_auto_deep_sleep()
821 del_timer(&priv->auto_deepsleep_timer); in lbs_exit_auto_deep_sleep()
830 eth_broadcast_addr(priv->current_addr); in lbs_init_adapter()
832 priv->connect_status = LBS_DISCONNECTED; in lbs_init_adapter()
833 priv->channel = DEFAULT_AD_HOC_CHANNEL; in lbs_init_adapter()
834 priv->mac_control = CMD_ACT_MAC_RX_ON | CMD_ACT_MAC_TX_ON; in lbs_init_adapter()
835 priv->radio_on = 1; in lbs_init_adapter()
836 priv->psmode = LBS802_11POWERMODECAM; in lbs_init_adapter()
837 priv->psstate = PS_STATE_FULL_POWER; in lbs_init_adapter()
838 priv->is_deep_sleep = 0; in lbs_init_adapter()
839 priv->is_auto_deep_sleep_enabled = 0; in lbs_init_adapter()
840 priv->deep_sleep_required = 0; in lbs_init_adapter()
841 priv->wakeup_dev_required = 0; in lbs_init_adapter()
842 init_waitqueue_head(&priv->ds_awake_q); in lbs_init_adapter()
843 init_waitqueue_head(&priv->scan_q); in lbs_init_adapter()
844 priv->authtype_auto = 1; in lbs_init_adapter()
845 priv->is_host_sleep_configured = 0; in lbs_init_adapter()
846 priv->is_host_sleep_activated = 0; in lbs_init_adapter()
847 init_waitqueue_head(&priv->host_sleep_q); in lbs_init_adapter()
848 init_waitqueue_head(&priv->fw_waitq); in lbs_init_adapter()
849 mutex_init(&priv->lock); in lbs_init_adapter()
851 timer_setup(&priv->command_timer, lbs_cmd_timeout_handler, 0); in lbs_init_adapter()
852 timer_setup(&priv->tx_lockup_timer, lbs_tx_lockup_handler, 0); in lbs_init_adapter()
853 timer_setup(&priv->auto_deepsleep_timer, auto_deepsleep_timer_fn, 0); in lbs_init_adapter()
855 INIT_LIST_HEAD(&priv->cmdfreeq); in lbs_init_adapter()
856 INIT_LIST_HEAD(&priv->cmdpendingq); in lbs_init_adapter()
858 spin_lock_init(&priv->driver_lock); in lbs_init_adapter()
863 ret = -ENOMEM; in lbs_init_adapter()
866 priv->resp_idx = 0; in lbs_init_adapter()
867 priv->resp_len[0] = priv->resp_len[1] = 0; in lbs_init_adapter()
869 /* Create the event FIFO */ in lbs_init_adapter()
870 ret = kfifo_alloc(&priv->event_fifo, sizeof(u32) * 16, GFP_KERNEL); in lbs_init_adapter()
872 pr_err("Out of memory allocating event FIFO buffer\n"); in lbs_init_adapter()
883 kfifo_free(&priv->event_fifo); in lbs_free_adapter()
884 del_timer(&priv->command_timer); in lbs_free_adapter()
885 del_timer(&priv->tx_lockup_timer); in lbs_free_adapter()
886 del_timer(&priv->auto_deepsleep_timer); in lbs_free_adapter()
899 * lbs_add_card - adds the card. It will probe the
921 wdev->iftype = NL80211_IFTYPE_STATION; in lbs_add_card()
923 priv->wdev = wdev; in lbs_add_card()
933 err = -ENOMEM; in lbs_add_card()
938 dev->ieee80211_ptr = wdev; in lbs_add_card()
939 dev->ml_priv = priv; in lbs_add_card()
941 wdev->netdev = dev; in lbs_add_card()
942 priv->dev = dev; in lbs_add_card()
944 dev->netdev_ops = &lbs_netdev_ops; in lbs_add_card()
945 dev->watchdog_timeo = 5 * HZ; in lbs_add_card()
946 dev->ethtool_ops = &lbs_ethtool_ops; in lbs_add_card()
947 dev->flags |= IFF_BROADCAST | IFF_MULTICAST; in lbs_add_card()
949 priv->card = card; in lbs_add_card()
951 strcpy(dev->name, "wlan%d"); in lbs_add_card()
954 init_waitqueue_head(&priv->waitq); in lbs_add_card()
955 priv->main_thread = kthread_run(lbs_thread, dev, "lbs_main"); in lbs_add_card()
956 if (IS_ERR(priv->main_thread)) { in lbs_add_card()
957 err = PTR_ERR(priv->main_thread); in lbs_add_card()
962 priv->work_thread = create_singlethread_workqueue("lbs_worker"); in lbs_add_card()
963 INIT_WORK(&priv->mcast_work, lbs_set_mcast_worker); in lbs_add_card()
965 priv->wol_criteria = EHS_REMOVE_WAKEUP; in lbs_add_card()
966 priv->wol_gpio = 0xff; in lbs_add_card()
967 priv->wol_gap = 20; in lbs_add_card()
968 priv->ehs_remove_supported = true; in lbs_add_card()
989 struct net_device *dev = priv->dev; in lbs_remove_card()
993 if (priv->wiphy_registered) in lbs_remove_card()
998 /* worker thread destruction blocks on the in-flight command which in lbs_remove_card()
1002 destroy_workqueue(priv->work_thread); in lbs_remove_card()
1005 if (priv->psmode == LBS802_11POWERMODEMAX_PSP) { in lbs_remove_card()
1006 priv->psmode = LBS802_11POWERMODECAM; in lbs_remove_card()
1011 if (priv->psstate != PS_STATE_FULL_POWER) in lbs_remove_card()
1015 if (priv->is_deep_sleep) { in lbs_remove_card()
1016 priv->is_deep_sleep = 0; in lbs_remove_card()
1017 wake_up_interruptible(&priv->ds_awake_q); in lbs_remove_card()
1020 priv->is_host_sleep_configured = 0; in lbs_remove_card()
1021 priv->is_host_sleep_activated = 0; in lbs_remove_card()
1022 wake_up_interruptible(&priv->host_sleep_q); in lbs_remove_card()
1025 priv->surpriseremoved = 1; in lbs_remove_card()
1026 kthread_stop(priv->main_thread); in lbs_remove_card()
1037 if (MRVL_FW_MAJOR_REV(priv->fwrelease) == MRVL_FW_V5) in lbs_rtap_supported()
1041 return ((MRVL_FW_MAJOR_REV(priv->fwrelease) >= MRVL_FW_V10) && in lbs_rtap_supported()
1042 (priv->fwcapinfo & MESH_CAPINFO_ENABLE_MASK)); in lbs_rtap_supported()
1048 struct net_device *dev = priv->dev; in lbs_start_card()
1059 pr_info("%s: mesh disabled\n", dev->name); in lbs_start_card()
1088 dev = priv->dev; in lbs_stop_card()
1092 if (dev->reg_state != NETREG_REGISTERED) in lbs_stop_card()
1105 void lbs_queue_event(struct lbs_private *priv, u32 event) in lbs_queue_event() argument
1109 spin_lock_irqsave(&priv->driver_lock, flags); in lbs_queue_event()
1111 if (priv->psstate == PS_STATE_SLEEP) in lbs_queue_event()
1112 priv->psstate = PS_STATE_AWAKE; in lbs_queue_event()
1114 kfifo_in(&priv->event_fifo, (unsigned char *) &event, sizeof(u32)); in lbs_queue_event()
1116 wake_up(&priv->waitq); in lbs_queue_event()
1118 spin_unlock_irqrestore(&priv->driver_lock, flags); in lbs_queue_event()
1124 if (priv->psstate == PS_STATE_SLEEP) in lbs_notify_command_response()
1125 priv->psstate = PS_STATE_AWAKE; in lbs_notify_command_response()
1129 priv->resp_idx = resp_idx; in lbs_notify_command_response()
1131 wake_up(&priv->waitq); in lbs_notify_command_response()