From patchwork Mon Nov 29 16:13:16 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Johannes Stezenbach X-Patchwork-Id: 364492 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id oATGDSR0025591 for ; Mon, 29 Nov 2010 16:13:28 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754889Ab0K2QN0 (ORCPT ); Mon, 29 Nov 2010 11:13:26 -0500 Received: from bar.sig21.net ([80.81.252.164]:54107 "EHLO bar.sig21.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754865Ab0K2QNZ (ORCPT ); Mon, 29 Nov 2010 11:13:25 -0500 Received: from p5099b351.dip0.t-ipconnect.de ([80.153.179.81] helo=zzz.local) by bar.sig21.net with esmtpsa (TLS-1.0:RSA_ARCFOUR_SHA1:16) (Exim 4.63) (envelope-from ) id 1PN6Lx-0002GU-52; Mon, 29 Nov 2010 17:13:23 +0100 Received: from js by zzz.local with local (Exim 4.72) (envelope-from ) id 1PN6Ls-00005T-HY; Mon, 29 Nov 2010 17:13:16 +0100 Date: Mon, 29 Nov 2010 17:13:16 +0100 From: Johannes Stezenbach To: Johannes Berg Cc: linux-wireless@vger.kernel.org, Ivo van Doorn , Gertjan van Wingerde , "John W. Linville" , Helmut Schaa Subject: [PATCH v3 RFC] mac80211: add ieee80211_tx_status_ni() Message-ID: <20101129161316.GA32760@sig21.net> References: <20101129145439.GA31910@sig21.net> <1291043349.3532.4.camel@jlt3.sipsolutions.net> <20101129152735.GA32319@sig21.net> <1291045056.3532.5.camel@jlt3.sipsolutions.net> <20101129155126.GA32482@sig21.net> <1291046320.3532.6.camel@jlt3.sipsolutions.net> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <1291046320.3532.6.camel@jlt3.sipsolutions.net> User-Agent: Mutt/1.5.20 (2009-06-14) X-Spam-21-Score: -3.8 (---) X-Spam-21-Report: No, score=-3.8 required=5.0 tests=ALL_TRUSTED=-1.8, AWL=0.619, BAYES_00=-2.599 autolearn=no Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter1.kernel.org [140.211.167.41]); Mon, 29 Nov 2010 16:13:28 +0000 (UTC) diff --git a/include/net/mac80211.h b/include/net/mac80211.h index eaa4aff..e411cf8 100644 --- a/include/net/mac80211.h +++ b/include/net/mac80211.h @@ -2055,8 +2055,8 @@ static inline void ieee80211_rx_ni(struct ieee80211_hw *hw, * * This function may not be called in IRQ context. Calls to this function * for a single hardware must be synchronized against each other. Calls - * to this function and ieee80211_tx_status_irqsafe() may not be mixed - * for a single hardware. + * to this function, ieee80211_tx_status_ni() and ieee80211_tx_status_irqsafe() + * may not be mixed for a single hardware. * * @hw: the hardware the frame was transmitted by * @skb: the frame that was transmitted, owned by mac80211 after this call @@ -2065,13 +2065,33 @@ void ieee80211_tx_status(struct ieee80211_hw *hw, struct sk_buff *skb); /** + * ieee80211_tx_status_ni - transmit status callback (in process context) + * + * Like ieee80211_tx_status() but can be called in process context. + * + * Calls to this function, ieee80211_tx_status() and + * ieee80211_tx_status_irqsafe() may not be mixed + * for a single hardware. + * + * @hw: the hardware the frame was transmitted by + * @skb: the frame that was transmitted, owned by mac80211 after this call + */ +static inline void ieee80211_tx_status_ni(struct ieee80211_hw *hw, + struct sk_buff *skb) +{ + local_bh_disable(); + ieee80211_tx_status(hw, skb); + local_bh_enable(); +} + +/** * ieee80211_tx_status_irqsafe - IRQ-safe transmit status callback * * Like ieee80211_tx_status() but can be called in IRQ context * (internally defers to a tasklet.) * - * Calls to this function and ieee80211_tx_status() may not be mixed for a - * single hardware. + * Calls to this function, ieee80211_tx_status() and + * ieee80211_tx_status_ni() may not be mixed for a single hardware. * * @hw: the hardware the frame was transmitted by * @skb: the frame that was transmitted, owned by mac80211 after this call