diff options
author | Johannes Berg <johannes@sipsolutions.net> | 2008-02-18 14:20:30 +0100 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2008-02-29 15:37:12 -0500 |
commit | aa68cbfb20b417d68dc45c9ef5f3e51546b438b0 (patch) | |
tree | 30e78297460fd6cb8888199808fb2b32806a0751 /drivers/net/wireless/rtl8180_dev.c | |
parent | 9d9bf77d16ba527f6f63846ca18cf20ae6e8d697 (diff) | |
download | op-kernel-dev-aa68cbfb20b417d68dc45c9ef5f3e51546b438b0.zip op-kernel-dev-aa68cbfb20b417d68dc45c9ef5f3e51546b438b0.tar.gz |
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.c | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/drivers/net/wireless/rtl8180_dev.c b/drivers/net/wireless/rtl8180_dev.c index d0928c9..b1b3a47 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, mapping = pci_map_single(priv->pdev, skb->data, skb->len, PCI_DMA_TODEVICE); + BUG_ON(!control->tx_rate); + tx_flags = RTL8180_TX_DESC_FLAG_OWN | RTL8180_TX_DESC_FLAG_FS | RTL8180_TX_DESC_FLAG_LS | - (control->tx_rate->hw_value << 24) | - (control->rts_cts_rate->hw_value << 19) | skb->len; + (control->tx_rate->hw_value << 24) | skb->len; if (priv->r8185) tx_flags |= RTL8180_TX_DESC_FLAG_DMA | RTL8180_TX_DESC_FLAG_NO_ENC; - if (control->flags & IEEE80211_TXCTL_USE_RTS_CTS) + if (control->flags & IEEE80211_TXCTL_USE_RTS_CTS) { + BUG_ON(!control->rts_cts_rate); tx_flags |= RTL8180_TX_DESC_FLAG_RTS; - else if (control->flags & IEEE80211_TXCTL_USE_CTS_PROTECT) + tx_flags |= control->rts_cts_rate->hw_value << 19; + } else if (control->flags & IEEE80211_TXCTL_USE_CTS_PROTECT) { + BUG_ON(!control->rts_cts_rate); tx_flags |= RTL8180_TX_DESC_FLAG_CTS; + tx_flags |= control->rts_cts_rate->hw_value << 19; + } *((struct ieee80211_tx_control **) skb->cb) = kmemdup(control, sizeof(*control), GFP_ATOMIC); |