staging: rtl8188eu: Remove function nat25_db_cleanup()
authornavin patidar <navin.patidar@gmail.com>
Mon, 16 Jun 2014 16:05:40 +0000 (21:35 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 19 Jun 2014 22:37:17 +0000 (15:37 -0700)
We've removed the code which was responsible for building NAT table,
so no use of keeping nat_db_cleanup().

Signed-off-by: navin patidar <navin.patidar@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/rtl8188eu/core/rtw_br_ext.c
drivers/staging/rtl8188eu/core/rtw_cmd.c
drivers/staging/rtl8188eu/include/rtw_br_ext.h
drivers/staging/rtl8188eu/os_dep/os_intfs.c

index 86899125ea59f485e7bcbcc099e37cc986e956bd..b0b1af99e9c263cdd38df88d3c5717b859039cae 100644 (file)
@@ -247,32 +247,6 @@ static inline void __network_hash_unlink(struct nat25_network_db_entry *ent)
  *     NAT2.5 interface
  */
 
-void nat25_db_cleanup(struct adapter *priv)
-{
-       int i;
-
-       spin_lock_bh(&priv->br_ext_lock);
-
-       for (i = 0; i < NAT25_HASH_SIZE; i++) {
-               struct nat25_network_db_entry *f;
-               f = priv->nethash[i];
-               while (f != NULL) {
-                       struct nat25_network_db_entry *g;
-
-                       g = f->next_hash;
-                       if (priv->scdb_entry == f) {
-                               memset(priv->scdb_mac, 0, ETH_ALEN);
-                               memset(priv->scdb_ip, 0, 4);
-                               priv->scdb_entry = NULL;
-                       }
-                       __network_hash_unlink(f);
-                       kfree(f);
-                       f = g;
-               }
-       }
-       spin_unlock_bh(&priv->br_ext_lock);
-}
-
 void nat25_db_expire(struct adapter *priv)
 {
        int i;
index 25f1c36e59b09061380334d2f8b50d329231e41b..bb4c703c90e2ff79fcbadc9e268b92282a1576d3 100644 (file)
@@ -2059,8 +2059,7 @@ void rtw_disassoc_cmd_callback(struct adapter *padapter, struct cmd_obj *pcmd)
 
                RT_TRACE(_module_rtl871x_cmd_c_, _drv_err_, ("\n ***Error: disconnect_cmd_callback Fail ***\n."));
                return;
-       } else /* clear bridge database */
-               nat25_db_cleanup(padapter);
+       }
 
        /*  free cmd */
        rtw_free_cmd_obj(pcmd);
index f21e7a4515d0e914f224f41b442a5604df42ce3d..f0b2a204bb9c9ff9bc555aa03a1689b37d511f8b 100644 (file)
@@ -61,6 +61,4 @@ struct br_ext_info {
        unsigned int    nat25sc_disable;
 };
 
-void nat25_db_cleanup(struct adapter *priv);
-
 #endif /*  _RTW_BR_EXT_H_ */
index 34f73706e4853744bcab940ca66aa8a530b83d4b..43eaba09edb22cc06973f9ccb190d40ee1d12de7 100644 (file)
@@ -1228,8 +1228,6 @@ int netdev_close(struct net_device *pnetdev)
                rtw_led_control(padapter, LED_CTL_POWER_OFF);
        }
 
-       nat25_db_cleanup(padapter);
-
 #ifdef CONFIG_88EU_P2P
        rtw_p2p_enable(padapter, P2P_ROLE_DISABLE);
 #endif /* CONFIG_88EU_P2P */