| .. | .. |
|---|
| 1 | 1 | /* |
|---|
| 2 | | - * Marvell Wireless LAN device driver: utility functions |
|---|
| 2 | + * NXP Wireless LAN device driver: utility functions |
|---|
| 3 | 3 | * |
|---|
| 4 | | - * Copyright (C) 2011-2014, Marvell International Ltd. |
|---|
| 4 | + * Copyright 2011-2020 NXP |
|---|
| 5 | 5 | * |
|---|
| 6 | | - * This software file (the "File") is distributed by Marvell International |
|---|
| 7 | | - * Ltd. under the terms of the GNU General Public License Version 2, June 1991 |
|---|
| 6 | + * This software file (the "File") is distributed by NXP |
|---|
| 7 | + * under the terms of the GNU General Public License Version 2, June 1991 |
|---|
| 8 | 8 | * (the "License"). You may use, redistribute and/or modify this File in |
|---|
| 9 | 9 | * accordance with the terms and conditions of the License, a copy of which |
|---|
| 10 | 10 | * is available by writing to the Free Software Foundation, Inc., |
|---|
| .. | .. |
|---|
| 488 | 488 | (skb->truesize > MWIFIEX_RX_DATA_BUF_SIZE)) |
|---|
| 489 | 489 | skb->truesize += (skb->len - MWIFIEX_RX_DATA_BUF_SIZE); |
|---|
| 490 | 490 | |
|---|
| 491 | | - if (in_interrupt()) |
|---|
| 492 | | - netif_rx(skb); |
|---|
| 493 | | - else |
|---|
| 494 | | - netif_rx_ni(skb); |
|---|
| 495 | | - |
|---|
| 491 | + netif_rx_any_context(skb); |
|---|
| 496 | 492 | return 0; |
|---|
| 497 | 493 | } |
|---|
| 498 | 494 | |
|---|
| .. | .. |
|---|
| 607 | 603 | mwifiex_add_sta_entry(struct mwifiex_private *priv, const u8 *mac) |
|---|
| 608 | 604 | { |
|---|
| 609 | 605 | struct mwifiex_sta_node *node; |
|---|
| 610 | | - unsigned long flags; |
|---|
| 611 | 606 | |
|---|
| 612 | 607 | if (!mac) |
|---|
| 613 | 608 | return NULL; |
|---|
| 614 | 609 | |
|---|
| 615 | | - spin_lock_irqsave(&priv->sta_list_spinlock, flags); |
|---|
| 610 | + spin_lock_bh(&priv->sta_list_spinlock); |
|---|
| 616 | 611 | node = mwifiex_get_sta_entry(priv, mac); |
|---|
| 617 | 612 | if (node) |
|---|
| 618 | 613 | goto done; |
|---|
| .. | .. |
|---|
| 625 | 620 | list_add_tail(&node->list, &priv->sta_list); |
|---|
| 626 | 621 | |
|---|
| 627 | 622 | done: |
|---|
| 628 | | - spin_unlock_irqrestore(&priv->sta_list_spinlock, flags); |
|---|
| 623 | + spin_unlock_bh(&priv->sta_list_spinlock); |
|---|
| 629 | 624 | return node; |
|---|
| 630 | 625 | } |
|---|
| 631 | 626 | |
|---|
| .. | .. |
|---|
| 662 | 657 | void mwifiex_del_sta_entry(struct mwifiex_private *priv, const u8 *mac) |
|---|
| 663 | 658 | { |
|---|
| 664 | 659 | struct mwifiex_sta_node *node; |
|---|
| 665 | | - unsigned long flags; |
|---|
| 666 | 660 | |
|---|
| 667 | | - spin_lock_irqsave(&priv->sta_list_spinlock, flags); |
|---|
| 661 | + spin_lock_bh(&priv->sta_list_spinlock); |
|---|
| 668 | 662 | |
|---|
| 669 | 663 | node = mwifiex_get_sta_entry(priv, mac); |
|---|
| 670 | 664 | if (node) { |
|---|
| .. | .. |
|---|
| 672 | 666 | kfree(node); |
|---|
| 673 | 667 | } |
|---|
| 674 | 668 | |
|---|
| 675 | | - spin_unlock_irqrestore(&priv->sta_list_spinlock, flags); |
|---|
| 669 | + spin_unlock_bh(&priv->sta_list_spinlock); |
|---|
| 676 | 670 | return; |
|---|
| 677 | 671 | } |
|---|
| 678 | 672 | |
|---|
| .. | .. |
|---|
| 680 | 674 | void mwifiex_del_all_sta_list(struct mwifiex_private *priv) |
|---|
| 681 | 675 | { |
|---|
| 682 | 676 | struct mwifiex_sta_node *node, *tmp; |
|---|
| 683 | | - unsigned long flags; |
|---|
| 684 | 677 | |
|---|
| 685 | | - spin_lock_irqsave(&priv->sta_list_spinlock, flags); |
|---|
| 678 | + spin_lock_bh(&priv->sta_list_spinlock); |
|---|
| 686 | 679 | |
|---|
| 687 | 680 | list_for_each_entry_safe(node, tmp, &priv->sta_list, list) { |
|---|
| 688 | 681 | list_del(&node->list); |
|---|
| .. | .. |
|---|
| 690 | 683 | } |
|---|
| 691 | 684 | |
|---|
| 692 | 685 | INIT_LIST_HEAD(&priv->sta_list); |
|---|
| 693 | | - spin_unlock_irqrestore(&priv->sta_list_spinlock, flags); |
|---|
| 686 | + spin_unlock_bh(&priv->sta_list_spinlock); |
|---|
| 694 | 687 | return; |
|---|
| 695 | 688 | } |
|---|
| 696 | 689 | |
|---|