diff options
-rw-r--r-- | drivers/net/wireless/rt2x00/rt2800pci.c | 1 | ||||
-rw-r--r-- | drivers/net/wireless/rt2x00/rt2x00.h | 1 | ||||
-rw-r--r-- | drivers/net/wireless/rt2x00/rt2x00dev.c | 9 | ||||
-rw-r--r-- | include/net/mac80211.h | 28 |
4 files changed, 32 insertions, 7 deletions
diff --git a/drivers/net/wireless/rt2x00/rt2800pci.c b/drivers/net/wireless/rt2x00/rt2800pci.c index 433c7f3ef83..b989b0d3ed4 100644 --- a/drivers/net/wireless/rt2x00/rt2800pci.c +++ b/drivers/net/wireless/rt2x00/rt2800pci.c | |||
@@ -911,6 +911,7 @@ static int rt2800pci_probe_hw(struct rt2x00_dev *rt2x00dev) | |||
911 | __set_bit(DRIVER_REQUIRE_DMA, &rt2x00dev->flags); | 911 | __set_bit(DRIVER_REQUIRE_DMA, &rt2x00dev->flags); |
912 | __set_bit(DRIVER_REQUIRE_L2PAD, &rt2x00dev->flags); | 912 | __set_bit(DRIVER_REQUIRE_L2PAD, &rt2x00dev->flags); |
913 | __set_bit(DRIVER_REQUIRE_TXSTATUS_FIFO, &rt2x00dev->flags); | 913 | __set_bit(DRIVER_REQUIRE_TXSTATUS_FIFO, &rt2x00dev->flags); |
914 | __set_bit(DRIVER_REQUIRE_TASKLET_CONTEXT, &rt2x00dev->flags); | ||
914 | if (!modparam_nohwcrypt) | 915 | if (!modparam_nohwcrypt) |
915 | __set_bit(CONFIG_SUPPORT_HW_CRYPTO, &rt2x00dev->flags); | 916 | __set_bit(CONFIG_SUPPORT_HW_CRYPTO, &rt2x00dev->flags); |
916 | __set_bit(DRIVER_SUPPORT_LINK_TUNING, &rt2x00dev->flags); | 917 | __set_bit(DRIVER_SUPPORT_LINK_TUNING, &rt2x00dev->flags); |
diff --git a/drivers/net/wireless/rt2x00/rt2x00.h b/drivers/net/wireless/rt2x00/rt2x00.h index 0a55eeff871..e72117f3fdf 100644 --- a/drivers/net/wireless/rt2x00/rt2x00.h +++ b/drivers/net/wireless/rt2x00/rt2x00.h | |||
@@ -664,6 +664,7 @@ enum rt2x00_flags { | |||
664 | DRIVER_REQUIRE_COPY_IV, | 664 | DRIVER_REQUIRE_COPY_IV, |
665 | DRIVER_REQUIRE_L2PAD, | 665 | DRIVER_REQUIRE_L2PAD, |
666 | DRIVER_REQUIRE_TXSTATUS_FIFO, | 666 | DRIVER_REQUIRE_TXSTATUS_FIFO, |
667 | DRIVER_REQUIRE_TASKLET_CONTEXT, | ||
667 | 668 | ||
668 | /* | 669 | /* |
669 | * Driver features | 670 | * Driver features |
diff --git a/drivers/net/wireless/rt2x00/rt2x00dev.c b/drivers/net/wireless/rt2x00/rt2x00dev.c index c879f9a7037..bd3afc92f43 100644 --- a/drivers/net/wireless/rt2x00/rt2x00dev.c +++ b/drivers/net/wireless/rt2x00/rt2x00dev.c | |||
@@ -379,9 +379,12 @@ void rt2x00lib_txdone(struct queue_entry *entry, | |||
379 | * through a mac80211 library call (RTS/CTS) then we should not | 379 | * through a mac80211 library call (RTS/CTS) then we should not |
380 | * send the status report back. | 380 | * send the status report back. |
381 | */ | 381 | */ |
382 | if (!(skbdesc_flags & SKBDESC_NOT_MAC80211)) | 382 | if (!(skbdesc_flags & SKBDESC_NOT_MAC80211)) { |
383 | ieee80211_tx_status(rt2x00dev->hw, entry->skb); | 383 | if (test_bit(DRIVER_REQUIRE_TASKLET_CONTEXT, &rt2x00dev->flags)) |
384 | else | 384 | ieee80211_tx_status(rt2x00dev->hw, entry->skb); |
385 | else | ||
386 | ieee80211_tx_status_ni(rt2x00dev->hw, entry->skb); | ||
387 | } else | ||
385 | dev_kfree_skb_any(entry->skb); | 388 | dev_kfree_skb_any(entry->skb); |
386 | 389 | ||
387 | /* | 390 | /* |
diff --git a/include/net/mac80211.h b/include/net/mac80211.h index eaa4affd40c..e411cf87fb4 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 |