hw.h 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. /* Encapsulate basic setting changes on Hermes hardware
  2. *
  3. * See copyright notice in main.c
  4. */
  5. #ifndef _ORINOCO_HW_H_
  6. #define _ORINOCO_HW_H_
  7. #include <linux/types.h>
  8. #include <linux/wireless.h>
  9. #include <net/cfg80211.h>
  10. /* Hardware BAPs */
  11. #define USER_BAP 0
  12. #define IRQ_BAP 1
  13. /* WEP key sizes */
  14. #define SMALL_KEY_SIZE 5
  15. #define LARGE_KEY_SIZE 13
  16. /* Number of supported channels */
  17. #define NUM_CHANNELS 14
  18. /* Forward declarations */
  19. struct orinoco_private;
  20. struct dev_addr_list;
  21. int determine_fw_capabilities(struct orinoco_private *priv, char *fw_name,
  22. size_t fw_name_len, u32 *hw_ver);
  23. int orinoco_hw_read_card_settings(struct orinoco_private *priv, u8 *dev_addr);
  24. int orinoco_hw_allocate_fid(struct orinoco_private *priv);
  25. int orinoco_get_bitratemode(int bitrate, int automatic);
  26. void orinoco_get_ratemode_cfg(int ratemode, int *bitrate, int *automatic);
  27. int orinoco_hw_program_rids(struct orinoco_private *priv);
  28. int orinoco_hw_get_tkip_iv(struct orinoco_private *priv, int key, u8 *tsc);
  29. int __orinoco_hw_set_bitrate(struct orinoco_private *priv);
  30. int orinoco_hw_get_act_bitrate(struct orinoco_private *priv, int *bitrate);
  31. int __orinoco_hw_set_wap(struct orinoco_private *priv);
  32. int __orinoco_hw_setup_wepkeys(struct orinoco_private *priv);
  33. int __orinoco_hw_setup_enc(struct orinoco_private *priv);
  34. int __orinoco_hw_set_tkip_key(struct orinoco_private *priv, int key_idx,
  35. int set_tx, u8 *key, u8 *rsc, size_t rsc_len,
  36. u8 *tsc, size_t tsc_len);
  37. int orinoco_clear_tkip_key(struct orinoco_private *priv, int key_idx);
  38. int __orinoco_hw_set_multicast_list(struct orinoco_private *priv,
  39. struct dev_addr_list *mc_list,
  40. int mc_count, int promisc);
  41. int orinoco_hw_get_essid(struct orinoco_private *priv, int *active,
  42. char buf[IW_ESSID_MAX_SIZE+1]);
  43. int orinoco_hw_get_freq(struct orinoco_private *priv);
  44. int orinoco_hw_get_bitratelist(struct orinoco_private *priv,
  45. int *numrates, s32 *rates, int max);
  46. int orinoco_hw_trigger_scan(struct orinoco_private *priv,
  47. const struct cfg80211_ssid *ssid);
  48. int orinoco_hw_disassociate(struct orinoco_private *priv,
  49. u8 *addr, u16 reason_code);
  50. int orinoco_hw_get_current_bssid(struct orinoco_private *priv,
  51. u8 *addr);
  52. #endif /* _ORINOCO_HW_H_ */