aboutsummaryrefslogtreecommitdiffstats
path: root/include/net/mac80211.h
diff options
context:
space:
mode:
authorKalle Valo <kalle.valo@nokia.com>2009-10-13 13:33:13 -0400
committerJohn W. Linville <linville@tuxdriver.com>2009-10-27 16:48:21 -0400
commite36e49f7338f0f73cd7f5ba4f5b646a479ab60a8 (patch)
treeafd17ce1fb0c79e89bf481f781fb7ef82759741c /include/net/mac80211.h
parent88499ab3d8dbbf9c080416952603742666c71262 (diff)
mac80211: add ieee80211_rx_ni()
ieee80211_rx() must be called with bottom halves disabled. To simplify driver development implement ieee80211_rx_ni() which disables BH. This function must be used when in process context. Signed-off-by: Kalle Valo <kalle.valo@nokia.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'include/net/mac80211.h')
-rw-r--r--include/net/mac80211.h32
1 files changed, 26 insertions, 6 deletions
diff --git a/include/net/mac80211.h b/include/net/mac80211.h
index c75b960c8ac8..c42c4a820b89 100644
--- a/include/net/mac80211.h
+++ b/include/net/mac80211.h
@@ -1665,11 +1665,11 @@ void ieee80211_restart_hw(struct ieee80211_hw *hw);
1665 * header if %RX_FLAG_RADIOTAP is set in the @status flags. 1665 * header if %RX_FLAG_RADIOTAP is set in the @status flags.
1666 * 1666 *
1667 * This function may not be called in IRQ context. Calls to this function 1667 * This function may not be called in IRQ context. Calls to this function
1668 * for a single hardware must be synchronized against each other. Calls 1668 * for a single hardware must be synchronized against each other. Calls to
1669 * to this function and ieee80211_rx_irqsafe() may not be mixed for a 1669 * this function, ieee80211_rx_ni() and ieee80211_rx_irqsafe() may not be
1670 * single hardware. 1670 * mixed for a single hardware.
1671 * 1671 *
1672 * Note that right now, this function must be called with softirqs disabled. 1672 * In process context use instead ieee80211_rx_ni().
1673 * 1673 *
1674 * @hw: the hardware this frame came in on 1674 * @hw: the hardware this frame came in on
1675 * @skb: the buffer to receive, owned by mac80211 after this call 1675 * @skb: the buffer to receive, owned by mac80211 after this call
@@ -1682,8 +1682,8 @@ void ieee80211_rx(struct ieee80211_hw *hw, struct sk_buff *skb);
1682 * Like ieee80211_rx() but can be called in IRQ context 1682 * Like ieee80211_rx() but can be called in IRQ context
1683 * (internally defers to a tasklet.) 1683 * (internally defers to a tasklet.)
1684 * 1684 *
1685 * Calls to this function and ieee80211_rx() may not be mixed for a 1685 * Calls to this function, ieee80211_rx() or ieee80211_rx_ni() may not
1686 * single hardware. 1686 * be mixed for a single hardware.
1687 * 1687 *
1688 * @hw: the hardware this frame came in on 1688 * @hw: the hardware this frame came in on
1689 * @skb: the buffer to receive, owned by mac80211 after this call 1689 * @skb: the buffer to receive, owned by mac80211 after this call
@@ -1691,6 +1691,26 @@ void ieee80211_rx(struct ieee80211_hw *hw, struct sk_buff *skb);
1691void ieee80211_rx_irqsafe(struct ieee80211_hw *hw, struct sk_buff *skb); 1691void ieee80211_rx_irqsafe(struct ieee80211_hw *hw, struct sk_buff *skb);
1692 1692
1693/** 1693/**
1694 * ieee80211_rx_ni - receive frame (in process context)
1695 *
1696 * Like ieee80211_rx() but can be called in process context
1697 * (internally disables bottom halves).
1698 *
1699 * Calls to this function, ieee80211_rx() and ieee80211_rx_irqsafe() may
1700 * not be mixed for a single hardware.
1701 *
1702 * @hw: the hardware this frame came in on
1703 * @skb: the buffer to receive, owned by mac80211 after this call
1704 */
1705static inline void ieee80211_rx_ni(struct ieee80211_hw *hw,
1706 struct sk_buff *skb)
1707{
1708 local_bh_disable();
1709 ieee80211_rx(hw, skb);
1710 local_bh_enable();
1711}
1712
1713/**
1694 * ieee80211_tx_status - transmit status callback 1714 * ieee80211_tx_status - transmit status callback
1695 * 1715 *
1696 * Call this function for all transmitted frames after they have been 1716 * Call this function for all transmitted frames after they have been