blob: 8f6831f4e328a8b5761611a6c79965ccdfa372ac [file] [log] [blame]
David Kilroy712a4342009-02-04 23:05:55 +00001/* 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 Kilroyc63cdbe2009-06-18 23:21:33 +010010#include <net/cfg80211.h>
David Kilroy712a4342009-02-04 23:05:55 +000011
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 */
24struct orinoco_private;
David Kilroy712a4342009-02-04 23:05:55 +000025
David Kilroy3414fc32009-10-07 22:23:32 +010026int determine_fw_capabilities(struct orinoco_private *priv, char *fw_name,
27 size_t fw_name_len, u32 *hw_ver);
David Kilroye9e3d012009-06-18 23:21:19 +010028int orinoco_hw_read_card_settings(struct orinoco_private *priv, u8 *dev_addr);
David Kilroy42a51b92009-06-18 23:21:20 +010029int orinoco_hw_allocate_fid(struct orinoco_private *priv);
David Kilroy712a4342009-02-04 23:05:55 +000030int orinoco_get_bitratemode(int bitrate, int automatic);
31void orinoco_get_ratemode_cfg(int ratemode, int *bitrate, int *automatic);
32
David Kilroy721aa2f2009-06-18 23:21:31 +010033int orinoco_hw_program_rids(struct orinoco_private *priv);
David Kilroy712a4342009-02-04 23:05:55 +000034int orinoco_hw_get_tkip_iv(struct orinoco_private *priv, int key, u8 *tsc);
35int __orinoco_hw_set_bitrate(struct orinoco_private *priv);
36int orinoco_hw_get_act_bitrate(struct orinoco_private *priv, int *bitrate);
37int __orinoco_hw_set_wap(struct orinoco_private *priv);
38int __orinoco_hw_setup_wepkeys(struct orinoco_private *priv);
39int __orinoco_hw_setup_enc(struct orinoco_private *priv);
David Kilroy98e5f402009-06-18 23:21:25 +010040int __orinoco_hw_set_tkip_key(struct orinoco_private *priv, int key_idx,
David Kilroy16e15842009-08-05 21:23:29 +010041 int set_tx, u8 *key, u8 *rsc, size_t rsc_len,
42 u8 *tsc, size_t tsc_len);
David Kilroy712a4342009-02-04 23:05:55 +000043int orinoco_clear_tkip_key(struct orinoco_private *priv, int key_idx);
44int __orinoco_hw_set_multicast_list(struct orinoco_private *priv,
Jiri Pirko655ffee2010-02-27 07:35:45 +000045 struct net_device *dev,
David Kilroy712a4342009-02-04 23:05:55 +000046 int mc_count, int promisc);
47int orinoco_hw_get_essid(struct orinoco_private *priv, int *active,
Pavel Roskin933d5942011-07-13 11:19:57 -040048 char buf[IW_ESSID_MAX_SIZE + 1]);
David Kilroy712a4342009-02-04 23:05:55 +000049int orinoco_hw_get_freq(struct orinoco_private *priv);
50int orinoco_hw_get_bitratelist(struct orinoco_private *priv,
51 int *numrates, s32 *rates, int max);
David Kilroyc63cdbe2009-06-18 23:21:33 +010052int orinoco_hw_trigger_scan(struct orinoco_private *priv,
53 const struct cfg80211_ssid *ssid);
David Kilroy07542d02009-08-05 21:23:30 +010054int orinoco_hw_disassociate(struct orinoco_private *priv,
55 u8 *addr, u16 reason_code);
David Kilroy2b260352009-08-05 21:23:31 +010056int orinoco_hw_get_current_bssid(struct orinoco_private *priv,
57 u8 *addr);
David Kilroy712a4342009-02-04 23:05:55 +000058
59#endif /* _ORINOCO_HW_H_ */