STRUCT QMI_HANDLE(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

✨ struct qmi_handle(9) ✨

okay so bestie, picture this: it's struct qmi_handle(9), the QMI context πŸ’… β€” and this is from the Kernel API Manual, so you know it's giving main character energy. This lil struct is basically the whole vibe of a QMI client: its socket, its locks, its lists, its callbacks. no cap, it's a lot. let's get into it πŸŽ€


🌸 SYNOPSIS 🌸

here's the whole struct, bestie β€” copy it exactly, don't touch a character:

struct qmi_handle {
    struct socket *sock;
    struct mutex sock_lock;
    struct sockaddr_qrtr sq;
    struct work_struct work;
    struct workqueue_struct *wq;
    void *recv_buf;
    size_t recv_buf_size;
    struct list_head lookups;
    struct list_head lookup_results;
    struct list_head services;
    struct qmi_ops ops;
    struct idr txns;
    struct mutex txn_lock;
    const struct qmi_msg_handler *handlers;
 };

πŸ¦‹ Members πŸ¦‹

okay so here's the member-by-member vibe check, every single one of them ✨

  • sock β€” the socket handle 🫢
  • sock_lock β€” synchronization of sock modifications. don't be out here modifying sock without it, fr fr
  • sq β€” the sockaddr of sock
  • work β€” the work for handling incoming messages
  • wq β€” the workqueue to post work on
  • recv_buf β€” scratch buffer for handling incoming messages
  • recv_buf_size β€” size of recv_buf (yes bestie, it knows its own size πŸ’…)
  • lookups β€” list of registered lookup requests
  • lookup_results β€” list of lookup-results advertised to the client
  • services β€” list of registered services (by this client)
  • ops β€” reference to callbacks
  • txns β€” outstanding transactions
  • txn_lock β€” lock for modifications of txns πŸ”’
  • handlers β€” list of handlers for incoming messages

🌈 SEE ALSO 🌈

go read these too, icon behavior honestly πŸ‘‘

Kernel file ./include/linux/soc/qcom/qmi.h

  • struct qmi_header(9)
  • struct qmi_elem_info(9)
  • struct qmi_response_type_v01(9)
  • struct qmi_service(9)
  • struct qmi_ops(9)
  • struct qmi_txn(9)
  • struct qmi_msg_handler(9)

that's the whole tea, bestie πŸ“ this one's filed under ./include/linux/soc/qcom, dated October 2026, and it's living in the Kernel API Manual with the title struct qmi_handle(9) β€” periodt. go forth and QMI responsibly πŸ’–βœ¨

πŸ“¦ where this page comes from