Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 71803
b: refs/heads/master
c: 98798f4
h: refs/heads/master
i:
  71801: 628391c
  71799: bd2f3ee
v: v3
  • Loading branch information
Michael Wu authored and John W. Linville committed Oct 18, 2007
1 parent 33eb0e4 commit 5c1de2d
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 16 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: d20c678a450a25c1c12925f60c1b4cc040acc17d
refs/heads/master: 98798f4875b7149db4eb7d0a126fc6dcd9637821
31 changes: 16 additions & 15 deletions trunk/drivers/net/wireless/rtl8187_dev.c
Original file line number Diff line number Diff line change
Expand Up @@ -131,32 +131,33 @@ static int rtl8187_tx(struct ieee80211_hw *dev, struct sk_buff *skb,
struct rtl8187_tx_hdr *hdr;
struct rtl8187_tx_info *info;
struct urb *urb;
u32 tmp;
__le16 rts_dur = 0;
u32 flags;

urb = usb_alloc_urb(0, GFP_ATOMIC);
if (!urb) {
kfree_skb(skb);
return 0;
}

hdr = (struct rtl8187_tx_hdr *)skb_push(skb, sizeof(*hdr));
tmp = skb->len - sizeof(*hdr);
tmp |= RTL8187_TX_FLAG_NO_ENCRYPT;
tmp |= control->rts_cts_rate << 19;
tmp |= control->tx_rate << 24;
if (ieee80211_get_morefrag((struct ieee80211_hdr *)skb))
tmp |= RTL8187_TX_FLAG_MORE_FRAG;
flags = skb->len;
flags |= RTL8187_TX_FLAG_NO_ENCRYPT;
flags |= control->rts_cts_rate << 19;
flags |= control->tx_rate << 24;
if (ieee80211_get_morefrag((struct ieee80211_hdr *)skb->data))
flags |= RTL8187_TX_FLAG_MORE_FRAG;
if (control->flags & IEEE80211_TXCTL_USE_RTS_CTS) {
tmp |= RTL8187_TX_FLAG_RTS;
hdr->rts_duration =
ieee80211_rts_duration(dev, priv->if_id, skb->len, control);
flags |= RTL8187_TX_FLAG_RTS;
rts_dur = ieee80211_rts_duration(dev, priv->if_id, skb->len, control);
}
if (control->flags & IEEE80211_TXCTL_USE_CTS_PROTECT)
tmp |= RTL8187_TX_FLAG_CTS;
hdr->flags = cpu_to_le32(tmp);
flags |= RTL8187_TX_FLAG_CTS;

hdr = (struct rtl8187_tx_hdr *)skb_push(skb, sizeof(*hdr));
hdr->flags = cpu_to_le32(flags);
hdr->len = 0;
tmp = control->retry_limit << 8;
hdr->retry = cpu_to_le32(tmp);
hdr->rts_duration = rts_dur;
hdr->retry = cpu_to_le32(control->retry_limit << 8);

info = (struct rtl8187_tx_info *)skb->cb;
info->control = kmemdup(control, sizeof(*control), GFP_ATOMIC);
Expand Down

0 comments on commit 5c1de2d

Please sign in to comment.