From patchwork Sun Feb 22 21:24:12 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Malcolm Priestley X-Patchwork-Id: 5862581 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 813249F37F for ; Sun, 22 Feb 2015 21:24:56 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id B63E2205B1 for ; Sun, 22 Feb 2015 21:24:55 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id CEEEE20591 for ; Sun, 22 Feb 2015 21:24:54 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752165AbbBVVYw (ORCPT ); Sun, 22 Feb 2015 16:24:52 -0500 Received: from mail-wi0-f171.google.com ([209.85.212.171]:58589 "EHLO mail-wi0-f171.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752149AbbBVVYv (ORCPT ); Sun, 22 Feb 2015 16:24:51 -0500 Received: by mail-wi0-f171.google.com with SMTP id hi2so13005710wib.4; Sun, 22 Feb 2015 13:24:49 -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=RiK0vpmX0oBRasVuqRqqy8NL8AlF9SGqLWK7OzbcMf4=; b=cFhG1APZzJcjwhShzFjkjpQiRVASBYYT66ZPJyIBdTIjpTyztdGnFlhQfW6xSelk3U cMMeuEMHRFunMh/5vsHJBlTXJKZyYUeQlPh2FD1hTJE+S9gc5w9PDEYZPXfDMpamcMUa dqbg8332HKKg140QgokKKfV4sqxs9mG0oE+woKQX2oKa4difA+nRkraRP0RhKIXWvdmy ooGR+WBtIw97sJbM6zcq07yArV3yUmkgiIVqC5NRcfMh3LyPIOO43+wUQ764Gjx8KGTu +YzevRxjMkyg/mi4Z97BqNKOwb79IrnkNO3WTWZnFJZNmGXYucOlpN7UfB13rAOKAHfH xphg== X-Received: by 10.194.179.194 with SMTP id di2mr16056966wjc.4.1424640289618; Sun, 22 Feb 2015 13:24:49 -0800 (PST) Received: from tipsey.3.home (188.29.99.93.threembb.co.uk. [188.29.99.93]) by mx.google.com with ESMTPSA id fo9sm13012049wib.16.2015.02.22.13.24.47 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sun, 22 Feb 2015 13:24:48 -0800 (PST) From: Malcolm Priestley To: gregkh@linuxfoundation.org Cc: linux-wireless@vger.kernel.org, devel@linuxdriverproject.org, Malcolm Priestley , Subject: [PATCH 2/2 fix for 3.20] vt6655: Fix late setting of byRFType. Date: Sun, 22 Feb 2015 21:24:12 +0000 Message-Id: <1424640252-3202-2-git-send-email-tvboxspy@gmail.com> X-Mailer: git-send-email 2.1.0 In-Reply-To: <1424640252-3202-1-git-send-email-tvboxspy@gmail.com> References: <1424640252-3202-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=unavailable 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 f5c5872..03b2a90 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 */