diff --git a/drivers/aic8800/aic8800_fdrv/aicwf_sdio.c b/drivers/aic8800/aic8800_fdrv/aicwf_sdio.c index e71035b..399a847 100644 --- a/drivers/aic8800/aic8800_fdrv/aicwf_sdio.c +++ b/drivers/aic8800/aic8800_fdrv/aicwf_sdio.c @@ -1000,6 +1000,8 @@ static void aicwf_sdio_bus_pwrctl(struct timer_list *t) { #if LINUX_VERSION_CODE < KERNEL_VERSION(4,14,0) struct aic_sdio_dev *sdiodev = (struct aic_sdio_dev *) data; +#elif LINUX_VERSION_CODE >= KERNEL_VERSION(6, 16, 0) + struct aic_sdio_dev *sdiodev = timer_container_of(sdiodev, t, timer); #else struct aic_sdio_dev *sdiodev = from_timer(sdiodev, t, timer); #endif diff --git a/drivers/aic8800/aic8800_fdrv/aicwf_usb.c b/drivers/aic8800/aic8800_fdrv/aicwf_usb.c index 9b0a739..19f1ada 100644 --- a/drivers/aic8800/aic8800_fdrv/aicwf_usb.c +++ b/drivers/aic8800/aic8800_fdrv/aicwf_usb.c @@ -2658,6 +2658,7 @@ static struct usb_device_id aicwf_usb_id_table[] = { {USB_DEVICE(USB_VENDOR_ID_TENDA, USB_PRODUCT_ID_TENDA_U2)}, {USB_DEVICE(USB_VENDOR_ID_TENDA, USB_PRODUCT_ID_TENDA_U11)}, {USB_DEVICE(USB_VENDOR_ID_TENDA, USB_PRODUCT_ID_TENDA_U11_PRO)}, + {USB_DEVICE(USB_VENDOR_ID_AIC_V2, USB_PRODUCT_ID_AIC8800D81)}, {USB_DEVICE(USB_VENDOR_ID_AIC_V2, USB_PRODUCT_ID_AIC8800FC_CUS1)}, {USB_DEVICE(USB_VENDOR_ID_AIC_V2, USB_PRODUCT_ID_AIC8800FC_CUS2)}, {USB_DEVICE(USB_VENDOR_ID_AIC_V2, USB_PRODUCT_ID_AIC8800FC_CUS3)}, diff --git a/drivers/aic8800/aic8800_fdrv/rwnx_main.c b/drivers/aic8800/aic8800_fdrv/rwnx_main.c index 54182a1..58e2e0f 100644 --- a/drivers/aic8800/aic8800_fdrv/rwnx_main.c +++ b/drivers/aic8800/aic8800_fdrv/rwnx_main.c @@ -2036,6 +2036,9 @@ void aicwf_p2p_alive_timeout(struct timer_list *t) #if LINUX_VERSION_CODE < KERNEL_VERSION(4, 15, 0) rwnx_vif = (struct rwnx_vif *)data; rwnx_hw = rwnx_vif->rwnx_hw; + #elif LINUX_VERSION_CODE >= KERNEL_VERSION(6, 16, 0) + rwnx_hw = timer_container_of(rwnx_hw, t, p2p_alive_timer); + rwnx_vif = rwnx_hw->p2p_dev_vif; #else rwnx_hw = from_timer(rwnx_hw, t, p2p_alive_timer); rwnx_vif = rwnx_hw->p2p_dev_vif; @@ -2230,6 +2233,8 @@ static void aicwf_pwrloss_timer(struct timer_list *t) #if LINUX_VERSION_CODE < KERNEL_VERSION(4, 15, 0) rwnx_vif = (struct rwnx_vif *)data; rwnx_hw = rwnx_vif->rwnx_hw; +#elif LINUX_VERSION_CODE >= KERNEL_VERSION(6, 16, 0) + rwnx_hw = timer_container_of(rwnx_hw, t, pwrloss_timer); #else rwnx_hw = from_timer(rwnx_hw, t, pwrloss_timer); #endif diff --git a/drivers/aic8800/aic8800_fdrv/rwnx_rx.c b/drivers/aic8800/aic8800_fdrv/rwnx_rx.c index b7e22be..c422aa3 100644 --- a/drivers/aic8800/aic8800_fdrv/rwnx_rx.c +++ b/drivers/aic8800/aic8800_fdrv/rwnx_rx.c @@ -1868,6 +1868,8 @@ void reord_timeout_handler (struct timer_list *t) { #if LINUX_VERSION_CODE < KERNEL_VERSION(4,14,0) struct reord_ctrl *preorder_ctrl = (struct reord_ctrl *)data; +#elif LINUX_VERSION_CODE >= KERNEL_VERSION(6, 16, 0) + struct reord_ctrl *preorder_ctrl = timer_container_of(preorder_ctrl, t, reord_timer); #else struct reord_ctrl *preorder_ctrl = from_timer(preorder_ctrl, t, reord_timer); #endif @@ -2197,6 +2199,8 @@ void defrag_timeout_cb(struct timer_list *t) struct defrag_ctrl_info *defrag_ctrl = NULL; #if LINUX_VERSION_CODE < KERNEL_VERSION(4, 15, 0) defrag_ctrl = (struct defrag_ctrl_info *)data; +#elif LINUX_VERSION_CODE >= KERNEL_VERSION(6, 16, 0) + defrag_ctrl = timer_container_of(defrag_ctrl, t, defrag_timer); #else defrag_ctrl = from_timer(defrag_ctrl, t, defrag_timer); #endif diff --git a/drivers/aic8800/aic8800_fdrv/rwnx_wakelock.c b/drivers/aic8800/aic8800_fdrv/rwnx_wakelock.c index 90e7ad8..970262b 100644 --- a/drivers/aic8800/aic8800_fdrv/rwnx_wakelock.c +++ b/drivers/aic8800/aic8800_fdrv/rwnx_wakelock.c @@ -12,8 +12,12 @@ struct wakeup_source *rwnx_wakeup_init(const char *name) { struct wakeup_source *ws; +#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 16, 0) + ws = wakeup_source_register(NULL, name); +#else ws = wakeup_source_create(name); wakeup_source_add(ws); +#endif return ws; } @@ -21,8 +25,13 @@ void rwnx_wakeup_deinit(struct wakeup_source *ws) { if (ws && ws->active) __pm_relax(ws); + +#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 16, 0) + wakeup_source_unregister(ws); +#else wakeup_source_remove(ws); wakeup_source_destroy(ws); +#endif } struct wakeup_source *rwnx_wakeup_register(struct device *dev, const char *name)