diff options
author | Johannes Berg <johannes@sipsolutions.net> | 2008-10-10 07:21:59 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2008-10-31 19:00:12 -0400 |
commit | 94778280fabdb6bc76db5509bd95859f1141385b (patch) | |
tree | 795a20eed458dacab69a345c33467523a2a8dbe1 /drivers/net/wireless/p54 | |
parent | 2e20cc3986cbee410fbe8e3e116bdcb12d70fcce (diff) |
mac80211: provide sequence numbers
I've come to think that not providing sequence numbers for
the normal STA mode case was a mistake, at least two drivers
now had to implement code they wouldn't otherwise need, and
I believe at76_usb and adm8211 might be broken.
This patch makes mac80211 assign a sequence number to all
those frames that need one except beacons. That means that
if a driver only implements modes that do not do beaconing
it need not worry about the sequence number.
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/p54')
-rw-r--r-- | drivers/net/wireless/p54/p54.h | 1 | ||||
-rw-r--r-- | drivers/net/wireless/p54/p54common.c | 18 |
2 files changed, 5 insertions, 14 deletions
diff --git a/drivers/net/wireless/p54/p54.h b/drivers/net/wireless/p54/p54.h index 8da4d3020599..1da96fe50241 100644 --- a/drivers/net/wireless/p54/p54.h +++ b/drivers/net/wireless/p54/p54.h | |||
@@ -67,7 +67,6 @@ struct p54_common { | |||
67 | int (*open)(struct ieee80211_hw *dev); | 67 | int (*open)(struct ieee80211_hw *dev); |
68 | void (*stop)(struct ieee80211_hw *dev); | 68 | void (*stop)(struct ieee80211_hw *dev); |
69 | int mode; | 69 | int mode; |
70 | u16 seqno; | ||
71 | u16 rx_mtu; | 70 | u16 rx_mtu; |
72 | u8 headroom; | 71 | u8 headroom; |
73 | u8 tailroom; | 72 | u8 tailroom; |
diff --git a/drivers/net/wireless/p54/p54common.c b/drivers/net/wireless/p54/p54common.c index f8cdd88e010e..7c37d3fc1e24 100644 --- a/drivers/net/wireless/p54/p54common.c +++ b/drivers/net/wireless/p54/p54common.c | |||
@@ -856,19 +856,6 @@ static int p54_tx(struct ieee80211_hw *dev, struct sk_buff *skb) | |||
856 | if (padding) | 856 | if (padding) |
857 | txhdr->align[0] = padding; | 857 | txhdr->align[0] = padding; |
858 | 858 | ||
859 | /* FIXME: The sequence that follows is needed for this driver to | ||
860 | * work with mac80211 since "mac80211: fix TX sequence numbers". | ||
861 | * As with the temporary code in rt2x00, changes will be needed | ||
862 | * to get proper sequence numbers on beacons. In addition, this | ||
863 | * patch places the sequence number in the hardware state, which | ||
864 | * limits us to a single virtual state. | ||
865 | */ | ||
866 | if (info->flags & IEEE80211_TX_CTL_ASSIGN_SEQ) { | ||
867 | if (info->flags & IEEE80211_TX_CTL_FIRST_FRAGMENT) | ||
868 | priv->seqno += 0x10; | ||
869 | ieee80211hdr->seq_ctrl &= cpu_to_le16(IEEE80211_SCTL_FRAG); | ||
870 | ieee80211hdr->seq_ctrl |= cpu_to_le16(priv->seqno); | ||
871 | } | ||
872 | /* modifies skb->cb and with it info, so must be last! */ | 859 | /* modifies skb->cb and with it info, so must be last! */ |
873 | p54_assign_address(dev, skb, hdr, skb->len); | 860 | p54_assign_address(dev, skb, hdr, skb->len); |
874 | 861 | ||
@@ -1392,6 +1379,11 @@ struct ieee80211_hw *p54_init_common(size_t priv_data_len) | |||
1392 | IEEE80211_HW_SIGNAL_DBM | | 1379 | IEEE80211_HW_SIGNAL_DBM | |
1393 | IEEE80211_HW_NOISE_DBM; | 1380 | IEEE80211_HW_NOISE_DBM; |
1394 | 1381 | ||
1382 | /* | ||
1383 | * XXX: when this driver gets support for any mode that | ||
1384 | * requires beacons (AP, MESH, IBSS) then it must | ||
1385 | * implement IEEE80211_TX_CTL_ASSIGN_SEQ. | ||
1386 | */ | ||
1395 | dev->wiphy->interface_modes = BIT(NL80211_IFTYPE_STATION); | 1387 | dev->wiphy->interface_modes = BIT(NL80211_IFTYPE_STATION); |
1396 | 1388 | ||
1397 | dev->channel_change_time = 1000; /* TODO: find actual value */ | 1389 | dev->channel_change_time = 1000; /* TODO: find actual value */ |