int iwl_send_cmd(struct iwl_priv *priv, struct iwl_host_cmd *cmd)
{
	if (cmd->flags & CMD_ASYNC)
		return iwl_send_cmd_async(priv, cmd);

	return iwl_send_cmd_sync(priv, cmd);
}
int iwl_trans_pcie_send_cmd(struct iwl_trans *trans, struct iwl_host_cmd *cmd)
{
	if (cmd->flags & CMD_ASYNC)
		return iwl_send_cmd_async(trans, cmd);

	return iwl_send_cmd_sync(trans, cmd);
}
Exemple #3
0
int iwl_send_cmd_pdu_async(struct iwl_priv *priv,
			   u8 id, u16 len, const void *data,
			   int (*callback)(struct iwl_priv *priv,
					   struct iwl_cmd *cmd,
					   struct sk_buff *skb))
{
	struct iwl_host_cmd cmd = {
		.id = id,
		.len = len,
		.data = data,
	};

	cmd.meta.flags |= CMD_ASYNC;
	cmd.meta.u.callback = callback;

	return iwl_send_cmd_async(priv, &cmd);
}
Exemple #4
0
int iwl_send_cmd_pdu_async(struct iwl_priv *priv,
                           u8 id, u16 len, const void *data,
                           void (*callback)(struct iwl_priv *priv,
                                   struct iwl_device_cmd *cmd,
                                   struct iwl_rx_packet *pkt))
{
    struct iwl_host_cmd cmd = {
        .id = id,
        .len = len,
        .data = data,
    };

    cmd.flags |= CMD_ASYNC;
    cmd.callback = callback;

    return iwl_send_cmd_async(priv, &cmd);
}