Search Linux Wireless

Re: [PATCH] mac80211: correct skb allocation

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Apr 17, 2008 at 04:05:14PM -0700, Reinette Chatre wrote:
> From: Ester Kummer <ester.kummer@xxxxxxxxx>
> 
> 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 <ester.kummer@xxxxxxxxx>
> Signed-off-by: Tomas Winkler <tomas.winkler@xxxxxxxxx>
> ---
>  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
linville@xxxxxxxxxxxxx
--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]
  Powered by Linux