1 /* SPDX-License-Identifier: (GPL-2.0 OR MPL-1.1) */
2 /*
3  *
4  * Declares the mgmt command handler functions
5  *
6  * Copyright (C) 1999 AbsoluteValue Systems, Inc.  All Rights Reserved.
7  * --------------------------------------------------------------------
8  *
9  * linux-wlan
10  *
11  * --------------------------------------------------------------------
12  *
13  * Inquiries regarding the linux-wlan Open Source project can be
14  * made directly to:
15  *
16  * AbsoluteValue Systems Inc.
17  * info@linux-wlan.com
18  * http://www.linux-wlan.com
19  *
20  * --------------------------------------------------------------------
21  *
22  * Portions of the development of this software were funded by
23  * Intersil Corporation as part of PRISM(R) chipset product development.
24  *
25  * --------------------------------------------------------------------
26  *
27  * This file contains the constants and data structures for interaction
28  * with the hfa384x Wireless LAN (WLAN) Media Access Controller (MAC).
29  * The hfa384x is a portion of the Harris PRISM(tm) WLAN chipset.
30  *
31  * [Implementation and usage notes]
32  *
33  * [References]
34  *   CW10 Programmer's Manual v1.5
35  *   IEEE 802.11 D10.0
36  *
37  *    --------------------------------------------------------------------
38  */
39 
40 #ifndef _PRISM2MGMT_H
41 #define _PRISM2MGMT_H
42 
43 extern int prism2_reset_holdtime;
44 extern int prism2_reset_settletime;
45 
46 u32 prism2sta_ifstate(struct wlandevice *wlandev, u32 ifstate);
47 
48 void prism2sta_ev_info(struct wlandevice *wlandev,
49 		       struct hfa384x_inf_frame *inf);
50 void prism2sta_ev_txexc(struct wlandevice *wlandev, u16 status);
51 void prism2sta_ev_tx(struct wlandevice *wlandev, u16 status);
52 void prism2sta_ev_alloc(struct wlandevice *wlandev);
53 
54 int prism2mgmt_mibset_mibget(struct wlandevice *wlandev, void *msgp);
55 int prism2mgmt_scan(struct wlandevice *wlandev, void *msgp);
56 int prism2mgmt_scan_results(struct wlandevice *wlandev, void *msgp);
57 int prism2mgmt_start(struct wlandevice *wlandev, void *msgp);
58 int prism2mgmt_wlansniff(struct wlandevice *wlandev, void *msgp);
59 int prism2mgmt_readpda(struct wlandevice *wlandev, void *msgp);
60 int prism2mgmt_ramdl_state(struct wlandevice *wlandev, void *msgp);
61 int prism2mgmt_ramdl_write(struct wlandevice *wlandev, void *msgp);
62 int prism2mgmt_flashdl_state(struct wlandevice *wlandev, void *msgp);
63 int prism2mgmt_flashdl_write(struct wlandevice *wlandev, void *msgp);
64 int prism2mgmt_autojoin(struct wlandevice *wlandev, void *msgp);
65 
66 /*---------------------------------------------------------------
67  * conversion functions going between wlan message data types and
68  * Prism2 data types
69  *---------------------------------------------------------------
70  */
71 
72 /* byte area conversion functions*/
73 void prism2mgmt_bytearea2pstr(u8 *bytearea, struct p80211pstrd *pstr, int len);
74 
75 /* byte string conversion functions*/
76 void prism2mgmt_pstr2bytestr(struct hfa384x_bytestr *bytestr,
77 			     struct p80211pstrd *pstr);
78 void prism2mgmt_bytestr2pstr(struct hfa384x_bytestr *bytestr,
79 			     struct p80211pstrd *pstr);
80 
81 /* functions to convert Group Addresses */
82 void prism2mgmt_get_grpaddr(u32 did, struct p80211pstrd *pstr,
83 			    struct hfa384x *priv);
84 int prism2mgmt_set_grpaddr(u32 did,
85 			   u8 *prism2buf, struct p80211pstrd *pstr,
86 			   struct hfa384x *priv);
87 int prism2mgmt_get_grpaddr_index(u32 did);
88 
89 void prism2sta_processing_defer(struct work_struct *data);
90 
91 void prism2sta_commsqual_defer(struct work_struct *data);
92 void prism2sta_commsqual_timer(struct timer_list *t);
93 
94 /* Interface callback functions, passing data back up to the cfg80211 layer */
95 void prism2_connect_result(struct wlandevice *wlandev, u8 failed);
96 void prism2_disconnected(struct wlandevice *wlandev);
97 void prism2_roamed(struct wlandevice *wlandev);
98 
99 #endif
100