diff options
author | Jouni Malinen <jkmaline@cc.hut.fi> | 2005-08-15 06:08:39 +0400 |
---|---|---|
committer | Jeff Garzik <jgarzik@pobox.com> | 2005-08-15 07:06:26 +0400 |
commit | 5bee720fd7fa5ed4eade96058acd3a684da30932 (patch) | |
tree | 916d3c4c880c64ba13edc4f890fa3b021be4ded8 /drivers/net/wireless/hostap/hostap_wlan.h | |
parent | 1e4adbdb3f0348dcf4fce92f1acc7c8386982c17 (diff) | |
download | linux-5bee720fd7fa5ed4eade96058acd3a684da30932.tar.xz |
[PATCH] hostap: Fix skb->cb use for TX meta data
Old AP mode code for power saving was using skb->cb for couple of
flags before the more generic 802.11 TX code started using the same
buffer for struct hostap_skb_tx_data. This resulted in the power save
code corrupting the magic value in beginning of the buffer and TX code
dropping the power saved packets because of this for the case where
STAs send PS-Poll frames with PwrMgmt flag set.
This patch modifies the power save code to use the same struct
hostap_skb_tx_data as rest of the TX path in order to avoid corrupting
the data in skb->cb.
In addition, this patch reorders fields in the structure and makes
them use smaller types in order to make the structure fit in skb->cb
on 64-bit hosts.
Signed-off-by: Jouni Malinen <jkmaline@cc.hut.fi>
Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
Diffstat (limited to 'drivers/net/wireless/hostap/hostap_wlan.h')
-rw-r--r-- | drivers/net/wireless/hostap/hostap_wlan.h | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/drivers/net/wireless/hostap/hostap_wlan.h b/drivers/net/wireless/hostap/hostap_wlan.h index a632d45f334d..6f5bea8a5c23 100644 --- a/drivers/net/wireless/hostap/hostap_wlan.h +++ b/drivers/net/wireless/hostap/hostap_wlan.h @@ -941,16 +941,21 @@ struct hostap_interface { #define HOSTAP_SKB_TX_DATA_MAGIC 0xf08a36a2 -/* TX meta data - stored in skb->cb buffer, so this must be not increase over - * 48-byte limit */ +/* + * TX meta data - stored in skb->cb buffer, so this must not be increased over + * the 40-byte limit + */ struct hostap_skb_tx_data { - unsigned int magic; /* HOSTAP_SKB_TX_DATA_MAGIC */ - int rate; /* transmit rate */ + u32 magic; /* HOSTAP_SKB_TX_DATA_MAGIC */ + u8 rate; /* transmit rate */ +#define HOSTAP_TX_FLAGS_WDS BIT(0) +#define HOSTAP_TX_FLAGS_BUFFERED_FRAME BIT(1) +#define HOSTAP_TX_FLAGS_ADD_MOREDATA BIT(2) + u8 flags; /* HOSTAP_TX_FLAGS_* */ + u16 tx_cb_idx; struct hostap_interface *iface; unsigned long jiffies; /* queueing timestamp */ - int wds; unsigned short ethertype; - int tx_cb_idx; }; |