61 if (adapter->
if_ops.init_if)
62 if (adapter->
if_ops.init_if(adapter))
71 if (!adapter->
priv[i])
86 dev_dbg(adapter->
dev,
"info: leave mwifiex_register with error\n");
88 for (i = 0; i < adapter->
priv_num; i++)
113 for (i = 0; i < adapter->
priv_num; i++) {
114 if (adapter->
priv[i]) {
165 if (adapter->
if_ops.process_int_status)
166 adapter->
if_ops.process_int_status(adapter);
176 adapter->
if_ops.wakeup(adapter);
295 pr_err(
"%s: adapter is NULL\n", __func__);
299 mwifiex_unregister(adapter);
300 pr_debug(
"info: %s: free adapter\n", __func__);
320 "Failed to get firmware %s\n", adapter->
fw_name);
330 ret = adapter->
if_ops.dnld_fw(adapter, &
fw);
336 dev_notice(adapter->
dev,
"WLAN FW is active\n");
354 dev_err(adapter->
dev,
"cannot register with cfg80211\n");
362 dev_err(adapter->
dev,
"cannot create default STA interface\n");
369 dev_err(adapter->
dev,
"cannot create default AP interface\n");
376 dev_err(adapter->
dev,
"cannot create default P2P interface\n");
382 dev_notice(adapter->
dev,
"driver_version = %s\n", fmt);
389 pr_debug(
"info: %s: unregister device\n", __func__);
390 adapter->
if_ops.unregister_dev(adapter);
404 init_completion(&adapter->
fw_load);
410 "request_firmware_nowait() returned error %d\n", ret);
434 pr_debug(
"data: packet type ETH_P_IP: %04x, tid=%#x prio=%#x\n",
443 #define IPTOS_OFFSET 5
454 skb->
tstamp = timeval_to_ktime(tv);
465 netif_tx_start_all_queues(dev);
486 if (priv->
adapter->scan_delay_cnt)
509 dev_dbg(priv->
adapter->dev,
"data: %lu BSS(%d-%d): Data <= kernel\n",
512 if (priv->
adapter->surprise_removed) {
514 priv->
stats.tx_dropped++;
520 priv->
stats.tx_dropped++;
525 "data: Tx: insufficient skb headroom %d\n",
533 priv->
stats.tx_dropped++;
542 tx_info = MWIFIEX_SKB_TXCB(skb);
545 mwifiex_fill_buffer(skb);
572 "set mac address failed: ret=%d\n", ret);
582 static void mwifiex_set_multicast_list(
struct net_device *dev)
595 mcast_list.num_multicast_addr =
609 dev_err(priv->
adapter->dev,
"%lu : Tx timeout, bss_type-num = %d-%d\n",
627 .ndo_open = mwifiex_open,
628 .ndo_stop = mwifiex_close,
629 .ndo_start_xmit = mwifiex_hard_start_xmit,
630 .ndo_set_mac_address = mwifiex_set_mac_address,
631 .ndo_tx_timeout = mwifiex_tx_timeout,
632 .ndo_get_stats = mwifiex_get_stats,
633 .ndo_set_rx_mode = mwifiex_set_multicast_list,
679 int is_cmd_pend_q_empty;
685 return !is_cmd_pend_q_empty;
738 if (mwifiex_register(card, if_ops, (
void **)&adapter)) {
739 pr_err(
"%s: software init failed\n", __func__);
764 if (adapter->
if_ops.register_dev(adapter)) {
765 pr_err(
"%s: failed to register mwifiex device\n", __func__);
766 goto err_registerdev;
769 if (mwifiex_init_hw_fw(adapter)) {
770 pr_err(
"%s: firmware init failed\n", __func__);
778 pr_debug(
"info: %s: unregister device\n", __func__);
779 if (adapter->
if_ops.unregister_dev)
780 adapter->
if_ops.unregister_dev(adapter);
783 mwifiex_terminate_workqueue(adapter);
787 pr_debug(
"info: %s: shutdown mwifiex\n", __func__);
795 mwifiex_free_adapter(adapter);
830 for (i = 0; i < adapter->
priv_num; i++) {
831 priv = adapter->
priv[
i];
832 if (priv && priv->
netdev) {
833 if (!netif_queue_stopped(priv->
netdev))
836 if (netif_carrier_ok(priv->
netdev))
841 dev_dbg(adapter->
dev,
"cmd: calling mwifiex_shutdown_drv...\n");
847 dev_dbg(adapter->
dev,
"cmd: mwifiex_shutdown_drv done\n");
851 dev_err(adapter->
dev,
"rx_pending=%d, tx_pending=%d, "
858 for (i = 0; i < adapter->
priv_num; i++) {
859 priv = adapter->
priv[
i];
870 priv = adapter->
priv[0];
871 if (!priv || !priv->
wdev)
877 for (i = 0; i < adapter->
priv_num; i++) {
878 priv = adapter->
priv[
i];
883 mwifiex_terminate_workqueue(adapter);
886 dev_dbg(adapter->
dev,
"info: unregister device\n");
887 if (adapter->
if_ops.unregister_dev)
888 adapter->
if_ops.unregister_dev(adapter);
890 dev_dbg(adapter->
dev,
"info: free adapter\n");
891 mwifiex_free_adapter(adapter);
906 mwifiex_init_module(
void)
908 #ifdef CONFIG_DEBUG_FS
920 mwifiex_cleanup_module(
void)
922 #ifdef CONFIG_DEBUG_FS