From: Sachin Kamat Date: Tue, 27 May 2014 10:32:46 +0000 (+0530) Subject: staging: rtl8821ae: trx.c: Remove version specific code X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=e7f5a2194255bf2a742e3986c9d89dde07f2ec35;p=linux-beck.git staging: rtl8821ae: trx.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/rtl8821ae/trx.c b/drivers/staging/rtl8821ae/rtl8821ae/trx.c index f40a93c0d2bb..b4943e8b7f80 100644 --- a/drivers/staging/rtl8821ae/rtl8821ae/trx.c +++ b/drivers/staging/rtl8821ae/rtl8821ae/trx.c @@ -77,11 +77,7 @@ static int _rtl8821ae_rate_mapping(struct ieee80211_hw *hw, int rate_idx; if (false == isht) { -#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,10,0)) if (IEEE80211_BAND_2GHZ == hw->conf.chandef.chan->band) { -#else - if (IEEE80211_BAND_2GHZ == hw->conf.channel->band) { -#endif switch (desc_rate) { case DESC_RATE1M: rate_idx = 0; @@ -579,13 +575,8 @@ bool rtl8821ae_rx_query_desc(struct ieee80211_hw *hw, if (status->wake_match) RT_TRACE(COMP_RXDESC,DBG_LOUD, ("GGGGGGGGGGGGGet Wakeup Packet!! WakeMatch=%d\n",status->wake_match )); -#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 hdr = (struct ieee80211_hdr *)(skb->data + status->rx_drvinfo_size + status->rx_bufshift); @@ -650,33 +641,17 @@ bool rtl8821ae_rx_query_desc(struct ieee80211_hw *hw, return true; } -/**/ -#if (LINUX_VERSION_CODE < KERNEL_VERSION(3,7,0)) -void rtl8821ae_tx_fill_desc(struct ieee80211_hw *hw, - struct ieee80211_hdr *hdr, u8 *pdesc_tx, u8 *txbd, - struct ieee80211_tx_info *info, struct sk_buff *skb, - u8 hw_queue, struct rtl_tcb_desc *ptcb_desc) -#else -/**/ void rtl8821ae_tx_fill_desc(struct ieee80211_hw *hw, struct ieee80211_hdr *hdr, u8 *pdesc_tx, u8 *txbd, struct ieee80211_tx_info *info, struct ieee80211_sta *sta, struct sk_buff *skb, u8 hw_queue, struct rtl_tcb_desc *ptcb_desc) -/**/ -#endif -/**/ { struct rtl_priv *rtlpriv = rtl_priv(hw); struct rtl_mac *mac = rtl_mac(rtl_priv(hw)); struct rtl_pci *rtlpci = rtl_pcidev(rtl_pcipriv(hw)); struct rtl_hal *rtlhal = rtl_hal(rtlpriv); -/**/ -#if (LINUX_VERSION_CODE < KERNEL_VERSION(3,7,0)) - struct ieee80211_sta *sta = info->control.sta; -#endif -/**/ u8 *pdesc = (u8 *) pdesc_tx; u16 seq_number; u16 fc = le16_to_cpu(hdr->frame_control); @@ -783,9 +758,6 @@ void rtl8821ae_tx_fill_desc(struct ieee80211_hw *hw, } if (info->control.hw_key) { struct ieee80211_key_conf *keyconf = info->control.hw_key; -/**/ -#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,37)) -/**/ switch (keyconf->cipher) { case WLAN_CIPHER_SUITE_WEP40: case WLAN_CIPHER_SUITE_WEP104: @@ -800,23 +772,6 @@ void rtl8821ae_tx_fill_desc(struct ieee80211_hw *hw, break; } -/**/ -#else - switch (keyconf->alg) { - case ALG_WEP: - case ALG_TKIP: - SET_TX_DESC_SEC_TYPE(pdesc, 0x1); - break; - case ALG_CCMP: - SET_TX_DESC_SEC_TYPE(pdesc, 0x3); - break; - default: - SET_TX_DESC_SEC_TYPE(pdesc, 0x0); - break; - - } -#endif -/**/ } SET_TX_DESC_QUEUE_SEL(pdesc, fw_qsel);