From nobody Wed Dec 17 07:06:07 2025 Received: from mail-wm1-f42.google.com (mail-wm1-f42.google.com [209.85.128.42]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id A77F1214810 for ; Mon, 31 Mar 2025 15:38:40 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.42 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1743435522; cv=none; b=hVKqrP1cGTU5llmzUN/4kkhK0RT4Ch5qTtzqZqCsftp8/0PklNih5NW5G7RKAyzurMMDwaNrUrZLi6GsnllnGT94Km9/RYXV7+KnBuSBX9Q69k6ghR9sy+1wLTOP4B5aMmiqs9qKbIc34eACfV2mKV8/xqGyTJrzB/faYVvE/7g= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1743435522; c=relaxed/simple; bh=aOOWiCI3ZK6+dzDuMUQZ7ZuRMibgi+DohpZfmHWxiow=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=k2eBJs1aE/NAX2jCTA8XMIT6yJW+G99GRfC3YHMZoNLjZuIui6ShIigwrnqWdLNC3Z5bI05GLppj7Of4vErZdkRRkRm2frHCe2PA945D66zfJPD7n9raQi4qKTPV3fKmFwve3Ib/GWMkO8kmPg4Z2i64jBh0Mpk3QyQ/E0UAsiE= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=Uay+Eqzq; arc=none smtp.client-ip=209.85.128.42 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="Uay+Eqzq" Received: by mail-wm1-f42.google.com with SMTP id 5b1f17b1804b1-43cf05f0c3eso31184055e9.0 for ; Mon, 31 Mar 2025 08:38:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1743435519; x=1744040319; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=pK/O4pDg7hGitdXCJDavzci3Ws7cE2OFjqh+I33m5qk=; b=Uay+Eqzqxl05h3Wcp8tbJSy5Ezme9zUJwdA6Wa5HzPYpYsrMBcnMAgxNNZmCH8xL/j rj92zzO7vUMehiyJEJxKznVsSlkFanYRXHgF/cB+kwHWmMiCTP8nkoPj1boH3KXz7L1U 0IrG7qEN3bevhtHS2s+m3nA9XRa0pMhocrTdkfntT8gEW34Ewx+IFYjIYb8YMCOQF/OH rsTgw0cc8ecthXYiKUuHYOmlFf5+mOjZHuGMvfpyim8dyAAGjUF6dwrNH7HfixpLJna6 9Zs/LVLaeRpmsJUQMfO97NkiyQ7QN8Qm5ihRZUL27u6PcMWOuvV6I6uTNPsgzaHMuvwM 2dOQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1743435519; x=1744040319; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=pK/O4pDg7hGitdXCJDavzci3Ws7cE2OFjqh+I33m5qk=; b=SpY2BnLHIIL37KuKbjgaEjxHi96KMvf913bT0zitt17TmTp+ppUxVRjhMO/1iSPjou Kop2LdqypEcm2GmDtdZxCR6/3qmncZcAtFF49LqTixHqd6eGGhLJo6nJUBIeONTp+ojA kpcIsjxUdCXuivCr4FkOxinAQlkBacGjp5e9uTK3YQpe6jClzpfWraN5agQ/5DWG+RFX r/0XEi2bsGzE797T3C3Ozje6npruB8CALrCsXSyQlP6oKEujI5LdNhgA2w/N8LYoLhHG Uar5r8L8LdtDMzc1ZLiJXzBxOlAhBDHNOMe3va+KaE7wo0bpbq4NjjDPBsUi4M8FNDv2 xPNA== X-Forwarded-Encrypted: i=1; AJvYcCXwxVp76zs9kO7ALBgIUHpYtN8ogj5+ivs50ISmpnqfs7MWgk8hclf5HgXEhEyx6qkMBjr2Fs80OqPTTXs=@vger.kernel.org X-Gm-Message-State: AOJu0YzuIUpeX3uFGFjqBmPVEtnGgxrOM9kQHz4ZINzo5pNztAL/eT7z JqXSrLn8+S4Zuohn4kvWvax11I3fS5+nJB+HcTuYOU0w+kje+Pe3 X-Gm-Gg: ASbGncvPYX1JA2o0aAq4ScD+Ssn7OhOPYhFPPUUJbTkXHFwPIgAdIG1KTL4WwrKLqRU b14xKf1cmG0FDC+dDtb8QlqvubIU0sFw8wG+BNIOnIly/brC1CMV9PaqD6YfJkLg0HzJDggfOVb KgI2bTHw1UvaGLbQQ9zuZDE/ZTJ97KlMDB/HfW7QUvSbBAbQRCfmes1ulllKvf78zkdyYEXjqgq 96nCsQEP+Y/4IA3YnuIyMfS/LHfupEXK1/5LnOQFu61RGxDlSqJQpfVZkas0fnR0nqMOqFQ3AvJ ax0nDsj6TVS5B/kcaS+/wmBBsNTrrzelqoTEtM4= X-Google-Smtp-Source: AGHT+IH2mGFfLetV5v+eJkoMgmWrblW17D+ToN5g6OBQ+briCVirOztPLwgyfX6vxOxCuiLKkNvGwQ== X-Received: by 2002:a05:600c:1e23:b0:434:fa55:eb56 with SMTP id 5b1f17b1804b1-43db61cebecmr94980375e9.7.1743435518556; Mon, 31 Mar 2025 08:38:38 -0700 (PDT) Received: from pc.. ([41.206.42.66]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-39c0b6588d0sm11419167f8f.7.2025.03.31.08.38.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 31 Mar 2025 08:38:38 -0700 (PDT) From: Erick Karanja To: gregkh@linuxfoundation.org, outreachy@lists.linux.dev Cc: philipp.g.hortmann@gmail.com, linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org, Erick Karanja Subject: [PATCH 1/5] staging: rtl8723bs: use preferred comparison order Date: Mon, 31 Mar 2025 18:37:54 +0300 Message-ID: X-Mailer: git-send-email 2.43.0 In-Reply-To: References: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Refactor conditions check to follow the Linux kernel coding style, which prefers placing the variable on the left side of the comparison. Reported by checkpatch: WARNING: Comparisons should place the constant on the right side of the test Signed-off-by: Erick Karanja --- drivers/staging/rtl8723bs/hal/hal_btcoex.c | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/drivers/staging/rtl8723bs/hal/hal_btcoex.c b/drivers/staging/r= tl8723bs/hal/hal_btcoex.c index b72cf520d576..9105594d2dde 100644 --- a/drivers/staging/rtl8723bs/hal/hal_btcoex.c +++ b/drivers/staging/rtl8723bs/hal/hal_btcoex.c @@ -91,7 +91,7 @@ static void halbtcoutsrc_LeaveLowPower(struct btc_coexist= *pBtCoexist) stime =3D jiffies; do { ready =3D rtw_register_task_alive(padapter, BTCOEX_ALIVE); - if (_SUCCESS =3D=3D ready) + if (ready =3D=3D _SUCCESS) break; =20 utime =3D jiffies_to_msecs(jiffies - stime); @@ -668,7 +668,7 @@ static void halbtcoutsrc_WriteLocalReg1Byte(void *pBtcC= ontext, u32 RegAddr, u8 D struct btc_coexist *pBtCoexist =3D (struct btc_coexist *)pBtcContext; struct adapter *Adapter =3D pBtCoexist->Adapter; =20 - if (BTC_INTF_SDIO =3D=3D pBtCoexist->chipInterface) + if (pBtCoexist->chipInterface =3D=3D BTC_INTF_SDIO) rtw_write8(Adapter, SDIO_LOCAL_BASE | RegAddr, Data); else rtw_write8(Adapter, RegAddr, Data); @@ -894,7 +894,7 @@ void EXhalbtcoutsrc_IpsNotify(struct btc_coexist *pBtCo= exist, u8 type) if (pBtCoexist->bManualControl) return; =20 - if (IPS_NONE =3D=3D type) + if (type =3D=3D IPS_NONE) ipsType =3D BTC_IPS_LEAVE; else ipsType =3D BTC_IPS_ENTER; @@ -922,7 +922,7 @@ void EXhalbtcoutsrc_LpsNotify(struct btc_coexist *pBtCo= exist, u8 type) if (pBtCoexist->bManualControl) return; =20 - if (PS_MODE_ACTIVE =3D=3D type) + if (type =3D=3D PS_MODE_ACTIVE) lpsType =3D BTC_LPS_DISABLE; else lpsType =3D BTC_LPS_ENABLE; @@ -1000,7 +1000,7 @@ void EXhalbtcoutsrc_MediaStatusNotify(struct btc_coex= ist *pBtCoexist, enum if (pBtCoexist->bManualControl) return; =20 - if (RT_MEDIA_CONNECT =3D=3D mediaStatus) + if (mediaStatus =3D=3D RT_MEDIA_CONNECT) mStatus =3D BTC_MEDIA_CONNECT; else mStatus =3D BTC_MEDIA_DISCONNECT; @@ -1026,11 +1026,11 @@ void EXhalbtcoutsrc_SpecialPacketNotify(struct btc_= coexist *pBtCoexist, u8 pktTy if (pBtCoexist->bManualControl) return; =20 - if (PACKET_DHCP =3D=3D pktType) { + if (pktType =3D=3D PACKET_DHCP) { packetType =3D BTC_PACKET_DHCP; - } else if (PACKET_EAPOL =3D=3D pktType) { + } else if (pktType =3D=3D PACKET_EAPOL) { packetType =3D BTC_PACKET_EAPOL; - } else if (PACKET_ARP =3D=3D pktType) { + } else if (pktType =3D=3D PACKET_ARP) { packetType =3D BTC_PACKET_ARP; } else { return; @@ -1114,13 +1114,13 @@ void EXhalbtcoutsrc_Periodical(struct btc_coexist *= pBtCoexist) =20 void EXhalbtcoutsrc_SetAntNum(u8 type, u8 antNum) { - if (BT_COEX_ANT_TYPE_PG =3D=3D type) { + if (type =3D=3D BT_COEX_ANT_TYPE_PG) { GLBtCoexist.boardInfo.pgAntNum =3D antNum; GLBtCoexist.boardInfo.btdmAntNum =3D antNum; - } else if (BT_COEX_ANT_TYPE_ANTDIV =3D=3D type) { + } else if (type =3D=3D BT_COEX_ANT_TYPE_ANTDIV) { GLBtCoexist.boardInfo.btdmAntNum =3D antNum; /* GLBtCoexist.boardInfo.btdmAntPos =3D BTC_ANTENNA_AT_MAIN_PORT; */ - } else if (BT_COEX_ANT_TYPE_DETECTED =3D=3D type) { + } else if (type =3D=3D BT_COEX_ANT_TYPE_DETECTED) { GLBtCoexist.boardInfo.btdmAntNum =3D antNum; /* GLBtCoexist.boardInfo.btdmAntPos =3D BTC_ANTENNA_AT_MAIN_PORT; */ } --=20 2.43.0 From nobody Wed Dec 17 07:06:07 2025 Received: from mail-wm1-f52.google.com (mail-wm1-f52.google.com [209.85.128.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 21924214A8D for ; Mon, 31 Mar 2025 15:38:44 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.52 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1743435526; cv=none; b=tDDtedz0pUtb61LHX5Z1Nnq1uff/PfwvLsDBmOgRtzR49449fLh9oWH0y4Nc3IvJWNc/QgAD/+8BNQHkLbqGIwYaUVmtHhd24Hf+eQXgwT1Vu9urLyp6Yk/6j+5KjkP29ORpB4mGfx8QERqeqow3K8V3UowCGP7EAPs0t+4eFJc= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1743435526; c=relaxed/simple; bh=Guph8mmJMFaOo8pXCV+W6NFtzTx7511oxA6uyLVHGwI=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=NW+wp0ZJGfAXx41qW1lYQPiwgKKX4Q8DAoA0L+6abX3hctH8aHKMs7uWBw/GkgWFGSUMVaxBfAqVhSo/2ySgQSENkAuNGjMHcJFME4GPxhm4QmQHnzZ8YnhiSviwvmhfSaSsK+er/2z5OZ0uKQXEsFHiGt4N2cw5dXd7pmOTlYU= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=OMxFdF+x; arc=none smtp.client-ip=209.85.128.52 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="OMxFdF+x" Received: by mail-wm1-f52.google.com with SMTP id 5b1f17b1804b1-43cf257158fso32988175e9.2 for ; Mon, 31 Mar 2025 08:38:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1743435523; x=1744040323; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=DiknAnsvqiFiA162ylc28HTvEwOzNiA9v+qetgqgE9g=; b=OMxFdF+xYlGiWWKQeQ2V3jr3a9HaEJJZHwJpO+zeTLcQQQyXsm8fYzVfey4z/d0xzw hY2O5nqzLuoK1FJVpsWyzJdHqUu9nauUlqVTttL6VQWD3ZEaae5MA9CB45yZXmyFk9JS rphwJXtQ/iKDZZTsN47Fu6kT7U2qDeF1SBl/QlpPi+IPqRVbh5a515W8yRvK98421xvL fOTEwZvgxg6Pnfw4NqRUMEp08YBsKwVOkYAoVzMbIcO8Xo7+MtwHVf/vO+ZOU+9Ay3MV peIeuYxD9aNuYIq0G1XfAzfLsWU7H8qL/VSYUlpXr59DBVAEfekvUl2JmmjkiSQkGI/I S2bw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1743435523; x=1744040323; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=DiknAnsvqiFiA162ylc28HTvEwOzNiA9v+qetgqgE9g=; b=uedOF8776B8MK7GBDFmLU3nSiKxY3SXlVIMecKNgpB+CNeD4H6v91h2LYoIjAcgXFb hekJTUpJj+SmKYfAaFGlSHXECIgaj+Zi/uw4apGRqpPOFPf0GIihS06p1Hs17EAdyZYo WZsHd95e0SrXt4b8007bZxIqPYWysUscSVRH1Jk3JIrwJ0bC5PNnLTGfaPa5f/R3jG1G 6BDDjOf8Uadq8Fpq/rKeGAOcgQiK/YhAkkVv1J7T3jsdb1zpzN2CqNu3cqyrh9y/ltJj lFqC6AxXNzXSeMIGfrV3A12ZcV+tw09XRb0eChK1RDOm4X+/lt4sloLdk4QjbQ8qIvXv cOtg== X-Forwarded-Encrypted: i=1; AJvYcCWKzb06b4mWaWQqPe7iGdjhGdRVfaT0D2PK1FoINFUJ9m/tLvvpZQ6EicMIM42KQiWFAa1G8cqA2WdKKjw=@vger.kernel.org X-Gm-Message-State: AOJu0YxmEzrR+SJ5crDJf/vUxzet+3ApvvRAQww/c4eS1OFpckd8GCQ1 hgL2LltAKsxI+iTEm1srciZ3KUmSfX07lhqevvzYRJJ+70RoxH9G X-Gm-Gg: ASbGncvOp2jx9MHNl/VmEV1gMLfshhpLvMTi1x5Qwp4X8g/KPgfp6gIPx4QOHadiadD AjnBdWN0kVxsVXBx5AwVS14QY0G2eAbnQWxcvWKwN/3cf2fCsM8GQUtkiHxUzTcqO0fQRPU6NgJ pM9GTqKtTF3KwjVFukekzr9qQhX2HJj8KHF3i+Eqn/1ux0wDTNKb9r7ZuZ2oBTAu0Pik5kEhooG jPshP/SUW/ySn+Y4b2uhgzGG+6hJyCvPVGv61wB+bcKFZZQQQRqEc8isHgtdh5h1t1VKUf4411v MChP57cwQRXDjALjinl1yxYzPYjetarhLGLn9to= X-Google-Smtp-Source: AGHT+IFDBbS4zcIHxRzCALn8qONtDseBPQoMluJoXsrEbjFpJCnuyrjeuSwnf4sM7gw+nFvV1KXLXQ== X-Received: by 2002:a05:600c:4eca:b0:43d:abd:ad0e with SMTP id 5b1f17b1804b1-43db6249689mr92193435e9.18.1743435523485; Mon, 31 Mar 2025 08:38:43 -0700 (PDT) Received: from pc.. ([41.206.42.66]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-39c0b6588d0sm11419167f8f.7.2025.03.31.08.38.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 31 Mar 2025 08:38:43 -0700 (PDT) From: Erick Karanja To: gregkh@linuxfoundation.org, outreachy@lists.linux.dev Cc: philipp.g.hortmann@gmail.com, linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org, Erick Karanja Subject: [PATCH 2/5] staging: rtl8723bs: replace kmalloc + memset with kzalloc Date: Mon, 31 Mar 2025 18:37:55 +0300 Message-ID: X-Mailer: git-send-email 2.43.0 In-Reply-To: References: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Replace a call to kmalloc followed by memset with a single call to kzalloc, which both allocates memory and zeroes it in one step. This change improves readability and reduces redundant code. Signed-off-by: Erick Karanja --- drivers/staging/rtl8723bs/os_dep/osdep_service.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/drivers/staging/rtl8723bs/os_dep/osdep_service.c b/drivers/sta= ging/rtl8723bs/os_dep/osdep_service.c index a00f9f0c85c5..be46132a533a 100644 --- a/drivers/staging/rtl8723bs/os_dep/osdep_service.c +++ b/drivers/staging/rtl8723bs/os_dep/osdep_service.c @@ -24,12 +24,7 @@ void *_rtw_malloc(u32 sz) =20 void *_rtw_zmalloc(u32 sz) { - void *pbuf =3D _rtw_malloc(sz); - - if (pbuf) - memset(pbuf, 0, sz); - - return pbuf; + return kzalloc(sz, in_interrupt() ? GFP_ATOMIC : GFP_KERNEL); } =20 inline struct sk_buff *_rtw_skb_alloc(u32 sz) --=20 2.43.0 From nobody Wed Dec 17 07:06:07 2025 Received: from mail-wm1-f47.google.com (mail-wm1-f47.google.com [209.85.128.47]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 0009621CC4E for ; Mon, 31 Mar 2025 15:38:49 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.47 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1743435531; cv=none; b=Yh1mAc/iokd8YFf5leWYKAf+Gyj89KML7mONiOw6KGZdJ4XTSWWv3OrgYXPzB253dLjjAWiQPdyiGYrb7jkRo5n3kyUQk/IVk/bG3ovuuMZoDJ41VCMG2/mMlZrumSwZAAkfN/EdjuI1CYyzP0tRdnFxblRuoBe1S8JdGgpaguo= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1743435531; c=relaxed/simple; bh=8Z/Q1Yqqxhozl8RrcKexRki6sw2jFiBNt//dnoasYvk=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=fcKA1iQjuL4eVECPhRZ3tkQLN8wFIUFm401w5k3/1ILORvDxgPjwjS4wGpl6OevBfeztcauPkeyyGbEmLe8eqtK1tmx7urij7bSsxNJb4rtb8wNnVKOzF6jUPAhdZ4KZ5A/ys62G/FhYWp7Vvf9HjZeX4k4QGI0BOBkz6M1kct4= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=IcpNEA+0; arc=none smtp.client-ip=209.85.128.47 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="IcpNEA+0" Received: by mail-wm1-f47.google.com with SMTP id 5b1f17b1804b1-43d0c18e84eso20822285e9.3 for ; Mon, 31 Mar 2025 08:38:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1743435528; x=1744040328; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=2gIv3lfUsZudSX+4KjXfNYnF9gzZiOWchSCAyXPUHRA=; b=IcpNEA+0yYIFv1ul2Bism8dnWcV2lXS8Rl1MCzK/mOhzQB/sn+iR2EhxA63dH1e9yQ Soip5zw9ugNPYURKBiv/Ve9mcfCQ70IsJEiVIaicAD4IoGBY0BYC8twMDrXoApWyp9wF muerxqn5u7EZhstChwDyv6B67/cJ7WvTxBSaGxMH4O61UHVh1ui2H2ANZKz0UMQhAsDq UadQiGlTe0wj0KkvS+4k6SMAJuHNUDAakDZ401ptorLz8wVVaKU5BSSHweX5fE64gQ3S QkaHzOI3c7Vya5KxDMCzcsm8E/cr1qxQzo6MJiNEPHRnGOdmaOArv9XjAm1csrhtJ1YB vS6g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1743435528; x=1744040328; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=2gIv3lfUsZudSX+4KjXfNYnF9gzZiOWchSCAyXPUHRA=; b=Tkuw8zPTr84CHuHADPbgYtm8QX1sZEzdbo4M9zE6la5Q4WiDALanty13Ou8k+STlYJ 41wo1Sy/RwqkbY4desc5zJrvYTV+qK3KGUVYQYBd4rRFOS2Dymvup0iYP1jQEJN1H8Q8 x2+Ux1uZ0b5fUJpYxABX/bweRKAezy3Oj+NrveY8q1durk41syoubH7C8M8QXJ7J0Zl3 5OU6biC4MEZENA7WEbdMdhqkDz9xuqU0WhJohBG4yJ20VgjZJpJgYuNu7acOBSub9cwo OC0zLTv8tg4iqbhl4qaM/nJjcbPnhzXrjLF6jiApRQEw/1a0A9wFH3nrd2mB9aub6iSO T1vA== X-Forwarded-Encrypted: i=1; AJvYcCVLB/omgMnoXAEAAL8lnTzD/bhnD8qYaTA5jI9sFXWI9s4lZhkIKsD88Pg5dOdsAPFs8gFEatJGuNLHxYg=@vger.kernel.org X-Gm-Message-State: AOJu0YzIwwTBuHyV0fwogLDEVDztAaKb28y1QUTI1+VxNIC7qm0QqjUX fON2SIvDbksMb38bzvs7G4NhrqzbERgV01NVX671PUc2ckmWoCdI X-Gm-Gg: ASbGncuhC224aM8gqzsLuFuLOGQoj7zQAHaIfRu1++laqTjWVAo1mU3PC3QWRei+kNl FJnEX9kpL5218FvsuGcmVvygpIFcs2DqCCoeYhutiO0wVA+RNrN4mFgNINPvuhl9aS9cjCyNcvz JrnshWkKGIPSFFzXrWAK/iBzOIkgMJDH6qePxsqWtoXhvc2kSzX8oRvtcFmDYdjWNsmJSUlnai9 vTOss8AwRcDryiqBFCYFJj+9dNDc7PZqpGnYaOIQw2ZyjZVWrQNgzmX09sdCIQaIcLsa0H9qw11 8l3toqa1gVDPXWD6al76lzD/mewgJNbhbykklwE= X-Google-Smtp-Source: AGHT+IFdato1T3vrZMd1epyk3zNNbsohtGqaDLeyTFEjiVWS1VpusMu2h3hzcFrdgYDV0ky7Ie0dww== X-Received: by 2002:a7b:c85a:0:b0:43d:fa59:cc8f with SMTP id 5b1f17b1804b1-43dfa59cd30mr61311035e9.33.1743435528129; Mon, 31 Mar 2025 08:38:48 -0700 (PDT) Received: from pc.. ([41.206.42.66]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-39c0b6588d0sm11419167f8f.7.2025.03.31.08.38.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 31 Mar 2025 08:38:47 -0700 (PDT) From: Erick Karanja To: gregkh@linuxfoundation.org, outreachy@lists.linux.dev Cc: philipp.g.hortmann@gmail.com, linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org, Erick Karanja Subject: [PATCH 3/5] staging: rtl8723bs: add spaces between ternary and binary operators Date: Mon, 31 Mar 2025 18:37:56 +0300 Message-ID: <84e4e73f3224ee37d5d203c9b7adbcb43f4fc144.1743434232.git.karanja99erick@gmail.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: References: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Fix spacing around binary arithmetic (`+`) and shift (`>>`) operators to improve readability and adhere to the Linux kernel coding style. Reported by checkpatch: CHECK: spaces needed around 'operator' Signed-off-by: Erick Karanja --- drivers/staging/rtl8723bs/hal/odm_CfoTracking.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/staging/rtl8723bs/hal/odm_CfoTracking.c b/drivers/stag= ing/rtl8723bs/hal/odm_CfoTracking.c index 928c58be6c9b..3b43f8cfd6f4 100644 --- a/drivers/staging/rtl8723bs/hal/odm_CfoTracking.c +++ b/drivers/staging/rtl8723bs/hal/odm_CfoTracking.c @@ -155,9 +155,9 @@ void ODM_CfoTracking(void *pDM_VOID) /* 4 1.6 Big jump */ if (pCfoTrack->bAdjust) { if (CFO_ave > CFO_TH_XTAL_LOW) - Adjust_Xtal =3D Adjust_Xtal+((CFO_ave-CFO_TH_XTAL_LOW)>>2); + Adjust_Xtal =3D Adjust_Xtal + ((CFO_ave-CFO_TH_XTAL_LOW) >> 2); else if (CFO_ave < (-CFO_TH_XTAL_LOW)) - Adjust_Xtal =3D Adjust_Xtal+((CFO_TH_XTAL_LOW-CFO_ave)>>2); + Adjust_Xtal =3D Adjust_Xtal + ((CFO_TH_XTAL_LOW-CFO_ave) >> 2); } =20 /* 4 1.7 Adjust Crystal Cap. */ --=20 2.43.0 From nobody Wed Dec 17 07:06:07 2025 Received: from mail-wm1-f45.google.com (mail-wm1-f45.google.com [209.85.128.45]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 0D3B1215F56 for ; Mon, 31 Mar 2025 15:38:55 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.45 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1743435537; cv=none; b=ch6uQ0itNKzj6F4ge6Y6Yx+IR+x6N96q+sN8wmdIjO4jpo8dNeXlB32/bupEDOBzm8F0XDmGjE7nGxmBfkwuUN57e++N9TsWBtc7eh/jtUm9Q1BE/ww9WM9AXnbM96JHQlBHiGm7OAnQQlzY1/IHV0A/t+hUcd5VdtX3/ksJxDs= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1743435537; c=relaxed/simple; bh=XSmVkVeZdRqAgRBh6fbVg6tdGfHaB+Oq9/dh6pVnsnE=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=os/cqzP1DO9uu7QhUD9g6bdFdjt6ngGs72U4xaiNXQyGsLyAxB+k8U9I0W3V0R0tWQ+ODuHacKYdcgd1mIv3By92gV5IZkpz9UCnN/eJq6WXr41BQNntsNgKYry8EhT2DcMlu/l2jU1SWCXUDlJCeeokRWbtKynraocNhXCYPLo= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=N/iFSTOg; arc=none smtp.client-ip=209.85.128.45 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="N/iFSTOg" Received: by mail-wm1-f45.google.com with SMTP id 5b1f17b1804b1-4393dc02b78so29096195e9.3 for ; Mon, 31 Mar 2025 08:38:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1743435534; x=1744040334; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=3cV2X3A/AFNmBG0lPkf6t+LeaV66zSVbYS9oBEkGpMY=; b=N/iFSTOgwbHCTLdDxhfPc5hwEasTUgSwLeO/xEGIWU5mk+27ej4vkAnukRN0HE9Ln1 oncmBecE5dWDKhBvD1RaAKmZJ7gizWDfS5fBA5I4TZr709YCAjIjMu4apJDvGl3ekZ2l ifp3CIuWqe1EyKu3a7J7K+wddU+BK4L4tHTYiJXeAIMCbprU8UAwiHgkuxdwX9bpfaTl kvWdJHSHx6stL/Ppyu9pfgu16Ob6j+abHMY92M2zk/n+HpB6bme8Hro0lkkJAbGcS7Hg P1YVq5l9l192Z+7lYuzc0oEl+kmEa6iPUTioAmXuzbp2Rm0lkwg8cXvNbSozi3tL3bM6 2Tlg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1743435534; x=1744040334; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=3cV2X3A/AFNmBG0lPkf6t+LeaV66zSVbYS9oBEkGpMY=; b=CqMhMTkE5MjqlaA6RK/kCkaFvwvZDc7bCKbRdvkApbln7o3pxQzI5EVAcSktckqAt/ WwO7XmV3Af1ybChbZ8KwyYhFYEVqfijZy+dNK+gn39w28kSca9pSQmvfINQXAxPcEPXl 7MmfTbnP8OZMqG9+ZyRh16R08aI4TM/Ghu/HrvYF7n3zyeZsFISL17Nenvmfskn+qgGh vpmUs068/PVCzW5jM6cy47KYUyscob81docy6QJMz3X9QJfFnZpCqBSkRlld8Mwb/WUK b1XCtwZQGZqNjXdZCvOtBd1HWDloi6iEhTWGsMkNxZR0kJYnfmhlxavoEVOWLPOHnx6q ntgg== X-Forwarded-Encrypted: i=1; AJvYcCWmthfF2zblwTiQl36rc4i1BAl6Uy/UfKxjbmS9lLo/wz5RO2SCs1R+o9fGHB6MmBvZhQaMVUZVIlN2k/Q=@vger.kernel.org X-Gm-Message-State: AOJu0Yxu7rB5Tf7pGM6/Cr6AOhcIjZwGlkNbBZHkes0rA8261GVPDpzo t2eX7tNhuJP6JIHY/Ulf80Rly9mBZinNsdK9f+NbM7Kcn+40R4Qz X-Gm-Gg: ASbGncu+C0Nmn32kjnSz+x4N+Azc5fRdbfZbPSh3WMZFTM4M10p9UoMvJNO/Wf36BnM zLnzIbehdvw74YqRRFtJKbxtJhY8n+5O4pqJQhhpO7WXB6sOL+xOMB7h4rpbKhgs3vPRfmcFzFl 8rWCWbUgzFRZWJeS9aEfZ/LvKYwuSVQWqNwbnlnZU1LLJWijvo233RoJzOxaB4m/R3LCyU3FJVE xeJJtQyFtq8tntQQCJCEaxMJnve9gUsVvx0H57dttbTwYuRFNwnsUW+PIx/9seSx3Ga+i4jrCdg Y3GWMpmRq+X/5KfgFxRCQast1yE0UHUywU0FEfw= X-Google-Smtp-Source: AGHT+IFHxPVBCNkh80Wi3fPvpwcdrU6K0fcLb5jPOJqwVZV5BBIXRjafmwnPOTESjluqIx/0l5a7hA== X-Received: by 2002:a05:6000:240a:b0:39c:1401:679c with SMTP id ffacd0b85a97d-39c140167cfmr6806416f8f.21.1743435534196; Mon, 31 Mar 2025 08:38:54 -0700 (PDT) Received: from pc.. ([41.206.42.66]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-39c0b6588d0sm11419167f8f.7.2025.03.31.08.38.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 31 Mar 2025 08:38:53 -0700 (PDT) From: Erick Karanja To: gregkh@linuxfoundation.org, outreachy@lists.linux.dev Cc: philipp.g.hortmann@gmail.com, linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org, Erick Karanja Subject: [PATCH 4/5] staging: rtl8723bs: no space before tabs Date: Mon, 31 Mar 2025 18:37:57 +0300 Message-ID: X-Mailer: git-send-email 2.43.0 In-Reply-To: References: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Remove spaces before tabs to comply with the Linux kernel coding style guidelines. Proper indentation using tabs improves code consistency and readability. Reported by checkpatch: WARNING: please, no space before tabs Signed-off-by: Erick Karanja --- drivers/staging/rtl8723bs/hal/hal_btcoex.c | 42 +++++++++++----------- 1 file changed, 21 insertions(+), 21 deletions(-) diff --git a/drivers/staging/rtl8723bs/hal/hal_btcoex.c b/drivers/staging/r= tl8723bs/hal/hal_btcoex.c index 9105594d2dde..b0e023d0435c 100644 --- a/drivers/staging/rtl8723bs/hal/hal_btcoex.c +++ b/drivers/staging/rtl8723bs/hal/hal_btcoex.c @@ -9,14 +9,14 @@ #include #include =20 -/* Global variables */ +/*Global variables */ =20 struct btc_coexist GLBtCoexist; static u8 GLBtcWiFiInScanState; static u8 GLBtcWiFiInIQKState; =20 /* */ -/* Debug related function */ +/*Debug related function */ /* */ static u8 halbtcoutsrc_IsBtCoexistAvailable(struct btc_coexist *pBtCoexist) { @@ -401,9 +401,9 @@ static u8 halbtcoutsrc_Get(void *pBtcContext, u8 getTyp= e, void *pOutBuf) =20 case BTC_GET_U1_MAC_PHY_MODE: *pu8 =3D BTC_SMSP; -/* *pU1Tmp =3D BTC_DMSP; */ -/* *pU1Tmp =3D BTC_DMDP; */ -/* *pU1Tmp =3D BTC_MP_UNKNOWN; */ +/* *pU1Tmp =3D BTC_DMSP; */ +/* *pU1Tmp =3D BTC_DMDP; */ +/* *pU1Tmp =3D BTC_MP_UNKNOWN; */ break; =20 case BTC_GET_U1_AP_NUM: @@ -561,7 +561,7 @@ static u8 halbtcoutsrc_Set(void *pBtcContext, u8 setTyp= e, void *pInBuf) } =20 /* */ -/* IO related function */ +/* IO related function */ /* */ static u8 halbtcoutsrc_Read1Byte(void *pBtcContext, u32 RegAddr) { @@ -772,7 +772,7 @@ static void halbtcoutsrc_FillH2cCmd(void *pBtcContext, = u8 elementId, u32 cmdLen, } =20 /* */ -/* Extern functions called by other module */ +/* Extern functions called by other module */ /* */ static u8 EXhalbtcoutsrc_BindBtCoexWithAdapter(void *padapter) { @@ -900,14 +900,14 @@ void EXhalbtcoutsrc_IpsNotify(struct btc_coexist *pBt= Coexist, u8 type) ipsType =3D BTC_IPS_ENTER; =20 /* All notify is called in cmd thread, don't need to leave low power aga= in */ -/* halbtcoutsrc_LeaveLowPower(pBtCoexist); */ + /* halbtcoutsrc_LeaveLowPower(pBtCoexist); */ =20 if (pBtCoexist->boardInfo.btdmAntNum =3D=3D 2) EXhalbtc8723b2ant_IpsNotify(pBtCoexist, ipsType); else if (pBtCoexist->boardInfo.btdmAntNum =3D=3D 1) EXhalbtc8723b1ant_IpsNotify(pBtCoexist, ipsType); =20 -/* halbtcoutsrc_NormalLowPower(pBtCoexist); */ + /* halbtcoutsrc_NormalLowPower(pBtCoexist); */ } =20 void EXhalbtcoutsrc_LpsNotify(struct btc_coexist *pBtCoexist, u8 type) @@ -952,14 +952,14 @@ void EXhalbtcoutsrc_ScanNotify(struct btc_coexist *pB= tCoexist, u8 type) } =20 /* All notify is called in cmd thread, don't need to leave low power aga= in */ -/* halbtcoutsrc_LeaveLowPower(pBtCoexist); */ + /* halbtcoutsrc_LeaveLowPower(pBtCoexist); */ =20 if (pBtCoexist->boardInfo.btdmAntNum =3D=3D 2) EXhalbtc8723b2ant_ScanNotify(pBtCoexist, scanType); else if (pBtCoexist->boardInfo.btdmAntNum =3D=3D 1) EXhalbtc8723b1ant_ScanNotify(pBtCoexist, scanType); =20 -/* halbtcoutsrc_NormalLowPower(pBtCoexist); */ + /* halbtcoutsrc_NormalLowPower(pBtCoexist); */ } =20 void EXhalbtcoutsrc_ConnectNotify(struct btc_coexist *pBtCoexist, u8 actio= n) @@ -978,14 +978,14 @@ void EXhalbtcoutsrc_ConnectNotify(struct btc_coexist = *pBtCoexist, u8 action) assoType =3D BTC_ASSOCIATE_FINISH; =20 /* All notify is called in cmd thread, don't need to leave low power aga= in */ -/* halbtcoutsrc_LeaveLowPower(pBtCoexist); */ + /* halbtcoutsrc_LeaveLowPower(pBtCoexist); */ =20 if (pBtCoexist->boardInfo.btdmAntNum =3D=3D 2) EXhalbtc8723b2ant_ConnectNotify(pBtCoexist, assoType); else if (pBtCoexist->boardInfo.btdmAntNum =3D=3D 1) EXhalbtc8723b1ant_ConnectNotify(pBtCoexist, assoType); =20 -/* halbtcoutsrc_NormalLowPower(pBtCoexist); */ + /* halbtcoutsrc_NormalLowPower(pBtCoexist); */ } =20 void EXhalbtcoutsrc_MediaStatusNotify(struct btc_coexist *pBtCoexist, enum @@ -1006,14 +1006,14 @@ void EXhalbtcoutsrc_MediaStatusNotify(struct btc_co= exist *pBtCoexist, enum mStatus =3D BTC_MEDIA_DISCONNECT; =20 /* All notify is called in cmd thread, don't need to leave low power aga= in */ -/* halbtcoutsrc_LeaveLowPower(pBtCoexist); */ + /* halbtcoutsrc_LeaveLowPower(pBtCoexist); */ =20 if (pBtCoexist->boardInfo.btdmAntNum =3D=3D 2) EXhalbtc8723b2ant_MediaStatusNotify(pBtCoexist, mStatus); else if (pBtCoexist->boardInfo.btdmAntNum =3D=3D 1) EXhalbtc8723b1ant_MediaStatusNotify(pBtCoexist, mStatus); =20 -/* halbtcoutsrc_NormalLowPower(pBtCoexist); */ + /* halbtcoutsrc_NormalLowPower(pBtCoexist); */ } =20 void EXhalbtcoutsrc_SpecialPacketNotify(struct btc_coexist *pBtCoexist, u8= pktType) @@ -1037,14 +1037,14 @@ void EXhalbtcoutsrc_SpecialPacketNotify(struct btc_= coexist *pBtCoexist, u8 pktTy } =20 /* All notify is called in cmd thread, don't need to leave low power aga= in */ -/* halbtcoutsrc_LeaveLowPower(pBtCoexist); */ + /* halbtcoutsrc_LeaveLowPower(pBtCoexist); */ =20 if (pBtCoexist->boardInfo.btdmAntNum =3D=3D 2) EXhalbtc8723b2ant_SpecialPacketNotify(pBtCoexist, packetType); else if (pBtCoexist->boardInfo.btdmAntNum =3D=3D 1) EXhalbtc8723b1ant_SpecialPacketNotify(pBtCoexist, packetType); =20 -/* halbtcoutsrc_NormalLowPower(pBtCoexist); */ + /* halbtcoutsrc_NormalLowPower(pBtCoexist); */ } =20 void EXhalbtcoutsrc_BtInfoNotify(struct btc_coexist *pBtCoexist, u8 *tmpBu= f, u8 length) @@ -1055,14 +1055,14 @@ void EXhalbtcoutsrc_BtInfoNotify(struct btc_coexist= *pBtCoexist, u8 *tmpBuf, u8 pBtCoexist->statistics.cntBtInfoNotify++; =20 /* All notify is called in cmd thread, don't need to leave low power aga= in */ -/* halbtcoutsrc_LeaveLowPower(pBtCoexist); */ + /* halbtcoutsrc_LeaveLowPower(pBtCoexist); */ =20 if (pBtCoexist->boardInfo.btdmAntNum =3D=3D 2) EXhalbtc8723b2ant_BtInfoNotify(pBtCoexist, tmpBuf, length); else if (pBtCoexist->boardInfo.btdmAntNum =3D=3D 1) EXhalbtc8723b1ant_BtInfoNotify(pBtCoexist, tmpBuf, length); =20 -/* halbtcoutsrc_NormalLowPower(pBtCoexist); */ + /* halbtcoutsrc_NormalLowPower(pBtCoexist); */ } =20 void EXhalbtcoutsrc_HaltNotify(struct btc_coexist *pBtCoexist) @@ -1102,14 +1102,14 @@ void EXhalbtcoutsrc_Periodical(struct btc_coexist *= pBtCoexist) =20 /* Periodical should be called in cmd thread, */ /* don't need to leave low power again */ -/* halbtcoutsrc_LeaveLowPower(pBtCoexist); */ + /* halbtcoutsrc_LeaveLowPower(pBtCoexist); */ =20 if (pBtCoexist->boardInfo.btdmAntNum =3D=3D 2) EXhalbtc8723b2ant_Periodical(pBtCoexist); else if (pBtCoexist->boardInfo.btdmAntNum =3D=3D 1) EXhalbtc8723b1ant_Periodical(pBtCoexist); =20 -/* halbtcoutsrc_NormalLowPower(pBtCoexist); */ + /* halbtcoutsrc_NormalLowPower(pBtCoexist); */ } =20 void EXhalbtcoutsrc_SetAntNum(u8 type, u8 antNum) --=20 2.43.0 From nobody Wed Dec 17 07:06:07 2025 Received: from mail-wm1-f41.google.com (mail-wm1-f41.google.com [209.85.128.41]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id E0910217F5C for ; Mon, 31 Mar 2025 15:39:10 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.41 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1743435556; cv=none; b=nm7KCPNUpDOJ2t79JznFHihzlAmsLHfAruEoklrb2Jw9rk0goCt3G9O7L6svsbx+Rhik4WSwuXaWs4KmHkD7zqr+mzPKEkSPbkt4CkWrKeq+77nim79d3SrcWsHHjhTZ558fcSCxEGRdL6f+fWM1ur9mJ44mAPOML5rMjh3Dl/s= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1743435556; c=relaxed/simple; bh=hlzmE8prqMc9nZzcnbktxRVznxIGQtp9lQLNTgqI1pc=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=GLVsiexelVyeZs8TZRyZ+8zBUdXz43bmp+z/tn23d6udlNj4/VkAUYYGlvifuuJknQXjHBdSbmA/ibjCcuzc6E4fMvi1UyRkhe6MFFBGb1DVeC0225iNgtcMFKycmmJ2wpYNPkqyA4Lo0/ItLXmRaMuWTwAC7TB7HKD+k/MI70g= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=mlM0pMYP; arc=none smtp.client-ip=209.85.128.41 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="mlM0pMYP" Received: by mail-wm1-f41.google.com with SMTP id 5b1f17b1804b1-43cf58eea0fso22312245e9.0 for ; Mon, 31 Mar 2025 08:39:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1743435549; x=1744040349; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=gBY1/kg4kjBJyP71RXqJVRWXiXwUXG4V5OuWsQC8Kok=; b=mlM0pMYPuOQDJ56c4B8ms10bJ0L66n5CztLhtNcbCxFd8+0K9JDub3alWM1EFEOO6V 8OPtgsIFNw4DjfwxFJ571wyqkIe9UN0V3alr0nricSYo6KzCffdZNbp4Sw3/PiTi4JFm uShXsRGALtupkjf2i3HgFaw2Ragqae/OeqvwjtAFitAY5Up/OkXmonJeQq0AJc63L9Zl iifE5URaKQSZSMgZE9j3ess51nFO08eV+CY72iSgJ1PBUWZYV6FsKbC5ZL7zAwy/pPjQ AVJH+thSV5a9+OJAGwdS4mTs/3RRu9KW9IGDFKeWvnCiNPjKKvkgjht/J7ftGyoLu+8e Ar7A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1743435549; x=1744040349; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=gBY1/kg4kjBJyP71RXqJVRWXiXwUXG4V5OuWsQC8Kok=; b=hFt2dAohAmXc5DzIV1aXU9H7LFYDy2b9ssbgvuI+ktKleek8yr0ao4j3dtBI0AgSUt WAUCDu9pnyOgwd5ItNJtOA/YRu/evn0Q1yopEzpf9BuMeZLNsWvTgTLsoZhDb2ks5T6h YDbjiKEYabrex8Kds3rd6bGJFKbhDGM3EqRbERytcw09SY4rEa6LLWY2kBtle0OchWVV 5ooWn9QR/Yw9n0rPJPF0x6GE4arwo4qFRJdSfNSXWsTrUVUfIrTqVXfKxnccN634d9J8 gzqGs/8FqZtg2OF6QSInIgyLvT0sBdX7r33dL/JGePdatMAzvdPvoJXRwaCgDPDRKpdc Tv3Q== X-Forwarded-Encrypted: i=1; AJvYcCUOg1nOKalVqeG801YIpwEUoptN+AfuTohvgLp9TzIr/3bAo8++pZfh85Rfngv3wsieZpxBmg5GAIEeBps=@vger.kernel.org X-Gm-Message-State: AOJu0Ywx2X6FST+EPkOcSoKb0Fqgie2xrKeU6Rhacd6jQSxeNwj/2zc/ yhPoXUDOYaOllM2siAsEFY9tQiBbgImKEPUrU04rZoayz7fFBt6X X-Gm-Gg: ASbGncvb0MTZ/qJIs82sQC0GVBD64EULCDJi1Xx7GNh3KOsKEOWxTmjH+zgb+PEu/ud fbKoOzXzV8ryC9LPqKmtUic/44dkRgnPwbkG8Aq69xJDzM+3Zlx9YXspzwo0PAMSOmxEOh5DAHv l5cCiM5ZIyzm1nGGhHaNHmZLi/WwAUSgpNdbXR8wt+Gbz4ifXgCpXoDa+qwF2LBprQN57dDOYEG IraxQISbFitUdSvraj88Pmsw11avMk2XY91KyKQPPeeGnA+lME9PmgFRfN+GYkgZYmqSbv6HQxp QZ4B1I+syaCCcP9YDgHrnnAfO8saUTrAgaIB7GA= X-Google-Smtp-Source: AGHT+IEsfHM96EjmgWjpSTMTf0pem0Jnd2H3rDePyDYYX21M03yMEyAEOrU+/505DbaTczjabxmYRw== X-Received: by 2002:a05:6000:1ace:b0:390:e1c5:fe2 with SMTP id ffacd0b85a97d-39c12117c44mr7199408f8f.38.1743435548573; Mon, 31 Mar 2025 08:39:08 -0700 (PDT) Received: from pc.. ([41.206.42.66]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-39c0b6588d0sm11419167f8f.7.2025.03.31.08.39.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 31 Mar 2025 08:39:07 -0700 (PDT) From: Erick Karanja To: gregkh@linuxfoundation.org, outreachy@lists.linux.dev Cc: philipp.g.hortmann@gmail.com, linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org, Erick Karanja Subject: [PATCH 5/5] staging: rtl8723bs: Rename variables Date: Mon, 31 Mar 2025 18:37:58 +0300 Message-ID: X-Mailer: git-send-email 2.43.0 In-Reply-To: References: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Rename variables to adhere to Linux kernel coding standards by using snake_case instead of CamelCase and ensure proper encoding of the variables by removing initial 'p' for pointers and initial 'b' for boolean. Fixes checkpatch.pl warning: CHECK: Avoid CamelCase: Signed-off-by: Erick Karanja --- .../staging/rtl8723bs/hal/HalBtc8723b1Ant.c | 1266 ++++++++--------- 1 file changed, 633 insertions(+), 633 deletions(-) diff --git a/drivers/staging/rtl8723bs/hal/HalBtc8723b1Ant.c b/drivers/stag= ing/rtl8723bs/hal/HalBtc8723b1Ant.c index b3d7f50fac4c..e3c67f98e8c0 100644 --- a/drivers/staging/rtl8723bs/hal/HalBtc8723b1Ant.c +++ b/drivers/staging/rtl8723bs/hal/HalBtc8723b1Ant.c @@ -16,74 +16,74 @@ static struct coex_sta_8723b_1ant *pCoexSta =3D &GLCoex= Sta8723b1Ant; /* local function proto type if needed */ /* local function start with halbtc8723b1ant_ */ static u8 halbtc8723b1ant_BtRssiState( - u8 levelNum, u8 rssiThresh, u8 rssiThresh1 + u8 level_num, u8 rssi_thresh, u8 rssi_thresh1 ) { - s32 btRssi =3D 0; - u8 btRssiState =3D pCoexSta->preBtRssiState; + s32 bt_rssi =3D 0; + u8 bt_rssi_state =3D pCoexSta->preBtRssiState; =20 - btRssi =3D pCoexSta->btRssi; + bt_rssi =3D pCoexSta->bt_rssi; =20 - if (levelNum =3D=3D 2) { + if (level_num =3D=3D 2) { if ( (pCoexSta->preBtRssiState =3D=3D BTC_RSSI_STATE_LOW) || (pCoexSta->preBtRssiState =3D=3D BTC_RSSI_STATE_STAY_LOW) ) { - if (btRssi >=3D (rssiThresh + BTC_RSSI_COEX_THRESH_TOL_8723B_1ANT)) + if (bt_rssi >=3D (rssi_thresh + BTC_RSSI_COEX_THRESH_TOL_8723B_1ANT)) =20 - btRssiState =3D BTC_RSSI_STATE_HIGH; + bt_rssi_state =3D BTC_RSSI_STATE_HIGH; else - btRssiState =3D BTC_RSSI_STATE_STAY_LOW; + bt_rssi_state =3D BTC_RSSI_STATE_STAY_LOW; } else { - if (btRssi < rssiThresh) - btRssiState =3D BTC_RSSI_STATE_LOW; + if (bt_rssi < rssi_thresh) + bt_rssi_state =3D BTC_RSSI_STATE_LOW; else - btRssiState =3D BTC_RSSI_STATE_STAY_HIGH; + bt_rssi_state =3D BTC_RSSI_STATE_STAY_HIGH; } - } else if (levelNum =3D=3D 3) { - if (rssiThresh > rssiThresh1) + } else if (level_num =3D=3D 3) { + if (rssi_thresh > rssi_thresh1) return pCoexSta->preBtRssiState; =20 if ( (pCoexSta->preBtRssiState =3D=3D BTC_RSSI_STATE_LOW) || (pCoexSta->preBtRssiState =3D=3D BTC_RSSI_STATE_STAY_LOW) ) { - if (btRssi >=3D (rssiThresh + BTC_RSSI_COEX_THRESH_TOL_8723B_1ANT)) - btRssiState =3D BTC_RSSI_STATE_MEDIUM; + if (bt_rssi >=3D (rssi_thresh + BTC_RSSI_COEX_THRESH_TOL_8723B_1ANT)) + bt_rssi_state =3D BTC_RSSI_STATE_MEDIUM; else - btRssiState =3D BTC_RSSI_STATE_STAY_LOW; + bt_rssi_state =3D BTC_RSSI_STATE_STAY_LOW; } else if ( (pCoexSta->preBtRssiState =3D=3D BTC_RSSI_STATE_MEDIUM) || (pCoexSta->preBtRssiState =3D=3D BTC_RSSI_STATE_STAY_MEDIUM) ) { - if (btRssi >=3D (rssiThresh1 + BTC_RSSI_COEX_THRESH_TOL_8723B_1ANT)) - btRssiState =3D BTC_RSSI_STATE_HIGH; - else if (btRssi < rssiThresh) - btRssiState =3D BTC_RSSI_STATE_LOW; + if (bt_rssi >=3D (rssi_thresh1 + BTC_RSSI_COEX_THRESH_TOL_8723B_1ANT)) + bt_rssi_state =3D BTC_RSSI_STATE_HIGH; + else if (bt_rssi < rssi_thresh) + bt_rssi_state =3D BTC_RSSI_STATE_LOW; else - btRssiState =3D BTC_RSSI_STATE_STAY_MEDIUM; + bt_rssi_state =3D BTC_RSSI_STATE_STAY_MEDIUM; } else { - if (btRssi < rssiThresh1) - btRssiState =3D BTC_RSSI_STATE_MEDIUM; + if (bt_rssi < rssi_thresh1) + bt_rssi_state =3D BTC_RSSI_STATE_MEDIUM; else - btRssiState =3D BTC_RSSI_STATE_STAY_HIGH; + bt_rssi_state =3D BTC_RSSI_STATE_STAY_HIGH; } } =20 - pCoexSta->preBtRssiState =3D btRssiState; + pCoexSta->preBtRssiState =3D bt_rssi_state; =20 - return btRssiState; + return bt_rssi_state; } =20 static void halbtc8723b1ant_UpdateRaMask( - struct btc_coexist *pBtCoexist, bool bForceExec, u32 disRateMask + struct btc_coexist *bt_coexist, bool force_exec, u32 dis_rate_mask ) { - pCoexDm->curRaMask =3D disRateMask; + pCoexDm->curRaMask =3D dis_rate_mask; =20 - if (bForceExec || (pCoexDm->preRaMask !=3D pCoexDm->curRaMask)) - pBtCoexist->fBtcSet( - pBtCoexist, + if (force_exec || (pCoexDm->preRaMask !=3D pCoexDm->curRaMask)) + bt_coexist->fBtcSet( + bt_coexist, BTC_SET_ACT_UPDATE_RAMASK, &pCoexDm->curRaMask ); @@ -91,33 +91,33 @@ static void halbtc8723b1ant_UpdateRaMask( } =20 static void halbtc8723b1ant_AutoRateFallbackRetry( - struct btc_coexist *pBtCoexist, bool bForceExec, u8 type + struct btc_coexist *bt_coexist, bool force_exec, u8 type ) { - bool bWifiUnderBMode =3D false; + bool wifi_under_b_mode =3D false; =20 pCoexDm->curArfrType =3D type; =20 - if (bForceExec || (pCoexDm->preArfrType !=3D pCoexDm->curArfrType)) { + if (force_exec || (pCoexDm->preArfrType !=3D pCoexDm->curArfrType)) { switch (pCoexDm->curArfrType) { case 0: /* normal mode */ - pBtCoexist->fBtcWrite4Byte( - pBtCoexist, 0x430, pCoexDm->backupArfrCnt1 + bt_coexist->fBtcWrite4Byte( + bt_coexist, 0x430, pCoexDm->backupArfrCnt1 ); - pBtCoexist->fBtcWrite4Byte( - pBtCoexist, 0x434, pCoexDm->backupArfrCnt2 + bt_coexist->fBtcWrite4Byte( + bt_coexist, 0x434, pCoexDm->backupArfrCnt2 ); break; case 1: - pBtCoexist->fBtcGet( - pBtCoexist, BTC_GET_BL_WIFI_UNDER_B_MODE, &bWifiUnderBMode + bt_coexist->fBtcGet( + bt_coexist, BTC_GET_BL_WIFI_UNDER_B_MODE, &wifi_under_b_mode ); - if (bWifiUnderBMode) { - pBtCoexist->fBtcWrite4Byte(pBtCoexist, 0x430, 0x0); - pBtCoexist->fBtcWrite4Byte(pBtCoexist, 0x434, 0x01010101); + if (wifi_under_b_mode) { + bt_coexist->fBtcWrite4Byte(bt_coexist, 0x430, 0x0); + bt_coexist->fBtcWrite4Byte(bt_coexist, 0x434, 0x01010101); } else { - pBtCoexist->fBtcWrite4Byte(pBtCoexist, 0x430, 0x0); - pBtCoexist->fBtcWrite4Byte(pBtCoexist, 0x434, 0x04030201); + bt_coexist->fBtcWrite4Byte(bt_coexist, 0x430, 0x0); + bt_coexist->fBtcWrite4Byte(bt_coexist, 0x434, 0x04030201); } break; default: @@ -129,23 +129,23 @@ static void halbtc8723b1ant_AutoRateFallbackRetry( } =20 static void halbtc8723b1ant_RetryLimit( - struct btc_coexist *pBtCoexist, bool bForceExec, u8 type + struct btc_coexist *bt_coexist, bool force_exec, u8 type ) { pCoexDm->curRetryLimitType =3D type; =20 if ( - bForceExec || + force_exec || (pCoexDm->preRetryLimitType !=3D pCoexDm->curRetryLimitType) ) { switch (pCoexDm->curRetryLimitType) { case 0: /* normal mode */ - pBtCoexist->fBtcWrite2Byte( - pBtCoexist, 0x42a, pCoexDm->backupRetryLimit + bt_coexist->fBtcWrite2Byte( + bt_coexist, 0x42a, pCoexDm->backupRetryLimit ); break; case 1: /* retry limit =3D8 */ - pBtCoexist->fBtcWrite2Byte(pBtCoexist, 0x42a, 0x0808); + bt_coexist->fBtcWrite2Byte(bt_coexist, 0x42a, 0x0808); break; default: break; @@ -156,22 +156,22 @@ static void halbtc8723b1ant_RetryLimit( } =20 static void halbtc8723b1ant_AmpduMaxTime( - struct btc_coexist *pBtCoexist, bool bForceExec, u8 type + struct btc_coexist *bt_coexist, bool force_exec, u8 type ) { pCoexDm->curAmpduTimeType =3D type; =20 if ( - bForceExec || (pCoexDm->preAmpduTimeType !=3D pCoexDm->curAmpduTimeType) + force_exec || (pCoexDm->preAmpduTimeType !=3D pCoexDm->curAmpduTimeType) ) { switch (pCoexDm->curAmpduTimeType) { case 0: /* normal mode */ - pBtCoexist->fBtcWrite1Byte( - pBtCoexist, 0x456, pCoexDm->backupAmpduMaxTime + bt_coexist->fBtcWrite1Byte( + bt_coexist, 0x456, pCoexDm->backupAmpduMaxTime ); break; case 1: /* AMPDU timw =3D 0x38 * 32us */ - pBtCoexist->fBtcWrite1Byte(pBtCoexist, 0x456, 0x38); + bt_coexist->fBtcWrite1Byte(bt_coexist, 0x456, 0x38); break; default: break; @@ -182,64 +182,64 @@ static void halbtc8723b1ant_AmpduMaxTime( } =20 static void halbtc8723b1ant_LimitedTx( - struct btc_coexist *pBtCoexist, - bool bForceExec, - u8 raMaskType, - u8 arfrType, - u8 retryLimitType, - u8 ampduTimeType + struct btc_coexist *bt_coexist, + bool force_exec, + u8 ra_mask_type, + u8 arfr_type, + u8 retry_limit_type, + u8 ampdu_time_type ) { - switch (raMaskType) { + switch (ra_mask_type) { case 0: /* normal mode */ - halbtc8723b1ant_UpdateRaMask(pBtCoexist, bForceExec, 0x0); + halbtc8723b1ant_UpdateRaMask(bt_coexist, force_exec, 0x0); break; case 1: /* disable cck 1/2 */ - halbtc8723b1ant_UpdateRaMask(pBtCoexist, bForceExec, 0x00000003); + halbtc8723b1ant_UpdateRaMask(bt_coexist, force_exec, 0x00000003); break; case 2: /* disable cck 1/2/5.5, ofdm 6/9/12/18/24, mcs 0/1/2/3/4 */ - halbtc8723b1ant_UpdateRaMask(pBtCoexist, bForceExec, 0x0001f1f7); + halbtc8723b1ant_UpdateRaMask(bt_coexist, force_exec, 0x0001f1f7); break; default: break; } =20 - halbtc8723b1ant_AutoRateFallbackRetry(pBtCoexist, bForceExec, arfrType); - halbtc8723b1ant_RetryLimit(pBtCoexist, bForceExec, retryLimitType); - halbtc8723b1ant_AmpduMaxTime(pBtCoexist, bForceExec, ampduTimeType); + halbtc8723b1ant_AutoRateFallbackRetry(bt_coexist, force_exec, arfr_type); + halbtc8723b1ant_RetryLimit(bt_coexist, force_exec, retry_limit_type); + halbtc8723b1ant_AmpduMaxTime(bt_coexist, force_exec, ampdu_time_type); } =20 static void halbtc8723b1ant_LimitedRx( - struct btc_coexist *pBtCoexist, - bool bForceExec, - bool bRejApAggPkt, - bool bBtCtrlAggBufSize, - u8 aggBufSize + struct btc_coexist *bt_coexist, + bool force_exec, + bool rej_ap_agg_pkt, + bool bt_ctrl_agg_buf_size, + u8 agg_buf_size ) { - bool bRejectRxAgg =3D bRejApAggPkt; - bool bBtCtrlRxAggSize =3D bBtCtrlAggBufSize; - u8 rxAggSize =3D aggBufSize; + bool bRejectRxAgg =3D rej_ap_agg_pkt; + bool bBtCtrlRxAggSize =3D bt_ctrl_agg_buf_size; + u8 rxAggSize =3D agg_buf_size; =20 /* */ /* Rx Aggregation related setting */ /* */ - pBtCoexist->fBtcSet( - pBtCoexist, BTC_SET_BL_TO_REJ_AP_AGG_PKT, &bRejectRxAgg + bt_coexist->fBtcSet( + bt_coexist, BTC_SET_BL_TO_REJ_AP_AGG_PKT, &bRejectRxAgg ); /* decide BT control aggregation buf size or not */ - pBtCoexist->fBtcSet( - pBtCoexist, BTC_SET_BL_BT_CTRL_AGG_SIZE, &bBtCtrlRxAggSize + bt_coexist->fBtcSet( + bt_coexist, BTC_SET_BL_BT_CTRL_AGG_SIZE, &bBtCtrlRxAggSize ); /* aggregation buf size, only work when BT control Rx aggregation size. = */ - pBtCoexist->fBtcSet(pBtCoexist, BTC_SET_U1_AGG_BUF_SIZE, &rxAggSize); + bt_coexist->fBtcSet(bt_coexist, BTC_SET_U1_AGG_BUF_SIZE, &rxAggSize); /* real update aggregation setting */ - pBtCoexist->fBtcSet(pBtCoexist, BTC_SET_ACT_AGGREGATE_CTRL, NULL); + bt_coexist->fBtcSet(bt_coexist, BTC_SET_ACT_AGGREGATE_CTRL, NULL); =20 =20 } =20 -static void halbtc8723b1ant_QueryBtInfo(struct btc_coexist *pBtCoexist) +static void halbtc8723b1ant_QueryBtInfo(struct btc_coexist *bt_coexist) { u8 H2C_Parameter[1] =3D {0}; =20 @@ -247,17 +247,17 @@ static void halbtc8723b1ant_QueryBtInfo(struct btc_co= exist *pBtCoexist) =20 H2C_Parameter[0] |=3D BIT0; /* trigger */ =20 - pBtCoexist->fBtcFillH2c(pBtCoexist, 0x61, 1, H2C_Parameter); + bt_coexist->fBtcFillH2c(bt_coexist, 0x61, 1, H2C_Parameter); } =20 -static void halbtc8723b1ant_MonitorBtCtr(struct btc_coexist *pBtCoexist) +static void halbtc8723b1ant_MonitorBtCtr(struct btc_coexist *bt_coexist) { u32 regHPTxRx, regLPTxRx, u4Tmp; u32 regHPTx =3D 0, regHPRx =3D 0, regLPTx =3D 0, regLPRx =3D 0; static u8 NumOfBtCounterChk; =20 /* to avoid 0x76e[3] =3D 1 (WLAN_Act control by PTA) during IPS */ - /* if (! (pBtCoexist->fBtcRead1Byte(pBtCoexist, 0x76e) & 0x8)) */ + /* if (! (bt_coexist->fBtcRead1Byte(bt_coexist, 0x76e) & 0x8)) */ =20 if (pCoexSta->bUnderIps) { pCoexSta->highPriorityTx =3D 65535; @@ -270,11 +270,11 @@ static void halbtc8723b1ant_MonitorBtCtr(struct btc_c= oexist *pBtCoexist) regHPTxRx =3D 0x770; regLPTxRx =3D 0x774; =20 - u4Tmp =3D pBtCoexist->fBtcRead4Byte(pBtCoexist, regHPTxRx); + u4Tmp =3D bt_coexist->fBtcRead4Byte(bt_coexist, regHPTxRx); regHPTx =3D u4Tmp & bMaskLWord; regHPRx =3D (u4Tmp & bMaskHWord) >> 16; =20 - u4Tmp =3D pBtCoexist->fBtcRead4Byte(pBtCoexist, regLPTxRx); + u4Tmp =3D bt_coexist->fBtcRead4Byte(bt_coexist, regLPTxRx); regLPTx =3D u4Tmp & bMaskLWord; regLPRx =3D (u4Tmp & bMaskHWord) >> 16; =20 @@ -287,28 +287,28 @@ static void halbtc8723b1ant_MonitorBtCtr(struct btc_c= oexist *pBtCoexist) pCoexSta->popEventCnt++; =20 /* reset counter */ - pBtCoexist->fBtcWrite1Byte(pBtCoexist, 0x76e, 0xc); + bt_coexist->fBtcWrite1Byte(bt_coexist, 0x76e, 0xc); =20 if ((regHPTx =3D=3D 0) && (regHPRx =3D=3D 0) && (regLPTx =3D=3D 0) && (re= gLPRx =3D=3D 0)) { NumOfBtCounterChk++; if (NumOfBtCounterChk >=3D 3) { - halbtc8723b1ant_QueryBtInfo(pBtCoexist); + halbtc8723b1ant_QueryBtInfo(bt_coexist); NumOfBtCounterChk =3D 0; } } } =20 =20 -static void halbtc8723b1ant_MonitorWiFiCtr(struct btc_coexist *pBtCoexist) +static void halbtc8723b1ant_MonitorWiFiCtr(struct btc_coexist *bt_coexist) { - s32 wifiRssi =3D 0; - bool bWifiBusy =3D false, bWifiUnderBMode =3D false; + s32 wifi_rssi =3D 0; + bool wifi_busy =3D false, wifi_under_b_mode =3D false; static u8 nCCKLockCounter; =20 - pBtCoexist->fBtcGet(pBtCoexist, BTC_GET_BL_WIFI_BUSY, &bWifiBusy); - pBtCoexist->fBtcGet(pBtCoexist, BTC_GET_S4_WIFI_RSSI, &wifiRssi); - pBtCoexist->fBtcGet( - pBtCoexist, BTC_GET_BL_WIFI_UNDER_B_MODE, &bWifiUnderBMode + bt_coexist->fBtcGet(bt_coexist, BTC_GET_BL_WIFI_BUSY, &wifi_busy); + bt_coexist->fBtcGet(bt_coexist, BTC_GET_S4_WIFI_RSSI, &wifi_rssi); + bt_coexist->fBtcGet( + bt_coexist, BTC_GET_BL_WIFI_UNDER_B_MODE, &wifi_under_b_mode ); =20 if (pCoexSta->bUnderIps) { @@ -322,23 +322,23 @@ static void halbtc8723b1ant_MonitorWiFiCtr(struct btc= _coexist *pBtCoexist) pCoexSta->nCRCErr_11n =3D 0; pCoexSta->nCRCErr_11nAgg =3D 0; } else { - pCoexSta->nCRCOK_CCK =3D pBtCoexist->fBtcRead4Byte(pBtCoexist, 0xf88); - pCoexSta->nCRCOK_11g =3D pBtCoexist->fBtcRead2Byte(pBtCoexist, 0xf94); - pCoexSta->nCRCOK_11n =3D pBtCoexist->fBtcRead2Byte(pBtCoexist, 0xf90); - pCoexSta->nCRCOK_11nAgg =3D pBtCoexist->fBtcRead2Byte(pBtCoexist, 0xfb8); + pCoexSta->nCRCOK_CCK =3D bt_coexist->fBtcRead4Byte(bt_coexist, 0xf88); + pCoexSta->nCRCOK_11g =3D bt_coexist->fBtcRead2Byte(bt_coexist, 0xf94); + pCoexSta->nCRCOK_11n =3D bt_coexist->fBtcRead2Byte(bt_coexist, 0xf90); + pCoexSta->nCRCOK_11nAgg =3D bt_coexist->fBtcRead2Byte(bt_coexist, 0xfb8); =20 - pCoexSta->nCRCErr_CCK =3D pBtCoexist->fBtcRead4Byte(pBtCoexist, 0xf84); - pCoexSta->nCRCErr_11g =3D pBtCoexist->fBtcRead2Byte(pBtCoexist, 0xf96); - pCoexSta->nCRCErr_11n =3D pBtCoexist->fBtcRead2Byte(pBtCoexist, 0xf92); - pCoexSta->nCRCErr_11nAgg =3D pBtCoexist->fBtcRead2Byte(pBtCoexist, 0xfba= ); + pCoexSta->nCRCErr_CCK =3D bt_coexist->fBtcRead4Byte(bt_coexist, 0xf84); + pCoexSta->nCRCErr_11g =3D bt_coexist->fBtcRead2Byte(bt_coexist, 0xf96); + pCoexSta->nCRCErr_11n =3D bt_coexist->fBtcRead2Byte(bt_coexist, 0xf92); + pCoexSta->nCRCErr_11nAgg =3D bt_coexist->fBtcRead2Byte(bt_coexist, 0xfba= ); } =20 =20 /* reset counter */ - pBtCoexist->fBtcWrite1ByteBitMask(pBtCoexist, 0xf16, 0x1, 0x1); - pBtCoexist->fBtcWrite1ByteBitMask(pBtCoexist, 0xf16, 0x1, 0x0); + bt_coexist->fBtcWrite1ByteBitMask(bt_coexist, 0xf16, 0x1, 0x1); + bt_coexist->fBtcWrite1ByteBitMask(bt_coexist, 0xf16, 0x1, 0x0); =20 - if (bWifiBusy && (wifiRssi >=3D 30) && !bWifiUnderBMode) { + if (wifi_busy && (wifi_rssi >=3D 30) && !wifi_under_b_mode) { if ( (pCoexDm->btStatus =3D=3D BT_8723B_1ANT_BT_STATUS_ACL_BUSY) || (pCoexDm->btStatus =3D=3D BT_8723B_1ANT_BT_STATUS_ACL_SCO_BUSY) || @@ -385,24 +385,24 @@ static void halbtc8723b1ant_MonitorWiFiCtr(struct btc= _coexist *pBtCoexist) =20 } =20 -static bool halbtc8723b1ant_IsWifiStatusChanged(struct btc_coexist *pBtCoe= xist) +static bool halbtc8723b1ant_IsWifiStatusChanged(struct btc_coexist *bt_coe= xist) { static bool bPreWifiBusy, bPreUnder4way, bPreBtHsOn; - bool bWifiBusy =3D false, bUnder4way =3D false, bBtHsOn =3D false; + bool wifi_busy =3D false, bUnder4way =3D false, bBtHsOn =3D false; bool bWifiConnected =3D false; =20 - pBtCoexist->fBtcGet( - pBtCoexist, BTC_GET_BL_WIFI_CONNECTED, &bWifiConnected + bt_coexist->fBtcGet( + bt_coexist, BTC_GET_BL_WIFI_CONNECTED, &bWifiConnected ); - pBtCoexist->fBtcGet(pBtCoexist, BTC_GET_BL_WIFI_BUSY, &bWifiBusy); - pBtCoexist->fBtcGet(pBtCoexist, BTC_GET_BL_HS_OPERATION, &bBtHsOn); - pBtCoexist->fBtcGet( - pBtCoexist, BTC_GET_BL_WIFI_4_WAY_PROGRESS, &bUnder4way + bt_coexist->fBtcGet(bt_coexist, BTC_GET_BL_WIFI_BUSY, &wifi_busy); + bt_coexist->fBtcGet(bt_coexist, BTC_GET_BL_HS_OPERATION, &bBtHsOn); + bt_coexist->fBtcGet( + bt_coexist, BTC_GET_BL_WIFI_4_WAY_PROGRESS, &bUnder4way ); =20 if (bWifiConnected) { - if (bWifiBusy !=3D bPreWifiBusy) { - bPreWifiBusy =3D bWifiBusy; + if (wifi_busy !=3D bPreWifiBusy) { + bPreWifiBusy =3D wifi_busy; return true; } =20 @@ -420,12 +420,12 @@ static bool halbtc8723b1ant_IsWifiStatusChanged(struc= t btc_coexist *pBtCoexist) return false; } =20 -static void halbtc8723b1ant_UpdateBtLinkInfo(struct btc_coexist *pBtCoexis= t) +static void halbtc8723b1ant_UpdateBtLinkInfo(struct btc_coexist *bt_coexis= t) { - struct btc_bt_link_info *pBtLinkInfo =3D &pBtCoexist->btLinkInfo; + struct btc_bt_link_info *pBtLinkInfo =3D &bt_coexist->btLinkInfo; bool bBtHsOn =3D false; =20 - pBtCoexist->fBtcGet(pBtCoexist, BTC_GET_BL_HS_OPERATION, &bBtHsOn); + bt_coexist->fBtcGet(bt_coexist, BTC_GET_BL_HS_OPERATION, &bBtHsOn); =20 pBtLinkInfo->bBtLinkExist =3D pCoexSta->bBtLinkExist; pBtLinkInfo->bScoExist =3D pCoexSta->bScoExist; @@ -484,14 +484,14 @@ static void halbtc8723b1ant_UpdateBtLinkInfo(struct b= tc_coexist *pBtCoexist) pBtLinkInfo->bHidOnly =3D false; } =20 -static u8 halbtc8723b1ant_ActionAlgorithm(struct btc_coexist *pBtCoexist) +static u8 halbtc8723b1ant_ActionAlgorithm(struct btc_coexist *bt_coexist) { - struct btc_bt_link_info *pBtLinkInfo =3D &pBtCoexist->btLinkInfo; + struct btc_bt_link_info *pBtLinkInfo =3D &bt_coexist->btLinkInfo; bool bBtHsOn =3D false; u8 algorithm =3D BT_8723B_1ANT_COEX_ALGO_UNDEFINED; u8 numOfDiffProfile =3D 0; =20 - pBtCoexist->fBtcGet(pBtCoexist, BTC_GET_BL_HS_OPERATION, &bBtHsOn); + bt_coexist->fBtcGet(bt_coexist, BTC_GET_BL_HS_OPERATION, &bBtHsOn); =20 if (!pBtLinkInfo->bBtLinkExist) return algorithm; @@ -594,7 +594,7 @@ static u8 halbtc8723b1ant_ActionAlgorithm(struct btc_co= exist *pBtCoexist) } =20 static void halbtc8723b1ant_SetSwPenaltyTxRateAdaptive( - struct btc_coexist *pBtCoexist, bool bLowPenaltyRa + struct btc_coexist *bt_coexist, bool bLowPenaltyRa ) { u8 H2C_Parameter[6] =3D {0}; @@ -609,46 +609,46 @@ static void halbtc8723b1ant_SetSwPenaltyTxRateAdaptiv= e( H2C_Parameter[5] =3D 0xf9; /* MCS5 or OFDM36 */ } =20 - pBtCoexist->fBtcFillH2c(pBtCoexist, 0x69, 6, H2C_Parameter); + bt_coexist->fBtcFillH2c(bt_coexist, 0x69, 6, H2C_Parameter); } =20 static void halbtc8723b1ant_LowPenaltyRa( - struct btc_coexist *pBtCoexist, bool bForceExec, bool bLowPenaltyRa + struct btc_coexist *bt_coexist, bool force_exec, bool bLowPenaltyRa ) { pCoexDm->bCurLowPenaltyRa =3D bLowPenaltyRa; =20 - if (!bForceExec) { + if (!force_exec) { if (pCoexDm->bPreLowPenaltyRa =3D=3D pCoexDm->bCurLowPenaltyRa) return; } halbtc8723b1ant_SetSwPenaltyTxRateAdaptive( - pBtCoexist, pCoexDm->bCurLowPenaltyRa + bt_coexist, pCoexDm->bCurLowPenaltyRa ); =20 pCoexDm->bPreLowPenaltyRa =3D pCoexDm->bCurLowPenaltyRa; } =20 static void halbtc8723b1ant_SetCoexTable( - struct btc_coexist *pBtCoexist, + struct btc_coexist *bt_coexist, u32 val0x6c0, u32 val0x6c4, u32 val0x6c8, u8 val0x6cc ) { - pBtCoexist->fBtcWrite4Byte(pBtCoexist, 0x6c0, val0x6c0); + bt_coexist->fBtcWrite4Byte(bt_coexist, 0x6c0, val0x6c0); =20 - pBtCoexist->fBtcWrite4Byte(pBtCoexist, 0x6c4, val0x6c4); + bt_coexist->fBtcWrite4Byte(bt_coexist, 0x6c4, val0x6c4); =20 - pBtCoexist->fBtcWrite4Byte(pBtCoexist, 0x6c8, val0x6c8); + bt_coexist->fBtcWrite4Byte(bt_coexist, 0x6c8, val0x6c8); =20 - pBtCoexist->fBtcWrite1Byte(pBtCoexist, 0x6cc, val0x6cc); + bt_coexist->fBtcWrite1Byte(bt_coexist, 0x6cc, val0x6cc); } =20 static void halbtc8723b1ant_CoexTable( - struct btc_coexist *pBtCoexist, - bool bForceExec, + struct btc_coexist *bt_coexist, + bool force_exec, u32 val0x6c0, u32 val0x6c4, u32 val0x6c8, @@ -660,7 +660,7 @@ static void halbtc8723b1ant_CoexTable( pCoexDm->curVal0x6c8 =3D val0x6c8; pCoexDm->curVal0x6cc =3D val0x6cc; =20 - if (!bForceExec) { + if (!force_exec) { if ( (pCoexDm->preVal0x6c0 =3D=3D pCoexDm->curVal0x6c0) && (pCoexDm->preVal0x6c4 =3D=3D pCoexDm->curVal0x6c4) && @@ -671,7 +671,7 @@ static void halbtc8723b1ant_CoexTable( } =20 halbtc8723b1ant_SetCoexTable( - pBtCoexist, val0x6c0, val0x6c4, val0x6c8, val0x6cc + bt_coexist, val0x6c0, val0x6c4, val0x6c8, val0x6cc ); =20 pCoexDm->preVal0x6c0 =3D pCoexDm->curVal0x6c0; @@ -681,7 +681,7 @@ static void halbtc8723b1ant_CoexTable( } =20 static void halbtc8723b1ant_CoexTableWithType( - struct btc_coexist *pBtCoexist, bool bForceExec, u8 type + struct btc_coexist *bt_coexist, bool force_exec, u8 type ) { pCoexSta->nCoexTableType =3D type; @@ -689,42 +689,42 @@ static void halbtc8723b1ant_CoexTableWithType( switch (type) { case 0: halbtc8723b1ant_CoexTable( - pBtCoexist, bForceExec, 0x55555555, 0x55555555, 0xffffff, 0x3 + bt_coexist, force_exec, 0x55555555, 0x55555555, 0xffffff, 0x3 ); break; case 1: halbtc8723b1ant_CoexTable( - pBtCoexist, bForceExec, 0x55555555, 0x5a5a5a5a, 0xffffff, 0x3 + bt_coexist, force_exec, 0x55555555, 0x5a5a5a5a, 0xffffff, 0x3 ); break; case 2: halbtc8723b1ant_CoexTable( - pBtCoexist, bForceExec, 0x5a5a5a5a, 0x5a5a5a5a, 0xffffff, 0x3 + bt_coexist, force_exec, 0x5a5a5a5a, 0x5a5a5a5a, 0xffffff, 0x3 ); break; case 3: halbtc8723b1ant_CoexTable( - pBtCoexist, bForceExec, 0xaaaa5555, 0xaaaa5a5a, 0xffffff, 0x3 + bt_coexist, force_exec, 0xaaaa5555, 0xaaaa5a5a, 0xffffff, 0x3 ); break; case 4: halbtc8723b1ant_CoexTable( - pBtCoexist, bForceExec, 0x55555555, 0xaaaa5a5a, 0xffffff, 0x3 + bt_coexist, force_exec, 0x55555555, 0xaaaa5a5a, 0xffffff, 0x3 ); break; case 5: halbtc8723b1ant_CoexTable( - pBtCoexist, bForceExec, 0x5a5a5a5a, 0xaaaa5a5a, 0xffffff, 0x3 + bt_coexist, force_exec, 0x5a5a5a5a, 0xaaaa5a5a, 0xffffff, 0x3 ); break; case 6: halbtc8723b1ant_CoexTable( - pBtCoexist, bForceExec, 0x55555555, 0xaaaaaaaa, 0xffffff, 0x3 + bt_coexist, force_exec, 0x55555555, 0xaaaaaaaa, 0xffffff, 0x3 ); break; case 7: halbtc8723b1ant_CoexTable( - pBtCoexist, bForceExec, 0xaaaaaaaa, 0xaaaaaaaa, 0xffffff, 0x3 + bt_coexist, force_exec, 0xaaaaaaaa, 0xaaaaaaaa, 0xffffff, 0x3 ); break; default: @@ -733,7 +733,7 @@ static void halbtc8723b1ant_CoexTableWithType( } =20 static void halbtc8723b1ant_SetFwIgnoreWlanAct( - struct btc_coexist *pBtCoexist, bool bEnable + struct btc_coexist *bt_coexist, bool bEnable ) { u8 H2C_Parameter[1] =3D {0}; @@ -741,43 +741,43 @@ static void halbtc8723b1ant_SetFwIgnoreWlanAct( if (bEnable) H2C_Parameter[0] |=3D BIT0; /* function enable */ =20 - pBtCoexist->fBtcFillH2c(pBtCoexist, 0x63, 1, H2C_Parameter); + bt_coexist->fBtcFillH2c(bt_coexist, 0x63, 1, H2C_Parameter); } =20 static void halbtc8723b1ant_IgnoreWlanAct( - struct btc_coexist *pBtCoexist, bool bForceExec, bool bEnable + struct btc_coexist *bt_coexist, bool force_exec, bool bEnable ) { pCoexDm->bCurIgnoreWlanAct =3D bEnable; =20 - if (!bForceExec) { + if (!force_exec) { if (pCoexDm->bPreIgnoreWlanAct =3D=3D pCoexDm->bCurIgnoreWlanAct) return; } - halbtc8723b1ant_SetFwIgnoreWlanAct(pBtCoexist, bEnable); + halbtc8723b1ant_SetFwIgnoreWlanAct(bt_coexist, bEnable); =20 pCoexDm->bPreIgnoreWlanAct =3D pCoexDm->bCurIgnoreWlanAct; } =20 static void halbtc8723b1ant_SetLpsRpwm( - struct btc_coexist *pBtCoexist, u8 lpsVal, u8 rpwmVal + struct btc_coexist *bt_coexist, u8 lpsVal, u8 rpwmVal ) { u8 lps =3D lpsVal; u8 rpwm =3D rpwmVal; =20 - pBtCoexist->fBtcSet(pBtCoexist, BTC_SET_U1_LPS_VAL, &lps); - pBtCoexist->fBtcSet(pBtCoexist, BTC_SET_U1_RPWM_VAL, &rpwm); + bt_coexist->fBtcSet(bt_coexist, BTC_SET_U1_LPS_VAL, &lps); + bt_coexist->fBtcSet(bt_coexist, BTC_SET_U1_RPWM_VAL, &rpwm); } =20 static void halbtc8723b1ant_LpsRpwm( - struct btc_coexist *pBtCoexist, bool bForceExec, u8 lpsVal, u8 rpwmVal + struct btc_coexist *bt_coexist, bool force_exec, u8 lpsVal, u8 rpwmVal ) { pCoexDm->curLps =3D lpsVal; pCoexDm->curRpwm =3D rpwmVal; =20 - if (!bForceExec) { + if (!force_exec) { if ( (pCoexDm->preLps =3D=3D pCoexDm->curLps) && (pCoexDm->preRpwm =3D=3D pCoexDm->curRpwm) @@ -785,89 +785,89 @@ static void halbtc8723b1ant_LpsRpwm( return; } } - halbtc8723b1ant_SetLpsRpwm(pBtCoexist, lpsVal, rpwmVal); + halbtc8723b1ant_SetLpsRpwm(bt_coexist, lpsVal, rpwmVal); =20 pCoexDm->preLps =3D pCoexDm->curLps; pCoexDm->preRpwm =3D pCoexDm->curRpwm; } =20 static void halbtc8723b1ant_SwMechanism( - struct btc_coexist *pBtCoexist, bool bLowPenaltyRA + struct btc_coexist *bt_coexist, bool bLowPenaltyRA ) { - halbtc8723b1ant_LowPenaltyRa(pBtCoexist, NORMAL_EXEC, bLowPenaltyRA); + halbtc8723b1ant_LowPenaltyRa(bt_coexist, NORMAL_EXEC, bLowPenaltyRA); } =20 static void halbtc8723b1ant_SetAntPath( - struct btc_coexist *pBtCoexist, u8 antPosType, bool bInitHwCfg, bool bWif= iOff + struct btc_coexist *bt_coexist, u8 antPosType, bool bInitHwCfg, bool bWif= iOff ) { - struct btc_board_info *pBoardInfo =3D &pBtCoexist->boardInfo; + struct btc_board_info *pBoardInfo =3D &bt_coexist->boardInfo; u32 fwVer =3D 0, u4Tmp =3D 0, cntBtCalChk =3D 0; bool bPgExtSwitch =3D false; bool bUseExtSwitch =3D false; bool bIsInMpMode =3D false; u8 H2C_Parameter[2] =3D {0}, u1Tmp =3D 0; =20 - pBtCoexist->fBtcGet(pBtCoexist, BTC_GET_BL_EXT_SWITCH, &bPgExtSwitch); - pBtCoexist->fBtcGet(pBtCoexist, BTC_GET_U4_WIFI_FW_VER, &fwVer); /* [31:= 16]=3Dfw ver, [15:0]=3Dfw sub ver */ + bt_coexist->fBtcGet(bt_coexist, BTC_GET_BL_EXT_SWITCH, &bPgExtSwitch); + bt_coexist->fBtcGet(bt_coexist, BTC_GET_U4_WIFI_FW_VER, &fwVer); /* [31:= 16]=3Dfw ver, [15:0]=3Dfw sub ver */ =20 if ((fwVer > 0 && fwVer < 0xc0000) || bPgExtSwitch) bUseExtSwitch =3D true; =20 if (bInitHwCfg) { - pBtCoexist->fBtcSetRfReg(pBtCoexist, BTC_RF_A, 0x1, 0xfffff, 0x780); /* = WiFi TRx Mask on */ - pBtCoexist->fBtcSetBtReg(pBtCoexist, BTC_BT_REG_RF, 0x3c, 0x15); /* BT T= Rx Mask on */ + bt_coexist->fBtcSetRfReg(bt_coexist, BTC_RF_A, 0x1, 0xfffff, 0x780); /* = WiFi TRx Mask on */ + bt_coexist->fBtcSetBtReg(bt_coexist, BTC_BT_REG_RF, 0x3c, 0x15); /* BT T= Rx Mask on */ =20 if (fwVer >=3D 0x180000) { /* Use H2C to set GNT_BT to HIGH */ H2C_Parameter[0] =3D 1; - pBtCoexist->fBtcFillH2c(pBtCoexist, 0x6E, 1, H2C_Parameter); + bt_coexist->fBtcFillH2c(bt_coexist, 0x6E, 1, H2C_Parameter); } else /* set grant_bt to high */ - pBtCoexist->fBtcWrite1Byte(pBtCoexist, 0x765, 0x18); + bt_coexist->fBtcWrite1Byte(bt_coexist, 0x765, 0x18); =20 /* set wlan_act control by PTA */ - pBtCoexist->fBtcWrite1Byte(pBtCoexist, 0x76e, 0x4); + bt_coexist->fBtcWrite1Byte(bt_coexist, 0x76e, 0x4); =20 - pBtCoexist->fBtcWrite1ByteBitMask(pBtCoexist, 0x67, 0x20, 0x1); /* BT se= lect s0/s1 is controlled by WiFi */ + bt_coexist->fBtcWrite1ByteBitMask(bt_coexist, 0x67, 0x20, 0x1); /* BT se= lect s0/s1 is controlled by WiFi */ =20 - pBtCoexist->fBtcWrite1ByteBitMask(pBtCoexist, 0x39, 0x8, 0x1); - pBtCoexist->fBtcWrite1Byte(pBtCoexist, 0x974, 0xff); - pBtCoexist->fBtcWrite1ByteBitMask(pBtCoexist, 0x944, 0x3, 0x3); - pBtCoexist->fBtcWrite1Byte(pBtCoexist, 0x930, 0x77); + bt_coexist->fBtcWrite1ByteBitMask(bt_coexist, 0x39, 0x8, 0x1); + bt_coexist->fBtcWrite1Byte(bt_coexist, 0x974, 0xff); + bt_coexist->fBtcWrite1ByteBitMask(bt_coexist, 0x944, 0x3, 0x3); + bt_coexist->fBtcWrite1Byte(bt_coexist, 0x930, 0x77); } else if (bWifiOff) { if (fwVer >=3D 0x180000) { /* Use H2C to set GNT_BT to HIGH */ H2C_Parameter[0] =3D 1; - pBtCoexist->fBtcFillH2c(pBtCoexist, 0x6E, 1, H2C_Parameter); + bt_coexist->fBtcFillH2c(bt_coexist, 0x6E, 1, H2C_Parameter); } else /* set grant_bt to high */ - pBtCoexist->fBtcWrite1Byte(pBtCoexist, 0x765, 0x18); + bt_coexist->fBtcWrite1Byte(bt_coexist, 0x765, 0x18); =20 /* set wlan_act to always low */ - pBtCoexist->fBtcWrite1Byte(pBtCoexist, 0x76e, 0x4); + bt_coexist->fBtcWrite1Byte(bt_coexist, 0x76e, 0x4); =20 - pBtCoexist->fBtcGet(pBtCoexist, BTC_GET_BL_WIFI_IS_IN_MP_MODE, &bIsInMpM= ode); + bt_coexist->fBtcGet(bt_coexist, BTC_GET_BL_WIFI_IS_IN_MP_MODE, &bIsInMpM= ode); if (!bIsInMpMode) - pBtCoexist->fBtcWrite1ByteBitMask(pBtCoexist, 0x67, 0x20, 0x0); /* BT s= elect s0/s1 is controlled by BT */ + bt_coexist->fBtcWrite1ByteBitMask(bt_coexist, 0x67, 0x20, 0x0); /* BT s= elect s0/s1 is controlled by BT */ else - pBtCoexist->fBtcWrite1ByteBitMask(pBtCoexist, 0x67, 0x20, 0x1); /* BT s= elect s0/s1 is controlled by WiFi */ + bt_coexist->fBtcWrite1ByteBitMask(bt_coexist, 0x67, 0x20, 0x1); /* BT s= elect s0/s1 is controlled by WiFi */ =20 /* 0x4c[24:23]=3D 00, Set Antenna control by BT_RFE_CTRL BT Vendor 0xac= =3D 0xf002 */ - u4Tmp =3D pBtCoexist->fBtcRead4Byte(pBtCoexist, 0x4c); + u4Tmp =3D bt_coexist->fBtcRead4Byte(bt_coexist, 0x4c); u4Tmp &=3D ~BIT23; u4Tmp &=3D ~BIT24; - pBtCoexist->fBtcWrite4Byte(pBtCoexist, 0x4c, u4Tmp); + bt_coexist->fBtcWrite4Byte(bt_coexist, 0x4c, u4Tmp); } else { /* Use H2C to set GNT_BT to LOW */ if (fwVer >=3D 0x180000) { - if (pBtCoexist->fBtcRead1Byte(pBtCoexist, 0x765) !=3D 0) { + if (bt_coexist->fBtcRead1Byte(bt_coexist, 0x765) !=3D 0) { H2C_Parameter[0] =3D 0; - pBtCoexist->fBtcFillH2c(pBtCoexist, 0x6E, 1, H2C_Parameter); + bt_coexist->fBtcFillH2c(bt_coexist, 0x6E, 1, H2C_Parameter); } } else { /* BT calibration check */ while (cntBtCalChk <=3D 20) { - u1Tmp =3D pBtCoexist->fBtcRead1Byte(pBtCoexist, 0x49d); + u1Tmp =3D bt_coexist->fBtcRead1Byte(bt_coexist, 0x49d); cntBtCalChk++; =20 if (u1Tmp & BIT0) @@ -877,34 +877,34 @@ static void halbtc8723b1ant_SetAntPath( } =20 /* set grant_bt to PTA */ - pBtCoexist->fBtcWrite1Byte(pBtCoexist, 0x765, 0x0); + bt_coexist->fBtcWrite1Byte(bt_coexist, 0x765, 0x0); } =20 - if (pBtCoexist->fBtcRead1Byte(pBtCoexist, 0x76e) !=3D 0xc) + if (bt_coexist->fBtcRead1Byte(bt_coexist, 0x76e) !=3D 0xc) /* set wlan_act control by PTA */ - pBtCoexist->fBtcWrite1Byte(pBtCoexist, 0x76e, 0xc); + bt_coexist->fBtcWrite1Byte(bt_coexist, 0x76e, 0xc); } =20 if (bUseExtSwitch) { if (bInitHwCfg) { /* 0x4c[23]=3D 0, 0x4c[24]=3D 1 Antenna control by WL/BT */ - u4Tmp =3D pBtCoexist->fBtcRead4Byte(pBtCoexist, 0x4c); + u4Tmp =3D bt_coexist->fBtcRead4Byte(bt_coexist, 0x4c); u4Tmp &=3D ~BIT23; u4Tmp |=3D BIT24; - pBtCoexist->fBtcWrite4Byte(pBtCoexist, 0x4c, u4Tmp); + bt_coexist->fBtcWrite4Byte(bt_coexist, 0x4c, u4Tmp); =20 - pBtCoexist->fBtcWrite4Byte(pBtCoexist, 0x948, 0x0); /* fixed internal = switch S1->WiFi, S0->BT */ + bt_coexist->fBtcWrite4Byte(bt_coexist, 0x948, 0x0); /* fixed internal = switch S1->WiFi, S0->BT */ =20 if (pBoardInfo->btdmAntPos =3D=3D BTC_ANTENNA_AT_MAIN_PORT) { /* tell firmware "no antenna inverse" */ H2C_Parameter[0] =3D 0; H2C_Parameter[1] =3D 1; /* ext switch type */ - pBtCoexist->fBtcFillH2c(pBtCoexist, 0x65, 2, H2C_Parameter); + bt_coexist->fBtcFillH2c(bt_coexist, 0x65, 2, H2C_Parameter); } else { /* tell firmware "antenna inverse" */ H2C_Parameter[0] =3D 1; H2C_Parameter[1] =3D 1; /* ext switch type */ - pBtCoexist->fBtcFillH2c(pBtCoexist, 0x65, 2, H2C_Parameter); + bt_coexist->fBtcFillH2c(bt_coexist, 0x65, 2, H2C_Parameter); } } =20 @@ -913,48 +913,48 @@ static void halbtc8723b1ant_SetAntPath( switch (antPosType) { case BTC_ANT_PATH_WIFI: if (pBoardInfo->btdmAntPos =3D=3D BTC_ANTENNA_AT_MAIN_PORT) - pBtCoexist->fBtcWrite1ByteBitMask(pBtCoexist, 0x92c, 0x3, 0x1); + bt_coexist->fBtcWrite1ByteBitMask(bt_coexist, 0x92c, 0x3, 0x1); else - pBtCoexist->fBtcWrite1ByteBitMask(pBtCoexist, 0x92c, 0x3, 0x2); + bt_coexist->fBtcWrite1ByteBitMask(bt_coexist, 0x92c, 0x3, 0x2); break; case BTC_ANT_PATH_BT: if (pBoardInfo->btdmAntPos =3D=3D BTC_ANTENNA_AT_MAIN_PORT) - pBtCoexist->fBtcWrite1ByteBitMask(pBtCoexist, 0x92c, 0x3, 0x2); + bt_coexist->fBtcWrite1ByteBitMask(bt_coexist, 0x92c, 0x3, 0x2); else - pBtCoexist->fBtcWrite1ByteBitMask(pBtCoexist, 0x92c, 0x3, 0x1); + bt_coexist->fBtcWrite1ByteBitMask(bt_coexist, 0x92c, 0x3, 0x1); break; default: case BTC_ANT_PATH_PTA: if (pBoardInfo->btdmAntPos =3D=3D BTC_ANTENNA_AT_MAIN_PORT) - pBtCoexist->fBtcWrite1ByteBitMask(pBtCoexist, 0x92c, 0x3, 0x1); + bt_coexist->fBtcWrite1ByteBitMask(bt_coexist, 0x92c, 0x3, 0x1); else - pBtCoexist->fBtcWrite1ByteBitMask(pBtCoexist, 0x92c, 0x3, 0x2); + bt_coexist->fBtcWrite1ByteBitMask(bt_coexist, 0x92c, 0x3, 0x2); break; } =20 } else { if (bInitHwCfg) { /* 0x4c[23]=3D 1, 0x4c[24]=3D 0 Antenna control by 0x64 */ - u4Tmp =3D pBtCoexist->fBtcRead4Byte(pBtCoexist, 0x4c); + u4Tmp =3D bt_coexist->fBtcRead4Byte(bt_coexist, 0x4c); u4Tmp |=3D BIT23; u4Tmp &=3D ~BIT24; - pBtCoexist->fBtcWrite4Byte(pBtCoexist, 0x4c, u4Tmp); + bt_coexist->fBtcWrite4Byte(bt_coexist, 0x4c, u4Tmp); =20 /* Fix Ext switch Main->S1, Aux->S0 */ - pBtCoexist->fBtcWrite1ByteBitMask(pBtCoexist, 0x64, 0x1, 0x0); + bt_coexist->fBtcWrite1ByteBitMask(bt_coexist, 0x64, 0x1, 0x0); =20 if (pBoardInfo->btdmAntPos =3D=3D BTC_ANTENNA_AT_MAIN_PORT) { =20 /* tell firmware "no antenna inverse" */ H2C_Parameter[0] =3D 0; H2C_Parameter[1] =3D 0; /* internal switch type */ - pBtCoexist->fBtcFillH2c(pBtCoexist, 0x65, 2, H2C_Parameter); + bt_coexist->fBtcFillH2c(bt_coexist, 0x65, 2, H2C_Parameter); } else { =20 /* tell firmware "antenna inverse" */ H2C_Parameter[0] =3D 1; H2C_Parameter[1] =3D 0; /* internal switch type */ - pBtCoexist->fBtcFillH2c(pBtCoexist, 0x65, 2, H2C_Parameter); + bt_coexist->fBtcFillH2c(bt_coexist, 0x65, 2, H2C_Parameter); } } =20 @@ -963,36 +963,36 @@ static void halbtc8723b1ant_SetAntPath( switch (antPosType) { case BTC_ANT_PATH_WIFI: if (pBoardInfo->btdmAntPos =3D=3D BTC_ANTENNA_AT_MAIN_PORT) - pBtCoexist->fBtcWrite4Byte(pBtCoexist, 0x948, 0x0); + bt_coexist->fBtcWrite4Byte(bt_coexist, 0x948, 0x0); else - pBtCoexist->fBtcWrite4Byte(pBtCoexist, 0x948, 0x280); + bt_coexist->fBtcWrite4Byte(bt_coexist, 0x948, 0x280); break; case BTC_ANT_PATH_BT: if (pBoardInfo->btdmAntPos =3D=3D BTC_ANTENNA_AT_MAIN_PORT) - pBtCoexist->fBtcWrite4Byte(pBtCoexist, 0x948, 0x280); + bt_coexist->fBtcWrite4Byte(bt_coexist, 0x948, 0x280); else - pBtCoexist->fBtcWrite4Byte(pBtCoexist, 0x948, 0x0); + bt_coexist->fBtcWrite4Byte(bt_coexist, 0x948, 0x0); break; default: case BTC_ANT_PATH_PTA: if (pBoardInfo->btdmAntPos =3D=3D BTC_ANTENNA_AT_MAIN_PORT) - pBtCoexist->fBtcWrite4Byte(pBtCoexist, 0x948, 0x200); + bt_coexist->fBtcWrite4Byte(bt_coexist, 0x948, 0x200); else - pBtCoexist->fBtcWrite4Byte(pBtCoexist, 0x948, 0x80); + bt_coexist->fBtcWrite4Byte(bt_coexist, 0x948, 0x80); break; } } } =20 static void halbtc8723b1ant_SetFwPstdma( - struct btc_coexist *pBtCoexist, u8 byte1, u8 byte2, u8 byte3, u8 byte4, u= 8 byte5 + struct btc_coexist *bt_coexist, u8 byte1, u8 byte2, u8 byte3, u8 byte4, u= 8 byte5 ) { u8 H2C_Parameter[5] =3D {0}; u8 realByte1 =3D byte1, realByte5 =3D byte5; bool bApEnable =3D false; =20 - pBtCoexist->fBtcGet(pBtCoexist, BTC_GET_BL_WIFI_AP_MODE_ENABLE, &bApEnabl= e); + bt_coexist->fBtcGet(bt_coexist, BTC_GET_BL_WIFI_AP_MODE_ENABLE, &bApEnabl= e); =20 if (bApEnable) { if (byte1 & BIT4 && !(byte1 & BIT5)) { @@ -1016,16 +1016,16 @@ static void halbtc8723b1ant_SetFwPstdma( pCoexDm->psTdmaPara[3] =3D byte4; pCoexDm->psTdmaPara[4] =3D realByte5; =20 - pBtCoexist->fBtcFillH2c(pBtCoexist, 0x60, 5, H2C_Parameter); + bt_coexist->fBtcFillH2c(bt_coexist, 0x60, 5, H2C_Parameter); } =20 =20 static void halbtc8723b1ant_PsTdma( - struct btc_coexist *pBtCoexist, bool bForceExec, bool bTurnOn, u8 type + struct btc_coexist *bt_coexist, bool force_exec, bool bTurnOn, u8 type ) { - struct btc_bt_link_info *pBtLinkInfo =3D &pBtCoexist->btLinkInfo; - bool bWifiBusy =3D false; + struct btc_bt_link_info *pBtLinkInfo =3D &bt_coexist->btLinkInfo; + bool wifi_busy =3D false; u8 rssiAdjustVal =3D 0; u8 psTdmaByte4Val =3D 0x50, psTdmaByte0Val =3D 0x51, psTdmaByte3Val =3D = 0x10; s8 nWiFiDurationAdjust =3D 0x0; @@ -1034,9 +1034,9 @@ static void halbtc8723b1ant_PsTdma( pCoexDm->bCurPsTdmaOn =3D bTurnOn; pCoexDm->curPsTdma =3D type; =20 - pBtCoexist->fBtcGet(pBtCoexist, BTC_GET_BL_WIFI_BUSY, &bWifiBusy); + bt_coexist->fBtcGet(bt_coexist, BTC_GET_BL_WIFI_BUSY, &wifi_busy); =20 - if (!bForceExec) { + if (!force_exec) { if ( (pCoexDm->bPrePsTdmaOn =3D=3D pCoexDm->bCurPsTdmaOn) && (pCoexDm->prePsTdma =3D=3D pCoexDm->curPsTdma) @@ -1066,12 +1066,12 @@ static void halbtc8723b1ant_PsTdma( switch (type) { default: halbtc8723b1ant_SetFwPstdma( - pBtCoexist, 0x51, 0x1a, 0x1a, 0x0, psTdmaByte4Val + bt_coexist, 0x51, 0x1a, 0x1a, 0x0, psTdmaByte4Val ); break; case 1: halbtc8723b1ant_SetFwPstdma( - pBtCoexist, + bt_coexist, psTdmaByte0Val, 0x3a + nWiFiDurationAdjust, 0x03, @@ -1081,7 +1081,7 @@ static void halbtc8723b1ant_PsTdma( break; case 2: halbtc8723b1ant_SetFwPstdma( - pBtCoexist, + bt_coexist, psTdmaByte0Val, 0x2d + nWiFiDurationAdjust, 0x03, @@ -1091,35 +1091,35 @@ static void halbtc8723b1ant_PsTdma( break; case 3: halbtc8723b1ant_SetFwPstdma( - pBtCoexist, 0x51, 0x1d, 0x1d, 0x0, 0x10 + bt_coexist, 0x51, 0x1d, 0x1d, 0x0, 0x10 ); break; case 4: halbtc8723b1ant_SetFwPstdma( - pBtCoexist, 0x93, 0x15, 0x3, 0x14, 0x0 + bt_coexist, 0x93, 0x15, 0x3, 0x14, 0x0 ); break; case 5: halbtc8723b1ant_SetFwPstdma( - pBtCoexist, 0x61, 0x15, 0x3, 0x11, 0x10 + bt_coexist, 0x61, 0x15, 0x3, 0x11, 0x10 ); break; case 6: halbtc8723b1ant_SetFwPstdma( - pBtCoexist, 0x61, 0x20, 0x3, 0x11, 0x11 + bt_coexist, 0x61, 0x20, 0x3, 0x11, 0x11 ); break; case 7: - halbtc8723b1ant_SetFwPstdma(pBtCoexist, 0x13, 0xc, 0x5, 0x0, 0x0); + halbtc8723b1ant_SetFwPstdma(bt_coexist, 0x13, 0xc, 0x5, 0x0, 0x0); break; case 8: halbtc8723b1ant_SetFwPstdma( - pBtCoexist, 0x93, 0x25, 0x3, 0x10, 0x0 + bt_coexist, 0x93, 0x25, 0x3, 0x10, 0x0 ); break; case 9: halbtc8723b1ant_SetFwPstdma( - pBtCoexist, + bt_coexist, psTdmaByte0Val, 0x21, 0x3, @@ -1128,11 +1128,11 @@ static void halbtc8723b1ant_PsTdma( ); break; case 10: - halbtc8723b1ant_SetFwPstdma(pBtCoexist, 0x13, 0xa, 0xa, 0x0, 0x40); + halbtc8723b1ant_SetFwPstdma(bt_coexist, 0x13, 0xa, 0xa, 0x0, 0x40); break; case 11: halbtc8723b1ant_SetFwPstdma( - pBtCoexist, + bt_coexist, psTdmaByte0Val, 0x21, 0x03, @@ -1142,124 +1142,124 @@ static void halbtc8723b1ant_PsTdma( break; case 12: halbtc8723b1ant_SetFwPstdma( - pBtCoexist, 0x51, 0x0a, 0x0a, 0x0, 0x50 + bt_coexist, 0x51, 0x0a, 0x0a, 0x0, 0x50 ); break; case 13: halbtc8723b1ant_SetFwPstdma( - pBtCoexist, 0x51, 0x12, 0x12, 0x0, 0x10 + bt_coexist, 0x51, 0x12, 0x12, 0x0, 0x10 ); break; case 14: halbtc8723b1ant_SetFwPstdma( - pBtCoexist, 0x51, 0x21, 0x3, 0x10, psTdmaByte4Val + bt_coexist, 0x51, 0x21, 0x3, 0x10, psTdmaByte4Val ); break; case 15: halbtc8723b1ant_SetFwPstdma( - pBtCoexist, 0x13, 0xa, 0x3, 0x8, 0x0 + bt_coexist, 0x13, 0xa, 0x3, 0x8, 0x0 ); break; case 16: halbtc8723b1ant_SetFwPstdma( - pBtCoexist, 0x93, 0x15, 0x3, 0x10, 0x0 + bt_coexist, 0x93, 0x15, 0x3, 0x10, 0x0 ); break; case 18: halbtc8723b1ant_SetFwPstdma( - pBtCoexist, 0x93, 0x25, 0x3, 0x10, 0x0 + bt_coexist, 0x93, 0x25, 0x3, 0x10, 0x0 ); break; case 20: halbtc8723b1ant_SetFwPstdma( - pBtCoexist, 0x61, 0x3f, 0x03, 0x11, 0x10 + bt_coexist, 0x61, 0x3f, 0x03, 0x11, 0x10 =20 ); break; case 21: halbtc8723b1ant_SetFwPstdma( - pBtCoexist, 0x61, 0x25, 0x03, 0x11, 0x11 + bt_coexist, 0x61, 0x25, 0x03, 0x11, 0x11 ); break; case 22: halbtc8723b1ant_SetFwPstdma( - pBtCoexist, 0x61, 0x25, 0x03, 0x11, 0x10 + bt_coexist, 0x61, 0x25, 0x03, 0x11, 0x10 ); break; case 23: halbtc8723b1ant_SetFwPstdma( - pBtCoexist, 0xe3, 0x25, 0x3, 0x31, 0x18 + bt_coexist, 0xe3, 0x25, 0x3, 0x31, 0x18 ); break; case 24: halbtc8723b1ant_SetFwPstdma( - pBtCoexist, 0xe3, 0x15, 0x3, 0x31, 0x18 + bt_coexist, 0xe3, 0x15, 0x3, 0x31, 0x18 ); break; case 25: halbtc8723b1ant_SetFwPstdma( - pBtCoexist, 0xe3, 0xa, 0x3, 0x31, 0x18 + bt_coexist, 0xe3, 0xa, 0x3, 0x31, 0x18 ); break; case 26: halbtc8723b1ant_SetFwPstdma( - pBtCoexist, 0xe3, 0xa, 0x3, 0x31, 0x18 + bt_coexist, 0xe3, 0xa, 0x3, 0x31, 0x18 ); break; case 27: halbtc8723b1ant_SetFwPstdma( - pBtCoexist, 0xe3, 0x25, 0x3, 0x31, 0x98 + bt_coexist, 0xe3, 0x25, 0x3, 0x31, 0x98 ); break; case 28: halbtc8723b1ant_SetFwPstdma( - pBtCoexist, 0x69, 0x25, 0x3, 0x31, 0x0 + bt_coexist, 0x69, 0x25, 0x3, 0x31, 0x0 ); break; case 29: halbtc8723b1ant_SetFwPstdma( - pBtCoexist, 0xab, 0x1a, 0x1a, 0x1, 0x10 + bt_coexist, 0xab, 0x1a, 0x1a, 0x1, 0x10 ); break; case 30: halbtc8723b1ant_SetFwPstdma( - pBtCoexist, 0x51, 0x30, 0x3, 0x10, 0x10 + bt_coexist, 0x51, 0x30, 0x3, 0x10, 0x10 ); break; case 31: halbtc8723b1ant_SetFwPstdma( - pBtCoexist, 0xd3, 0x1a, 0x1a, 0x0, 0x58 + bt_coexist, 0xd3, 0x1a, 0x1a, 0x0, 0x58 ); break; case 32: halbtc8723b1ant_SetFwPstdma( - pBtCoexist, 0x61, 0x35, 0x3, 0x11, 0x11 + bt_coexist, 0x61, 0x35, 0x3, 0x11, 0x11 ); break; case 33: halbtc8723b1ant_SetFwPstdma( - pBtCoexist, 0xa3, 0x25, 0x3, 0x30, 0x90 + bt_coexist, 0xa3, 0x25, 0x3, 0x30, 0x90 ); break; case 34: halbtc8723b1ant_SetFwPstdma( - pBtCoexist, 0x53, 0x1a, 0x1a, 0x0, 0x10 + bt_coexist, 0x53, 0x1a, 0x1a, 0x0, 0x10 ); break; case 35: halbtc8723b1ant_SetFwPstdma( - pBtCoexist, 0x63, 0x1a, 0x1a, 0x0, 0x10 + bt_coexist, 0x63, 0x1a, 0x1a, 0x0, 0x10 ); break; case 36: halbtc8723b1ant_SetFwPstdma( - pBtCoexist, 0xd3, 0x12, 0x3, 0x14, 0x50 + bt_coexist, 0xd3, 0x12, 0x3, 0x14, 0x50 ); break; case 40: /* SoftAP only with no sta associated, BT disable , TDMA mode = for power saving */ /* here softap mode screen off will cost 70-80mA for phone */ halbtc8723b1ant_SetFwPstdma( - pBtCoexist, 0x23, 0x18, 0x00, 0x10, 0x24 + bt_coexist, 0x23, 0x18, 0x00, 0x10, 0x24 ); break; } @@ -1268,30 +1268,30 @@ static void halbtc8723b1ant_PsTdma( /* disable PS tdma */ switch (type) { case 8: /* PTA Control */ - halbtc8723b1ant_SetFwPstdma(pBtCoexist, 0x8, 0x0, 0x0, 0x0, 0x0); + halbtc8723b1ant_SetFwPstdma(bt_coexist, 0x8, 0x0, 0x0, 0x0, 0x0); halbtc8723b1ant_SetAntPath( - pBtCoexist, BTC_ANT_PATH_PTA, false, false + bt_coexist, BTC_ANT_PATH_PTA, false, false ); break; case 0: default: /* Software control, Antenna at BT side */ - halbtc8723b1ant_SetFwPstdma(pBtCoexist, 0x0, 0x0, 0x0, 0x0, 0x0); + halbtc8723b1ant_SetFwPstdma(bt_coexist, 0x0, 0x0, 0x0, 0x0, 0x0); halbtc8723b1ant_SetAntPath( - pBtCoexist, BTC_ANT_PATH_BT, false, false + bt_coexist, BTC_ANT_PATH_BT, false, false ); break; case 9: /* Software control, Antenna at WiFi side */ - halbtc8723b1ant_SetFwPstdma(pBtCoexist, 0x0, 0x0, 0x0, 0x0, 0x0); + halbtc8723b1ant_SetFwPstdma(bt_coexist, 0x0, 0x0, 0x0, 0x0, 0x0); halbtc8723b1ant_SetAntPath( - pBtCoexist, BTC_ANT_PATH_WIFI, false, false + bt_coexist, BTC_ANT_PATH_WIFI, false, false ); break; } } =20 rssiAdjustVal =3D 0; - pBtCoexist->fBtcSet( - pBtCoexist, BTC_SET_U1_RSSI_ADJ_VAL_FOR_1ANT_COEX_TYPE, &rssiAdjustVal + bt_coexist->fBtcSet( + bt_coexist, BTC_SET_U1_RSSI_ADJ_VAL_FOR_1ANT_COEX_TYPE, &rssiAdjustVal ); =20 /* update pre state */ @@ -1299,46 +1299,46 @@ static void halbtc8723b1ant_PsTdma( pCoexDm->prePsTdma =3D pCoexDm->curPsTdma; } =20 -static bool halbtc8723b1ant_IsCommonAction(struct btc_coexist *pBtCoexist) +static bool halbtc8723b1ant_IsCommonAction(struct btc_coexist *bt_coexist) { - bool bCommon =3D false, bWifiConnected =3D false, bWifiBusy =3D false; + bool bCommon =3D false, bWifiConnected =3D false, wifi_busy =3D false; =20 - pBtCoexist->fBtcGet(pBtCoexist, BTC_GET_BL_WIFI_CONNECTED, &bWifiConnecte= d); - pBtCoexist->fBtcGet(pBtCoexist, BTC_GET_BL_WIFI_BUSY, &bWifiBusy); + bt_coexist->fBtcGet(bt_coexist, BTC_GET_BL_WIFI_CONNECTED, &bWifiConnecte= d); + bt_coexist->fBtcGet(bt_coexist, BTC_GET_BL_WIFI_BUSY, &wifi_busy); =20 if ( !bWifiConnected && pCoexDm->btStatus =3D=3D BT_8723B_1ANT_BT_STATUS_NON_CONNECTED_IDLE ) { - /* halbtc8723b1ant_SwMechanism(pBtCoexist, false); */ + /* halbtc8723b1ant_SwMechanism(bt_coexist, false); */ =20 bCommon =3D true; } else if ( bWifiConnected && (pCoexDm->btStatus =3D=3D BT_8723B_1ANT_BT_STATUS_NON_CONNECTED_IDLE) ) { - /* halbtc8723b1ant_SwMechanism(pBtCoexist, false); */ + /* halbtc8723b1ant_SwMechanism(bt_coexist, false); */ =20 bCommon =3D true; } else if ( !bWifiConnected && (pCoexDm->btStatus =3D=3D BT_8723B_1ANT_BT_STATUS_CONNECTED_IDLE) ) { - /* halbtc8723b1ant_SwMechanism(pBtCoexist, false); */ + /* halbtc8723b1ant_SwMechanism(bt_coexist, false); */ =20 bCommon =3D true; } else if ( bWifiConnected && (pCoexDm->btStatus =3D=3D BT_8723B_1ANT_BT_STATUS_CONNECTED_IDLE) ) { - /* halbtc8723b1ant_SwMechanism(pBtCoexist, false); */ + /* halbtc8723b1ant_SwMechanism(bt_coexist, false); */ =20 bCommon =3D true; } else if ( !bWifiConnected && (pCoexDm->btStatus !=3D BT_8723B_1ANT_BT_STATUS_CONNECTED_IDLE) ) { - /* halbtc8723b1ant_SwMechanism(pBtCoexist, false); */ + /* halbtc8723b1ant_SwMechanism(bt_coexist, false); */ =20 bCommon =3D true; } else { @@ -1350,7 +1350,7 @@ static bool halbtc8723b1ant_IsCommonAction(struct btc= _coexist *pBtCoexist) =20 =20 static void halbtc8723b1ant_TdmaDurationAdjustForAcl( - struct btc_coexist *pBtCoexist, u8 wifiStatus + struct btc_coexist *bt_coexist, u8 wifiStatus ) { static s32 up, dn, m, n, WaitCount; @@ -1368,7 +1368,7 @@ static void halbtc8723b1ant_TdmaDurationAdjustForAcl( pCoexDm->curPsTdma !=3D 3 && pCoexDm->curPsTdma !=3D 9 ) { - halbtc8723b1ant_PsTdma(pBtCoexist, NORMAL_EXEC, true, 9); + halbtc8723b1ant_PsTdma(bt_coexist, NORMAL_EXEC, true, 9); pCoexDm->psTdmaDuAdjType =3D 9; =20 up =3D 0; @@ -1384,7 +1384,7 @@ static void halbtc8723b1ant_TdmaDurationAdjustForAcl( if (!pCoexDm->bAutoTdmaAdjust) { pCoexDm->bAutoTdmaAdjust =3D true; =20 - halbtc8723b1ant_PsTdma(pBtCoexist, NORMAL_EXEC, true, 2); + halbtc8723b1ant_PsTdma(bt_coexist, NORMAL_EXEC, true, 2); pCoexDm->psTdmaDuAdjType =3D 2; /* */ up =3D 0; @@ -1461,16 +1461,16 @@ static void halbtc8723b1ant_TdmaDurationAdjustForAc= l( BT_INFO_8723B_1ANT_A2DP_BASIC_RATE(btInfoExt) && ((pCoexDm->curPsTdma =3D=3D 1) || (pCoexDm->curPsTdma =3D=3D 2)) ) { - halbtc8723b1ant_PsTdma(pBtCoexist, NORMAL_EXEC, true, 9); + halbtc8723b1ant_PsTdma(bt_coexist, NORMAL_EXEC, true, 9); pCoexDm->psTdmaDuAdjType =3D 9; } else if (pCoexDm->curPsTdma =3D=3D 1) { - halbtc8723b1ant_PsTdma(pBtCoexist, NORMAL_EXEC, true, 2); + halbtc8723b1ant_PsTdma(bt_coexist, NORMAL_EXEC, true, 2); pCoexDm->psTdmaDuAdjType =3D 2; } else if (pCoexDm->curPsTdma =3D=3D 2) { - halbtc8723b1ant_PsTdma(pBtCoexist, NORMAL_EXEC, true, 9); + halbtc8723b1ant_PsTdma(bt_coexist, NORMAL_EXEC, true, 9); pCoexDm->psTdmaDuAdjType =3D 9; } else if (pCoexDm->curPsTdma =3D=3D 9) { - halbtc8723b1ant_PsTdma(pBtCoexist, NORMAL_EXEC, true, 11); + halbtc8723b1ant_PsTdma(bt_coexist, NORMAL_EXEC, true, 11); pCoexDm->psTdmaDuAdjType =3D 11; } } else if (result =3D=3D 1) { @@ -1478,16 +1478,16 @@ static void halbtc8723b1ant_TdmaDurationAdjustForAc= l( BT_INFO_8723B_1ANT_A2DP_BASIC_RATE(btInfoExt) && ((pCoexDm->curPsTdma =3D=3D 1) || (pCoexDm->curPsTdma =3D=3D 2)) ) { - halbtc8723b1ant_PsTdma(pBtCoexist, NORMAL_EXEC, true, 9); + halbtc8723b1ant_PsTdma(bt_coexist, NORMAL_EXEC, true, 9); pCoexDm->psTdmaDuAdjType =3D 9; } else if (pCoexDm->curPsTdma =3D=3D 11) { - halbtc8723b1ant_PsTdma(pBtCoexist, NORMAL_EXEC, true, 9); + halbtc8723b1ant_PsTdma(bt_coexist, NORMAL_EXEC, true, 9); pCoexDm->psTdmaDuAdjType =3D 9; } else if (pCoexDm->curPsTdma =3D=3D 9) { - halbtc8723b1ant_PsTdma(pBtCoexist, NORMAL_EXEC, true, 2); + halbtc8723b1ant_PsTdma(bt_coexist, NORMAL_EXEC, true, 2); pCoexDm->psTdmaDuAdjType =3D 2; } else if (pCoexDm->curPsTdma =3D=3D 2) { - halbtc8723b1ant_PsTdma(pBtCoexist, NORMAL_EXEC, true, 1); + halbtc8723b1ant_PsTdma(bt_coexist, NORMAL_EXEC, true, 1); pCoexDm->psTdmaDuAdjType =3D 1; } } @@ -1499,27 +1499,27 @@ static void halbtc8723b1ant_TdmaDurationAdjustForAc= l( pCoexDm->curPsTdma !=3D 11 ) /* recover to previous adjust type */ halbtc8723b1ant_PsTdma( - pBtCoexist, NORMAL_EXEC, true, pCoexDm->psTdmaDuAdjType + bt_coexist, NORMAL_EXEC, true, pCoexDm->psTdmaDuAdjType ); } } =20 static void halbtc8723b1ant_PsTdmaCheckForPowerSaveState( - struct btc_coexist *pBtCoexist, bool bNewPsState + struct btc_coexist *bt_coexist, bool bNewPsState ) { u8 lpsMode =3D 0x0; =20 - pBtCoexist->fBtcGet(pBtCoexist, BTC_GET_U1_LPS_MODE, &lpsMode); + bt_coexist->fBtcGet(bt_coexist, BTC_GET_U1_LPS_MODE, &lpsMode); =20 if (lpsMode) { /* already under LPS state */ if (bNewPsState) { /* keep state under LPS, do nothing. */ } else /* will leave LPS state, turn off psTdma first */ - halbtc8723b1ant_PsTdma(pBtCoexist, NORMAL_EXEC, false, 0); + halbtc8723b1ant_PsTdma(bt_coexist, NORMAL_EXEC, false, 0); } else { /* NO PS state */ if (bNewPsState) /* will enter LPS state, turn off psTdma first */ - halbtc8723b1ant_PsTdma(pBtCoexist, NORMAL_EXEC, false, 0); + halbtc8723b1ant_PsTdma(bt_coexist, NORMAL_EXEC, false, 0); else { /* keep state under NO PS state, do nothing. */ } @@ -1527,7 +1527,7 @@ static void halbtc8723b1ant_PsTdmaCheckForPowerSaveSt= ate( } =20 static void halbtc8723b1ant_PowerSaveState( - struct btc_coexist *pBtCoexist, u8 psType, u8 lpsVal, u8 rpwmVal + struct btc_coexist *bt_coexist, u8 psType, u8 lpsVal, u8 rpwmVal ) { bool bLowPwrDisable =3D false; @@ -1536,27 +1536,27 @@ static void halbtc8723b1ant_PowerSaveState( case BTC_PS_WIFI_NATIVE: /* recover to original 32k low power setting */ bLowPwrDisable =3D false; - pBtCoexist->fBtcSet( - pBtCoexist, BTC_SET_ACT_DISABLE_LOW_POWER, &bLowPwrDisable + bt_coexist->fBtcSet( + bt_coexist, BTC_SET_ACT_DISABLE_LOW_POWER, &bLowPwrDisable ); - pBtCoexist->fBtcSet(pBtCoexist, BTC_SET_ACT_NORMAL_LPS, NULL); + bt_coexist->fBtcSet(bt_coexist, BTC_SET_ACT_NORMAL_LPS, NULL); pCoexSta->bForceLpsOn =3D false; break; case BTC_PS_LPS_ON: - halbtc8723b1ant_PsTdmaCheckForPowerSaveState(pBtCoexist, true); - halbtc8723b1ant_LpsRpwm(pBtCoexist, NORMAL_EXEC, lpsVal, rpwmVal); + halbtc8723b1ant_PsTdmaCheckForPowerSaveState(bt_coexist, true); + halbtc8723b1ant_LpsRpwm(bt_coexist, NORMAL_EXEC, lpsVal, rpwmVal); /* when coex force to enter LPS, do not enter 32k low power. */ bLowPwrDisable =3D true; - pBtCoexist->fBtcSet( - pBtCoexist, BTC_SET_ACT_DISABLE_LOW_POWER, &bLowPwrDisable + bt_coexist->fBtcSet( + bt_coexist, BTC_SET_ACT_DISABLE_LOW_POWER, &bLowPwrDisable ); /* power save must executed before psTdma. */ - pBtCoexist->fBtcSet(pBtCoexist, BTC_SET_ACT_ENTER_LPS, NULL); + bt_coexist->fBtcSet(bt_coexist, BTC_SET_ACT_ENTER_LPS, NULL); pCoexSta->bForceLpsOn =3D true; break; case BTC_PS_LPS_OFF: - halbtc8723b1ant_PsTdmaCheckForPowerSaveState(pBtCoexist, false); - pBtCoexist->fBtcSet(pBtCoexist, BTC_SET_ACT_LEAVE_LPS, NULL); + halbtc8723b1ant_PsTdmaCheckForPowerSaveState(bt_coexist, false); + bt_coexist->fBtcSet(bt_coexist, BTC_SET_ACT_LEAVE_LPS, NULL); pCoexSta->bForceLpsOn =3D false; break; default: @@ -1575,86 +1575,86 @@ static void halbtc8723b1ant_PowerSaveState( /* Non-Software Coex Mechanism start */ /* */ /* */ -static void halbtc8723b1ant_ActionWifiMultiPort(struct btc_coexist *pBtCoe= xist) +static void halbtc8723b1ant_ActionWifiMultiPort(struct btc_coexist *bt_coe= xist) { - halbtc8723b1ant_PowerSaveState(pBtCoexist, BTC_PS_WIFI_NATIVE, 0x0, 0x0); + halbtc8723b1ant_PowerSaveState(bt_coexist, BTC_PS_WIFI_NATIVE, 0x0, 0x0); =20 - halbtc8723b1ant_PsTdma(pBtCoexist, NORMAL_EXEC, false, 8); - halbtc8723b1ant_CoexTableWithType(pBtCoexist, NORMAL_EXEC, 2); + halbtc8723b1ant_PsTdma(bt_coexist, NORMAL_EXEC, false, 8); + halbtc8723b1ant_CoexTableWithType(bt_coexist, NORMAL_EXEC, 2); } =20 -static void halbtc8723b1ant_ActionHs(struct btc_coexist *pBtCoexist) +static void halbtc8723b1ant_ActionHs(struct btc_coexist *bt_coexist) { - halbtc8723b1ant_PsTdma(pBtCoexist, NORMAL_EXEC, true, 5); - halbtc8723b1ant_CoexTableWithType(pBtCoexist, NORMAL_EXEC, 2); + halbtc8723b1ant_PsTdma(bt_coexist, NORMAL_EXEC, true, 5); + halbtc8723b1ant_CoexTableWithType(bt_coexist, NORMAL_EXEC, 2); } =20 -static void halbtc8723b1ant_ActionBtInquiry(struct btc_coexist *pBtCoexist) +static void halbtc8723b1ant_ActionBtInquiry(struct btc_coexist *bt_coexist) { - struct btc_bt_link_info *pBtLinkInfo =3D &pBtCoexist->btLinkInfo; + struct btc_bt_link_info *pBtLinkInfo =3D &bt_coexist->btLinkInfo; bool bWifiConnected =3D false; bool bApEnable =3D false; - bool bWifiBusy =3D false; + bool wifi_busy =3D false; bool bBtBusy =3D false; =20 - pBtCoexist->fBtcGet(pBtCoexist, BTC_GET_BL_WIFI_AP_MODE_ENABLE, &bApEnabl= e); - pBtCoexist->fBtcGet(pBtCoexist, BTC_GET_BL_WIFI_CONNECTED, &bWifiConnecte= d); - pBtCoexist->fBtcGet(pBtCoexist, BTC_GET_BL_WIFI_BUSY, &bWifiBusy); - pBtCoexist->fBtcSet(pBtCoexist, BTC_SET_BL_BT_TRAFFIC_BUSY, &bBtBusy); + bt_coexist->fBtcGet(bt_coexist, BTC_GET_BL_WIFI_AP_MODE_ENABLE, &bApEnabl= e); + bt_coexist->fBtcGet(bt_coexist, BTC_GET_BL_WIFI_CONNECTED, &bWifiConnecte= d); + bt_coexist->fBtcGet(bt_coexist, BTC_GET_BL_WIFI_BUSY, &wifi_busy); + bt_coexist->fBtcSet(bt_coexist, BTC_SET_BL_BT_TRAFFIC_BUSY, &bBtBusy); =20 if (!bWifiConnected && !pCoexSta->bWiFiIsHighPriTask) { - halbtc8723b1ant_PowerSaveState(pBtCoexist, BTC_PS_WIFI_NATIVE, 0x0, 0x0); - halbtc8723b1ant_PsTdma(pBtCoexist, NORMAL_EXEC, false, 8); + halbtc8723b1ant_PowerSaveState(bt_coexist, BTC_PS_WIFI_NATIVE, 0x0, 0x0); + halbtc8723b1ant_PsTdma(bt_coexist, NORMAL_EXEC, false, 8); =20 - halbtc8723b1ant_CoexTableWithType(pBtCoexist, NORMAL_EXEC, 0); + halbtc8723b1ant_CoexTableWithType(bt_coexist, NORMAL_EXEC, 0); } else if ( pBtLinkInfo->bScoExist || pBtLinkInfo->bHidExist || pBtLinkInfo->bA2dpExist ) { /* SCO/HID/A2DP busy */ - halbtc8723b1ant_PowerSaveState(pBtCoexist, BTC_PS_WIFI_NATIVE, 0x0, 0x0); - halbtc8723b1ant_PsTdma(pBtCoexist, NORMAL_EXEC, true, 32); + halbtc8723b1ant_PowerSaveState(bt_coexist, BTC_PS_WIFI_NATIVE, 0x0, 0x0); + halbtc8723b1ant_PsTdma(bt_coexist, NORMAL_EXEC, true, 32); =20 - halbtc8723b1ant_CoexTableWithType(pBtCoexist, NORMAL_EXEC, 4); - } else if (pBtLinkInfo->bPanExist || bWifiBusy) { - halbtc8723b1ant_PowerSaveState(pBtCoexist, BTC_PS_WIFI_NATIVE, 0x0, 0x0); - halbtc8723b1ant_PsTdma(pBtCoexist, NORMAL_EXEC, true, 20); + halbtc8723b1ant_CoexTableWithType(bt_coexist, NORMAL_EXEC, 4); + } else if (pBtLinkInfo->bPanExist || wifi_busy) { + halbtc8723b1ant_PowerSaveState(bt_coexist, BTC_PS_WIFI_NATIVE, 0x0, 0x0); + halbtc8723b1ant_PsTdma(bt_coexist, NORMAL_EXEC, true, 20); =20 - halbtc8723b1ant_CoexTableWithType(pBtCoexist, NORMAL_EXEC, 4); + halbtc8723b1ant_CoexTableWithType(bt_coexist, NORMAL_EXEC, 4); } else { - halbtc8723b1ant_PowerSaveState(pBtCoexist, BTC_PS_WIFI_NATIVE, 0x0, 0x0); - halbtc8723b1ant_PsTdma(pBtCoexist, NORMAL_EXEC, false, 8); + halbtc8723b1ant_PowerSaveState(bt_coexist, BTC_PS_WIFI_NATIVE, 0x0, 0x0); + halbtc8723b1ant_PsTdma(bt_coexist, NORMAL_EXEC, false, 8); =20 - halbtc8723b1ant_CoexTableWithType(pBtCoexist, NORMAL_EXEC, 7); + halbtc8723b1ant_CoexTableWithType(bt_coexist, NORMAL_EXEC, 7); } } =20 static void halbtc8723b1ant_ActionBtScoHidOnlyBusy( - struct btc_coexist *pBtCoexist, u8 wifiStatus + struct btc_coexist *bt_coexist, u8 wifiStatus ) { - struct btc_bt_link_info *pBtLinkInfo =3D &pBtCoexist->btLinkInfo; + struct btc_bt_link_info *pBtLinkInfo =3D &bt_coexist->btLinkInfo; bool bWifiConnected =3D false; =20 - pBtCoexist->fBtcGet(pBtCoexist, BTC_GET_BL_WIFI_CONNECTED, &bWifiConnecte= d); + bt_coexist->fBtcGet(bt_coexist, BTC_GET_BL_WIFI_CONNECTED, &bWifiConnecte= d); =20 /* tdma and coex table */ =20 if (pBtLinkInfo->bScoExist) { - halbtc8723b1ant_PsTdma(pBtCoexist, NORMAL_EXEC, true, 5); - halbtc8723b1ant_CoexTableWithType(pBtCoexist, NORMAL_EXEC, 5); + halbtc8723b1ant_PsTdma(bt_coexist, NORMAL_EXEC, true, 5); + halbtc8723b1ant_CoexTableWithType(bt_coexist, NORMAL_EXEC, 5); } else { /* HID */ - halbtc8723b1ant_PsTdma(pBtCoexist, NORMAL_EXEC, true, 6); - halbtc8723b1ant_CoexTableWithType(pBtCoexist, NORMAL_EXEC, 5); + halbtc8723b1ant_PsTdma(bt_coexist, NORMAL_EXEC, true, 6); + halbtc8723b1ant_CoexTableWithType(bt_coexist, NORMAL_EXEC, 5); } } =20 static void halbtc8723b1ant_ActionWifiConnectedBtAclBusy( - struct btc_coexist *pBtCoexist, u8 wifiStatus + struct btc_coexist *bt_coexist, u8 wifiStatus ) { - struct btc_bt_link_info *pBtLinkInfo =3D &pBtCoexist->btLinkInfo; + struct btc_bt_link_info *pBtLinkInfo =3D &bt_coexist->btLinkInfo; =20 halbtc8723b1ant_BtRssiState(2, 28, 0); =20 @@ -1664,97 +1664,97 @@ static void halbtc8723b1ant_ActionWifiConnectedBtAc= lBusy( pBtLinkInfo->bSlaveRole =3D false; =20 if (pBtLinkInfo->bHidOnly) { /* HID */ - halbtc8723b1ant_ActionBtScoHidOnlyBusy(pBtCoexist, wifiStatus); + halbtc8723b1ant_ActionBtScoHidOnlyBusy(bt_coexist, wifiStatus); pCoexDm->bAutoTdmaAdjust =3D false; return; } else if (pBtLinkInfo->bA2dpOnly) { /* A2DP */ if (wifiStatus =3D=3D BT_8723B_1ANT_WIFI_STATUS_CONNECTED_IDLE) { - halbtc8723b1ant_PsTdma(pBtCoexist, NORMAL_EXEC, true, 32); - halbtc8723b1ant_CoexTableWithType(pBtCoexist, NORMAL_EXEC, 4); + halbtc8723b1ant_PsTdma(bt_coexist, NORMAL_EXEC, true, 32); + halbtc8723b1ant_CoexTableWithType(bt_coexist, NORMAL_EXEC, 4); pCoexDm->bAutoTdmaAdjust =3D false; } else { - halbtc8723b1ant_TdmaDurationAdjustForAcl(pBtCoexist, wifiStatus); - halbtc8723b1ant_CoexTableWithType(pBtCoexist, NORMAL_EXEC, 4); + halbtc8723b1ant_TdmaDurationAdjustForAcl(bt_coexist, wifiStatus); + halbtc8723b1ant_CoexTableWithType(bt_coexist, NORMAL_EXEC, 4); pCoexDm->bAutoTdmaAdjust =3D true; } } else if (pBtLinkInfo->bHidExist && pBtLinkInfo->bA2dpExist) { /* HID+A2= DP */ - halbtc8723b1ant_PsTdma(pBtCoexist, NORMAL_EXEC, true, 14); + halbtc8723b1ant_PsTdma(bt_coexist, NORMAL_EXEC, true, 14); pCoexDm->bAutoTdmaAdjust =3D false; =20 - halbtc8723b1ant_CoexTableWithType(pBtCoexist, NORMAL_EXEC, 4); + halbtc8723b1ant_CoexTableWithType(bt_coexist, NORMAL_EXEC, 4); } else if ( pBtLinkInfo->bPanOnly || (pBtLinkInfo->bHidExist && pBtLinkInfo->bPanExist) ) { /* PAN(OPP, FTP), HID+PAN(OPP, FTP) */ - halbtc8723b1ant_PsTdma(pBtCoexist, NORMAL_EXEC, true, 3); - halbtc8723b1ant_CoexTableWithType(pBtCoexist, NORMAL_EXEC, 4); + halbtc8723b1ant_PsTdma(bt_coexist, NORMAL_EXEC, true, 3); + halbtc8723b1ant_CoexTableWithType(bt_coexist, NORMAL_EXEC, 4); pCoexDm->bAutoTdmaAdjust =3D false; } else if ( (pBtLinkInfo->bA2dpExist && pBtLinkInfo->bPanExist) || (pBtLinkInfo->bHidExist && pBtLinkInfo->bA2dpExist && pBtLinkInfo->bPanE= xist) ) { /* A2DP+PAN(OPP, FTP), HID+A2DP+PAN(OPP, FTP) */ - halbtc8723b1ant_PsTdma(pBtCoexist, NORMAL_EXEC, true, 13); - halbtc8723b1ant_CoexTableWithType(pBtCoexist, NORMAL_EXEC, 4); + halbtc8723b1ant_PsTdma(bt_coexist, NORMAL_EXEC, true, 13); + halbtc8723b1ant_CoexTableWithType(bt_coexist, NORMAL_EXEC, 4); pCoexDm->bAutoTdmaAdjust =3D false; } else { /* BT no-profile busy (0x9) */ - halbtc8723b1ant_PsTdma(pBtCoexist, NORMAL_EXEC, true, 32); - halbtc8723b1ant_CoexTableWithType(pBtCoexist, NORMAL_EXEC, 4); + halbtc8723b1ant_PsTdma(bt_coexist, NORMAL_EXEC, true, 32); + halbtc8723b1ant_CoexTableWithType(bt_coexist, NORMAL_EXEC, 4); pCoexDm->bAutoTdmaAdjust =3D false; } } =20 -static void halbtc8723b1ant_ActionWifiNotConnected(struct btc_coexist *pBt= Coexist) +static void halbtc8723b1ant_ActionWifiNotConnected(struct btc_coexist *bt_= coexist) { /* power save state */ - halbtc8723b1ant_PowerSaveState(pBtCoexist, BTC_PS_WIFI_NATIVE, 0x0, 0x0); + halbtc8723b1ant_PowerSaveState(bt_coexist, BTC_PS_WIFI_NATIVE, 0x0, 0x0); =20 /* tdma and coex table */ - halbtc8723b1ant_PsTdma(pBtCoexist, FORCE_EXEC, false, 8); - halbtc8723b1ant_CoexTableWithType(pBtCoexist, NORMAL_EXEC, 0); + halbtc8723b1ant_PsTdma(bt_coexist, FORCE_EXEC, false, 8); + halbtc8723b1ant_CoexTableWithType(bt_coexist, NORMAL_EXEC, 0); } =20 static void halbtc8723b1ant_ActionWifiNotConnectedScan( - struct btc_coexist *pBtCoexist + struct btc_coexist *bt_coexist ) { - struct btc_bt_link_info *pBtLinkInfo =3D &pBtCoexist->btLinkInfo; + struct btc_bt_link_info *pBtLinkInfo =3D &bt_coexist->btLinkInfo; =20 - halbtc8723b1ant_PowerSaveState(pBtCoexist, BTC_PS_WIFI_NATIVE, 0x0, 0x0); + halbtc8723b1ant_PowerSaveState(bt_coexist, BTC_PS_WIFI_NATIVE, 0x0, 0x0); =20 /* tdma and coex table */ if (pCoexDm->btStatus =3D=3D BT_8723B_1ANT_BT_STATUS_ACL_BUSY) { if (pBtLinkInfo->bA2dpExist) { - halbtc8723b1ant_PsTdma(pBtCoexist, NORMAL_EXEC, true, 32); - halbtc8723b1ant_CoexTableWithType(pBtCoexist, NORMAL_EXEC, 4); + halbtc8723b1ant_PsTdma(bt_coexist, NORMAL_EXEC, true, 32); + halbtc8723b1ant_CoexTableWithType(bt_coexist, NORMAL_EXEC, 4); } else if (pBtLinkInfo->bA2dpExist && pBtLinkInfo->bPanExist) { - halbtc8723b1ant_PsTdma(pBtCoexist, NORMAL_EXEC, true, 22); - halbtc8723b1ant_CoexTableWithType(pBtCoexist, NORMAL_EXEC, 4); + halbtc8723b1ant_PsTdma(bt_coexist, NORMAL_EXEC, true, 22); + halbtc8723b1ant_CoexTableWithType(bt_coexist, NORMAL_EXEC, 4); } else { - halbtc8723b1ant_PsTdma(pBtCoexist, NORMAL_EXEC, true, 20); - halbtc8723b1ant_CoexTableWithType(pBtCoexist, NORMAL_EXEC, 4); + halbtc8723b1ant_PsTdma(bt_coexist, NORMAL_EXEC, true, 20); + halbtc8723b1ant_CoexTableWithType(bt_coexist, NORMAL_EXEC, 4); } } else if ( (pCoexDm->btStatus =3D=3D BT_8723B_1ANT_BT_STATUS_SCO_BUSY) || (pCoexDm->btStatus =3D=3D BT_8723B_1ANT_BT_STATUS_ACL_SCO_BUSY) ) { halbtc8723b1ant_ActionBtScoHidOnlyBusy( - pBtCoexist, BT_8723B_1ANT_WIFI_STATUS_CONNECTED_SCAN + bt_coexist, BT_8723B_1ANT_WIFI_STATUS_CONNECTED_SCAN ); } else { /* Bryant Add */ - halbtc8723b1ant_PsTdma(pBtCoexist, NORMAL_EXEC, false, 8); - halbtc8723b1ant_CoexTableWithType(pBtCoexist, NORMAL_EXEC, 2); + halbtc8723b1ant_PsTdma(bt_coexist, NORMAL_EXEC, false, 8); + halbtc8723b1ant_CoexTableWithType(bt_coexist, NORMAL_EXEC, 2); } } =20 static void halbtc8723b1ant_ActionWifiNotConnectedAssoAuth( - struct btc_coexist *pBtCoexist + struct btc_coexist *bt_coexist ) { - struct btc_bt_link_info *pBtLinkInfo =3D &pBtCoexist->btLinkInfo; + struct btc_bt_link_info *pBtLinkInfo =3D &bt_coexist->btLinkInfo; =20 - halbtc8723b1ant_PowerSaveState(pBtCoexist, BTC_PS_WIFI_NATIVE, 0x0, 0x0); + halbtc8723b1ant_PowerSaveState(bt_coexist, BTC_PS_WIFI_NATIVE, 0x0, 0x0); =20 /* tdma and coex table */ if ( @@ -1762,56 +1762,56 @@ static void halbtc8723b1ant_ActionWifiNotConnectedA= ssoAuth( (pBtLinkInfo->bHidExist) || (pBtLinkInfo->bA2dpExist) ) { - halbtc8723b1ant_PsTdma(pBtCoexist, NORMAL_EXEC, true, 32); - halbtc8723b1ant_CoexTableWithType(pBtCoexist, NORMAL_EXEC, 4); + halbtc8723b1ant_PsTdma(bt_coexist, NORMAL_EXEC, true, 32); + halbtc8723b1ant_CoexTableWithType(bt_coexist, NORMAL_EXEC, 4); } else if (pBtLinkInfo->bPanExist) { - halbtc8723b1ant_PsTdma(pBtCoexist, NORMAL_EXEC, true, 20); - halbtc8723b1ant_CoexTableWithType(pBtCoexist, NORMAL_EXEC, 4); + halbtc8723b1ant_PsTdma(bt_coexist, NORMAL_EXEC, true, 20); + halbtc8723b1ant_CoexTableWithType(bt_coexist, NORMAL_EXEC, 4); } else { - halbtc8723b1ant_PsTdma(pBtCoexist, NORMAL_EXEC, false, 8); - halbtc8723b1ant_CoexTableWithType(pBtCoexist, NORMAL_EXEC, 2); + halbtc8723b1ant_PsTdma(bt_coexist, NORMAL_EXEC, false, 8); + halbtc8723b1ant_CoexTableWithType(bt_coexist, NORMAL_EXEC, 2); } } =20 -static void halbtc8723b1ant_ActionWifiConnectedScan(struct btc_coexist *pB= tCoexist) +static void halbtc8723b1ant_ActionWifiConnectedScan(struct btc_coexist *bt= _coexist) { - struct btc_bt_link_info *pBtLinkInfo =3D &pBtCoexist->btLinkInfo; + struct btc_bt_link_info *pBtLinkInfo =3D &bt_coexist->btLinkInfo; =20 - halbtc8723b1ant_PowerSaveState(pBtCoexist, BTC_PS_WIFI_NATIVE, 0x0, 0x0); + halbtc8723b1ant_PowerSaveState(bt_coexist, BTC_PS_WIFI_NATIVE, 0x0, 0x0); =20 /* tdma and coex table */ if (pCoexDm->btStatus =3D=3D BT_8723B_1ANT_BT_STATUS_ACL_BUSY) { if (pBtLinkInfo->bA2dpExist) { - halbtc8723b1ant_PsTdma(pBtCoexist, NORMAL_EXEC, true, 32); - halbtc8723b1ant_CoexTableWithType(pBtCoexist, NORMAL_EXEC, 4); + halbtc8723b1ant_PsTdma(bt_coexist, NORMAL_EXEC, true, 32); + halbtc8723b1ant_CoexTableWithType(bt_coexist, NORMAL_EXEC, 4); } else if (pBtLinkInfo->bA2dpExist && pBtLinkInfo->bPanExist) { - halbtc8723b1ant_PsTdma(pBtCoexist, NORMAL_EXEC, true, 22); - halbtc8723b1ant_CoexTableWithType(pBtCoexist, NORMAL_EXEC, 4); + halbtc8723b1ant_PsTdma(bt_coexist, NORMAL_EXEC, true, 22); + halbtc8723b1ant_CoexTableWithType(bt_coexist, NORMAL_EXEC, 4); } else { - halbtc8723b1ant_PsTdma(pBtCoexist, NORMAL_EXEC, true, 20); - halbtc8723b1ant_CoexTableWithType(pBtCoexist, NORMAL_EXEC, 4); + halbtc8723b1ant_PsTdma(bt_coexist, NORMAL_EXEC, true, 20); + halbtc8723b1ant_CoexTableWithType(bt_coexist, NORMAL_EXEC, 4); } } else if ( (pCoexDm->btStatus =3D=3D BT_8723B_1ANT_BT_STATUS_SCO_BUSY) || (pCoexDm->btStatus =3D=3D BT_8723B_1ANT_BT_STATUS_ACL_SCO_BUSY) ) { halbtc8723b1ant_ActionBtScoHidOnlyBusy( - pBtCoexist, BT_8723B_1ANT_WIFI_STATUS_CONNECTED_SCAN + bt_coexist, BT_8723B_1ANT_WIFI_STATUS_CONNECTED_SCAN ); } else { /* Bryant Add */ - halbtc8723b1ant_PsTdma(pBtCoexist, NORMAL_EXEC, false, 8); - halbtc8723b1ant_CoexTableWithType(pBtCoexist, NORMAL_EXEC, 2); + halbtc8723b1ant_PsTdma(bt_coexist, NORMAL_EXEC, false, 8); + halbtc8723b1ant_CoexTableWithType(bt_coexist, NORMAL_EXEC, 2); } } =20 static void halbtc8723b1ant_ActionWifiConnectedSpecialPacket( - struct btc_coexist *pBtCoexist + struct btc_coexist *bt_coexist ) { - struct btc_bt_link_info *pBtLinkInfo =3D &pBtCoexist->btLinkInfo; + struct btc_bt_link_info *pBtLinkInfo =3D &bt_coexist->btLinkInfo; =20 - halbtc8723b1ant_PowerSaveState(pBtCoexist, BTC_PS_WIFI_NATIVE, 0x0, 0x0); + halbtc8723b1ant_PowerSaveState(bt_coexist, BTC_PS_WIFI_NATIVE, 0x0, 0x0); =20 /* tdma and coex table */ if ( @@ -1819,62 +1819,62 @@ static void halbtc8723b1ant_ActionWifiConnectedSpec= ialPacket( (pBtLinkInfo->bHidExist) || (pBtLinkInfo->bA2dpExist) ) { - halbtc8723b1ant_PsTdma(pBtCoexist, NORMAL_EXEC, true, 32); - halbtc8723b1ant_CoexTableWithType(pBtCoexist, NORMAL_EXEC, 4); + halbtc8723b1ant_PsTdma(bt_coexist, NORMAL_EXEC, true, 32); + halbtc8723b1ant_CoexTableWithType(bt_coexist, NORMAL_EXEC, 4); } else if (pBtLinkInfo->bPanExist) { - halbtc8723b1ant_PsTdma(pBtCoexist, NORMAL_EXEC, true, 20); - halbtc8723b1ant_CoexTableWithType(pBtCoexist, NORMAL_EXEC, 4); + halbtc8723b1ant_PsTdma(bt_coexist, NORMAL_EXEC, true, 20); + halbtc8723b1ant_CoexTableWithType(bt_coexist, NORMAL_EXEC, 4); } else { - halbtc8723b1ant_PsTdma(pBtCoexist, NORMAL_EXEC, false, 8); - halbtc8723b1ant_CoexTableWithType(pBtCoexist, NORMAL_EXEC, 2); + halbtc8723b1ant_PsTdma(bt_coexist, NORMAL_EXEC, false, 8); + halbtc8723b1ant_CoexTableWithType(bt_coexist, NORMAL_EXEC, 2); } } =20 -static void halbtc8723b1ant_ActionWifiConnected(struct btc_coexist *pBtCoe= xist) +static void halbtc8723b1ant_ActionWifiConnected(struct btc_coexist *bt_coe= xist) { - bool bWifiBusy =3D false; + bool wifi_busy =3D false; bool bScan =3D false, bLink =3D false, bRoam =3D false; bool bUnder4way =3D false, bApEnable =3D false; =20 - pBtCoexist->fBtcGet(pBtCoexist, BTC_GET_BL_WIFI_4_WAY_PROGRESS, &bUnder4w= ay); + bt_coexist->fBtcGet(bt_coexist, BTC_GET_BL_WIFI_4_WAY_PROGRESS, &bUnder4w= ay); if (bUnder4way) { - halbtc8723b1ant_ActionWifiConnectedSpecialPacket(pBtCoexist); + halbtc8723b1ant_ActionWifiConnectedSpecialPacket(bt_coexist); return; } =20 - pBtCoexist->fBtcGet(pBtCoexist, BTC_GET_BL_WIFI_SCAN, &bScan); - pBtCoexist->fBtcGet(pBtCoexist, BTC_GET_BL_WIFI_LINK, &bLink); - pBtCoexist->fBtcGet(pBtCoexist, BTC_GET_BL_WIFI_ROAM, &bRoam); + bt_coexist->fBtcGet(bt_coexist, BTC_GET_BL_WIFI_SCAN, &bScan); + bt_coexist->fBtcGet(bt_coexist, BTC_GET_BL_WIFI_LINK, &bLink); + bt_coexist->fBtcGet(bt_coexist, BTC_GET_BL_WIFI_ROAM, &bRoam); if (bScan || bLink || bRoam) { if (bScan) - halbtc8723b1ant_ActionWifiConnectedScan(pBtCoexist); + halbtc8723b1ant_ActionWifiConnectedScan(bt_coexist); else - halbtc8723b1ant_ActionWifiConnectedSpecialPacket(pBtCoexist); + halbtc8723b1ant_ActionWifiConnectedSpecialPacket(bt_coexist); return; } =20 - pBtCoexist->fBtcGet(pBtCoexist, BTC_GET_BL_WIFI_AP_MODE_ENABLE, &bApEnabl= e); - pBtCoexist->fBtcGet(pBtCoexist, BTC_GET_BL_WIFI_BUSY, &bWifiBusy); + bt_coexist->fBtcGet(bt_coexist, BTC_GET_BL_WIFI_AP_MODE_ENABLE, &bApEnabl= e); + bt_coexist->fBtcGet(bt_coexist, BTC_GET_BL_WIFI_BUSY, &wifi_busy); =20 /* power save state */ if ( !bApEnable && pCoexDm->btStatus =3D=3D BT_8723B_1ANT_BT_STATUS_ACL_BUSY && - !pBtCoexist->btLinkInfo.bHidOnly + !bt_coexist->btLinkInfo.bHidOnly ) { - if (pBtCoexist->btLinkInfo.bA2dpOnly) { /* A2DP */ - if (!bWifiBusy) + if (bt_coexist->btLinkInfo.bA2dpOnly) { /* A2DP */ + if (!wifi_busy) halbtc8723b1ant_PowerSaveState( - pBtCoexist, BTC_PS_WIFI_NATIVE, 0x0, 0x0 + bt_coexist, BTC_PS_WIFI_NATIVE, 0x0, 0x0 ); else { /* busy */ if (pCoexSta->nScanAPNum >=3D BT_8723B_1ANT_WIFI_NOISY_THRESH) /* no= force LPS, no PS-TDMA, use pure TDMA */ halbtc8723b1ant_PowerSaveState( - pBtCoexist, BTC_PS_WIFI_NATIVE, 0x0, 0x0 + bt_coexist, BTC_PS_WIFI_NATIVE, 0x0, 0x0 ); else halbtc8723b1ant_PowerSaveState( - pBtCoexist, BTC_PS_LPS_ON, 0x50, 0x4 + bt_coexist, BTC_PS_LPS_ON, 0x50, 0x4 ); } } else if ( @@ -1882,37 +1882,37 @@ static void halbtc8723b1ant_ActionWifiConnected(str= uct btc_coexist *pBtCoexist) (!pCoexSta->bA2dpExist) && (!pCoexSta->bHidExist) ) - halbtc8723b1ant_PowerSaveState(pBtCoexist, BTC_PS_WIFI_NATIVE, 0x0, 0x0= ); + halbtc8723b1ant_PowerSaveState(bt_coexist, BTC_PS_WIFI_NATIVE, 0x0, 0x0= ); else - halbtc8723b1ant_PowerSaveState(pBtCoexist, BTC_PS_LPS_ON, 0x50, 0x4); + halbtc8723b1ant_PowerSaveState(bt_coexist, BTC_PS_LPS_ON, 0x50, 0x4); } else - halbtc8723b1ant_PowerSaveState(pBtCoexist, BTC_PS_WIFI_NATIVE, 0x0, 0x0); + halbtc8723b1ant_PowerSaveState(bt_coexist, BTC_PS_WIFI_NATIVE, 0x0, 0x0); =20 /* tdma and coex table */ - if (!bWifiBusy) { + if (!wifi_busy) { if (pCoexDm->btStatus =3D=3D BT_8723B_1ANT_BT_STATUS_ACL_BUSY) { halbtc8723b1ant_ActionWifiConnectedBtAclBusy( - pBtCoexist, + bt_coexist, BT_8723B_1ANT_WIFI_STATUS_CONNECTED_IDLE ); } else if ( (pCoexDm->btStatus =3D=3D BT_8723B_1ANT_BT_STATUS_SCO_BUSY) || (pCoexDm->btStatus =3D=3D BT_8723B_1ANT_BT_STATUS_ACL_SCO_BUSY) ) { - halbtc8723b1ant_ActionBtScoHidOnlyBusy(pBtCoexist, + halbtc8723b1ant_ActionBtScoHidOnlyBusy(bt_coexist, BT_8723B_1ANT_WIFI_STATUS_CONNECTED_IDLE); } else { - halbtc8723b1ant_PsTdma(pBtCoexist, NORMAL_EXEC, false, 8); + halbtc8723b1ant_PsTdma(bt_coexist, NORMAL_EXEC, false, 8); =20 if ((pCoexSta->highPriorityTx) + (pCoexSta->highPriorityRx) <=3D 60) - halbtc8723b1ant_CoexTableWithType(pBtCoexist, NORMAL_EXEC, 2); + halbtc8723b1ant_CoexTableWithType(bt_coexist, NORMAL_EXEC, 2); else - halbtc8723b1ant_CoexTableWithType(pBtCoexist, NORMAL_EXEC, 7); + halbtc8723b1ant_CoexTableWithType(bt_coexist, NORMAL_EXEC, 7); } } else { if (pCoexDm->btStatus =3D=3D BT_8723B_1ANT_BT_STATUS_ACL_BUSY) { halbtc8723b1ant_ActionWifiConnectedBtAclBusy( - pBtCoexist, + bt_coexist, BT_8723B_1ANT_WIFI_STATUS_CONNECTED_BUSY ); } else if ( @@ -1920,60 +1920,60 @@ static void halbtc8723b1ant_ActionWifiConnected(str= uct btc_coexist *pBtCoexist) (pCoexDm->btStatus =3D=3D BT_8723B_1ANT_BT_STATUS_ACL_SCO_BUSY) ) { halbtc8723b1ant_ActionBtScoHidOnlyBusy( - pBtCoexist, + bt_coexist, BT_8723B_1ANT_WIFI_STATUS_CONNECTED_BUSY ); } else { - halbtc8723b1ant_PsTdma(pBtCoexist, NORMAL_EXEC, false, 8); + halbtc8723b1ant_PsTdma(bt_coexist, NORMAL_EXEC, false, 8); =20 if ((pCoexSta->highPriorityTx) + (pCoexSta->highPriorityRx) <=3D 60) - halbtc8723b1ant_CoexTableWithType(pBtCoexist, NORMAL_EXEC, 2); + halbtc8723b1ant_CoexTableWithType(bt_coexist, NORMAL_EXEC, 2); else - halbtc8723b1ant_CoexTableWithType(pBtCoexist, NORMAL_EXEC, 7); + halbtc8723b1ant_CoexTableWithType(bt_coexist, NORMAL_EXEC, 7); } } } =20 -static void halbtc8723b1ant_RunSwCoexistMechanism(struct btc_coexist *pBtC= oexist) +static void halbtc8723b1ant_RunSwCoexistMechanism(struct btc_coexist *bt_c= oexist) { u8 algorithm =3D 0; =20 - algorithm =3D halbtc8723b1ant_ActionAlgorithm(pBtCoexist); + algorithm =3D halbtc8723b1ant_ActionAlgorithm(bt_coexist); pCoexDm->curAlgorithm =3D algorithm; =20 - if (halbtc8723b1ant_IsCommonAction(pBtCoexist)) { + if (halbtc8723b1ant_IsCommonAction(bt_coexist)) { =20 } else { switch (pCoexDm->curAlgorithm) { case BT_8723B_1ANT_COEX_ALGO_SCO: - /* halbtc8723b1ant_ActionSco(pBtCoexist); */ + /* halbtc8723b1ant_ActionSco(bt_coexist); */ break; case BT_8723B_1ANT_COEX_ALGO_HID: - /* halbtc8723b1ant_ActionHid(pBtCoexist); */ + /* halbtc8723b1ant_ActionHid(bt_coexist); */ break; case BT_8723B_1ANT_COEX_ALGO_A2DP: - /* halbtc8723b1ant_ActionA2dp(pBtCoexist); */ + /* halbtc8723b1ant_ActionA2dp(bt_coexist); */ break; case BT_8723B_1ANT_COEX_ALGO_A2DP_PANHS: - /* halbtc8723b1ant_ActionA2dpPanHs(pBtCoexist); */ + /* halbtc8723b1ant_ActionA2dpPanHs(bt_coexist); */ break; case BT_8723B_1ANT_COEX_ALGO_PANEDR: - /* halbtc8723b1ant_ActionPanEdr(pBtCoexist); */ + /* halbtc8723b1ant_ActionPanEdr(bt_coexist); */ break; case BT_8723B_1ANT_COEX_ALGO_PANHS: - /* halbtc8723b1ant_ActionPanHs(pBtCoexist); */ + /* halbtc8723b1ant_ActionPanHs(bt_coexist); */ break; case BT_8723B_1ANT_COEX_ALGO_PANEDR_A2DP: - /* halbtc8723b1ant_ActionPanEdrA2dp(pBtCoexist); */ + /* halbtc8723b1ant_ActionPanEdrA2dp(bt_coexist); */ break; case BT_8723B_1ANT_COEX_ALGO_PANEDR_HID: - /* halbtc8723b1ant_ActionPanEdrHid(pBtCoexist); */ + /* halbtc8723b1ant_ActionPanEdrHid(bt_coexist); */ break; case BT_8723B_1ANT_COEX_ALGO_HID_A2DP_PANEDR: - /* halbtc8723b1ant_ActionHidA2dpPanEdr(pBtCoexist); */ + /* halbtc8723b1ant_ActionHidA2dpPanEdr(bt_coexist); */ break; case BT_8723B_1ANT_COEX_ALGO_HID_A2DP: - /* halbtc8723b1ant_ActionHidA2dp(pBtCoexist); */ + /* halbtc8723b1ant_ActionHidA2dp(bt_coexist); */ break; default: break; @@ -1982,20 +1982,20 @@ static void halbtc8723b1ant_RunSwCoexistMechanism(s= truct btc_coexist *pBtCoexist } } =20 -static void halbtc8723b1ant_RunCoexistMechanism(struct btc_coexist *pBtCoe= xist) +static void halbtc8723b1ant_RunCoexistMechanism(struct btc_coexist *bt_coe= xist) { - struct btc_bt_link_info *pBtLinkInfo =3D &pBtCoexist->btLinkInfo; + struct btc_bt_link_info *pBtLinkInfo =3D &bt_coexist->btLinkInfo; bool bWifiConnected =3D false, bBtHsOn =3D false; bool bIncreaseScanDevNum =3D false; - bool bBtCtrlAggBufSize =3D false; - u8 aggBufSize =3D 5; + bool bt_ctrl_agg_buf_size =3D false; + u8 agg_buf_size =3D 5; u32 wifiLinkStatus =3D 0; u32 numOfWifiLink =3D 0; =20 - if (pBtCoexist->bManualControl) + if (bt_coexist->bManualControl) return; =20 - if (pBtCoexist->bStopCoexDm) + if (bt_coexist->bStopCoexDm) return; =20 if (pCoexSta->bUnderIps) @@ -2009,61 +2009,61 @@ static void halbtc8723b1ant_RunCoexistMechanism(str= uct btc_coexist *pBtCoexist) bIncreaseScanDevNum =3D true; } =20 - pBtCoexist->fBtcSet( - pBtCoexist, + bt_coexist->fBtcSet( + bt_coexist, BTC_SET_BL_INC_SCAN_DEV_NUM, &bIncreaseScanDevNum ); - pBtCoexist->fBtcGet( - pBtCoexist, + bt_coexist->fBtcGet( + bt_coexist, BTC_GET_BL_WIFI_CONNECTED, &bWifiConnected ); =20 - pBtCoexist->fBtcGet( - pBtCoexist, + bt_coexist->fBtcGet( + bt_coexist, BTC_GET_U4_WIFI_LINK_STATUS, &wifiLinkStatus ); numOfWifiLink =3D wifiLinkStatus >> 16; =20 if ((numOfWifiLink >=3D 2) || (wifiLinkStatus & WIFI_P2P_GO_CONNECTED)) { - halbtc8723b1ant_LimitedTx(pBtCoexist, NORMAL_EXEC, 0, 0, 0, 0); - halbtc8723b1ant_LimitedRx(pBtCoexist, NORMAL_EXEC, false, bBtCtrlAggBufS= ize, aggBufSize); + halbtc8723b1ant_LimitedTx(bt_coexist, NORMAL_EXEC, 0, 0, 0, 0); + halbtc8723b1ant_LimitedRx(bt_coexist, NORMAL_EXEC, false, bt_ctrl_agg_bu= f_size, agg_buf_size); =20 if ((pBtLinkInfo->bA2dpExist) && (pCoexSta->bC2hBtInquiryPage)) - halbtc8723b1ant_ActionBtInquiry(pBtCoexist); + halbtc8723b1ant_ActionBtInquiry(bt_coexist); else - halbtc8723b1ant_ActionWifiMultiPort(pBtCoexist); + halbtc8723b1ant_ActionWifiMultiPort(bt_coexist); =20 return; } =20 if ((pBtLinkInfo->bBtLinkExist) && (bWifiConnected)) { - halbtc8723b1ant_LimitedTx(pBtCoexist, NORMAL_EXEC, 1, 1, 0, 1); + halbtc8723b1ant_LimitedTx(bt_coexist, NORMAL_EXEC, 1, 1, 0, 1); =20 if (pBtLinkInfo->bScoExist) - halbtc8723b1ant_LimitedRx(pBtCoexist, NORMAL_EXEC, false, true, 0x5); + halbtc8723b1ant_LimitedRx(bt_coexist, NORMAL_EXEC, false, true, 0x5); else - halbtc8723b1ant_LimitedRx(pBtCoexist, NORMAL_EXEC, false, true, 0x8); + halbtc8723b1ant_LimitedRx(bt_coexist, NORMAL_EXEC, false, true, 0x8); =20 - halbtc8723b1ant_SwMechanism(pBtCoexist, true); - halbtc8723b1ant_RunSwCoexistMechanism(pBtCoexist); /* just print debug = message */ + halbtc8723b1ant_SwMechanism(bt_coexist, true); + halbtc8723b1ant_RunSwCoexistMechanism(bt_coexist); /* just print debug = message */ } else { - halbtc8723b1ant_LimitedTx(pBtCoexist, NORMAL_EXEC, 0, 0, 0, 0); + halbtc8723b1ant_LimitedTx(bt_coexist, NORMAL_EXEC, 0, 0, 0, 0); =20 - halbtc8723b1ant_LimitedRx(pBtCoexist, NORMAL_EXEC, false, false, 0x5); + halbtc8723b1ant_LimitedRx(bt_coexist, NORMAL_EXEC, false, false, 0x5); =20 - halbtc8723b1ant_SwMechanism(pBtCoexist, false); - halbtc8723b1ant_RunSwCoexistMechanism(pBtCoexist); /* just print debug m= essage */ + halbtc8723b1ant_SwMechanism(bt_coexist, false); + halbtc8723b1ant_RunSwCoexistMechanism(bt_coexist); /* just print debug m= essage */ } =20 - pBtCoexist->fBtcGet(pBtCoexist, BTC_GET_BL_HS_OPERATION, &bBtHsOn); + bt_coexist->fBtcGet(bt_coexist, BTC_GET_BL_HS_OPERATION, &bBtHsOn); if (pCoexSta->bC2hBtInquiryPage) { - halbtc8723b1ant_ActionBtInquiry(pBtCoexist); + halbtc8723b1ant_ActionBtInquiry(bt_coexist); return; } else if (bBtHsOn) { - halbtc8723b1ant_ActionHs(pBtCoexist); + halbtc8723b1ant_ActionHs(bt_coexist); return; } =20 @@ -2071,62 +2071,62 @@ static void halbtc8723b1ant_RunCoexistMechanism(str= uct btc_coexist *pBtCoexist) if (!bWifiConnected) { bool bScan =3D false, bLink =3D false, bRoam =3D false; =20 - pBtCoexist->fBtcGet(pBtCoexist, BTC_GET_BL_WIFI_SCAN, &bScan); - pBtCoexist->fBtcGet(pBtCoexist, BTC_GET_BL_WIFI_LINK, &bLink); - pBtCoexist->fBtcGet(pBtCoexist, BTC_GET_BL_WIFI_ROAM, &bRoam); + bt_coexist->fBtcGet(bt_coexist, BTC_GET_BL_WIFI_SCAN, &bScan); + bt_coexist->fBtcGet(bt_coexist, BTC_GET_BL_WIFI_LINK, &bLink); + bt_coexist->fBtcGet(bt_coexist, BTC_GET_BL_WIFI_ROAM, &bRoam); =20 if (bScan || bLink || bRoam) { if (bScan) - halbtc8723b1ant_ActionWifiNotConnectedScan(pBtCoexist); + halbtc8723b1ant_ActionWifiNotConnectedScan(bt_coexist); else - halbtc8723b1ant_ActionWifiNotConnectedAssoAuth(pBtCoexist); + halbtc8723b1ant_ActionWifiNotConnectedAssoAuth(bt_coexist); } else - halbtc8723b1ant_ActionWifiNotConnected(pBtCoexist); + halbtc8723b1ant_ActionWifiNotConnected(bt_coexist); } else /* wifi LPS/Busy */ - halbtc8723b1ant_ActionWifiConnected(pBtCoexist); + halbtc8723b1ant_ActionWifiConnected(bt_coexist); } =20 -static void halbtc8723b1ant_InitCoexDm(struct btc_coexist *pBtCoexist) +static void halbtc8723b1ant_InitCoexDm(struct btc_coexist *bt_coexist) { /* force to reset coex mechanism */ =20 /* sw all off */ - halbtc8723b1ant_SwMechanism(pBtCoexist, false); + halbtc8723b1ant_SwMechanism(bt_coexist, false); =20 - /* halbtc8723b1ant_PsTdma(pBtCoexist, FORCE_EXEC, false, 8); */ - halbtc8723b1ant_CoexTableWithType(pBtCoexist, FORCE_EXEC, 0); + /* halbtc8723b1ant_PsTdma(bt_coexist, FORCE_EXEC, false, 8); */ + halbtc8723b1ant_CoexTableWithType(bt_coexist, FORCE_EXEC, 0); =20 pCoexSta->popEventCnt =3D 0; } =20 static void halbtc8723b1ant_InitHwConfig( - struct btc_coexist *pBtCoexist, + struct btc_coexist *bt_coexist, bool bBackUp, bool bWifiOnly ) { - pBtCoexist->fBtcWrite1ByteBitMask(pBtCoexist, 0x550, 0x8, 0x1); /* enabl= e TBTT nterrupt */ + bt_coexist->fBtcWrite1ByteBitMask(bt_coexist, 0x550, 0x8, 0x1); /* enabl= e TBTT nterrupt */ =20 /* 0x790[5:0]=3D 0x5 */ - pBtCoexist->fBtcWrite1Byte(pBtCoexist, 0x790, 0x5); + bt_coexist->fBtcWrite1Byte(bt_coexist, 0x790, 0x5); =20 /* Enable counter statistics */ - pBtCoexist->fBtcWrite1Byte(pBtCoexist, 0x778, 0x1); - pBtCoexist->fBtcWrite1ByteBitMask(pBtCoexist, 0x40, 0x20, 0x1); + bt_coexist->fBtcWrite1Byte(bt_coexist, 0x778, 0x1); + bt_coexist->fBtcWrite1ByteBitMask(bt_coexist, 0x40, 0x20, 0x1); =20 /* Antenna config */ if (bWifiOnly) { - halbtc8723b1ant_SetAntPath(pBtCoexist, BTC_ANT_PATH_WIFI, true, false); - halbtc8723b1ant_PsTdma(pBtCoexist, FORCE_EXEC, false, 9); + halbtc8723b1ant_SetAntPath(bt_coexist, BTC_ANT_PATH_WIFI, true, false); + halbtc8723b1ant_PsTdma(bt_coexist, FORCE_EXEC, false, 9); } else - halbtc8723b1ant_SetAntPath(pBtCoexist, BTC_ANT_PATH_BT, true, false); + halbtc8723b1ant_SetAntPath(bt_coexist, BTC_ANT_PATH_BT, true, false); =20 /* PTA parameter */ - halbtc8723b1ant_CoexTableWithType(pBtCoexist, FORCE_EXEC, 0); + halbtc8723b1ant_CoexTableWithType(bt_coexist, FORCE_EXEC, 0); =20 - pBtCoexist->fBtcRead4Byte(pBtCoexist, 0x948); - pBtCoexist->fBtcRead1Byte(pBtCoexist, 0x765); - pBtCoexist->fBtcRead1Byte(pBtCoexist, 0x67); + bt_coexist->fBtcRead4Byte(bt_coexist, 0x948); + bt_coexist->fBtcRead1Byte(bt_coexist, 0x765); + bt_coexist->fBtcRead1Byte(bt_coexist, 0x67); } =20 /* */ @@ -2135,22 +2135,22 @@ static void halbtc8723b1ant_InitHwConfig( /* */ /* extern function start with EXhalbtc8723b1ant_ */ /* */ -void EXhalbtc8723b1ant_PowerOnSetting(struct btc_coexist *pBtCoexist) +void EXhalbtc8723b1ant_PowerOnSetting(struct btc_coexist *bt_coexist) { - struct btc_board_info *pBoardInfo =3D &pBtCoexist->boardInfo; + struct btc_board_info *pBoardInfo =3D &bt_coexist->boardInfo; u8 u1Tmp =3D 0x0; u16 u2Tmp =3D 0x0; =20 - pBtCoexist->fBtcWrite1Byte(pBtCoexist, 0x67, 0x20); + bt_coexist->fBtcWrite1Byte(bt_coexist, 0x67, 0x20); =20 /* enable BB, REG_SYS_FUNC_EN such that we can write 0x948 correctly. */ - u2Tmp =3D pBtCoexist->fBtcRead2Byte(pBtCoexist, 0x2); - pBtCoexist->fBtcWrite2Byte(pBtCoexist, 0x2, u2Tmp | BIT0 | BIT1); + u2Tmp =3D bt_coexist->fBtcRead2Byte(bt_coexist, 0x2); + bt_coexist->fBtcWrite2Byte(bt_coexist, 0x2, u2Tmp | BIT0 | BIT1); =20 /* set GRAN_BT =3D 1 */ - pBtCoexist->fBtcWrite1Byte(pBtCoexist, 0x765, 0x18); + bt_coexist->fBtcWrite1Byte(bt_coexist, 0x765, 0x18); /* set WLAN_ACT =3D 0 */ - pBtCoexist->fBtcWrite1Byte(pBtCoexist, 0x76e, 0x4); + bt_coexist->fBtcWrite1Byte(bt_coexist, 0x76e, 0x4); =20 /* */ /* S0 or S1 setting and Local register setting(By the setting fw can get= ant number, S0/S1, ... info) */ @@ -2159,71 +2159,71 @@ void EXhalbtc8723b1ant_PowerOnSetting(struct btc_co= exist *pBtCoexist) /* BIT1: "0" for internal switch; "1" for external switch */ /* BIT2: "0" for one antenna; "1" for two antenna */ /* NOTE: here default all internal switch and 1-antenna =3D=3D> BIT1 =3D= 0 and BIT2 =3D 0 */ - if (pBtCoexist->chipInterface =3D=3D BTC_INTF_USB) { + if (bt_coexist->chipInterface =3D=3D BTC_INTF_USB) { /* fixed at S0 for USB interface */ - pBtCoexist->fBtcWrite4Byte(pBtCoexist, 0x948, 0x0); + bt_coexist->fBtcWrite4Byte(bt_coexist, 0x948, 0x0); =20 u1Tmp |=3D 0x1; /* antenna inverse */ - pBtCoexist->fBtcWriteLocalReg1Byte(pBtCoexist, 0xfe08, u1Tmp); + bt_coexist->fBtcWriteLocalReg1Byte(bt_coexist, 0xfe08, u1Tmp); =20 pBoardInfo->btdmAntPos =3D BTC_ANTENNA_AT_AUX_PORT; } else { /* for PCIE and SDIO interface, we check efuse 0xc3[6] */ if (pBoardInfo->singleAntPath =3D=3D 0) { /* set to S1 */ - pBtCoexist->fBtcWrite4Byte(pBtCoexist, 0x948, 0x280); + bt_coexist->fBtcWrite4Byte(bt_coexist, 0x948, 0x280); pBoardInfo->btdmAntPos =3D BTC_ANTENNA_AT_MAIN_PORT; } else if (pBoardInfo->singleAntPath =3D=3D 1) { /* set to S0 */ - pBtCoexist->fBtcWrite4Byte(pBtCoexist, 0x948, 0x0); + bt_coexist->fBtcWrite4Byte(bt_coexist, 0x948, 0x0); u1Tmp |=3D 0x1; /* antenna inverse */ pBoardInfo->btdmAntPos =3D BTC_ANTENNA_AT_AUX_PORT; } =20 - if (pBtCoexist->chipInterface =3D=3D BTC_INTF_PCI) - pBtCoexist->fBtcWriteLocalReg1Byte(pBtCoexist, 0x384, u1Tmp); - else if (pBtCoexist->chipInterface =3D=3D BTC_INTF_SDIO) - pBtCoexist->fBtcWriteLocalReg1Byte(pBtCoexist, 0x60, u1Tmp); + if (bt_coexist->chipInterface =3D=3D BTC_INTF_PCI) + bt_coexist->fBtcWriteLocalReg1Byte(bt_coexist, 0x384, u1Tmp); + else if (bt_coexist->chipInterface =3D=3D BTC_INTF_SDIO) + bt_coexist->fBtcWriteLocalReg1Byte(bt_coexist, 0x60, u1Tmp); } } =20 -void EXhalbtc8723b1ant_InitHwConfig(struct btc_coexist *pBtCoexist, bool b= WifiOnly) +void EXhalbtc8723b1ant_InitHwConfig(struct btc_coexist *bt_coexist, bool b= WifiOnly) { - halbtc8723b1ant_InitHwConfig(pBtCoexist, true, bWifiOnly); + halbtc8723b1ant_InitHwConfig(bt_coexist, true, bWifiOnly); } =20 -void EXhalbtc8723b1ant_InitCoexDm(struct btc_coexist *pBtCoexist) +void EXhalbtc8723b1ant_InitCoexDm(struct btc_coexist *bt_coexist) { - pBtCoexist->bStopCoexDm =3D false; + bt_coexist->bStopCoexDm =3D false; =20 - halbtc8723b1ant_InitCoexDm(pBtCoexist); + halbtc8723b1ant_InitCoexDm(bt_coexist); =20 - halbtc8723b1ant_QueryBtInfo(pBtCoexist); + halbtc8723b1ant_QueryBtInfo(bt_coexist); } =20 -void EXhalbtc8723b1ant_IpsNotify(struct btc_coexist *pBtCoexist, u8 type) +void EXhalbtc8723b1ant_IpsNotify(struct btc_coexist *bt_coexist, u8 type) { - if (pBtCoexist->bManualControl || pBtCoexist->bStopCoexDm) + if (bt_coexist->bManualControl || bt_coexist->bStopCoexDm) return; =20 if (type =3D=3D BTC_IPS_ENTER) { pCoexSta->bUnderIps =3D true; =20 - halbtc8723b1ant_PsTdma(pBtCoexist, NORMAL_EXEC, false, 0); - halbtc8723b1ant_CoexTableWithType(pBtCoexist, NORMAL_EXEC, 0); - halbtc8723b1ant_SetAntPath(pBtCoexist, BTC_ANT_PATH_BT, false, true); + halbtc8723b1ant_PsTdma(bt_coexist, NORMAL_EXEC, false, 0); + halbtc8723b1ant_CoexTableWithType(bt_coexist, NORMAL_EXEC, 0); + halbtc8723b1ant_SetAntPath(bt_coexist, BTC_ANT_PATH_BT, false, true); } else if (type =3D=3D BTC_IPS_LEAVE) { pCoexSta->bUnderIps =3D false; =20 - halbtc8723b1ant_InitHwConfig(pBtCoexist, false, false); - halbtc8723b1ant_InitCoexDm(pBtCoexist); - halbtc8723b1ant_QueryBtInfo(pBtCoexist); + halbtc8723b1ant_InitHwConfig(bt_coexist, false, false); + halbtc8723b1ant_InitCoexDm(bt_coexist); + halbtc8723b1ant_QueryBtInfo(bt_coexist); } } =20 -void EXhalbtc8723b1ant_LpsNotify(struct btc_coexist *pBtCoexist, u8 type) +void EXhalbtc8723b1ant_LpsNotify(struct btc_coexist *bt_coexist, u8 type) { - if (pBtCoexist->bManualControl || pBtCoexist->bStopCoexDm) + if (bt_coexist->bManualControl || bt_coexist->bStopCoexDm) return; =20 if (type =3D=3D BTC_LPS_ENABLE) @@ -2232,85 +2232,85 @@ void EXhalbtc8723b1ant_LpsNotify(struct btc_coexist= *pBtCoexist, u8 type) pCoexSta->bUnderLps =3D false; } =20 -void EXhalbtc8723b1ant_ScanNotify(struct btc_coexist *pBtCoexist, u8 type) +void EXhalbtc8723b1ant_ScanNotify(struct btc_coexist *bt_coexist, u8 type) { bool bWifiConnected =3D false, bBtHsOn =3D false; u32 wifiLinkStatus =3D 0; u32 numOfWifiLink =3D 0; - bool bBtCtrlAggBufSize =3D false; - u8 aggBufSize =3D 5; + bool bt_ctrl_agg_buf_size =3D false; + u8 agg_buf_size =3D 5; =20 - if (pBtCoexist->bManualControl || pBtCoexist->bStopCoexDm) + if (bt_coexist->bManualControl || bt_coexist->bStopCoexDm) return; =20 if (type =3D=3D BTC_SCAN_START) { pCoexSta->bWiFiIsHighPriTask =3D true; =20 - halbtc8723b1ant_PsTdma(pBtCoexist, FORCE_EXEC, false, 8); /* Force ante= nna setup for no scan result issue */ - pBtCoexist->fBtcRead4Byte(pBtCoexist, 0x948); - pBtCoexist->fBtcRead1Byte(pBtCoexist, 0x765); - pBtCoexist->fBtcRead1Byte(pBtCoexist, 0x67); + halbtc8723b1ant_PsTdma(bt_coexist, FORCE_EXEC, false, 8); /* Force ante= nna setup for no scan result issue */ + bt_coexist->fBtcRead4Byte(bt_coexist, 0x948); + bt_coexist->fBtcRead1Byte(bt_coexist, 0x765); + bt_coexist->fBtcRead1Byte(bt_coexist, 0x67); } else { pCoexSta->bWiFiIsHighPriTask =3D false; =20 - pBtCoexist->fBtcGet( - pBtCoexist, BTC_GET_U1_AP_NUM, &pCoexSta->nScanAPNum + bt_coexist->fBtcGet( + bt_coexist, BTC_GET_U1_AP_NUM, &pCoexSta->nScanAPNum ); } =20 - if (pBtCoexist->btInfo.bBtDisabled) + if (bt_coexist->btInfo.bBtDisabled) return; =20 - pBtCoexist->fBtcGet(pBtCoexist, BTC_GET_BL_HS_OPERATION, &bBtHsOn); - pBtCoexist->fBtcGet(pBtCoexist, BTC_GET_BL_WIFI_CONNECTED, &bWifiConnecte= d); + bt_coexist->fBtcGet(bt_coexist, BTC_GET_BL_HS_OPERATION, &bBtHsOn); + bt_coexist->fBtcGet(bt_coexist, BTC_GET_BL_WIFI_CONNECTED, &bWifiConnecte= d); =20 - halbtc8723b1ant_QueryBtInfo(pBtCoexist); + halbtc8723b1ant_QueryBtInfo(bt_coexist); =20 - pBtCoexist->fBtcGet(pBtCoexist, BTC_GET_U4_WIFI_LINK_STATUS, &wifiLinkSta= tus); + bt_coexist->fBtcGet(bt_coexist, BTC_GET_U4_WIFI_LINK_STATUS, &wifiLinkSta= tus); numOfWifiLink =3D wifiLinkStatus >> 16; =20 if (numOfWifiLink >=3D 2) { - halbtc8723b1ant_LimitedTx(pBtCoexist, NORMAL_EXEC, 0, 0, 0, 0); + halbtc8723b1ant_LimitedTx(bt_coexist, NORMAL_EXEC, 0, 0, 0, 0); halbtc8723b1ant_LimitedRx( - pBtCoexist, NORMAL_EXEC, false, bBtCtrlAggBufSize, aggBufSize + bt_coexist, NORMAL_EXEC, false, bt_ctrl_agg_buf_size, agg_buf_size ); - halbtc8723b1ant_ActionWifiMultiPort(pBtCoexist); + halbtc8723b1ant_ActionWifiMultiPort(bt_coexist); return; } =20 if (pCoexSta->bC2hBtInquiryPage) { - halbtc8723b1ant_ActionBtInquiry(pBtCoexist); + halbtc8723b1ant_ActionBtInquiry(bt_coexist); return; } else if (bBtHsOn) { - halbtc8723b1ant_ActionHs(pBtCoexist); + halbtc8723b1ant_ActionHs(bt_coexist); return; } =20 if (type =3D=3D BTC_SCAN_START) { if (!bWifiConnected) /* non-connected scan */ - halbtc8723b1ant_ActionWifiNotConnectedScan(pBtCoexist); + halbtc8723b1ant_ActionWifiNotConnectedScan(bt_coexist); else /* wifi is connected */ - halbtc8723b1ant_ActionWifiConnectedScan(pBtCoexist); + halbtc8723b1ant_ActionWifiConnectedScan(bt_coexist); } else if (type =3D=3D BTC_SCAN_FINISH) { if (!bWifiConnected) /* non-connected scan */ - halbtc8723b1ant_ActionWifiNotConnected(pBtCoexist); + halbtc8723b1ant_ActionWifiNotConnected(bt_coexist); else - halbtc8723b1ant_ActionWifiConnected(pBtCoexist); + halbtc8723b1ant_ActionWifiConnected(bt_coexist); } } =20 -void EXhalbtc8723b1ant_ConnectNotify(struct btc_coexist *pBtCoexist, u8 ty= pe) +void EXhalbtc8723b1ant_ConnectNotify(struct btc_coexist *bt_coexist, u8 ty= pe) { bool bWifiConnected =3D false, bBtHsOn =3D false; u32 wifiLinkStatus =3D 0; u32 numOfWifiLink =3D 0; - bool bBtCtrlAggBufSize =3D false; - u8 aggBufSize =3D 5; + bool bt_ctrl_agg_buf_size =3D false; + u8 agg_buf_size =3D 5; =20 if ( - pBtCoexist->bManualControl || - pBtCoexist->bStopCoexDm || - pBtCoexist->btInfo.bBtDisabled + bt_coexist->bManualControl || + bt_coexist->bStopCoexDm || + bt_coexist->btInfo.bBtDisabled ) return; =20 @@ -2322,79 +2322,79 @@ void EXhalbtc8723b1ant_ConnectNotify(struct btc_coe= xist *pBtCoexist, u8 type) /* pCoexDm->nArpCnt =3D 0; */ } =20 - pBtCoexist->fBtcGet(pBtCoexist, BTC_GET_U4_WIFI_LINK_STATUS, &wifiLinkSta= tus); + bt_coexist->fBtcGet(bt_coexist, BTC_GET_U4_WIFI_LINK_STATUS, &wifiLinkSta= tus); numOfWifiLink =3D wifiLinkStatus >> 16; if (numOfWifiLink >=3D 2) { - halbtc8723b1ant_LimitedTx(pBtCoexist, NORMAL_EXEC, 0, 0, 0, 0); - halbtc8723b1ant_LimitedRx(pBtCoexist, NORMAL_EXEC, false, bBtCtrlAggBufS= ize, aggBufSize); - halbtc8723b1ant_ActionWifiMultiPort(pBtCoexist); + halbtc8723b1ant_LimitedTx(bt_coexist, NORMAL_EXEC, 0, 0, 0, 0); + halbtc8723b1ant_LimitedRx(bt_coexist, NORMAL_EXEC, false, bt_ctrl_agg_bu= f_size, agg_buf_size); + halbtc8723b1ant_ActionWifiMultiPort(bt_coexist); return; } =20 - pBtCoexist->fBtcGet(pBtCoexist, BTC_GET_BL_HS_OPERATION, &bBtHsOn); + bt_coexist->fBtcGet(bt_coexist, BTC_GET_BL_HS_OPERATION, &bBtHsOn); if (pCoexSta->bC2hBtInquiryPage) { - halbtc8723b1ant_ActionBtInquiry(pBtCoexist); + halbtc8723b1ant_ActionBtInquiry(bt_coexist); return; } else if (bBtHsOn) { - halbtc8723b1ant_ActionHs(pBtCoexist); + halbtc8723b1ant_ActionHs(bt_coexist); return; } =20 if (type =3D=3D BTC_ASSOCIATE_START) { - halbtc8723b1ant_ActionWifiNotConnectedAssoAuth(pBtCoexist); + halbtc8723b1ant_ActionWifiNotConnectedAssoAuth(bt_coexist); } else if (type =3D=3D BTC_ASSOCIATE_FINISH) { - pBtCoexist->fBtcGet(pBtCoexist, BTC_GET_BL_WIFI_CONNECTED, &bWifiConnect= ed); + bt_coexist->fBtcGet(bt_coexist, BTC_GET_BL_WIFI_CONNECTED, &bWifiConnect= ed); if (!bWifiConnected) /* non-connected scan */ - halbtc8723b1ant_ActionWifiNotConnected(pBtCoexist); + halbtc8723b1ant_ActionWifiNotConnected(bt_coexist); else - halbtc8723b1ant_ActionWifiConnected(pBtCoexist); + halbtc8723b1ant_ActionWifiConnected(bt_coexist); } } =20 -void EXhalbtc8723b1ant_MediaStatusNotify(struct btc_coexist *pBtCoexist, u= 8 type) +void EXhalbtc8723b1ant_MediaStatusNotify(struct btc_coexist *bt_coexist, u= 8 type) { u8 H2C_Parameter[3] =3D {0}; u32 wifiBw; u8 wifiCentralChnl; - bool bWifiUnderBMode =3D false; + bool wifi_under_b_mode =3D false; =20 if ( - pBtCoexist->bManualControl || - pBtCoexist->bStopCoexDm || - pBtCoexist->btInfo.bBtDisabled + bt_coexist->bManualControl || + bt_coexist->bStopCoexDm || + bt_coexist->btInfo.bBtDisabled ) return; =20 if (type =3D=3D BTC_MEDIA_CONNECT) { - pBtCoexist->fBtcGet(pBtCoexist, BTC_GET_BL_WIFI_UNDER_B_MODE, &bWifiUnde= rBMode); + bt_coexist->fBtcGet(bt_coexist, BTC_GET_BL_WIFI_UNDER_B_MODE, &wifi_unde= r_b_mode); =20 /* Set CCK Tx/Rx high Pri except 11b mode */ - if (bWifiUnderBMode) { - pBtCoexist->fBtcWrite1Byte(pBtCoexist, 0x6cd, 0x00); /* CCK Tx */ - pBtCoexist->fBtcWrite1Byte(pBtCoexist, 0x6cf, 0x00); /* CCK Rx */ + if (wifi_under_b_mode) { + bt_coexist->fBtcWrite1Byte(bt_coexist, 0x6cd, 0x00); /* CCK Tx */ + bt_coexist->fBtcWrite1Byte(bt_coexist, 0x6cf, 0x00); /* CCK Rx */ } else { - pBtCoexist->fBtcWrite1Byte(pBtCoexist, 0x6cd, 0x10); /* CCK Tx */ - pBtCoexist->fBtcWrite1Byte(pBtCoexist, 0x6cf, 0x10); /* CCK Rx */ + bt_coexist->fBtcWrite1Byte(bt_coexist, 0x6cd, 0x10); /* CCK Tx */ + bt_coexist->fBtcWrite1Byte(bt_coexist, 0x6cf, 0x10); /* CCK Rx */ } =20 - pCoexDm->backupArfrCnt1 =3D pBtCoexist->fBtcRead4Byte(pBtCoexist, 0x430); - pCoexDm->backupArfrCnt2 =3D pBtCoexist->fBtcRead4Byte(pBtCoexist, 0x434); - pCoexDm->backupRetryLimit =3D pBtCoexist->fBtcRead2Byte(pBtCoexist, 0x42= a); - pCoexDm->backupAmpduMaxTime =3D pBtCoexist->fBtcRead1Byte(pBtCoexist, 0x= 456); + pCoexDm->backupArfrCnt1 =3D bt_coexist->fBtcRead4Byte(bt_coexist, 0x430); + pCoexDm->backupArfrCnt2 =3D bt_coexist->fBtcRead4Byte(bt_coexist, 0x434); + pCoexDm->backupRetryLimit =3D bt_coexist->fBtcRead2Byte(bt_coexist, 0x42= a); + pCoexDm->backupAmpduMaxTime =3D bt_coexist->fBtcRead1Byte(bt_coexist, 0x= 456); } else { pCoexDm->nArpCnt =3D 0; =20 - pBtCoexist->fBtcWrite1Byte(pBtCoexist, 0x6cd, 0x0); /* CCK Tx */ - pBtCoexist->fBtcWrite1Byte(pBtCoexist, 0x6cf, 0x0); /* CCK Rx */ + bt_coexist->fBtcWrite1Byte(bt_coexist, 0x6cd, 0x0); /* CCK Tx */ + bt_coexist->fBtcWrite1Byte(bt_coexist, 0x6cf, 0x0); /* CCK Rx */ } =20 /* only 2.4G we need to inform bt the chnl mask */ - pBtCoexist->fBtcGet(pBtCoexist, BTC_GET_U1_WIFI_CENTRAL_CHNL, &wifiCentra= lChnl); + bt_coexist->fBtcGet(bt_coexist, BTC_GET_U1_WIFI_CENTRAL_CHNL, &wifiCentra= lChnl); if ((type =3D=3D BTC_MEDIA_CONNECT) && (wifiCentralChnl <=3D 14)) { /* H2C_Parameter[0] =3D 0x1; */ H2C_Parameter[0] =3D 0x0; H2C_Parameter[1] =3D wifiCentralChnl; - pBtCoexist->fBtcGet(pBtCoexist, BTC_GET_U4_WIFI_BW, &wifiBw); + bt_coexist->fBtcGet(bt_coexist, BTC_GET_U4_WIFI_BW, &wifiBw); =20 if (wifiBw =3D=3D BTC_WIFI_BW_HT40) H2C_Parameter[2] =3D 0x30; @@ -2406,21 +2406,21 @@ void EXhalbtc8723b1ant_MediaStatusNotify(struct btc= _coexist *pBtCoexist, u8 type pCoexDm->wifiChnlInfo[1] =3D H2C_Parameter[1]; pCoexDm->wifiChnlInfo[2] =3D H2C_Parameter[2]; =20 - pBtCoexist->fBtcFillH2c(pBtCoexist, 0x66, 3, H2C_Parameter); + bt_coexist->fBtcFillH2c(bt_coexist, 0x66, 3, H2C_Parameter); } =20 -void EXhalbtc8723b1ant_SpecialPacketNotify(struct btc_coexist *pBtCoexist,= u8 type) +void EXhalbtc8723b1ant_SpecialPacketNotify(struct btc_coexist *bt_coexist,= u8 type) { bool bBtHsOn =3D false; u32 wifiLinkStatus =3D 0; u32 numOfWifiLink =3D 0; - bool bBtCtrlAggBufSize =3D false; - u8 aggBufSize =3D 5; + bool bt_ctrl_agg_buf_size =3D false; + u8 agg_buf_size =3D 5; =20 if ( - pBtCoexist->bManualControl || - pBtCoexist->bStopCoexDm || - pBtCoexist->btInfo.bBtDisabled + bt_coexist->bManualControl || + bt_coexist->bStopCoexDm || + bt_coexist->btInfo.bBtDisabled ) return; =20 @@ -2432,7 +2432,7 @@ void EXhalbtc8723b1ant_SpecialPacketNotify(struct btc= _coexist *pBtCoexist, u8 ty if (type =3D=3D BTC_PACKET_ARP) { pCoexDm->nArpCnt++; =20 - if (pCoexDm->nArpCnt >=3D 10) /* if APR PKT > 10 after connect, do not= go to ActionWifiConnectedSpecialPacket(pBtCoexist) */ + if (pCoexDm->nArpCnt >=3D 10) /* if APR PKT > 10 after connect, do not= go to ActionWifiConnectedSpecialPacket(bt_coexist) */ pCoexSta->bWiFiIsHighPriTask =3D false; else pCoexSta->bWiFiIsHighPriTask =3D true; @@ -2445,26 +2445,26 @@ void EXhalbtc8723b1ant_SpecialPacketNotify(struct b= tc_coexist *pBtCoexist, u8 ty =20 pCoexSta->specialPktPeriodCnt =3D 0; =20 - pBtCoexist->fBtcGet( - pBtCoexist, BTC_GET_U4_WIFI_LINK_STATUS, &wifiLinkStatus + bt_coexist->fBtcGet( + bt_coexist, BTC_GET_U4_WIFI_LINK_STATUS, &wifiLinkStatus ); numOfWifiLink =3D wifiLinkStatus >> 16; =20 if (numOfWifiLink >=3D 2) { - halbtc8723b1ant_LimitedTx(pBtCoexist, NORMAL_EXEC, 0, 0, 0, 0); + halbtc8723b1ant_LimitedTx(bt_coexist, NORMAL_EXEC, 0, 0, 0, 0); halbtc8723b1ant_LimitedRx( - pBtCoexist, NORMAL_EXEC, false, bBtCtrlAggBufSize, aggBufSize + bt_coexist, NORMAL_EXEC, false, bt_ctrl_agg_buf_size, agg_buf_size ); - halbtc8723b1ant_ActionWifiMultiPort(pBtCoexist); + halbtc8723b1ant_ActionWifiMultiPort(bt_coexist); return; } =20 - pBtCoexist->fBtcGet(pBtCoexist, BTC_GET_BL_HS_OPERATION, &bBtHsOn); + bt_coexist->fBtcGet(bt_coexist, BTC_GET_BL_HS_OPERATION, &bBtHsOn); if (pCoexSta->bC2hBtInquiryPage) { - halbtc8723b1ant_ActionBtInquiry(pBtCoexist); + halbtc8723b1ant_ActionBtInquiry(bt_coexist); return; } else if (bBtHsOn) { - halbtc8723b1ant_ActionHs(pBtCoexist); + halbtc8723b1ant_ActionHs(bt_coexist); return; } =20 @@ -2473,11 +2473,11 @@ void EXhalbtc8723b1ant_SpecialPacketNotify(struct b= tc_coexist *pBtCoexist, u8 ty type =3D=3D BTC_PACKET_EAPOL || ((type =3D=3D BTC_PACKET_ARP) && (pCoexSta->bWiFiIsHighPriTask)) ) - halbtc8723b1ant_ActionWifiConnectedSpecialPacket(pBtCoexist); + halbtc8723b1ant_ActionWifiConnectedSpecialPacket(bt_coexist); } =20 void EXhalbtc8723b1ant_BtInfoNotify( - struct btc_coexist *pBtCoexist, u8 *tmpBuf, u8 length + struct btc_coexist *bt_coexist, u8 *tmpBuf, u8 length ) { u8 btInfo =3D 0; @@ -2509,32 +2509,32 @@ void EXhalbtc8723b1ant_BtInfoNotify( else pCoexSta->bC2hBtPage =3D false; =20 - pCoexSta->btRssi =3D pCoexSta->btInfoC2h[rspSource][3] * 2 - 90; + pCoexSta->bt_rssi =3D pCoexSta->btInfoC2h[rspSource][3] * 2 - 90; /* pCoexSta->btInfoC2h[rspSource][3]*2+10; */ =20 pCoexSta->btInfoExt =3D pCoexSta->btInfoC2h[rspSource][4]; =20 pCoexSta->bBtTxRxMask =3D (pCoexSta->btInfoC2h[rspSource][2] & 0x40); - pBtCoexist->fBtcSet(pBtCoexist, BTC_SET_BL_BT_TX_RX_MASK, &pCoexSta->bBt= TxRxMask); + bt_coexist->fBtcSet(bt_coexist, BTC_SET_BL_BT_TX_RX_MASK, &pCoexSta->bBt= TxRxMask); =20 if (!pCoexSta->bBtTxRxMask) { /* BT into is responded by BT FW and BT RF REG 0x3C !=3D 0x15 =3D> Need= to switch BT TRx Mask */ - pBtCoexist->fBtcSetBtReg(pBtCoexist, BTC_BT_REG_RF, 0x3c, 0x15); + bt_coexist->fBtcSetBtReg(bt_coexist, BTC_BT_REG_RF, 0x3c, 0x15); } =20 /* Here we need to resend some wifi info to BT */ /* because bt is reset and loss of the info. */ if (pCoexSta->btInfoExt & BIT1) { - pBtCoexist->fBtcGet(pBtCoexist, BTC_GET_BL_WIFI_CONNECTED, &bWifiConnec= ted); + bt_coexist->fBtcGet(bt_coexist, BTC_GET_BL_WIFI_CONNECTED, &bWifiConnec= ted); if (bWifiConnected) - EXhalbtc8723b1ant_MediaStatusNotify(pBtCoexist, BTC_MEDIA_CONNECT); + EXhalbtc8723b1ant_MediaStatusNotify(bt_coexist, BTC_MEDIA_CONNECT); else - EXhalbtc8723b1ant_MediaStatusNotify(pBtCoexist, BTC_MEDIA_DISCONNECT); + EXhalbtc8723b1ant_MediaStatusNotify(bt_coexist, BTC_MEDIA_DISCONNECT); } =20 if (pCoexSta->btInfoExt & BIT3) { - if (!pBtCoexist->bManualControl && !pBtCoexist->bStopCoexDm) - halbtc8723b1ant_IgnoreWlanAct(pBtCoexist, FORCE_EXEC, false); + if (!bt_coexist->bManualControl && !bt_coexist->bStopCoexDm) + halbtc8723b1ant_IgnoreWlanAct(bt_coexist, FORCE_EXEC, false); } else { /* BT already NOT ignore Wlan active, do nothing here. */ } @@ -2576,7 +2576,7 @@ void EXhalbtc8723b1ant_BtInfoNotify( pCoexSta->bScoExist =3D false; } =20 - halbtc8723b1ant_UpdateBtLinkInfo(pBtCoexist); + halbtc8723b1ant_UpdateBtLinkInfo(bt_coexist); =20 btInfo =3D btInfo & 0x1f; /* mask profile bit for connect-ilde identific= ation (for CSR case: A2DP idle --> 0x41) */ =20 @@ -2607,60 +2607,60 @@ void EXhalbtc8723b1ant_BtInfoNotify( bBtBusy =3D true; else bBtBusy =3D false; - pBtCoexist->fBtcSet(pBtCoexist, BTC_SET_BL_BT_TRAFFIC_BUSY, &bBtBusy); + bt_coexist->fBtcSet(bt_coexist, BTC_SET_BL_BT_TRAFFIC_BUSY, &bBtBusy); =20 - halbtc8723b1ant_RunCoexistMechanism(pBtCoexist); + halbtc8723b1ant_RunCoexistMechanism(bt_coexist); } =20 -void EXhalbtc8723b1ant_HaltNotify(struct btc_coexist *pBtCoexist) +void EXhalbtc8723b1ant_HaltNotify(struct btc_coexist *bt_coexist) { - halbtc8723b1ant_PowerSaveState(pBtCoexist, BTC_PS_WIFI_NATIVE, 0x0, 0x0); - halbtc8723b1ant_PsTdma(pBtCoexist, FORCE_EXEC, false, 0); - halbtc8723b1ant_SetAntPath(pBtCoexist, BTC_ANT_PATH_BT, false, true); + halbtc8723b1ant_PowerSaveState(bt_coexist, BTC_PS_WIFI_NATIVE, 0x0, 0x0); + halbtc8723b1ant_PsTdma(bt_coexist, FORCE_EXEC, false, 0); + halbtc8723b1ant_SetAntPath(bt_coexist, BTC_ANT_PATH_BT, false, true); =20 - halbtc8723b1ant_IgnoreWlanAct(pBtCoexist, FORCE_EXEC, true); + halbtc8723b1ant_IgnoreWlanAct(bt_coexist, FORCE_EXEC, true); =20 - EXhalbtc8723b1ant_MediaStatusNotify(pBtCoexist, BTC_MEDIA_DISCONNECT); + EXhalbtc8723b1ant_MediaStatusNotify(bt_coexist, BTC_MEDIA_DISCONNECT); =20 - pBtCoexist->bStopCoexDm =3D true; + bt_coexist->bStopCoexDm =3D true; } =20 -void EXhalbtc8723b1ant_PnpNotify(struct btc_coexist *pBtCoexist, u8 pnpSta= te) +void EXhalbtc8723b1ant_PnpNotify(struct btc_coexist *bt_coexist, u8 pnpSta= te) { if (pnpState =3D=3D BTC_WIFI_PNP_SLEEP) { - halbtc8723b1ant_PowerSaveState(pBtCoexist, BTC_PS_WIFI_NATIVE, 0x0, 0x0); - halbtc8723b1ant_PsTdma(pBtCoexist, NORMAL_EXEC, false, 0); - halbtc8723b1ant_CoexTableWithType(pBtCoexist, NORMAL_EXEC, 2); - halbtc8723b1ant_SetAntPath(pBtCoexist, BTC_ANT_PATH_BT, false, true); + halbtc8723b1ant_PowerSaveState(bt_coexist, BTC_PS_WIFI_NATIVE, 0x0, 0x0); + halbtc8723b1ant_PsTdma(bt_coexist, NORMAL_EXEC, false, 0); + halbtc8723b1ant_CoexTableWithType(bt_coexist, NORMAL_EXEC, 2); + halbtc8723b1ant_SetAntPath(bt_coexist, BTC_ANT_PATH_BT, false, true); =20 - pBtCoexist->bStopCoexDm =3D true; + bt_coexist->bStopCoexDm =3D true; } else if (pnpState =3D=3D BTC_WIFI_PNP_WAKE_UP) { - pBtCoexist->bStopCoexDm =3D false; - halbtc8723b1ant_InitHwConfig(pBtCoexist, false, false); - halbtc8723b1ant_InitCoexDm(pBtCoexist); - halbtc8723b1ant_QueryBtInfo(pBtCoexist); + bt_coexist->bStopCoexDm =3D false; + halbtc8723b1ant_InitHwConfig(bt_coexist, false, false); + halbtc8723b1ant_InitCoexDm(bt_coexist); + halbtc8723b1ant_QueryBtInfo(bt_coexist); } } =20 -void EXhalbtc8723b1ant_Periodical(struct btc_coexist *pBtCoexist) +void EXhalbtc8723b1ant_Periodical(struct btc_coexist *bt_coexist) { static u8 disVerInfoCnt; u32 fwVer =3D 0, btPatchVer =3D 0; =20 if (disVerInfoCnt <=3D 5) { disVerInfoCnt +=3D 1; - pBtCoexist->fBtcGet(pBtCoexist, BTC_GET_U4_BT_PATCH_VER, &btPatchVer); - pBtCoexist->fBtcGet(pBtCoexist, BTC_GET_U4_WIFI_FW_VER, &fwVer); + bt_coexist->fBtcGet(bt_coexist, BTC_GET_U4_BT_PATCH_VER, &btPatchVer); + bt_coexist->fBtcGet(bt_coexist, BTC_GET_U4_WIFI_FW_VER, &fwVer); } =20 - halbtc8723b1ant_MonitorBtCtr(pBtCoexist); - halbtc8723b1ant_MonitorWiFiCtr(pBtCoexist); + halbtc8723b1ant_MonitorBtCtr(bt_coexist); + halbtc8723b1ant_MonitorWiFiCtr(bt_coexist); =20 if ( - halbtc8723b1ant_IsWifiStatusChanged(pBtCoexist) || + halbtc8723b1ant_IsWifiStatusChanged(bt_coexist) || pCoexDm->bAutoTdmaAdjust ) - halbtc8723b1ant_RunCoexistMechanism(pBtCoexist); + halbtc8723b1ant_RunCoexistMechanism(bt_coexist); =20 pCoexSta->specialPktPeriodCnt++; } --=20 2.43.0