staging: rtl8188eu: Remove pbuddy_adapter from struct adapter
authornavin patidar <navin.patidar@gmail.com>
Sun, 1 Jun 2014 12:16:49 +0000 (17:46 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 19 Jun 2014 22:30:03 +0000 (15:30 -0700)
Signed-off-by: navin patidar <navin.patidar@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/rtl8188eu/core/rtw_pwrctrl.c
drivers/staging/rtl8188eu/include/drv_types.h
drivers/staging/rtl8188eu/os_dep/os_intfs.c

index 739e250416922eef63cdd5d996656b047a5cb811..b8d66fa9e9337f38e64eb99fd4ba4c8bf5f5386b 100644 (file)
@@ -114,7 +114,6 @@ int ips_leave(struct adapter *padapter)
 
 static bool rtw_pwr_unassociated_idle(struct adapter *adapter)
 {
-       struct adapter *buddy = adapter->pbuddy_adapter;
        struct mlme_priv *pmlmepriv = &(adapter->mlmepriv);
 #ifdef CONFIG_88EU_P2P
        struct wifidirect_info  *pwdinfo = &(adapter->wdinfo);
@@ -136,24 +135,6 @@ static bool rtw_pwr_unassociated_idle(struct adapter *adapter)
 #endif
                goto exit;
 
-       /* consider buddy, if exist */
-       if (buddy) {
-               struct mlme_priv *b_pmlmepriv = &(buddy->mlmepriv);
-               #ifdef CONFIG_88EU_P2P
-               struct wifidirect_info *b_pwdinfo = &(buddy->wdinfo);
-               #endif
-
-               if (check_fwstate(b_pmlmepriv, WIFI_ASOC_STATE|WIFI_SITE_MONITOR) ||
-                   check_fwstate(b_pmlmepriv, WIFI_UNDER_LINKING|WIFI_UNDER_WPS) ||
-                   check_fwstate(b_pmlmepriv, WIFI_AP_STATE) ||
-                   check_fwstate(b_pmlmepriv, WIFI_ADHOC_MASTER_STATE|WIFI_ADHOC_STATE) ||
-#if defined(CONFIG_88EU_P2P)
-                   !rtw_p2p_chk_state(b_pwdinfo, P2P_STATE_NONE))
-#else
-                   0)
-#endif
-                       goto exit;
-       }
        ret = true;
 
 exit:
index ec9ad4a89d27ca69b7baabbe16a68bdab6b39bbf..1676bb4970426307231750fb47e2569aa3263419 100644 (file)
@@ -254,7 +254,6 @@ struct adapter {
         * upper application reads it. */
        u8 bShowGetP2PState;
 #endif
-       struct adapter *pbuddy_adapter;
 
        struct mutex hw_init_mutex;
 
index c9906e3428884cd28e548fd0c2b3ad32d77f9faa..2df27c71c5dff785a8d9b0777d484799f549073d 100644 (file)
@@ -993,10 +993,6 @@ u8 rtw_free_drv_sw(struct adapter *padapter)
                padapter->rereg_nd_name_priv.old_pnetdev = NULL;
        }
 
-       /*  clear pbuddystruct adapter to avoid access wrong pointer. */
-       if (padapter->pbuddy_adapter != NULL)
-               padapter->pbuddy_adapter->pbuddy_adapter = NULL;
-
        mutex_destroy(&padapter->hw_init_mutex);
 
        RT_TRACE(_module_os_intfs_c_, _drv_info_, ("-rtw_free_drv_sw\n"));