Lines Matching full:adapter
46 * - Allocate adapter structure
47 * - Save interface specific operations table in adapter
50 * - Set default adapter structure parameters
59 struct mwifiex_adapter *adapter; in mwifiex_register() local
62 adapter = kzalloc(sizeof(struct mwifiex_adapter), GFP_KERNEL); in mwifiex_register()
63 if (!adapter) in mwifiex_register()
66 *padapter = adapter; in mwifiex_register()
67 adapter->dev = dev; in mwifiex_register()
68 adapter->card = card; in mwifiex_register()
70 /* Save interface specific operations in adapter */ in mwifiex_register()
71 memmove(&adapter->if_ops, if_ops, sizeof(struct mwifiex_if_ops)); in mwifiex_register()
72 adapter->debug_mask = debug_mask; in mwifiex_register()
75 if (adapter->if_ops.init_if) in mwifiex_register()
76 if (adapter->if_ops.init_if(adapter)) in mwifiex_register()
79 adapter->priv_num = 0; in mwifiex_register()
83 adapter->priv[i] = in mwifiex_register()
85 if (!adapter->priv[i]) in mwifiex_register()
88 adapter->priv[i]->adapter = adapter; in mwifiex_register()
89 adapter->priv_num++; in mwifiex_register()
91 mwifiex_init_lock_list(adapter); in mwifiex_register()
93 timer_setup(&adapter->cmd_timer, mwifiex_cmd_timeout_func, 0); in mwifiex_register()
98 mwifiex_dbg(adapter, ERROR, in mwifiex_register()
101 for (i = 0; i < adapter->priv_num; i++) in mwifiex_register()
102 kfree(adapter->priv[i]); in mwifiex_register()
104 kfree(adapter); in mwifiex_register()
117 * - Free adapter structure
119 static int mwifiex_unregister(struct mwifiex_adapter *adapter) in mwifiex_unregister() argument
123 if (adapter->if_ops.cleanup_if) in mwifiex_unregister()
124 adapter->if_ops.cleanup_if(adapter); in mwifiex_unregister()
126 timer_shutdown_sync(&adapter->cmd_timer); in mwifiex_unregister()
129 for (i = 0; i < adapter->priv_num; i++) { in mwifiex_unregister()
130 mwifiex_free_curr_bcn(adapter->priv[i]); in mwifiex_unregister()
131 kfree(adapter->priv[i]); in mwifiex_unregister()
134 if (adapter->nd_info) { in mwifiex_unregister()
135 for (i = 0 ; i < adapter->nd_info->n_matches ; i++) in mwifiex_unregister()
136 kfree(adapter->nd_info->matches[i]); in mwifiex_unregister()
137 kfree(adapter->nd_info); in mwifiex_unregister()
138 adapter->nd_info = NULL; in mwifiex_unregister()
141 kfree(adapter->regd); in mwifiex_unregister()
143 kfree(adapter); in mwifiex_unregister()
147 void mwifiex_queue_main_work(struct mwifiex_adapter *adapter) in mwifiex_queue_main_work() argument
151 spin_lock_irqsave(&adapter->main_proc_lock, flags); in mwifiex_queue_main_work()
152 if (adapter->mwifiex_processing) { in mwifiex_queue_main_work()
153 adapter->more_task_flag = true; in mwifiex_queue_main_work()
154 spin_unlock_irqrestore(&adapter->main_proc_lock, flags); in mwifiex_queue_main_work()
156 spin_unlock_irqrestore(&adapter->main_proc_lock, flags); in mwifiex_queue_main_work()
157 queue_work(adapter->workqueue, &adapter->main_work); in mwifiex_queue_main_work()
162 static void mwifiex_queue_rx_work(struct mwifiex_adapter *adapter) in mwifiex_queue_rx_work() argument
164 spin_lock_bh(&adapter->rx_proc_lock); in mwifiex_queue_rx_work()
165 if (adapter->rx_processing) { in mwifiex_queue_rx_work()
166 spin_unlock_bh(&adapter->rx_proc_lock); in mwifiex_queue_rx_work()
168 spin_unlock_bh(&adapter->rx_proc_lock); in mwifiex_queue_rx_work()
169 queue_work(adapter->rx_workqueue, &adapter->rx_work); in mwifiex_queue_rx_work()
173 static int mwifiex_process_rx(struct mwifiex_adapter *adapter) in mwifiex_process_rx() argument
178 spin_lock_bh(&adapter->rx_proc_lock); in mwifiex_process_rx()
179 if (adapter->rx_processing || adapter->rx_locked) { in mwifiex_process_rx()
180 spin_unlock_bh(&adapter->rx_proc_lock); in mwifiex_process_rx()
183 adapter->rx_processing = true; in mwifiex_process_rx()
184 spin_unlock_bh(&adapter->rx_proc_lock); in mwifiex_process_rx()
188 while ((skb = skb_dequeue(&adapter->rx_data_q))) { in mwifiex_process_rx()
189 atomic_dec(&adapter->rx_pending); in mwifiex_process_rx()
190 if ((adapter->delay_main_work || in mwifiex_process_rx()
191 adapter->iface_type == MWIFIEX_USB) && in mwifiex_process_rx()
192 (atomic_read(&adapter->rx_pending) < LOW_RX_PENDING)) { in mwifiex_process_rx()
193 if (adapter->if_ops.submit_rem_rx_urbs) in mwifiex_process_rx()
194 adapter->if_ops.submit_rem_rx_urbs(adapter); in mwifiex_process_rx()
195 adapter->delay_main_work = false; in mwifiex_process_rx()
196 mwifiex_queue_main_work(adapter); in mwifiex_process_rx()
200 if (adapter->if_ops.deaggr_pkt) in mwifiex_process_rx()
201 adapter->if_ops.deaggr_pkt(adapter, skb); in mwifiex_process_rx()
204 mwifiex_handle_rx_packet(adapter, skb); in mwifiex_process_rx()
207 spin_lock_bh(&adapter->rx_proc_lock); in mwifiex_process_rx()
208 adapter->rx_processing = false; in mwifiex_process_rx()
209 spin_unlock_bh(&adapter->rx_proc_lock); in mwifiex_process_rx()
215 static void maybe_quirk_fw_disable_ds(struct mwifiex_adapter *adapter) in maybe_quirk_fw_disable_ds() argument
217 struct mwifiex_private *priv = mwifiex_get_priv(adapter, MWIFIEX_BSS_ROLE_STA); in maybe_quirk_fw_disable_ds()
220 if (test_and_set_bit(MWIFIEX_IS_REQUESTING_FW_VEREXT, &adapter->work_flags)) in maybe_quirk_fw_disable_ds()
227 mwifiex_dbg(priv->adapter, MSG, in maybe_quirk_fw_disable_ds()
247 int mwifiex_main_process(struct mwifiex_adapter *adapter) in mwifiex_main_process() argument
252 spin_lock_irqsave(&adapter->main_proc_lock, flags); in mwifiex_main_process()
255 if (adapter->mwifiex_processing || adapter->main_locked) { in mwifiex_main_process()
256 adapter->more_task_flag = true; in mwifiex_main_process()
257 spin_unlock_irqrestore(&adapter->main_proc_lock, flags); in mwifiex_main_process()
260 adapter->mwifiex_processing = true; in mwifiex_main_process()
261 spin_unlock_irqrestore(&adapter->main_proc_lock, flags); in mwifiex_main_process()
265 if (adapter->hw_status == MWIFIEX_HW_STATUS_NOT_READY) in mwifiex_main_process()
275 if (atomic_read(&adapter->rx_pending) >= HIGH_RX_PENDING && in mwifiex_main_process()
276 adapter->iface_type != MWIFIEX_USB) { in mwifiex_main_process()
277 adapter->delay_main_work = true; in mwifiex_main_process()
278 mwifiex_queue_rx_work(adapter); in mwifiex_main_process()
283 if (adapter->int_status) { in mwifiex_main_process()
284 if (adapter->hs_activated) in mwifiex_main_process()
285 mwifiex_process_hs_config(adapter); in mwifiex_main_process()
286 if (adapter->if_ops.process_int_status) in mwifiex_main_process()
287 adapter->if_ops.process_int_status(adapter); in mwifiex_main_process()
290 if (adapter->rx_work_enabled && adapter->data_received) in mwifiex_main_process()
291 mwifiex_queue_rx_work(adapter); in mwifiex_main_process()
294 if ((adapter->ps_state == PS_STATE_SLEEP) && in mwifiex_main_process()
295 (adapter->pm_wakeup_card_req && in mwifiex_main_process()
296 !adapter->pm_wakeup_fw_try) && in mwifiex_main_process()
297 (is_command_pending(adapter) || in mwifiex_main_process()
298 !skb_queue_empty(&adapter->tx_data_q) || in mwifiex_main_process()
299 !mwifiex_bypass_txlist_empty(adapter) || in mwifiex_main_process()
300 !mwifiex_wmm_lists_empty(adapter))) { in mwifiex_main_process()
301 adapter->pm_wakeup_fw_try = true; in mwifiex_main_process()
302 mod_timer(&adapter->wakeup_timer, jiffies + (HZ*3)); in mwifiex_main_process()
303 adapter->if_ops.wakeup(adapter); in mwifiex_main_process()
307 if (IS_CARD_RX_RCVD(adapter)) { in mwifiex_main_process()
308 adapter->data_received = false; in mwifiex_main_process()
309 adapter->pm_wakeup_fw_try = false; in mwifiex_main_process()
310 del_timer(&adapter->wakeup_timer); in mwifiex_main_process()
311 if (adapter->ps_state == PS_STATE_SLEEP) in mwifiex_main_process()
312 adapter->ps_state = PS_STATE_AWAKE; in mwifiex_main_process()
315 if (adapter->pm_wakeup_fw_try) in mwifiex_main_process()
317 if (adapter->ps_state == PS_STATE_PRE_SLEEP) in mwifiex_main_process()
318 mwifiex_check_ps_cond(adapter); in mwifiex_main_process()
320 if (adapter->ps_state != PS_STATE_AWAKE) in mwifiex_main_process()
322 if (adapter->tx_lock_flag) { in mwifiex_main_process()
323 if (adapter->iface_type == MWIFIEX_USB) { in mwifiex_main_process()
324 if (!adapter->usb_mc_setup) in mwifiex_main_process()
330 if ((!adapter->scan_chan_gap_enabled && in mwifiex_main_process()
331 adapter->scan_processing) || adapter->data_sent || in mwifiex_main_process()
333 (mwifiex_get_priv(adapter, in mwifiex_main_process()
335 (mwifiex_wmm_lists_empty(adapter) && in mwifiex_main_process()
336 mwifiex_bypass_txlist_empty(adapter) && in mwifiex_main_process()
337 skb_queue_empty(&adapter->tx_data_q))) { in mwifiex_main_process()
338 if (adapter->cmd_sent || adapter->curr_cmd || in mwifiex_main_process()
340 (mwifiex_get_priv(adapter, in mwifiex_main_process()
342 (!is_command_pending(adapter))) in mwifiex_main_process()
348 if (adapter->event_received) { in mwifiex_main_process()
349 adapter->event_received = false; in mwifiex_main_process()
350 mwifiex_process_event(adapter); in mwifiex_main_process()
354 if (adapter->cmd_resp_received) { in mwifiex_main_process()
355 adapter->cmd_resp_received = false; in mwifiex_main_process()
356 mwifiex_process_cmdresp(adapter); in mwifiex_main_process()
359 if (adapter->hw_status == MWIFIEX_HW_STATUS_INIT_DONE) { in mwifiex_main_process()
360 adapter->hw_status = MWIFIEX_HW_STATUS_READY; in mwifiex_main_process()
361 mwifiex_init_fw_complete(adapter); in mwifiex_main_process()
362 maybe_quirk_fw_disable_ds(adapter); in mwifiex_main_process()
368 if (adapter->ps_state == PS_STATE_PRE_SLEEP) in mwifiex_main_process()
369 mwifiex_check_ps_cond(adapter); in mwifiex_main_process()
374 if ((adapter->ps_state == PS_STATE_SLEEP) || in mwifiex_main_process()
375 (adapter->ps_state == PS_STATE_PRE_SLEEP) || in mwifiex_main_process()
376 (adapter->ps_state == PS_STATE_SLEEP_CFM)) { in mwifiex_main_process()
380 if (adapter->tx_lock_flag) { in mwifiex_main_process()
381 if (adapter->iface_type == MWIFIEX_USB) { in mwifiex_main_process()
382 if (!adapter->usb_mc_setup) in mwifiex_main_process()
388 if (!adapter->cmd_sent && !adapter->curr_cmd && in mwifiex_main_process()
390 (mwifiex_get_priv(adapter, MWIFIEX_BSS_ROLE_STA))) { in mwifiex_main_process()
391 if (mwifiex_exec_next_cmd(adapter) == -1) { in mwifiex_main_process()
400 if (adapter->iface_type == MWIFIEX_USB && in mwifiex_main_process()
401 adapter->usb_mc_setup) in mwifiex_main_process()
404 if ((adapter->scan_chan_gap_enabled || in mwifiex_main_process()
405 !adapter->scan_processing) && in mwifiex_main_process()
406 !adapter->data_sent && in mwifiex_main_process()
407 !skb_queue_empty(&adapter->tx_data_q)) { in mwifiex_main_process()
408 if (adapter->hs_activated_manually) { in mwifiex_main_process()
409 mwifiex_cancel_hs(mwifiex_get_priv(adapter, MWIFIEX_BSS_ROLE_ANY), in mwifiex_main_process()
411 adapter->hs_activated_manually = false; in mwifiex_main_process()
414 mwifiex_process_tx_queue(adapter); in mwifiex_main_process()
415 if (adapter->hs_activated) { in mwifiex_main_process()
417 &adapter->work_flags); in mwifiex_main_process()
420 (adapter, MWIFIEX_BSS_ROLE_ANY), in mwifiex_main_process()
425 if ((adapter->scan_chan_gap_enabled || in mwifiex_main_process()
426 !adapter->scan_processing) && in mwifiex_main_process()
427 !adapter->data_sent && in mwifiex_main_process()
428 !mwifiex_bypass_txlist_empty(adapter) && in mwifiex_main_process()
430 (mwifiex_get_priv(adapter, MWIFIEX_BSS_ROLE_STA))) { in mwifiex_main_process()
431 if (adapter->hs_activated_manually) { in mwifiex_main_process()
432 mwifiex_cancel_hs(mwifiex_get_priv(adapter, MWIFIEX_BSS_ROLE_ANY), in mwifiex_main_process()
434 adapter->hs_activated_manually = false; in mwifiex_main_process()
437 mwifiex_process_bypass_tx(adapter); in mwifiex_main_process()
438 if (adapter->hs_activated) { in mwifiex_main_process()
440 &adapter->work_flags); in mwifiex_main_process()
443 (adapter, MWIFIEX_BSS_ROLE_ANY), in mwifiex_main_process()
448 if ((adapter->scan_chan_gap_enabled || in mwifiex_main_process()
449 !adapter->scan_processing) && in mwifiex_main_process()
450 !adapter->data_sent && !mwifiex_wmm_lists_empty(adapter) && in mwifiex_main_process()
452 (mwifiex_get_priv(adapter, MWIFIEX_BSS_ROLE_STA))) { in mwifiex_main_process()
453 if (adapter->hs_activated_manually) { in mwifiex_main_process()
454 mwifiex_cancel_hs(mwifiex_get_priv(adapter, MWIFIEX_BSS_ROLE_ANY), in mwifiex_main_process()
456 adapter->hs_activated_manually = false; in mwifiex_main_process()
459 mwifiex_wmm_process_tx(adapter); in mwifiex_main_process()
460 if (adapter->hs_activated) { in mwifiex_main_process()
462 &adapter->work_flags); in mwifiex_main_process()
465 (adapter, MWIFIEX_BSS_ROLE_ANY), in mwifiex_main_process()
470 if (adapter->delay_null_pkt && !adapter->cmd_sent && in mwifiex_main_process()
471 !adapter->curr_cmd && !is_command_pending(adapter) && in mwifiex_main_process()
472 (mwifiex_wmm_lists_empty(adapter) && in mwifiex_main_process()
473 mwifiex_bypass_txlist_empty(adapter) && in mwifiex_main_process()
474 skb_queue_empty(&adapter->tx_data_q))) { in mwifiex_main_process()
476 (mwifiex_get_priv(adapter, MWIFIEX_BSS_ROLE_STA), in mwifiex_main_process()
479 adapter->delay_null_pkt = false; in mwifiex_main_process()
480 adapter->ps_state = PS_STATE_SLEEP; in mwifiex_main_process()
486 spin_lock_irqsave(&adapter->main_proc_lock, flags); in mwifiex_main_process()
487 if (adapter->more_task_flag) { in mwifiex_main_process()
488 adapter->more_task_flag = false; in mwifiex_main_process()
489 spin_unlock_irqrestore(&adapter->main_proc_lock, flags); in mwifiex_main_process()
492 adapter->mwifiex_processing = false; in mwifiex_main_process()
493 spin_unlock_irqrestore(&adapter->main_proc_lock, flags); in mwifiex_main_process()
500 * This function frees the adapter structure.
505 static void mwifiex_free_adapter(struct mwifiex_adapter *adapter) in mwifiex_free_adapter() argument
507 if (!adapter) { in mwifiex_free_adapter()
508 pr_err("%s: adapter is NULL\n", __func__); in mwifiex_free_adapter()
512 mwifiex_unregister(adapter); in mwifiex_free_adapter()
513 pr_debug("info: %s: free adapter\n", __func__); in mwifiex_free_adapter()
520 static void mwifiex_terminate_workqueue(struct mwifiex_adapter *adapter) in mwifiex_terminate_workqueue() argument
522 if (adapter->workqueue) { in mwifiex_terminate_workqueue()
523 destroy_workqueue(adapter->workqueue); in mwifiex_terminate_workqueue()
524 adapter->workqueue = NULL; in mwifiex_terminate_workqueue()
527 if (adapter->rx_workqueue) { in mwifiex_terminate_workqueue()
528 destroy_workqueue(adapter->rx_workqueue); in mwifiex_terminate_workqueue()
529 adapter->rx_workqueue = NULL; in mwifiex_terminate_workqueue()
532 if (adapter->host_mlme_workqueue) { in mwifiex_terminate_workqueue()
533 destroy_workqueue(adapter->host_mlme_workqueue); in mwifiex_terminate_workqueue()
534 adapter->host_mlme_workqueue = NULL; in mwifiex_terminate_workqueue()
549 struct mwifiex_adapter *adapter = context; in _mwifiex_fw_dpc() local
553 struct completion *fw_done = adapter->fw_done; in _mwifiex_fw_dpc()
556 mwifiex_dbg(adapter, ERROR, in _mwifiex_fw_dpc()
557 "Failed to get firmware %s\n", adapter->fw_name); in _mwifiex_fw_dpc()
562 adapter->firmware = firmware; in _mwifiex_fw_dpc()
563 fw.fw_buf = (u8 *) adapter->firmware->data; in _mwifiex_fw_dpc()
564 fw.fw_len = adapter->firmware->size; in _mwifiex_fw_dpc()
566 if (adapter->if_ops.dnld_fw) { in _mwifiex_fw_dpc()
567 ret = adapter->if_ops.dnld_fw(adapter, &fw); in _mwifiex_fw_dpc()
569 ret = mwifiex_dnld_fw(adapter, &fw); in _mwifiex_fw_dpc()
575 mwifiex_dbg(adapter, MSG, "WLAN FW is active\n"); in _mwifiex_fw_dpc()
578 if ((request_firmware(&adapter->cal_data, cal_data_cfg, in _mwifiex_fw_dpc()
579 adapter->dev)) < 0) in _mwifiex_fw_dpc()
580 mwifiex_dbg(adapter, ERROR, in _mwifiex_fw_dpc()
585 if (adapter->if_ops.enable_int) { in _mwifiex_fw_dpc()
586 if (adapter->if_ops.enable_int(adapter)) in _mwifiex_fw_dpc()
590 adapter->init_wait_q_woken = false; in _mwifiex_fw_dpc()
591 ret = mwifiex_init_fw(adapter); in _mwifiex_fw_dpc()
595 adapter->hw_status = MWIFIEX_HW_STATUS_READY; in _mwifiex_fw_dpc()
599 if (!adapter->mfg_mode) { in _mwifiex_fw_dpc()
600 wait_event_interruptible(adapter->init_wait_q, in _mwifiex_fw_dpc()
601 adapter->init_wait_q_woken); in _mwifiex_fw_dpc()
602 if (adapter->hw_status != MWIFIEX_HW_STATUS_READY) in _mwifiex_fw_dpc()
606 if (!adapter->wiphy) { in _mwifiex_fw_dpc()
607 if (mwifiex_register_cfg80211(adapter)) { in _mwifiex_fw_dpc()
608 mwifiex_dbg(adapter, ERROR, in _mwifiex_fw_dpc()
614 if (mwifiex_init_channel_scan_gap(adapter)) { in _mwifiex_fw_dpc()
615 mwifiex_dbg(adapter, ERROR, in _mwifiex_fw_dpc()
626 wiphy_lock(adapter->wiphy); in _mwifiex_fw_dpc()
628 wdev = mwifiex_add_virtual_intf(adapter->wiphy, "mlan%d", NET_NAME_ENUM, in _mwifiex_fw_dpc()
631 mwifiex_dbg(adapter, ERROR, in _mwifiex_fw_dpc()
633 wiphy_unlock(adapter->wiphy); in _mwifiex_fw_dpc()
639 wdev = mwifiex_add_virtual_intf(adapter->wiphy, "uap%d", NET_NAME_ENUM, in _mwifiex_fw_dpc()
642 mwifiex_dbg(adapter, ERROR, in _mwifiex_fw_dpc()
644 wiphy_unlock(adapter->wiphy); in _mwifiex_fw_dpc()
651 wdev = mwifiex_add_virtual_intf(adapter->wiphy, "p2p%d", NET_NAME_ENUM, in _mwifiex_fw_dpc()
654 mwifiex_dbg(adapter, ERROR, in _mwifiex_fw_dpc()
656 wiphy_unlock(adapter->wiphy); in _mwifiex_fw_dpc()
661 wiphy_unlock(adapter->wiphy); in _mwifiex_fw_dpc()
664 mwifiex_drv_get_driver_version(adapter, fmt, sizeof(fmt) - 1); in _mwifiex_fw_dpc()
665 mwifiex_dbg(adapter, MSG, "driver_version = %s\n", fmt); in _mwifiex_fw_dpc()
666 adapter->is_up = true; in _mwifiex_fw_dpc()
670 vfree(adapter->chan_stats); in _mwifiex_fw_dpc()
672 wiphy_unregister(adapter->wiphy); in _mwifiex_fw_dpc()
673 wiphy_free(adapter->wiphy); in _mwifiex_fw_dpc()
675 if (adapter->if_ops.disable_int) in _mwifiex_fw_dpc()
676 adapter->if_ops.disable_int(adapter); in _mwifiex_fw_dpc()
678 mwifiex_dbg(adapter, ERROR, in _mwifiex_fw_dpc()
680 if (adapter->if_ops.unregister_dev) in _mwifiex_fw_dpc()
681 adapter->if_ops.unregister_dev(adapter); in _mwifiex_fw_dpc()
683 set_bit(MWIFIEX_SURPRISE_REMOVED, &adapter->work_flags); in _mwifiex_fw_dpc()
684 mwifiex_terminate_workqueue(adapter); in _mwifiex_fw_dpc()
686 if (adapter->hw_status == MWIFIEX_HW_STATUS_READY) { in _mwifiex_fw_dpc()
688 mwifiex_shutdown_drv(adapter); in _mwifiex_fw_dpc()
689 mwifiex_free_cmd_buffers(adapter); in _mwifiex_fw_dpc()
694 if (adapter->cal_data) { in _mwifiex_fw_dpc()
695 release_firmware(adapter->cal_data); in _mwifiex_fw_dpc()
696 adapter->cal_data = NULL; in _mwifiex_fw_dpc()
698 if (adapter->firmware) { in _mwifiex_fw_dpc()
699 release_firmware(adapter->firmware); in _mwifiex_fw_dpc()
700 adapter->firmware = NULL; in _mwifiex_fw_dpc()
703 if (adapter->irq_wakeup >= 0) in _mwifiex_fw_dpc()
704 device_init_wakeup(adapter->dev, false); in _mwifiex_fw_dpc()
705 mwifiex_free_adapter(adapter); in _mwifiex_fw_dpc()
722 static int mwifiex_init_hw_fw(struct mwifiex_adapter *adapter, in mwifiex_init_hw_fw() argument
731 strscpy(adapter->fw_name, MFG_FIRMWARE, in mwifiex_init_hw_fw()
732 sizeof(adapter->fw_name)); in mwifiex_init_hw_fw()
735 ret = request_firmware_nowait(THIS_MODULE, 1, adapter->fw_name, in mwifiex_init_hw_fw()
736 adapter->dev, GFP_KERNEL, adapter, in mwifiex_init_hw_fw()
739 ret = request_firmware(&adapter->firmware, in mwifiex_init_hw_fw()
740 adapter->fw_name, in mwifiex_init_hw_fw()
741 adapter->dev); in mwifiex_init_hw_fw()
745 mwifiex_dbg(adapter, ERROR, "request_firmware%s error %d\n", in mwifiex_init_hw_fw()
776 mwifiex_dbg(priv->adapter, INFO, in mwifiex_close()
784 mwifiex_dbg(priv->adapter, INFO, in mwifiex_close()
802 ISSUPP_TDLS_ENABLED(priv->adapter->fw_cap_info) && in mwifiex_bypass_tx_queue()
804 mwifiex_dbg(priv->adapter, DATA, in mwifiex_bypass_tx_queue()
809 mwifiex_dbg(priv->adapter, MSG, in mwifiex_bypass_tx_queue()
829 mwifiex_dbg(priv->adapter, DATA, in mwifiex_queue_tx_pkt()
835 atomic_inc(&priv->adapter->tx_pending); in mwifiex_queue_tx_pkt()
836 atomic_inc(&priv->adapter->bypass_tx_pending); in mwifiex_queue_tx_pkt()
839 atomic_inc(&priv->adapter->tx_pending); in mwifiex_queue_tx_pkt()
843 mwifiex_queue_main_work(priv->adapter); in mwifiex_queue_tx_pkt()
900 mwifiex_dbg(priv->adapter, DATA, in mwifiex_hard_start_xmit()
904 if (test_bit(MWIFIEX_SURPRISE_REMOVED, &priv->adapter->work_flags)) { in mwifiex_hard_start_xmit()
910 mwifiex_dbg(priv->adapter, ERROR, in mwifiex_hard_start_xmit()
917 mwifiex_dbg(priv->adapter, DATA, in mwifiex_hard_start_xmit()
924 mwifiex_dbg(priv->adapter, ERROR, in mwifiex_hard_start_xmit()
932 mwifiex_dbg(priv->adapter, INFO, in mwifiex_hard_start_xmit()
947 priv->adapter->fw_api_ver == MWIFIEX_FW_V15)) in mwifiex_hard_start_xmit()
961 if (ISSUPP_TDLS_ENABLED(priv->adapter->fw_cap_info) && in mwifiex_hard_start_xmit()
964 if (priv->adapter->auto_tdls && priv->check_tdls_tx) in mwifiex_hard_start_xmit()
994 } else if (priv->adapter->priv[0] != priv) { in mwifiex_set_mac_address()
1009 mwifiex_dbg(priv->adapter, ERROR, in mwifiex_set_mac_address()
1060 mwifiex_dbg(priv->adapter, ERROR, in mwifiex_tx_timeout()
1067 priv->adapter->if_ops.card_reset) { in mwifiex_tx_timeout()
1068 mwifiex_dbg(priv->adapter, ERROR, in mwifiex_tx_timeout()
1071 priv->adapter->if_ops.card_reset(priv->adapter); in mwifiex_tx_timeout()
1075 void mwifiex_multi_chan_resync(struct mwifiex_adapter *adapter) in mwifiex_multi_chan_resync() argument
1077 struct usb_card_rec *card = adapter->card; in mwifiex_multi_chan_resync()
1085 mwifiex_dbg(adapter, WARN, "pending data urb in sys\n"); in mwifiex_multi_chan_resync()
1092 priv = mwifiex_get_priv(adapter, MWIFIEX_BSS_ROLE_ANY); in mwifiex_multi_chan_resync()
1096 mwifiex_dbg(adapter, ERROR, in mwifiex_multi_chan_resync()
1101 void mwifiex_upload_device_dump(struct mwifiex_adapter *adapter) in mwifiex_upload_device_dump() argument
1106 mwifiex_dbg(adapter, MSG, in mwifiex_upload_device_dump()
1108 dev_coredumpv(adapter->dev, adapter->devdump_data, adapter->devdump_len, in mwifiex_upload_device_dump()
1110 mwifiex_dbg(adapter, MSG, in mwifiex_upload_device_dump()
1114 * after 5 min. Here reset adapter->devdump_data and ->devdump_len in mwifiex_upload_device_dump()
1117 adapter->devdump_data = NULL; in mwifiex_upload_device_dump()
1118 adapter->devdump_len = 0; in mwifiex_upload_device_dump()
1122 void mwifiex_drv_info_dump(struct mwifiex_adapter *adapter) in mwifiex_drv_info_dump() argument
1133 mwifiex_dbg(adapter, MSG, "===mwifiex driverinfo dump start===\n"); in mwifiex_drv_info_dump()
1135 p = adapter->devdump_data; in mwifiex_drv_info_dump()
1140 mwifiex_drv_get_driver_version(adapter, drv_version, in mwifiex_drv_info_dump()
1144 if (adapter->iface_type == MWIFIEX_USB) { in mwifiex_drv_info_dump()
1145 cardp = (struct usb_card_rec *)adapter->card; in mwifiex_drv_info_dump()
1159 atomic_read(&adapter->tx_pending)); in mwifiex_drv_info_dump()
1161 atomic_read(&adapter->rx_pending)); in mwifiex_drv_info_dump()
1163 if (adapter->iface_type == MWIFIEX_SDIO) { in mwifiex_drv_info_dump()
1164 sdio_card = (struct sdio_mmc_card *)adapter->card; in mwifiex_drv_info_dump()
1171 for (i = 0; i < adapter->priv_num; i++) { in mwifiex_drv_info_dump()
1172 if (!adapter->priv[i]->netdev) in mwifiex_drv_info_dump()
1174 priv = adapter->priv[i]; in mwifiex_drv_info_dump()
1199 if (adapter->iface_type == MWIFIEX_SDIO || in mwifiex_drv_info_dump()
1200 adapter->iface_type == MWIFIEX_PCIE) { in mwifiex_drv_info_dump()
1202 adapter->iface_type == MWIFIEX_SDIO ? in mwifiex_drv_info_dump()
1204 if (adapter->if_ops.reg_dump) in mwifiex_drv_info_dump()
1205 p += adapter->if_ops.reg_dump(adapter, p); in mwifiex_drv_info_dump()
1210 for (i = 0; i < adapter->priv_num; i++) { in mwifiex_drv_info_dump()
1211 if (!adapter->priv[i]->netdev) in mwifiex_drv_info_dump()
1213 priv = adapter->priv[i]; in mwifiex_drv_info_dump()
1223 mwifiex_dbg(adapter, MSG, "===mwifiex driverinfo dump end===\n"); in mwifiex_drv_info_dump()
1224 adapter->devdump_len = p - (char *)adapter->devdump_data; in mwifiex_drv_info_dump()
1228 void mwifiex_prepare_fw_dump_info(struct mwifiex_adapter *adapter) in mwifiex_prepare_fw_dump_info() argument
1234 for (idx = 0; idx < adapter->num_mem_types; idx++) { in mwifiex_prepare_fw_dump_info()
1236 &adapter->mem_type_mapping_tbl[idx]; in mwifiex_prepare_fw_dump_info()
1247 if (dump_len + 1 + adapter->devdump_len > MWIFIEX_FW_DUMP_SIZE) { in mwifiex_prepare_fw_dump_info()
1249 fw_dump_ptr = vzalloc(dump_len + 1 + adapter->devdump_len); in mwifiex_prepare_fw_dump_info()
1250 mwifiex_dbg(adapter, MSG, "Realloc device dump data.\n"); in mwifiex_prepare_fw_dump_info()
1252 vfree(adapter->devdump_data); in mwifiex_prepare_fw_dump_info()
1253 mwifiex_dbg(adapter, ERROR, in mwifiex_prepare_fw_dump_info()
1258 memmove(fw_dump_ptr, adapter->devdump_data, in mwifiex_prepare_fw_dump_info()
1259 adapter->devdump_len); in mwifiex_prepare_fw_dump_info()
1260 vfree(adapter->devdump_data); in mwifiex_prepare_fw_dump_info()
1261 adapter->devdump_data = fw_dump_ptr; in mwifiex_prepare_fw_dump_info()
1264 fw_dump_ptr = (char *)adapter->devdump_data + adapter->devdump_len; in mwifiex_prepare_fw_dump_info()
1266 for (idx = 0; idx < adapter->num_mem_types; idx++) { in mwifiex_prepare_fw_dump_info()
1268 &adapter->mem_type_mapping_tbl[idx]; in mwifiex_prepare_fw_dump_info()
1288 adapter->devdump_len = fw_dump_ptr - (char *)adapter->devdump_data; in mwifiex_prepare_fw_dump_info()
1290 for (idx = 0; idx < adapter->num_mem_types; idx++) { in mwifiex_prepare_fw_dump_info()
1292 &adapter->mem_type_mapping_tbl[idx]; in mwifiex_prepare_fw_dump_info()
1370 ether_addr_copy(priv->curr_addr, priv->adapter->perm_addr); in mwifiex_init_priv_params()
1383 int is_command_pending(struct mwifiex_adapter *adapter) in is_command_pending() argument
1387 spin_lock_bh(&adapter->cmd_pending_q_lock); in is_command_pending()
1388 is_cmd_pend_q_empty = list_empty(&adapter->cmd_pending_q); in is_command_pending()
1389 spin_unlock_bh(&adapter->cmd_pending_q_lock); in is_command_pending()
1399 struct mwifiex_adapter *adapter = in mwifiex_host_mlme_work_queue() local
1402 if (test_bit(MWIFIEX_SURPRISE_REMOVED, &adapter->work_flags)) in mwifiex_host_mlme_work_queue()
1406 if (adapter->host_mlme_link_lost) { in mwifiex_host_mlme_work_queue()
1407 if (adapter->priv_link_lost) { in mwifiex_host_mlme_work_queue()
1408 mwifiex_reset_connect_state(adapter->priv_link_lost, in mwifiex_host_mlme_work_queue()
1411 adapter->priv_link_lost = NULL; in mwifiex_host_mlme_work_queue()
1413 adapter->host_mlme_link_lost = false; in mwifiex_host_mlme_work_queue()
1417 if (adapter->assoc_resp_received) { in mwifiex_host_mlme_work_queue()
1418 mwifiex_process_assoc_resp(adapter); in mwifiex_host_mlme_work_queue()
1419 adapter->assoc_resp_received = false; in mwifiex_host_mlme_work_queue()
1430 struct mwifiex_adapter *adapter = in mwifiex_rx_work_queue() local
1433 if (test_bit(MWIFIEX_SURPRISE_REMOVED, &adapter->work_flags)) in mwifiex_rx_work_queue()
1435 mwifiex_process_rx(adapter); in mwifiex_rx_work_queue()
1446 struct mwifiex_adapter *adapter = in mwifiex_main_work_queue() local
1449 if (test_bit(MWIFIEX_SURPRISE_REMOVED, &adapter->work_flags)) in mwifiex_main_work_queue()
1451 mwifiex_main_process(adapter); in mwifiex_main_work_queue()
1455 static void mwifiex_uninit_sw(struct mwifiex_adapter *adapter) in mwifiex_uninit_sw() argument
1463 if (adapter->if_ops.disable_int) in mwifiex_uninit_sw()
1464 adapter->if_ops.disable_int(adapter); in mwifiex_uninit_sw()
1466 set_bit(MWIFIEX_SURPRISE_REMOVED, &adapter->work_flags); in mwifiex_uninit_sw()
1467 mwifiex_terminate_workqueue(adapter); in mwifiex_uninit_sw()
1468 adapter->int_status = 0; in mwifiex_uninit_sw()
1471 for (i = 0; i < adapter->priv_num; i++) { in mwifiex_uninit_sw()
1472 priv = adapter->priv[i]; in mwifiex_uninit_sw()
1474 mwifiex_stop_net_dev_queue(priv->netdev, adapter); in mwifiex_uninit_sw()
1481 mwifiex_dbg(adapter, CMD, "cmd: calling mwifiex_shutdown_drv...\n"); in mwifiex_uninit_sw()
1482 mwifiex_shutdown_drv(adapter); in mwifiex_uninit_sw()
1483 mwifiex_dbg(adapter, CMD, "cmd: mwifiex_shutdown_drv done\n"); in mwifiex_uninit_sw()
1485 if (atomic_read(&adapter->rx_pending) || in mwifiex_uninit_sw()
1486 atomic_read(&adapter->tx_pending) || in mwifiex_uninit_sw()
1487 atomic_read(&adapter->cmd_pending)) { in mwifiex_uninit_sw()
1488 mwifiex_dbg(adapter, ERROR, in mwifiex_uninit_sw()
1491 atomic_read(&adapter->rx_pending), in mwifiex_uninit_sw()
1492 atomic_read(&adapter->tx_pending), in mwifiex_uninit_sw()
1493 atomic_read(&adapter->cmd_pending)); in mwifiex_uninit_sw()
1496 for (i = 0; i < adapter->priv_num; i++) { in mwifiex_uninit_sw()
1497 priv = adapter->priv[i]; in mwifiex_uninit_sw()
1507 wiphy_lock(adapter->wiphy); in mwifiex_uninit_sw()
1508 mwifiex_del_virtual_intf(adapter->wiphy, &priv->wdev); in mwifiex_uninit_sw()
1509 wiphy_unlock(adapter->wiphy); in mwifiex_uninit_sw()
1514 wiphy_unregister(adapter->wiphy); in mwifiex_uninit_sw()
1515 wiphy_free(adapter->wiphy); in mwifiex_uninit_sw()
1516 adapter->wiphy = NULL; in mwifiex_uninit_sw()
1518 vfree(adapter->chan_stats); in mwifiex_uninit_sw()
1519 mwifiex_free_cmd_buffers(adapter); in mwifiex_uninit_sw()
1523 * This function can be used for shutting down the adapter SW.
1525 int mwifiex_shutdown_sw(struct mwifiex_adapter *adapter) in mwifiex_shutdown_sw() argument
1529 if (!adapter) in mwifiex_shutdown_sw()
1532 wait_for_completion(adapter->fw_done); in mwifiex_shutdown_sw()
1534 reinit_completion(adapter->fw_done); in mwifiex_shutdown_sw()
1536 priv = mwifiex_get_priv(adapter, MWIFIEX_BSS_ROLE_ANY); in mwifiex_shutdown_sw()
1541 mwifiex_uninit_sw(adapter); in mwifiex_shutdown_sw()
1542 adapter->is_up = false; in mwifiex_shutdown_sw()
1544 if (adapter->if_ops.down_dev) in mwifiex_shutdown_sw()
1545 adapter->if_ops.down_dev(adapter); in mwifiex_shutdown_sw()
1551 /* This function can be used for reinitting the adapter SW. Required
1555 mwifiex_reinit_sw(struct mwifiex_adapter *adapter) in mwifiex_reinit_sw() argument
1559 mwifiex_init_lock_list(adapter); in mwifiex_reinit_sw()
1560 if (adapter->if_ops.up_dev) in mwifiex_reinit_sw()
1561 adapter->if_ops.up_dev(adapter); in mwifiex_reinit_sw()
1563 adapter->hw_status = MWIFIEX_HW_STATUS_INITIALIZING; in mwifiex_reinit_sw()
1564 clear_bit(MWIFIEX_SURPRISE_REMOVED, &adapter->work_flags); in mwifiex_reinit_sw()
1565 init_waitqueue_head(&adapter->init_wait_q); in mwifiex_reinit_sw()
1566 clear_bit(MWIFIEX_IS_SUSPENDED, &adapter->work_flags); in mwifiex_reinit_sw()
1567 adapter->hs_activated = false; in mwifiex_reinit_sw()
1568 clear_bit(MWIFIEX_IS_CMD_TIMEDOUT, &adapter->work_flags); in mwifiex_reinit_sw()
1569 init_waitqueue_head(&adapter->hs_activate_wait_q); in mwifiex_reinit_sw()
1570 init_waitqueue_head(&adapter->cmd_wait_q.wait); in mwifiex_reinit_sw()
1571 adapter->cmd_wait_q.status = 0; in mwifiex_reinit_sw()
1572 adapter->scan_wait_q_woken = false; in mwifiex_reinit_sw()
1574 if ((num_possible_cpus() > 1) || adapter->iface_type == MWIFIEX_USB) in mwifiex_reinit_sw()
1575 adapter->rx_work_enabled = true; in mwifiex_reinit_sw()
1577 adapter->workqueue = in mwifiex_reinit_sw()
1580 if (!adapter->workqueue) in mwifiex_reinit_sw()
1583 INIT_WORK(&adapter->main_work, mwifiex_main_work_queue); in mwifiex_reinit_sw()
1585 if (adapter->rx_work_enabled) { in mwifiex_reinit_sw()
1586 adapter->rx_workqueue = alloc_workqueue("MWIFIEX_RX_WORK_QUEUE", in mwifiex_reinit_sw()
1590 if (!adapter->rx_workqueue) in mwifiex_reinit_sw()
1592 INIT_WORK(&adapter->rx_work, mwifiex_rx_work_queue); in mwifiex_reinit_sw()
1595 if (adapter->host_mlme_enabled) { in mwifiex_reinit_sw()
1596 adapter->host_mlme_workqueue = in mwifiex_reinit_sw()
1601 if (!adapter->host_mlme_workqueue) in mwifiex_reinit_sw()
1603 INIT_WORK(&adapter->host_mlme_work, in mwifiex_reinit_sw()
1611 mwifiex_dbg(adapter, INFO, "%s, mwifiex_init_hw_fw()...\n", __func__); in mwifiex_reinit_sw()
1613 if (mwifiex_init_hw_fw(adapter, false)) { in mwifiex_reinit_sw()
1614 mwifiex_dbg(adapter, ERROR, in mwifiex_reinit_sw()
1620 ret = _mwifiex_fw_dpc(adapter->firmware, adapter); in mwifiex_reinit_sw()
1622 pr_err("Failed to bring up adapter: %d\n", ret); in mwifiex_reinit_sw()
1625 mwifiex_dbg(adapter, INFO, "%s, successful\n", __func__); in mwifiex_reinit_sw()
1630 mwifiex_dbg(adapter, ERROR, "info: %s: unregister device\n", __func__); in mwifiex_reinit_sw()
1631 if (adapter->if_ops.unregister_dev) in mwifiex_reinit_sw()
1632 adapter->if_ops.unregister_dev(adapter); in mwifiex_reinit_sw()
1635 set_bit(MWIFIEX_SURPRISE_REMOVED, &adapter->work_flags); in mwifiex_reinit_sw()
1636 mwifiex_terminate_workqueue(adapter); in mwifiex_reinit_sw()
1637 if (adapter->hw_status == MWIFIEX_HW_STATUS_READY) { in mwifiex_reinit_sw()
1638 mwifiex_dbg(adapter, ERROR, in mwifiex_reinit_sw()
1640 mwifiex_shutdown_drv(adapter); in mwifiex_reinit_sw()
1641 mwifiex_free_cmd_buffers(adapter); in mwifiex_reinit_sw()
1644 complete_all(adapter->fw_done); in mwifiex_reinit_sw()
1645 mwifiex_dbg(adapter, INFO, "%s, error\n", __func__); in mwifiex_reinit_sw()
1653 struct mwifiex_adapter *adapter = priv; in mwifiex_irq_wakeup_handler() local
1655 dev_dbg(adapter->dev, "%s: wake by wifi", __func__); in mwifiex_irq_wakeup_handler()
1656 adapter->wake_by_wifi = true; in mwifiex_irq_wakeup_handler()
1660 pm_wakeup_event(adapter->dev, 0); in mwifiex_irq_wakeup_handler()
1666 static void mwifiex_probe_of(struct mwifiex_adapter *adapter) in mwifiex_probe_of() argument
1669 struct device *dev = adapter->dev; in mwifiex_probe_of()
1674 adapter->dt_node = dev->of_node; in mwifiex_probe_of()
1675 adapter->irq_wakeup = irq_of_parse_and_map(adapter->dt_node, 0); in mwifiex_probe_of()
1676 if (!adapter->irq_wakeup) { in mwifiex_probe_of()
1681 ret = devm_request_irq(dev, adapter->irq_wakeup, in mwifiex_probe_of()
1683 "wifi_wake", adapter); in mwifiex_probe_of()
1686 adapter->irq_wakeup, ret); in mwifiex_probe_of()
1690 disable_irq(adapter->irq_wakeup); in mwifiex_probe_of()
1698 adapter->irq_wakeup = -1; in mwifiex_probe_of()
1707 * adapter structure
1719 struct mwifiex_adapter *adapter; in mwifiex_add_card() local
1721 if (mwifiex_register(card, dev, if_ops, (void **)&adapter)) { in mwifiex_add_card()
1726 mwifiex_probe_of(adapter); in mwifiex_add_card()
1728 adapter->iface_type = iface_type; in mwifiex_add_card()
1729 adapter->fw_done = fw_done; in mwifiex_add_card()
1731 adapter->hw_status = MWIFIEX_HW_STATUS_INITIALIZING; in mwifiex_add_card()
1732 clear_bit(MWIFIEX_SURPRISE_REMOVED, &adapter->work_flags); in mwifiex_add_card()
1733 init_waitqueue_head(&adapter->init_wait_q); in mwifiex_add_card()
1734 clear_bit(MWIFIEX_IS_SUSPENDED, &adapter->work_flags); in mwifiex_add_card()
1735 adapter->hs_activated = false; in mwifiex_add_card()
1736 init_waitqueue_head(&adapter->hs_activate_wait_q); in mwifiex_add_card()
1737 init_waitqueue_head(&adapter->cmd_wait_q.wait); in mwifiex_add_card()
1738 adapter->cmd_wait_q.status = 0; in mwifiex_add_card()
1739 adapter->scan_wait_q_woken = false; in mwifiex_add_card()
1741 if ((num_possible_cpus() > 1) || adapter->iface_type == MWIFIEX_USB) in mwifiex_add_card()
1742 adapter->rx_work_enabled = true; in mwifiex_add_card()
1744 adapter->workqueue = in mwifiex_add_card()
1747 if (!adapter->workqueue) in mwifiex_add_card()
1750 INIT_WORK(&adapter->main_work, mwifiex_main_work_queue); in mwifiex_add_card()
1752 if (adapter->rx_work_enabled) { in mwifiex_add_card()
1753 adapter->rx_workqueue = alloc_workqueue("MWIFIEX_RX_WORK_QUEUE", in mwifiex_add_card()
1757 if (!adapter->rx_workqueue) in mwifiex_add_card()
1760 INIT_WORK(&adapter->rx_work, mwifiex_rx_work_queue); in mwifiex_add_card()
1765 if (adapter->if_ops.register_dev(adapter)) { in mwifiex_add_card()
1770 if (adapter->host_mlme_enabled) { in mwifiex_add_card()
1771 adapter->host_mlme_workqueue = in mwifiex_add_card()
1776 if (!adapter->host_mlme_workqueue) in mwifiex_add_card()
1778 INIT_WORK(&adapter->host_mlme_work, in mwifiex_add_card()
1782 if (mwifiex_init_hw_fw(adapter, true)) { in mwifiex_add_card()
1791 if (adapter->if_ops.unregister_dev) in mwifiex_add_card()
1792 adapter->if_ops.unregister_dev(adapter); in mwifiex_add_card()
1794 set_bit(MWIFIEX_SURPRISE_REMOVED, &adapter->work_flags); in mwifiex_add_card()
1795 mwifiex_terminate_workqueue(adapter); in mwifiex_add_card()
1796 if (adapter->hw_status == MWIFIEX_HW_STATUS_READY) { in mwifiex_add_card()
1798 mwifiex_shutdown_drv(adapter); in mwifiex_add_card()
1799 mwifiex_free_cmd_buffers(adapter); in mwifiex_add_card()
1802 if (adapter->irq_wakeup >= 0) in mwifiex_add_card()
1803 device_init_wakeup(adapter->dev, false); in mwifiex_add_card()
1804 mwifiex_free_adapter(adapter); in mwifiex_add_card()
1821 * - Free the adapter structure
1823 int mwifiex_remove_card(struct mwifiex_adapter *adapter) in mwifiex_remove_card() argument
1825 if (!adapter) in mwifiex_remove_card()
1828 if (adapter->is_up) in mwifiex_remove_card()
1829 mwifiex_uninit_sw(adapter); in mwifiex_remove_card()
1831 if (adapter->irq_wakeup >= 0) in mwifiex_remove_card()
1832 device_init_wakeup(adapter->dev, false); in mwifiex_remove_card()
1835 mwifiex_dbg(adapter, INFO, in mwifiex_remove_card()
1837 if (adapter->if_ops.unregister_dev) in mwifiex_remove_card()
1838 adapter->if_ops.unregister_dev(adapter); in mwifiex_remove_card()
1839 /* Free adapter structure */ in mwifiex_remove_card()
1840 mwifiex_dbg(adapter, INFO, in mwifiex_remove_card()
1841 "info: free adapter\n"); in mwifiex_remove_card()
1842 mwifiex_free_adapter(adapter); in mwifiex_remove_card()
1848 void _mwifiex_dbg(const struct mwifiex_adapter *adapter, int mask, in _mwifiex_dbg() argument
1854 if (!(adapter->debug_mask & mask)) in _mwifiex_dbg()
1862 if (adapter->dev) in _mwifiex_dbg()
1863 dev_info(adapter->dev, "%pV", &vaf); in _mwifiex_dbg()