feat: intel wi-fi (AX211) driver with network scanning
This commit is contained in:
@@ -596,6 +596,27 @@ namespace montauk {
|
||||
return (int)syscall1(montauk::abi::SYS_BTINFO, (uint64_t)buf);
|
||||
}
|
||||
|
||||
// Wi-Fi. scan() runs a full channel sweep and blocks until it finishes or
|
||||
// timeoutMs elapses, then fills buf with the networks seen; it returns the
|
||||
// number of entries written, or -1 when no adapter is ready.
|
||||
inline int wifi_scan(montauk::abi::WifiNetwork* buf, int maxCount,
|
||||
uint32_t timeoutMs) {
|
||||
return (int)syscall3(montauk::abi::SYS_WIFI_SCAN, (uint64_t)buf,
|
||||
(uint64_t)maxCount, (uint64_t)timeoutMs);
|
||||
}
|
||||
inline int wifi_info(montauk::abi::WifiInfo* out) {
|
||||
return (int)syscall1(montauk::abi::SYS_WIFI_INFO, (uint64_t)out);
|
||||
}
|
||||
// Association is groundwork only: open networks bring the firmware
|
||||
// contexts up, encrypted ones are rejected with -2.
|
||||
inline int wifi_connect(const char* ssid, const char* password) {
|
||||
return (int)syscall2(montauk::abi::SYS_WIFI_CONNECT, (uint64_t)ssid,
|
||||
(uint64_t)password);
|
||||
}
|
||||
inline int wifi_disconnect() {
|
||||
return (int)syscall0(montauk::abi::SYS_WIFI_DISCONNECT);
|
||||
}
|
||||
|
||||
// Software-defined radio (Rx). Receivers are identified by index [0, count);
|
||||
// open() returns a handle used by the rest of the calls. Samples are read
|
||||
// as interleaved 8-bit unsigned I/Q (CU8) from the device's ring buffer.
|
||||
|
||||
Reference in New Issue
Block a user