aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/rtl8180_dev.c
diff options
context:
space:
mode:
authorJohannes Berg <johannes@sipsolutions.net>2008-02-18 08:20:30 -0500
committerJohn W. Linville <linville@tuxdriver.com>2008-02-29 15:37:12 -0500
commitaa68cbfb20b417d68dc45c9ef5f3e51546b438b0 (patch)
tree30e78297460fd6cb8888199808fb2b32806a0751 /drivers/net/wireless/rtl8180_dev.c
parent9d9bf77d16ba527f6f63846ca18cf20ae6e8d697 (diff)
rtl818x: fix RTS/CTS-less transmit
This fixes packet transmission of packets without RTS/CTS. Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/rtl8180_dev.c')
-rw-r--r--drivers/net/wireless/rtl8180_dev.c14
1 files changed, 10 insertions, 4 deletions
diff --git a/drivers/net/wireless/rtl8180_dev.c b/drivers/net/wireless/rtl8180_dev.c
index d0928c91c21c..b1b3a478335b 100644
--- a/drivers/net/wireless/rtl8180_dev.c
+++ b/drivers/net/wireless/rtl8180_dev.c
@@ -257,19 +257,25 @@ static int rtl8180_tx(struct ieee80211_hw *dev, struct sk_buff *skb,
257 mapping = pci_map_single(priv->pdev, skb->data, 257 mapping = pci_map_single(priv->pdev, skb->data,
258 skb->len, PCI_DMA_TODEVICE); 258 skb->len, PCI_DMA_TODEVICE);
259 259
260 BUG_ON(!control->tx_rate);
261
260 tx_flags = RTL8180_TX_DESC_FLAG_OWN | RTL8180_TX_DESC_FLAG_FS | 262 tx_flags = RTL8180_TX_DESC_FLAG_OWN | RTL8180_TX_DESC_FLAG_FS |
261 RTL8180_TX_DESC_FLAG_LS | 263 RTL8180_TX_DESC_FLAG_LS |
262 (control->tx_rate->hw_value << 24) | 264 (control->tx_rate->hw_value << 24) | skb->len;
263 (control->rts_cts_rate->hw_value << 19) | skb->len;
264 265
265 if (priv->r8185) 266 if (priv->r8185)
266 tx_flags |= RTL8180_TX_DESC_FLAG_DMA | 267 tx_flags |= RTL8180_TX_DESC_FLAG_DMA |
267 RTL8180_TX_DESC_FLAG_NO_ENC; 268 RTL8180_TX_DESC_FLAG_NO_ENC;
268 269
269 if (control->flags & IEEE80211_TXCTL_USE_RTS_CTS) 270 if (control->flags & IEEE80211_TXCTL_USE_RTS_CTS) {
271 BUG_ON(!control->rts_cts_rate);
270 tx_flags |= RTL8180_TX_DESC_FLAG_RTS; 272 tx_flags |= RTL8180_TX_DESC_FLAG_RTS;
271 else if (control->flags & IEEE80211_TXCTL_USE_CTS_PROTECT) 273 tx_flags |= control->rts_cts_rate->hw_value << 19;
274 } else if (control->flags & IEEE80211_TXCTL_USE_CTS_PROTECT) {
275 BUG_ON(!control->rts_cts_rate);
272 tx_flags |= RTL8180_TX_DESC_FLAG_CTS; 276 tx_flags |= RTL8180_TX_DESC_FLAG_CTS;
277 tx_flags |= control->rts_cts_rate->hw_value << 19;
278 }
273 279
274 *((struct ieee80211_tx_control **) skb->cb) = 280 *((struct ieee80211_tx_control **) skb->cb) =
275 kmemdup(control, sizeof(*control), GFP_ATOMIC); 281 kmemdup(control, sizeof(*control), GFP_ATOMIC);