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); }
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); }
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); }