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

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
From fc5dcdadd03063981268f4df8ef7ffd9519e25f9 Mon Sep 17 00:00:00 2001
From: Ron Rindjunsky <ron.rindjunsky@intel.com>
Date: Sat, 30 Jun 2007 05:03:11 +0800
Subject: [PATCH] mac80211: [HT] add IEEE 802.11n TX_AMPDU API

This patch add TX AMPDU api

Signed-of-by: Ron Rindjunsky <ron.rindjunsky@intel.com>
Signed-of-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-of-by: Zhu Yi <yi.zhu@intel.com>
---
 include/net/mac80211.h |   64 +++++++++++++++++++++++++++++++++++++----------
 1 files changed, 50 insertions(+), 14 deletions(-)

diff --git a/include/net/mac80211.h b/include/net/mac80211.h
index e5be8d3..99d27ec 100644
--- a/include/net/mac80211.h
+++ b/include/net/mac80211.h
@@ -718,36 +718,46 @@ struct ieee80211_ops {
 	 * Must be atomic. */
 	u64 (*get_tsf)(struct ieee80211_hw *hw);
 
-	/* Call low level driver with 11n Block Ack action */
-	int (*handle_ba_action)(struct ieee80211_hw *hw,
-				struct ieee80211_mgmt *mgmt);
-
 	/* Reset the TSF timer and allow firmware/hardware to synchronize with
 	 * other STAs in the IBSS. This is only used in IBSS mode. This
 	 * function is optional if the firmware/hardware takes full care of
 	 * TSF synchronization. */
 	void (*reset_tsf)(struct ieee80211_hw *hw);
 
-	/* Configure ht parameters. */
-	int (*conf_ht)(struct ieee80211_hw *hw,
-		       struct ieee80211_ht_capability *ht_cap_param,
-		       struct ieee80211_ht_additional_info *ht_extra_param);
-
-	/* Get ht capabilities from the device */
-	void (*get_ht_capab)(struct ieee80211_hw *hw,
-			     struct ieee80211_ht_capability *ht_cap_param);
-
 	/* Setup beacon data for IBSS beacons. Unlike access point (Master),
 	 * IBSS uses a fixed beacon frame which is configured using this
 	 * function. This handler is required only for IBSS mode. */
 	int (*beacon_update)(struct ieee80211_hw *hw,
-			     struct sk_buff *skb,
+				struct sk_buff *skb,
 			     struct ieee80211_tx_control *control);
 
 	/* Determine whether the last IBSS beacon was sent by us. This is
 	 * needed only for IBSS mode and the result of this function is used to
 	 * determine whether to reply to Probe Requests. */
 	int (*tx_last_beacon)(struct ieee80211_hw *hw);
+
+	/* Configure ht parameters. */
+	int (*conf_ht)(struct ieee80211_hw *hw,
+			struct ieee80211_ht_capability *ht_cap_param,
+			struct ieee80211_ht_additional_info *ht_extra_param);
+
+	/* Get ht capabilities from the device */
+	void (*get_ht_capab)(struct ieee80211_hw *hw,
+				struct ieee80211_ht_capability *ht_cap_param);
+
+
+	/* move to Tx aggregation for a certain DA/TID.
+	 * return the starting frame's sequence number in start_seq_nums.
+	 * If aggregation can not be started on a certain TID return error,
+	 * else return success */
+	int (*ht_tx_agg_start)(struct ieee80211_hw *hw, u8 *da, u16 tid, u16 *start_seq_num);
+
+	/* stop Tx aggregation for a certain DA/TID.
+	 * If aggregation can not be stopped on a certain TID return error,
+	 * else return success. generator field gives the HW an indication who
+	 * requests to stop the aggregation - recipient (0) or initiator (1)
+	 */
+	int (*ht_tx_agg_stop)(struct ieee80211_hw *hw, u8 *da, u16 tid, int generator);
 };
 
 /* Allocate a new hardware device. This must be called once for each
@@ -1000,6 +1010,32 @@ void ieee80211_stop_queues(struct ieee80211_hw *hw);
 void ieee80211_wake_queues(struct ieee80211_hw *hw);
 
 /**
+ * ieee80211_start_BA_session - low level driver asks to start a BA session
+ * @hw: pointer as obtained from ieee80211_alloc_hw().
+ * @da: destination address of the BA session recipient
+ * @tid: the desired TID to BA on.
+ * @return: error if no sta with matching da found, success otherwise
+ *
+ * although the low level driver can estimate the need to start aggregation on a
+ * certain DA/TID, the session itself should be managed by the stack. this function
+ * should be called by low level driver to start the BA session
+ */
+int ieee80211_start_BA_session(struct ieee80211_hw *hw, u8 *da, u16 tid);
+
+/**
+ * ieee80211_stop_BA_session - low level driver asks to stop a BA session
+ * @hw: pointer as obtained from ieee80211_alloc_hw().
+ * @da: destination address of the BA session recipient
+ * @tid: the desired TID to stop BA.
+ * @return: error if no sta with matching da found, success otherwise
+ *
+ * although the low level driver can estimate the need to stop aggregation on a
+ * certain DA/TSID, the session itself should be managed by the stack. this function
+ * should be called by low level driver to stop the BA session
+ */
+int ieee80211_stop_BA_session(struct ieee80211_hw *hw, u8 *da, u16 tid);
+
+/**
  * ieee80211_get_mc_list_item - iteration over items in multicast list
  * @hw: pointer as obtained from ieee80211_alloc_hw().
  * @prev: value returned by previous call to ieee80211_get_mc_list_item() or
-- 
1.5.2