diff options
author | Emmanuel Grumbach <emmanuel.grumbach@intel.com> | 2011-08-26 02:11:00 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2011-08-29 15:25:34 -0400 |
commit | a0eaad713f6fc1f63fe293ad6ce63cb01e05c03c (patch) | |
tree | 72dee57cdee0bfb9e796d6b12159b75eae17f5c7 /drivers/net/wireless/iwlwifi/iwl-trans.h | |
parent | 1f7b6172db86e9ab2b4cd794441bb2c40ab287fc (diff) |
iwlagn: reclaim the packets in transport layer
The reclaim flow is really transport related. Define a simple API to allow the
upper layer to request from the transport layer to reclaim packets until an
index written in the Tx response / BA notification.
The transport layer prepares a list of the packets that are being freed and
passes this list to the upper layer.
Between the two layers, the CB of the skb is used to pass a pointer to the
context (BSS / PAN) in which the skb was sent.
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/iwlwifi/iwl-trans.h')
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-trans.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-trans.h b/drivers/net/wireless/iwlwifi/iwl-trans.h index b4c7166a70e3..519ad91bda1c 100644 --- a/drivers/net/wireless/iwlwifi/iwl-trans.h +++ b/drivers/net/wireless/iwlwifi/iwl-trans.h | |||
@@ -90,6 +90,7 @@ struct iwl_shared; | |||
90 | * @send_cmd_pdu:send a host command: flags can be CMD_* | 90 | * @send_cmd_pdu:send a host command: flags can be CMD_* |
91 | * @get_tx_cmd: returns a pointer to a new Tx cmd for the upper layer use | 91 | * @get_tx_cmd: returns a pointer to a new Tx cmd for the upper layer use |
92 | * @tx: send an skb | 92 | * @tx: send an skb |
93 | * @reclaim: free packet until ssn. Returns a list of freed packets. | ||
93 | * @txq_agg_setup: setup a tx queue for AMPDU - will be called once the HW is | 94 | * @txq_agg_setup: setup a tx queue for AMPDU - will be called once the HW is |
94 | * ready and a successful ADDBA response has been received. | 95 | * ready and a successful ADDBA response has been received. |
95 | * @txq_agg_disable: de-configure a Tx queue to send AMPDUs | 96 | * @txq_agg_disable: de-configure a Tx queue to send AMPDUs |
@@ -123,6 +124,8 @@ struct iwl_trans_ops { | |||
123 | int (*tx)(struct iwl_priv *priv, struct sk_buff *skb, | 124 | int (*tx)(struct iwl_priv *priv, struct sk_buff *skb, |
124 | struct iwl_tx_cmd *tx_cmd, int txq_id, __le16 fc, bool ampdu, | 125 | struct iwl_tx_cmd *tx_cmd, int txq_id, __le16 fc, bool ampdu, |
125 | struct iwl_rxon_context *ctx); | 126 | struct iwl_rxon_context *ctx); |
127 | void (*reclaim)(struct iwl_trans *trans, int txq_id, int ssn, | ||
128 | u32 status, struct sk_buff_head *skbs); | ||
126 | 129 | ||
127 | int (*txq_agg_disable)(struct iwl_priv *priv, u16 txq_id, | 130 | int (*txq_agg_disable)(struct iwl_priv *priv, u16 txq_id, |
128 | u16 ssn_idx, u8 tx_fifo); | 131 | u16 ssn_idx, u8 tx_fifo); |
@@ -213,6 +216,13 @@ static inline int iwl_trans_tx(struct iwl_trans *trans, struct sk_buff *skb, | |||
213 | return trans->ops->tx(priv(trans), skb, tx_cmd, txq_id, fc, ampdu, ctx); | 216 | return trans->ops->tx(priv(trans), skb, tx_cmd, txq_id, fc, ampdu, ctx); |
214 | } | 217 | } |
215 | 218 | ||
219 | static inline void iwl_trans_reclaim(struct iwl_trans *trans, int txq_id, | ||
220 | int ssn, u32 status, | ||
221 | struct sk_buff_head *skbs) | ||
222 | { | ||
223 | trans->ops->reclaim(trans, txq_id, ssn, status, skbs); | ||
224 | } | ||
225 | |||
216 | static inline int iwl_trans_txq_agg_disable(struct iwl_trans *trans, u16 txq_id, | 226 | static inline int iwl_trans_txq_agg_disable(struct iwl_trans *trans, u16 txq_id, |
217 | u16 ssn_idx, u8 tx_fifo) | 227 | u16 ssn_idx, u8 tx_fifo) |
218 | { | 228 | { |