diff options
author | Emmanuel Grumbach <emmanuel.grumbach@intel.com> | 2011-08-25 23:11:00 -0700 |
---|---|---|
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) | |
download | blackbird-op-linux-a0eaad713f6fc1f63fe293ad6ce63cb01e05c03c.tar.gz blackbird-op-linux-a0eaad713f6fc1f63fe293ad6ce63cb01e05c03c.zip |
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; * @send_cmd_pdu:send a host command: flags can be CMD_* * @get_tx_cmd: returns a pointer to a new Tx cmd for the upper layer use * @tx: send an skb + * @reclaim: free packet until ssn. Returns a list of freed packets. * @txq_agg_setup: setup a tx queue for AMPDU - will be called once the HW is * ready and a successful ADDBA response has been received. * @txq_agg_disable: de-configure a Tx queue to send AMPDUs @@ -123,6 +124,8 @@ struct iwl_trans_ops { int (*tx)(struct iwl_priv *priv, struct sk_buff *skb, struct iwl_tx_cmd *tx_cmd, int txq_id, __le16 fc, bool ampdu, struct iwl_rxon_context *ctx); + void (*reclaim)(struct iwl_trans *trans, int txq_id, int ssn, + u32 status, struct sk_buff_head *skbs); int (*txq_agg_disable)(struct iwl_priv *priv, u16 txq_id, u16 ssn_idx, u8 tx_fifo); @@ -213,6 +216,13 @@ static inline int iwl_trans_tx(struct iwl_trans *trans, struct sk_buff *skb, return trans->ops->tx(priv(trans), skb, tx_cmd, txq_id, fc, ampdu, ctx); } +static inline void iwl_trans_reclaim(struct iwl_trans *trans, int txq_id, + int ssn, u32 status, + struct sk_buff_head *skbs) +{ + trans->ops->reclaim(trans, txq_id, ssn, status, skbs); +} + static inline int iwl_trans_txq_agg_disable(struct iwl_trans *trans, u16 txq_id, u16 ssn_idx, u8 tx_fifo) { |