aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/rtl8187_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/rtl8187_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/rtl8187_dev.c')
-rw-r--r--drivers/net/wireless/rtl8187_dev.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/drivers/net/wireless/rtl8187_dev.c b/drivers/net/wireless/rtl8187_dev.c
index 6ef67990692d..c03834d5cb0b 100644
--- a/drivers/net/wireless/rtl8187_dev.c
+++ b/drivers/net/wireless/rtl8187_dev.c
@@ -178,17 +178,23 @@ static int rtl8187_tx(struct ieee80211_hw *dev, struct sk_buff *skb,
178 178
179 flags = skb->len; 179 flags = skb->len;
180 flags |= RTL8187_TX_FLAG_NO_ENCRYPT; 180 flags |= RTL8187_TX_FLAG_NO_ENCRYPT;
181 flags |= control->rts_cts_rate->hw_value << 19; 181
182 BUG_ON(!control->tx_rate);
183
182 flags |= control->tx_rate->hw_value << 24; 184 flags |= control->tx_rate->hw_value << 24;
183 if (ieee80211_get_morefrag((struct ieee80211_hdr *)skb->data)) 185 if (ieee80211_get_morefrag((struct ieee80211_hdr *)skb->data))
184 flags |= RTL8187_TX_FLAG_MORE_FRAG; 186 flags |= RTL8187_TX_FLAG_MORE_FRAG;
185 if (control->flags & IEEE80211_TXCTL_USE_RTS_CTS) { 187 if (control->flags & IEEE80211_TXCTL_USE_RTS_CTS) {
188 BUG_ON(!control->rts_cts_rate);
186 flags |= RTL8187_TX_FLAG_RTS; 189 flags |= RTL8187_TX_FLAG_RTS;
190 flags |= control->rts_cts_rate->hw_value << 19;
187 rts_dur = ieee80211_rts_duration(dev, priv->vif, 191 rts_dur = ieee80211_rts_duration(dev, priv->vif,
188 skb->len, control); 192 skb->len, control);
189 } 193 } else if (control->flags & IEEE80211_TXCTL_USE_CTS_PROTECT) {
190 if (control->flags & IEEE80211_TXCTL_USE_CTS_PROTECT) 194 BUG_ON(!control->rts_cts_rate);
191 flags |= RTL8187_TX_FLAG_CTS; 195 flags |= RTL8187_TX_FLAG_CTS;
196 flags |= control->rts_cts_rate->hw_value << 19;
197 }
192 198
193 hdr = (struct rtl8187_tx_hdr *)skb_push(skb, sizeof(*hdr)); 199 hdr = (struct rtl8187_tx_hdr *)skb_push(skb, sizeof(*hdr));
194 hdr->flags = cpu_to_le32(flags); 200 hdr->flags = cpu_to_le32(flags);