mirror of
https://github.com/lwfinger/rtl8188eu.git
synced 2024-11-22 04:23:39 +00:00
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:
parent
d577d378e6
commit
c2741d0bec
6 changed files with 24 additions and 2 deletions
|
@ -20,6 +20,7 @@
|
||||||
#define _RTW_MLME_C_
|
#define _RTW_MLME_C_
|
||||||
|
|
||||||
|
|
||||||
|
#include <linux/version.h>
|
||||||
#include <osdep_service.h>
|
#include <osdep_service.h>
|
||||||
#include <drv_types.h>
|
#include <drv_types.h>
|
||||||
#include <recv_osdep.h>
|
#include <recv_osdep.h>
|
||||||
|
@ -1680,7 +1681,11 @@ void rtw_dynamic_check_timer_handlder(struct adapter *adapter)
|
||||||
|
|
||||||
rcu_read_lock();
|
rcu_read_lock();
|
||||||
|
|
||||||
|
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,36)
|
||||||
if (rcu_dereference(adapter->pnetdev->rx_handler_data) &&
|
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)) {
|
(check_fwstate(pmlmepriv, WIFI_STATION_STATE|WIFI_ADHOC_STATE) == true)) {
|
||||||
/* expire NAT2.5 entry */
|
/* expire NAT2.5 entry */
|
||||||
nat25_db_expire(adapter);
|
nat25_db_expire(adapter);
|
||||||
|
|
|
@ -1760,7 +1760,11 @@ static int rtw_br_client_tx(struct adapter *padapter, struct sk_buff **pskb)
|
||||||
void *br_port = NULL;
|
void *br_port = NULL;
|
||||||
|
|
||||||
rcu_read_lock();
|
rcu_read_lock();
|
||||||
|
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,36)
|
||||||
br_port = rcu_dereference(padapter->pnetdev->rx_handler_data);
|
br_port = rcu_dereference(padapter->pnetdev->rx_handler_data);
|
||||||
|
#else
|
||||||
|
br_port = rcu_dereference(padapter->pnetdev->br_port);
|
||||||
|
#endif
|
||||||
rcu_read_unlock();
|
rcu_read_unlock();
|
||||||
_enter_critical_bh(&padapter->br_ext_lock, &irql);
|
_enter_critical_bh(&padapter->br_ext_lock, &irql);
|
||||||
if (!(skb->data[0] & 1) && br_port &&
|
if (!(skb->data[0] & 1) && br_port &&
|
||||||
|
@ -1947,7 +1951,11 @@ s32 rtw_xmit(struct adapter *padapter, struct sk_buff **ppkt)
|
||||||
}
|
}
|
||||||
|
|
||||||
rcu_read_lock();
|
rcu_read_lock();
|
||||||
|
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,36)
|
||||||
br_port = rcu_dereference(padapter->pnetdev->rx_handler_data);
|
br_port = rcu_dereference(padapter->pnetdev->rx_handler_data);
|
||||||
|
#else
|
||||||
|
br_port = rcu_dereference(padapter->pnetdev->br_port);
|
||||||
|
#endif
|
||||||
rcu_read_unlock();
|
rcu_read_unlock();
|
||||||
|
|
||||||
if (br_port && check_fwstate(pmlmepriv, WIFI_STATION_STATE|WIFI_ADHOC_STATE)) {
|
if (br_port && check_fwstate(pmlmepriv, WIFI_STATION_STATE|WIFI_ADHOC_STATE)) {
|
||||||
|
|
|
@ -39,7 +39,7 @@
|
||||||
#include <linux/circ_buf.h>
|
#include <linux/circ_buf.h>
|
||||||
#include <linux/uaccess.h>
|
#include <linux/uaccess.h>
|
||||||
#include <asm/byteorder.h>
|
#include <asm/byteorder.h>
|
||||||
#include <linux/atomic.h>
|
#include <asm/atomic.h>
|
||||||
#include <linux/io.h>
|
#include <linux/io.h>
|
||||||
#include <linux/semaphore.h>
|
#include <linux/semaphore.h>
|
||||||
#include <linux/sem.h>
|
#include <linux/sem.h>
|
||||||
|
|
|
@ -28,7 +28,7 @@
|
||||||
#include <linux/semaphore.h>
|
#include <linux/semaphore.h>
|
||||||
#include <linux/list.h>
|
#include <linux/list.h>
|
||||||
#include <linux/spinlock.h>
|
#include <linux/spinlock.h>
|
||||||
#include <linux/atomic.h>
|
#include <asm/atomic.h>
|
||||||
|
|
||||||
#include <linux/usb.h>
|
#include <linux/usb.h>
|
||||||
#include <linux/usb/ch9.h>
|
#include <linux/usb/ch9.h>
|
||||||
|
|
|
@ -19,6 +19,7 @@
|
||||||
******************************************************************************/
|
******************************************************************************/
|
||||||
#define _OS_INTFS_C_
|
#define _OS_INTFS_C_
|
||||||
|
|
||||||
|
#include <linux/version.h>
|
||||||
#include <osdep_service.h>
|
#include <osdep_service.h>
|
||||||
#include <drv_types.h>
|
#include <drv_types.h>
|
||||||
#include <xmit_osdep.h>
|
#include <xmit_osdep.h>
|
||||||
|
@ -1025,7 +1026,11 @@ void netdev_br_init(struct net_device *netdev)
|
||||||
|
|
||||||
rcu_read_lock();
|
rcu_read_lock();
|
||||||
|
|
||||||
|
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,36)
|
||||||
if (rcu_dereference(adapter->pnetdev->rx_handler_data)) {
|
if (rcu_dereference(adapter->pnetdev->rx_handler_data)) {
|
||||||
|
#else
|
||||||
|
if (rcu_dereference(adapter->pnetdev->br_port)) {
|
||||||
|
#endif
|
||||||
struct net_device *br_netdev;
|
struct net_device *br_netdev;
|
||||||
struct net *devnet = NULL;
|
struct net *devnet = NULL;
|
||||||
|
|
||||||
|
|
|
@ -197,7 +197,11 @@ _func_enter_;
|
||||||
}
|
}
|
||||||
|
|
||||||
rcu_read_lock();
|
rcu_read_lock();
|
||||||
|
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,36)
|
||||||
rcu_dereference(padapter->pnetdev->rx_handler_data);
|
rcu_dereference(padapter->pnetdev->rx_handler_data);
|
||||||
|
#else
|
||||||
|
rcu_dereference(padapter->pnetdev->br_port);
|
||||||
|
#endif
|
||||||
rcu_read_unlock();
|
rcu_read_unlock();
|
||||||
|
|
||||||
skb->ip_summed = CHECKSUM_NONE;
|
skb->ip_summed = CHECKSUM_NONE;
|
||||||
|
|
Loading…
Reference in a new issue