wifi_fw.h 1.7 KB

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