brcmf_p2p_generate_bss_mac(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… brcmf_p2p_generate_bss_mac(9) πŸ’…

okay so bestie, welcome to the Kernel API Manual β€” this is the page for brcmf_p2p_generate_bss_mac, and honestly? it's a little legend. it makes mac addresses appear out of thin air for P2P. witchcraft? maybe. iconic? absolutely. 🧚✨


✨ NAME ✨

brcmf_p2p_generate_bss_mac β€” derive mac addresses for P2P.

like... it conjures them. no cap. πŸŽ€


πŸ¦‹ SYNOPSIS πŸ¦‹

void brcmf_p2p_generate_bss_mac (struct brcmf_p2p_info *p2p , u8
*dev_addr );

no return value, it just does the thing and leaves. main character energy fr fr. πŸ’…


🌸 ARGUMENTS 🌸

  • p2p β€” the P2P specific data. this is the whole vibe container, it holds everything P2P needs to know about itself 🫢
  • dev_addr β€” an optional device address. optional!! so if you don't have one, don't stress, the function has a backup plan (spoiler: it's random, see below πŸ‘€)

πŸ’– DESCRIPTION πŸ’–

so here's the tea: P2P needs mac addresses for the P2P device and for the interface. two addresses, one function, very efficient of it honestly.

but the important bit β€” the part where you go "oh 😭" β€” is this: if no device address is specified, those mac addresses get derived from a random ethernet address. literally generated from scratch. from the void. from vibes.

so dev_addr being NULL/unspecified isn't a bug, bestie, it's a feature. the function just picks a random ethernet address and builds the P2P device and interface macs from it. slay. πŸ”₯

ngl there's no error return here β€” it's a void function, so you don't get a little "hey, that worked!" back. you just trust it. 🫢

πŸ‘‘ SEE ALSO πŸ‘‘

if you're the kind of person who reads the whole wiki instead of just the one page (respect), here's the full squad. 🐝

the kernel file lives at ./drivers/net/wireless/broadcom/brcm80211/brcmfmac/p2p.c β€” that's the mothership, go say hi.

structs & enums first, because they're the building blocks:

  • struct brcmf_p2p_disc_st_le(9)
  • enum brcmf_p2p_disc_state(9)
  • struct brcmf_p2p_scan_le(9)
  • struct brcmf_p2p_pub_act_frame(9)
  • struct brcmf_p2p_action_frame(9)
  • struct brcmf_p2psd_gas_pub_act_frame(9)
  • struct brcmf_config_af_params(9)

then the functions, in the order the manual gives them, no skipping, no merging, we don't do that here:

that's the whole group chat, all present and accounted for πŸ’œ


πŸŽ€ sign-off πŸŽ€

okay that's the page!! sourced from ./drivers/net/wireless/broadco... (yes it's truncated in the footer, that's just how the manual prints it, don't come for me πŸ™ˆ), October 2026, and it's all brcmf_p2p_generate_bss_mac(9) flavored. go forth and let the kernel make you a random mac address. you're gonna eat. periodt. πŸ’…βœ¨πŸŒˆ

πŸ“¦ where this page comes from