From patchwork Sun Jun 10 10:51:12 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lorenzo Bianconi X-Patchwork-Id: 10456619 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.web.codeaurora.org (Postfix) with ESMTP id 9FEB1601F7 for ; Sun, 10 Jun 2018 10:52:05 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 928D126490 for ; Sun, 10 Jun 2018 10:52:05 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 87A12268AE; Sun, 10 Jun 2018 10:52:05 +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 301FA26490 for ; Sun, 10 Jun 2018 10:52:05 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932336AbeFJKvo (ORCPT ); Sun, 10 Jun 2018 06:51:44 -0400 Received: from mail-wr0-f194.google.com ([209.85.128.194]:35308 "EHLO mail-wr0-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932213AbeFJKvj (ORCPT ); Sun, 10 Jun 2018 06:51:39 -0400 Received: by mail-wr0-f194.google.com with SMTP id l10-v6so17438307wrn.2 for ; Sun, 10 Jun 2018 03:51:38 -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; bh=ig4KWlklIdFbBhh8aPjDY2MPOsjHSMLAkFERq8y6+Pg=; b=EAhIAzZZRL7wUQNOR38t7T6j7XUWGJISnWv7+nKBSE6pY94CHKWAs3YVosEv0tsxuv uHKoyK01D9ayreKI8n5cowowS0IPgBRziamjPFXzWcK6VcucLV89J/Kt1CuLJy97L9GM 9xhR4d/UuvaHtAdkh332MF8gDG4nim9iugT52rRWNyw1n3rS8ZUsCERicTrAr7RhcObn 5u1FFmFBEyzGxQVGlO5NWMcRU6vjU2tseyLOnuupOhMt+Li337s2Fl+n1knLKFrcaXYC 87pZlbuOZ3lD4dexI2zQ+aX7YgTmG0hCTG/6DVP4lJngsPAxmIdGJ/A0+A9HY308UZnz VGQA== X-Gm-Message-State: APt69E1Sehtztrhqn9b1srzj4gmkk6ZSuDJK6bR60NTPyk0V3LUWs8KH zgrKNBMtIXrG/GSM8SQdj1qxLg== X-Google-Smtp-Source: ADUXVKJpLA6RZ/iVa1LAbyun5YIS27LXK0fwBYPekjeJb3Hh/zoPcUXOTwmmAJCmK2K/AvsRvMN+tQ== X-Received: by 2002:adf:a0aa:: with SMTP id m39-v6mr9516216wrm.125.1528627897921; Sun, 10 Jun 2018 03:51:37 -0700 (PDT) Received: from localhost.localdomain ([151.66.62.211]) by smtp.gmail.com with ESMTPSA id 194-v6sm8638793wml.20.2018.06.10.03.51.36 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 10 Jun 2018 03:51:37 -0700 (PDT) From: Lorenzo Bianconi To: nbd@nbd.name Cc: linux-wireless@vger.kernel.org, sgruszka@redhat.com Subject: [RFC v3 05/19] mt76x2: move interface_modes definition in mt76x2_init Date: Sun, 10 Jun 2018 12:51:12 +0200 Message-Id: <20180610105126.28425-6-lorenzo.bianconi@redhat.com> X-Mailer: git-send-email 2.17.1 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 fcd079a96782..d532ee1a3fe7 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 9c6d180da294..ef6c92471453 100644 --- a/drivers/net/wireless/mediatek/mt76/mt76x2_init.c +++ b/drivers/net/wireless/mediatek/mt76/mt76x2_init.c @@ -835,6 +835,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);