From patchwork Sun Mar 1 07:10:14 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Emmanuel Grumbach X-Patchwork-Id: 5907171 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 D6C5D9F318 for ; Sun, 1 Mar 2015 07:10:59 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id DCA44203DC for ; Sun, 1 Mar 2015 07:10:58 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id CFB202040F for ; Sun, 1 Mar 2015 07:10:57 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751917AbbCAHK4 (ORCPT ); Sun, 1 Mar 2015 02:10:56 -0500 Received: from mga14.intel.com ([192.55.52.115]:49636 "EHLO mga14.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751893AbbCAHKy (ORCPT ); Sun, 1 Mar 2015 02:10:54 -0500 Received: from orsmga002.jf.intel.com ([10.7.209.21]) by fmsmga103.fm.intel.com with ESMTP; 28 Feb 2015 23:06:09 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.09,670,1418112000"; d="scan'208";a="692232021" Received: from egrumbacbox.jer.intel.com ([10.12.125.42]) by orsmga002.jf.intel.com with ESMTP; 28 Feb 2015 23:10:53 -0800 From: Emmanuel Grumbach To: johannes@sipsolutions.net Cc: linux-wireless@vger.kernel.org, Luciano Coelho , Emmanuel Grumbach Subject: [PATCH 15/16] mac80211: remove channel_switch_beacon operation Date: Sun, 1 Mar 2015 09:10:14 +0200 Message-Id: <1425193815-17785-16-git-send-email-emmanuel.grumbach@intel.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1425193815-17785-1-git-send-email-emmanuel.grumbach@intel.com> References: <1425193815-17785-1-git-send-email-emmanuel.grumbach@intel.com> 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, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable 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 From: Luciano Coelho This operation has been replaced by a more generic pre_channel_switch callback, that can be called for any interface type. No driver is using it anymore, and the ones that were using it were not doing any beacon-related operation anyway. Signed-off-by: Luciano Coelho Signed-off-by: Emmanuel Grumbach --- include/net/mac80211.h | 26 ++++++++++++-------------- net/mac80211/cfg.c | 1 - net/mac80211/driver-ops.h | 13 ------------- net/mac80211/trace.h | 25 ------------------------- 4 files changed, 12 insertions(+), 53 deletions(-) diff --git a/include/net/mac80211.h b/include/net/mac80211.h index 78ecfe5..dcd309b 100644 --- a/include/net/mac80211.h +++ b/include/net/mac80211.h @@ -2959,20 +2959,21 @@ enum ieee80211_reconfig_type { * Currently, this is only called for managed or P2P client interfaces. * This callback is optional; it must not sleep. * - * @channel_switch_beacon: Starts a channel switch to a new channel. - * Beacons are modified to include CSA or ECSA IEs before calling this - * function. The corresponding count fields in these IEs must be - * decremented, and when they reach 1 the driver must call - * ieee80211_csa_finish(). Drivers which use ieee80211_beacon_get() - * get the csa counter decremented by mac80211, but must check if it is - * 1 using ieee80211_csa_is_complete() after the beacon has been - * transmitted and then call ieee80211_csa_finish(). - * If the CSA count starts as zero or 1, this function will not be called, - * since there won't be any time to beacon before the switch anyway. * @pre_channel_switch: This is an optional callback that is called * before a channel switch procedure is started (ie. when a STA * gets a CSA or an userspace initiated channel-switch), allowing - * the driver to prepare for the channel switch. + * the driver to prepare for the channel switch. For beaconing + * interfaces, the beacons will be modified to include CSA or + * ECSA IEs after this function is called. The corresponding + * count fields in these IEs must be decremented, and when they + * reach 1 the driver must call ieee80211_csa_finish(). Drivers + * which use ieee80211_beacon_get() get the csa counter + * decremented by mac80211, but must check if it is 1 using + * ieee80211_csa_is_complete() after the beacon has been + * transmitted and then call ieee80211_csa_finish(). If the CSA + * count starts as zero or 1, this function will not be called, + * since there won't be any time to beacon before the switch + * anyway. * @post_channel_switch: This is an optional callback that is called * after a channel switch procedure is completed, allowing the * driver to go back to a normal configuration. @@ -3209,9 +3210,6 @@ struct ieee80211_ops { struct ieee80211_vif *vif, struct inet6_dev *idev); #endif - void (*channel_switch_beacon)(struct ieee80211_hw *hw, - struct ieee80211_vif *vif, - struct cfg80211_chan_def *chandef); int (*pre_channel_switch)(struct ieee80211_hw *hw, struct ieee80211_vif *vif, struct ieee80211_channel_switch *ch_switch); diff --git a/net/mac80211/cfg.c b/net/mac80211/cfg.c index bc33911..9c5244d 100644 --- a/net/mac80211/cfg.c +++ b/net/mac80211/cfg.c @@ -3287,7 +3287,6 @@ __ieee80211_channel_switch(struct wiphy *wiphy, struct net_device *dev, if (changed) { ieee80211_bss_info_change_notify(sdata, changed); - drv_channel_switch_beacon(sdata, ¶ms->chandef); } else { /* if the beacon didn't change, we can finalize immediately */ ieee80211_csa_finalize(sdata); diff --git a/net/mac80211/driver-ops.h b/net/mac80211/driver-ops.h index fdeda17..1ee1981 100644 --- a/net/mac80211/driver-ops.h +++ b/net/mac80211/driver-ops.h @@ -1211,19 +1211,6 @@ static inline void drv_ipv6_addr_change(struct ieee80211_local *local, } #endif -static inline void -drv_channel_switch_beacon(struct ieee80211_sub_if_data *sdata, - struct cfg80211_chan_def *chandef) -{ - struct ieee80211_local *local = sdata->local; - - if (local->ops->channel_switch_beacon) { - trace_drv_channel_switch_beacon(local, sdata, chandef); - local->ops->channel_switch_beacon(&local->hw, &sdata->vif, - chandef); - } -} - static inline int drv_pre_channel_switch(struct ieee80211_sub_if_data *sdata, struct ieee80211_channel_switch *ch_switch) diff --git a/net/mac80211/trace.h b/net/mac80211/trace.h index 263a956..77c9c93 100644 --- a/net/mac80211/trace.h +++ b/net/mac80211/trace.h @@ -2117,31 +2117,6 @@ TRACE_EVENT(api_radar_detected, ) ); -TRACE_EVENT(drv_channel_switch_beacon, - TP_PROTO(struct ieee80211_local *local, - struct ieee80211_sub_if_data *sdata, - struct cfg80211_chan_def *chandef), - - TP_ARGS(local, sdata, chandef), - - TP_STRUCT__entry( - LOCAL_ENTRY - VIF_ENTRY - CHANDEF_ENTRY - ), - - TP_fast_assign( - LOCAL_ASSIGN; - VIF_ASSIGN; - CHANDEF_ASSIGN(chandef); - ), - - TP_printk( - LOCAL_PR_FMT VIF_PR_FMT " channel switch to " CHANDEF_PR_FMT, - LOCAL_PR_ARG, VIF_PR_ARG, CHANDEF_PR_ARG - ) -); - TRACE_EVENT(drv_pre_channel_switch, TP_PROTO(struct ieee80211_local *local, struct ieee80211_sub_if_data *sdata,