Thread (6 messages) 6 messages, 2 authors, 2011-08-29

Re: [RFC 1/3] mac80211: comment allocation of mesh frames

From: Johannes Berg <johannes@sipsolutions.net>
Date: 2011-08-29 13:52:19

On Wed, 2011-08-24 at 12:02 -0700, Thomas Pedersen wrote:
quoted hunk ↗ jump to hunk
diff --git a/net/mac80211/mesh_hwmp.c b/net/mac80211/mesh_hwmp.c
index f09e5e8..d5f4a41 100644
--- a/net/mac80211/mesh_hwmp.c
+++ b/net/mac80211/mesh_hwmp.c
@@ -129,11 +129,14 @@ static int mesh_path_sel_frame_tx(enum mpath_frame_type action, u8 flags,
 		struct ieee80211_sub_if_data *sdata)
 {
 	struct ieee80211_local *local = sdata->local;
-	struct sk_buff *skb = dev_alloc_skb(local->hw.extra_tx_headroom + 400);
+	struct sk_buff *skb = NULL;
No need for = NULL.

+	skb = dev_alloc_skb(local->hw.extra_tx_headroom +
+			    25 + sizeof(mgmt->u.action.u.mesh_action) +
+			    2 + 37); /* HWMP IEs */
IEs? Should that be singular, or is the 2 wrong? Is there a struct that
you can take sizeof() for 37? Maybe not yet?

johannes
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help