From patchwork Fri Sep 11 22:52:48 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Buesch X-Patchwork-Id: 47017 Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by demeter.kernel.org (8.14.2/8.14.2) with ESMTP id n8BMrBUL028657 for ; Fri, 11 Sep 2009 22:53:11 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754352AbZIKWxG (ORCPT ); Fri, 11 Sep 2009 18:53:06 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1752998AbZIKWxG (ORCPT ); Fri, 11 Sep 2009 18:53:06 -0400 Received: from bu3sch.de ([62.75.166.246]:33976 "EHLO vs166246.vserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751775AbZIKWxE (ORCPT ); Fri, 11 Sep 2009 18:53:04 -0400 Received: by vs166246.vserver.de with esmtpa (Exim 4.69) id 1MmEzL-0003be-Aw; Fri, 11 Sep 2009 22:53:07 +0000 From: Michael Buesch To: "John W. Linville" Subject: [PATCH] b43: Disable PMQ mechanism Date: Sat, 12 Sep 2009 00:52:48 +0200 User-Agent: KMail/1.9.9 Cc: Broadcom Wireless , "linux-wireless" MIME-Version: 1.0 Content-Disposition: inline Message-Id: <200909120052.48395.mb@bu3sch.de> Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org This reduces IRQ pressure by about one third on a saturated link by disabling the PMQ mechanism. We currently don't use that mechanism. Signed-off-by: Michael Buesch --- If we implement PMQ in the future, we need to re-enable it, but only for AP mode. See the comment in the sourcecode. Index: wireless-testing/drivers/net/wireless/b43/main.c =================================================================== --- wireless-testing.orig/drivers/net/wireless/b43/main.c 2009-09-12 00:31:44.000000000 +0200 +++ wireless-testing/drivers/net/wireless/b43/main.c 2009-09-12 00:41:27.000000000 +0200 @@ -2675,6 +2675,20 @@ static void b43_adjust_opmode(struct b43 cfp_pretbtt = 50; } b43_write16(dev, 0x612, cfp_pretbtt); + + /* FIXME: We don't currently implement the PMQ mechanism, + * so always disable it. If we want to implement PMQ, + * we need to enable it here (clear DISCPMQ) in AP mode. + */ + if (0 /* ctl & B43_MACCTL_AP */) { + b43_write32(dev, B43_MMIO_MACCTL, + b43_read32(dev, B43_MMIO_MACCTL) + & ~B43_MACCTL_DISCPMQ); + } else { + b43_write32(dev, B43_MMIO_MACCTL, + b43_read32(dev, B43_MMIO_MACCTL) + | B43_MACCTL_DISCPMQ); + } } static void b43_rate_memory_write(struct b43_wldev *dev, u16 rate, int is_ofdm)