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