From patchwork Fri Feb 26 21:14:42 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Felix Fietkau X-Patchwork-Id: 8441871 X-Patchwork-Delegate: johannes@sipsolutions.net Return-Path: X-Original-To: patchwork-linux-wireless@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id A1C449F2F0 for ; Fri, 26 Feb 2016 21:15:04 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id C4324203B5 for ; Fri, 26 Feb 2016 21:15:03 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id B61B7203AD for ; Fri, 26 Feb 2016 21:15:02 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933856AbcBZVOq (ORCPT ); Fri, 26 Feb 2016 16:14:46 -0500 Received: from nbd.name ([46.4.11.11]:41128 "EHLO nbd.name" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755278AbcBZVOp (ORCPT ); Fri, 26 Feb 2016 16:14:45 -0500 Received: by nf-2.local (Postfix, from userid 501) id 3914313661B54; Fri, 26 Feb 2016 22:14:42 +0100 (CET) From: Felix Fietkau To: linux-wireless@vger.kernel.org Cc: johannes@sipsolutions.net Subject: [PATCH] mac80211: remove wdev/vif conversion functions Date: Fri, 26 Feb 2016 22:14:42 +0100 Message-Id: <1456521282-69932-1-git-send-email-nbd@openwrt.org> X-Mailer: git-send-email 2.2.2 Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Nothing uses them Signed-off-by: Felix Fietkau --- include/net/mac80211.h | 26 -------------------------- net/mac80211/util.c | 28 ---------------------------- 2 files changed, 54 deletions(-) diff --git a/include/net/mac80211.h b/include/net/mac80211.h index 0c09da3..e11d751 100644 --- a/include/net/mac80211.h +++ b/include/net/mac80211.h @@ -1439,32 +1439,6 @@ static inline bool ieee80211_vif_is_mesh(struct ieee80211_vif *vif) } /** - * wdev_to_ieee80211_vif - return a vif struct from a wdev - * @wdev: the wdev to get the vif for - * - * This can be used by mac80211 drivers with direct cfg80211 APIs - * (like the vendor commands) that get a wdev. - * - * Note that this function may return %NULL if the given wdev isn't - * associated with a vif that the driver knows about (e.g. monitor - * or AP_VLAN interfaces.) - */ -struct ieee80211_vif *wdev_to_ieee80211_vif(struct wireless_dev *wdev); - -/** - * ieee80211_vif_to_wdev - return a wdev struct from a vif - * @vif: the vif to get the wdev for - * - * This can be used by mac80211 drivers with direct cfg80211 APIs - * (like the vendor commands) that needs to get the wdev for a vif. - * - * Note that this function may return %NULL if the given wdev isn't - * associated with a vif that the driver knows about (e.g. monitor - * or AP_VLAN interfaces.) - */ -struct wireless_dev *ieee80211_vif_to_wdev(struct ieee80211_vif *vif); - -/** * enum ieee80211_key_flags - key flags * * These flags are used for communication about keys between the driver diff --git a/net/mac80211/util.c b/net/mac80211/util.c index 89f7179..4482625 100644 --- a/net/mac80211/util.c +++ b/net/mac80211/util.c @@ -694,34 +694,6 @@ void ieee80211_iterate_stations_atomic(struct ieee80211_hw *hw, } EXPORT_SYMBOL_GPL(ieee80211_iterate_stations_atomic); -struct ieee80211_vif *wdev_to_ieee80211_vif(struct wireless_dev *wdev) -{ - struct ieee80211_sub_if_data *sdata = IEEE80211_WDEV_TO_SUB_IF(wdev); - - if (!ieee80211_sdata_running(sdata) || - !(sdata->flags & IEEE80211_SDATA_IN_DRIVER)) - return NULL; - return &sdata->vif; -} -EXPORT_SYMBOL_GPL(wdev_to_ieee80211_vif); - -struct wireless_dev *ieee80211_vif_to_wdev(struct ieee80211_vif *vif) -{ - struct ieee80211_sub_if_data *sdata; - - if (!vif) - return NULL; - - sdata = vif_to_sdata(vif); - - if (!ieee80211_sdata_running(sdata) || - !(sdata->flags & IEEE80211_SDATA_IN_DRIVER)) - return NULL; - - return &sdata->wdev; -} -EXPORT_SYMBOL_GPL(ieee80211_vif_to_wdev); - /* * Nothing should have been stuffed into the workqueue during * the suspend->resume cycle. Since we can't check each caller