From patchwork Sun Jul 1 14:12:17 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lorenzo Bianconi X-Patchwork-Id: 10498689 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 37F2360284 for ; Sun, 1 Jul 2018 14:13:24 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 297AC288A2 for ; Sun, 1 Jul 2018 14:13:24 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 1A02828A3E; Sun, 1 Jul 2018 14:13:24 +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 C116728956 for ; Sun, 1 Jul 2018 14:13:23 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752459AbeGAONP (ORCPT ); Sun, 1 Jul 2018 10:13:15 -0400 Received: from mail-wr0-f196.google.com ([209.85.128.196]:35089 "EHLO mail-wr0-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752398AbeGAONJ (ORCPT ); Sun, 1 Jul 2018 10:13:09 -0400 Received: by mail-wr0-f196.google.com with SMTP id h40-v6so1911226wrh.2 for ; Sun, 01 Jul 2018 07:13:08 -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=ass9KlT4LPKyLlv7htRoSuvhe8xNgP2QFLUXZOCHlzI=; b=BxHaikUNLllLj8cuw0gBKAPv/0PlGwWedaJIyWzkxQvGh11//21b514SWd/P5uRdYY dWIqJGXcjkiD6n5mS1GY7OLvwfeU6EZCw/1jPLazK9pO/pPaCAP2/T5oQon+w9udsc4N BTvTKE+AqVnWOIB1+N9YP/z24K0y3csFsAE5OoFWXOuJe1+n951I1y/WxR7A7ThIZbbS XJcadSzdwvYu5FrgUW8DsIYC208SjE/8yJLJ9VQonW75CI+3BvzdyocPSCBnmhd9XLz0 xSnpajxtkwVlMUElPy3MBcJGHXQ9VcdpSrBrqAAD1WwZEKToNVP9MPcbGjE39f8hJGSH NlDw== X-Gm-Message-State: APt69E2+DLXRc7u2gjDsJuxak/a6Qh590jLOAlIHSxYjzVRRufwf0+PM R32eueBE2aQEmi8q7z5U31pJElzlNc0= X-Google-Smtp-Source: AAOMgpe38yP3hB1+zl7qYhRFG2rK3lq7vNnhgL3DpCtYg5pqQbSYxyxAJy5rGSd10iAuhuzu5KpbUg== X-Received: by 2002:adf:f783:: with SMTP id q3-v6mr16113750wrp.108.1530454388258; Sun, 01 Jul 2018 07:13:08 -0700 (PDT) Received: from localhost.localdomain ([151.66.11.238]) by smtp.gmail.com with ESMTPSA id 72-v6sm6363957wmo.26.2018.07.01.07.13.07 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 01 Jul 2018 07:13:07 -0700 (PDT) From: Lorenzo Bianconi To: nbd@nbd.name Cc: linux-wireless@vger.kernel.org, sgruszka@redhat.com Subject: [PATCH 05/19] mt76x2: move interface_modes definition in mt76x2_init Date: Sun, 1 Jul 2018 16:12:17 +0200 Message-Id: <20180701141231.25323-6-lorenzo.bianconi@redhat.com> X-Mailer: git-send-email 2.18.0 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 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);