From patchwork Wed Mar 26 20:04:05 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrea Merello X-Patchwork-Id: 3895131 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 F10C39F2B6 for ; Wed, 26 Mar 2014 20:03:01 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 1F71120221 for ; Wed, 26 Mar 2014 20:03:01 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 475CB2021F for ; Wed, 26 Mar 2014 20:03:00 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756200AbaCZUC5 (ORCPT ); Wed, 26 Mar 2014 16:02:57 -0400 Received: from mail-ee0-f41.google.com ([74.125.83.41]:61607 "EHLO mail-ee0-f41.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756170AbaCZUC4 (ORCPT ); Wed, 26 Mar 2014 16:02:56 -0400 Received: by mail-ee0-f41.google.com with SMTP id t10so2106123eei.28 for ; Wed, 26 Mar 2014 13:02:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id; bh=eldp5lhriAhU2XDhZIxeSr8bsKPcAqV8kk9V63eNjK4=; b=ft1vIlTauWmj8P97zYVY3YuKR2lIzXWnx5NWOObDDB+YfSwTyXRcPZhkchs1ag8vOz SUsW+hDuWPXRGNQ9UpMz2MaVqSpRV+AlvR1yCFPldTrmdnfGc8iZY17u3jsFLA0rn8Hq YBehhOSlQRZdUEBfBnvPWuTwjR6B8ONZXkqUxaLNfTqvp7ezkRTqyabYFIEVdD0w03N5 ebfLkJq40OHn5Mwrk0KN47G5axcpRNyNqZY85bS0SavAaNuAVwI1wDtxP/lTpKUAV1VM i8C9+x8cHxtt1aicnstMcUIA6sZRK3DKQ4nPsOIwA6DkjVViOW4PRegESBRSF/xl0Jbz I9wA== X-Received: by 10.14.211.66 with SMTP id v42mr75940997eeo.31.1395864175789; Wed, 26 Mar 2014 13:02:55 -0700 (PDT) Received: from localhost.localdomain (host179-124-dynamic.6-79-r.retail.telecomitalia.it. [79.6.124.179]) by mx.google.com with ESMTPSA id u46sm49255435eel.1.2014.03.26.13.02.54 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 26 Mar 2014 13:02:55 -0700 (PDT) From: Andrea Merello To: linville@tuxdriver.com Cc: andrea.merello@gmail.com, linux-wireless@vger.kernel.org, Larry.Finger@lwfinger.net, bernhard@schiffner-limbach.de, dan.carpenter@oracle.com Subject: [PATCH 18/20] rtl8180: detect rtl8187se card Date: Wed, 26 Mar 2014 21:04:05 +0100 Message-Id: <1395864245-5132-1-git-send-email-andrea.merello@gmail.com> X-Mailer: git-send-email 1.8.3.2 Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Spam-Status: No, score=-7.2 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, T_DKIM_INVALID, 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 Add case to detect the rtl8187se card and its RF frontend. In this case set also accordingly mac80211 queue number. Signed-off-by: Andrea Merello --- drivers/net/wireless/rtl818x/rtl8180/dev.c | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/drivers/net/wireless/rtl818x/rtl8180/dev.c b/drivers/net/wireless/rtl818x/rtl8180/dev.c index a14dfd9..2046fe2 100644 --- a/drivers/net/wireless/rtl818x/rtl8180/dev.c +++ b/drivers/net/wireless/rtl818x/rtl8180/dev.c @@ -1740,6 +1740,12 @@ static int rtl8180_probe(struct pci_dev *pdev, chip_name = "RTL8185vD"; priv->chip_family = RTL818X_CHIP_FAMILY_RTL8185; break; + + case RTL818X_TX_CONF_RTL8187SE: + chip_name = "RTL8187SE"; + priv->chip_family = RTL818X_CHIP_FAMILY_RTL8187SE; + break; + default: printk(KERN_ERR "%s (rtl8180): Unknown chip! (0x%x)\n", pci_name(pdev), reg >> 25); @@ -1753,7 +1759,10 @@ static int rtl8180_probe(struct pci_dev *pdev, * with mac80211, however the beacon queue is an exception and it * is mapped on the highst tx ring IDX. */ - dev->queues = RTL8180_NR_TX_QUEUES - 1; + if (priv->chip_family == RTL818X_CHIP_FAMILY_RTL8187SE) + dev->queues = RTL8187SE_NR_TX_QUEUES - 1; + else + dev->queues = RTL8180_NR_TX_QUEUES - 1; if (priv->chip_family != RTL818X_CHIP_FAMILY_RTL8180) { priv->band.n_bitrates = ARRAY_SIZE(rtl818x_rates); @@ -1773,7 +1782,11 @@ static int rtl8180_probe(struct pci_dev *pdev, break; case 5: priv->rf = &grf5101_rf_ops; break; - case 9: priv->rf = rtl8180_detect_rf(dev); + case 9: + if (priv->chip_family == RTL818X_CHIP_FAMILY_RTL8187SE) + priv->rf = rtl8187se_detect_rf(dev); + else + priv->rf = rtl8180_detect_rf(dev); break; case 10: rf_name = "RTL8255";