Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 194986
b: refs/heads/master
c: 51e080d
h: refs/heads/master
v: v3
  • Loading branch information
John W. Linville committed May 7, 2010
1 parent c0ad7fe commit faf7803
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: a472e71b3c71619087d2485282955c3b62ebfde9
refs/heads/master: 51e080deba57437459571f26a3c6f3db03324c4c
3 changes: 3 additions & 0 deletions trunk/drivers/net/wireless/rtl818x/rtl8180.h
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,9 @@ struct rtl8180_priv {
u32 anaparam;
u16 rfparam;
u8 csthreshold;

/* sequence # */
u16 seqno;
};

void rtl8180_write_phy(struct ieee80211_hw *dev, u8 addr, u32 data);
Expand Down
10 changes: 10 additions & 0 deletions trunk/drivers/net/wireless/rtl818x/rtl8180_dev.c
Original file line number Diff line number Diff line change
Expand Up @@ -233,6 +233,7 @@ static irqreturn_t rtl8180_interrupt(int irq, void *dev_id)
static int rtl8180_tx(struct ieee80211_hw *dev, struct sk_buff *skb)
{
struct ieee80211_tx_info *info = IEEE80211_SKB_CB(skb);
struct ieee80211_hdr *hdr = (struct ieee80211_hdr *)skb->data;
struct rtl8180_priv *priv = dev->priv;
struct rtl8180_tx_ring *ring;
struct rtl8180_tx_desc *entry;
Expand Down Expand Up @@ -284,6 +285,14 @@ static int rtl8180_tx(struct ieee80211_hw *dev, struct sk_buff *skb)
}

spin_lock_irqsave(&priv->lock, flags);

if (info->flags & IEEE80211_TX_CTL_ASSIGN_SEQ) {
if (info->flags & IEEE80211_TX_CTL_FIRST_FRAGMENT)
priv->seqno += 0x10;
hdr->seq_ctrl &= cpu_to_le16(IEEE80211_SCTL_FRAG);
hdr->seq_ctrl |= cpu_to_le16(priv->seqno);
}

idx = (ring->idx + skb_queue_len(&ring->queue)) % ring->entries;
entry = &ring->desc[idx];

Expand All @@ -298,6 +307,7 @@ static int rtl8180_tx(struct ieee80211_hw *dev, struct sk_buff *skb)
__skb_queue_tail(&ring->queue, skb);
if (ring->entries - skb_queue_len(&ring->queue) < 2)
ieee80211_stop_queue(dev, prio);

spin_unlock_irqrestore(&priv->lock, flags);

rtl818x_iowrite8(priv, &priv->map->TX_DMA_POLLING, (1 << (prio + 4)));
Expand Down

0 comments on commit faf7803

Please sign in to comment.