dmake: do not set MAKEFLAGS=k
[unleashed/tickless.git] / usr / src / lib / libnwam / common / libnwam_wlan.c
blob6853614d16b13627ab2d8da5316d958c53898ee4
1 /*
2 * CDDL HEADER START
4 * The contents of this file are subject to the terms of the
5 * Common Development and Distribution License (the "License").
6 * You may not use this file except in compliance with the License.
8 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9 * or http://www.opensolaris.org/os/licensing.
10 * See the License for the specific language governing permissions
11 * and limitations under the License.
13 * When distributing Covered Code, include this CDDL HEADER in each
14 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15 * If applicable, add the following below this CDDL HEADER, with the
16 * fields enclosed by brackets "[]" replaced with your own identifying
17 * information: Portions Copyright [yyyy] [name of copyright owner]
19 * CDDL HEADER END
23 * Copyright 2010 Sun Microsystems, Inc. All rights reserved.
24 * Use is subject to license terms.
27 #include "libnwam_impl.h"
28 #include <libnwam.h>
31 * Functions that request WLAN-specific actions (scan, WLAN selection
32 * and key setting).
36 * Launch scan on specified link linkname.
38 nwam_error_t
39 nwam_wlan_scan(const char *linkname)
41 return (nwam_request_wlan(NWAM_REQUEST_TYPE_WLAN_SCAN, linkname,
42 NULL, NULL, 0, 0, NULL, B_FALSE));
46 * Get most-recently-cached scan results for link linkname.
48 nwam_error_t
49 nwam_wlan_get_scan_results(const char *linkname, uint_t *num_wlansp,
50 nwam_wlan_t **wlansp)
52 return (nwam_request_wlan_scan_results(linkname, num_wlansp,
53 wlansp));
57 * Select specified WLAN <essid, bssid> for link linkname.
59 nwam_error_t
60 nwam_wlan_select(const char *linkname, const char *essid, const char *bssid,
61 uint32_t secmode, boolean_t add_to_known_wlans)
63 return (nwam_request_wlan(NWAM_REQUEST_TYPE_WLAN_SELECT,
64 linkname, essid, bssid, secmode, 0, NULL, add_to_known_wlans));
68 * Create/update security key for WLAN <essid, bssid>.
70 nwam_error_t
71 nwam_wlan_set_key(const char *linkname, const char *essid, const char *bssid,
72 uint32_t secmode, uint_t keyslot, const char *key)
74 return (nwam_request_wlan(NWAM_REQUEST_TYPE_WLAN_SET_KEY,
75 linkname, essid, bssid, secmode, keyslot, key, B_FALSE));