/* Firmware/driver-layer dispatch for wifi.c. Three backends share the * iwl_mvm.h call semantics: * - Intel 7000 family (7265D/3165, PCIe): iwl_mvm.c * - Intel 6000 family (6200/6300, PCIe): iwl_dvm.c * - Realtek RTL8821AU (USB stick): rtl8821au.c * The backend is chosen when the radio comes up: a plugged-in USB stick * wins over the built-in Intel card, otherwise the PCI probe decides * (iwl_is_dvm()). It stays fixed until wififw_down(). */ #ifndef WIFI_FW_H #define WIFI_FW_H /* Find a supported device without loading firmware: 0 = found. */ int wififw_probe(void); int wififw_present(void); const char *wififw_chip_name(void); const char *wififw_fw_name(void); /* "" while no firmware runs */ /* The device died (firmware assert, USB unplug): wifi.c reloads. */ int wififw_fatal(void); /* Pick the backend and bring it up (firmware + radio); fills the MAC. * On failure wififw_state() says why (SYS_WIFI_STATUS `detail`). */ int wififw_up(unsigned char mac[6]); void wififw_down(void); /* Stop every WiFi device's DMA before a kexec, used or not. */ void wififw_shutdown(void); const char *wififw_state(void); int wififw_poll(void); int wififw_scan_start(void); int wififw_scan_running(void); int wififw_prepare_connect(const unsigned char bssid[6], unsigned int chan, unsigned int beacon_int); int wififw_set_assoc(unsigned short aid, unsigned int beacon_int, unsigned int dtim); void wififw_disconnect(void); int wififw_tx_mgmt(const unsigned char *frame, unsigned int len); int wififw_tx_data(const unsigned char *frame, unsigned int len, int protect); int wififw_set_key(int pairwise, int keyidx, const unsigned char key[16], const unsigned char rsc[6]); void wififw_clear_keys(void); #endif