From patchwork Tue Jan 17 16:34:19 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?UmFmYcWCIE1pxYJlY2tp?= X-Patchwork-Id: 9521527 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 8D440601C3 for ; Tue, 17 Jan 2017 16:35:58 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7D0E1285B7 for ; Tue, 17 Jan 2017 16:35:58 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 7016C285BC; Tue, 17 Jan 2017 16:35:58 +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.5 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RCVD_IN_SORBS_SPAM 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 2F13B285B7 for ; Tue, 17 Jan 2017 16:35:57 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751184AbdAQQfz (ORCPT ); Tue, 17 Jan 2017 11:35:55 -0500 Received: from mail-lf0-f65.google.com ([209.85.215.65]:36280 "EHLO mail-lf0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750933AbdAQQfy (ORCPT ); Tue, 17 Jan 2017 11:35:54 -0500 Received: by mail-lf0-f65.google.com with SMTP id h65so16943021lfi.3 for ; Tue, 17 Jan 2017 08:35:53 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=80mb7XIWx6X99UcuWlu4wj+XJwwGDk9yF8Gkrd1P5/c=; b=JeGFe/zBOJS7ttjJQ+Wk4RLlyQuEUdk9ifzansagBshDHerFakUgcOaN7LDT/z1cvY M9XYKTa2omb5B0wYYL/xkLII7bGHaMszrVnYw1uER6BdYS+u7iL5yr8Tqm66/YFxYnXj 2HpqEAtoBrMy70wNve6fvRtmMlpu0puzFQ8ty/KZ1kjKIt59EMFcVqB1fp+qMZLE6uzS naYhslzkcTgo0sUXcdHp/NaNjxQmGPiZXtrn0n6Nmpmq3wMh/COFxn8a6D+bdhuGx8GK QDNQI+OUh2VQ/QpUTW8AQ7OjXs3j9EZ55M4a60VLgAVVXMlMNnSXNVXjWyvowgzJt6ij qIxA== 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:mime-version:content-transfer-encoding; bh=80mb7XIWx6X99UcuWlu4wj+XJwwGDk9yF8Gkrd1P5/c=; b=LTpgq6rHt9LmCi6kqBmyXoKAOWhsx58Fl6lbPpbo2e+XuY+RFY1F1Q4fnDyd5J6Rde AAsFJAYyb+/CAkQ7Cevv1DJQD1yVHu9gYDWwPhVFRXT7t9KKb/aftTFgSx21W6dTa3QL T3OIayAPLaXL7Wa+0n5BF22KdYl4MnKJNiLrJJ7SCpxwNuV7y6WAWCLLYE5SC1Jpam/B q/qBj7E1M/NRkUk52npIwUPjKhh40Jxxo2HhTn69EwH9sGJz7N32hniCm2lN3TAOihgx u6hd3cEQlGVA36yrKyba/Ivk6n0M0qYsFZ2EFDcL5UMyaYil1PwAO/A4ubx9HfhFauMw IZdw== X-Gm-Message-State: AIkVDXISsUNWFGUsN5U5FVSSAK6EtZy2bEoRdETg332gKboVyF5OXvK+QiZ94WyZnGGSZA== X-Received: by 10.46.9.216 with SMTP id 207mr15915626ljj.4.1484670952693; Tue, 17 Jan 2017 08:35:52 -0800 (PST) Received: from linux-samsung.lan (ip-194-187-74-233.konfederacka.maverick.com.pl. [194.187.74.233]) by smtp.gmail.com with ESMTPSA id l138sm6046521lfg.34.2017.01.17.08.35.51 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 17 Jan 2017 08:35:51 -0800 (PST) From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= To: Kalle Valo Cc: Arend van Spriel , Franky Lin , Hante Meuleman , Pieter-Paul Giesberts , Franky Lin , linux-wireless@vger.kernel.org, brcm80211-dev-list.pdl@broadcom.com, =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= Subject: [PATCH 2/2] brcmfmac: move function declarations to proper headers Date: Tue, 17 Jan 2017 17:34:19 +0100 Message-Id: <20170117163419.1184-2-zajec5@gmail.com> X-Mailer: git-send-email 2.10.1 In-Reply-To: <20170117163419.1184-1-zajec5@gmail.com> References: <20170117163419.1184-1-zajec5@gmail.com> MIME-Version: 1.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 From: Rafał Miłecki Function brcmf_c_set_joinpref_default is in common.c, so move it to the related header. All other (touched) ones are in core.c so take them out of the bus.h. I just needed to include bus.h to have enum brcmf_bus_state defined. Signed-off-by: Rafał Miłecki --- .../net/wireless/broadcom/brcm80211/brcmfmac/bus.h | 28 ---------------------- .../wireless/broadcom/brcm80211/brcmfmac/common.h | 2 ++ .../wireless/broadcom/brcm80211/brcmfmac/core.h | 21 +++++++++++++++- 3 files changed, 22 insertions(+), 29 deletions(-) diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/bus.h b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/bus.h index b5bb971..58a3de6 100644 --- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/bus.h +++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/bus.h @@ -214,34 +214,6 @@ int brcmf_bus_get_memdump(struct brcmf_bus *bus, void *data, size_t len) return bus->ops->get_memdump(bus->dev, data, len); } -/* - * interface functions from common layer - */ - -/* Receive frame for delivery to OS. Callee disposes of rxp. */ -void brcmf_rx_frame(struct device *dev, struct sk_buff *rxp, bool handle_event); -/* Receive async event packet from firmware. Callee disposes of rxp. */ -void brcmf_rx_event(struct device *dev, struct sk_buff *rxp); - -/* Indication from bus module regarding presence/insertion of dongle. */ -int brcmf_attach(struct device *dev, struct brcmf_mp_device *settings); -/* Indication from bus module regarding removal/absence of dongle */ -void brcmf_detach(struct device *dev); -/* Indication from bus module that dongle should be reset */ -void brcmf_dev_reset(struct device *dev); -/* Indication from bus module to change flow-control state */ -void brcmf_txflowblock(struct device *dev, bool state); - -/* Notify the bus has transferred the tx packet to firmware */ -void brcmf_txcomplete(struct device *dev, struct sk_buff *txp, bool success); - -/* Configure the "global" bus state used by upper layers */ -void brcmf_bus_change_state(struct brcmf_bus *bus, enum brcmf_bus_state state); - -int brcmf_bus_start(struct device *dev); -s32 brcmf_iovar_data_set(struct device *dev, char *name, void *data, u32 len); -void brcmf_bus_add_txhdrlen(struct device *dev, uint len); - #ifdef CONFIG_BRCMFMAC_SDIO void brcmf_sdio_exit(void); void brcmf_sdio_register(void); diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/common.h b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/common.h index bd095ab..a62f8e7 100644 --- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/common.h +++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/common.h @@ -65,6 +65,8 @@ struct brcmf_mp_device { } bus; }; +void brcmf_c_set_joinpref_default(struct brcmf_if *ifp); + struct brcmf_mp_device *brcmf_get_module_param(struct device *dev, enum brcmf_bus_type bus_type, u32 chip, u32 chiprev); diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/core.h b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/core.h index c94dcab..d92beca 100644 --- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/core.h +++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/core.h @@ -22,6 +22,7 @@ #define BRCMFMAC_CORE_H #include +#include "bus.h" #include "fweh.h" #define TOE_TX_CSUM_OL 0x00000001 @@ -213,10 +214,28 @@ struct brcmf_if *brcmf_add_if(struct brcmf_pub *drvr, s32 bsscfgidx, s32 ifidx, void brcmf_remove_interface(struct brcmf_if *ifp, bool rtnl_locked); void brcmf_txflowblock_if(struct brcmf_if *ifp, enum brcmf_netif_stop_reason reason, bool state); +/* Indication from bus module to change flow-control state */ +void brcmf_txflowblock(struct device *dev, bool state); void brcmf_txfinalize(struct brcmf_if *ifp, struct sk_buff *txp, bool success); void brcmf_netif_rx(struct brcmf_if *ifp, struct sk_buff *skb); +/* Receive frame for delivery to OS. Callee disposes of rxp. */ +void brcmf_rx_frame(struct device *dev, struct sk_buff *rxp, bool handle_event); +/* Receive async event packet from firmware. Callee disposes of rxp. */ +void brcmf_rx_event(struct device *dev, struct sk_buff *rxp); +/* Notify the bus has transferred the tx packet to firmware */ +void brcmf_txcomplete(struct device *dev, struct sk_buff *txp, bool success); void brcmf_net_setcarrier(struct brcmf_if *ifp, bool on); -void brcmf_c_set_joinpref_default(struct brcmf_if *ifp); +/* Indication from bus module regarding presence/insertion of dongle. */ +int brcmf_attach(struct device *dev, struct brcmf_mp_device *settings); +int brcmf_bus_start(struct device *dev); +void brcmf_bus_add_txhdrlen(struct device *dev, uint len); +/* Indication from bus module that dongle should be reset */ +void brcmf_dev_reset(struct device *dev); +/* Indication from bus module regarding removal/absence of dongle */ +void brcmf_detach(struct device *dev); +s32 brcmf_iovar_data_set(struct device *dev, char *name, void *data, u32 len); +/* Configure the "global" bus state used by upper layers */ +void brcmf_bus_change_state(struct brcmf_bus *bus, enum brcmf_bus_state state); int __init brcmf_core_init(void); void __exit brcmf_core_exit(void);