From: Sachin Kamat Date: Tue, 27 May 2014 10:32:33 +0000 (+0530) Subject: staging: rtl8821ae: base.c: Remove version specific code X-Git-Tag: firefly_0821_release~176^2~3465^2~39^2~134 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=8b292b00070f124b2b60735e9e603649e20772d6;p=firefly-linux-kernel-4.4.55.git staging: rtl8821ae: base.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/base.c b/drivers/staging/rtl8821ae/base.c index 49ee311ddcd9..4a36da06c01c 100644 --- a/drivers/staging/rtl8821ae/base.c +++ b/drivers/staging/rtl8821ae/base.c @@ -320,9 +320,6 @@ static void _rtl_init_mac80211(struct ieee80211_hw *hw) /* <5> set hw caps */ hw->flags = IEEE80211_HW_SIGNAL_DBM | IEEE80211_HW_RX_INCLUDES_FCS | -#if (LINUX_VERSION_CODE < KERNEL_VERSION(3, 4, 0)) - IEEE80211_HW_BEACON_FILTER | -#endif IEEE80211_HW_AMPDU_AGGREGATION | IEEE80211_HW_REPORTS_TX_ACK_STATUS | IEEE80211_HW_CONNECTION_MONITOR | @@ -335,8 +332,6 @@ static void _rtl_init_mac80211(struct ieee80211_hw *hw) IEEE80211_HW_PS_NULLFUNC_STACK | /* IEEE80211_HW_SUPPORTS_DYNAMIC_PS | */ 0; -/**/ -#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 37)) hw->wiphy->interface_modes = BIT(NL80211_IFTYPE_AP) | BIT(NL80211_IFTYPE_STATION) | @@ -344,23 +339,10 @@ static void _rtl_init_mac80211(struct ieee80211_hw *hw) BIT(NL80211_IFTYPE_MESH_POINT) | BIT(NL80211_IFTYPE_P2P_CLIENT) | BIT(NL80211_IFTYPE_P2P_GO); -#else -/**/ - hw->wiphy->interface_modes = - BIT(NL80211_IFTYPE_AP) | - BIT(NL80211_IFTYPE_STATION) | - BIT(NL80211_IFTYPE_ADHOC) | - BIT(NL80211_IFTYPE_MESH_POINT) ; -/**/ -#endif -/**/ -#if (LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 39)) + hw->wiphy->flags |= WIPHY_FLAG_IBSS_RSN; -#endif -#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 3, 0)) hw->wiphy->flags |= WIPHY_FLAG_HAS_REMAIN_ON_CHANNEL; -#endif hw->wiphy->rts_threshold = 2347; @@ -401,16 +383,8 @@ static int _rtl_init_deferred_work(struct ieee80211_hw *hw) rtl_easy_concurrent_retrytimer_callback, (unsigned long)hw); /* <2> work queue */ rtlpriv->works.hw = hw; -/**/ -#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 37)) -/**/ rtlpriv->works.rtl_wq = alloc_workqueue("%s", 0, 0, rtlpriv->cfg->name); -/**/ -#else - rtlpriv->works.rtl_wq = create_workqueue(rtlpriv->cfg->name); -#endif -/**/ if (!rtlpriv->works.rtl_wq) return -ENOMEM; @@ -901,13 +875,8 @@ bool rtl_action_proc(struct ieee80211_hw *hw, struct sk_buff *skb, u8 is_tx) hdr->addr3, tid); if (skb_delba) { -#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 10, 0)) rx_status.freq = hw->conf.chandef.chan->center_freq; rx_status.band = hw->conf.chandef.chan->band; -#else - rx_status.freq = hw->conf.channel->center_freq; - rx_status.band = hw->conf.channel->band; -#endif rx_status.flag |= RX_FLAG_DECRYPTED; rx_status.flag |= RX_FLAG_MACTIME_MPDU; rx_status.rate_idx = 0; @@ -1482,21 +1451,8 @@ int rtl_send_smps_action(struct ieee80211_hw *hw, /* rtlpriv->cfg->ops->update_rate_tbl(hw, sta, 0); */ info->control.rates[0].idx = 0; -#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 10, 0)) info->band = hw->conf.chandef.chan->band; -#else - info->band = hw->conf.channel->band; -#endif -/**/ -#if (LINUX_VERSION_CODE < KERNEL_VERSION(3, 7, 0)) - info->control.sta = sta; - rtlpriv->intf_ops->adapter_tx(hw, skb, &tcb_desc); -#else -/**/ rtlpriv->intf_ops->adapter_tx(hw, sta, skb, &tcb_desc); -/**/ -#endif -/**/ } return 1;