mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH 1/9] staging/rtl8187se: Remove code without effect
@ 2013-02-13  2:54 Peter Huewe
  2013-02-13  2:54 ` [PATCH 2/9] " Peter Huewe
                   ` (8 more replies)
  0 siblings, 9 replies; 11+ messages in thread
From: Peter Huewe @ 2013-02-13  2:54 UTC (permalink / raw)
  To: Greg Kroah-Hartman
  Cc: Yunhong Jiang, Sheng Yang, Mike A. Chan, Xiaohui Xin, devel,
	linux-kernel, Peter Huewe

Local variable AcmCtrl is never read/used after assignment so we can remove
all assignments to it and the related code around the assignments.

Signed-off-by: Peter Huewe <peterhuewe@gmx.de>
---
 drivers/staging/rtl8187se/r8185b_init.c |   49 +------------------------------
 1 files changed, 1 insertions(+), 48 deletions(-)

diff --git a/drivers/staging/rtl8187se/r8185b_init.c b/drivers/staging/rtl8187se/r8185b_init.c
index f1db9e4..41419f0 100644
--- a/drivers/staging/rtl8187se/r8185b_init.c
+++ b/drivers/staging/rtl8187se/r8185b_init.c
@@ -964,54 +964,7 @@ void ActUpdateChannelAccessSetting(struct net_device *dev,
 					break;
 				}
 
-				/* Cehck ACM bit. */
-				/* If it is set, immediately set ACM control bit to downgrading AC for passing WMM testplan. Annie, 2005-12-13.	*/
-				{
-					PACI_AIFSN	pAciAifsn = (PACI_AIFSN)(&pAcParam->f.AciAifsn);
-					AC_CODING	eACI = pAciAifsn->f.ACI;
-
-					/*for 8187B AsynIORead issue */
-					u8	AcmCtrl = 0;
-					if (pAciAifsn->f.ACM) {
-						/* ACM bit is 1. */
-						switch (eACI) {
-						case AC0_BE:
-							AcmCtrl |= (BEQ_ACM_EN|BEQ_ACM_CTL|ACM_HW_EN); /* or 0x21 */
-							break;
-
-						case AC2_VI:
-							AcmCtrl |= (VIQ_ACM_EN|VIQ_ACM_CTL|ACM_HW_EN); /* or 0x42 */
-							break;
-
-						case AC3_VO:
-							AcmCtrl |= (VOQ_ACM_EN|VOQ_ACM_CTL|ACM_HW_EN); /* or 0x84 */
-							break;
-
-						default:
-							DMESGW("SetHwReg8185(): [HW_VAR_ACM_CTRL] ACM set failed: eACI is %d\n", eACI);
-							break;
-						}
-					} else {
-						/* ACM bit is 0. */
-						switch (eACI) {
-						case AC0_BE:
-							AcmCtrl &= ((~BEQ_ACM_EN) & (~BEQ_ACM_CTL) & (~ACM_HW_EN)); /* and 0xDE */
-							break;
-
-						case AC2_VI:
-							AcmCtrl &= ((~VIQ_ACM_EN) & (~VIQ_ACM_CTL) & (~ACM_HW_EN)); /* and 0xBD */
-							break;
-
-						case AC3_VO:
-							AcmCtrl &= ((~VOQ_ACM_EN) & (~VOQ_ACM_CTL) & (~ACM_HW_EN)); /* and 0x7B */
-							break;
-
-						default:
-							break;
-						}
-					}
-					write_nic_byte(dev, ACM_CONTROL, 0);
-				}
+				write_nic_byte(dev, ACM_CONTROL, 0);
 			}
 		}
 	}
-- 
1.7.8.6


^ permalink raw reply	[flat|nested] 11+ messages in thread
* [PATCH 1/9] staging/rtl8187se: Remove code without effect
@ 2013-02-13  2:58 Peter Huewe
  0 siblings, 0 replies; 11+ messages in thread
From: Peter Huewe @ 2013-02-13  2:58 UTC (permalink / raw)
  To: Greg Kroah-Hartman
  Cc: Peter Huewe, Andrew Miller, Maxim Mikityanskiy, YAMANE Toshiaki,
	devel, linux-kernel

Local variable AcmCtrl is never read/used after assignment so we can remove
all assignments to it and the related code around the assignments.

Signed-off-by: Peter Huewe <peterhuewe@gmx.de>
---
 drivers/staging/rtl8187se/r8185b_init.c |   49 +------------------------------
 1 files changed, 1 insertions(+), 48 deletions(-)

diff --git a/drivers/staging/rtl8187se/r8185b_init.c b/drivers/staging/rtl8187se/r8185b_init.c
index f1db9e4..41419f0 100644
--- a/drivers/staging/rtl8187se/r8185b_init.c
+++ b/drivers/staging/rtl8187se/r8185b_init.c
@@ -964,54 +964,7 @@ void ActUpdateChannelAccessSetting(struct net_device *dev,
 					break;
 				}
 
-				/* Cehck ACM bit. */
-				/* If it is set, immediately set ACM control bit to downgrading AC for passing WMM testplan. Annie, 2005-12-13.	*/
-				{
-					PACI_AIFSN	pAciAifsn = (PACI_AIFSN)(&pAcParam->f.AciAifsn);
-					AC_CODING	eACI = pAciAifsn->f.ACI;
-
-					/*for 8187B AsynIORead issue */
-					u8	AcmCtrl = 0;
-					if (pAciAifsn->f.ACM) {
-						/* ACM bit is 1. */
-						switch (eACI) {
-						case AC0_BE:
-							AcmCtrl |= (BEQ_ACM_EN|BEQ_ACM_CTL|ACM_HW_EN); /* or 0x21 */
-							break;
-
-						case AC2_VI:
-							AcmCtrl |= (VIQ_ACM_EN|VIQ_ACM_CTL|ACM_HW_EN); /* or 0x42 */
-							break;
-
-						case AC3_VO:
-							AcmCtrl |= (VOQ_ACM_EN|VOQ_ACM_CTL|ACM_HW_EN); /* or 0x84 */
-							break;
-
-						default:
-							DMESGW("SetHwReg8185(): [HW_VAR_ACM_CTRL] ACM set failed: eACI is %d\n", eACI);
-							break;
-						}
-					} else {
-						/* ACM bit is 0. */
-						switch (eACI) {
-						case AC0_BE:
-							AcmCtrl &= ((~BEQ_ACM_EN) & (~BEQ_ACM_CTL) & (~ACM_HW_EN)); /* and 0xDE */
-							break;
-
-						case AC2_VI:
-							AcmCtrl &= ((~VIQ_ACM_EN) & (~VIQ_ACM_CTL) & (~ACM_HW_EN)); /* and 0xBD */
-							break;
-
-						case AC3_VO:
-							AcmCtrl &= ((~VOQ_ACM_EN) & (~VOQ_ACM_CTL) & (~ACM_HW_EN)); /* and 0x7B */
-							break;
-
-						default:
-							break;
-						}
-					}
-					write_nic_byte(dev, ACM_CONTROL, 0);
-				}
+				write_nic_byte(dev, ACM_CONTROL, 0);
 			}
 		}
 	}
-- 
1.7.8.6


^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2013-02-13  3:01 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-02-13  2:54 [PATCH 1/9] staging/rtl8187se: Remove code without effect Peter Huewe
2013-02-13  2:54 ` [PATCH 2/9] " Peter Huewe
2013-02-13  2:54 ` [PATCH 3/9] " Peter Huewe
2013-02-13  2:54 ` [PATCH 4/9] staging/rtl8187se: Remove unused/unnecessary variables Peter Huewe
2013-02-13  2:54 ` [PATCH 5/9] staging/rtl8187se: Reuse ReadBBPortUchar to avoid duplicated code Peter Huewe
2013-02-13  2:54 ` [PATCH 6/9] staging/rtl8187se: Remove temporary variable for return value Peter Huewe
2013-02-13  2:54 ` [PATCH 7/9] staging/rtl8187se: Remove unused functions PlatformIORead2Byte / PlatformIORead4Byte Peter Huewe
2013-02-13  2:54 ` [PATCH 8/9] staging/rtl8187se: Remove duplicated code by using an offset Peter Huewe
2013-02-13  2:54 ` [PATCH 9/9] staging/rtl8187se: Mark functions as static to silence sparse Peter Huewe
2013-02-13  3:00 ` [PATCH 1/9] staging/rtl8187se: Remove code without effect Peter Hüwe
2013-02-13  2:58 Peter Huewe

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®