From patchwork Thu Dec 14 15:39:15 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Felix Fietkau X-Patchwork-Id: 10112571 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 679266019C for ; Thu, 14 Dec 2017 15:39:47 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 5931328210 for ; Thu, 14 Dec 2017 15:39:47 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 4DD362939B; Thu, 14 Dec 2017 15:39:47 +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=-6.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID 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 D3B7B28210 for ; Thu, 14 Dec 2017 15:39:46 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753335AbdLNPjk (ORCPT ); Thu, 14 Dec 2017 10:39:40 -0500 Received: from nbd.name ([46.4.11.11]:45538 "EHLO nbd.name" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753320AbdLNPjV (ORCPT ); Thu, 14 Dec 2017 10:39:21 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=nbd.name; s=20160729; h=References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From: Sender:Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=u/T6hlYe66HbF3jr/x236FkCxDJncXeZJD7g8CJGNDI=; b=hKEfwU5SBTKsno0ppOmkSSKmrT BWB/fRep0WE3zrdFEevIO1uv2tSI5YP1CZrLRrVBhJ3x/08IGyietVbbWSixnlVLbVeIXAJHtkhBg jBf2SclI7P5WV+QwLQo90A517J4aFO1EeKBV+o/ZPXReXQ/hBc5D0AWX9f0vOuv0SiRQ=; Received: by maeck.local (Postfix, from userid 501) id 2B39B94D126; Thu, 14 Dec 2017 16:39:19 +0100 (CET) From: Felix Fietkau To: linux-wireless@vger.kernel.org Cc: kvalo@codeaurora.org Subject: [PATCH 11/14] mt76x2: drop wiphy->addresses Date: Thu, 14 Dec 2017 16:39:15 +0100 Message-Id: <20171214153918.43774-12-nbd@nbd.name> X-Mailer: git-send-email 2.14.2 In-Reply-To: <20171214153918.43774-1-nbd@nbd.name> References: <20171214153918.43774-1-nbd@nbd.name> 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 Now that the MAC address limitation is resolved, we no longer need a MAC address list Signed-off-by: Felix Fietkau --- drivers/net/wireless/mediatek/mt76/mt76x2.h | 2 -- drivers/net/wireless/mediatek/mt76/mt76x2_init.c | 16 +--------------- 2 files changed, 1 insertion(+), 17 deletions(-) diff --git a/drivers/net/wireless/mediatek/mt76/mt76x2.h b/drivers/net/wireless/mediatek/mt76/mt76x2.h index a993cc09cd1b..7f961cc4504a 100644 --- a/drivers/net/wireless/mediatek/mt76/mt76x2.h +++ b/drivers/net/wireless/mediatek/mt76/mt76x2.h @@ -84,8 +84,6 @@ struct mt76x2_calibration { struct mt76x2_dev { struct mt76_dev mt76; /* must be first */ - struct mac_address macaddr_list[8]; - struct mutex mutex; const u16 *beacon_offsets; diff --git a/drivers/net/wireless/mediatek/mt76/mt76x2_init.c b/drivers/net/wireless/mediatek/mt76/mt76x2_init.c index f54dc67a13d0..818164d1ed7a 100644 --- a/drivers/net/wireless/mediatek/mt76/mt76x2_init.c +++ b/drivers/net/wireless/mediatek/mt76/mt76x2_init.c @@ -796,7 +796,7 @@ int mt76x2_register_device(struct mt76x2_dev *dev) struct wiphy *wiphy = hw->wiphy; void *status_fifo; int fifo_size; - int i, ret; + int ret; fifo_size = roundup_pow_of_two(32 * sizeof(struct mt76x2_tx_status)); status_fifo = devm_kzalloc(dev->mt76.dev, fifo_size, GFP_KERNEL); @@ -818,20 +818,6 @@ int mt76x2_register_device(struct mt76x2_dev *dev) hw->sta_data_size = sizeof(struct mt76x2_sta); hw->vif_data_size = sizeof(struct mt76x2_vif); - for (i = 0; i < ARRAY_SIZE(dev->macaddr_list); i++) { - u8 *addr = dev->macaddr_list[i].addr; - - memcpy(addr, dev->mt76.macaddr, ETH_ALEN); - - if (!i) - continue; - - addr[0] |= BIT(1); - addr[0] ^= ((i - 1) << 2); - } - wiphy->addresses = dev->macaddr_list; - wiphy->n_addresses = ARRAY_SIZE(dev->macaddr_list); - wiphy->iface_combinations = if_comb; wiphy->n_iface_combinations = ARRAY_SIZE(if_comb);