blob: 84e2c86930157e3f90ac2842bbd56fb39e67f01d [file] [log] [blame]
Qiwei Caie689a262018-07-26 15:50:22 +08001/*
2 * Copyright (c) 2012-2018 The Linux Foundation. All rights reserved.
3 *
4 * Permission to use, copy, modify, and/or distribute this software for
5 * any purpose with or without fee is hereby granted, provided that the
6 * above copyright notice and this permission notice appear in all
7 * copies.
8 *
9 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
10 * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
11 * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE
12 * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
13 * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
14 * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
15 * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
16 * PERFORMANCE OF THIS SOFTWARE.
17 */
18
19#ifndef __WLAN_HDD_STATION_INFO_H
20#define __WLAN_HDD_STATION_INFO_H
21
22/**
23 * DOC: wlan_hdd_station_info_h
24 *
25 * WLAN Host Device Driver STATION info API specification
26 */
27
28#ifdef FEATURE_STATION_INFO
29/**
30 * wlan_hdd_cfg80211_get_station_cmd() - Handle get station vendor cmd
31 * @wiphy: corestack handler
32 * @wdev: wireless device
33 * @data: data
34 * @data_len: data length
35 *
36 * Handles QCA_NL80211_VENDOR_SUBCMD_GET_STATION.
37 * Validate cmd attributes and send the station info to upper layers.
38 *
39 * Return: Success(0) or reason code for failure
40 */
41int32_t hdd_cfg80211_get_station_cmd(struct wiphy *wiphy,
42 struct wireless_dev *wdev,
43 const void *data,
44 int data_len);
45
46#define FEATURE_STATION_INFO_VENDOR_COMMANDS \
47{ \
48 .info.vendor_id = QCA_NL80211_VENDOR_ID, \
49 .info.subcmd = QCA_NL80211_VENDOR_SUBCMD_GET_STATION, \
50 .flags = WIPHY_VENDOR_CMD_NEED_WDEV | \
51 WIPHY_VENDOR_CMD_NEED_NETDEV | \
52 WIPHY_VENDOR_CMD_NEED_RUNNING, \
53 .doit = hdd_cfg80211_get_station_cmd \
54},
55#else /* FEATURE_STATION_INFO */
56#define FEATURE_STATION_INFO_VENDOR_COMMANDS
57#endif /* FEATURE_STATION_INFO */
58
59#endif /* __WLAN_HDD_STATION_INFO_H */
60