rt2x00usb_v...request_buff(9)
π rt2x00usb_vendor_request_buff β Kernel API Manual β¨
okay so bestie, you're looking at the <cyan>rt2x00usb_vendor_request_buff(9)</cyan> page from the Kernel API Manual. it's giving "kernel driver internals" and honestly? kind of iconic. let's get into it π«Ά
πΈ NAME πΈ
rt2x00usb_vendor_request_buff β send a register command to the device, but make it buffered β¨
π SYNOPSIS π
int rt2x00usb_vendor_request_buff (struct rt2x00_dev *rt2x00dev , const
u8 request , const u8 requesttype , const u16 offset , void *buffer ,
const u16 buffer_length );
that's the whole signature, no cap. six things go in, one int comes out π«
π¦ ARGUMENTS π¦
rt2x00devβ pointer tostruct rt2x00_dev. that's your device bestie, the main character here πrequestβ the USB vendor command. (peepenum rt2x00usb_vendor_requestfor the whole menu, iykyk)requesttypeβ the request type, laid out asUSB_VENDOR_REQUEST_*offsetβ the register offset you're doing the action on πbufferβ the buffer where the device will read from / write to all the info πΎbuffer_lengthβ the size of that buffer, fr fr, don't get it wrong
π DESCRIPTION π
so here's the vibe: this function uses a cache that was previously allocated with kmalloc to talk to the device. no fresh allocation drama mid-request, we're reusing β¨
the contents of the buffer pointer get copied into that cache when you're writing, or read back out of the cache when you're reading. simple as that, periodt.
β οΈ big important warning, bestie, do not skip this: buffers sent tort2x00usb_vendor_requestmust be allocated withkmalloc. like, must must. that's literally the entire reason this function uses a previously-allocated cache β because that cache was allocated properly. no stack buffers, no vibes-based allocation, okay? ππ
β SEE ALSO β
kernel file ./drivers/net/wireless/ralink/rt2x00/rt2x00usb.h, plus the whole friend group:
enum rt2x00usb_vendor_request(9)enum rt2x00usb_mode_offset(9)rt2x00usb_vendor_request(9)rt2x00usb_vendor_request_sw(9)rt2x00usb_eeprom_read(9)rt2x00usb_register_read(9)rt2x00usb_register_read_lock(9)rt2x00usb_register_multiread(9)rt2x00usb_register_write(9)rt2x00usb_register_write_lock(9)rt2x00usb_register_multiwrite(9)rt2x00usb_regbusy_read(9)rt2x00usb_register_read_async(9)struct queue_entry_priv_usb(9)struct queue_entry_priv_usb_bcn(9)rt2x00usb_kick_queue(9)rt2x00usb_flush_queue(9)rt2x00usb_watchdog(9)
and that's the page!! π§ mwah π
shoutout to ./drivers/net/wireless/ralink/... for the source, the October 2026 date, and the rt2x00usb_v...request_buff(9) footer situation β we love a documented kernel function, obsessed actually ππ
π¦ 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