blob: e87c4a484dd4110eb790fd3cdf82c27c9e624f1d [file] [log] [blame]
Igor Mitsyanko98f44cb2017-05-11 14:51:01 -07001/*
2 * Copyright (c) 2016 Quantenna Communications, Inc.
3 *
4 * This program is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU General Public License
6 * as published by the Free Software Foundation; either version 2
7 * of the License, or (at your option) any later version.
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 *
14 */
15
16#ifndef QLINK_COMMANDS_H_
17#define QLINK_COMMANDS_H_
18
19#include <linux/nl80211.h>
20
21#include "core.h"
22#include "bus.h"
23
24int qtnf_cmd_send_init_fw(struct qtnf_bus *bus);
25void qtnf_cmd_send_deinit_fw(struct qtnf_bus *bus);
26int qtnf_cmd_get_hw_info(struct qtnf_bus *bus);
27int qtnf_cmd_get_mac_info(struct qtnf_wmac *mac);
28int qtnf_cmd_send_add_intf(struct qtnf_vif *vif, enum nl80211_iftype iftype,
29 u8 *mac_addr);
30int qtnf_cmd_send_change_intf_type(struct qtnf_vif *vif,
31 enum nl80211_iftype iftype, u8 *mac_addr);
32int qtnf_cmd_send_del_intf(struct qtnf_vif *vif);
33int qtnf_cmd_get_mac_chan_info(struct qtnf_wmac *mac,
34 struct ieee80211_supported_band *band);
35int qtnf_cmd_send_regulatory_config(struct qtnf_wmac *mac, const char *alpha2);
Igor Mitsyanko9b692df2017-10-04 18:38:06 -070036int qtnf_cmd_send_config_ap(struct qtnf_vif *vif,
37 const struct cfg80211_ap_settings *s);
Igor Mitsyanko98f44cb2017-05-11 14:51:01 -070038int qtnf_cmd_send_start_ap(struct qtnf_vif *vif);
39int qtnf_cmd_send_stop_ap(struct qtnf_vif *vif);
40int qtnf_cmd_send_register_mgmt(struct qtnf_vif *vif, u16 frame_type, bool reg);
41int qtnf_cmd_send_mgmt_frame(struct qtnf_vif *vif, u32 cookie, u16 flags,
42 u16 freq, const u8 *buf, size_t len);
43int qtnf_cmd_send_mgmt_set_appie(struct qtnf_vif *vif, u8 frame_type,
44 const u8 *buf, size_t len);
45int qtnf_cmd_get_sta_info(struct qtnf_vif *vif, const u8 *sta_mac,
46 struct station_info *sinfo);
47int qtnf_cmd_send_phy_params(struct qtnf_wmac *mac, u16 cmd_action,
48 void *data_buf);
49int qtnf_cmd_send_add_key(struct qtnf_vif *vif, u8 key_index, bool pairwise,
50 const u8 *mac_addr, struct key_params *params);
51int qtnf_cmd_send_del_key(struct qtnf_vif *vif, u8 key_index, bool pairwise,
52 const u8 *mac_addr);
53int qtnf_cmd_send_set_default_key(struct qtnf_vif *vif, u8 key_index,
54 bool unicast, bool multicast);
55int qtnf_cmd_send_set_default_mgmt_key(struct qtnf_vif *vif, u8 key_index);
56int qtnf_cmd_send_add_sta(struct qtnf_vif *vif, const u8 *mac,
57 struct station_parameters *params);
58int qtnf_cmd_send_change_sta(struct qtnf_vif *vif, const u8 *mac,
59 struct station_parameters *params);
60int qtnf_cmd_send_del_sta(struct qtnf_vif *vif,
61 struct station_del_parameters *params);
62
63int qtnf_cmd_resp_parse(struct qtnf_bus *bus, struct sk_buff *resp_skb);
64int qtnf_cmd_resp_check(const struct qtnf_vif *vif,
65 const struct sk_buff *resp_skb, u16 cmd_id,
66 u16 *result, const u8 **payload, size_t *payload_size);
67int qtnf_cmd_send_scan(struct qtnf_wmac *mac);
68int qtnf_cmd_send_connect(struct qtnf_vif *vif,
69 struct cfg80211_connect_params *sme);
70int qtnf_cmd_send_disconnect(struct qtnf_vif *vif,
71 u16 reason_code);
72int qtnf_cmd_send_updown_intf(struct qtnf_vif *vif,
73 bool up);
Sergey Matyukevich4dd07d22017-07-28 02:06:43 +030074int qtnf_cmd_reg_notify(struct qtnf_bus *bus, struct regulatory_request *req);
Sergey Matyukevich7c04b432017-07-28 02:06:46 +030075int qtnf_cmd_get_chan_stats(struct qtnf_wmac *mac, u16 channel,
76 struct qtnf_chan_stats *stats);
Igor Mitsyanko8c015b92017-09-21 14:34:34 -070077int qtnf_cmd_send_chan_switch(struct qtnf_vif *vif,
Sergey Matyukevich978836952017-07-28 02:06:50 +030078 struct cfg80211_csa_settings *params);
Igor Mitsyanko9e5478b2017-09-21 14:34:31 -070079int qtnf_cmd_get_channel(struct qtnf_vif *vif, struct cfg80211_chan_def *chdef);
Igor Mitsyanko98f44cb2017-05-11 14:51:01 -070080
81#endif /* QLINK_COMMANDS_H_ */