rtl8188eu: Fix compilation for kernels older that 2.6.36

These changes will apply at least back to 2.6.32.

From: Stas Sergeev <stsp@list.ru>
Signed-off-by: Stas Sergeev <stsp@list.ru>
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
This commit is contained in:
Larry Finger 2014-02-12 11:05:30 -06:00
parent d577d378e6
commit c2741d0bec
6 changed files with 24 additions and 2 deletions

View file

@ -20,6 +20,7 @@
#define _RTW_MLME_C_
#include <linux/version.h>
#include <osdep_service.h>
#include <drv_types.h>
#include <recv_osdep.h>
@ -1680,7 +1681,11 @@ void rtw_dynamic_check_timer_handlder(struct adapter *adapter)
rcu_read_lock();
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,36)
if (rcu_dereference(adapter->pnetdev->rx_handler_data) &&
#else
if (rcu_dereference(adapter->pnetdev->br_port) &&
#endif
(check_fwstate(pmlmepriv, WIFI_STATION_STATE|WIFI_ADHOC_STATE) == true)) {
/* expire NAT2.5 entry */
nat25_db_expire(adapter);

View file

@ -1760,7 +1760,11 @@ static int rtw_br_client_tx(struct adapter *padapter, struct sk_buff **pskb)
void *br_port = NULL;
rcu_read_lock();
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,36)
br_port = rcu_dereference(padapter->pnetdev->rx_handler_data);
#else
br_port = rcu_dereference(padapter->pnetdev->br_port);
#endif
rcu_read_unlock();
_enter_critical_bh(&padapter->br_ext_lock, &irql);
if (!(skb->data[0] & 1) && br_port &&
@ -1947,7 +1951,11 @@ s32 rtw_xmit(struct adapter *padapter, struct sk_buff **ppkt)
}
rcu_read_lock();
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,36)
br_port = rcu_dereference(padapter->pnetdev->rx_handler_data);
#else
br_port = rcu_dereference(padapter->pnetdev->br_port);
#endif
rcu_read_unlock();
if (br_port && check_fwstate(pmlmepriv, WIFI_STATION_STATE|WIFI_ADHOC_STATE)) {

View file

@ -39,7 +39,7 @@
#include <linux/circ_buf.h>
#include <linux/uaccess.h>
#include <asm/byteorder.h>
#include <linux/atomic.h>
#include <asm/atomic.h>
#include <linux/io.h>
#include <linux/semaphore.h>
#include <linux/sem.h>

View file

@ -28,7 +28,7 @@
#include <linux/semaphore.h>
#include <linux/list.h>
#include <linux/spinlock.h>
#include <linux/atomic.h>
#include <asm/atomic.h>
#include <linux/usb.h>
#include <linux/usb/ch9.h>

View file

@ -19,6 +19,7 @@
******************************************************************************/
#define _OS_INTFS_C_
#include <linux/version.h>
#include <osdep_service.h>
#include <drv_types.h>
#include <xmit_osdep.h>
@ -1025,7 +1026,11 @@ void netdev_br_init(struct net_device *netdev)
rcu_read_lock();
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,36)
if (rcu_dereference(adapter->pnetdev->rx_handler_data)) {
#else
if (rcu_dereference(adapter->pnetdev->br_port)) {
#endif
struct net_device *br_netdev;
struct net *devnet = NULL;

View file

@ -197,7 +197,11 @@ _func_enter_;
}
rcu_read_lock();
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,36)
rcu_dereference(padapter->pnetdev->rx_handler_data);
#else
rcu_dereference(padapter->pnetdev->br_port);
#endif
rcu_read_unlock();
skb->ip_summed = CHECKSUM_NONE;