From patchwork Sat Mar 7 17:04:55 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Malcolm Priestley X-Patchwork-Id: 5959821 X-Patchwork-Delegate: kvalo@adurom.com 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.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 9C7599F318 for ; Sat, 7 Mar 2015 17:05:43 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id B0183202F2 for ; Sat, 7 Mar 2015 17:05:42 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id D5E59202FF for ; Sat, 7 Mar 2015 17:05:41 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752151AbbCGRFk (ORCPT ); Sat, 7 Mar 2015 12:05:40 -0500 Received: from mail-we0-f176.google.com ([74.125.82.176]:37869 "EHLO mail-we0-f176.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751615AbbCGRFc (ORCPT ); Sat, 7 Mar 2015 12:05:32 -0500 Received: by wesx3 with SMTP id x3so18884654wes.4; Sat, 07 Mar 2015 09:05:31 -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=IfLL+wbZG1ei1GKiv/tz/atMJqjLE179MDJgind8bz0=; b=l+kswCsgbCd1nLoMTKNGP37RGvYutcFstndaDmKfj310xHLAjkTIQZgr6e8ZaAt0c1 0GEfIhRbxocDAode2tBz8DewaXLz4xWkimeRNQov1ILHsoaVVjQTDfbWKE7pci1ew/Q5 MATf9AsKCO1lLc9Jr1Qodo9qK5OhIJjISYmemPTZJvKxhd0YVPNOKYB5Dxh4q5Ap+DJv JkCE0jTEs+Vwc/2QHvNBtOvnGVMcSHOgX+C+L6ptN+UNmN2LVxPQ/6fuisJO7oIMTx+T TgpETCCZkwPKOIxsayVUt8xgU7SOCfxDjBRW1tArivEoLtO7bgzkKyvG54WilrWgOxUV 4yAg== X-Received: by 10.180.208.107 with SMTP id md11mr1117818wic.10.1425747931027; Sat, 07 Mar 2015 09:05:31 -0800 (PST) Received: from route-4.3.home (188.29.104.111.threembb.co.uk. [188.29.104.111]) by mx.google.com with ESMTPSA id dx11sm20088534wjb.23.2015.03.07.09.05.29 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sat, 07 Mar 2015 09:05:30 -0800 (PST) From: Malcolm Priestley To: gregkh@linuxfoundation.org Cc: linux-wireless@vger.kernel.org, Malcolm Priestley , Subject: [PATCH resend 2/3] vt6655: Fix late setting of byRFType. Date: Sat, 7 Mar 2015 17:04:55 +0000 Message-Id: <1425747896-8353-2-git-send-email-tvboxspy@gmail.com> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1425747896-8353-1-git-send-email-tvboxspy@gmail.com> References: <1425747896-8353-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 byRFType is not set prior to registration of mac80211 causing unpredictable operation after channel scans. With byRFType unset all channels are enabled this causes tx power to be set to values not present its eeprom. Move setting of this variable to vt6655_probe. byRFType must have a mask set. byRevId not used by driver and is removed. Signed-off-by: Malcolm Priestley Cc: # v3.19+ --- drivers/staging/vt6655/device_main.c | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/drivers/staging/vt6655/device_main.c b/drivers/staging/vt6655/device_main.c index 0204ea5..a512f83 100644 --- a/drivers/staging/vt6655/device_main.c +++ b/drivers/staging/vt6655/device_main.c @@ -330,16 +330,6 @@ static void device_init_registers(struct vnt_private *pDevice) /* zonetype initial */ pDevice->byOriginalZonetype = pDevice->abyEEPROM[EEP_OFS_ZONETYPE]; - /* Get RFType */ - pDevice->byRFType = SROMbyReadEmbedded(pDevice->PortOffset, EEP_OFS_RFTYPE); - - /* force change RevID for VT3253 emu */ - if ((pDevice->byRFType & RF_EMU) != 0) - pDevice->byRevId = 0x80; - - pDevice->byRFType &= RF_MASK; - pr_debug("pDevice->byRFType = %x\n", pDevice->byRFType); - if (!pDevice->bZoneRegExist) pDevice->byZoneType = pDevice->abyEEPROM[EEP_OFS_ZONETYPE]; @@ -1780,6 +1770,12 @@ vt6655_probe(struct pci_dev *pcid, const struct pci_device_id *ent) MACvInitialize(priv->PortOffset); MACvReadEtherAddress(priv->PortOffset, priv->abyCurrentNetAddr); + /* Get RFType */ + priv->byRFType = SROMbyReadEmbedded(priv->PortOffset, EEP_OFS_RFTYPE); + priv->byRFType &= RF_MASK; + + dev_dbg(&pcid->dev, "RF Type = %x\n", priv->byRFType); + device_get_options(priv); device_set_options(priv); /* Mask out the options cannot be set to the chip */