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

@ -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)) {