hw.h 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  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. int determine_fw_capabilities(struct orinoco_private *priv, char *fw_name,
  21. size_t fw_name_len, u32 *hw_ver);
  22. int orinoco_hw_read_card_settings(struct orinoco_private *priv, u8 *dev_addr);
  23. int orinoco_hw_allocate_fid(struct orinoco_private *priv);
  24. int orinoco_get_bitratemode(int bitrate, int automatic);
  25. void orinoco_get_ratemode_cfg(int ratemode, int *bitrate, int *automatic);
  26. int orinoco_hw_program_rids(struct orinoco_private *priv);
  27. int orinoco_hw_get_tkip_iv(struct orinoco_private *priv, int key, u8 *tsc);
  28. int __orinoco_hw_set_bitrate(struct orinoco_private *priv);
  29. int orinoco_hw_get_act_bitrate(struct orinoco_private *priv, int *bitrate);
  30. int __orinoco_hw_set_wap(struct orinoco_private *priv);
  31. int __orinoco_hw_setup_wepkeys(struct orinoco_private *priv);
  32. int __orinoco_hw_setup_enc(struct orinoco_private *priv);
  33. int __orinoco_hw_set_tkip_key(struct orinoco_private *priv, int key_idx,
  34. int set_tx, const u8 *key, const u8 *rsc,
  35. size_t rsc_len, const u8 *tsc, size_t tsc_len);
  36. int orinoco_clear_tkip_key(struct orinoco_private *priv, int key_idx);
  37. int __orinoco_hw_set_multicast_list(struct orinoco_private *priv,
  38. struct net_device *dev,
  39. int mc_count, int promisc);
  40. int orinoco_hw_get_essid(struct orinoco_private *priv, int *active,
  41. char buf[IW_ESSID_MAX_SIZE + 1]);
  42. int orinoco_hw_get_freq(struct orinoco_private *priv);
  43. int orinoco_hw_get_bitratelist(struct orinoco_private *priv,
  44. int *numrates, s32 *rates, int max);
  45. int orinoco_hw_trigger_scan(struct orinoco_private *priv,
  46. const struct cfg80211_ssid *ssid);
  47. int orinoco_hw_disassociate(struct orinoco_private *priv,
  48. u8 *addr, u16 reason_code);
  49. int orinoco_hw_get_current_bssid(struct orinoco_private *priv,
  50. u8 *addr);
  51. #endif /* _ORINOCO_HW_H_ */