mwifiex: remove unnecessary rx_q lock
authorAvinash Patil <patila@marvell.com>
Mon, 29 Sep 2014 16:14:15 +0000 (21:44 +0530)
committerJohn W. Linville <linville@tuxdriver.com>
Tue, 30 Sep 2014 17:17:46 +0000 (13:17 -0400)
SKB lists have their own lock. So this lock is not needed.

Signed-off-by: Avinash Patil <patila@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/mwifiex/init.c
drivers/net/wireless/mwifiex/main.h
drivers/net/wireless/mwifiex/pcie.c
drivers/net/wireless/mwifiex/sdio.c

index f7c97cf3840bfa582633906ddb4ac9187420b064..580aa45ec4bcfe9716a3271661e98d8fa1c7c82a 100644 (file)
@@ -447,7 +447,6 @@ int mwifiex_init_lock_list(struct mwifiex_adapter *adapter)
        spin_lock_init(&adapter->cmd_free_q_lock);
        spin_lock_init(&adapter->cmd_pending_q_lock);
        spin_lock_init(&adapter->scan_pending_q_lock);
-       spin_lock_init(&adapter->rx_q_lock);
        spin_lock_init(&adapter->rx_proc_lock);
 
        skb_queue_head_init(&adapter->usb_rx_data_q);
index 022486ed42f2db66bad03490d89a85714351fbd2..e2635747d9669c21f30f08780a2024c70af2245e 100644 (file)
@@ -764,8 +764,6 @@ struct mwifiex_adapter {
        struct list_head scan_pending_q;
        /* spin lock for scan_pending_q */
        spinlock_t scan_pending_q_lock;
-       /* spin lock for RX queue */
-       spinlock_t rx_q_lock;
        /* spin lock for RX processing routine */
        spinlock_t rx_proc_lock;
        struct sk_buff_head usb_rx_data_q;
index 74c0db97d79b32f29aa3ec897dd13fa1ef8d8294..c3a20f94f3c99f86fbbfdc6b23faba01b54ee5e5 100644 (file)
@@ -1237,7 +1237,6 @@ static int mwifiex_pcie_process_recv_data(struct mwifiex_adapter *adapter)
        struct sk_buff *skb_tmp = NULL;
        struct mwifiex_pcie_buf_desc *desc;
        struct mwifiex_pfu_buf_desc *desc2;
-       unsigned long flags;
 
        if (!mwifiex_pcie_ok_to_access_hw(adapter))
                mwifiex_pm_wakeup_card(adapter);
@@ -1289,10 +1288,7 @@ static int mwifiex_pcie_process_recv_data(struct mwifiex_adapter *adapter)
                                card->rxbd_rdptr, wrptr, rx_len);
                        skb_pull(skb_data, INTF_HEADER_LEN);
                        if (adapter->rx_work_enabled) {
-                               spin_lock_irqsave(&adapter->rx_q_lock, flags);
                                skb_queue_tail(&adapter->rx_data_q, skb_data);
-                               spin_unlock_irqrestore(&adapter->rx_q_lock,
-                                                      flags);
                                adapter->data_received = true;
                                atomic_inc(&adapter->rx_pending);
                        } else {
index ea8fc587e90ff5d7838179d0daa89eec1dac8cc3..db9e4e347e4cfb084a46b037ea53c2087667939d 100644 (file)
@@ -1039,7 +1039,6 @@ static int mwifiex_decode_rx_packet(struct mwifiex_adapter *adapter,
                                    struct sk_buff *skb, u32 upld_typ)
 {
        u8 *cmd_buf;
-       unsigned long flags;
        __le16 *curr_ptr = (__le16 *)skb->data;
        u16 pkt_len = le16_to_cpu(*curr_ptr);
 
@@ -1050,9 +1049,7 @@ static int mwifiex_decode_rx_packet(struct mwifiex_adapter *adapter,
        case MWIFIEX_TYPE_DATA:
                dev_dbg(adapter->dev, "info: --- Rx: Data packet ---\n");
                if (adapter->rx_work_enabled) {
-                       spin_lock_irqsave(&adapter->rx_q_lock, flags);
                        skb_queue_tail(&adapter->rx_data_q, skb);
-                       spin_unlock_irqrestore(&adapter->rx_q_lock, flags);
                        adapter->data_received = true;
                        atomic_inc(&adapter->rx_pending);
                } else {