mirror of
https://github.com/aircrack-ng/rtl8812au.git
synced 2024-11-23 05:44:40 +00:00
Fix API change in kernel v4.15
In this kernel, the timer setup and handlers changed quite a bit.
This commit is contained in:
parent
2e1e972bf5
commit
62b52f686b
@ -73,7 +73,6 @@ int rtw_os_alloc_recvframe(_adapter *padapter, union recv_frame *precvframe, u8
|
||||
return res;
|
||||
}
|
||||
|
||||
|
||||
/* Modified by Albert 20101213 */
|
||||
/* For 8 bytes IP header alignment. */
|
||||
shift_sz = pattrib->qos ? 6 : 0; /* Qos data, wireless lan header length is 26 */
|
||||
@ -398,7 +397,6 @@ void rtw_os_recv_indicate_pkt(_adapter *padapter, _pkt *pkt, struct rx_pkt_attri
|
||||
rcu_read_unlock();
|
||||
#endif /* (LINUX_VERSION_CODE <= KERNEL_VERSION(2, 6, 35)) */
|
||||
|
||||
|
||||
if (br_port && (check_fwstate(pmlmepriv, WIFI_STATION_STATE | WIFI_ADHOC_STATE) == _TRUE)) {
|
||||
int nat25_handle_frame(_adapter *priv, struct sk_buff *skb);
|
||||
if (nat25_handle_frame(padapter, pkt) == -1) {
|
||||
@ -511,7 +509,6 @@ void rtw_hostapd_mlme_rx(_adapter *padapter, union recv_frame *precv_frame)
|
||||
struct hostapd_priv *phostapdpriv = padapter->phostapdpriv;
|
||||
struct net_device *pmgnt_netdev = phostapdpriv->pmgnt_netdev;
|
||||
|
||||
|
||||
skb = precv_frame->u.hdr.pkt;
|
||||
|
||||
if (skb == NULL)
|
||||
@ -667,7 +664,6 @@ int rtw_recv_indicatepkt(_adapter *padapter, union recv_frame *precv_frame)
|
||||
goto _recv_indicatepkt_drop;
|
||||
}
|
||||
|
||||
|
||||
skb->data = precv_frame->u.hdr.rx_data;
|
||||
|
||||
skb_set_tail_pointer(skb, precv_frame->u.hdr.len);
|
||||
@ -750,8 +746,6 @@ _recv_indicatepkt_end:
|
||||
|
||||
rtw_free_recvframe(precv_frame, pfree_recv_queue);
|
||||
|
||||
|
||||
|
||||
return _SUCCESS;
|
||||
|
||||
_recv_indicatepkt_drop:
|
||||
@ -789,10 +783,18 @@ void rtw_os_read_port(_adapter *padapter, struct recv_buf *precvbuf)
|
||||
#endif
|
||||
|
||||
}
|
||||
void _rtw_reordering_ctrl_timeout_handler(void *FunctionContext);
|
||||
|
||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 15, 0)
|
||||
void _rtw_reordering_ctrl_timeout_handler(struct timer_list *t)
|
||||
#else
|
||||
void _rtw_reordering_ctrl_timeout_handler(void *FunctionContext)
|
||||
#endif
|
||||
{
|
||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 15, 0)
|
||||
struct recv_reorder_ctrl *preorder_ctrl = from_timer(preorder_ctrl, t, reordering_ctrl_timer);
|
||||
#else
|
||||
struct recv_reorder_ctrl *preorder_ctrl = (struct recv_reorder_ctrl *)FunctionContext;
|
||||
#endif
|
||||
rtw_reordering_ctrl_timeout_handler(preorder_ctrl);
|
||||
}
|
||||
|
||||
@ -800,6 +802,9 @@ void rtw_init_recv_timer(struct recv_reorder_ctrl *preorder_ctrl)
|
||||
{
|
||||
_adapter *padapter = preorder_ctrl->padapter;
|
||||
|
||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 15, 0)
|
||||
timer_setup(&preorder_ctrl->reordering_ctrl_timer, _rtw_reordering_ctrl_timeout_handler, 0);
|
||||
#else
|
||||
_init_timer(&(preorder_ctrl->reordering_ctrl_timer), padapter->pnetdev, _rtw_reordering_ctrl_timeout_handler, preorder_ctrl);
|
||||
|
||||
#endif
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user