prepare_api_cmd(9)
π prepare_api_cmd(9) β Kernel API Manual π
okay so bestie, welcome to the hinic girlies' corner of the kernel tree. this one lives in the Kernel API Manual and it's called prepare_api_cmd β yes, the title is the function name, we're keeping it cute and simple β¨
πΈ NAME πΈ
prepare_api_cmd β literally just here to prepare API CMD command. that's the whole job. she prepares. she does not execute, she does not clean up, she gets the command ready and hands it off. main character energy but make it a helper function π
β¨ SYNOPSIS β¨
void prepare_api_cmd (struct hinic_api_cmd_chain *chain , enum
hinic_node_id dest , void *cmd , u16 cmd_size );
returns void, so no sneaky return value to check β she's a fire-and-forget kind of icon π«Ά
π¦ ARGUMENTS π¦
chainβ the chain for the command. this is thestruct hinic_api_cmd_chain *, the whole lil command pipeline she's working inside. everything happens in here, no cap.destβ the destination node on the card that will receive the command. type isenum hinic_node_id, so it's one of the card's known node IDs, not just any random number you vibe your way into πcmdβ the command data itself. avoid *, so it's raw bytes as far as this signature is concerned.cmd_sizeβ the command size, as au16. keep it honest, bestie, this is how much ofcmdactually matters π
lowkey the important thing here:destis anenum hinic_node_id, andcmd_sizeis au16. those aren't optional details, they're the whole type-check vibe check β
π SEE ALSO π
the whole friend group, fr fr β and the source file she actually lives in:
- Kernel file
./drivers/net/ethernet/huawei/hinic/hinic_hw_api_cmd.c chain_busy(9)get_cell_data_size(9)prepare_cell_ctrl(9)prepare_cell(9)api_cmd_status_update(9)wait_for_status_poll(9)wait_for_api_cmd_completion(9)api_cmd(9)hinic_api_cmd_write(9)api_cmd_hw_restart(9)api_cmd_ctrl_init(9)api_cmd_set_status_addr(9)api_cmd_set_num_cells(9)api_cmd_head_init(9)api_cmd_chain_hw_clean(9)api_cmd_chain_hw_init(9)free_cmd_buf(9)alloc_cmd_buf(9)api_cmd_create_cell(9)api_cmd_destroy_cell(9)api_cmd_destroy_cells(9)api_cmd_create_cells(9)api_chain_init(9)api_chain_free(9)api_cmd_create_chain(9)api_cmd_destroy_chain(9)hinic_api_cmd_init(9)hinic_api_cmd_free(9)
that's the full roster, iykyk π§ all twenty-eight of them, no skips, we don't do skips here π
aaand that's the whole page, bestie!! π this lil cutie comes to you straight from ./drivers/net/ethernet/huawei/... (that's the truncated path in the footer, don't come for me, that's what the manpage says π) and the date on the tin is October 2026 β go forth and prepare those API CMDs, you absolute legend πππ
π¦ where this page comes from
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms