diff options
author | Johannes Stezenbach <js@sig21.net> | 2010-11-30 10:49:23 -0500 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2010-11-30 13:53:46 -0500 |
commit | 20ed3166c84d145589a89d8cde12aa32cf2d17f4 (patch) | |
tree | c6fa2fb5ce7ce1bd06f8787809c534b793813f28 /include/net/mac80211.h | |
parent | 4352fab5c2a1a602447d711c84d149bf2f0bc7ba (diff) |
mac80211/rt2x00: add ieee80211_tx_status_ni()
All rt2x00 drivers except rt2800pci call ieee80211_tx_status() from
a workqueue, which causes "NOHZ: local_softirq_pending 08" messages.
To fix it, add ieee80211_tx_status_ni() similar to ieee80211_rx_ni()
which can be called from process context, and call it from
rt2x00lib_txdone(). For the rt2800pci special case a driver
flag is introduced.
Signed-off-by: Johannes Stezenbach <js@sig21.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'include/net/mac80211.h')
-rw-r--r-- | include/net/mac80211.h | 28 |
1 files changed, 24 insertions, 4 deletions
diff --git a/include/net/mac80211.h b/include/net/mac80211.h index eaa4affd40cd..e411cf87fb41 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, | |||
2055 | * | 2055 | * |
2056 | * This function may not be called in IRQ context. Calls to this function | 2056 | * This function may not be called in IRQ context. Calls to this function |
2057 | * for a single hardware must be synchronized against each other. Calls | 2057 | * for a single hardware must be synchronized against each other. Calls |
2058 | * to this function and ieee80211_tx_status_irqsafe() may not be mixed | 2058 | * to this function, ieee80211_tx_status_ni() and ieee80211_tx_status_irqsafe() |
2059 | * for a single hardware. | 2059 | * may not be mixed for a single hardware. |
2060 | * | 2060 | * |
2061 | * @hw: the hardware the frame was transmitted by | 2061 | * @hw: the hardware the frame was transmitted by |
2062 | * @skb: the frame that was transmitted, owned by mac80211 after this call | 2062 | * @skb: the frame that was transmitted, owned by mac80211 after this call |
@@ -2065,13 +2065,33 @@ void ieee80211_tx_status(struct ieee80211_hw *hw, | |||
2065 | struct sk_buff *skb); | 2065 | struct sk_buff *skb); |
2066 | 2066 | ||
2067 | /** | 2067 | /** |
2068 | * ieee80211_tx_status_ni - transmit status callback (in process context) | ||
2069 | * | ||
2070 | * Like ieee80211_tx_status() but can be called in process context. | ||
2071 | * | ||
2072 | * Calls to this function, ieee80211_tx_status() and | ||
2073 | * ieee80211_tx_status_irqsafe() may not be mixed | ||
2074 | * for a single hardware. | ||
2075 | * | ||
2076 | * @hw: the hardware the frame was transmitted by | ||
2077 | * @skb: the frame that was transmitted, owned by mac80211 after this call | ||
2078 | */ | ||
2079 | static inline void ieee80211_tx_status_ni(struct ieee80211_hw *hw, | ||
2080 | struct sk_buff *skb) | ||
2081 | { | ||
2082 | local_bh_disable(); | ||
2083 | ieee80211_tx_status(hw, skb); | ||
2084 | local_bh_enable(); | ||
2085 | } | ||
2086 | |||
2087 | /** | ||
2068 | * ieee80211_tx_status_irqsafe - IRQ-safe transmit status callback | 2088 | * ieee80211_tx_status_irqsafe - IRQ-safe transmit status callback |
2069 | * | 2089 | * |
2070 | * Like ieee80211_tx_status() but can be called in IRQ context | 2090 | * Like ieee80211_tx_status() but can be called in IRQ context |
2071 | * (internally defers to a tasklet.) | 2091 | * (internally defers to a tasklet.) |
2072 | * | 2092 | * |
2073 | * Calls to this function and ieee80211_tx_status() may not be mixed for a | 2093 | * Calls to this function, ieee80211_tx_status() and |
2074 | * single hardware. | 2094 | * ieee80211_tx_status_ni() may not be mixed for a single hardware. |
2075 | * | 2095 | * |
2076 | * @hw: the hardware the frame was transmitted by | 2096 | * @hw: the hardware the frame was transmitted by |
2077 | * @skb: the frame that was transmitted, owned by mac80211 after this call | 2097 | * @skb: the frame that was transmitted, owned by mac80211 after this call |