-/**
- * @brief Simple callback that copies response back into command
- *
- * @param priv A pointer to struct lbs_private structure
- * @param extra A pointer to the original command structure for which
- * 'resp' is a response
- * @param resp A pointer to the command response
- *
- * @return 0 on success, error on failure
- */
-int lbs_cmd_copyback(struct lbs_private *priv, unsigned long extra,
- struct cmd_header *resp)
-{
- struct cmd_header *buf = (void *)extra;
- uint16_t copy_len;
-
- lbs_deb_enter(LBS_DEB_CMD);
-
- copy_len = min(le16_to_cpu(buf->size), le16_to_cpu(resp->size));
- lbs_deb_cmd("Copying back %u bytes; command response was %u bytes, "
- "copy back buffer was %u bytes\n", copy_len,
- le16_to_cpu(resp->size), le16_to_cpu(buf->size));
- memcpy(buf, resp, copy_len);
-
- lbs_deb_leave(LBS_DEB_CMD);
- return 0;
-}
-
-/**
- * @brief Simple way to call firmware functions
- *
- * @param priv A pointer to struct lbs_private structure
- * @param psmode one of the many CMD_802_11_xxxx
- * @param cmd pointer to the parameters structure for above command
- * (this should not include the command, size, sequence
- * and result fields from struct cmd_ds_gen)
- * @param cmd_size size structure pointed to by cmd
- * @param rsp pointer to an area where the result should be placed
- * @param rsp_size pointer to the size of the rsp area. If the firmware
- * returns fewer bytes, then this *rsp_size will be
- * changed to the actual size.
- * @return -1 in case of a higher level error, otherwise
- * the result code from the firmware
- */
-int __lbs_cmd(struct lbs_private *priv, uint16_t command,
- struct cmd_header *in_cmd, int in_cmd_size,
- int (*callback)(struct lbs_private *, unsigned long, struct cmd_header *),
- unsigned long callback_arg)
+static struct cmd_ctrl_node *__lbs_cmd_async(struct lbs_private *priv,
+ uint16_t command, struct cmd_header *in_cmd, int in_cmd_size,
+ int (*callback)(struct lbs_private *, unsigned long, struct cmd_header *),
+ unsigned long callback_arg)