From patchwork Fri Mar 23 16:47:06 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wen-chien Jesse Sung X-Patchwork-Id: 890071 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.ubuntu.com (client-ip=91.189.94.19; helo=huckleberry.canonical.com; envelope-from=kernel-team-bounces@lists.ubuntu.com; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=canonical.com Received: from huckleberry.canonical.com (huckleberry.canonical.com [91.189.94.19]) by ozlabs.org (Postfix) with ESMTP id 4078k72TCDz9s0y; Sat, 24 Mar 2018 03:53:19 +1100 (AEDT) Received: from localhost ([127.0.0.1] helo=huckleberry.canonical.com) by huckleberry.canonical.com with esmtp (Exim 4.86_2) (envelope-from ) id 1ezPwI-0002Jg-VP; Fri, 23 Mar 2018 16:53:14 +0000 Received: from youngberry.canonical.com ([91.189.89.112]) by huckleberry.canonical.com with esmtps (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:128) (Exim 4.86_2) (envelope-from ) id 1ezPr0-0001Xc-Fz for kernel-team@lists.ubuntu.com; Fri, 23 Mar 2018 16:47:46 +0000 Received: from 123-204-41-50.static.seed.net.tw ([123.204.41.50] helo=cola.voip.idv.tw) by youngberry.canonical.com with esmtpsa (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.76) (envelope-from ) id 1ezPqz-0001XI-Nf; Fri, 23 Mar 2018 16:47:46 +0000 From: Wen-chien Jesse Sung To: kernel-team@lists.ubuntu.com Subject: [bionic][PATCH 09/10] UBUNTU: SAUCE: ubuntu/rtl8821c-bt: Adapt to timer API changes Date: Sat, 24 Mar 2018 00:47:06 +0800 Message-Id: <20180323164707.6027-10-jesse.sung@canonical.com> X-Mailer: git-send-email 2.14.1 In-Reply-To: <20180323164707.6027-1-jesse.sung@canonical.com> References: <20180323164707.6027-1-jesse.sung@canonical.com> X-BeenThere: kernel-team@lists.ubuntu.com X-Mailman-Version: 2.1.20 Precedence: list List-Id: Kernel team discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: kernel-team-bounces@lists.ubuntu.com Sender: "kernel-team" BugLink: https://launchpad.net/bugs/1742613 Signed-off-by: Wen-chien Jesse Sung --- ubuntu/rtl8821c-bt/rtk_coex.c | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/ubuntu/rtl8821c-bt/rtk_coex.c b/ubuntu/rtl8821c-bt/rtk_coex.c index 547deb8d8b92..5fc95194d043 100644 --- a/ubuntu/rtl8821c-bt/rtk_coex.c +++ b/ubuntu/rtl8821c-bt/rtk_coex.c @@ -65,9 +65,9 @@ static struct rtl_coex_struct btrtl_coex; #define is_profile_busy(profile) ((btrtl_coex.profile_status & BIT(profile)) > 0) static void rtk_handle_event_from_wifi(uint8_t * msg); -static void count_a2dp_packet_timeout(unsigned long data); -static void count_pan_packet_timeout(unsigned long data); -static void count_hogp_packet_timeout(unsigned long data); +static void count_a2dp_packet_timeout(struct timer_list *data); +static void count_pan_packet_timeout(struct timer_list *data); +static void count_hogp_packet_timeout(struct timer_list *data); static int rtl_alloc_buff(struct rtl_coex_struct *coex) { @@ -562,7 +562,7 @@ static void rtk_check_setup_timer(int8_t profile_index) { if (profile_index == profile_a2dp) { btrtl_coex.a2dp_packet_count = 0; - setup_timer(&(btrtl_coex.a2dp_count_timer), + timer_setup(&(btrtl_coex.a2dp_count_timer), count_a2dp_packet_timeout, 0); btrtl_coex.a2dp_count_timer.expires = jiffies + msecs_to_jiffies(1000); @@ -571,7 +571,7 @@ static void rtk_check_setup_timer(int8_t profile_index) if (profile_index == profile_pan) { btrtl_coex.pan_packet_count = 0; - setup_timer(&(btrtl_coex.pan_count_timer), + timer_setup(&(btrtl_coex.pan_count_timer), count_pan_packet_timeout, 0); btrtl_coex.pan_count_timer.expires = jiffies + msecs_to_jiffies(1000); @@ -584,7 +584,7 @@ static void rtk_check_setup_timer(int8_t profile_index) && (0 == btrtl_coex.profile_refcount[profile_voice])) { btrtl_coex.hogp_packet_count = 0; btrtl_coex.voice_packet_count = 0; - setup_timer(&(btrtl_coex.hogp_count_timer), + timer_setup(&(btrtl_coex.hogp_count_timer), count_hogp_packet_timeout, 0); btrtl_coex.hogp_count_timer.expires = jiffies + msecs_to_jiffies(1000); @@ -975,7 +975,7 @@ static void packets_count(uint16_t handle, uint16_t scid, uint16_t length, } } -static void count_a2dp_packet_timeout(unsigned long data) +static void count_a2dp_packet_timeout(struct timer_list *data) { RTKBT_DBG("%s: a2dp_packet_count %d", __func__, btrtl_coex.a2dp_packet_count); @@ -992,7 +992,7 @@ static void count_a2dp_packet_timeout(unsigned long data) jiffies + msecs_to_jiffies(1000)); } -static void count_pan_packet_timeout(unsigned long data) +static void count_pan_packet_timeout(struct timer_list *data) { RTKBT_DBG("%s: pan_packet_count %d", __func__, btrtl_coex.pan_packet_count); @@ -1012,7 +1012,7 @@ static void count_pan_packet_timeout(unsigned long data) jiffies + msecs_to_jiffies(1000)); } -static void count_hogp_packet_timeout(unsigned long data) +static void count_hogp_packet_timeout(struct timer_list *data) { RTKBT_DBG("%s: hogp_packet_count %d", __func__, btrtl_coex.hogp_packet_count); @@ -2320,7 +2320,7 @@ void rtk_btcoex_parse_l2cap_data_rx(uint8_t *buffer, int count) //} } -static void polling_bt_info(unsigned long data) +static void polling_bt_info(struct timer_list *data) { uint8_t temp_cmd[1]; RTKBT_DBG("polling timer"); @@ -2346,7 +2346,7 @@ static void rtk_handle_bt_info_control(uint8_t *p) if (ctl->polling_enable && !btrtl_coex.polling_enable) { /* setup polling timer for getting bt info from firmware */ - setup_timer(&(btrtl_coex.polling_timer), polling_bt_info, 0); + timer_setup(&(btrtl_coex.polling_timer), polling_bt_info, 0); btrtl_coex.polling_timer.expires = jiffies + msecs_to_jiffies(ctl->polling_time * 1000); add_timer(&(btrtl_coex.polling_timer)); @@ -2562,10 +2562,10 @@ void rtk_btcoex_open(struct hci_dev *hdev) (void *)udpsocket_recv_data); INIT_DELAYED_WORK(&btrtl_coex.l2_work, (void *)rtl_l2_work); - init_timer(&btrtl_coex.polling_timer); - init_timer(&btrtl_coex.a2dp_count_timer); - init_timer(&btrtl_coex.pan_count_timer); - init_timer(&btrtl_coex.hogp_count_timer); + timer_setup(&btrtl_coex.polling_timer, NULL, 0); + timer_setup(&btrtl_coex.a2dp_count_timer, NULL, 0); + timer_setup(&btrtl_coex.pan_count_timer, NULL, 0); + timer_setup(&btrtl_coex.hogp_count_timer, NULL, 0); btrtl_coex.hdev = hdev; btrtl_coex.wifi_on = 0;