~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/0019-mac80211-HT-fix-ieee80211_send_addba_resp-interfa.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
From 26c1abde043c8186b483fd29715d2a03e864ac4e Mon Sep 17 00:00:00 2001
 
2
From: Tomas Winkler <tomas.winkler@intel.com>
 
3
Date: Sat, 30 Jun 2007 08:42:00 +0800
 
4
Subject: [PATCH] mac80211: [HT] fix ieee80211_send_addba_resp interface
 
5
 
 
6
Fix ieee80211_send_addba_resp interface to support dialog_token,
 
7
policy, buffer size and timeout.
 
8
 
 
9
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
 
10
Signed-off-by: Zhu Yi <yi.zhu@intel.com>
 
11
---
 
12
 net/mac80211/ieee80211_sta.c |   24 +++++++++++++-----------
 
13
 1 files changed, 13 insertions(+), 11 deletions(-)
 
14
 
 
15
diff --git a/net/mac80211/ieee80211_sta.c b/net/mac80211/ieee80211_sta.c
 
16
index a13d665..e84bbad 100644
 
17
--- a/net/mac80211/ieee80211_sta.c
 
18
+++ b/net/mac80211/ieee80211_sta.c
 
19
@@ -2503,16 +2503,16 @@ static void ieee80211_rx_mgmt_probe_req(struct net_device *dev,
 
20
        ieee80211_sta_tx(dev, skb, 0);
 
21
 }
 
22
 
 
23
-static void ieee80211_send_addba_resp(struct net_device *dev,
 
24
-                                     struct ieee80211_mgmt *mgmt_src,
 
25
-                                     size_t len,
 
26
-                                     u16 status)
 
27
+void ieee80211_send_addba_resp(struct net_device *dev, u8 *da, u16 tid,
 
28
+                                       u8 dialog_token, u16 status, u16 policy,
 
29
+                                       u16 buf_size,u16 timeout)
 
30
 {
 
31
        struct ieee80211_sub_if_data *sdata = IEEE80211_DEV_TO_SUB_IF(dev);
 
32
        struct ieee80211_if_sta *ifsta = &sdata->u.sta;
 
33
        struct ieee80211_local *local = wdev_priv(dev->ieee80211_ptr);
 
34
        struct sk_buff *skb;
 
35
        struct ieee80211_mgmt *mgmt;
 
36
+       u16 capab=0;
 
37
 
 
38
        skb = dev_alloc_skb(sizeof(*mgmt) + local->hw.extra_tx_headroom);
 
39
        if (!skb) {
 
40
@@ -2524,7 +2524,7 @@ static void ieee80211_send_addba_resp(struct net_device *dev,
 
41
        skb_reserve(skb, local->hw.extra_tx_headroom);
 
42
        mgmt = (struct ieee80211_mgmt *) skb_put(skb, 24);
 
43
        memset(mgmt, 0, 24);
 
44
-       memcpy(mgmt->da, ifsta->bssid, ETH_ALEN);
 
45
+       memcpy(mgmt->da, da, ETH_ALEN);
 
46
        memcpy(mgmt->sa, dev->dev_addr, ETH_ALEN);
 
47
        memcpy(mgmt->bssid, ifsta->bssid, ETH_ALEN);
 
48
        mgmt->frame_control = IEEE80211_FC(IEEE80211_FTYPE_MGMT,
 
49
@@ -2533,12 +2533,14 @@ static void ieee80211_send_addba_resp(struct net_device *dev,
 
50
        skb_put(skb, 1 + sizeof(mgmt->u.action.u.addba_resp));
 
51
        mgmt->u.action.category = WLAN_CATEGORY_BACK;
 
52
        mgmt->u.action.u.addba_resp.action_code = WLAN_ACTION_ADDBA_RESP;
 
53
-       mgmt->u.action.u.addba_resp.dialog_token =
 
54
-               mgmt_src->u.action.u.addba_req.dialog_token;
 
55
-       mgmt->u.action.u.addba_resp.capab =
 
56
-               mgmt_src->u.action.u.addba_req.capab;
 
57
-       mgmt->u.action.u.addba_resp.timeout =
 
58
-               mgmt_src->u.action.u.addba_req.timeout;
 
59
+       mgmt->u.action.u.addba_resp.dialog_token = dialog_token;
 
60
+
 
61
+       capab |= (u16)(policy << 1);            /* bit 1 aggregation policy (1 - immediate 0 - delayed )*/
 
62
+       capab |= (u16)(tid << 2);                       /* bit 5:2 TID number */
 
63
+       capab |= (u16)(buf_size << 6);          /* bit 15:6 max size of aggergation */
 
64
+
 
65
+       mgmt->u.action.u.addba_resp.capab = cpu_to_le16(capab);
 
66
+       mgmt->u.action.u.addba_resp.timeout = cpu_to_le16(timeout);
 
67
        mgmt->u.action.u.addba_resp.status = cpu_to_le16(status);
 
68
 
 
69
        ieee80211_sta_tx(dev, skb, 0);
 
70
-- 
 
71
1.5.2
 
72