From patchwork Mon Sep 14 19:10:04 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?G=C3=A1bor_Stefanik?= X-Patchwork-Id: 47371 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 n8EJ9vKl017681 for ; Mon, 14 Sep 2009 19:09:57 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932983AbZINTJv (ORCPT ); Mon, 14 Sep 2009 15:09:51 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S932931AbZINTJv (ORCPT ); Mon, 14 Sep 2009 15:09:51 -0400 Received: from mail-fx0-f217.google.com ([209.85.220.217]:53772 "EHLO mail-fx0-f217.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932767AbZINTJu (ORCPT ); Mon, 14 Sep 2009 15:09:50 -0400 Received: by fxm17 with SMTP id 17so1071846fxm.37 for ; Mon, 14 Sep 2009 12:09:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from :user-agent:mime-version:to:cc:subject:content-type :content-transfer-encoding; bh=8mZr/VpN3BlWMZ77n3p2NrkG1nh6CpWdbcn8kll1i0k=; b=kPVHU1wNpg51tqXqnsdiIUMSHiVvb4CHrDP+n9kBv9I1ZuDl1hKLX7ou0SlI0azVgI 6yN6FhsqLe4WjvBvzBKJrzAa1nohY/3lxdcVfCe8/Rx+zz5w3urnqxS++ON0Wjozr0do l7s1ofZXF3PQIwsSjaQAIE7RPHJ4mixm+gGvc= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:cc:subject :content-type:content-transfer-encoding; b=M/ODa81exQ8YTQoW3Soat5CCiPcaFTihImr1P2WeHhyNXdCHNzwC4XKEhfrGQu3RET nKLfWWamOQvN93ifQ2gaR/A/T/hA/GDSSV1ujRZPclNqT8IWYdic+F8ukfesaHKpnEoo WNZUXe6nQ6gR/GKj52jGCWToC1B57w8ibOPQY= Received: by 10.204.141.18 with SMTP id k18mr5329715bku.139.1252955392674; Mon, 14 Sep 2009 12:09:52 -0700 (PDT) Received: from ?192.168.1.3? (pool-04c50.externet.hu [92.52.193.79]) by mx.google.com with ESMTPS id 28sm6689035fkx.48.2009.09.14.12.09.50 (version=TLSv1/SSLv3 cipher=RC4-MD5); Mon, 14 Sep 2009 12:09:51 -0700 (PDT) Message-ID: <4AAE950C.2050704@gmail.com> Date: Mon, 14 Sep 2009 21:10:04 +0200 From: =?UTF-8?B?R8OhYm9yIFN0ZWZhbmlr?= User-Agent: Thunderbird 2.0.0.23 (Windows/20090812) MIME-Version: 1.0 To: John Linville , Michael Buesch , Larry Finger CC: Broadcom Wireless , linux-wireless Subject: [PATCH] b43: LP-PHY: Fix analog core switching Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org The generic analog switch routine is not correct for LP-PHY according to the latest specs. Implement the proper analog core switch routine. Signed-off-by: Gábor Stefanik --- -- To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/drivers/net/wireless/b43/phy_lp.c b/drivers/net/wireless/b43/phy_lp.c index 80da9c7..b0e127a 100644 --- a/drivers/net/wireless/b43/phy_lp.c +++ b/drivers/net/wireless/b43/phy_lp.c @@ -2160,6 +2160,16 @@ static int lpphy_b2063_tune(struct b43_w return 0; } +static void b43_lpphy_op_switch_analog(struct b43_wldev *dev, bool on) +{ + if (on) { + b43_phy_set(dev, B43_LPPHY_AFE_CTL_OVRVAL, 0x7); + b43_phy_set(dev, B43_LPPHY_AFE_CTL_OVR, 0x7); + } else { + b43_phy_mask(dev, B43_LPPHY_AFE_CTL_OVR, 0xFFF8); + } +} + static int b43_lpphy_op_switch_channel(struct b43_wldev *dev, unsigned int new_channel) { @@ -2239,7 +2249,7 @@ const struct b43_phy_operations b43_phyo .radio_read = b43_lpphy_op_radio_read, .radio_write = b43_lpphy_op_radio_write, .software_rfkill = b43_lpphy_op_software_rfkill, - .switch_analog = b43_phyop_switch_analog_generic, + .switch_analog = b43_lpphy_op_switch_analog, .switch_channel = b43_lpphy_op_switch_channel, .get_default_chan = b43_lpphy_op_get_default_chan, .set_rx_antenna = b43_lpphy_op_set_rx_antenna,