aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/rtl8187_dev.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/wireless/rtl8187_dev.c')
-rw-r--r--drivers/net/wireless/rtl8187_dev.c10
1 files changed, 3 insertions, 7 deletions
diff --git a/drivers/net/wireless/rtl8187_dev.c b/drivers/net/wireless/rtl8187_dev.c
index e14c84248686..86a09b49681c 100644
--- a/drivers/net/wireless/rtl8187_dev.c
+++ b/drivers/net/wireless/rtl8187_dev.c
@@ -179,21 +179,17 @@ static int rtl8187_tx(struct ieee80211_hw *dev, struct sk_buff *skb,
179 flags = skb->len; 179 flags = skb->len;
180 flags |= RTL8187_TX_FLAG_NO_ENCRYPT; 180 flags |= RTL8187_TX_FLAG_NO_ENCRYPT;
181 181
182 BUG_ON(!control->tx_rate); 182 flags |= ieee80211_get_tx_rate(dev, control)->hw_value << 24;
183
184 flags |= control->tx_rate->hw_value << 24;
185 if (ieee80211_get_morefrag((struct ieee80211_hdr *)skb->data)) 183 if (ieee80211_get_morefrag((struct ieee80211_hdr *)skb->data))
186 flags |= RTL8187_TX_FLAG_MORE_FRAG; 184 flags |= RTL8187_TX_FLAG_MORE_FRAG;
187 if (control->flags & IEEE80211_TXCTL_USE_RTS_CTS) { 185 if (control->flags & IEEE80211_TXCTL_USE_RTS_CTS) {
188 BUG_ON(!control->rts_cts_rate);
189 flags |= RTL8187_TX_FLAG_RTS; 186 flags |= RTL8187_TX_FLAG_RTS;
190 flags |= control->rts_cts_rate->hw_value << 19; 187 flags |= ieee80211_get_rts_cts_rate(dev, control)->hw_value << 19;
191 rts_dur = ieee80211_rts_duration(dev, priv->vif, 188 rts_dur = ieee80211_rts_duration(dev, priv->vif,
192 skb->len, control); 189 skb->len, control);
193 } else if (control->flags & IEEE80211_TXCTL_USE_CTS_PROTECT) { 190 } else if (control->flags & IEEE80211_TXCTL_USE_CTS_PROTECT) {
194 BUG_ON(!control->rts_cts_rate);
195 flags |= RTL8187_TX_FLAG_CTS; 191 flags |= RTL8187_TX_FLAG_CTS;
196 flags |= control->rts_cts_rate->hw_value << 19; 192 flags |= ieee80211_get_rts_cts_rate(dev, control)->hw_value << 19;
197 } 193 }
198 194
199 hdr = (struct rtl8187_tx_hdr *)skb_push(skb, sizeof(*hdr)); 195 hdr = (struct rtl8187_tx_hdr *)skb_push(skb, sizeof(*hdr));