From patchwork Tue Jul 31 08:09:06 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lorenzo Bianconi X-Patchwork-Id: 10550381 X-Patchwork-Delegate: kvalo@adurom.com Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 8D1001708 for ; Tue, 31 Jul 2018 08:09:32 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7FDB02A20E for ; Tue, 31 Jul 2018 08:09:32 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 74DCE2A3A0; Tue, 31 Jul 2018 08:09:32 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 208452A364 for ; Tue, 31 Jul 2018 08:09:32 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730028AbeGaJsi (ORCPT ); Tue, 31 Jul 2018 05:48:38 -0400 Received: from mail-wm0-f68.google.com ([74.125.82.68]:38540 "EHLO mail-wm0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729643AbeGaJsi (ORCPT ); Tue, 31 Jul 2018 05:48:38 -0400 Received: by mail-wm0-f68.google.com with SMTP id t25-v6so2079708wmi.3 for ; Tue, 31 Jul 2018 01:09:30 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=V2aAcbOIiS9hp+B+i3RcBdpjTCn2aX/Ds2vm1plWHzQ=; b=Jf8N6ellz+PrIUTT4QezAKUzgkb18/eNhyBYr91A0I4IK/LYOT2UlaiyQ+B8a2WyoN HxZRoC61J7Qj1QA/7hke/E684+P/HakQZrJAZAlYIVZQPtdzNGQfLW4ZTSSHrH2OFxg6 Yn5eLD2YiD8rCA1v9fqb+RnxWvgQZ2ZASZCY13aR/MytG2SQBykGDDnEZTJfMA4ChQcU VnJkysHLa2wrB7hnAP9xWb0Ul2TUUSPfqFEIDB3nl8JGi39+nJwqrV+OwFcm12n5yX+p C5+xd8QOc4c2KUpNcW3+kQ0smIwYR4fHpefkxBAyPm+XbsNSy9s2QhcTUg3JKCTjv4gn N+OQ== X-Gm-Message-State: AOUpUlHVO1dMqaaKiWEgsGqNGnDwgzMtmnMyRVvwsH5JKMjJc/RQSQPb E5+u0WrEA3QpqiX8sA25YkY+uA== X-Google-Smtp-Source: AAOMgpcuJ6Bgsg/j4VDWemF/ejBms5QiS59/pcpbAbpcsChm3avZI445mfOvTl5s9GfxMl/8AD6K2g== X-Received: by 2002:a1c:ae8d:: with SMTP id x135-v6mr1575341wme.20.1533024569398; Tue, 31 Jul 2018 01:09:29 -0700 (PDT) Received: from localhost.localdomain.com (nat-pool-mxp-t.redhat.com. [149.6.153.186]) by smtp.gmail.com with ESMTPSA id o4-v6sm1501051wmo.20.2018.07.31.01.09.28 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 31 Jul 2018 01:09:28 -0700 (PDT) From: Lorenzo Bianconi To: nbd@nbd.name Cc: linux-wireless@vger.kernel.org, sgruszka@redhat.com Subject: [PATCH v2 05/19] mt76x2: move interface_modes definition in mt76x2_init Date: Tue, 31 Jul 2018 10:09:06 +0200 Message-Id: <82ba7bcda9d54321ff0cd2bf469e151d7332e57f.1533023328.git.lorenzo.bianconi@redhat.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: References: Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Move wiphy interface_modes definition in mt76x2_init in order to reuse mt76_register_device routine supporting mt76x2u based chipsets since mt76x2u currently supports just sta mode Signed-off-by: Lorenzo Bianconi --- drivers/net/wireless/mediatek/mt76/mac80211.c | 8 -------- drivers/net/wireless/mediatek/mt76/mt76x2_init.c | 8 ++++++++ 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/drivers/net/wireless/mediatek/mt76/mac80211.c b/drivers/net/wireless/mediatek/mt76/mac80211.c index d62e34e7eadf..6a0b6f4403a8 100644 --- a/drivers/net/wireless/mediatek/mt76/mac80211.c +++ b/drivers/net/wireless/mediatek/mt76/mac80211.c @@ -303,14 +303,6 @@ int mt76_register_device(struct mt76_dev *dev, bool vht, SET_IEEE80211_DEV(hw, dev->dev); SET_IEEE80211_PERM_ADDR(hw, dev->macaddr); - wiphy->interface_modes = - BIT(NL80211_IFTYPE_STATION) | - BIT(NL80211_IFTYPE_AP) | -#ifdef CONFIG_MAC80211_MESH - BIT(NL80211_IFTYPE_MESH_POINT) | -#endif - BIT(NL80211_IFTYPE_ADHOC); - wiphy->features |= NL80211_FEATURE_ACTIVE_MONITOR; wiphy->available_antennas_tx = dev->antenna_mask; diff --git a/drivers/net/wireless/mediatek/mt76/mt76x2_init.c b/drivers/net/wireless/mediatek/mt76/mt76x2_init.c index c3ecc1c206bd..d3eedd9c59b7 100644 --- a/drivers/net/wireless/mediatek/mt76/mt76x2_init.c +++ b/drivers/net/wireless/mediatek/mt76/mt76x2_init.c @@ -841,6 +841,14 @@ int mt76x2_register_device(struct mt76x2_dev *dev) wiphy->reg_notifier = mt76x2_regd_notifier; + wiphy->interface_modes = + BIT(NL80211_IFTYPE_STATION) | + BIT(NL80211_IFTYPE_AP) | +#ifdef CONFIG_MAC80211_MESH + BIT(NL80211_IFTYPE_MESH_POINT) | +#endif + BIT(NL80211_IFTYPE_ADHOC); + wiphy_ext_feature_set(wiphy, NL80211_EXT_FEATURE_VHT_IBSS); mt76x2_dfs_init_detector(dev);