diff --git a/drivers/net/wireless/uwe5622/tty-sdio/lpm.c b/drivers/net/wireless/uwe5622/tty-sdio/lpm.c index adfa41507d0..70909e98324 100644 --- a/drivers/net/wireless/uwe5622/tty-sdio/lpm.c +++ b/drivers/net/wireless/uwe5622/tty-sdio/lpm.c @@ -113,20 +113,24 @@ int bluesleep_init(void) retval = -ENOMEM; goto fail; } +#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 16, 0) tx_ws = wakeup_source_create("BT_TX_wakelock"); rx_ws = wakeup_source_create("BT_RX_wakelock"); wakeup_source_add(tx_ws); wakeup_source_add(rx_ws); +#endif return 0; fail: remove_proc_entry("btwrite", sleep_dir); remove_proc_entry("sleep", bluetooth_dir); remove_proc_entry("bluetooth", 0); +#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 16, 0) wakeup_source_remove(tx_ws); wakeup_source_remove(rx_ws); wakeup_source_destroy(tx_ws); wakeup_source_destroy(rx_ws); +#endif return retval; } @@ -136,10 +140,12 @@ void bluesleep_exit(void) remove_proc_entry("btwrite", sleep_dir); remove_proc_entry("sleep", bluetooth_dir); remove_proc_entry("bluetooth", 0); +#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 16, 0) wakeup_source_remove(tx_ws); wakeup_source_remove(rx_ws); wakeup_source_destroy(tx_ws); wakeup_source_destroy(rx_ws); +#endif } /*module_init(bluesleep_init);*/ diff --git a/drivers/net/wireless/uwe5622/unisocwcn/platform/wcn_txrx.c b/drivers/net/wireless/uwe5622/unisocwcn/platform/wcn_txrx.c index 2fd7f39888a..b577ee560b4 100644 --- a/drivers/net/wireless/uwe5622/unisocwcn/platform/wcn_txrx.c +++ b/drivers/net/wireless/uwe5622/unisocwcn/platform/wcn_txrx.c @@ -302,9 +302,11 @@ int mdbg_ring_init(void) return -MDBG_ERR_MALLOC_FAIL; } +#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 16, 0) /*wakeup_source pointer*/ ring_dev->rw_wake_lock = wakeup_source_create("mdbg_wake_lock"); wakeup_source_add(ring_dev->rw_wake_lock); +#endif spin_lock_init(&ring_dev->rw_lock); mutex_init(&ring_dev->mdbg_read_mutex); @@ -332,9 +334,11 @@ void mdbg_ring_remove(void) } mutex_destroy(&ring_dev->mdbg_read_mutex); +#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 16, 0) /*wakeup_source pointer*/ wakeup_source_remove(ring_dev->rw_wake_lock); wakeup_source_destroy(ring_dev->rw_wake_lock); +#endif mdbg_ring_destroy(ring_dev->ring); mdbg_dev->ring_dev = NULL; diff --git a/drivers/net/wireless/uwe5622/unisocwcn/sdio/sdiohal_common.c b/drivers/net/wireless/uwe5622/unisocwcn/sdio/sdiohal_common.c index 8dbf21437b5..cf38d8d31fd 100644 --- a/drivers/net/wireless/uwe5622/unisocwcn/sdio/sdiohal_common.c +++ b/drivers/net/wireless/uwe5622/unisocwcn/sdio/sdiohal_common.c @@ -254,6 +254,7 @@ void sdiohal_unlock_scan_ws(void) void sdiohal_wakelock_init(void) { struct sdiohal_data_t *p_data = sdiohal_get_data(); +#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 16, 0) /*wakeup_source pointer*/ p_data->tx_ws = wakeup_source_create("sdiohal_tx_wakelock"); wakeup_source_add(p_data->tx_ws); @@ -261,18 +262,21 @@ void sdiohal_wakelock_init(void) wakeup_source_add(p_data->rx_ws); p_data->scan_ws = wakeup_source_create("sdiohal_scan_wakelock"); wakeup_source_add(p_data->scan_ws); +#endif } void sdiohal_wakelock_deinit(void) { struct sdiohal_data_t *p_data = sdiohal_get_data(); /*wakeup_source pointer*/ +#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 16, 0) wakeup_source_remove(p_data->tx_ws); wakeup_source_destroy(p_data->tx_ws); wakeup_source_remove(p_data->rx_ws); wakeup_source_destroy(p_data->rx_ws); wakeup_source_remove(p_data->scan_ws); wakeup_source_destroy(p_data->scan_ws); +#endif } /* for callback */ diff --git a/drivers/net/wireless/uwe5622/unisocwcn/sleep/sdio_int.c b/drivers/net/wireless/uwe5622/unisocwcn/sleep/sdio_int.c index f3dec551e97..6b65e1bfdc5 100644 --- a/drivers/net/wireless/uwe5622/unisocwcn/sleep/sdio_int.c +++ b/drivers/net/wireless/uwe5622/unisocwcn/sleep/sdio_int.c @@ -315,9 +315,11 @@ int sdio_pub_int_init(int irq) atomic_set(&flag_pub_int_done, 1); +#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 16, 0) /*wakeup_source pointer*/ sdio_int.pub_int_ws = wakeup_source_create("pub_int_ws"); wakeup_source_add(sdio_int.pub_int_ws); +#endif init_completion(&(sdio_int.pub_int_completion)); @@ -348,9 +350,11 @@ int sdio_pub_int_deinit(void) disable_irq(sdio_int.pub_int_num); free_irq(sdio_int.pub_int_num, NULL); +#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 16, 0) /*wakeup_source pointer*/ wakeup_source_remove(sdio_int.pub_int_ws); wakeup_source_destroy(sdio_int.pub_int_ws); +#endif SLP_MGR_INFO("%s ok!\n", __func__); diff --git a/drivers/net/wireless/uwe5622/unisocwifi/cfg80211.c b/drivers/net/wireless/uwe5622/unisocwifi/cfg80211.c index 35e1317f137..0014d0946f3 100755 --- a/drivers/net/wireless/uwe5622/unisocwifi/cfg80211.c +++ b/drivers/net/wireless/uwe5622/unisocwifi/cfg80211.c @@ -1374,7 +1374,11 @@ void sprdwl_sched_scan_done(struct sprdwl_vif *vif, bool abort) #if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 14, 0) void sprdwl_scan_timeout(struct timer_list *t) { +#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 16, 0) + struct sprdwl_priv *priv = timer_container_of(priv, t, scan_timer); +#else struct sprdwl_priv *priv = from_timer(priv, t, scan_timer); +#endif #else void sprdwl_scan_timeout(unsigned long data) { diff --git a/drivers/net/wireless/uwe5622/unisocwifi/qos.c b/drivers/net/wireless/uwe5622/unisocwifi/qos.c index 4dc12e57764..426810c6976 100755 --- a/drivers/net/wireless/uwe5622/unisocwifi/qos.c +++ b/drivers/net/wireless/uwe5622/unisocwifi/qos.c @@ -708,7 +708,11 @@ void update_admitted_time(struct sprdwl_priv *priv, u8 tsid, u16 medium_time, bo #if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 14, 0) void update_wmmac_edcaftime_timeout(struct timer_list *t) { +#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 16, 0) + struct sprdwl_priv *priv = timer_container_of(priv, t, wmmac.wmmac_edcaf_timer); +#else struct sprdwl_priv *priv = from_timer(priv, t, wmmac.wmmac_edcaf_timer); +#endif #else void update_wmmac_edcaftime_timeout(unsigned long data) { diff --git a/drivers/net/wireless/uwe5622/unisocwifi/reorder.c b/drivers/net/wireless/uwe5622/unisocwifi/reorder.c index 98e74d0450b..f95088560f5 100644 --- a/drivers/net/wireless/uwe5622/unisocwifi/reorder.c +++ b/drivers/net/wireless/uwe5622/unisocwifi/reorder.c @@ -926,7 +926,11 @@ get_first_seqno_in_buff(struct rx_ba_node_desc *ba_node_desc) #if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 14, 0) static void ba_reorder_timeout(struct timer_list *t) { +#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 16, 0) + struct rx_ba_node *ba_node = timer_container_of(ba_node, t, reorder_timer); +#else struct rx_ba_node *ba_node = from_timer(ba_node, t, reorder_timer); +#endif #else static void ba_reorder_timeout(unsigned long data) { diff --git a/drivers/net/wireless/uwe5622/unisocwifi/tcp_ack.c b/drivers/net/wireless/uwe5622/unisocwifi/tcp_ack.c index 4abfa9d04e1..a8e824e5742 100644 --- a/drivers/net/wireless/uwe5622/unisocwifi/tcp_ack.c +++ b/drivers/net/wireless/uwe5622/unisocwifi/tcp_ack.c @@ -21,7 +21,11 @@ static void sprdwl_tcp_ack_timeout(unsigned long data) struct sprdwl_tcp_ack_manage *ack_m = NULL; #if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 14, 0) +#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 16, 0) + ack_info = (struct sprdwl_tcp_ack_info *)timer_container_of(ack_info, t, timer); +#else ack_info = (struct sprdwl_tcp_ack_info *)from_timer(ack_info, t, timer); +#endif #else ack_info = (struct sprdwl_tcp_ack_info *)data; #endif diff --git a/drivers/bluetooth/hci_ldisc.c b/drivers/bluetooth/hci_ldisc.c index d958822bbbd..c4bad03e409 100644 --- a/drivers/bluetooth/hci_ldisc.c +++ b/drivers/bluetooth/hci_ldisc.c @@ -670,7 +670,7 @@ static int hci_uart_register_dev(struct hci_uart *hu) // bluetooth devices if (hdev->manufacturer == 0xffff && hu->tty->driver && strncmp(hu->tty->driver->name, "ttyBT", 5) == 0) - set_bit(HCI_QUIRK_BROKEN_PARK_LINK_STATUS, &hdev->quirks); + hci_set_quirk(hdev, HCI_QUIRK_BROKEN_PARK_LINK_STATUS); if (test_bit(HCI_UART_RAW_DEVICE, &hu->hdev_flags)) hci_set_quirk(hdev, HCI_QUIRK_RAW_DEVICE); diff --git a/net/bluetooth/hci_sync.c b/net/bluetooth/hci_sync.c index b8b4e929d46..2dd886ee4ab 100644 --- a/net/bluetooth/hci_sync.c +++ b/net/bluetooth/hci_sync.c @@ -4190,7 +4190,7 @@ static int hci_setup_link_policy_sync(struct hci_dev *hdev) link_policy |= HCI_LP_HOLD; if (lmp_sniff_capable(hdev)) link_policy |= HCI_LP_SNIFF; - if (lmp_park_capable(hdev) && !test_bit(HCI_QUIRK_BROKEN_PARK_LINK_STATUS, &hdev->quirks)) + if (lmp_park_capable(hdev) && !hci_test_quirk(hdev, HCI_QUIRK_BROKEN_PARK_LINK_STATUS)) link_policy |= HCI_LP_PARK; cp.policy = cpu_to_le16(link_policy);