rtl8821au.h 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. /* Realtek RTL8821AU / RTL8811AU USB WiFi (802.11ac, 1x1), e.g. the TP-Link
  2. * Archer T2U Nano (2357:011f). A port of the Linux rtw88 8821A/USB bring-up
  3. * (rtw88xxa.c, rtw8821a.c, mac.c, usb.c) that plugs into wifi.c through the
  4. * wififw dispatch layer (wifi_fw.h); every call below has the iwl_mvm.h
  5. * semantics.
  6. *
  7. * The chip runs with its crypto engine off: wifi.c decrypts CCMP RX in
  8. * software (ccmp.c) and this driver encrypts CCMP TX itself, so the
  9. * firmware never sees a key. Scanning is a software channel hop driven by
  10. * rtl8821au_poll(); TX uses fixed legacy rates (no rate adaptation). */
  11. #ifndef RTL8821AU_H
  12. #define RTL8821AU_H
  13. /* Register the USB device probe (kernel.c, next to the ASIX/RNDIS ones). */
  14. void rtl8821au_register(void);
  15. int rtl8821au_present(void); /* a supported stick is attached */
  16. const char *rtl8821au_chip_name(void);
  17. const char *rtl8821au_fw_name(void); /* "" until the firmware runs */
  18. int rtl8821au_fatal(void); /* unplugged / USB errors: reload */
  19. int rtl8821au_up(unsigned char mac[6]);
  20. void rtl8821au_down(void);
  21. const char *rtl8821au_state(void);
  22. int rtl8821au_poll(void);
  23. int rtl8821au_scan_start(void);
  24. int rtl8821au_scan_running(void);
  25. int rtl8821au_prepare_connect(const unsigned char bssid[6],
  26. unsigned int chan, unsigned int beacon_int);
  27. int rtl8821au_set_assoc(unsigned short aid, unsigned int beacon_int,
  28. unsigned int dtim);
  29. void rtl8821au_disconnect(void);
  30. int rtl8821au_tx_mgmt(const unsigned char *frame, unsigned int len);
  31. int rtl8821au_tx_data(const unsigned char *frame, unsigned int len,
  32. int protect);
  33. int rtl8821au_set_key(int pairwise, int keyidx, const unsigned char key[16],
  34. const unsigned char rsc[6]);
  35. void rtl8821au_clear_keys(void);
  36. #endif