rtl8723ds: Update source for recent API changes

The source will now compile on kernels up to 4.20.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
This commit is contained in:
Larry Finger
2018-11-29 11:43:26 -06:00
parent 5949fdf1cc
commit 3030a734d7
19 changed files with 410 additions and 86 deletions

View File

@@ -867,10 +867,17 @@ 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);
}
@@ -878,6 +885,9 @@ void rtw_init_recv_timer(struct recv_reorder_ctrl *preorder_ctrl)
{
_adapter *padapter = preorder_ctrl->padapter;
_init_timer(&(preorder_ctrl->reordering_ctrl_timer), padapter->pnetdev, _rtw_reordering_ctrl_timeout_handler, preorder_ctrl);
#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
}