iwlwifi: trans: support a callback for ASYNC commands
This allows the op_mode to request from the transport to call a callback when an ASYNC commands is completed by the firmware. The same callback will be called for all the commands. Pass the command whose response triggers the callback as a parameter to the callback itself. Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
This commit is contained in:
@@ -1593,10 +1593,6 @@ static int iwl_pcie_enqueue_hcmd(struct iwl_trans *trans,
|
||||
/*
|
||||
* iwl_pcie_hcmd_complete - Pull unused buffers off the queue and reclaim them
|
||||
* @rxb: Rx buffer to reclaim
|
||||
*
|
||||
* If an Rx buffer has an async callback associated with it the callback
|
||||
* will be executed. The attached skb (if present) will only be freed
|
||||
* if the callback returns 1
|
||||
*/
|
||||
void iwl_pcie_hcmd_complete(struct iwl_trans *trans,
|
||||
struct iwl_rx_cmd_buffer *rxb)
|
||||
@@ -1640,6 +1636,9 @@ void iwl_pcie_hcmd_complete(struct iwl_trans *trans,
|
||||
meta->source->_rx_page_order = trans_pcie->rx_page_order;
|
||||
}
|
||||
|
||||
if (meta->flags & CMD_WANT_ASYNC_CALLBACK)
|
||||
iwl_op_mode_async_cb(trans->op_mode, cmd);
|
||||
|
||||
iwl_pcie_cmdq_reclaim(trans, txq_id, index);
|
||||
|
||||
if (!(meta->flags & CMD_ASYNC)) {
|
||||
|
Viittaa uudesa ongelmassa
Block a user