1
Index: compatible/net/mac80211/ieee80211_sta.c
2
===================================================================
3
--- compatible.orig/net/mac80211/ieee80211_sta.c 2008-01-06 13:56:59.000000000 +0200
4
+++ compatible/net/mac80211/ieee80211_sta.c 2008-01-06 13:57:56.000000000 +0200
6
struct ieee80211_local *local = wdev_priv(dev->ieee80211_ptr);
8
struct ieee80211_mgmt *mgmt;
12
- skb = dev_alloc_skb(sizeof(*mgmt) + local->hw.extra_tx_headroom);
13
+ skb = dev_alloc_skb(sizeof(*mgmt) + local->hw.extra_tx_headroom +
14
+ sizeof(mgmt->u.action.category) +
15
+ sizeof(mgmt->u.action.u.addba_resp));
17
printk(KERN_DEBUG "%s: failed to allocate buffer "
18
"for addba resp frame\n", dev->name);
19
@@ -2542,12 +2544,13 @@
20
mgmt->frame_control = IEEE80211_FC(IEEE80211_FTYPE_MGMT,
21
IEEE80211_STYPE_ACTION);
23
- skb_put(skb, 1 + sizeof(mgmt->u.action.u.addba_resp));
24
+ skb_put(skb, sizeof(mgmt->u.action.category) +
25
+ sizeof(mgmt->u.action.u.addba_resp));
26
mgmt->u.action.category = WLAN_CATEGORY_BACK;
27
mgmt->u.action.u.addba_resp.action_code = WLAN_ACTION_ADDBA_RESP;
28
mgmt->u.action.u.addba_resp.dialog_token = dialog_token;
30
- capab |= (u16)(policy << 1); /* bit 1 aggregation policy (1 - immediate 0 - delayed )*/
31
+ capab = (u16)(policy << 1); /* bit 1 aggregation policy (1 - immediate 0 - delayed )*/
32
capab |= (u16)(tid << 2); /* bit 5:2 TID number */
33
capab |= (u16)(buf_size << 6); /* bit 15:6 max size of aggergation */
35
@@ -2744,11 +2747,11 @@
36
struct ieee80211_if_sta *ifsta = &sdata->u.sta;
38
struct ieee80211_mgmt *mgmt;
41
- skb = dev_alloc_skb(sizeof(*mgmt) + local->hw.extra_tx_headroom + 1 +
42
- sizeof(mgmt->u.action.u.addba_req));
45
+ skb = dev_alloc_skb(sizeof(*mgmt) + local->hw.extra_tx_headroom +
46
+ sizeof(mgmt->u.action.category) +
47
+ sizeof(mgmt->u.action.u.delba));
50
printk(KERN_ERR "%s: failed to allocate buffer "
52
mgmt->frame_control = IEEE80211_FC(IEEE80211_FTYPE_MGMT,
53
IEEE80211_STYPE_ACTION);
55
- skb_put(skb, 1 + sizeof(mgmt->u.action.u.addba_req));
56
+ skb_put(skb, sizeof(mgmt->u.action.category) +
57
+ sizeof(mgmt->u.action.u.addba_req));
59
mgmt->u.action.category = WLAN_CATEGORY_BACK;
60
mgmt->u.action.u.addba_req.action_code = WLAN_ACTION_ADDBA_REQ;
62
struct ieee80211_mgmt *mgmt;
65
- skb = dev_alloc_skb(sizeof(*mgmt) + local->hw.extra_tx_headroom + 1 +
66
- sizeof(mgmt->u.action.u.delba));
67
+ skb = dev_alloc_skb(sizeof(*mgmt) + local->hw.extra_tx_headroom +
68
+ sizeof(mgmt->u.action.category) +
69
+ sizeof(mgmt->u.action.u.delba));
72
printk(KERN_ERR "%s: failed to allocate buffer "
74
memcpy(mgmt->bssid, ifsta->bssid, ETH_ALEN);
75
mgmt->frame_control = IEEE80211_FC(IEEE80211_FTYPE_MGMT,IEEE80211_STYPE_ACTION);
77
- skb_put(skb, 1 + sizeof(mgmt->u.action.u.delba));
78
+ skb_put(skb, sizeof(mgmt->u.action.category) +
79
+ sizeof(mgmt->u.action.u.delba));
81
mgmt->u.action.category = WLAN_CATEGORY_BACK;
82
mgmt->u.action.u.delba.action_code = WLAN_ACTION_DELBA;