]> git.proxmox.com Git - mirror_ubuntu-disco-kernel.git/commitdiff
mwifiex: remove unused tid_tbl_lock from mwifiex_tid_tbl
authorAndreas Fenkart <andreas.fenkart@streamunlimited.com>
Fri, 5 Apr 2013 03:03:51 +0000 (20:03 -0700)
committerJohn W. Linville <linville@tuxdriver.com>
Mon, 8 Apr 2013 19:28:39 +0000 (15:28 -0400)
ra_list_spinlock is used to protect struct mwifiex_wmm_desc and
embedded structures such as ra_list. tid_tbl_lock while more fine
grained, is not used but in one function. That function is not
called reentrantly. To protect ra_list from concurrent modification
ra_list_spinlock must be held.

Signed-off-by: Andreas Fenkart <andreas.fenkart@streamunlimited.com>
Signed-off-by: Avinash Patil <patila@marvell.com>
Signed-off-by: Bing Zhao <bzhao@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/wmm.c

index 003c014d2176acc3c00c579d46d2dd5d368022ad..42d7f0adf9bdf0f4b1ae8e0058211e44d331c34e 100644 (file)
@@ -533,10 +533,8 @@ int mwifiex_init_lock_list(struct mwifiex_adapter *adapter)
                if (!adapter->priv[i])
                        continue;
                priv = adapter->priv[i];
-               for (j = 0; j < MAX_NUM_TID; ++j) {
+               for (j = 0; j < MAX_NUM_TID; ++j)
                        INIT_LIST_HEAD(&priv->wmm.tid_tbl_ptr[j].ra_list);
-                       spin_lock_init(&priv->wmm.tid_tbl_ptr[j].tid_tbl_lock);
-               }
                INIT_LIST_HEAD(&priv->tx_ba_stream_tbl_ptr);
                INIT_LIST_HEAD(&priv->rx_reorder_tbl_ptr);
                INIT_LIST_HEAD(&priv->sta_list);
index fef89fd6d77b8054c0160b47f1fe9b8db5175a5c..622b17f884f095238b3349513ac4d2f235c70e98 100644 (file)
@@ -213,8 +213,6 @@ struct mwifiex_ra_list_tbl {
 
 struct mwifiex_tid_tbl {
        struct list_head ra_list;
-       /* spin lock for tid table */
-       spinlock_t tid_tbl_lock;
        struct mwifiex_ra_list_tbl *ra_list_curr;
 };
 
index 1b039ba0d55b0bd6ffce48a3bf6a889047c7d39b..c1d848882fe2bf5ab08895ab92cca20f1391bbfb 100644 (file)
@@ -927,12 +927,12 @@ mwifiex_wmm_get_highest_priolist_ptr(struct mwifiex_adapter *adapter,
                                if (!tid_ptr->ra_list_curr)
                                        continue;
 
-                               spin_lock_irqsave(&tid_ptr->tid_tbl_lock,
-                                                 flags);
+                               spin_lock_irqsave(&priv_tmp->wmm.
+                                                 ra_list_spinlock, flags);
                                is_list_empty =
                                        list_empty(&tid_ptr->ra_list);
-                               spin_unlock_irqrestore(&tid_ptr->tid_tbl_lock,
-                                                      flags);
+                               spin_unlock_irqrestore(&priv_tmp->wmm.
+                                                      ra_list_spinlock, flags);
                                if (is_list_empty)
                                        continue;