From: Ester Kummer <[email protected]>
This patch corrects the allocation of skb in ADDBA req/resp and DELBA
it removes redundant space u.addba_* are already counted in sizeof(*mgmt)
Signed-off-by: Ester Kummer <[email protected]>
Signed-off-by: Tomas Winkler <[email protected]>
---
net/mac80211/mlme.c | 11 ++++-------
1 files changed, 4 insertions(+), 7 deletions(-)
diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c
index c0a5345..b0b079c 100644
--- a/net/mac80211/mlme.c
+++ b/net/mac80211/mlme.c
@@ -1098,8 +1098,8 @@ static void ieee80211_send_addba_resp(struct net_device *dev, u8 *da, u16 tid,
struct ieee80211_mgmt *mgmt;
u16 capab;
- skb = dev_alloc_skb(sizeof(*mgmt) + local->hw.extra_tx_headroom + 1 +
- sizeof(mgmt->u.action.u.addba_resp));
+ skb = dev_alloc_skb(sizeof(*mgmt) + local->hw.extra_tx_headroom);
+
if (!skb) {
printk(KERN_DEBUG "%s: failed to allocate buffer "
"for addba resp frame\n", dev->name);
@@ -1147,9 +1147,7 @@ void ieee80211_send_addba_request(struct net_device *dev, const u8 *da,
struct ieee80211_mgmt *mgmt;
u16 capab;
- skb = dev_alloc_skb(sizeof(*mgmt) + local->hw.extra_tx_headroom + 1 +
- sizeof(mgmt->u.action.u.addba_req));
-
+ skb = dev_alloc_skb(sizeof(*mgmt) + local->hw.extra_tx_headroom);
if (!skb) {
printk(KERN_ERR "%s: failed to allocate buffer "
@@ -1411,8 +1409,7 @@ void ieee80211_send_delba(struct net_device *dev, const u8 *da, u16 tid,
struct ieee80211_mgmt *mgmt;
u16 params;
- skb = dev_alloc_skb(sizeof(*mgmt) + local->hw.extra_tx_headroom + 1 +
- sizeof(mgmt->u.action.u.delba));
+ skb = dev_alloc_skb(sizeof(*mgmt) + local->hw.extra_tx_headroom);
if (!skb) {
printk(KERN_ERR "%s: failed to allocate buffer "
--
1.5.3.4
> > - skb = dev_alloc_skb(sizeof(*mgmt) + local->hw.extra_tx_headroom + 1 +
> > - sizeof(mgmt->u.action.u.addba_resp));
> > + skb = dev_alloc_skb(sizeof(*mgmt) + local->hw.extra_tx_headroom);
> > +
>
> Forgive my ignorant, unresearched question... :-) What was the "+1"
> and why is it no longer necessary?
>
> John
originaly it was for the category field, but the union covers it as well
ron
On Thu, Apr 17, 2008 at 04:05:14PM -0700, Reinette Chatre wrote:
> From: Ester Kummer <[email protected]>
>
> This patch corrects the allocation of skb in ADDBA req/resp and DELBA
> it removes redundant space u.addba_* are already counted in sizeof(*mgmt)
>
> Signed-off-by: Ester Kummer <[email protected]>
> Signed-off-by: Tomas Winkler <[email protected]>
> ---
> net/mac80211/mlme.c | 11 ++++-------
> 1 files changed, 4 insertions(+), 7 deletions(-)
>
> diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c
> index c0a5345..b0b079c 100644
> --- a/net/mac80211/mlme.c
> +++ b/net/mac80211/mlme.c
> @@ -1098,8 +1098,8 @@ static void ieee80211_send_addba_resp(struct net_device *dev, u8 *da, u16 tid,
> struct ieee80211_mgmt *mgmt;
> u16 capab;
>
> - skb = dev_alloc_skb(sizeof(*mgmt) + local->hw.extra_tx_headroom + 1 +
> - sizeof(mgmt->u.action.u.addba_resp));
> + skb = dev_alloc_skb(sizeof(*mgmt) + local->hw.extra_tx_headroom);
> +
Forgive my ignorant, unresearched question... :-) What was the "+1"
and why is it no longer necessary?
John
--
John W. Linville
[email protected]