Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 107710
b: refs/heads/master
c: d4764b2
h: refs/heads/master
v: v3
  • Loading branch information
Ivo van Doorn authored and John W. Linville committed Aug 1, 2008
1 parent 0ab5036 commit 63c9489
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 3 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: 8d8acd46fb7e962ac04baef5a118d431fae6b0f6
refs/heads/master: d4764b29b6e0f1608e397930677928e5a3f62bba
6 changes: 6 additions & 0 deletions trunk/drivers/net/wireless/rt2x00/rt2x00.h
Original file line number Diff line number Diff line change
Expand Up @@ -368,6 +368,12 @@ struct rt2x00_intf {
#define DELAYED_CONFIG_ERP 0x00000002
#define DELAYED_LED_ASSOC 0x00000004

/*
* Software sequence counter, this is only required
* for hardware which doesn't support hardware
* sequence counting.
*/
spinlock_t seqlock;
u16 seqno;
};

Expand Down
1 change: 1 addition & 0 deletions trunk/drivers/net/wireless/rt2x00/rt2x00mac.c
Original file line number Diff line number Diff line change
Expand Up @@ -247,6 +247,7 @@ int rt2x00mac_add_interface(struct ieee80211_hw *hw,
rt2x00dev->intf_sta_count++;

spin_lock_init(&intf->lock);
spin_lock_init(&intf->seqlock);
intf->beacon = entry;

if (conf->type == IEEE80211_IF_TYPE_AP)
Expand Down
5 changes: 3 additions & 2 deletions trunk/drivers/net/wireless/rt2x00/rt2x00queue.c
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,7 @@ static void rt2x00queue_create_tx_descriptor(struct queue_entry *entry,
unsigned int data_length;
unsigned int duration;
unsigned int residual;
unsigned long irqflags;

memset(txdesc, 0, sizeof(*txdesc));

Expand Down Expand Up @@ -213,14 +214,14 @@ static void rt2x00queue_create_tx_descriptor(struct queue_entry *entry,
* sequence counter given by mac80211.
*/
if (tx_info->flags & IEEE80211_TX_CTL_ASSIGN_SEQ) {
spin_lock(&intf->lock);
spin_lock_irqsave(&intf->seqlock, irqflags);

if (test_bit(ENTRY_TXD_FIRST_FRAGMENT, &txdesc->flags))
intf->seqno += 0x10;
hdr->seq_ctrl &= cpu_to_le16(IEEE80211_SCTL_FRAG);
hdr->seq_ctrl |= cpu_to_le16(intf->seqno);

spin_unlock(&intf->lock);
spin_unlock_irqrestore(&intf->seqlock, irqflags);

__set_bit(ENTRY_TXD_GENERATE_SEQ, &txdesc->flags);
}
Expand Down

0 comments on commit 63c9489

Please sign in to comment.