43 dev_err(adapter->
dev,
"%s: failed to alloc bss_prio\n",
49 INIT_LIST_HEAD(&bss_prio->
list);
60 static void scan_delay_timer_fn(
unsigned long data)
88 "info: %s: scan aborted\n", __func__);
222 (
unsigned long)priv);
224 return mwifiex_add_bss_prio_tbl(priv);
242 dev_err(adapter->
dev,
"%s: failed to alloc cmd buffer\n",
252 dev_err(adapter->
dev,
"%s: failed to alloc sleep cfm"
253 " cmd buffer\n", __func__);
343 sleep_cfm_buf->
size =
345 sleep_cfm_buf->
result = 0;
378 netdev_get_tx_queue(dev, i)->trans_start =
jiffies;
389 unsigned long dev_queue_flags;
392 netif_tx_wake_all_queues(netdev);
393 spin_unlock_irqrestore(&adapter->
queue_lock, dev_queue_flags);
402 unsigned long dev_queue_flags;
405 netif_tx_stop_all_queues(netdev);
406 spin_unlock_irqrestore(&adapter->
queue_lock, dev_queue_flags);
423 for (i = 0; i < adapter->
priv_num; i++)
426 for (i = 0; i < adapter->
priv_num; i++) {
427 if (adapter->
priv[i]) {
428 priv = adapter->
priv[
i];
452 pr_err(
"%s: adapter is NULL\n", __func__);
459 mwifiex_free_lock_list(adapter);
462 dev_dbg(adapter->
dev,
"info: free cmd buffer\n");
467 dev_dbg(adapter->
dev,
"info: free scan table\n");
469 if (adapter->
if_ops.cleanup_if)
470 adapter->
if_ops.cleanup_if(adapter);
490 for (i = 0; i < adapter->
priv_num; i++) {
491 if (adapter->
priv[i]) {
492 priv = adapter->
priv[
i];
513 for (i = 0; i < adapter->
priv_num; ++
i) {
514 INIT_LIST_HEAD(&adapter->
bss_prio_tbl[i].bss_prio_head);
519 for (i = 0; i < adapter->
priv_num; i++) {
520 if (!adapter->
priv[i])
522 priv = adapter->
priv[
i];
524 INIT_LIST_HEAD(&priv->
wmm.tid_tbl_ptr[j].ra_list);
553 u8 i, first_sta =
true;
554 int is_cmd_pend_q_empty;
560 ret = mwifiex_allocate_adapter(adapter);
565 mwifiex_init_adapter(adapter);
567 for (i = 0; i < adapter->
priv_num; i++) {
568 if (adapter->
priv[i]) {
569 priv = adapter->
priv[
i];
577 for (i = 0; i < adapter->
priv_num; i++) {
578 if (adapter->
priv[i]) {
590 if (!is_cmd_pend_q_empty) {
616 for (i = 0; i < adapter->
priv_num; ++
i) {
620 dev_dbg(adapter->
dev,
"info: delete BSS priority table,"
621 " bss_type = %d, bss_num = %d, i = %d,"
622 " head = %p, cur = %p\n",
626 if (list_empty(head)) {
627 spin_unlock_irqrestore(lock, flags);
632 spin_unlock_irqrestore(lock, flags);
636 if (bssprio_node->
priv == priv) {
638 "node %p, next = %p\n",
639 bssprio_node, tmp_node);
642 spin_unlock_irqrestore(lock, flags);
658 mwifiex_delete_bss_prio_tbl(priv);
689 dev_warn(adapter->
dev,
"main process is still running\n");
694 dev_dbg(adapter->
dev,
"info: shutdown mwifiex...\n");
697 for (i = 0; i < adapter->
priv_num; i++) {
698 if (adapter->
priv[i]) {
699 priv = adapter->
priv[
i];
702 mwifiex_delete_bss_prio_tbl(priv);
708 if (adapter->
if_ops.data_complete) {
714 priv->
stats.rx_dropped++;
716 adapter->
if_ops.data_complete(adapter, skb);
721 mwifiex_free_adapter(adapter);
749 if (adapter->
if_ops.check_fw_status) {
753 ret = adapter->
if_ops.check_fw_status(adapter, poll_num);
755 dev_notice(adapter->
dev,
756 "WLAN FW already running! Skip FW dnld\n");
764 dev_notice(adapter->
dev,
765 "FW already running! Skip FW dnld\n");
773 ret = adapter->
if_ops.prog_fw(adapter, pmfw);
775 dev_err(adapter->
dev,
"prog_fw failed ret=%#x\n", ret);
782 ret = adapter->
if_ops.check_fw_status(adapter, poll_num);
784 dev_err(adapter->
dev,
"FW failed to be active in time\n");
789 if (adapter->
if_ops.enable_int)
790 adapter->
if_ops.enable_int(adapter);