提交 3acea5b6 编写于 作者: E Ester Kummer 提交者: John W. Linville

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: NEster Kummer <ester.kummer@intel.com>
Signed-off-by: NTomas Winkler <tomas.winkler@intel.com>
Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
上级 079a2533
...@@ -1093,8 +1093,8 @@ static void ieee80211_send_addba_resp(struct net_device *dev, u8 *da, u16 tid, ...@@ -1093,8 +1093,8 @@ static void ieee80211_send_addba_resp(struct net_device *dev, u8 *da, u16 tid,
struct ieee80211_mgmt *mgmt; struct ieee80211_mgmt *mgmt;
u16 capab; u16 capab;
skb = dev_alloc_skb(sizeof(*mgmt) + local->hw.extra_tx_headroom + 1 + skb = dev_alloc_skb(sizeof(*mgmt) + local->hw.extra_tx_headroom);
sizeof(mgmt->u.action.u.addba_resp));
if (!skb) { if (!skb) {
printk(KERN_DEBUG "%s: failed to allocate buffer " printk(KERN_DEBUG "%s: failed to allocate buffer "
"for addba resp frame\n", dev->name); "for addba resp frame\n", dev->name);
...@@ -1142,9 +1142,7 @@ void ieee80211_send_addba_request(struct net_device *dev, const u8 *da, ...@@ -1142,9 +1142,7 @@ void ieee80211_send_addba_request(struct net_device *dev, const u8 *da,
struct ieee80211_mgmt *mgmt; struct ieee80211_mgmt *mgmt;
u16 capab; u16 capab;
skb = dev_alloc_skb(sizeof(*mgmt) + local->hw.extra_tx_headroom + 1 + skb = dev_alloc_skb(sizeof(*mgmt) + local->hw.extra_tx_headroom);
sizeof(mgmt->u.action.u.addba_req));
if (!skb) { if (!skb) {
printk(KERN_ERR "%s: failed to allocate buffer " 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,8 +1404,7 @@ void ieee80211_send_delba(struct net_device *dev, const u8 *da, u16 tid,
struct ieee80211_mgmt *mgmt; struct ieee80211_mgmt *mgmt;
u16 params; u16 params;
skb = dev_alloc_skb(sizeof(*mgmt) + local->hw.extra_tx_headroom + 1 + skb = dev_alloc_skb(sizeof(*mgmt) + local->hw.extra_tx_headroom);
sizeof(mgmt->u.action.u.delba));
if (!skb) { if (!skb) {
printk(KERN_ERR "%s: failed to allocate buffer " printk(KERN_ERR "%s: failed to allocate buffer "
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册