From patchwork Sun Dec 21 12:56:35 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Malcolm Priestley X-Patchwork-Id: 5524041 Return-Path: X-Original-To: patchwork-linux-wireless@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id E1B089F1CD for ; Sun, 21 Dec 2014 12:57:21 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 2CD732011E for ; Sun, 21 Dec 2014 12:57:21 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 4521520117 for ; Sun, 21 Dec 2014 12:57:20 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752986AbaLUM5R (ORCPT ); Sun, 21 Dec 2014 07:57:17 -0500 Received: from mail-wi0-f181.google.com ([209.85.212.181]:58363 "EHLO mail-wi0-f181.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752972AbaLUM5P (ORCPT ); Sun, 21 Dec 2014 07:57:15 -0500 Received: by mail-wi0-f181.google.com with SMTP id r20so5718809wiv.14 for ; Sun, 21 Dec 2014 04:57:14 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=XPI3CBo5QKui+ffAGF0JREvY6kkXUFQlnA0CCfiRaGo=; b=WUbDpxLAxiZTx8fygePeVqSiEa/mqVbrmDYAtBINhrvHxhvtkMj0wHA3mbXXc92Dw6 mPeRXESJKSldn3b8fdXbfyfUUqS6Wweg/Oiayu/tHdHZSX/l+M8v0hyoEgSSoa0j0jlJ EsNmdoyml16xiGrZqcxzGUgNfDfYuj2hYysDRVr8V8lyGxwQlfn3t3uvcNwSU+zhmBoI rW5tpom3VqIjQc5y7u9lwUZz7/yFaU7HylYhFF1XA72xlALUn6GHuPpKFUdaAF9p1i4F LWzA17HnXHF4H45J657L8ewYhV9PO54W/AyuKdzbIAr06mlybfU2nf1LUwBpFesICnJZ 0gvg== X-Received: by 10.194.57.84 with SMTP id g20mr33204168wjq.122.1419166634614; Sun, 21 Dec 2014 04:57:14 -0800 (PST) Received: from tipsey.3.home (188.31.3.230.threembb.co.uk. [188.31.3.230]) by mx.google.com with ESMTPSA id ei5sm9430009wid.2.2014.12.21.04.57.13 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sun, 21 Dec 2014 04:57:13 -0800 (PST) From: Malcolm Priestley To: gregkh@linuxfoundation.org Cc: linux-wireless@vger.kernel.org, Malcolm Priestley Subject: [PATCH 2/2 bug fix] staging: vt6655: Fix loss of distant/weak access points on channel change. Date: Sun, 21 Dec 2014 12:56:35 +0000 Message-Id: <1419166595-3096-2-git-send-email-tvboxspy@gmail.com> X-Mailer: git-send-email 2.1.0 In-Reply-To: <1419166595-3096-1-git-send-email-tvboxspy@gmail.com> References: <1419166595-3096-1-git-send-email-tvboxspy@gmail.com> Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Spam-Status: No, score=-6.8 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, T_DKIM_INVALID, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP If the asssocated access point is strong byBBVGACurrent will be adjusted accordingly. Users will nolonger see distant access points without taking down interface. When changing channel reset byBBVGACurrent back to pDevice->abyBBVGA[0] for max sensitivity. Signed-off-by: Malcolm Priestley --- drivers/staging/vt6655/channel.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/drivers/staging/vt6655/channel.c b/drivers/staging/vt6655/channel.c index c8f739d..70f8705 100644 --- a/drivers/staging/vt6655/channel.c +++ b/drivers/staging/vt6655/channel.c @@ -182,6 +182,14 @@ bool set_channel(void *pDeviceHandler, unsigned int uConnectionChannel) if (pDevice->byCurrentCh == uConnectionChannel) return bResult; + /* Set VGA to max sensitivity */ + if (pDevice->bUpdateBBVGA && + pDevice->byBBVGACurrent != pDevice->abyBBVGA[0]) { + pDevice->byBBVGACurrent = pDevice->abyBBVGA[0]; + + BBvSetVGAGainOffset(pDevice, pDevice->byBBVGACurrent); + } + /* clear NAV */ MACvRegBitsOn(pDevice->PortOffset, MAC_REG_MACCR, MACCR_CLRNAV);