From: Sachin Kamat Date: Tue, 27 May 2014 10:32:41 +0000 (+0530) Subject: staging: rtl8821ae: ps.c: Remove version specific code X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=35722b4141f9d504ec0fb287d80dd1b7f06ce87c;p=GitHub%2FLineageOS%2FG12%2Fandroid_kernel_amlogic_linux-4.9.git staging: rtl8821ae: ps.c: Remove version specific code The code should be for the current kernel version. Remove conditional version based code. Signed-off-by: Sachin Kamat Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/rtl8821ae/ps.c b/drivers/staging/rtl8821ae/ps.c index 7876442417f4..5a9bbf025e25 100644 --- a/drivers/staging/rtl8821ae/ps.c +++ b/drivers/staging/rtl8821ae/ps.c @@ -30,9 +30,7 @@ #include "wifi.h" #include "base.h" #include "ps.h" -#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,2,0)) #include -#endif #include "btcoexist/rtl_btc.h" bool rtl_ps_enable_nic(struct ieee80211_hw *hw) @@ -542,17 +540,8 @@ void rtl_swlps_beacon(struct ieee80211_hw *hw, void *data, unsigned int len) tim_len = tim[1]; tim_ie = (struct ieee80211_tim_ie *) &tim[2]; -/**/ -#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,35)) -/**/ if (!WARN_ON_ONCE(!hw->conf.ps_dtim_period)) rtlpriv->psc.dtim_counter = tim_ie->dtim_count; -/**/ -#else - if (!WARN_ON_ONCE(!mac->vif->bss_conf.dtim_period)) - rtlpriv->psc.dtim_counter = tim_ie->dtim_count; -#endif -/**/ /* Check whenever the PHY can be turned off again. */ @@ -656,9 +645,6 @@ void rtl_swlps_rf_sleep(struct ieee80211_hw *hw) * time to sleep_intv = rtlpriv->psc.dtim_counter or * MAX_SW_LPS_SLEEP_INTV(default set to 5) */ -/**/ -#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,35)) -/**/ if (rtlpriv->psc.dtim_counter == 0) { if (hw->conf.ps_dtim_period == 1) sleep_intv = hw->conf.ps_dtim_period * 2; @@ -667,18 +653,6 @@ void rtl_swlps_rf_sleep(struct ieee80211_hw *hw) } else { sleep_intv = rtlpriv->psc.dtim_counter; } -/**/ -#else - if (rtlpriv->psc.dtim_counter == 0) { - if (mac->vif->bss_conf.dtim_period == 1) - sleep_intv = mac->vif->bss_conf.dtim_period * 2; - else - sleep_intv = mac->vif->bss_conf.dtim_period; - } else { - sleep_intv = rtlpriv->psc.dtim_counter; - } -#endif -/**/ if (sleep_intv > MAX_SW_LPS_SLEEP_INTV) sleep_intv = MAX_SW_LPS_SLEEP_INTV;