diff options
-rw-r--r-- | drivers/net/wireless/p54/p54.h | 1 | ||||
-rw-r--r-- | drivers/net/wireless/p54/p54common.c | 14 |
2 files changed, 15 insertions, 0 deletions
diff --git a/drivers/net/wireless/p54/p54.h b/drivers/net/wireless/p54/p54.h index cac9a515b82d..4801a363507b 100644 --- a/drivers/net/wireless/p54/p54.h +++ b/drivers/net/wireless/p54/p54.h | |||
@@ -52,6 +52,7 @@ struct p54_common { | |||
52 | int (*open)(struct ieee80211_hw *dev); | 52 | int (*open)(struct ieee80211_hw *dev); |
53 | void (*stop)(struct ieee80211_hw *dev); | 53 | void (*stop)(struct ieee80211_hw *dev); |
54 | int mode; | 54 | int mode; |
55 | u16 seqno; | ||
55 | struct mutex conf_mutex; | 56 | struct mutex conf_mutex; |
56 | u8 mac_addr[ETH_ALEN]; | 57 | u8 mac_addr[ETH_ALEN]; |
57 | u8 bssid[ETH_ALEN]; | 58 | u8 bssid[ETH_ALEN]; |
diff --git a/drivers/net/wireless/p54/p54common.c b/drivers/net/wireless/p54/p54common.c index 4da89ea9b561..2d2d33612aef 100644 --- a/drivers/net/wireless/p54/p54common.c +++ b/drivers/net/wireless/p54/p54common.c | |||
@@ -553,6 +553,7 @@ static int p54_tx(struct ieee80211_hw *dev, struct sk_buff *skb) | |||
553 | struct ieee80211_tx_queue_stats *current_queue; | 553 | struct ieee80211_tx_queue_stats *current_queue; |
554 | struct p54_common *priv = dev->priv; | 554 | struct p54_common *priv = dev->priv; |
555 | struct p54_control_hdr *hdr; | 555 | struct p54_control_hdr *hdr; |
556 | struct ieee80211_hdr *ieee80211hdr = (struct ieee80211_hdr *)skb->data; | ||
556 | struct p54_tx_control_allocdata *txhdr; | 557 | struct p54_tx_control_allocdata *txhdr; |
557 | size_t padding, len; | 558 | size_t padding, len; |
558 | u8 rate; | 559 | u8 rate; |
@@ -605,6 +606,19 @@ static int p54_tx(struct ieee80211_hw *dev, struct sk_buff *skb) | |||
605 | if (padding) | 606 | if (padding) |
606 | txhdr->align[0] = padding; | 607 | txhdr->align[0] = padding; |
607 | 608 | ||
609 | /* FIXME: The sequence that follows is needed for this driver to | ||
610 | * work with mac80211 since "mac80211: fix TX sequence numbers". | ||
611 | * As with the temporary code in rt2x00, changes will be needed | ||
612 | * to get proper sequence numbers on beacons. In addition, this | ||
613 | * patch places the sequence number in the hardware state, which | ||
614 | * limits us to a single virtual state. | ||
615 | */ | ||
616 | if (info->flags & IEEE80211_TX_CTL_ASSIGN_SEQ) { | ||
617 | if (info->flags & IEEE80211_TX_CTL_FIRST_FRAGMENT) | ||
618 | priv->seqno += 0x10; | ||
619 | ieee80211hdr->seq_ctrl &= cpu_to_le16(IEEE80211_SCTL_FRAG); | ||
620 | ieee80211hdr->seq_ctrl |= cpu_to_le16(priv->seqno); | ||
621 | } | ||
608 | /* modifies skb->cb and with it info, so must be last! */ | 622 | /* modifies skb->cb and with it info, so must be last! */ |
609 | p54_assign_address(dev, skb, hdr, skb->len); | 623 | p54_assign_address(dev, skb, hdr, skb->len); |
610 | 624 | ||