~ubuntu-branches/ubuntu/hardy/linux-backports-modules-2.6.24/hardy-security

« back to all changes in this revision

Viewing changes to updates/wireless/iwlwifi/mac80211/pending/0035-mac802211-fix-send_addba_resp.patch

  • Committer: Bazaar Package Importer
  • Author(s): , Ben Collins
  • Date: 2008-04-02 06:59:04 UTC
  • Revision ID: james.westby@ubuntu.com-20080402065904-e5knh2gn2hms3xbb
Tags: 2.6.24-14.11
[Ben Collins]

* iwlwifi: Update to iwlwifi-1.2.25 and mac80211-10.0.4
  - LP: #200950
* ubuntu: Slight cleanups to module hiearchy and Makefiles
* mac80211: Enable LED triggers
* iwlwifi: Add LED trigger support (rx and tx only)
  - LP: #176090

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
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
 
5
@@ -2521,9 +2521,11 @@
 
6
        struct ieee80211_local *local = wdev_priv(dev->ieee80211_ptr);
 
7
        struct sk_buff *skb;
 
8
        struct ieee80211_mgmt *mgmt;
 
9
-       u16 capab=0;
 
10
+       u16 capab;
 
11
 
 
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));
 
16
        if (!skb) {
 
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);
 
22
 
 
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;
 
29
 
 
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 */
 
34
 
 
35
@@ -2744,11 +2747,11 @@
 
36
        struct ieee80211_if_sta *ifsta = &sdata->u.sta;
 
37
        struct sk_buff *skb;
 
38
        struct ieee80211_mgmt *mgmt;
 
39
-       u16 capab=0;
 
40
-
 
41
-       skb = dev_alloc_skb(sizeof(*mgmt) + local->hw.extra_tx_headroom + 1 +
 
42
-                               sizeof(mgmt->u.action.u.addba_req));
 
43
+       u16 capab;
 
44
 
 
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));
 
48
 
 
49
        if (!skb) {
 
50
                printk(KERN_ERR "%s: failed to allocate buffer "
 
51
@@ -2768,7 +2771,8 @@
 
52
        mgmt->frame_control = IEEE80211_FC(IEEE80211_FTYPE_MGMT,
 
53
                                        IEEE80211_STYPE_ACTION);
 
54
 
 
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));
 
58
 
 
59
        mgmt->u.action.category = WLAN_CATEGORY_BACK;
 
60
        mgmt->u.action.u.addba_req.action_code = WLAN_ACTION_ADDBA_REQ;
 
61
@@ -2853,8 +2857,9 @@
 
62
        struct ieee80211_mgmt *mgmt;
 
63
        u16 params=0;
 
64
 
 
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));
 
70
 
 
71
        if (!skb) {
 
72
                printk(KERN_ERR "%s: failed to allocate buffer "
 
73
@@ -2873,7 +2878,8 @@
 
74
                memcpy(mgmt->bssid, ifsta->bssid, ETH_ALEN);
 
75
        mgmt->frame_control = IEEE80211_FC(IEEE80211_FTYPE_MGMT,IEEE80211_STYPE_ACTION);
 
76
 
 
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));
 
80
 
 
81
        mgmt->u.action.category = WLAN_CATEGORY_BACK;
 
82
        mgmt->u.action.u.delba.action_code = WLAN_ACTION_DELBA;