aboutsummaryrefslogtreecommitdiffstats
path: root/net/mac80211/mlme.c
diff options
context:
space:
mode:
authorEster Kummer <ester.kummer@intel.com>2008-04-17 19:05:14 -0400
committerJohn W. Linville <linville@tuxdriver.com>2008-05-07 15:02:12 -0400
commit3acea5b616c6d85008700a9d51cb02a81b2d0c67 (patch)
treee8ca9fa0c00caa6144e677d148edc711dcc15f51 /net/mac80211/mlme.c
parent079a253383c711d388adce527b57bd09297ee83c (diff)
mac80211: correct skb allocation
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@intel.com> Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'net/mac80211/mlme.c')
-rw-r--r--net/mac80211/mlme.c11
1 files changed, 4 insertions, 7 deletions
diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c
index de09f58d9683..63b391d01251 100644
--- a/net/mac80211/mlme.c
+++ b/net/mac80211/mlme.c
@@ -1093,8 +1093,8 @@ static void ieee80211_send_addba_resp(struct net_device *dev, u8 *da, u16 tid,
1093 struct ieee80211_mgmt *mgmt; 1093 struct ieee80211_mgmt *mgmt;
1094 u16 capab; 1094 u16 capab;
1095 1095
1096 skb = dev_alloc_skb(sizeof(*mgmt) + local->hw.extra_tx_headroom + 1 + 1096 skb = dev_alloc_skb(sizeof(*mgmt) + local->hw.extra_tx_headroom);
1097 sizeof(mgmt->u.action.u.addba_resp)); 1097
1098 if (!skb) { 1098 if (!skb) {
1099 printk(KERN_DEBUG "%s: failed to allocate buffer " 1099 printk(KERN_DEBUG "%s: failed to allocate buffer "
1100 "for addba resp frame\n", dev->name); 1100 "for addba resp frame\n", dev->name);
@@ -1142,9 +1142,7 @@ void ieee80211_send_addba_request(struct net_device *dev, const u8 *da,
1142 struct ieee80211_mgmt *mgmt; 1142 struct ieee80211_mgmt *mgmt;
1143 u16 capab; 1143 u16 capab;
1144 1144
1145 skb = dev_alloc_skb(sizeof(*mgmt) + local->hw.extra_tx_headroom + 1 + 1145 skb = dev_alloc_skb(sizeof(*mgmt) + local->hw.extra_tx_headroom);
1146 sizeof(mgmt->u.action.u.addba_req));
1147
1148 1146
1149 if (!skb) { 1147 if (!skb) {
1150 printk(KERN_ERR "%s: failed to allocate buffer " 1148 printk(KERN_ERR "%s: failed to allocate buffer "
@@ -1406,8 +1404,7 @@ void ieee80211_send_delba(struct net_device *dev, const u8 *da, u16 tid,
1406 struct ieee80211_mgmt *mgmt; 1404 struct ieee80211_mgmt *mgmt;
1407 u16 params; 1405 u16 params;
1408 1406
1409 skb = dev_alloc_skb(sizeof(*mgmt) + local->hw.extra_tx_headroom + 1 + 1407 skb = dev_alloc_skb(sizeof(*mgmt) + local->hw.extra_tx_headroom);
1410 sizeof(mgmt->u.action.u.delba));
1411 1408
1412 if (!skb) { 1409 if (!skb) {
1413 printk(KERN_ERR "%s: failed to allocate buffer " 1410 printk(KERN_ERR "%s: failed to allocate buffer "