xref: /wlan-dirver/qca-wifi-host-cmn/os_if/linux/mlme/inc/osif_cm_req.h (revision 97f44cd39e4ff816eaa1710279d28cf6b9e65ad9)
1 /*
2  * Copyright (c) 2012-2015, 2020 The Linux Foundation. All rights reserved.
3  *
4  * Permission to use, copy, modify, and/or distribute this software for any
5  * purpose with or without fee is hereby granted, provided that the above
6  * copyright notice and this permission notice appear in all copies.
7  *
8  * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
9  * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
10  * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
11  * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
12  * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
13  * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
14  * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
15  */
16 
17 /**
18  * DOC: osif_cm_req.h
19  *
20  * This header file maintains declarations of connect, disconnect, roam
21  * request apis.
22  */
23 
24 #ifndef __OSIF_CM_REQ_H
25 #define __OSIF_CM_REQ_H
26 
27 #ifdef FEATURE_CM_ENABLE
28 #include "qdf_status.h"
29 #include "wlan_cm_public_struct.h"
30 #include <net/cfg80211.h>
31 #include "wlan_objmgr_vdev_obj.h"
32 
33 /**
34  * struct osif_connect_params - extra connect params
35  * @scan_ie: default scan ie to be used in connect scan and unicast probe req
36  * during connect
37  * @force_rsne_override: force the arbitrary rsne received in connect req to be
38  * used with out validation, used for the scenarios where the device is used
39  * as a testbed device with special functionality and not recommended
40  * for production.
41  * @dot11mode_filter: dot11mode filter used to restrict connection to
42  * 11n/11ac/11ax.
43  * @sae_pwe: SAE mechanism for PWE derivation
44  *           0 = hunting-and-pecking loop only
45  *           1 = hash-to-element only
46  *           2 = both hunting-and-pecking loop and hash-to-element enabled
47  */
48 struct osif_connect_params {
49 	struct element_info scan_ie;
50 	bool force_rsne_override;
51 	enum dot11_mode_filter dot11mode_filter;
52 	uint8_t sae_pwe;
53 };
54 
55 /**
56  * osif_cm_connect() - Connect start request
57  * @dev: net dev
58  * @vdev: vdev pointer
59  * @req: connect req
60  * @params: connect params
61  *
62  * Return: int
63  */
64 int osif_cm_connect(struct net_device *dev, struct wlan_objmgr_vdev *vdev,
65 		    const struct cfg80211_connect_params *req,
66 		    const struct osif_connect_params *params);
67 
68 /**
69  * osif_cm_disconnect() - Disconnect start request
70  * @dev: net dev
71  * @vdev: vdev pointer
72  * @reason: disconnect reason
73  *
74  * Return: int
75  */
76 int osif_cm_disconnect(struct net_device *dev, struct wlan_objmgr_vdev *vdev,
77 		       uint16_t reason);
78 
79 /**
80  * osif_cm_disconnect_sync() - Disconnect vdev and wait for it to complete
81  * @vdev: vdev pointer
82  * @reason: disconnect reason
83  *
84  * Return: int
85  */
86 int osif_cm_disconnect_sync(struct wlan_objmgr_vdev *vdev, uint16_t reason);
87 
88 #endif
89 #endif /* __OSIF_CM_REQ_H */
90