STRUCT BRCMF_BUS_OPS(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… struct brcmf_bus_ops(9) β€” bus callback operations ✨

okay so bestie, welcome to the Kernel API Manual, section 9 β€” this is the page for struct brcmf_bus_ops, and it's genuinely iconic, like the little contract every bus driver signs to talk to the brcmfmac common driver 🫢


🌸 SYNOPSIS 🌸

struct brcmf_bus_ops {
    int (*preinit)(struct device *dev);
    void (*stop)(struct device *dev);
    int (*txdata)(struct device *dev, struct sk_buff *skb);
    int (*txctl)(struct device *dev, unsigned char *msg, uint len);
    int (*rxctl)(struct device *dev, unsigned char *msg, uint len);
    struct pktq * (*gettxq)(struct device *dev);
    void (*wowl_config)(struct device *dev, bool enabled);
    size_t (*get_ramsize)(struct device *dev);
    int (*get_memdump)(struct device *dev, void *data, size_t len);
    int (*get_blob)(struct device *dev, const struct firmware **fw, enum
brcmf_blob_type type);
    void (*debugfs_create)(struct device *dev);
    int (*reset)(struct device *dev);
    void (*remove)(struct device *dev);
 };
no cap, that's the whole shape of it β€” every function pointer, every type, copied character for character 😌

πŸŽ€ Members πŸŽ€

  • preinit β€” runs the bus/device specific dongle init commands. it's optional, so you're not obligated, bestie πŸ’…
  • stop β€” clears out pending frames and disables data flow. like closing the group chat for the night πŸ¦‹
  • txdata β€” sends a data frame to the dongle. and listen: once the data has actually been transferred, the common driver must be notified using brcmf_txcomplete. also the common driver calls this function with interrupts disabled, so no funny business ⚠️
  • txctl β€” transmits a control request message to dongle πŸ“¨
  • rxctl β€” receives a control response message from dongle πŸ“¬
  • gettxq β€” grabs a reference to the bus transmit queue. optional, lowkey the chill one 🌸
  • wowl_config β€” specifies whether the dongle is configured for wowl when going to suspend 😴
  • get_ramsize β€” obtains the size of the device memory 🧠
  • get_memdump β€” obtains a device memory dump into the buffer you provide πŸ—‚οΈ
  • get_blob β€” obtains a firmware blob ✨
  • debugfs_create β€” (listed as a member, no description given on this page πŸ™ˆ)
  • reset β€” (listed as a member, no description given on this page πŸ™ˆ)
  • remove β€” initiates unbind of the device πŸ‘‹

πŸ’– Description πŸ’–

so this structure is basically the abstract interface towards the bus specific driver β€” the vibe check layer between the two 🧚

for control messages to the common driver, it will assure there is only one active transaction at a time. one. at. a. time. periodt πŸ‘‘

and unless it says otherwise up above (looking at you, preinit and gettxq), these callbacks are mandatory. fr fr, not optional πŸ’€


⭐ SEE ALSO ⭐

  • Kernel file ./drivers/net/wireless/broadcom/brcm80211/brcmfmac/bus.h
  • struct brcmf_bus_msgbuf(9), struct brcmf_bus_stats(9), struct brcmf_bus(9)

and that's the page, bestie πŸŽ€ this lil gem came out of the kernel source at ./drivers/net/wireless/broadco..., dated October 2026, and it's filed under struct brcmf_bus_ops(9) β€” go forth and slay your bus callbacks πŸ’œβœ¨

πŸ“¦ where this page comes from