David Kilroy | 712a434 | 2009-02-04 23:05:55 +0000 | [diff] [blame] | 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 | |
| 8 | #include <linux/types.h> |
| 9 | #include <linux/wireless.h> |
David Kilroy | c63cdbe | 2009-06-18 23:21:33 +0100 | [diff] [blame] | 10 | #include <net/cfg80211.h> |
David Kilroy | 712a434 | 2009-02-04 23:05:55 +0000 | [diff] [blame] | 11 | |
| 12 | /* Hardware BAPs */ |
| 13 | #define USER_BAP 0 |
| 14 | #define IRQ_BAP 1 |
| 15 | |
| 16 | /* WEP key sizes */ |
| 17 | #define SMALL_KEY_SIZE 5 |
| 18 | #define LARGE_KEY_SIZE 13 |
| 19 | |
| 20 | /* Number of supported channels */ |
| 21 | #define NUM_CHANNELS 14 |
| 22 | |
| 23 | /* Forward declarations */ |
| 24 | struct orinoco_private; |
| 25 | struct dev_addr_list; |
| 26 | |
David Kilroy | 3414fc3 | 2009-10-07 22:23:32 +0100 | [diff] [blame] | 27 | int determine_fw_capabilities(struct orinoco_private *priv, char *fw_name, |
| 28 | size_t fw_name_len, u32 *hw_ver); |
David Kilroy | e9e3d01 | 2009-06-18 23:21:19 +0100 | [diff] [blame] | 29 | int orinoco_hw_read_card_settings(struct orinoco_private *priv, u8 *dev_addr); |
David Kilroy | 42a51b9 | 2009-06-18 23:21:20 +0100 | [diff] [blame] | 30 | int orinoco_hw_allocate_fid(struct orinoco_private *priv); |
David Kilroy | 712a434 | 2009-02-04 23:05:55 +0000 | [diff] [blame] | 31 | int orinoco_get_bitratemode(int bitrate, int automatic); |
| 32 | void orinoco_get_ratemode_cfg(int ratemode, int *bitrate, int *automatic); |
| 33 | |
David Kilroy | 721aa2f | 2009-06-18 23:21:31 +0100 | [diff] [blame] | 34 | int orinoco_hw_program_rids(struct orinoco_private *priv); |
David Kilroy | 712a434 | 2009-02-04 23:05:55 +0000 | [diff] [blame] | 35 | int orinoco_hw_get_tkip_iv(struct orinoco_private *priv, int key, u8 *tsc); |
| 36 | int __orinoco_hw_set_bitrate(struct orinoco_private *priv); |
| 37 | int orinoco_hw_get_act_bitrate(struct orinoco_private *priv, int *bitrate); |
| 38 | int __orinoco_hw_set_wap(struct orinoco_private *priv); |
| 39 | int __orinoco_hw_setup_wepkeys(struct orinoco_private *priv); |
| 40 | int __orinoco_hw_setup_enc(struct orinoco_private *priv); |
David Kilroy | 98e5f40 | 2009-06-18 23:21:25 +0100 | [diff] [blame] | 41 | int __orinoco_hw_set_tkip_key(struct orinoco_private *priv, int key_idx, |
David Kilroy | 16e1584 | 2009-08-05 21:23:29 +0100 | [diff] [blame] | 42 | int set_tx, u8 *key, u8 *rsc, size_t rsc_len, |
| 43 | u8 *tsc, size_t tsc_len); |
David Kilroy | 712a434 | 2009-02-04 23:05:55 +0000 | [diff] [blame] | 44 | int orinoco_clear_tkip_key(struct orinoco_private *priv, int key_idx); |
| 45 | int __orinoco_hw_set_multicast_list(struct orinoco_private *priv, |
Jiri Pirko | 655ffee | 2010-02-27 07:35:45 +0000 | [diff] [blame^] | 46 | struct net_device *dev, |
David Kilroy | 712a434 | 2009-02-04 23:05:55 +0000 | [diff] [blame] | 47 | int mc_count, int promisc); |
| 48 | int orinoco_hw_get_essid(struct orinoco_private *priv, int *active, |
| 49 | char buf[IW_ESSID_MAX_SIZE+1]); |
| 50 | int orinoco_hw_get_freq(struct orinoco_private *priv); |
| 51 | int orinoco_hw_get_bitratelist(struct orinoco_private *priv, |
| 52 | int *numrates, s32 *rates, int max); |
David Kilroy | c63cdbe | 2009-06-18 23:21:33 +0100 | [diff] [blame] | 53 | int orinoco_hw_trigger_scan(struct orinoco_private *priv, |
| 54 | const struct cfg80211_ssid *ssid); |
David Kilroy | 07542d0 | 2009-08-05 21:23:30 +0100 | [diff] [blame] | 55 | int orinoco_hw_disassociate(struct orinoco_private *priv, |
| 56 | u8 *addr, u16 reason_code); |
David Kilroy | 2b26035 | 2009-08-05 21:23:31 +0100 | [diff] [blame] | 57 | int orinoco_hw_get_current_bssid(struct orinoco_private *priv, |
| 58 | u8 *addr); |
David Kilroy | 712a434 | 2009-02-04 23:05:55 +0000 | [diff] [blame] | 59 | |
| 60 | #endif /* _ORINOCO_HW_H_ */ |