From patchwork Fri Jun 17 10:48:44 2016 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: 9183453 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 CDDD460776 for ; Fri, 17 Jun 2016 10:49:32 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id BC87728303 for ; Fri, 17 Jun 2016 10:49:32 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id AF3F028399; Fri, 17 Jun 2016 10:49: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=-6.8 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, 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 4DAB028303 for ; Fri, 17 Jun 2016 10:49:32 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753377AbcFQKtM (ORCPT ); Fri, 17 Jun 2016 06:49:12 -0400 Received: from mail-lf0-f65.google.com ([209.85.215.65]:35847 "EHLO mail-lf0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751301AbcFQKtK (ORCPT ); Fri, 17 Jun 2016 06:49:10 -0400 Received: by mail-lf0-f65.google.com with SMTP id a2so7966571lfe.3; Fri, 17 Jun 2016 03:49:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=7+qzg0V9lyUlMffriRGdD0q8pkidXzpJD/a6a2cZih4=; b=iDleeqRMUonV8HvoXZhkDMB3pNm7Er+OHd0mr6Zix5BKXew3+vFiWf9U9Bxo8p5fRa Bc4D5eHLbR7dwSqerd2ce13ve+HmsYOtU2ihhLxK0qxvq1OaQvRFmGS8ZaR/r/CLiupA VVeIIfYWpM85XHHi8F6BEulNkeLndzPQTbDUiO6g/bve1oeUyq8GQRn5z9Ahwkprbbh7 LKAp7TkmePzVZE/s+CgWymiqm1UNzjhZ6udYrm8HxyJJS+OPggRLpENl8BuCLp4qLCxv 7oceU1DDw2qNpJI4twbdCZbrMv4D9p6w4U51pmNkFDNV+8lgdI/t8C6n+/x0olbyC/HF R4Cg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=7+qzg0V9lyUlMffriRGdD0q8pkidXzpJD/a6a2cZih4=; b=bFXPnObgR4hLWyW623CZYU+v4w3Wn2Fl46C0fuV5S01+gZYvuaYha00Jv+MP1z+Q6S qyDjXy0aAoIKcIS/kPe4KHTTWq8YFQxdPsLi9bM/dQLi2oRsIHe+VdGsO526GbdmycRI GRN0/3ctGGiPlPXmPOErkCkC8Iz4ql4bQViSp9fI9mLxkQqyZ8MRaRrgLW/uJyZbIiTm td6Y1uO76FgmqDerUa95zOfEUiLHbcDl8UQjhXn6aPmwEhefEFFDyims49JIbuO3buJj XEKIMCfZyrLshpQHfkRyaJib2A7O1bAQ6BWE0CFPsW5TRElPonJQgE2PNLaJIaJ4JWhV T7IA== X-Gm-Message-State: ALyK8tJzBWxm2+0YJYBDN8wmFgjRFt//zGluej/H7azxjZMMG9zoE3q+Te9ge1p6RnE23g== X-Received: by 10.25.79.14 with SMTP id d14mr488681lfb.130.1466160548268; Fri, 17 Jun 2016 03:49:08 -0700 (PDT) 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 z6sm4949480lbf.45.2016.06.17.03.49.07 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 17 Jun 2016 03:49:07 -0700 (PDT) From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= To: Kalle Valo Cc: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= , Arend van Spriel , Franky Lin , Hante Meuleman , Pieter-Paul Giesberts , "Franky (Zhenhui) Lin" , linux-wireless@vger.kernel.org (open list:BROADCOM BRCM80211 IEEE802.11n WIRELESS DRIVER), brcm80211-dev-list.pdl@broadcom.com (open list:BROADCOM BRCM80211 IEEE802.11n WIRELESS DRIVER), netdev@vger.kernel.org (open list:NETWORKING DRIVERS), linux-kernel@vger.kernel.org (open list) Subject: [PATCH] brcmfmac: use const char * for interface name in brcmf_add_if Date: Fri, 17 Jun 2016 12:48:44 +0200 Message-Id: <1466160530-32626-1-git-send-email-zajec5@gmail.com> X-Mailer: git-send-email 1.8.4.5 In-Reply-To: <1464378815-23282-1-git-send-email-zajec5@gmail.com> References: <1464378815-23282-1-git-send-email-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 This function can work just fine with const pointer, it only calls alloc_netdev which take const as well. Moreover it makes this function more flexible as some cfg80211 callback may provide const char * as well, e.g. add_virtual_intf. This will be needed for more advanced interface management. Signed-off-by: Rafał Miłecki --- drivers/net/wireless/broadcom/brcm80211/brcmfmac/core.c | 2 +- drivers/net/wireless/broadcom/brcm80211/brcmfmac/core.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/core.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/core.c index 7b38c2b..8d16f02 100644 --- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/core.c +++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/core.c @@ -638,7 +638,7 @@ fail: } struct brcmf_if *brcmf_add_if(struct brcmf_pub *drvr, s32 bsscfgidx, s32 ifidx, - bool is_p2pdev, char *name, u8 *mac_addr) + bool is_p2pdev, const char *name, u8 *mac_addr) { struct brcmf_if *ifp; struct net_device *ndev; diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/core.h b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/core.h index a0a6f7f..8fa34ca 100644 --- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/core.h +++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/core.h @@ -215,7 +215,7 @@ char *brcmf_ifname(struct brcmf_if *ifp); struct brcmf_if *brcmf_get_ifp(struct brcmf_pub *drvr, int ifidx); int brcmf_net_attach(struct brcmf_if *ifp, bool rtnl_locked); struct brcmf_if *brcmf_add_if(struct brcmf_pub *drvr, s32 bsscfgidx, s32 ifidx, - bool is_p2pdev, char *name, u8 *mac_addr); + bool is_p2pdev, const char *name, u8 *mac_addr); 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);